Crazazy [hey hi! :D]

  • 1 Post
  • 11 Comments
Joined 1 year ago
cake
Cake day: June 19th, 2023

help-circle


  • Would you happen to know to what that is attributable?

    Not sure but I suspect it’s 2 things:

    • the default editor is kinda shit
    • but it is really good at editing it’s configuration language: elisp

    So people have a need to change their editor, and a good configuration language to do it in. Moreover, emacs secretly comes with a bunch of built-in features, not enabled by default. It also helps that emacs is not terminal-based, allowing users to do stuff in emacs that you aren’t able to do in a normal terminal (like viewing images, or searching for images on the web. Did I already say that emacs has a built-in (primitive) web browser?) and generally means that emacs users “live” in emacs, as they already have access to so many features.

    If you compare this to vim

    • good text editing experience by default
    • vimscript wasn’t all that great (lua is better but neovim is still a very good editor so the drive to fix all it’s warts isn’t quite there)
    • it is terminal based, so you can’t do some of the funny stuff that emacs allows you to do

    Did I understand you correct in that customizing Spacemacs is a completely different beast?

    Correct.

    So knowledge acquired related to it doesn’t translate well to Vanilla/Doom Emacs and vice versa?

    I wouldn’t quite say that. It is more that you are probably going to need some prerequisite emacs knowledge to make the best use out of spacemacs’ layer system. To figure out how spacemacs works, you first need to have a basic idea of how emacs works. Doom is a bit closer to the metal, so you need to know less in order to properly customize it


  • Oh! Emacs fanboy here!

    I think that one of emacs’ surprising great points is that there is a plugin for a lot of smaller languages. If you’re working with a language that has no special text editor love at all you’re likely better off using vim but if the language authors made a plugin for their language, it’s likely either going to be for emacs or vscode.

    As for distribution vanilla emacs Doom emacs. Spacemacs has a bespoke customization system involving layers that is not all that friendly towards copy & pasting code from the internet. Doom emacs customization leans more to the vanilla side which can help if you need to solve a problem in your workflow.

    (Obviously vanilla emacs works best in that regard, but I can understand not wanting to start with default emacs straight away)


  • Alright as someone who likes Haskell and has dabbled in unison before, I believe I can answer all these questions for you:

    • Why is helloWorld there twice?

    It is common in languages like haskell and ocaml to first mention the type of a function, so in this case:

    • the type of helloWorld is '{IO, Exception} (). That is it’s type signature (important for later)
    • the implementation of helloWorld is \_ -> println "Hello, World!"
    • What’s the ' for?
    • What are the () for?

    Here is where I have to get into the nitty gritty of how unison actually works. Unison has what programming language researchers call an effect system. The type signature of helloWorld indicates that it can perform the IO and Exception types of side effects, and these need to be handled. (in this case, they are handled by the compiler, but other types of side effects can be handled by the programmer themselves)
    However, for reasons Unison does not like dealing with eagerly evaluated non-function values with side effects. For this reason, there is '. Essentially, what it does is turn a value into a function that accepts () as it’s argument. We could therefore say that the type signature of helloWorld is also () -> {IO, Exception} (). The last () indicates that, next to it’s IO and Exception side effects, it also returns () as a value. This is because, in functional programming languages, all functions need to return values (or run infinitely, but that is for another topic)

    Now I’ve been used to functional programming for quite a while now, so things that seem natural to me can be absolutely woozy for anyone not used to this paradigm. So if anything still feels vague to you feel free to comment








  • I have a habit of taking casual glances at other people’s phones (don’t @ me), and I can tell you I can count the times I’ve seen someone use an alternative Reddit app on one hand, where as the official Reddit app is semi prevalent.

    It’s really just us nerds that make the move to somewhere else, casual users would never have bothered.

    I think it will be a long time until you can find casual lifestyle advice on Lemmy, if ever. Most people have a hard time grasping what the fediverse is, why it’s supposed to be good and figuring out how to follow people on mastodon. We’ll stay niche for a while