HNHacker News
TopNewBestAskShowJobs

BreakfastB0b

469 karma · joined September 14, 2017

submissionscomments
BreakfastB0b··on Texas requires ‘In God We Trust’ signs in schools. A man wants some in Arabic
We don’t do anything like this in Australia. I can’t imagine being forced every morning to pledge something you’re not old enough to understand.
BreakfastB0b··on Developers who quit the industry. Why? And what do you do now?
Sorry for context I live in Australia and the OP said he’s from the UK. Both places have Universal Health care so “full time benefits” are not really a thing here. I just started responding to recruiters that I was only interested in contract work 20-30 hours a week and increased my hourly rate by 30% to compensate for no paid leave / superannuation contributions.
BreakfastB0b··on Developers who quit the industry. Why? And what do you do now?
Try working as a “contractor” on less than full time hours. Say 3-4 days a week. I made the switch 2 years ago and will never go back to full time. I hadn’t worked on a side project for years prior, now I feel like I have enough energy to work on things I want to, hopefully something will become self sustaining in a few years and I can become self employed.
BreakfastB0b··on Some notes on DynamoDB 2022 paper
Yeah I have no idea what icedchai is talking about, DynamoDB free tier is super generous https://aws.amazon.com/dynamodb/pricing/on-demand/. It's going to cost you nothing until you have enough customers to afford to pay for it. Correctly modelling single table design on the other hand ...
BreakfastB0b··on Formally Verifying Rust's Opaque Types
Thanks for the feedback, I should have spent more time connecting the logic statement to the equivalent rust syntax as you’re right the post has a weird audience problem otherwise. You either already know logic well enough that the proof is trivial, or it doesn’t make any sense.
BreakfastB0b··on Formally Verifying Rust's Opaque Types
Yeah that makes sense, thanks for explaining.

I don't want to make it seem like I'm proving anything novel here, the proof I work through is definitely pretty basic as far as proofs go. It's written somewhat narratively because it reflects a train of thought I went through a few days ago when reading about existential types in Rust. Seeing the theorem ((∃ x. P(x)) → Q) ⇔ (∀ x. (P(x) → Q)) in the blog post made me want see if I still remembered enough Coq to prove it, and then when I was sitting down this morning to write something I thought it would make a good blog post as it explores some deep cuts of what I've been learning in Rust and might make a good introduction for people into Coq. I'll definitely take it on the chin that I titled the blog too ambitiously however and I'll be more modest with my titles in the future.

BreakfastB0b··on Formally Verifying Rust's Opaque Types
I’m not sure I understand the connection to dependent types, would you be able to elaborate?
BreakfastB0b··on Formally Verifying Rust's Opaque Types
That’s totally fair, it does make it sounds like I’m verifying the compiler’s implementation of it. However it is proving that making such a transformation between the two styles of static dispatch is always sound.

What would you have titled the blog instead to be less misleading?

BreakfastB0b··on Formally Verifying Rust's Opaque Types
Absolutely! Every time I think there's a boring area of Computer Science when I read more deeply into it, it turns out to be amazing. Even something which I hated in University like Complexity Analysis turned out to be utterly fascinating after I read Scott Aaronson's "Quantum Computing Since Democritus". It has such deep and interesting connections to ontology, epistemology , and physics. So much to learn, so little time. Gotta keep that story point velocity up!
BreakfastB0b··on Formally Verifying Rust's Opaque Types
I didn't mean to imply that people should be using Coq or another proof assistant in their development workflow. More that understanding formal verification aids in thinking about typed programs.

However no type system of a Turing complete programming language can ever be truly trusted as a proof system because looping forever or other non-termination can be used to prove any proposition.

  const proveAnything = <A>(): A => proveAnything()
The above function can prove any proposition including 1 == 2, by just recursing forever.

