Readit News logoReadit News
DevOfNull commented on Open Source Farming Robot   farm.bot/... · Posted by u/pedrodelfino
__MatrixMan__ · a year ago
Well, you're hearing it from a guy who has written hardly any Elixir or any other BEAM language. (For a proper intro I recommend this video https://youtu.be/JvBT4XBdoUE). Less practitioner, more fanboy. So I may not be the best source. But I'll try anyhow.

The BEAM is a virtual machine, I guess kinda like the JVM. So just like you can write Java or Kotlin or Clojure or a million other JVM languages, so too can you write Erlang or Elixir or Gleam (I like the look of Gleam)... And expect similar interoperability.

The BEAM has its roots in the telecom world. So while Sun Microsystems was doing the Java thing to make webservers or applets or whatever for the JVM, Ericcson was doing Erlang things to make things like long distance phone calls happen on the BEAM.

(I'm not a fan of Java, I just think it's a decent thing to compare with in this case)

The BEAM folks take a different approach to concurrency than is common elsewhere. BEAM processes are much more lightweight than OS processes, so while it might be insane to run a separate copy of your server for each user, it's less insane to run a separate BEAM process for each user.

BEAM processes interact through message passing. Of course most other processes do to, but only because the developer built it that way. With the BEAM it's built in, each process periodically checks its mailbox for a message which matches its criteria, and if there's no message, it sleeps until it is revisited by the scheduler. There's no async/await business. They're all single threaded and sequential. Instead, you achieve coordination by having many of them, some of which are in charge of starting/stopping/organizing others. (I guess they build structures out of these things called "supervision trees" but I don't precisely know what that is).

This has all grown up in a world where nodes are expected to be physically separate (like either end of a phone call) so you end up with a bit more fault tolerance than if each process is expected to be on the same machine.

In Kubernetes you've got this mountain of yaml which you craft to tell the container orchestrator how to treat your app. And then you've got your app itself which is probably not written in yaml. So I find it very jarring to switch between my dev hat and my ops hat.

And Kubernetes... That's Google's baby, right, so it makes sense that it doesn't feel the same as the underlying app. As a cloud provider, they need a rather high wall between the app and the infra. But I think it causes all kinds of problems. At least in my world, the apps are either in Python or Go, so when there's a problem someone will come along and solve it with yaml-glue to add an additional container which may or may not resemble the app which has the problem.

My brain struggles to hop from Python to Yaml to Go (and there's usually some bash in there too).

The BEAM, by contrast, expects processes to start and stop other processes. So your orchestration logic and your application logic are in the same language. You don't have to express your wishes in yaml and then navigate all of these superfluous layers (e.g. the container entrypoint script, port forwarding, in-cluster DNS, etc) to have your wish granted. That kind of communication is handled by the BEAM's inbuilt message passing system.

If I got to rebuild our stack from scratch I'd use Kubernetes as a cloud-provider-agnostic interface to get access to compute, but instead of expressing anything about the app in YAML, I'd handle all of that extra stuff (e.g. log scraping, metric aggregation, whatever hacky fix is needed today...), I'd handle it in the BEAM, right alongside my app.

People like to say "build security into the app" or "build observability into the app", but standard practice is to bolt on solutions that don't resemble the app at all. My (probably flawed) perspective is that if you scratch those itches within the BEAM, then you're going to end up with fewer superfluous layers of abstraction. Also fewer distinct niches that you now must find a specialist to fill when the old one quits. Also, you end up more in control of your app because since you more or less wrote the orchestrator, you're relying less on the cloud provider to be a reliable puppet master.

---

It's slow going, one class per semester, but I've been taking biology classes on the side. I sometimes think about making a break for it and trying to build something like farmbot but for driving a microscope, or a pipette, or maintaining the temperature/pH/etc in a bioreactor.

These are, for now, just dreams.

Sorry for the diatribe, but you did ask me to elaborate :)

DevOfNull · a year ago
Different person, but thank you for the writeup! Very interesting. For anyone else reading: Please write more comments like this, they're one of the best parts of HN.
DevOfNull commented on Spectral Ray Tracing   larswander.com/writing/sp... · Posted by u/earslap
DevOfNull · a year ago
If anyone wants to make their own: The free e-book Ray Tracing Gems II [1] covers realtime GPU ray tracing with modern APIs and hardware acceleration, and has a chapter about spectral rendering (Chapter 42: Efficient spectral rendering on the GPU for predictive rendering).

[1] https://www.realtimerendering.com/raytracinggems/rtg2/

Dead Comment

DevOfNull commented on WordPerfect for Unix character terminals   github.com/taviso/wpunix... · Posted by u/metadat
teruakohatu · 2 years ago
After reading the FAQ and Tips and Tricks, I can only imagine how amazing a modern terminal WordPerfect clone with Vim keybindings would be. I write a lot of pandoc markdown documents, vim and vscode are fine, but they are text editors not word processors.
DevOfNull · 2 years ago
I don't use it personally, but from what I hear this is exactly the use case Emacs was made for.
DevOfNull commented on Altstore: Home for apps that push the boundaries of iOS   altstore.io/... · Posted by u/behnamoh
musictubes · 2 years ago
Discussions about alt stores for iOS always infuriate me. There are some legitimately useful things that can only be done outside of Apple’s strictures but the conversation usually ends up with people salivating over ways to pirate things. Incidentally, this is also the bulk of the sentiment I hear when sideloading on Android is discussed as well.

Pirating YouTube, Spotify and games as well as torrenting seemingly make up 90% of desires of an alt store. I expect this from 14 year olds, it’s frustrating to see it on HN. “I need to not only block all ads on YouTube but all sponsor reads too. They’re sooooo annoying!” Grow up. Content makers need to be reimbursed. YouTube Premium subscribers and sideloading enthusiasts have very little overlap.

The side loading crowd is its own worst ambassador. Entitlement to free entertainment is an ugly look. I want to hear about useful, legit stuff that Apple prevents from being on the App Store.

DevOfNull · 2 years ago
This is just complaining about "the youth these days", with some snark about how they consume media "wrong". It even calls them entitled, just like those articles about millennials!

In an economy in recession with awful wages and banks falling over, only just recovering from a pandemic, is it surprising that people want to spend less money?

On another note: content creators aren't individuals, they're small businesses with employees and contractors like any other and if that business is unsustainable, no matter the reason, then that business failing is the free market working as intended. Every business needs to adapt to the realities they face.

DevOfNull commented on DreamWorks releases OpenMoonRay source code   github.com/dreamworksanim... · Posted by u/dagmx
abdellah123 · 2 years ago
I'm a software engineer with no animation xp. Can someone explain what this tool is (and is not) and how it fits in an animation project.

e.g: can I make an animation movie using only moonray? what other tools are needed? and what knowledge do I (we) need to do that?

DevOfNull · 2 years ago
ChatGPT gives the following answer:

MoonRay is a renderer that creates photorealistic images of computer-generated 3D scenes, using a technique called Monte Carlo ray tracing. MoonRay can be used as part of an animation project, but it is not an animation tool itself. Instead, it is a rendering engine that produces the final images that make up the animation.

To create an animated movie using MoonRay, you would need to use other tools to create the 3D models, textures, and animations that make up the scenes in your movie. Some examples of these tools include Autodesk Maya, Blender, and Cinema 4D. These tools allow you to create and manipulate 3D models, animate them, and add textures and lighting to create the final look of your scenes.

In addition to these 3D modeling and animation tools, you would also need to have a basic understanding of computer graphics and animation principles. This includes concepts such as keyframe animation, camera movement, lighting, and composition.

Once you have created your 3D scenes, you can use MoonRay to render them into high-quality images that can be used in your final animated movie. MoonRay can render images on a single computer, or it can be used with cloud rendering services to speed up the rendering process.

In summary, MoonRay is a rendering engine that produces photorealistic images of 3D scenes created using other 3D modeling and animation tools. To create an animated movie using MoonRay, you would need to use additional tools to create the scenes and have a basic understanding of computer graphics and animation principles.

u/DevOfNull

KarmaCake day102March 5, 2021View Original