HNHacker News
TopNewBestAskShowJobs

mononcqc

2,658 karma · joined March 17, 2009

Blog: https://ferd.ca books: https://learnyousomeerlang.com, https://erlang-in-anger.com, https://propertesting.com
submissionscomments
mononcqc··on Adopting Erlang
This is ultimately not very different than what you would get with any firewall or network rules in any business, and it's an issue shared by most deployments regardless of whether you get containerized or not.
mononcqc··on Adopting Erlang
Erlang's tooling has vastly improved in the last few years to the point it's not as much of a concern anymore (a formatter is the big missing thing), and I just happen to prefer its syntax to Elixir's in the first place.

While I can argue in favor of tooling being roughly on-par (sometimes better, sometimes worse), I can't really discuss syntax since this is often just related to taste more than anything.

My stronger argument would usually be in favor of the community you end up with. While both communities are starting to merge and grow closer over time, your average Erlang dev is likely to work on infrastructure components, and your average Elixir dev is likely to be working on web apps. I personally like working on the former better, so there's more limited interest for me in terms of most Elixir jobs anyway, even if it's not like no infra work exists in Elixir.

Both can have a great time working on APIs of any kind, and both can reuse most libraries of each other's community, so as I said, this is starting to become a moot point though. I personally have no problem with either.

mononcqc··on Adopting Erlang
Yes and no. Some of the struggles are fresher than others, and in some cases you do internalize things to the point they feel like a second nature.

The effort mentioned here of getting newer people to read the content and/or produce it is something I've done a lot in the past, and one of the ways I've used in on-boarding people as well. We (the co-authors of Adopting Erlang) tend to do it with topics where we don't know everything the other authors know, and provide feedback to each other about things that lack clarity.

I've also taught Erlang stuff in multiple places and started knowing some of the things people find confusing as a kind of pattern, which may get easier to address early on with time.

The thing that can never be done well, though, is predicting the things someone with an entirely different background from yours would find confusing; the context carried by their experience influences the things they understand and the information they extract from a text. Teaching to a functional programmer is different from teaching to a developer who has done OO their entire career. Teaching to someone doing front-end work is going to be a different experience from teaching to someone doing mobile or back-end work. The same may often extend to sociological, economical, or cultural factors as well.

All of this means that each teaching experience has new surprises as well and you can't just cover them by thinking very hard. Frequent reviews, both technical and from editors can help, though, along with your own experience when teaching.

mononcqc··on Adopting Erlang
If both, we would certainly appreciate the feedback about which areas are considered unclear, in order to improve things further.
mononcqc··on Adopting Erlang
Is this a general tip you're giving, or is there specifically pieces of information you feel are being too opaque in the text at this point?
mononcqc··on Adopting Erlang
Well this is technically the fourth one I'm working on. All are available for free online because I want these resources to be accessible first and foremost.

I've got:

Learn You Some Erlang, which has been published with No Starch Press. This was my first one, which I assume is the one you're talking about. Lots of drawings, something I no longer really have the time and energy for these days compared to early in my career. It's the big basics of Erlang. A bit dated now, particularly since the ecosystem evolved around it, but all the basics are still well-covered I think.

Erlang in Anger, only available as a self-published short e-book available for free, meant to teach people to operate Erlang in production.

Property-Based Testing with PropEr, Erlang, and Elixir; my latest published one (with Pragmatic programmers), covering property-based testing both with Erlang and Elixir at once. Pragprog have let me keep the initial website online, which only covered Erlang.

And Adopting Erlang is the latest one. We're still writing it (this time I'm a co-author rather than the sole author), and there's no physical or ISBN'd copy of it available at this point in time.

All of them have to be labours of love, just because it's a lot of work and effort, and at this point in my career, my name's well-known within the Erlang and Elixir communities, so you could say there are diminishing returns. I still enjoy writing though, it's just harder to make time.

mononcqc··on Adopting Erlang
Erlang first.

There is a large overlap with Elixir stuff, mostly at a higher level; whatever covers OTP, handling supervision, releases, docker image practices, approaches to testing, production practices, etc. will very likely be useful to Elixir users.

