HNHacker News
TopNewBestAskShowJobs

Scriptor

1,852 karma · joined November 10, 2008

Github: http://github.com/Scriptor
submissionscomments
Scriptor··on Monty Hall problem explained visually
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.

Scriptor··on Southwest Airlines Offering In-Flight iMessaging for $2 Per Day
Free? All the airlines I've been on had wifi but usually charged for it.
Scriptor··on The Art of Computer Programming - eBook
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.
Scriptor··on NSA tracking cellphone locations worldwide, Snowden documents show
I'm not sure which plugins you have running, but it definitely splits it into three pages for me.
Scriptor··on Yotaphone
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.
Scriptor··on India's Nuclear Scientists Keep Dying Mysteriously
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.

Scriptor··on Show HN: Include this JS library to enable cross-origin requests
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.
Scriptor··on Magnus Carlsen is World Chess Champion
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.

Scriptor··on Magnus Carlsen is World Chess Champion
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.
Scriptor··on Magnus Carlsen is World Chess Champion
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.
Scriptor··on Co-founder of Youtube makes his first comment in 8 years
When in Rome...
Scriptor··on Long Before Trees Overtook the Land, Earth Was Covered by Giant Mushrooms
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.
Scriptor··on Ioke programming language
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

Scriptor··on PHP in a Tweet
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.

Scriptor··on PHP in a Tweet
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.
Scriptor··on PHP in a Tweet
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])
Scriptor··on Runnable Wants To Become The “YouTube Of Code”
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.
Scriptor··on China to launch space station by 2023
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.
Scriptor··on Paying For Privacy?
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.
Scriptor··on Why Go? Use Racket
I think you may have taken that statement out of context. The OP was talking about the complexity of the type implementation, not the theory behind it.

The specific example he used was how a programmer needs to know exactly how some different types are passed as arguments to know what the most efficient way is, since it's not entirely consistent.

EDIT: I agree with the rest of your comment, though. Languages are just tools. The whole, "Why are you using X? Y is better," thing is getting old.

Scriptor··on Semantic UI – A language for sharing UI
It's also the exact opposite of semantic HTML as I understand it.
Scriptor··on 0 A.D., an Open-Source Strategy Game
It was certainly common in the east. The Battle of Carrhae (http://en.wikipedia.org/wiki/Battle_of_Carrhae) was at 56 B.C. and is one of the most famous examples of an engagement with horse archers who could fire while moving from that era.

Even well before then the Scythians were known for their horse archer armies and were tricky to defeat.

I know it doesn't seem like a big thing, but if Romans can form testudos while moving, then it seems only fair to have true horse archers. Both so that players can accurately recreate the tactics (horse archers + heavy cavalry were the mainstay of several eastern factions which people might want to mod in) and just because they're more interesting that way. Otherwise the game's horse archers are little more than fast moving foot archers, which doesn't allow for much more creativity.

Scriptor··on The first pictures of blood from a 10,000 year old Siberian woolly mammoth
It actually is possible to recreate the full genome and sequence it from just fragments. In fact Craig Venter's strategy during the Human Genome Project used this idea. They made countless copies of the full genome, then fragmented each copy at different points. They then sequenced each fragment, since it's much faster to sequence short ones. After that they looked at all the overlaps in these fragments to create longer, continuos sequences.
Scriptor··on The first pictures of blood from a 10,000 year old Siberian woolly mammoth
It's much more difficult than that. The biggest issue is finding where exactly to make the changes. Even then, we don't necessarily know what the phenotype, the eventual outcome, of making a change will be.

There are two versions of each gene (because there are two of each chromosome), what often happens is that even if one version of the gene is defective, the other version is enough to compensate.

Now, say you have two individuals, each one has one working and one defective version of a gene. If you cross those individuals 25% of the offspring will have two copies of the "good" version, 50% will have one good and one defective copy, and 25% will be unlucky and have two versions of the defective version. This is just regular Mendelian genetics so you might have heard all this before. However, it sets up why crossing two clones can be risky.

So, in the above example 75% of offspring will be fine. Sounds pretty good, right? But that's only when considering one gene. A mammoth likely has tens of thousands of genes. This particular one can be carrying any number of defective versions of each of those genes. Crossing it with an exact genetic copy would mean that the risk of having an offspring with a genetic defect is that much higher.

However, it might not be all that bad. Entire viable populations have likely descended from something like a pregnant female floating on a raft to a new island. If they can extract blood from even one other mammoth, that might be just enough to create healthy enough offspring. The main barrier is the gestation time and generation time. Two fertile rats stranded on an island with plenty of food can reproduce fast enough to quickly create a good population that might be able to overcome low genetic diversity through sheer numbers. Trying to raise enough mammoths will be much more expensive and much more time-consuming.

Scriptor··on Xbox One: Microsoft's All-In-One Home Entertainment System
PS3 has had Netflix for a long time as well.
Scriptor··on Here is today
I'm not sure if it was intentional or not, but for me the most striking point was when it circled back to today. It was a reminder that in that grand scheme of things, there's some stuff you do control. Now, time to get that stuff I was planning to do done.
Scriptor··on Skyrim's Modular Level Design - GDC 2013 Transcript
The overly similar caves was compounded with the problem of so many quests being oriented around them. Everyone and their mother seems to have lost a valuable family relic or heard of a treasure in some nearby cave. Each one is as predictable as the next.

It's probably why I spent so much time exploring above ground. At least with dragon fights you could enjoy the greater variety in terrain and wildlife.

Scriptor··on Introduction to Position Based Fluids
It's definitely realistic, but sometimes it seems just a little off. There are times when it seems to "clump" up like a solid would when you have water particles thrown in the air. I'm not sure if that's my own bias or the uncanny valley effect at play here.
Scriptor··on [dead]
Blatant blogspam.
Scriptor··on StarWars + Git logs = StarLogs
I'd still like a way to see it first-to-last, if only to get the combined nostalgia from seeing those first commits and from the music.
← PreviousPage 4 of 17Next →