HNHacker News
TopNewBestAskShowJobs

electrum

1,230 karma · joined September 30, 2007

Software engineer. Co-creator of Trino (formerly Presto SQL).

https://trino.io/

https://www.linkedin.com/in/electrum

submissionscomments
electrum··on Modern SQL in PostgreSQL
You can do that in SQL databases too: store the XML / JSON / whatever in a blob. There is no need to have a normalized import schema, especially since you are doing the transformation using an external application (Scala program).
electrum··on Scala.js no longer experimental
None of those languages have a secure sandbox and writing one is incredibly difficult, even for a language designed to run in such an environment (Java). Native Client might be interesting here to build sandboxes for other languages.
electrum··on Why is Golang popular in China?
And older ones such as Java, released in 1995.
electrum··on Inferno OS
The choice of register vs stack for bytecode doesn't make any difference for a modern JIT like HotSpot. The bytecode gets transformed into an intermediate representation (IR) and optimized before being translated to machine code. A register based bytecode like Dalvik that has 65,535 registers certainly does not map directly to hardware.
electrum··on Internal Versus External BLOBs in SQLite
Databases also have advantages: transactions, durable logging, replication, integrated backups, etc.

Tom Kyte has some insightful points in this thread: https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUE...

"Do I want you to keep MY medical stuff in a directory, unsecured, unmanaged, not backed up like the database is - we have no idea if recovery is possible, who accessed it last? Who has access to it."

"if this data is valuable to your business, if this data is necessary for your business, if the loss of this data would damage your ability to do business - it has no business NOT being in the database."

electrum··on Internal Versus External BLOBs in SQLite
This sounds similar to Facebook's Haystack: https://www.usenix.org/legacy/event/osdi10/tech/full_papers/...
electrum··on An incomplete guide to Facebook thrift
There is a native version of Thrift for Java: https://github.com/facebook/swift
electrum··on What to Eat After the Apocalypse
The wines were the same: "He presented the same Bordeaux superior wine"
electrum··on PostgreSQL 9.4 Released
In Presto, we support the popular but non-standard IF construct as a shorthand for CASE, so you can do this: sum(if(bar, foo))

We also have a count_if() function: count_if(bar)

http://prestodb.io/docs/current/functions/conditional.html#i...

http://prestodb.io/docs/current/functions/aggregate.html#cou...

electrum··on Apple keeps rejecting my binary
The screenshot shows it crashing on a method named "semaphore_wait_trap", so that does indeed seem to be an intentional trap for calls that can block the main thread.
electrum··on Air Fares 101 – Why do fares change all the time?
The Frontier gate check fee seems to only apply to items that are not eligible to be carry-on. It would not make sense to charge to gate check a carry-on item (as you are often required to do when the overhead bins are full).

http://www.flyfrontier.com/travel-information/baggage/checke...

"Gate Check Fee - any bag brought to the departure gate that exceeds the carry-on dimensions"

electrum··on How Does a Debugger Work?
The Java platform has built in support for debuggers: https://docs.oracle.com/javase/jp/8/technotes/guides/jpda/
electrum··on A peek at the massive scale of AWS
Facebook has released designs for everything from servers and racks to entire data centers as part of the Open Compute Project (which has many more member organizations than just Facebook): http://www.opencompute.org/

A design for network switch hardware and software was recently announced: https://code.facebook.com/posts/681382905244727/introducing-...

electrum··on A peek at the massive scale of AWS
Amazon VPC is far more complex: https://www.youtube.com/watch?v=Zd5hsL-JNY4 (excellent talk from one of the creators of VPC)
electrum··on What's New in C# 6.0 [video]
IntelliJ has code folding that can display things using a less verbose syntax. For example, folding of closures (pre-Java 8):

http://blog.jetbrains.com/idea/2009/03/closure-folding-in-in...

