HN user

rlonn

846 karma

I eat my peas with honey, I've done it all my life. It makes the peas taste funny, but keeps them on the knife

Posts7
Comments257
View on HN

Seems there actually is a fair amount of research pointing to prohibiting corporal punishment for kids leads to better mental health, lower suicide rate, etc. and it does seem like a no-brainer to me that less violence leads to more stable individuals, and a more stable and happy society in general. In medieval times there was a lot of physical punishment, and society was violent, dangerous and unhappy compared to now. Singapore may be modern in many respects, but in this area, they're a bit of a backwater.

The comment is a bit misguided: the operations Watsi helps perform would not have been possible without for-profit companies and for-profit innovators building the infrastructure of modern medicine. It's not one or the other: both for-profits and non-profits make the world a better place and I think they complement eachother. Sure, there are for-profits that do NOT make the world a better place, just like there are non-profits that fail in their mission to do good things. They just typically fail to do good things for different reasons.

It's interesting that we, as humans, are all so neurotic about sex, and especially about allowing our kids to understand that sex exists, that we rush to outlaw any depictions of it that our kids could potentially see. While at the same time making sure adults are still able to see it, of course. Because everyone knows that when you're 6569 days old, seeing someone have sex will cause life-long scarring, but when you're 6570 days old it doesn't matter anymore.

We also outlaw the depiction of any crimes related to sex, and here we find it easier to justify the ban, but in our haste we clump together actual crimes committed against a real victim, and imaginary crimes such as e.g. a cartoonist drawing a rape scene. In the latter case we close our eyes to the fact that we claim to support something called "freedom of speech" and, in our neurotic hunt to ban things sex-related we trample our principles.

Same goes for e.g. CSA, but in that case in particular, logic and consistency seems to go out the window and principles are sacrificed in the blink of an eye. It makes me a little depressed to see.

As for individual countries trying to enforce their local socio-cultural norms on the rest of the world, that is of course equally silly. The US is great in many ways, but introspection and ability to follow principles is sometimes lacking for sure.

I wouldn't be surprised if our sexual neurosis is what makes an AGI finally decide that we're not competent to captain the ship anymore.

Cool, I didn't see this tool before. I have tried most open source load testing tools out there, as part of writing a couple of review articles on them (https://grafana.com/blog/2020/03/03/open-source-load-testing...) and my gut reaction is this one looks like a Golang alternative to Wrk (https://github.com/wg/wrk) in that its main feature is speed. I'd bet Wrk still blows it out of the water though - in my testing, no other tool got anywhere close to Wrk's level of performance. Still, if you need scale and want to hammer a single URL with a very large number of requests/second and prefer a Go application (Wrk is written in C) it may be a good alternative.

Nope, there is no restriction for plus addresses. I validate email addresses and specifically allow + and . in the part before the @ sign. myemail+1@mydomain.com and myemail+2@mydomain.com will be considered two different users.

Have to add also that the "plus feature" isn't a Gmail-specific invention but a standardized way of referring to the same mailbox using different addresses. But some email providers don't support this feature, and many input validators out on the Internet don't either.

Fun topic! These days I build everything for myself, then publish and see if someone else is interested (mostly not :-)

First thing I built, when I started doing full-stack stuff: https://pushdata.io It's a super simple time series data storage. You don't even have to register an account, just do "curl -X POST https://pushdata.io/youremail@yourdomain.com/temperature/47" and you've stored your first value. I use it a lot to log various stats about all the things I've built, like user signups or whatnot.

Then I wanted to create simple crosswords with image clues to help my kids learn to read. That resulted in a crossword generator backend and a simple game: https://puzzlepirate.net

Puzzle pirate is great, but I wanted to print the crosswords on paper also, so I slapped together https://crosswordcomputer.com. The UI is rather ugly (like Pushdata) but you can create pretty cool crosswords for kids with it.

Then I wanted to create more flexible shields.io so I created https://supershields.io - basically a shields.io but with programmable (in Lua) logic for the shields you create. I'm not using it myself anymore though so not maintaining it very well and it seems there is something funny with the Lua execution right now. It is using AWS Lambda servers to run Lua scripts, perhaps they're not firing as they should or something. If someone wants to use it, get in touch and I'll see if I can get the Lua execution operational again :)

