companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.2.0 released: https://ocaml.org/releases/5.2.0 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
tremon has quit [Quit: getting boxed in]
Frostillicus has quit [Ping timeout: 245 seconds]
Tuplanolla has quit [Quit: Leaving.]
Haudegen has quit [Quit: Bin weg.]
Frostillicus has joined #ocaml
<discocaml> <youngkhalid> As long as it's not about some obscure stuff you're good, but don't trust them too much. Sometimes they may give you some very bad sh!t in the most normal way without you noticing (hallucinations you know)
<discocaml> <youngkhalid> Also for non-trivial stuff, for example, they may give you a bad solution. Then you implement a good one, feed him. that solution, and he will be like "Oh well done you found a very good solution" as if he could've done it xD
<discocaml> <youngkhalid> Also for non-trivial stuff, for example, they may give you a bad solution. Then you implement a good one, feed him that code snippet for example, and he will be like "Oh well done you found a very good solution" as if he could've done it xD
<discocaml> <youngkhalid> llm's in general sck at OCaml and I think that's a good thing : )
<discocaml> <youngkhalid> * correction: they may give you good solutions for small functions like idk **is_even** or idk **filtering a list** for example, but for medium-sized / long functions they're very bad
<discocaml> <youngkhalid> * correction: they may give you good solutions for small functions like idk **is_even** or **filtering a list** for example, but for medium-sized / long functions they're very bad
<discocaml> <contificate> LLMs are quite neat for non-programming tasks (glorified keyword searching, which is basically what a language model is right), which could've been what Dubious was talking about
<discocaml> <contificate> or, at least, I hope that is what they meant
<discocaml> <youngkhalid> maybe ! just wanted to add my two cents to the topic 🙂
<discocaml> <youngkhalid> If that's the case I recommend Perplexity as it integrates recent results from multiple sources, and it's not only based on pre-trained content)
<discocaml> <youngkhalid> (and gives you the references as links to those sources as well if you want to dig deeper)
<discocaml> <youngkhalid> basically implements RAG instead of pure LLM
<discocaml> <dubious245> I feel like at this stage in my development as a crafter of software llms for code generation will degrade my skills rather than improve it.
<discocaml> <youngkhalid> we all think that, but depends on how you use it !
<discocaml> <dubious245> I have um... I the microsoft one through the college though.
<discocaml> <dubious245> I haven't used it.
<discocaml> <dubious245> copilot.
<discocaml> <youngkhalid> copilot is really a thing not to use I think
<discocaml> <youngkhalid> Doesn't even let you think
<discocaml> <youngkhalid> as for llm's, I definitely don’t recommend using it as a primary tool every time you have a task, as that will indeed degrade your thinking and problem solving skills
<discocaml> <youngkhalid> seems like obvious advice, but once you start is hard to notice when you're overusing it, which is what happens to most students
<discocaml> <Kali> the closest thing i ever got to an llm getting any non-trivial task right was asking it to make an ascii ray tracer and then pasting in its solutions to errors until it ran, and surprisingly it worked after like 10 rounds of copy-pasting error messages except that it had positioned the camera inside the object so it looked like it did not work until i manually moved the coordinates; but in general they're so bad at generating code that it's laugh
<discocaml> <youngkhalid> Doesn't even let you think what you want to do
<discocaml> <dubious245> Yeah some of the things I hear about peoples usage terrifying me.
<discocaml> <Kali> they will confidently state falsehoods and try to flatter you every time you ask if you're right
<discocaml> <Kali> and the falsehoods are written in sophisticated enough language to be convincing to those who have average levels of reading comprehension, which is the really concerning part
<discocaml> <Kali> it's quite concerning how widespread the usage of ai is becoming among students
<discocaml> <Kali> even people that i never would have expected to, they immediately fall back to chatgpt when they don't understand something and then confidently regurgitate whatever garbage it spat at them
<discocaml> <youngkhalid> the AI generated programs made by endlessly feeding code in a trial-and-error loop are so garbage, like even a snake game can be so error-prone and sh!tty that It's obvious that it wasn't even created by a bad coder, it's just straight trash
<discocaml> <dubious245> I think that is my biggest concern I know they make stuff up and they make it sound like a really nice lie. Then people take it at face value.
<discocaml> <youngkhalid> That's why understanding how programs work, how clean/robust code looks like is more important
<discocaml> <youngkhalid> And I honestly think we'll never replace good software engineers, no matter how much this LLM stuff evolves (*a lot of people will be against this statement, but only time will tell*)
<discocaml> <youngkhalid> it can help replace some of the people that weren't understanding the tools they were working with, but not all engineers
<discocaml> <youngkhalid> Only people I can see thinking that is the people that would like that to happen (stakeholders, CEO's / tech bro's that never implemented anything for real)
<discocaml> <almehym> I think it's tough to be suspicious of things that you yourself aren't quite an expert in yet
<discocaml> <almehym> That's one of the ways it's tricky
<discocaml> <youngkhalid> (and no, it's not denial, I don't even care about the market, I do this stuff because I like it rather than for getting a job)
<discocaml> <contificate> I'm in the "it's just a matter of time" camp about these topics generally. I think people are unfavourably reviewing LLMs based on using them in a chatbot-style interaction.
<discocaml> <contificate> I truly believe I'll live to see the day when most mathematics research is done by computers.
<discocaml> <dubious245> Unfortunately It doesn't matter what we think only what stockholders and ceos think.
<discocaml> <dubious245> Yeah but who wants to do math?
<discocaml> <dubious245> :mbDerp:
<discocaml> <contificate> who wants to do programming
<discocaml> <dubious245> I do.
<discocaml> <youngkhalid> I believe that we'll always need human supervision regarding automation (it can be less or more, but you'll need them somewhere), no matter at which scale
<discocaml> <dubious245> I think its fun.
<discocaml> <contificate> unfortunate
<discocaml> <dubious245> I know right?
<discocaml> <sotesukeyamaha> Programming is fun in OCaml :3
<discocaml> <dubious245> Ocaml definitely resparked the joy of programming that has been getting beaten out of me.
<discocaml> <contificate> amazing what not having to care about irrelevant details does
<discocaml> <dubious245> It aligns very closely with how I want to solve problems and note them down.
<discocaml> <youngkhalid> java took it out out of me, so when I'm sad I just open **utop** and play with it
<discocaml> <youngkhalid> it's my new secret hobby
<discocaml> <youngkhalid> xD
<discocaml> <youngkhalid> I be oding an imaginary workshop to people as If I was teaching them OCaml and its power
<discocaml> <youngkhalid> I be making an imaginary workshop to people as If I was teaching them OCaml and its power
<discocaml> <youngkhalid> I be making an imaginary workshop to people in my head as If I was teaching them OCaml and its power
myrkraverk_ has joined #ocaml
<discocaml> <dubious245> I've debated making a blog or youtube video about my ocaml stuff but I know its a mess and dont wish to share.
<discocaml> <youngkhalid> the world needs more OCaml videos in yt
<dh`> I have yet to see any evidence that it's either faster or more accurate to have an LLM write some code and then audit it vs. just writing it myself
<discocaml> <youngkhalid> the current king in that ifor now is the Cornell guy 😂
<discocaml> <sotesukeyamaha> I did find LLM useful to generate documentation. Though sometimes it hallucinates functionalities that you didn't put or misunderstands the purpose of a constant. I think it heavily relies on the naming convention and your choice of words. My OCaml teacher used a lot of abbreviations and 3 letter functions/constant names and it was quite difficult to understand when I started to learn
<discocaml> <youngkhalid> the current king in that, for now, is the Cornell guy 😂
<discocaml> <dubious245> Love the Cornell guy.
<discocaml> <contificate> the main thing that upsets me about LLMs is that it allows our already-saturated industry to be saturated with low-effort slop
myrkraverk has quit [Ping timeout: 252 seconds]
<discocaml> <contificate> it's like its own class of joke now, in the Twittersphere
<discocaml> <dubious245> I look forward to the day there is so much LLM introduced vulnerabilities that doing bug bounties is like shooting fish in a barrel.
<discocaml> <contificate> all these clowns in "founder mode" joking about b2b saas with vibecoded nonsense and chatgpt wrappers - yet.. it's not a joke, it's what they are actually doing
Frostillicus has quit [Ping timeout: 245 seconds]
<discocaml> <contificate> the parody would be more amusing if it wasn't actual the reality of the situation
<discocaml> <contificate> the parody would be more amusing if it wasn't actually the reality of the situation
<discocaml> <youngkhalid> because they're good at what what they were initially made for, generating text, the code thing is just something we said "oh, we could use it for this as well !" and from his pre-trained data it gave it to us -> they fed the llm's more code -> got better -> vibe coders appeared -> markets saturated -> speculations went up and non-technical people such as CEO's started the "end of swe's" bubble
<discocaml> <youngkhalid> because they're good at what they were initially made for, generating text, the code thing is just something we said "oh, we could use it for this as well !" and from his pre-trained data it gave it to us -> they fed the llm's more code -> got better -> vibe coders appeared -> markets saturated -> speculations went up and non-technical people such as CEO's started the "end of swe's" bubble
<discocaml> <dubious245> Wasn't it shown in a paper that once AI's start consuming their own output they start to degrade pretty quickly? I imagine with so much AI content out there its getting harder and harder to find good content to feed into them.
<discocaml> <youngkhalid> I'll be waiting for the day the "all of you swe's will be replaced" bubble explodes
<discocaml> <dubious245> It might not?
<discocaml> <youngkhalid> i heard gpt was already getting worse and they couldn't know why
<discocaml> <sotesukeyamaha> sounds like inbreeding
<discocaml> <dubious245> Good enough is good enough. Companies don't care about quality.
<discocaml> <youngkhalid> As I said, it's my own opinion of course, it might replace some people (maybe a mojority) , but not everyone. We'll still need competent engineers ( humans) somewhere
<discocaml> <youngkhalid> As I said, it's my own opinion of course, it might replace some people (maybe a mojority) , but not everyone. We'll still need competent engineers ( humans) somewhere in the chain
<discocaml> <youngkhalid> As I said, it's my own opinion of course, it might replace some people (maybe a majority) , but not everyone. We'll still need competent engineers ( humans) somewhere in the chain
<discocaml> <youngkhalid> now, everyone is free to think what they want : )
<discocaml> <dubious245> That's basically what it is? Right like there has to be biases in there and if some of those biases keep getting reinforced by its own output they'll eventually consume everything else.
<discocaml> <youngkhalid> My advice is that this is the time where we shouldn't hop on the "unlearning" because of the excessive use of AI, and start learning hte most stuff / improve our skills
<discocaml> <dubious245> I am not an AI researcher by the way. So I could be completely wrong.
<discocaml> <youngkhalid> My advice is that this is the time where we shouldn't hop on the "unlearning" wave because of the excessive use of AI, and start learning the most stuff / improve our skills
<discocaml> <cod1r> hi
<discocaml> <dubious245> Hello.
<discocaml> <youngkhalid> My advice is that this is the time where we shouldn't unintentionally hop on the "unlearning" wave because of the excessive use of AI, and start learning the most stuff / improve our skills
<discocaml> <youngkhalid> My advice is that this is the time where we shouldn't accidentally hop on the "unlearning" wave because of the excessive use of AI, and start learning the most stuff / improve our skills
<discocaml> <contificate> I think it'd be good to get a job in the trades, y'know
<dh`> every time you edit a comment it posts it again to irc
<discocaml> <youngkhalid> my bad
<discocaml> <dubious245> I don't think 'Get a job in the trades' is a fix all solution. Trades are pretty miserable and the people in them will go out of their way to make you more miserable.
<discocaml> <contificate> can be self-employed and set your own hours
<discocaml> <dubious245> Yeah they all say that till they realize they have no clue how to get customers, manage inventory, or do fiances.
<discocaml> <dubious245> thank you you spell check.
<discocaml> <yawaramin> now i'm missing the good old days of arguing about parsers
<discocaml> <contificate> yes but as software engineers, we're all charismatic, have played minecraft (inventory management), and have gnucash installed, right
<discocaml> <yawaramin> well, ledger, but yeah
<discocaml> <dubious245> I don't think people appreciate how hard it is to get customers when you first start out, like sales people do a pretty valuable job. Provided you have an actual product or service to sell.
<discocaml> <contificate> I think I could have certain gimmicks that would be considered as valuable
<discocaml> <contificate> like I could just be known for night callouts or something
<discocaml> <contificate> as a plumber
<discocaml> <contificate> can wax lyrical about OCaml as I stop the leak in someone's bathroom
<discocaml> <yawaramin> maybe that's what we've been missing in OCaml evangelism–get people to go into trades and spread OCaml to their customers
<discocaml> <cod1r> me and colin would be the best plumbing crew
<discocaml> <cod1r> i stg
<discocaml> <dubious245> You say this till you go to the job and the leak is three feet under a slab foundation.
<discocaml> <dubious245> So the place I work at did their inventory and customer tracking software in house, then spun it off into its own company that now sales that software to others. But the original company did a regular trade.
<discocaml> <dubious245>
<discocaml> <dubious245> So that is legitimately probably a way to spread ocaml. Is have a normal business, write the software for it in house, then go try and sale that software later on once its battle tested.
<discocaml> <contificate> I've told you about this, don't use my first name in here, only my street names; "caml boy", "lil camel", etc. can't be seen to be lacking by IRC users
<discocaml> <cod1r> oh sry
<discocaml> <cod1r> me and contificate would be the best plumbing crew
<discocaml> <yawaramin> the Rails approach
<discocaml> <contificate> We should be convincing senior engineers to rewrite crucial components in OCaml - if we strike a few key industries, we'll have guaranteed employment
<discocaml> <dubious245> Unfortunately that in house software was written in java. 😦
<discocaml> <contificate> comfy
_whitelogger has joined #ocaml
<discocaml> <yawaramin> the problem is once we have some stuff in OCaml the Rust Evangelism Strike Force will...well...strike
<discocaml> <yawaramin> eg Pyre -> Pyrefly
<discocaml> <dubious245> I tried rust I really did I just didn't like it.
<discocaml> <dubious245> Everything felt very brittle with the borrow checker. When the borrow checker fails and tells you to figure it out its usually a non-trivial problem. Peoples suggestions online usually amount to sticking everything into a vector and just index into it and doing manual memory management by managing your indexes. Like guys the reason that works is because you are circumventing the borrow checker to do the thing the borrow checker was designed
_whitelogger has joined #ocaml
<discocaml> <youngkhalid> Unlike OCaml, their safety comes with a big DX cost imo, looking back I don't know how RUST got so popular but its father didn't , I guess it's all the tooling around it (+ the free marketing from its community of course)
<discocaml> <youngkhalid> I mean, ok Rust you're a very safe language whatever but I want to get stuff **DONE** 😂
<discocaml> <dubious245> I wish I found ocaml instead of rust back then.
<discocaml> <dubious245> The only thing rust taught me is how not to implement linear types.
Frostillicus has joined #ocaml
<discocaml> <youngkhalid> or syntactically, the amount of .unwrap()"s and stuff like that you have to do, when reading other people's code it almost feels like decoding a hieroglyph
<discocaml> <youngkhalid> but overall, it's usable. It's just another way of doing things (still better than C++ and its black hidden magic)
<discocaml> <youngkhalid> but overall, it's usable. It's just another way of doing things (still better than C++ and its hidden black magic)
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 248 seconds]
<discocaml> <dubious245> I do recall trying to read some 'production' rust code amd being overwhelmed by the sheer amount of macros used to do everything.
<discocaml> <dubious245>
<discocaml> <dubious245> Code usually alternated between doing stuff in ways that are barely better than unsafe or being so full of macros its difficult for an outsider to understand the code at all.
<dh`> rust is popular among folks whose standard is C++
<dh`> it's an improvement in that context, plus they probably already have masochistic tendencies :-)
bibi_ has quit [Remote host closed the connection]
Frostillicus has quit [Ping timeout: 276 seconds]
<discocaml> <xavierm02_> While OCaml code has less noise and is generally easier to write and read, Rust does have a few perks:
<discocaml> <xavierm02_> - Having traits, while clearly not the right way of doing things, lets you erite code *today* without specifying all instances like you would in current OCaml, which is fairly pleasant;
<discocaml> <xavierm02_> - Iterators are fairly nice, and when defining a new type you typically only define functions from and into iterators, and then get map filter etc. for free;
<discocaml> <xavierm02_> - For concurrent and / or parallel code, the type checker is able to detect many errors that would be runtime errors in OCaml, and the interfaces are generally nicer (e.g. `Mutex` that wraps the value instead of just living besides it).
<discocaml> <xavierm02_> While OCaml code has less noise and is generally easier to write and read, Rust does have a few perks:
<discocaml> <xavierm02_> - Having traits, while clearly not the right way of doing things, lets you write code *today* without specifying all instances like you would in current OCaml, which is fairly pleasant;
<discocaml> <xavierm02_> - Iterators are fairly nice, and when defining a new type you typically only define functions from and into iterators, and then get map filter etc. for free;
<discocaml> <xavierm02_> - For concurrent and / or parallel code, the type checker is able to detect many errors that would be runtime errors in OCaml, and the interfaces are generally nicer (e.g. `Mutex` that wraps the value instead of just living besides it).
<discocaml> <cod1r> repr_c
<discocaml> <cod1r> and c types
<discocaml> <cod1r> without actually having to write c
Tuplanolla has joined #ocaml
Haudegen has joined #ocaml
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
bartholin has joined #ocaml
alexherbo2 has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 276 seconds]
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 245 seconds]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
Frostillicus has joined #ocaml
wbooze has quit [Quit: Leaving]
<discocaml> <peuk> Super lightweight runtime.
<discocaml> <peuk> Even if some parts of the generated code related to memory monitoring can be quite heavy.
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 252 seconds]
Frostillicus has quit [Ping timeout: 252 seconds]
wbooze has joined #ocaml
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 276 seconds]
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 260 seconds]
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 260 seconds]
tremon has joined #ocaml
<companion_cube> Tbh the wrapping Mutex isn't hard to do in ocaml
<discocaml> <edhebi> honestly I prefer traits to ocaml's first type modules or long lists of cases
<discocaml> <edhebi> but also i've written more haskell than ocaml
YuGiOhJCJ has joined #ocaml
<discocaml> <dubious245> Oh traits would be nice.
<discocaml> <yawaramin> i don't seem to miss them in OCaml
<companion_cube> I miss them but what can you do
gareppa has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
Anarchos has joined #ocaml
gareppa has quit [Quit: WeeChat 4.3.1]
pi3ce has quit [Read error: Connection reset by peer]
pi3ce has joined #ocaml
<discocaml> <yawaramin> ok figured out how to make Angstrom parsers show the exact text that failed to parse in the error message: https://dev.to/yawaramin/easy-parsing-with-reasonable-error-messages-in-ocamls-angstrom-g5f
Frostillicus has joined #ocaml
<discocaml> <youngkhalid> Did you find it easier to use / better documented than Menhir ?
<discocaml> <yawaramin> i've never tried Menhir
<discocaml> <yawaramin> but i find parser combinators easier and simpler to understand than defining formal grammars and all that finicky stuff
Frostillicus has quit [Ping timeout: 245 seconds]
wingsorc__ has joined #ocaml
wingsorc has quit [Ping timeout: 244 seconds]
emacs_pprentice_ has joined #ocaml
wingsorc__ has quit [Read error: Connection reset by peer]
wingsorc__ has joined #ocaml
emacs_pprentice_ has quit [Read error: Connection reset by peer]
Frostillicus has joined #ocaml
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
Frostillicus has quit [Ping timeout: 245 seconds]
wingsorc__ has quit [Quit: Leaving]
Frostillicus has joined #ocaml
<discocaml> <alyxshang> Who wants to see an aesthetic Neovim colorscheme?
<discocaml> <alyxshang> (Made by yours truly.)
Frostillicus has quit [Ping timeout: 252 seconds]
chrisz has quit [Quit: leaving]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Frostillicus has joined #ocaml
chrisz has joined #ocaml
tremon has quit [Quit: getting boxed in]
cr1901_ has quit [Read error: Connection reset by peer]
cr1901 has joined #ocaml
bartholin has quit [Remote host closed the connection]
Haudegen has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
Der_Teufel has joined #ocaml
germ_ has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
Frostillicus has quit [Ping timeout: 260 seconds]
terrorjack has quit [*.net *.split]
DerTeufel has quit [*.net *.split]
germ- has quit [*.net *.split]
Fardale has quit [*.net *.split]
polykernel has quit [*.net *.split]
Ankhers has quit [*.net *.split]
whereiseveryone has quit [*.net *.split]
lane has quit [*.net *.split]
ursa-major has quit [*.net *.split]
dmoerner has quit [*.net *.split]
thizanne has quit [*.net *.split]
<discocaml> <youngkhalid> Well found this interesting (at least llm's can be useful for this xD)
Fardale has joined #ocaml
terrorjack has joined #ocaml
polykernel has joined #ocaml
Ankhers has joined #ocaml
whereiseveryone has joined #ocaml
ursa-major has joined #ocaml
lane has joined #ocaml
dmoerner has joined #ocaml
thizanne has joined #ocaml
<discocaml> <yawaramin> i'd say Menhir parse error messages also depend on how it's implemented
<discocaml> <contificate> I'd say listing "LALR(1)" in the table is incorrect
<discocaml> <yawaramin> like with the OCaml parser try `let if = ()`, you get just `Error: Syntax error`. not very helpful
<discocaml> <youngkhalid> I think it's listed because Menhir is compatible with ocamlyacc (which uses LALR(1) only)
<discocaml> <contificate> thanks, ChatGPT
<discocaml> <youngkhalid> it's literally in menhir's docs main page xd
<discocaml> <contificate> I jest, you have a double space where I assume you pasted output from ChatGPT
<discocaml> <youngkhalid> nah, + i don't use gpt im sure he'll just invent what menhir is
<discocaml> <youngkhalid> but from time to time i may use LLM instead of googling
<discocaml> <youngkhalid> when I need like a comparison
<discocaml> <youngkhalid> as I said before for the angstrom stuff
<discocaml> <contificate> I recommend trying out all of these things - there's no one size fits all in parsing
<discocaml> <youngkhalid> I think the best thing would to : implement your own thing from scratch -> play with different tools like Menhir / Angstrom
<discocaml> <youngkhalid> To really understand what happens under the hood, and then see what's the best tool for your use case
<discocaml> <contificate> users of parser combinators tend to fuse lexing and parsing together, which can be quite neat and self-contained
<discocaml> <contificate> and Angstrom has a good buffered mode for parsing network protocols etc. when you may not receive all the bytes at the same time, e.g. you may just get an async callback that gives you `n` bytes at a time
<discocaml> <contificate> there's a lot of parser code written in C that needs to work in a buffered way and it effectively amounts to maintaining a state machine
<discocaml> <contificate> whereas monadic parser combinators kind of get this property for free, by way of being monadic (read: effectively in CPS)
<discocaml> <contificate> what's "been parsed so far" are just referenced as free variables within the subsequent continuation closures
<discocaml> <contificate> in some sense, you could derive the C code people write manually by way of defunctionalisation
<discocaml> <contificate> very cute when you make those connections
<discocaml> <yawaramin> also they give you recursive descent parsers 'for free'