HNHacker News
TopNewBestAskShowJobs

johkra

320 karma · joined January 3, 2010

You can contact me with my user name at gmail.
submissionscomments
johkra··on Pure CSS3 box-shadow page curl effect
Could anyone post a screen shot? I see nothing special with Opera and Firefox, but I would be interested in how it looks. Thanks a lot!
johkra··on Yacc is dead
Thanks a lot for the link, I'll look through it.

I also found the GLL paper at p. 113 [123] of http://ldta.info/2009/ldta2009proceedings.pdf

johkra··on Yacc is dead
What is actually state-of-the-art in parsing?

When I, as an Amateur, last looked into it, PEG[1] and extensions like OMeta[2] seemed to be the best options. I've heard good things about Parsec[3], too.

[1](http://en.wikipedia.org/wiki/Parsing_expression_grammar) [2](http://www.tinlizzie.org/ometa/) [3](http://legacy.cs.uu.nl/daan/parsec.html)

johkra··on Do you understand IPA pronunciation?
I can read it partly and I find it very useful for instance for French, where è, ê, ai and sometimes e are all pronounced [ɛ]. I have not learned it, however, and don't understand the meaning of all characters.
johkra··on A computer system in less than 20k LOC progress report
Well observed, I didn't think about this when writing the title.

It's too late for me to edit the title, but I think "20 000" would be a good option. (The wikipedia article advocates a thin space as separator.) I would appreciate if someone could change this, since the majority here is probably American.

johkra··on The Pragmatic Bookshelf 40% Black Friday Sale
I bought "Seven languages in seven weeks", "Behind closed doors" and "SQL Anti-patterns" this morning. (CET)

The e-books were available less than 5 minutes after ordering and everything went very smooth.

johkra··on Steve Yegge on Scalable Programming Language Analysis (Video)
Indeed, I'm glad I didn't miss that video, it almost got lost on HN.
johkra··on Gambit Scheme: Inside out
Wow, I didn't know Quantz was written in Scheme.

I actually helped beta test the game on Linux, although I didn't end up playing it much after I bought it. Nice to see you can write practical code in Scheme, too.

johkra··on Programming and programming languages (Alan Kay)
Every time I see a presentation given in SmallTalk, I'm deeply impressed and I feel so useless working on my web applications when even Children can use etoys to create amazing things like the ant simulator.

And seeing OMeta or similar systems makes me never want to touch e.g. Java again, where useless getters and setters alone take more LOC than the whole implementation of OMeta.

But: Today's browsers offer us a similar graphical environment we can easily modify with code and for instance knockout.js allows me to write impressively little code to achieve what I want. I'm looking forward to what people will do with the web while I try to understand what people started more than 30 years ago.

johkra··on BBS, Lua, Coroutines, Mongrel2: Part 1
I would be interested in a code sample. I didn't know Lua supported TCO. (I bought PiL, btw, and it helped me tremendously in understanding many programming language implementation issues. Highly recommended.)
johkra··on Haskell in JavaScript
Too bad that even simple commands like "sum [1..10]" don't show output. :-(

Just "[1..10]" or a simple calculation like "1 + 1" work fine.

johkra··on Germany Closes Book on World War I With Final Reparations Payment
Wow, that's interesting. I didn't know they resumed payment after WW2 - I always assumed that it was over when Hitler refused to continue paying.

My history teacher (in Germany) didn't mention anything about continued payments, either.

I don't know how to feel about this, but given that our own government created a huge debt after the 1974 oil crisis and again after the unification, I couldn't blame our debt on the reparation payments.

johkra··on AMD and Valve Partner for Driver Updates via Steam
Steam is becoming a package manager for windows?
johkra··on GOG.com shut down
What the heck?

I've bought more than 25 games on GOG and I was just thinking about buying a new one (Still life) today - were there really so few people buying the games? Were the prices too low?

I hope I can still buy some of the games on my wish list - I would have already bought even more if only I had the time to actually play all these games. (I've played about half of them to date.)

I'm sorely disappointed by their sudden decision and complete removal of all access to the page. This could have been handled more professionally - why not announce closure a month in advance so people actually had the time to download everything and buy games they still would have wanted to buy?

Well, felt good to vent about it. Now to find an internet connection faster than 80kb/s to download some gigabytes of games. :-(

johkra··on Do You Understand Job Control in Bash?
Selecting a number of unrelated items from a list. Example: You have a folder with music files and want to select some to copy onto your portable music player. It's easier to click on the items to select them than typing all the names, even with file name completion.
johkra··on Do You Understand Job Control in Bash?
You can also use :!command to execute a command from within vim. This is handy to execute :!make for instance.
johkra··on Celebrate Whyday
Has it really been a year?

I didn't know much about _why until after he left. I only experienced his works later, had a look under the hood of Potion and was inspired by his passions.

In this spirit I'll take the rest of the day of and go hacking on my scanner/copier web-front-end so my family can do everything by themselves while I'm away.

johkra··on Berp: Python3 - Haskell compiler; Produces self contained binaries
Very interesting - I see myself using it.

My test case:

    def sumTo(n):
         def sumTCO(num, sum):
             if num == 0: return sum
             return sumTCO(num-1, sum + num)
         return sumTCO(n, 0)
    
    print(sumTo(10000000))
produces the following Haskell code (tail call optimization works!)

    module Main where
    import Berp.Base
    import qualified Prelude
    main = runStmt init
    init
      = do _s_sumTo <- var "sumTo"
           def _s_sumTo 1 none
             (\ [_s_n] ->
                do _s_sumTCO <- var "sumTCO"
                   def _s_sumTCO 2 none
                     (\ [_s_num, _s_sum] ->
                        do ifThen
                             (do _t_0 <- read _s_num
                                 _t_0 == 0)
                             (do _t_1 <- read _s_sum
                                 ret _t_1)
                           _t_2 <- read _s_sumTCO
                           _t_3 <- read _s_num
                           _t_4 <- _t_3 - 1
                           _t_5 <- read _s_sum
                           _t_6 <- read _s_num
                           _t_7 <- _t_5 + _t_6
                           tailCall _t_2 [_t_4, _t_7])
                   _t_8 <- read _s_sumTCO
                   _t_9 <- read _s_n
                   tailCall _t_8 [_t_9, 0])
           _t_10 <- read _s_print
           _t_11 <- read _s_sumTo
           _t_12 <- _t_11 @@ [10000000]
           _t_10 @@ [_t_12]
Which in turn produces a ~830KB binary after stripping (1.5MB before) which is linked only to gmp and the usual linux binaries, i.e. essentially static. Memory usage is also pretty low. (0.2% with 1GB RAM)

Thats's the good side. The bad side: It's slow. Runtime is about 10s whereas the same code in C returns instantly and measures less than 4KB.

The ugly: It's slower than Python 2.6 which "only" takes ~6 seconds for the iterative version using range. If converted to a while loop with manual incrementing (berp doesn't support range yet), Python takes ~8 seconds while berp still takes ~10s.

I understand that it's only version 0.0x, but I'm a pretty disappointed by the speed for numerical operations - I hoped (Python compiled to) Haskell would be within an order of magniture to C. TCO on the other hand is very cool - and there's no stack limit, which is great for some algorithms easier expressed recursively.

johkra··on Do you have a different personality when you speak a different language?
Isn't dog cão? (My Portuguese is barely good enough to talk and influenced by both European and Brazilian Portuguese.)
johkra··on Calculate the Size of a Folder/Directory using .NET 4.0
Mh, I always use du -sh, are there any reasons (compatibility?) to grep the output instead?
johkra··on Letting Go
This is a good, well-written article, painting a good picture of the issues involved.

My grand-father is in a similar situation. After years of dementia, he was diagnosed today with pneumonia after he stopped swallowing last week and reacting to people some weeks earlier. He'll die soon, but he'll die at home, where he was nursed by his loved ones until the end.

I'm glad he won't die in a hospital like my other grand-father, who died from cancer after many chemotherapies. My grandmother never gave up hope and it hit her hard when he finally died. I wished he could have died at home, even if that meant his life was some months shorter.

johkra··on Emerging Languages camp - day 1
I wish I could have been there. I can't wait for the videos.
johkra··on StackVM running within StackVM
Thanks for showing us how it looks. I hoped it would be more similar to the strange loops Hofstadter showed with a TV (ex. http://sv.wikipedia.org/wiki/Fil:Droste-wikipedia.jpg), but it's still interesting.
johkra··on I am doing a startup (putting virtual machines on the web)
That's exactly what I was wondering after he opened the terminal inside XP:

What happens when you open a VM inside a VM?

johkra··on Dagen H: The day Sweden switched to the right hand side of the road
I don't think so, but I'm European and I've only learned to drive with manual transmission and on the right side of the street.

I even think it's the other way around: Holding the wheel is easier than changing some setting on the radio, because the latter needs "fine motor skills" whilst the first does not. It's preferable to use the hand with better "fine motor skills" - which in case of right-handed people is the right hand - for more complicated tasks.

johkra··on Ask HN: Which Laptop?
I would recommend the Asus UL30A - 1.7kg, 13", very long battery life, about 650€ with 4GB RAM, silver color and matte screen. It has also good Linux compatibility. The display could be better, but I have yet to find a notebook screen with which I'm content.
johkra··on Lots of Haskell libraries now. What are we going to do about it?
Haskell actually has something like a package manager: I only install the GHC and then use cabal to install any applications. (cabal install pandoc, for instance.)
johkra··on Blogger Finger
Yep! I use emacs + swank-clojure + slime.

So, the future (of dynamic language tools) is actually the past. I'll have to give it a try - I'm surely interested in seeing what ideas can be stolen for another language's editor.

johkra··on Blogger Finger
I used to have lot of open, long-standing concerns about the future of programming and productivity, but my sabbatical last year finally brought me some clojure.

Mh, out of Steve Yegge's mouth, that's interesting to hear. I guess emacs is his tool of choice now¹ and Clojure's performance is pretty good from what I've heard.

¹ (Paraphrased: "Dynamic languages need better tools", see http://steve-yegge.blogspot.com/2008/05/dynamic-languages-st...)

johkra··on The pros and cons of 'fuck you' money.
If you're the only person understanding a system, it's a great risk for the company. They will eventually replace the old system and then you're worthless to them.
← PreviousPage 2 of 4Next →