HNHacker News
TopNewBestAskShowJobs

lcampbell

324 karma · joined November 16, 2011

submissionscomments
lcampbell··on Adobe hack: At least 38 million accounts breached
For Photoshop, at least, I suspect most of their cool image manipulation tech is patent protected, and that they've got a legal team rigorously enforcing those patents.
lcampbell··on Which modern databases support ACID transactions?
Those docs look like they're MySQL docs, not Oracle Database docs. Stackoverflow suggests[1] that as-of Oracle Database 11g Release 2, DDL changes are isolated within the current transaction.

--

[1] http://stackoverflow.com/questions/4692690/is-it-possible-to...

lcampbell··on Which modern databases support ACID transactions?
> MySQL provides ACID transactions on a single machine

That made me chortle. If you can't roll back an `ALTER TABLE` command (e.g., to back out of a failed schema migration), you don't really have good ACID semantics. Here's a list of other fun MySQL commands that sidestep transactions: http://dev.mysql.com/doc/refman/5.5/en/implicit-commit.html

lcampbell··on Discoveries Ten Years Later in Zelda Speedrun
This run doesn't even use the latest tech (or he might intentionally be playing a slower-but-safer route to facilitate commentary); I think he shaved another three minutes off by --

* tightening up the run to the village (by supersliding sooner)

* not needing to die on Gohma (you can glitch through the dungeon door that closes)

* skipping the tower collapse entirely (by falling through the map, which he discusses briefly as "impossible for a human to do" in the parent's video).

Here's a link to his best run ever: http://zeldaspeedruns.com/speedruns/4514

lcampbell··on A Billion Rows per Second: Metaprogramming Python for Big Data [video]
From my understanding of the video, the queries are generated by the analysts via a frontend-generated or hand-written SQL query. The SQL query is parsed by PostgreSQL which forwards it via FDW[1] to Multicorn[2]. Their custom data storage and processing backend implements the API expected by Multicorn (e.g., you implement the multicorn.ForeignDataWrapper interface); this is where they transform from the parsed, serialized SQL into their custom DSL (the metaprogramming bit) which compiles to LLVM.

--

[1] http://wiki.postgresql.org/wiki/Foreign_data_wrappers

[2] http://multicorn.org/

lcampbell··on FreeBSD 10′s New Technologies and Features
I've always been a fan of

    make config-recursive && make install clean
which runs `make config` on the package and all dependencies before installing. It's the best of both worlds IMO -- the port will build unattended and you still have a chance up-front to skim the available options for things you need.
lcampbell··on FreeBSD 10.0 Alpha 1 now available
The What's New for FreeBSD 10 wiki page[1] linked in the reply has more details (though it doesn't necessarily indicate what will make the cut). The interesting bits to me are the merging of VPS support[2] which, last I read was a patchset against the 7 or 8 kernel. The seamless migration of virtualized envs seemed like a pipe dream at the time, I can't wait to play around with it (if it makes the cut).

Not to mention virtio support and bhyve[3] (in addition to the old jail subsystem). If everything makes it in, there will be so many different options for service isolation!

--

[1] https://wiki.freebsd.org/WhatsNew/FreeBSD10

[2] http://7he.at/freebsd/vps/

[3] https://wiki.freebsd.org/action/show/bhyve?action=show&redir...

lcampbell··on Court: Federal Law Allows Lying in TSA-Related FOIA Requests
I'm completely oblivious to non-US law, but I think, in general, you cannot both have your cake and eat it. As far as I can see it, there are two choices:

* Publish the standards and practices of the government. Lawbreakers know what to avoid, ala Denmark.

* Keep the S&P secret. The law-abiding populace has no say in the rule of law, ala the US.

I'd love if there was some middle ground here, but I think there is none. In direct response to your question, it could be argued that the US's actions (specifically, the interception and storage of telecommuniques by government entities) have been completely in accordance with the law, though I won't be the one to make the argument.

