|
Assembler can be a whole load of fun!
Partly because it's "as close to nature" as you want to get (machine code is a real PITA to code in - I've done it but it's a slog, rather than a joy); and partly because you aren't constrained by the framework.
OK, you don't have Sort, or SubString - but it's a very, very good way to get new hardware working, and sometimes it's still the only way to get the code doing exactly what you want. Particularly when you are interfacing to other hardware and need exact timing. There is a huge endorphin rush when you turn on the power and a LED blinks at the right frequency, or an interrupt is being processed!
And the feeling of "I saved 8 cycles!" in a tight loop...if you haven't done it, you don't know it!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
"I saved 8 cycles" would take 16 wheels to be invented, or 24 if a tricycle.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
A little too rich. And then Mickeysoft says oops and pulls away some libraries from under your feet and you have the great choice between reinventing your own work or rediscovering the trash bin.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
No but I do love to contribute more to make the tubes more powerful for that wheel
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
F-ES Sitecore wrote: You know what, I'd rather spend all day re-inventing the wheel"
I was thinking the same thing, as I read his post.
|
|
|
|
|
Learning how they invented the wheel was a bad thing?
If so, then you really deserve to give the money you earned to Microsoft! Sorry buddy, no one can save you.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
I think you are reading into my comment, waaaaaay to much, buddy, o'pal.
|
|
|
|
|
Yes, because you can make a better wheel.
Tuesday Coding Challenge: do a modular multiplication of two ulongs, modulo some ulong, imagine (x * y) % m using BigInteger . You may assume that x < m && y < m && m != 0 because not assuming that just adds some trivial preprocessing and doesn't change the core of the problem.
Go do it in C#. If you don't use BigInteger , I'm sure you already see the trouble coming: you can't even multiply two ulong s in such a way that you get the upper half, so you'd have to split them, and the division is even more annoying.
Or if you use BigInteger as in the example, sure, that works.. but it has to do the same thing internally so it still sucks - you've hidden the suck but that doesn't make it go away. One of the biggest failings of high level languages IMO, you can just sweep the suck under the rug, making it too easy to just ignore it.
Or you could do a longhand binary multiplication so you can sneak in reductions one by one, but that's obviously terrible.
In x64 assembly it's:
mov rax, rcx
mul rdx
div r8
mov rax, rdx
ret
So C# is really annoying here, there's a perfectly fine feature available in the processor to do this easily and somewhat efficiently (128-by-64bit division still sucks, but not as much as when you emulate it), but you can't use it so you're reduced to doing it in dumb and annoying ways.
edit: forgot a mov.
modified 25-Aug-15 15:42pm.
|
|
|
|
|
Thankfully I never have to do modular multiplication of two ulongs, so this isn't a problem for me personally. Dang I thank Bill Gates for Guid.TryParse though
|
|
|
|
|
Assembly is not from scratch. You can call whatever you want. Well, not Guid.TryParse, but GUIDFromString yes.
|
|
|
|
|
harold aptroot wrote: making it too easy to just ignore it. You mean that there's a slight, nearly neglectible penalty?
Somewhat like a rubber-track that is not quite as efficient as the wheel on the open road?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I mean there can be an arbitrary penalty that will be hidden under several layers of "I'm hiding an implementation detail and that's a good thing". The user of the top layer will have no idea what's going on and therefore will use anything that's convenient, no matter the cost, it's all invisible. It's all preventable if you want to prevent it, but languages are set up to make people fall into the trap.
|
|
|
|
|
Afzaal Ahmad Zeeshan wrote: "Am I high enough to think that way?" Dunno, how high are you? Rules state that you have to be at least 5' 7" to think about low level programming. Also, you need to weigh at least 12 stone.
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
With your migraines, I was getting them too.
I found taking Zyrtek and Singulair for allergies REALLY helped.
In fact, I forgot to take my Singulair last night, until the headache started.
I have a slight headache this morning still, from that mistake.
When they get so bad, your vision is blurred, it makes it hard to program
|
|
|
|
|
Indeed, that is why I try taking 4-5 mugs of tea in my daily up-time of 10 hours.
I will consider those also. Thank you very much!
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Do you believe in a better world, where chickens can cross the road without having thier motives questioned?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Why did you post that?
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
I suppose you eggxpect someone to say that was fowl?
|
|
|
|
|
|
OriginalGriff wrote: where chickens can cross the road , roll around in seasoned flour, fall into hot oil, and end up on a plate with mashed potatoes and a cold . There, better.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Gonna get me some gourmet Popeye's tonight.
/ravi
|
|
|
|
|
Had some Sunday night, looks like I may be having some tonight as well!
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Clearly we have the same (good) taste in food.
/ravi
|
|
|
|
|
Kinda cool seeing a local thing with such an outreach. Being from Louisiana, I pretend to take all the credit for Popeye's.
Jeremy Falcon
|
|
|
|
|
The power of advertising!
Never ate it in Boston, but am tempted to munch some seeing there are so many Popeye's stores in Toronto.
/ravi
|
|
|
|