HNHacker News
TopNewBestAskShowJobs

Johnny_Brahms

1,077 karma · joined November 11, 2014

submissionscomments
Johnny_Brahms··on Restic Cryptography
GCM is hard to implement. If I were to use one AEAD scheme that I would have to implement myself, I would definitely not use GCM.

I whatever I was developing was open source (any project under an OSI-approved license gets a patent grant), I would use OCB mode, which is not only quite easy to get right, but also friggin fast.

But hey: Don't trust me. Trust Matthew D Green:

> GCM. Galois Counter Mode has quietly become the most popular AE(AD) mode in the field today, despite the fact that everyone hates it. The popularity is due in part to the fact that GCM is extremely fast, but mostly it’s because the mode is patent-free. GCM is ‘on-line’ and can be parallelized, and (best): recent versions of OpenSSL and Crypto++ provide good implementations, mostly because it’s now supported as a TLS ciphersuite. As a side benefit, GCM will occasionally visit your house and fix broken appliances.

> Given all these great features, you might ask: why does everyone hate GCM? In truth, the only people who hate GCM are those who’ve had to implement it. You see, GCM is CTR mode encryption with the addition of a Carter-Wegman MAC set in a Galois field. If you just went ‘sfjshhuh?’, you now understand what I’m talking about. Implementing GCM is a hassle in a way that most other AEADs are not. But if you have someone else’s implementation — say OpenSSL’s — it’s a perfectly lovely mode.

-- Matthew D Green [1]

[1]: https://blog.cryptographyengineering.com/2012/05/19/how-to-c...

Johnny_Brahms··on Efficient Immutable Collections [pdf]
If asymptotic performance was everything, we would all be using Fibonacci heaps.

In reality other things matter.

Johnny_Brahms··on Lazarus – A Delphi-compatible cross-platform IDE
I work with a multi-mloc application in fpc. We have migrated the code over many compiler versions with hardly any issues at all.

With every update they post a list of things breaks compatibility, and if you are affected, the refactoring tools are almost always enough.

We had two tries at a full recompile migrating from 2.6.something to 3.0.2, and passed all tests within 13 hours of starting the process. (some of the larger stuff were however already fixed since we keep a close eye on the development).

Johnny_Brahms··on Lazarus – A Delphi-compatible cross-platform IDE
As someone who maintains a multi-MLOC application in fpc (using emacs and lazarus): discipline.

You don't grow an application to that size by simply building on what might be suitable for a 30kloc application. It requires discipline, experience, trial and error and ability to invest time in properly maintaining the codebase.

Disciplined code review by people very familiar with the codebase is vital.

Johnny_Brahms··on JavaScript for People Who Hate JavaScript
I don't think so. To survive web development I have just accepted that I am standing on one toe on a ship of abstractions upon abstractions trying my best not to fall off.
Johnny_Brahms··on JavaScript for People Who Hate JavaScript
I get to write our internal web apps in seaside (Smalltalk framework. It's awesome in ways most people can't even imagine) and let colleagues that actually like web development fix any serious UI issues.

Web development can be a bliss.

