Skip Navigation

Posts
79
Comments
103
Joined
3 yr. ago

GNU/Lisp Enthusiast!

  • The problem isn’t so much the side effect as it is the ability to introduce side effects arbitrarily with no warning to someone using your functions

    Yes, I try to allude to this in the "caution" and "tldr2" sections, but I think I could have been more clear. You are right that for many people it's not so much about avoiding side effects as it is about coming up with ways to use them carefully. Stateful monads and clojure's atoms/refs were in fact what I had in mind. And debating the pros/cons of these techniques is indeed a good conversation on its own! What I mostly wanted to get across is that fp is not about programming without side effects. All the good debate is about the extent to which we should try to avoid side effects, and what techniques we should use when doing so.

    I think it’s also really important to call out the concept of total functions

    Yeah I think this is totally (heh) worth talking about, and a much better topic than pure functions. I only didn't mention it because I don't see it brought up too often.

  • why

  • I use guix on all of my machines, personal and servers, and have my own guix channel. I'd be happy to answer any questions I can (note that I'm not a maintainer, though I have contributed a few packages).

    On top of the official documentation, check out the cookbook.

    Also look at David Wilson's aka SystemCrafter's website's guides to guix, as well as his youtube playlist on guix and his dotfiles.

    You can also take a look at my dotfiles and guix channel.

    Finally if you wanna chat or ask questions, come to the IRC #guix on libera.chat.

    Happy hacking!

    P.S. About your specific question regarding mixing package versions, look at channel inferiors and guix time-machine.

  • Metal @lemmy.world

    Yob - Adrift In The Ocean (Live)

  • Metal @lemmy.world

    Atlantean Kodex - Sol Invictus

  • Metal @lemmy.world

    Jex Thoth - When the Raven Calls

  • Metal @lemmy.world

    Borboropsis - Echoed Winds of Corporeal Derangement

  • Metal @lemmy.world

    Green Lung - Woodland Rites

  • Metal @lemmy.world

    Hellripper - Warlocks Grim & Weathered Hags

  • Metal @lemmy.world

    Friends of Hell - God Damned you to Hell

  • Deleted

    ...

    Jump
  • 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.

  • Deleted

    ...

    Jump
  • I understand the general job market, but what about lisp prevents you from pursuing personal ventures with it?

  • Deleted

    ...

    Jump
  • Yeah Clojure is like the monkey's paw of Lisp weenies. It adds many modern day niceties that are lacking in standard Scheme or Common Lisp, but also changes enough things to make it feel very un-lispy. I go back and forth as to whether or not I even consider it Lisp (Richard Stallman doesn't).

    But I do know that I'd rather write Clojure than any other non-lisp language.

    I'd also recommend people try ABCL, which is Common Lisp on the JVM , or Parenscript which is Common Lisp that compiles to Javascript.

  • Metal @lemmy.world

    Acid King - Electric Machine

  • Deleted

    ...

    Jump
  • Lisp

    It solves so many problems new languages have been invented to try and solve, while being simultaneously simpler than most

  • Metal @lemmy.world

    Happy Holidays!

  • Look up what?

  • Source?

  • Metal @lemmy.world

    High on Fire - Cometh the Storm

    highonfire.bandcamp.com /track/cometh-the-storm
  • Metal @lemmy.world

    Monolord - Icon

  • emacs org-mode meets all of these criteria

  • M-% NixOS RET Guix RET !

    But yes 80% of my comment applies to Nix as well, as of course Nix is older and Guix is (conceptually) based on Nix. Though I personally use/prefer Guix.

  • 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.

  • Linux @lemmy.ml

    Guix on the Framework 13 (AMD)

    wingolog.org /archives/2024/02/16/guix-on-the-framework-13-amd
  • codeberg

    it’s like github but non-corporate free software

    it’s very polished and featurful

    it’s built upon/by the same devs as forgejo, which is open tech to self host your own git server (with federation potentially coming), so supporting one supports the other

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

     lisp
        
    (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.