Better HN
topnewbestaskshowjobs
Log inSign up

Scriptor

1,852 karma · joined Nov 10, 2008 (18y ago) · 533 submissions

Github: http://github.com/Scriptor
Submissions

comment 12y ago · link · parent

Since C++ is also still used plenty throughout the world, I think he might've meant that it failed to live up to the expectations placed on it as a good balance of structural and functional.

comment 12y ago · link · parent

Awesome! I'm going to try it out now.

comment 12y ago · link · parent

This looks interesting and I have something I'd like to use it on, but the documentation could add a few things. How do I install this? How do I run a script?

comment 12y ago · link · parent

Is there any way to restrict your app's environment beyond the default sandbox restrictions Google applies? For example, disabling things like urllib2.

comment 12y ago · link · parent

People might also be interested in http://try-hy.appspot.com/.

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

I was just about to ask how well this would work as a companion to tapl. I'm still very early in the book so the notation isn't indecipherable, but I'm sure it'll get there soon.

comment 12y ago · link · parent

I know Guy Steele was part of Java's original design committee, but in what ways was Java at all "Lisp's bastard child".

comment 12y ago · link · parent

There was a post a bit back (which you might be referencing) about almost this exact situation, except it was about black hat SEO dramatically backfiring. Specifically, businesses were asking bloggers and news sites to delete spam comments that linked back to the sites.

The HTML that Mahbod wants you to paste looks pretty similar to what those spam comments were like...

comment 12y ago · link · parent

Ah, I used one million because it really hammers the scale of it in, but I like that with 100 you can easily track the percentages.

comment 12y ago · link · parent

One approach that really helped me out was to extend the problem from three doors to a million doors.

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

Free? All the airlines I've been on had wifi but usually charged for it.

comment 12y ago · link · parent

This is definitely not usable as an early intro to CS book, as it's pretty dense. There's a wide variety of introductory material that you can pick from, depending on your interests (what kind of stuff are you interested in doing). But TAOCP is aimed at someone a bit more advanced. Since you have a math background though I think you could give it a shot and see how far you get.

comment 12y ago · link · parent

I'm not sure which plugins you have running, but it definitely splits it into three pages for me.

comment 12y ago · link · parent

I feel like a lot of this trendy stuff comes out because it demos very well. The designer shows it off in a controlled setting, everyone's wowed and impressed and glad they hired a "good" designer, and nobody bothers to check whether it's actually useful at all. Someone should've pointed out the website is there to sell the product, not to showcase the FE guys's skills.

comment 13y ago · link · parent

Here's a great description of just how that quote fit on multiple levels: http://www.reddit.com/r/rpg/comments/pnrgd/wanted_to_share_m...

It's much more than Oppenheimer simply realizing he created a massively destructive weapon.

comment 13y ago · link · parent

This is just a proxy. If developers wanted to go this route they would set up the proxy on their own server instead of routing it through a 3rd party.

comment 13y ago · link · parent

I've been putting some thought into how I might implement some sort of type system that might at least partially help with separating IO and other side-effects. It's probably impossible to guarantee 100% purity, but I was thinking at the very lease I could use reflection to see if any functions called in a piece of code had arguments of or returned values of PHP's 'Resource' type.

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.

comment 13y ago · link · parent

Haha, thanks! Glad you like it. I recently got back into toying around with Pharen, the goal being to get accepted to the next Strange Loop.

comment 13y ago · link · parent

But...he didn't even mention balance. He simply was saying how Starcraft helped him appreciate the "nettlesomeness" aspect of professional chess more. It's just a comment about an interesting observation.

110.

More freedom from side-effects (F#)(davesquared.net ↗)

1 points · by Scriptor · 13y ago · discuss

comment 13y ago · link · parent

When in Rome...

comment 13y ago · link · parent

And by taller than others the spores would be more likely to be carried over everything else by the wind and travel further distances. A short mushroom's spores might end up only traveling a few feet before hitting, say, another mushroom.

113.

Category Theory is Type Theory(cs.stackexchange.com ↗)

2 points · by Scriptor · 13y ago · discuss

comment 13y ago · link · parent

Damn, I thought it getting posted here meant it was active again.

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

It does track the arity of functions, but remember that this happens at compile time. Regular addition in Pharen is still just regular addition in PHP:

    (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

It works (superficially) similarly to how Haskell does things and treats (+) as a partial function call by recognizing that + isn't getting at least 2 arguments. You could also do stuff like:

    ((+ 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

PHP does have array_reduce, however operators like '+' can't be used as callables so you'd have to make your own wrapper functions.

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

Just because it modifies the standard library classes doesn't make it a separate language in its own right. If you used Java but with a different implementation for, say, linked lists than the standard one you'd still be using Java.

comment 13y ago · link · parent

It's hard to really quantify scientific returns as a per-dollar measure. The space station has provided a place to do countless experiments that could only be done by people in space. Of course, the results of these experiments rarely make it into pop science articles so they're not often publicized. But they do happen and it's important not to just brush them aside as not worth the cost of the station itself.

comment 13y ago · link · parent

Right, I thought one of the big benefits about pull requests was that it let other devs easily view the diffs before merging a change in, not to mention making it easier for people to discuss the changes. I guess if you don't want to do that then it's easier to just pass around patches and merge.
12345
18