Threads for bronzehedwick

  1. 2

    I’m a little worried about someone talking about aligning code when they chose to full-justify their blog.

    I am less worried about how editors interpret tabs for indentation, since I believe that people who hate how an editor does that will change the behavior or change editors.

    1. 6

      Meh, in a single-column layout like that the lines are wide enough that full justification is fine IMHO, Butterick says basically “it’s an individual aesthetic choice” on that page you linked to.

      I do worry about tabs/indents, because of reading or editing other people’s code. If they use spaces I’m stuck with their indentation preference, and some people think 2-space or 8-space indents are OK (they’re wrong.) If they use tabs I see the indentation I prefer, but any spacing within the line, like marginal comments, gets badly messed up. And lines that have extra indentation to match something on the previous line, like an open-paren, come out wrong.

      This elastic system seems like a nice idea for within-line spacing. Maybe it can be combined with a syntax-driven rule that generates the leading indentation automatically when the file is opened; then the editor can just ignore leading whitespace. (Except in indent-sensitive languages like Nim and Python, obvs.)

      1. 3

        The problem is that one often has to work with others, and they have different preferences.

        By separating the semantics of the code (indented blocks, columns of code/comments) from the presentation of the code (amount of whitespace added), you provide the option for each reader to see a presentation that is most pleasing to parse without forcing a everyone to align their editor settings.

        1. 3

          The most recent versions of clang-format finally support my preferred style: tabs for indentation, spaces for alignment. Each line starts with one tab for each indent level. If you have whitespace beyond that (or anywhere other than the start of a line) then it is spaces. This means that the comment in the motivating example in this article looks correct for any tab width, and even with tabs not set to a uniform, but consistent, value (for example, in C++, it would be great if my editor could use a single 2-space tabstop inside a namespace but 4-space tabstops everywhere else, including the second tabulator in a line inside a namespace). This doesn’t need the editor to do anything special and works fine even with cat.

        2. 2

          I’m a little worried about someone talking about aligning code when they chose to full-justify their blog.

          Any links I can read about justification concern?

            1. 4

              To piggyback off this – I consider Butterick’s Practical Typography a must read. I’ve learned a ton and improved my written communication thanks to his guidelines.

            2. 3

              HTML/CSS has few, if any affordances for hyphenation, so setting text to be fully justified runs the risk of getting huge gaps in some lines if there’s a long word that can’t be hyphenated correctly.

              It’s not a dealbreaker for most but it can look a bit unprofessional if you’re unlucky.

              1. 5

                CSS has the hyphens property, which gives coarse control over hyphenation, set to auto (aka, use hyphens) by default.

                1. 3

                  It’s also simple to make it gracefully degrade to left-aligned text in browsers that don’t support hyphens, via @supports (hyphens: auto). In the modern browser world, I see no valid reason not to enable justification for browsers that support it, at least not for websites with significant amounts of text.

          1. 3

            Please run a spellcheck on the content. There’s a few words that look like many cosmic rays got them :-)

            I was looking in the archive for the reason for the change and found this: https://www.feoh.org/posts/i-love-you-pelican-but-im-struggling.html

            Also, the result on Firefox mobile is not great. It’s like some sizing / padding / centring CSS is missing: https://postimg.cc/30hX7Nrm

            1. 4

              Thanks for the reports all.

              I’d installed “Code Spell Checker” on VSCode but it hadn’t enabled. What an embarrassing spelling horror show :) Fixed.

              I also dropped back to the default Nikola theme. I liked the ‘soft’ aesthetic of the one I’d picked, but looking awful on mobile is a non starter in so many ways.

              This theme looks pretty good on my iPhone!

              Thanks again for all the feedback. Super appreciate it.

              1. 2

                I can confirm that the current theme looks good in Firefox for Android. I do see two remaining spelling errors:

                • In “sme of the marketing”, “sme” should be “some”.
                • Whenever the language is mentioned, “Javascript” should be “JavaScript”.
                1. 1

                  Fixed. An important distinction. Thanks for the report.

              2. 2

                I’m seeing the same css issues in iOS safari.

              1. 2

                I use orgmode-nvim, which I find works surprisingly well.

                1. 1

                  I’m surprised no one forked PHP and cleaned it up. You can’t beat PHP for web pages.

                  1. 7

                    That happened! https://hacklang.org/

                    It seems like it’s mainly used at Facebook though …

                    1. 4

                      PHP is bad for webpages because it’s not a suitable HTML templating language and it uses file based routing. A suitable templating language is safe by default. Even the cool new PHP things all end up using some other safer language for templating. File based routing can be okay if it’s smart routing, like there’s some parsing of route info, a la Next.js, but PHP file based routing is dumb URL → page and you need to use Apache or whatever to make the routing acceptable. I guess someone could fork PHP to fix those issues, but that would just be Laravel, no?

                      What PHP has going for it is that it is very easy to get something to production quickly. This is a very important quality, perhaps even the most important for many uses. Still, for most new users today my recommendation is to just make a static site and host it on Netlify so you can collect form inputs or use Airtable for forms.

                      1. 2

                        it’s not a suitable HTML templating language

                        In light of laravel and symfony I don’t think that is true at all.

                        1. 3

                          Laravel has Blade, which is a superset of PHP because PHP is not a suitable templating language.

                          Symphony has https://github.com/symfony/templating which I guess is closer to pure PHP, but it sucks because you have to manually escape things.

                          1. 4

                            FYI the templating URL you’re linking to is Symfony’s templating language framework, not something intended to be used as-is. The actual templating language symfony and Drupal use is Twig, which is escaped by default.

                            1. 1

                              Thanks. I thought it was a mustache-like but Duck Duck Go failed me.

                            2. 2

                              And laravel is totally fine for me, it’s not like people started inventing Mustache, jinja and frameworks like Vue,React etc out of fun.

                          2. 1

                            it uses file based routing

                            Most serious projects use PHP frameworks that do not use file-based routing, it’s there at the lower level but that’s not really part of your development experience. You define routes very similar to the way you would in e.g. popular JavaScript frameworks.

                            1. 1

                              and you need to use Apache or whatever to make the routing acceptable.

                              That’s what I said.

                              1. 1

                                I guess I’m not understanding your point on how PHP’s native routing makes it bad for web pages. I’m guessing I disagree with you on something here but I’m not even sure what that is :) File-based routing is fine for very simple sites, and if you’re doing something more complex you have a framework that gives you more power. Isn’t this exactly the same as HTML+JS? Web servers use file-based routing too (unless you’re doing something fancy with JS) so it’s not really a weakness of PHP, that’s just how the web works.

                                1. 1

                                  No, you want to separate routes from controllers in any kind of practical system. It doesn’t have to be a regex (although those are nice to have), but eg it should be easy to do /page/:id. In PHP, to do that, you have to leave PHP, go to your web server, configure that to send pages to index.php but include the original URL as a query parameter or something, go back to PHP and add code to unpack the information from the router, then do the actual routing. None of that is impossible, but it’s not the easy path, and the easy path should include /page/:id because that’s a minimum for a dynamic web server. If you only need static routing, just use a static site generator.

                                  1. 1

                                    you want to separate routes from controllers in any kind of practical system

                                    I agree with you, and there is a case here that PHP could have some native routing support that would make the framework implementations of this simpler. But I would still say, the process you describe doesn’t really matter as a PHP dev because all of that is invisible and handled for you by any popular framework (routes and controllers are decoupled). Stuff like /page/:id I’m pretty sure I’ve been able to manage just through mod_rewrite e.g. /foo/id/3 gets matched to foo.php?id=3 – although forgive me if PHP did require something to make that work and I just forgot, I haven’t needed to set that up in a long time.

                                    1. 1

                                      Go back to the beginning:

                                      I’m surprised no one forked PHP and cleaned it up. You can’t beat PHP for web pages.

                                      The idea of this comment, as I understand it, is not “the PHP ecosystem is good” or “there are strong PHP frameworks”. It’s “PHP the language is really nice and convenient for making a dynamic website, and if someone could just go back and fix all the weird naming issues with the standard library, it would be perfect.” I disagree with that. My disagreement isn’t that good frameworks can’t be written in PHP. Laravel is very cool! It’s that the core language and standard library, even if you went back and fixed the inconsistent naming stuff, aren’t good enough to make a dynamic website for two reasons: 1. the templating is unsafe and you need Twig or something to fix it and 2. you need non-file based routing, or at least dynamic file routing, and to do that in PHP, you need to coordinate some hand off with your webserver.

                                      1. 1

                                        I think I understand the point better, thank you for clarifying.

                                        To that I would still say though, “good” must at some point be relative. Every language (that I’m aware of anyway) when used for the web, is primarily used with a framework. At least for any non-trivial project, which is arguably the use case that matters the most.

                                        By the standard and reasoning I’m taking away from this criticism, there are /no/ languages that are good at dynamic websites because if they were, none of them would need frameworks. Express.js and Django exist because JavaScript and Python aren’t perfect for web apps out of the box. In that sense this criticism of PHP seems tautological.

                                        1. 1

                                          Go’s standard library has an adequate templating library and router. It’s very common to use it without a “framework” although you will probably end up using some kind of third party packages for things like databases and sessions. I don’t think it’s unreasonable to think that “a cleaned up PHP” would come with a decent router and templating language.

                          3. 2

                            How so? Most web frameworks have a templated language that is the same form as PHP (erb, etc).

                            1. 1

                              Hm, what most web frameworks have server modules for Apache or nginx like php modules?

                            2. 1

                              It would be cool if someone forked it to a very small binary with a very aggressive strip. With things like auto loading or even OOP support removed. Something that could be used to build quick and dirty web interfaces. Perhaps even in microcontrolers.

                              The template capabilities are still, IMO, the easiest to use of any template engine out there. Because they just use the language constructs the programmer already knows.

                            1. 4

                              I think the date on the first page of the PDF is misleading - it may have been generated in 1997 but I believe the document is originally from Seventh Edition Unix, which dates from 1979.

                              1. 1

                                That would make sense. I can’t imagine the document being written solely about ed in 1997 :p

                              1. 17

                                gq to format selected paragraphs.

                                1. 4

                                  Tangentially, gq has a “dumber” counterpart gw, the difference between them being gw uses vim’s own formatting program but gq can be customized to use a user-specified one. So that will let us use different formatters for different filetypes etc. which is nice.

                                  1. 2

                                    You can also choose an external command to use by setting formatprg. I use par, which has terrible documentation but works great.

                                    gw will do the same as gq, but always uses vim’s internal format engine, instead of whatever formatprg is set to.

                                  1. 6

                                    gf to navigate to the file under the cursor. Is very flexible in it’s configuration, and can be set per filetype. I find it really useful to navigate to includes.

                                    1. 2

                                      I like org mode syntax a lot. I use an orgmode plugin for neovim, so I generally support the idea of bringing the syntax outside of emacs.

                                      However, my main gripe with org syntax is not addressed here, and I think it’s a real obstacle to wider adoption.

                                      The problem: it’s really hard to type literal characters instead of invoking their formatting.

                                      For example, this/that results in everything after the slash to be italic, and x * y makes everything after the star bold. The solution (in emacs) is to insert a zero width character as an escape.

                                      This is unreasonably difficult to expect users to do on a regular basis, and is actually something that markdown’s permissive formatting mostly addresses.

                                      While the author specifically deries markdown for this syntax style as inconsistent, I would love to see Orgdown take more from it’s second namesake in this regard.

                                      1. 1

                                        FWIW, it’s been a while since your examples would trigger org mode formatting. I vaguely remember having such issues a decade ago, but nothing in recent memory. In relatively current Org Mode (9.4 on my machine), neither of this/that or x * y trigger formatting.

                                        The current formatting rules are such that spaces are explicitly forbidden as inner-border characters, and only a small subset of characters is allowed on either side of the would-be emphasis. Meaning that foo *bar* baz makes bar bold, but foo * bar* baz does not; x/y/z does not italicize y, etc. It behaves as one would expect - about the only exception I encounter in practice is that /foo/bar/baz/ will render as italicized foo/bar/baz (but if you’re typing in folder paths or sed expressions, you want to wrap them in = or ~ verbatim/code markers anyway).

                                        (If you’re interested in details, check out org-emphasis-regexp-components variable and associated docstring.)

                                        I think the current behavior is pretty sane, and enshrining it in a standard like the author wants would help alleviate concerns like this.

                                        1. 2

                                          This is really good to know, thanks for taking the time to reply! I’m not using the native Emacs implementation, it’s

                                          1. Good to know this has been addressed there for a while
                                          2. Supports your point that standardizing will help external implementations, like the one I’m using
                                      1. 3

                                        I still use gvim for pasting things in scratch files quite a bit. Is there a recommended GUI for neovim these days? I tried one a few months ago, but it was barely usable

                                        1. 7

                                          I don’t know if recommended but I’m enjoying neovide quite a bit, for being basically console nvim with small improvements that don’t try to make it into something else.

                                          1. 4

                                            I use vimr for this same scenario. I haven’t had any issues.

                                            1. 2

                                              vimr++

                                              I’ll add that the main developer is very helpful even in the face of very out-of-the-ordinary problems.

                                              1. 1

                                                I also use vimr as a daily driver and have been happy with it. I’ve also used neovim-qt in the past and that was very solid.

                                            1. 6

                                              Any idea why one should switch to Lua for their config?

                                              1. 11

                                                As far as I know, the reasons are any/all of:

                                                1. LuaJit runs much faster than vimscript (vimscript is entirely unoptimized, although not sure how much of a difference this will make in relatively small amounts of code like a config).
                                                2. Lua is a full programming language, which could have utility for more complex configurations.
                                                3. You prefer Lua syntax to vimscript.
                                                1. 8
                                                  1. Lua is a mainstream programming language with lots of great tooling, libraries, etc. that continues to improve at a great pace.

                                                  A big part for me was the frustration of learning vimscript while knowing that I will never use this knowledge and code anywhere else. Now when I mess with my nvim configs or writing a new plugin, I’m also practicing my lua which I can use in other projects. :)

                                                  1. 1

                                                    Yeah good point. I do know (some) vimscript but have converted (most) of my configs to lua specifically to learn lua.

                                                2. 5

                                                  I would switch in a heartbeat to Lua for my configs in all software I use instead of the usual JSON, YAML, TOML.

                                                  Why? Because it allows me to script and abstract things I might want. For the cases I don’t want to abstract anything, I can simply use Lua table notation instead of JSON and serve basically the same purpose.

                                                  It also allows software to move from configuration files to initialization files. The change might seem subtle, but with initialization files, you don’t need to outsmart your user and provide all the features they might ever want or need as you do with dumb configuration files. Instead, you can provide a flexible API and let them build initialization files to serve their unique personal needs.

                                                  1. 3

                                                    In https://changelog.com/podcast/457 TJ (neovim maintainer) says don’t switch to lua just for the sake of it. Search for “to write your entire configuration”.

                                                    I took a snippet of mine that I thought was confusing (to me) in vimscript and ported it over. It didn’t take too long and I had to learn the vim apis to invoke lua etc which was new to me.

                                                    1. 2

                                                      This strikes me as accurate. I was able to get most of my existing init.vim ported to lua, with a couple of small bits not working correctly (or at least me not knowing how to make them work correctly yet). As I mentioned in my above comment, I could leave those small pices in vim.cmd([[ ... ]]) blocks in init.lua and have them work the same as they did before, which is fine by me. This podcast was recorded in August 2021, and I’m looking forward to further improvements in the configuration APIs from the neovim contributors.

                                                      My own motivation for switching was some mix of wanting to try out this new Lua-in-Neovim thing I’d been hearing about, partially wanting to move to some fancy new post-Neovim-0.5 plugins that all had configuration documentation in Lua, and partially wanting to break up my lengthy init.vim into several smaller files. I don’t actually know if it’s impossible to do that in Vimscript, but it was certainly straightforward in Lua.

                                                    2. 2

                                                      Lua is simple and logical, vimscript seems to be the opposite of that.

                                                    1. 1

                                                      This looks really great. It doesn’t look like it from my investigations, but does Plain Org support WebDAV? I wasn’t able to connect to a webdav server in the Files iOS app, and the docs don’t mention it.

                                                      1. 3

                                                        Plain Org doesn’t do anything special for any particular syncing provider. Instead, it relies on other apps to plug into iOS’s file syncing infrastructure.

                                                        Here’s a list of providers/apps that are known to work https://plainorg.com/#cloud-providers and how to enable them https://support.apple.com/en-gb/HT206481#thirdparty

                                                        If you know of another app that can handle WebDAV syncing and you can see the synced files in the Files app, Plain Org would also have access to them. I’d love to hear of other apps that play well here, so I can update the table.

                                                        1. 1

                                                          A user reported https://apps.apple.com/gb/app/it-hit-webdav-client/id1330133661 worked for WebDAV, could you check if it works against your server? If you know of any other WebDAV app for iOS, please report back.

                                                          1. 1

                                                            Oh wow, that works perfectly, thanks! Jumping on Plain Org :)

                                                        1. 5

                                                          I use neomutt. I pretty much ignore any HTML-only email.

                                                          1. 4

                                                            Another vote for neomutt here. I’ve been using one mutt or another for two decades now. It’s second nature.

                                                            1. 2

                                                              Yet another neomutt user here. I use mbsync/msmtp for sync and sending, and mu for filtering.

                                                            1. 4

                                                              sorry if the question is naïve,

                                                              but does Neovim or any other lsp-enabled modern vi-inspired editor provide Emacs key binding ?

                                                              reason I am asking is because I am not a ‘elisp’ user and do not extend or configure emacs that much – but emacs key bindings is the only thing I know.

                                                              For my ‘quick shell tasks’ I use joe (that has the jmacs command that enables emacs keybinding) – so I was thinking that may vi-inspired editors can do the same.

                                                              1. 8

                                                                Learning vi keybindings pays off in multiples. There are so many applications (especially in terminal) that default to vi binds that you will often be pleasantly surprised how things “just work” if you try them.

                                                                1. 2

                                                                  i’m not convinced that this is a good argument as to the benefit of vi binds. there are advantages to vi binds. that other things use them by default doesn’t seem up there at all.

                                                                  you can get *some* emacs-style bindings in vim, i know because i’ve tried. but emacs or an emacs clone works better for that, and vim works better for vimmish modal editing.

                                                                  1. 8

                                                                    Having a ‘standard’ keybinding across multiple applications out of the box is quite useful.

                                                                    1. 2

                                                                      sure. but saying it pays off in multiples to learn a confusing keybinding system purely for that reason seems like a cyclic argument.

                                                                      the original commenter wants to make neovim work like emacs. i agree that they are better off learning the vi binds if they want to use a vi-family editor. i think that there are much better justifications for doing that then “other tui applications are likely to support them”.

                                                                      1. 1

                                                                        I live in the terminal and I’m struggling to think of many examples of other apps that use vi bindings. Meanwhile I also use neovim nearly all the time and I, like most regular vim users, change the (historic but awkward) default bindings. And I use Emacs-style shortcuts in the line editor.

                                                                        1. 3

                                                                          like most regular vim users

                                                                          Wait really? Aye you saying most vim users don’t use hjkl to navigate? Or are you referring to something else?

                                                                          1. 5

                                                                            To be honest, I suspect there’s a surprising amount of Vim users that use arrow keys. I’m one, and it’s not like I’m hunt-and-peck, only use arrow keys. I use them in addition to motions, because I could never develop the muscle memory for hjkl. It just doesn’t feel right to me, and the last thing I want to do is get used to it and start spraying hjkl into every non-vi editor I see.

                                                                            1. 3

                                                                              I did develop the muscle memory at one point, and regretted it. I think hjkl is the most obsolete part of vim, they’re some good keys being taken up with commands that don’t need to be used that often, if you’re using vim effectively.

                                                                              1. 2

                                                                                As someone using a 60% keyboard without cursor keys I have found rebinding the default cursor mappings to hjkl to work rather well since these keys are much more convenient to reach than where cursor keys usually are. So maybe one doesn’t need hjkl in vim but the mapping is surprisingly useful outside of it.

                                                                                (I also accidentally discovered these vim bindings in Evince by forgetting to use modifier keys and just spamming j/k into the PDF reader)

                                                                                1. 1

                                                                                  You should be able to rebind them to your preference, though I don’t know if external scripts would break.

                                                                                  I always disliked moving my hand to the cursors, and now that I’ve been on a Kinesis Advantage since forever - whose cursors are crazy awkward - I would hate to have to use them.

                                                                                  Also someone said he /she uses hjkl on Dvorak!

                                                                                  Definitely YMMV based on the keyboard and its layout as well. FWIW I do kinda suck at using anything without a Vi mode anyway, beyond just the navigation.

                                                                                  1. 2

                                                                                    I do you use hjkl on Dvorak. Not as much in Neovim, because I don’t need these motions, but in firefox (Vimium C), in evince, in tmux (remapped). It works just fine. Of course they are not next to each other (except awkwardly placed jk), but I don’t think about it and it works fine anyway.

                                                                              2. 1

                                                                                I don’t know whether most regular vim users use hjkl in particular (I don’t. It could be interesting to survey vim users on questions like this!), but I was talking more generally. I think it’s very common to either remap Esc or bind something else to leave Insert mode, since reaching for Esc is widely thought to be awkward. I’ve also seen many example vimrcs that map ; (or something else) to : to avoid having to shift for it. I think it’s common to remap the leader too.

                                                                                1. 2

                                                                                  Yeah I remap Esc to caps lock.

                                                                                  But I do use hjkl to navigate (in lieu of arrow keys anyway, when I’m not using other types of motions). That’s the part that I was surprised by. Not in a bad way or anything. Just one of those things where I thought basically every Vim user used hjkl. But I guess it’s just anecdotal.

                                                                                  1. 1

                                                                                    I also use hjkl to navigate, and I would remap Esc if I didn’t remap my keyboard to making pressing Esc easier.

                                                                              3. 2

                                                                                quite a few programs have vi binds - cmus, ranger, either mutt or newsboat, but i don’t think both. i’m not a vim user anymore so i couldn’t comment on how modern regular vim users work, but i do see little benefit to not changing any of the keybindings.

                                                                                theres often the “what if im on a server without my dots?” argument, i guess.

                                                                      2. 6

                                                                        Kinda sorta not really. Neovim (and Vim) are built from the ground up in the vi-style modal paradigm, and they aren’t a fully configurable environment like Emacs where you could swap out the whole concept of modes for something else (aka, Emacs-style modes/bindings). The closest you can get is rebinding keymaps in insert mode to be closer to Emacs, like Tim Pope’s readline plugin does.

                                                                        1. 1

                                                                          Thank you. I will look into this.

                                                                          I prefer to code without touching a mouse. As my shoulder and neck hurt (I switch hands for the mouse, periodically as I am used to operate it ambidextrously, but it still hurts after a month – when I do 7-8K lines per month, or lots of debugging).

                                                                          Which is why I prefer Emacs. Big problems with Emacs however for me are as follows:

                                                                          a) JS type validation using FB Flow across all of my mono repo subprojects - does not work

                                                                          b) Gradle based projects (Android apps and my Java backends) – do not work

                                                                          c) Java refactoring capabilities are not in the same league to Android Studio / IntelliJ

                                                                          So I thought VI-based ecosystem might be more developed in those areas. At the moment I just use Emacs key bindings in VS Code (for JS/Flow) and intelliJ (Java/Android) – but i seem to be grabbing mouse there too often.

                                                                          When I work my Ansible side of things (Yaml configs) – I use emacs almost exclusively and in a Terminal window (even though I can run a GUI session, I prefer just a terminal or a login console).

                                                                          1. 1

                                                                            What a great name for that plugin! https://en.wikipedia.org/wiki/Repetitive_strain_injury

                                                                            1. 1

                                                                              I love vim-rsi! @lollipopman also made a similar thing for bash, in case you share terminals with people (pairing, debugging, etc). and can’t stand emacs mode and they can’t stand vim mode: https://github.com/lollipopman/bash-rsi

                                                                            2. 2

                                                                              Not that I know of, but Emacs has LSP plug-ins so if LSP is what you’re after and you’re comfortable using Emacs I see no reason to switch.

                                                                            1. 1

                                                                              Very cool.

                                                                              An improvement to consider: print media usually delineates paragraphs after the first with an indent. This effect can be achieved site-wide with this CSS:

                                                                              p + p {
                                                                                text-indent: 2ch;
                                                                              }
                                                                              

                                                                              Great work!

                                                                              1. 2

                                                                                This looks really interesting, but as far as I can tell the only option for installation on macOS is by installing the nix package manager, which I’m not sure I want to spring for, especially given limitations of installing nix on modern macOSs.

                                                                                1. 2

                                                                                  macOS Nix install is possible though a little involved (instructions here).

                                                                                  Docker is another option:

                                                                                  mkdir ~/notes
                                                                                  echo "hello world" > ~/notes/hello.md 
                                                                                  cd ~/notes
                                                                                  docker run --rm -t -i -p 8080:8080 -v $(pwd):/notes sridca/neuron neuron rib -ws 0.0.0.0:8080
                                                                                  
                                                                                  1. 1

                                                                                    Right, it is possible, but is quite involved, and I don’t want to run a whole Docker container for something lightweight like notes. Would you consider publishing the package on homebrew?

                                                                                1. 1

                                                                                  Do any common editors not have this functionality?

                                                                                  1. 19

                                                                                    ed, the standard editor, does not include this functionality.

                                                                                    1. 9

                                                                                      Many don’t. And frankly speaking, while you’re reaching for the mouse to open a bunch of menus sequentially then scroll, I am already looking at the relevant diff bit without even moving my eyes from the relevant area on my screen, let alone my hands from the keyboard.

                                                                                      Point and click UIs can be great for discoverability, but they fall short when it comes to maximize productivity.

                                                                                      1. 3

                                                                                        You’re putting words in the parent poster’s mouth, which comes across either as condescending, or at best assumes bad faith, and is hard to address. They don’t mention a workflow with menus or using the mouse, so why did you argument against that?

                                                                                        And, you say “fall short when it comes to productivity” as if it is a fact when of course it’s not (or cough up som empirical research, thank you).

                                                                                        Finally, I personally haven’t used any tools without diffing builtin and the most common ones I use daily, emacs’ magit and IDEA (the conflict resolution part, using ‘structural’ (? editable, at least) diffing) are both very usable/fast/your arguments here, without needing to use the mouse.

                                                                                      2. 7

                                                                                        I don’t see your point? What’s wrong with having it as a dedicated tool?

                                                                                        1. 2

                                                                                          I’m surprised anyone wants or needs this as a stand-alone tool

                                                                                          1. 21

                                                                                            I don’t even know how to respond to this.

                                                                                            1. 16

                                                                                              I think it’s just lack of imagination. For example, I told git to use it. Works nicely.

                                                                                              1. 4

                                                                                                I do the same :)

                                                                                              2. 4

                                                                                                diff is essential part of my workflow. I use it as a way to double check that I agree with everything before a git commit.

                                                                                                1. 4

                                                                                                  I believe that GP meant something along the line “this diff tool is built-in editors like PyCharm or Visual Studio Code, why use this standalone tool?”

                                                                                                  I don’t know whether I’m becoming 27 y.o. old man, but the new cool kids on the block don’t use Vim and/or Emacs any more. In my professional experience, most think that vim is just a tool to edit files on a Linux server. These old editors (“old”, kakoune is 5 years old) are now considered a relic from the past.

                                                                                                  1. 5

                                                                                                    I know what you’re trying to say, but Emacs and Vim have both had built in diffing tools for decades. It’s not a feature modern IDEs invented.

                                                                                          1. 3

                                                                                            I agree with the post that there is a hard problem at the heart of Webmentions, as much as I like the idea. I do include them on my site via webmentions.io, and do render them statically, but only fetch the data every time my (static) site is rebuilt. There’s also a lot to handle in terms of rendering and tweaking to make it compatible with various services, and my implementation is far from perfect. Given how much it increases build times, I’m thinking of removing webmention support for now :(

                                                                                            1. 1

                                                                                              This bit around compiling and rendering sounds specific to the problems with using static sites. If it’s done completely remotely, to the level that something like Disqus or Commento could handle it, it’d just handle a fraction of what Webmentions are capable of. This, of course, requires time and effort to build. And since there isn’t a huge VC company backing such a notion, we won’t see it anytime soon.

                                                                                              (originally posted at https://v2.jacky.wtf/post/cc7c38d9-4688-4384-806c-8c1bd3cb0a3c)

                                                                                              1. 1

                                                                                                Yeah, absolutely agree, the issue I’m describing is probably more related to static sites than webmentions themselves. Point well taken,

                                                                                            1. 3

                                                                                              I really like this, and can see myself using this in some form.

                                                                                              One feature that’s missing here that would push it over the line to “killer app” for me, would be the ability to share data as well as applications. That way, you could sync your tasks from a todo app from your laptop to your phone, for example.

                                                                                              Anyway, thanks for sharing!

                                                                                              1. 3

                                                                                                You could probably get jlongster’s CRDT implementation running in here.

                                                                                                1. 4

                                                                                                  schism would probably be a better options since it’s also in ClojureScript :)

                                                                                                  1. 2

                                                                                                    Oh very cool I’ll check these out. Thanks!

                                                                                              1. 1

                                                                                                Here’s mine: https://www.chrisdeluca.me/

                                                                                                I write about technical things, creative/writing projects, and other nonsense.

                                                                                                1. 2

                                                                                                  The length of the text can be whatever, it can also be randomised between a set of choices, since it doesn’t matter here. They are simply turning garbage into “normal” text with hidden garbage.

                                                                                                  The article does state this as a limitation of the method: that you need a lot more “host” text than the length you are encoding. In the example given, this method can encode 255 characters into the bill of rights.

                                                                                                  Still, pretty cool.