Readit News logoReadit News
boricj commented on JSON Schema Demystified: Dialects, Vocabularies and Metaschemas   iankduncan.com/engineerin... · Posted by u/navigate8310
boricj · 20 days ago
I'm working with JSON schema through OpenAPI specifications at work. I think it's a bit of a double-edged sword: it's very nice to write things in, but it's a little bit too flexible when it comes to writing tools that don't involve validating JSON documents.

I'm in the process of writing a toolchain of sorts, with the OpenAPI document as an abstract syntax tree that goes through various passes (parsing, validation, aggregation, analysis, transformation, serialization...). My immediate use-case is generating C++ type/class headers from component schemas, with the intent to eventually auto-generate as much code as I can from a single source of truth specification (like binding these generated C++ data classes with serializers/deserializers, generating a command-line interface...).

JSON schema is so flexible that I have several passes to normalize/canonicalize the component schemas of an OpenAPI document into something that I can then project into the C++ language. It works, but this was significantly trickier to accomplish than I anticipated.

boricj commented on Ask HN: What Are You Thankful For?    · Posted by u/nerdsniper
boricj · 20 days ago
I am thankful for my coworkers. I'm the kind of software engineer who is a mad scientist in disguise.

Bridging dissimilar message busses with data-driven Lua scripts. Creating a Jenkins SCM plugin that exposes the sources packages of a Debian repository (complete with binary dependency tracking) as an organization folder to turn it into a package builder. Improvising a Git proxy/cache with a hundred lines of Bash to lessen the load on the lab uplink (still load-bearing to this day). Writing a toolchain in Python that takes OpenAPI documents as an abstract syntax tree and run passes on it to parse, validate, aggregate, transform and format it for various needs (such as generating C++ code for data models, dataframe bindings and so on). Delinking programs back into object files and creating Frankenstein monsters from salvaged pieces, and somehow landing a poster presentation about that at ACM CCS 2025 as a hobbyist (this one outside of office hours, but it still triggers brain meltdowns when I talk about it). And so many, many more sins.

I honestly don't know how they are putting up with the incarnation of chaos that is me.

boricj commented on Most Stable Raspberry Pi? Better NTP with Thermal Management   austinsnerdythings.com/20... · Posted by u/todsacerdoti
boricj · 23 days ago
Instead of dedicating an entire Raspberry Pi with fancy pinning and temperature management by burning CPU time, wouldn't a micro-controller and a precise external oscillator fare better for time-keeping stability? I would assume that a STM32 discovery kit running a NTP server on its Ethernet port could probably do better.
boricj commented on My stages of learning to be a socially normal person   sashachapin.substack.com/... · Posted by u/eatitraw
tibbar · a month ago
This resonates. I spent many years going hard at `5: Connection is about projecting love and acceptance`. I focused on providing unconditional acceptance to everyone I met, inviting them to share their burdens and listening empathetically and supportively. People often left our conversations thanking me for the "therapy session."

And in many ways I think this was a positive energy to bring to the world! But eventually I realized that, deep down, I was doing this out of anxiety. I wanted to be accepted and this was a crutch I was using to achieve that. In fact, I was scared of not providing this level of support, because what if I was too aloof and the other person got mad at me? And since people often liked this quality about me, what would I become without it?

Now I mostly focus on ... relaxing. There are times where intense-therapy-like energy will be useful, and I can provide that if I want. But most of the time it's just not necessary. Unlike the author, I don't necessarily have the ability, or practice, to skillfully provide whatever the person in front of me actually wants, but that's ok too. It's ok to just be calm.

boricj · a month ago
> And in many ways I think this was a positive energy to bring to the world!

Or in other words, becoming the landfill of negative energy of the world.

As someone who used to be that person for over a decade, having people endlessly confiding their relationship/health/mental/work/legal/family/gender issues will over time completely wreck your sanity. Because when you're that someone, people will not just tell you the light stuff, but also some really heavyweight and/or deeply fucked up things.

boricj commented on Ask HN: Turned 25, Give Me Your Best Advice for the Next 25 Years?    · Posted by u/skx001
boricj · 2 months ago
Take care of your mental health proactively. Do not let depression run unchecked, or it will end up robbing you of everything you hold dear before you realize it.
boricj commented on A $6B Nuclear U.S. Navy Aircraft Carrier 'Sunk' by $100M Diesel 'AIP' Sub   nationalsecurityjournal.o... · Posted by u/voxadam
markemer · 2 months ago
Isn't this like the exact plot of Down Periscope?
boricj · 2 months ago
It depends, did they sing Louie, Louie while cosplaying as a fishing trawler?
boricj commented on Offline card payments should be possible no later than 1 July 2026   riksbank.se/en-gb/press-a... · Posted by u/sebiw
ExoticPearTree · 2 months ago
> It's not about paying by cash but paying by card offline. How is this going to be implemented I wonder.

