Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
breuleux
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
46 ms
·
481.
▲
by
breuleux
11y ago
I think that's just because you are used to see it used that way. And it's not like CoffeeScript invented this. Haskell does it: \x -> x + 1 OCaml does it: fun (x : int) -> x + 1 It is very common in functi
482.
▲
by
breuleux
11y ago
I like Earl Grey tea, but I don't watch Star Trek, so it didn't even occur to me. Sorry about that :( On the other hand I have to admit I like the idea of calling utilities Picard or Engage, they have a nice ring to them. Hmm.
483.
▲
by
breuleux
11y ago
I googled this because I find it interesting, but black tea does not contain tannic acid. It contains tannins, but of a completely different type (antioxydants which actually seem to be healthy). I couldn't find anything definitive o
484.
▲
by
breuleux
11y ago
There already is a "lambda-case" syntax. "fact(match) = ..." is sugar for "fact = match -> ...". If one works, then so does the other. Personally I much prefer the way I do it, because it is more powerful, w
485.
▲
by
breuleux
11y ago
I think using spacing for this can be a little misleading since it can obfuscate priority. To give an extreme example, 1e100 * 1e300/1e300 is infinity, because the multiplication is done before the division, but the formatting suggests
486.
▲
by
breuleux
11y ago
But see, being used to hyphens in variable names, I must tell you I can't figure out which one I find easier to read. On one hand, the presence of hyphens and subtraction is a tad confusing, but on the other, I find "balance-s
487.
▲
by
breuleux
11y ago
I haven't seen the feature elsewhere. The second example looks better to me (syntax highlighting helps) and reduces redundancy and indent, but I guess views may vary on this. Good to know!
488.
▲
by
breuleux
11y ago
There are examples below that statement for common usage, but if you want a deeper understanding: tag.xyz % property = value child1 child2 Will produce the data structure: {tags = {"tag", "
489.
▲
by
breuleux
11y ago
Just wondering though, how often do people write subtraction as "stuff-thing" instead of "stuff - thing"? I find myself typing the latter almost systemically, so hyphens never get in my way, but of course it's all
490.
▲
by
breuleux
11y ago
"fact(match)" is just making use of a generic feature: the "match" keyword in a pattern dictates that the body defines a sequence of sub-patterns to match at that position. An argument uses pattern syntax, so it works th
491.
▲
by
breuleux
11y ago
Yes. The compiler detects whether the return value is used or not to determine whether to accumulate the results in an array or not. Also, unlike forEach and map you can use continue or break.
492.
▲
by
breuleux
11y ago
I guess it depends a lot on your coding style. When I started allowing hyphens in variable names, I already had about 10,000 LOC of Earl Grey, including the whole compiler for it (seriously, it was a pretty late addition). In all that code,
493.
▲
by
breuleux
11y ago
I... actually did, a while ago. I got no feedback at all, so I thought I'd do things differently this time around. Might just be a matter of luck.
494.
▲
by
breuleux
11y ago
I guess I wanted macros and pattern matching without Lisp syntax, and I wanted to retain and use the JS/node ecosystem. There's also a few language features I couldn't find anywhere else that I wanted to try out (my % operato
495.
▲
by
breuleux
11y ago
God damn it how did I miss that. The condition was wrong, too. Fixed, thanks :)
496.
▲
The Earl Grey programming language
(breuleux.github.io)
150 points
by
breuleux
11y ago
|
126 comments
497.
▲
by
breuleux
12y ago
I think it depends a lot on the language's syntax and what sugar it offers. I believe there are choices you can make that make closures superior to objects in every possible way. Consider this simple syntactic rule: `obj.x` <=> `
498.
▲
by
breuleux
12y ago
Well, the idea is that in order to predict which box you will pick, the predictor is basically running a perfect simulation of you. Depending on what the simulated version of you does, then the predictor will either put nothing or a million
499.
▲
by
breuleux
12y ago
Pretty cool, but I have a nitpick: reject() should be called when the loader throws an exception (e.g. if the response is malformed JSON).
500.
▲
by
breuleux
12y ago
Could it? Let's take a few steps back, here. * You're assuming the AI can copy itself, but this is a dubious assumption. As far as I know, none of the AI algorithms at the forefront of research provide a fraction of the data the
501.
▲
by
breuleux
12y ago
> The real threat posed by AI is one that all of us face everyday: bad software design. Is it likely that an unintended consequence will cause an AI to launch nuclear missiles, release toxic chemicals or shut down the global financial ma
502.
▲
by
breuleux
12y ago
> The idea that an exponentially self-improving being will arise seems unlikely when nature has been trying to do that for eons. I would say that it is already successful, if you look at the curve of intelligence and complexity growth. I
503.
▲
by
breuleux
12y ago
> I'm guessing the vast majority of games will end(?) with 2 kings moving around randomly for all of time. Hah, that's what I got on my second run: http://i.imgur.com/joLf3BX.png The game stopped right there, t
504.
▲
by
breuleux
12y ago
I don't think induction requires justification at all. I mean, if you do it and it works, great! If you do it and it doesn't work, well, what else were you supposed to do anyway? Ultimately, I use induction because I have no bette
505.
▲
by
breuleux
12y ago
Well, if AGI evolves from infrastructure that naturally fosters intelligence, then it is probable that most intelligence gains are actually a function of better infrastructure. This suggests that individual intelligences are actually dead e
506.
▲
by
breuleux
12y ago
What the author is looking for is a kind of induction. If I'm seeking a new theory of gravity, I'm not going to start looking at the colors of hats. Why not? Because I very strongly suspect it will lead absolutely nowhere. But i
507.
▲
by
breuleux
12y ago
I don't feel like the author is familiar with modern approaches to AI. For instance, he mentions "creativity" as a stumbling block for AGI, but there is a whole class of existing algorithms that exhibit prototypical creativit
508.
▲
by
breuleux
12y ago
> I think the idea here is that the AI would begin to learn on its own and become smarter at a frightening pace With what resources? The AI is in a box, remember: we are running it on a machine with only so much memory and processing pow
509.
▲
by
breuleux
12y ago
What do you mean, it's not interesting? Human beings don't have unrestricted access to their own "source code", but they can still learn and get smarter. The AI I am describing can still be much, much smarter than a huma
510.
▲
by
breuleux
12y ago
> What if you assume that the AI might be 100x or 1000x smarter than its guards, not just 2x or 3x smarter? If you can make an AI that's 100x smarter than you are, surely you can make one that's only 2x or 3x smarter. Why not s
More ›