Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jorkingit
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
jorkingit
1y ago
I was wondering how they managed to reflect the names of struct fields: looks like https://stackoverflow.com/a/77464529 explains the general idea. Where there's a will, I guess...
2.
▲
by
jorkingit
1y ago
Smalltalk does the same thing!
3.
▲
by
jorkingit
1y ago
Great work! Just an FYI, you might want to limit the dynamic allocation size in the bencode decoder: since it's untrusted input (either from torrent or announce), a malicious input could DoS the client by requesting extremely large all
4.
▲
by
jorkingit
1y ago
I suspect the answer is 3: SKI combinator calculus is Turing complete and you need 3 de Bruijn indices to define S. Good call! I got rid of all numbers above 2, I can't count that high anyway ;-)
5.
▲
by
jorkingit
1y ago
I did take some inspiration from Unlambda: the prefix application syntax is cool! I/O in Unlambda is super weird though! You get a read character instruction that puts it into a character register where the only thing you can do is com
6.
▲
by
jorkingit
1y ago
https://github.com/imjakingit/lambduck
7.
▲
by
jorkingit
1y ago
I saw this the other day! I salute you, it's so much more evil :-) And yup, the order of evaluation is leftmost innermost. ``\\0`,.`,. with stdin "hi" will print "hi".
8.
▲
by
jorkingit
1y ago
It should be! e.g. if every function takes a continuation as its final argument, then: call/cc& = \f. \k. f k k Then in f you can invoke the continuation k as many times as you want, but that does involve a whole program tra
9.
▲
by
jorkingit
1y ago
You can always write it in continuation-passing style if you really want continuations! It's not pleasant but none of this is supposed to be ;-) Agreed on having too many characters though, I don't like that having numerical indic
10.
▲
by
jorkingit
1y ago
getchar does take a continuation of sorts (as in continuation passing) which is passed the input. In one my initial drafts, getchar was a special form that would accept input at the point of evaluation, which was really funny and unpredicta
11.
▲
by
jorkingit
1y ago
Thanks! I'm torn on having the character literals actually; they're definitely syntactical sugar, but I was struggling to write programs that printed anything without them getting super unwieldy! If someone smarter than me can wri
12.
▲
by
jorkingit
1y ago
Hello world should be: ``\\1`.'h``\\1`.'e``\\1`.'l``\\1`.'l``\\1`.'o``\\1`.' ``\\1`.'w``\\1`.'o``\\1`.'r``\\1`.'l``\\1`.'d`.'!
13.
▲
Show HN: Lambduck, a Functional Programming Brainfuck
(imjakingit.github.io)
70 points
by
jorkingit
1y ago
|
27 comments