My Haskell Setup
Ғылым және технология
General Haskell Setup:
- Emacs (Editor): www.gnu.org/software/emacs/
- haskell-mode (Extension for Emacs): github.com/haskell/haskell-mode
- GHC (Haskell Compiler): www.haskell.org/ghc/
- My dotfiles: github.com/rexim/dotfiles
Tools for "Real World" Apps:
- Cabal (Build Tool): www.haskell.org/cabal/
- ghcid (GHCi Auto-Reloader): github.com/ndmitchell/ghcid
- hlint (Smart Linter): github.com/ndmitchell/hlint
- hindent (Formatter): github.com/chrisdone/hindent
Additional Resources:
- MELPA (3rd Party Emacs Repo): melpa.org/
- HyperNerd (My Chat Bot): github.com/tsoding/HyperNerd
- My Twitch Channel: / tsoding
- How I configure My Emacs: • Configuring my Emacs. ...
Support My Work: / tsoding
Пікірлер: 89
Ok now I have a valid replacement for my JS stack, a linter, a formatter and a fast feedback loop. Thx, you're making my life better
Wow, definitely going to try some of this stuff, thank you so much!
Wow, you've improved your speaking and also the sound a lot compared to recent videos. Anyway thanks for sharing your setup! Very helpful 🙂
thanks man, haskell has pretty good tooling
Thanks for showing your setup, I also learned about hslint :)
Thanks, great tips for beginners.
Good video. Helpful and enjoyable to watch.
You're my hero! Thank you. :)
Very good content. Thank you so much!!!
Great video, it would be cool a video about your c++ setup on emacs :)
I like your spontaneous and relatable jokes :D
Way to go.. Very useful..
Очень полезные видео, спасибо!
wait wait wait ... 13 years old nerd? you just made me feel really old now :)
@Tsoding
5 жыл бұрын
Me don't speak english very good. I think I meant 30. What's funny is that I didn't even notice that even during the editing :D
@nekoill
3 жыл бұрын
Not just that, but a 13 y.o. boomer
@not.harshit
2 жыл бұрын
@@nekoill Aang From Avatar: The Last Airbender
This is very helpful!
Ok that "ghc --make" trick I didn't knew, I wish I knew about it much earlier.
i'm Emacs user too. ddg user too
Спасибо огромное за твои видео, смотрим с девушкой:)
Думаю, почему мне удается так хорошо понимать твой английский, а оказывается ты Russian 30. y.o. boomer. Спасибо за твои ролики)
@user-po1kd7fs6c
4 жыл бұрын
Я как услышал его, понял что русский, акцент остался чутка)0
what you use to record you screens?
Sir, I use ur emacs config, and now i cannot copy/paste from clipboard.
Contrary to what was told in the video, I'd suggest to always begin learning a new language from learning about available package managers, code analysis tools, most usefull libraries, etc. because these are things that matter a lot. sometimes, even much more than language syntax and style itself, like with fortran, R or python.
luckily i am a Linux user and like haskell and your videos 👍
dwm/emacs/haskell... the good life
@redserjogha
5 жыл бұрын
Maybe xmonad, instead of dwm?
@KingZero69
5 жыл бұрын
yeah I switched to xmonad too lol
@AndersJackson
4 жыл бұрын
Or the Emacs Window manager? See DistroTube channel how to set that up. He is currently using Emacs and Haskel (with Xmonad). He will stop using it soon, as he jumps around and test everything. :-)
@KingZero69
4 жыл бұрын
Anders Jackson I'm currently on spectrwm lol
@KingZero69
3 жыл бұрын
emacs nice lol... i’m currently using xmonad on my desktop and spectrwm on my laptop... both are great wms
This video is worth more than 10 Haskell books. Authors spend 500 pages talking about math and patterns, when, in fact, 90% of development is entirely based on top of an ecosystem, not only the language itself.
@beauteetmusculation8191
3 жыл бұрын
And most of the explanations are GARBAGE. We are developers, not mathematicians wannabes. We don't teach C by starting to tell people how printf is actually implemented in ASM, so why do we do (sort of) that in Haskell?
@fppt1555
2 жыл бұрын
@@beauteetmusculation8191 haskell is very dependant on maths, while normal imperative programming doesnt force you to have to know the insides of things (but you should still want to learn about those insides if you wanna be a good programmer).
Unfortunately, your setup doesn't seem to work on my system (slackware). I'm a Vim user, but would like to try out Emacs. I hoped that merely copying your emacs config files from your git repo into my home folder would suffice. Emacs starts up fine, but there's a problem with the Haskell mode. I keep getting the error: "The Haskell process 'Haskell' has died. Restart?" Any idea what could be the cause of this? EDIT: The haskell process no longer crashes after changing to the stable MELPA branch. But the key combinations C-c C-l and C-x e don't work. I can start an interactive haskell process from the menu though. Now the only thing that really doesn't work is sending the code to the haskell process with C-x e.
@gustavojoaquin_arch
2 ай бұрын
Use arch
What's that fancy program launcher? Would your like to share your desktop/Linux setup ?
@ricardo.mazeto
5 жыл бұрын
The window manager is dwm. I don't remember the name of the program launcher, but I used it before, they're both available at suckless.org.
@0x1337feed
3 жыл бұрын
@@ricardo.mazeto This is i3. Completely unrelated and very different in how it works. dwm is better tho imo
@ricardo.mazeto
3 жыл бұрын
@@0x1337feed But the app launcher is identical to dwm. Why you think it is i3? And why do you think dwm is better?
@lilspelunker5613
3 жыл бұрын
that is dmenu_run I think
Could you advice, ghcid --command="ghci src/Main.hs", reports: "All good" but i have no repl active, how to fix it? using linux
@alexeykutepov3767
4 жыл бұрын
Yeah, it is what it is. ghcid doesn't give you the REPL, it just recompiles your files on changes and shows the errors. For REPL you need to run an instance of ghci (without ghcid) in a separate terminal. ¯\_(ツ)_/¯
@DjLeonSKennedy
4 жыл бұрын
@@alexeykutepov3767 if i'will run separate instance of repl, will it be updated automatically during ghcid recompiling ?
@alexeykutepov3767
4 жыл бұрын
@@DjLeonSKennedy Nope :D
please i want learn haskell in windows is recomendable install platform? I try and i cant make a GUI program.
@monnef
5 жыл бұрын
When I was still using Windows (3 years back I think), I used at first Haskell Platform: www.haskell.org/platform/#windows . Then I moved to Stack: docs.haskellstack.org/en/stable/README/#how-to-install . I feel I should warn you, native GUI applications are not Haskell's strong suite. There are some libraries which use essentially browser to render GUI (I think Miso or was it something else?), so you can use power of HTML+CSS, but I don't think Haskell in this tech stack brings much (at least GUI-wise). There are a few native GUI libraries, but I think they are quite imperative, of lower quality (missing docs, no or almost no tutorials and so on) and their APIs not really designed in a Haskell way (more like bindings to C APIs).
@AndersJackson
4 жыл бұрын
You can install Emacs and GHC in Windows. It, developing programs etc) does works nearly as good as in Unix/Linux. :-) You could also use VirtualBox to do the developing in, or install Ubuntu (or another distro) from MS Windows store. There are lots of opportunities.
@adocarpel7770
4 жыл бұрын
@@AndersJackson many thanks.
So interested in Haskell but it's so difficult to learn for me, seems i stupid for it :(
@CubOfJudahsLion
3 жыл бұрын
Have you tried learnyouahaskell.com/?
Emacs is the BEST!
@nicolaskollushnikopf9933
5 жыл бұрын
Da!
@AndersJackson
4 жыл бұрын
självklart!
А я юзаю VIM!
Can You share you font style details?
@IamPyu-v
4 ай бұрын
He uses iosevka :)
10:05 I felt personally attacked. But being serious, I'm new to Haskell and I am learning with that book, do you suggest any better book? I know what you just said about hlint but learning that way seems inefficient when new to the language and the paradigm.
If you tell me you aren't a super villain you are a liar.
10:36 Ahahhah :D How about that ?
can someone explain the haskell real world applications joke? why is it not a good language for solving real problems in the real world?
Running Linux, using Haskell and not using Xmonad as a window manager is a crime imo. You don't even need dmenu, Xmonad has its own prompt. It just makes my eye tick every time I watch your videos. Xmonad is an awesome window manager and it deserves way more love than it gets. Also, it's an actual real world Haskell application, so win-win in my book.
@nekoill
Жыл бұрын
@Ralph Reilly calling configuring xmonad 'programming in Haskell' sounds like too strong of a term - number one, and number two, currently I live with my decision to abandon X in favor of Wayland and I have to content with a thousand of small inconvenience that nonetheless make me wish I was still in xmonad, every time lol
don’t read any book on Haskell, just watch this video first
> minimal > emacs :thinking:
@aedd3307
4 жыл бұрын
@@SimonWoodburyForget i know this comment is old, but emacs is literally a lisp interpreter, you can't get more bloated. Compared to other popular text editors on linux, It's VEEEERYYYY bloated.
@aedd3307
4 жыл бұрын
@@SimonWoodburyForget LISP is as close as you get to minimalism when it comes to programming languages. Not modern Lisps. it may be the easiest language to implement, but just because it's easy to implement doesn't mean that the developers of the interpreter aren't going to make it bloated, also, Emacs comes with the GUI (which is written in C), the text editor part (which is written in C) and only then the elisp being an auxiliary language, not the core.
@aedd3307
4 жыл бұрын
@@SimonWoodburyForget would you consider the GUI of a terminal emulator to not be part of it? Just because Lisp is easy to implement doesn't mean that anything that uses it is minimal. Go ahead and compare Emacs' implementation to Vim or Acme, And tell me Emacs isn't bloated in comparasion to them.
@aedd3307
4 жыл бұрын
@@SimonWoodburyForget >Emacs is just a terminal emulator or shell I think most terminal emulators don't come with a Lisp interpreter and Tetris bundled with it. >Not even Vim users want to use Vim False, It does more than enough, there are many vim commands that nobody or almost nobody knows about, if you actually check out the vim documentation you will see that 90% of plugins are unnecessary because their functionalty is already bundled with vim. What i meant by comparing Emacs to Vim and Acme is that Emacs is much more bloated than those, Emacs may be "minimal" compared to VSCode, Sublime, or other modern IDEs, but compared to other text editors GNU users use (Vim and Acme), it is pretty bloated.
@aedd3307
4 жыл бұрын
@@SimonWoodburyForget Your entire comment revolves around the fact i use Vim, in fact, i use Emacs (because Slime is just so great to work with common lisp), I am happy for that you are happy with Emacs, just like i am happy with Emacs. What i am trying to prove is that Emacs is the most bloated text editor that GNU Users use. (GNU users don't use proprietary IDEs)
We all know you're a liar. Don't trust this guy, he is using Vim, not Emacs.
@CaptainWumbo
4 жыл бұрын
:wq, it was a term window this whole time! But wait, now he's exiting vim and it was eshell this whole time....
Do you speak russian?
In case for the people using windows or Mac and and editor like vs code or sublime there's an easy fix: Stop
Emacs, :(
How to do this on Windows: install vs code and search for "Haskell" under extensions Jk don't use Windows for Haskell I tried it it was a nightmare. Wsl is fine though
>900KB for a simple hello world program??? WTF! `sudo apt purge ghc`.
@AndersJackson
4 жыл бұрын
It is about the same size of most hello world programs this age. But the thing is that programs doesn't grow that much after that initial size.