electrum··on Java Functions: Every Java FunctionalInterface You Want
This talk explains why: https://www.youtube.com/watch?v=MLksirK9nnE
electrum··on Osquery: Expose the operating system as a relational database
This uses SQLite virtual tables with a substantial amount of native code, so I imagine getting the existing SQLite JDBC drivers that rely on JNI would be a lot of work. Using a client/server model would probably be easier, though I haven't seen an existing server/driver combo for SQLite.

One idea is to make a PostgreSQL Foreign Data Wrapper (FDW) that would allow using PostgreSQL JDBC (and ODBC) drivers.

electrum··on Osquery: Expose the operating system as a relational database
That is a great idea, but unfortunately triggers are not supported for SQLite virtual tables. You could achieve the same thing by periodically running a query to check for such conditions. This is a common way to build alerting systems.
electrum··on Osquery: Expose the operating system as a relational database
This is built on SQLite virtual tables, so it didn't require writing a new SQL engine (which is a monumental task): http://www.sqlite.org/vtab.html
electrum··on Osquery: Expose the operating system as a relational database
At the end of the day, almost everyone queries those HDFS files with query language using Pig, Hive, Presto, etc.
electrum··on A State of Xen – Chaos Monkey and Cassandra
You handle this by modeling the account as a ledger with immutable entries containing unique identifiers rather than a single mutable balance. The ledger entries are facts. The balance is a derived computation. Only store facts, not derived computations.

(At some point for efficiency reasons you might need to prune the transactions, but this often involves trade-offs like not allowing any new "lost" transactions older than date X.)

electrum··on InfiniDB goes out of business
Presto is a fully distributed (MPP) SQL query engine that supports Cassandra: http://prestodb.io/docs/current/connector/cassandra.html

You can even join together data from Hive, Cassandra, MySQL, PostgreSQL, Kafka, etc., all in one query. We don't have a connector for Mongo yet, but contributions are welcome!

The Cassandra connector was actually an external contribution. We don't use it at Facebook.

electrum··on New Requests for Startups
Very cool! This needs Java support and integration with IntelliJ IDEA.
electrum··on Measuring the Impact of the .NET Garbage Collector
Azul's garbage collector is patented and until recently required specialized hardware: http://www.azulsystems.com/products/vega/processor

Recent advances in Intel CPUs have allowed them to run on commodity hardware, but last I looked, it still required a custom kernel module.

electrum··on Making MySQL Better at GitHub
Facebook, Google, LinkedIn, and Twitter making MySQL better: http://webscalesql.org/
electrum··on Dyad: Minimal, portable async networking library for C
Using async to avoid race conditions due to multiple threads was great 15-20 years ago when single CPU machines ruled, but now you need multiple threads or processes for concurrency. Using multiple processes is usually not an option due to lack of any shared state (and if you're trying to share state across processes you should probably just use threads).
electrum··on Dyad: Minimal, portable async networking library for C
I sent patches in for curl about 10 years ago to switch from select to poll to get around the 1024 FD limit (which was a problem for multi-threaded servers that handled many sockets).
electrum··on Announcing UberPool
Put another way, that is two city blocks, which is a very reasonable distance to walk after finding parking in any major city.
electrum··on StackOverflow Update: 560M Pageviews a Month, 25 Servers
The generated Java code is just bad. You can simplify it by adding imports and removing the redundant variable: https://gist.github.com/electrum/d2f7668f2a7eb95420a9

Of course, as others have mentioned, it is validating the UTF-8 but the Go version is not.

electrum··on How Google Map Hackers Can Destroy a Business at Will
Do you have any examples of awesome restaurants that have poor ratings on Yelp? Assuming a sufficient number of reviews, Yelp ratings are at least "directionally accurate". In my experience, a place with four stars is decent and two stars is poor.

Many Asian restaurants in the Bay Area that I like are 3 or 3.5 stars, though many others with that rating are mediocre. But on the low or high end, it seems very accurate.

← PreviousPage 6 of 9Next →