1. 1

    Please do not post stackexchange questions

    1. 1

      Why not?

    1. 8

      There’s a name that doesn’t work in English, as blech tends to be used as an expression of disgust.

      1. 12

        expression of disgust.

        Given some of the things I’ve heard about the trials and tribulations of embedded programming this may not be unfair.

        1. 3

          Given some of the things I’ve heard about the trials and tribulations of embedded programming this may not be unfair.

          Having done embedded development long in the past, it’s certainly apt!

        2. 9

          I was expecting a novelty language :)

          1. 2

            Same here! It the name made me think it was an esolang initially.

            1. 1

              Yeah, I expected this to be a parody language that does the opposite of what good languages do, resulting in something like INTERCAL. I think the name “Blech” will significantly slow the growth of the language.

            2. 7

              Seems to be done by Bosch Research, a German company. If it works for them … I see nothing wrong with it.

              1. 2

                Sure, but it might limit how seriously people take it. Then again, considering the silly names some projects have…

              2. 6

                Being one of the authors - we are aware of this. Blech should remind you of “bare metal”. Programs can run directly on “the Blech”. We also considered the name “Metal” but it was already taken by Apple.

                1. 2

                  I really appreciate you chiming in.

                  To me a die looks like a piece of blech.
                  Thus the name totally makes sense.

                2. 3

                  As German, I find the name very amusing. It’s usually used in disrespect towards sheet metal of questionable thickness/stability, something that bends easily and not being something that you want to relying on for bearing load. It’s sometimes used in an affectionate way, like the Trabbi being referred to as a ‘Blechle’ or ‘small Blech’. Anyways, in all uses I’ve heard it’s always been towards thin sheet metal.

                  1. 1

                    I checked several dictionaries but couldn’t find any evidence of this. Is it a local slang?

                    1. 2

                      I’m familiar with it, I don’t believe it’s local.

                        1. 1

                          Thanks. I wrote it with a (capital) ‘B’ and landed here:


                          1. 1

                            Yuck, case sensitive URL!

                      1. 2

                        I checked several dictionaries but couldn’t find any evidence of this. Is it a local slang?

                        Nope, not slang: https://www.merriam-webster.com/dictionary/blech

                        That was the first hit when I did a search.

                      2. 1

                        I also assumed it was named along the lines of Worst: http://worst.mitten.party/

                      1. 13

                        One of my hugest pet peeves with programming language main pages is when they describe their syntax, but have absolutely no code examples on their landing page or within 1 or 2 clicks. I’ve been clicking around on their website and haven’t found any obvious link to a short example of what the language looks like.

                        1. 9

                          Being one of the authors I admit: yes we should improve this.

                          Find code examples in presentations and in the latests article referred to in the Blog section: https://www.blech-lang.org/blog/

                          1. 2

                            Even starting from that link to the blog, finding a code sample takes quite some time, so here’s a direct link to the first Blech code sample in the latest blog post: Decoding the DCF77 Signal with Blech > The Application’s Top-Level.

                            And here’s a short code sample from later in that same post:

                            activity CaptureSync (dcf77: bool)
                                // Perform the measurement and restart if the level drops meanwhile.
                                when not dcf77 reset
                                    var len: nat16 = 0
                                        await true // Await next sys tick.
                                        len = len + 1
                                    until len > DCF77_SYNC_LEN end
                        1. 4

                          I too see a multi-second delay when loading any page. However, when I type a comment and click Preview (which does a server round-trip), the preview loads as quickly as normal (about 0.5 seconds). Similarly, when I append .json to any URL, the JSON loads as quickly as normal.

                          If it’s only HTML pages that are loading slowly, that suggests to me that something is wrong with the caching layer.

                          1. 2

                            Your time zone link shows me 2 PM US/Central. I think the link should be 7 PM US/Central. (That’s also the time of this comment.)

                            1. 1

                              …yup, I generated UTC on accident instead. Thanks for the correction, and for your comments in the chat.

                            1. 8

                              It’s hilarious that an article about ‘writing simple code’ doesn’t work at all if javascript is disabled. The article is text, you don’t need javascript. Do simple things.

                              1. 10

                                This isn’t an article by the website maker – it’s a wiki page with many authors.

                                This website, wiki.c2.com, was created in 1995 and was the first wiki ever made. The site used to be written in Perl and did not require JS, but in 2015 it was rewritten as a single-page application so it could integrate with the author’s JS-powered Federated Wiki project.

                                1. 5

                                  It doesn’t bode well that the first wiki ever made can’t even display text anymore without requiring the execution of a bunch of arbitrary javascript.

                              1. 4

                                People with restrictive hardware shouldn’t make it more inconvenient for people who have better resources.

                                This seems fundamentally backwards to me. People with better resources are already privileged. Why should they have even more convenience, at the expense of people who have less?

                                1. 6

                                  Because in context, run-of-the-mill hardware has supported much larger screens and computing capabilities for quite a while now.

                                  But no, 80-column terminals in 2020 isn’t “reasonable” any more as far as I’m concerned. People commonly used 132-column terminals even back in the 80’s, for chrissake, don’t try to make 80 columns some immovable standard.

                                  Wide screens and a minimum of 1280 pixels by 720 pixels have been the standard for nearly a decade by now. Eighty columns is more of a ballpark. Like in typography, too long of lines will be hard to read and too thin of lines or too many haphazard newlines wear you out reading vertically. In other cases, it does make better sense to accommodate less-capable hardware.

                                  1. 4

                                    Your argument proves too much. According to that reasoning, video games should come configured to use one-handed controls by default, because there are some one-handed video game players. If you’re one of those privileged two-handed people who want the luxury of being able to walk and turn at the same time, you can go to the Options menu and turn on two-handed controls.

                                    Of course, making two-handed controls the default makes sense. The reasoning is simple: (number of two-handed players) × (magnitude of their benefit from not having to go to Options) > (number of one-handed players) × (magnitude of their harm from having to go to Options).

                                    In general, you can’t answer a question about privileged vs. unprivileged just by choosing to always favor the unprivileged. You have to compare the number of people affected on each side and the magnitude of those effects.

                                    Linus’s argument didn’t come with numbers, but when he wrote “yes, we’ll accommodate things to within reasonable limits”, I think the above type of calculation is the meaning of “reasonable” he was getting at. Of course, if your estimates of the numbers showed that longer lines of code are not “reasonable” in this sense, that would be a valid argument.

                                  1. 1

                                    I’m starting to feel now is not a great time to drop my classless css project…

                                    I was going to go a different route and try to have mine adopted as new default styles for browsers. Is that a bit too ambitious?

                                    Side note- I feel that styling all of the main HTML elements is a great first project for new front end developers. It forces you to use and understand all of the core HTML elements.

                                    1. 2

                                      bit too ambitious?

                                      Only if you fail, which is statistically likely. But most amazing successes are statistically improbable until they are absolute certainties.

                                      1. 2

                                        I was going to go a different route and try to have mine adopted as new default styles for browsers. Is that a bit too ambitious?

                                        If any CSS style were to be adopted in all browsers, I would expect it to be normalize.css, which is basically makes the minimum changes to each browser’s default styles that makes them all identical. normalize.css is already well-known, so I hope you can give the browser makers a good reason your defaults would be better. One reason might be that normalize.css zeroes body’s margins instead of setting them to a nice-looking default, making it predictable but not pretty.

                                        Also note that you shouldn’t be trying to have your styles become the new default, but rather be merged into the current defaults, unless your styles truly reimplement all of the default styles. See how complex resource://gre-resources/html.css, the default CSS for your version of Firefox, is.

                                        1. 2

                                          I was going to go a different route and try to have mine adopted as new default styles for browsers. Is that a bit too ambitious?

                                          This is my implementation of that idea, or at least a part of it: https://adi.tilde.institute/default.css/

                                          It forces you to use and understand all of the core HTML elements.

                                          Understanding is efortless, nothing forced there, also ambition and understanding don’t mix.

                                        1. 7

                                          tl;dw a bunch of keyboards and autohotkey

                                          ps. i find the monologue-ing and then getting worked up doing it style of tom scott (and john oliver) really weird and annoying. I don’t know why. I guess it’s unnatural.

                                          1. 5

                                            Never noticed the similarity. But I agree, it’s a kind of semi-comedic presentation that at least used to be popular around the middle of the last decade, just like how youtube had a style of quick shots and a lot of jumping around for entertainment.

                                            1. 2

                                              tl;dw a bunch of keyboards and autohotkey

                                              You’re missing a big part of the story. AutoHotkey was unable to tell the multiple keyboards apart, so Tom also set up another program called LuaMacros that can tell multiple keyboards apart, then connected it to AutoHotkey really hackily.

                                              Here is Tom’s final explanation from 16:12 to 16:59:

                                              Here’s how this keyboard works. You press a key. LuaMacros intercepts it on the way in, stop Windows actually typing the letter or whatever’s underneath it, it works out which number emoji you want, and it saves that number to a file on disk. Then it presses the F24 key – that’s right, there’s an F24 key. It’s not on my keyboard, it’s almost certainly not on your keyboard, but it’s still a key that Windows can deal with, because backwards compatibility. And AutoHotkey is listening for that F24 key, and when it hears it, it reads that same file, the file that LuaMacros just put the number in, it reads that number, it looks down the list of emoji, and it types that emoji.

                                              That is how the emoji keyboard works, that’s why I use Windows, and that is the art of the bodge.

                                            1. 6

                                              Definitely some potential. But the search results will need some prioritization before it truly hit the mark. Searching for “mongoc_client_pool_new” I could not see the documentation page on the first page of result. And searching for “std::vector” came up with a bunch of Stack Overflow links.

                                              1. 4

                                                Agreed, some prioritization is needed, maybe even by users themselves (voting?).

                                                Also, have you tried narrowing the search to “docs” only?

                                                1. 4

                                                  I had not but I just did. It is better, but still needs some refinement from what I would expect.

                                                  Still, keep up the good work!

                                                  1. 1

                                                    I didn’t see that narrowing the search was possible at first. In Firefox, your form select { appearance: none } CSS style hides the disclosure triangle, so the “All” part of the search bar doesn’t look at all like a menu. It looks more like a button, which makes it feel janky that a pop-up menu opens after I click it.

                                                    If you’re going to hide the browser-default disclosure triangle, I suggest adding your own (which can match your site’s theme) so the menu still looks like a menu. Alternatively, if you really want to make the menu look like a button, I suggest giving it a darker background color and making its background color change on hover.

                                                    1. 1

                                                      Got it, I’ll work on it, thank you!

                                                    2. 1

                                                      Also, have you tried narrowing the search to “docs” only?

                                                      I do not understand this reasoning. If this is a search engine for programmers, then looking for “std::vector” must give you fist the most official documentation of that class, no matter what.

                                                  1. 9

                                                    Let me start by saying that I prefer a developer who tests too much than not at all. So I appreciate posts like this. That being said, I disagree with the premise of the post, and I belive the main issue is that OP ignores one crucial aspect: cost.

                                                    Writing any code has a cost. That cost is a compound of many things.

                                                    • time spent designing and writing it
                                                    • the effort spent on future maintenance of the code (which, frustratingly, you don’t know at the time of writing)
                                                    • the inevitable growth in complexity of the code base, which leads to other problems down the road
                                                    • additional time spent on onboarding new developers

                                                    and possibly many more things. When we write new code, we weigh these cost against the potential value, e.g. new features, security, etc. Testing code is no different. Any testing code has a value that we have to weigh against the cost of writing it. I like to frame that value as confidence. How confident am I, after having written this test, that my code is working as intended from the perspective of my users? Weighed against the cost of writing it. Using this mental model, you will find that a lot of tests are not worth writing.

                                                    OP addresses common objections, amongst them:

                                                    Enforcing 100% test coverage leads to bad tests

                                                    In their answer, they kind of hit the mark in saying:

                                                    Putting too much focus on one particular metric might lead to gaming behavior

                                                    or put differently by Goodhart’s law:

                                                    When a measure becomes a target, it ceases to be a good measure.

                                                    OP further says:

                                                    What’s sure is that it is straightforward to write bad tests.

                                                    Unfortunately, they dismiss the notion by saying:

                                                    I am not sure how that would lead to bad tests.

                                                    In my experience, if you enforce any test coverage (you don’t even need 100%), developers will write bad tests. And many of thoses tests will have negative value. That is, they don’t provide enough confidence to offset their cost.

                                                    I have experienced this first-hand. At work, we have a code base that had ~100% code coverage at one point in time. In my estimate, 95% of those tests are worthless. How do I know? You can change the code in a way that does not break the interface of functions, nor break user behaviour, and the tests will fail (they should not). At the same You can deliberately break the code in meaningful ways, and the tests will not fail (they should).

                                                    Test coverage is one of the tools at our disposal, it is one metric, not the metric. Use it to discover meaningful places to test. Don’t kid yourself when you are reaching for 100%. When you do, you are playing a video game, you are going for a high-score. You are not meaningfully improving your code.

                                                    1. 1

                                                      I totally agree; the cost of tests shouldn’t be ignored.

                                                      I imagine the article author might respond, “just put # pragma: no cover comments in all the code that isn’t worth testing”. However, I think they would end up with quite a lot of those comments, all over their code. That would be bad—comments that are not directly relevant to the functionality of surrounding code harm the readability and editability of that code. Such comments need a strong benefit elsewhere to be worth it. And as you explained, enabling a coverage metric is not a strong benefit.

                                                    1. 1

                                                      100% of what? All possible execution paths through the application? Doesn’t sound feasible, most of the time.

                                                      1. 2

                                                        100% of what?

                                                        Don’t just read the headline. If you click through to the actual article “Test coverage only matters if it’s at 100%”, you will find the answer to your question.

                                                        In short:

                                                        100% of the lines that should be covered (not the lines that are written) … You need to be explicit about excluding lines from coverage.

                                                        If your language supports it, make sure you test all branches

                                                        Now that you actually know what the article says, do you still think 100% coverage is infeasible? (My opinion matches that of @ts.)

                                                        1. 1

                                                          Does “all branches” mean each branch independently, or each possible execution path? One sounds feasible, but inadequate, the other sounds adequate, but infeasible.

                                                      1. 3

                                                        I recently did a similar review of my KeePassXC password database. Since KeePassXC doesn’t have auditing tools like the Bitwarden ones used in the article, here’s how I audited:

                                                        Reused passwords and weak passwords

                                                        I right-clicked the Password column and unchecked Hide Passwords. Then I left-clicked the Password column to sort by password and scanned down the list. Reused passwords showed as identical adjacent entries.

                                                        Exposed passwords

                                                        I manually pasted the email addresses I use into https://haveibeenpwned.com/.

                                                        1. 0

                                                          Little more manual, but not by much and still the same result. Nice work and thanks for sharing as a I know A LOT of people use KeePass, myself included (for work).

                                                        1. 23

                                                          I’ll see your “set the language based on my location” and raise you a “redirect me to a non-existant locale-specific URL for the page I requested, and go into a redirect loop”

                                                          Some of Apple’s docs are horrendous for this. Most links will be to the address without locale (which I guess is the default en-US locale), but it uses my physical location (Thailand) and.. I guess maybe my browser preferences to say “oh you must want the local page, so we’ll redirect you to the en-TH version of the page… Except that doesn’t exist.

                                                          Changing the URL to en-US usually gives a redirect loop.

                                                          I’ve resorted to using en-AU (I am Australian, but usually the content I want isn’t any different from the US version) but I still have to change the URL manually.

                                                          And yes, I contacted support about it. Whoever responded to me couldn’t seem to comprehend the problem, I’d imagine because they can’t reproduce it themselves, and aren’t tech savvy enough to actually understand the problem without seeing it with their own peepers.

                                                          1. 1

                                                            I’ve resorted to using en-AU … but I still have to change the URL manually.

                                                            I had a similar problem, where the URL of a certain website always had parts I didn’t want and I had to delete them manually. I ended up automating it with a user script (created with Violentmonkey). I am happy with my solution and recommend implementing something similar for yourself.

                                                            As a starting point for your user script, here are the main parts of mine. After I load a forum thread on example.com/forum/ with query parameters hilit or sid, this script redirects to a URL without them.

                                                            // @match https://www.example.com/forum/viewtopic.php
                                                            const currentLocation = window.location;
                                                            const url = new URL(currentLocation.href);
                                                            const originalSearch = url.search;
                                                            const simplifiedSearch = url.search;
                                                            if (simplifiedSearch !== originalSearch) {
                                                              // in this case, the `delete` calls on `url` have mutated `url`, so its `href` is different
                                                              window.location = url.href;

                                                            You can try editing the above to find “en-TH” in the URL and replace it with “en-AU”. Also, user scripts run after the page finishes loading by default—if that’s the wrong time for your case, you can try adding // @run-at document-end to your metadata block.

                                                          1. 1

                                                            Some features not asked for in this article that you may not have realized Finder has:

                                                            • Even though Cut isn’t an option in the Edit menu, you can move files with keyboard shortcuts. Copy (⌘C) a file, then in the destination folder, Move Item Here (⌥⌘V) instead of Paste Item (⌘V).
                                                            • View > Show Path Bar (⌥⌘P) shows the Path Bar. It’s a read-only address bar in which all the parent folders act as proxies for that folder. You can double-click a parent folder to view it.
                                                            • View > Go to Folder… (⇧⌘G) opens a dialog with an address bar. It supports tab-completion.
                                                              • The path in this address bar defaults to the last path you entered in this dialog, not to the current folder’s path, but if you perform Edit > Copy “…” as Pathname (⌥⌘C) just before opening the dialog and then Paste that path in, you can type an address relative to the current folder.
                                                            1. 1

                                                              In macOS 10.14 Mojave’s Finder, you can put a single-tabbed browser window in spatial mode with View > Hide Toolbar (⌥⌘T). Spatial-mode windows look different: not only is the toolbar hidden, the sidebar is hidden and the status bar is moved to the top of the window. Opening a folder within a spatial window will open that folder as a new spatial window.

                                                              Hiding and re-showing the toolbar used to be easier in previous macOS versions – there was a “pill” button in the top right of each window that would toggle toolbar visibility. The removal of that button might suggest that Apple isn’t planning a resurgence of the Spatial Finder.

                                                              Some of the other features in this article have been added to Finder over the years. Finder now has Labels, back/forward buttons with history, Spotlight search that looks in metadata as well as the filename, and Smart Folders that contain saved searches. There are plenty of other features it doesn’t have, though, like Pop-up Folders, advanced bookmarks, an editable address bar, Finder Plug-Ins, or the ability to display custom file metadata in columns.

                                                              I looked at the latest version of Path Finder, a third-party file browser with many features Finder doesn’t have, and was surprised to see that it has no form of spatial browsing. It does, at least, have some other features described in this article that today’s Finder doesn’t have. Path Finder’s Drop Stack is a lot like the Shelf described on page 7, though Path Finder’s version is not unified with the clipboard. And like the idea of saving Finder Browser windows as files on that page, Path Finder supports saving browser window configurations with File > New Browser > Save Browser…, then opening a new window with that configuration.

                                                              1. 4

                                                                Yeah, AutoHotkey was great when I was using Windows.

                                                                On macOS, I have managed to set up equivalents to many of AutoHotkey’s features. Here are the programs I used to do it, and how I could use them to solve your use-cases:

                                                                AutoHotkey equivalent

                                                                The closest equivalent to AutoHotkey in general is Keyboard Maestro (currently $36), a proprietary app. In Keyboard Maestro, you define macros using a drag-and-drop scripting language. You can also embed shell scripts or AppleScript. Each macro can have a number of triggers, most commonly Hot Key triggers.

                                                                (Keyboard and) mouse shortcuts

                                                                Keyboard Maestro’s triggers can associate custom shortcuts with your macros. Most of my macros have Hot Key triggers, which capture to keyboard shortcuts. For example, Shift+Ctrl+S triggers a macro that puts my laptop screen to sleep.

                                                                However, to respond to a mouse input like Scroll Wheel Left, you would have to use a Device Key trigger. A Device Key trigger responds to a single device input, but sadly, it doesn’t block the input from being passed to the OS. In this example, whatever your cursor is over would scroll left in addition to the macro being activated.

                                                                To replicate the Send, {NumpadAdd} part of your script, you would add a Type a Keystroke block to your macro. One nice thing about KeyboardMaestro is it can record the keystroke, so you don’t have to remember names like “NumpadAdd”.

                                                                If you don’t want to buy Keyboard Maestro, macOS’s built-in Automator (free) can be used in some cases. For examples, compare these three solutions for working around bad default ⌘C behavior in Books: my simple Keyboard Maestro solution, someone’s straightforward Automator solution, and my shorter, situation-specific Automator solution.

                                                                Hotstrings for math

                                                                I used to use TextExpander (currently $40/year) for something like this. I had ddate mapped to the current date, and solang marked to a block of markup I used on Stack Overflow. TextExpander implements the direct equivalent to AutoHotkey hotstrings, and is probably the best way to implement short hotstrings like ;a.

                                                                However, for my purposes, I realized that I could insert pieces of text more simply by using another program I was already using: LaunchBar (currently $30). While its most obvious feature is launching applications, one of its many other features is inserting text snippets. You define text snippets by putting text files in a certain folder. Your defined snippets are then added to your global list of searcheable items, alongside applications you can open and so on.

                                                                To insert a snippet such as the current date using LaunchBar, I open a LaunchBar window with Command-Space, type date to find the “Current Date (ISO format)” snippet, and press Return to insert it.

                                                                Also note that macOS makes typing special characters easier in general. All macOS keyboard layouts let you access an alternate layer of characters by holding Option. For example, Option-8 types ‘•’. If you would rather Option-A typed ‘∀’ instead of ‘å’, you could set that up by defining a custom math-focused keyboard layout with Ukelele (free). I have used Ukelele to define my own keyboard layout “U.S. – Rory custom” that makes smart quotes and apostrophes (“”‘’) easier to type.

                                                                Markdown links

                                                                You could do this with Keyboard Maestro. It has actions for reading from and writing to the clipboard, and for appending to, prepending to, and searching and replacing in text variables.

                                                                Just a few days ago I implemented a Vim editor mapping to do a similar thing: turn the selected text into a link with the clipboard used as the URL. Of course, it only works in Vim. Here’s the source:

                                                                " create Markdown link from selected text using URL in clipboard
                                                                " uses vim-surround, so can’t be vnoremap
                                                                vmap <Leader>ml s]%a()<Esc>"*Pl
                                                                Fast Window Switching

                                                                I used to have something set up for this. I used Karabiner (formerly KeyRemap4MacBook) to map my fn key to the combination of Shift-Control-Option-Command. Then, with Keyboard Maestro, I mapped ⇧⌃⌥⌘F to open the Finder and so on. That let me type fn+F to switch directly to the Finder.

                                                                Karabiner was forced to be rewritten as Karabiner-Elements (free and open source) because of changes in macOS, and it lost some features in the process. I haven’t checked if mapping of fn is one of them. I don’t use Karabiner-Elements because I rarely used my fn mappings and my current model of laptop doesn’t have real function keys to remap.

                                                                As for window groups to switch within, Keyboard Maestro doesn’t have a built-in concept like that. I think you could implement it, though – “if” statements can check the app of the current window.

                                                                Remapping the calculator button

                                                                This would be a straightforward application of Keyboard Maestro.


                                                                Same as above.

                                                                That covers everything in your article as much as macOS software is capable of. You may also be interested in…

                                                                Features I use without equivalents in this article

                                                                Keyboard Maestro lets you define a Quick Macro – a sequence of keypresses and clicks. I can press Ctrl-F1 to start recording, execute a sequence, then press Ctrl-F1 to stop recording. After that, Option-F1 will run the sequence. I use this, for example, in my browser to scroll many adjacent newly-opened tabs down to the start of the content, by recording and replaying the sequence Ctrl-Tab, Down, Down, Down, etc.

                                                                Keyboard Maestro also supports image recognition for clicking on the screenshotted GUI element or waiting for something to appear on the screen. I’ve used this to make a macro that uses the System Preferences GUI to toggle a setting – it decides whether to move the selection up or down by recognizing the image of the currently-selected preference. I’ve also used it to abort a macro if I don’t see the expected window open after a certain step (which could happen if the GUI was in a certain state), to avoid executing further keypresses in the wrong window.

                                                                LaunchBar comes with a built-in clipboard history manager. I use this to copy, for example, both a title and URL in one window, knowing they will be saved. Then, after switching to another window, I use the clipboard history to paste both of them where they need to go.

                                                                1. 1

                                                                  Thank you for this! I basically use OS-X in anger (provided corporate fully “all sliders to the right” 16” Macbook Pro) but after a lot of work, have only gotten it to be – “painful” instead of “incredibly painful” compared to using my Linux rig.

                                                                  I soon will explore more of the tools you linked, a lot of tools to do what I used to be able to do with just autohotkey, but beggars and choosers.

                                                                1. 11

                                                                  I also love AutoHotKey. I feel it’s what the Windows Scripting Host should have been. It’s one of those languages, like Perl, that you can use to create anything from a simple one-line command to an advanced graphical application. For example, here is a graphical screen resolution manager I’ve built using only AutoHotKey.

                                                                  1. 4

                                                                    Direct link to that program’s source code, so you can see what advanced AutoHotkey code is like: drm.ahk v1.4.2

                                                                    1. 1

                                                                      I realized I forgot to mention one of the best things about AutoHotKey: the included documentation is phenomenal. For anyone wanting to get started, it’s available online here: https://www.autohotkey.com/docs/AutoHotkey.htm

                                                                    1. 2

                                                                      I hadn’t heard of lazygit before, a TUI you list as an inspiration. gitui doesn’t have the features I need yet, but it looks like lazygit, which is more mature, does. For example, lazygit handles a lot of interactive rebase cases more smoothly than either my main Git GUI Tower or git rebase. So thanks for the pointer.

                                                                      They are both awesome and inspired me but either I found them too slow/resource-hungry in some areas or too complicated to use and navigate in others. (maybe a little NIH-syndrome as well).

                                                                      Can you go into more detail about what problems lazygit has in the “too complicated to use and navigate” category? Have you planned how you will avoid those interface problems in gitui yet?

                                                                      1. 2

                                                                        Cool that lazygit works good for you.

                                                                        My vision for gitui is to make it a terminal tool, that is still as easy to learn as a regular GUI. Where I find most alternatives are embracing the ‘I am a terminal tool, expect to be confused by tons of shortcuts and a man page to learn them’-style. I want to have a clean UI that only offers the kind of shortcuts that are applicable in the current situation so that they always fit into a quick-bar on the bottom. simplicity and speed are my motivations. hope that makes any sense :)

                                                                        For me it was too much of a memory/cpu hog and too slow on big repos. As I am mostly on battery I cannot afford that. Opening lazygit in the linux repo, keeps 1 core busy permanently, fills up to 3 Gig of Ram when scrolling through the commits and grinds to a halt once it parsed all 900k commits.

                                                                      1. 7

                                                                        Love it. You should definitely checkout magit for some UI ideas. It’s superior to everything I’ve used in that sense, and I think anyone that has used it feel the same.

                                                                        1. 5

                                                                          Link for convenience: Magit, a Git porcelain inside Emacs

                                                                          1. 3

                                                                            Yup, I don’t really use Emacs these days for editing, but I have an mg alias in my shell which launches magit for many cases where just git is inconvenient (like, dozens of times per day).

                                                                            1. 2

                                                                              What use cases are that so that I can see what to implement next in gitui?

                                                                              1. 3
                                                                                • interactive rebasing
                                                                                • instant fixup (fixup commit and rebase folded into a single operation)
                                                                                • by hunk or by line staging
                                                                                • composing longer commit messages
                                                                                1. 2


                                                                                  • interactive rebase was on my list
                                                                                  • instant fixup I need to research what that is
                                                                                  • by hunk is supported, but by line not, need to figure out how to do that intuivly
                                                                                  • better support for longer commit messages I added: https://github.com/extrawurst/gitui/issues/46
                                                                                  1. 2

                                                                                    Oh, I’ve recalled one more thing which was hugely important when I was learning magit. It displays the actual git flags which are activated by each shortcut. You can see it on screenshot (shamelessly plugs his own tui rant) here.

                                                                                    1. 2

                                                                                      Really interesting but gitui is not using the git shell under the hood so I think that is not really a matching purpose I am afraid

                                                                            2. 1

                                                                              (Athor here) Looks definitely interesting, but I think I gotta try it because the documentation looks complicated on first glance. My focus is simplicity and something that does feel like a GUI even though it’s in the terminal.

                                                                              1. 5

                                                                                Definitely give it a shot. Specifically I recommend you try the interactive rebase which you mentioned. It makes it trivial. Everything is one key press away.

                                                                                I can say it’s probably my favorite piece of software I get to use.

                                                                                Either way nice work!