HN user

wyufro

50 karma
Posts0
Comments34
View on HN
No posts found.
Constraints in Go 2 years ago

I think "oh this looks like it could be made generic" is the wrong time to convert to generics.

You should convert when you reach the point "I wish I had that code but with this other type". Even then, sometimes interfaces are the right answer, rather than generics.

Only if the salt is kept secret. There also needs to be a different salt value per ip, obviously. But given those conditions, it works.

Of course, it would be just as simple to use the salt as-is, in that case, since you have to look it up anyway.

IMO, while their use cases do overlap, LXC is more geared towards a user installing things while Docker is more geared towards a developer creating a ready to use package.

LXC creates environments, while Docker creates apps, is another way to say it.

In languages with closures it would be easy to set a variable to the lambda while that same variable is also captured by the lambda. In fact, this seems to happen once in a while in Go, since closures are always lambdas.

I believe you're thinking of the AppleDouble files with name ._file. Those haven't really been used for the past 10 years or so (unless you run software older than that, obviously).

Indeed, direnv and asdf integrates, such that PATH is set to the values exposed by your .tool-config. This avoids the asdf shim and makes executing the tools slightly faster. Good when you have to run them over and over in a script.

Before I learnt what it really means I always imagined it as a blowtorch heating things up, which sort of fits the original but obviously has a much wider scope. So maybe GP has the same idea I had.

It was using IPv6 in IP, just like 6to4, protocol 41.

I haven't heard it called a political issue before though. It just had problems, like being blocked in firewalls and security problems where the encapsulated packet wasn't checked properly, etc.

I wrote an Entity-Container system that really could've benefitted from a generic Get function. Instead I had to write on for each entity-type, even though they were the same except for different types.

Most places where the empty's interface is used now could benefit from it. Eg. the json package could state it always uses float64 for numbers (except when you tell it to use Number).

In my experience the hardest part of using parser generators is to have them create understandable errors.

Also it's questionable that they add very much. Parsing text isn't all that difficult. The hard part is to get the tree structure of the AST right.

All in all the parsing is a quite small part of a compiler. I've converted from a parser generated to manual code in two different projects and they actually ended up with less lines of code after the conversion, if just barely.

I think the key thing that makes my microwave easier to use is that it has a big dial to choose the function. No clicking through menus, you just turn the dial to the function you want, then the second dial to adjust the settings, or press start to start and add time.

He really should've told near the end. Anyway, I assume you press the power button, because that is the established standard for microwaves in the last 10 years or so. Probably there might be a timeout and then it starts automatically.

This is indeed something you have to learn though, first time I encountered this kind of microwave it baffled me as well.

I really feel it doesn’t make much sense to generate assembly any longer. It’s much more reasonable to generate IR (for example for llvm). Then you get free optimizations and at least some portability. It’s probably easier as well to not keep track of registers.

Their point, which I agree is fairly unclear, is that the fat is not converted to energy, it's converted to CO₂ and water. That conversion releases energy, which you then use to move, but the total mass of the process is constant (conserved).