HNHacker News
TopNewBestAskShowJobs

sluukkonen

173 karma · joined March 28, 2013

submissionscomments
sluukkonen··on Adding Floating-Point Decimals for Fun and Profit
It’s easier just to use a proper decimal type than to remember all of the ways where using floats will bite you in the ass. The behavior is unintuitive even in trivial examples. Code like

  amount_due = 0.10 + 0.20
  amount_paid = 0.30
  
  if amount_paid >= amount_due:
      print("PAID")
  else:
      print("OUTSTANDING")
will print “OUTSTANDING”.
sluukkonen··on Starbucks and TrustArc add fake cookie processing delay if you don't click agree
Isn’t that kind of implementation blatantly illegal, though?
sluukkonen··on PEP 572: Python assignment expressions has been accepted
Would've making regular assignment an expression broken too much existing code?
sluukkonen··on TC39, ECMAScript, and the Future of JavaScript
There is some work underway.

https://github.com/tc39/proposal-bigint/blob/master/README.m...

sluukkonen··on Cap'n Proto 0.6 released – 2.5 years of improvements
I have no idea why the C++ designers chose those particular names, but at least Scala uses the same Promise/Future dichotomy, where you resolve (or reject) a Promise into a Future. Perhaps they drew from the same well?
sluukkonen··on CRISPR eliminates HIV-1 infection in live animals
There's also an updated version of the episode that they aired this year.

http://www.radiolab.org/story/update-crispr/

sluukkonen··on Show HN: Workq – Job Server in Go
I have no experience with SQS, but there is definitely space for a simpler queue implementation (or even a standard) than AMQP. I think it's needlessly complex for many problem domains.
sluukkonen··on Show HN: Cuckoo Filter Implementation in Go, Better Than Bloom Filters
Here's one example. Web browsers often use bloom filters or similar data structures to check for malicious URLs. They first check the URL against the local bloom filter, and if a match is found, they double check against an online API to make sure it wasn't a false positive.

Shipping a full list of malicious URLs would be too expensive, but a bloom filter fits in a fraction of the space and can still eliminate a vast majority of the API calls.

sluukkonen··on To Cut Down Poverty, Cut Down the Cost of Living
That's Norway. The other Nordic countries weren't lucky enough to have significant numbers of oil.
sluukkonen··on Why we lost Uber as a user
Not the American pronounciation!
sluukkonen··on Why we lost Uber as a user
The y is pronounced like the ü in über.
sluukkonen··on What Marissa Mayer Brought to Yahoo That Can’t Be Bought or Sold
> Imagine if that lone guy at Microsoft didn't figure out trick with 286 protected mode that allowed Windows to survive and wasn't heard by top management - we would all be running OS/2 10 now.

I haven't heard this story before. Got a link?

sluukkonen··on The DOOM 3 Network Architecture (2006) [pdf]
CSGO does as well.
sluukkonen··on A JVM Does That? (2011) [pdf]
Going above 32G doesn't kill performance per se, it just means that there is not point in using heap sizes between 32G and 48G due to the larger pointers. If you go above that, it's all good again.
sluukkonen··on DataGrip: Swiss Army Knife for Databases and SQL
It's a nice tool, I use it daily. Right now my only gripe is that it doesn't format (PostgreSQL) JSON columns in any way, so if you're storing a lot of JSON data, it can be difficult to view.
sluukkonen··on The day I left my son in the car
During the hottest days of the summer (it very rarely goes above 28C or so - average maximum temperature is around 22C during the hottest summer months in southern Finland), yes, but not that often.
sluukkonen··on YouTube to Acquire Videogame-Streaming Service Twitch for $1 Billion?
Music isn't obviously not the focus of any Twitch stream, but nevertheless, people are breaking copyright laws by playing copyrighted music on their streams. And if Twitch becomes a part of YouTube, they might have to crack down on copyrighted music on streams, due to pressure from the copyright holders.
sluukkonen··on Ruby 2.1.1 is released and Ruby turns 21
All major Ruby implementations use OS threads, but the GIL still limits parallelism in MRI.
sluukkonen··on Debian committee members vote for systemd as init system
Looks like it's clear now. Colin Watson voted for Upstart[1], so systemd wins.

[1] https://lists.debian.org/debian-ctte/2014/02/msg00332.html

sluukkonen··on Is Ruby Fast Yet?
> Without concurrent request dispatch, jruby's hypothetical greater thread parallelism is unlikely to effect requests-per-second benchmarks. Also, the benchmarking test would have to be willing to issue requests concurrently!

That's a good point.

That said, JRuby would most likely benefit from a concurrent test, as the thread-per-request model of JRuby can scale much higher than the process-per-request model which is used a lot in the MRI world.

sluukkonen··on Is Ruby Fast Yet?
I'd wager that it's the TB/Undertow code running most of the time on that benchmark. On real-world benchmarks the difference is going to be a lot smaller. Not saying that you shouldn't run your JRuby apps on Torquebox - it's a great choice.
sluukkonen··on Is Ruby Fast Yet?
Looks like it's running with the threadsafe mode off. That would probably give JRuby an edge, as it's able to take advantage of greater thread parallelism than MRI. No idea if he's letting the JVM warm up enough either.
sluukkonen··on 300ms tap delay removed on Chrome for Android
Ah, that's too bad. It would be nice if setting user-scalable=no was all you had to do to disable the delay. And anyway, despite using an iPhone for god knows how many years, I didn't even know that a double tap on iOS scrolls the page!

Edit: I mean double tapping on an unzoomable page.

sluukkonen··on 300ms tap delay removed on Chrome for Android
> For what it's worth, this delay was already removed for sites that had user-scalable=no set. Most mobile "apps" used this.

Is this true for mobile Safari as well?

sluukkonen··on Never create Ruby strings longer than 23 characters
Each String in Ruby has their own encoding. But by default, it is UTF-8 these days.
sluukkonen··on What the Fluck
Now I'm interested in seeing the whole Harry Caudill documentary. I wonder what it's called...
sluukkonen··on Another Scala rant on HN
But the JVM not having reified generics is a mostly a blessing for Scala. With reified generics, your language's type system can essentially be only as powerful as the VM's type system, and I think it's clear that Scala today wouldn't be the same if Sun had gone the reified generics route.

(Still, it would be nice to have specialized generic containers for some primitive types in the JVM)

sluukkonen··on Another Scala rant on HN
Reified generics is one of the reasons why Scala on the .NET is effectively dead. The VM's type system isn't powerful enough to support some features of Scala, such as higher-kinded types.
sluukkonen··on IntelliJ IDEA 13 is Released
It does highlight implicit conversions by default (they're underlined and have a light blue background colour). I don't think it does anything special w.r.t. macros, but I might be wrong.

As far as I know, they use their own compiler for highlighting type errors in the editor etc. and SBT for the "actual" compilation. The presentation compiler didn't exist when they started Scala support, so they rolled their own solution.

sluukkonen··on Primer on elliptic curve cryptography
There is. x^n = (x^(n/2))^2 if n is even, (x^(n-1/2))^2 if n is odd, so it's possible to exponentiation in logarithmic time.
Page 1 of 2Next →