HNHacker News
TopNewBestAskShowJobs

lawik

3,352 karma · joined December 6, 2016

https://underjord.io, lars@underjord.io https://twitter.com/lawik @lawik@fosstodon.org

Podcasting on beamrad.io and regprog.com

submissionscomments
lawik··on Running an eInk Display with Elixir, Scenic and Nerves
Author here. Sorry to hear that that's your take-away. I can see how it feels framework-loaded. But making a library that works with Scenic (UI framework) and Nerves (embedded runtime and platform, alternative to Raspbian for the Pi) is pretty normal for the Elixir community and ecosystem. They go together largely like the LAMP-stack used to.

This post was not particularly about those frameworks but rather about supporting the release of a library me and a friend just put out there. I don't expect that library to have any real business use for me. I tried to cover the full range of what I've intended for people to do with the base library and the extras we created.

Me and a guy I met in the Elixir Slack put in the work to port the Inky library to Elixir from Python. Mostly because I wanted to be able to use it with Nerves and he got involved to scratch some itches. The post works as a bit of extra documentation for people to get started. I want it to be out there so when wants to know if Inky works with Nerves they'll find guidance.

Anyway, the Inky display as a product is made to be driven by GPIO and SPI. From what I gather we could do a lot weird stuff to try and run it faster (tried some today, but no dice), partial updates, etc. Our library does basic pixel-pushing, nothing fancy, but no huge layering on top either. We kept the level of abstraction from the library we ported.

Scenic was a fairly logical choice for rendering more advanced things than straight pixels in my estimate. A minimal-dependency UI framework on top of OpenGL. It does add a few layers of abstraction and we end up working from a framebuffer since I couldn't be bothered to re-implement all the draw calls. The framework I'd say is the goto for embedded UI rendering in Elixir and Nerves.

I really like the Nerves platform. Embedded is still a hobby for me but the platform seems sound. I think Farmbot is a neat example. I think the Nerves site covers a fair bit of what it does and tries to get to the point. But it isn't the easiest thing to explain briefly either. An embedded runtime that uses the BEAM VM to try and provide better reliability. So then you need to go into what Erlang is and why the BEAM is a good idea.

I'd be interested in driving something a bit more directly but I'm also very new with most of the nitty gritty in hardware. And I think I'm largely done with eInk for a bit. Aside from maintaining the library.

I hope that clarifies my intentions. I'm not sure I care if it changes your mind about the post :)

To be quite clear, if I intend to pad my CV I'd be writing React posts, maybe some GraphQL, sprinkle some devops on there. No recruiter will be beating down my door because I know about Nerves and Scenic. Even Elixir is still early days. This was for fun. I'll be mercenary some other day.

lawik··on Running an eInk Display with Elixir, Scenic and Nerves
Those are interesting. I hadn't expected them to be very hackable. Just something with ads on Facebook so I sort of wrote them off. Would be happy to be wrong.
lawik··on Running an eInk Display with Elixir, Scenic and Nerves
If you want 13" I don't think Inky will do it. I imagine trying to follow sheet music on a 4.2" display might be a bit rough. But I wouldn't know, I can hardly parse it on proper paper.
lawik··on Running an eInk Display with Elixir, Scenic and Nerves
I can see that. Inky what would get you there.

This thing. Not cheap. Slow refresh. But pretty neat. https://shop.pimoroni.com/products/inky-what

lawik··on Running an eInk Display with Elixir, Scenic and Nerves
What size do you need? The wHAT is bigger and should work great with this. I don't have one so I haven't been able to verify. Will probably end up getting one at some point.

Currently considering seeing how far I can push the Inky towards a decent refresh rate. It is incredibly slow with color, but a nice device all the same.

lawik··on Why am I interested in Elixir?
The post only covers the web stack briefly.

My current favorite things in Elixir are not particularly web-related:

- Nerves, embedded Linux + the BEAM VM to do IoT-style things in a nicer way. The workflow compared to something like working from Raspbian seems a lot more sane to me.

- Scenic, OpenGL-rendered UI, for embedded hardware or other purposes. I recently used it to get text-rendering and geometries onto an eInk display with Nerves. One big reason for the creation of Scenic was to give IoT/connected devices UI that doesn't require a web stack. For many reasons, with security definitely being high on the list.

lawik··on Why am I interested in Elixir?
Oh yeah, that is an interesting thought. I've considered that too. Didn't cover it in the post because it isn't quite the focus of Nerves and I already had a lot to say.

I've seen a few different nerves-systems targeting AWS EC2. Have you tried doing anything in particular with it?

