1. 31

    Nice ad. :|

      1. 3

        Also at the moment according to the pricing page, payment is optional.

      2. 20

        You’re right, and how virtuous Sourcehut may or may not be doesn’t change that. The line between ad and article is a spectrum, but this seems to be pretty well into the ad side of things. I apologise, I’ll be more discerning in the future.

        1. 4

          If you crack some other good places to get the word out, I’d be interested in hearing. My online circle is pretty small (lobste.rs and HN), but I’m working on something I want to ‘advertise’ the hell out of quite soon…

          1. 5

            I’ve been trying to engage more with Reddit for this reason. I don’t really like it as a platform or see it as doing a social good, but there are users there and I’d like to be there to answer their questions. I was going to make a Twitter account, too, but they wanted my phone number and a pic of my ID and a blood sample to verify my account so I abandoned that. Finding good ways to ethically grow Sourcehut’s audience is not an entirely solved problem.

            1.  

              The reason Twitter – and many platforms – asks for phone numbers is because spam and trolls are a persistent problem. Ban one neo-Nazi troll tweeting obscenities at some black actor for DesTROyinG WhITe SocIEtY and they’ll create a new account faster than you can say “fuck off Nazi”.

              Reddit is often toxic as hell by the way, so good luck with that.

              1. 1

                Huh…I have a twitter account and all I needed for it was an email. Maybe things have changed.

                1. 1

                  Nowadays they let you in with just an email, but after some time “block” your account and only unblock it after you give your phone number.

            2. 3

              While I also see it as an ad, I’m interested in what it being announced as a Sourcehut user. But it seems you don’t have a RSS/Atom feed for the official blog… Or is there a mailing list I missed?

              1. 2

                https://sourcehut.org/blog/index.xml

                I’ve been meaning to make this more visible… hold please done.

            3. 14

              It’s advertising an open source project, Source Hut, but also Janet, Zig, Nim, Samurai, Sway and other open source projects I like. Projects that get very little payment or gratitude for the work they do.

              Yes sr.ht is a service too, a useful one at that. They support BSD well, unlike other companies, how else are they supposed to let people know this fact? Should they be paying largely unethical companies like google for ad space? Or should they just be more subversive so people don’t complain.

              Let me put it this way, if every open source project was also a business, should we hate on every single one for advertising? sr.ht didn’t game the upvotes to get on the front page, people upvoted it by themselves.

              I suppose there could be a tag ‘sponsored’ so people can ignore them. Not suggesting allowing lower quality from sponsored content either, probably the inverse.

              1. 21

                The issue is that I see a Sourcehut “ad” every few days: “Sourcehut supports OpenBSD”, “Sourcehut supports migrations from Bitbucket”, “Sourcehut supports ASCII”. Yeah … we got it … A lot of these posts don’t have a lot of meat to them and at this point, it’s just getting spammy.

                1. 16

                  Yeah … we got it … A lot of these posts don’t have a lot of meat to them and at this point, it’s just getting spammy.

                  They don’t always have a lot of “meat,” but posts about SourceHut represent a capitalist ideology I can actually get behind. A single proprietor, working their ass off to try to change the software world, which has gotten extremely out of hand with regards to complexity, and the marketing of products that fix the complex systems we don’t need, at all, to begin with.

                  What’s the difference between a SourceHut post, and an post ad that complains that as an open source author I am not compensated fairly? Hint: one should be inspiration, for the other is actually possible.

                  1. 0

                    SourceHut represent a capitalist ideology

                    payment for the service is optional, so no it doesn’t. All the things that make Sourcehut great in my opinion are the ways in which it denies capitalist ideology. Open Source Software, optional payments, etc.

                    1. 3

                      optional payments

                      It’s optional, right now, while in Alpha. It doesn’t seem the plan is that forever. Also, if it wasn’t clear, I’m extremely in favor of this model of charging people for a service, but releasing your software under a permissive license.

                  2. 10

                    Just let me other another data point here. It was thanks to the “migration from Bitbucket” post that I found out Sourcehut had a nifty script to help migrations from Bitbucket and that saved hours of work as I migrated 20+ repos effortlessly. This current post made me realize that maybe I should be paying more attention to their CI system as it looks much simpler than others I’ve used. So, in the end, I’m appreciating these blog posts a lot. Yes they are related to a commercial venture but so what? You can self-host it if you’re not into SaaS outside your control. If we set a hard line like this, then it becomes impossible to post about any commercial project at all. It is already hard to monetize FOSS projects to make them sustainable, now imagine if they are not even allowed blog posts…

                    1. 4

                      Same here. This string of posts made me aware of sourcehut and when I had to migrate from bitbucket, I then gave them a hard eval. I like their human, non-shitty business model of “I give them money and they give me services”, and that their products are professionally executed and no-frills.

                      I don’t know how to reconcile it. These articles were very useful to me, when most product ads weren’t and I’d be disappointed if this site became a product advert platform. I think people are right for flagging it is almost-an-ad, but in this one vendor’s case I’m glad I saw them and am now a happy sourcehut customer.

                    2. 2

                      every few days

                      A lot of these posts don’t have a lot of meat to them and at this point, it’s just getting spammy.

                      That is fair I guess. I’ll have to check the guidelines on things like that.

                    3. 6

                      if every open source project was also a business, should we hate on every single one for advertising?

                      Yes. I flag those too. Advertising is a mind killer.

                      1. 6

                        But there is no other way to get large numbers of people to know about something, following your advice would be suicide.

                        I also hate advertising, I just don’t see a way around it. I won’t argue further against banishing advertising from lobste.rs at least.

                        1. 7

                          But there is no other way to get large numbers of people to know about something, following your advice would be suicide.

                          All these conversations are done like it’s all or nothing. We allow politics/marketing/etc on Lobsters or… it never happens anywhere with massive damage to individuals and society. Realistically, this is a small site with few monetary opportunities for a SaaS charging as little as he does. If the goal is spreading the word, it’s best done on sites and platforms with large numbers of potential users and (especially) paying customers. Each act of spreading the word should maximize the number of people they reach for both societal impact and profit for sustainability.

                          Multiple rounds on Lobsters means, aside from the first announcement with much fan fare, the author sacrificed each time opportunities to reach new, larger audiences to show the same message again to the same small crowd. Repeating it here is the opposite of spreading the word. Especially since most here that like Sourcehut are probably already following it. Maybe even buying it. He’s preaching to the choir here more than most places.

                          Mind-killer or not, anyone talking about large-scale adoption of software, ideology, etc should be using proven tactics in the kinds of places that get those results. That’s what you were talking about, though. I figured he was just trying to show latest BSD-related progress on one of his favorite tech forums. More noise than signal simply because he was sharing excitement more than doing technical posts or focused marketing.

                        2. 5

                          Every blog post is an ad for something. It may not be a product, directly, but it’s advertising an idea, the person, or persons the idea was thought by, the writing (which, btw can be a product) of the author, etc.

                          If you want to sincerely flag advertising, you might as well get offline—it’s pervasive.

                          1. 3

                            It may not be a product, directly, but it’s advertising an idea

                            Not a native english speaker here. I may be wrong, but after looking at the dictionnary definition

                            advertisement

                            noun

                            A paid notice that tells people about a product or service.

                            it seems that an advertisement has a precise definition: an ad is directly related to a paid product, not an idea.

                            1. 1

                              it seems that an advertisement has a precise definition: an ad is directly related to a paid product, not an idea.

                              This is a fairly pedantic interpretation. A person promotes an idea to sell something, if even themselves. That “sale” might only come later in the form of a job offer, or support through Patreon, etc, etc.. But, to say that you can’t advertise an idea is wrong. The cigarette industry’s ad campaigns have always been about selling an image, an idea that if you smoke you become part of something bigger. Oh, and btw, you’ll probably remember the brand name, and buy that kind instead of something else.

                              iPods were sold on the very basis of white headphones, TO THE POINT, that people without iPods started wearing white headphones to be part of the “club.” Advertisements sell you the idea of a better life, and hopefully you’ll buy my product to get it.

                      2. 2

                        Somewhat amusing that this post with an interesting fully FOSS service, is marked -29 spam, whereas an actual advertisement about Huawei making macbook clones that run Linux has only -3 spam (one of which is mine).

                        1. 3

                          Said FOSS service has been on the Lobsters front page multiple times recently. I suspect the reaction is: “We get it, sr.ht exists and SirCmpwn is apparently desperate to attract a paying customerbase, but a clickbaity title for a blogspam ad on the usual suspect’s software is probably crossing the line.”

                      1. -1

                        always return 0 becase you do not set a bit to 1, this preserves energy. planet saved.

                        1. 4

                          It’s the same amount of energy, it just changes the direction/polarity.

                        1. 45

                          Most of this is “what can a human do”, with a brief note that software developers can often get additional available time for the important political work.

                          Here’s a thing that software developers in particular can do: Support older hardware.

                          • Code for older versions of browsers. Yeah, you won’t get the latest convenient features. That’s OK, people made great websites 15 years ago too. If you only ever code for the most recent version of browsers, you’re forcing people to buy newer hardware that supports those browsers.
                          • Make your code efficient in disk space, memory, and CPU.
                          • Support Linux, which can make better use of old laptops than Mac or Windows can.

                          If people can use older hardware, they’re buying less new electronics. This is not going to make a massive difference in terms of climate change, but it’s part of a larger pattern of putting a stop to growthism.

                          1. 14

                            Perhaps somewhat paradoxically, older hardware can be substantially less power efficient than newer hardware for the same tasks. It’s not always a good trade off particularly if you’re focusing on reducing your dependence on fossil fuel based power generation.

                            1. 29

                              It takes a lot for the power efficiency benefit to outweigh the cost of manufacturing and transport for new hardware. I suspect nothing in the consumer electronics realm comes close to break-even; datacenter a different matter.

                              1. 2

                                I tend to think of that more as an issue with washing machines and refrigerators. How true is that of laptops?

                                1. 7

                                  It’s an anecdotal and unfair comparison, but my 9-year old Dell Vostro laptop consumes 25+ Watt in idle state, whereas a Dell XPS from 2018 can be tuned to 4+ Watt of idle consumption (the same Linux distro, both have Core i7 from different generations; the differences: HDD vs SDD and 17”/dual graphics against 13” Intel graphics).

                                  1. 6

                                    Very. Modern CPUs are much faster and more power-efficient than older ones, and they can clock down much more, just making better use of each clock cycle.

                                2. 2

                                  I can see where you are coming from and I really agree with the sentiment. Still, it’s probably a lot more impactful to locally advocate for a right to repair legislation. People could then replace dead batteries of old phones so they can run your software in the first place.

                                  It’s so tempting to keep to yourself and just work on the small stuff but systemic problems need systemic remedies.

                                  1. 1

                                    True, although that’s something non-developers can do too!

                                1. 1

                                  Also, just a heads-up–when I install sneklang package with pip, it breaks trying to import forge (which, for some reason, cannot be installed).

                                  1. 1

                                    Ok fixed this, thank you!

                                  1. 1

                                    I think I killed it! Similar to exists-forall’s example:

                                    b = []
                                    i = 50
                                    while i > 0:
                                    	b = [b, [b]]
                                    	i = i - 1
                                    	
                                    str(b)
                                    
                                    1. 1

                                      So this is interesting, creating b is ok and within the bounds, but converting it to a string is where the problem lays.

                                      1. 1

                                        That was fun to fix, ok now the size of the evaluated expression is also included in the scope size check. https://sneklang.functup.com/v1/runs/9336c1835a765658589bf51c283e80744328d484

                                        ScopeTooLarge(‘Scope has used too much memory: 25100 > 20000.0 at line: 4, column:5’)

                                      1. 12

                                        I’m curious what Perl (either version) is used for these days.

                                        In the past I saw it used as a glue language for things like ad-hoc build/test pipelines, or a shell replacement when shell scripts became unwieldy. Nowadays CI tools or Python usually fill those roles.

                                        Personally I have no interest in working with Perl6. They doubled-down on everything I disliked in Perl5, and I think the language tries to be too clever. Too much “magic” and too many ways to do things for my liking. I’ve got better things to do than memorize a hundred special variable.

                                        1. 7

                                          Booking.com and DuckDuckGo run on Perl. (5, which is the only Perl.) I worked at Booking for two years, used Perl in anger, and grew to like it. It’s still and has always been a perfectly good Python/PhP/Ruby alternative.

                                          I wouldn’t write anything new in Perl, but more because of the difficulty of finding people who could work on it than any fault of the language. Fashion is a cruel top.

                                          1. 3

                                            I got in charge for a large Perl5 codebase by forking an abandoned project and we still consider Perl5 its original sin. I don’t think it’s an adequate alternative to anything but AWK one-liners (I still use it in that role and not going to give up—but that’s about it).

                                            Even with strict and warnings, so many things just pass silently. Sure, you can unit test it, but other languages that aren’t untyped can just detect it on their own, and produce an informative exception trace. The difference is especially noticeable in glue code that is hard to unit test. Its garbage collector still can leak memory in situations everyone else’s could handle a decade ago. The context thing (with default context almost never being documented) is still a minefield.

                                            The community part is important too. A lot of people had been telling us they would be happy to contribute, if it wasn’t for Perl. We’ve been steadily replacing it with Python, and it’s been an improvement all around. Code is easier to read, problems are detected earlier, and contributor activity is much higher.

                                            1. 4

                                              on the other hand the old farts who know perl might be more competent than the young hipster python programmers. that’s a heuristic i often use when evaluating projects: if the community is older they are less likely to do dumb shit.

                                            2. 7

                                              I use it for personal projects, mostly because I’ve invested the time to learn it well.

                                              I don’t think much new stuff is being written in Perl, but there’s plenty of maintenance.

                                              1. 6

                                                Currently gainfully employed and writing perl is part of my job, yes some of it is maintenance, but I also write new things in it as well. I also write go, python (grudgingly), shell, and some C++ here and there too.

                                                I, personally, would be very happy to see this change. Perl6 has some neat ideas that I’d love to flex some day, but Perl5 needs to move on. No reason they both can’t co-exist.

                                                The notion that Perl is dead dead dead dead is a tiresome one at this point.

                                                1. 5

                                                  I do it for a living in webdev (backend) and deployment automation.

                                                  1. 4

                                                    I’ve never used perl5, but I discovered perl6 recently and am in love. Good for: desktop applications (assuming they don’t get too big), scripts, web applications. It essentially obviates metaprogramming because anything you could possibly want to metaprogram is already in the language (including metaprogramming, in case you want that for some reason). That means that you have less to memorize than with any other language, because once you know it, you know it. There are no codebase-specific bespoke constructs you have to learn; it’s pretty much all straight perl6 because straight perl6 is already good enough.

                                                    1. 1

                                                      desktop applications web applications That’s interesting! What do you use?

                                                      1. 4

                                                        For desktop, there are various bindings to GTK and SDL; for web, cro is the current state of the art.

                                                  1. 5

                                                    This looks like a really cool project! I will definitely check it out.

                                                    With that said, I take issue with this from the end:

                                                    Nu would not have been possible without Rust. Internally, it uses async/await, async streams, and liberal use of “serde” to manage serializing and deserializing into the common data format and to communicate with plugins.

                                                    We also heavily leveraged crates.io. The ability to load numerous file formats, display messages, draw tables, and more all came from the hundreds (thousands?) of generous developers who wrote the crates we use in Nu.

                                                    Plenty of programming languages have async, serialization libraries and RPC, and package repositories full of nice libraries like that.

                                                    1. 4

                                                      My thoughts exactly. The “would not have been possible” seems a bit exaggerated. “would not have been as fast/pleasant to develop/fun” might have been a better way to phrase it.

                                                      Also, regarding the second quoted statement, I’m not sure that my shell having so many dependencies on external packages is a good thing.

                                                    1. 1

                                                      Windows 10 is pretty nice actually. It shocks and dismays me to say that because I was a hater for many years, but the accessibility features are excellent now, and as you say WSL makes things tolerable save for the terminal situation.

                                                      1. 2

                                                        I am sad that my experience did not match up with yours at all. I had to use windows 10 for a period of time (linux driver for my wifi dongle crashed), and could–not–stand–it. Slow, buggy mess.

                                                        1. 1

                                                          This is where I think buying your hardware from a shop that really does careful driver integration helps a LOT.

                                                          Alienware really puts a lot of care into tuning the drivers that go into the Windows 10 install in their laptops.

                                                          1. 2

                                                            I don’t think it’s the drivers; I think it’s just the OS.

                                                            Certainly, I don’t believe any of the things I experienced were attributable to the drivers.

                                                            1. 2

                                                              I am honestly just curious - what were some of the things you encountered? I’ve been using Windows 10 as my primary at home work environment for the last few months since my Kubuntu install ate itself and it’s been pretty great.

                                                              I’ll go back to Linux eventually when I have time to mess with things again but it’s a bit of an uphill battle on an unsupported rig like mine.

                                                      1. 4

                                                        I don’t really understand why there’s a Gitbook for this. It doesn’t seem to contain anything that couldn’t simply be in the README on GitHub, and even the documentation isn’t in there…

                                                        Code is written according to the rules of the CERT C Coding Standard

                                                        That said, it’s great to see a project that strictly adheres to these kinds of secure coding standards. We need more of this in the software development community, in general.

                                                        1. 4

                                                          I don’t really understand why there’s a Gitbook for this. It doesn’t seem to contain anything that couldn’t simply be in the README on GitHub, and even the documentation isn’t in there…

                                                          One important advantage over a github README is that this way it’s entirely independent from GitHub.

                                                          Regarding the CERT C Coding Standard, I’d be curious to hear from the author what it means concretely. The last time it was discussed here, my impression was that guidelines were rather along the lines of “be careful about overflows and with null-terminated strings”.

                                                          1. 5

                                                            One important advantage over a github README is that this way it’s entirely independent from GitHub.

                                                            I don’t see the connection.

                                                            There is no ‘GitHub README’. There is a readme file, which is included with libspng and hosted wherever it is hosted; if it happens to be on github, then it will be there, but the readme is no more dependant on github than the rest of the library.

                                                            1. 2

                                                              Agreed, I should revise my statement from

                                                              it’s great to see a project that strictly adheres to these kinds of secure coding standards

                                                              to

                                                              it’s great to see a project with the goal of strictly adhering to these kinds of secure coding standards

                                                              since I suppose we don’t know how closely the author follows the CERT, especially if the warnings are sometimes as vague as “don’t have a bug”.

                                                              I still think it’s good that they’re trying to adhere to some standard. At least that gives the community surface area to critique. A project without guidelines is much harder to fix

                                                          1. 4

                                                            Is there a reason you can’t use Cygwin? I use it for developing on Windows. The terminal is fine, and you can even build standalone windows applications without any Cygwin dependency.

                                                            Edit: Referring to the mintty terminal and the mingw64-i686-gcc-core package.

                                                            1. 3

                                                              It’s slow though, especially for CPU intensive tasks

                                                              1. 2

                                                                Came here to ask basically this. I do some Windows development occasionally and just use MSYS2 or whatever with mingw64. Yes it is not fast, but it is usable. I also occasionally just use good old cmd.exe with a Makefile since that is how I started and it’s not like you can’t do that anymore… How does the poster think we wrote software in Windows 95/98 days??

                                                                1. 1

                                                                  Mainly I am concerned about input lag–which was quite high when running gnome-terminal from wsl through vcxsrv–although, it may be better with cygwin since that’s running as a native app–except, maybe not: siblings suggest it’s slow.

                                                                1. 1

                                                                  You don’t really have a choice in this. Older versions of Windows are not alternative choices, but the same lack of choice shifted by a few years back. The same question in a few years will be:

                                                                  • Windows 10: zero crap, support ending soon
                                                                  • Windows 11: lots of crap
                                                                  1. 1

                                                                    The lack of support doesn’t bother me too much. The browser already provides what sandboxing I need for running websites; the most native applications can do is gain root, which is not so bad if they’re malicious, given they already have native code execution.

                                                                  1. 1

                                                                    Just my 2c, but I’m using Windows 8.1 with ClassicShell. This removes the crap and provides for longer support.

                                                                    The situation with the terminal is interesting. I may be wrong, but my understanding is that they’ve been improving the VT rendering progressively throughout Windows 10 while at the same time modularizing the code. The new windows terminal is using a new graphical display, but modules like the part translating VT and managing the underlying buffer are shared between the new terminal and the old one. The reason this matters is it’s all on github and the old/GDI based one can be compiled and works on Windows 8.1.

                                                                    For Windows 10 LTSC, I assume you’re meaning the 2019/RS5 version? In this case all of the above applies but it’s built in, ie., it has a GDI based terminal that has all of the VT support added in the last few years. If you mean the 2016 version, it doesn’t have WSL, and the VT support is much more primitive.

                                                                    I haven’t used WSL2 yet, but since it’s a Linux VM I’m curious to see how it compares to other Linux VM options, of which there are plenty. But it makes me wonder a bit because you’re suggesting that your hardware isn’t beefy enough to run a Windows VM on a Linux host, so why would it be different to run a Linux VM on a Windows host…?

                                                                    If you really want a low-crap experience, another option is Server Core or Hyper-V server. That means no graphical compositor, but it runs WSL1, has the GDI terminal mentioned above, has another decade of support, and may be low-crap enough to run in a VM. I managed to get the Visual Studio build tools to install on it, which works for compiling my software. The big issue with it though is it may be too different to “real” Windows such that it’s not a great test environment.

                                                                    1. 1

                                                                      I may be wrong, but my understanding is that they’ve been improving the VT rendering progressively throughout Windows 10 while at the same time modularizing the code. The new windows terminal is using a new graphical display, but modules like the part translating VT and managing the underlying buffer are shared between the new terminal and the old one. The reason this matters is it’s all on github and the old/GDI based one can be compiled and works on Windows 8.1.

                                                                      Ahhh, that’s interesting. So you think if I compile their terminal and compile the original (cmd.exe-analogue) one, it’ll run on windows pre-1903, and be fully vt100-compatible, no glitches or anything?

                                                                      For Windows 10 LTSC, I assume you’re meaning the 2019/RS5 version? In this case all of the above applies but it’s built in, ie., it has a GDI based terminal that has all of the VT support added in the last few years. If you mean the 2016 version, it doesn’t have WSL, and the VT support is much more primitive.

                                                                      I ran LTSC 2019. It had WSL1 and had the rendering glitches in all the in-built terminal emulators (including third-party ones like conemu).

                                                                      I haven’t used WSL2 yet, but since it’s a Linux VM I’m curious to see how it compares to other Linux VM options, of which there are plenty. But it makes me wonder a bit because you’re suggesting that your hardware isn’t beefy enough to run a Windows VM on a Linux host, so why would it be different to run a Linux VM on a Windows host…?

                                                                      There are a couple of things there. #1 is that it’s specifically tuned to be lightweight; low memory usage, kernel options tuning, dynamic memory/cpu scaling. #2, and possibly more importantly is graphical performance: the main reason that the VM is slow is that it uses software graphics rendering (I read about a way to make it take over the graphics card so it does use hardware rendering, but then there is no way to get graphical output from the host; it seemed very error-prone, difficult to set up, and an easy way to soft-brick your computer because you don’t get any graphical output. Fixable with live cd, of course, but overall more bother than I care to figure out.) With WSL2 there is no need for graphics, so that’s simply not an issue. With hardware support, virtualization is pretty close to zero CPU overhead for the guest. Now, I haven’t tried it personally, but from what I’ve heard it works well–and performs better than WSL1.

                                                                      If you really want a low-crap experience, another option is Server Core or Hyper-V server. That means no graphical compositor

                                                                      Ah, yeah, that probably wouldn’t work then. One of the things I want to test is a graphic-heavy video game, so–I need that compositor. (I assume compositor means something different on windows, something essential to graphics? On linux it just means an optional program you can run to make your windows look nicer.)

                                                                      1. 1

                                                                        So you think if I compile their terminal and compile the original (cmd.exe-analogue) one, it’ll run on windows pre-1903, and be fully vt100-compatible, no glitches or anything?

                                                                        I think it’ll run pre-1903, with the same level of vt100 compatibility as windows terminal. I’m not saying that it will have no glitches; if you’ve already determined that 1809 is glitchy with the software you’re running it seems unlikely that it will have been fixed since, but it’s possible.

                                                                        I ran LTSC 2019. It had WSL1 and had the rendering glitches in all the in-built terminal emulators (including third-party ones like conemu).

                                                                        Conemu is just running a regular windows console somewhere and screen scraping the output, so it’ll do the exact same thing.

                                                                        more importantly is graphical performance: the main reason that the VM is slow is that it uses software graphics rendering…With WSL2 there is no need for graphics, so that’s simply not an issue.

                                                                        But can’t any Linux VM be run without graphics in the same way as WSL2? If all you want is a command line, a Windows based SSH client to a Linux VM works with no graphics at all. X11 can be used over the network stack with both. It sounds to me that WSL2 implies there are no graphics, thus solving the Linux VM graphics performance issue, but using graphics with a regular VM is optional.

                                                                        I assume compositor means something different on windows, something essential to graphics? On linux it just means an optional program you can run to make your windows look nicer.

                                                                        It’s pretty much the same thing on Windows, but for a graphically intensive game a server core VM sounds like a bad idea.

                                                                        1. 1

                                                                          But can’t any Linux VM be run without graphics in the same way as WSL2? If all you want is a command line, a Windows based SSH client to a Linux VM works with no graphics at all.

                                                                          Well–what I want is to use linux as a dev environment for compiling/running the windows applications. So it would have to be running locally, with the windows partition mounted somewhere it could be seen, and able to run the windows apps.

                                                                          [compositor] pretty much the same thing on Windows, but for a graphically intensive game a server core VM sounds like a bad idea.

                                                                          Ahh, ok. Might consider that for the native install, then, but yeah, windows in a vm probably wouldn’t work out.

                                                                    1. 2

                                                                      Hah, I thought this was referring to Thread Local Storage.

                                                                      1. 4

                                                                        TL;DR they have a bespoke static analyser; despite not preventing a certain class of bugs, it is very useful.

                                                                        1. 1

                                                                          What… the… hell…? I sure didn’t see this coming. The methodology makes since. Between @classichasclass article and this one, there might be some hope of using similar methods to quickly port important software over to Raptor POWER and future RISC-V.

                                                                          1. 1

                                                                            That’s IBM’s POWER, not Raptor’s. Raptor is just a retailer and motherboard maker.

                                                                            1. 1

                                                                              Raptor POWER as in Raptor’s POWER Workstation and the other meaning a future RISC-V product. I figured the kind of people who closely follow Raptor and RISC-V, people who might buy them, would understand.

                                                                              1. 1

                                                                                I understood what you said. There might be any number of POWER9 computers that aren’t produced by raptor; but there cannot be any which don’t come from IBM.

                                                                          1. 6

                                                                            The historical reason for colour-pairs is that some hardware terminals worked like that. It’s easier to emulate colour-pairs on a terminal that supports independent colour, than to emulate independent colour on a terminal that only supports pairs, so that’s the way the API was designed.

                                                                            For most applications, colour pairs aren’t a big deal. Think of them like CSS rules in HTML: we use this pair of colours for a heading, that pair of colours for body text, and so forth. You don’t need a colour pair for every possible combination of foreground and background, you only need a colour pair for every kind of information your app will display.

                                                                            The big limitation of colour-pairs is if you want to display arbitrary colours - things like image-to-ascii-art tools, tmux, that kind of thing. But that’s quite a minority of tools, so using a lower-level library like terminfo or termbox or hard-coding escape sequences is pretty reasonable.

                                                                            1. 1

                                                                              For most applications, colour pairs aren’t a big deal. Think of them like CSS rules in HTML: we use this pair of colours for a heading, that pair of colours for body text, and so forth. You don’t need a colour pair for every possible combination of foreground and background, you only need a colour pair for every kind of information your app will display.

                                                                              I mention this in the mailing list post. The problem with this is that it couples your program architecture to ncurses, which the library shouldn’t require.

                                                                            1. 1

                                                                              I’m squarely in that group that simply avoids using Ncurses. I find Ncurses to be a baroque API, from what I know, and as with many UNIX APIs it seems so often I learn of some new quality and can’t tell if it’s a joke or not, at first.

                                                                              My advice is to simply use ECMA-48; every terminal emulator you’re likely to come across supports a subset and it’s easy to use, being free from ’‘color pairs’’ and other nonsense. The only issue is sending different sequences to terminals that don’t support the subset being used, or finding a common subset, but there is a point where this ceases to be reasonable and one adopts a ’‘If you’re terminal doesn’t even support this, I don’t care if it works.’’ attitude.

                                                                              Writing a library in most any language that sends ECMA-48 codes is simple, so you can work in whichever language you’re actually using instead of binding with a decrepit C library. It’s also important to stress that people only really use Ncurses and whatnot still because the graphical APIs of UNIX are far worse to cope with.

                                                                              Now, to @Hales :

                                                                              If there’s is one lesson that we should have learned from the past few decades of software development it’s that you should not assume that current fashions, expectations or trends in programming are in any way better than prior ones. Most of them are just as bad (in different ways), and this is only properly realised years later.

                                                                              If one digs deep enough into the history of computing, one lears that what’s modern is distinctly worse than prior systems. There were easy graphical systems on computers decades ago, but UNIX is still stuck sending what it thinks are characters to what it thinks is a typewriter and using X11 lets you pick your poison between working with a directly (Wayland is coming any year now, right?) or using a gargantuan library that abstracts over everything. It’s a mess, I think, don’t you agree?

                                                                              Also, @Hales , you’re note on UTF-8 reminded me of something I found amusing from the Suckless mailing list, when I subscribed to it trying to get proper parsing of ISO 8613-6 extended color codes into st. Simply put, UTF-8 is trivially transparent in the same way color codes are transparent, in that there are many cases where invariants are violated and programs misbehave, commonly expressed as misrendering. There was an issue with the cols program, that shining example of the UNIX philosophy: it didn’t properly handle colors in columnating its output; to properly handle this, the tool would need to be made aware of color codes and how to understand them, as it would otherwise assume each would render as a single character would, ruining the output; the solution, according to one in the mailing list, was that colors are bloat and you don’t need them.

                                                                              Don’t you agree that’s amusing?

                                                                              1. 4

                                                                                I’m squarely in that group that simply avoids using Ncurses. I find Ncurses to be a baroque API, from what I know, and as with many UNIX APIs it seems so often I learn of some new quality and can’t tell if it’s a joke or not, at first.

                                                                                I agree with you. 100%. HOWEVER. Ncurses comes with pretty much every mainstream unix, making it a very attractive target for applications. I think that ncurses’ limitations are holding back innovation of TUI interfaces. If every unix comes with an adequate TUI widgeting library, this encourages quality TUI widget-based systems.

                                                                                If one digs deep enough into the history of computing, one learns that what’s modern is distinctly worse than prior systems. There were easy graphical systems on computers decades ago, but UNIX is still stuck sending what it thinks are characters to what it thinks is a typewriter and using X11 lets you pick your poison between working with a directly (Wayland is coming any year now, right?) or using a gargantuan library that abstracts over everything. It’s a mess, I think, don’t you agree?

                                                                                It’s important to understand things in context. At the time it came out, X was very useful and its complexity was every bit justified. Each bit of bloat was entirely justifiable when added, it’s just in hindsight, when looking at the whole, that it appears bloated. Yes, xorg is a mess. (Incidentally, wayland is also a mess and I hope that it doesn’t come at all. Much prefer arcan.) However, I think it’s a mistake to say that in the dawn of computing they understood simple, sensible interfaces and nowadays it’s all just pointless abstractions and bloat. Sure, Unix, BeOS, and C were all clean and well-made; while javascript, c++, and windows are all currently a mess. So what? There’s still significant amount of innovation and progress being made in the modern world of software and to ignore it would be a mistake.

                                                                                [cols/utf-8/colour/alignment-related stuff]

                                                                                Yes. The entire concept of a TTY is a mess. I am going to work on replacing that. Other people are working on replacing that. (The solution, obviously, is to make the code that generates the text and the code that displays the text work on the same level of abstraction.) That doesn’t change the fact that we’re stuck with ttys for the time being; is it wrong to try to improve our experience with them until we can really leave them?

                                                                                1. 3

                                                                                  However, I think it’s a mistake to say that in the dawn of computing they understood simple, sensible interfaces and nowadays it’s all just pointless abstractions and bloat

                                                                                  The stuff we’ve kept from the dawn of computing is basically all either ‘simple, sensible interfaces’, or ‘backwards compatible monstrosity’. Those are, after all, the two reasons to keep something - either because it’s useful as a building block, or because it’s part of something useful.

                                                                                  1. 3

                                                                                    The entire concept of a TTY is a mess. I am going to work on replacing that. Other people are working on replacing that. (The solution, obviously, is to make the code that generates the text and the code that displays the text work on the same level of abstraction.) That doesn’t change the fact that we’re stuck with ttys for the time being; is it wrong to try to improve our experience with them until we can really leave them?

                                                                                    Have you looked at the TUI client API for Arcan? and the way we deal with colour specifically? If not, in short:

                                                                                    1. Static set of semantic colour labels with some compile-time default palette.
                                                                                    2. Clients resolve on-draw the labels into R8G8B8(FG, BG).
                                                                                    3. Channel values are set as bg/fg attributes to the appropriate cells in the grid.
                                                                                    4. Server/WM side has commands for runtime replacing the colour values stored at some label index.
                                                                                    1. 1

                                                                                      Do you allow the client to set arbitrary 24bit colours to the grid?

                                                                                      Does the TUI API work with text-based but not-fixed-width interfaces (e.g. emacs, mlterm)?

                                                                                      Thank you for posting, I hadn’t heard about arcan until today but have just read a chunk of your blog with interest :)

                                                                                      1. 2

                                                                                        colors: both arbitrary fg/bg (r8g8b8) and semantic labels to resolve (such as “give me fg/bg pair for alert text”) shaped text: yes (being reworked at the moment to account for server- side rendering), but ligatures, shaped is there as a ‘per-window’ attribute for now, testing out per line.

                                                                                        1. 1

                                                                                          Thanks for the reply.

                                                                                          I think I would want to be able to use different fonts (or variations on a font) for different syntax highlighting groups in my editor. This looks quite nice in emacs and in code listings in latex. Perhaps you consider this to be an advanced use where the application should just handle their own frame buffer, though.

                                                                                          While I have your ear, what’s the latency like in the durden terminal and is minimising latency through the arcan system a priority?

                                                                                          1. 2

                                                                                            in principle, multiple fonts (even per line) is possible, and that’s how emojii works now, one primary font for the normal glyphs and when there is a miss on lookup, a secondary is used. There is an artificial limit, that’ll loosen over time. Right now, the TUI client is actually handling its own framebuffer, and we are trying to move away from that, which can be seen in the last round of commits. The difficulty comes from shaped rendering of ligatures, where both sides need to agree on the fonts and transformations used; doing it wrong creates round-trips (no-no over the network), as the mouse-selection coordinate translation needs to know where the cursor position actually became.

                                                                                            Most of this work is towards latency reduction, removal of terminal protocols fixes synchronization, moving rendering server-side allows direct-to-scanout buffer racing-the-beam rasterization, or at least, entirely on-gpu for non-fullscreen cases.

                                                                                            1. 1

                                                                                              The difficulty comes from shaped rendering of ligatures, where both sides need to agree on the fonts and transformations used;

                                                                                              When you say “both sides” do you mean the client on e.g a remote server and a “TUI text packing buffer” renderer on e.g. a laptop?

                                                                                              Sounds like you could just send the fonts (or just the sizes of glyphs and ligature rules) to the server for each font you intend to use and be done with no round trips. Then you just run the same version of harfbuzz or whatever on each side and you should get the same result. And obviously the server can cache the font information so you’re not sending it often (though I imagine just the sizes and ligatures could be encoded real small for most fonts).

                                                                                              Do you have any plan about what to do about the RTT between me pressing a key on my laptop, that key going through arcan, the network, remote arcan and eventually into e.g. terminal vim and then me getting the response back? I feel like mosh’s algorithm where they make local predictions about what keypresses will be shown is a good idea.

                                                                                              Most of this work is towards latency reduction, removal of terminal protocols fixes synchronization, moving rendering server-side allows direct-to-scanout buffer racing-the-beam rasterization, or at least, entirely on-gpu for non-fullscreen cases.

                                                                                              Sounds exciting! I don’t know what you mean by “moving rendering server-side”, though. Is the server here the arcan server on my laptop? And moving the rendering into arcan means you can do the rendering more efficiently?

                                                                                              Is arcan expected to offer an advantage in performance in the windowed case compared to e.g. alacritty on X11? Or is the benefit more just that anything that uses TUI will be GPU accelerated transparently whereas that’s more of a pain in X11?

                                                                                              1. 1

                                                                                                Right now (=master) I am tracking the fonts being sent to the client on the server side, so both sides can calculate kerning options and width, figure out sequence to font-glyph id etc. The downsides are two: 1. the increased wind-up bandwidth requirement when you use the arcan-net proxy for network transparency, 2. the client dependency on freetype/harfbuzz.

                                                                                                1. can be mitigated through caching and stream cancellation if there is a client side match already. Only solutions for 2. seems to be a roundtrip for the shaping offsets.

                                                                                                My first plan for the RTT is type-ahead (local echo in ye olde terminal speak), implemented on the WM level (anchored to the last known cursor position, etc.) so that it can be enabled for other uses as well, such as input-binning/padding for known-networked windows where side channel analysis (1 key, 1 packet kind of a deal) is a risk.

                                                                                                Sounds exciting! I don’t know what you mean by “moving rendering server-side”, though. Is the server here the arcan server on my laptop? And moving the rendering into arcan means you can do the rendering more efficiently?

                                                                                                Is arcan expected to offer an advantage in performance in the windowed case compared to e.g. alacritty on X11? Or is the benefit more just that anything that uses TUI will be GPU accelerated transparently whereas that’s more of a pain in X11?

                                                                                                Both performance and memory gains. Since the actual drawing is being deferred to the composition stage, windows that are partially occluded or clipped against the screen would only have its visible area actually being processed - while alacritty has to both render into an offscreen buffer (that is double buffered) that then may get composed. So whereas alacritty would have to pay for (glyph atlas texture, vertex buffer, front-buffer, back-buffer) on a per pixel basis in every stage, the cost here will only be the shared atlas for all clients (gpu mem + cache benefits), rest would be a ~12b / cell + vertex buffer.

                                                                                  2. 2

                                                                                    Wayland is coming any year now, right?

                                                                                    It has been here for a while. GNOME and KDE support it natively, a few popular distros ship with Wayland enabled by default. Firefox is a native wayland app. What makes you think it’s “any year now” ?

                                                                                    1. 1

                                                                                      :D

                                                                                      Colours are not the only invisible control codes that I’d expect cols to have to handle. Alas I can’t see a “simple” solution to this. You pretty much have three options:

                                                                                      1. Treat everything as 1 char wide (simplest option)
                                                                                      2. Use a full unicode library to determine your character widths (most “correct”, but much bigger)
                                                                                      3. Whitelist known ANSI characters and assume everything else is zero-width (allows colour support, but upsets international users with you being ‘unfair’)

                                                                                      Of the crappy options I can see: #1 does seem the most like something suckless devs would like.

                                                                                      Suckless makes some great stuff, but some of their projects are a bit too minimal for me. Take for example their terminal emulator st:

                                                                                      ## How do I scroll back up?
                                                                                      
                                                                                      Using a terminal multiplexer.
                                                                                      
                                                                                      * `st -e tmux` using C-b [
                                                                                      * `st -e screen` using C-a ESC
                                                                                      

                                                                                      I love my scrollwheel, whether it’s a real one or two-fingers on my cheap little laptop’s touchpad. That and being able to use Shift+PageUp/Down. I guess everyone draws the line somewhere differently, and I have more things about my current term (urxvt) that I could moan about.

                                                                                      or using a gargantuan library that abstracts over everything. It’s a mess, I think, don’t you agree?

                                                                                      I don’t have any raw X11 experience. I’ve primarily used SDL, which yes indeed abstracts that away for me.

                                                                                      I’m not completely convinced that wayland is going to be the answer: from everything I read it seems to be solving some problems but creating entirely new ones.

                                                                                      From a user perspective however: Xorg is wonderful. It just works. You have lots of choice for DE, WM, compositor (with and without effects), etc. The open source graphics drivers all seem to have a TearFree option, which seems to work really well. I’d love to see latency tested & trimmed, but apart from that the idea of having to change a major piece of software I use scares me. I don’t want to give up my nice stack for something that people tell me is more better (or more “modern”).

                                                                                      1. 2

                                                                                        You forgot one:

                                                                                        1. Interpret control codes as 0-width, and assume each UTF-8 codepoint is 1 char wide (composing characters and some alphabets will break this, but if you need this, then option 2 is your best bet).

                                                                                        Interpreting ECMA-48 for this isn’t that bad, I have Lua code that does such [1]. And a half-assed approach would be to assume all of C0 (0-31, 127) [3] as 0-width, all of C1 (127-169) as 0-width, with special handling for CSI (155) and ESC (27). For ESC, just suck up the next character (except for ‘[’) and for CSI (155 or ESC followed by a ‘[’) just keep sucking up characters until a character from 64 (@) to 126 (~) is read, and that will catch most of ECMA-48 (at least, the parts that are used most often).

                                                                                        [1] It uses LPEG. I also have a version that’s specific to UTF-8 [2] but this one is a bit easier to understand in my opinion.

                                                                                        [2] https://github.com/spc476/LPeg-Parsers/blob/master/utf8/control.lua

                                                                                        [3] 127 isn’t technically in C0 or C1, but I just lump it in with C0.

                                                                                      2. 1

                                                                                        If one digs deep enough into the history of computing, one learns that what’s modern is distinctly worse than prior systems.

                                                                                        Flying on a modern airliner is also distinctly worse than passenger jet travel in the 1950’s. But I can still afford to go anywhere in the world in a day.

                                                                                        1. 1

                                                                                          Worse in experience? I am almost certainly safer flying on a modern passenger jet now than in the 1950s.

                                                                                          1. 1

                                                                                            https://i.huffpost.com/gen/1840056/thumbs/o-56021695-570.jpg

                                                                                            Enough said. :-P

                                                                                            (I am aware this is not a conclusive statement.)

                                                                                            1. 1

                                                                                              Heh, you can still get that (actually, much better) on international business class. Hmm, I’m curious if the cost is comparable between 1950’s tickets like those in your picture (inflation adjusted) and international business class today…

                                                                                      1. 2

                                                                                        I thought I was the only crazy person that found having to pair colours first to be annoying. I was literally building a lookup table (input: fg & bg, output: colourpair) to work around it; basically nullifying curse’s colourpair feature.

                                                                                        Curses is somewhat standardised. I’ve used the “pdcurses” implem to get win32 support for one of my ncurses apps. Whilst new features are good, it’s also worth seeing some restraint and checking out whether or not this would cause problems with the other implementations.

                                                                                        1. 1

                                                                                          It shouldn’t cause issues; backwards compatibility should never hold back innovation. If you need compatibility with multiple curses implementations (there are several more than just those two), then you write targetting curses. Otherwise, it’s entirely reasonable to just target a single implementation of a single library. 99% of all libraries work that way; no one worries about compatibility with alternate gtk+ implementations. Besides, other curses implementations do tend to also pick up extensions added by ncurses; ncurses already has more features than the original curses. They currently advocate using attr_on() over attron(), even though only the latter is in the original curses.

                                                                                        1. 3

                                                                                          This looks pretty great! Moving to CMake seems like the smart move, and I’m super psyched at their continued level of investment in Python.

                                                                                          Kinda sad about their intent to move away from OpenGL and to Vulcan, Metal and Direct3D though. I guess the idea of one 3D graphics API to rule them all is dead?

                                                                                          1. 4

                                                                                            Apple claims that they’re going to remove opengl support from MacOS at some unknown point in the future, Qt is just preparing for that I guess.

                                                                                            1. 4

                                                                                              Apple is super annoying these days :) (I mean, I know they always have been, but lately I feel like they’ve turned it to 11, or maybe just in areas I care about!)

                                                                                              I wonder if Vulcan is a possibility on OSX. Betcha it will be once all the game studios start writing for Google Stadia (Ungh.)

                                                                                              1. 10

                                                                                                There is moltenvk, which implements (a subset of) vulkan on top of metal.

                                                                                                1. 8

                                                                                                  And gfx-portability too.

                                                                                            2. 2

                                                                                              My understanding is that OpenGL is a pain to use in general, not just cuz of driver stuff but that the API itself is not something that (notably) game developers enjoy using.

                                                                                              So there aren’t too many people going to bat for OpenGL

                                                                                              1. 1

                                                                                                I thought that Vulcan is supposed to be the new “one 3D graphics API to rule them all”?

                                                                                                1. 3

                                                                                                  Not without Apple’s buy-in it won’t be.

                                                                                                2. 1

                                                                                                  Moving to CMake seems like the smart move

                                                                                                  I’m a little disappointed that they’re dumping QBS development on the “community”. My impression is they went straight from “Technology preview” to “We’re not going to continue developing QBS because noone’s using it” without any sort of “QBS is ready now, please try it” announcement.

                                                                                                  1. 1

                                                                                                    Aren’t you supposed to be able to throw away prototypes?

                                                                                                    1. 1

                                                                                                      Absolutely, but not with the justification that customers weren’t using them.

                                                                                                      Edit: “details” can be found in this mailing list thread if you’re interested: https://lists.qt-project.org/pipermail/development/2018-October/thread.html#34023

                                                                                                1. 1

                                                                                                  Why is this tagged with python?

                                                                                                  1. 5

                                                                                                    I tagged it with python because we ship a PyQt platform port in this new release. You could have fun sending commands to the browser with Python (we have a simple testclient.py that shows some commands). You can create new buffers (tabs) and windows, ask for page information, or send some JS and get the result.

                                                                                                    1. 2

                                                                                                      Thats very nice. Its not easy to do this on “regular” browser, especially as it doesn’t have normal UI as other programs and hence can’t be easily automated with tools such as xdotool or AutoHotkey.

                                                                                                      Makes exploits easier tho… there should be an option to prevent this somehow that isn’t changable by automation. Otherwise, what is stopping me to get fantastic info about your doings on the web in the background, constantly. Now you would have to constantly screenshot for this which is pretty visible. AFAIK, even web drivers do not allow for connecting to running instances that they didn’t start.