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/
humasect has joined #ocaml
humasect has quit [Read error: Connection reset by peer]
humasect has joined #ocaml
leah2 has quit [Ping timeout: 276 seconds]
troydm has joined #ocaml
leah2 has joined #ocaml
humasect has quit [Quit: Leaving...]
<discocaml> <dyslexicsteak> doesn't windows arm have wsl
m5zs7k has quit [Ping timeout: 248 seconds]
m5zs7k has joined #ocaml
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
<discocaml> <jalsol> Windows ARM is a crazy combo
<discocaml> <jalsol> it's not that questionable once you understand the concept of the language later
<discocaml> <jalsol> OCaml, due to being functional, is expression-oriented, so you would write a big chunk of code (which evaluates to an expression) then end with `;;`
<discocaml> <jalsol> OCaml, due to being functional, is expression-oriented, so you would write a big chunk of code (which evaluates to an expression) then end with `;;` once
<discocaml> <yawaramin> `;;` is not for ending expressions, it's for ending 'statements'
<discocaml> <yawaramin> also, not needed in source code. only needed in REPL
<discocaml> <jalsol> wording, my bad
<discocaml> <jalsol> well most "statements" in OCaml are expressions bound to a variable at the top level
<discocaml> <jalsol> so my brain naturally thinks that way
<discocaml> <jalsol> although `;;` is not needed in source code, the Jane Street ocamlformat profile does add `;;` and I find that reasonable
<discocaml> <jalsol> e.g. when I want to add a function in the middle of the file but have no clue for its implementation yet,
<discocaml> <jalsol>
<discocaml> <jalsol> ```ml
<discocaml> <jalsol> let new_fun a b =
<discocaml> <jalsol> (* todo *)
<discocaml> <jalsol> ;;
<discocaml> <jalsol>
<discocaml> <jalsol> let add a b = a + b
<discocaml> <jalsol> ```
<discocaml> <jalsol>
<discocaml> <jalsol> `;;` would keep the error message more local to `new_fun`, instead of spreading to `add`
<discocaml> <yawaramin> when i want to add a new function and implement it later, i don't want the compile to fail, i want to be able to keep compiling and working. so i just do something like `let new_fun a b = assert false`
<discocaml> <jalsol> that makes sense, I do that too but is there to attach a message with the assert?
<discocaml> <jalsol> that makes sense, I do that too but is there a way to attach a message with the assert?
<discocaml> <yawaramin> `failwith "todo"`
<discocaml> <jalsol> wait I'm so dumb I literally do that all the time
<discocaml> <jalsol> but yeah the `;;` thing is short-bust and also it feels visually clearer to me
<discocaml> <jalsol> but yeah the `;;` thing is short-burst and also it feels visually clearer to me
YuGiOhJCJ has joined #ocaml
<dh`> what I do is add 'exception Foo' at the top of affected files, and 'raise Foo' in the code
<dh`> it's much easier to grep for afterwards
<dh`> especially since most of the time you'll have a not insignificant number of _real_ "assert false"
dylanj has quit [Remote host closed the connection]
bartholin has joined #ocaml
Serpent7776 has joined #ocaml
Haudegen has joined #ocaml
<discocaml> <edhebi> I see that kind of things often but honestly I'm not sure I've ever ran grep on a codebase
Tuplanolla has joined #ocaml
agentil has joined #ocaml
agentil has quit [Quit: agentil]
agentil has joined #ocaml
<discocaml> <shalokshalom> *Eeeehhh* I read that book as someone who has never programmed before.
<discocaml> <shalokshalom> Its not a bad book, and I recommend it to people that are currently studying.
<discocaml> <shalokshalom> but its definitely to academdic and dry (like most in OCaml) to really make complete newbies happy.
<discocaml> <shalokshalom> Jane Street recommends it for improved error reporting, or debugging afaik?
agentil has quit [Quit: agentil]
agentil has joined #ocaml
<discocaml> <._null._> It can help better locate syntax errors. At some point, this stops being useful since you know the syntax
agentil has quit [Quit: agentil]
agentil has joined #ocaml
agentil has quit [Quit: agentil]
agentil has joined #ocaml
agentil has quit [Quit: agentil]
agentil has joined #ocaml
malte has quit [Remote host closed the connection]
malte has joined #ocaml
Frostillicus has joined #ocaml
Frostillicus has quit [Read error: Connection reset by peer]
dylanj has joined #ocaml
Frostillicus has joined #ocaml
<discocaml> <dubious245> `failwith "Todo"` seems very clear and searchable to me.
<discocaml> <otini_> not sure what’s the relation with ;;
malte has quit [Remote host closed the connection]
malte has joined #ocaml
Frostillicus has quit [Ping timeout: 276 seconds]
Haudegen has quit [Quit: Bin weg.]
Frostillicus has joined #ocaml
johnridesabike has joined #ocaml
agentil has quit [Ping timeout: 276 seconds]
agentil__ has joined #ocaml
agentil__ is now known as agentil
Frostillicus has quit [Ping timeout: 252 seconds]
<discocaml> <deepspacejohn> It sounds like the original suggestion was to contain compile error locations to the incomplete code. `failwith "todo"` would be for when you still want to compile/run the code.
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
<discocaml> <deepspacejohn> (I'm on team `failwith "todo"` personally.)
Haudegen has joined #ocaml
Frostillicus has joined #ocaml
<discocaml> <otini_> my bad, I had only read part of the conversation
toastal has joined #ocaml
Everything has joined #ocaml
Frostillicus has quit [Ping timeout: 276 seconds]
Everything has quit [Read error: Connection reset by peer]
Frostillicus has joined #ocaml
Everything has joined #ocaml
Frostillicus has quit [Ping timeout: 265 seconds]
Haudegen has quit [Quit: Bin weg.]
agentil has quit [Ping timeout: 252 seconds]
Frostillicus has joined #ocaml
myrkraverk has joined #ocaml
Haudegen has joined #ocaml
Frostillicus has quit [Read error: Connection reset by peer]
Frostillicus has joined #ocaml
Frostillicus has quit [Read error: Connection reset by peer]
Frostillicus has joined #ocaml
euphores has quit [Quit: Leaving.]
euphores has joined #ocaml
Frostillicus has quit [Read error: Connection reset by peer]
Anarchos has joined #ocaml
wbooze has quit [Ping timeout: 272 seconds]
Everything has quit [Quit: leaving]
inline has quit [Quit: Leaving]
wbooze has joined #ocaml
Frostillicus has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 248 seconds]
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 276 seconds]
Frostillicus has quit [Read error: Connection reset by peer]
Frostillicus has joined #ocaml
toastal has left #ocaml [#ocaml]
_whitelogger has joined #ocaml
Frostillicus has quit [Ping timeout: 248 seconds]
Frostillicus has joined #ocaml
Frostillicus has quit [Read error: Connection reset by peer]
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 276 seconds]
Anarchos has quit [Ping timeout: 272 seconds]
Frostillicus has joined #ocaml
m5zs7k has quit [Ping timeout: 268 seconds]
m5zs7k has joined #ocaml
Serpent7776 has quit [Ping timeout: 244 seconds]
patrick_ is now known as patrick
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 276 seconds]
wbooze has quit [Ping timeout: 252 seconds]
patrick is now known as Guest7691
Guest7691 has quit [Killed (zinc.libera.chat (Nickname regained by services))]
patrick_ has joined #ocaml
Frostillicus has quit [Read error: Connection reset by peer]
Frostillicus has joined #ocaml
bartholin has quit [Remote host closed the connection]
Frostillicus has quit [Ping timeout: 276 seconds]
myrkraverk_ has quit [Ping timeout: 260 seconds]
malte has quit [Remote host closed the connection]
Frostillicus has joined #ocaml
malte has joined #ocaml
malte has quit [Remote host closed the connection]
malte has joined #ocaml