2,241 karma · joined December 31, 2013
The problem appears when: 1. you have a significant number of people working on the project and 2. one of these "modules" has become too big internally where it's hard to make sense of its internal structure. Having a monorepo makes the problem even more likely. At that point, you'll probably want to start breaking up that gnarly module into pieces so that you can see its structure again, right?
And the whole point of the article is to say that import statements do actually _not_ solve this issue, because import statements are at the file level, not at the module level (whatever module means in your mind).
In any case. As I mentioned in the article en passing, other languages _do_ provide similar features to Bazel's build files though, and I explicitly called out Rust as one of them. When you are defining crates and expressing dependencies via Cargo, you are _essentially doing the same_ as what I was describing in the article. Same with Go if you are breaking your code apart into multiple modules
But then we all know that there are some huge repos out there that are just "one module" and you can't make anything out of their internal structure. Hence you start breaking them apart into Crates, Go modules, NPM packages, you name it or... you know, add Bazel and build files. They are the same tool -- and that's why I didn't write Bazel in the title, because I imagined "build files" more generically. I guess I needed to be clearer there.
class User:
def calculateCoworkers() = {
this.coworkers.clear()
for { d <- this.departments }
this.coworkers ++ d.employees
}
and then, somewhere else... user.calculateCoworkers()
... many lines after ...
for { c <- user.coworkers }
... do something ...
Yes, I've seen code like this many, many, many times where class members are used as "global variables" to pass state across functions. And I've noticed AI likes to generate code like this too (possibly because of the former (large presence of this "pattern" in the training data), which means I'm encountering this now in pull requests...But what about any tools compiled from source and used during the build? Those can also suffer from these issues.
But I’ve seen many builds, outside of FAANG, that are too slow and that also break frequently after a simple “git pull”. Which other systems promise to improve those, and how do they do it?
I’ll add that the project page is at https://www.endbasic.dev/endbox.html and that the disk images are now available for download. Have fun!
https://jmmv.dev/2020/07/presentation-tips.html
https://jmmv.dev/2020/07/presentation-preparation.html
(These were originally Twitter threads so apologies for the abuse of emojis hehe.)
I used to dread speaking in public but have come to enjoy it, and all of the above tips have made it easier over time. I think the vast majority of them came to me from more experienced presenters (and even a class I took in college about public speaking).
As others have mentioned in the discussion below, keeping it fun and providing the motivation for the talk are important. And my pet peeve is to remind people that “your slides are not the presentation: what you say is”.
This is exactly why I wrote https://jmmv.dev/2023/09/performance-is-not-big-o.html a few years back. The focus on Big O during interviews is, I think, harmful.
Fun project indeed.
* The SD card I'm using in there is not the fastest. Easy fix.
* The kernel has some annoying pauses, particularly in WiFi initialization, that add a couple of seconds of delay. To fix this, I wanted to do driver loading via modules once the shell is already up and running, but unfortunately NetBSD hasn't modularized those drivers yet and it didn't seem trivial to do. Should be possible though.
* The rc startup framework is sluggish. I've been pondering a rewrite in native code to avoid huge shell scripts and to allow for parallel execution of early boot services, and that should help -- but it isn't done. (Ideally I'd just replace init with my own thingy.)
* The file system is not read only, so there is an initial fsck that adds a bit of a delay. I want to get to a point where it _is_ read only, which would eliminate this pause.
All in all, agree that 10 seconds is very far from "instant boot", but there is a lot of room for improvement.
However, I'm not planning on open-sourcing what goes into packaging it for the EndBOX (the bindings for NetBSD and the release building scripts) because that's very specific to this project and I see no benefit in publishing them.
There is a config file that you can edit within BASIC to set the WiFi up though.
One difference I can sense is in the interpreter. In the case of the EndBOX, I'm creating a computer to run EndBASIC on, but EndBASIC has already existed for 5 years and is multiplatform: you can write a program and have it run in your browser via WASM, in the desktop version of the interpreter, or now in this new small form factor format. In the case of Micromite, it sounds like MMBasic is specifically designed for this machine.
Which brings me to something I have been thinking about recently: I think BASIC is the least interesting aspect to the EndBOX and the thing that might hurt the concept the most (because BASIC is old, limited, legacy, who cares about it, blah blah blah). I'm starting to think that the more interesting parts of this project are what I have built to take a Rust app that uses some APIs to talk to a "generic graphical console" or to "the hardware", and have that exact same app run on the web, on the desktop, and now natively on a small computer. And for the later case, I think the pipeline I developed to take the app and generate a full SD card disk image with a trivial command to run it in a standalone manner is interesting too. Stay tuned for a follow up blog post as I elaborate on these ideas...
It was exhausting though, and an uphill battle. Most patches were ignored for months or years, with common “is this still necessary?” or “please update the patch; it doesn’t apply anymore” responses. And it was generally a lot of effort. So patches staying in their distros is… “normal”.