HNHacker News
TopNewBestAskShowJobs

pufuwozu

3,196 karma · joined March 18, 2009

http://www.hackernewsers.com/users/pufuwozu.html

Brian McKenna

http://brianmckenna.org/

http://twitter.com/puffnfresh

Senior R&D Engineer at Precog.

submissionscomments
pufuwozu··on Roy — small functional language that compiles to JavaScript
For "match", it needs to be an expression for some things so that means wrapping it in a function and returning the result. In the future I'm going to do some optimisation to see if the expression is the last in a function and remove the wrapper. For example:

    return (function() {
        if(b instanceof True) {
            return ifTrue;
        } else if(b instanceof False) {
            return ifFalse;
        }
    })();
Can just become:

    if(b instanceof True) {
        return ifTrue;
    } else if(b instanceof False) {
        return ifFalse;
    }
The output of `with` is pretty gross. Definitely want to hear ideas on how to clean it up :)
pufuwozu··on Roy — small functional language that compiles to JavaScript
Sorry, I deployed it late last night and didn't test it.

That should be fixed.

pufuwozu··on Roy — small functional language that compiles to JavaScript
Author here, that's the plan! :)
pufuwozu··on S-expression Compiler in Scala
Author here. You're not missing anything - it really does just compile prefixed binary expressions.

It is a bit flippant to call it a "Lisp compiler". Saying that, I did set out to write a simple Lisp compiler - I only managed to get those expressions working in the 2-3 hours I spent on it.

I deliberately tried to call it a "Sexp compiler" instead of a "Lisp compiler" but I probably did a bad job when I wrote:

    So, I set out to write a Lisp to JVM bytecode compiler.
Sorry :)
pufuwozu··on Introducing Atlassian OnDemand
Each product costs $10 per month.

I don't know of any plans to drop the price to $5 for 1-5 developers, sorry.

pufuwozu··on Introducing Atlassian OnDemand
I've been working towards this release since March. Feel free to ask me anything.
pufuwozu··on How practical is Clojure?
Good point. Thanks!
pufuwozu··on How to be Successful at PyWeek (One-Week Long Python Game Development Challenge)
Remember that judges have hundreds of games to play. If at any time during your game they get stuck, they are likely to shrug and move on to a different game.

...

Nobody likes a game that treats the player like an idiot. However, a player is far more willing to tolerate a Level 1 that they can pass without thinking, than they are to try to disassemble a masterpiece puzzle at the very beginning. Judges are much more likely to give up and move on.

I've entered two past PyWeeks; this part of the article really hit me.

My last two games were very, very short. I wanted to lengthen the game so I made the levels harder. The feedback that I got was that the game was too hard; judges got stuck within the first minute or two.

I'll again be limited by time but this time I'll prefer to make the game easy than hard. I think players will find it more enjoyable to finish the game than get stuck.

If anyone is planning on participating in the PyWeek a few weeks away, I recommend reading some articles from this list:

http://www.pixelprospector.com/indie-resources/

I particularly liked these quick tips:

http://devmag.org.za/2011/01/18/11-tips-for-making-a-fun-pla...

pufuwozu··on The ultimate cross platform language
http://oreilly.com/catalog/9780470122136

You must have not read the article if you think HaXe is boring.

pufuwozu··on Escaping Callback Hell with ClojureScript macros
Exceptions are interesting. The calls are asynchronous so you can't wrap the whole macro in a single try/catch. See node's wiki for an explanation on why this is a problem:

https://github.com/joyent/node/wiki/Async-exception-handling

Node encourages people to create functions like:

    function(err, x) {
        if(err) handle(err);
    }
This way they avoid the whole async + try/catch problem. It should be possible to define a macro that does something similar.

Avoiding that trap, individual try/catch statements still work fine:

    (timeout/timeout-macro
     (pn "Hello")
     (try*
      (pn (throw "Throwing up"))
      (catch e (pn (str "There was an error: " e))))
     (pn "World"))
pufuwozu··on Linus Torvalds proposes a change to the Git commit object format
Looking at the diff, it seems like a generation number is just a number the parents that a commit has. For example:

Commit a553af has no parents, it has generation number of 0.

Commit c464e0 is the next commit, it has generation number 1.

And so on. Branches count independently of one another. When commits have multiple parents (e.g. merges), the generation number starts counting from the previous maximum.

pufuwozu··on Exceptions are monadic
Author here: thanks for submitting this!
pufuwozu··on GitHub: Block the Bullies
This is GitHub's response to the (killed) article I posted yesterday:

http://news.ycombinator.com/item?id=2601342

