3 ms·
Lisp with GC in 436 Bytes
- IncreasePosts 2y agoWhy does brainfuck not count as a real language?
- IshKebab 2y agoIt's a toy language or esoteric language, designed to just have fun designing weird languages. The point of Brainfuck is to make it difficult to write programs so writing them becomes a "fun" challenge. In contrast Lisp is a real language designed to make writing useful programs easier, and has been used for decades to write real useful programs.
- dixie_land 2y agoBut brainfuck is Turing complete so you can bootstrap a LISP interpreter from brainfuck, thus making it "real"
- akira2501 2y ago> Lisp is a real language designed to make writing useful programs easier This implementation is the opposite of this goal. They explicitly eschew this in favor of making something small. So, no error messages, no printer, no macros, none of the things that make lisp "real." To the extend that BF is not real then this implementation of lisp isn't real either.
- IshKebab 2y agoI don't know anything about Lisp really but they claim it can run "real" Lisp, and have a demo. Are you saying this is a lie?
- akira2501 2y agoI challenge the definition of "real" as applied to _this_ implementation here. It can run some programs made only of exceptionally limited forms. You can, of course, build the components like integer addition and subtraction yourself in the least efficient way possible; however, how is this any different from the situation in BF? They themselves also say this: "The code above is a LISP within a LISP within a LISP: three levels. You can use this technique to implement missing features like macros."
- jart 2y agoI demonstrated in the blog post that SectorLISP can run real programs that John McCarthy and his crew wrote back in the 60's for his IBM 703 LISP 1.5 system. See https://justine.lol/sectorlisp2/proof.html https://justine.lol/sectorlisp2/proof.html where, with only light modifications to the original source code, I got his theorem prover working on SectorLISP, which uses Wang's algorithm. The original source code is here for comparison: https://justine.lol/sectorlisp2/wang.job.txt https://justine.lol/sectorlisp2/wang.job.txt
- akira2501 2y agoIt was written as an example for the LISP I Programmers Manual. The algorithm itself is not particularly powerful and this implementation can only return a singular true or false value. I wouldn't necessarily call this a "real" program as McCarthy was trying to demonstrate how to translate logical forms into s-expressions more than anything. I'm not saying any of this to be critical of this team's implementation, more so to defend the notion that brainfuck is just as "real." Or, if brainfuck is "not real" then this particular implementation isn't for more or less the same reasons.
- 2y ago
- xvedejas 2y agoBrainfuck isn't maximizing difficulty, it's just a turing tarpit, maximizing a narrow definition of simplicity. If you want to see a language that maximizes difficulty, take a look at INTERCAL or Malbolge.
- Onavo 2y agoIt's excellent for teaching Turing completeness and Turing machines
- deciduously 2y agoThis is a hilarious takeaway from this writeup.
- behnamoh 2y agoDefine "real"
- dang 2y agoRelated: Show HN: Lisp with GC in 436 Bytes - https://news.ycombinator.com/item?id=29630293 https://news.ycombinator.com/item?id=29630293 - Dec 2021 (131 comments)
- sim7c00 2y agoanything on justine.lol makes me feel like a single celled organism. weirdly it feels good. there's so many things in each project, which spirit can be applied to many things. also love the fact always previous projects and code are either used or referenced to explain things. i am only in awe each time something is posted.
- anthk 2y agoJustne.lol would love "The Computational Beauty of Nature". It has a github repo, with references to Mandelbrot, more fractals, atractors, and, of course, a Lisp and building blocks.
- bankcust08385 2y agoIt uses AT&T syntax. Yuck!
- dloss 2y agoHow small could this be if it was implemented on the SectorLambda VM (a sister project)? http://justine.lol/lambda/ http://justine.lol/lambda/
- jart 2y agoCheck out https://github.com/woodrush/lambdalisp https://github.com/woodrush/lambdalisp which was written for my Blc VM.