lawik··on Why am I interested in Elixir?
I would say Phoenix doesn't attempt to be quite as magical as Rails and Django-style frameworks. It is a bit more explicit and as such hopefully easier to follow. The goal doesn't seem to be Rails for Elixir but rather that every new backend language needs a good web framework or it may be dead in the water.

As someone suggested, check out the Hex docs. That is where you get the better in-depth stuff and API reference. I've found the Getting started-stuff very helpful but also a bit limited in scope.

lawik··on Why am I interested in Elixir?
I've heard that a few times now, so I'm not sure if its a sort of community marketing meme or an actual truth. And I'm in the community :P
lawik··on Why am I interested in Elixir?
Not really, the frontend caches the static parts of the template and the backend only needs to resend the dynamic, changing, parts.

So "Welcome to $mysite, $username." would initially send the full rendering but if the data changes it would only send "Hacker News,lawik" over the wire. Somewhat simplified.

This covers it quite well: https://www.youtube.com/watch?v=8xJzHq8ru0M

lawik··on Why am I interested in Elixir?
Author here. You are right in that I haven't had a chance to see what a few-years-old Elixir project feels like to run and maintain. I've been following and experimenting with Elixir for a few years and I'm doing more stuff with it recently.

And the post was very much intended to be enthusiastic about cool things, rather than nuanced and looking for problems. So I think your take-away is entirely fair.

lawik··on Jony Ive to form independent design company with Apple as client
I feel like you are jumping to a lot of conclusions. I have worked with a number of different bash implementations and terminals on windows. I haven't found one I appreciated as much as the ones I use on MacOS or have used on Linux.

Am I correct to understand that you dismiss my arguments about why I prefer another operating system and prefer a certain computer type in spite of higher cost as entirely invalid and part of some intellectual bankruptcy?

You seem to have no interest in seeing how another perspective might make sense to another person. If I were to argue like you I'd go with "No one cares to pay for hardware and software anymore. That's why Google gets away with eroding our privacy. Your hardware is full of bloated driver management tools. Your operating system has ads. It is just one data point telling me that people have no standards and lousy taste."

That's how I experience your arguments, no curiosity. I've been politely considering that your opinion probably reflects your needs. I would have appreciated the same courtesy. But what do I know. I'm just a signifier for humanity's decision-making. Bah.

lawik··on Jony Ive to form independent design company with Apple as client
Well. I'm glad you can find computers that you find worth their price.

I do use Windows 10 for gaming and some audio/video editing stuff, mostly because of ports and fat hardware. I don't enjoy dev work on it. I could get used to it. But I vastly prefer the way my workflow matches with MacOS. Good terminal, decent package management, good battery for travel.

If I wanted another dev OS it would probably be a Linux.

But I find the quality of execution on MacOS and the surrounding ecosystem to generally be better. I prefer the experience. If it costs a premium but shaves some frustration for me, that feels worthwhile at this time.

It is fine that you don't want to pay that. Is it bothering you that I don't mind the higher price?

lawik··on Microsoft's Linux Kernel
From what I've heard the change from the layer approach to the virtual linux was mostly related to file system performance. Does it have to be innovative if it offers better integration than VirtualBox? Or is it reasonable that they use well-known and working tech?

Also, while I think it is useful. I imagine much of the hype here is also from the weirdness of it all. Would you agree that it is noteworthy that Microsoft is publishing a Linux-kernel for Windows? It think it is.

lawik··on Jony Ive to form independent design company with Apple as client
Objectively is a hard claim when it comes to an integration of software and hardware. What is the integration of hardware and software worth to any particular person? What is Apple doubling down on privacy worth to another one?

Current MBP hardware is nothing exciting to me. But my previous MBP was lasted me 2009 to 2016 I believe, with a few upgrades. And I like the OS.

I don't mind working in Linux or Windows but I prefer a lot of things about the Mac.

A lot of conveniences, and things that I feel have better execution. Rather predictably decent performance and good integration between software and hardware. That sort of thing.

I was OK with USB-C as it matches my Android phone and the iPad Pro. I'm down to a single charger for travel. It has drawbacks but makes a bit of sense. Not a fan of the new keyboards, really don't like the Touchbar. But overall I'm still fairly happy.

So that's why I, personally, bother. I care about whether they improve it because in spite of the Mac as a platform not hitting the sweets sports as well as previously for me it is still worth the premium they charge. To me.

I consider Macs expensive, I'm not sure that I consider them overpriced. Under-featured I'd dismiss out of hand, I'm sure they could be to some but it really depends on what you are looking at.

