Threads for raymii

  1. 7

    I’m a simple man, I see trains, I upvote.

      1. 3

        I have a script using slop and ffmpeg, https://raymii.org/s/snippets/Record_your_Linux_Desktop_with_ffmpeg_and_slop.html, but it creates huge files. This articles approach looks interesting because I’ve now mostly switched to Peek, which producesway smaller ffiles and can be resized to a specific window. https://github.com/phw/peek

        1. 2

          peek is very convenient, and it’s even in most distro’s repositories, I believe. Certainly on Fedora.

          I like to output mp4s with it, even if it describes itself (in the repository) as:

          peek.x86_64 : Animated GIF screen recorder with an easy to use interface

        1. 0

          Title is editorialised to highlight the specific doc part.

          1. 4

            It’s a more useful title than the original.

          1. 4

            Title was edited to be less clickbaity.

            I dislike the syntax, seems to be just to make the parser easier instead of easier for the user (the programmer). Make the parser as complex as possible, but the language easy for the user. Programming languages, IMHO, are ment to be read, not written.

            1. 9

              I think there are two separate themes here:

              • Is Carbon syntax easy for humans?
              • Is making syntax easier for tools worth it?

              For the first one, I am pretty sure that, for humans, Carbon is a marked improvement over C++. C syntax requires a special micro-skill for reading function types and cv-qualifiers, which is definitely not human friendly. Ability to ctrl+f for fn $identifier is also super helpful! It’s not clear if that’s the best we can do, but it seems good enough, and matches pretty closely the current dominant “ML with curly braces” style of Go, Swift, Kotlin and Rust.

              The second one is a tradeoff. You can push extra complexity into compiler’s semantic analysis to make syntax easier, but it’s not free. There are three things you trade:

              • Huge amount of implementation effort. I would estimate that it’d take a motivated intern a year to implement a Carbon language server which would run in circles around rust-analyzer in terms of both features and performance.
              • Feedback loop length: complex features generally take more time to analyze, and time is perceivable by the human programmer. Some language features place a bound on how even a theoretically optimal compiler can be.
              • Tolling features: certain features might become impossible depending on the language complexity. A good one is guaranteed correct automated refactors: the language might, or might not force you to use heuristics there!

              Carbon is designed for huge codebases, and I would argue that, the larger the codebase, the more important the above points become. So, it seems to me that Carbon very deliberately prioritizes tooling-friendliness (api files would probably be the most contentious feature here). And they do a great job at it: at this point, and IDE for Carbon would be easy to implement, fast, and feature full. Hope they don’t mess this up when adding conditional compilation :-)

              1. 2

                That’s just a question of taste. I much prefer the new syntax. It’s closer to rust, and, transitively, to the ML family. Ambiguities bite programmers too, so this makes it easier for everybody.

                Generally the syntaxes that look like rust/kotlin/scala/… (var x : type = expr etc.) are, imho, just better. It’s easy to omit the type when it can easily be inferred and feels redundant. It’s easy to see where a variable is first defined. It lends itself well to distinguishing mutable variables from immutable ones. I hope it keeps going in this direction.

                1. 2

                  Easier for the parser or not, CDECL syntax is a dumpster fire, and drifting either in the MLish direction with trailing types or Modula-ish direction with keywords replacing a bunch of braces would be preferable for this code reader.

                1. 11

                  Imagine your change log looking like this:

                  better support for new Intel and AMD Zen 3 chipsets, […], support for wsfb-based X11 servers on the Commodore Amiga.

                  I love netbsd, running on Alpha mostly, or sometimes x86.

                  1. 8

                    I have to admit taking a lot of pleasure in putting very old and very new things together like that when writing the NetBSD changelogs. ;)

                  1. 24

                    Can we have a snarky version, to replace n-gate.com?

                    1. 38

                      I tried few-shot training GPT-3 by copying 4-5 HN headlines and their n-gate summaries into the prompt. Then I pasted some headlines from HN’s frontpage today:


                      Microsoft Windows is prohibited at Gitlab

                      Gitlab (business model: “Uber for Git”) has decided that it will no longer support Microsoft Windows (business model: “Uber for proprietary software”). Hackernews, who have all been using Macs for the past ten years and have never even heard of Windows, are shocked and appalled that anyone would use such a terrible operating system. They spend the next few hours patting themselves on the back for making the right choice, and then get into a heated argument over which text editor is the best.


                      Bringing back the golden days of Bell Labs

                      A New York Times article (business model: “Uber for articles about the good old days”) about an attempt to recreate Bell Labs (business model: “Uber for the telephone”) in Silicon Valley. Hackernews, most of whom are too young to remember the good old days, bemoan the fact that everything was better back then and that the world is going to shit. A few Hackernews try to explain to the others that the world has always been going to shit, and that things were never as good as they seem in retrospect.


                      Alex Jones must pay $4m in damages for Sandy Hook hoax claims

                      Alex Jones (business model: “Uber for bullshit”) has been ordered to pay $4 million in damages for claiming that the Sandy Hook massacre was a hoax. Hackernews, who have never heard of Alex Jones or Sandy Hook, spend the next few hours trying to figure out what a hoax is.


                      Is DALL-E 2 ‘gluing things together’ without understanding their relationships?

                      OpenAI (business model: “Uber for AI”) releases a new version of its DALL-E image-generation algorithm, which is able to generate images from textual descriptions. Hackernews, who are not sure what an algorithm is, spends the next few hours trying to figure out what an image is.

                      1. 21

                        A New York Times article (business model: “Uber for articles about the good old days”)

                        Hackernews, most of whom are too young to remember the good old days, bemoan the fact that everything was better back then and that the world is going to shit.

                        Alex Jones (business model: “Uber for bullshit”)

                        Okay, I think it’s safe to say that GPT-3 just passed the Turing test with flying colours :-D

                        1. 10

                          This is pretty much perfect!

                          1. 6

                            This would be the only weekly newsletter I would subscribe to, awesome.

                            1. 1

                              These are so good that I’m almost tempted to ask for evidence that you actually ran these through GPT-3 instead of writing them yourself.

                              I wonder how far are we from a Netflix comedy special that’s entirely performed live by an AI…

                              1. 2

                                I wonder how far are we from a Netflix comedy special that’s entirely performed live by an AI…

                                We’re already there!

                                Seriously though, these systems seem pretty nifty for brainstorming, but the extreme cost of re-training makes it difficult to generate something topical. Even OpenAI’s newest, biggest, most expensive text model (text-davinci-002) is running a year behind on training data.

                            2. 2

                              I tried replacing the GPT-3 prompt with:

                              "Write a snarky one-sentence summary of the following article: %s\n\n"
                              

                              Here is the result. Not particularly snarky. Maybe GPT-3 needs to be shown an example of the tone in order to maintain it.

                              1. 10

                                Tried “Write a dark-humorous one-sentence summary of the following article:\n%s\n\n” on gpt-3 playground (using text-davinci-002) for the first few lines of https://github.com/hackergrrl/art-of-readme, and I got this:

                                A dark-humorous one-sentence summary of the article would be: “The README file is a long-standing tradition of developers trying to be helpful, but really just annoying users.”

                                1. 2

                                  Please @nathell provide different toned variants like this!

                            1. 4

                              The webUSB emulation part seems interesting, all the other parts regarding who liked whoms album and streaming less so.

                              1. 3

                                And I thought that C++ template metaprogramming was fun, this is even better :)

                                1. 4

                                  This is obviously a screenshot of KDE. I can’t say whether this blog is trolling or just ill-informed.

                                  1. 6

                                    It’s tagged here as “satire”. There are some joke articles on the site, though also some more serious articles,

                                    1. 2

                                      Thanks. I missed the tag, clearly.

                                      1. 1

                                        Satire and Linux, so I hoped the joke was clear enough. Although, windows 11 light theme could pass for kde in a short glance. Lunduke has good stuff, sometimes serious, sometimes historical, but sometimes also phoronix level clickbait.

                                      2. 1

                                        The shiny new “Dolphin” file manager was a dead give-away, tag or no :)

                                      1. 10

                                        First off, this is hilarious:

                                        ❗ This post is over ten years old. It may no longer be up to date. Opinions may have changed.

                                        No, ed is timeless in its unmatched might! :)

                                        Anyway…

                                        Back in the bad old days when Linux wasn’t a thing and myriad workstation vendors with frustratingly incompatible UNIx versions held sway, being a system administrator was painful, and just ONE of those pain categories was trying to keep your $TERMINAL variable and your actual terminal in sync, as well as ensuring that the system you’re on had the right terminfo/termcap nubbins.

                                        In short, Curses based applications were as always awesome but SUPER dicey at times, and when the chips were down and production was in jeopardy, my personal bacon was saved more than once by being able to connect to the server and edit that zorched configuration file with ed :)

                                        ed /etc/mission_critical.cf
                                        /BROKEN_THING
                                        s/BUSTED/WORKING/
                                        1,$p
                                        w
                                        w!
                                        q
                                        

                                        :)

                                        Yup. Still rattling around in there somewhere :)

                                        1. 6

                                          First off, this is hilarious:

                                          ❗ This post is over ten years old. It may no longer be up to date. Opinions may have changed.
                                          

                                          No, ed is timeless in its unmatched might! :)

                                          That’s an auto-generated piece my self written static site generator adds to every article over one year old, but, for ed I agree it could probably skip it. Not configurable though.

                                          I saw that at @jlelse’s site and thought it was a nice feature.

                                        1. 3

                                          One day later, the release announcement is here: https://vmssoftware.com/about/news/2022-07-14-openvms-v92-for-x86-announced/

                                          Sadly no download available, just a link to contact sales… Let’s hope the community program is updated soon

                                          1. 19

                                            This implementation is not nearly pure GNU Make enough for me. :)

                                            Here’s one that is pure Make. Some of it is cribbed from The GNU Make Book and not all the definitions are necessary. Numbers are represented by a list of xs. So 5 would be the string x x x x x.

                                            It counts down from 100 instead of up. I don’t really care.

                                            _pow2 = $(if $1,$(foreach a,x x,$(call _pow2,$(wordlist 2,$(words $1),$1))),x x)
                                            _all := $(call _pow2,1 2 3 4 5 6 7 8) 
                                            num = $(words $1)
                                            val = $(wordlist 1,$1,$(_all))
                                            incr = x $1
                                            decr = $(wordlist 2,$(words $1),$1)
                                            
                                            max = $(subst xx,x,$(join $1,$2))
                                            min = $(subst xx,x,$(filter xx,$(join $1,$2)))
                                            
                                            eq = $(filter $(words $1),$(words $2))
                                            ne = $(filter-out $(words $1),$(words $2))
                                            gt = $(filter-out $(words $2),$(words $(call max,$1,$2)))
                                            gte = $(call gt,$1,$2)$(call eq,$1,$2)
                                            lt = $(filter-out $(words $1),$(words $(call max,$1,$2)))
                                            lte = $(call lt,$1,$2)$(call eq,$1,$2)
                                            
                                            add = $1 $2
                                            subtract = $(if $(call gte,$1,$2),$(filter-out xx,$(join $1,$2)),$(warning Underflow))
                                            multiply = $(foreach a,$1,$2)
                                            divide = $(if $(call gte,$1,$2),x $(call divide,$(call subtract,$1,$2),$2),)
                                            mod = $(if $(call gte,$1,$2),$(call mod,$(call subtract,$1,$2),$2),$1)
                                            
                                            fizz = $(call eq,$(call val,0),$(call mod,$1,$(call val,3)))
                                            buzz = $(call eq,$(call val,0),$(call mod,$1,$(call val,5)))
                                            fizzbuzz = $(and $(call fizz,$1),$(call buzz,$1))
                                            
                                            fbcheck = $(if $(call fizzbuzz,$1),$(info FizzBuzz),\
                                                        $(if $(call fizz,$1),$(info Fizz),\
                                                           $(if $(call buzz,$1),$(info Buzz),\
                                                               $(info $(call num,$1)))))
                                            
                                            loop = $(if $1,$(call fbcheck,$1)$(call loop,$(call decr,$1)),)
                                            
                                            all: ; @echo $(call loop,$(call val,100))
                                            
                                            1. 7

                                              This implementation is not nearly pure GNU Make enough for me. :)

                                              That’s the spirit :-) I saw a blog post about doing this kind of arithmetic in make but didn’t want to go this far down the rabbit hole. I’m glad you did though.

                                              1. 4

                                                Comments and articles like these are why I love lobste.rs :D

                                                1. 3

                                                  Wow. Some things people were not meant to know.

                                                  This note implies GNU make is Turing complete.

                                                  https://okmij.org/ftp/Computation/#Makefile-functional

                                                1. 2

                                                  I would say that the WhatsApp part is a bit of a clickbait—with enough bridges, any system can technically use anything. Somehow getting a web browser capable of running web.whatsapp.com on Win Mobile 2003 would be really impressive, while bridging is mostly a matter of enough patience to set it up.

                                                  Reminds me how in the ealy ’00s I wanted a PDA, but I was a poor high school student and there was no way I could ever afford one—I barely managed to get the cheapest cellphone after my last high school year. And then PDAs just died out.

                                                  1. 1

                                                    I would say that the WhatsApp part is a bit of a clickbait—with enough bridges, any system can technically use anything.

                                                    Well, you still need an IRC client, which isn’t a given.

                                                    1. 1

                                                      Somehow getting a web browser capable of running web.whatsapp.com on Win Mobile 2003 would be really impressive.

                                                      Opera mini didn’t work, but I could try it out with wrp, ( https://github.com/tenox7/wrp ). But the usability would probably be bad since it’s such a small resolution.

                                                    1. 4

                                                      I’m a simple man, I see dragonfly bsd, I upvote. Even though the article doesn’t explicitly mention what the issues with Dragonfly are. Anyone has a clue what issue is with what bsd?

                                                      1. 9

                                                        The auto disk partitioning is surely OpenBSD. Probably also the VMware one. Oh, and the disk image versus iso image is most probably also OpenBSD :)

                                                      1. 1

                                                        This is a really interesting series and I’m curious to see how it goes for you as I’ve been pondering similar things for a project I’m working on.

                                                        One thing that’s crossed my mind is: the GPL is about allowing people to make changes and distribute those changes. What do you think of a scenario where someone buys your app, makes some changes to suit themselves or a different use case then publishes the code on GitHub, which they’re allowed to do? They don’t even really need to make changes, they could just put the code online for whatever reason.


                                                        There have been recent issues over at Elementary and one of their founders has mental issues, so not the most stable example, but still, an example.

                                                        This seems a little unfair and an unnecessary detail. Elementary has been funding itself for years (at least 7) with this model so any recent events don’t really have an impact.

                                                        1. 2

                                                          What do you think of a scenario where someone buys your app, makes some changes to suit themselves or a different use case then publishes the code on GitHub, which they’re allowed to do? They don’t even really need to make changes, they could just put the code online for whatever reason.

                                                          I’m perfectly fine with that. If I wasn’t, GPL would be a bad licensing choice. My entire GitHub profile is filled with open source, and the plan was to put leafnode there like the rest. But, this is an interesting avenue to explore, both out of curiousity and because it’s different that what I previously did.

                                                          This seems a little unfair and an unnecessary detail.

                                                          Yes, re-reading that part makes it sound way harsher than I intended. Will remove that once I’m near my workstation again.

                                                          1. 2

                                                            What do you think of a scenario where someone buys your app, makes some changes to suit themselves or a different use case then publishes the code on GitHub, which they’re allowed to do? They don’t even really need to make changes, they could just put the code online for whatever reason.

                                                            I’m perfectly fine with that. If I wasn’t, GPL would be a bad licensing choice. My entire GitHub profile is filled with open source, and the plan was to put leafnode there like the rest. But, this is an interesting avenue to explore, both out of curiousity and because it’s different that what I previously did.

                                                            There are two other problems that I’ve seen with folks who try the approach that you’re doing.

                                                            The first is a variant of the innovator’s dilemma. You’re doing the work of creating the thing, and you’re making it a bit harder for folks that don’t pay you to use it. Someone else who packages it has far less work to do than you. There’s nothing stopping someone else from building GPL’d installers and putting instructions somewhere public. They don’t have to spend any of the effort to create the thing in the first place, so they can spend more time on the packaging than you. They can easily produce something easier to install than you can, for the same investment in effort. You’re explicitly framing the sale as the end user paying for you to do the easy thing (packaging), not the difficult thing (writing the code in the first place), so you have to compete with people who do only the easy thing.

                                                            The second problem is if someone extends your code with something under a different but compatible license. For example, if they wrap it in something AGPLv3 (since you didn’t specify a GPL revision, I’m going to assume that you meant the latest version). Their fork is under a more restrictive license, will you want to take their changes? Forking is a fact of life for any open source project but when there’s a paid option then some people will intentionally license their changes under a license that they believe that upstream won’t take so that they’re not releasing work to support a paid product.

                                                            The cases have a lot in common. You’re relying on giving 95% of something away for free and charging people for the remaining 5%. Other people can easily provide that 5% and charge for it, give it away, or give it away in such a way that you’re likely to be unwilling to merge it into your version. In the latter two cases, they can add other things that differentiate their version from yours. What’s your expected strategy here?

                                                            1. 1

                                                              Every libre-non-gratis project sees gratis distribution one way or another. Conversations has several gratis forks, yet the author still makes enough from the official app to keep going. Synergy was the most popular version of their own software for many years. Etc.

                                                              1. 1

                                                                Thanks for mentioning the two. synergy has only an open core left, but I added a section on conversations.im to the page

                                                              2. 1

                                                                Do you have example cases of the scenarios described happening? I already had trouble compiling the list because for sale GPL software is quite rare. I’d love to expand the list. One example has been given in a comment below, another messaging client.

                                                                If people make use of the freedoms the GPL gives them, how is that not a wonderful thing? I do not expect to make a profit, if I a few years the running costs are covered that would be great but I even doubt that that will happen.

                                                                The return value for me if not in the money but in the experience gained. Both with the Qt framework as well as the distribution side. The extra Qt experience has lead to a promotion at work and the appimage / installer part had extended my knowledge which was also directly applicable at work. A few technical challenges gave me more insight in lower level multiplatform threading and concurrency limits with c++, (looking at you, recursive mutexes) which otherwise I wouldn’t have to dive into so deep, so all in all, even without sales I already got a large amount of value back.

                                                                And to be honest, if someone forks my app and changes or extends it, it means it (partly) fills a need they have. Enormously flattering that would be.

                                                              3. 1

                                                                I’m perfectly fine with that. If I wasn’t, GPL would be a bad licensing choice. My entire GitHub profile is filled with open source, and the plan was to put leafnode there like the rest. But, this is an interesting avenue to explore, both out of curiousity and because it’s different that what I previously did.

                                                                Fair enough. I’m curious to see how it works out too. :)

                                                              4. 1

                                                                has mental issues

                                                                Yeah, this feels off-base. Lunduke is not a good-faith arbiter here.

                                                              1. 10

                                                                Maybe it’s time for a SerenityOS tag?