HNHacker News
TopNewBestAskShowJobs

gustavopezzi

196 karma · joined February 10, 2023

submissionscomments
gustavopezzi··on Writing a DSL in Lua (2015)
Lua's LPeg library would also be a great option here. A couple of years ago I taught an interpreters class together with Roberto Ierusalimschy and we used LPeg for lexing and parsing. The end result was great. Even if you're not using PEGs for your implementation I would recommend spending 30 minutes and looking at LPeg.
gustavopezzi··on TinyCompiler: A compiler in a week-end
Hey there. Thanks for the mention and for the kind words.
gustavopezzi··on NESFab – A new programming language for creating NES games
Hi there. I'm glad you enjoyed the NES module. :)
gustavopezzi··on I believe 6502 instruction set is a good first assembly language
My pleasure! :)
gustavopezzi··on Why blog if nobody reads it?
I personally never thought academic papers were about the author. They might have turned into an ego game, but I always assumed that the goal of academic writing was to effectively communicate complex ideas and research findings to the reader. If not, then it's no wonder our voices are the first ones the public ignores in a time of crisis.
gustavopezzi··on Why blog if nobody reads it?
This is precisely why I am suspicious of most "free" online resources out there. When one writes to establish themselves as a credible source or as authority on a subject, they are flipping the target of the writing. They are making it all about the author, and not the reader/student. This is similar to what happens with academic writing, where using an approachable tone of voice can be seen as hurtful to the author's image of authority. Unfortunately, by the time someone actually tries to learn from this type of resource, a lot of damage is already done.
gustavopezzi··on I believe 6502 instruction set is a good first assembly language
As someone who has been teaching assembly to undergrads for many years, I have a couple of things to say about this. First of all, I agree. The 6502 is great for beginners but that is not just merit of the 6502 language and I want to explain why.

I have taught 68K, MIPS, ARM, x86, etc., and the overall good student feedback I got by teaching 6502 is mostly because of the surrounding context that comes with the CPU. The reason 6502 clicked better than other modern alternatives (MIPS, ARM, x86, etc.) was because we use it to program a real machine that is simple to understand (i.e. Nintendo Entertainment System). Rudimentary memory mapped IO, no operating system, no pipelined instructions, no delay slots, no network, no extra noise, ...it's just a simple box with a a clock inside, a CPU, some memory addresses, some helper chips, IO mapped to memory addresses, and that's pretty much it!!! So, even though I agree that the 6502 is not the simplest instruction set out there, THIS simplicity of the system helped a lot.

And about the limitations of the 6502 CPU, these limitations were also important for students to understand that these instructions have a reason to be the way they are. CPUs were designed and wired given the constraints of that time, and that reflects on how we programmed for them.

So, even thought this was mostly empirical, I have to say picking 6502 and the NES to teach beginners was successful. Once again, not really because it was the 6502, but because the 6502 forced us to go simple in terms of the sytem we were moving bits left and right.

Once students played around with the 6502 and saw NES tiles moving on the screen, then it was super cool to evolve and show them how the 68000 did things differently, and then evolve more and show how MIPS came, show how pipelining works, how to take advantage of delay slots, and being able to compare the differences of RISC and CISC. It's super simple to evolve once the basics are there.

