Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
LightMachine
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
241.
▲
by
LightMachine
10y ago
Not sure I understand how that is possible. How would you implement a boolean "and" with only "mov"? If you can only move stuff around, how do you read and compare things?
242.
▲
WebMonkeys: a simple, straightforward lib for GPU programming on JavaScript
(github.com)
1 points
by
LightMachine
10y ago
|
0 comments
243.
▲
by
LightMachine
11y ago
I wrote this after trying to find something to keep state in check for React applications and noticing a lot of over engineering and a lot of misunderstandings about FP even from libs that claimed to do it. I hope this isn't too stupid
244.
▲
PureState.js, the stupidiest state management library that works
(github.com)
2 points
by
LightMachine
11y ago
|
1 comments
245.
▲
by
LightMachine
11y ago
Macros (not necessary at all, just use regular functions and enable laziness), ints/strings/bools/lists/etc and all their hardcoded features (you can encode all that neatly on the λ-calculus). Every single addition that
246.
▲
by
LightMachine
11y ago
Of course I can, much faster. Maybe you do not see how high level the λ-calculus is... take a look on the Caramel syntax. I can translate line-by-line any Haskell program to Caramel. The λ-calculus, when given a decent syntax, is just Haske
247.
▲
by
LightMachine
11y ago
Specifically because Lisp/Scheme, as simple as they are, still add a lot of complexity on top of the λ-calculus that isn't needed at all. In fact, I think the λ-calculus has a shield against this very issue on Lisp/Scheme, wh
248.
▲
Why don't we listen to Occam's Razor when it comes to programming languages?
6 points
by
LightMachine
11y ago
|
18 comments
249.
▲
by
LightMachine
11y ago
Are dolphins on the top of the food chain? I thought they were predated by whales and sharks?
250.
▲
LJSON now has a safe parser
(maiavictor.github.io)
1 points
by
LightMachine
11y ago
|
0 comments
251.
▲
by
LightMachine
11y ago
I think it doesn't make sense for it not to be. It seems like a very good way to transfer data with almost no drawback given a decent setup. I don't understand why that isn't used more often.
252.
▲
by
LightMachine
11y ago
Mutable what?
253.
▲
by
LightMachine
11y ago
I added a file, `examples.js`, which shows how you can encode some array algorithms on λJSON. It may look extremely inexpressible due to so lack of loops, math, etc - but it is still able to encode any conceivable algorithm, although more c
254.
▲
by
LightMachine
11y ago
Ah, fair enough. The user should avoid using native JS constructs on the code to be stringified, though - it is an interesting/useful side effect of the method that you are able to, but ideally you would define your functions using onl
255.
▲
by
LightMachine
11y ago
There are many possibilities since you can pass any program/algorithm through LJSON while still having a good level of safety. You could it, for example, to allow your users to pick an AI strategy for their bots in a game, among billio
256.
▲
by
LightMachine
11y ago
Very good catch. Any suggestion how I could improve the usage of null for determining the end of a call list?
257.
▲
by
LightMachine
11y ago
There is no protection against non-termination. For example, an user could give you this function: f = (function (x){ return x(x); }) Now, if you call `f(function(f){return function(x){ return f(f(x)) }})`, it'll not halt. But
258.
▲
Show HN: LJSON: JSON extended with pure functions
(github.com)
39 points
by
LightMachine
11y ago
|
17 comments
259.
▲
by
LightMachine
11y ago
Done.
260.
▲
by
LightMachine
11y ago
The point of ADT syntax is to allow deriving many functions on different data structures automatically. For example, lists and some functions can be defined as: cons = (x list cons nil -> (cons x (list cons nil))) nil
261.
▲
Show HN: Caramel – a modern syntax for the lambda calculus
(github.com)
130 points
by
LightMachine
11y ago
|
22 comments