Threads for SoapDog

  1. 5

    what about placing your own folder before the built-in path in the $PATH variable… that should prevent the system bundled command from shadowing your own, right?

    1. 10

      what about placing your own folder before the built-in path in the $PATH variable… that should prevent the system bundled command from shadowing your own, right?

      This enforces an order of precedence and prevents shadowing, but that’s not quite sufficient for preventing harm from a namespace collision.

      Here’s a real-world example. I use a program called edbrowse. While it is based on the venerable /bin/ed, it is not a drop-in replacement for that program.

      So about 15 years ago, I made the mistake of symlinking /usr/local/bin/ed to edbrowse, to save some typing. I was using Gentoo at the time. During a package upgrade, my package manager printed a bunch of nonsense. I don’t recall what it was exactly. After looking through ps I found the culprit. The package manager was using an ed script to patch a file. However, my ed wasn’t the one it was expecting…

      The moral of the story is that it’s better to just prevent namespace collisions outright, rather than rely on a precedence order.

      1. 3

        I do this with aliases that shadow system commands. Aliases always come first in interactive shell sessions but are not present when scripting or to other tools on the system. E.g. vimnvim, lsexa, fmtcargo fmt, topzenith, tarbsdtar. If ed was aliased to edbrowse then there would have been no issue.

    1. 1

      Some of us post to multiple blogs or syndicate their content into multiple silos. A blogging client allows us to use a single application to do all that. Right now, I’m composing this message using Mars Edit while offline. I can chose to post it either to my online blog or to the decentralised platform Secure Scuttlebutt, all from the same interface.

      There’s another approach I just wanted to signpost here.

      I write my posts in Markdown and publish them using Nikola which can handle cross posting to other venues/mediums or even blogs just fine.

      Blogging clients are great and I’ve definitely enjoyed using them (I used to use Blogsy for IOS which no longer exists) but I personally find the utility of writing my posts in a destination independent format and storing them in Git gives me a lot more freedom and flexibility than even a blog client might.

      1. 2

        That is how my current system works. I use a blog client (Mars Edit) to write. I write markdown in it. It sends it to my server. My blog is built with a static generator as well. My server saves the markdown file to the correct location. Adds it to git. Builds the site. I have all the flexibility of a static generator and git while still being able to use a blogging client when I want to.

        1. 1

          Nice! I’ve been using Visual Studio Code with Markdown All in One quite successfully, but MarsEdit has been around for quite a while and has a very loyal following.

          I’m also kind of a stickler for wanting tools that are cross platform, because I’m just as likely to be on Linux or even the dread Windows (Yes I know break out the tar and feathers) as on a Mac.

      1. 11

        I’m doing a lot of work on decentralized blogging (i have a pre-alpha protocol and implementation), but IMO, looking back to old-school blogging is the wrong direction.

        True decentralization has to start at the architecture and design level, and blogging just built on the normal Web 1.0 stack, so it was only decentralized in that personal websites are independent of each other. But setting up and running your own website is nontrivial. So the vast majority of bloggers used hosted systems like Blogger or LiveJournal or WordPress.com. That’s no longer decentralized IMO. Same is true of Mastodon et al. You have to give up a lot of trust and control to whomever runs your server. And the more “social” features like comments and pings were never secure and so were very vulnerable to spam.

        Truly decentralized blogging has to build from a secure P2P architecture, even if it’s not strictly run that way. Servers can and will exist, but their role is to help with discovery, connectivity and availability; they should have nothing to do with trust or identity — that’s controlled by the peer and the user, using cryptography. Scuttlebutt is an example of a system like this.

        Your points about retro computers are interesting. The crypto might be an issue for some older CPUs. How long does it take to do a Curve25519 key exchange, or encrypt with ChaCha20, on an Apple ][ or an 8086? I can say it’s not a problem on a Raspberry Pi, though; I’m using one as a mini-server for my protocol.

        1. 7

          Everyone says that decentralized $X needs to build on the P2P stack, but I haven’t really found many applications like this that actually work well for end users.

          SecureScuttlebutt has some incredible ideas, but anyone who’s ever tried to actually set it up and use it can tell you that it can be a challenge.

          So, what would this look like and can you suggest any current implementations that follow this model?

          1. 4

            That’s what I believe as well. A raspberry pi at home is the ideal middleware to bridge retrocomputers into the blogosphere since they can’t really do any of the crypto stuff.

            I’m quite active on Secure Scuttlebutt, my own client (Patchfox) is the only one with an RSS/Atom importer able to slurp a post from the blogosphere into SSB “blog messages” :-)

            I’m quite keen to follow what you’re doing with decentralised blogging, is there anywhere I can subscribe or keep an eye on?

            1. 3

              I’m keeping it pretty stealthy for the moment — I haven’t even asked anyone else to try it out yet — but I really want to start opening it up soon. When I do I will definitely post about it here.

            2. 3

              The crypto might be an issue for some older CPUs. How long does it take to do a Curve25519 key exchange, or encrypt with ChaCha20, on an Apple ][ or an 8086?

              This is certainly a legitimate problem but I think the experience of the Gemini community has shown that a Gopher (or plain HTTP) gateway is good enough in 95% of the “what about the old computers?” cases. It’s not ideal but I think it’s also fair to just admit that some computers will have to be left out at some point. I think that, for a truly P2P, decentralised protocol, such a solution doesn’t even have to sacrifice decentralisation. Even in retro computing circles there are very few people who only run Apple ][s – most of them also have a computer from this century at least. Pointing your favourite old friend at your current computer isn’t that hard, and you can run the gateway on that one. There are various approaches to that being tried out even in web land (see e.g. https://github.com/ttalvitie/browservice ), where things are far less flexible than with a P2P protocol.

              FWIW, I, too, think you’re right with regard to decentralisation. The relevant Web 1.0-era technology to find inspiration in isn’t blogs, it’s Napster and the further decentralised models that it spawned or influenced, like Kazaa and Bittorrent.

              1. 1

                You could also take the approach of something like Fujinet where you offload the networking bits to a cheap outboard CPU like the EPS32. Let it handle the HTTPS and then communicate to the retro-computer using a protocol/mechanism it can handle. In Fujinet’s case on the Atari, it works over the SIO bus. I know on the Apple II it works with the SmartCard I think? interface, and on the Atari Lynx it uses CommLynx.

              2. 2

                Decentralised doesn’t mean “no server” in the strict sense, nor in any sense that matters. It can mean simply having a choice of servers, and the option to build and/or run your own. Not only is this a decentralised system with all the benefits and liberties that entails, but it’s a helluva lot easier to build and maintain, a lot easier on the end-users, and more reliable than a global p2p mesh.

                1. 3

                  Strictly speaking you’re correct, but I’ve been observing and/or working in this area since the 1990s and I’m really dissatisfied with federated architectures like Jabber or Mastodon. They still require you to put way too much trust on a server, and the difficulty of setting up and running servers means few people will do so, resulting in bigger and bigger agglomerations. Then the big servers start to play games about who they will or won’t connect with (either for business reasons, like the IM systems of the 00’s, or political reasons like Mastodon), which their users have to put up with because they can’t jump servers without losing their identity and reputation.

                  The way forward seems to be to move all trust to the client, none to the servers. At that point servers are nothing more than way-stations or search engines for content.

                2. 1

                  I think it’s worth separating the different layers in the hosting stack. You get huge economies of scale from being able to share a physical host. A single RPi can probably handle an individual blog with 95% of the CPU unused, but that really means that you’re paying for 20 times as much compute as you need. If you can have one-click deployment in a cloud environment (ideally in multiple, different, cloud environments) then you still remove anyone else from being able to use your blog to data-mine your readers, appropriate your content (check out the Facebook T&Cs conditions on IP sometime), and so on. That gets me most of what I want from a decentralized platform, along with the economies of scale that centralised solutions benefit from.

                  [Shameless plug] We’ve just launched a Confidential Containers service that lets you deploy a workload in Azure with strong technical guarantees that no one at Microsoft can see inside (data encrypted in memory, with a per-VM key that the hypervisor doesn’t have access to). Expect to see all cloud providers building more Confidential Computing services, including FaaS and storage solutions, over the next few years. If I wanted something decentralised yet easy to adopt, I’d look at these as the building blocks. They’ll eventually converge onto some standards (or at least have third-party abstraction layers that paper over the differences) and you’ll end up being able to deploy on any cloud provider’s infrastructure (or roll your own if you want).

                  Jon Anderson’s PhD looked at building a decentralised social network on top of cloud offerings about 10 years ago. His conclusion was that it would cost about $1-2/user/year. That price has probably gone down since then and will continue to do so. A RPi will cost at least 3-4x that just in electricity.

                1. 18

                  Apple is an Experience Company. Much like Disney, what Apple sells is dreams. It sells you on an idea, on a curated experience of what computing should be in their vision.

                  I completely agree with this. The way I usually word it is Apple is not selling a product, but an image or a feeling. You’re not just buying an iPad, you’re becoming an Apple User. While I dislike the lock-in effect of their ecosystem, I have to admit that the vast majority of people don’t care and they love that everything just works with the other products.

                  Instead of a single convergent device, they want to build discreet separate devices with different experiences because that is what they sell. They sell experiences.

                  Going along with the image they’re selling, separate devices makes more sense from a business perspective. You have an iPhone, that’s great! But do you have the Apple Watch to go along with it? Are you syncing it to your MacBook? Why sell one device if people will pay you for two?

                  1. 17

                    Exactly! You get it! It is sometimes quite hard to have a conversation about Apple with other computing people because some don’t perceive Apple in this way at all. They try to put it into the same box as Microsoft or other SV companies, but even though their products often contain hardware, software, and services, they are not exactly selling the same “thing”.

                    I also posted this HN and the first comment is an exact reiteration of what I posted: someone claiming the iPad is a toy because it can’t run Linux. I really don’t understand this, if the iPad is not suitable, why not go with a Surface instead of simply waiting for iPad Asahi to emerge. Surface hardware is damn great and it already works today, it has worked as a convergence device for years now.

                    It seems people prefer to complain on forums about the lack of suitability of an iPad and not use anything, than actually pick something that works for what they want. Surface Linux has been a thing for a long time now.

                    1. 6

                      upvoting, i’ve noticed this as well, i use some Apple products, but i am not an Apple User. And this is very puzzling to a lot of my “computing people” friends. They find it unfathomable that I have a macbook pro, an ipad (plain ‘ol ipad) and a oneplus phone. And that i prefer to do do most of my development on an ergonomic windows desktop with the big monitors and oodles of specs… in WSL2. yes, on the go i’m in macos, but i’m not locked into anything they have…

                      granted, i may be weird, but i have 0 desire for an Apple watch, and it’s because of the reasons outlined in your comment as well as the parent. i kind of wanted some airpods but when i see even Apple Users have the same problems i have with my cheap KZs that i think sound better anyway, i just keep the KZs.

                      I’m aae, and I use apple products, but i’m not an Apple User.

                      1. 4

                        I’m deep into the Apple ecosystem, I feel comfortable there as I’ve been an Apple user since MacOS 8. I like it. That doesn’t mean I don’t have other machines and haven’t explored other solutions throughout the years. And yeah, for some workflows there are solutions that are way better than Apple.

                        For example, every time I’m on a coffee shop with my Macbook and decide to read a book for a while, I think how much better that would be on the iPad and then regret only carrying one device. When I was using the Surface Go as my main device, I’d simply remove the keyboard, turn it into portrait and read the book without giving any extra thought to it. It is a more flexible machine.

                        1. 1

                          But there is a removable “magic” keyboard for iPad. So if it could do dev things, it’d be similar to the Surface. I don’t have it (I connect an Atreus over USB instead) but from photos or videos it looks even better than the one the Surface had.

                          I do Linux dev on my iPad via ssh and xrdp into my Debian machine. Works fine remotely as well. But if I need to do iPad OS dev, I have to visit my friend who has a Mac and Xcode and a dev account. (I maybe should look into getting a hackintosh in a VM or similar.) It feels so weird not being able to hack and fix the apps right in front of my face.

                          1. 1

                            Even with the new Playgrounds app?

                            1. 1

                              It’s less that I wanna make a new app from scratch (even then, I hear Playgrounds is limited) and more that you need a Mac for things like backups, sideloading, and hacking on existing apps

                    2. 5

                      I don’t really agree with or, I guess, understand the criticism here. I own an iPad. In fact, I’m typing this comment on it. It’s a useful little device for the things I use it for, but I can’t really imagine a world where I’d want this form factor (including the keyboard “cover” attachment) as a daily driver for writing code. It’s not even about the computing power of the iPad itself — enough people are trying to revive thin clients these days that I’m sure I probably could code on this thing via some sort of web IDE if I really desperately wanted to. I just… don’t want to. I want the bigger device with the bigger screen and full-size keyboard and nice peripherals and such for coding on.

                      For me the iPad hits the sweet spot of a device I can pick up when I’m sitting on the couch and want to read or watch or play something. I’ve also written a few blog posts on it, because I compose those in a note-taking app that has an iPad version available.

                      So to me it’s not that there’s some sinister plot to keep it from being a full-blown everything-to-everyone computer, or to force me to spend a bunch more money or whatever, it’s that I don’t need or want my iPad, or any device of this general form factor, to be my do-everything computing device.

                      (though I grant that for a lot of people it probably does nicely do everything they need, and the full-size “general-purpose computer” probably is and always was overkill for them)

                    1. 11

                      It’s ironic that the discussion on this article perfectly reproduced all the discussion tendencies that the article critiques.

                      We’ve got ‘em all:

                      • Rants about the price vs specs. (“Stop using laptops”)
                      • A ton of people will actually talk about Apple.
                      • Rants about it not being fit for some particular workflow.
                      • Three people with age-old machines saying their age-old machine works just fine. (“Happy with my Thinkpad from 1887”)
                      1. 2

                        It is a self-fulfilling prophecy :-)

                        Anyway, I’m happy to see that people found laptops and OS combos they enjoy. The most important part of the article is understanding that choosing different is OK.

                      1. 4

                        While Atom is a better choice these days, RSS1 is pretty well supported and a better design than the insanity of XML misunderstanding/abuse that is RSS2.

                        1. 6

                          Yeah, there doesn’t seem to be any downside to Atom, whereas RSS is just… I don’t know how to say it, but if your primary goal is to serve a feed of web pages, and there’s not a well-specified and sane way to include HTML, there’s something wrong with your spec.

                          I only implemented Atom for my blog, and would recommend the same to others.

                          1. 2

                            What do you dislike about RSS 2.0? I just implemented it here, and it was no harder than what I remember from RSS 1.0…

                            1. 8

                              RSS2 doesn’t even have a namespace so it doesn’t mix with other XML well. It also has no officially specified way to include HTML content, with several competing extensions for it, all bad.

                              1. 1

                                I understand. Yes, those criticisms are quite true. Thanks for sharing :-) I’m offering both RSS and ATOM on my blog, so I guess each user will pick whatever they prefer.

                          1. 6

                            The 0 vs 1 indexing is just bike shedding at this point IMO. It is very simple to understand what a language uses and go with it. There is absolutely no need to go over the top with rage because a language is not using one’s preferred indexing.

                            0-based indexes have their place. Especially when dealing with C, arrays, and pointer addresses. 1-based indexes also have their place, I for one find them easier to reason about. I don’t go on C forums demanding that C25 becomes 1-based…

                            Really tired of those arguments. And it is always with Lua. I posted about it in the past: Lua, a misunderstood language.

                            1. 5

                              0-based indexes have their place. Especially when dealing with C, arrays, and pointer addresses.

                              I’ve more or less settled on the opinion that “having to care about what index your data structure starts at” is the mark of a low-level language. High level code uses iterators and destructuring to access the data structures such that the details of where the indexing starts at is almost never relevant. For instance, this code:

                              (let [color (. colors idx)
                                    color-str (string.format "#%02X%02X%02X" (. color 1) (. color 2) (. color 3))]
                              

                              should be instead

                                (let [[r g b] (. colors idx)
                                      color-str (string.format "#%02X%02X%02X" r g b)]
                              

                              The author of the article got confused because they were used to using languages which have been influenced by C, not because of any inherent advantage of one system over another.

                              1. 2

                                Just for the sake of completion, I just want to mention that Lua has iterators. You can iterate using pairs() and ipairs(), example:

                                    a = {"one", "two", "three"}
                                    for i, v in ipairs(a) do
                                      print(i, v)
                                    end
                                
                              2. 1

                                Cool to see NewtonScript as the metatable example, thank you :). Interesting perhaps to note that NS originated from a Lua-like goal, a simple language used to glue together “native” components to construct an app. It grew to be a little more complex than Lua because of its context (e.g., dual/proto inheritance to save RAM), but still the Newtonian functionality was arguably all library/interop.

                                1. 1

                                  omg @wrs, I really like your language. I carried a Newton way into 2006, just stopped using the thing because someone sat on it. Still have an eMate 300 here, it is one of my favourite writing machines. NewtonScript deserves way more love than it gets. I remember it very fondly. The dual proto inheritance was genius, I often think about it when developing components for web usage, it was so much simpler.

                                  Anyway, thanks for building one of my favourite devices.

                                  1. 1

                                    I’d like to know more about “dual proto inheritance.” Is it like in Io, which has a list of parents? https://iolanguage.org/guide/guide.html#Objects-Prototypes

                                    1. 1

                                      It is not exactly like Io. The inheritence in Io is more flexible. In NewtonScript, the dual inheritance has a purpose that makes it easier to write GUI code as you can have something like a form in which the fields and buttons all inherit from their prototype objects, but also from the form container thus allowing you to handle them in the form container script. Err, I think I’m not explaining it well. You might have a better understanding from checking Chapter 5 of https://www.newted.org/download/manuals/NewtonScriptProgramLanguage.pdf

                                      1. 1

                                        Thanks for replying!

                              1. 1

                                I wonder why the author doesn’t want to talk about ColdFusion :-) I remember having a great time with it.

                                1. 1

                                  and also with Userland Frontier. Those were the days.

                                  1. 1

                                    Author here. Honestly, I never used it. It’s of course proprietary, but also certainly the path less travelled. It was always the mysterious exotic evil twin technology to PHP from my perspective, similarly to how people remember Macromedia Shockwave much less than Macromedia Flash. From what I saw of it, I didn’t see much to make it compelling over PHP. When I saw sites using it with the telltale .cfm extension, I always wondered how they ended up using it and why.

                                    I’d certainly be interested to read about Coldfusion and what things make it interesting or better if you’d be interested in writing about it…

                                    1. 1

                                      I used it for just a brief period, not enough to write a good post. I had a good time doing it, but not enough time to make it an informed opinion. I might try to write about running Userland Frontier in 2022 rsrsrs, that should be fun. At the moment I’m swamped with the book about decentralisation that I’m writing, but these small pieces about the road not taken are very dear to my heart and I might pursue them as a palate cleanser between chapters.

                                      I really liked your post and as someone using a SSG to generate my blog, I miss being able to do mild dynamic stuff. I kinda can at generation time because my blog is built with Racket and I can simply add Racket code mid-post and hope for the best. It is not the same as generating the content at request time, which means that some forms of workflow are not possible (such as a commenting system), but it is better than none.

                                      I wonder what alternatives to PHP exist these days that allows one to drop in and out of HTML easily with a similar deployment story. I can’t think of a single one (oh, there is a FOSS clone of ColdFusion, I never used it but maybe it fits this).

                                      1. 1

                                        Someone on HN mentioned something called “Lua Server Pages”, which sound similar, and are implemented in a library on top of e.g. mod_lua:

                                        https://news.ycombinator.com/item?id=31245659

                                        I imagine you could come up with something very PHP like built on top of Scheme with <?scm ... ?> or similar. I’m very fond of Scheme and often use Guile for XML processing using SXML. In fact I’ve been experimenting with using it as a technical writing platform for generating books… I should do a writeup about it sometime.

                                        1. 3

                                          There used to be support for “SSP” (Scheme Server Pages) in the Spiffy web server which I maintain, that used <?scheme .. ?> and <? .. ?>. Because it’s pretty ugly and rife with security problems (just as plain PHP templating is), I eventually deprecated it and moved it out to a separate egg which has not been ported to CHICKEN 5 due to lack of interest.

                                          The canonical way to serve HTML from Scheme is to use SXML (XML as s-expressions), which is not vulnerable to (most) injection problems and also allows you to effortlessly transfer between code and data (by using Scheme’s quasiquote) in a way that can’t leave you with mismatched closing tags as an added benefit!

                                          1. 3

                                            Indeed, you’re preaching to the choir in my case.

                                            Though the article I wrote is in part motivated by the fun I’ve had with PHP in the “hackish state” in the past, I’ve honestly come to the view that templating is one thing PHP should (ironically, given its origins) never be used for. The reason for this is that the lack of autoescaping makes its use as a templating language unconscionable from a security perspective nowadays, in my view.

                                            Fundamentally one of the reasons the software industry has so many security issues is its failure to practice problem class elimination. The aviation industry has been good at practicing problem class elimination: when an accident happens, we try to figure out how to prevent that entire class of accidents from happening again. Terrain collisions keep happening, so someone invented GPWS, etc.

                                            We have comparable things now with memory-safe languages, prepared statements, and autoescaping, etc. Yet embarrassingly SQL injection, XSS, etc. are still an absurdly common vulnerabilities.

                                            I’ve actually come to the conclusion that generating (X)HTML using string templating systems is fundamentally a hack and always has been. The rejection of XHTML by web developers and the notion of having to generate well-formed XML as being unreasonably burdensome, as represented by the HTML5 movement, was very telling. In any other case this wouldn’t be taken seriously — if someone claimed that having to write (or generate) grammatically correct C code is unreasonably burdensome, we’d be laughing.

                                            This is as opposed to serializing an AST, as in the case of SXML or DOM serialization — an approach which makes outputting malformed XML literally impossible. Problem class elimination. XSS is eliminated but not even by autoescaping — it would be a mistake to call it autoescaping, it’s simply correct serialization of a string as a string in the target format.

                                            But string templating systems with autoescaping tacked on remain dominant. Autoescaping isn’t perfect either as it isn’t context-sensitive and just assumes escaping a given set of characters will suffice. I suspect the reason string templating for HTML remains dominant is because of how cumbersome (and historically, less performant) AST-based templating languages have historically been (see XSLT).

                                            We have seen some progress with the rise of JSX, though. But you’re correct, there really is no nicer environment for writing and generating XML than Scheme. I use it as a typesetting environment for some yet-unpublished projects of mine, with an executable Scheme program that generates SXML transformable ultimately to XHTML or TeX. Aside from how useful quasiquoting is in general, I like to define terminology for technical writing as Scheme defines, which has the interesting attribute that references to terms defined earlier in a document (which should be turned into hyperlinks, etc.) are actually checked at build time:

                                            (dt bipipe "bipipe" "A combination of two "unipipes", one in each direction.")
                                            
                                            ( ...
                                              (p "A "bipipe" is realized as two realized "unipipes"."))
                                            

                                            Now that I’ve written this comment, I guess this does raise the question of why not apply this to a PHP-like application, where you write websites in SXML for mildly dynamic applications. Honestly, that’s a really nice idea, and would lead to the levels of creativity enabled both by Scheme and by a PHP-style hackish environment (while being actually conscionable to use, unlike PHP-as-a-templating-language). I might seriously look into that…

                                            1. 1

                                              Fundamentally one of the reasons the software industry has so many security issues is its failure to practice problem class elimination.

                                              Amen, brother!

                                              1. 1

                                                I recommend you look at Scribble or Pollen. Neither of them are really geared towards websites, which makes them less than dynamic than what you’d want for some things, but they do let you write XML pretty easily, and make it easy to layer on abstractions and computations. I’m working on a system called Colophon to try and make Pollen friendlier for websites.

                                            2. 1

                                              I was playing with cgilua in early 2000s. I was a student at PUC Rio at the time (where Lua was invented) and we were all aware of it. It was fun, but it was not as straightforward as PHP to jump into and out of HTML. I don’t recall using mod_lua back then, I remember cgilua being run from cgi-bin like any other cgi.

                                              I think there is room for niche engines like that. I’d definitely read about someone using Lua or Scheme in a similar manner. Some years ago, I built a backend for a large personal project using Lua and the Sailor framework, it felt very refreshing.

                                      1. 4

                                        I started writing an introductory book about decentralisation protocols. Besides that I’m probably upgrading my blog to Racket 8.5.

                                        1. 2

                                          I’m using a Macbook Air M1 with 16GB of RAM. It is probably the best laptop I have ever used and I’m really happy with it. I grew up with macOS so I’m at home on that machine. I’ve used Windows, Linux, and multiple BSDs on other laptops but macOS still my favourite OS. I use it professionally, but it is also my personal machine. I don’t have a need for containers, so my workflow and needs are probably very different from other people here. I wouldn’t switch this machine for another one. I don’t see what a Macbook Pro could offer that would justify upgrading.

                                          The aspect of a laptop that is most important to me is battery life. I’ll take a slower machine, a smaller screen, anything as long as my battery life is good. I enjoy working from coffee shops, bookshops, and libraries. Sometimes I’ll go to multiple locations on a single day. Being able to to sit down and work from anywhere without caring about power sockets and power banks is wonderful.

                                          The Surface Pro X I used before this Mac was almost perfect. It had a good battery life; it was more versatile than a laptop, and it had a 4G modem. The only thing that made me switch away from it was the fact that Microsoft never gave Windows on ARM the attention it needed to succeed.

                                          1. 2

                                            This is useful to me as well because my legacy YouTube account won’t connect with the Roku or mobile apps.

                                            1. 1

                                              Feel free to reach out if you need any help with these scripts :-) I’m really happy that they’re helpful to other people.

                                            1. 1

                                              Thanks a lot for the replies folks. It seems that there is no comprehensive recent macOS development book out there. Best bets appear to be Hacking With Swift series and objc.io series, both of which are heavily iOS focused and have macOS as a cool addition. I was not expecting this at all. From one point-of-view, I’m relieved, for I was questioning my own search skills, pondering why couldn’t I find a recent macOS development book. From another point-of-view, this is quite worrisome because macOS is damn great and deserves better.

                                              Last time I did any native macOS development, I used Objective-C/Cocoa, I have no experience with using AppKit and Swift. I went through the small tutorial at Apple site about SwiftUI, it is really cool but I have a feeling that AppKit might be more useful. I might just get some 10-year-old book on AppKit and Hacking With Swift, and try to get up to date by combining both. It will be more recent than my current knowledge, anyway.

                                              1. 10

                                                Is there a reasonable machine-readable interchange format for describing ABI/FFI of “C” libraries? If not, there should be! (I’m thinking of replacing .h with something zero-cost that’s easier to consume by other languages, not a different ABI nor universal dynamic RPC interface).

                                                1. 11

                                                  GObject Introspection uses GIR, which is an XML format. It is pretty reasonable.

                                                  1. 13

                                                    No XML format has ever been reasonable.

                                                    1. 16

                                                      When the alternative is depending on implementation details of C, “reasonable” becomes relative.

                                                      1. 3

                                                        DocBook is pretty reasonable…

                                                    2. 7

                                                      OpenGL, Vulkan and Wayland all use some sort of XML-based IDL type specification or another, and there are generators that consume it and output bindings in various programming languages.

                                                      In practice, the OpenGL one absorbs a ton of assumptions about how C works and embeds that in its functions, types, etc. Vulkan does a much better job of actually being language-agnostic, Wayland idk about.

                                                      It’s certainly not a standard, but they’re real examples of such a thing that are widely used.

                                                      1. 4

                                                        Wayland is a very different beast in this regard; the protocol is defined in terms of messages sent over a local socket (possibly using SCM_RIGHTS to transfer file descriptors); the IDL doesn’t have to describe C ABI anything, just message formats.

                                                        Way back I messed around with hooking into the IDL with Go, and it wasn’t too bad: https://github.com/zenhack/go.wayland

                                                        (though note that I never really finished the project, and it’s quite possible somebody else has done this and actually made it usable; I wouldn’t actually try to use that library in its current state).

                                                        1. 2

                                                          The same is true of X11 (at least for the last decade or so). The protocol is defined by some XML files and XCB is mostly machine-generated C that serialises and deserialises based on these definitions, as is the code for talking the protocol in the server. You can use the same XML to generate X11 client (or server) in another language.

                                                          1. 1

                                                            Indeed – I was drawing a contrast with OpenGL/Vulkan, but Wayland is in some sense a more “normal” use of an IDL.

                                                          2. 1

                                                            …the protocol is defined in terms of messages sent over a local socket…

                                                            I am in a cheeky mood, so I will point out this could be considered a degenerate form of ABI. It’s all about programs being able to talk to other programs, right? All the rest is an implementation detail!

                                                      1. 9

                                                        I’m not going to put favourites here, but I’ll shamelessly plug my own Little.Webby.Press which is a book assembler. It can generate eBooks and static websites for the books from a set of Markdown/Textile/Asciidoctor files. I used it to generate its own documentation.

                                                        It is a pure client-side webapp. Everything runs in your browser. Your data is never transmitted anywhere, there is no tracking or accounts.

                                                        I’m now working on Gamebook assembler targetting the Playdate handheld, it will be the same architecture as this one.

                                                        1. 1

                                                          also, be gentle, the code is messy as hell. I build this for myself.

                                                          1. 1

                                                            This is a really cool concept. I’d love to explore it more, thanks for sharing!

                                                            1. 1

                                                              Thanks for the kind words. I tried to document all of it and made a video showing its usage as well. Feel free to reach out if you ever need a hand or if you have some feedback about it.

                                                          2. 1

                                                            Haven’t had the chance to dig into the codebase, but it honestly sounds like a really fun concept. I’ll take a look at this tonight.

                                                          1. 8

                                                            When these discussions happen, there is always a very vocal crowd advocating that FOSS desktop apps can be financially sustainable. Well, on average they can’t. There are, of course, some outliers, but that is really out of the norm.

                                                            People seldom pay for desktop apps if there is a FOSS replacement that is good enough. Some people will pay, of course, but the key part is that not enough people will pay to make it sustainable. Most awesome FOSS desktop apps are developed by people who have other income sources. They’re either being paid by some large company/foundation that has a revenue stream or they have other jobs. Trying to make a living out of a non-crippled FOSS desktop app is hard. That is why a ton of them go the SaaS route and cram some proprietary server-side gizmo to justify paying for a pro plan.

                                                            It is not a discussion about proprietary apps being better than FOSS apps. You can have gems and crap in both categories. The key thing is understanding that making a living out of desktop apps is hard, making a living out of FOSS desktop apps is even harder.

                                                            This is especially true if the audience for your app is not companies. If you’re doing something that is for the normal home user, such as a little productive tool, it is really hard to get people to pay for something that they can have for free. You can do Patreon, donation drives, and some people will join in good faith. That is awesome, but that doesn’t scale.

                                                            That is why I get so frustrated with convos like these. I love FOSS as well, and I prefer developing little desktop apps. It is really hard to pay your bills by doing FOSS desktop apps. Please, don’t point me towards the edge cases that make this work. Those are edge cases. Most people developing FOSS desktop apps wouldn’t be able to pay their bills if they depended on them to generate income.

                                                            Sometimes you need to be pragmatic and think about what path enables you to pay your bill doing what you love. Sometimes this path is not FOSS.

                                                            1. 1

                                                              I think fundamentallythe issue is most people assume that if something is FOSS there must be an official version available for free. If you have a FOSS desktop app, but all official distribution channels charge you money, the revenue model is the same as any proprietary app. The source code being out there isn’t going to get the average user compiling from source. The existence of unofficial third parties giving out free binaries, well, we have that for all proprietary desktop apps too, don’t we.

                                                              1. 4

                                                                Sorry, but this is simply not true. If your app is FOSS and people like it, someone will package it for most package managers out there. Like the case mentioned in the original article, it is very easy to have an automated fork pumping out binaries and packages. Don’t underestimate the average user. If your app is useful and there is a free fork out there, people will find it out quite quickly.

                                                                Warez sites distributing cracked proprietary software are not the same as a free fork of a FOSS desktop app that charges for binaries. The free fork is legitimate and can get into official package managers and app stores. It will overshadow the original given enough time for the recommendation engines to calculate things out.

                                                            1. 8

                                                              My entry here might be a total outlier, but I am very thankful to some proprietary commercial software that I have used for many years, some of them for more than a decade.

                                                              Transmit is the best SFTP client I have ever used. I think I’ve been using it since mac classic (when it was called Transit).

                                                              Sublime Text is my go to editor. I don’t need too many plugins to be an effective developer. I’m happy with how sublime text gets out of my way.

                                                              From FOSS land, besides the obvious stuff, I’m very thankful for Racket. I met it for the first time when it was called PLT Scheme circa 1998. It changed how I approached programming and made me complain about every other language since that date :~~~

                                                              1. 4

                                                                Transmit is an amazing piece of software. I don’t really interact with SFTP regularly anymore, but I do have fond memories of uploading WordPress sites to LAMP servers with Transmit back in the (good old?) days.

                                                              1. 6

                                                                that text:// thing is awful

                                                                1. 4

                                                                  yeah what the hell

                                                                  1. 7

                                                                    It took me longer to understand that spec page than to actually implement the thing…

                                                                    1. 2

                                                                      I like how the “about” page is a blank about.me page

                                                                1. 3

                                                                  You could consider supporting Gemini companions:

                                                                  1. 1

                                                                    I implemented a kind of subscription before that spec was written. I don’t know if it is worth it to change my current spec to this one. The way I do it is just calculating a checksum for a capsule and if it changes, then the page is considered updated.

                                                                    As for Titan, I need to understand it better. I suspect it might be kinda hard to implement in my case because some of the needed TLS features are not exposed in the Racket bindings for OpenSSL. That is why I’m yet to support identities and custom cert stuff. I might be mistaken and things might be available now, I need to check.

                                                                  1. 18

                                                                    While it doesn’t exist to my knowledge, taking something that’s basically just the “good” subset of HTML5 and ECMAScript 12 and writing a browser around it would be cool. Or maybe drop ECMAScript and take a really small subset of it to handle binding to DOM and have WASM for everything else.

                                                                    Regardless, finger is old but still interesting.

                                                                    1. 8

                                                                      While it doesn’t exist to my knowledge, taking something that’s basically just the “good” subset of HTML5 and ECMAScript 12 and writing a browser around it would be cool. Or maybe drop ECMAScript and take a really small subset of it to handle binding to DOM and have WASM for everything else.

                                                                      Well, that is beyond my pay grade rsrsrs ;-)

                                                                      Regardless, finger is old but still interesting.

                                                                      I’m gonna try to implement finger. Thanks!

                                                                      1. 1

                                                                        Finger is probably the oldest of the “single command, single transaction” protocols, and some are mutually interoperable. Gopher clients can speak finger (to port 79), and many gopher servers would make cogent replies to finger queries if redirected to port 70. I would see URLs like gopher://finger.server:79/user turn up now and then. Naturally Gopher clients don’t have the /w token, but that’s an implementation detail.

                                                                      2. 4

                                                                        There’s not a whole ton you’d need to add to HTML 2.0; it already specifies use of unicode and CSS. It omits scripting, but IMO that’s a strength, not a weakness.

                                                                        1. 1

                                                                          There’s things that could be nice like object embedding (don’t redo the ActiveX/applet hellscape, but use it as an extensible means to deal with i.e. multimedia), ARIA, and semantic elements (added in 4 and 5 mostly).

                                                                        2. 2

                                                                          Or maybe drop ECMAScript and take a really small subset of it to handle binding to DOM and have WASM for everything else.

                                                                          I know it’s not as straightforward as it sounds, but I really wish we could move to a future where JS (or some equivalent that was amendable to this arrangement) was implemented with WASM. Maybe it’s a blessed implementation that exists in the browser, but it compiles down to a public API that other languages could target.

                                                                          1. 3

                                                                            I’d love to do the same with the DOM. There’s now a decent JavaScript PDF implementation, which significantly reduces the need for browsers to have native implementations and ended up with something more secure (JavaScript is already sandboxed). With canvas, it’s probably possible to move all of the HTML rendering into JavaScript as well.

                                                                            1. 3

                                                                              With canvas, it’s probably possible to move all of the HTML rendering into JavaScript as well.

                                                                              You have to watch out for a11y, but Google Docs basically does this; there’s a bunch of divs with aria roles and display: none for the benefit of screen readers, and the actual rendering is done with canvas.

                                                                              1. 1

                                                                                This is a non-starter for things unlike PDF, because you can’t do layout in canvas, because it won’t let you measure text.

                                                                                1. 3

                                                                                  I guess that depends on how much you want to move into the sandbox. If you want to depend on a native implementation of the font renderer and layout engine, that’s true. If you want to use a WAsm version of Harfbuzz / FreeType, then you’re only going to be throwing lists of beziers at the canvas.

                                                                                    1. 2
                                                                                      • It uses a global state like all canvas APIs
                                                                                      • Almost every field in the results object is optional, and they’re mostly not implemented, at least last time I checked.
                                                                                      • It’s very basic and still requires you to do a whole bunch of work yourself if you want any information that’s useful for layout, and shitloads more work if you want the kind of information that’s required for editable text.

                                                                                      Compare it to a well-designed text API from a company that built its empire on rendering text: https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/engine/package-detail.html

                                                                              2. 1

                                                                                I wish something like Jessie or these other EcmaScript subsets would get actually standardized as I see a lot of potential in a simple ES subset as an embeddable language.

                                                                              1. 3

                                                                                It seems I have a very different strategy than people here. I want to lock in the vowels first so I use URINE/AORTA maybe I’m doing something wrong.

                                                                                1. 4

                                                                                  The doubled A and R seem like a wasted opportunity to get letter clues.
                                                                                  Maybe CHAOS as the 2nd word since S and H are quite common letters.

                                                                                  As a kid I learned ETANOIRSH for playing hangman which isn’t 100% accurate but it’s what stuck in my head.

                                                                                  By the way thanks for the tip - the adjustment I mentioned got me today’s word in 3!

                                                                                  1. 2

                                                                                    Indeed, CHAOS looks like a better option.

                                                                                    1. 2

                                                                                      For fun I checked /usr/share/dict/words for word pairs with

                                                                                      • 10 unique letters
                                                                                      • used all the vowels

                                                                                      Using this letter frequency list

                                                                                      • 273 pairs using etaoinsrhdlu
                                                                                      • 83 pairs using etaoinsrhdu
                                                                                      • 10 pairs using etaoinsrhu

                                                                                      Those final 10 pairs included URINE and my (new) favourite starting pair for how ordinary they are: HOUSE + TRAIN

                                                                                  2. 3

                                                                                    For locking in vowels easily, I find OUIJA to be pretty effective. Yes, you miss out on the E but you get a wide cut from 80% of the vowels right away.