HNHacker News
TopNewBestAskShowJobs

andreasgonewild

548 karma · joined September 2, 2014

submissionscomments
andreasgonewild··on How Taser inserts itself into investigations involving its own weapons
Tasers need to go, it's bad enough to treat animals like that. At least before they shoot someone they think twice, and getting into a baton fight means risking getting hurt; this is not a bad thing in itself; the goal should be to de-escalate any situation and avoid violence.
andreasgonewild··on Ask HN: Structure of your side projects
The thing about side projects is that you're free to go wherever you want, no one is watching over your shoulder any more. It's a damned shame when they get lost in tar pits trying to live up to someone else's standards. Side projects should be about passion, about solving interesting problems; and cutting corners is the fastest way to get there. And in the end, knowing which corners to cut and when is what separates the pros from the not yets, that's where 10x comes from.
andreasgonewild··on C++17 is formally approved
It's definitely getting easier, but I still wouldn't even consider C++ without valgrind or similar watching over my back; and I've been writing C++ since 1995. Accessing a variant value as the wrong type, dereferencing empty smart pointers and accessing non-existing elements in collections and many many more cases will still segfault; and I don't expect that to change since it lacks that level of security by design. That being said, it's still the most pragmatic language around; the only language that allows me to choose my own level of crazy.
andreasgonewild··on Neanderthals were distilling tar 200 thousand years ago in Europe
"...would have probably worked for Neanderthals"

Speculation in other words, not science; imagination, not facts; which is fine unless it's being framed as truth.

andreasgonewild··on Ask HN: Resources for building a programming language?
It was a random blog post praising the simplicity of Forth; couldn't find it again if my life depended on it. Thankfully it didn't go too much into Forth dogmatics; what it did instead was to cut the ideas down to their core, which simplified my thought process to the point where I could finally see a clear path to something that felt like it was worth my effort.

We over-complicate things, for different reasons. The truth is that nothing is very complicated once you understand it well enough to break it down to its core.

andreasgonewild··on Ask HN: Resources for building a programming language?
I came into Forth with 32 years of mixed experience from Lisp, Smalltalk, Haskell, C++, C, Java, Perl, Python, Clojure, Scala and more; it's difficult for me to judge anything from that perspective.

I've never written a standard Forth program in my life though, never installed any other implementation. The second I was introduced to Forth, it clicked; Lisp took me much, much longer to get by comparison.

Like I said, I'm not very much into rebuilding what has already been built better by someone else. Anyone who's written any amount of code is bound to have own ideas, and the nice thing about Forth as a substrate is that doesn't come with that many ideas of its own.

I've written a few blog posts explaining design choices (https://github.com/andreas-gone-wild/blog/blob/master/forthy...), there's more interesting stuff to come now that the pieces are falling into place; I've only been working on Snabel for a couple of months.

andreasgonewild··on Ask HN: Resources for building a programming language?
Using Forth as a substrate lets you focus on the more interesting aspects to an even higher degree than Lisp. The last thing you want is detailed instructions; unless you're just building another whatever, which never really made sense to me. Build the most simple and naive thing possible that works the way you want it to, and go from there. That's how Snabel was born:

https://github.com/andreas-gone-wild/snackis/blob/master/sna...

andreasgonewild··on JavaScript string encoding
So you're looking at up to four times as many chars per code point to take into account, but you still claim it's mostly the same thing. Good luck with the lobbying then, I think we're going to have to agree to disagree on this one.
andreasgonewild··on JavaScript string encoding
But processing UTF8 is still without a doubt more complex; you're not going to weasel your way out of that fact, no matter how many cases you can think of where they are comparable. Why can't several alternatives be allowed to coexist and complement each other? Why does everything have to be UTF8, or JavaScript, or Rust, or Go or whatever?
andreasgonewild··on JavaScript string encoding
Not to the same extent as UTF8. It's not like UTF8 invalidated all other encodings; they still fill a purpose and UTF16 seems to still be a popular choice for internal processing, despite the misguided push to use UTF8 for everything.
andreasgonewild··on JavaScript string encoding
As much as I enjoy making fun of JavaScript, it seems more likely to me that the reason JavaScript uses UTF16 internally is the same as for most other languages that support Unicode; it's more efficient and convenient to process. UTF8 has variable character boundaries, which means that indexing/counting requires decoding char by char; but it works wonders as an exchange format since it's compact and mostly any language can deal with it.
andreasgonewild··on Comparing C and C++ usage and performance with a real world project
Or take that even further and allocate a slab that's big enough to last the entire runtime and send malloc on vacation. It's worth repeating, with todays focus on web-frameworks, cloud-providers and dogmatics these ideas are slipping into obscurity; which is a shame given how beneficial they can be if your program fits the use case.
andreasgonewild··on Hell is a multi-threaded C++ program (2006)
Adding a condition-variable per select and keeping a list of pointers in each channel that are pinged when data arrives is the easiest approach I can think of. Haven't tried that one though, I have honestly never run into a use case where I needed select for channels outside of Go.
andreasgonewild··on Hell is a multi-threaded C++ program (2006)
Are you saying they are allocating a separate file-descriptor for each channel just to be able to select? I guess you could do that if you wanted to but it's far from the first thing I would try. I remember reading an article on golang about select and having to traverse the list, but I don't really have the motivation to dig deeper right now.

Looping with unblocking reads is plenty fast enough though.

As for waiting on any event without select, adding an optional condition-variable pointer to each channel that is pinged when data arrives is the easiest approach I can think of.

andreasgonewild··on Hell is a multi-threaded C++ program (2006)
What is even more fundamental and useful than select is non-blocking reads (which the implementation I posted supports), once you have that you can write your own select. It's not magic, select has to traverse the list of channels just like any other code. The only reason it feels like magic in Go is that it's the only way to read a channel without blocking.
andreasgonewild··on Hell is a multi-threaded C++ program (2006)
I was thinking about mostly about atomics, which aren't covered by pthreads; and I can't remember shared mutexes being supported either.
andreasgonewild··on Hell is a multi-threaded C++ program (2006)
There is no need to use raw pthreads in modern C++, it comes equipped with a much more convenient and capable standard library module.

I prefer working with channels, which are still missing from the library; but they are trivial to add:

https://github.com/andreas-gone-wild/blog/blob/master/diy_cp...

andreasgonewild··on My first fifteen compilers
Don't feel bad, tutorials are for when you don't know how to start. If you have a clue how to approach the next step, having a go based on intuition is a superior strategy. Maybe you'll do something stupid, maybe not; either way you learn which means we all win in the long run.
andreasgonewild··on [dead]
How about decrypting antifa instead?

Replace Fascist with Communist and it's like entering a time machine, only the name of the bogeyman and the faces of the ignorant haters change.

Truth is, we're all in this together; the real enemy is pulling all the strings. Divide and conquer, oldest trick in the book.

andreasgonewild··on Juicero Is Shutting Down
Eating them whole is even better. But calling pressed fruit the same thing as the poisonous crap they would rather have us drink isn't helping anyone. It's clearly not the same thing.
andreasgonewild··on Juicero Is Shutting Down
I am fully aware that this is business as usual these days, but that doesn't make it any less destructive to society or any less a scam. What you're saying is basically that as long as people fall for it and you don't go to jail it's ok, I don't agree.
andreasgonewild··on Juicero Is Shutting Down
Did you just call pressed veggies and fruits sugary drinks? As in more or less the same as Pepsi? The problem with Juicero is that it was a scam, pure and simple. Overpriced bullshit and awesome profits, at least that was the plan. Thank god it's over. Now we're just waiting for Uber to fold and then maybe we can start actually making a difference, as opposed to spewing bullshit until no one can tell the difference.
andreasgonewild··on A Bourne-style shell built from scratch in 35 minutes [video]
Totally get your point, but not being all that you are out of fear for consequences will never work out. Whiners and trolls are way overrepresented, it's a way of life for them. But for every confused individual there's someone who's been waiting to hear your voice, someone who's just as sick and tired of the same old as you are. This is your space as much as anyones, our space; as long as we're willing to claim it.
andreasgonewild··on Ask HN: Do you do any mentoring outside of work?
Do what you love and the right teachers will knock on your door when you need them; you might not recognize them as such but everything you need is already provided, should you choose the narrow road. Outside of following your own passion and intuition, there is no general purpose recipe.
andreasgonewild··on Interview with Ryan Dahl, Creator of Node.js
Finally :) I've been arguing for fibers, coroutines and generators with non-blocking IO as an alternative to bending everything backwards to fit in event loops for a long time. And begging for salvation from ever dumber and clumsier programming languages and more ignorant hipster programmers. I ended up writing my own language to investigate further since no one else seemed to be interested in stepping far enough out of the box.

https://github.com/andreas-gone-wild/snackis/blob/master/sna...

andreasgonewild··on Authentic Work
Word. The Book of Life, never heard of it; but we could use some emotional intelligence in this mess. Comparing the kind of code I write when I'm free to follow passion and intuition to the kind of software I used to be paid to write tells the same story. I could barely force myself to cobble working websites together when employed, but cut me some slack and magic comes out the other end:

https://github.com/andreas-gone-wild/snackis

andreasgonewild··on Inside continues to bet on email, the “largest social network”
If you're more into the social part of networking than newsletters and don't mind a bit of privacy, Snackis might be worth a look:

https://github.com/andreas-gone-wild/snackis

andreasgonewild··on The Effects of Computer Programming on the Brain(2012)
When what you need to get done is really tricky and no one else can do it, having a programming-addict or two hanging around might not be a bad idea. The problems I've seen come from treating them as what management want them to be, instead of realizing that they play a different game and come with different compromises. There are also chess-addicts, running-addicts, all sorts of addicts. No one ever got really good at anything without being slightly addicted.
andreasgonewild··on Some wealthy people are injecting blood from teenagers to gain ‘immortality’
Yuck; if that's where awesome profits takes you, I'll pass. Can you get more detached from reality?
andreasgonewild··on How to Write Your Own Compiler (2009)
Or choice of symbols and identifiers. People love to bash Perl, but Larry is definitely on to something when it comes to names and symbols, however flawed/misused the implementation in Perl may be; I feel like we're chasing the same ghosts.

An example is Snabels use of "|" for resetting the stack, "_" for dropping the top and "(..)" for grouping modifications; it smells a tiny bit like Perl in that it's not afraid of using what's available to get the wanted experience, but has a dramatic effect on code shape compared to regular mumble-Forth.

← PreviousPage 2 of 8Next →