Johnny_Brahms··on Why you should not use Tcl (1994)
The only hoops I can see there is the regular caveats that apply to all parallel programming (don't introduce deadlocks, be careful: other threads might mutate the data you are currently using).

That applies only if you are executing guile code in parallel in the same interpreter and environment (or asynchronously accessing interpreter data) which is impossible in insert_other_embeddable_language_here.

You don't have to use embedded guile like that.

From my experience: if you want to embed a language and only need it in a single thread, it is just as easy to use lua. If you want several interpreters in isolated threads without any communication Lua is easily the simplest solution.

But if you need communication between multiple embedded language threads or interpreters you are better of with guile or TCL depending on what threading model you prefer.

Johnny_Brahms··on Why you should not use Tcl (1994)
Guile doesn't. You'd use one interpreter and isolate whatever you need to isolate in it's own module and if you need things in parallel, you can just use pthreads (guile has proper threading support and no GIL).

If you don't cross the C barrier again from your scheme code you can even use something like guile-fibers for Concurrent ML-like parallelism.

Johnny_Brahms··on Why you should not use Tcl (1994)
Not really. TCL didn't allow you to use one interpreter over several threads four years ago, and iirc TCL still isn't thread safe in that regard.

Guile does this with bravura.

Johnny_Brahms··on Why you should not use Tcl (1994)
Sadly it is probably your only choice if you want a multithreaded extension language playing nice with a multithreaded main application. For all other extension languages I know, this is a huge hack that never works well in practice.
Johnny_Brahms··on How to Design Programs, Second Edition
Why is this surprising? Linked lists are easily extendable, whereas strings are fixed size...
Johnny_Brahms··on The Development of Chez Scheme (2006) [pdf]
The github repo is called racket7: www.github.com/racket/racket7

First and foremost it will mean that much more of racket will be written in racket, and some in r6rs scheme.

If they can capitalize on chez's preformance that would be even better. It is really a state of the art compiler for GCd dynamic languages.

Johnny_Brahms··on Are We Experimenting on Our Children with Soy Formula?
The only reason I read about nutrition in general (and I can't say I am very knowledgeable about all possible effects of isaflavones) was that I was being constantly told by friends and family that I was going to die of whatever they imagined vegans died of.

On BPA: I just found my son half devouring a receipt, so yeah: hormonally disturbing parent of the year!

Johnny_Brahms··on Are We Experimenting on Our Children with Soy Formula?
Veganism as a means for eating disorders is pretty well known, but that is 1. A symptom of someone's sickly obsession with food and 2. Not really what I was talking about. Eating disorders by proxy would really be child abuse.

I have seen smart people go vegan and only eat salads with some occasional tofu and then conclude it isn't possible to be vegan since that apparently means "live off 500kcal/day".

Johnny_Brahms··on Are We Experimenting on Our Children with Soy Formula?
They are similar to estrogen,but not as biologically active. If they bind to hormone receptors, they are just as likely to block biologically more active estrogens. Whether they make your estrogen levels higher or lower depends on how high activity you had in the first place.
Johnny_Brahms··on Are We Experimenting on Our Children with Soy Formula?
Those vegans are the very few you read about in newspapers every 3 years. They became began for health reasons and take it to the extreme, and somehow manage to convince themselves that even breast milk is bad.

Nobody has actually met someone like that,yet they are the ones people think of when they hear the words vegan and parent in the same sentence.

On soy: depending on you estrogen levels soy can heighten you estrogen activity if it is low,or lower it if it is high due to the isoflavones (phytoestrogens) it contains.

Cows milk will definitely heighten your estrogen activity,even though most of those hormones doesn't survive the environments in our stomachs,because that estrogen is highly active even in humans.

Johnny_Brahms··on Impossible Foods has raised $75M for its plant-based burgers
One problem is of course that few places are good enough carbon sinks to make grass fed beef even close to co2 neutral.

A better idea would be less regular manure and more humanure.

Johnny_Brahms··on Why I Choose Delphi
I would love to try, but I am only seeing oportunities atm. When I think reasonably about it I know that it is a bad idea.

OTOH: We are now at a position where I am pretty sure we are a perfect fit for Greenspun's tenth rule.

The amount of time we spent to make a large part of our code stateless is mind-boggling. We now have the luxury of being able to copy the state of almost 100% of the user-facing stuff and send it back home for us to test. That would have been so much easier with something like Allegro CL.

I have actually implemented a pretty neat macro system in guile scheme that I am in the process of cleaning up for an open source release. We write parethesised, prefix pascal for our macros that gets expanded to regular pascal (easy for most algol-like languages). Having a proper macro system made it possible to remove _a lot_ of boilerplate, even though we primarily use it to generate code that the compiler can optimize easier.

Johnny_Brahms··on Why I Choose Delphi
Journal-system and everything what that means for medium-to-large health care providers.
Johnny_Brahms··on Why I Choose Delphi
As someone who maintains an unknown but very large(several MLOC) free Pascal code base, I must say that I can't see much reason in the Pascal hate.

Sure, I would love to rewrite the whole thing in Lisp (which is the language that lets me keep my soul), but we are all in all still very happy with the current code base.

A complete recompile is less than 20 minutes, and then about half that time is spent in guile for macro expansion (we have a macro DSL). We have considered porting it to chez scheme, but we rarely do full recompiles.

Pascal lends itself well to big codebase, but will probably never again be a new cool thing. I do however believe that being able to test a big change on a Dev machine in less than 10s gives us a pretty big advantage over similar solutions in other languages.

Johnny_Brahms··on The scientific reason you don’t like LED bulbs – and the simple way to fix them
I have a different experience. Osrams dont flicker (measured using the cheapo way: deferent types of cameras), whereas Philips LEDs do.

But otoh the osram ones have all failed or started blinking due to what I think is over heating.

Johnny_Brahms··on Ask HN: Have you regretted making something open-source?
I have regretted my choice of licences, so now I only go copyleft. That has allowed me to monetize some small libraries with a pretty specific use case. Some companies wont use code they haven't got an invoice for.
Johnny_Brahms··on Ask HN: What programming blogs do you follow?
I second Andy wingo's wingolog.org . By far the blog that has helped me the most in bridging academia and practical implementation (to be fair though, I have been working a lot with cml and delimited continuations lately, which has been a big theme the last years).
Johnny_Brahms··on Ligatures in programming fonts
Well, typography is often about readability. Removing the word boundary in compound nouns isn't really helpful since it removes a boundary that conveys meaning.

There were some examples of nouns where you should avoid ligatures in the TeX docs iirc. Shelfful and selffullfilling are the only ones I remember.

In German (every single fff on any page that bothers to set their own fancy-pants font) and swedish text you see it all the time, often coming from self-proclaimed typesetting/font nerds.

Johnny_Brahms··on How do I know if I'm good at programming?
I don't know if I agree. I have friends that can smash out amazing code in very little time.

Looking through some repositories of programs I like, some of them were prototyped in very little time, but with a surprisingly excellent first revision.

I had the pleasure to work with Zed Shaw quite some time ago, and even though his code might not be perfect, he writes a lot better code than the vast majority, in a lot less time.

Johnny_Brahms··on The idiot's guide to special variables and lexical closures (2003) [pdf]
Mostly in North America. I recall my old prof(french dude, this was probably at inria) saying something "and then this young American man that had made quite a name for himself overseas came to the uni. He was shocked to hear we were using lexical scoping. We were equally shocked to hear that we had been so Wrong the last couple of years. Turns out he held the same beliefs we had had a couple of years prior. They apparently were standard at American unis".

In my mind I hope that American man was Olin Shivers, who has written about how he came to France and learnt how lexical scoping was faster, but I don't know the year when any of these events happened.

Johnny_Brahms··on Eschewing Zshell for Emacs Shell
Now, I do enjoy wobbly windows as much as the other guy, but apart from that I probably wouldn't be less productive booting directly into Emacs.

I am already doing email, file management, word processing, note taking, chat and programming in it, and while working the only other applications I use is a shell.

Getting used to doing that in Emacs as well probably wouldn't be much trouble.

At least not apart from the odd cat gifv sent to me by my colleagues.

Johnny_Brahms··on Eating Clean is Useless
First of all, this is discussion about people eating too many calories from bad food. Bananas probably beat most of the snacks otherwise discussed.

And protein deficiency? A 70kg male needs something like 55g of protein (WHO figures) unless they exercise. You are not going to go below that unless you fill a substantial chunk of your calorie intake by eating pure fat.

I eat a plant based diet and weigh about 67kg. On 2500kcal I get about 95-110g of protein, and that is without trying. Had I been a meat/milk eater, this number would have been higher.

Protein intake is generally a problems if you are either starving or very serious about building LOTS ofta muscle.

Johnny_Brahms··on Scheme Programming Lessons from Tarot
We get it. Y'all don't like the parens and long function names.

Yet 98% (prior knowledge pulled out of my posterior) of lisp haters never spent more than zero seconds actually trying to figure it out.

Johnny_Brahms··on Data Science: Performance of Python vs. Pandas vs. Numpy
We use stupid, simple maths problems (like project Euler 1-30) when hiring for junior positions.

We are not looking for someone to do the maths tricks that lets you solve most of the problems with pen and paper, but for someone that recognizes a 100x speed increase using memoization.

You'd think people with some programming experience would be able to reason about how to speed up a simple brute force approach, but those parts of the hiring process usually weed out 75%, and I don't expect someone to give me a perfect solution. Heck, not even a working piece of code. Just being able to say "hmm, we could maybe cut half of the computation by just using the relevant parts of the alphabet" is all I want.

Then we have people like my colleague that just wrote print(103) which was the correct answer. (He could also give several fast approaches to solving the problem, one which we hadn't thought about before).

← PreviousPage 2 of 13Next →