gustavopezzi··on I wrote my own “proper” programming language (2020)
Hi there. Thanks for the mention. I'm glad it was helpful. :)
gustavopezzi··on Lua is so underrated
Lua is a great language for extending systems and very high-level scripting. I like it. I had the pleasure of teaching a module in 2020 together with Roberto Ierusalimschy where we used Lua and LPeg to teach students how to write a simple programming language. It was a very fun class.
gustavopezzi··on SVC16: Simplest Virtual Computer
I like this. Thanks for sharing.
gustavopezzi··on Ask HN: Those making $500/month on side projects in 2024 – Show and tell
Thank you for the kind words. Also, I just want to clarify to others reading the thread that I'm drinking "mate" in the lectures (as in the south american herb drink), and I'm not just a drinking mate (as in the british expression).
gustavopezzi··on Ask HN: Those making $500/month on side projects in 2024 – Show and tell
I have created https://pikuma.com to teach computer science, retro programming, and mathematics.
gustavopezzi··on The Impact of Jungle Music in 90s Video Game Development
I agree. To be honest, I don't think I ever used the term EDM before in my life, but I went with the same expression that my sources used.
gustavopezzi··on The Impact of Jungle Music in 90s Video Game Development
Hi there. That was probably just a small mistake on how I tried to explain the paragraph or the poor choice of words/terms I used. Thanks for the heads up.
gustavopezzi··on The Impact of Jungle Music in 90s Video Game Development
Thanks for the heads up. It's funny how we encounter different sources telling us different things about the history of these subgenres. I'll go back and review/expand that paragraph soon.
gustavopezzi··on The Impact of Jungle Music in 90s Video Game Development
Hi there. Author here. Thanks for the heads up. I would never even consider using LLMs for this, this is just a subject that was always interesting to me so I thought it would be a good idea to write some of it down. Some of these mentions look like shortcomings of English not being my first language; I'll try to review it and change the words or terms that you suggested.
gustavopezzi··on The Impact of Jungle Music in 90s Video Game Development
Author here. Thanks for sharing the blog post on HN; it was a nice surprise to see it in the first page.
gustavopezzi··on Compilers, Interpreters and Formal Languages
Thanks for sharing.
gustavopezzi··on Implementing a Tiny CPU Rasterizer
Thank you for the mention. :)
gustavopezzi··on Implementing a Tiny CPU Rasterizer
I don't believe this repo implements clipping.
gustavopezzi··on Implementing a Tiny CPU Rasterizer
Thank you for posting this. I cannot believe I did not know about it yet!
gustavopezzi··on Eliza in SNOBOL4
A couple of years ago I was lucky to teach a compiler class with Roberto Ierusalimschy from PUC-Rio, where we used a PEG parser for Lua called LPEG. That semester we spoke a lot about LPEG's implementation and that was very important for me to understand the original motivations for SNOBOL. I'm glad to see more examples of proper SNOBOL code in action. Thanks for the post.
gustavopezzi··on Ask HN: Resources for Learning Graphics Programming
Thanks everyone that mentioned pikuma.com. Just keep in mind that our 3D Programming lectures cover mostly software rendering and math intuition behind it, and not so much advanced GPU stuff.
gustavopezzi··on Dethrace: Reverse engineering the 1997 game "Carmageddon" (2023)
Really nice work. Thanks for the share.
gustavopezzi··on Just for Fun (2022)
Same feeling here as well. That was basically the main reason I created my online school... to teach the things I was not allowed to teach at the university.
gustavopezzi··on Just for Fun (2022)
That's a great thing. It's like cooking and crafting an amazing meal just for one. It's a completely intrinsic experience but definitely worth it regardless.

I struggle to explain this mindset to some people that send me emails at pikuma.com. Still, my take is always: "if we need to explain why this course is exciting, then que question is probably already answered."

gustavopezzi··on Isometric Projection in Game Development
Hello, Gustavo here (author). Thanks for sharing the article and for all tye feedback.
gustavopezzi··on Isometric Projection in Game Development
Noted.
gustavopezzi··on Isometric Projection in Game Development
Author here. You're absolutely right. I got so used to reading resources on paper using Cartesian coordinates and having to account for it in screen space that I overlooked this conversion in the explanations. I'll go over it and amend it ASAP.
gustavopezzi··on Isometric Projection in Game Development
Hi. Author here! I'll try to be unbiased and say that if she's just starting out I'm afraid there are better beginner-oriented resources out there for teens. Frankly, what I do is very niche and it's not really utilitarian for those starting out.

I have a son and I asked the same question on how to start learning. I have decided to start with PICO-8 and then evolve to something else. Fingers crossed. :)

← PreviousPage 2 of 3Next →