Better HN
topnewbestaskshowjobs
Log inSign up

LightMachine

2,083 karma · joined Sep 27, 2015 (11y ago) · 346 submissions

Submissions

301.

What is wrong with the Web, and why we need Moon(medium.com ↗)

1 points · by LightMachine · 9y ago · discuss

302.

What is wrong with the Web, and why we need Moon (draft)(gist.github.com ↗)

1 points · by LightMachine · 9y ago · discuss

comment 9y ago · link · parent

There is no competition to Ethereum in terms of back-end decentralized computer, AFAIK. I picked Swarm because of familiarity and being closer to the devs. I don't know the IPFS devs. I do find both projects awesome.

comment 9y ago · link · parent

It was designed to allow a client to run code submitted by other clients safely on the browser without isolated environments. It is an important building block for a decentralized-application browser I'm developing. In the soon future, you will be able to publish a decentralized application with an one-line command. It will be stored on Swarm (decentralized Store), will use Ethereum as the back-end, and anyone will be able to access it using a decentralized browser such as Mist.

So, in short, remember the Pirate Bay idea of putting drones around the world to host their sites, allowing it to stay up forever without censure? Moon does exactly that, without the drones of course.

305.

Show HN: Moon, an universal code-interchange format(github.com ↗)

11 points · by LightMachine · 9y ago · 8 comments

306.

Using Ethereum and Swarm to build a decentralized programming language(medium.com ↗)

5 points · by LightMachine · 9y ago · discuss

comment 9y ago · link · parent

Those wars are actually quite healthy and productive for the whole, because they make people defend their sides and thus develop their best arguments. They're a great source of information. You just have to be careful not to get emotional and/or degrade to name-calling.

comment 9y ago · link · parent

Thanks for sharing your experience! EMACs is another masterpiece on its own merits and I'm all for diversity. Also, hijacking the top comment on my own post to say the obvious: people, this is just my opinion! I'm not saying you shouldn't use and love your IDEs because I like VIM! Love you all. Peace!

309.

Why I like Vim so much [video](youtube.com ↗)

70 points · by LightMachine · 9y ago · 56 comments

310.

Show HN: Nano-JSON-stream-parser, a 750 bytes streamed JSON parser(github.com ↗)

6 points · by LightMachine · 9y ago · discuss

comment 9y ago · link · parent

eli5?

comment 9y ago · link · parent

I agree with everything you said.

On doing that in Idris (which is my dream language - the only reason I don't use it is its JS compiler is too slow), would it be possible to randomly generate elements of any data type, or would we have to write an `Arbitrary` instance for every type you want to test? I don't know/remember much about generics on Idris, would love to learn more.

(Seriously, though, why is the JS compiler still so slow? Again - I'm willing to put substantial money into funding a better one...)

comment 9y ago · link · parent

Oh. Thank you very much for linking that. I wish I saw it 3 days ago, though. It is basically the same thing.

comment 9y ago · link · parent

If it quacks like a type and it types like a type...

Just kidding! A type system, in essence, is not much different from that, though - Pi, for example, is basically a type-level lambda that is applied to the typed function (and it is sufficient to express basically any real-world type system). In any case, I hope I made it very clear on the that it is in no means an actual type system, but my dirty way to get invariants and some refined types on plain JS. If we had a mature Idris->JS compiler this hack wouldn't be necessary. ):

315.

Forall.js: Idris-like static types and invariant checks for JavaScript(github.com ↗)

63 points · by LightMachine · 9y ago · 17 comments

316.

Show HN: Drop-in, expressive static type and invariant checks for JavaScript(github.com ↗)

3 points · by LightMachine · 9y ago · discuss

comment 9y ago · link · parent

Which is a great thing for the whole

318.

Make Ethereum massively scalable today with delayed computations(gist.github.com ↗)

3 points · by LightMachine · 9y ago · discuss

comment 10y ago · link · parent

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?

320.

WebMonkeys: a simple, straightforward lib for GPU programming on JavaScript(github.com ↗)

1 points · by LightMachine · 10y ago · discuss

comment 10y ago · link · parent

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 for this (site), but I really think we should write less code and think a little bit about the problems we are actually trying to solve.

322.

PureState.js, the stupidiest state management library that works(github.com ↗)

2 points · by LightMachine · 10y ago · 1 comment

comment 10y ago · link · parent

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 Scheme makes on top of λ-calculus is harmful in some sense - algorithms on list, for example, don't fuse because of that, making Scheme less performant than the λ-calculus; multi-argument functions make the whole language segmented and are much less convenient than curried functions... etc., etc.

R5RS, the simplest used spec of Scheme, takes dozens of page to merely describe the language. The λ-calculus can be described and implemented in a paragraph. That makes it much easier to create new backends, for example.

comment 10y ago · link · parent

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 Haskell without the types (but still has algebraic data structures identically, just no annotations). And I can be much more productive in Haskell than in Scheme, I think that goes without saying.

About the performance of the program itself, yes, λcalculus is faster than Scheme, by an order of magnitude, sometimes. For one, algorithms on church-encoded lists fuse by reduction, which means that the code below, in Caramel:

    map f (filter cond (zipWith (+) (map f a) (map f b)))
fuses to a single tight loop - i.e., it iterates through the lists `a` and `b` only once, and returns the result after that, creating no intermediate structure. Scheme would create 4 intermediate structures on this case. Since it is already 2~3x slower than the λ-calculus (running on GHC), that'd make it an order of magnitude slower in that case.

comment 10y ago · link · parent

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, which is the fact is is much easier to quantify what is the "best" abstraction for a given problem.
1
89101112