I hope you have a great time. I took a trip to the UK with my family this summer and Scotland was lovely. We didn't manage to make it out to the Isle of Skye, but we did do a day trip out to the highlands and it was an experience I'll never forget. Simultaneously desolate and beautiful.
Janet's original package manager JPM is being depricated, so we need to better document the replacements' alternative workflows. I'd previously written this. Janet now does the hard work internally, allowing people to easily build package managers with different workflows on top, working with the same data.
I'm expanding the our support for sqlite3's extended API. First I did some refactoring and now I'm building a bunch of random projects to highlight/explore those extended features, with demos/experiments of:
shadow REGEXP with janet PEGs using sqlite3_create_function_v2
letting you use and move sqlite3 DBs across threads and images (via serialize)
integrating statements and such as Janet "abstract types" allowing you to stream rows or do like (each row sttmt ...)
Related to the packaging experiments, I worked out a good workflow (related code) for building a whole tool chain on different commitments, with different flags etc. letting me test optimizations. Due to a mistake, I was comparing my global -O3 native build with unoptimized ones for a bit. So far, I improved equality. Currently, declarative-dsls's test suite runs 25% faster on master and many other whole programs by ~10% compared to the last release!
Basically, I'm twiddling my thumbs waiting for the results of a business trip I just returned from, to bear fruit.
Off to Barcelona with my wife for our 25th anniversary on Thursday. It’ll be our first holiday without kid in 15 years. Wednesday will be packing, and preparing the house for in-laws to come and house/babysit.
I've been getting NetBSD 11.0 running on a Netgate SG-1000, the little AM335x box Netgate used to sell as a pfSense appliance.
The stock armv7 image, plus a modified device tree, boots from SD using Netgate's U-Boot without needing any changes to the eMMC. Netgate's Fatboot boot script checks for a UserFatboot variable and runs it if it's set.
The BeagleBone Black device tree sets up the shared pins for MII, but the SG-1000 is wired for RGMII. That seems to have been why I got gigabit link but no inbound traffic. Stripping out the pinctrl setup and fixing the PHY mode and address got one port working.
The second PHY shows up fine in U-Boot, but NetBSD still won't attach it. That's what I'm digging into this week. Reading through the CPSW driver.
I'd like to get a proper board DTS together and build an SD image that other SG-1000 owners can just write to a card and boot.
Continuing the job hunt. Even McDonald's didn't get back to us so yeah, it's bad out there. Switching focus back to tech work for a spell.
Prepping for our birthday next week! Also hosting board games both personal and public.
Looking for any financial assistance we can find in the meantime since a combination of the market, misfortune, and morals have left us nearly zeroed out.
It's crunch time at work, so I'll be using my brain power on that for this week, and I'll spend my free time on not-so-demanding things like chill video games and reading.
This weekend I looked at editors as related in the weekend thread and I'm going to try out Sublime Text (as jbauer suggested) for a while, it seems to tick most of my boxes. So far, so good. I like open source, but I don't mind spending money on software, especially so for a small developer-driven company.
I'm currently adding multi-thread support for Argon2 in Monocypher. Without depending on any multi-thread API at all. I'm sticking to the "pure portable C99 with zero dependency" that makes this little library so easy to integrate pretty much everywhere.
Instead I chopped up the API into an init()update()final() structure that let users implement parallelism however they want:
The constraints for Monocypher are more or less, dependable C with zero dependencies. For me that's C89 with volatile, // style comments, and declaring local variables anywhere. My only dependencies are stddef.h and stdint.h, from which I take size_t and the fixed size integers. I have no explicit runtime dependency, not even LibC — though compilers do sometime turn a loop of mine into a memcpy(3) call.
There's not much I can do under such drastic constraints:
No networking.
No I/O.
No explicit program aborts.
No heap allocation.
No multi-threading.
Monocypher does not, and will not, do multithreading. Only support it.
The code you see above is what I plan to ship:
A toolkit for users to write their own implementation of Argon2.
An single-thread implementation that uses that toolkit. The comments there aren't pseudocode, they're just comments, meant to document how one may parallelise Argon2.
Basically, Monocypher will "support" multi-threading by leaving it as an exercise to the user. That's cheating, I know, but as far as I can tell multi-threading is the easy part. Here's my pthreads code, minus error handling to reduce clutter:
I'll need to add proper error handling, account for EAGAIN where appropriate, and perhaps add a couple asserts to guard the functions that are supposed to never fail. The result will go to the user manual, for users to copy & paste, or adapt to their own multi-threading API.
I use a similar approach with EdDSA, by the way. In Monocypher3 I had direct support for an incremental signature API, but the only way I could make it work with both BLAKE2b EdDSA and Ed25519 was a full blows v-table. It did the job, but it ultimately proved very inflexible.
Then one day a company approached me to ad Ed25519ph to Monocypher. Pretty quickly it was clear to me that my incremental interface with swappable hash couldn't do it. I had to take my source code apart to assemble what they needed. It took me but a day, which they graciously paid full rate for.
That work gave me an idea: what if instead of using a v-table to swap in the parts I want into the full algorithm, I instead cut the algorithm into coarse constituent parts, and then use those parts to assemble whatever variation of the algorithm I, or my users, may need? Sure it falls short of direct support, but who cares, as long as it gives us the capability?
I think I managed to make it work. Heres' Ed25519 and Ed25519ph, from the toolkit and SHA-512:
It's not trivial. It's not even easy, which is why it (optionally) ships with Monocypher. But it's possible: one can look at the Ed25519 and Ed25519ph specs, look at Monocypher's API (which you will note hides away the elliptic curve stuff), and come up with pretty much this code.
Argon2 by contrast is genuinely easy. I'm very happy about that, because it removes a major weakness from Monocypher. With that, it will get the compatibility and security that comes with processing parallel lanes in parallel. (One thing that makes password hashing & key derivation so tricky, is how its security is directly proportional to the speed of its implementation.)
Now I need to do some vectorisation... In pure C99. Can't have it all, but I did manage to get significant gains from auto-vectorisation alone. With any luck, I may even saturate the memory bus.
Released a couple of "big" redesigns for Uruky yesterday (settings and landing pages), and I have a couple of job interviews scheduled, which I need to focus on (Uruky's doing great, but it's very far away from replacing a full time job for us).
Meanwhile, our small/indie-web index is growing and I've trimmed like 150k few low quality URLs in the last few days as well. Fun!
I have never heard of this before. And despite the comparison to chess, just a brief read through the rules makes it feel very different than any other board game I've heard of.
Mostly working on building my text editor, like usual. Thank goodness it's fun to work on, because it sure is taking a long time to finish!
My current architecture has served me well for a long time. But I think I need to tweak some of the underlying state management stuff to facilitate proper transactional changes. I'm very inspired by the architecture of CodeMirror 6.
I feel relatively confident I can get what I want using some eventual consistency stuff. I say more about this here if you're curious.
[OP] caius | a day ago
Enjoying Scotland. Quite a large amount of it over a few days.
munificent | 4 hours ago
I hope you have a great time. I took a trip to the UK with my family this summer and Scotland was lovely. We didn't manage to make it out to the Isle of Skye, but we did do a day trip out to the highlands and it was an experience I'll never forget. Simultaneously desolate and beautiful.
veqq | a day ago
Working on Janet infrastructure.
Janet's original package manager JPM is being depricated, so we need to better document the replacements' alternative workflows. I'd previously written this. Janet now does the hard work internally, allowing people to easily build package managers with different workflows on top, working with the same data.
I'm expanding the our support for sqlite3's extended API. First I did some refactoring and now I'm building a bunch of random projects to highlight/explore those extended features, with demos/experiments of:
REGEXPwith janet PEGs usingsqlite3_create_function_v2(each row sttmt ...)Related to the packaging experiments, I worked out a good workflow (related code) for building a whole tool chain on different commitments, with different flags etc. letting me test optimizations. Due to a mistake, I was comparing my global
-O3 nativebuild with unoptimized ones for a bit. So far, I improved equality. Currently, declarative-dsls's test suite runs 25% faster on master and many other whole programs by ~10% compared to the last release!Basically, I'm twiddling my thumbs waiting for the results of a business trip I just returned from, to bear fruit.
tonyarkles | 23 hours ago
Very cool! I don't get to use Janet nearly as much as I'd like, but I have had good fun with it.
stig | 22 hours ago
Off to Barcelona with my wife for our 25th anniversary on Thursday. It’ll be our first holiday without kid in 15 years. Wednesday will be packing, and preparing the house for in-laws to come and house/babysit.
icefox | 7 hours ago
Making up with my partner. I think we'll be okay. :-)
thirdtruck | 6 hours ago
Aww! Hoping that works out.
regedit | a day ago
I've been getting NetBSD 11.0 running on a Netgate SG-1000, the little AM335x box Netgate used to sell as a pfSense appliance.
The stock armv7 image, plus a modified device tree, boots from SD using Netgate's U-Boot without needing any changes to the eMMC. Netgate's Fatboot boot script checks for a UserFatboot variable and runs it if it's set.
The BeagleBone Black device tree sets up the shared pins for MII, but the SG-1000 is wired for RGMII. That seems to have been why I got gigabit link but no inbound traffic. Stripping out the pinctrl setup and fixing the PHY mode and address got one port working.
The second PHY shows up fine in U-Boot, but NetBSD still won't attach it. That's what I'm digging into this week. Reading through the CPSW driver.
I'd like to get a proper board DTS together and build an SD image that other SG-1000 owners can just write to a card and boot.
landon | 15 hours ago
Adopting 2 cats 🐱😸. Also work.
thirdtruck | 8 hours ago
Continuing the job hunt. Even McDonald's didn't get back to us so yeah, it's bad out there. Switching focus back to tech work for a spell.
Prepping for our birthday next week! Also hosting board games both personal and public.
Looking for any financial assistance we can find in the meantime since a combination of the market, misfortune, and morals have left us nearly zeroed out.
kryptiskt | a day ago
It's crunch time at work, so I'll be using my brain power on that for this week, and I'll spend my free time on not-so-demanding things like chill video games and reading.
This weekend I looked at editors as related in the weekend thread and I'm going to try out Sublime Text (as jbauer suggested) for a while, it seems to tick most of my boxes. So far, so good. I like open source, but I don't mind spending money on software, especially so for a small developer-driven company.
Loup-Vaillant | a day ago
I'm currently adding multi-thread support for Argon2 in Monocypher. Without depending on any multi-thread API at all. I'm sticking to the "pure portable C99 with zero dependency" that makes this little library so easy to integrate pretty much everywhere.
Instead I chopped up the API into an
init()update()final()structure that let users implement parallelism however they want:The single thread implementation goes like this:
Early experiments with pthreads suggest this should easily accommodate any multi-thread API.
Next step is documentation, and provide a production worthy code example.
david_chisnall | 13 hours ago
How do you do the sync point in C99? C11 has mechanisms for establishing the happens-before relationship here, C99 does not.
Loup-Vaillant | an hour ago
That's the thing: I don't.
The constraints for Monocypher are more or less, dependable C with zero dependencies. For me that's C89 with
volatile,//style comments, and declaring local variables anywhere. My only dependencies arestddef.handstdint.h, from which I takesize_tand the fixed size integers. I have no explicit runtime dependency, not even LibC — though compilers do sometime turn a loop of mine into amemcpy(3)call.There's not much I can do under such drastic constraints:
Monocypher does not, and will not, do multithreading. Only support it.
The code you see above is what I plan to ship:
Basically, Monocypher will "support" multi-threading by leaving it as an exercise to the user. That's cheating, I know, but as far as I can tell multi-threading is the easy part. Here's my pthreads code, minus error handling to reduce clutter:
I'll need to add proper error handling, account for EAGAIN where appropriate, and perhaps add a couple asserts to guard the functions that are supposed to never fail. The result will go to the user manual, for users to copy & paste, or adapt to their own multi-threading API.
I use a similar approach with EdDSA, by the way. In Monocypher3 I had direct support for an incremental signature API, but the only way I could make it work with both BLAKE2b EdDSA and Ed25519 was a full blows v-table. It did the job, but it ultimately proved very inflexible.
Then one day a company approached me to ad Ed25519ph to Monocypher. Pretty quickly it was clear to me that my incremental interface with swappable hash couldn't do it. I had to take my source code apart to assemble what they needed. It took me but a day, which they graciously paid full rate for.
That work gave me an idea: what if instead of using a v-table to swap in the parts I want into the full algorithm, I instead cut the algorithm into coarse constituent parts, and then use those parts to assemble whatever variation of the algorithm I, or my users, may need? Sure it falls short of direct support, but who cares, as long as it gives us the capability?
I think I managed to make it work. Heres' Ed25519 and Ed25519ph, from the toolkit and SHA-512:
It's not trivial. It's not even easy, which is why it (optionally) ships with Monocypher. But it's possible: one can look at the Ed25519 and Ed25519ph specs, look at Monocypher's API (which you will note hides away the elliptic curve stuff), and come up with pretty much this code.
Argon2 by contrast is genuinely easy. I'm very happy about that, because it removes a major weakness from Monocypher. With that, it will get the compatibility and security that comes with processing parallel lanes in parallel. (One thing that makes password hashing & key derivation so tricky, is how its security is directly proportional to the speed of its implementation.)
Now I need to do some vectorisation... In pure C99. Can't have it all, but I did manage to get significant gains from auto-vectorisation alone. With any luck, I may even saturate the memory bus.
brn | 8 hours ago
Released a couple of "big" redesigns for Uruky yesterday (settings and landing pages), and I have a couple of job interviews scheduled, which I need to focus on (Uruky's doing great, but it's very far away from replacing a full time job for us).
Meanwhile, our small/indie-web index is growing and I've trimmed like 150k few low quality URLs in the last few days as well. Fun!
matthiasportzel | a day ago
My current programming project is an implementation of the beautifully complex chess-like Veney.
ansible-rs | 23 hours ago
In case anyone else is interested: https://veney.xyz/
I have never heard of this before. And despite the comparison to chess, just a brief read through the rules makes it feel very different than any other board game I've heard of.
yiyu | 20 hours ago
This week I’m working on Folune, a minimal, local-first desktop editor for text and Markdown, built with Zig, a native webview, and CodeMirror.
evanrelf | 17 hours ago
Mostly working on building my text editor, like usual. Thank goodness it's fun to work on, because it sure is taking a long time to finish!
My current architecture has served me well for a long time. But I think I need to tweak some of the underlying state management stuff to facilitate proper transactional changes. I'm very inspired by the architecture of CodeMirror 6.
I feel relatively confident I can get what I want using some eventual consistency stuff. I say more about this here if you're curious.