HNHacker News
TopNewBestAskShowJobs

DanWaterworth

2,494 karma · joined March 1, 2011

submissionscomments
DanWaterworth··on Passphrases You Can Memorize That Even the NSA Can’t Guess
Reading this, I just thought of another way to make passphrases that might be a bit more memorable. The idea is to come up with a sentence which will be grammatically correct, so it'll be easier to remember.

First, write down 36 words. Roll two dice, take six times the number on the first minus the number on the second plus one. That is the position in the list of the first word in the sentence.

Next, write a new list of 36 words, but only include words that make sense given what is already there. Roll again as before and pick as before. Reusing words between lists is fine, but don't include the same word in the same list multiple times.

Rinse and repeat until you have the desired amount of entropy. Each die thrown adds log_2 6 bits.

Edit, just tried this, 36 is a lot of words to come up with. Much easier to write down 6 at the cost of making it twice as long. Unless you have access to lists of nouns, verbs, etc.

Bored now, but came up with "Countries can slowly sit at my feet", 24 bits of entropy (some lists had 36 words others had 6. It's very low, but, if you did that 2 or 3 times, you'd be getting somewhere). Couldn't be easier to remember.

DanWaterworth··on Is the Mill CPU real? (2014)
I think I remember them saying either in one of the talks or in a comment somewhere (sorry I can't be more specific), that, yes, they do have it working on an FPGA, but since the purpose is only to test the design, it doesn't run anything like impressively fast, because they aren't utilizing the resources efficiently.

EDIT: by resources, I mean, the specialized logic and chunks of RAM that exist inside FPGAs.

Found it: https://groups.google.com/forum/#!topic/comp.arch.fpga/BTojR...

DanWaterworth··on Former Nvidia Dev's Thoughts on Vulkan/Mantle
> You cannot abstract away complexity.

No, you have a selection bias, you don't notice the abstractions that have worked.

DanWaterworth··on C Questions and Answers
> 5 is also missing a check for a NULL pointer. ;)

Not necessarily. It could be up to the caller to ensure that the pointer isn't NULL.

DanWaterworth··on CompCert: A formally verified optimizing C compiler
> The second type of bug (misunderstanding the semantics of the target architecture) is, as far as I know, impossible to avoid. Any verification project can end up with a true proof of the wrong theorem!

Indeed. However, although it's impossible to avoid, you can still take steps to make it less likely.

When you formally verify code, you are showing that a program has a particular specification.

If you want to eliminate errors in your specification, you should aim to make it as simple as possible, so that people with domain knowledge (in this case, people with a correct understanding of PPC) would be able to tell whether your specification is correct.

DanWaterworth··on Superoptimizing Compilers
I don't think this will be as successful as you might hope. Consider how many possible sets of rules there are. Call that n. The instruction sequence will need to encode log2 n bits of data, but you have no ability to tune the representation to say which inputs are likely.

Instructions aren't free, they still need to be loaded from RAM like data.

DanWaterworth··on Sylph: the programming language I want
I'd encourage you to try writing some Haskell. It's a good example of type inference that works.
DanWaterworth··on Sylph: the programming language I want
If you follow the train of this thread, you're now arguing against type inference by sighting an example from the canonical type-inferred language.
DanWaterworth··on Sylph: the programming language I want
Well have the machine annotate the code then.
DanWaterworth··on Sylph: the programming language I want
> a machine can look at how the arguments are used and make some educated guesses. The big problem is that humans have to do the same.

Why? Just get the machine to do it.

It's like when you see programmers doing arithmetic in their heads. "You're sitting in front of a glorified calculator!"

DanWaterworth··on Why to engage into using Automatic Testing
Modern software development has always struck me as trying to optimize the wrong thing. It tries to make change easy, but changing things is never easy. Just throw away your code and start again. If this a lot of effort, its probably doing too much.
DanWaterworth··on How to Make Multicore Chips Faster, More Efficient
4 cores aren't quite the norm. The computer I'm currently at is a Dell XPS 13, the CPU is an i7-4510U, which is dual core. Regardless, in most circumstances, 4 cores are only just above break even point for parallel code, so the pay off isn't big enough.
DanWaterworth··on How to Make Multicore Chips Faster, More Efficient
You're only saying that because most programs are incapable of taking advantage of multiple cores, but if 8 core CPUs were the norm, I guarantee programs (where performance matters) would change.
DanWaterworth··on Stages of learning Go, with code examples
> You probably were sarcastic