However, take Rust's ownership system for example, it uses a type system that corresponds to a kind of logic called a sub-structural logic that denies one of the axioms of typical classical logic systems, namely, the weakening axiom, e.g. a function of the type

  fn <A>(a: A) -> (A, A) { ... }
is not possible to write in Rust, but easily writable in most other programming languages. Because of this, Rust is able to "prove" that the program is free from data races which is pretty cool if you ask me.
BreakfastB0b··on Formally Verifying Rust's Opaque Types
Author here. Glad you liked it! I’ve had a real fear of writing since High School and so starting this blog is my attempt to work through it.

It’s a shame that more engineers don’t have the time or interest to learn formal verification because it’s really enjoyable once you get the hang of it. Although it rarely directly comes up at work, I think it gives a good framework for thinking in strongly types languages with advanced type systems like Rust, Typescript, or Haskell.

BreakfastB0b··on How I went about learning Rust
TIL
BreakfastB0b··on How I went about learning Rust
Minor nitpick but goroutines are absolutely not preemptable, they’re cooperative. The go compiler regularly sticks in yield statements around IO, and certain function calls, but you absolutely can starve the runtime by running a number of goroutines equal to the number of cores doing heavy computation, just like Node.JS’s event loop.
BreakfastB0b··on Why I Don't Like Golang (2016)
It's not great, but I use this pattern to check / enforce interface membership.

  type Bar interface {
     BarMethod(int, int) int
  }

  type Foo struct {}

  // Error: Foo does not implement Bar (missing method BarMethod)
  var _fooImplementsBar Bar = Foo{}
BreakfastB0b··on Go 1.19 Beta 1 is released
Concurrency is a major stumbling block https://eng.uber.com/data-race-patterns-in-go/. Mutexs, conditional variable subtleties, wait groups, null pointer propagation, partial struct initialisations, channel lifetime coordination. tl;dr shared memory concurrency is hard.

The introduction of generics should make it easier to wrap these lower level concurrency primitives into higher level safe constructs without needing code generation or runtime type casting via interface{}.

Most devs also struggle to structure go programs in a way that makes them easily testable, but that’s true in a lot of languages.

BreakfastB0b··on Crimes with Go Generics
How long before someone figures out how to encode lightweight higher kinded types[1] in Golang. There shall be weeping and gnashing of teeth.

[1] https://ybogomolov.me/01-higher-kinded-types/

BreakfastB0b··on Facebook internal memo on Jan 6, with comments from employees
Facebook’s algorithm deliberately amplified this speech to increase profit. I’d say that counts as a kind of editorial discretion which then comes with a moral responsibility for the consequences of that editorialising.

If Facebook wants to be the “town square” of the digital age it should be nationalised and the algorithm should be removed.

BreakfastB0b··on Nixery – Docker images on the fly with Nix
We recently adopted it at my company for managing local dev machines, project environments, and CI. It definitely has some warts, often the best documentation is “read the source code”, but man is it an awesome tool. I’ve switched all of my machines / servers over to it and I’ll never look back.

Now I’m looking at my iPad and iPhone and wishing I could manage them through Nix too.

I’d put it at a comparable difficulty to learn / powerful tool as git. Which given that they’re both based on hash trees makes sense.

BreakfastB0b··on The physicalization of metamathematics and the implications for its foundations
Underrated point. Conservation Laws emerge from symmetries via Noether's theorem. In particular, Conservation of Mass / Energy arises from Time Translation Symmetry. General Relativity doesn't have Time Translation Symmetry because the universe is expanding. Now the question is can we extract free energy from the expansion of spacetime and avoid the heat death of the universe?
BreakfastB0b··on The physicalization of metamathematics and the implications for its foundations
Banach–Tarski relies upon the Axiom of Choice / Law of the Excluded Middle. Zermelo–Fraenkel set theory is independent of the Axiom of Choice and there's an entire field of Mathematics called Constructivist Mathematics which avoids including the Axiom of Choice / Law of the Excluded Middle.

