Hacker Newsnew | past | comments | ask | show | jobs | submit | jessicard's commentslogin

Thanks! Totally agree - you need to understand some programming basics in order to understand the examples in the code section. Things like variables and for loops.


Nice catch! Just to be clear, it was that we were incrementing our exponent but not our counter, is that right? I pushed up a fix, but let me know if there were other issues.


It's a bit more involved than that.

  mul rcx, rax       ; multiply our result by our base, save into rcx
This should probably be using rbx, since that's the designated base, not rax, which is the exponent.

In the explanation just above, there's a 2*8 step missing, while this one is incorrect:

  4. result = 16 * 2, result is now 16
Since 2*16 is not 16.


Ahhhhh thank you! Do you mind opening a PR or issue so I can get to that? Thank you for noticing!!


Ahhhh thank you for mentioning this! This was _really_ important to us, because it was hard for us to find real code examples that worked, and when we did, they were hard to parse.

It's also why we put it in GitHub, so it could live alongside the code examples :)


Yes! I think two things with code examples have a significant impact, at least for me personally- 1) the examples are complete and work and 2) line-by-line explanation.

A lot of resources show a snippet of code, followed by an impenetrable paragraph that tries to explain multiple concepts from the snippet all at once. Maybe that works for others, but for me it makes it impossible to parse and overwhelms me, so nothing sticks.


This 100%, i often find alot of blogs and documentation really difficult to follow because they just show a snippet and no where in the doc does it cover the prerequisites to get to that point.

I get you don't want to clutter the point, but start with a link to working code or an article that explains the basics.

I would be happy if more articles/docs explained how this code is being called.


It was so fun working with Hack Clubbers on this project!

Hack Club is a group of teenagers from all over the world, and we decided to learn assembly together from scratch and see what happened.

We ended up making this guide as we learned, since a lot of the resources we were working with weren't the easiest to parse.

Happy to answer any questions :)


I gotta say, it's pretty cool how nice young people have it these days with what's available in terms of stuff like Hack Club. The whole scene has become WAY more inclusive as a result of things like that, and the acerbic hacker archetype who snaps at you for not knowing things the way they do is so dead as a result - that to me is great, I don't miss those guys and their gatekeeping.

If you want to check out some fun assembly code in a larger program, I suggest checking out the leaked furby source code. [1] The assembly for the lunar landing modules from the 1960s is also pretty wild [2]

[1] https://www.seanriddle.com/furbysource.pdf

[2] https://github.com/chrislgarry/Apollo-11


You just brought a random memory from uni where a small group of people wanted to get others interested in cybersecurity and did a weekly session on teaching others.. First meeting had a huge turnout and I expected future meetings to consist of learning through teaching us concepts with some practical tasks, except it became a session of just a few people talking to each other using security terminology that no one understood because it was meant to be introductory.


I think the big thing is that pedagogy itself is a hugely broad subject and especially skill that you might just dunning-kruger yourself hard on thinking you're good at. I always thought school would have been a lot more engaging if the teachers were actually paid enough to give a damn, they have a tremendously undervalued skill set and we put our kids in the trust of them while cutting their salaries every other year or so? What the hell is the motivation at that point?

