HNHacker News
TopNewBestAskShowJobs

emillon

2,853 karma · joined January 10, 2011

Paris-based λ-term writer.

    https://github.com/emillon/
    http://blog.emillon.org/
    @etiennemillon
    me @ <username> . org
submissionscomments
emillon··on Compressing Scrabble Dictionaries
I believe that there is no benefit in using a GADDAG. Finding an anagram is an easier problem as you know that you will use all the letters, so sorting them is the optimal solution. But this method does not work with scrabble since you would have (at least) to find all anagrams of all subsets, which adds an exponential step.
emillon··on The Design Of SQLite4
You can always embed a "metadata" table in your schema. Not ideal but would probably do the job in a lot of cases.
emillon··on The Design Of SQLite4
sqlite3 is the package that provides the command-line tool. A lot more packages depend on the dynamic library: "apt-cache rdepends libsqlite3-0 | wc -l" returns 407 results.
emillon··on Flappy48
With "doges", probably.
emillon··on Show HN: 10% off at Starbucks when you buy with Bitcoin
It would be a big opportunity for money laundering, so I doubt it.
emillon··on Speed memory access by arranging data to take advantage of CPU caching
That's one of the reasons why record types are recommended instead of tuples. They don't cost anything at runtime but make it harder to shoot yourself in the foot.
emillon··on What it's like to use Haskell
Indeed!

Hey, who said that static typing caught all bugs ? :)

emillon··on What it's like to use Haskell
It indeeds looks a bit magical, like the infamous fibonacci example that uses lazy lists.

I don't think that list comprehensions are very idiomatic in Haskell, one would probably use Data.List.partition instead:

    qsort [] = []
    qsort (p:xs) = low ++ [p] ++ high
        where (low, high) = partition (< p) xs
emillon··on How British satellite company Inmarsat tracked down MH370
Under water, I assume that sound is easier to detect than IR.
emillon··on Please reconsider the Boolean evaluation of midnight
This is what is plaguing the ocaml compiler and standard library. Overconservatism with respect to obscure features. For example, a patch was written to speed up hashtables (IIRC), and was rejected because it would change the result of hashing format strings (type-safe format strings have a different type from plain strings).

I can't imagine a single application where you would need to preserve the value of hashed format strings. But specifying their value so that you can rely on them just seems to be a bad idea.

emillon··on GnuTLS certificate verification vulnerability announced (CVE-2014-0092)
Actually, it's being "ressurected" through the work of ocamlpro & ocamllabs. The tooling in particular has improved a lot in the last 2 years.
emillon··on Show HN: Pdf.js-based real-time collaborative viewer for Chrome

    <div id="fucking_intro_video_wrapper">
    <video id="fucking_intro_video">
Classy!

Form aside, this looks like a very interesting product, as others I wanted to work on something similar too. Good luck!

emillon··on Give this beer to your browser. Wait. Enjoy
Evaluating javascript from the web is what your browser does when loading a page.
emillon··on A brief history of one line fixes
> The compiler could have prevented 'X' by not permitting "function == int" comparisons. That's 1/5.

0 is also a special case litteral for the null pointer, and function names are valid in pointer contexts, so I'm not even sure that "f == 0" is badly typed.

emillon··on Reddit to Give 10% of Its 2014 Ad Revenue to Non-Profits Picked by Its Users
> the price of a New York Times subscription would be close to $1,500 per year if it weren't for advertisers keeping it closer to $300

The fact that this model works well on dead-tree newspapers, does not mean that it should be copied on the internet. We have tools to customize how sites are displayed, ads shouldn't be a sacred exception.

emillon··on E-mail didn't really evolve since Gmail. Why is it so hard to innovate?
Free email hosting for multi-GB mailboxes with a threaded web client.
emillon··on Flask API – Browsable Web APIs for Flask
> I spent last 3 months building AngularJS + Flask where the client talks to server only through REST.

I've been wanting to do something like this for a certain time, so I have a few questions if you don't mind.

How do you handle authentication? Tokens? Cookies? Is there a special "API key" for your web app?

emillon··on Xorg can now run without privilege on OpenBSD
It's Lennart Poettering's website.
emillon··on Git: how to use stash
For example, to test partial commits:

    git add -p
    git stash
    test
    commit
    git stash pop
emillon··on Git – A simple guide
It seems to me that git tutorials are the new monad tutorials. The concepts are simple, but the names are confusing (see "checkout" or "return", "reset" or "bind").

There are a lot of tutorials like this one, but I think that they mostly help the writer (not that it's a bad thing).

emillon··on The Engineer Crunch
If applying for Matasano is as fun as microcorruption I might as well apply there. Do you consider H1B candidates?
emillon··on OCaml: what you gain
The equivalent Haskell program is

    import Data.IORef

    main :: IO ()
    main = do
        r <- newIORef []
        writeIORef r ["Hello"]
        x <- readIORef r
        print $ x + 1
        return () 
The reference is bound by "r <-", ie a lambda (as this desugars to ">>= \ r ->"), and lambdas are never generalized (even in ocaml).

I think that the reason why it works is that because there is no way to let-bind r except with a toplevel unsafePerformIO.

emillon··on Making Remote Work Work
I think that you can also use env(1) for this.

    berlin='env TZ=Europe/Berlin date'
emillon··on OCaml: what you gain
Polymorphism (more precisely, generalization of unknown types) is incompatible with references. For example:

    let r = ref []
Here r has type 'a list ref (reference to a list of 'a where 'a is unknown).

    r := ["hello"]
r has type 'a list ref, := has type 'a ref -> 'a -> unit, and ["hello"] has type string list, so it works (if we instantiate 'a with string).

    let n = 1 + (List.head !r)
1 has type int, + has type int -> int -> int, and we can type (List.head !r) as int since we can type !r as int list since we can type r as int ref list (this time instantiating 'a by int).

So, we just added an int and a string and the program will probably crash. What's wrong is that every line is correct but because of the mutable store, the program as a whole is incorrectly typed.

The solution is to generalize only a subset of all syntactic constructs. The historic solution in Ocaml is to never generalize expressions that may allocate memory (that's the "value restriction") . For example, a function application (like f x, or ref []) may allocate, but a variable or a constant (like x or 1 or []) can not. That's why [] has type 'a list but ref [] has type '_a list ref ('_a can be unified only once, so in the above example an error would occur at the "let n").

emillon··on "Strong" stack protection for GCC
On the conceptual level, ROP and return into libc are the same thing. You need to start them by overwriting an address somewhere, and the return address is a natural candidate.
emillon··on Why is quality of pseudorandom number generators important?
The Debian accident was related to the openssl PRNG, not the kernel's.
emillon··on Gitter, chat for GitHub, is now public beta
With longer messages and asynchronous, so basically email. It seems to me that mailing lists solve a different problem than chat or bug trackers. They allow to discuss about the project itself, which is necessary if you have > 1 main dev. That's something that sourceforge did and github does not, probably by design. Maybe something like discourse could work for that.
emillon··on Gitter, chat for GitHub, is now public beta
Sounds interesting. I'll have a look at this. Thanks!
emillon··on Gitter, chat for GitHub, is now public beta
Do you know if something similar exists for mailing lists?

ie for every github project you get a project mailing list to discuss development on a higher level than individual bug reports.

emillon··on Linux local root exploit for CVE-2014-0038
As others said, you can't really do it without disassembling the function (bonus problem: the general case is undecidable). A solution is to have your linker insert a "end of function" symbol in the ELF object (using a linker script), and import it in your C code a pointer. Then the size of f is "f_end - (void\*) f".
← PreviousPage 3 of 11Next →