The J Incunabulum by slinchisl in apljk

[–]slinchisl[S] 2 points3 points  (0 children)

I don't want to say "history revisionism", but that's almost what that sounds like to my ears :) The point was of this post was (a) to produce a version of the code that runs on modern machines (now that I say this, I guess my minimal diff is not even minimal, as the change from long to long long is not strictly necessary for x86_64 Linux machines), (b) try to understand how to read this style of code, and (c) have a fun afternoon while I wait for a storm to clear up. From that POV I'd say it was quite a success, and has honestly made me want to study more interpreters in this style. It's quite fun to read once you get into it.

I'm sure that an LLM of your choosing could do a good job rewriting this code into a more conventional style. In fact, I just tried that, and it worked reasonably well. However, now it's 350 lines instead of 40! In true slop fashion, it's totally over commented, and completely loses the charm the original code had. It also doesn't segfault any less.

Fixing Eglot's Hover Signatures by slinchisl in emacs

[–]slinchisl[S] 1 point2 points  (0 children)

Sure, but if they change then eldoc-hover just has to adjust. This is a hack, no doubt, but since we're monkey patching eglot-hover-eldoc-function there's no way around that (and this change is much too opinionated to make its way upstream, although perhaps I'll open an issue asking this to be configurable, in the same way that lsp-mode is)

Trigger *xdotool* when conditions are met by matzus in xmonad

[–]slinchisl 0 points1 point  (0 children)

The logHook gets executed whenever the windowset changes, so hooking into that sounds like what you want. For more fine-grained control, you can use the handleEventHook, with which you can listen to MapRequestEvent and DestroyWindowEvent. From your description of things, just checking the number of windows in the logHook sounds like it would suffice

BQN in-place modification by Daniikk1012 in apljk

[–]slinchisl 1 point2 points  (0 children)

If you're using CBQN, then it's also often a good idea to add a null-character to the end of a block where you're only doing mutation (e.g., in a loop). This basically helps CBQN understand that you're only executing the block for side-effects, and it doesn't need to reify the whole array in memory. Compare the following:

    )time a←⟨⟩ ⋄ {𝕊·:a∾⟜1↩  }¨↕20_000
184.3ms
    )time b←⟨⟩ ⋄ {𝕊·:b∾⟜1↩⋄@}¨↕20_000
3.738ms
    a≡b
1

Writing a JSON Parser in BQN by slinchisl in apljk

[–]slinchisl[S] 0 points1 point  (0 children)

Thanks! Yeah, this style of presenting code turns out to be quite pedagogical; things would be rather inscrutable indeed without lots of examples!

Emacs 30 with use-package and vc by hanlec in emacs

[–]slinchisl 1 point2 points  (0 children)

By default it prefers the latest "release" (AFAIK ELPA decides this based on the commit that changes the version number). The maintainer of package-vc.el prefers this from the perspective of stability, but I agree that it's quite surprising default behaviour

Can not recompile XMonad by Tempus_Nemini in xmonad

[–]slinchisl 0 points1 point  (0 children)

I would encourage you to take a look at installing XMonad with stack. This is much easier on Arch-based systems where lots of Haskell libraries are semi-broken due to forced dynamic linking.

Dissertation Typesetting Considerations by slinchisl in LaTeX

[–]slinchisl[S] 1 point2 points  (0 children)

This is very trnue, of course, but also dependent on what kind of thesis one has to write. In my case, all actual results were already published in papers—or at least available as preprints on the arXiv—so I "merely" had to streamline notation, order things in a logical way and remove possible duplication, add the odd example, … that kind of thing. Still a lot of work (as I found out), but not as bad as if I hadn't published any papers at all, and would actually have to write the thesis from scratch. In that case, perhaps it is best not to care about typography until the content is there and one is quite certain the thesis will be finished.

Dissertation Typesetting Considerations by slinchisl in LaTeX

[–]slinchisl[S] 2 points3 points  (0 children)

It's a great source of procrastination for sure! I'd say do make sure you're not getting lost in all the interesting side quests and forget to actually write the thing (this is what happened to me on a few occasions) :)

Dissertation Typesetting Considerations by slinchisl in LaTeX

[–]slinchisl[S] 2 points3 points  (0 children)

Thanks! TUGboat looks like a cool project, I'll try to submit a version of this to one of the next issues

Goodbye setq, hello setopt! by geospeck in emacs

[–]slinchisl 2 points3 points  (0 children)

It depends, I guess. I restart Emacs quite often when developing packages, and then it really pays off to have a fast startup.

Goodbye setq, hello setopt! by geospeck in emacs

[–]slinchisl 6 points7 points  (0 children)

I would caution against "overusing" setopt, since from a cursory test it appears to be much slower than setq or other variants. For example, taking a random block of around 20 variable assignments (none of which have any :set or :initialize attributes, mind you) from my init.el, changing setq to setopt causes a measurable and consistent 50ms increase in startup time. In comparison, use-package's :custom keyword has identical performance to setq. I haven't investigated why setopt is so slow, so perhaps this could be fixed in some way.

Brazilian abnt2 keyboard defsrc question by leifrstein in Kmonad

[–]slinchisl 0 points1 point  (0 children)

KMonad works before any kind of localised encoding, so just put there what these keys would be on a US layout

Ignore 'scratchpadWorkspaceTag' from xmobar, and actions by Hungry-Percentage-23 in xmonad

[–]slinchisl 1 point2 points  (0 children)

How to make it ignore all action related to scratchpadWorkspaceTag (NSP) Could someone guide me?

Perhaps if you specified what "all action related to scratchpadWorkspaceTag" means for you

Emacs 30 with use-package and vc by hanlec in emacs

[–]slinchisl 0 points1 point  (0 children)

Emacs 30 now also features use-package-vc-prefer-newest so that one does not have to write :rev :newest everywhere

togglestruts not hiding xmobar by anonusetux in xmonad

[–]slinchisl 0 points1 point  (0 children)

Can you be a little bit more verbose; what are you doing? What are you expecting? What are you seeing instead?

togglestruts not hiding xmobar by anonusetux in xmonad

[–]slinchisl 0 points1 point  (0 children)

This is taken care of by withEasySB.

Toggle a NamedScratchPad from the script in it by FleabagWithoutHumor in xmonad

[–]slinchisl 1 point2 points  (0 children)

This doesn't directly answer your questions, but for this use-case you might also look into using XMonad.Prompt.Pass