HNHacker News
TopNewBestAskShowJobs

llogiq

331 karma · joined May 14, 2008

submissionscomments
llogiq··on Comparing Rust and Java
On the contrary, it's actually rather easy to use the type checker to encode this: Just make a wrapper type CharIdx(usize) that encodes the fact that the enclosed value is a valid char position and implement Index for it using unchecked indexing. Also implement Index for usize with the usual check for bounds and valid character position.
llogiq··on Comparing Rust and Java
You forgot &entities;

And there is an oft-documented overuse of custom operators among Scala programmers, however I don't have sufficient expertise to gauge the resulting problems in practice.

llogiq··on Comparing Rust and Java
There are tools to do exactly that (I don't remember the name of what we used at university, alas). And no, I do not want to run a SMT solver against anything but simple code, because my build is slow enough as is. ;-)
llogiq··on Comparing Rust and Java
I'd personally like to find the time to write this – some of the infrastructure (like call graph analysis) is already available.

However, I think this is the nuclear option. I have some experience from university where I wrote some Eiffel code, contracts and all that jazz. It often takes some head scratching to figure out the right pre- and postconditions.

I'd actually rather see more safe interfaces for the common cases (like iterators and slices) that are ergonomic to use and may actually carry the proof in their types.

llogiq··on Comparing Rust and Java
Ah, yes that's true. The java ecosystem had much more time to mature, and it shows.
llogiq··on Comparing Rust and Java
Exactly. I must admit that my wording was not as understandable as it should have been. I'll see if I can rephrase it to better convey the point.
llogiq··on Comparing Rust and Java
The article compares the only currently available Rust implementation in version 1.8.0 nightly with OpenJDK 1.8.0_60 – which is sufficiently similar to Oracle's JRE, which is the predominantly used VM, so I'm comparing how the languages are used by the majority of users. If you think this unfair, I'd like to read your blog post where you enlighten us about your implementation of choice.

> ... if it matters enough, someone will come along and make you wrong.

I'll be gladly proven wrong if someone comes around and speeds up my JVM. :-D

llogiq··on Comparing Rust and Java
Thanks, glad you like it.

> crates.io doesn't has so powerful things like Java has in maven

Could you elaborate on this? I'm only using maven in a few projects and have only shallow experience with it.

llogiq··on Comparing Rust and Java
Thank you! I'm glad you like it.
llogiq··on A bad citizen in Javaland (2006)
But the universe is certainly written in Brainfuck.
llogiq··on Rust-Doom: A Doom renderer in Rust, with no unsafe code
Yeah, but that's only because teXitoi's and Joshua Landau's improvements to many Rust benchmarks are still open on the tracker. And it's still using 1.3 (Ok, 1.4 only came out yesterday). Note that this is not meant as an indictment of the maintainer, who is indeed working very hard to keep the site usable, accurate and useful.
llogiq··on Wait-free queueing and ultra-low latency logging
Note that log4j2, which can log asynchronously, uses the LMAX disruptor, which is a java implementation of the same technique.
llogiq··on Principles for making things for the web
I disagree on the"flush data on POST" tip. If you interpret a POST as a transaction and have a transaction ID, you can make POSTs idempotent.

In this case, reloading just retries the transaction. Or the system can filter it out altogether.

llogiq··on Ask HN: How much recurring income do you generate, and from what?
Whenever I hear an evangelist (and I label everyone dealing in absolutes like 'is X worth it?' without at least asking 'what?' and 'for whom?' evangelist), my gut reaction is to dismiss everything without even reading it.

I work in an unconventional setting, where my code runs for a potetially long time and where failure means trying again. This has led me to use a lot of assert statements, both in a pre-/postcondition/invariant checking and in a more general assumption checking style. I still use unit tests, but only to exercise portions of the code quickly - the tests are often devoid of assertions.

I find that this style gives me the best test coverage + internal code documentation for the time invested.

llogiq··on A negative captcha
Ned Batchelder shared a similar if not equal trick some time ago: http://nedbatchelder.com/text/stopbots.html
llogiq··on Ask HN: Javascript type inference and Asm.js
Are you proposing a JS to JS filter that

a) checks if functions/modules are eligible for asm-ifying (that is, it only uses asm.js functionality, no metaprogramming, only using asm.js "heap", do I oversee something?) b) adds a "use asm" to the function/module c) adds the correct type information d) perhaps compiles some JS functionality into asm.js (I'm thinking of the heap, which could be precompiled under certain constraints, but it's probably better to make the compiler not too smart)

llogiq··on Matt Blaze: No, You Can't Have My Slides
The Gettysburg presentation, a true classic. :-) As they say, Power corrupts, but PowerPoint corrupts absolutely.

I also really appreciate the minimalist style. After having seen a few presentations by Lawrence Lessig and others with similar style, I started to copy it, but with less slides (mostly because I am too lazy or have too little to say for the machine-gun-25-slides-per-seconds style).

llogiq··on Ubuntu 11.04 will use Unity UX instead of GNOME Desktop
On my netbook I set the menu bar to hide and set it up to have the same height as the window title bar. This solves both problems (at least for me): a) no vertical screen clutter, b) no unfamilar menubar on the right screen border.

I used to run gentoo w/ ratpoison which had an even better solution and dispersed with the panel altogether...

llogiq··on Lies We Tell Kids
You got one thing wrong. Most kids can and do handle the truth about death better than most adults (Says the thirtysomething who tried not to cry at the funeral). The reason that we lie about death is that it is one of the biggest cultural taboos.

You are not supposed to talk about death. Keep silent at the cemetary. etc.

← PreviousPage 3 of 3