HNHacker News
TopNewBestAskShowJobs

metabrew

1,486 karma · joined October 18, 2009

Made Audioscrobbler in 2002, founder & (now ex-)CTO, Last.fm Ltd.

Also https://www.irccloud.com/

Beam appreciator. Rust and Bevy fan. Home assistant tinkerer.

Blog: http://www.metabrew.com/

submissionscomments
metabrew··on Show HN: A ReactJS Grid Component with infinite scroll, customization, and more
Are there any react infinite scrolling examples that support arbitrary row-heights?

Like if you need to inline images which might be variable sizes.

I think it's probably possible, with some clever caching of row heights and recalculation of some sort, in order to maintain a correctly sized spacer element at the top/bottom. Not seen any examples of it.

metabrew··on Screeps – the world's first MMO sandbox strategy game for programmers
would love to know how you sandbox and isolate the user-uploaded JS that runs serverside. how do you manage to do that safely? how protected is it against malicious js?
metabrew··on Nexus 6
I've bought every nexus phone when they were released, but I'm not sure about this one. The nexus 5 is already a bit oversized IMO. This thing is ridiculous.
metabrew··on Dorian Nakamoto Is Suing Newsweek
Yup, fair enough.

Looks like Newsweek fucked up.

metabrew··on Ask HN: What DB to use for huge time series?
Approximately, if you have something like 10+ billion items, use Cassandra.

If you have less than 10 billion items, Postgres will be fine, and is easier to manage IMO.

If you do use postgres, you should vertically partition the table. This will help keep indexes smaller, improve the the cache hit rate, vastly improve the ease with which you can drop older data, and make various other admin tasks easier.

I've done this in the past with a compound primary key of (topic_id, t) where t was a microseconds-past-the-epoch timestamp (bigint) unique within a topic. Then set up a parent table: CREATE TABLE events (topic_id, t, data_fields..) and "CREATE TABLE .. INHERITS events" from it into multiple subtables, named based on the timespan they will hold, like events_2013, events_2014.

Depending on how much data you have, either partition by day/month/year/etc. I partitioned every million seconds (~11 days), since that kept the resulting table sizes a bit more manageable (gigs not TBs).

Add a CHECK CONSTRAINT to each sub-table to constrain the timespan (ie, WHERE t BETWEEN ?? and ??).

When you do a SELECT * FROM events WHERE topic_id = 1 AND t BETWEEN $x AND $y ORDER BY t DESC; the query planner knows which sub-table(s) to query, and doesn't touch the other tables at all.

You can also add a BEFORE INSERT trigger to the parent table that inserts into the correct sub-table, otherwise get clients to compute the correct table name when inserting.

metabrew··on Batsh – A language that compiles to Bash and Windows Batch
Great name
metabrew··on Next major release of PHP to be named PHP 7
Why skip a version? Wasn't clear from that thread.
metabrew··on Building Web Applications with Elixir
Mistake in the "With pattern matching you can save a few lines:" section, the clause matching nil should probably go first, otherwise the user variable ends up being bound to nil.
metabrew··on The Dumb Way We Board Airplanes Remains Impervious to Good Data
Mythbusters did this, here are the results: http://mythbustersresults.com/airplane-boarding
metabrew··on As the Mac Turns 30, Apple Ponders ‘Post-PC’ Era
OS X is free, if you buy a $3000 dongle ;)
metabrew··on Amazon Kinesis Available For All Customers
As I understand it, this is very similar to Linkedin's Kafka.

To understand how you would use it, read some of the kafa docs: https://kafka.apache.org/documentation.html#introduction

metabrew··on Elixir is for programmers
It's pretty cool.. read the "Okay, but just how metaprogrammable are we talking?" section in this article: http://devintorr.es/blog/2013/06/11/elixir-its-not-about-syn...
metabrew··on IRCCloud
ah, perhaps the domain in our list doesn't have an AAAA record. let me know if you want us to update it.

we always use ipv6 if an AAAA record exists, and fall back to v4 if that fails.

metabrew··on IRCCloud
We also have nice android and ios apps, with push notifications and synchronised read status.

But we don't act as a traditional bouncer yet. Maybe in future.. it's all about the web app and mobile apps for the time being.

metabrew··on IRCCloud
btw our preferred solution for the IP session limit is for everyone to hurry up and deploy IPv6 everywhere ;)

Some ircds by default limit sessions per ipv6 /64, but that's easily changed if needed.

metabrew··on IRCCloud
Yep, postgres has all the account / user details, lists of what network and channels to join, billing etc.

