1,852 karma · joined Nov 10, 2008 (18y ago) · 533 submissions
comment 12y ago · link · parent
Does anyone know how they do sandboxing in there? Judging from the source (https://github.com/hylang/tryhy/blob/master/main.hy) repl.eval is called on each expression. I'm guessing it just uses App Engine's default python sandboxing.
comment 12y ago · link · parent
The HTML that Mahbod wants you to paste looks pretty similar to what those spam comments were like...
comment 12y ago · link · parent
You're allowed to pick one door, out of a million. Then, the host opens 999,998 of the other doors which he knows have a goat. This leaves the closed door you picked and one remaining closed door.
So, there's now two possibilities. Out of one million doors you somehow just happened to have guessed right and picked the right one. Or, you're wrong. If you're wrong then the correct door would be the other closed one.
comment 12y ago · link · parent
comment 12y ago · link · parent
comment 13y ago · link · parent
It's much more than Oppenheimer simply realizing he created a massively destructive weapon.
comment 13y ago · link · parent
What kinds of things make the repl crash for you? I know that most kinds of errors immediately cause it to exit. I should probably get around to adding an error handler to prevent that...
Phake (the build system) is pretty bare-bones right now and since I'm working on more optimization-related stuff I'm probably not working on it in the near future. However, I do want to work on making deployment in Pharen a lot easier and Phake'll help with that.
If you ever want to discuss this stuff more feel free to shoot an email on the mailing list (https://groups.google.com/forum/#!forum/pharen) or drop by #pharen on Freenode.
110.
More freedom from side-effects (F#)(davesquared.net ↗)
1 points · by Scriptor · 13y ago · discuss
113.
Category Theory is Type Theory(cs.stackexchange.com ↗)
2 points · by Scriptor · 13y ago · discuss
comment 13y ago · link · parent
That said, at least Io, which Ioke is partly based off of, is somewhat active: https://github.com/stevedekorte/io
comment 13y ago · link · parent
(def a (+ 1 2 3 4)) ; => $a = (1 + 2 + 3 + 4);
Of course, there are situations where partial application won't always happen because the compiler is unable to detect it: (fn add (x y)
(+ x y))
(map #add [1 2 3])
Pharen won't be able to realize that `add` here is being partially applied inside `map`. It's not smart enough for that yet. If you try to run this you'll end up with 'Missing argument 2' and 'Undefined variable: y' all over the place.However, I'm not putting a whole lot of emphasis on partials. They're there as a convenience, but they're not really a core part of the language.
But yes, back to the original point, all the tracking is done at compile time so that for addition with two or more arguments the resulting PHP will look like regular addition in PHP.
comment 13y ago · link · parent
((+ 1) 2) ; => 3
(map (* 2) [1 2 3]) ; => [2 4 6]
If a function f takes any arguments and Pharen knows this, it'll convert (f) into a partial function call as well. Unfortunately I haven't figured out a way to check if a function has any side effects. Otherwise in this case at least operators are treated like functions.comment 13y ago · link · parent
Edit: Screw it, haven't self promoted on a while. In Pharen (https://github.com/scriptor/pharen), which compiles to PHP, you could do:
(reduce (+) 0 [1 2 3 4 5])comment 13y ago · link · parent
comment 13y ago · link · parent