lawik··on Building Standalone Python Applications with PyOxidizer
Isn't it glorious?

I definitely share those concerns. But being able to package things in an independent way is incredibly useful.

I hope we can get away from the reliance on incredibly disproportionately sized runtimes (such as Chromium) for making GUI apps in most cases. I think it trades too much of the user's resources for developer convenience. Unless you are trying to do audio/video conferencing in which case I guess I get it.

I've found the work on the Scenic UI framework in Elixir quite cool (only depends on OpenGL + glfw on desktop, nanovg on RPi).

I also had reason to build a simple bit with wxWidgets in Elixir through Erlang. Didn't love it. But that should be able to make reasonable-sized native but cross-platform UIs. Elixir and Erlang tend to package releases in a nice independent way.

But what I need this for is because every library under the sun is available for Python. And sometimes you need to just get a small utility built and distributed.

lawik··on Building Standalone Python Applications with PyOxidizer
Oooh, this seems like exactly what I need. I hope it gains some traction. Trying it out right now for small util my wife needs that has to run on a machine she doesn't fully control.
lawik··on Raspberry Pi 4
Ah, I was more thinking about the computer-and-screen form factor. But I see that was unclear on my part :)

Have to look at that iOS thing. Would be interesting.

lawik··on Elixir 1.9
I guess so, I imagine that's up to the maintainer.
lawik··on Elixir 1.9
Previously most people used distillery. Now they'll use Elixir releases. Because it is pretty much the same solution but now moved into the language tooling itself.
lawik··on Raspberry Pi 4
Can't wait to try Nerves (https://nerves-project.org/) on this. Waiting for the US-based devs to wake up to find out what they think.

This is a stunning upgrade in my eyes. Going to evaluate how it would work as a dev desktop too. Just mount it behind a monitor. iHackintosh?

lawik··on Redis Turns 10 – How it started with a single post on Hacker News
Link please :)
lawik··on Show HN: Beautiful Python List Prompts Package
I don't quite follow you here. It is a library for making some simple UI for command line applications.

If you have a command line application in python you could implement this for fancier list selections.

I'm unclear on how you relate this to React components. Python libraries have been part of an existing ecosystem long before React. The python ecosystem.

lawik··on Going Solo, Successfully
When recruiters inevitably try to recruit me (because software dev) I tell them I exclusively do contract work. My profile also mentions this. Some of them have clients that are open to this. They pitch the client to me. If I'm interested we discuss skills, rates and they pitch me to their client.

I've also reached out to a few recruiters that have seemed reasonable and gotten work that way.

LinkedIn noise/signal ratio isn't the best. Other sites have been better. But I've found work that way.

lawik··on Going Solo, Successfully
I have a free sales force. It is an army of LinkedIn recruiters.
lawik··on Sweden allows every employee to take six months off and start their own business
I would say this is fairly uncommon and unlikely to hit any given business. But sure, it puts some strain on businesses. It also seems to work fine. We have companies of many different sizes. I haven't heard a lot of complains about it.
lawik··on YouTube Kids Is Going to Release a Whitelisted, Non-Algorithmic Version of App
I would really like the option of paying for YT Red. But nope. So yeah. Frustrating.
lawik··on How GDPR Will Change The Way You Develop
Do you maintain your database backups indefinitely? If they rotate out after a month or so you will likely be inside the realm of what GDPR considers reasonable compliance. The live data is removed ASAP and the data will rotate out from the backups in a reasonable time frame. At least from the legal advice we've had.

We have no plans to retroactively fix our backups. But we will have to make damn sure that if we need to use a database backup we do not reintroduce user data that we've purged. For that purpose we will have to maintain a list of which users have been purged until the backups rotate out. According to the advice we've had, this is acceptable.

lawik··on Ask HN: Why Isn't the Construction of CRUD Web UIs 90% Automated?
I'm guessing you mean Phoenix where you wrote Elixir. But yeah, I immediately thought of these frameworks and how fast you can get from zero to CRUD API with them. Phoenix definitely felt 90% automated, Django and DRF had some extra glue-work last time I set them up. Not sure about now.

Anyone tried API Star by Tom Christie? Seems pretty interesting and relevant: https://github.com/encode/apistar

lawik··on Intel Reveals Post-8th Gen. Core Architecture 10nm+ Ice Lake
Interesting. Pragmatically, are there any okay-ish options for consumer-level processors and motherboards that are not Intel or AMD?

ARM devices?

← PreviousPage 11 of 14Next →