lcampbell··on Court: Federal Law Allows Lying in TSA-Related FOIA Requests
Yes! What would you do? Cut a great road through the law to get after the Devil?
lcampbell··on In emergency cases a passenger was selected and thrown out of the plane (2004)
This works for an overcommitted load, but the parent talks about a leak. In this case, you'll eventually exhaust swap.
lcampbell··on Google blocks Chromecast app that let you stream your own videos
Yes, but DIAL requires a centralized registry of whitelisted apps (and they're using their own registry for ChromeCast, not the dial-multiscreen.com one); my reading is that Google is un-whitelisting any apps that allow streaming of local media.

Honestly, it's really silly since the built-in Chrome casting webapp is basically "throw arbitrary content at the screen via WebRTC" -- so hypothetically you could write a local WebRTC client that pushed your local video content to the device (and sidestep any whitelist restrictions). Unfortunately, WebRTC looks like a needlessly complicated protocol to implement.

lcampbell··on A Week with Mozilla's Rust
This is roughly what cgo does, but cgo AFAIK (at least, in 1.0.3 in earlier) does not fully comprehend C preprocessor macros, which are used all over the place in some libraries to define both functions and structs, largely for compatibility reasons. Taking a random example, OpenSSL's EVP_CIPHER_CTX_block_size is a macro that simply returns an internal struct field; to call it from Go, it needs to be explicitly wrapped into a C function. I presume this is because cgo can't infer the signature.

For other things, like some of the constants ncurses defines, it's much less clear what's going on (specifically, I had a hard time with any macro defined with the NCURSES_ACS macro, though that was pre-Go1 -- I believe cgo can now use these macros directly).

There's an additional impedance mismatch when the C headers use macros for conditional compilation (for, e.g., cipher suites that can be optionally compiled out), but it's not a worry if you either are conservative with the functionality you use, or control the packages installed on a system.

I haven't had a chance to play with Rust yet, but since it uses C linkage directly for it's FFI layer, I suspect these problems are less easily addressable.

lcampbell··on Using C Dynamic Libraries In Go Programs
Another option for this particular example would have been to use pre-existing ncurses bindings, e.g., https://github.com/tncardoso/gocurses which somewhat simplifies things.
lcampbell··on US and UK at odds over security tactics
> Or perhaps sue the harddrives for some crime.

For those not in the know, in the US this is actually a valid legal avenue for asset forfeiture. The term is "in rem jurisdiction". IANAL, and I wonder exactly what defense there is against all of one's hardware being sued (since my impression is that the owner lacks standing).

Wikipedia: http://en.wikipedia.org/wiki/In_rem_jurisdiction

lcampbell··on Meet the NASA scientist devising a starship warp drive
I don't understand physics to any degree, but I was under the assumption that EM fields also warped space (albeit orders of magnitude less). I found some explanations that are way above my head on Quora:

[1] http://www.quora.com/Physics/Can-a-large-energy-field-other-...

[2] http://www.quora.com/Physics/Can-a-large-energy-field-other-...

The second seems to suggest that energy fields, in general, do warp space.

lcampbell··on Why I should have written ZeroMQ in C, not C++ (2012)
To extend that, I don't understand his issue with discarding destructor errors -- most errors I can think of during resource release are mundane (e.g., close(2) returning ECONNRESET) and can safely be ignored. Why not just have `int term();`, which returns the mundane errors, be optional and automatically called from the destructor?

Are there any non-mundane error states that would occur during a stack unwind that you can't safely ignore?

lcampbell··on Groupcache: an alternative to memcached, written in Go
> How do you set an item's TTL?

Values stored are immutable, and expire when they are no longer used. There is no concept of a TTL.

> How do you set the maximum size of the process's cache?

The cache is broken into a set of named groups, each with their own separate cache and cache-filling method. The size of each group's cache is set when created via NewGroup[1].

--

[1] http://godoc.org/github.com/golang/groupcache#NewGroup

lcampbell··on The NSA Admits It Analyzes More People's Data Than Previously Revealed
Not to mention "collection" seems to be used to describe the act of an analyst using the data, not storing it for future use[1]. I interpreted this quote as, "We are not currently using geolocation data, just storing it for future use".

--

[1] Based off Clapper's explanation, "To me, collection of a U.S. person's data would mean taking the books off the shelf, opening it up and reading it"[2]

[2] http://abcnews.go.com/Politics/intel-dir-james-clapper-lie-c... (couldn't find a better source).

lcampbell··on GameBoy Advance emulator for iOS, no jailbreak required
The GBA doesn't have a BIOS; you're thinking of ROMs (effectively, the cartridge contents dumped to a file). ROMs are covered by copyright, and are indeed illegal to distribute without authorized consent (which Nintendo would never give). However, there are homebrew ROMs you can legally download and distribute. No emulator I know of, including this one, illegally ships with (or describes how to illegally obtain) copyright-protected ROMs.
lcampbell··on Sen. Wyden imagines the White House is willing to reconsider surveillance
That sounds more like tax evasion, using business bad debts[1]: the rug store is owned by a parent corporation from whom the property is leased (and/or which provides other goods/services, like the rugs themselves). A rate is charged in excess of the store's profit such that the store is in debt to the parent corp when the store goes out of business. The parent corporation makes off with the profits, offset by the tax break from dissolving the partner's debts.

Then again, I have no idea how taxes work and can't help but view everything pessimistically :(

--

[1] http://www.irs.gov/publications/p535/ch10.html

lcampbell··on Why is nobody using SSL client certificates?
My understanding is that the private key is on a CAC card[1,2], which is issued to all DoD employees and contractors who need access to DoD resources. Readers are usually built into the keyboard, and I'm guessing that there's something similar to ssh-agent running to maintain the key until you're AFK.

--

[1] http://en.wikipedia.org/wiki/Common_Access_Card

[2] http://www.cac.mil/

lcampbell··on An open MySQL bug receives a real Birthday cake
Well, I just took 10 minutes to write an ad-hoc parser that will probably fix the bug (it works around the tricky test cases in the thread)[1]. I don't really understand why they want to move stuff onto the server-side, there may be some other trickery I'm missing.

Please feel free to use as-is and integrate it into mysqldump. I can't be bothered to create an account on bugs.mysql.com.

--

[1] http://pastie.org/8092330 (EDIT: The parser wasn't fully correct, use [2])

[2] http://pastie.org/8092403

lcampbell··on MegaPipe: A New Programming Interface for Scalable Network I/O
For static file serving, Nginx can bypass BSD socket overhead with the sendfile (or sendfile-like) syscall, though it is disabled by default. On FreeBSD, the sendfile syscall accepts not only the fd to pipe, but can additionally be passed a header/footer such that you don't need to call write(2) at all, though this is not true on either Linux or Windows (AFAIK).

The whitepaper's macrobenchmarks make no mention of sendfile; I presume their tests with Nginx run without sendfile enabled (since it would defeat the point of the benchmark by nature of it skipping all of the write(2) calls). The paper does not appear to detail the configuration used in their benchmarks. I believe that the performance benefit of Nginx+MegaPipe, when compared to an Nginx server configured to use sendfile, is much, much less than +75% throughput.

That said, sendfile has very narrow uses (it's effectively only for sending static files) -- I wish the paper benchmarked Nginx against Nginx+MegaPipe as a reverse proxy rather than a static file server.

lcampbell··on Indie game Haunts unable to compile its Go code
> Can someone from Go comment on the ability to create and manage trusted repositories?

You basically just need to throw up a HTTP-accessible HTML page with some <meta> tags that describe how to fetch the actual code with a variety of source control systems. Anyone can create their own trusted repositories.

[docs] http://golang.org/cmd/go/#hdr-Remote_import_path_syntax

lcampbell··on Security incident update
Here's the writeup from seclists.org: http://seclists.org/nmap-dev/2013/q2/3

It looks like seclists.org and nmap.org are hosted on different IP addresses, but both route to linode, and both have the same WHOIS information, so I think it's safe to say the writeup applies to both.

lcampbell··on I Tried Hacking Bitcoin and I Failed
> the computations needed to keep and confirm transactions

AFAIK, that's effectively what mining is. From my understanding, transactions exist in a limbo state (where they're relayed around the bitcoin network) until they're included in a mined block and become part of the blockchain. A "mined block" is basically just a list of transactions (including a coinbase transaction, which is the new bitcoins), the merkel root of the previous blocks, and some other data such that the hash of the entire thing is suitable, as determined by the network difficulty. Thus, mining and confirming transactions are effectively one and the same.

Sorry for the poor (and possibly incorrect) explanation, I'm still wrapping my head around it too.

lcampbell··on [dead]
The FreeBSD version is building up an iovec (which is effectively an array of (pointer, length) tuples) to pass to writev. I believe this is done for two reasons --

1) It reduces the number of syscalls -- a single call to writev outputs everything, rather than multiple fputs calls which may or may not be buffered (I haven't checked the impl details of fputs).

2) It reduces the number of allocations. Since an iovec is just an array of pointers, we can reused the data passed in via argv; the length of the iovec is capped at argc, so we can get away with one allocation without scanning the input.