I really cut my teeth on programming getting yelled at a lot by a guy in German about meeting OpenBSD kodequalität and that kind of sucked, to be honest I was at a point one time after enough workplace toxicity in IT (Getting sexually harassed by a boss at a megacorp guaranteed I don't ever want to work at one of those places again especially) where I figured I'd rather be a bee farmer or something instead. There's really no necessity for that kind of attitude but some people have been going around acting like this is the way things are in IT so you better suck it up and get used to it, especially when there's a lot of money on the line, and it's definitely true that a LOT of people could learn better on how to write code that doesn't get hacked or crashes, because often there isn't just tons of money on the line but people's health, safety, and wellness - but if the health, safety and wellness of the person writing the code is affected by some insanely stupid cultural assumption that's existed in this industry, then how good are they ultimately going to be at it in their code? It was kind of funny watching Linus Torvalds explode at people for these things back in the day, but in hindsight I'm very glad he took some time off to become a more emotionally and socially mature person for the good of the project. I don't want to work in an industry where it's just smelly angry brogrammers with maturity issues, the more that changes the better and I think I see it happening quite rapidly.

What these kids are doing is a huge step in the right direction, I applaud them. They seem to get what the past half century or so of people seem to have been kind of embarrassingly bad at and that's just being decent human beings with each other.


> It was kind of funny watching Linus Torvalds explode at people for these things back in the day, but in hindsight I'm very glad he took some time off to become a more emotionally and socially mature person for the good of the project.

It's ironic that you say this while complaining about bad attitudes in the OpenBSD community. When it comes to obnoxious attitudes, Linus Torvalds is a nobody compared to Theo de Raadt. BTW, Linus is now pushing for gradual adoption of Rust in the kernel, which would turn many issues of "writing code that doesn't crash" (though not all) into things that a compiler can check for you. That community is generally pretty relaxed and cooperative towards newcomers, due to a shared understanding that there's no point getting angry about code that won't even pass that check.


I haven't seen that out of Theo for a really long time, either. Most OpenBSD dev these days has seemed to move on from the beer hackathons and into academic/corporate dev for sure. It's all growing up. Most of my reference is relevant to +10 years ago. I like the OpenBSD scene these days a lot actually, there's a ton to learn from them. They are a lot more of a nice community than their old legacy might have you believing.

I like the Redox crowd and other people who are trying their hand at pure rust kernel+userland as well, they are doing some very interesting things that probably should have been done a long time ago - it's just not exactly easy to move on from C/C++ heterodoxy when it's such a complex thing to even fathom entirely replacing. Like when your whole kernel is in a different ABI you need to replace the whole userland, too... Not exactly small potatoes. Very admirable to just go ahead and do it.


It's so amazing, I completely agree! It's really inspiring honestly.

And... OH MY GOD FURBY SOURCECODE THIS IS AWESOME THANK YOU


Glad you find joy in it. It's 6502 assembly, in case you were wondering - Though the chip was a low-voltage 6502-alike called the Sunplus.

Those things were pretty crazy when they glitched out, my friend had one which would get thrown in into a loop where it just open and close its eyes looking from side to side going WEAOWEAOWEAOWEAO like some kind of possessed demon until you took the batteries out.

Oh yeah, obligatory picture of what I'm pretty sure is Margaret Hamilton standing next to a printout of that lunar lander code [1]

[1] https://www.nasa.gov/sites/default/files/thumbnails/image/ma...


> Those things were pretty crazy when they glitched out [...] thrown into a loop like some kind of possessed demon

I was under the impression that this is the primary memorable feature of Furbies.

The second one is the Furby Organ, of course: https://youtube.com/watch?v=GYLBjScgb7o


My favorite demonic animatronic toy must be the ol' setting tickle me elmo on fire while he starts laughing like a maniac about how much it tickles [1]

[1] https://www.youtube.com/watch?v=GYGhmJD9LKc


This is really wonderful. And I like how simple and clean the pages look, even through markdown+github. Cheers.


Thank you so much!! We really wanted to try to make it live alongside the code examples in GitHub, but still feel almost e-book like. We definitely hacked around the GH Markdown a bit to achieve this. Thanks for noticing!


I only skimmed but it's looking good so far! Would you like feedback or suggestions? And if so, using git issues or other? Thanks!


Issues and PRs are preferred - thank you so much for reading! :D


Bravo! Great to see stuff like this! Hopefully you made some new friends too.


Thank you so much! It was so fun working with the teenagers in the community.


>Happy to answer any questions :)

what happens when a member hits 20?


They’re taken away to be… replaced by someone more fit, capable, and attractive.


Echoing other's comments... I'm happy you did this and hope to see more content like it!


Hey that's awesome! When I was a teenager I learnt C++ so I could code on a Zelda fan game engine. Why did you guys want to learn assembly?


If you're getting started with the command line, you might find helpful an entire series on Quick Left's blog for beginners and experienced devs alike: http://quickleft.com/blog/tag/command-line


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: