HNHacker News
TopNewBestAskShowJobs

tiniuclx

1,183 karma · joined August 2, 2018

Software Engineer, Musician and Fan of Literature and Indie Games

E-mail: alex@tiniuc.com Website: tiniuc.com GitHub: github.com/tiniuclx

submissionscomments
tiniuclx··on Haskell's kind system: a primer
Sure, you could likely compile a Haskell program to an embedded architecture, but Haskell is a garbage collected language. Allocating memory takes a long, nondeterministic amount of time on a microcontroller. And microcontroller are often used in control systems, where latency kills.

Haskell also suffers from space leaks due to its lazyness. Microcontrollers have memory in the order of kilobytes, sometimes even less than that. You simply can't risk running out of memory, which is why micros are programmed in C or assembly, where you have a vice-like grip on how much RAM you use.

For a higher-level look at the problem, consider that embedded systems are a high volume product. Saving a penny by using a cheaper, weaker micro adds up very quickly when you're shipping tens, or hundreds of thousands of devices. At that scale, it's profitable to spend more on non-recurring engineering (programmer time) in order to reduce the cost of manufacturing.

If you want a functional-style language that is likely very well suited to embedded devices, look no further than Rust. While I haven't had the time to learn it (maybe next year), the language looks very promising due to its memory model.

tiniuclx··on Haskell's kind system: a primer
I've been writing a lot of Haskell recently. I had to switch to embedded C and the difference between the two was striking. The C program I was editing compiled, but failed to do anything useful. To fix that, I had to reorder the stateful functions and #define the right things without much help from the compiler.

Had I been using Haskell and a reasonably well designed library, these mistakes could've been caught at compile time, with the compiler telling me exactly what I did wrong. The kind system described in the article is how you would implement such a library, or something even more advanced.

Sure, comparing embedded C to Haskell is disingenuous, but it does show how far programming languages have come. And I think my experience could definitely happen in many other mainstream languages.

tiniuclx··on The lost art of concentration: being distracted in a digital world
What I like about the book is that it presents many ways of incorporating deep work into your life: from long, focused sabbaticals (e.g. writers living and working in a cabin to complete important work) to frequently dedicating a small part of your day to pursue your goal. It also presents rituals, quirky as that may be, as a good way to get yourself into the desired mindset.

Another interesting idea: not all important jobs require or even benefit from deep work.

tiniuclx··on The lost art of concentration: being distracted in a digital world
Deep Work (https://www.amazon.co.uk/Deep-Work-Focused-Success-Distracte...) concisely sums up many feelings I've had about distractions and how this always connected world affects the way I think. I believe the teachings of this book are especially applicable to knowledge workers.
tiniuclx··on Hidden Tribes: A Study of America's Polarized Landscape [pdf]
This article makes me think about the disdain some people might have against the 'liberal elite', and according to the article political correctness does seem to be a trait of that particular class.

I think the key is to understand the reason why many Americans reject PC language and culture. Is such language overused due to a fear of being accused of *ism?

Or is it because people believe that communication should be empathetic by default, and doesn't need sanctimonious words to show it off? I generally assume there is no malice in someone else's words, which is especially helpful on the (mostly text-based) internet, where there aren't any para-verbal cues.

← PreviousPage 6 of 6