• 15 Posts
  • 38 Comments
Joined 1 year ago
cake
Cake day: June 16th, 2023

help-circle
  • Common Lisp “solves” most language-level problems by providing metaprogramming capabilities via lisp-style macros. (Almost) any language feature you would want can be implemented with lisp macros, and many such features already have been. So you don’t have to worry whether or not lisp has “for i in…” loops, or pattern matching, or generics, or virtually anything else, because if it doesn’t, you can write it! Plus if it’s really a good feature somebody has probably already made a library for it (if it’s not already part of the standard).

    One of the most extensive examples of this is Coalton, which is an ML-style statically typed EDSL for Common Lisp.

    There are metaprogramming features in a few other languages: template haskell, C pre-processors, even macros in Rust or Julia. But these all fall very short of lisp-style macros because those languages are not (truly) homoiconic, which makes the macros awkward to write and integrate into the language. This kind of metaprogramming is rarely employed, and when it is only for heavy duty tasks, and even then is generally discouraged as a last resort/special circumstance. But lisp macros are very easy to write because it’s the same as writing any other piece of lisp code. This results in macros being used often for smaller lightweight abstractions in the same way you write a small function.

    The other big pro of lisp is image based development. But that’s not so much solving a problem in other languages as it is simply a feature that they don’t (and pretty much can’t) have.

    And all of this is done in a language with less syntactic and semantic primitives than almost any other language, including the other “simple” ones like Python, Ruby, Elixir, etc.











  • mrh@mander.xyzOPtoLinux@lemmy.mlGuix on the Framework 13 (AMD)
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    edit-2
    9 months ago

    Yes GNU Guix is a linux distro.

    The package manager for Guix (also called guix) is also a portable package manager which works on any linux distro, similar to flatpak, nix, homebrew, etc.

    Guix’s claim to fame is that it is a functional distro/package manager, meaning that all changes are atomic, so installing/upgrading/deleting packages never leaves your system in a broken state.

    Not only that, but if you make some change to your system and it breaks for normal reasons (e.g. newest software version has a bug), you can roll back to your previous system state with all your previous packages and their versions, and this roll-back operation is also atomic.

    Guix the distro not only let’s you do package management this way, but also let’s you do declarative system configuration. This means rather than manually rummaging around /etc changing files and hoping nothing breaks, there’s simply a single config file which declares all of your system configuration. From your kernel to users, partitions, system services, and just about anything else, all the configuration is declaratively done in one place with one language (Guile Scheme). Any changes you make to your system this way are also of course atomic and can be rolled back.

    It even comes with a built in system called guix home which lets you bring that same level of declarative, atomic configuration to your user’s home environment, letting you manage user level packages, dotfiles, env variables, and more with a single home configuration file.

    There are other goodies too, such as the ability to spawn one-off shell environments with the guix shell command, dropping you in a shell with all the packages and env variables you declare, keeping your regular user environment clean (very nice for development).

    There’s even more, but at this point if you’re still interested just head over to the site and the docs.





  • If I understand you correctly, this is trivial in emacs:

    (defun insert-text ()
      (interactive)
      (insert "your text here"))
    
    (global-set-key your-keybind-here #'insert-text)
    

    You could make it a format string if it relies on data specific to some file or parameter. You could also make the keybind local to certain modes/files rather than a global keybind if you don’t want to pollute your keybind space.





  • I think I said something a bit stronger than what I meant. I’m not averse to sharing my thoughts on posts, I’ve just never held it against a post if the OP happens to not provide some comment containing their thoughts on it.

    I do see what you’re saying about not knowing what something is, and not wanting to spend ~1 hour on it to find out. Though I still don’t think that’s what downvoting is for (unless you have positive evidence that it’s spam).

    Mainly I disagree with “I’ll downvote it to make room for the posts that are definitely good”. That’s just very much not my philosophy and not one I ever took to be a majority view. Downvoting for me means the content is not good/appropriate/whatever. It’s a sign of negativity, and being not definitely good != being bad.


  • mrh@mander.xyzOPtoGames@sh.itjust.worksLies of P Critique (Joseph Anderson)
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    edit-2
    11 months ago

    I appreciate you being the 1/8 to actually state their reason!

    Everything seemed pretty self-explanatory to me in a community like this since:

    1. Videogame critiques on youtube are quite popular (and have been for years)
    2. Joseph Anderson is one of the most popular video game critics. His (second!) Fallout 4 critique has 10+ million views
    3. Lies of P is a very popular game which came out this year, and souls-likes in general are very popular games which people love to talk about

    Also I wholehartedly disagree with downvoting something as spam when you have no idea what it is. And why do you need me to tell you what “we’re” doing here? It’s not for me to say whether this is a thread for roasting the game or praising it or anything else. I’m not sure I could even think of a more clear, straightforward title (and it’s simply the video title).

    I also don’t feel it’s my obligation to share my thoughts on something I post. As OP I prefer for people to think for themselves and form their own opinion about the content.