1. 0

    For games, why wouldn’t CHIP-8 be enough?

    I’m also personally not a fan of stack machines, aesthetically. They map so poorly to modern hardware…

    1. 3

      [stack machines] map so poorly to modern hardware…

      Djb argues that stack machines can be optimal if implemented and used right.

      1. 1

        That is an amazing article.

      2. 1

        CHIP-8 lacks mouse for example.

      1. 3

        Reimplementing the Mu computer’s shell to remove its dependency on the Linux kernel.

        Also maybe some fun with cellular automata.

        1. 12

          (very subjective thoughts, hopefully not too off-topic. I think that this is the right community though)

          I think the appearance of new “Hobby OSs” is one of the nicest things to happen in the recent years. There was a bit of a drought, as some projects slowly died. That’s not to say there aren’t any, there certainly are quite a few that made constant progress over all these years.

          However things like developing an OS mostly for fun is something that seems to be lacking lately. A part of that also seems to be that doing some things just for fun became harder in the mainstream world, if you wanna call it like that. Doing an app just for fun and distribute it to people is quite a hassle. One needs to pay certain fees for distribution, potentially even get a specific device to program, there’s usually quite a few things involved to keep things working, both on newer phones and not too rarely certain rules change.

          Overall things seem to move faster and the time for projects to be obsolete (unusable or close to) when doing nothing seems to speed up, in some fields more than other.

          Maybe it’s just my perception, but also it feels as if the willingness or let’s say the motivation to do a bigger project as a hobby in the free time goes down. A lot of the time people only do so if compensated (thanks to Patreon, etc. this is easily possible though), or if it at least makes well on the resume.

          Please don’t get me wrong. I certainly have no intention to tell people with their free time and completely understand things cost money. Please don’t take this as a criticism.

          What I am getting to is that with the growth of the amount of people being in IT it seems that - for the lack of a better word - the percentage of people doing “silly little things” is going down, especially when they can not be achieved within a few days.

          I have been wondering why this is. To me a lot of it feels like an increase of “wanting to feel professional” (again, no criticism!), even when not acting so. Maybe it’s also a general society or psychology topic. Maybe it’s how time is given a value and with such projects that are somewhere between work (with effort, like programming) and hobby, which for most people is a clearer categorization thing when watching a show on Netflix, playing a video game or listening to music hobbies taking effort make people more feel like they didn’t spend their time productively, nor considering it time to relax.

          A lot of that I perceive as “taking fun out of computing” so to say. But OS development projects like these, just like the tildeverse make me feel like a lot of it is returning after it was partly lost or at least not perceived by me.

          Curious on whether I am the only person seeing it like that or if you have different views on this.

          1. 7

            I too am happy to see these projects again, as hobby OS dev has always been a favourite interest of mine. But I do find it rather depressing that they all seem to be just yet another UNIXalike, rather than any sort of attempt to do something new, or even something else old that was abandoned.

            1. 4

              … the percentage of people doing “silly little things” is going down, especially when they can not be achieved within a few days. I have been wondering why this is. To me a lot of it feels like an increase of “wanting to feel professional”

              Yes, I agree with the sentiment. I think that the invention and the spread of internet in the mainstream has been a double edged sword. On one hand, it is so much easier now to learn how to do things and to make your creations accessible to the world. On the other hand, this benefit applies to everyone, not just to you, so you suddenly find yourself “competing” with a horde of amateurs and hobbyists just like you.

              Because if we’re honest, very few people want to make and do things in perfect isolation. There is not always a desire for a monetary reward, but I think that in the overwhelming amount of cases there is a desire for some kind of recognition from peers or others inside or outside the current social circle. But in this new era the bar to get that recognition is getting higher and higher. Not only the quality of the work rises, but also the expectation of what proper recognition is rises. I might be looking back with nostalgia, but I like to think that 50 years ago, if your mother had some skill in knitting sweaters, her skill would be recognized and valued in her family/village/street. So if she was able to impress 20 people, she would gain some real status and respect. If you were to try to get the same level of respect these days, you would need at least a couple of thousand followers on youtube/instagram/pinterest/whatever. Ideally you should also make some nice extra cash on the side by selling the the designs, or the sweaters themselves on etsy, or create tutorials on youtube, or..

              So the bar is much higher now and distractions are plentiful. So not as much people bother anymore. But that is relatively speaking. I think that in absolute numbers there are still way more people doing interesting stuff. They just get drowned out. But I don’t have any research to back that up.

              1. 1

                That’s very insightful. So far I took that more as effects of walled gardens, and raising the bar by complexity, the wanting to feel professional (not doing “hacky” things out of love - despite the whole “Do you have passion for X?” at many job ads).

                But sure, when you look for online likes, comments, stars and subscribers things are seen differently. And those measures typically don’t convey much. GitHub stars do oftentimes not even convey user base or general interest (readme-only repos with thousands of stars because it was posted on some news page, never even started out implementation). They mostly tell how many people have somewhat actively seen a headline or similar.

                And of course the attention span and new things popping up, together with the “newer is always better” assumption one has a hard time.

                The thing with research might turn out hard or at least I don’t know what the right approach is. A longer time ago I actually got interested in different ways of measuring impact of technologies (different kinds of, purely economical for example). The background was that things like measured programming language popularities seemed off, when looking at how they are perceived online, compared to when you looked into the real world.

                A lot of these are community and philosophy based. To stay with programming language popularity. A project with excellent documentation, clear guides, its own widely used communication channels tend to have a lot fewer questions on Stack Overflow, etc. A language that is often taught at university, has been hyped, etc. has more. Also the more centralized a community is the fewer post you’ll find with largely the same content.

                This doesn’t make a huge difference in the large, especially when putting in more factors, you still get a picture, but when it comes to finding patterns it is very easy to only end up with researching a specific subset, which might be interesting, but also might lead to in a way self-confirming assumptions. Or in other words, it’s hard to specify parameters and indicator to research without accidentally fooling yourself.

              2. 3

                Personally, I disagree. I would conjecture that there are actually more people doing “silly little things” (including the “bigger projects”) than “before”, but there are also many times more people now doing things “for money/popularity” than “before”. It’s just that as a result, those in the first group lost visibility among the second group — esp. compared to the “before” times, when I believe the second group was basically an empty set.

                As a quick example off the top of my head, I’d recommend taking a look at the Nim Conf 2020 presentations. Having attended this online conference, personally I was absolutely amazed how one after another of those were in my opinion quite sizeable “silly little things”. Those specific examples might not be OS-grade projects, but then there’s https://www.redox-os.org/, there’s https://genodians.org/, there’s https://www.haiku-os.org/, there’s https://github.com/akkartik/mu

                I mean, to see that nerd craziness is alive and well, just take a look at https://hackaday.com/blog!

                1. 4

                  Thank you for the shout out to Mu! @reezer, Mu in particular is all about rarely requiring upgrades and never going obsolete. It achieves this by avoiding closed platforms, only relying on widely available PC hardware (any x86 processor of the last 20 years), and radically minimizing dependencies.

                  My goal is a small subculture of programmers where the unit of collaboration is a full stack from the bootloader up, with the whole thing able to fit in one person’s head, and with guardrails (strong types, tests) throughout that help newcomers import the stack into their heads. Where everybody’s computer is unique and sovereign (think Starship Enterprise) rather than forced to look and work like everybody else’s (think the Borg). Fragmentation is a good thing, it makes our society more anti-fragile.

                  I’ve been working on Mu for 5 years in my free time, through periods when that was just 1 hour a day and yet I didn’t lose steam. I don’t expect ever to get paid for it, and the goal above resonates enough with me that I expect to work on it indefinitely.

                  1. 2

                    Just wanna say that despite Mu not being a tool I particularly want to use yet, I do read all your stuff about it that I encounter, and I’m very glad you’re out there doing it. And I’m certainly not alone.

                  2. 1

                    Thank you for your response. You give great examples. I actually meant to give them as well. Just to clarify. For me Redox would be part of that new wave (maybe even the start of it), while Haiku is a project that had continuous progress, but is one of the old surviving ones, just like Genode.

                    AROS is another example for an old project.

                    What I meant with things that died during that period was for example Syllable and some projects of similar philosophy.

                    I also agree with the sentiment that there is more people, but it doesn’t feel like it grew in proportion (that’s what I meant with percentage). But it feels like it is changing, which I really like. It feels like a drought being over. The Haiku community also had ups and downs.

                    But I also don’t think it’s just operating systems. That’s why I mentioned the Fediverse. A completely different thing seems to be the open source game scene, which also feels like it’s growing again, insanely so. Especially when looking at purely open source games, which feel like they have massive growth now.

                    However, I still have some worries about the closed platform topic, making it harder. Tablets and phones are becoming the dominant “personal computers” (as in things you play games on, do online shopping, communicate). And they are very closed. If you in the late 90s or early 2000s wanted to install an alternative OS on your average personal computer you could, even on your non-average sometimes. For your average smartphone or tablet that’s a lot less likely and unlike back then the drive (at large, with some exceptions) seems to go into things being even more shut off, giving less room to play.

                    I don’t know that area, but it seems similar things are true for video game consoles. Less homebrew, and at least I did not hear about OSs being ported there, which seems a bit odd, given that by all that I know the hardware seems to be closer now to your average desktop computer.

                    I did not know about Mu. Also I will take a look at the Nim Conf. So thanks for that as well!

                    1. 1

                      Not much of a metric, but I guess you could try and graph the announcements on the OSDev.org forum thread year by year and see if there’s anything to read from them. Though on a glance, I’d say they’re probably too sparse to warrant any kind of trendline (but IANAStatistician). And the first one is 2007 anyway, so still no way to compare to “the late 90s or early 2000s”.

                      Yeah, I also kinda lament the closing of the platforms; but on the other hand, Raspberry Pi, ARM, RISC-V, PinePhone, LineageOS… honestly, I think I’m currently more concerned about Firefox losing to Chrome and a possible monoculture here. Truth said, whether I like it and admit it to myself or not, the browsers are probably in a way the de facto OS now.

                      And as to Fediverse and in general non-OS exciting things, there’s so many of them… for starters just the (for me) unexpected recent bloom of programming languages (Go, Rust, Zig, Nim, but also Janet, Jai, Red, etc. etc. etc.); but also IPFS, dat/hyper, etc. etc; then Nix/NixOS; then just around the corner an IMO potential revolution with https://github.com/enso-org/enso; as you say with games there’s Unity, Godot, the venerable RPGMaker, there’s itch.io; dunno, for me there’s constantly so many exciting things that I often can’t focus exactly because there’s so many things I’d love to play with… but then even as a kid I remember elders saying “you should focus on one thing and not constantly change your interests”, so it’s not that it’s something new…

                  3. 2

                    I wonder how virtualization improvements over time might have also driven some of this?

                  1. 2

                    I actually used this idea in a Lisp-based language :)

                    http://akkartik.name/post/wart

                      1. 3

                        Absolutely fantastic. Thank you.

                        1. 2

                          I had exactly this thought.

                        1. 3

                          A better title would be, “the state of linux debugger frontends.” gdb itself is quite reliable[1], but it’s an enormously complex piece of software and interoperating with complex software is difficult.

                          I think debuggers are a poor power-complexity trade-off for most debugging. They do have a place, but for most simple things, tools amplifying debug-by-print feel much more economic. Here’s the tool I debug with these days: https://github.com/akkartik/mu/blob/main/tools/browse_trace.readme.md It’s quite independent of my project and surprisingly versatile. All you have to do is emit prints in a specific format with a depth at the front.

                          Here is a description of the big picture of debugging that this tool fits in: https://github.com/akkartik/mu/blob/main/subx_debugging.md

                          All this is possible with an outlay of a couple of hundred lines of C (so fewer lines in a higher-level language). I think we programmers need to expand our horizons on the extent to which we can help ourselves and not need to rely on complex, specialist tools.

                          [1] As long as I don’t try to watch variables. Or travel backwards in time.

                          1. 2

                            FWIW you might like uftrace for C/C++ code:

                            https://github.com/namhyung/uftrace

                            It’s significantly less complex than GDB but also quite powerful. I used it to measure performance, but you can also use it for correctness, etc.

                            This kind of tracing is a nice shell-ish paradigm that even Python doesn’t have!

                          1. 25

                            I am going to write up my Haskell solution at some point, but I liked this:

                            CREATE TABLE day_01 (v INT NOT NULL UNIQUE);
                            COPY day_01 FROM 'Projects/AOC/2020/data/Day01.txt';
                            
                            SELECT 1 AS part, a.v * b.v AS answer
                              FROM day_01 a CROSS JOIN day_01 b 
                             WHERE a.v <> b.v AND a.v + b.v = 2020
                             UNION
                            SELECT 2 AS part, a.v *  b.v * (2020 - a.v - b.v) AS answer
                              FROM day_01 a CROSS JOIN day_01 b
                             WHERE a.v <> b.v
                               AND 2020 - a.v - b.v > 0
                               AND EXISTS (SELECT 1 FROM day_01 WHERE v = 2020 - a.v - b.v);
                            

                            And it’s crazy fast:

                               part |  answer
                             -------+----------
                                  1 |   800139
                                  2 | 59885340
                            (2 rows)
                            
                            Time: 6.732 ms
                            
                            1. 7

                              I love the SQL solution. If you want to use it with a version of sqlite that shipped post-2004, change COPY... to .import day01.txt day_01

                              1. 2

                                In part 2, what about using three join instead of the exists?

                                1. 1

                                  That would be better, yeah. This is basically a port of my Haskell solution, though.

                                2. 1

                                  Looks neat, and it’s also all one line of code! Woot!

                                  Would love to see that done for the triples in the next section.

                                  If everything keeps building on everything, that’s going to be a fun hunk of code to watch evolve. :)

                                  1. 3

                                    It actually does both :)

                                    1. 2

                                      If DDL does not count as code, would it be zero lines of code if I could make a macro that reports the solution in an error? Or maybe if one used dependently typed programming where the compiler can infer the solution? If I used Datalog, would the queries count as code, but that statements not? ;)

                                    2. 1

                                      I believe you have a bug? a.v <> b.v should be a.id <> b.id or something?

                                      1. 2

                                        Since the numbers are unique, they’re using that to make sure they’re not checking the number added with itself since that wouldn’t be a valid solution even if it added up to 2020.

                                        1. 1

                                          Right. Does the problem specify that the numbers are unique? Perhaps I missed that.

                                          1. 1

                                            It doesn’t, but wc -l and sort -u | wc -l gave me the same number, so.

                                            1. 3

                                              Plus I assume you would’ve found out pretty quickly if they weren’t all unique when you tried to import them into a column with a unique constraint.

                                              1. 1

                                                My first solution was in Haskell, so I had already determined that particular bit of data modelling.

                                                1. 2

                                                  Ah, I guess it makes sense that the SQL implementation wasn’t the one you started with.

                                        2. 2

                                          The column in the table is named v.

                                          1. 2

                                            Is there just one column? I was wondering how you’d handle duplicates where the answer is a perfect square.

                                            1. 1

                                              Yep, just the one. I cheated :)

                                              1. 2

                                                Ah, the ol’ overtraining-on-single-input. Carry on :)

                                        3. 1

                                          The Haskell version I ported from:

                                          solve01 :: [Int] -> Int
                                          solve01 xs = head [a * b | a <- xs, let b = 2020 - a, b `elem` xs]
                                          
                                          solve02 :: [Int] -> Int
                                          solve02 xs = 
                                            head [a * b * c | a <- xs, b <- xs, a /= b, let c = 2020 - a - b, c `elem` xs]
                                          

                                          Tedious IO is left to the reader.

                                        1. 8

                                          I’m trying to do it in machine code, but ok :)

                                          1. 11

                                            The ability to create arbitrarily-deeply-nested process namespaces with easily-configurable access to compute resources. Something like FreeBSD jails or docker containers, but embedded into the central design of the process model so deeply that doing the equivalent of spinning up a sandbox with an isolated file system and network address is just how you ordinarily spawn any program. Ideally spinning up a new nested copy of the original OS itself should be just as easy.

                                            1. 11

                                              This is how Plan 9 works, more or less.

                                              1. 3

                                                This reminds me of one of @crazyloglad’s principles:

                                                An application does not get to disturb you by ‘asking for permission’ just to steal data from a sensor – it always gets some kind of data. You decide, dynamically, which sensor that is actually sampled and what that entails. Access the ‘camera’ does not automatically imply sampling the actual device, it means being routed a video stream. The user decide what that stream covers and when.

                                                1. 1

                                                  I would argue null, or no data should be a perfectly valid “always gets some kind of data” return. Otherwise I like it.

                                                  1. 1

                                                    One problem with “null” is that you can easily filter it out. the client ‘knows’ that it is being played and it is cheap to detect. A simple case I worked with years back is that well, certain kinds of adtech used accelerometer data to determine travel paths through a city (in android, at the time, you could just read the sensor, no permissions asked). Imagine you are angry with this behavior, and instead of writing a blog post you want to inject doubt into what they are doing, and if that happens at scale, erode trust in their model. Do you inject ‘null’ or do you provide other left/right patterns that overlay somewhere entirely irrelevant to you?

                                                    1. 1

                                                      Fair enough. Perhaps null/no data could be random data in the requested input format, something like quickcheck or Python’s Hypothesis provides. Then we get free testing to boot! :)

                                                      The problem with your approach is, it then devolves into a fight between adtech and privacy people each trying to further their agenda. At least with null/no data, the intention of the user is very clear: no accelerometer data for you.

                                                      1. 1

                                                        noise isn’t much better (entropy @0.5) there are stronger models to plugin to each possible sensor, and can be done much more cheaply than the adtech analysis side (there are fundamental problems with this approach to deception), ‘fighting back’ is more of a HCI problem (hence why I try to address it) on how to opt-in/control it. It will always be a cat and mouse game, no different to drm and similar battles - but right now, it’s a free-for-all, it’s all pure, uncut data.

                                                        1. 1

                                                          agreed, though hypothesis and quickcheck are not pure random data(as they have to fit within some constraints). I agree that adtech models could probably figure it out pretty easily however.

                                                          I also very much agree that the free-for-all that is letting adtech companies just siphon off all this data is definitely not doing humanity any favours, and I’m glad you are trying to address it. You have obviously thought much harder about it than I have.

                                                          I just worry about where this cat and mouse game would be in a decade or two of active fighting.. it won’t be anywhere even close to fun. I’d rather the incentives were changed(through technology, laws, etc) to more align with the betterment of humanity.

                                                          I have no idea what the possible incentive changes might be, I’m not remotely involved in the adtech space, except being stuck having to use a product with it included sometimes. I’m pretty sure GDPR like things probably isn’t the right answer though.

                                                          Anyways, thanks for thinking about and working on the problem!

                                                          1. 2

                                                            If you want to dig further into it, https://www.youtube.com/watch?v=KNOlqzMd2Zw is a good talk. I don’t think his data-union approach is a real solution, but well, before any aggressive response to the current state of affairs should be mounted, there needs to be some kind of palatable alternative prepared or the vacuum might well be filled with something worse.

                                              1. 20

                                                Creating a fresh todo list in my notebook every morning.

                                                1. 11

                                                  I haven’t desired an OS war debate since about 2005. I understand that this isn’t fair since I’m probably laying down kindling and not asking for a flame war.

                                                  I would switch much faster if I had iTerm2 (don’t say tmux, alacritty unless they are 1:1) and a few other tools. I’ve run Gentoo as my main machine and many Linux-es in the past (all I can do for street cred folks). Xcode, the app store, economics or something else apparently just makes high quality UIs possible because it’s not the same? Monodraw, Alfred, Pixelmator and a few others. There are a few I could budge on. The Mac apps are very polished, fonts are the best and usually the UX is good (iTerm’s options boxes are kind of insane). I keep flirting with the idea but then I make a list of stuff I’d miss.

                                                  Linux has upsides too. It’s really what I want, a Unix box. I could ditch tiling window manager clones or near-misses and get a full-on tiled thing going (of course the browser kinda of kinks the terminal based flow but whatever). That’s not my issue. My issue is that Linux is great on the server. Linux (unix) excels at text but its desktop and GUI layer has always been weird. I don’t want it to be like this. If Electron was magically as fast as QT (etc) and made it easy to layout GUIs like Xcode, maybe that would be it? I just don’t know what the issues are in the GUI space. Armchair analyst mode though: people pay for mac software.

                                                  This just continues to be true: computers suck, macs suck the least. But everything can change with time.

                                                  1. 6

                                                    I’m not a fan of tmux and alacritty either but found kitty to be a great cross platform alternative to iTerm. At least if it’s the panes and tabs that you want.

                                                    Much more pleasant configuration too if you like to keep clean dotfiles.

                                                    1. 2

                                                      What does iTerm2 do that’s not in something like gnome-terminal?

                                                      I use both and I’d like to know about any cool features I’m missing in iTerm2.

                                                      They look the same to me from my Linux accustomed experience, what am I missing?

                                                      1. 2

                                                        Does anything else have “native tmux” yet? That is, tmux windows/panes are just iTerm windows/panes—you don’t need to do any tmux key commands at all. Makes persistent server sessions very nice. I believe the iTerm author implemented the protocol for this in tmux but I’m not sure if any other emulator has adopted it.

                                                        1. 1

                                                          iTerm has more customization knobs than gnome-terminal (or any other Terminal emulator I’ve used) by an order of magnitude.

                                                          1. 1

                                                            Same, would love to know what I was missing from iTerm2. I don’t use tmux integration, not sure about other cools features that I missed. But one thing I noticed is it’s significant slower thang the default terminal application.

                                                            1. 1

                                                              Good question so I’ll do my best. Most of this is taste but I hope I can explain a feeling.

                                                              1. The hotkeys are nice (to me). They are quicker than leaders and are basically the same as Chrome tabs. Cmd+T for new tab, Cmd+Alt+Arrows. And of course mac apps flash the menu item and have hints next to them. But that’s iTerm leveraging MacOS.
                                                              2. The pane splitting is easy. Moving panes is easy. Moving panes to windows or the opposite, easy-ish.
                                                              3. Broadcasting input to all tabs is neat (but rarely used). Tmux does this too.
                                                              4. The fonts look nice (because MacOS). I’m sure other terminals have 256-color and image support. iTerm was early on this (to me). Powerline fonts, all the fluff.
                                                              5. The fullscreen has native and non-native options, so it’s quick and has survived the Apple OS changes.
                                                              6. I use a global hotkey for a dev log described here.
                                                              7. You can temp fullscreen a pane with shift+Cmd+enter. It has an overlay telling you you are in this mode.
                                                              8. Like someone said, the customizations are great. Just one example: you can dim panes on unfocus to your liking. Even not graphics dimming, font color dimming. It’s great.
                                                              9. The tmux stuff is neat, a bit weird (root window has to stay open). Haven’t used it a lot.

                                                              I’ve tried the windows options. Putty (not the same thing) hasn’t changed in decades. ConEmu or Hyper is close. Hyper is a bit slow (maybe things have changed). ConEmu is close with WSL. But I’m biased because of muscle memory!

                                                              Sorry, getting off-topic. Back to the OP, I agree in the sentiment. I’m spooked by the changes. It’s consumer facing more and more. But I don’t know if any of these things are nails in the coffin or the community will continue to workaround/adapt. There have been breaking changes on major OS versions for a long time. People working sometimes wait when they optimize for stability. But, OP, I hear you. 🌻

                                                            2. 2

                                                              Yeah, it’s only a matter of time. After a recent upgrade of iTerm2 my whole screen would periodically flicker wildly. Occasionally my machine (2019 Pro) would reboot. I temporarily downgraded to Terminal, and everything settled down. My text mode apps also seemed snappier. My lesson from all this: to always be on the lookout for costs when things change. Even when the change seems pleasant (timestamps on specific lines in iTerm2, tmux integration, lots of other lovely stuff). Because we suck at changing things at scale without regression.

                                                              1. 2

                                                                I agree with this. And your description of Linux feeling different from macOS, at least in terms of GUIs, reminds me of this blog entry: https://blogs.gnome.org/tbernard/2019/12/04/there-is-no-linux-platform-1 IMO, to make a Linux computer feel like a real Unix desktop you need a controlling entity to smooth over the edges. Like Android or Chrome OS or even Raspberry Pi OS. Of course, purists would say “this isn’t the GNU/Linux I know”. They’d be right. But from what I can tell, we don’t even have that option.

                                                              1. 3

                                                                One thing I’ve often wished for is the ability to git log method the way I can git log path. Show me all commits that modified within a method. Git clearly has this info since it shows up in @@ lines in diffs. Anybody know how to do this?

                                                                1. 12

                                                                  You can totally do that! Try git log -L :<funcname>:<file>.

                                                                  You might need to give Git a hand recognising what’s a function depending on the language. Check https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more to see how.

                                                                  1. 2

                                                                    git log -L :<funcname>:<file>

                                                                    Ooh! Thank you, this is a life-saver.

                                                                  2. 5

                                                                    My first impulse is git log -p, then / to search for patterns.

                                                                    The git-log man page includes:

                                                                    git log -L '/int main/',/^}/:main.c

                                                                    Shows how the function main() in the file main.c evolved over time.

                                                                    Edit: whoops, should’ve refreshed the page!

                                                                    1. 4

                                                                      Some commands, such as git blame and git log, that take the -L option also accept it in the form of a function name. The syntax for git log seems to be:

                                                                      git log -L “:funcname:file”

                                                                      1. 1

                                                                        git log -L :<funcname>:<file>

                                                                        Ooh! Thank you, this is a life-saver.

                                                                    1. 18

                                                                      IMO, give up on the bizarrely macho idea that hjkl is uniquely amazing and use the arrow keys.

                                                                      1. 18

                                                                        To me the advantage of using hjkl instead of the arrow keys is that I don’t have to move my fingers away from the home row to move the cursor around. I don’t see how that is a “bizarrely macho idea”.

                                                                        1. 1

                                                                          I cannot imagine how that helps. Can you explain?

                                                                          1. 7

                                                                            You can keep your fingers in the middle of the typing area (home row) instead of going over to the cursors.

                                                                            1. 0

                                                                              Oh, hi ane!

                                                                              You can keep your fingers in the middle of the typing area (home row) instead of going over to the cursors.

                                                                              I cannot imagine how that helps. Can you explain?

                                                                              1. 4

                                                                                Hi!

                                                                                I cannot imagine how that helps. Can you explain?

                                                                                You… move around less? It saves time. Like a keyboard shortcut or macro does, basically. It depends on the form factor of the keyboard, but usually the arrow keys are further away from the regular text input keys.

                                                                                1. 1

                                                                                  Perhaps 10 years of active piano practice makes this a moot point for me but not so much for others. Or I’m just being an asshole. Could be both ;)

                                                                                2. 2

                                                                                  What I find helpful about it, is that I don’t have to look away from the screen to see where the arrow keys are, and likewise when going back to the home row. If there’s a lot going on on your screen it’s easy to lose your place, especially when reading lots of text.

                                                                                  Also it avoids the physical motion of moving your hand, it just feels more comfortable I think.

                                                                          2. 16

                                                                            I use a 60% keyboard without arrow keys

                                                                            1. 1

                                                                              By choice, though?

                                                                              1. 2

                                                                                Yes, it’s more portable and means i don’t have to reach as far for my mouse

                                                                            2. 10

                                                                              I used to think this way. Then I learned hjkl. Now I am in the cult of the ancient keyboard warriors

                                                                              1. 2

                                                                                Ancient keyboard warriors who didn’t have arrow keys? I used arrow keys, learned hjkl, thought it was nice, moved to dvorak, ditched hjkl for arrow keys. Nothing is magic about it. Why contort yourself to use hjkl on non-qwerty? Would hjkl be dhtn if the standard were dvorak at the time? Probably, but you can’t just remap dhtn now.

                                                                                1. 5

                                                                                  There was once a really good reddit thread of a guy playing counter-strike with zqsd movement keys on a qwerty keyboard cause he copied a French (AZERTY) player’s keybinds. He did not realize this and posted about how much better these movement keys made him.

                                                                                  1. 5

                                                                                    Pedantic note: ScreaM is a Belgian, not French, player. The keyboard layout is still French though

                                                                                  2. 1

                                                                                    Would hjkl be dhtn if the standard were dvorak at the time? Probably, but you can’t just remap dhtn now.

                                                                                    If you’re using Dvorak in the “suggested sense”, even dhtn would be awkward since you’d be using your right index finger for both d and h. Maybe htns (or QWERTY jkl;) would be better.

                                                                                2. 9

                                                                                  How did you come to the conclusion hjkl is “bizarrely macho”?

                                                                                  1. 8

                                                                                    Why is that macho?

                                                                                    I mean some people tried it, liked it and share the good experience of how great it feels when you get used to it.

                                                                                    1. 3

                                                                                      I used to use hjkl. Then I started getting RSI. Now I appreciate the break my fingers naturally get every time I have to move my hands to the arrow keys.

                                                                                      I can still use hjkl at a pinch, and probably use them many times a day without noticing. But yeah, it’s not worth getting worked up about.

                                                                                      1. 8

                                                                                        I can see this being the case, but I think it’s worth noting that RSI covers a large number of distinct problems, and that most RSI would only get worse by more frequently moving your hands away from the home position.

                                                                                    1. 34

                                                                                      There are no inline links (every link goes on its own line), no formatting, and no inline images

                                                                                      So it’s borderline useless for all but the simplest use cases, and even there it does a very subpar job. I’d like to have an inline image every now and then, or organize things in some multi-column layouts or the like, or a table. 19th century newspapers could do this, and if your technology can’t emulate typography produced on a daily basis – often in a hurry – 150 years ago then your tech is rather limited.

                                                                                      These protocols keep shooting themselves in the head with stuff like this, not even in the foot because this entire thing is dead on arrival for all but a few niche tech folk.

                                                                                      1. 17

                                                                                        I see this a lot, and I really, really wish that the people making this case would actually try to use Gemini for what it is before bringing their preconceptions into it. Easily a full third of the people I’ve spoken to about Gemini immediately start talking about some $FEATURE that they would add to it - and I’ve heard a lot of different features. Do you see the problem with this? This is just a recipe for re-inventing the bloat of the web.

                                                                                        You must first use, then understand, then change the software. You can’t skip steps one and two. It is possible to express yourself within these constraints (you’re already expressing yourself within some fairly arbitrary constraints right now, for instance, imposed by Lobsters’ strict markdown rules), and you should first apply a little bit of creativity to the new medium before you try to bend the medium to your will. We don’t really want it bent, we’re doing something different for a reason.

                                                                                        By the way, your comment can be losslessly represented in Gemtext.

                                                                                        1. 7

                                                                                          Easily a full third of the people I’ve spoken to about Gemini immediately start talking about some $FEATURE that they would add to it - and I’ve heard a lot of different features. Do you see the problem with this? This is just a recipe for re-inventing the bloat of the web.

                                                                                          I’d argue that this is because the problems it solves are inherently complex, so any good solution to it will be complex as well. That doesn’t mean I don’t think the web can’t be improved or made simpler – it’s an organically grown mess of 25 years – but it will never be replaced by a dead-simple solution such as Gemini.

                                                                                          And yeah, my Lobsters comments can be expressed in Gemini without much loss (except the inline links thing), but Lobsters isn’t my website though and I wouldn’t be able to express my fairly simple website on Gemini, or a fairly simple site as Wikipedia. And even the entire Lobsters website would be a worse UX in Gemini as it precludes any sort of design.

                                                                                          1. 1

                                                                                            Gemini does not preclude any sort of design, not at all - it just gives the responsibility for design to the client, not to the server.

                                                                                            1. 2

                                                                                              But isn’t this very limiting? Like, it would work for your blog, but in its current iteration adding a table would already be difficult, never mind something more advanced like the fivethirtyeight election forecast and results.

                                                                                              I suppose it all depends what your vision for Gemini is; if you want it to replace large parts of the web then it’s got basically 0 chance in its current state; if you just want some alternative to use yourself and like-minded people, then sure, go for it.

                                                                                              1. 1

                                                                                                Of course Gemini doesn’t preclude design: It’s a networking protocol. You can use it to move HTML and JS and CSS and images and whatever else just fine.

                                                                                                Attempting to conflate a protocol with a document format is wrong.

                                                                                                1. 1

                                                                                                  The specification also includes a document format, as well as a networking protocol.

                                                                                                  Arguably, things would have been clearer if they were separated out more clearly, but this would kind of defeat the point of Gemini. The networking protocol and document format are intended to be used together.

                                                                                            2. 6

                                                                                              It seems interesting; to make it clear, I do hate tracking too, as well as inaccessibility & various Flash-equivalents of today. And dependency on the complexity tower of Chrome/Firefox/… So I’m certainly curious about alternatives to the current status quo.

                                                                                              I do understand that the protocol seems to allow for a lot of expression, and more “slow-food” style, relaxed consumption. Yet, I cannot escape immediately having a feeling of loss. If I understand this correctly, with no mathematical equations support, I would not be able to write or consume an article trying to explain Shor’s algorithm. With no graphs support, I assume whenever I’d want to display graphs, I’d have to resort to ASCII-Art as a workaround, with necessarily limited precision (for example, no smooth curves or complex 3D surfaces). Finally, I assume I would not be able to write or consume an article about typography, or bysantine icons. Or am I wrong?

                                                                                              Having the concerns mentioned above, I’m immediately starting to think about possible workarounds. I am assuming people would start resorting to “rich clients” - for example, with support for rendering of some kinds of mathematical equations. This, I am guessing, would quickly lead to on-site recommendations like: “This page requires support for LaTeX-Super-Renderer-3.7”. De-facto becoming in-band signaling of the kind Gemini apparently tries to dispell by “only allowing one field in response, the mimetype”. But wouldn’t people start doing that anyway, and start writing such plugins anyway, and start de-facto reinventing HTML anyway? With the likes of Flash plugins of yore raising from the dead in new clothes?

                                                                                              With regards to just graphs and images, I believe it could be somewhat easier actually. I am now reminded of the days of my childhood, when books in my country were mostly in black and white, with a few pages in the center being in color, and being referenced to by the b&w pages (“See illustration 7.b.”). I imagine something like that could work with images being listed, or linked, or attached (?) at the end of a Gemini page. But even then, I don’t think that would be usable for math-heavy documents. And from glancing through the few links around here, it’s not fully clear to me if any images at all, even at the end of a document, are expected to be supported? (Though mimetypes support kinda seems to hint at allowing this?)

                                                                                              So, with the ideal of simplicity sounding theoretically interesting and alluring, at the same time I’m concerned about losing access to, especially, maths-related content. (Assuming that some image-heavy, yet comparatively sparse in that regard, content could be possibly approximated with a list of image links at the end, referenced from the main article. Which kinda already sounds like a hack, that would probably soon lead to reintroducing inline images via specialized clients…) That feels like a pity to me.

                                                                                              1. 2

                                                                                                I do understand that the protocol seems to allow for a lot of expression, and more “slow-food” style, relaxed consumption. Yet, I cannot escape immediately having a feeling of loss. If I understand this correctly, with no mathematical equations support, I would not be able to write or consume an article trying to explain Shor’s algorithm. With no graphs support, I assume whenever I’d want to display graphs, I’d have to resort to ASCII-Art as a workaround, with necessarily limited precision (for example, no smooth curves or complex 3D surfaces). Finally, I assume I would not be able to write or consume an article about typography, or bysantine icons. Or am I wrong?

                                                                                                I’ve brought this issue about math up in the past, but remember, nothing is stopping you from using HTML or PDF. Gemini uses Gemtext as a lowest-common-denominator form of markup, but if you are writing a client, you can always built in HTML support or shell out to something else that does.

                                                                                              2. 5

                                                                                                I think that the reason that people keep trying to suggest features is that Gemini is marketed as a replacement for “the web”, but designed (and only useful) as just a plain text delivery mechanism - there’s (rightly) some cognitive dissonance going on.

                                                                                                That is, “the web” includes plain text, hypertext, rich documents, audio/video media, and interactive content. I don’t think that most people expect Gemini to implement the last two, but there’s some reasonable expectation that something trying to replace “the web” should at least be able to represent reasonably interesting documents - such as scientific papers, which Gemini clearly cannot.

                                                                                                Perhaps if proponents of Gemini stopped trying to claim that it could actually replace anything but the tiniest slice of the web that is pure, plain text (not hypertext, as inline links are really important), you would stop getting people talking about adding features.

                                                                                                Edit: that is, there’s no “preconception” going on here. GP post is responding to the argument that Gemini is a viable replacement for the web by pointing out that it is missing critical features for actually acting as a sane replacement, which has no “preconception” - it’s just a statement of fact. You cannot replace the web without inline links, formatting, or inline images, full stop.

                                                                                                1. 1

                                                                                                  You cannot replace the web without inline links, formatting, or inline images, full stop.

                                                                                                  As a matter of fact, you can. Full stop.

                                                                                                  1. 7

                                                                                                    …that’s so obviously false that I shouldn’t need counterexamples, but here they are:

                                                                                                    https://graphicallinearalgebra.net/2015/04/26/adding-part-1-and-mr-fibonacci/

                                                                                                    http://foldr.org/mw/emacs/

                                                                                                    http://507movements.com/

                                                                                                    https://lobste.rs/

                                                                                                    https://www.av8n.com/physics/clifford-intro.htm

                                                                                                    None of these sites, or the majority of the thousands of other bookmarks that I have, can be replaced without inline links, formatting, or images.

                                                                                                    Linked files do. Not. Cut. It.

                                                                                                    Not only are linked (vs. inline) files objectively and meaningfully different (and, therefore, you cannot replace the web with them), but they are inferior from an information-processing standpoint. From both a practical and theoretical level, you cannot replace the web with Gemini as it currently stands. People will not use it, they are not equivalent, and I, personally, will discourage people from using it - it is a cognitive anti-tool, similar to a reverse printing press. Useful for implementors, terrible for anyone who actually wants to read documents and exchange information that will actually help them to learn and reason.

                                                                                                    1. 0

                                                                                                      I can provide another counter-example: you had 5 links in your comment, none of which were inlined, despite having access to inline links on lobsters.

                                                                                                      You can’t place identical content on Gemini as you can on the web. You can reformat your content for the new medium. Nothing transitions between mediums without change.

                                                                                                      Gemini replaces a subset of the web, which I stated in the opening article and have re-iterated dozens of times.

                                                                                                      1. 4

                                                                                                        I can provide another counter-example: you had 5 links in your comment, none of which were inlined, despite having access to inline links on lobsters.

                                                                                                        …that’s not a counter-example. I never claimed that you can’t replace any of the content on the internet, which is what that statement would be a counter-example to. Perhaps you should take a logic course. Edit: that was too aggressive, my apologies.

                                                                                                        Edit: I claimed that you cannot replace “the web”, which implies replacing the majority of the content at least, and all of the content at most.

                                                                                                        You can’t place identical content on Gemini as you can on the web. You can reformat your content for the new medium.

                                                                                                        …and, as it should be very clear, that re-formatting process is (1) lossy and (2) causes a significant decrease in readability and information processing - meaning that it is not a replacement. The format of the web is part of the web, therefore you cannot replace the web with Gemini.

                                                                                                        Gemini replaces a subset of the web, which I stated in the opening article and have re-iterated dozens of times.

                                                                                                        You have tried to claim that Gemini can replace anything but the tiniest trivial slice of the web that is pure, un-hyperlinked plain-text - which, as shown above, is false. The format of the web is part of the web. The content and the medium are entwined.

                                                                                                        1. 2

                                                                                                          Anything with “less features” is lossy, but that’s not correlated with a “significant decrease in readability”. On the other hand, putting the presentation entirely into the client’s control is a significant win for readability, because the user can configure fonts, contrast, and layout to their preferences and usability needs. The screen reader experience, for instance, is WAY better. Inline links and inline formatting are less accessible to some.

                                                                                                          1. 4

                                                                                                            Anything with “less features” is lossy

                                                                                                            Only true in the most needlessly pedantic sense. You can easily build systems with a small set of carefully-chosen features that still implement the vast majority of the functionality of larger systems that were poorly-built. This…does not describe Gemini. Gemini picked a basis of features that do not allow it to implement more complex functionality or richer documents.

                                                                                                            that’s not correlated with a “significant decrease in readability”

                                                                                                            Not in general, sure - but in the case of Gemini, it’s pretty clear that there is a significant decrease in readability (and, therefore, cognitive processing ability). Requiring users to click through to a separate document for each image, animation, or individual mathematical equation is extremely unreadable for anything with a reasonable density of those things - while “only” being merely slightly less readable for documents with only a few of those objects.

                                                                                                            On the other hand, putting the presentation entirely into the client’s control is a significant win for readability the user can configure fonts, contrast, and layout to their preferences and usability needs

                                                                                                            You can already almost entirely control presentation with major browsers for the current web, through userscripts and stylesheets.

                                                                                                            Moreover, HTML is actually structured, unlike Gemtext, so I have anchor points and document metadata that I can use to exert more control over my content than with unstructured Gemtext - so your statement is actually untrue.

                                                                                                            The screen reader experience, for instance, is WAY better.

                                                                                                            Modern web gives you more options to make a good screen reader experience - such as image alt text. Is it really inconsistently used? Sure, but that’s not a technical problem, that’s a social one - a social one that manifests itself in an equally bad way with Gemini, because Gemtext doesn’t have any way to bind accessibility-related metadata to document structure, because there is no document structure.

                                                                                                            Inline links and inline formatting are less accessible to some.

                                                                                                            Expanding links and controlling inline formatting are very basic features for screen readers.

                                                                                                            So, to summarize, modern web gives you a much richer interface for screen readers, as well as a better interface for people who don’t use screen readers (which is the majority).

                                                                                                            Gemtext is straight-up less conducive to thought and information transfer.

                                                                                                            1. 2

                                                                                                              I think “significant decrease in readability” is interpreted a little too literally here.

                                                                                                              Many of the documents linked by fouric would be way more inconvenient to read if they were adapted to fit in gemini’s limitations because of how heavily they rely on tables, anchor links to a specific part of the same document, and inline images (especially with how inconsistent most clients available today are at dealing with non-gemtext content types).

                                                                                                              I personally am a big fan of how gemtext files only ever result in a single request due to the lack of stylesheets, scripting, and inline resources, and have pushed back on the adoption of HTML and Markdown as alternate document content types because I think that is a valuable part of the protocol. I’m also not delusional: the stance I hold also directly limits the mass appeal of gemini as a technology, because normal people who just want to read these kinds of documents are unlikely to accept what seems like massive inconvenience for technical reasons they don’t fully understand. They’ll just stick to the Web.

                                                                                                              I am willing to put up with that inconvenience as a reader and writer of gemtext content because I think the other benefits of gemini are worth it, but I don’t expect anyone who isn’t another disillusioned Web developer to get on board quite as easily.

                                                                                                  2. 2

                                                                                                    How would metafilter-style writing look, with lots of inline links? Examples appreciated.

                                                                                                    1. 7

                                                                                                      You just wouldn’t have lots of inline links. You’d have a separate list of references, perhaps. Here are some examples of Gemini posts I have written with lots of links:

                                                                                                      https://portal.drewdevault.com/2020/11/01/What-is-Gemini-anyway.gmi

                                                                                                      https://portal.drewdevault.com/2020/10/22/Firefox-the-embarassment-of-FOSS.gmi

                                                                                                      https://portal.drewdevault.com/2020/10/01/Spamtoberfest.gmi

                                                                                                      Let me put it this way: how would inline links work in a newspaper, book, or magazine? The answer is: they wouldn’t, and you just work within those limitations. That doesn’t mean the medium is bad.

                                                                                                  3. 6

                                                                                                    19th century newspapers could do this, and if your technology can’t emulate typography produced on a daily basis – often in a hurry – 150 years ago then your tech is rather limited.

                                                                                                    Not arguing against you, but when it comes to web browsers, then they still haven’t learnt to properly hyphenate text. Another thing we could do 150 years ago. One of the reasons (another being rather poor support for rendering maths, or, in the case of Chromium, complete lack of it) I’m relieved whenever I get to read a PDF generated from LaTeX instead of a webpage.

                                                                                                    1. 5

                                                                                                      You can manually hyphenate with soft hyphens like you did 150 years ago just fine.

                                                                                                      Automating hyphenation is nearly impossible. LaTeX certainly requires some manual help.

                                                                                                      1. 2

                                                                                                        If I use soft hyphens, then copying He&shy;re are rhi&shy;nos. to terminal results in He re are rhi nos. visually, because it copied the text with the soft hyphens even though everything was on a single line.

                                                                                                        LaTeX certainly requires some manual help.

                                                                                                        It never required it when I used it. When you enable correct language support, it should just work.

                                                                                                        1. 3

                                                                                                          That’s because your terminal is 1970s computer technology.

                                                                                                          1. 1

                                                                                                            No. That’s because I copied text, but received bytes instead.

                                                                                                            FWIW it doesn’t happen with hyphenate: auto in CSS, but that’s only supported by Firefox, so it’s irrelevant.

                                                                                                          2. 2

                                                                                                            150 years ago you couldn’t copy manually-hyphenated text from your newspaper in to your terminal.

                                                                                                            1. 2

                                                                                                              I thought this analogy was cute for a little bit. But seriously, why is 150 years ago the standard? Are we really that painfully nostalgia-blind that we can’t recognize there’s a medium point between the old and the new?

                                                                                                              1. 3

                                                                                                                It isn’t my standard, and frankly I don’t really care what we could / couldn’t do 150 years ago because I don’t believe it matters in the context of what are we doing, trying to do, and can’t do today.

                                                                                                        2. 4

                                                                                                          Firefox does hyphenation with hyphens: auto; if you set the document language.

                                                                                                          1. 1

                                                                                                            Does Gemini support setting the document language?

                                                                                                            1. 2

                                                                                                              A quick search on the specification shows it does. So hyphenation working on gemini or not would be a matter of the client implementing it.

                                                                                                          2. 2

                                                                                                            Well, 150 years ago it was a manual process, and not an automatic one :-) I regularly insert &shy for this on my website by the way. But yeah, I agree that the lack of a universally supported hyphenate: auto has been long overdue (only Firefox supports it, and it doesn’t even do a great job at it, although I don’t know if there are technical reasons that prevent it from doing a better job; I think I saw someone on HN detail some issues with automatic hyphenation on the web years ago, but I forgot what they were).

                                                                                                            Math rendering has also been supported by Firefox for 15 years with MathML, but for some reason Chrome doesn’t (but Safari does). Actually, looks like they removed it in Chrome years ago, although it looks like there’s work to add it back soon-ish.

                                                                                                            1. 1

                                                                                                              Actually, along with Firefox, some versions of Chrome (Android & Mac) support auto hyphenation, and Safari has it hidden behind a prefix: https://caniuse.com/css-hyphens I feel that together these may cover enough of the market to make it worth adding to web pages.

                                                                                                              If you want to see a quick and stupid demo, here’s my very unfinished Hugo theme I’m working on developing: https://www.maximumethics.dev/blog/2020/07/my-first-post/ If you shrink the viewport width until it’s skinny like a phone, you’ll see the longer 90 chars “alphabet” line break to hyphenate (on the aforementioned supported browsers), as well as random words in the text.

                                                                                                              1. 2

                                                                                                                Ah yeah, it’s just the desktop version that doesn’t support it for some weird reason; I forgot about that detail.

                                                                                                                I suppose it depends what you use it for: most of the time I really wanted auto hyphenation is for comparatively narrow pieces of text and/or for text-align: justify (e.g. a sidebar or info box). In those cases the hyphenation (manual or automatic) is pretty much a must-have rather than a nice-to-have, because without it it just looks ugly. Your site, on the other hand, looks fairly decent without hyphenation even on smaller screens, but it won’t hurt to add it for browsers that support it.

                                                                                                              2. 1

                                                                                                                Math rendering has also been supported by Firefox for 15 years with MathML, but for some reason Chrome doesn’t (but Safari does). Actually, looks like they removed it in Chrome years ago, although it looks like there’s work to add it back soon-ish.

                                                                                                                That’s what I was on about. If something isn’t available in Chrome, it’s irrelevant these days. I’ve been aware that “it looks like there’s work to add it back soon-ish” for quite some time now. I don’t have hope.

                                                                                                            2. 5

                                                                                                              I think the idea is that the publisher delivers only the information, not the presentation. This constraint allows for greater user control over presentation, for example one might configure Gemini to lay out news articles (maybe on a site by site basis) in a column style, to suit their preferences. I think it’s an interesting idea as a way of making better typesetting more widely available to content published on sites without the budget / know-how to tune their CSS for readability.

                                                                                                              I agree that Gemini would be better off if it supported inline images. That’s pretty often part of the information layer.

                                                                                                              1. 6

                                                                                                                I think the idea is that the publisher delivers only the information, not the presentation.

                                                                                                                Wait! That is HTML! (as compared to PDF)

                                                                                                                1. 6

                                                                                                                  Not really, HTML still focuses a lot on presentation. Headers, side bars, footers, nagivation line, footnotes, etc. are all concepts foreign to the browser, that have to be manually re-implemented in the markup language, again and again. That’s actually what I think that protocols like Gemini misunderstand: HTTP/HTML is not too systamatically complicated (at most it’s “organically” complicated), it’s actually too simple. If for example the <head> section had made it possible to describe how a web-page is navigated, it would have been possible for the browser to render that part of the site, leaving the <body> to be actual content. It’s something you see with other simple languages too: Scheme has various implementations, that implement a common core, but diverge in their additional libraries, that are regarded as useful, but do not allow for code to be portable. So too, had HTTP/HTML has the foresight to recognize what people would want from websites (which is probably too much to ask), or at least the foresight to allow a certain degree of extensibility, a lot of implementation-specific complexity could have probably been avoided.

                                                                                                                  So the issue might not be “simplicity vs compexity”, but “what kind of complexity”.

                                                                                                                  1. 3

                                                                                                                    Years ago I came across a browser extension that would build a navigation bar if it found certain <link> tags in the header. I modified my blogging engine to automatically add said links. Sadly, the extension no longer runs (because of course the extension mechanism changed—at least twice—since then) but I still generate the data in the vain hope it’ll be useful again.

                                                                                                                2. 5

                                                                                                                  A strict separation of information and presentation is something that sounds great in theory, but doesn’t really work all that well in practice once you move beyond the simple use cases, or use cases that are pre-defined and supported in some way.

                                                                                                                  1. 1

                                                                                                                    I don’t know if this was part of the design goal - from what I can see, Gemini doesn’t have any sort of mechanism to describe or annotate what content/information is being delivered, which would make any presentation strategy necessarily heuristic, as there would be no way to delineate e.g. where the “author” of the article is.

                                                                                                                    1. 1

                                                                                                                      I guess you’d just put that information into the document itself.

                                                                                                                      One underappreciated tag in HTML is the <address> tag, which is a nice place to put stuff like author, publication date, etc.

                                                                                                                      1. 1

                                                                                                                        I’m not quite sure what you mean - when you say “just put that information into the document itself” do you mean in a machine-readable format? Because if so, that’s not part of the Gemini text spec - which is the thing being discussed. Adding tags like <address> would be extending the Gemini spec to add features, which is what proponents of it are fiercely against.

                                                                                                                        1. 1

                                                                                                                          No, I just meant to add something like

                                                                                                                          • Author: Gustaf Erikson
                                                                                                                          • Date: 3 Nov 2020

                                                                                                                          in the body of the text somewhere.

                                                                                                                  2. 4

                                                                                                                    As it has been stated on the mailing list, “you can always serve up text/html or text/markdown, you aren’t limited to text/gemini.” There are sites out there serving up images and even music.

                                                                                                                    1. 12

                                                                                                                      Well, that’s not really what’s advocated for in this post (or on the Gemini website as far as I could see), and serving HTML over Gemini just sounds like a s/HTTP/Gemini/, and you can serve text or Markdown over HTTP as well. I don’t really see the point if you’re going to serve HTML over Gemini.

                                                                                                                    2. 4

                                                                                                                      I’m just going to drop a link to the FAQ page, in the hopes that it’ll answer some questions here.

                                                                                                                      1. 3

                                                                                                                        I’m sick of how complex html+css+js gets, and how complicated extracting the actual content can be, in order to view it on “unusual” platforms (small screens. ereaders, etc.), where a good experience depends on the client controlling the presentation of the content. Something like gemini could be the solution to that, but I have to say, the lack of inline images is a deal-breaker for me.

                                                                                                                        I view multi-column layouts as part of the presentation, not the content (I don’t want two columns of text on a phone screen: if I do want two columns of text on the desktop, I can write that into the client), but the images are part of the content.

                                                                                                                        I did wonder whether technically a gemini-ish client could fetch urls which look like they point to images and display them inline, but this is explicitly banned by the specification:

                                                                                                                        Clients can present links to users in whatever fashion the client author wishes, however clients MUST NOT automatically make any network connections as part of displaying links whose scheme corresponds to a network protocol (e.g. gemini://, gopher://, https://, ftp://, etc.).

                                                                                                                        I can sort of see what they’re aiming for, presumably trying to avoid the sort of nonsense some websites have become, where the initial request just gets a jumble of html elements that require the client to fetch and execute tons of javascript before they can be assembled into something resembling content, but I think they should have made an exception for images (They could still leave it up to the client whether it displays inline images or not).

                                                                                                                        Interestingly, gemini probably works really well with screen readers, until you get to an image link (or any link for that matter), at which point it depends entirely on whether the author bothered to provide a caption, or explain what the link is as part of the text (Although that’s arguably no worse than html, where the existence of alt text doesn’t mean that it is always used or used correctly).

                                                                                                                        1. 5

                                                                                                                          Another reason to not allow non-user-initiated network connections is that’s abused to track users (Facebook pixel etc).

                                                                                                                          IMHO this could be sufficiently solved by allowing additional requests to the same domain as the document request.

                                                                                                                          1. 4

                                                                                                                            One big reason I’m excited about Gemini is the possibility of escaping the web’s bloat, which we need to do in order to reduce energy usage / emissions in the climate crisis. For this reason, I support Gemini’s decision to ban inline images. If you have inline images, next people will want inline video, and soon even if Gemini is “simpler” it’s using as much storage+bandwidth+processing as a web page.

                                                                                                                            Inlining images, especially from other locations, is also a plausible method for sneaking user tracking back into the protocol, and I also approve of Gemini’s strong efforts towards privacy. I also hate ads even when they don’t track people, I’d love to live someplace where billboards are banned so I can escape the constant background hum of marketing. Eliminating inline images is also a great way to reduce the annoyance of advertising.

                                                                                                                            I’m going to have to agree with everyone in this thread that refusing to implement inline links was a mistake, though. That was one of the biggest problems I had with Gopher, and I was hoping Gemini would do a better job with hypertext.

                                                                                                                            1. 4

                                                                                                                              Inlining images, especially from other locations, is also a plausible method for sneaking user tracking back into the protocol, and I also approve of Gemini’s strong efforts towards privacy.

                                                                                                                              It’s a very difficult balance to strike between simplicity and functionality. You could probably avoid trackers by, as @m_eiman says, only allowing additional requests from the same domain as the original document.

                                                                                                                              Alternatively, you could create/use a format which embeds the images directly in the original document (similar to how pdf or epub does). Some might argue that this is inefficient, as you need to serve multiple copies of the image data if it appears on multiple pages. However, in this context, it could be seen as a feature, as we don’t want the kind of images (such as ads) which aren’t actually “part of the document”.

                                                                                                                              There will always be some people who abuse any protocol, but not having inline images is very limiting and means it isn’t any good for a significant portion of (what I consider) “good content that doesn’t need javascript/css”.

                                                                                                                          2. 1

                                                                                                                            I’d like to have an inline image every now and then

                                                                                                                            Might I ask what’s wrong with merely providing a link to the image?

                                                                                                                            or a table.

                                                                                                                            This can be easily done with some ASCII art (which is what you do for Markdown, anyways) coupled with a preformatted block.

                                                                                                                            1. 10

                                                                                                                              This can be easily done with some ASCII art…

                                                                                                                              But ASCII art is pretty much the quintessence of mixing presentation and content, which is very specifically what Gemini seeks to avoid. It can’t wrap or scroll differently on small devices, it can’t be extracted (easily and reliably) to a machine-readable data format, and it isn’t accessible because there’s no semantic information about the table structure.

                                                                                                                              1. 3

                                                                                                                                You’re right. I kinda hope some kind of table syntax does make it into the Gemini spec after all.

                                                                                                                              2. 3

                                                                                                                                I need to click a link to an image? It seems pretty obvious to me that this is worse UX than just displaying it.

                                                                                                                                ASCII art relies on a monospaced font, which I don’t really like for reading text. I think Lobsters would be significantly worse if it was all monospaced text for example. It also relies on a certain screen size, which doesn’t work for smaller screens (or very big ones, for that matter). I mean, it kinda works but it’s a hack.

                                                                                                                                1. 2

                                                                                                                                  I need to click a link to an image? It seems pretty obvious to me that this is worse UX than just displaying it.

                                                                                                                                  Yeah. You’re completely right, this is worse UX. I’m beginning to think of proposing an inline-image syntax for the gemini spec.

                                                                                                                                  ASCII art relies on a monospaced font, which I don’t really like for reading text.

                                                                                                                                  I admit I was wrong. ASCII tables are a hack, I suppose. Hopefully the simple table syntax I’m thinking of right now makes it into the spec!

                                                                                                                                  I think Lobsters would be significantly worse if it was all monospaced text for example. It also relies on a certain screen size, which doesn’t work for smaller screens (or very big ones, for that matter). I mean, it kinda works but it’s a hack.

                                                                                                                                  FYI there are gemini clients that support variable-width fonts.

                                                                                                                                  1. 4

                                                                                                                                    FYI there are gemini clients that support variable-width fonts.

                                                                                                                                    I tried to use it with Gopher years ago (I hacked up an existing client), and many sites don’t really work all that well because they assume stuff will be displayed as monospaced text (such as tables you mentioned, but also things like code examples, or other alignment things).

                                                                                                                                    Gemini is a bit of an improvement because the spec at least recognizes that proportional text exits and has “code blocks”, but it also leaves much to the clients. In other words: I wouldn’t be surprised if people would just keep using it as they used Gopher, and the weird (and IMO, broken) way line wrapping works in Gemini doesn’t help either. I suppose time will tell how it will be used in practice (but as mentioned, I don’t think it will be used much in practice beyond a few “Hacker blogs” like Drew’s).

                                                                                                                                    One of the big mistakes of HTML was, ironically, to “leave it up to the clients” which resulted in a big mess which had to be unified so that people could get a reasonably consistent experience irregardless of which browser they use, but that just unified the mess instead of clearing it up.

                                                                                                                                2. 1

                                                                                                                                  I use HTML to add tables to my Markdown content.

                                                                                                                                  1. 1

                                                                                                                                    I personally find HTML’s table syntax difficult to read and use.

                                                                                                                                    1. 4

                                                                                                                                      Yep, I usually whip up a quick Perl script with the (deprecated) CGI module to generate it from plain text ;)

                                                                                                                                3. 1

                                                                                                                                  Gemini is only a protocol, but the specification also propose a basic text/gemini format as a de-facto document type. It however supports any mimetype, including text/html:

                                                                                                                                  5 The text/gemini media type
                                                                                                                                  5.1 Overview

                                                                                                                                  In the same sense that HTML is the “native” response format of HTTP and plain text is the native response format of gopher, Gemini defines its own native response format - though of course, thanks to the inclusion of a MIME type in the response header Gemini can be used to serve plain text, rich text, HTML, Markdown, LaTeX, etc.

                                                                                                                                  You could totally sent the following HTML document over gemini:// and enjoy inline images:

                                                                                                                                  <html>
                                                                                                                                    <body>
                                                                                                                                    <p>My favorite cat picture:</p>
                                                                                                                                    <img src="gemini://domain.tld/cat.png" />
                                                                                                                                    </body>
                                                                                                                                  </html>
                                                                                                                                  

                                                                                                                                  It would then be up to the gemini client to process this document, fetch required resources (the cat picture) and render it nicely for you. The advantage of the gemini protocol here is that it would put a limit on the HTML subset one could put in a document. For example, <form> tags won’t be any useful. There would also be no need for <script> tags, as they wouldn’t be able to “phone home” over gemini.

                                                                                                                                  One of the biggest problem of the web is that the HTTP protocol itself grew in an enormous monster that’s impossible to understand, where sometimes the headers of a requests can be 10 times bigger than the content itself.

                                                                                                                                1. 23

                                                                                                                                  I agree that web browsers are too complex. I don’t think that HTTP is the real problem, however. While it might be more complex than we’d like it to be, it’s manageable. From my perspective the real difficulty is in rendering and client-side code execution; the hodge-podge collection of rules of HTML and CSS that have developed over the years is just awful. This is why we have so few serious web engines.

                                                                                                                                  1. 19

                                                                                                                                    the hodge-podge collection of rules of HTML and CSS that have developed over the years is just awful.

                                                                                                                                    We’re just about there with Flexbox and Grid. You could probably amputate just about everything that came before (especially float, the various alignment options, position, all the animation stuff that goes unused, make display just border-box, etc…) and you’d have something relatively simple, able to fit in a persons memory, and which also covers 95% of the layouts anyone actually needs.

                                                                                                                                    1. 8

                                                                                                                                      Glad it that works for you! I still have no idea how grid/flexbox work exactly, what the difference is and why there are two. MDN doesn’t help with its fragmented documentation on the subject and has mostly useless examples that don’t work for real world designs. I ended up copy/pasting various examples together until it did more or less what I wanted. Barely better than float/clear.

                                                                                                                                      1. 14

                                                                                                                                        I have found these two resources to be very helpful:

                                                                                                                                        1. 1

                                                                                                                                          Excellent! Thanks!

                                                                                                                                        2. 7

                                                                                                                                          Someone at the company recently explained it very neatly:

                                                                                                                                          Flexbox is when you wanna lay things out over one dimension (horizontally or vertically). E.g. your sidebar or your toolbar icons and such.

                                                                                                                                          Grid is two-dimensional.

                                                                                                                                          They’re not hard to grasp and I recommend trying it out as it’s really awesome not to deal with the old way of dealing with things. I hardly ever need things like bootstrap any more.

                                                                                                                                        3. 3

                                                                                                                                          I thought about the elimination of float before as it’s notoriously tricky to implement correctly, but how would you “float” an image next to some text without it? I’m not sure how easy that is with CSS grid and still maintain a reasonable HTML layout (it’s possible, but you’d have to write your HTML in a specific way).

                                                                                                                                          That’s the use case float is designed for; people have been (ab)using it for layouts and the like, which flexbox and grid finally solve in a better way, but I’m not sure if that’s also a replacement for the actual use case floats are intended to solve.

                                                                                                                                        4. 5

                                                                                                                                          That’s why we should stick to HTML 3.2, the best of all HTML standards.

                                                                                                                                          1. 5

                                                                                                                                            It’s not a managable problem. There are 3 web rendering engines of any utility, and that number is clearly shrinking to 2. One of those two is clearly molding it to serve their self-interest.

                                                                                                                                            How do we “manage” this state of affairs? Fork one of the browsers? Just look at how that’s been going for Pale Moon. Write a new one from scratch? Netsurf is the most advanced attempt so far, try to use it for a week and tell me you feel like a first-class citizen. Or maybe you prefer Servo - try that for a week to similar effect, and recall that their whole team was fired from Mozilla and they hadn’t made any progress in the last 2 years anyway.

                                                                                                                                            No, this problem is far from managable. It’s out of control.

                                                                                                                                            1. 12

                                                                                                                                              @davmac was saying HTTP was manageable, which feels like a different conversation.

                                                                                                                                              1. 2

                                                                                                                                                Oh, I see. I still don’t think HTTP is that great. I prefer to draw a line in the sand and not mix incompatible cultures on the same network.

                                                                                                                                          1. 3

                                                                                                                                            I’ve been wrestling with a couple of thorny problems for the Mu computer (built up from machine code except for the kernel, designed to be taken apart and reward curiosity):

                                                                                                                                            1. 9

                                                                                                                                              I strongly agree with your original diagnosis of a split web.

                                                                                                                                              If Google is competent, the split web will split into 95% that gradually grows increasingly proprietary, reimplementing the same features as before but with increasingly arcane reasons to switch from open standards. For example, if URLs were to hash their domain name and path, ad blocking would become impossible. Since URLs are already deemphasized in Chrome, this is only a matter of time.

                                                                                                                                              As the web becomes more proprietary, it’ll become more and more difficult to maintain an open-source browser that provides a good experience with the proprietary web. So those who try to fork open-source browsers will end up trying to live within the 5% web that is committed to not picking up proprietary (i.e. post-standards) features.

                                                                                                                                              If Google is incompetent, the split will be closer to 50-50. It’ll be easier for people to live in the pre-standards web. Proprietary features will provide insufficient value-add for websites to adopt. The hosted future of AMP will not be significantly more convenient than maintaining your own servers.

                                                                                                                                              So, I’m hoping Google grows incompetent. But, going by the Microsoft Windows/Office past I’m extrapolating from, it’s a real Hail-Mary hope. The only thing that will break this monopoly is a new frontier opening up. Or anti-trust action.

                                                                                                                                              1. 7

                                                                                                                                                I wonder why people seem to generally dislike two line prompts? I’ve fell in love with idea as soon as I’ve realized it is possible:

                                                                                                                                                14:39:29|~/projects/rust-analyzer|master⚡*
                                                                                                                                                λ 
                                                                                                                                                

                                                                                                                                                Having command at a fixed offset form the terminal edge makes scanning history of commands much easier, full path gives essential context, and time & git status are just nice touches.

                                                                                                                                                Am I missing some reasons why single line prompts are more convenient?

                                                                                                                                                1. 5

                                                                                                                                                  Those are my reasons: predictability/ease of scanning. Most of my prompt is built to be as visually quiet as possible to help me focus. It’s a micro-optimization, but I love the feeling of it.

                                                                                                                                                  The only real issue with two line prompts that I know of is that fish has a few open bugs around handling of redraws in the presence of those. But that’s about it.

                                                                                                                                                  1. 5

                                                                                                                                                    For me it’s mostly about reducing visual noise, everything I want in a prompt (directory and git status) fits comfortably in one line, optionally showing the exit status if it’s different from 0.

                                                                                                                                                    1. 2

                                                                                                                                                      I just stick all that crap into RPROMPT, why waste two lines with optional information when the right prompt can deal with it and get overwritten if what you type gets longer?

                                                                                                                                                      1. 1

                                                                                                                                                        I‘ve tried the right prompt, but two lines work better for me, amusingly, for exactly same reason :)

                                                                                                                                                        Vertical space is cheap win infinite scroll, horizontal spaces feels significantly more crowded.

                                                                                                                                                        1. 2

                                                                                                                                                          We’ll have to disagree I guess then. My prompt in $HOME is literally:

                                                                                                                                                          $ .......a long way over to the right ->~
                                                                                                                                                          

                                                                                                                                                          The right fills up with git status and dir information as I chdir around but otherwise I can’t stand my prompt taking up a bajillion characters based on the directory I’m in. I want all the crap i type to be at index 2 always. But thats just my weirdness really.

                                                                                                                                                          Also means less lines to delete when copy/pasting my history.

                                                                                                                                                      2. 2

                                                                                                                                                        My prompt is 2 lines, but the second line has nothing. It’s really nice to start commands at column 0, and nudges me to use multi-line commands more.

                                                                                                                                                        1. 1

                                                                                                                                                          Like you I prefer two line prompts primarily for the ease of scanning. My informational line does not drastically differ between locations and projects, but having a set size/location for my commands makes it very easy for me to scan.

                                                                                                                                                          1. 1

                                                                                                                                                            Mine is two lines as well, which kind of freaks out some people who don’t know it can even do that. This is mine, but I’d like to check out the return value stuff:

                                                                                                                                                            # define the unprinting start and end escape sequences, so bash doesn't
                                                                                                                                                            # count these as taking up room on the command line
                                                                                                                                                            UPb="\["
                                                                                                                                                            UPe="\]"
                                                                                                                                                            
                                                                                                                                                            # Setup color variables
                                                                                                                                                            BLACK="$UPb\033[0;30m$UPe"
                                                                                                                                                            DGRAY="$UPb\033[1;30m$UPe"
                                                                                                                                                            RED="$UPb\033[0;31m$UPe"
                                                                                                                                                            LRED="$UPb\033[1;31m$UPe"
                                                                                                                                                            GREEN="$UPb\033[0;32m$UPe"
                                                                                                                                                            LGREEN="$UPb\033[1;32m$UPe"
                                                                                                                                                            BROWN="$UPb\033[0;33m$UPe"
                                                                                                                                                            YELLOW="$UPb\033[1;33m$UPe"
                                                                                                                                                            BLUE="$UPb\033[0;34m$UPe"
                                                                                                                                                            LBLUE="$UPb\033[1;34m$UPe"
                                                                                                                                                            PURPLE="$UPb\033[0;35m$UPe"
                                                                                                                                                            LPURPLE="$UPb\033[1;35m$UPe"
                                                                                                                                                            CYAN="$UPb\033[0;36m$UPe"
                                                                                                                                                            LCYAN="$UPb\033[1;36m$UPe"
                                                                                                                                                            LGRAY="$UPb\033[0;37m$UPe"
                                                                                                                                                            WHITE="$UPb\033[1;37m$UPe"
                                                                                                                                                            NEUTRAL="$UPb\033[0m$UPe"
                                                                                                                                                             
                                                                                                                                                            export BLACK DGRAY RED LRED GREEN LGREEN BROWN YELLOW BLUE
                                                                                                                                                            export LBLUE PURPLE LPURPLE CYAN LCYAN LGRAY WHITE NEUTRAL UPb UPe
                                                                                                                                                            
                                                                                                                                                            export PS1="*** $LCYAN\@$NEUTRAL *** $YELLOW\w$NEUTRAL  ***\n"
                                                                                                                                                            

                                                                                                                                                            I add the \h for host name in my work shell, because I ssh to a lot of places

                                                                                                                                                            1. 2

                                                                                                                                                              You can replace all that color stuff with %F{...} syntax, it’s going to be more readable.

                                                                                                                                                              1. 1

                                                                                                                                                                That just shows you how long I have dragged this along! And is that true as well for bash?

                                                                                                                                                                1. 1

                                                                                                                                                                  Honestly, idk. I discovered %F stuff a week ago, before that my config had a lot of vars with ANSI escapes too! :)