Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gergoerdi
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
37 ms
·
61.
▲
by
gergoerdi
11y ago
I did a barebones Haskell to C++ template compiler as a fun diversion once, see http://gergo.erdi.hu/projects/metafun/ If I understand right, this guy is doing this by hand -- why not just extend MetaFun for whate
62.
▲
by
gergoerdi
11y ago
(** A particular execution, defined by a possibly infinite sequence of events from a starting configuration C is called a schedule and the sequence of steps taken to realise the schedule is a run **) Definition Schedule
63.
▲
by
gergoerdi
12y ago
If programming with just one instruction seems too low-level, I have just the solution for you! Now you can compile the user-friendly, high-level language of Brainfuck to this single-instruction machine! http://gergo.erdi.hu/
64.
▲
by
gergoerdi
12y ago
There are some existing examples of using a pure functional language as an HDL; Bluespec is Haskell-like, and the Lava family of languages is embedded in Haskell. I'm just a hobbyist when it comes to HDLs, but I've had success wit
65.
▲
by
gergoerdi
12y ago
But your second code snippet is almost a verbatim transliteration of the image URL, so in what sense is it easier to understand? (verbatim transliteration would be sum (map (\i -> i)) [1..100] )
66.
▲
by
gergoerdi
12y ago
You can determine a lot more about a computation described only in terms of an applicative functor as you can from a monadic one, without running any of its effects (i.e. "statically"). It's easy to see why when you consider
67.
▲
by
gergoerdi
12y ago
Using a VM was common for text adventures of the time; check out the Z-Machine used by Infocom games: http://inform-fiction.org/zmachine/standards/ Like this game you describe here, the Z-Machine also stored chara
68.
▲
by
gergoerdi
12y ago
As an example, here's how primality is defined in the Agda standard library. It is simply the negation of the property 'has a divisor and is greater than 2'. http://agda.github.io/agda-stdlib/html/Da
69.
▲
by
gergoerdi
12y ago
If you're interested, regex matching via derivatives have been done before, see e.g. http://matt.might.net/papers/might2011derivatives.pdf