Threads for jedahan

    1. 3

      Is there a possibility of relaxing the iOS version restriction? I’m not upgrading to the pushed AI features until the phone gets bricked. Thank you!

      1. 7

        https://www.wired.com/story/how-to-turn-off-apple-intelligence/

        Open Settings on your device
        Scroll down until you find Apple Intelligence & Siri and tap on it
        Toggle Apple Intelligence off
        
        1. 1

          Unfortunately since it’s opt-out there will be some amount of time where it is on, and I have not seen a way to prevent it from being on ever. Appreciate trying to help.

          1. 2

            there will be some amount of time where it is on

            It won’t do anything unless you engage it.

        2. 2

          Sure thing let me take a look. I have created a issue on GitHub tracking this – feel free to add any context that might be useful (things like what iOS version you’re presently on etc).

        3. 18

          I like to sing karaoke, and at pretty much every karaoke bar I’ve ever been to (in the US), the playback and the management of the queue/rotation are done by an application running on a Windows PC. And the most popular such systems still don’t have the seemingly obvious feature of letting singers submit their songs to the queue via a mobile app. So we have to talk to the DJ/host or write our songs on a slip, and the latter isn’t a practical option for me because I’m (partially) blind (though if I’m there with friends, they’re happy to do it for me). I also want to do fancier things like having a computer control the whole sound system, including mic volume and (tasteful) effects on the vocal.

          The fact that the existing software is bound to Windows is itself a problem. Just yesterday evening, the DJ had to wait on Windows Update while rebooting to troubleshoot another problem where the wrong audio device was selected. He vented to me about how he tried to turn off Windows Update, but sooner or later Windows insists on installing the update anyway, and very often that process screws up some other aspect of his setup (he mentioned codecs; I didn’t probe further).

          So I’ve been daydreaming, and talking to my long-suffering karaoke friends, about my ideal karaoke system for almost 10 years now.

          In my ideal system, the main playback and queue management program would run on a headless single-board computer (a Raspberry Pi or the like), running an optimized base OS. The DJ would control the system over the network using a client app on a laptop, tablet, or whatever. And, as I said, the singers would connect to it from a mobile app, ideally without going out to a remote server and back once the connection is bootstrapped. The core playback engine would be optimized for low latency so that, at least as an optional add-on feature, that program could process mic input as well.

          I’m happy to write about this at more length, or share parts of a design document I wrote a few years ago (as an email to a friend), if anyone’s interested. Like I said, I’ve been mulling over this for years.

          1. 7

            I’m not sure what it’s running on the backend, but if you’re ever in Portland, OR, check out Voicebox. For years now (10? more?) they’ve had a system that looks great on-screen, plus has extensive support on mobile web. You can submit to and reorder the queue, change volume and key shift, control the lights and disco ball, save favorites to a list, post funny pop-up messages on the screen while your friends sing, view your personal history with dates, and even submit requests to the venue for later. Check it out at vbsongs.com.

            1. 3

              Very cool. That’s for a private room though. I think there’s still a place for public karaoke mediated by a KJ, and that’s what I’d want to focus on.

              1. 1

                Also in portland i went to a karaoke bar and the DJ had a qrcode thing which would take you to a URL to queue.

                1. 1

                  Which bar? I wonder how good their music selection was. A friend told me about one package he knows of that has that kind of queuing feature, but it only supports the karaoke music library provided by the same company.

                2. 1

                  Yeah, now that you mention it, I’ve never seen a great public system.

                3. 2

                  Well over 10! NodeConf 2011 had an after-party there. A prolific node developer (can’t remember who specifically) wrote an npm package for it while we were there.

                  1. 2

                    This rings a bell now that you mention it. Around then I was at Mapbox doing iOS stuff, but most of the company was into early Node and came out from DC for that conf.

                4. 2

                  I use just to manage my dotfiles:

                  jj() { command jj $([[ "$PWD" == "$HOME" ]] && echo "--repository .dotfiles") "$@"; }

                  Just put them in .dotfiles, and symlink what you want. Some one liners to migrate to this setup are in the above linked readme.

                  Been doing this for about 5 years, no issues so far.

                  1. 2

                    Even though Element X support would be very, very welcome in reducing real pain points of a couple-hundred population community I support, I’m holding out on Matrix 2.0 until the Matrix Authentication Service is integrated with Synapse.

                    We currently use OIDC with synapse via self-hosted keycloak, and the MAS + migration story is complicated - I tried twice and failed both times. Its currently too annoying to configure for me to be confident that I will configure it correctly. This is the second Matrix 2.0 announcement, and even here its explained that the main instance for matrix.org hasn’t adopted M-A-S.

                    Nothing but love for the folks who are making matrix a reality, but for this volunteer server operator Matrix 2.0 has not arrived yet.

                    1. 4

                      As someone who wants to buy into HTMX but also does like having nice custom widgets for things, I’ve been thinking about this stuff a bit.

                      I do think it’s actually pretty feasible to write React components within your HTMX still. There are all the setup/teardown hooks still there! And working in Typescript/JSX is valuable for trickier HTML (especially when the norm is something like Django templates).

                      I still haven’t quite figured out the right patterns to get me the frontend flexibiltiy that REST API endpoints give me. With a decent REST API I can design many frontends without touching the backend at all. With HTMX I’m having to juggle both sides of the stack (I mean the backend is generating the HTML, but I’d rather be writing JSX than HTML templates!) in a way that’s not super pleasant, even though I’m happy with the end results.

                      1. 1

                        There are plenty of solutions in Node/Deno to use JSX in the server. Personally I’m happy with writing HTML in templates except for the fact that composition and code colocation is much harder than with JSX (or Vue/Svelte/etc SSR components).

                        Currently looking into using HTMX with Go and Templ seems like a great candidate. It’s like typed JSX in Go.

                        https://github.com/a-h/templ

                        1. 1

                          You can use jsx as your templating language for htmx, its pretty pleasant and comfortable. We do this with hono’s jsx support.

                        2. 2

                          Does not work on Firefox for iOS

                          1. 2

                            This is to be expected because Safari for iOS does not work, and IIRC Apple still does not allow other browser engines to run on iOS. I.e. Chrome for iOS and Firefox for iOS are just UI skins, and the underlying browser engine is the Apple one

                          2. 4

                            This is a very similar stack to what we’ve been using on an internal tool, just a bit further along. Interested in testing it out and seeing the friction in swapping out a decision or two. It seems a nice starting point for greenfield development.

                            1. 2

                              awesome! super curious to learn which decisions you would swap out and why. how is it going so far with this stack?

                              1. 3

                                Mainly would swap express for bun’s built in web server or hono, and skip using drizzle orm until we see a need.

                                It’s been quite productive, though we did go through a period of using nunjucks for templating before switching to hono/jsx. I can maybe clean up our decision log and post it.

                                1. 2

                                  sensible changes.

                                  the first version was using bun but i ran into too many issues. long-term the goal is to switch to bun and use the built-in http server, file router and sqlite driver.

                                  i was considering hono as well, but ended up going with the more battle-tested and boring alternative. can definitely see a version where express could be replaced by hono!

                            2. 6

                              I like this. JSX is a little weird, but there’s a reason it’s popular: it’s a surprisingly decent templating language. Seems like a collection of a bunch of reasonable choices for building a webapp. I’d swap HTMX with Alpine personally, but it’s fine.

                              1. 3

                                i’m considering embracing alpine in the docs for client-side interactivity. the landing page is using alpine! but it probably won’t replace htmx in plainweb.

                                1. 2

                                  I haven’t used HTMX beyond just reading the docs, so take this with a grain of salt, but my feeling is you could implement HTMX as just a small plugin in Alpine, but not vice versa, so if I had to have just one, it should be Alpine, but I dunno, maybe there’s something I’m missing.

                                  1. 7

                                    Online tech forums live up to their reputation yet again of people claiming they can rewrite production-level projects in a weekend ;-)

                                    1. 1

                                      Haha. In this case though, Alpine has stuff for managing directives and whatnot, so a very minimal implementation would look something like:

                                      Alpine.directive("swap", async (el, { expression }) => {
                                        el.onclick = () => {
                                          let target = document.querySelector(expression);
                                          let html = await fetchPage(el.href);
                                          Alpine.morph(target, html);
                                        };
                                      });
                                      
                                      <a href="/somepage/" x-swap="#container">click here</a>
                                      

                                      Obviously, this is not as much power as real HTMX, but the idea is you would start there and then just slowly build it out as you need more HTMX operations. It’s not “I could build HTMX in a weekend!” It’s “I could get the minimum set of the HTMX features I need in a weekend and then slowly add more of the long tail of other features if and when I were to need them.”

                                      1. 2

                                        Well, yeah. This is probably how htmx itself started. All that other long tail stuff got added because it turned out to be necessary for production-level use, not because htmx people like bloat ;-)

                                    2. 3

                                      oh yeah if you did that then i guess just one lib would suffice, but for now both projects seem to have little overlap.

                                      1. 2

                                        Its a neat idea, and probably a great exercise, but for usage - why reimplement one framework in another, rather than just use the original framework? If simplicity is the key, one would need to learn both htmx-on-alpine + alpine at some point.

                                        1. 2

                                          why reimplement one framework in another, rather than just use the original framework

                                          Keeps bytes on the wire minimal. Alpine already has a morph DOM plugin, at which point implementing HTMX just means adding a couple of custom directives.

                                  2. 2

                                    There’s a very small group of folks buying 90s and 00s era feature phones to dump and preserve their games. It’s got additional challenges such as most of the game data being download on demand so you have to have played at least once before. They need help in sourcing, dumping, reversing, emulating, etc. Away from my computer but the https://hackmanhattan.com discord has a channel, and there’s a related group called Khavi Break.

                                    Full emulation of the OS would be appreciated for sure, though starting with the J2ME work (which you shared) is where they are at. Lots of work to be done at the OS level.

                                    1. 24

                                      What if we were making a language like Rust, but one that was meant to feel more like Java or JavaScript, and less like C++?

                                      Please ping me when anyone makes Merz, a language like Rust that feels like Lisp.

                                      1. 61

                                        I want a language with the memory management of C, the standard library of C++, the syntax of Rust, the performance of Python, the ecosystem of Haskell, the portability of .NET, the multithreading of JavaScript, the object oriented programming of Java, the naming conventions of PowerShell, the enums of Go and the error handling of bash ;-)

                                        1. 9

                                          I had a nice chuckle, but it’s worth noting that .NET’s portability story is pretty solid these days, Java’s OO has gotten far less verbose (you can even now have main right in the root of the file), PowerShell’s naming convention is absolutely verbose but honestly highly consistent, C++‘s stdlib has gotten fairly robust in recent releases, and JavaScript has had shared memory and Web Workers if you’re in the mood for some solid preemptively multithreaded foot-guns. Python’s speed and Haskell’s ecosystem, I can’t help you with, but the rest…you might not have made quite the Malbolge competitor you were aiming for.

                                          1. 3

                                            I have to use Java at work, and I agree that Java is decent these days. Lambdas, pattern matching, record types (less verbose than Python data classes), etc.

                                            But all the popular libraries and frameworks are still the same, more or less. Maybe I could say: the language has improved, the culture is the same.

                                            At my previous job, they used .NET, and while it’s supposed to be cross-platform these days, in practice it wasn’t really. The open source compiler/toolchain seemed to be a different one than what coworkers used on Windows, and they didn’t have feature-parity. I think some kind of “resource files” didn’t work. Maybe they fixed that in the last 3 years.

                                          2. 1

                                            aww, you forgot erlang in the list there. that makes me sad.

                                            1. 6

                                              They’re naming bad things about each language, so Erlang can’t be in the list.

                                            1. 1

                                              Hm interesting, why didn’t this become a thing? It’s from 1992

                                              It has 116 citations according to Google - https://scholar.google.com/scholar?cites=16067430993533829385&as_sdt=5,39&sciodt=0,39&hl=en

                                              A few Hacker News discussions: https://news.ycombinator.com/item?id=32384320

                                              Lobsters: https://lobste.rs/s/mysxrz/lively_linear_lisp_look_ma_no_garbage_1992

                                              I don’t really see any good comments about how it works.

                                              I guess there is no code to go with the paper, so we can’t really know

                                              1. 1

                                                The appendix has a meta circular interpreter in common lisp, but yeah, no example programs.

                                                It’s hard to evaluate its practicality, from the paper alone, but I’ve considered writing a small Linear Lisp interpreter with Erlang like semantics. So, single assignment, destructuring, no strings, just lists of bytes… etc. The thing is, the only thing to gain from this is no GC, since Erlang semantics are already great for parallelism. But, Erlang’s basic GC from the 90s was stupidly simple and quite good… so, does this even matter? Not clear.

                                              2. 1

                                                Introduction

                                                Neither a borrower nor a lender be;

                                                For loan oft loses both itself and friend …

                                                [Shakespeare, Hamlet, I. iii 75]

                                                Polonius, you? :)

                                              3. 9

                                                Carp? https://github.com/carp-lang/Carp

                                                I haven’t used it

                                                But I actually am feeling the need for a “Lispy IR for C++”

                                                I had sort of a “revelation” that Lisp has the “best” language for metaprogramming (or at least most flexible), but it doesn’t have the best target runtime for metaprogramming.

                                                For example, there is no Lisp runtime that lets you express value types like C++ or Rust. You have JITs that maybe do that (?), but JITs often fall off cliffs.

                                                You can’t really lay out memory yourself and make it simple and AOT.


                                                The best target runtime for metaprogramming should be capable of expressing fast code.

                                                So then I was wondering if that was what Carp is – probably a little bit.

                                                Or actually I think Clasp is much closer, it is metaprogramming LLVM with Common Lisp

                                                https://www.youtube.com/watch?v=8X69_42Mj-g

                                                Although there is a lot of intermingling of the two languages and of the GC, which may not be exactly what I want

                                                1. 6

                                                  Please ping me when anyone makes Merz, a language like Rust that feels like Lisp.

                                                  Sign me up as well. There’s https://jank-lang.org/ that uses LLVM-based JITting C++ interpreter as a “host” language analogously to how Clojure uses Java.

                                                  1. 2

                                                    I miss experimenting in Carp, the speed, expressiveness, and interoperability made me comfortable and productive in a way that wasn’t apparent just by reading the landing page, arch decisions, etc.

                                                    1. 1

                                                      Does it compare well against Chicken? If I’m going to learn just one lisp targeting lower level stuff than clojure… Or fennel…

                                                      1. 1

                                                        Haven’t tried chicken! Used fennel for a bit, but not enough to make a good comparison.

                                                2. 13

                                                  Note that a large part of the speed up results from the ability to operate in parallel (which doesn’t work on streaming data), however, even single-threaded it is fast:

                                                  % dd if=/dev/urandom of=/tmp/rand bs=1M count=1024
                                                  % hyperfine 'b3sum < /tmp/rand'   
                                                  Benchmark 1: b3sum < /tmp/rand
                                                    Time (mean ± σ):     617.3 ms ±  44.6 ms    [User: 453.3 ms, System: 161.1 ms]
                                                    Range (min … max):   553.2 ms … 698.5 ms    10 runs
                                                  % hyperfine 'b3sum /tmp/rand' 
                                                  Benchmark 1: b3sum /tmp/rand
                                                    Time (mean ± σ):     228.1 ms ±  18.2 ms    [User: 955.8 ms, System: 190.9 ms]
                                                    Range (min … max):   204.1 ms … 263.1 ms    13 runs
                                                  % hyperfine 'sha256sum /tmp/rand' 
                                                  Benchmark 1: sha256sum /tmp/rand
                                                    Time (mean ± σ):      7.498 s ±  0.205 s    [User: 7.282 s, System: 0.178 s]
                                                    Range (min … max):    7.220 s …  7.789 s    10 runs
                                                  

                                                  And, for fairness:

                                                  Benchmark 1: openssl sha3-256 /tmp/rand
                                                    Time (mean ± σ):      5.160 s ±  0.266 s    [User: 4.900 s, System: 0.233 s]
                                                    Range (min … max):    4.712 s …  5.598 s    10 runs
                                                  
                                                  1. 3

                                                    Yes on modern chips, “SIMD” parallelism is just as big of a deal as multithreading. (For various reasons library code can generally use SIMD optimizations without asking the caller’s permission, but spawning threads without permission is less ok, so SIMD optimizations end up getting much wider deployment.) Desktop chips routinely have 8x SIMD support, and some have 16x. You leave most of that on the table if the block diagram of your algorithm is serial.

                                                    That said, 7 seconds to hash 1 GB is a really slow implementation of SHA-256. I’d expect OpenSSL to do it on any desktop machine in 1-3 seconds, depending on whether you have hardware acceleration. I’ve run this same benchmark…too many times :)

                                                    1. 2

                                                      That said, 7 seconds to hash 1 GB is a really slow implementation of SHA-256.

                                                      AFAIK sha256sum doesn’t use hardware acceleration. OpenSSL does, but note that @LeahNeukirchen didn’t benchmark OpenSSL’s SHA-256 (i.e. SHA-2) implementation, but rather SHA3-256 (i.e. SHA-3), which AFAIK (most?) CPUs don’t have dedicated instructions for.

                                                      1. 1

                                                        I intentionally benched SHA3 to show how much slower it’s to its competitor BLAKE2.

                                                    2. 3

                                                      As other comments noted, you wanted to benchmark openssl sha256, not openssl sha3-256, which is Keccak.

                                                      $ hyperfine 'b3sum /tmp/rand'
                                                      Benchmark 1: b3sum /tmp/rand
                                                        Time (mean ± σ):      34.0 ms ±   0.4 ms    [User: 183.3 ms, System: 62.7 ms]
                                                        Range (min … max):    33.4 ms …  35.1 ms    83 runs
                                                       
                                                      $ hyperfine 'openssl sha256 /tmp/rand'
                                                      Benchmark 1: openssl sha256 /tmp/rand
                                                        Time (mean ± σ):     270.0 ms ±   2.4 ms    [User: 210.8 ms, System: 59.2 ms]
                                                        Range (min … max):   266.3 ms … 274.2 ms    11 runs
                                                      
                                                      $ hyperfine 'openssl sha3-256 /tmp/rand'
                                                      Benchmark 1: openssl sha3-256 /tmp/rand
                                                        Time (mean ± σ):     900.5 ms ±  16.0 ms    [User: 832.0 ms, System: 67.9 ms]
                                                        Range (min … max):   880.3 ms … 929.0 ms    10 runs
                                                      
                                                      $ hyperfine 'sha256sum /tmp/rand'
                                                      Benchmark 1: sha256sum /tmp/rand
                                                        Time (mean ± σ):      1.355 s ±  0.008 s    [User: 1.297 s, System: 0.058 s]
                                                        Range (min … max):    1.343 s …  1.366 s    10 runs
                                                      
                                                      1. 5

                                                        You can pass in multiple commands to hyperfine and it will compare them for you, like so:

                                                         ▲ hyperfine  --prepare 'dd if=/dev/urandom of=/tmp/rand bs=1M count=1024' \
                                                          'b3sum /tmp/rand' \
                                                          'openssl sha256 /tmp/rand' \
                                                          'openssl sha3-256 /tmp/rand' \
                                                          'sha256sum /tmp/rand'
                                                        
                                                        Benchmark 1: b3sum /tmp/rand
                                                          Time (mean ± σ):      96.2 ms ±   1.6 ms    [User: 716.0 ms, System: 141.9 ms]
                                                          Range (min … max):    94.5 ms …  98.5 ms    10 runs
                                                         
                                                        Benchmark 2: openssl sha256 /tmp/rand
                                                          Time (mean ± σ):     599.5 ms ±   4.4 ms    [User: 469.6 ms, System: 125.6 ms]
                                                          Range (min … max):   593.7 ms … 605.8 ms    10 runs
                                                         
                                                        Benchmark 3: openssl sha3-256 /tmp/rand
                                                          Time (mean ± σ):      1.807 s ±  0.005 s    [User: 1.663 s, System: 0.134 s]
                                                          Range (min … max):    1.802 s …  1.816 s    10 runs
                                                         
                                                        Benchmark 4: sha256sum /tmp/rand
                                                          Time (mean ± σ):      3.606 s ±  0.004 s    [User: 3.485 s, System: 0.101 s]
                                                          Range (min … max):    3.600 s …  3.612 s    10 runs
                                                         
                                                        Summary
                                                          b3sum /tmp/rand ran
                                                            6.23 ± 0.11 times faster than openssl sha256 /tmp/rand
                                                           18.78 ± 0.31 times faster than openssl sha3-256 /tmp/rand
                                                           37.47 ± 0.61 times faster than sha256sum /tmp/rand
                                                        
                                                      1. 5
                                                        Suggestion 2

                                                        Really embracing brainstorming here, please read with principle of charity:

                                                        Distribute oil as the interpreter for Oil the language. Name the project Oil or Oil Lang.

                                                        If that binary can act as a bash compatible drop-in replacement, name that symlink/wrapper bash. Let package maintainers decide how best to integrate for their distro (saying this as a former package maintainer for a few different distros - Debian, Gentoo, Exherbo, KISS, yocto).

                                                        If you will be developing many different tools under the same umbrella, name that organization something different. “Oils for Unix” sounds like an organization/team that creates and maintains a few different projects. It would be okay to have oils-for-unix.org point towards oil-language.org and/or other project homepages if you think that is where the current project is heading.

                                                        1. 2

                                                          Wow, this is simple, brave, and obviously correct.

                                                          1. 1

                                                            I appreciate the suggestion, but yeah I am seeing that the naming confusion is coming from confusion about the project, and about the domain.

                                                            It can’t literally be bash because OSH is something different – a cleaned up version of bash, with a gradual upgrade path to YSH.

                                                            Again, it would be like naming Clang “gcc” – that’s ridiculous.

                                                            (BTW If you create a symlink called “bash” to oils-for-unix, it will ALREADY run like osh. But that can’t be its primary name.)

                                                            Instead clang and gcc can both be invoked under names like “cc”, and that’s exactly what oils-for-unix does. It can be invoked like sh or bash, in which case it uses the compatible OSH mode.

                                                            “Oils for Unix” sounds like an organization/team that creates and maintains a few different projects

                                                            That’s exactly the connotation I want! As mentioned, there is OSH and YSH and serialization formats based on JSON.

                                                            1. 2

                                                              Thank you for taking seriously my suggestion and sharing more reasoning about the challenges and inspirations. I had a long written out set of questions, but I think what’s most important is separating out orthogonal challenges:

                                                              • team and project naming
                                                              • package and binary naming
                                                              • per-package distribution naming and implementation (symlinks, etc)
                                                              1. 1

                                                                Clang and gcc have symlinks from cc because they implement the cc interface (with some wiggle room I presume). It would be absurd to have a link named gcc pointing to clang, because clang doesn’t attempt to implement the gcc interface. Does that make sense?

                                                                If osh aims to implement the bash interface, then a link named bash pointing to oil would be akin to a link named cc pointing to gcc. I’m not aware of any other shells that have done that for bash, but many shells have done it for sh, even though they don’t exactly replicate the original Bourne shell or POSIX sh. Some Linux distros make sh a symlink to bash, which itself implements the sh interface so that most scripts with #!/bin/sh at the top will run without requiring changes to the code.

                                                                It can be invoked like sh or bash, in which case it uses the compatible OSH mode.

                                                                What do you mean by “invoked like sh or bash”? Presumably you don’t mean that argv[0] would be sh or bash, since you said you think those symlinks would be ridiculous.

                                                                edit:

                                                                That’s exactly the connotation I want! As mentioned, there is OSH and YSH and serialization formats based on JSON.

                                                                Note the difference between an organization and a software product developed by said organization. @jedahan was saying it sounds like the former, not the latter.

                                                            2. 3
                                                              Suggestion 1

                                                              project - Oils

                                                              language - Oil

                                                              package name - oils or oilsh (apt install oils)

                                                              official interpreter - oils or oilsh (/usr/bin/local/oils)

                                                              the posix script runner - oils-posix or oilsh-posix as a symlink or wrapper script that sets the correct shopt

                                                              Separating out other suggestions to different posts so agreement is not conflated

                                                              1. 3

                                                                Thanks for the suggestion

                                                                So then taking into account the symlink constraint, the suggestion would be

                                                                oils -> oilshell
                                                                oils-posix -> oilshell
                                                                

                                                                “Oils” is a valid way to refer to the project. Actually that’s what I wanted originally (since it’s 1 char different than Oil), but I didn’t want it to be a “Go” vs. “Golang” situation.

                                                                “Go” isn’t unique enough, so people say “golang”. And then the creators are like “No the name is Go”.

                                                                For example, I don’t want it to be “Oilslang”, which is not googleable.

                                                                1. 1

                                                                  What about oilruntime or oilrun for the executable? oils -> oilrun, oils-posix -> oilrun, true -> oilrun, etc. Feels a bit more BusyBox like than oilshell.

                                                                  1. 1

                                                                    Don’t you think it makes sense if /usr/local/bin/$PROJECT matches www.$PROJECT.org and github.com/$PROJECT etc.?

                                                                    Or I guess that’s NOT the thing you type, so you don’t think it should match?

                                                                    I think at least one of these should be true:

                                                                    1. www.$PROJECT.org etc. matches the busybox-like binary
                                                                    2. www.$PROJECT.org etc. matches the thing you type – bin/osh or bin/ysh

                                                                    The problem is that #2 is impossible, because domain names are globally unique, and Unix names are short

                                                                    So I think #1 should be true

                                                                    Feedback?

                                                              2. 5

                                                                One question I haven’t found clarification about - why does the distribution need to be one binary with two symlinks?

                                                                Why not one binary plus one symlink? Or two binaries? Or one binary with an argument?

                                                                It seems to really restrict the design space to have to come up with three related names, instead of two.

                                                                1. 2

                                                                  It’s mainly because it’s set up like busybox, and has been for years. This leaves room for more commands, which we will almost certainly use.

                                                                  Currently they are osh oil, and also true false readlink, and we can add time test, etc.

                                                                  1. 2

                                                                    it’s set up like busybox

                                                                    This is confusing. Busybox isn’t a shell.

                                                                    1. 2

                                                                      are you looking for unique names for true false readlink time test, etc? Or are they expected to behave exactly as posix, so no need?

                                                                      1. 1

                                                                        which we will almost certainly use

                                                                        Presumably osh/oil will use its own implementations of those commands without traversing the symlinks. Are you expecting users to want to use the oil implementation of those commands while using a different shell?

                                                                        1. 1

                                                                          Yes, that’s a possibility

                                                                          A minimal readlink was added because OS X doesn’t have it, but it’s useful for source-ing shell scripts

                                                                          1. 1

                                                                            The idea of a single binary that lets you gradually convert your shell scripts from one language to another is an interesting one. But tacking on some subset of busybox feels like feature creep and really offends my sensibilities. I guess it doesn’t offend yours, and you don’t seem to mind if a decision seems outrageous to a majority of the people you ask for feedback.

                                                                            What’s the reasoning behind adding true, false, time, and test? Are there systems that don’t have those, like how OS X doesn’t have readlink?

                                                                            If someone installs your shell through their distro’s package manager, should they expect symlinks named readlink, true, false, time, and test to appear under /usr/bin?

                                                                    2. 13

                                                                      For those looking for more detailed examples of just how much difficulty can be encountered by trying to learn and use Nix, I can highly recommend https://ianthehenry.com/posts/how-to-learn-nix/ . Its long, detailed, and can show some of the good and bad outcomes of the deeper issues touched on in the original post.

                                                                      1. 6

                                                                        The addrspace keyword seems quite nice for microcontrollers and the like

                                                                        pub const will_be_placed_in_flash: i32 addrspace(.flash) = 123;
                                                                        
                                                                        pub fn readFlash(ptr: *addrspace(.flash) i32) i32 {
                                                                            return ptr.*;
                                                                        }
                                                                        
                                                                        1. 2

                                                                          Wow this is very handy. I assume we’ll be free from trying to understand linker scripts in the future?

                                                                          1. 1

                                                                            I’m super excited to revisit some Zig GBA stuff that’s floating around online with this.

                                                                          2. 27

                                                                            I’m a bit sad that this is not including nix as a package builder because nix has wonderful support for creating minimal containers out of a fixed predefined list of dependencies.

                                                                            You can just say “build me a container with package X y and z” and you will get one with these packages and all dependencies and nothing else. No cleanup needed, no way to accidentally leave unspecified stuff in the container.

                                                                            1. 10

                                                                              I think that offering Nix can be a bit of a bittersweet solution, cuz now you need to try and make your stuff “nix compatible”, which can be tough according to what I see around here (and my couple of attempts of just trying to make a dev environment. Granted I am not an expert)

                                                                              Another tool I think works here but kinda suffers from a similar style of problem as nix is Bazel. It offers some isolation capabilities (when set up with remote caching you can get massive speedups on big projects), and instead of describing your container as a set of build steps, you’re desribing it as a file tree (cuz that’s what it ends up being!)

                                                                              You can get good speedups just from making it so that (for example) your webpack step and your manage.py check steps can run in parallel, just from the build description making it clear to Bazel that they aren’t dependent on each other.

                                                                              But, like nix, Bazel has a bit of the “do you want to use this? fix your software” problem. Luckily there are a lot of people with an abundance of cleverness who have built out really good tools to handle common languages, but it’s still uphill for some projects

                                                                              1. 4

                                                                                There is this fairly wide gap between what you need to just play around with some code and what you need to make a build/deploy/run in prod setup work long term. Bazel, and Nix solve the second one at the cost of sometimes requiring you to go quite deep on how stuff get’s built and run. Language based package managers allow you to just play around at the cost of sort of ignoring anything that’s cross-language in many cases.

                                                                                It would be nice if there was a gradual path from playing around to productionizing but there doesn’t seem to be.

                                                                                1. 7

                                                                                  Its more than just learning how the package you want gets built and running, but where and how the nix definitions you are likely to be importing have decided to wrap those build systems. This is true of most package managers that define their own DSL, but comparatively speaking the nix DSL for package building is much less ‘standardized’ in what you are supposed to do.

                                                                                  Two examples of the fallout of the difficulties mentioned (by me and @zaphar):

                                                                                  1 - I have never seen two experts on nix agree what nix-specific tooling they use in their stack, but they all seem to agree that just following the main nix documentation is not enough.

                                                                                  2 - I have never seen two nix definitions for an individual package written ‘from scratch’ by two different folks look the same / only differ in what package-specific options they cared to need.

                                                                                  To contrast, most gentoo ebuilds, exheres definitions, arch linux (src) pkgbuilds, and kiss package definitions often converge very very quickly, so looking at examples and building off those examples give someone who is learning the system much more confidence when starting out, and when becoming an intermediate user.

                                                                            2. 6

                                                                              I made this dumb little script to replace Docker-Desktop. It uses multipass to create an ubuntu vm, and sets up podman for it. Any feedback is appreciated.

                                                                              https://github.com/jedahan/podman-desktop

                                                                              podman-desktop --cpus 2 --disk 10G --identity ~/.ssh/github 
                                                                              
                                                                              1. 8

                                                                                I have a lot of problems with systemd, with many articles showing how to do simple things in a complex way.

                                                                                This is the first article I’ve read showing actual examples of complex things made simple with systemd, and appreciate it.