Considering that the card has memory on it, you can store there how much balance you have when you do an online payment. The bank can send back your available balance, so you cannot spend offline more than you have.

I can't think about anything simpler than this.

boricj · 2 months ago
You could store money digitally on a card. Moneo did that until 2015 and it was used in France as a wallet for paying meals in school canteens for tertiary education. That system was phased out just as I left university.

I remember writing an app in Java to read the balance on a card with my laptop which had a built-in smartcard reader, because I was too lazy to go to a station. Everyone in the classroom then promptly asked me to check their balance... and a few asked if I could top it up somehow.

boricj commented on The Death of Utilitarian Programming    · Posted by u/pyeri
jfrisby · 3 months ago
Since this is HN, I'm gonna pick a nit.

> A clever and witty bash script running on a unix server somewhere is also not utilitarian coding, no human ever directly benefited from it.

Back around 2010, my friend Mat was doing cloud consulting. He wrote some code to screen-scrape the AWS billing and usage page for an account to determine how much had been spent day-over-day. This was, of course, all orchestrated via a bash script that iterated through clients and emailed the results to them (triggered by cron, of course).

He realized he had startup on his hands when something broke and clients started emailing him asking where their email was. Cloudability was born out of that.

I'd say that both the Ruby and bash code involved count as pretty utilitarian despite running on a server and not having a direct user interface.

boricj · 3 months ago
I'm gonna up the nit.

Several years ago, I was the sysadmin/devops of an on-premises lab whose uplink to the rest of the company (and the proxy by extension) was melting under the CICD load.

When that became so unbearable that it escalated all the way to the top priority of my oversaturated backlog, I took thirty minutes from my hectic day to whip up a Git proxy/cache written in an hundred lines of Bash.

That single-handedly brought back the uplink from being pegged at the redline, cut down time spent cloning/pulling repositories in the CICD pipelines by over two-thirds and improved the workday of over 40 software developers.

That hackjob is still in production right now, years after I left that position. They tried to decommission it at some point thinking that the newly installed fiber uplink was up to the task, only to instantly run into GitHub rate limiting.

It's still load-bearing and strangely enough is the most reliable piece of software I've ever written. It's clever and witty, because it's both easy to understand and hard to come up with. The team would strongly disagree with the statement that they didn't directly benefit from it.

boricj commented on RedoxFS is the default filesystem of Redox OS, inspired by ZFS   doc.redox-os.org/book/red... · Posted by u/doener
craftkiller · 3 months ago
License is the obvious blocker, aside from all the technical issues[0]. Btrfs is GPL, RedoxOS is MIT, ZFS is CDDL. You can integrate CDDL into an MIT project without problems[1], but due to the viral nature of the GPL, integrating btrfs would have impacts on the rest of the project.

What I'm wondering is what about HAMMER2? It's under a copyfree license and it is developed for a microkernel operating system (DragonflyBSD). Seems like a natural fit.

[0] btrfs holds the distinction of being the only filesystem that has lost all of my data, and it managed to do it twice! Corrupt my drive once, shame on you. Corrupt my drive twice, can't corrupt my drive again.

[1] further explanation: The CDDL is basically "the GPL but it only applies to the files under the CDDL, rather than the whole project". So the code for ZFS would remain under the CDDL and it would have all the restrictions that come with that, but the rest of the code base can remain under MIT. This is why FreeBSD can have ZFS fully integrated whereas on Linux ZFS is an out-of-tree module.

boricj · 3 months ago
> License is the obvious blocker, aside from all the technical issues. Btrfs is GPL

WinBtrfs [1], a reimplementation of btrfs from scratch for Windows systems, is licensed under the LGPL v3. Just because the reference implementation uses one license doesn't mean that others must use it too.

[1] https://github.com/maharmstone/btrfs

boricj commented on Cormac McCarthy's tips on how to write a science paper (2019) [pdf]   gwern.net/doc/science/201... · Posted by u/surprisetalk
ixnew · 3 months ago
Care to post the paper here? Would like to read it.
boricj · 3 months ago
I think it's too weak as a paper for me to put out there. I also haven't even applied the minor corrections from the reviews.

If you want to take a peek at the case studies, I've blogged about my butchering of aln across C standard libraries and operating systems [1]; there is also widberg's outstanding write-up of their FUEL decompilation project [2], which uses ghidra-delinker-extension as part of the magic.

If you want to read a paper on the technique, there is the one for Ramblr [3] which I became aware of after the reviews came back.

[1] https://boricj.net/atari-jaguar-sdk/2023/11/27/introduction....

[2] https://github.com/widberg/fmtk/wiki/Decompilation

[3] https://www.ndss-symposium.org/wp-content/uploads/2017/09/nd...

u/boricj

KarmaCake day1696May 21, 2020
About
https://github.com/boricj

https://boricj.net/

View Original