1. 2

    Visiting family and pre-preparing various Christmas food. As my parents have gotten older we’ve learned it is easier to prep as much as possible about a month in advance, such as dough for sweets, or pre-cooked pierogis, and freeze it until the actual week of the holiday. They’ll find things to stress about in that week to fill the space, but at least one big chunk of is done.

    We tend to give out a lot of holiday food to friends and family. Baking a few dozen mini-loaves of zucchini bread, hand-filling 300 pierogis, and so on, requires a team effort for the whole weekend.

    1. 1

      I have been curious to try out pierogis! Any good recipes you can share (secret ones are totally fine 😅)

      1. 2

        The dough has simple ingredients, but an involved process. I’ll send a DM later today.

    1. 8

      Emacs is not really an editor either! I believe that Emacs is the ultimate editor building material.

      Some people put it in terms of “it’s basically a Lisp machine environment”, and they’re not wrong (albeit it’s not a particularly good Lisp machine, I guess :-P).

      I’ve been trying to get myself to use VS Code on and off for a few years now, as Emacs is not exactly thriving tech these days and I don’t suppose it’s going to get much better in the next fifteen years. Aside from muscle memory and weird UI choices (why in the world are we using three lines’ worth of screen estate to show the current file name and three icons!?), the fact that it doesn’t have the kind of introspection and interactivity Emacs has is what’s giving me the most headaches.

      I want to automate some tedious code generation, or generate some test data? That’s five lines of Emacs Lisp, bind them to a key (I can do all of that in the scratch buffer) and there we go. As far as I can tell, if I want to achieve the same thing with VS Code I pretty much have to create a custom extension, which I then have to package and install. That’s… quite an involved process for a one-off function.

      1. 10

        Emacs is a view of a better, alternate reality, where our computing environments were completely under our control. It makes a bunch of compromises to the world-as-it-exists, and has many hideous warts, because it’s old, but it’s the best computing environment widely available, by my metrics.

        1. 6

          I have never used emacs (ok, I “used” it for about a month, ~20 years ago, but I never got the hang of it), but I use acme (from Plan 9). While acme couldn’t be further from emacs in terms of UI, UX, and philosophy, they are both equally far from “regular” editors like vscode and whatever. Once you have used an environment like this, all the “regular” editors seem equally crippled to you, equally not interesting, and equally missing the point of what’s important. Their differences become trivial.

          1. 6

            I really like acme, too. By the time I got a chance to really play with Plan 9 I already knew Emacs and I was too far gone to the other side but I do wish Emacs played better with the outside world, the way acme does. For a while I actually tried to hack an acme-mode for Emacs that would allow Emacs to interact with the outside world the way acme does but it didn’t get too far. This was like ten years ago though, maybe things are better now.

            IMHO, while the differences in UI are tremendous, the difference in philosophy, for lack of a better term, is not as deep. Acme is obviously more “outward”-oriented, in line with its Unix heritage, whereas Emacs is far more “inward”-oriented, partly because it comes from a different world, partly because it sought to re-create much of that different world under a different environment. But Emacs’ “internal” environment, while operating in terms of different abstractions than those of Unix (files, processes, pipes) into which Acme so seamlessly plugs, is remarkably similar to Acme’s.

            For example, one of the things I like the most, and which I find myself using quite frequently, is an 8-line function that replaces an S-exp with its value. This allows me to write something like One hour from now it'll be (format-time-string "%H:%M" (seconds-to-time (time-add (current-time) 3600))) in a buffer, hit F12 at the end of the line, and get all the parentheses replaced with what they evaluate to, yielding One hour from now it'll be 01:10 in my buffer. This is basically Acme’s command execution, except it’s in terms of Emacs Lisp functions, not processes + some conventional commands like Cut, Snarf etc.. It’s… either more, or less powerful, depending on how much Emacs Lisp that does what you need you have around.

            (I know it’s a silly example, it’s just the easiest concrete one I could come up with on the spot. Over time I used it for all sorts of things – e.g. when testing a bytecode VM, I could write something like test_payload = (bytecode-assemble "mov r8, r12"), hit F12, and get test_payload = [0xDE, 0xAD, 0xBE, 0xEF] or whatever)

            But ultimately it still boils down to a text editor plus an environment from which to assemble a “text processing workbench”, except with different parts – Emacs has its own, Acme allows you to borrow them from the Unix environment. IMHO the latter approach is better. Lots of things, like real code completion and compiler integration support only landed in Emacs once it got reasonable support for borrowing tools from the outside.

            As for VS Code… ironically, the thing that keeps me away from it the most is that honestly it’s just not a very good text editor :-D. Not only could I live without Emacs Lisp, I’d be extremely happy without Emacs Lisp, the language that embodies the simplicity of Common Lisp, the stunning feature set of Scheme, and the notorious openness and flexibility of RMS in one unholy Lispgoblin whose only redeeming feature is that at least it’s not Vimscript. Most of the Emacs Lisp code I write is one-off code that gets thrown away within minutes and I could do without it, I don’t really use much of Emacs’ renowned flexibility (in fact, last time I tried to, I yelled at rustic for like half a day). But in order to get things that I now think are basic, like easy back-and-forth navigation between arbitrary positions in different files, a kill ring, a save register, easily splitting/unsplitting views, oh and if possible a user interface that doesn’t light up and blink like a Christmas tree, I need to install a few dozen extensions, and that doesn’t look like an editor that’ll hold up for fifteen years…

            1. 1

              Did you mean to say “the simplicity of Scheme and the stunning feature set of Common Lisp” instead?

              1. 4

                No, that was sarcasm :-D. Emacs Lisp has a bunch of interesting pitfalls (e.g. for the longest time it only had dynamic scoping) and is not a very straightforward Lisp, much like Common Lisp. However, it’s feature set is fairly limited, much like Scheme (albeit IMHO in poorer taste, I’d rather write Scheme most of the time). Hence the “simplicity” of Common Lisp and the “stunning feature set” of Scheme :-).

                1. 1

                  😂 Alright!!

              2. 1

                The inward/outward comparison is apt.

                I ended up in acme after 15+ years of emacs, partly out of curiosity after watching an rsc screencast and partly because I needed a break from my yearly cycle: juggle elisp packages to add features, tinker, tinker too much, declare configuration bankruptcy and repeat again.

                I’m old enough that being able to quickly reuse existing tools is more valuable than the satisfaction of reimplementing them or integrating them into an editor. I do use other editors occasionally, and they are shiny and feel cool and certainly better at some tasks. But I end up back in the pale yellow expanse of tag bars and columns, because there’s another tool I need to interact with and I know I can get it done with files and pipes.

                I sometimes think about how much time and effort goes in to editors and tooling integration, and wonder how we got to such a point.

                1. 1

                  The “outward” vs. “inward” distinction WRT Bell Labs/Unix/C and PARC/Lisp/Smalltalk is a fascinating one. Reminds me of Rob Pike’s experience report after visiting PARC: https://commandcenter.blogspot.com/2019/01/notes-from-1984-trip-to-xerox-parc.html.

              3. 4

                This mirrors my own experiences with VS Code. It’s great, but it simple doesn’t have Emacs’ flexibility. The things that VS Code have envisioned people doing are great and easy to do, but if you try to do things besides that, you’re out of luck. VS Code does do a lot of things really well, but I keep coming back to Emacs (these days, Spacemacs) at the end of the day.

                1. 1

                  That’s five lines of Emacs Lisp, bind them to a key (I can do all of that in the scratch buffer) and there we go.

                  I found this line particularly intriguing as a vim user. Given that I also have some interest in learning common Lisp, I may just have to give emacs a try.

                  1. 1

                    Is this not something you can do with vim? I’m not poking fun at it, I’m asking because it seems like a pretty small thing to change editors over. It may be far more useful to do this from the environment you already know.

                    I mean, I didn’t have some grand realization that Emacs is the best editor and thus attained eternal understanding of the Tao of text editors, it’s just that when I installed my first Linux distro, I installed it from one of those CDs that computer magazines came with and the CD was scratched or had sat too much in the sun or whatever, so it had a few corrupted packages that wouldn’t install. vim was one of them, emacs wasn’t, so I learned emacs (and for the longest time I didn’t really use it much – I still mostly used Windows for a couple of years, where I used UltraEdit). In 15+ years of seriously using Emacs, I don’t think I’ve ever used a feature my vim-using buddies frenemies couldn’t replicate, or vice-versa. Other than sane, non-modal editing, of course :-P.

                    1. 2

                      The reason I use vim is very similar to the reason you use emacs: it’s the first one we learned. In your case because your CD was damaged, in my case because my friend was using vim. There’s no harm in giving the other an honest try. I just don’t know when I’ll have the time.

                      1. 1

                        Oh. Well in that case, have fun with emacs! The tentacle fingers are gonna come in super handy once you grow them.

                        (They did tell you about the tentacle fingers right?)

                      2. 1

                        I installed it from one of those CDs that computer magazines came with and the CD was scratched or had sat too much in the sun or whatever, so it had a few corrupted packages that wouldn’t install. vim was one of them, emacs wasn’t

                        I love this.

                        It’s very similar to my Emacs origin story. I was a dvorak typist (still am!) when I was in university and I knew I had to pick between vim and emacs. I looked at vim and it was like “just use hjkl; they are right there on the home row so it’s easy to press” and I was like “no they’re not!” and realized by process of elimination I might as well use emacs instead.

                  1. 2
                    • Enjoying my birthday
                    • Drinking
                    • Working on a programming portfolio in case I decide to go for computer science
                    • Working on crust shell
                    1. 2

                      Happy Birthday!!🎂

                    1. 25

                      Thank GOD. With all due respect to the fine folks who work on it, Gnome is a tower of tech debt and I can’t wait to see what System76 produce.

                      I really feel for the small handful of devs who are paid by RH and Canonical to work on Gnome. Seeing Daniel Van Vugt’s commend at the end of this bug is a fine example of the staggering debt these folks are working against.

                      1. 19

                        I get where you’re coming from but a lot of that tech debt is in GTK & friends, and this is supposed to be based on gtk-rs, so it will carry over all that tech debt.

                        Case in point: it seems it would still use mutter, so it’s still going to suffer from the bug you linked to.

                        Also, gtk-rs is essentially a (very advanced) wrapper – some auto-generated, some manually implemented – over GTK that AFAIK is not actually developed by the GTK team, so it involves all the compatibility fun of working with GTK and obviously solves none of the problems System76 had with GTK in the past. It’s also the most mature GUI toolkit available for Rust, as someone else has pointed out here, but that’s a pretty low threshold to exceed. It still has a long way to go before it’s anything near stable.

                        I don’t want to say this is bad and it’s gonna be a waste of time – quite the contrary! First, at the end of the day, this is FOSS so whatever makes these guys happy is what’s important. Second, if anything, it will at the very least give gtk-rs a lot more real-world exposure and more testing, which the whole Rust world will definitely benefit from. And, indeed, as someone else pointed out, it’s really cool that we’d see a desktop developed primarily by a company with paying customers, for its paying customers, something we haven’t seen in the Linux world in a very long time and which, IMHO, has significantly contributed to the decline in functionality and stability, in spite of the growth of “polish”, whatever that is. So I think this is really good news, I’m just… moderating my expectations a bit :-).

                        1. 3

                          Case in point: it seems it would still use mutter, so it’s still going to suffer from the bug you linked to.

                          Boo :( So I guess my lovely System76 Thelio will continue running Windows 11 :)

                          (I’m trying to run Fedora 35 KDE spin as well but that’s got some rather sincere teething pain happening)

                        2. 4

                          Gnome already has a dependency on Rust via librsvg and GStreamer. gtk-rs is the most mature GUI toolkit available for Rust.

                          I wonder if Gnome could capitalize on this and fully embrace Rewrite-it-in-Rust with the help of System 76.

                          1. 5

                            That would be nice but I doubt it. Gnome has SOOOO much C code floating around.

                            I could maybe see them do something like “All new development in Rust” but I seriously, SERIOUSLY doubt it :)

                            1. 9

                              Gnome is a tower of babel application-wise; everything from C to Python to JS.

                              1. 8

                                And vala.

                                1. 1

                                  Hah! And nice seeing you here! 😊

                        1. 13

                          My daughter was born last Friday. I was fortunate enough to arrange three weeks parental leave where I work, and that’s naturally what am at this weekend too.

                          Interestingly enough I found dabbing into my pet projects in between the chores and the little one’s feeding is quite doable. It feels like permanent tiredness and slight sleep deprivation allows for easier focusing, somehow? Or perhaps it’s just less coffee throughout the day.

                          1. 5

                            Congrats

                            1. 2

                              Thanks!

                            2. 4

                              Congratulations :)

                              1. 2

                                Thank you!

                              2. 2

                                Congratulations! Glad you’re able to find time for tech as well.

                                1. 2

                                  Thanks! Was bit afraid that the rest of my personal life will be completely derailed but it’s going good.

                                2. 2

                                  Congrats and best of luck. 🎉 Mine are both teenagers but I still remember those early days.

                                  1. 1

                                    Thanks! Our older is 17 now, so our recollections are quite dim :)

                                1. 6

                                  To have a “complete” programming education, it’s good to learn a language from the important families, which are described as ur-languages here. Later on it becomes easy to switch between languages in the same family without much difficulty depending on the application.

                                  I have written a bit of OCaml, Common Lisp, Raku Clojure, and brief excursions in Prolog and K (recently BQN has become a notable new addition to the family).

                                  Some languages are multi paradigm like Common Lisp, Clojure and Raku which allow me to pick and choose the paradigm depending on the problem at hand.

                                  At some point would like to try out a stack-oriented language, but doesn’t seem like any of them are actively being used to build software, even though implementations are being created all the time.

                                    1. 1

                                      I honestly don’t understand btrfs. Oracle started it because of ZFS licensing issues, but Oracle owns ZFS now. They could just fix the ZFS licensing issue and have a much more mature system right away, but for some reason they don’t. Btrfs feels like mostly sunk cost at this point…

                                      1. 10

                                        From the third paragraph:

                                        Chris Mason is the founding developer of btrfs, which he began working on in 2007 while working at Oracle. This leads many people to believe that btrfs is an Oracle project—it is not. The project belonged to Mason, not to his employer, and it remains a community project unencumbered by corporate ownership to this day. In 2009, btrfs 1.0 was accepted into the mainline Linux kernel 2.6.29.

                                        1. 1

                                          That’s relevant and interesting, but while if Oracle spends no resources contributing to btrfs I guess that reduces the benefit to getting ZFS in Linux, I still wonder why they wouldn’t consider it a win for Oracle Linux users to be able to use ZFS…

                                          1. 1

                                            Does Oracle own zfs with 100% of the copyright assignment? If not, they may not be able to do it, even if they wanted since it would require getting agreement from every contributor.

                                            1. 4

                                              They own the version that came to them, but not what the community has done since then. They already got a small piece GPL’d for use in grub2

                                              1. 4

                                                While Oracle only holds copyright on ZFS, and not the contributions made to OpenZFS, CDDL section 4 provides a method for them to re license community contributions.

                                                1. Versions of the License.

                                                  4.1. New Versions. Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.

                                                  4.2. Effect of New Versions. You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.

                                                  4.3. Modified Versions. When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License.

                                                Via the acquisition of Sun, Oracle is the steward of the license. And therefore could publish a new version which all existing CDDL code would also be covered by (unless the original developer included a notice prohibiting using of future versions). So to make it GPL compatible, this potential CDDLv2 could include a secondary license clause like the MPLv2 does.

                                                1. 3

                                                  I was under the impression that people were resistant to ZFS due to some GPL vs BSD kinda ideological difference. I wasn’t aware of this, thanks for highlighting it.

                                                  The possibility that the entire OpenZFS effort could, in theory, be appropriated by this section of the CDDL is alarming, and now I have a better understanding why Linux/GPL folks are opposed to this license.

                                                  Does this mean that the stewards can take OpenZFS and re-license it as proprietary project, which is essentially a cease-and-desist to all ZFS users everywhere? Of course, in terms of community outrage and developer goodwill it will be a PR disaster, but if ever the winds of business change in a manner where this might not be the worst thing to do, all bets are off.

                                                  1. 8

                                                    Does this mean that the stewards can take OpenZFS and re-license it as proprietary project, which is essentially a cease-and-desist to all ZFS users everywhere?

                                                    No, anything out and available as CDDL v1 will continue to be available under v1. Section 4.2 covers continuing to use the original version it was published under.

                                                    4.2. Effect of New Versions. You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software.

                                                    Note this isn’t anything unusual, the GPL has a similar clause. See GPLv2 section 9 of its terms and conditions.

                                                    1. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

                                                    Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and “any later version”, you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

                                                    1. 6

                                                      Most of the license conflict isn’t some ideological difference, but a very practical difference. GPL-licensed code can only be used by software licensed under a GPL-compatible license, meaning roughly that it can only be used by software with a license that has the same or fewer restrictions than GPL. That means using GPL code from a MIT- or BSD-licensed project is no problem, but using GPL-licensed code from a project with a more restrictive license (or from proprietary software) is prohibited by the GPL.

                                                      The CDDL has extra restrictions on what you can do which makes it not GPL-compatible. That means ZFS isn’t allowed to use GPL’d code. Linux is under the GPL, and you can’t be a filesystem inside the Linux kernel without calling Linux functions. So ZFS can’t be integrated into Linux until either ZFS moves to a GPL-compatible license or Linux moves to a permissive license, neither of which is ever gonna happen.

                                                      If the challenge was only that some people who work on Linux had some ideological aversion to the CDDL I bet it’d have been integrated into the kernel a long time ago.

                                                      This is my understanding of the situation from reading stuff on the Internet. There may be inaccuracies. I’m not a lawyer. Also, different lawyers have different views on these things, Canonical’s lawyers for example think it’s okay to have CDDL-licensed code as a separate kernel module that’s loaded at runtime, and that the only problem is having GPL-licensed code in the statically linked kernel image itself.

                                                      My personal view of these things is that ZFS is a kinda cute proof of concept which is never going to be actually relevant due to its license, and that I hope BTRFS will eat its lunch. I think it’s sad that so many great open-source filesystem engineers are putting so much excellent work into a dead project.

                                                      1. 6

                                                        Except ZFS already works well and btrfs doesn’t give much hope of catching up this decade…

                                                        1. 3

                                                          That’s true. The most likely outcome is that neither ZFS nor Btrfs will be usable any time soon (or ever), Btrfs for technical reasons and ZFS for intentional licensing reasons. But I think working on the technical problems of Btrfs is more fruitful than sitting around and waiting for ZFS to suddenly not be under the CDDL.

                                                          1. 3

                                                            I would love to help fund a clean rooming of ZFS (need two implementations to make a standard anyway…) But I may be the only person interested in that.

                                                            1. 4

                                                              You wouldn’t be the only person interested but the amount of engineering effort required would be phenomenal. Sun spent a lot of time and money on it prior to release, and it’s had constant engineering effort on it in the decades since.

                                                            2. 2

                                                              The most likely outcome is that neither ZFS nor Btrfs will be usable any time soon (or ever),

                                                              Only if you restrict yourself to Linux. I’ve been a happy ZFS user on FreeBSD for over a decade now. It works out of the box, the installer can set up a ZFS pool, and the you can boot from a ZFS root filesystem.

                                          1. 3

                                            If Ripcord’s (alternative Slack+Discord client; shareware) Slack experience is as good as it’s Discord experience then it might be worth of shot for Linux users that have to use Slack but want a nice desktop experience.

                                            1. 4

                                              Been using Ripcord for a few months now. The only problem is that when people send me a Zoom link using the Slack integration, I can’t open them, so I quickly have to open Slack in the browser version. Thankfully I have to only do this once in a few weeks, so I just suck it up and do the workaround as the benefits of Ripcord still outweigh having to use Slack.

                                              Slacks recent “Huddle” feature is unsupported, so time will tell if Ripcord ends up supporting that.

                                              Multi-tabbed conversations, (and 700 MB less memory usage) in Slack is a game-changer. I hope more such software turns up.

                                              Perhaps someone writes a native GCal client someday? GCal is frustratingly slow on Firefox. Maybe it my fault for continuing to use Firefox on one of the flagship GSuite products hahaha…

                                            1. 1

                                              Skimming through the article, I get the sense that a career’s-worth of skill and knowledge went into performing that analysis.

                                              Now, in 2021, could someone let me know what books, articles and/or papers I can read as a cryptography beginner to be able to understand this article, say six months down the line.

                                              For example, what’s a Level 3 and a Level 1 hash? I need to learn the background which will help me understand concepts like that.

                                              1. 2

                                                “Hash Levels” is pretty non-standard terminology I think. The source is this: http://nohatcoder.dk/2019-05-19-1.html. It seems that some cryptographers dislike these categories– the reddit comments for this article have one complaining about the lack of rigor in the level descriptions.

                                                For learning cryptography, I really, really enjoyed reading Prof. Rosulek’s Joy Of Cryptography: https://web.engr.oregonstate.edu/~rosulekm/crypto/. I think it’s still a work in progress, though.

                                                1. 1

                                                  Wow, that looks great, and also links to other good resources. Bookmarked. Thank you!

                                              1. 11

                                                Switching to using Lua for Neovim seems like it’ll be really powerful. I’m just a little scared to make that final jump, because there’s way to really go back to Vim after doing this. I’ve already leveraged a bunch of Neovim-only stuff, but this is a lot more extreme.

                                                1. 7

                                                  The Lua support in Neovim is one of the things making me eager to look at it. Lua is a fantastic little language and there’s no reason to be stuck with something like vimscript in 2021.

                                                  1. 5

                                                    I looked a bit at lua, and a lot of stuff seemed much more verbose/awkward to me.

                                                    I kinda of like VimScript 😅 There are a few annoying parts (line continuations, ugh, and I still forget that stupid a: sometimes), but overall I find it works fairly well, especially since lambdas (already some time ago) and the method syntax (also some time ago, but never ported to Neovim) were added. It’s a fairly small language that fits its purpose reasonably well.

                                                    It’s perhaps a bit of an acquired taste though.

                                                    1. 4

                                                      Neovim is claiming that lua is much faster than VimScript. I’ve seen VimScript chug on files with just a few hundred lines, so I’m hoping I can convert my heavier functions to lua and get a speed boost.

                                                      1. 2

                                                        I can’t say I ever ran in to issues with this myself; most of the times I ran in to performance issues it’s because you do something like :%s/<something rather complex on a large file>/, but I’m not sure if Lua will really help with that? From what I can tell, most of the performance issues is when people implement stuff like fuzzy matching in VimScript and similar computation-heavy stuff.

                                                        The new VimScript9 is quite a bit faster (but still slower than LuaJIT), but I haven’t really looked at it.

                                                      2. 1

                                                        I kinda of like VimScript

                                                        Wow, this is the first time in twenty years I’ve heard anyone express an emotion about vimscript other than disgust.

                                                    2. 7

                                                      if you keep your dotfiles in source control (which I recommend if you aren’t already), you have nothing to lose. If you make the switch and decide later that it’s not for you, just revert back to the previous version of your config that uses vimscript.

                                                      1. 3

                                                        That only works until you customize further in lua.

                                                        1. 2

                                                          I’m not sure what you mean. Sure, you lose some further custom lua config (until you port it to vimscript), but you won’t end up worse off than you were before you switched if you have your config in source control.

                                                      2. 4

                                                        I have recently switched not only to Lua, but to Fennel as well and I am pretty happy with result. Now I need to port rest of my config from VimL to Fennel.

                                                        1. 2

                                                          Wow, that’s amazing! Did not know Fennel could be used like this.

                                                          1. 2

                                                            do you notice any delay from having to compile the fennel files to lua on every startup?

                                                            1. 4

                                                              Slight, but nothing annoying me. In the past I was trying to cut load time as much as possible, but now I stopped giving a damn. I haven’t tried precompilation though.

                                                            2. 1

                                                              If you’re using a lisp for your editor scripting.. At what point does evil/emacs becometthe saner choice, though?

                                                              1. 3

                                                                As soon as Evil will learn into all my favourite quirks of Vim. I have tested Emacs in the past and there was always some small nitpick that was missing and was irritating me. Now I get the best of two worlds.

                                                            3. 2

                                                              Is there a reason that’s a problem? Neovim is a fork of the vim codebase and migrating to it doesn’t seem all that different from upgrading vim and then using plugins that require the new version as their minimum version. Neovim is basically just vim that is making faster progress on cool new features than mainline vim is.

                                                              1. 5

                                                                Neovim 0.5 lets you write your vimrc as a lua script, which Vim8 can’t parse.

                                                                1. 2

                                                                  The big gotcha I hit with Neovim was that it uses a different format for undo files. I have this in my vimrc:

                                                                  set undodir=${XDG_CACHE_HOME}/vim/undo//
                                                                  set dir=${XDG_CACHE_HOME}/vim/swap//
                                                                  set backupdir=${XDG_CACHE_HOME}/vim/backup//
                                                                  set undofile
                                                                  set undolevels=1000
                                                                  set undoreload=10000
                                                                  

                                                                  This avoids cluttering my working directories with undo / backup / swap files and gives me effectively unlimited persistent undo, my favourite feature of vim. If I run neovim on a file that I’ve edited with vim, it complains. Similarly, if I edit with nvim and then vim, vim can’t read the undo file. I wish they’d change the name of files if they were going to have things for the same purpose as vim but with incompatible formats.

                                                                  1. 3

                                                                    I wish they’d change the name of files if they were going to have things for the same purpose as vim but with incompatible formats

                                                                    This can be achieved with something like

                                                                    if has('nvim')
                                                                      set undodir=${XDG_CACHE_HOME}/nvim/undo//
                                                                      ...
                                                                    else
                                                                      set undodir=${XDG_CACHE_HOME}/vim/undo//
                                                                      ...
                                                                    endif
                                                                    

                                                                    I believe the undofile format became incompatible only very recently, when more information was added to undofiles.

                                                                    1. 1

                                                                      That’s what I did, but it’s annoying that I have to.

                                                                      I was also quite excited by the built-in LSP support, but all of the tutorials I found required incredibly complex configs and didn’t explain how to configure the LSP integration for something like clangd for C/C++.

                                                                2. 1

                                                                  There are heaps of incompatibilities between Vim and Neovim, and have been for years.

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

                                                                3. 1

                                                                  What are some neovim features that you’ve really liked? I generally see the same things trotted out by fans, like treesitter and in-build LSP, but these aren’t things I’ve felt like I was missing in Vim (I do use LSP, plugins work well for this). I’d love to hear what benefits you have found, as an experienced Vim user?

                                                                  1. 6

                                                                    It’s a bit of a moving target, because a lot of neovim innovations are eventually implemented in vim. That’s what happened with floating windows, async jobs, and terminal emulation. So I guess the feature I really like is being a couple years ahead of everyone else :)

                                                                    There’s also a few smaller things: I really like inccommand, which I don’t think has been ported over yet. And I just found out I can use the lua bindings to do this:

                                                                    local nav_keys = {'h', 'j', 'k', 'l'}
                                                                    for _, key in ipairs(nav_keys) do
                                                                      local c_key = '<c-'..key..'>'
                                                                      vim.api.nvim_set_keymap('n', c_key, '<c-w>'..key, opts)
                                                                      vim.api.nvim_set_keymap('t', c_key, [[<c-\><c-n><c-w>]]..key, opts)
                                                                    end
                                                                    

                                                                    I expect that as I get more comfortable with lua and the neovim API I’ll have more say. I write a lot of custom functions and vimL is one of the worst languages I’ve ever used.

                                                                    EDIT ooh something I just realized I can do:

                                                                    local set_all = function(list)
                                                                    for _, item in pairs(list) do
                                                                      vim.o[item] = true
                                                                    end
                                                                    end
                                                                    
                                                                    set_all {"termguicolors", "hidden", "splitright"}
                                                                    set_all {"number", "relativenumber"}
                                                                    

                                                                    That’ll make it easy to create setting groups.

                                                                    1. 2

                                                                      No, no inccommand in Vim still. I was quite keen on this for a while until I discovered traces.vim which is a lot more powerful.

                                                                      Yeah vimL has its quirks. The actual examples you’ve shown would look pretty similar in vimscript though … although they would use :execute, e.g. exe 'nnoremap' c_key '<c-w>..key. I’ve come to quite like vimL but I realise that puts me pretty firmly in the minority. I hate the line continuations but those are going away in vim9script.

                                                                      It does look like configs will diverge now, to the lua neovim scripts and the Vim vim9script scripts. Which I suppose is good, trying to support 2 diverging editors with a single code-base is annoying, as each add different features.

                                                                      1. 1

                                                                        You can map stuff in loops in regular VimScript:

                                                                        for k in ['h', 'j', 'k', 'l']
                                                                            exe printf('nnoremap <C-%s> <C-w>%s', k, k)
                                                                            exe printf('tnoremap <C-%s> <Cmd>wincmd %s<CR>', k, k)
                                                                        endfor
                                                                        

                                                                        For a somewhat creative use of this you can see this ;-)

                                                                        I guess the issue is that a lot of people just can’t be bothered to invest in learning VimScript, which is fair enough. But pretty much anything you can do in Lua you can do in VimScript, and vice versa.

                                                                        1. 1

                                                                          I guess the issue is that a lot of people just can’t be bothered to invest in learning VimScript, which is fair enough. But pretty much anything you can do in Lua you can do in VimScript, and vice versa.

                                                                          Also, there’s more third party Lua libraries. A while back I needed to fill an autocomplete based on information in a YAML file, but couldn’t figure out how to parse YAML in VimScript. I ended up writing a python script to first convert the file to JSON, then use json_decode. It worked in that case but would have been nicer to just import a library and read the YAML directly.

                                                                          1. 2

                                                                            I think this - the availability of the Lua library ecosystem - is probably a “bigger deal”, looking forward, than the performance/tooling/ergonomics benefits Lua brings over VimScript. I haven’t seen too much adoption of Luarocks packages in plugins yet (though there are some examples, e.g. https://github.com/camspiers/snap), but I expect this to change now that 0.5 is stable.

                                                                            I will also say that, while anything* you can do in Lua you can do in VimScript, I personally find it much easier to do most things in Lua - partially due to familiarity, but also due to the simplicity of the language and the relative lack of footguns, compared to VimScript.

                                                                            *In Neovim specifically, Lua provides access to luv, which I’m not sure you can access from VimScript. In my experience, having the libuv event loop and utility functions readily at hand makes it possible to write functionality which would be at least substantially more painful without these tools.

                                                                            1. 2

                                                                              I haven’t seen too much adoption of Luarocks packages in plugins yet, but I expect this to change now that 0.5 is stable.

                                                                              Why do you expect this to change with 0.5? It’s been possible to write Lua plugins since 0.3, with luv becoming available in 0.4. I don’t see anything (besides the hype, maybe? :^) ) in 0.5 that would change the attitude of plugin authors towards Luarocks.

                                                                              1. 1

                                                                                It’s true that we’ve had the ability to write Lua plugins for a while now, but there’s been a huge increase in the use of Lua during the later part of the 0.5 development cycle (the past year or so). This, to me, indicates that we may have passed an inflection point in the ease of using Lua for plugin development that will contribute to more people writing Lua plugins, and (potentially) more people using functionality from Luarocks libraries for those plugins (though I admit this also assumes that people need and know about the libraries available through Luarocks).

                                                                                The hype is another factor, at least at first. And - noting that this runs dangerously close to self-promotion - I think that tools like packer.nvim‘s Luarocks integration (which you can use even if you don’t use packer for plugin management) significantly lower the complexity cost of using Luarocks packages, while also requiring features from 0.5.

                                                                                1. 2

                                                                                  I see. In my opinion there’s a fundamental issue with the with dependencies where as a plugin author you don’t want to rely on external dependencies (otherwise you’re inevitably going to end up with people opening issues after misconfiguring the dependencies for your plugin…) but vendoring is fairly unattractive too (messes up version control history, you have to manually update everything…). This issue was already there with Vimscript and I don’t think it can be solved by anything else than Vim/Neovim implementing a full-featured plugin manager (which I don’t think it should do).

                                                                                  1. 1

                                                                                    Yeah, that’s definitely true too. I think this is easier with Luarocks because it already supports some basic versioning specification, so you can control what versions of dependencies your users get without needing to vendor. I definitely agree that there shouldn’t be a full-featured plugin manager baked into Vim/Neovim, though - people’s preferences and needs around plugin management are too disparate for there to be a good “one size fits all” option, in my opinion.

                                                                                    1. 2

                                                                                      I think this is easier with Luarocks because it already supports some basic versioning specification

                                                                                      My point was that the package manager that downloads from luarocks itself becomes a dependency, which you want to avoid. So luarocks doesn’t really make things easier there :)

                                                                            2. 1

                                                                              One way would be to use Python:

                                                                              :pyx import yaml, vim; vim.vars['x'] = yaml.safe_load('{"hello": [1, 2]}')
                                                                              

                                                                              Or Ruby, Racket, Lua, Tcl, Perl, or even Visual Basic. It’s nice that Vim can interface with all that, but the big problem with that is that a lot of people don’t have the scripting support, and if you want things to work on Linux (all distros), macOS, and Windows is nigh-impossible. In reality It’s all pretty useless if as can never use it and have it work for everyone (the reason I didn’t try :lua is because my Vim isn’t compiled with it, and also, because I don’t really know Lua).

                                                                              Generally Vim tries to minimize required dependencies, which isn’t a bad thing. The Lua interpreter is pretty small so it could be integrated like libvterm or xdiff instead of linking toliblua. But I guess it’s too late for that now :-/

                                                                    1. 1

                                                                      Thanks to one and all who have made this an enjoyable community to be a part of!

                                                                      1. 10

                                                                        I used mutt/neomutt for years, then aerc for about a year before giving up on it.

                                                                        I now use bower, which is the best notmuch frontend I’ve used so far (for someone who doesn’t emacs). Vim integration is easy, and it can render HTML mails with an external app (e.g. w3m), and the gnupg integration is very good.

                                                                        1. 5

                                                                          Wow, an actual useful program written in Mercury. That’s very interesting!

                                                                          1. 2

                                                                            Prince is probably the best known program written in Mercury.

                                                                          2. 2

                                                                            then aerc for about a year before giving up on it.

                                                                            What made you give up on it?

                                                                            1. 1

                                                                              More or less in order of importance for me:

                                                                              • Performance is pretty bad. I’d find that often aerc was using ~10% CPU utilization when idle and on a non-active sway workspace. On my x230 laptop @ 1440p (external display), scrolling text email bodies was REALLY slow (like 1-3s to move down a line). After spending some time profiling it I learned that it’s because it has an embedded terminal that uses CGO (which is very inefficient… a lot of CPU cycles were spent moving data between C and Go…) The way the UI is drawn seems horrifyingly complicated.

                                                                              • I couldn’t get gpg stuff to work at all with the notmuch backend. It was somewhat ironic that I couldn’t read mails in aerc that sr.ht encrypted for me :P… Also, having to provide aerc a copy of your private keys outside of ~/.gnupg is suuuper sketch.

                                                                              • Still fairly buggy. Sometimes if you scroll too fast in a large maildir then nothing loads, or it would crash without no obvious way to reproduce the crash to debug. It has come a long way since its first few months though.

                                                                          1. 5

                                                                            Pipes was an interesting attempt at a next-gen Series. The main weakness of Series is that it’s based on a pile of macros that try to recognize common patterns and fuse them, but that means that seemingly minor changes can take your code outside of the space of patterns it recognizes. This is because isn’t designed and documented as a proper embedded DSL, but instead tries to give the illusion that it supports arbitrary Common Lisp code… up until the point that you use something it doesn’t know about. Alas, Pipes never really got beyond an initial prototype.

                                                                            I believe the current state of the art is the work described in Oleg Kiselyov et al., “Stream Fusion, to Completeness”, published at POPL 2017. https://arxiv.org/abs/1612.06668. That approach comes with example implementations in OCaml and Scala: https://strymonas.github.io/

                                                                            1. 2

                                                                              Wow, that Stream Fusion paper looks interesting! Thanks for sharing.

                                                                              How does this compare this with Clojure’s reducers/transducers? If we want to implement this in an arbitrary language, say Raku, what would be needed? Some kind of templating/macro system?

                                                                              I understand Rust’s iterators support some form of stream fusion. Not sure if that’s similar to what’s described in the paper.

                                                                            1. 2
                                                                              Work
                                                                              • Need to write some code to catch up on a slowish week. It’s been fun setting up lsp-java in Emacs, and learning how to use that.
                                                                              • Always felt that clocking in and clocking out while working was an excessive micro-optimisation, but after hearing of many people tracking their time diligently (I’ve known of the John Carmack story for a while now in which he’d pause his CD player every time he felt he was slacking off and measure his productivity at the end of the day by the size of the stack of CDs he’s listened to). If it’s working for much better programmers, I felt that it couldn’t hurt to try it. Integrating org-clock-{in}/{out} into my workflow.
                                                                              Not Work
                                                                              • Managed to get native comp Emacs (i.e. master branch) built on my work laptop using https://github.com/jimeh/build-emacs-for-macos which worked beautifully. Now, I need to do the same with my OpenBSD desktop. Turns out this is full of rabbit holes. I need to build libgccjit which is not in the ports. Cloned GCC and tried building it, but was getting errors which I need to figure out. (also needed to build a port of gmp which forced me to learn how to use CVS (now I know why we all use git) to check out the 6.9 ports tree)
                                                                                • If I’m being very honest, OpenBSD is making some things (to be fair, things that I wanna do, rather than the things it is good for) more difficult that I would prefer. e.g. I can’t build Electron which I need for SSB things like Patchwork, and Oasis which both don’t build due to library issues. Arch (one of my previous OSes) seems mainstream in comparison. :-D
                                                                              • As a new user of Tree Style Tab in Firefox, so now, I get a rush when closing a tree of 6-10 tabs which keeps the number of open tabs down. Integrating this into my workflows.
                                                                              • Should start doing some push-ups and cardio again. We’ve had a strict curfew here in Pune, India which is just getting relaxed.
                                                                              1. 2

                                                                                Managed to get native comp Emacs (i.e. master branch) built on my work laptop using https://github.com/jimeh/build-emacs-for-macos

                                                                                Emacs plus makes it really simple too https://xenodium.com/emacs-plus-with-native-comp

                                                                                We’ve had a strict curfew here in Pune

                                                                                Aww. I loved my time in Pune. I hope you’re all ok. Spent a few months working there. Many wonderful memories. Randomly: Trishundha temple, Bakarwadi, Vaishali, Solkadhi, Sinhagad, Vithaldas Narayandas, Fergusson College, jeera soda, misal pav, I could go on…

                                                                                1. 1

                                                                                  Hey @xenodium, nice to meet you! I recently stumbled upon your website, will read it in detail. Yes, I know a few of those words. :-D I’ve climbed Singhad thrice so far, and love bakarwadi.

                                                                                  Unfortunately, there’s no easy way to install libgccjit. I’ll have to build it from source on OpenBSD. Native comp Emacs is working fine on my work machine, but I’m trying to get it working on my desktop at home as well. Based on the number of OpenBSD posts that have helped me set things up, I feel I should start posting my notes whenever I figure out how to do something useful, just like you have.

                                                                                  1. 2

                                                                                    Hey @xenodium, nice to meet you

                                                                                    Likewise @samebchase!

                                                                                    I’ve climbed Singhad thrice so far, and love bakarwadi.

                                                                                    Wonderful. Climbed once. Not exactly nearby, but Ajanta and Ellora were amazing too. I’ve bought some bakarwadi in London, but it’s just not the same as Pune’s. Oh and barfi too :)

                                                                                    I’ll have to build it from source on OpenBSD

                                                                                    Ah yeah. Emacs plus worked well on macOS for me.

                                                                              1. 3

                                                                                Something I really want is a UI (probably browser-based) that will let you type languages like pikchr on the left and render it on the right automatically.

                                                                                I would use it for graphviz also, etc.

                                                                                Does this already exist?

                                                                                I wrote something sort of like this (motivated by R plotting) several years ago, but there are a bunch of things about it that aren’t great: https://github.com/andychu/webpipe

                                                                                It uses inotify-tools connected to a “hanging GET” to auto-refresh on save.

                                                                                1. 2
                                                                                  1. 1

                                                                                    Yes that’s the right idea! I think the button can replaced with a keyboard shortcut easily.

                                                                                    I would like something that generalizes to any tool, maybe with some kind of CGI interface. It looks like this is in Java, and I suspect https://pikchr.org/home/pikchrshow is in Tcl since it’s from Dr. Hipp. I probably would hack on the Tcl version first, although Python or PHP would also work.

                                                                                  2. 1

                                                                                    Pikchr has an inbuilt side-by-side sandbox functionality which makes the editing experience a lot easier.

                                                                                    1. 1

                                                                                      Ah OK I see this, it’s pretty close to what I want. I would like to enter a shell command and use it for any such tool! It can probably be hacked up for that purpose

                                                                                      https://pikchr.org/home/pikchrshow

                                                                                  1. -1

                                                                                    Goes to show how a little bit of technical skills can save you a lot of $COIN by letting you know when you are getting ripped off.

                                                                                    1. 1

                                                                                      Goes to show how a little bit of technical skills can save you a lot of $COIN by letting you know when you are getting ripped off.

                                                                                      1. 4

                                                                                        This is a good proposal. There are more than enough Raku posts to warrant a separate tag.

                                                                                        Just like Clojure is a Lisp and has its own tag, Raku is a Perl (family language), but not Perl (5) IYKWIM.

                                                                                        1. 1

                                                                                          How is FreeBSD’s Linux emulation these days? Is anyone running Linux-based Docker/OCI containers on FreeBSD in production (without running Linux itself through virtualization)?

                                                                                          1. 4

                                                                                            It’s improved a lot in 13. It doesn’t support seccomp-bpf though, so you can’t run the Linux container management programs. It’s probably good enough to run a lot of Linux containers in jails, but the orchestration code isn’t there yet.

                                                                                            1. 3

                                                                                              Stupid not a FreeBSD user question: Why would you do that? Aren’t jails the moral equivalent? Or would one want to run Docker for simple software distribution convenience purposes?

                                                                                              1. 4

                                                                                                Docker / OCI containers in common use conflate a bunch of things:

                                                                                                • A way of distributing a self-contained userspace thing.
                                                                                                • A way of building a self-contained userspace thing using layers of filesystem overlay.
                                                                                                • A way of orchestrating local deployment of self-contained userspace things.
                                                                                                • A way of isolating self-contained userspace things.

                                                                                                Jails provide the fourth of these (in a significantly lower-overhead way than the horrible mess of cgroups and seccomp-bpf on Linux), but they don’t provide any of the other bits. Between ZFS and jails, FreeBSD has great mechanisms for running container-like things, but doesn’t yet have good tooling for building and deploying them.

                                                                                                The containerd port and runj program linked by @kwait are likely to end up with the right things here. That should make it possible to build layers, package them up and deploy them on FreeBSD. The bit that isn’t currently getting any investment is making runj able to deploy containers that are packaged as Linux binaries running on the FreeBSD Linux ABI layer.

                                                                                                1. 2

                                                                                                  There is also Bastille, which looks pretty nice. IIUC it builds on FreeBSD jails and takes care of the distribution and deployment aspect (your first point).

                                                                                                  1. 2

                                                                                                    in a significantly lower-overhead way than the horrible mess of cgroups and seccomp-bpf on Linux

                                                                                                    As I understand it, the main Linux facility for this kind of isolation is namespaces. I’m not sure how seccomp-bpf found its way into container tools, but presumably “for extra security”.

                                                                                                    Namespaces should have the same kind of overhead (basically none) as jails. The main difference is that namespace API is additive (you tell it “isolate PIDs” then “isolate the networking” and so on, building the sandbox piece by piece) while the jails API is subtractive (you kinda just start with a package deal of full isolation, but you can opt out of some parts – set the FS root to /, or the networking to the host stack). Namespaces are more flexible, but much harder to use securely.

                                                                                                  2. 3

                                                                                                    It would be nice to be able to run the FreeBSD kernel, to have ZFS without entering a licensing gray area if nothing else, while being able to take advantage of both all the software available for Linux and the accumulated tooling and practices around Docker (especially when it comes to building container images). Since a Docker image is basically a JSON manifest and a bunch of tarballs, maybe it wouldn’t be too hard to write a tool that could fetch and unpack a Docker image and run it in a FreeBSD jail.

                                                                                                      1. 2

                                                                                                        That is really, really rad. I need this in my life.

                                                                                                        1. 4

                                                                                                          runj is my project! It’s nice to see other folks excited about it. There’s some previous discussion here. No Linux support yet; I’m focusing on a FreeBSD userland first.

                                                                                                      2. 3

                                                                                                        Given that zfs is now deployed on millions of Ubuntu installs around the world I’m not sure how much weight I’d place on said gray area.

                                                                                                        YMMV however.

                                                                                                        1. 2

                                                                                                          I just never understood this. The CDDL is not compatible with the GPL, and this prevents ZFS being part of the same code, though it can be installed as an external module, and from what I understand ZFS on Linux works fine.

                                                                                                          What’s the legal grey area here? How is this different from installing an MIT (or any other GPL-incompatible) licensed project on your Ubuntu machine?

                                                                                                          1. 5

                                                                                                            As I understand it (I am not a lawyer, this is not legal advice), the issue comes from a bunch of different things:

                                                                                                            First, the GPL says that any software derived from GPL’d software must impose the conditions of the GPL on the combined work and may not impose any additional conditions. This is usually paraphrased as saying that it must be GPL’d, but that’s not actually the case. It’s fine to ship a BSD-licensed file as part of a GPL’d project. The GPL also talks about ‘mere aggregation’. Just distributing two programs on the same medium is explicitly excluded from the GPL, but linking them may trigger the license terms.

                                                                                                            Second, there’s a bit of a grey area about exactly what the GPL applies to in Linux. Linux is distributed under GPLv2, but the source tree includes a note written by Linus (which is not part of the license and not written as a legal document) that the GPL obviously doesn’t apply across the system call boundary. Some internal kernel symbols are also expose as public non-GPL-propagating symbols but that is not actually part of the license. To make this more fun, some bits of code in the kernel were released as GPL’d code elsewhere and then added to the Linux kernel and so it’s possible for the copyright holders of this code to assert that they don’t believe that these exemptions apply to their code. This is somewhat moot for ZFS because uses GPL-tainted kernel symbols.

                                                                                                            Third, the GPL is a distribution license. This means that there are only two things that it can prevent you from doing:

                                                                                                            • Distributing a GPL’d project
                                                                                                            • Distributing something that is a derived work of a GPL’d project.

                                                                                                            Typically, the work-around that companies such as nVidia use is to write a driver that is developed completely independently of the Linux kernel and is therefore not a derived work of the Linux kernel, then write a shim layer that is a derived work of the Linux kernel and is able to load their non-GPL’d driver. They cannot distribute the two together (because the GPL would kick in and prevent distribution of a thing where the combined work does not grant all of the permissions found in the GPL), but they can distribute their own code (they own it) and the shim (by itself, it is GPL compliant). A customer can then acquire both and link them together: the GPL is explicitly not a user license, once you have received the code you are free to use it in any way, including linking it with things where you are not permitted to release the result).

                                                                                                            So using ZFS on Linux is fine, the tricky bit is how you distribute the the CDDL’d component and the Linux kernel together.

                                                                                                            My general view of Linux legal questions is that the vast majority of users are doing something that could be regarded as a violation of the license but no one with standing to sue has any incentive to torpedo the ecosystem.

                                                                                                            1. 1

                                                                                                              Thanks for the detailed answer. This clears it up. 🙏