Live data from Hacker News

Urbit: A clean-slate functional OS

urbit.org

121–130 of 185 posts

Re: Urbit: A clean-slate functional OS

#121
post #88

Earlier quoted context omitted.

As for the type inference, you don't need unification to do type inference. Hoon infers only forward, not backward. Of course you could say it's a subset of unification, as it is. I find Hindley-Milner inference systems too powerful. The programmer has to model what the inference system is doing in his or her head, and it's a source of significant cognitive load. Hoon's inference algorithm is slightly too smart in so…

Of course you could say it's a subset of unification, as it is. It definitely is, and a limiting one at that. How does Hoon infer the type error in whatever is the Hoon equivalent of the, say, JavaScript expression (a == b && b == 5 && a == "foo"), where a and b are function parameters?

But my previous reply is a little content-free, as what you're really asking for is how we solve the same problem that typeclasses solve in Haskell.

Very briefly, there's two ways of asking whether a caller can change the type of a parameter. The normal way is to say, are all the possible values of the caller's type in the set of nouns that the parameter defines? This is what I call "geometric polymorphism."

But there's also "generic polymorphism," in which we ask: will the Nock code that was generated for the parameter type, actually work with the type we're calling it with? A really stupid way to ask this is to recompile the function, with the parameters exchanged for the arguments. The Hoon approach is a little bit smarter than this but not much.

So, with these two approaches, you basically get variance and genericity, which is all of polymorphism.

Re: Urbit: A clean-slate functional OS

#123
post #120

Earlier quoted context omitted.

> If you expect people to understand the theory, this is also a UI problem in a different way. I don't really understand what you mean by "theory", you don't need to know /any/ PL theory to write Haskell and you certainly don't need to know mathematics. What specific ideas are you referring to that require advanced knowledge as a prerequisite for doing day-in-day-out programming tasks in Haskell?

Again, you have to be able to perform the same computation as the type inference algorithm - for any inference engine, any type system, any language, you can't use it if you don't know what it's going to do. There are a lot of different ways of handling this problem in Haskell - some involve knowing the notations and results of the branch of math called "PL theory," some don't. As UIs, they all have drawbacks - and w…

> for any inference engine, any type system, any language, you can't use it if you don't know what it's going to do.

My whole argument is that you don't need to know anything about the implementation of the inferencer to use it, you don't need to predict it's behavior anymore than you need to model the CPU instruction selection of the compiler in your head. Most of the time you can safely program at a level of abstraction that doesn't involve the implementation of the language, and in Haskell this "normal level" is well above the level that involves low-level things like the lambda calculus.

I think we're just an impasse, the meme that you need mathematics or PL theory to program in Haskell is one that puzzles me and I don't understand where it comes from. Best of luck on your project.

Re: Urbit: A clean-slate functional OS

#124
post #91

The more I think about it the more I really like the whole "Jets" concept (although I'm not sold on the name, I'd love to learn that it's a known concept in the PL field with a nicer name). I'd like to see how such an approach would work out for optimizing something more "fundamental" like the Binary Lambda Calculus.

Haskell has rewrite rules which is how eg stream fusion is implemented.

http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/rewri...

Re: Urbit: A clean-slate functional OS

#125
post #99

Earlier quoted context omitted.

Of course you could say it's a subset of unification, as it is. It definitely is, and a limiting one at that. How does Hoon infer the type error in whatever is the Hoon equivalent of the, say, JavaScript expression (a == b && b == 5 && a == "foo"), where a and b are function parameters?

Equality is entirely untyped in Hoon. You're just comparing the nouns - "S-expressions without the S." So there is no type error at all. You'd say &(=(a b) =(5 b) =("foo" a)) and it'd work just fine.

That's a bit underwhelming.

Re: Urbit: A clean-slate functional OS

#126
post #76
post #74

Earlier quoted context omitted.

The Lambda Calculus is so tiny how can you view it as anything but trivial? Just 3 syntactic forms building up an expression tree: Expr = Lam Name Expr | Var Name | Apply Expr Expr And one reduction rule: reduce (Apply (Lam name body) arg) = subst name arg body At least assuming unique names (no shadowing nonsense), you can't get much simpler than this...

You can get rid of the whole name reduction system. Which is hardly trivial. If you assume it, though, it's true that everything else is trivial. Getting symbol tables, functions, environments, free and bound variables, etc, etc, out of the fundamental automaton, frees you up to design them right at the higher layer where they (IMHO) belong. This philosophical argument has serious practical ramifications, I think, be…

>I think, because it leads directly to the Question of Why Lisp Failed.

Lisp isn't a failure. You're commenting on a server that is powered by a Lisp.

>Why did Lisp fail? Many people say, because it couldn't be standardized properly.

There was a very good idea about how to standardize Common Lisp back in 1982. It divided documentation into 4 different parts, or 4 different "colored pages". It was eventually abandoned because of the time constraints. Read DLW's (one of the 5 main Common Lisp authors) news.yc post about it:

https://news.ycombinator.com/item?id=81258

Read more about it here:

http://www.saildart.org/ARPA.PRO%5BCOM,LSP%5D

http://xach.livejournal.com/319717.html

Re: Urbit: A clean-slate functional OS

#128
post #8

A better link would be the front page: http://www.urbit.org/ I guess on the Internets, you never release anything - it's released for you. Please be warned, (a) the doc is incomplete, (b) if you create an Urbit ship you'll eventually have to destroy it, as we don't have continuity yet.

So here I am, in a submarine, learning a foreign language. What an afternoon.

Re: Urbit: A clean-slate functional OS

#129
post #127

Though I couldn't understand them fully... The names are awesome! The concepts are awesome! And the music is awesome!!!

I see some similarity to Smalltalk or Windows PowerShell. And this made me to imagine typed Smalltalk/Objective-C style syntax on shell which would be great for usability...

Re: Urbit: A clean-slate functional OS

#130
post #112

Just some background, this is by Mencius Moldbug, a.k.a. Curtis Yarvin, a.k.a. C. Guy Yarvin of Unqualified Reservations fame. It's been in the works for a long time and is certainly a serious project. http://unqualified-reservations.blogspot.com/2010/01/urbit-f... http://moronlab.blogspot.com/

Someone earlier in this thread mentioned his apparent disdain for PL research. If you want some background on his experiences, as well as some great musings on the current state of CS grad programs, I recommend these two articles: http://unqualified-reservations.blogspot.com/2007/07/my-navr... http://unqualified-reservations.blogspot.com/2007/08/whats-w...

I will not comment on the judgement passed upon the education system. The second article exhibits eristic tricks, obfuscatory language, and a plain confusion of ideas, especially when speaking about proof-carrying code and type theory.

It's interesting to see the author wishing for a Python of functional programming, and yet Hoon's syntax appears deliberately obscure.

However, there is one paragraph with which I wholeheartedly agree:

> I think the world could use a charity that funds creative programming. The software systems that people use today — don't even start me on "Web 2.0" — are awful and ancient, and hardly anyone has any reasonable plan to improve them. Free-software programmers are not at all bad at supporting themselves, but nothing like Xerox PARC exists today, and it should.

It should, and, hopefully, it will. Soon.

Post reply on HN