HNHacker News
TopNewBestAskShowJobs

batterseapower

469 karma · joined April 12, 2009

Max Bolingbroke

http://www.github.com/batterseapower http://blog.omega-prime.co.uk/

submissionscomments
batterseapower··on LambCI – A continuous integration system built on AWS Lambda
Hydra (https://nixos.org/hydra/) addresses a couple of these concerns as well, specifically the snowflakiness and version controlled config.
batterseapower··on Urban Myths about SQL (2015)
By "stored procedures" the author seems to mean what is more usually described as "prepared statements": https://docs.voltdb.com/UsingVoltDB/DesignProcAnatomy.php#De...
batterseapower··on java.nio.file.WatchService is subtly broken on Linux
Oh hey, it's my blog post.

I reported this to Oracle about 3 months ago (ref JI-9024492) but haven't heard anything since 2015-09-29, when they contacted me asking for some code to reproduce the issue (which I gave to them on the same day). :-/

batterseapower··on Stocks Off Sharply as Market Upheaval Grows
The FTSE 100 total return index is at 5,898.87 i.e. the levels of November 2012: https://www.google.com/finance?cid=15424700
batterseapower··on Why are callbacks more “tightly coupled” than promises?
Thinking about this from a Haskell perspective, it seems that with promises the lambda waiting for the callback is basically encapsulated into the promise:

  type Promise a = (a -> IO ()) -> IO ()
  getData :: Promise String
Whereas with callbacks you pass that around explicitly:

  getData :: (String -> IO ()) -> IO ()
Promises are a monad, so you get the usual monad advantages of being able to "hide the plumbing" behind the abstraction, hence no tower of explicit callbacks in your JS code.

  instance Monad Promise where 
    return x = \k -> k x
    fmap f p = \k -> p (k . f)
    mx >>= fxmy = \k -> mx (\x -> fxmy x k)
batterseapower··on Implementing a JIT Compiled Language with Haskell and LLVM
A while ago I wrote a Haskell compiler for a simple functional language that uses the JIT features of LLVM in order to make the Haskell-level "compile" function lazy in the term being compiled. Quite a fun trick I thought: https://github.com/batterseapower/productive-compiler/blob/m...
batterseapower··on Avoid Null Checks by Replacing Finders with Tellers
This is just the Church encoding of Haskell's Maybe type. It is indeed a powerful way to simulate algebraic sum types when you only have product types in your language.
batterseapower··on Python's sad, unimaginative Enum
All enum types look a bit sad when you're used to the full algebraic sum types + pattern matching provided by a functional language
batterseapower··on New Solution Can Cut Video File Size By Half – Without Losing Quality
Previously on HN: http://news.ycombinator.com/item?id=2940505
batterseapower··on Everything just doesn't work and nobody cares
As soon as I stopped building computers from off-the-shelf parts, stopped installing unpopular applications and plugins and stopped trying to use OSes like Linux with relatively few users the amount of my life I spent fixing weird computer problems fell from hours per week to almost zero.

When I do encounter a problem, the answer is almost always available after 5 minutes on Google.

Following the herd leads to an easy life. Go figure.

batterseapower··on The Algebra of Algebraic Data Types
Pedants would add that the analogy with number of inhabitants is all a little screwed up in Haskell since bottom is an implicit inhabitant of all data types, which means that e.g. Either Void () has a different number of inhabitants than () and so they cannot strictly speaking be made isomorphic.

Strict languages can sidestep this problem to an extent but still end up with "wrong" numbers of inhabitants for e.g. T -> (), since (\_ -> ()) is different from (\_ -> undefined).

So the only guys living in pure algebraic bliss are the total functional programmers like the Agda aficionados.

batterseapower··on Playframework: Async, Reactive, Threads, Futures, ExecutionContexts
In Haskell at least you do not have to explicitly yield. Instead, any call to the garbage collector is treated as a possible yield point (so it's possible to hog a CPU if you write a non-allocating loop).

Not sure what to say about your second point: you do have to store context for the other fibers, but only in the same way you have to pay to store the context of an OS thread or pending callback.

batterseapower··on A new era begins for Haskell
I had lunch with him yesterday and I can assure you that scaling down his involvement with Haskell is the furthest thing from his mind. In fact, a number of his side projects have recently reached a point where he will have even more time to contribute to GHC than he has been able to recently.
batterseapower··on A new era begins for Haskell
Perhaps you are looking for http://www.haskell.org/pipermail/haskell/2012-November/02356...
batterseapower··on ANSI Escape Codes Explained
I'm glad you liked my package. Let me just plug my related package ansi-wl-pprint (http://hackage.haskell.org/package/ansi-wl-pprint-0.6.4) which (I think) is an even more convenient interface to ANSI text colouring for most programs.
batterseapower··on Hey, C Is a Functional Language Too
I think you might have misinterpreted the contents of that page. As someone who has worked on GHC, I can assure you that it does perform tail call optimisation.
batterseapower··on Entertainment Weekly puts smartphone in 1000 magazines
I can't imagine this advertising method is cost effective once the novelty value has worn off, so I can't really see this being a major environmental issue.
batterseapower··on GHC's new cutting-edge dataflow-based code generator
Basically, it inlines across module boundaries (except where such modules are mutually recursive).
batterseapower··on Functional Programming is Dead, Long Live Expression-Oriented Programming
Monads are to state as fruits are to apples: one of their applications (and probably the most common one) is for state, but it's by no means the only application.
batterseapower··on Confession of a Haskell Hacker

    id x = id x
batterseapower··on Confession of a Haskell Hacker
I find this happens a lot with Haskell. I can write hundreds of lines of code and have them work perfectly as soon as I get a error-free and warning-free compilation.

The type system is definitely a big part of this, but almost as important are algebraic data types and compiler checks for exhaustivity when scrutinising values of such types.

batterseapower··on Valve hands over its own movie-making tools to gamers
I'm pretty sure you can use the tradeable assets in your films without owning them. You only need to have them in your inventory if you want to use them in the game proper.
batterseapower··on PHP Bug #18556 : Setting locale to 'tr_TR' lowercases class names
Apparently identifier lookup is done case-insensitively...
batterseapower··on How CloudFlare is making SSL fast
I think it was pretty interesting, first time I've heard of OCSP stapling.

Apparently the AES-NI stuff is actually already part of the public OpenSSL codebase: http://datacenteroverlords.com/2011/09/07/aes-ni-pimp-your-a...

batterseapower··on OkCupid on Trial - 4 Month Experiment
This explanation is unlikely because the same pattern was repeated in the results from the UK.
batterseapower··on 37signals selling Sortfolio on Flippa for 480k
On the face of it this doesn't sale make a lot of economic sense, so this says to me that signalling to customers and employees that 37 signals is serious about focus is worth $18k a month to them. Viewed from this perspective the decision makes a bit more sense.
batterseapower··on TCP doesn't suck, and all the proposed bufferbloat fixes are identical
You may already know this, but uTP's congestion control algorithm is usable with vanilla TCP, where it is called LEDBAT (http://tools.ietf.org/html/draft-ietf-ledbat-congestion-01).

Of course, from the perspective of a Bittorrent client author it's much easier to implement TCP-over-UDP than to depend upon raw socket support / install a custom congestion control algorithm into the OSes TCP stack.

batterseapower··on Designing a DCPU-16 emulator in Haskell: on determinism and I/O
Simple things can be done simply in Haskell too. It is straightforward to write an emulator without any monads, typeclasses and so forth.

The reason the code here looks so complex is that Jaspers implementation adds additional abstractions so he can use the type system to distinguish between DCPU computations that can are pure (except insofar as they access DCPU memory) and those that are impure (in that they communicate with the outside world by e.g. writing to the console).

batterseapower··on Jessamyn Smith: Fighting sexist jokes with a Python bot
"something is making them uncomfortable, and so they attack it on “rational” grounds"

I don't think this is confined to just geek behaviour -- in my experience, it is typical human behaviour.

batterseapower··on GSoC 2012 accepted organizations announced
Haskell.org has been accepted this year despite its non-presence on the list.
← PreviousPage 2 of 4Next →