1. 66

I know many of us here have side projects. I’m wondering if there’s a project that you never figured out how to finish. Maybe it requires an non-existent algorithm, or the scope is too large for one person. Despite the barrier, it continues to live rent-free in your brain and you return to it occasionally hoping that you’ll crack it this time.

I’m curious to hear what other people are stumped yet fascinated by.

    1. 32

      An operating system (and likely computer architecture) designed for the problems of the 2020s, as opposed to the problems of the 1970s.

      1. 2

        Oh, a man can dream….

        1. 1

          What are the main problems we have now as opposed to then? I think I understand what you meant, but I can’t think of any right now. Something related to LLMs or climate change?

          1. 5

            I think the obvious thing is things like system security and user model. Back then, you had one big shared system, but also shared namespaces, and multiple users within that. Now, we have a much bigger emphasis on partitioning workloads so that they’re separate from a security and administration standpoint, but tools like cgroups to do this within the existing metaphors are fragile.

            1. 1

              That’s true, but there’s also less that’s stopping us from running an entire OS per application. It might be inefficient and/or not secure enough still, though.

              1. 1

                Thank you! Those look interesting.

          2. 20

            I wrote a proof-of-concept structural editor for Fennel: https://git.sr.ht/~technomancy/anarres

            It’s usable but cumbersome at this point. I spent a lot of time adding a terminal-based frontend in addition to the love2d one, but I found that since I already have 95% of the benefit of structural editing inside Emacs, plus a ton of stuff I’d never get in my own structural editor (like magit, eshell, ERC) it was really hard to force myself to use my structural editor to write itself and click into the dogfooding magic cycle.

            Then once Fennel got a really good LSP server it was basically all over; I realized while it would be much easier to write those features from scratch in a structural editor than in a conventional one, it’s still much harder than just using what other people wrote.

            1. 4

              Hast seen the white whale!

              I get really excited when I find other people who are interested in structural editing. The main problem is that it just isn’t feasible to do the work once per language. It’d be like having to write a new web browser for every website!

              I’m trying to build the protocols and implementation that will split structural editing into a proper frontend and backend, thus creating the economic conditions that will drive continued investment in this technology by many, many individuals such as yourself working in collaboration.

              Please come join the Discord https://discord.gg/NfMNyYN6cX if you’re interested.

              1. 5

                Yeah, I’m really only interested in doing this for lisps, which means it’s a lot easier. Might be interesting to chat anyway, but Discord is a bit of a red flag for me, sorry. Good luck anyway.

                1. 2

                  I do email too, or really long lobste.rs threads or whatever. I just use Discord because that’s where the majority of people who actually want to talk hang out. Here’s a non-social link that might give you some idea what this work is about: https://gist.github.com/conartist6/0b252a705c7e715b82b691e4c8b20329

                2. 1

                  The main problem is that it just isn’t feasible to do the work once per language

                  I think it is possible to create structural editor for all languages at once if you have some format for describing syntax. For example, tree-sitter.

                  Or, if you want to go deeper than just syntax, i. e. to type system, then this project may be of interest: https://lingo-workbench.dev/ = https://petevilter.me/post/datalog-typechecking/

                  1. 1

                    In fact I do have just that! I’ve implemented a tool I called BABLR that is closely related to tree-sitter (and at least as powerful). The common parse result format I came up with I call CSTML, and while I can’t promise the format is completely locked down just yet it has already been through a significant amount of evolution and is capable of doing some real work: https://gist.github.com/conartist6/0b252a705c7e715b82b691e4c8b20329#file-02-parse-result-cstml

                    1. 1

                      Cool! You did a lot of work!

                      You probably will be interested in this: https://www.brics.dk/xsugar/ . This is XSugar. It has similar goals to BABLR, but translates everything to XML. And moreover, it can translate everything back, i. e. it is bidirectorial. And moreover, round-trip property is guaranteed by sophisticated math. Unfortunately, the project is not open source, but source code is available at request. (And as well as I remember, the author sent me a copy.)

                      Unfortunately, I don’t like your BABLR. (I hope you are not offended.) I don’t like it, because you describe languages by imperative code, for example: https://github.com/bablr-lang/language-json/blob/dab4788901970ef09708d105d161bb7ddaa25e64/lib/grammar.js#L78 .

                      I strongly believe declarative style is always preferred over imperative. Tim Berners-Lee agrees: https://www.w3.org/DesignIssues/Principles.html#PLP . See also https://yosefk.com/blog/code-data-and-interactive-programming.html

                      I have a white whale: to create something similar to your BABLR, but declarative. And ideally, bidirectorial, similarly to XSugar

                      1. 1

                        I did do a lot of work didn’t I! And you’re quite free to not like it, I’m not offended!

                        I chose imperative code knowing it came with certain risks, but I like it because it’s strictly more powerful than declarative. For example there are many parsing systems that have declarative means of supporting syntaxes, and I can support every single one of them just by writing the appropriate adapter code to compile out the needed imperative instructions. Even logic programming languages and EBNF parser definitions execute on physical hardware that is imperative.

                3. 3

                  Since realizing this was unrealistic, probably my next white whale is implementing the ideas in Joe Armstrong’s famous “we need letrec” post: https://erlang.org/pipermail/erlang-questions/2011-May/058768.html

                  I have (again) a proof-of-concept that works for Fennel, and it would be very easy to extend to work with Lua modules as well, but you can’t get that far in that ecosystem before you bottom out in C code, and making it work for C libraries is … nearly impossible.

                  1. 3

                    https://erlang.org/pipermail/erlang-questions/2011-May/058768.html

                    Well, first, this is somewhat similar to https://www.unison-lang.org/ . But functions are identified not by names, but by hash of their content instead.

                    Second, I totally disagree with “We don’t need modules” part. I agree with article ‘Modules Matter Most’ for the Masses

                  2. 2

                    I have something that looks basically exactly the same for JavaScript! Even the choice of color (why did we pick yellow?) 😅 https://syvis.surge.sh/ErZoPhsMTcDvGT9pZswo/

                    I’m also not sure if there is any real benefit, so I never properly released it …

                    1. 1

                      Come join the BABLR Discord! https://discord.gg/NfMNyYN6cX

                      I am try to create this technology in such a way that it’s a serious threat to replace VSCode, and I would greatly value feedback from anyone who has real-world experience trying to build and use these tools!!

                      1. 1

                        Also for the record Hazel picked the same color for their structural editor too: https://hazel.org/build/dev/

                    2. 17

                      An RFC 5545 (iCal) RRULES reference implementation that is lovingly commented and written in a style I would actually call good.

                      Too many implementations are obscure in that they don’t obviously map to the standard or are built with constructs that are overly language-specific (usually in the name of ergonomics or performance).

                      This is sad, because nearly every enterprise software I’ve ever worked on has wanted to implement some user-facing scheduling interface that is beyond what Cron-like rules could give you, but the RRULES libraries I’ve used (across several languages) have varied greatly in quality, and are extremely difficult to follow along with for the purposes of debugging your own code.

                      This is also sad because there are many interesting algorithms implied by the standard that, so far as I’ve seen, simply don’t have a reference implementation or even an explanation for why they work. (c.f. formulas for determining the ISO date-week of a day-of-year ordinal, and how that formula might be mapped to weeks beginning with a day other than Monday). So a body of knowledge is being lost to time in closed-source repos, under-maintained and under-commented open source repos all cargo-cult copying each other (note how many implementations introduce a function called pymod to emulate the sign-preserving behavior of python’s modulus operator, indicating a lineage to python’s dateutil library, the original being probably the best in the lineage for readability but suffers too from a lack of explanatory comments outside of its public interface), and linkrot.

                      I’ve been working on one myself (this time in golang) off and on for a few years, but it’s slow going since I have a 4 year old and a job that absorbs most of my creative coding capacity, and the fact that nearly every step of the way is about 10% programming and 90% historical deep dive on Dominical calendars or something.

                      1. 2

                        I wrote one of these that I actually kinda liked some nine years ago…. for a job, so it was their property (and in their weird internal proprietary scripting language, but if i had the copyright it was close enough i could port it to normal languages) :(

                        Spent quite some time on it and i was kinda proud but i could never take it with me without the copyright/NDA fears. I still wanna redo it some day.

                        1. 1

                          I’d love this! I started work on an iCal implementation 4 years ago, inspired by work, and then left it half done. I recently got inspired to pick it back up but am not excited to do the work without a reference.

                        2. 15

                          Next Generation Shell. The scope is huge. I’m 11 years into it. I’m at around half. Could use help but I suck at attracting contributors. I’m still on the project and plan to continue.

                          https://github.com/ngs-lang/ngs

                          1. 14

                            A real, modern and user-friendly Make replacement. A build system that makes no assumptions about what you want or what kind of thing you’re making with it, one defined by rules and rule dependencies rather than some notion of “libraries” and “compile flags”, one where a rule to query pkg-config to set your compile flags is just as easy and well behaved as a rule to run cc, with no intermediate configuration step. One with strong, builtin, support for complex path and string manipulations, and where piping the output of one rule into the input of another is first class. One with easy to read and easy to write syntax. And one where out of source builds are just as easy to write as in-source builds.

                            There are so many things framed as being a “next gen make” that just don’t actually fill Make’s niche. I don’t even really like Make’s niche, but it’s absurd that Make is still all we have for it.

                            1. 6

                              I definitely agree, and I’ve also tried a lot of Make “reimplementations” like Jake/Rake/etc. My personal pet peeves are the lack of multiple outputs and dynamic dependencies, and none of these language-specific implementations fix it. I’ve even found some bugs in Jake that I don’t really know how to reproduce when the dependency tree gets a bit too complicated.

                              Have you read Build Systems à la Carte? Shake looks like the only one that does it right, the only reason why I wouldn’t necessarily recommend it is that you might not want a dependency on GHC (the build rules are just a Haskell file), but with an embedded language like Lua it might work.

                              1. 7

                                Thing that nobody knows: GNU Make do support multiple outputs! They was added in 2019 ( https://git.savannah.gnu.org/cgit/make.git/commit/?id=8c888d95f61814dd698bf76126a9079234080d77 ). This feature is available using &: syntax

                              2. 2

                                Another one worth checking out is tup!

                                1. 2

                                  This is my white whale, too. Here is my feature list:

                                  • Git integration. If some file is output, but accidentally added to git or not added to .gitignore, then warning should be printed. If some file is input, but added to .gitignore or not added to git, then, again, warning should be printed. Moreover, .gitignore can be generated from Makefile
                                  • You don’t need to explicitly write command for make clean
                                  • My make should support optional caching of rule results
                                  • If rule 1 depends on rule 2 and rule 2 produced the same file (i. e. binary identical) to previous version, then rule 1 should not run. (As well as I understand, GNU Make has no such feature)
                                  • Support for multiple outputs of a rule
                                  • Outputs should be deleted if command returned non-zero (this is not default in GNU Make)
                                  1. 1

                                    Yes strongly agreed on most of these, but especially on make clean

                                  2. 1

                                    I want that too. One thing I saw that looks promising is knit, but I haven’t tried it yet.

                                    1. 1

                                      I think the mill build system is just genius. I believe a Make-like system is too simplistic, but with only a tiny bit more complexity, you get the best of both worlds. You just write functions, that call other functions. A function’s output value, be it a path, or a string or whatever can be cached and evaluated in parallel. And that’s it.

                                      Meanwhile, you can make it as expressive as you need, and everything maps neatly to a folder hierarchy, making the current state of things always clear.

                                    2. 13

                                      My holy grail is a programming system / game engine where I get all of the following built-in to the environment:

                                      • Live code updates (ideally, multiple versions of a function can exist at once and have their outputs compared)
                                      • Time travel (such that I can see a bug, rewind the state of the game to a good state, fix the bug, then continue playing)
                                      • Coroutines (manually building state machines for scripted logic that needs to take place over multiple frames is pointlessly masochistic IMO)
                                      • Save games without writing explicit serializers, that are stable in the face of code or asset changes

                                      Some of these goals conflict with each other in deep, possibly unsolvable ways, but that doesn’t stop me from continuing to turn designs over in my head. I don’t know that it’s doable without building my own programming language and runtime.

                                      1. 8

                                        Love2D gives you the first three (rxi has a tiny library for code updates and IIRC there’s a time travel library floating around too), and the fourth point “Save games without writing explicit serializers, that are stable in the face of code or asset changes” is just how you design your schema (I personally would choose something like sqlite3 because it’s touted to be faster than a filesystem, compressable, and also it’s much more malleable than alternative database formats in the given space).

                                        1. 2

                                          I’ve gone pretty far with love2d and Fennel, but there are a lot of practical caveats to code reloading, especially if you want to prefer bare functions to OOP - you really need to be consistently calling reloadable functions by indexing into a table, everywhere, for it to work smoothly.

                                          I’m sure there are time travel libraries for love2d, but I suspect they’re built for mechanical purposes, not development workflow. There’s no way they’d be able to rewind a coroutine, for example, or an unhandled crash. Ideally time travel could work everywhere.

                                          My savegame ideal is something like, say, Adventure Game Studio, where you don’t really need to think about savegames at all, you just write your game logic, and there’s a generic serializer that can write out the game state. It should at least be possible to express data migrations, though, which I believe AGS falls down at. Explicit schema for all game state isn’t a bad idea - I suspect it may not actually be possible to do this in a principled way without it - but that is in conflict with any game state stored implicitly in coroutines and closures. It would be nice to have some way of bridging that gap.

                                        2. 8

                                          This is not the same thing, but it reminded me of the Tomorrow Corporation Tech Demo and I wanted to share.

                                          1. 4

                                            Oh, thanks, I’ll have to watch this!

                                            EDIT: Watched it and I’m losing my mind a little, haha! There’s stuff going on here that I’ve barely dared to dream of. Much to chew on.

                                          2. 4

                                            Save games without writing explicit serializers, that are stable in the face of code or asset changes

                                            This overlaps with Erlang’s hot-loading mechanism if you squint the right way. In particular, the way that a new Erlang deploy can ship with “upgrade” functions per-module which take version N-1 of the module’s state and return version N.

                                            Erlang can do this without a type system because you never have to think about anything but version N and version N-1, but what you’re describing might have to deal with versions 1 thru N, so that might push the limits of what you can do without formalized types.

                                            1. 3

                                              Yeah, a lot of my thinking about this stuff often ends with me going “actually Erlang pretty much already works like that, doesn’t it?” I think “not handling version N-2” is OK and often necessary (there’s not much you can realistically do with a savegame that’s in the middle of a level that no longer exists), but you’d want a simple, consistent way to revert to a sane valid state when a migration isn’t possible or available. Certainly, from the perspective of building a development workflow with instant iteration, it’s probably almost never going to be worth the effort to write an explicit migration - that’s more necessary for handling the case of releasing a patch without flushing every player’s saves down the toilet, which AGS absolutely will do if you are not very careful.

                                            2. 2

                                              Also what you describe is similar to this: https://poignardazur.github.io/2023/02/02/masonry-01-and-my-vision-for-rust-ui/ (the post is mostly not Rust-specific)

                                              1. 1

                                                What you are talking about is very similar to this: https://vimeo.com/906418692 , especially at 10:50

                                                1. [Comment removed by author]

                                                2. 12

                                                  Oh, do I have those! Just a few:

                                                  1. Formally verified routing protocol stack. Ada/SPARK is a perfect language for those things. It “just” needs a lot of time to actually get it done.
                                                  2. Getting Pigdeon back and having all my chats across protocols in one place — limited by the fact that messaging protocols all want to lock you into the “official app” much harder than ICQ ever did…
                                                  3. Better editing and auto-export of orchestral parts from full scores. [1]

                                                  [1] Sure, MuseScore and LilyPond do a decent job. Decent is not great, though. I’d really love to be able to mark some phrases as “cue notes for ” rather than maintain them by hand, for example. Multi-measure rests that have rehearsal letter inside can also be very dodgy and require hand editing to ensure that the trombonist (or whoever) who’s waiting 128 measures until her solo actually knows where people are when the conductor says “let’s play from the letter K” when that letter is at measure 64 of those.

                                                  1. 9

                                                    As a rest-counting trombonist, I feel very seen right now.

                                                    1. 4

                                                      Well, yes, it doesn’t help that a lot of composers and arrangers aren’t wind or percussion players and don’t have any personal experience with counting multi-measure rests. Which is a curious divide between the end use of the software and the end user of its output.

                                                      A funny story on the subject: one time a conductor said “let’s play from K”, I started playing from there, but a few measures into it the conductor stopped us all and asked “what on earth is that polyphony that you and the other clarinet are playing?”. It turned out that the editor (Sibelius, I think) misplaced the letter due to a layout issue and put it one measure later than it was supposed to be, so what was supposed to be a unison line became a canon when we played it as printed.

                                                      1. 3

                                                        The notion that a composer or arranger has the requisite skills to make a decent engraver is where I think the breakdown occurs. It’s a related, but distinct, set of skills.

                                                        That said, I’d rather see more new rep in the world than improved engravings of existing works, so I am in complete agreement that making new work easy to get right in ink is a noble pursuit. Fixing the errors and awkward layout of existing editions mostly isn’t worth the effort/money.

                                                        1. 4

                                                          That question of roles is interesting, actually. In the oldschool process, the role of the engraver or typesetter in publishing was to arrange a bunch of symbols in a legible and visually pleasing manner. They wouldn’t make any decisions about what symbols to put in metal, unless they also had some other role — maybe it was the case in smaller publishing operations, I’m not old enough to know. ;)

                                                          But my point is: it’s certainly possible to just place rehearsal letters every 16 measures, and that would be an ok solution. But a great score (in my opinion as a performer and a composer) should have letters at logical subdivisions rather than just at even intervals. If in a sonata form there’s no letter where it transitions to the second subject group, or there are no letters at solos, people are doomed to waste precious rehearsal time at overplaying or communicating stuff like “five measures before K”. But the person who knows best where major transitions and solos are is the composer/arranger or the editor — the engraver is a visual artist first of all, who may not even be well-versed in musical forms or performance practices, and doesn’t have to.

                                                          Regarding old music, I believe that all popular stuff should be typeset and published online under permissive free culture licenses so that if someone wants to arrange the overture from Weber’s Oberon for a vuvuzela choir, they can just start from a readily-editable version. It could be done in a very distributed fashion, but I have no idea how to inspire enough people to do just a little bit of work to make it happen.

                                                    2. 2

                                                      Getting Pigdeon back and having all my chats across protocols in one place

                                                      Agreed. Also I want to manually mark messages as read and unread

                                                    3. 23

                                                      I think “git” is our white whale. We know that there are better designs and solutions, yet we are stuck in a local optimum, unable to improve.

                                                      It’s a learning barrier for newer generations of coders around the world.

                                                      1. 8

                                                        It’s early days yet, but Jujutsu (LWN intro) looks like it is making progress in that area

                                                        1. 3

                                                          I’ve only been using jj for a cople months, and even with nothing more than a CLI and a complete lack of support and tooling, I’m giving up git forever.

                                                          1. 2

                                                            jj is definitely a step forward, but i think it’s still something targeted toward engineers.

                                                            Early career folks, game artists, data science folks could use a higher level abstraction to get productive quicker.

                                                            1. 1

                                                              What would the solution for them look like?

                                                          2. 6

                                                            It’s not just Git, but a better workflow for patches that isn’t email & definitely isn’t pull requests which really slows down the whole process. Something needs to be done about bringing the D (distributed) back in DVCSs, but not sure ActivityPub or Radical will either have the uptake or are the best way to do it.

                                                            Would love to see (or build) a realtime interactive, tool for managing the patches situation on an existing lightweight decentralized platform like XMPP.

                                                            1. 3

                                                              Would love to see (or build) a realtime interactive, tool for managing the patches situation on an existing lightweight decentralized platform like XMPP.

                                                              Which problem would it solve?

                                                              1. 1

                                                                It feels like there is some sort of realtime collaboration element missing for certain classes of patches—especially the kinds that need help getting over the WIP hump when the collaborator isn’t familar with the project. Despite it being the common denominator for decentralized communication, email is doesn’t allow edits (like force push) for some kinds of reviews. You can’t really build an interactive application on traditonal email either which is something you might want ta do while working thru a review in realtime—with Delta Chat being an exception provided the email host can keep up. Sometimes it seems pairing + review should converge with interested parties on their, & a centralized platform shouldn’t always be seen as the necessary solution for the task.

                                                                webxdc show some novel ideas of running distributed apps thru chat apps that don’t demand a centralized server & just piggyback on the encrypted chat connections you already have.

                                                                Being able to merge in already-passing patches are done via Gerrit & similar I think, but still largely aren’t popular for unknown reasons.

                                                            2. 2

                                                              What do you mean by “learning barrier”? If you mean the names of the commands, and the flags, I agree

                                                              So I just use a shell wrapper around git with my own names. Like git.sh merge-to-staging

                                                              https://github.com/oilshell/oil/blob/master/devtools/git.sh

                                                              So then I don’t really need to remember git syntax. I just get it working once, put 5 lines in a shell script, and I’m done

                                                              Otherwise, I find that git is very fast and useful. I like how I can clone contributor forks and run their code and play with it. I couldn’t do that with previous non-distributed VCS

                                                              1. 3

                                                                I have the experience of being a git contributor, while having to teach young teenagers(my brother and cousins) fundamental programming at the same time.

                                                                The concept of git is not intuitive for new comers. The UX is also very “hard” and take months if not years to get used to.

                                                                High school, university students need something fast and intuitive to get productive quickly. And git, fork-pull request workflow are not it.

                                                            3. 10

                                                              My current project stems from a significant disdain for most programming languages.

                                                              I’ve been working on an open-ended space game named Nebula, starting and re-starting work several times since 2011. In 2016, after being fed up with existing programming languages and ecosystems, I aspired to build my own. It’s now been 8 years, and a minimum of 18 different languages later.

                                                              The upside is that this nearly decade-long yak shave may finally be coming to an end. Maybe I’ll get back to the stars before 2030. I wouldn’t trade this journey for anything, though. I wouldn’t be the programmer I am without going through it.

                                                              1. 3

                                                                I too have a space game started in 2011 that I never completed, but which taught me so much that regular work projects never would.

                                                              2. 9

                                                                It’s more of a game design white whale, but also curriculum, interface, and language design:

                                                                I want to make a game where the player learns a magic system involving some serious programming concepts, particularly abstracting beyond a low level machine. Been working on this in varying levels of intensity since 2008 at least, I’ve mostly only accumulated a long list of negative properties, most recently written up as Triangulating a Game Design. Recently I’ve approached it through puzzle game rules and solvers, last month I made this prototype, but I think this may also be a dead end.

                                                                It’s at least led to some other interesting ideas: Fitting Words started off as an attempt at a spellcasting system for it, PrograMaze was about putting the player inside the code, both turned out tricky in puzzle-y ways. Tree editor sketches tiramisu (newer video), ecola, and In the Round were about trying to make editing feel game-y.

                                                                (Every decade or so I’ll rewrite my NES-on-N64 emulator in a different assembler, but at least that gets to a playable state.)

                                                                1. 3

                                                                  You should check out the recently announced LOK for another game exploring weird magic via spell mechanics. It’s not programmatic like Baba Is You, but in that direction.

                                                                  I’m very interested in this concept as well. Thanks for the links!

                                                                  1. 1

                                                                    Yep, I have a hard copy of Lok, and Abdec. Very cleverly made, and fun to work through!

                                                                2. 9

                                                                  I want to generate GPU drivers from datasheets.

                                                                  1. 3

                                                                    Hard mode: generate GPU firmware from datasheets!

                                                                    1. 2

                                                                      Smile mode: generate GPU gateware from datasheets.

                                                                  2. 8

                                                                    A HTML+CSS+JS+Electron solution for building apps, but done well.

                                                                    It seems like OS manufacturers failed to conclude on a single approach, so H+C+J+E had to born. Now we know what we want to achieve, I’d create a solution from scratch and leave the 30 years of ballast behind.

                                                                    1. 4

                                                                      but done well

                                                                      So without the HTML+CSS+JS+Electron parts :)

                                                                      1. 4

                                                                        Yeah I had the same reaction, but prompted by “leave the 30 years of ballast behind.”

                                                                      2. 3

                                                                        Agreed. Electron is bug-ridden. Once I wanted to build app, which contains embedded browser. I thought that Electron will be perfect solution, so I picked it. I thought: “Electron is already browser, so having another browser inside it will work ideally”. And I wrote my app in Electron. I implemented subbrowser using BrowserView. And I found multiple BrowserView-related bugs! https://github.com/electron/electron/issues/22174 and https://github.com/electron/electron/issues/31424 . So, Electron sucks in exactly field it is designed for!

                                                                        (In case my message is unclear: I wanted browser in my app. I. e. one browser inside another. And I used BrowserView for this.)

                                                                        Moreover, Electron uses stale bot! And mentioned issue https://github.com/electron/electron/issues/31424 was closed by stale bot, despite being reproducible!

                                                                        I wrote a very small project, consisting of total 170 lines (!), and during writing I reported 3 bugs (not counting 2 bugs above, which were reported by other people).

                                                                        And nobody fixed these bugs! They are either closed by stale bot, either as “won’t fix”, either still opened.

                                                                        Electron sucks

                                                                        1. 2

                                                                          I’d like to see this, but without the Electron. I already have a browser, I don’t need a full Chromium instance. Maybe something that runs your normal browser headlessly, so it can share its resources.

                                                                            1. 2

                                                                              Tauri is utilizing the webview feature of the underlying OS (a differently wrapped chromium), still needs html, css and js. Best part is that you can outsource some logic into Rust.

                                                                          1. 8

                                                                            For me it’s making topographic maps from height data with smooth height lines. Pretty much every tool out there samples points at some regular interval (e.g. marching squares) so you can see line segments in many cases. I want smooth lines (mathematical curve segments) but my math skills are not good enough. Yet!

                                                                            1. 3

                                                                              Assuming you already have the line segments from some variation of alphashapes or something, I think you could take a subset of the vertices and use polynomial interpolation and just plot out the pixels.

                                                                              I’m sure there’s something wrong with this assumption, I do a lot of geospatial stuff at work (more rasterization based), and there’s always some hitch, but hopefully it’s at least a place to look?

                                                                              1. 1

                                                                                That sounds interesting. I might be able to help? DM me if you’d like.

                                                                                1. 1

                                                                                  Earth ain’t smooth, tho.

                                                                                  1. 4

                                                                                    It’s true. I want smoothness for aesthetic reasons, not accuracy ones

                                                                                    1. 2

                                                                                      Cool carry on then.

                                                                                  2. 1

                                                                                    If your ultimate output is discrete points, you might be able to use sinc interpolation.

                                                                                    1. 1

                                                                                      I bet you could do an algorithm almost identical to marching squares except:

                                                                                      1. For every square-side that straddles a contour, use linear interpolation to decide “where” the contour crosses the side, instead of using the midpoint of the side.

                                                                                      2. Once you have your connected components, draw them using an appropriate spline (centripetal Catmull-Rom?) instead of piecewise linear. That sounds scary, but in the end it’s just polynomials. You can either sit down with the right book and play around until you get it right — or, most likely, you can farm it off to some library.

                                                                                      1. 4

                                                                                        I sent this directly to edwardloveall, but since there’s discussion I’ll paste it here too. Basically I’m agreeing with hobbified, but with more detail.


                                                                                        I’ve run into a problem with some overlap: taking a description of a ship hull, given as a sequence of coordinates of points along the hull, and producing smooth lines out of them. So I think I know one way you could approach the problem.

                                                                                        The Problem

                                                                                        To make sure we’re on the same page, here’s the problem statement I’m imagining.

                                                                                        As input, you have:

                                                                                        • A coordinate space. X and Y are flat, Z is height.
                                                                                        • A 2d grid of heights. It has a resolution in X and Y, which is how far apart the grid points are. Each grid point gives the elevation at that point.
                                                                                        • A set of desired contour line elevations. E.g. maybe you want a contour line every 20 feet of elevation.

                                                                                        As output, you have:

                                                                                        • Smooth contour lines, at every point the terrain passes through that elevation level.
                                                                                        Proposed Solution

                                                                                        My thought was the same as hobbified:

                                                                                        https://lobste.rs/s/3a4zga/do_you_have_any_programming_white_whales#c_c8q6nl

                                                                                        But in more detail:

                                                                                        Think of your input 2d grid of heights as a bunch of squares. Do linear interpolation along every edge of every square, to determine where contour lines cross that edge. Call each point at which a contour line crosses an edge of a square a crossing point. For example, if a square edge goes from elevation 10ft (at one corner) to elevation 50ft (at the adjacent corner), and you want a contour line at every multiple of 20ft, then there are two crossing points along that edge. There’s a crossing point 1/4 of the way along it for the 20ft contour line, and a crossing point 3/4 of the way along it for the 40ft contour line. Organize the crossing points for every contour line height into lines and loops. For example, perhaps you have 22 crossing points at height 20ft, and 12 of them form a loop, 6 of them form another loop, and 4 of them form a line that goes off the edge of the map. You know that two crossing points are “next to” each other in their line/loop if the edges that they’re on share a point in the 2d grid. To be clear, you don’t have any curves yet, just sequences/loops of crossing points, where each crossing point is on the edge of a square. Draw each contour line as a smooth curve connecting the crossing points! What you need is an algorithm that takes a sequence of points and produces a smooth curve that passes through those points. Fortunately there is a perfect algorithm for this. It has the frightening name “cubic centripetal Catmull-Rom”, but it’s not too bad. It takes four points A, B, C, D, and it makes a smooth curve between B and C. So if you have a loop like (A, B, C, D, E, F, A, B, …) then you invoke it with F, A, B, C to get a curve between A and B, then you invoke it with A, B, C, D to get a curve between B and C … etc … and finally you invoke it with E, F, A, B to get a curve from F to A. On the other hand, if you have a line (A, B, C, D, E, F) with two ends A and F (b.c. your contour line went off the edge of the map), then there’s a question of what to do to get a curve from A to B since there’s no point before A (likewise with F). What you can do for that is invent a new point before A with BeforeA = A - (B - A) and a new point after F with AfterF = F - (E - F) and use those. Alternatively, you can just let your contour lines end near the edge of the map if you can afford to throw away the edges of the data. You might be able to find an existing library that does Catmull-Rom in your language. But also it’s not horrible to implement yourself. I did so here, plus there are multiple sample implementations on Wikipedia:

                                                                                        https://github.com/e-matteson/lapstrake/blob/master/src/catmullrom.rs

                                                                                        Note that most of the examples use 3-d points, whereas you just need 2-d points, since each contour line is (by definition) at a fixed height.

                                                                                        Another Category of Solution?

                                                                                        Another sort of solution I could imagine is an algorithm that interpolates points inside each square, but is smart enough to take into account more than just the four corners of the square. For example, if you have a square like this:

                                                                                            4 ? 4
                                                                                            ? ? ?
                                                                                            4 ? 4
                                                                                        

                                                                                        then there’s only really one sensible interpolation for it, it’s flat:

                                                                                            4 4 4
                                                                                            4 4 4
                                                                                            4 4 4
                                                                                        

                                                                                        However, suppose you looked further afield, and saw the squares around that square:

                                                                                        1 ? 1 ? 1 ? 1
                                                                                        ? ? ? ? ? ? ?
                                                                                        1 ? 4 ? 4 ? 1
                                                                                        ? ? ? ? ? ? ?
                                                                                        1 ? 4 ? 4 ? 1
                                                                                        ? ? ? ? ? ? ?
                                                                                        1 ? 6 ? 6 ? 1
                                                                                        

                                                                                        Then you might interpolate the ?s in the square more like this, since it’s looking more like a hill top:

                                                                                        1 ? 1 ? 1 ? 1
                                                                                        ? ? ? ? ? ? ?
                                                                                        1 ? 4 4 4 ? 1
                                                                                        ? ? 4 5 4 ? ?
                                                                                        1 ? 4 5 4 ? 1
                                                                                        ? ? ? ? ? ? ?
                                                                                        1 ? 6 ? 6 ? 1
                                                                                        

                                                                                        Those exact numbers are pretty arbitrary, but hopefully you get the general idea.

                                                                                        I don’t know of any algorithm that does that though. (Which isn’t to say there isn’t one. I don’t know this space much at all.) When I imagine how this sort of interpolation might work, I imagine it using quadratic or cubic equations, and minimizing curvature differences while fitting the points.

                                                                                        If you were able to interpolate inside the square more accurately like this, then you could turn a 2-d grid of heights into a 2-d grid of heights with higher resolution. And then you could continue to do something simple like marching-squares on the higher-resolution grid, but if the resolution was high enough you wouldn’t see the line segments anymore.

                                                                                        Curious if anyone knows a nice algorithm that does this sort of thing.

                                                                                        1. 5

                                                                                          What you’re describing at the end sounds like bicubic interpolation. It uses a 4x4 neighborhood, as you describe, and it gives an output that’s continuous and has continuous derivatives. It’s a super common utility function in any graphics library, or you can even get a GPU to do it for you.

                                                                                          And yes, I think the idea of upscaling using a smooth algorithm like that before contour-tracing would probably work fine. And it has a nice property: if your goal is to make a pan-and-zoomable map, you just have to take some subset of the source data and upscale it to a number of points that’s about the same as the number of screen pixels, and then all of the line segments should be about 1 pixel in length!

                                                                                        2. [Comment removed by author]

                                                                                      2. 8

                                                                                        A more modern IdleRPG that runs in Slack or Discord.

                                                                                        Your character just automatically wanders around a map, occasionally fighting randomly generated monsters. Your interaction with the character is giving them a spot on the map to walk towards, or just telling them to wander randomly. Maybe picking a “side”, so that players can fight or aid each other if they randomly encounter each other.

                                                                                        But I could never quite figure out a game loop that both runs through the automated “bot-haviors” of the players, as well as accepting actual commands for them. And I’m too lazy to read up on how to do this, or ask anyone else, so the project has been started-and-abandoned at least five times now, across three different languages.

                                                                                        1. 2

                                                                                          it sounds like you want determinsitic processing so that it can all happen on demand when someone finally interacts to get state

                                                                                        2. 6

                                                                                          For me it’s a thing i’ve been daydreaming about for years, just can’t quite get the design right.

                                                                                          I experience a lot of anxiety around “tasks” and “project management” , but i’ve found it all necessary to remember to get things done. The part that really bugs me ends up being around timelines, time estimation, etc.

                                                                                          When i did some research i learned about polychronic time based cultures and it really clicked with me.

                                                                                          I really want to build some sort of software for project management that is tuned to a polychronic thinker. Some thoughts i had at times were more “context” based tasks then time based or scheduled - perhaps ranking of things more by priority. There is a huge “team” dimension to this that im trying to figure out. It would be interesting to blend other peoples priorities on a particular task or step in a project to help me (as the project “doer”) to understand how it fits into their priorities - this is sort of an inversion of how a lot of PM software works.

                                                                                          Anyway its still all just random thoughts. Just somethign i think about from time to time and try to piece out.

                                                                                          1. 1

                                                                                            This sounds pretty interesting. What are some design choices you’ve discarded? Do you have a sense for what a good design would look like?

                                                                                            1. 1

                                                                                              I wish i would have been more vigilant of taking notes as i built things. My first designs have been more or less a “task” manager sans due dates. To help group and categorize things i was thinking of tags or contexts, but didn’t really like any of it.

                                                                                              The thought process im on now is more of a “space” for each project. Then within that space i would group things by people. This might be specific people or abstract groups (customer profiles, etc). My mindset on this is not very developed yet, but the feeling i have is any work that rises to the level of a “project” ultimately is an obligation to a group of people.

                                                                                              What i like about this way of looking at it is it helps me remember that there are always multiple actors in play and they all have different needs or desires. I like to think of it this way rather than a list of requirements, because it reminds me that these things can be flexible, and again its an obligation i have towards a person, not an abstract design.

                                                                                          2. 6

                                                                                            I experimented a bit in making a program to replace both the terminal and the shell. I’m tired of having to interact with my computer like they did in the 60s when I know things like SmallTalk existed.

                                                                                            This would have a client-server architetture with json/s-expr sent over the wire representing the UI. The main thing I want are: statically compiled server for easy installation and built-in web frontend as client (for this I was using golang and initially a (p)react spa for the frontend but I may reconsider)

                                                                                            The main thing I want is having nested ssh connections as nested windows (i find this extremely intuitive as ssh is just a portal to somewhere). Now I’m doing some experiments about how to represent the UI minding that some pieces of the UI can be on different machines

                                                                                            I think this is solvable but may need far more time than I expect, surely more problems will rise up later like what language to use for scripting

                                                                                            (yeah I don’t use Emacs and I know I should start just using that but we can dream)

                                                                                            1. 4

                                                                                              to replace both the terminal and the shell

                                                                                              Lash#Cat9 did exactly this. Shell, which replaces both shell and terminal. https://arcan-fe.com/2022/10/15/whipping-up-a-new-shell-lashcat9/

                                                                                            2. 6

                                                                                              I wanted to make a multiplayer simcity, where each player would control a different company/sector of the country: water, electricity, transport, the mayor. I drafted some ideas, but it’s way too much work for just one person, and I need the time to get money for food :)

                                                                                              1. 1

                                                                                                I always thought massively multiplayer sim city would have been the way to go.

                                                                                              2. 6

                                                                                                An interactive interface for OS instrumentation, monitoring and control. Basically something that would expose the information you normally get from procfs and sysfs, but in an interactive, graphical format. Something that would allow you to, say:

                                                                                                1. Right-click on a program’s window, select “Process Info”; and that gives you another window, with the kind of information you could get from /proc/<pid>. This is the easy part. Now come the cool parts; you could:
                                                                                                2. Say, click “debug” on one of its pages under “memory”, and that opens a kernel debugger session to examine that process’ page table entries.
                                                                                                3. Use that interface to adjust “swapiness” for those pages; or dump them; or install alerts; or get a handle to those pages, so that you can use it for scripting (e.g. to intercept system calls that reference these pages).
                                                                                                4. Install various quotas on that process. Open a “quota window” with various categories, like “interactive processes” or “background daemons” and just be able to drag-and-drop processes into any of these; then right-click a process in those categories, select “make this permanent”, and the process gets those quotas forever after boot.

                                                                                                Or things like getting a list of IRQ vectors, and installing various instrumentation probes on them, or even point the thing at a file with IRQ handling code and tell it here, install this handler.

                                                                                                Many of these things have been tried before, in various forms, but few of them have been tried together on modern systems. For many of them, the real problem is that I don’t know what a good graphical interface would look like. And obviously there’s a lot of OS glue layer code. I don’t think this is something I can realistically implement by myself, for a modern system, even if I’d be working on it full-time. But it’s a cool thing to dream about.

                                                                                                1. 2

                                                                                                  This is my white whale, too! And I know a simple way to implement big part of these features. Divide task to two parts. One part represents all system interfaces as “objects”. Object is a thing, which have properties and methods. All these properties and methods can be discovered dynamically. Properties may be objects, too. Or lists of objects. And second part is GUI “object browser”. It doesn’t know any specifics of OS, it just let you to interact with objects.

                                                                                                  As well as I understand, this is original meaning for OOP from Smalltalk

                                                                                                  1. 2

                                                                                                    Indeed, this is a very Smalltalk-like system – in fact, the first time I saw this whale was back when I ran into the first papers on object-oriented operating systems many years ago. I don’t think the architecture of such a system is a major stumbling point anymore, at least not in terms of general organisation, as there is ample prior art and literature on the topic. Maybe there’s some minor innovation involved when it comes to securely exposing subsystems that aren’t commonly available for inspection to userspace components (e.g. interrupt handling), or exposing these interfaces as network endpoints, but by and large this isn’t a subject of fundamental research IMMHO, or in any case, not anymore, it’s “a simple matter of programming” :-) at this point.

                                                                                                2. 5

                                                                                                  I have a few of these, and they’re all mostly doable but I don’t have the perseverance to see them through.

                                                                                                  The one that I’m feeling pretty confident I’ll finish is X11 bindings for OCaml, which I’d like to use to write a window manager in the style of XMonad. I’d also like to integrate the wm with wlroots to make it possible to have a window management “core” that could be shared between X11 and Wayland, but that’s a stretch goal :)

                                                                                                  Another is a “system” “scripting” language that would target the Linux kernel and would have no dependencies, not even libc. The language would be an ML-like with a syntax that would kind of look like she’ll commands. It would supposedly replace /bin/sh, so it’d have a REPL and it’d reimplement the functionality of the coreutils. Stretch goal would be to use that instead of shell in a NixOS fork. I haven’t even started working on this one.

                                                                                                  1. 3

                                                                                                    You might find https://github.com/tonyg/xcb-shim interesting or perhaps even useful.

                                                                                                    1. 2

                                                                                                      Thank you! Looking over the readme it looks like we ran into a lot of the same problems :)

                                                                                                      I’m actually mostly done with the part where I look at the protocol spec and try to understand what the hell they were thinking, now I’m mostly going over the OCaml API and trying to make it as nice as possible.

                                                                                                  2. 5

                                                                                                    A Common Lisp implementation with a runtime supporting green threads (think Erlang or Go). I never figured out how to finish because I never really started, and I get headaches thinking about bootstrapping or the future GC. One day maybe.

                                                                                                    1. 4

                                                                                                      I started something you might find somehow interesting, a Common Lisp-ish language implementation with delimited continuations, written in Zig to run in WebAssembly, with also a prototype structural editor… It integrates with JS promises via continuations. It’s very inefficient and incomplete but one of my favorite projects ever. It has a GC but nowadays you’d want to use native Wasm GC like Guile Scheme does.

                                                                                                      https://github.com/mbrock/wisp

                                                                                                      1. 1

                                                                                                        You could always build it on top of Go, or Erlang. There’s been a few lisps on Go, but I’ve always wanted to see something like linj, in Go.

                                                                                                        1. 1

                                                                                                          Does Lisp Flavored Erlang fit the bill? https://lfe.io/

                                                                                                          1. 1

                                                                                                            Infortunately it shares the same issues as Erlang (the disastrous tooling), and is even more niche.

                                                                                                        2. 5

                                                                                                          I’ve got a few.

                                                                                                          The biggest one is creating a “new Arduino”, but with lua using a web-based IDE served straight from the (at least to start) ESP32 so it’s entirely self-contained and has no dependencies to install. I’ve pretty much only got false starts to show for it. I feel like it’s a project that has a ‘activation energy’ that is just a bit too far out of my reach. Part of my problem is that I’m just not satisfied with the existing parts I could build it out if, mostly NodeMCU which was unfortunately made when Node.js was popular and it decided to copy all the callback hell problems instead of just using coroutines.

                                                                                                          Others (in decreasing order of white-whale-ish-ness):

                                                                                                          • A ground-up re-implementation of OpenSCAD, but using curves instead of polygons. (That can also be built to WASM w/o emscripten.)
                                                                                                          • A new router OS in the same vein as VyOS, but with a more flexible/responsive configuration language. (And a build system that doesn’t require root on a specific version of debian.)
                                                                                                          • A p2p-real-time-synced ‘application database’ for writing applications w/o any server dependency.
                                                                                                          • A ‘react-native’ but for GTK that lets me write GTK applications in Rust without the impedeance mismatch of the GObject system.

                                                                                                          In general my biggest problem is that I just don’t have the mental bandwidth for projects like these while working full time (especially, like right now, while repeatedly beating by head against the SNMP RFCs while writing a new SNMP implementation in Rust).

                                                                                                          Edit: Comparing my response to others, my problem might just be too many projects…. Anyone have tips for getting myself to want to do fewer different things?

                                                                                                          1. 3

                                                                                                            a “new Arduino”, but with lua using a web-based IDE served straight from the (at least to start) ESP32 so it’s entirely self-contained and has no dependencies to install.

                                                                                                            CircuitPython has a workflow pretty similar to what you describe, at least for boards/chipsets with native WiFi and no USB.

                                                                                                            1. 1

                                                                                                              For whatever reason me and python have never really gotten along. I really want specifically Lua. Partly because I don’t want a trimmed down version of a fat language like Python, and partly because the most productive I’ve ever been writing device code was back when I was an intern writing POCs in Lua and then translating them to C Lua libraries for an STM32-based project running eLua.

                                                                                                            2. 3

                                                                                                              Nah, I got a bunch of others also. I take what I can from them and realize the point is not to finish but to entertain and learn. You’re doing great.

                                                                                                              1. 2

                                                                                                                Thanks. Yeah, I logically realize that too about my projects, I just can’t seem to convince myself of that, I dunno, emotionally?

                                                                                                              2. 2

                                                                                                                A ‘react-native’ but for GTK that lets me write GTK applications in Rust without the impedeance mismatch of the GObject system.

                                                                                                                Have you seen https://relm4.org/?

                                                                                                                1. 1

                                                                                                                  I have. I used the old relm, but haven’t actually done anything with relm4 more than half the tutorial. Thanks for pointing me at it again though, I now see that they have async support (and the examples are using tokio, so it looks like that’s compatible). That was one of my biggest stumbling blocks the last time I tried to do any GTK + Rust stuff. I might have to give it a go again.

                                                                                                                2. 2

                                                                                                                  A ground-up re-implementation of OpenSCAD, but using curves instead of polygons. (That can also be built to WASM w/o emscripten.)

                                                                                                                  I really like the idea here - OpenSCAD is just such a clean and simple interface, the cheatsheet fits-ish on one page, but it’s really clunky with its curve handling and need for epsilons everywhere. The WASM thing seems more like a nice-to-have than an obvious thing to include in the project though.

                                                                                                                  1. 2

                                                                                                                    I really like the idea here - OpenSCAD is just such a clean and simple interface, the cheatsheet fits-ish on one page, but it’s really clunky with its curve handling and need for epsilons everywhere.

                                                                                                                    Yep, exactly where I’m coming from with wanting this myself.

                                                                                                                    The WASM thing seems more like a nice-to-have than an obvious thing to include in the project though.

                                                                                                                    Mostly, yeah. I just really want to be able to have a fully static site with a ‘customizer’ for the various designs I’ve shared.

                                                                                                                3. 5

                                                                                                                  Mine is this: I want to find a point somewhere in the metaprogramming design space between Lisp macros and full fexprs that feels right in my brain. Yes, I have read the 1998 paper by Mitchell Wand that shows that this is more like a Kraken than a white whale.

                                                                                                                  To me, the big problem here is modules. If macros are second-class objects, and modules can define and contain macros, then modules must also be second-class objects. Then we’ve bisected the language into two, which - in an otherwise uniform Lispish substrate - feels deeply unsatisfying. It’d be much nicer to have first-class modules that can be manipulated using all the usual language constructs.

                                                                                                                  But if modules are first-class, then either they can’t contain macros, or macros become first-class too. If we choose to have macros kept outside modules, then either we get two separate module systems (see above), or we get a clunky interface/implementation split that starts feeling an awful lot like a Robust Enterprise Language and less like a language for exploratory hackery. If macros are first-class, then they become fexprs - and then (see Wand’s paper “the theory of fexprs is trivial”) we have entered a world of pain where nothing means anything and compilation doesn’t work.

                                                                                                                  I’ve tried making an interface/implementation split, but I wasn’t happy with it. I’ve tried using partial evaluation to reduce the fexpr-like objects away iff they can be resolved at compile time, but this made distribution a complete pain. My last idea was having two distinct types for bindings - one that can expand fexprs or call functions, and one that can only call functions. The latter would be the default, and the former would have to be introduced explicitly and statically / syntactically visibly, so trying to call a fexpr in a function’s place would be a type error. I never really got to work on that, though.

                                                                                                                  1. 1

                                                                                                                    more like a Kraken than a white whale

                                                                                                                    Nice word play. You mean https://kraken-lang.org/ ?

                                                                                                                    1. 2

                                                                                                                      I actually wasn’t aware of that language, though I am going to read about it now. I note that the author mentions it’s his fourth try at getting this right too…

                                                                                                                      I was just referring to hunting for an actual sea monster rather than a white whale, and the Kraken was the first that came to mind. :-)

                                                                                                                      1. 1

                                                                                                                        I just found that the confusion is even deeper than I first thought! :)

                                                                                                                        In fact, I wasn’t aware of Kraken language, too! But I was aware of miniKanren instead, which is yet another LISP-based thing ( http://minikanren.org/ ). So, when I saw “Kraken” in your post, I had a thought: “well, I remember, I saw some LISP-related thing with similar name”. I typed “Kraken” to Google and found Kraken language. And then I finally understand that I never was aware about any Kraken language and my memory contains information about miniKanren instead

                                                                                                                    2. 1

                                                                                                                      Is newLISP’s model any use? It has fexprs and is well developed. http://www.newlisp.org/index.cgi?page=Differences_to_Other_LISPs It’s fully interpreted, not compiled.

                                                                                                                      Also I think a few non-lisp languages effectively have fexprs (but I’m not certain) - maybe Factor and maybe TCL? Factor is compiled.

                                                                                                                      1. 2

                                                                                                                        The closest I’ve found to something I like is the model in Kernel … which nobody has managed to get to compile. NewLisp (and PicoLisp) inherit the same problems. The problem is:

                                                                                                                        (λ (op) (op (+ 2 2)))
                                                                                                                        

                                                                                                                        It should be completely evident that (+ 2 2) can be reduced to 4 here. But what if I make a fexpr that does what quote does and feed that to this function? Then it would have to return (+ 2 2), not 4. Having that possibility in every possible function call site is (one part of) what makes this sort of language ill-behaved. Essentially, you have no idea whether (+ 2 2) even represents an arithmetic operation at all; it might be just some piece of data.

                                                                                                                        AFAIK Factor doesn’t have a fexpr construct; the only non-lisp languages I know that do are R and Rebol.

                                                                                                                        (And as I said: I’m well aware that this is more of a Kraken than a white whale! It’s been what made Lispish module systems interesting (in the sense of “may you live in interesting times”) since at least the 80s.)

                                                                                                                        1. 1

                                                                                                                          Thanks.

                                                                                                                          Functions in Factor can decide at run-time whether to evaluate their arguments or not, I think. It’s possible that I’m mis-translating between Factor-speak and normal-speak. I haven’t actually tried to use fexprs in Factor but if I’ve understood the docs it should be straightforward.

                                                                                                                          1. 4

                                                                                                                            Caveat: I haven’t touched Factor for many years by now.

                                                                                                                            If all you can do is choose whether or not to evaluate args, you don’t have the terrors (or splendor) of full fexprs - that’s just lazy evaluation. The fun starts (or stops, depending on your perspective) if you can also inspect and/or modify unevaluated args.

                                                                                                                            That’s the situation in Joy, btw. You’re just passing lists of unevaluated code back and forth, and nothing stops you from treating them like any other list. Which is why Joy also isn’t terribly compiler-friendly.

                                                                                                                            1. 5

                                                                                                                              Which is why Joy also isn’t terribly compiler-friendly.

                                                                                                                              It’s the worst. I’ve tried to tackle this but ended up with macros, so it ended up being a weird Lisp like, with an implicit threading like evaluation. Effectively, anything in a list would be expanded if the first item was the name of a macro, and then you get standard Joy like behavior, without i. But! You have to have some way to branch, so an if-like has to exist specially, and you’ve also now given up your first class “blocks” feature…

                                                                                                                              This then requires that you have a list building construct that doesn’t have the expansion properties, and it becomes less and less simple as you go.

                                                                                                                              1. 5

                                                                                                                                After spending way too much time implementing Joy and making my own Joy-inspired languages, I walked away with the conclusion that Joy is essentially a perfect realization of one single point in the language design space. It has a deep, conceptual elegance (which, as is unfortunately often the case, doesn’t necessarily translate to pragmatic usefulness!), and there is basically no way you can change it without giving up what it is (which inevitably makes it feel worse).

                                                                                                                                For better or worse, Forth has more of a “ball of mud” nature.

                                                                                                                                1. 2

                                                                                                                                  I totally agree, but I am gonna keep trying… at some point. It’s too neat an idea to not! :)

                                                                                                                              2. 2

                                                                                                                                Oh, for sure you can inspect and modify unevaluated args in Factor and, now that you mention it, it probably inherited that from Joy. Only Factor seeeeems to have a fast compiler for some programs at least.

                                                                                                                                I don’t know what makes the difference there. FWIW, I do know that Factor’s compiler has separate optimisation phases and I’m guessing that Joy’s compiler(s?) didn’t. https://docs.factorcode.org/content/article-compiler-impl.html

                                                                                                                                1. 2

                                                                                                                                  I’ve never actually seen a compiled Joy, only interpreters. (I wrote several Joy interpreters myself, a while ago.)

                                                                                                                      2. 5

                                                                                                                        My white whale is a programming language and I have notes and fragments going back to 2006, mostly based on an article in Computer Language from 1985 (of which there is no other information about, even online). The main feature is a lack of key words, but not as mathematically oriented as APL. There are symbols for looping, conditionals, type and variable definitions (in which I include functions) and returning values. Other syntactic features I’ve played with over the years include:

                                                                                                                        1. multiple return values
                                                                                                                        2. type inference
                                                                                                                        3. annotations (such as read-only, write-only, non-cachable (volatile), inline, etc)
                                                                                                                        4. design-by-contract
                                                                                                                        5. lambda functions

                                                                                                                        There is no concrete implementation—all my notes are about defining the syntax, and so far, I haven’t come up with a syntax that I like (mostly around function declarations and type annotations). I keep hacking away at the syntax, hoping for a breakthrough.

                                                                                                                        1. 2

                                                                                                                          mostly based on an article in Computer Language from 1985 (of which there is no other information about, even online)

                                                                                                                          My curiosity is piqued, could you provide a reference to this article?

                                                                                                                          1. 4

                                                                                                                            Sure: “Exotic Language of the Month Club: KISS: Keep it simple, …” by Max Schindler, Computer Language Volume 3, Number 1, January 1986, pg. 69-73.

                                                                                                                            Okay, I flubbed the year, but not by much. Also, last time I looked, this particular issue isn’t even on The Internet Archive, so good luck finding it.

                                                                                                                            1. 2

                                                                                                                              Cool, thanks! I found it on IA, requires an account for a time-limited borrow.

                                                                                                                        2. 4

                                                                                                                          I’ve mostly avoided them. Mostly the project is a “nice idea, might try some time” and I forget about it because there is little importance, or “I’ll screw around with it a little bit, and I prove to myself that it could work/I can make it work” but I lose interest in finishing because the “can I do it” was by far the most important motivation, or “This is important/want to work on this and it is also beneficial for this and that and that and …”, with the multiple motivations it usually keeps me going well, and I’ll finish it.

                                                                                                                          The last thing I “lost interest” in, 5 or so years ago, was a git transport that would expose refs in p2p communication. Creating a transport that hooks into git was surprisingly easy. I got git to push over a communication channel from one p2p-client to another, then I lost interest. I had proven to myself that it would work. (idea: “push” is registering a ref to be available on p2p, “fetch” to take from another client (as you’d expect), p2p comm to perform the discovery of refs) DHT, networking (mostly), etc. wouldn’t be a big deal, obviously everything is more intricate and takes more time if you need to implement it. NAT hole punching, figuring out the limitations wrt IPv4 connections would be huge annoyance, probably, which wasn’t at all appealing. I got back to projects I thought more important and liked more.

                                                                                                                          1. 4

                                                                                                                            I got git to push over a communication channel from one p2p-client to another, then I lost interest. I had proven to myself that it would work.

                                                                                                                            Yeah, the entire comment, but specifically that, is pretty much a universal experience of developers with ADHD brain :) You might consider getting tested because I’ve heard that the modern treatments for it can be life-changing! (everyone i know who has been diagnosed (20+ people) have all said treatment was a breath of fresh air and changed their life).

                                                                                                                            1. 3

                                                                                                                              You might be right. I don’t want to question that particular statement. However, I also had multiple running projects, of which this one thing was a curiosity, while the other things were multi-year ongoing effort. So, it is definitely also a matter of prioritization, as I would otherwise be switching too much between projects. You know how, when you need a nice idea to implement nothing comes up, but when you have plenty of things to work on, ideas start flooding in like crazy? :D

                                                                                                                          2. 4

                                                                                                                            A C compiler.

                                                                                                                            I like where tcc was going - if compile performance is fast enough, even if the resulting code isn’t super optimized, it changes the way we’d think about the problem. C could be closer to JavaScript, where an add-on is distributed as source and JIT compiled near instantaneously.

                                                                                                                            1. 2

                                                                                                                              Unfortunately, they decided to make javascript as fast as C instead :,)

                                                                                                                            2. 4

                                                                                                                              I’ve wanted to build a new relational database for a while, not for the intricacies of the inner workings but for the design side of the interface. I’ve only ever really tolerated SQL and all the shortcomings of pasting plaintext string literals (or, even worse, gluing them together) inside another programming language. ORMs can be great but they have issues too and the root of those issues is leaky abstractions and complexity of optimisations happening at various different layers.

                                                                                                                              I want an LLVM for databases on which I can build many different query languages, one being SQL but another being a proper machine-API not an English-based language that doesn’t fit with today’s software architectures.

                                                                                                                              I’ll do it one day… I’ve just got to learn a lot!

                                                                                                                              1. 1

                                                                                                                                Sounds like you could use FoundationDB as the “llvm” part: https://apple.github.io/foundationdb/layer-concept.html

                                                                                                                                1. 1

                                                                                                                                  Ah nice thanks for sharing! My proof of concept can essentially be backed by any key-value store (which it seems FDB is, though I could be wrong)

                                                                                                                                  the hard part, for me at least, is mapping relational algebra into key-value. but cockroachdb has been quite a good source of inspiration for how to achieve that!

                                                                                                                              2. 4

                                                                                                                                I have several ideas in the ham radio space that I think could be done, but aren’t quite my cup of tea:

                                                                                                                                1. A CW decoder using dilated convnets + RNN, or transformers, or something. Speech recognition has come an incredibly long way in the past 20 years. Beepybeep recognition hasn’t really gone anywhere at all. It should be possible to at least get in the same ballpark as a trained ear by now. The hardest part here is probably the training corpus.

                                                                                                                                2. A thingy that listens to a mistuned SSB signal and tells you how many hertz to tune up or down to make it sound right. Together with CAT control, the result could be an “auto-tune” button. Analytically, it should be possible by using the cepstral properties of the human voice (i.e. that it’s harmonically rich and not just noise). Mistuning will shift and truncate the spectrum, but it will affect the cepstrum quite a bit less. Under certain assumptions, the cepstrum will tell you what the spectrum “should be”, and then you look at what you’ve actually got and find the shift that maximizes the correlation.

                                                                                                                                3. A replacement for the APRS “SmartBeaconing” algorithm. The idea of SmartBeaconing is that you can gain efficiency over beaconing at a fixed time interval by beaconing infrequently when not moving or moving in a straight line at a constant speed (so that your current position is not far from the dead-reckoning position obtained using your last known position and velocity), and beaconing more often when you deviate from that track. But the way it actually does it is weird and crude. I’m not sure if it can legitimately be explained by the limitations of 1990s embedded systems or if it’s just dumb. It uses linear interpolation between two reference speeds to come up with a basic beacon interval, and it decides whether to shorten that interval by literally multiplying the number of degrees you’ve turned by your current speed and seeing if that exceeds some threshold (sine was too hard?).

                                                                                                                                I think there’s an answer that’s better and simpler at the same time, and it looks pretty close to this: Let current_time, current_pos, and current_vel be what they sound like, and beacon_time, beacon_pos, and beacon_vel be the values the last time you sent a beacon. For tunables, let w be around 0.2, dt be around 30 seconds, and thres be around 5-10 km or a vehicle, lower for a person.

                                                                                                                                time_since_beacon = current_time - beacon_time
                                                                                                                                if time_since_beacon < min_interval:
                                                                                                                                    continue
                                                                                                                                if time_since_beacon >= max_interval:
                                                                                                                                    beacon
                                                                                                                                    continue
                                                                                                                                
                                                                                                                                beacon_extrapolated = beacon_pos + (time_since_beacon + dt) * beacon_vel
                                                                                                                                current_extrapolated = current_pos + dt * current_vel
                                                                                                                                deadreckoning_error = |current_extrapolated - beacon_extrapolated|
                                                                                                                                traveled = |current_pos - beacon_pos|
                                                                                                                                total = (1-a) * deadreckoning_error + a * traveled
                                                                                                                                
                                                                                                                                if (total > thres)
                                                                                                                                    beacon
                                                                                                                                

                                                                                                                                The a factor encourages beaconing when you cover a distance of about thres/a even if your velocity doesn’t change at all, because you’ve probably entered or left a repeater coverage area by then. The dt factor encourages “corner pinning”, i.e. putting a point down where you turned a corner instead of “cutting off” the corner by waiting for you to travel in a new direction for a while. But setting it too high will cause way too much sensitivity to velocity changes. thres is simply the amount of error allowable.

                                                                                                                                1. 1

                                                                                                                                  Brain fart: I started off calling one of the tunables w, but then I wrote it as a in the code snippet, and kept calling it a down below. Those are meant to be one thing.

                                                                                                                                2. 3

                                                                                                                                  Something I think is totally feasible, but that I just don’t have the time and energy for: turning KDE Connect into a Linux version of Apple’s Continuity. This partially means things like fixing up the currently-half finished Bluetooth transport (this is particularly useful because it means that KDE Connect devices can bootstrap each other onto the same WiFi network, to then use as the primary transport), or making KDE Connect devices automatically gossip about other paired devices they know about, so for n devices you don’t have to set up n! connections.

                                                                                                                                  But it also means making KDE Connect less of an app and more of a platform capability. A simple example: .desktop files could have a key that specifies the corresponding Android application ID, which KDE Connect could then use to prevent duplicate notifications from showing up (one from the desktop app and one mirrored from the Android app). A more advanced platform capability would provide full-blown APIs for communicating with the phone app when connected. Back before Signal dropped SMS support, one of their stated reasons for not allowing you to send SMS messages in the desktop app was the increased server load syncing these messages would cause. A mobile <-> desktop communication API like I’m describing here would help this kind of problem enormously. Or, imagine handing off your Jellyfin music session seamlessly to your mobile device, without involving the server at all. The possibilities are endless.

                                                                                                                                  It’s hard because I’m unfamiliar with the codebase and the technologies KDE Connect uses. It will eventually be hard because Google doesn’t document all the APIs for this kind of stuff on Android, and probably (I haven’t checked) full on locks them away so only Google Play Services can use it. (But the APIs are there.) I also haven’t talked to upstream about any of this.

                                                                                                                                  1. 3

                                                                                                                                    An OS with very little code that works on all common hardware.

                                                                                                                                    I know device drivers are hard. But I’m willing to throw away performance. I wish there was a timeless set of low-performance device drivers that anyone could consistently run.

                                                                                                                                    (I spent some time struggling with this but it’s not my skillset.)

                                                                                                                                    1. 6

                                                                                                                                      “very little code” seems to be fundamentally at odds with “all common hardware”

                                                                                                                                      I think the problem is that hardware is software now. You can’t write a little code to interface with a lot of code! If the hardware is complex, then the software that talks to it will be complex.

                                                                                                                                      There is no hardware abstraction layer any more … If you search for what Timothy Roscoe has been doing recently, he explains the problem well.

                                                                                                                                      https://www.usenix.org/conference/osdi21/presentation/fri-keynote

                                                                                                                                      I also think it relates to what Oxide computer is doing – they “discovered” all this crappy, opaque, proprietary vendor firmware you have to interface with.

                                                                                                                                      The rabbit hole goes VERY deep


                                                                                                                                      On the other end, Unix solved that problem the early 70’s :-) xv6 runs on QEMU, and supports a terminal

                                                                                                                                      https://pdos.csail.mit.edu/6.828/2012/xv6.html

                                                                                                                                      I guess you want something in between that and Linux, but I think defining the problem is the problem. “all common hardware” is a bit of a vague problem


                                                                                                                                      Personally I still believe in abstraction by shared nothing processes for comprehensibility. I don’t necessarily want “very little code”, but I do want “very few moving parts” and “very simple interfaces”.

                                                                                                                                      e.g. relates to Ousterhout’s narrow vs. deep interfaces. I use the Unix file system because it has a simple interface, but I don’t have to know exactly how ext4 is implemented.

                                                                                                                                      I’m glad they have all sorts of performance optimizations.

                                                                                                                                      Likewise, I am comfortable using git – it’s a lot of complex code, but it works well and it has a relatively simple immutable, shared nothing interface.

                                                                                                                                      1. 1

                                                                                                                                        Yes, that Roscoe talk was eye opening at the time it came out. Remember, this is a white whale :)

                                                                                                                                        Arguably the OS is now just another abstraction for comprehensibility. Not a very good one anymore. What do you think of the UEFI suggestion in the other replies?

                                                                                                                                        By “all common hardware” I’m alluding to the likelihood of being able to run a new computer I buy from the store (or thrift store). At some speed. Remember, I’m willing to trade almost any level of performance in exchange for something timeless I don’t have to constantly update.

                                                                                                                                        In your terms I think I’m asking for all software to become hardware. Which, yes, is probably rowing against the direction the world is going. That is why this is a white whale :)

                                                                                                                                      2. 4

                                                                                                                                        Running under a hypervisor or some kind of abstract machine is a time-honoured tradition. virtio would provide framebuffer, ethernet, etc. in exchange for a perhaps hardware specific shim of a thin hypervisor.

                                                                                                                                        That, or perhaps target EFI Boot Services, get GOP et al, running as an EFI executable.

                                                                                                                                        1. 2

                                                                                                                                          I’d love to see a hypervisor or abstract machine that provided framebuffer and ethernet with very little code.

                                                                                                                                          EFI might be the approach to try. What is GOP?

                                                                                                                                          1. 2

                                                                                                                                            GOP is the framebuffer protocol in EFI.

                                                                                                                                            1. 1

                                                                                                                                              Build it out of existing parts (a half-dozen emulated 68ks or something), sell it as a semi-retro dev system.

                                                                                                                                          2. 2

                                                                                                                                            I wish there was a timeless set of low-performance device drivers that anyone could consistently run.

                                                                                                                                            Are you talking of all hardware of a given class supporting, in addition to their native programming interface, a simplified generic interface?

                                                                                                                                            1. 2

                                                                                                                                              That would be one way to do it. A more expansive version of the BIOS standard that also had support for hard disks and networking would be wonderful.

                                                                                                                                              1. 4

                                                                                                                                                UEFI does define a standard protocol for Ethernet so as long as you wrote your system such that it could run without exiting boot services, you could use it.

                                                                                                                                                1. 2

                                                                                                                                                  Sounds a bit like OpenFirmware, which was used on a few different computer architectures (though I’ve only used it on my OLPC XO-1). If I understand correctly, the idea was to offer a slight abstraction so manufacturers could write one driver (in Forth) and have it work across different hardware, operating systems, etc.

                                                                                                                                              2. 2

                                                                                                                                                An OS with very little code that works on all common hardware

                                                                                                                                                This is the most impossible white whale out there :)

                                                                                                                                                1. 1

                                                                                                                                                  Thanks! Remember the second paragraph, though. I’m trying hard to make it plausible.

                                                                                                                                                2. 1

                                                                                                                                                  Note: Intel is deprecating running 32-bit operating systems.

                                                                                                                                                  https://www.phoronix.com/news/Intel-X86-S-64-bit-Only

                                                                                                                                                3. 3

                                                                                                                                                  I’ve had a lot of thoughts about designing things where you are always moving forward. Post-mortem debugging tools that let you patch in the right fix inline, interactive REST endpoints where you can write up the implementations as things come in (think Darklang’s functionality in the past), etc.

                                                                                                                                                  My daydream, though, is a PL that has the sort of functional pragmatics of clojure (pure data structures by default), a syntax more like Python, a structural type system like TS/Purescript with enough dependent type power to support some interactive proofs. I should have my cake and eat it too!

                                                                                                                                                  And a final thing is basically just an Omnifocus clone that is focused around listing tasks and then registering dependencies to those tasks, so I can see what tasks are unlocked at a specific moment. I want the power of Omnifocus but with a UI that is much more about moving forward, instead of having to futz around with projects and the like.

                                                                                                                                                  1. 3

                                                                                                                                                    I’ve been working for nearly four years on a hardware/software combination system I’ve codenamed Basic Box. It was initially inspired by the boot-to-BASIC REPL environments of the 70s and 80s, but has morphed into more of a platform for understanding how computers and computation work in general, for kids and adults alike.

                                                                                                                                                    Thus far the components have included writing a bare metal Raspberry Pi kernel, firmware for a Pi Pico, drivers for displays and amps, designing and prototyping a handheld device, writing curriculum, building prototype HATs, and writing a programming language and interpreter with low-level inline assembly language capability.

                                                                                                                                                    Yeah, that’s all. Just that.

                                                                                                                                                    It’s a product, not a piece of hardware, but also potentially a kit. It’s taken me so long, and it seems like every time I get into another component of it, there is more to learn and it challenges the limits of my understanding of topics.

                                                                                                                                                    I really hope to have something to show for it all soon. But I’ve been saying that since 2020.

                                                                                                                                                    More recently, I started working on an R&D wiki-like site (see also https://lobste.rs/s/i8qnvf/repurposing_hugo_as_wiki) that aims to “work in the open” and be a resource to others with similar interests, since I plan on the whole thing being open source and open hardware anyway.

                                                                                                                                                    If I had to do it again, I would’ve started in the open in 2020, which is much more typical of my working style, but at the time I didn’t fully grasp the scope of what it would become, nor was I sure that open source hardware was the way to go.

                                                                                                                                                    1. 3

                                                                                                                                                      I have moved teams or been laid off days after starting to implement proper metrics collection for observability. Only one of those products did I start from scratch, and started it before I was wise to the ways of o11y, baking it in from the start is the way to go.

                                                                                                                                                      I’ve got some tools in the toolkit now that I can get started pretty quickly but man… working on the fifth time it’s happened in the last 6 years as I move to a new team this week.

                                                                                                                                                      Years ago, I developed a basic package manager for Apache NiFi. I always wanted to return to that, but I don’t use NiFi for anything right now.

                                                                                                                                                      1. 2

                                                                                                                                                        Implementing sha256 as a circuit, and then checking if a large neural network can predict any of the output bits based on the input.

                                                                                                                                                        1. 3

                                                                                                                                                          sha256 ASIC is exactly what bitcoin mining platforms are.

                                                                                                                                                          No, no neural networks will be mathemetically able to do that except for well-known hashes. They have issues even with very basic arithmetics.

                                                                                                                                                          1. 1

                                                                                                                                                            I fully agree in theory, but has anyone tried it out in practice, with a really deep network? What if it could find connections between input and output bits that we currently can’t spot?

                                                                                                                                                            People said that LLMs were infeasible too…

                                                                                                                                                        2. 2

                                                                                                                                                          A simple format for writing recurring tasks, like cron but for humans.

                                                                                                                                                          “I want this task to activate 7 days after it was completed”. I don’t want it to repeat every 7 days, I want the timer to start after the task was completed previously.

                                                                                                                                                          1. 2

                                                                                                                                                            vCard for the 21st century. Basically a structured format for information about people and organisations, like various names, addresses, phone numbers, photos, etc. I’ve got the barest shell of this in acard, but it would need a whole lot of work to be usable.

                                                                                                                                                            1. 2

                                                                                                                                                              A while ago, I was making a list of video game releases I’m looking forward in Airtable, and I though it would be pretty easy to fill the release dates automatically in the parallel universe where semantic web is a thing.

                                                                                                                                                              All I need to make it happen is:

                                                                                                                                                              • something like airtable that understand rdf and lets me write sparql queries for some columns
                                                                                                                                                              • a way to query the steam api using sparql

                                                                                                                                                              These are things that are fairly doable (at a prototype level), and it gives me a glimpse of a parallel world where sparql is easy and powerful. But I’m always demotivated by the fact that once I’m done with the prototype, I’ll just need a team of 8 people for 2 years to make it usable.

                                                                                                                                                              1. 2

                                                                                                                                                                https://github.com/kghose/groho

                                                                                                                                                                A script driven simulator for space flight in the solar system.

                                                                                                                                                                1. 2

                                                                                                                                                                  A martial arts simulator, for finding the very best moves and techniques across all styles.

                                                                                                                                                                  1. 1

                                                                                                                                                                    I want to write a kubernetes scheduler that doesn’t suck. Sadly, this is a vastly overpolluted field and it’s very very hard to do.

                                                                                                                                                                    1. 1

                                                                                                                                                                      A homoiconic editor for structured diagrams. Something like Eclipse’s EMF + GEF, but starting with a graphical view instead of text.

                                                                                                                                                                      The bottom layer would be metamodel diagram that you use to define the structure and constraints of the next level diagram.

                                                                                                                                                                      1. 1

                                                                                                                                                                        In 2005 I created coworks, concurrent objects in Java. We used it in quite a few systems, fx. at Aldo Shoes main logistics hub in Montreal. Later it became coworks.net when we switched to .Net/C#

                                                                                                                                                                        Around 2015 I created pyworks.(https://pypi.org/project/pyworks/) a python version of concurrent objects, but partly due to the GIL it did not make much sense to have a thread per concurrent objects. So it has been sitting there waiting for the GIL to be removed. A bit of a pathetic excuse I know, but my white whale :-)

                                                                                                                                                                        1. 1

                                                                                                                                                                          an integrity protected web app shell. The bootstrap code would be minimal but allows loading a fully integrity-checked web app using ServiceWorkers and Subresource Integrity. I have started this project at least three times.

                                                                                                                                                                          1. 1

                                                                                                                                                                            A general library that has a variety of helper classes for FIRST Robotics Competition teams’ robot code. There’s a lot of boilerplate that teams copy from year to year (and from each other, since closed-source code/designs can’t be reused), but is out of scope for the general framework. Sadly, Java packaging is a bit of a mess and the framework’s packaging system isn’t really built for use cases like this.

                                                                                                                                                                            1. 1

                                                                                                                                                                              In the past year or two for me, it’s been designing a library (or building a system into a new programming language) for performing calculations on values of different units, without requiring that the user only use predefined units. The user of the system would only need to explicitly define relationships between units and the system would handle conversions as needed. Ideally it would include a way to define singular/plural names for units and handle complex units. I imagine it could be useful in a high level programming language or even just a handy app like Soulver.

                                                                                                                                                                              The trouble I keep running into pathfinding between two compatible units of differing exponents, like trying to add a value of unit Newton with a value of unit kilogram¹ * yard¹ * second⁻¹ * hour⁻¹: because Newton is convertible to kg¹ * m¹ * s⁻², yard is convertible to meter, and hour is convertible to second, then the system should be able to succeed in finding a common unit. Maybe there’s an algorithm out there that I just haven’t found yet.

                                                                                                                                                                              Some examples using pseudo-code for the language containing this unit system:

                                                                                                                                                                              // cannot add or subtract mismatched units
                                                                                                                                                                              
                                                                                                                                                                              5 apples + 3 oranges
                                                                                                                                                                              
                                                                                                                                                                              // can multiply or divide mismatched units
                                                                                                                                                                              
                                                                                                                                                                              3 feet / 2 minutes
                                                                                                                                                                              
                                                                                                                                                                              // specify relationships between units to allow addition/subtraction
                                                                                                                                                                              //   and to collapse units correctly during multiplication/division
                                                                                                                                                                              // also can define singular variations on the unit for convenience
                                                                                                                                                                              
                                                                                                                                                                              define inches = { 12 * feet }
                                                                                                                                                                              singular feet = foot
                                                                                                                                                                              6 inches + 4 feet // 4.5 feet or 54 inches 
                                                                                                                                                                              3 inches * 4 feet // 1 foot²
                                                                                                                                                                              
                                                                                                                                                                              // specify complex relations referencing multiple units with a variety of exponents
                                                                                                                                                                              def newtons = { kg * m / (s * s) } // (in this case, kg¹ * m¹ * s⁻²)
                                                                                                                                                                              x = 10 kg * 2 m / (4 seconds * 1 seconds) // 5 newtons
                                                                                                                                                                              
                                                                                                                                                                              1. 3

                                                                                                                                                                                This thing already exists! https://frinklang.org/

                                                                                                                                                                                pathfinding between two compatible units

                                                                                                                                                                                This is easy. First of all, you should distinguish base and derived quantities (exactly like SI does), and then you should distinguish base unit for each base quantity (for example, meter for length) and all other unit for the same quantity. And everything becomes simple!

                                                                                                                                                                              2. 1

                                                                                                                                                                                My threshold for “nah, not gonna waste time on that” is pretty low I think.

                                                                                                                                                                                But over 10 years ago I wanted to have some semi-intelligent chat bot agent system that I’d just give some (natural language and precomposed) commands and it would do things or give me infos. But preferably not a simple “this is a shell alias that just queries site X with parameter Y”. Never happened. Also I knew full well that was something on the scale of Wolfram Alpha, but more general. Pretty sure it was also before Siri and Alexa, I think those would be a better comparison than current LLMs.

                                                                                                                                                                                Oh, and I think this would be totally doable today but I lost interest.

                                                                                                                                                                                1. 1

                                                                                                                                                                                  I’m not stumped by it, I haven’t found time to make it a priority, but I really want pre-commit from pythonland to exist in something like Rust and also remove its dependence on git repos to get at the executable. Then, to be able to seamlessly extend this to CI builds for feature branches or PRs without needing to duplicate your work in a Jenkinsfile or similar.

                                                                                                                                                                                  1. 5

                                                                                                                                                                                    So long as you can opt in somehow. These tools like Husky going out & modifying your Git hooks to run random code after an npm install are often annoying at best but pretty scary at worst.

                                                                                                                                                                                    1. 1

                                                                                                                                                                                      Oof, I thought git hooks in general were opt-in. I obviously haven’t done any research yet besides my own usage of pre-commit. That’s wild that someone would try to install hooks as part of some other process

                                                                                                                                                                                      1. 2

                                                                                                                                                                                        I think “consent” would be a better word for it

                                                                                                                                                                                    2. 1

                                                                                                                                                                                      I’ve had success using pre-commit.nix (now seems to have renamed to git-hooks.nix). It’s pre-commit, but ignores all of its myriad ways of fetching stuff in favour of Nix. It defines a Nix derivation, which is easy to add as a dependency (for CI, etc.). I also used a shellHook in each project’s shell.nix file to automatically install it into the .git/hooks folder.

                                                                                                                                                                                    3. 1

                                                                                                                                                                                      I occasionally work on something that smells a little bit like Ansible, but is based on Bash scripts, and would require very minimal learning curve if a person was already comforable with Bash. I’ve gone through a couple iterations already and I like the general direction it’s heading. But it might require a few more iterations.

                                                                                                                                                                                      It’s less of a “thing” that I’m iterating on, and more of a pattern.

                                                                                                                                                                                      1. 1

                                                                                                                                                                                        A better “make”. I’ve built half a dozen prototypes, with my latest iteration getting close to what I want, before coming full circle and writing a tool that is the command-line equivalent of a single make rule. I like the simplicity, but it’s still not quite what I want.

                                                                                                                                                                                        1. 0

                                                                                                                                                                                          A massively parallel mutation testing framework for Elixir.

                                                                                                                                                                                          In practice, the level of compiler hacking is beyond my skills/time, and mutation operators are also not easy to design, because you can very easily introduce non-termination.

                                                                                                                                                                                          1. [Comment removed by author]