Why isnt Ocmaml more popular | Prime Reacts

  Рет қаралды 67,358

ThePrimeTime

ThePrimeTime

Күн бұрын

Recorded live on twitch, GET IN
/ theprimeagen
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact

Пікірлер: 321
@adambickford8720
@adambickford8720 Жыл бұрын
Most people don't actually understand OOP either, but they put it prominently on the resume and opine about it incessantly.
@BboyKeny
@BboyKeny Жыл бұрын
Luckily people giving the job interview also don't understand OOP. It's just 1 of those words that acts like a secret handshake, just like "clean code". I actuality read Uncle Bob's Clean Code and replied to a job interview that had clean code as requirement. They didn't know what function hoisting in js was so they were very confused at the fact that I was doing the Clean Code as instructed by the book. Which made me confused as to why they put Clean Code as a requirement to start with. Apparently they were talking about just basic indentation and naming variables somewhat sensible, this was a Medior position.
@IBelieveInCode
@IBelieveInCode Жыл бұрын
When you truly understand OOP, you throw it away.
@bobbycrosby9765
@bobbycrosby9765 Жыл бұрын
Most people's version of "OOP" is just glorified procedural programming. OOP certainly comes in handy. But for most projects, its best as a seasoning rather than the full meal.
@T1Oracle
@T1Oracle Жыл бұрын
​@@IBelieveInCodePeople who "throw away" OOP don't understand it and are actually using it. OOP isn't classes and inheritance, it's design patterns and SOLID design principles. Unfortunately, most devs still don't know SOLID.
@AlexanderThomasHaselton
@AlexanderThomasHaselton Жыл бұрын
define "understand"
@RufusKSala
@RufusKSala Жыл бұрын
Ocmaml… never heard of it.
@HiYesThisIsJake
@HiYesThisIsJake Жыл бұрын
Ocmaml deez nutz
@Caboose2563
@Caboose2563 Жыл бұрын
Tom the genius invented it
@phill13able
@phill13able Жыл бұрын
Ocaml… I fell asleep during class in CS
@josk8936
@josk8936 Жыл бұрын
Ocmaml? I hardly know her.
@jsonkody
@jsonkody Жыл бұрын
Rust lang compiler was implemented in Ocaml
@HoloTheDrunk
@HoloTheDrunk Жыл бұрын
I used to compare my workflow to yours thinking I was doing terrible because you don't look too old, then I realized you were already programming professionally when I was 7 and that kinda changes things lol
@franciscoflamenco
@franciscoflamenco Жыл бұрын
That's not what workflow means.
@HoloTheDrunk
@HoloTheDrunk Жыл бұрын
@@franciscoflamenco what do you think I meant by workflow?
@meltingmoody
@meltingmoody Жыл бұрын
Lol I had the same feeling when I compared myself with a 10+ yoe engineer with me being out of University
@franciscoflamenco
@franciscoflamenco Жыл бұрын
@@HoloTheDrunk Sounds like you're using it to mean career. If I was wrong then I apologize.
@liquidmetal718
@liquidmetal718 Жыл бұрын
@@franciscoflamenco Don't turn this into reddit. Make your assumptions clear and then argue.
@nefrace
@nefrace Жыл бұрын
"If more people will write in OCaml then, people will write in OCaml more." That's a good point actually. And now I want to try to make a game with Raylib in OCaml lol
@jenreiss3107
@jenreiss3107 Жыл бұрын
I work with a monolithic OCaml repository, and the answer is because the "O" stands for "Opaque"
@zachb1706
@zachb1706 Жыл бұрын
A University near me doesn't start with Python or Java, they start with Haskell.
@Coolkid245
@Coolkid245 5 ай бұрын
w school
@aoeu256
@aoeu256 5 ай бұрын
Haskell is so beatiful, until they start with the inscrutable terminology.
@xbmarx
@xbmarx Жыл бұрын
I never understood either. As far as FP languages go, OCaml is actually a fairly simple language too. It's orders of magnitude simpler than Haskell, Scala or Rust (if you count that as FP), which are all more popular.
@AlJay0032
@AlJay0032 Жыл бұрын
I know Haskell has their little shadow existence but Scala always seemed obscure to me and what did Rust do to become popular?
@metaltyphoon
@metaltyphoon Жыл бұрын
Because rust isn’t FP…
@taragnor
@taragnor Жыл бұрын
@@AlJay0032 Rust isn't FP. It's a cleaner C++ with concepts from Haskell, but it's not designed to be used as a FP language. You can write some functional code with it, but that's really not what it's good at. Haskell had a lot of great ideas, people just overall kind of hate FP for doing real work.
@elcugo
@elcugo Жыл бұрын
@@taragnor It's not that people hate functional it's more than people aren't PHD mathemathicians.
@kepler69c32
@kepler69c32 Жыл бұрын
​@@elcugoim doing ocaml for my PhD. DAMMIT
@macaroni_italic
@macaroni_italic Жыл бұрын
When people say that humans think imperatively, they are greatly oversimplifying things. Once I know how to make a peanut butter and jelly sandwich, I'm not painstakingly walking through the steps in my mind in great detail in order to make one. All of that gets abstracted away into a series of composed actions that yield the same result in the end. And of course, at that point, the same process can be easily adapted with little effort to the creation of any type of sandwich. How is that not more analogous to a declarative/functional approach? I want to make a sandwich, so I make a sandwich. I don't explicitly tell myself "Okay, now remove the lid on the jar of peanut butter, now put the lid down on the counter, now grasp the jar in one hand and pick up the butter knife with the other." etc. Rich Hickey (the creator of Clojure) did a great talk called "The Value of Values" where he argued that imperative programming was, at one point, pretty much the only type of programming you could do if you wanted to make anything useful. Why? Because the hardware was so limited in resources that for any sufficiently important task, you had to build your mental model around those limitations. But as things have progressed, the situations in which that level of thinking is required has become more and more niche. He flatly acknowledges that if you're a systems programmer, or otherwise need to prioritize and optimize for performance, then obviously you still need to be engaging in what he calls "place oriented programming," e.g. a paradigm oriented around the manipulation of state. But for the vast majority of us, it doesn't currently make any sense, and introduces all sorts of problems that make our lives harder as programmers. And the main reason why we stick to this is because we began from a place of necessity, and then tricked ourselves into thinking it was actually the ideal way of doing things all along.
@calder-ty
@calder-ty Жыл бұрын
I think the problem why Functional programming is less popular is in part that they don't have anyone like a Bob Martin (love him or hate him) out there trying to explain how to do it. It's always discussion on pure functions, and Monads and endofunctors and oh gosh i just want to know how to do this thing i know how to do proceduraly/imperativly.
@ludawig_
@ludawig_ Жыл бұрын
Uncle Bob ist coming to the rescue. 😀 Google "Functional Design: Principles, Patterns, and Practices" from Robert C. Martin.
@ohmyv3gatron
@ohmyv3gatron Жыл бұрын
That’s why people should read grokking simplicity which does a really really good job at teaching functional programming without saying monad/functor and all of the seemingly scary stuff. Eric Normand always does a great job teaching in general…. A lisp programmer but this particular book uses JS to be friendly to everyone
@nomoredarts8918
@nomoredarts8918 Жыл бұрын
If you want to learn FP without all these buzz words, just start with Elm
@bobbycrosby9765
@bobbycrosby9765 Жыл бұрын
Bob Martin actually likes Clojure. But as someone that enjoys Clojure, I don't know what to think of that.
@ohmyv3gatron
@ohmyv3gatron Жыл бұрын
@@bobbycrosby9765 I love clojure as well....
@IrizarryBrandon
@IrizarryBrandon Жыл бұрын
Never tried Ocaml, but I remember learning Standard ML and thinking it was a masterpiece, so on the basis of this, I hope OCaml becomes more popular
@aoeu256
@aoeu256 5 ай бұрын
I thought the same about Eff which is like OCAML with algebraic side effects, and LISP is standard ML but with macros, quote, and homoiconicity.
@IrizarryBrandon
@IrizarryBrandon 5 ай бұрын
@@aoeu256 Hey, thanks for the reply! I'm not familiar with Eff, though that sounds interesting (need to look up what "algebraic side effects" are, though). Unfortunately, I constantly lament the fact that, as much as I love Lisp (I got pretty good at one point writing Emacs Lisp, though I admit my macro fu is weak), Lisp lacks something that I feel is one of the features I liked most about ML: its strong static type system. I sometimes wonder why they haven't come out with a Lisp that has this feature (or maybe that's just SML/OCaml/Scala etc., just sans macros).
@lewesc
@lewesc Жыл бұрын
I can't believe he forgot alerts.
@LSM07
@LSM07 Жыл бұрын
"Nobody understands why I language becomes popular" Because Java and C# didn't have huge corporate backing or something?
@franciscoflamenco
@franciscoflamenco Жыл бұрын
C++ was the most popular language before Java and I don't think it ever had huge corporate backing. Objective-C (and really, even C#) never really came close to Java's level of popularity despite Apple (and Microsoft) being bigger companies than Sun. The two current most popular languages are JavaScript and Python, neither of which are really backed by specific corporations but rather embraced by then because they're already hugely popular. Honestly I think every single language that gets hugely popular gets there based on either killer apps or on solving specific shortcomings of the previous language without being too different. For C it was a killer app (Unix), for C++ it was higher levels of abstraction upon C, for Java it was (memory) safety over C++, for JavaScript it was a killer app (the web) and dynamism over Java, and for Typescript it's (type) safety over JavaScript. Perl, Python and Ruby are kind of exceptions in that they were just flexible enough to find different niches over time and accumulate popularity, although even then only Python seems to have survived the purge that was Node.js on all backend web languages, by finding a niche in data science and ml.
@pascal7947
@pascal7947 Жыл бұрын
Monad and Product are related to the type system and not to functional programming. Functional programming languages (e.g. lisp) can also be dynamically typed.
@BrianClark-gh1ms
@BrianClark-gh1ms Жыл бұрын
I feel like a lot of people take a look at Haskell and think that it's representative of FP as a whole. It's really only Haskell (and it's offspring) that require a bachelors in category theory, lol. I mean, Clojure is just as functional as any other FP language and yet, it contains no algebraic data types at all.
@itellyouforfree7238
@itellyouforfree7238 Жыл бұрын
@@BrianClark-gh1ms that's because it's garbage FP
@raenastra
@raenastra Жыл бұрын
I don't think Prime realizes that he has the influence to single-handedly make a language popular by continuing to talk about it
@nicco88
@nicco88 Жыл бұрын
I'm sticking with elixir as my go-to functional language
@kallebysantos5167
@kallebysantos5167 Жыл бұрын
Some months ago I started to search about F#, as C# dev I was curious about that. Then I loved the concept about think in this functional way and also use composition to express real world models. But I figured out that probably F# wasn't a good choice, then I watched the your "ocaml... rust with garbage...." video and I loved because it combines all nice features that I saw in F# + and very powerful memory management, also I agree with you about something that have Rust best features but without the Foundation. I'm starting ocaml these days watching your live streams and also doing it by myself. Let's make ocaml popular !!!
@scosminv
@scosminv Жыл бұрын
I don't understand why choose ocaml vs F#. .NET supports AOT compilation nowadays, you can produce native binaries if that was your reason ...
@kallebysantos5167
@kallebysantos5167 Жыл бұрын
@@scosminv I also didn't understand why the order of my project files influences on namespace resolution and it is very annoying. And ocaml looks funnier than F#. But I have interest in learn functional programming, I know that F# could be more useful since I'm C# developer. I also seen a lot of videos from Scott Wlaschin and also read his book about DDD with F#. But in my point of view the ecosystem behind F# is very strange and difficult. By the other hand with just some commands I was programming and following the ocaml getting started tutorials, while F# gives me a lot of confusion and I felt very lost.
@greendog105
@greendog105 Жыл бұрын
Did you know the Cambridge university teaches their whole CS course with OCaml instead of C?
@astroid-ws4py
@astroid-ws4py Жыл бұрын
Indeed, And they have the course and video lectures freely available online on their website and youtube.
@itellyouforfree7238
@itellyouforfree7238 Жыл бұрын
That's good, because university is supposed to teach you how to study, reason, learn and think, not how to use a hammer
@k98killer
@k98killer Жыл бұрын
I remember programming in 2009. I taught myself to code back then with bash scripting and C. I 'member loading Puppy Linux on a USB thumb drive in the school library to test some network sockets stuff. Good times, simpler times. I found very quickly that a basic-ish language called "AutoIt" was the fastest way to develop GUI apps on Windows, and I even was able to do TCP, UDP, keylogging, and a bunch of other stuff with it, too. I think at one point I even made a tool that would send screenshots across a LAN, though I never managed to optimize it enough to be anything close to real-time -- iirc I ran up against the limits of the language, then pivoted to the LAMP stack.
@aoeu256
@aoeu256 5 ай бұрын
Asking chatGPT to generate pythonautoit code or python shell code is what I do to automate stuff, and sometimes its even faster than navigating GUIs.
@Jungorend
@Jungorend Жыл бұрын
Clojure definitely seems to have these same problems. I've never met anyone who said it was their first language. Even with being built on the JVM (and thus having access to the entire Java ecosystem), and a lot of concessions to allow for more imperative styles of programming in a functional language, it remains consistently niche.
@jjtt
@jjtt Жыл бұрын
When talking about paradigms, as with language syntax, people just like what they're used to. In order to fully grok functional programming you need to unlearn and relearn so much, there's no other way but to bang your head against the wall a thousand times, just like you did when you learnt programming for the first time, it's just that people forget their struggles learning programming, because looking back everything was so simple. I saw this many times when I was a teacher. I don't think functional programming is so much harder than the imperative styles after seeing many good software engineers fail their first programming course at college the first time around... which is a whole semester's worth of classes just to talk about what for loops and if statements are
@thomassynths
@thomassynths Жыл бұрын
It never ceases to amaze me when people claim a GC language can contend with C or C++. Member Go, D, and OCaml?
@abhinavk0929
@abhinavk0929 Жыл бұрын
I think you can turn off GC in D, not sure tho
@ya64
@ya64 Жыл бұрын
I mean, you can write of functional programming in JavaScript, not everything, but you can have a core of your app that is functional. It just takes a little more effort since it doesn’t have the same features out of the box like a true functional language but it can be done.
@gmdias0_
@gmdias0_ Жыл бұрын
I would like to see some example of this actually
@RedPhorcys
@RedPhorcys Жыл бұрын
Any updates on if u will be continuing the "Writing An Interpreter In Go" book ?
@Fiercesoulking
@Fiercesoulking Жыл бұрын
I think most of it here is very true e.g the reason why Javascript became popular was the frameworks like Node.JS, React and AngularJS and despite it not being a typical enterprise language and having strange rules. Typescript already tries to change this but in general it doesn't guaranty that your place is safe when strange things happens e.g Java . The reason it didn't apply for PHP back then it came with all it was meant for and also being the first language for webserver backend. Functional Programming I lernt it with Scala on my university I was horrible at it XD but I know why it is hard your function is basically your mathematically definition and instead of loop you use recursion. Scala is also OOP at the same time means doing mathematically definition and recursion on lists and objects. Its so strange and different from what you usually do as programmer its needs a complete different way of thinking. Its closer to writing a mathematically prof with Hoare logic that your program is correct.
@T33K3SS3LCH3N
@T33K3SS3LCH3N Жыл бұрын
12:35 I had to learn Java at university and oh god what a waste of life time that was. From a total beginner to whatever the hell I am now a decade later, my hatred for Java may be the only constant. We did C/++, Assembly, JavaScript, PHP, C# and a few other things here and there, and I enjoyed every single one of them more. I'd sooner do web dev in assembly than look at a Java project and wonder why the hell 90% of the program is running out of a config file rather than in actual code.
@ulrich-tonmoy
@ulrich-tonmoy Жыл бұрын
is there a chance that game studios/indie dev/game engine will migrate/use rust or zig instead of c++
@kurt7020
@kurt7020 Жыл бұрын
In 40 years, maybe. I don't think people realize just how much code is written in C++. These are not code bases you can rewrite when a new shiny comes along. For example Unreal is *millions* of lines of C++, and probably another million more for the GPU drives and drawing libraries. The game logic itself you can write in higher level languages.
@ulrich-tonmoy
@ulrich-tonmoy Жыл бұрын
@@kurt7020 You know zig support c/c++ you can call them to and from zig and also comes with tools to convert C/c++ to zig. Like unity before had JavaScript scripting and they decided to stop supporting that so they made a converter to convert js project to C# so is there a chance if you can just convert you c/c++ to zig. the main feature of popularity for rust is memory safety so is that much improvement of rust/zig worth the switch even with these converter
@PrivacyNProgramming
@PrivacyNProgramming Жыл бұрын
Ocmaml, love it
@sortof3337
@sortof3337 Жыл бұрын
"The language that relies on dictironaries to get anything done is utter crap" -- > cries in python and c symbol tables.
@AleksandrPodyachev
@AleksandrPodyachev 6 ай бұрын
The first time I heard of Ocaml, it is in a conference presentation for a framework called Melange
@SethPentolope
@SethPentolope Жыл бұрын
For embedded systems, the problem is not really processing speed, it is memory capacity. Yeah the processor is significantly slower, but you don’t want to dynamically allocate and free memory because you don’t have enough memory to allow the possibility of fragmentation and you don’t have virtual memory to help remove that problem with fragmentation.
@wadecodez
@wadecodez 9 ай бұрын
Never heard of ocaml until you mentioned it and I’m starting to consider it for new projects. Really think vite and reasonml could be something fun
@theneilpowers
@theneilpowers 9 ай бұрын
Norman Ransey was my college professor. Crazy to see him here!
@gustavomuller7190
@gustavomuller7190 Жыл бұрын
Ocmaml 💀
@raunaksinghjolly8334
@raunaksinghjolly8334 Жыл бұрын
Our college still teaches applets
@AlJay0032
@AlJay0032 Жыл бұрын
Is SML/NJ still a thing? Back in the days it was better and more advanced than OCaml and it allowed you to write imperative code if you really wanted or needed to. One issue I have with Ocaml is that today languages need compiler support for concurrency or at least threads. Ocaml doesn't have that, like most other languages, if they have it at all (see Python) it is like a wart that was retrofitted as an afterthought.
@Taverius
@Taverius Жыл бұрын
OCaml 5 recently released with proper OS-level thread support, although parallel garbage collection is always tricky - at some point, the GC is going to have to pause all threads at once to make sure shared data structures are in sync, so it's usually best to communicate between threads with immutables and message passing to minimise the duration of the sync, and OCaml's message feature is marked as experimental. I'd much rather deal with haskell's transactional memory feature until that matures.
@pontoexclamacao9158
@pontoexclamacao9158 Жыл бұрын
I tried installing Ocaml to learn rescript(better js). It was a pain.
@LaurentAndriamifidy
@LaurentAndriamifidy Жыл бұрын
yo, your title has a typo... ah nevermind.
@SuperHeroINTJ
@SuperHeroINTJ Жыл бұрын
If you make OCaml popular, you are God!
@mccGoNZooo
@mccGoNZooo Жыл бұрын
OCaml has historically had very bad tools for dealing with actually using the resources of the machine and has (as far as I know) had no answer to STM, lightweight threads, transactional variables and queues that build on top of these two things, which has made it hard to compete with Haskell which has had these for many years. So for someone actually working with these things, there just isn't that big of a space for OCaml to be the more appropriate choice. I've used OCaml in production a few times and it has always been a worse experience for solving real problems than Haskell because of a runtime that just doesn't provide modern facilities (see above) or even the comparatively poor level of the CLR which you get with F#. This probably made F# a much better choice than OCaml for our choices as well, in all likelyhood. It's funny seeing OCaml getting a resurgence because I suspect these things haven't actually been solved yet either. I'll go on record as saying that despite the low usage numbers of OCaml it's been my impression that it's vastly overrated by people who have never actually done anything in it, or lack experience with languages that provide better facilities. If I'm going to accept a barren runtime for efficiency's sake I'd take Zig or Odin any day since they're going to be better at providing a real, deterministic efficient experience anyway. The space that OCaml supposedly fills according to proponents is usually either wrong or basically useless since it's just the worst of all worlds.
@torarinvik4920
@torarinvik4920 11 ай бұрын
I agree 100% the elephant in the room is really that it's harder, just like Linux, Vim, Emacs, perhaps even Powershell? But you don't need to know what a Monad is though or be good at math. I think that is a myth. FP is inspired by lambda calculus and category theory/set theory but most of the academic stuff can really be dropped without any loss in expressiveness. If you do Haskell you however will need to learn to use monads, but most people already do use things like Optional, Async, Result and lists(yes lists are monads too) without knowing anything about category theory.
@Taverius
@Taverius Жыл бұрын
There is a good comment there that definitely still applies - OCaml doesn't have a language spec, the compiler is the language spec. That means the language changes under your ass without warning in breaking ways regularly. Makes it hard to recommend over Haskell, Clojure, F#, CL unless your team is ass-deep in the compiler's guts the way the Jane Street folks are.
@gamekiller0123
@gamekiller0123 Жыл бұрын
Doesn't Haskell have the same problem? They explicitly prioritize research and innovation over stability.
@Taverius
@Taverius Жыл бұрын
@@gamekiller0123 it's a bit different, when a language has a spec, the spec changes as the language evolves but it's a deliberate well-documented thing. When there is no spec, you have no real way to know whether some behaviour is an intended feature, unintended feature, or a bug, and it can change at any time in opaque ways. You're building on sand. That doesn't matter for hobby programming, but it does if you're making a product.
@gamekiller0123
@gamekiller0123 Жыл бұрын
@@Taverius What about Rust, which has no spec but prioritizes stability?
@MrHamsterbacke756
@MrHamsterbacke756 Жыл бұрын
What's the difference between having a spec or not? If the spec is updated regularly you still have the problem. Or are you reading every update in a spec?
@melanovapedia7924
@melanovapedia7924 Жыл бұрын
Can you explain more about spec you're talking about in business context? Or gimme some keyword for googling I am newbie,
@randomseed
@randomseed Жыл бұрын
And maybe it is not just about libraries but also about a programming paradigm which is easy to understand for beginners? Look at early PHP. Look at C. Structural imperative. And people tend to understand imperative stuff using intuition, like they understand cooking recipies: you have this steps, you can go sideways using "if" or go somewhere else by calling a function or a procedure, you can repeat a fragment using loop. You can start writing programs in hours. In object-oriented or functional you need to think first and very often learn some idioms, operators and syntactic notation.
@the_true_dreamberddev
@the_true_dreamberddev Жыл бұрын
why isnt caml more popular? (the og before ocaml)
@Speykious
@Speykious Жыл бұрын
I don't think I could ever love Ocaml when I already know and love Haskell in terms of language design.
@_orangutan
@_orangutan Жыл бұрын
Programmed Haskell for a year back in 2017 when I was learning about FP. It's a cool language and makes me feel sophisticated but I moved onto more hands-on stuff like C and Zig. Elixir is my main driver now.
@Blaisem
@Blaisem Жыл бұрын
Did Prime ever try Haskell? What FP experiences does he have, or is OCAML going to be playing his V-card?
@Speykious
@Speykious Жыл бұрын
@@_orangutan My main Driver is Rust. I learned it after learning C and Haskell. I described it as the Haskell of C, for me it was such an amazing match between the two.
@TheMrKeksLp
@TheMrKeksLp Жыл бұрын
Isn't haskell just worse?
@Speykious
@Speykious Жыл бұрын
@@TheMrKeksLp in what way?
@nugrahaagungp
@nugrahaagungp Жыл бұрын
finger blazingly fast, eyes can't keepup with word hes trying to type
@vimdiesel
@vimdiesel 5 ай бұрын
A lot of people here are hating on abstractions. Even boolean algebra is not how the cpu works. There are millions of transistor connected in a manner to basic operations possible. So replicating that complexity everywhere would be stupid.
@VudrokWolf
@VudrokWolf Жыл бұрын
Just with the name I am repelled but now that Prime is talking about it I’ll built something with it
@ithinkimhipster502
@ithinkimhipster502 Жыл бұрын
Ocmaml, a.k.a Object Coriented Machine to Artificial Machine Language
@sycration
@sycration Жыл бұрын
Objective Categorical Abstract Machine Language
@Ryan-xq3kl
@Ryan-xq3kl Жыл бұрын
please ask a dumb question on btc stack overflow, we need more entertainment over there
@quarteratom
@quarteratom 9 ай бұрын
OcAmL is the new Rust?
@AndrewBrownK
@AndrewBrownK Жыл бұрын
look at the OCaml guy scared of Haskell talking down JS developers for thinking they are functional programmers
@rz2374
@rz2374 Жыл бұрын
ocmaml
@chopseh
@chopseh Жыл бұрын
It would be more popular if it rebranded as Haskell++
@hammer86_
@hammer86_ Жыл бұрын
Because syntax matters.
@QuiGonJam
@QuiGonJam Жыл бұрын
what's with the title yo
@Oi-mj6dv
@Oi-mj6dv Жыл бұрын
Hmmmm hard real time while garbage collected? Im not saying its not possible but im curious as to how?
@Giogiova71
@Giogiova71 Жыл бұрын
The main reason why people hate functional programming is because of the difficulty to understand applicative order, recursion and lamda calculus after learning imperative programming (if you did not not touch recursion it is even worse) because the way of thinking changes. I know it well because they tried to teach me scheme after c, c++, c#,Java, python. Why do you do that to your student!!!! They told me how it is better to write functional programming and how the code is beautiful and short after passing hours and hours on imperative programming and oop. How do you want that I like the prefix syntaxe and all the parenthesis (if (= x 0) (do something) (else)). Variable are immutable what nightmare. They should first teach functional programming.
@VudrokWolf
@VudrokWolf Жыл бұрын
I was programming since 1990 xD
@sacredgeometry
@sacredgeometry Жыл бұрын
Oooh 100 libraries!
@greendog105
@greendog105 Жыл бұрын
OC MAML
@naranyala_dev
@naranyala_dev Жыл бұрын
more legend stack overflow please ...
@guledomer
@guledomer Жыл бұрын
The syntax of ocaml is good but the the developer tooling is not dune and opam dont work toghether really well and there is not one standard library.
@cmelgarejo
@cmelgarejo Жыл бұрын
Ocaml mammal
@gavinh7845
@gavinh7845 Жыл бұрын
I was in my last two years of undergrad in 2009, and used ocaml in some research/class projects by choice :) It’s a fun language, but haven’t used it in a long time. I think ReasonML could help because OCaml has some odd syntax.
@gavinh7845
@gavinh7845 Жыл бұрын
It would be nice if it had type classes, things like /. because you can’t use the same operator for int and float types makes the syntax even more odd.
@AlJay0032
@AlJay0032 Жыл бұрын
Forget about the O in OCaml.
@MenkoDany
@MenkoDany Жыл бұрын
Leftpad will never not be funny
@Pixel__Man
@Pixel__Man Жыл бұрын
Ocmaml
@kshyr811
@kshyr811 Жыл бұрын
ok mammal
@not_nerp
@not_nerp Жыл бұрын
I'm still here writing JSPs at a trillion dollar company in 2023 :(
@carriagereturned3974
@carriagereturned3974 Жыл бұрын
"will C". not some "oh camel", duh.
@tiko-
@tiko- Жыл бұрын
it's just too high IQ
@KayOScode
@KayOScode Жыл бұрын
I couldn’t imagine using functional programming over procedural. It’s just so annoying to read and write
@ThePrimeTimeagen
@ThePrimeTimeagen Жыл бұрын
i am pretty much on this team but i cannot tell if its me, or the language
@KayOScode
@KayOScode Жыл бұрын
@@ThePrimeTimeagen I don’t think it’s purely an issue with the language. But I think that when there’s something that comes somewhat naturally to me that also does everything I need (like c++, rust, c#, etc), I don’t find a lot of motivation to learn the languages that don’t feel natural.
@isodoubIet
@isodoubIet Жыл бұрын
@@KayOScode I mean, ultimately procedural is what the machine is doing so there's IMO a sense in which it's objectively more natural. That you can express any computation in functional form to me is more a curiosity than anything.
@captainfordo1
@captainfordo1 Жыл бұрын
I definitely agree with that.
@MaxHaydenChiz
@MaxHaydenChiz Жыл бұрын
@@ThePrimeTimeagen I vote crappy learning path and teaching materials. Evidence: university A/B tests of course sequences. Students whose first introduction to programming is with FP end up better at imperative programming by their 3rd semester than students who did 3 semesters with the same imperative language. Further evidence: Excel is the most popular programming language for people who don't think are doing programming. Large excel programs are generally functional.
@MaxHaydenChiz
@MaxHaydenChiz Жыл бұрын
Most languages get popular because there's a killer library or tool that people want to use. OCaml is generically good, but it doesn't have a true killer app like Haskell's software transactional memory. OCaml is the language people reach for when they need to make their own custom tooling. As a result, it has some really powerful, specialized tools that have very niche use cases, but nothing that a large percentage of developers would really want. Most of the languages that got big also had great learning materials, or were at least pitched as something easy to learn and use. OCaml's educational materials are pretty bad and seem to assume that you already know functional programming and just need to learn how OCaml does things. I'm not confident that I could have learned functional programming and OCaml from the materials that currently exist. (Hopefully that's something you can help fix.) Still, I'm hopeful that all the recent changes will inspire someone will make something really cool. New multi-core runtime, algebraic effects system, good Windows support, the new features Jane Street is testing out. Lots of exciting stuff. And as a result lots more publicity on the crazy tools that people have already made with it. CompCertC, MirageOS, Coq, and the rest aren't things most devs will use. But I can't really imagine anyone making them in *any* amount of time in most other tools.
@macaroni_italic
@macaroni_italic Жыл бұрын
There’s an amazing Cornell course available for free with an online book and hundreds of accompanying videos, which is kept completely up to date. But I’ll admit I didn’t exactly find it with great ease. The most easily findable book is probably “Real World OCaml,” and I definitely felt like it suffered from moving too fast and assuming prior FP experience. It’s more of an intermediate resource. One of the problems I see with a lot of FP learning materials is that they tend to focus on comparing FP against imperative, instead of just teaching you FP from the ground up. It’s nearly impossible to find resources on F# that don’t assume you’re already a professional C# dev.
@MaxHaydenChiz
@MaxHaydenChiz Жыл бұрын
@@macaroni_italic I'll check it out. I hope it is as good as you say. I'm tired of telling people, "I really like OCaml, but you should probably learn Haskell because the learning resources are better."
@MaxHaydenChiz
@MaxHaydenChiz Жыл бұрын
@@macaroni_italic I skimmed the course. Going by the chapter headings, it seems like a good introduction. But it doesn't get to the advanced features of the language like GADTs, existential types, polymorphic variants, and the rest. From the portions I looked it, what it covers, is covered well. And it covers a lot of important topics like property testing. But it does need a follow up that handles the more advanced stuff and helps,you understand when, how, and why to use it.
@macaroni_italic
@macaroni_italic Жыл бұрын
@@MaxHaydenChiz My take is that it's enough to get a person who's new to functional programming started, and then you can confidently go into other materials like "Real World OCaml" without getting lost.
@MaxHaydenChiz
@MaxHaydenChiz Жыл бұрын
@@macaroni_italic I agree that it seems to be a great start. Sorry if that wasn't clear. And you can get a lot of substantial programming done with what it teaches you. But I'm not sure that RWO will help you understand the advanced features if you don't have some general familiarity with the concept.
@pif5023
@pif5023 Жыл бұрын
I took a bet on learning Rust because of the cultish support it is receiving, that may be a more decisive factor then anything else. I honestly can’t say whether it is sensibly better than the competition. I just know it looks less messy than C++
@dmitriidemenev5258
@dmitriidemenev5258 Жыл бұрын
I'd say Rust is better than C++ for the majority of people and companies. I programmed both in C++ and in Rust a lot. I still feel that Rust misses variadic generics and `std::get` for tuples but C++ misses proper metaprogramming. The biggest issue now is the ease of search for talent. It's being resolved, which is amazing.
@colemichae
@colemichae Жыл бұрын
Oh what hehehe heard of it but never was interested in it
@michaelrobb9542
@michaelrobb9542 8 ай бұрын
To be fair applets were way worse than JSP.
@martinpata2899
@martinpata2899 Жыл бұрын
Java is still popular...
@JeyPeyy
@JeyPeyy Жыл бұрын
Imagine taking Haskell and making the syntax ugly and expressions eagerly evaluated. That's Ocaml for ya
@isodoubIet
@isodoubIet Жыл бұрын
Isn't Haskell with ugly syntax just Haskell?
@JeyPeyy
@JeyPeyy Жыл бұрын
@@isodoubIet Haskell's syntax is sexy af.
@isodoubIet
@isodoubIet Жыл бұрын
@@JeyPeyy Semantic whitespace, insane precedence rules, and bizarre made up infix operators make it really quite awful.
@mskiptr
@mskiptr Жыл бұрын
@@isodoubIet You can use { ; } instead of whitespace and put parentheses everywhere. It will look like lisp, but it will work. And if you're really hell-bent on it, you could even use tuples instead of currying
@isodoubIet
@isodoubIet Жыл бұрын
@@mskiptr " You can use { ; } instead of whitespace " Technically yes, but nobody does, which means all code out there I might import, use as reference, or work on, is using semantic whitespace, so the fact that this is at all available is a problem. " And if you're really hell-bent on it, you could even use tuples instead of currying" Currying is not bad. Currying is good. The fact that type expressions associate in the opposite order to usual expressions is the problem.
@relativisticvel
@relativisticvel Жыл бұрын
Rust is just ocaml with Algol-like syntax, borrow checking and lifetimes instead of a gc.
@figloalds
@figloalds Жыл бұрын
I dislike purely functional programming because it's way too abstract, with classic C-like programming you have a clear mental idea of the evaluation process at all times, you think and write in the same way that the code will execute in the metal, with functional programming there's too much constructs that barely anyone truly knows how it works under the hood. Great for mathematicians, shit for people who just want to write a management program for a business or something. Currying is an example of some shit I really really dislike, it's abhorent af, I like having functions clear and statically well defined, no run-time black magic. Functions that return functions for the sake of making stuff more complicated than it needs to be also makes me angry. Functional programmers treat closuring like it's a world wonder, but in reality it's debugging hell in the cooking I do like the idea of Option, Maybe over nullables and exceptions tho, it's smart. But don't get me started on the "shit should be imutable by default", fuck this bullshit. Also immutable collections is kinda stupid, it's training wheels for dumb programmers at the cost of performance, I hate it.
@perigord6281
@perigord6281 Жыл бұрын
Do note that most of your negative points are considered positives by most.
@BrianClark-gh1ms
@BrianClark-gh1ms Жыл бұрын
What you are describing is mostly Haskell, NOT functional programming.
@perigord6281
@perigord6281 Жыл бұрын
@BrianClark-gh1ms apart from currying, which is still pretty common in FP languages (it ages back to the original ML) and I think immutable collections. What they said (closures, immutable by default) does refer to most FP languages even if their experience came from Haskell. But also to refute their points, 1. It's pretty easy to get the evaluation process of something if you atleast know the control flow, which you can, pretty much in any language. It does get harder to imagine the assembly but at the same time, unless you're working at the lowest level, why? Currying as well isn't a runtime thing. A large part of languages like Haskell actually prefers making things compile time verifiable, so I don't know where you're getting your info. Haskell doesn't just magically define a new function at runtime just because a different number of arguments just passed, nor does most statically typed languages. About closures being a debug nightmare: no? Like just no. Also the irony of you calling FP languages "training wheels for dumb programmers" when 70% of your paragraph is you saying you don't understand it.
@figloalds
@figloalds Жыл бұрын
@@perigord6281 It's not pretty easy to get to the evaluation process, when I say "runtime magic" I mean that with classic C-Like programming you know very well defined what is a function, what it takes for arguments and what it returns at all times, you can even document the thing right into the code and the IDE will help; With currying and things being mashed into soup, I can't discern from a glance what is a function, what is supposed to be just a value, what a particular symbol takes and returns, everything looks like just functions stored as variables and it's not organized nor intuitive. It requires a subjective analysis of the symbol name and the assumption that the other programmer isn't a psycho. Now for closures specially in languages with Garbage Collection, and in async/parallel contexts is an absolute nightmare to debug and improve performance, because the GC will check the same things repeatedly and if it's as bad as C# then it will flag everything as "Slow GC" and cause a mess. All of this "immutable by default", "pls write pure functions", "pls avoid side-effects" are things you only need because FP is a little bit insane
@figloalds
@figloalds Жыл бұрын
@@perigord6281 Don't get me wrong, I hate OOP too, specially that horrible mess of unnecessarily encapsulated things and obsessive unnecessary abstractions
@NoX-512
@NoX-512 Жыл бұрын
The name of a language also plays a role in it’s popularity. Ocaml sounds weird to me, so I’ve never even looked at Ocaml source code and probably never will, just because the name is weird. Btw, people who don’t like assembly will never become good programmers.
@Samstercraft77
@Samstercraft77 Жыл бұрын
E
@eqapo
@eqapo Жыл бұрын
If you ever want to see programming without any fundamental language knowledge, what's worse than web dev is game programming.
@aNotoriousPhD
@aNotoriousPhD Жыл бұрын
i wish ocaml had better build tooling. dune feels lacking to me, which is a shame because it’s objectively the coolest named build tool. wish it could be overhauled into something similar to cargo
@zeocamo
@zeocamo Жыл бұрын
1 ............. PHP ftw
@thomassynths
@thomassynths Жыл бұрын
Moderators, ban this man.
@zeocamo
@zeocamo Жыл бұрын
@@thomassynths you can't handle the truth
@zeocamo
@zeocamo Жыл бұрын
@@thomassynths also, i want of course talk about 2010, PHP or C#/java the thing you can pick and that made PHP look really good
@TheMrKeksLp
@TheMrKeksLp Жыл бұрын
Are you trying to safely compare strings in php in your comment?
@jsonkody
@jsonkody Жыл бұрын
What lang eventualy kill C? B-lind 🥸🤙
@jsonkody
@jsonkody Жыл бұрын
Or functional .. F-lashbang 😅
@avithedev
@avithedev Жыл бұрын
Joke is so horrible its funny
@asdqwe4427
@asdqwe4427 Жыл бұрын
Hard to believe this is the same person who hated on functional programming prior to looking at rust
@Macellaio94
@Macellaio94 Жыл бұрын
ocmaml
@cherubin7th
@cherubin7th Жыл бұрын
Reminds me that I often saw the claim that Java (with jit) can be as fast or sometimes faster than C or C++. Old days lol
@tokiomutex4148
@tokiomutex4148 Жыл бұрын
Java with JIT can reach C like speed with 100x more memory
@NdxtremePro
@NdxtremePro Жыл бұрын
@@tokiomutex4148 And facing off against the C compilers at the time Java came out.
@stevenhe3462
@stevenhe3462 Жыл бұрын
Not if you do True OOP™.
@tokiomutex4148
@tokiomutex4148 Жыл бұрын
@@stevenhe3462 aka POOP
@T-Ball-o
@T-Ball-o Ай бұрын
Marketing BS. Java succeeded because Unis didn't want to pay for a compiler. It was free, .
@ShadowKestrel
@ShadowKestrel Жыл бұрын
Coq is built in OCaml. Maybe something to add to your list of deez-type jokes :3
@basione
@basione Жыл бұрын
OCaml absolutely deserves more attention. Fingers crossed! Haskell has a tendency to attract an insufferable set of people, which I'm getting tired of. It's like the BMW of programming languages :)
@emdeization
@emdeization Жыл бұрын
I know your pain. But it's not the languages fault. There are such people everywhere (except python)
@itellyouforfree7238
@itellyouforfree7238 Жыл бұрын
On top of that, the library ecosystem is garbage
@robertkeaney9905
@robertkeaney9905 16 күн бұрын
@@itellyouforfree7238 its gotten a lot better.
@DaLoler1
@DaLoler1 Жыл бұрын
You should do a functional programming vs programming with functions video cause it really is confusing
@ItzAnameOk
@ItzAnameOk Жыл бұрын
A function is a unit of work that most programming languages have. Functional programming is a paradigm like how OOP is a paradigm.
@adriancruz2822
@adriancruz2822 Жыл бұрын
​@@ItzAnameOkthat does not help
@ItzAnameOk
@ItzAnameOk Жыл бұрын
@@adriancruz2822 function = some discrete entity in a language. functional programming = how you program; a programming paradigm. A programming paradigm has formal rules and definitions to program in a certain way. Languages have to support or provide certain features to allow you to code using a programming paradigm or allow you to program in a certain way. Just because a language has functions doesn't mean you can do functional programming in it (C is a good example).
@RasmusSchultz
@RasmusSchultz Жыл бұрын
it's confusing because people make blanket statements about what is or isn't functional programming - filter/map/reduce and functional composition are functional programming techniques, so you are "doing functional programming", how the hell else would you describe what you're doing? there are plenty of overlaps between most languages, and most popular languages today can be described as "multi paradigm" or "multi discipline" - you can practice or lean towards certain paradigms, techniques, or disciplines, in pretty much any mainstream language. You don't need to torture your brain with immutability and monads for 8 years in university before you're allowed to "do some functional programming". Just my opinion, but most of the purist FP languages aren't popular because they're too complicated and not very useful in practice. It's not an exclusive club - take what you can use, take what you like, and apply it where it makes sense. :-)
@macaroni_italic
@macaroni_italic Жыл бұрын
@@adriancruz2822 Imperative programming is oriented around telling the computer *how to* do X. Functional programming is oriented around *simply telling* the computer to do X. Map/filter/reduce are examples of how the raw details of iteration over collections get abstracted away under functional programming. You don't care about index variables or clever loop conditions. You just call map on a collection, pass in a function that will do Y to every element of the collection, and you're off to the races. Those higher-order functions aren't all there is to functional programming, but they're a good representation of the difference between it and imperative programming. FP tries to avoid digging into implementation details as much as possible. Rather, you just combine functions to produce the desired values.
@netvaibhav
@netvaibhav Жыл бұрын
Wasn't ReasonML supposed to be the modern take on OCaml?
@fumseck
@fumseck Жыл бұрын
ReasonML & OCaml are both OCaml under the hood, ReasonML just offers an alternative syntax but they’re the same
@ProjectVastness
@ProjectVastness Жыл бұрын
Some years ago I started ocaml, but I went to Haskell and F# . But F# its basically ocaml with more stuff and other functionalities. Ocaml is so underrated like Erlang. Been doing lot of stuff with FP languages last years, and Haskell and F# are part of my life basically. I started with C , 28/30 years ago, still love C for sure 👌
@franciscoflamenco
@franciscoflamenco Жыл бұрын
I'm really happy that Elixir has somewhat brought up Erlang's goodness to the mainstream. Ditto for F# with OCaml.
@ProjectVastness
@ProjectVastness Жыл бұрын
@@franciscoflamenco totally follow you on that
@ProjectVastness
@ProjectVastness Жыл бұрын
@@franciscoflamenco even though Wolfram and APL still awesome tools
@TheGodSaw
@TheGodSaw Жыл бұрын
I love f#
@macaroni_italic
@macaroni_italic Жыл бұрын
F# is awesome. I wish learning resources were more plentiful and better designed, but I'll admit it's probably the language I'm most interested in picking up right now.
@mskiptr
@mskiptr Жыл бұрын
FP checklist (if you haven't seen it yet): - -20 years of Excel- - some Lisp experience (idk which one tho) - some Haskell-like experience (a day of Elm, then some PureScript, Haskell or Idris) - some Erlang experience (probably Elixir)
@anon-fz2bo
@anon-fz2bo Жыл бұрын
wow never thought id see anyone delusional enough to call Excel a functional programming language. A day of elm != haskell "experience" either.
@mskiptr
@mskiptr Жыл бұрын
​@@anon-fz2bo Excel is the most popular purely functional language on the planet. Change my mind (it even got =LAMBDA([p0, p1, …] ) recently) Of course a day of Elm ain't Haskell. But it very quickly gives you a solid understanding of the basics. You can easily build a mental model for how evaluation works, understand why execution is just an implementation detail and so on. It's small (focused), well-documented and easily approachable. That's what matters for beginners. After a day or two, you can move on to the real deal. You got shadowhammered btw (had to jump through some YT hoops to see your reply)
@Shri
@Shri Жыл бұрын
Clojure is a great language for getting into functional programming. It is the least complex of them all.
@Omnifarious0
@Omnifarious0 Жыл бұрын
I despise Java. I was initially enthused about it when I saw it as a client side language for code that could be moved around the Internet easily. When it became the COBOL of the 2000s, I gave up on it. It amuses me that Javascript became the language for mobile code. I have some hopes for Web Assembly. So... Lua is used as a scripting language embedded in things. I think it's terrible for that for a variety of reasons. I'm a huge fan of Factorio, and it has an amazing modding system that I think is really hampered by the fact it uses Lua. If there were a nice way to use Web Assembly for stuff like that, it would be fantastic.
@njnjhjh8918
@njnjhjh8918 Жыл бұрын
I really have to doubt the notion that people naturally think in 'procedural'. And even if true FP is way better for top-down and bottom up programming
@njnjhjh8918
@njnjhjh8918 Жыл бұрын
Procedural isn't just a list of things to do. Lists of things on a piece of paper generally don't include state.
@ClaudioBrogliato
@ClaudioBrogliato Жыл бұрын
Spot on! The first language I was exposed to was Basic on a Commodore64. Haskell is so hard for me I periodically pick it up and throw it away, yet it fascinates me.
@RasmusSchultz
@RasmusSchultz Жыл бұрын
when people apply functional programming techniques (immutability, pure functions, functional composition, etc.) they're not "doing functional programming"? I mean, what else would you call it. I think we have to use that description, and I think purely functional programming languages should probably be qualified as "purely".
HaskLUL
25:25
ThePrimeTime
Рет қаралды 97 М.
What I Think About AI Taking Your Jobs
17:58
ThePrimeTime
Рет қаралды 91 М.
когда не обедаешь в школе // EVA mash
00:57
EVA mash
Рет қаралды 3,1 МЛН
Как мы играем в игры 😂
00:20
МЯТНАЯ ФАНТА
Рет қаралды 3,1 МЛН
Ocaml First Thoughts
11:49
ThePrimeTime
Рет қаралды 59 М.
How GO Was Created - Less Is More | Prime Reacts
28:15
ThePrimeTime
Рет қаралды 139 М.
I took the #1 Tech Exam and it was BRUTAL
18:28
Linus Tech Tips
Рет қаралды 1,2 МЛН
What If The Universe DID NOT Start With The Big Bang?
18:24
PBS Space Time
Рет қаралды 373 М.
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 80 М.
Rust Absolutely Positively Sucks
20:15
ThePrimeTime
Рет қаралды 248 М.
Breaking down React "head" drama
19:55
Theo - t3․gg
Рет қаралды 47 М.
C Is Not A Language Anymore
34:29
ThePrimeTime
Рет қаралды 227 М.