Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
soegaard
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
soegaard
1y ago
The name `macro-expand` is from Common Lisp. Scheme R5RS, R6RS and R7RS all have macro systems. In R5RS has a pattern/template based system (syntax-rules). In R6RS the system has both patterns, templates and procedural macros. The most
62.
▲
by
soegaard
1y ago
If you happen to be in Nordjylland, Denmark then you can also see the recreation: https://www.boerglumkloster.dk/hvad-kan-jeg-se/bayeux-tapete...
63.
▲
by
soegaard
1y ago
I think, the author's goal was to produce wasm-code that had the same structure as the original C. Thus it makes sense to turn off the advanced optimizations.
64.
▲
by
soegaard
1y ago
Well done!
65.
▲
by
soegaard
1y ago
The feature is fine but there are better reasons to introduce it. For macro generated code it is convenient to use identifiers that people won't accidently use in their own code. The ability to use arbitrary identifiers solve that.
66.
▲
by
soegaard
1y ago
FWIW - the YouTube app on Apple TV has a similar issue. The video previews are so large, that one can't get a proper overview.
67.
▲
by
soegaard
1y ago
Pick a language that allows users to define their own control structures and test your idea in practise. Candidates: Racket, Scheme, Rust.
68.
▲
by
soegaard
1y ago
Fun to see your article!
69.
▲
Freespin [video]
(youtube.com)
1 points
by
soegaard
1y ago
|
1 comments
70.
▲
by
soegaard
1y ago
Tricky to make an explanation without ruining the twist.
71.
▲
How MOS 6502 Illegal Opcodes Work (2008)
(pagetable.com)
66 points
by
soegaard
1y ago
|
17 comments
72.
▲
by
soegaard
2y ago
In that case, also check Zuo. https://docs.racket-lang.org/zuo/index.html Zuo is used to build Racket. It can be distributed as a single C file, which makes it extremely to integrate in new projects.
73.
▲
by
soegaard
2y ago
The notes reference: "An Incremental Approach to Compiler Construction" Abdulaziz Ghuloum http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf Can't recommend it enough.
74.
▲
by
soegaard
2y ago
Danes: Feel free to give this bug report an upvote. https://discussions.apple.com/thread/256032425
75.
▲
Apple Documentation Archive
(developer.apple.com)
2 points
by
soegaard
2y ago
|
1 comments
76.
▲
by
soegaard
2y ago
fun flip_first([Posn(x, y), more, ...]): [Posn(y, x), more, ...]
77.
▲
by
soegaard
2y ago
When the pattern `[Posn(x, y), ...]` matches a list of positions, since `Posn(x, y)` is followed by `...` the `x` is bound to a sequence of first coordinates and `y` is bound to a sequence of second coordinates. In the template the `Posn(y,
78.
▲
by
soegaard
2y ago
No.
79.
▲
by
soegaard
2y ago
It's not magic. It's pattern matching. The `[Posn(x, y), ...]` is a pattern that matches a list of positions. The `[Posn(y, x), ...]` is a template that produces a list of positions.
80.
▲
by
soegaard
2y ago
The authors of the JS version of SICP had a problem: Scheme is expression based and JavaScript is statement based. When I say Scheme is expression based, I am alluding to the fact that constructs such as `if`, `cond`, `case` etc. are all ex
81.
▲
by
soegaard
2y ago
This is no different from having competing libraries for dates, regular expressions, html parsing etc.
82.
▲
by
soegaard
2y ago
You can think of macros as a compiler frontend. The compilation process is more or less: lexing -> parsing/macro expansion -> compilation of core language The macro expansion phase removes all uses of macros and produces
83.
▲
by
soegaard
2y ago
> This is just my opinion but I believe it's because the syntax tree is the syntax. This holds for "old" lisps. There are other options. Racket and Scheme uses "syntax objects". Syntax objects contain besides the
84.
▲
by
soegaard
2y ago
This is great? Feature request: A way to easily copy old expressions into the current input field (to fix mistakes).
85.
▲
by
soegaard
2y ago
In modern Danish it is "saltkværn" (salt mill) and "peberkværn" (peber mill).
86.
▲
by
soegaard
2y ago
The fat content seems too high. Don't you get a film of fat covering the top of you mouth?
87.
▲
by
soegaard
2y ago
I think the problem was that `foo:` is a legal symbol. That is, there were a potential backwards compatibility problem. That said, I wish we adopted the `foo:` style back then. Btw - since `foo:` is a legal identifier and references to unbo
88.
▲
by
soegaard
2y ago
Most Computer Science programs teach principles . The ideas behind a database is more important than the the concrete database used. If the ideas are taught, then the students can adapt when the fashion changes. So instead of teaching some
89.
▲
by
soegaard
2y ago
It's a fun tutorial to try out new languages. Here is the result of following the tutorial using Rhombus. https://github.com/soegaard/miniray
90.
▲
by
soegaard
2y ago
Yes. https://www.youtube.com/watch?v=z18shcK6mhk
More ›