All the irc messages end up in cassandra, via rabbitmq. We use local redis as a cache for the most recent messages. Our cassandra cluster is on EC2 (~11ms away from our other hardware, which is in LA).

metabrew··on IRCCloud
Hi, one of the irccloud team. Can answer any questions if you like.

Some info:

* Erlang, haproxy, rabbitmq, redis, postgres, cassandra, chef

* 10+ billion irc lines stored at the last count

* Thousands of IPv6 IRC connections - we give each user their own IPv6 address. Main site also works over ipv6.

* Thousands of IPv4 connections too

* Open source android and ios apps: https://blog.irccloud.com/mobile-apps-open-sourced/

* API: https://github.com/irccloud/irccloud-tools/wiki/API-Overview

* Details on our security, password storage, etc: https://www.irccloud.com/privacy

I've mentioned this on HN before, but we moved our hosting off Hetzner and on to Black Lotus for the ddos-protection.

We see fairly frequent ddos attacks, from a few hundred mbit to 10+ gbit. They aren't impacting service since we moved to black lotus.

metabrew··on My tmux setup
Isn't that siginfo?

You can send it to ping on linux to print a report line without terminating, for example.

metabrew··on Moving forward on improving HTTP's security
Here's hoping we have a viable, popular alternative to the current (expensive, corrupt..) system of SSL certificate signing long before HTTP(S) 2.0 becomes prevalent..
metabrew··on How to destroy someone who hosts stuff at Hetzner dedicated server
that was just salt in the wound.. we were getting slammed by ddos and null routed on a regular basis before that happened.
metabrew··on How to destroy someone who hosts stuff at Hetzner dedicated server
...however, if you aren't concerned about ddos, I still recommend hetzner.

Excellent value for money dedicated servers, with good automated systems. You can remotely reboot a dedicated server into a recovery image and fix problems yourself. You can run the install process yourself too, so you get exactly what you want... except ddos mitigation.

metabrew··on How to destroy someone who hosts stuff at Hetzner dedicated server
IRCCloud had to move off hetzner for this reason. We were continually getting ddos'ed, and hetzner showed no interest in working with us to try and mitigate.

At one point they just suggested we "ask the responsible parties to stop", and closed the ticket.

Now we are on Black Lotus. Expensive, but the regular 50mb-10gbit ddos attacks are mitigated just fine.

metabrew··on Joe Armstrong on Programmer Productivity
In this case, I was re-implementing the C++ app I had written - so it was the same programmer authoring both codebases.

I expect if I rewrote either codebase again, it might shrink even more.

metabrew··on Joe Armstrong on Programmer Productivity
I understood the problem pretty well before writing the C++ version, having done some prototypes beforehand. The C++ version went through some reasonable refactoring too, so it's not like that code was just the first working version that g++ would accept.

I didn't do a full C++ rewrite of course. I think it's fair to say that whenever you are doing lots of concurrency/multithreading/evented stuff in a language like C++, the savings will be enormous when you switch to a language that has a nice concurrency model (ie, not just threads and shared mem and mutexes).

metabrew··on Joe Armstrong on Programmer Productivity
I rewrote a (~10k lines) C++ app to erlang back when I was learning erlang, and saw a ~75% reduction in lines of code.

http://www.metabrew.com/article/rewriting-playdar-c-to-erlan...

I expect the 'N' value varies wildly depending on what you are building, and whichever language you are comparing against.

metabrew··on Masscan: The entire internet in 3 minutes
30 million packets per second from one server, wow.

Pretty terrifying if you subvert it to hit just one network instead of randomly scanning the internet.

metabrew··on Cold fusion reactor independently verified, has 10k x the energy density of gas
Extremely skeptical of course.. but:

What if you did crack cold fusion.. imagine the (justifiable) paranoia and measures you would have to take to protect yourself, and your discovery.

I'd want to get the plans/schematics in the public domain ASAP. Someone is going to throw money at you to help build bigger and better versions once all doubt is removed anyway.

metabrew··on Two.js
Also worth a look: https://github.com/GoodBoyDigital/pixi.js 2D renderer with canvas and webgl backends
metabrew··on Firefox OS Developer Preview Devices Announced
No buy link, what a wasted announcement. They unveiled... a holding page.
metabrew··on ‘The Fractalist,’ Benoit B. Mandelbrot’s Math Memoir
Not a lot of people know this, but the "B" in Benoit B. Mandelbrot's name stands for "Benoit B. Mandelbrot".
← PreviousPage 2 of 6Next →