pufuwozu··on Telescopictext
Wow, the http://www.telescopictext.org/ website is a very slick tool to create your own.

I created an example one here (made a few typos that I couldn't figure out how to fix):

http://www.telescopictext.org/text/AYeELHzYgVV8b

pufuwozu··on Java.next() - The Groovy Programming Language
I don't think that's quite true. F# is very different to C# and VB but still very well supported.
pufuwozu··on Java.next() - The Groovy Programming Language
It's not just Java and Groovy. I've managed to write a "Hello World" app using 6 different JVM languages:

https://bitbucket.org/puffnfresh/hello-jvm/src/f78a6a2312ae/...

Interoperability is actually very nice for most languages.

pufuwozu··on Show HN: What if JIRA (Atlassian Bug tracker) had Achievements?
From an Atlassian employee, great job mate!

Looks very polished, how long did it take? Good luck in Codegeist!

pufuwozu··on Scala and Android Development
I wrote a small tutorial on manually setting up Android with Scala:

http://brianmckenna.org/blog/minimalist_android_scala_env

Enabling ProGuard is done by adding the following to build.xml:

    <target name="-debug-obfuscation-check">
        <property name="proguard.enabled" value="true" />
        <path id="out.dex.jar.input.ref" />
    </target>
Also add "proguard.config=proguard.cfg" to default.properties and "-dontwarn" to proguard.cfg.
pufuwozu··on Google Releases JavaScript.next to JavaScript Compiler Traceur
The `await` keyword is part of a Harmony proposal (not Traceur specific):

http://wiki.ecmascript.org/doku.php?id=strawman:deferred_fun...

pufuwozu··on Google Releases JavaScript.next to JavaScript Compiler Traceur
Emscripten was actually creatd by a Mozilla employee. He has mentioned that Mozilla is interested in it.
pufuwozu··on Google Releases JavaScript.next to JavaScript Compiler Traceur
Seems like someone did it with Narcissus instead:

https://twitter.com/clint/statuses/65523157737537536

pufuwozu··on Ask HN: How do I minimize the taxes from selling my startup?
I don't think anybody here is denying that. There's a big difference between tax evasion and tax avoidance.

I particularly like this quote on tax avoidance from Kerry Packer, 1991:

I am not evading tax in any way, shape or form. Now of course I am minimizing my tax and if anybody in this country doesn't minimize their tax they want their heads read because as a government I can tell you you're not spending it that well that we should be donating extra.

pufuwozu··on Silk: why we use Haskell
You might be right, I've interacted with him very little online.

On the other side, you should read the blog post he put up an hour ago (possibly in response to this thread):

http://blog.tmorris.net/three-and-a-half-friggin-years-later...

PS: This is why I sometimes demonstrate low tolerance for stupidity and/or failure or refusal to entertain the possibility of thinking. People get hurt. No, I am not sorry.

(for context he is very good at squash and hurt himself while playing)

pufuwozu··on Silk: why we use Haskell
That's a very horrible attack at a person.

Having met Tony many times, I'd just like to say that he's a very good teacher and a nice guy.

pufuwozu··on Genesis of requiring a "Dropbox folder," versus designated folders
I liked the way Drew put it:

It's also one of our core design principles to do fewer things rather than half-ass anything...

pufuwozu··on Rolling out the Redcarpet
Damn, the one time I don't use "he/she" or "they". Thanks.

Sorry to the author.

pufuwozu··on Rolling out the Redcarpet
The author of libupskirt on GitHub's fork (Redcarpet):

I'm not sure why they forked libupskirt rather than use a vanilla version, however the fact is that they took it over and heavily pushed it in a direction that is opposite to the very core of its design.

I did and will do my best to get as much as possible from this fork into my repositories, however there a deep philosophical and design differences that unfortunately make their changes quite independent from mine.

He then makes a comment on each change:

http://fossil.instinctive.eu/libupskirt/wiki?name=redcarpet-...

Interesting read.

pufuwozu··on Unexpected physics engine stability joy
That helped a lot. Thank you!
pufuwozu··on Google Video shutting down, disabling public downloads on April 29
I don't consider 13 days notice to be graceful. Imagine someone going on holidays for two weeks and coming back to find out their beloved video is lost forever.

Google isn't obligated to give a fair amount of notice but it'd be a nice thing to do. Don't be evil.

pufuwozu··on Unexpected physics engine stability joy
The writer makes this sound exciting but I'm having a hard time trying to understand this article.

Could someone explain this in simple terms to someone with only a tiny bit of physics engine experience?

← PreviousPage 3 of 8Next →