But the lower-level details like handling dependencies, build tool commands, test framework specifics, the code snippets and samples, and so on are all going to be Erlang-specific.

I use both languages frequently for work and there's far more in common between them than there are differences. If that's not your cup of tea and Elixir is really all you're after, you can look for Ben Marx's Adopting Elixir (https://pragprog.com/book/tvmelixir/adopting-elixir) book. We are not affiliated with it and don't aim to cover the same content (we just have similar titles), but it's a good option that goes Elixir-first.

mononcqc··on Adopting Erlang
One of the authors here. This website is still a work in progress.

It's an ongoing effort to gather all the resources that will help you use Erlang in a business. The booksite is divided in three sections focusing particularly on Erlang/OTP’s higher level concepts in the current open source ecosystem, how to use it in production (while setting up a pipeline for continuous development and delivery), and how to build a team when you’re starting from scratch.

We're working mostly linearly in each section, but they're not all progressing at the same pace. We have nothing yet on "building a team" although our outlines are all planned; the "hard things to get right" chapter was supposed to come in later but we saw enough questions about these topics to rush it out.

We might release things from each section as they are ready and we see fit. In the meanwhile, we're always appreciating feedback and people checking in to see what's new in terms of content.

mononcqc··on Decrement carbon: Stripe's negative emissions commitment
You do your part, other countries try to do the same, and various means and strategies are implemented and shared globally.

This “but we can’t fix it all alone, it’s a global issue” thinking mode has to go. All contributions are important in reducing the speed of warming, whether your neighbour participates or not.

Interestingly, the longer you wait, the more you can expect people with more extreme agendas to pop up around the globe because they will see the point in coercion to save the world. Early investment at a massive scale is worth it.

mononcqc··on Ten Years of Erlang
I'm the author.

I'm not really disappointed Erlang didn't catch on more. As I said in the post, I wanted to take a bit of time to reflect over most of that decade, the ladder of ideas, and things that changed.

mononcqc··on Ten Years of Erlang
The blog post is not actually about making FP accessible to the masses nor a how to guide about it, and if you read through the post, it’s even stated in there that it’s not important for the language to gain widespread use.

That’s why I downvoted you. It’s not because of your opinion, it’s because it’s probably not in the right thread.

mononcqc··on Ten Years of Erlang
As one of its maintainers I’m partial to rebar3 (http://www.rebar3.org/)

It’s become near-official for OSS Erlang work and the OTP team has moved the repo under their GitHub organisation (https://github.com/erlang/rebar3)

Erlang.mk tends to be the other option otherwise.

mononcqc··on Ten Years of Erlang
Ejabberd runs with a lot of legacy. Essentially the first build tool that could pull deps in Erlang dates from 2007-2009, and it took another few years before more modern tools came to be in what their current form is.

All these bigger projects tend to have a bit weirder idiomatic build setups because they had to haphazardly reimplement bits of (at the time) yet non-existing build systems by hand.

mononcqc··on Ten Years of Erlang
We probably had our discussions about this before, tooling definitions diverge at times, and I have a vested interest in some of them, but I will just state my disagreement on the better tooling side of things ;)
mononcqc··on Operable Erlang and Elixir [video]
I've looked a bit for it and it appears nobody has put it anywhere. I personally do not have a copy either. I thought CodeMesh in 2017 had it, but it was never published.
mononcqc··on Operable Erlang and Elixir [video]
Hi, I'm the presenter in the video. If like me you prefer text formats, I have a blog post which partially covers the same content: https://ferd.ca/operable-software.html
mononcqc··on Spotify will now suspend or terminate accounts it finds are using ad blockers
they do. I'm a paying user in the specific region mentioned. The thing they do not offer is the first month free. Quebec law forbids companies from "offering one month free" and then auto-billing you whether you consent or not at that point.

What companies frequently do instead is offer "pay N months, get N+1 months", such as getting 13 months for a yearly subscription. Spotify just never felt like modifying their offer for local laws, but I've nevertheless been a premium member for years now.

mononcqc··on The Little Printf
Yeah. They're malicious caricatures, but as mentioned in the text, they're all different sub-personalities I've at least had at some point in my career.

Also do note that the text is heavily copying The Little Prince, to the extent that all characters are also malicious caricatures of adults, with only one of them actually being perceived positively, so I tried to play to the original.

mononcqc··on The Little Printf
because Le Petit Prince is one of the most translated and sold books ever, and that the title was a very direct reference, I just didn't feel it would be necessary to include a note saying it's based on the little prince story since it felt obvious to me. My bad.
mononcqc··on Erlang/OTP 21's new logger
yeah, Erlang-wise, most loggers have done these checks for years. There's always a big concern in terms of avoiding the most work possible as early as possible so all that filtering takes place early on.

The handler and filter structure with both global and per-handler filters is fairly clever as a way to turn these things on and off easily, and the module and level checks are done the earliest since they can allow to eliminate the most amounts of logs the cheapest way possible.

mononcqc··on Erlang/OTP 21's new logger
This is mostly fixed. First, the loggers tend to use unicode-aware pretty-printing, which lets you have rarer instances of a binary getting blown to its integer bytes representation.

Then there's also ways to prevent just printing huge terms out. That's what parameters like `term_depth` in many handlers do (I believe it's just `depth` in the default handlers). They limit how deep you go into outputting some data. So even if you have some very large strings or deeply nested structure, they can get elided when they reach a certain threshold.

mononcqc··on Elixir v1.7 released
Yeah. One thing I'm wary about though is developing blind spots due to a) knowing Erlang and OTP very well and b) knowing rebar3 itself very well.

I'm sure there are plenty of tricky traps that regulars have learned to work around and "just know how to use it without breaking it"; I have a suspicion a lot of unsatisfied people are those who come with different expectations of what the tool should do and how it should behave.

In these cases, they'll have a frustrating experience. I'd be interested to learn what it is so that we can make the whole thing better.

mononcqc··on Elixir v1.7 released
I'd love to get your feedback on rebar3; I've heard that opinion repeated often, but not really often have I heard specifics that we could address directly.
mononcqc··on Elixir at PagerDuty
Elixir already has those rebindable variable, which can be "turned off" by using the ^ prefix on a match variable. Wouldn't that make the |> less useful to you already?
mononcqc··on Gluon – A configurable and small virtual machine which runs Erlang BEAM bytecode
no idea, did not write that one.
mononcqc··on Gluon – A configurable and small virtual machine which runs Erlang BEAM bytecode
For Learn You Some Erlang, I used hand-made drawings that I would scan, and then trace over using either photoshop (initially) and then Illustrator (when I knew the book would go to print).
mononcqc··on The Zen of Erlang (2016)
I've also written http://propertesting.com/, which I'm currently working to turn into a full book with Pragmatic Programmers (with Elixir translations included as well, so that everyone on the BEAM can benefit :) )
mononcqc··on Proposal: Non-cooperative goroutine preemption
The BEAM will totally interrupt a process that is currently processing a message. It does so based on a 'reduction' count, roughly equivalent to each function call. Since there is no looping construct, any iteration can be interrupted halfway through.

But this means that the VM is entirely allowed to interrupt you halfway through a call to sorting a list obtained through a message. No qualms about it. You reach you function call limit, you're phased out and put back in the queue.

The three ways I know about to hog a scheduler for yourself are:

- write C code that misbehaves and stalls the scheduler (there is now a dirty scheduler if you want the code to run there)

- hardcode a sequence of arithmetic operations (which are not subject to reduction counts) that can take a very long time to execute -- something that never happens naturally in code

- set your process to the max priority and do busy looping while the rest of the system is at a lower priority. Your process will now have a higher priority and prevent others from running

That's about what you can do. It requires a kind of explicit effort to do and is very easy to spot from afar.

mononcqc··on The Joy of Erlang; Or, How to Ride a Toruk (2011)
Starting with OTP-20, the string module handles unicode, both for binaries and lists (and iolists, which mixes all styles) without a problem.
mononcqc··on Apple scientists disclose self-driving car research
You could also just reduce driving deaths by having better public transportation and reducing driving overall.

Sounds like it would even be better in the long run.

← PreviousPage 2 of 11Next →