I had a hard time grasping why the Axiom of Choice / Law of the Excluded Middle was so problematic until I heard it translated into a Computer Science context.

The Law of The Excluded Middle sounds very reasonable at first. For all propositions P, P ∨ ¬P. i.e. Every proposition is either true or false. Sounds fine right? But when viewed in the context of computer science via the Curry-Howard Isomorphism. A proposition is actually a program, and deciding the truth value of a proposition involves "running" that program. So The Law of the Excluded Middle is actually the Halting Problem! It's really saying that all possible programs terminate and yield true or false, but we know that some programs don't terminate, some propositions aren't true or false, but undecidable.

So circling back around to the Banach-Tarski paradox. I would be very skeptical of any paradoxes resulting from assuming the halting problem doesn't exist!

BreakfastB0b··on The Software Foundations: mathematical underpinnings of reliable software
Yes! Formally verified implementations of Elliptic Curve algorithms http://adam.chlipala.net/theses/andreser_meng.pdf. Amazon has also made use of TLA+ and lightweight formal methods to prove the correctness of their distributed services such as S3 and DynamoDB which arguably underpin a large portion of the internet https://www.amazon.science/publications/how-amazon-web-servi...

The burden of using these extreme approaches is high, but there are definitely circumstances where it is warranted. Think of it as TDD on steroids.

BreakfastB0b··on Two weeks later David Bennett is alive, his pig’s heart beating soundly
Human Bacon, the final frontier. How long until you can buy Beyond Human burgers?
BreakfastB0b··on Three Minor Features in Go 1.18
I think I miscommunicated what I meant, there was an implicit assumption that copying value types over channels was bad due to GC overhead. Efficient Immutable data structures let you have your cake and eat it too. You can avoid GC overhead by sharing structure but avoid problems with mutation between goroutines.
BreakfastB0b··on Three Minor Features in Go 1.18
This is something I'm hoping will change with the introduction of Generics. Right now using any custom data structures like immutable map or lists are very cumbersome requiring either code generation or runtime type coercion via `interface{}`.

Go espouses "Share by communicating, don't communicate by sharing" i.e. don't let goroutines communicate by mutating shared data, but then doesn't provide any effective immutable data structures to make this easy.

Being able to safely send pointers to immutable maps over channels would make go very nice to work with. Although I'll never use Go outside of work until they remove nullable pointers which seems unlikely.

BreakfastB0b··on No, we didn’t accidentally create a warp bubble
Tell me you didn’t read the article without telling me you didn’t read the article.

The paper uses the Casimir effect to avoid the need for negative mass.

BreakfastB0b··on Propositional logic exercises with the lean theorem prover
It’s probably supposed to be (P & R) <-> (Q & S)
BreakfastB0b··on Spinoza’s God: Einstein believed in it, but what was it?
Very cool! Thanks for the link! Got a lot of reading to do.

However I do wonder if it’ll turn out that these higher dimensional geometric problems turn out to have the same structure as Godel’s proof. That the higher dimensional geometric structure is complex enough to represent their own foundation.

Although now I’m committing the same fallacy I was arguing against i.e. an equivalence between unknowns

BreakfastB0b··on Spinoza’s God: Einstein believed in it, but what was it?
The only ones I’m aware of are. Can you link me some examples? I’d like to read up on it.
BreakfastB0b··on Spinoza’s God: Einstein believed in it, but what was it?
Godel has nothing to do with it. Godel’s Incompleteness is just the math version of the Halting Problem, which is just a fancy version of the classic paradox “This statement is false”. Godel showed that even if you outlaw self referential definitions e.g. “This statement is false”, math is rich enough in complexity to simulate itself and thus end up with self referential paradoxes anyway.

It’s not this mystical thing that people make it out to be online.

BreakfastB0b··on Spinoza’s God: Einstein believed in it, but what was it?
Then why use the word “God” that already comes with so much baggage?
← PreviousPage 2 of 4Next →