Trending
John Fetterman is trending now Karen Read is trending now Florida Panthers is trending now Georgia baseball is trending now Malawi is trending now Tony Evans is trending now Rebecca Grossman is trending now iOS 18 beta is trending now Maren Morris is trending now Nvidia stock price is trending now iOS 18 beta is trending now Maren Morris is trending now John Fetterman is trending now Karen Read is trending now Florida Panthers is trending now Georgia baseball is trending now Malawi is trending now Tony Evans is trending now Rebecca Grossman is trending now iOS 18 beta is trending now Maren Morris is trending now Nvidia stock price is trending now iOS 18 beta is trending now Maren Morris is trending now
Technology

Learn C with a Lisp

Learn C with a Lisp

One reason Forth remains popular is that it is very simple to create, but also very powerful. But there’s an even older language that can make the same claim: LISP. …read more

One reason Forth remains popular is that it is very simple to create, but also very powerful. But there’s an even older language that can make the same claim: LISP. Sure, some people think that’s an acronym for “lots of irritating spurious parenthesis,” but if you can get past the strange syntax, the language is elegant and deceptively simple, at least at its core. Now, [Daniel Holden] challenges you to build your own Lisp as a way to learn C programming.

It shouldn’t be surprising that LISP is fairly simple. It was the second-oldest language, showing up in the late 1950s with implementations in the early 1960s. The old hardware couldn’t do much by today’s standards, so it is reasonable that LISP has to be somewhat economical.

With LISP, everything is a list, which means you can freely treat code as data and manipulate it. Lists can contain items like symbols, numbers, and other lists. This is somewhat annoying to C, which likes things to have particular types, so that’s one challenge to writing the code.

While we know a little LISP, we aren’t completely sold that building your own is a good way to learn C. But if you like LISP, it might be good motivation. We might be more inclined to suggest Jones on Forth as a good language project, but, then again, it is good to have choices. Of course, you could choose not to choose and try Forsp.

View original source →

Related

More from Hackaday Blog