I don't know that sarcastic is the correct word, but I certainly wasn't completely serious. Maybe "playfully antagonistic".

I suppose the problem I have here is, if I was designing a language, and composability was a stated goal, then I wouldn't have come up with Go.

> a brilliant article from Rob Pike about using and composing functions to create flexible APIs

I'm sorry, but that API is not something to be proud of.

DanWaterworth··on Stages of learning Go, with code examples
> Phase 4 (the expert): You understand the design choices and motivations behind the language. You grok the philosophy of simplicity and composability.

In what way is Go code composable?

DanWaterworth··on New SSA Back End for the Go Compiler
I found this one helpful: http://wingolog.org/archives/2011/07/12/static-single-assign...
DanWaterworth··on Haskell in Production
Nope, just use trace.
DanWaterworth··on Haskell in Production
I use Haskell a lot. I can't recall ever having to have added IO to a deeply nested expression like this.
DanWaterworth··on Tail-call optimization added to 6to5 compiler
Corecursion doesn't mean what you think it means. You mean mutual recursion.
DanWaterworth··on RethinkDB 1.16: cluster management API, realtime push
So, I am right in reading that there's no automatic failover? Also, when a new master is chosen, do you pick the replica with the most up to date log or do you hand that decision off to the administrator?

Sounds like you need to implement raft. Do you have any plans in that direction?

DanWaterworth··on Firefox Hello
Have you tried using hangouts?
DanWaterworth··on IO Monad Considered Harmful
There are lots of things in Haskell that I miss when I use rust, so I'd still encourage you to learn it. For example, concurrency in rust is OK, certainly nicer than other imperative languages, but Haskell has easily an order of magnitude more awesome to offer.

I recently wrote a library for testing concurrent code. It's basically fuzz testing of scheduler behaviour to root out race conditions. In most languages, you'd need a special compiler or runtime to do this, in Haskell it's a library.

DanWaterworth··on Investigating Higher Quality Software
Formal verification doesn't imply waterfall.
DanWaterworth··on Investigating Higher Quality Software
I didn't say it couldn't; I didn't say anything about formal verification.
DanWaterworth··on Investigating Higher Quality Software
compcert, sel4, etc.
DanWaterworth··on Investigating Higher Quality Software
The non-negotiable part is that there should be tests, regardless of when they were written. Those tests will be the record of truth for future development. They are proof that the proper specification was implemented, regardless of methodology.

I really disagree with this. Asides from the fact that tests can't prove the absence of bugs, it's very easy to write a test suite that avoids the unhandled edge-cases; most people do without thinking about it. Your test suite is the tool you have created to search for bugs and should be written in that adversarial mindset rather than as a certification that you actually did your job.

DanWaterworth··on Scala Actors: Unifying thread-based and event-based programming
If you have problems with contention, you can use a library like this [1], that allows you to perform transactions (with the restriction that you must know the variables you may touch ahead of time) without deadlocking or livelocking.

[1] https://hackage.haskell.org/package/blocking-transactions

DanWaterworth··on Scala Actors: Unifying thread-based and event-based programming
Having used STM in Haskell, actors look like a draconian way to handle shared mutable state.
DanWaterworth··on We have broken HTTP
You might also appreciate: http://en.wikipedia.org/wiki/IPoAC
DanWaterworth··on Monoids, Functors, Applicatives, and Monads: Main Ideas
I've had an idea for a monad tutorial that I think might be quite instructive, but haven't had the motivation yet to write.

In essence, the idea is that you are led through the process of implementing: early exit, nondeterminism, threaded state and coroutines using call/cc in scheme. Then monads are introduced as a way of typing those patterns.

← PreviousPage 7 of 24Next →