I also wanted to backup private photos and videos from household phones to a USB memory on a local storage server (Raspberry Pi) and then have that server automatically back everything to the public cloud but encrypted (as I don't trust public cloud providers to keep my data safe forever). I couldn't find a good solution for this, so I wrote some shell scripts that do the trick: https://github.com/ragnarlonn/savethepictures

My daughter was playing Minecraft too much, on our own server, and I created a small Python program to enforce "screen time" in Minecraft: https://github.com/ragnarlonn/mctimer

I once needed to simulate broken DHCP clients and couldn't find a good tool to do so, so I wrote "dhcptool": https://github.com/ragnarlonn/dhcptool

All of these taught me a lot, especially the later forays into full-stack development after having been pretty much clueless about frontend stuff for a long time (still clueless but at least I can create ugly UIs now).

The Computer wants you to be happy. If you are not happy, you may be used as reactor shielding. The Computer is crazy. The Computer is happy. The Computer will help you become happy. This will drive you crazy.

That's a good observation. I don't currently do any partitioning and I think I have to read up a bit on exactly how Lambda executes Go functions. If they keep the program state between executions there are probably some cleanup I should be doing. If not, I think I'm safe as script code and everything related to a new script execution gets sent as parameters in the Lambda invocation.

Edit: I'm going to add some cleanup regardless.

You can't use <object>, <iframe> etc tags to embed pictures in your Github README, so you don't get automatic updates there no matter what (i.e. images would only refresh on page load). I don't know if Github proxies and caches <img> contents, or how long they cache it for but I haven't personally seen any delays when I've updated images used in READMEs.

But to repeat: auto-updating will not work for Github-hosted content AFAIK.

I write a little about it in the blog post: https://supershields.io/blog/1

TL;DR is that most Lua engines seem to offer pretty weak support for sandboxing, unfortunately. Gopher-lua, that Supershields is using, makes it hard to adopt a whitelist-approach where you disable more or less everything and then enable just the functionality you want. Blacklisting (where you specify everything you want to disable) is fairly simple though, but not as secure of course.

For Supershields I have used a combination of blacklisting and running the scripts on serverless instances (AWS Lambda), which limits the impact of a breach.

Funny, I've made lots of stuff responsive but at some point decided I had to have a minimum page width of 1050px.

Now when I remove that and add your "max-width: 100%" I don't see much of a problem. Sure, some content gets slightly misaligned on narrow screens but it looks pretty OK overall.

I just pushed the change now, should be visible within 5 minutes.

Wow, thanks for that investigation. I'm pretty sure I looked at this at some point, and realized shields.io was using some esoteric NPM package that I would not find (or maybe I actually searched) the equivalent of for Golang, so I had to do something simpler.

I looked at the anafanafo package now and one of the first things they say in the presentation is "Built with Shields in mind"... So this package was custom made for shields.io, apparently. From a very quick check it seems to be a non-trivial amount of code, so not super simple to just port to Golang.

I don't want to have to start running Node and NPM packages, but would be very interested in any way to get this kind of functionality in a Go program.

I'm generally using Visual Studio Code for all my development. Really like it.

I chose https://github.com/yuin/gopher-lua as the Lua engine because it is Golang-based, while the Nginx Lua VM is C, unless I'm mistaken. Using gopher-lua is just easier when I'm working in a Golang project. I only have to work in a single language and dev environment for all the backend work. Makes both development and testing easier.

Moonscript I might have heard of, but I have no experience with it. I did not consider it here, and I would rarely consider any niche scripting language for a solution I want others to use. It just introduces an unnecessary barrier to adoption.

Yeah, the issue is (disclaimer: I might have missed something vital here) that it is very hard to know exactly how wide text is when rendered inside the SVG. Some characters take less space than others and the safest way to determine the width of a string when it is rendered is to actually render it. This, of course, is hard to do on the server side. I'm not sure what shields.io does (I'll take a new look at it though) but given that their badges contain more predictable text strings (at least on the left-hand-side it tends to be static text) it is easier there to adjust the size of the SVG manually whe you create a new badge. Supershields badges, on the other hand, can contain very different text strings and there is no way to know what the text will be before you execute the Lua script.

Hmm, a bit rambling response, this one. I hope you get what I mean (and that I'm not completely clueless - have to look at the shields.io code again!)