C Programmer Learns Haskell and DOESN'T Cry? (Coding in a Random Language Every Day)

Поділитися
Вставка
  • Опубліковано 9 гру 2023
  • Advent of Code 2023 is UPON US! What better way to spend the holiday season, learn to program, and test your skills against your friends. This year, I've decided to try something kind of insane. I'll be choosing a language off the wheel every day.... let's see what happens.
    🏫 COURSES 🏫 Learn to code in C at lowlevel.academy
    📰 NEWSLETTER 📰 Sign up for our newsletter at mailchi.mp/lowlevel/the-low-down
    🙌 SUPPORT THE CHANNEL 🙌 Become a Low Level Associate and support the channel at / lowlevellearning
    🔥🔥🔥 SOCIALS 🔥🔥🔥
    Low Level Merch!: lowlevel.store/
    Follow me on Twitter: / lowleveltweets
    Follow me on Twitch: / lowlevellearning
    Join me on Discord!: / discord
  • Наука та технологія

КОМЕНТАРІ • 293

  • @dmytrish
    @dmytrish 6 місяців тому +377

    3:55 - denial
    5:37 - anger
    6:05 - bargaining
    6:42 - depression
    10:04 - acceptance

    • @ivymuncher
      @ivymuncher 6 місяців тому +8

      yeah it does that to you 😭

  • @polite3606
    @polite3606 6 місяців тому +286

    Haskell first experience in short:
    - This is terrible, this is not a fun experience. 5:42
    - Wait, did I just made it? 8:36

    • @JasonMitchellofcompsci
      @JasonMitchellofcompsci 5 місяців тому +8

      It's a good language when you have to question if you have actually built something before you see it run.

  • @minneelyyyy8923
    @minneelyyyy8923 6 місяців тому +36

    it took me a very long time before i finally "got" haskell, now that I have though it is very elegant and problems that are like 20 lines at least in rust are like 4 lines in haskell.

  • @wcrb15
    @wcrb15 6 місяців тому +86

    Day 9 was a good choice for a functional language. The recursion was pretty easy to figure out

    • @WHYUNODYLAN
      @WHYUNODYLAN 6 місяців тому +8

      I've been doing them all in Haskell, and yeah, there isn't a better problem for him to spin Haskell on.

  • @kijetesantakalu
    @kijetesantakalu 6 місяців тому +190

    You are very lucky that day 9 was perfect for a recursive solution, which fits nicely with haskell, but still.. you've never programmed in haskell and wrote this? That's impressive!

    • @torarinvik4920
      @torarinvik4920 6 місяців тому +3

      Im very impressed too.

    • @U20E0
      @U20E0 6 місяців тому +26

      But it did take him 3 hours ( from the stream VOD ), which is a lot more than the ones where he used a familiar language

    • @incredulity
      @incredulity 6 місяців тому +3

      kijetesantakalu lon o toki

    • @kijetesantakalu
      @kijetesantakalu 6 місяців тому +1

      @@incredulity toki a! :D

    • @mskiptr
      @mskiptr 6 місяців тому +1

      tenpo mute la mi lukin e ni: toki pali Asuke li musi tawa jan pi toki pona.

  • @supergoku975
    @supergoku975 6 місяців тому +117

    Amazing! Here's hoping you add RISC-V Assembly to the board

    • @devnom9143
      @devnom9143 6 місяців тому +11

      And I thought I was cruel thinking that now that we've got Haskell I wanna see Lisp

    • @NithinJune
      @NithinJune 6 місяців тому

      fr

    • @NithinJune
      @NithinJune 6 місяців тому

      this

    • @theultrahorseman
      @theultrahorseman 5 місяців тому +2

      MUCH easier than Haskell. He is a C programmer with a channel called low Level Learning and high level procedural languages like assembly and C are just bread and butter.
      VHDL would probably be a better language. (you have to create the computer).

    • @mikafoxx2717
      @mikafoxx2717 4 місяці тому +2

      ​@@theultrahorseman
      Verilog.. it's like C, but without the CPU part.

  • @shsbamxnw
    @shsbamxnw 6 місяців тому +349

    now imagine coding haskell without chatgpt

    • @prawnydagrate
      @prawnydagrate 6 місяців тому +34

      definition of nightmare:

    • @LowLevelLearning
      @LowLevelLearning  6 місяців тому +226

      No

    • @theunknown4834
      @theunknown4834 6 місяців тому +17

      ​@@LowLevelLearningsolution: build zig with haskell

    • @ulroxvladtepes4023
      @ulroxvladtepes4023 6 місяців тому

      Ever since chatgpt came out, whenever I tell my wife I did something cool in a programming language, she says, ohh you just used chatgpt, you're a cheater....... Welcome to the club, also, truly enjoying these videos, thanks for making them@@LowLevelLearning

    • @newtonchutney
      @newtonchutney 6 місяців тому +3

      ​@@LowLevelLearningno part 2? 😂

  • @jeanfecteau7473
    @jeanfecteau7473 6 місяців тому +27

    Dude. In other languages I hadn't worked with before, I eventually started to understand your code by the end of the video. Haskell is still looking like gibberish to me after this video.

  • @TheTrienco
    @TheTrienco 6 місяців тому +42

    Damn.. I read the title and thought of my first reaction to Haskell at uni: "How are you supposed to do anything without loops and ifs". Took me a full afternoon to wrap my head around that. It clicked eventually, but it also unclicked a few years later...
    I think you got extremely lucky. Day 9 seems very suitable for Haskell. Imagine doing day 10...

    • @Instr
      @Instr 2 місяці тому +2

      Haskell conditionals (without libraries or extensions):
      if-then-else:
      Equivalent to ternaries.
      if (cond) then (result 1) else (result 2)
      (cond) ? (result 1) : (result 2)
      guards:
      myFunction arg1 arg2 ...
      | cond1 = result1
      | cond2 = result2
      top-level pattern matching:
      myFunction Match1 = result1
      myFunction Match2 = result2
      myFunction Match3 | cond4 = result 3
      You can combine top-level pattern matching and guards.
      case expressions (expression-level pattern matching):
      case foo of
      Match1 -> result1
      Match2 -> result2
      Match3 | cond4 -> result3
      pattern guards:
      foo
      | cond1, cond2, Match3 result1
      | cond2 -> result2
      ***
      I guess the real issue with Haskell is that it's a more expression-oriented language than either Scala or Rust. Whereas in most languages, expressions live in statements, in Haskell, statements live in expressions (statements, within the language spec, only exist within do notation and represent monadically typed values for do notation to stitch together).

    • @ngruhn
      @ngruhn 2 місяці тому

      @@Instrdamn I didn’t even know about pattern guards

  • @zzzyyyxxx
    @zzzyyyxxx 6 місяців тому +21

    I love Haskell

  • @GordanCable
    @GordanCable 6 місяців тому +15

    Way to go for confronting all this unknown and exposing us to your learning process. It is very brave to challenge yourself in such a public fashion.

  • @konfushon
    @konfushon 6 місяців тому +29

    it finally happened 😂😂😂

  • @ttamttam1522
    @ttamttam1522 6 місяців тому +11

    The great thing about functional languages is it's not unusual for them to work on the first try. But let's not talk about how long that first try takes, or how easy it is to pick back up a month later.

  • @TheLividPumpkin
    @TheLividPumpkin 6 місяців тому +58

    I’m writing a compiler in Haskell, and yesterday I had a meltdown, but it’s very well suited for such tasks :)

    • @Fritz131415
      @Fritz131415 6 місяців тому +38

      For metldowns, that is? :D

    • @m4rt_
      @m4rt_ 6 місяців тому +7

      using applicative for parsers is fun

    • @peppybocan
      @peppybocan 6 місяців тому +2

      you know, writing a compiler in C is much better!

    • @TheLividPumpkin
      @TheLividPumpkin 6 місяців тому +7

      @@peppybocan well compilers don't always have to be fast, and as long as you target an efficient enough runtime you should be fine, i'm targeting is a VM I wrote in C , not the most efficient but hey, it kinda works :), the thing with haskell is that it's much easier to write parsers in, (and maybe even typecheckers due to pattern matching).

    • @TheLividPumpkin
      @TheLividPumpkin 6 місяців тому +2

      @@Fritz131415 for both 😂

  • @pseudonymity0000
    @pseudonymity0000 6 місяців тому +11

    Would love to see ASM on that Wheel. Or at least give a bit of mercy and see FORTH or COBOL on there. ADA would also be fun.

  • @x12danx
    @x12danx 6 місяців тому +6

    This guy taught me how to code in high school, really cool dude, loving the content 👍

  • @CuimeraEmariti
    @CuimeraEmariti 6 місяців тому +19

    That create pairs is so necessary. You should zip the list with the tail of itself as in "createPairs lst = zip lst (tail lst)"

    • @atijohn8135
      @atijohn8135 6 місяців тому +6

      use drop 1 instead of tail, since tail fails on empty lists

    • @atijohn8135
      @atijohn8135 6 місяців тому +1

      ​@@0LoneTech I meant it for more general usage, it's always preferred to have a total function than a partial one (outside of IO anyway)
      all returns True on an empty list, so the program won't be stuck in a recursion loop anyway

    • @drdilyor
      @drdilyor 6 місяців тому +3

      @@atijohn8135 just as a sidenote, in this exact case, zip is right lazy so "zip xs (tail xs)" won't fail. but yea drop 1 better

    • @DryBones111
      @DryBones111 6 місяців тому

      Or using NonEmpty list for a new type-accurate headache :)

    • @sphengosine
      @sphengosine Місяць тому

      Or you can do it pointfree:
      createPairs = zip drop 1

  • @danielhalachev4714
    @danielhalachev4714 6 місяців тому +7

    I found the language very convenient for working with lists and manipulating them.

  • @meiliyinhua7486
    @meiliyinhua7486 4 місяці тому +1

    I started doing Haskell for an Intel 8081 disassembler as a play example,
    and my experience has been "once you can stop arguing with the compiler, it just works"

  • @olexp9017
    @olexp9017 6 місяців тому +4

    I started learning programming with BASIC, then moved to binary code (inlines in the BASIC code) which was quite hard to do for obvious reasons. Then moved to Assembly for ZX 80. And that was a lot of fun. Next was Pascal, a lot of fun too. After that C - that was a bit of WTF moments, then Fortran and so on and so forth. From all that experience of learning different lingos I can tell that anything you are unfamiliar with can look a bit like WTF. But your attitude can not only make the process fun but also open your eyes. Or the opposite 😂
    Haskell is awesome.

  • @ShrewT34
    @ShrewT34 2 місяці тому +1

    Haskell and C are my two favorite programming languages! And I love embedded programming!!

  • @reed6514
    @reed6514 6 місяців тому

    Ty for doing these videos. I love them, but also take care of yourself. Don't burnout!

  • @numipinkpanda5486
    @numipinkpanda5486 6 місяців тому +7

    Oh god, I returned to my university years learning Haskell

  • @NiDeCo
    @NiDeCo 6 місяців тому +5

    Haskell is amazing if you let go of the low level mindset for a second... but I understand that's pretty hard if imperative/OO is all you've known and your channel's literally called "Low Level Programming" 😅
    Glad you made it, and I hope it's not as scary as it used to be. See it as "You've been learning European languages as an English speaker up to this point, now you've started learning Chinese/Hindi" which is COMPLETELY different, yes, but will give you amazing insights into how languages work and what you can do with them 😄

  • @zachary123212
    @zachary123212 6 місяців тому +12

    Now you're thinking with types! Though I can't imagine writing Haskell without obsessively inspecting everything's type from moment to moment - they whisper the answers.
    Next step is writing your own Haskell EDSL with free monads.

    • @Adowrath
      @Adowrath 6 місяців тому +5

      That's a really good thought process if you want to do anything in Haskell and are just starting out: Think about each step, what are the types/values involved, write a function for it, then assemble into a larger function. You can even use dummy return values to just have something compilable/semi-testable at first. Only once you're done should you go over the code and merge some of the tiny functions into the places they are used.

    • @zachary123212
      @zachary123212 6 місяців тому +3

      @@Adowrath I see: all my comments with links are getting auto-deleted. Well - for the third time - you can create dummy types too, or types with dummy parameters; all you need to do is enable the PartialTypeSignatures extension at the top of the file (really it ought to be enabled by default).

    • @Adowrath
      @Adowrath 6 місяців тому

      @@zachary123212 PTS and Holes are game changers, really.

    • @mskiptr
      @mskiptr 6 місяців тому +1

      @@zachary123212 I think Haskell supports typed holes now, doesn't it?

    • @zachary123212
      @zachary123212 6 місяців тому +2

      @@mskiptr Typed holes yes. But not holes in types - afaik that requires the (very confusingly named) extension.

  • @Bozebo
    @Bozebo 6 місяців тому +4

    Haskell existing gives me daily stress without it being on any spinny wheel xD
    Might have to try it out to get it out of the way.

  • @mxlje
    @mxlje Місяць тому

    "we can do this recursively … I just don’t want to". I felt that.

  • @Nate77HK
    @Nate77HK 5 місяців тому

    Day 9 like the platonic ideal of a recursive problem lol
    I enjoyed learning Haskell but mostly as an academic pursuit. Moved on to OCaml and then Elixir for more pragmatic things.

  • @RainbowDollyYT
    @RainbowDollyYT 4 місяці тому

    The thing I like about Haskell, or generally functional languages is that once you know how to work with them they feel a lot more declarative, you just describe what problem you want to have solved rather than how to solve it.
    However, I understand that it's just super jarring if you are used to procedural or object oriented development.

  • @scheimong
    @scheimong 6 місяців тому +2

    5:35 I thought I was listening to ThePrimeagen for one moment.

  • @andrejjovanovic3695
    @andrejjovanovic3695 4 місяці тому

    I'm pretty new to Haskell. Could solve this problem easy, but still pretty new. I find it very beautiful. Its refreshing just saying what is what instead of writing instructions. Its refreshing typing "read $ word line" and its refreshing only non alnum char you type is operators and occasional ()

  • @user-sj7lk5lg3x
    @user-sj7lk5lg3x 6 місяців тому +2

    part1 :: String -> Int
    part1 = solve ((+) . last)
    part2 :: String -> Int
    part2 = solve ((-) . head)
    solve :: ([Int] -> Int -> Int) -> String -> Int
    solve f = sum . map (predict . map read . words) . lines
    where
    predict xs
    | all (== 0) xs = f xs 0
    | otherwise = f xs $ predict $ zipWith (-) (tail xs) xs

  • @lobsterr6274
    @lobsterr6274 4 місяці тому

    6:39 Felt the "Wait, its recursive" in my soul from when I started to learn OCaml

  • @scriptingdad
    @scriptingdad 5 місяців тому +1

    This is making me want to try Haskell again.

  • @matsecrafter304
    @matsecrafter304 6 місяців тому +3

    Will you do the missed days?

  • @deathlife2414
    @deathlife2414 6 місяців тому

    Congratulations man. You have gotten rid of your nightmare

  • @jkennethking
    @jkennethking 6 місяців тому

    Good on you and well done!

  • @bpa5721
    @bpa5721 6 місяців тому +7

    Don't know what you mean. Haskell is lots of fun. If the package management was better I would be gladly using it more often.
    But you know what should be on the wheel (can't read the darker fields, maybe it already is): Common Lisp

    • @bpa5721
      @bpa5721 6 місяців тому +1

      @@0LoneTech A lot of times it can lead to conflicts. It kills the fun if you have to spend an afternoon to debug the failing of the package system, instead of writing code.

  • @destro5990
    @destro5990 2 місяці тому

    The last exam I took in my master's of computer engineering was called "principles of programming languages", where you had to learn Scheme, Haskell and Fortran. It was the most grueling experience of my life.
    Also, the "do" monad was not allowed and it had to be solved on paper

  • @MatthewHaydenRE
    @MatthewHaydenRE 2 місяці тому

    Congratulations, you're well on the road to becoming a productive programmer!

  • @danielfrimu1996
    @danielfrimu1996 2 місяці тому

    Hi, great video
    What editor are you using? And what is the website where you find the problems?

  • @Tomyb15
    @Tomyb15 6 місяців тому +12

    You got lucky this day was so well suited for haskell, but congrats nonetheless!
    Haskell is the greatest language to exist.

  • @Instr
    @Instr 2 місяці тому +1

    Don't sweat the recursion too much; 80% of the time the recursion is handled for you by higher-order functions (for in Data.Traversable and for_ in Data.Foldable, are essentially for-each or iterator loops, implemented via laziness, recursion, and folds).
    It is a good place to get really familiar with recursion, though, until you find out that people tend to automate the recursion away with functions.
    ***
    In reality, Haskell is sort of Pythonic, insofar as it comes down to getting libraries that interface with low-level stuff, stealing their functions, and using various function composition operators / higher-order functions to stitch them together to transform the incoming data the way you want or throw the side effects you want.
    For instance, your definition of sub? Many Haskellers would write it as sub = flip (-) -- parens around a lone operator turns it into a function; all operators in Haskell are functions and all functions can be made into operators with backticks. flip here just says, for a given function taking at least two arguments, let's switch the first two arguments around. But in fact, there is the subtract function in Prelude that already does what you need.
    ***
    Thanks for giving Haskell a shot, it's a fun past-time that really deserves better tooling and libraries, as well as more production use.

  • @renefernandez360
    @renefernandez360 6 місяців тому +4

    You should try with the book "Learn you a Haskell for great good".
    Whe you really understand it, is a really fun experience tp work with and really changes your perspective in solving some problems

  • @SomeMrMindism
    @SomeMrMindism 5 місяців тому

    Another reason why Haskell is amazing: it enforces hexagonal architecture without the user even knowing

  • @ThaLiquidEdit
    @ThaLiquidEdit 6 місяців тому

    I can hear you have some nice linear switches (?) Did you build the keyboard yourself? Sounds pretty thocky.

  • @danielfernandes1010
    @danielfernandes1010 5 місяців тому

    Hey, I like your nvim theme! Would you mind sharing which one it is?

  • @RockRespawn
    @RockRespawn 6 місяців тому +1

    Something really funny about the problem statement starting with "You ride a (o)Camel"

  • @roz1
    @roz1 5 місяців тому

    Hi @LowLevelLearning i checked your website and i want to enroll for the ARM course which is still not up .... Also add a rust course this will also help a lot of people.
    Hope u can bring the ARM course as fast as possible

  • @bobweiram6321
    @bobweiram6321 3 місяці тому

    C#'s LINQ makes this brutally easy.

  • @Loki-
    @Loki- 6 місяців тому +1

    The shortened format for this one doesn't do Haskell any favors as I quickly got lost in the sauce.

  • @VaughanMcAlley
    @VaughanMcAlley 5 місяців тому +1

    I’m smart enough to realise that a purely functional language could be really cool, but not smart enough to get my brain out of its imperative rut.

  • @binary_gaming113
    @binary_gaming113 6 місяців тому +7

    I forgot how beautifil this language is

  • @michaelmueller9635
    @michaelmueller9635 6 місяців тому +2

    To understand what recursion is, you first need to understand what recursion is ...welcome to Haskell

  • @m4rt_
    @m4rt_ 6 місяців тому +4

    do part 2, it's easy

  • @Hofer2304
    @Hofer2304 6 місяців тому

    Try bc, dc, sed and C. If you use C you are not allowed to use any prepocessor. You have to use a linter. If you use splint it is enough to use
    splint -weak file.i
    If you use gcc use this
    splint -weak file.i && gcc -Wall -Wextra -Werror -O2 file.i -o file
    You are not allowed to use any options that make the aformentioned options obsolete.

  • @einargs
    @einargs 6 місяців тому +4

    I'm very happy you got a problem so well suited for Haskell. You didn't get to see any of the stuff that makes us love haskell so much, like monads or lenses or data kinds.
    I'll tell you a useful library most haskell programmers don't mention: the ST monad let's you have mutable variables in a pure function.

    • @animowany111
      @animowany111 6 місяців тому

      I've dabbled in haskell on and off for literal years and I *still* have never encountered a use for lenses. I usually write like 2-5 haskell programs a year, since ~2013, although I've slowed down in recent years.

  • @elkvis
    @elkvis 2 місяці тому

    I doubt that I will ever understand the appeal of pure or nearly-pure functional programming languages.

  • @ecampo123
    @ecampo123 6 місяців тому

    TBH that my reaction whenever I get an AOC solution first try 10:18

  • @Gamertom
    @Gamertom 6 місяців тому

    Should totally attempt this in VHDL 🤣

  • @vanadium6021
    @vanadium6021 6 місяців тому +1

    I'd love to see ocaml!

  • @ochiruko2874
    @ochiruko2874 6 днів тому

    most recursionable functions are easily done with lists and scans…

  • @zajlord2930
    @zajlord2930 6 місяців тому +1

    where can i find exercises like this?

  • @J-qak
    @J-qak 6 місяців тому

    Great, now you can publish a whitepaper!
    For real though, I love Haskell-inspired features in Rust.

  • @m1geo
    @m1geo 6 місяців тому

    Dude, the OG LLG folks demanding something in Assembly?! C'mon, a cheeky little easy-day solution in Arm Assembly! :)

  • @torarinvik4920
    @torarinvik4920 6 місяців тому +6

    Very, very impressive actually, Im a FP guy, to me it seems that your a natural! F# and Ocaml are languages much like Haskell but without the pain and suffering that Haskell can bring. F# is my fav language, but the problem with FP languages is that languages like Rust, Swift and Kotlin gives you all the awesome goodies from FP language plus much more. And they are also more efficient. That basically means that FP languages will never be mainstream.

    • @MrPoselsky
      @MrPoselsky 6 місяців тому

      Depends on how you define efficient.

    • @torarinvik4920
      @torarinvik4920 6 місяців тому

      @@MrPoselsky True, its a little bit in the argue category.

    • @AnthonyBullard
      @AnthonyBullard 6 місяців тому +1

      OCaml can be much more efficient than Kotlin, and in professional hands could be made to approach the level of Swift in some domains. F# is about the same as the equivalent Kotlin

    • @torarinvik4920
      @torarinvik4920 6 місяців тому

      @@AnthonyBullard I agree. I believe that Ocaml has gotten some recent solid upgrades as well in the compiler. So I stand corrected!

    • @Instr
      @Instr 2 місяці тому

      Oh please, traverse print [1..100], what's the problem?
      traverse fizzBuzz [1..100]
      fizzBuzz :: Int -> IO ()
      fizzBuzz num
      | num `mod` 3 == 0 && num `mod` 5 == 0 = putStrLn "FizzBuzz"
      | num `mod` 3 == 0 = putStrLn "Fizz"
      | num `mod` 5 == 0 = putStrLn "Buzz"
      fizzBuzz num = print num
      vs:
      def fizzBuzz():
      for num in range(1,101):
      if not num % 3 and not num % 5: print("FizzBuzz")
      else if not num % 3: print("Fizz")
      else if not num % 5: print("Buzz")
      else: print(num)

  • @PostThisWombat
    @PostThisWombat 6 місяців тому

    5:50 : Jiminy Cricket from Puss in Boots: The Last Wish explains Haskell
    P.S. Love your vids. Classic banger.

  • @LordCinders
    @LordCinders 6 місяців тому

    I like your funny words magic man

  • @insertoyouroemail
    @insertoyouroemail 6 місяців тому +6

    Haskell pain is weakness leaving the body.

  • @JasonMitchellofcompsci
    @JasonMitchellofcompsci 5 місяців тому

    My mistake when trying to learn Haskell is I was trying to parse content from the internet. Then you are dealing with Haskell's absurd multi-dimensional array of string types while all the libraries that are available want you to make use of the extended operators. And networking is inherently going to have side effects, which I was not prepared to do on day one.

  • @abeldemoz
    @abeldemoz 6 місяців тому +1

    Put Swift on the wheel.

  • @austinbutts3000
    @austinbutts3000 6 місяців тому

    I will now forever remember the generic Haskell programmer as sounding like Ed Wynn.

  • @DIYDaveOK
    @DIYDaveOK 6 місяців тому

    I swear I'm watching a 21st Century Infocom game like Zork or Starcross. I expect one of the directions to be "You are likely to be eaten by a grue."

  • @DrMaxPlank
    @DrMaxPlank 5 місяців тому

    🤣I have been using Haskell for about two years. Essentially, it teaches you to think functional, and that should be the main reason for using it.

  • @spruce420
    @spruce420 6 місяців тому +1

    Pure pain

  • @whamer100
    @whamer100 5 місяців тому

    and whats just as nuts is the second part is literally just as easy LOL

  • @mrtnsnp
    @mrtnsnp 6 місяців тому

    Part of me wants to see you try APL for the first time.
    It is a rather dark part of me.

  • @the-answer-is-42
    @the-answer-is-42 Місяць тому

    I like Haskell. It's a good way to challenge your brain to think differently (or at least for me that's the case). Don't know how practical it is, though.

  • @thevoidoid
    @thevoidoid 2 місяці тому +1

    Cniles be like: We're gonna modify the ASM from memory on the fly in order to store the return pointer and creating a jump to the new function.
    Also Cniles: Nooooo, recursion is tooo hard. I don't want to learn new FP concepts and it's the fault of FP.

  • @chocolateimage
    @chocolateimage Місяць тому

    looks like my notes after 1 month

  • @xphreakyphilx
    @xphreakyphilx 6 місяців тому

    I had to spend so long on this one, mostly because I thought difference meant |x - y| and not just x - y

  • @toujw78
    @toujw78 6 місяців тому

    Thanks for the videos. What Vim colorscheme are you using?

  • @Frikoppie
    @Frikoppie 5 місяців тому

    As a guy that used to code sort of in a few languages, C++ always annoyed me (except for some basic niceties) compared to C (though i did technically use c/c++ mostly).

  • @null6209
    @null6209 6 місяців тому

    "C programmer" that's enough to make me cry

  • @StoneShards
    @StoneShards 6 місяців тому

    Hmm...maybe THAT is why someone would program in Haskell!

  • @haskellacademy7497
    @haskellacademy7497 5 місяців тому

    Nice thriller🥶🥶

  • @thesaintseiya
    @thesaintseiya 5 місяців тому

    the syntax of this language is abysmal man

    • @Instr
      @Instr 2 місяці тому

      Only when you're not used to it.

  • @attilatorok5767
    @attilatorok5767 6 місяців тому

    I have 2 problems with haskell.
    The first problem is information density. You might be able to do a lot more things in fewer lines but those fewer lines still have to carry all that information, so for me it becomes hard to mentally parse.
    The second problem in the language for me is indenting. Haskell is whitespace sensitive and I generally dislike that. A lot of the time you will do something with the state monad and you end up with a "code tornado". Frequently you will end a do block with a "case" construct to pattern match the default cases in a recursive do block, because the language is whitespace sensitive you end up indenting 4-5 levels some of the time. It doesn't help that I like to have 8 wide indentation.

    • @asdfghyter
      @asdfghyter 5 місяців тому +1

      yeah, i don't really think 8 wide indentation is viable in haskell. one compromise i often use to reduce the excessive indentation levels is to use half-level indentation for single-line keywords like do and case etc. if i use 4 spaces of indentation i would indent the "do" keyword 2 spaces. another option is to put the keyword at the end of the previous line.
      of course, neither of these will help with the information density problem. however, for me there is some reduction of information as well, at least as long as you stop thinking low level operationally but more higher level "what is the result?". For example, if I see in C code a for-loop that calculates the sum of an array, that carries a lot of details about how the sum is performed, which I may not care about, so just calling the "sum" function (or even "foldl' (+) 0") has less uninteresting details and boilerplate.

    • @chaddaifouche536
      @chaddaifouche536 5 місяців тому +2

      Information density is higher, but you just have to get out of the habit of just glimpsing at a line to know what it does since in most other language that's all it takes. You have to take your time to read and understand each line. You'll feel slow but all in all you're understanding the program at the same speed (once you're proficient), it is just much more compact.
      I like whitespace sensitivity but in Haskell it's optional, you can use braces and semicolon instead if you prefer. Of course that won't help with code written by others…
      And 8 spaces indentation is just too much !! 4 spaces is more viable and just as easy to parse visually, IMHO.

  • @user-goohanbeom
    @user-goohanbeom 6 місяців тому +4

    Low Level Learning do not like high level language. Huh.

  • @CallousCoder
    @CallousCoder 6 місяців тому +5

    Sheer commitment or a love for bdsm I dunno which. I would’ve never ever done it, so you have my respect!✊🏿

  • @saitheja8080
    @saitheja8080 6 місяців тому

    Hi brother, good day :)
    I am looking to subscribe to your courses from LLA.
    I could see C programming is available and complete, are there any others like network programming and others were accessible ?
    Please share us some student discounts :). Thanks for making content anyways.

  • @LorenzoDeNato
    @LorenzoDeNato 6 місяців тому

    Shoutout to that shirt

  • @amitcausewhynot1660
    @amitcausewhynot1660 6 місяців тому +3

    what happened to days 6-8?

  • @user-sj7lk5lg3x
    @user-sj7lk5lg3x 6 місяців тому

    day 9 is a perfect problem for haskell imo

  • @GaryChike
    @GaryChike 5 місяців тому

    If John Carmack can learn Haskell, you can too!

  • @rubberduckdebug
    @rubberduckdebug 6 місяців тому

    Gotta love pahaskellin

  • @george_potoshin
    @george_potoshin 6 місяців тому +1

    The next language should be APL

  • @prototypeinheritance515
    @prototypeinheritance515 6 місяців тому +1

    loops are an anti-pattern

  • @newtonchutney
    @newtonchutney 6 місяців тому

    Where part 2? 👀

  • @mikeyim9985
    @mikeyim9985 6 місяців тому

    High Level Learning with Haskell when?