For a comparison, here's a brief overview of each of the implementations (assuming fprint/fputs is not buffered):

* Unix V5: 0 allocations, N syscalls, no argv scan

* OpenBSD: 0 allocations, N syscalls, no argv scan

* Plan 9: 1 allocation, 1 syscall, scans argv

* FreeBSD: 1 allocation, 1 syscall, no argv scan

* GNU (without -e): 0 allocations, N syscalls, no argv scan

"argv scan" basically means calling strlen on every passed argument, or otherwise iterating over them. Naturally, "which one is faster" depends on how fast your allocations/syscalls/strlen's are, and how fprint/fputs is buffered.

lcampbell··on How to implement HTTPS in an insufficient manner
SNI has the added merit of working on practically everything these days.
lcampbell··on Doctor Who-Style Wi-Fi With Sentient Captive Portal
> OSX tries to automatically detect if there is a captive portal login screen, like those commonly used by coffee shops and such, and open up a web page to allow the user to log in, we’re taking advantage of that by instead loading a web page which will upload the user’s soul.

iOS does this as well. It's an absolutely terrifying thought when coupled with one of the old safari-based jailbreaks. Thankfully, it can be turned off in the settings.

The internet is a scary place.

lcampbell··on Pinode: Raspberry Pi in the Cloud
Despite the fact that the OP is in jest, I found myself wondering the same. The best we could come up with at the office was to get some SDHC cards that are hardware read-only lockable (the spec says they exist [1], but I wasn't able to find any to purchase). On these SDHC cards, you stick a PXE-like implementation that allows it to pull a disk image off another machine in the DC, install it to an attached USB drive, then chainboot to that disk.

This setup would allow customers to upload an image which is effectively burned and attached to the hardware during an automated provisioning process. When the node is powered down, the USB drive is wiped by the next provisioning.

The customer is expected to set up the image so that it provides ssh (or what have you) on boot. Since the failure state of, say, a kernel panic in this setup is complete data loss, there's no need for KVM or anything.

It probably wouldn't be a very competitive service, but as mentioned elsewhere, for $5/month most applications are likely better off with a VPS anyway.

--

[1] http://superuser.com/questions/354473/is-the-lock-mechanism-...

← PreviousPage 3 of 4Next →