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/
Tuplanolla has quit [Quit: Leaving.]
raskol has quit [Ping timeout: 252 seconds]
infinity0 has quit [Ping timeout: 245 seconds]
infinity0 has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
raskol has joined #ocaml
myrkraverk__ has quit [Read error: Connection reset by peer]
myrkraverk has joined #ocaml
terrorjack4 has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack4 has joined #ocaml
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #ocaml
spew has quit [Quit: spew]
raskol has quit [Ping timeout: 252 seconds]
<discocaml> <jobhdez> Is ocaml used for performance computing? Can it be used for this?
<discocaml> <andrew.01604> I’ll help 20 people on how to earn $100k or more within 72hours from the Crypto Market, but you’ll pay me a 10% of your profit when you receive it. Ask me how!!
<discocaml> <andrew.01604> If interested, send me a direct message. For more information…contact via.. TG or WhatsApp
<discocaml> <andrew.01604> @official_andrew012
<discocaml> <andrew.01604> ‪+1 (424) 424‑6672‬
<discocaml> <andrew.01604> https://t.me/official_andrew012
<discocaml> <anmonteiro> ^ @admin
pi3ce has quit [Read error: Connection reset by peer]
pi3ce has joined #ocaml
<discocaml> <softwaresirppi> That's enough for me then... I couldn't go back to the messy mutating languages
<discocaml> <softwaresirppi> I'll help you get banned 😅
<discocaml> <softwaresirppi> You mean number crunching? Have you checked out owl package?
<discocaml> <jobhdez> yeah ive heard owl. thanks. owl is nice.
<discocaml> <jobhdez> what about for compiler engineering? is ocaml better than haskell? 🙂
<discocaml> <softwaresirppi> I've tried haskell for a month... If it had better tooling (like package managers) and a good documentation I would've stayed
<discocaml> <softwaresirppi> But a handful a compilers are written in Ocaml...
<discocaml> <softwaresirppi> Im not qualified to say anything... Just dropping it
toastal has joined #ocaml
<discocaml> <jobhdez> Thanks
<discocaml> <gooby_clown> It's arguably nicer for compilers since some compiler algos are pretty mutable and imperative and OCaml makes that more straightforward
<dh`> IMO it's preferable for compilers because laziness makes large projects undebuggable
<dh`> the other thing is that ocamlopt is a hell of a lot faster than ghc
<discocaml> <gooby_clown> O my Caml \<3
<discocaml> <gooby_clown> Laziness should be limited to data structures tbh
honeydatax has joined #ocaml
Serpent7776 has joined #ocaml
<discocaml> <softwaresirppi> why
<discocaml> <softwaresirppi> at the end, when we are using the value its guaranteed to be evaluated right?
<discocaml> <softwaresirppi> woww! I wonder what camel does better!!!
Serpent7776 has quit [Ping timeout: 252 seconds]
honeydatax has quit [Quit: Leaving]
<discocaml> <softwaresirppi> Guys I wonder why some commands have `-o` flag for output... Why can't they just print out to stdout then we can redirect it to another file
<discocaml> <softwaresirppi> why is it taking on a shell's responsibility
bartholin has joined #ocaml
pi3ce has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
honeydatax has joined #ocaml
Tuplanolla has joined #ocaml
<discocaml> <octachron> You don't want to ever print out binary data to a shell.
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
<discocaml> <octachron> Concerning laziness, it is not the final value that will be evaluated but the minimal part of the computation graph needed to compute this value.
<discocaml> <octachron> This tend to make complexity analysis more complex, in particular on the space axis. Consequently, debugging memory leaks is an important part of learning how to write efficient haskell.
<discocaml> <softwaresirppi> the terminal/terminal_emulator should be responsible for that? isnt it?
<discocaml> <octachron> No? If a program send data to stdout, the terminal should print this data.
<discocaml> <softwaresirppi> it still looks good to me. memory leak? can you give me a snippet where laziness is the demon? ive always thought laziness is the pinicle of abstraction
<discocaml> <softwaresirppi> (only printable data)
<discocaml> <softwaresirppi> https://www.youtube.com/watch?v=qwIAjB99ucw
<discocaml> <softwaresirppi>
<discocaml> <softwaresirppi> A QUARTER MEGABYTE OF MEMORY 🗣️
<discocaml> <octachron> Aka laziness is a leaky abstraction/a visible effect.
<discocaml> <softwaresirppi> oops. BEHOLD a leaky abstraction!! an abstraction which requires you to pull up the rug
<discocaml> <softwaresirppi> "unix compilers are slow. so to entertain myself instead of waiting, i can play asteroids" 😂
<discocaml> <softwaresirppi> wow i didnt know C compilers were slowww
omniscient has joined #ocaml
Serpent7776 has joined #ocaml
<discocaml> <ada2k> trying to tell between binary data and weird text is, i imagine, very difficult
<discocaml> <ada2k> it’s easier to do this at the application level
<discocaml> <softwaresirppi> 32 <= character ??
<discocaml> <softwaresirppi> anyways why do we even have record types when we could use a hashmap
<discocaml> <softwaresirppi> (i get the performance and type system implications. anything other than that?)
<discocaml> <lukstafi> Gotcha when using weak arrays as cache: there can be a gap between the finalizer run and weak array value erasure; one solution is an `is_finalized` flag inside the value that you check on weak array retrieval.
honeydatax has quit [Remote host closed the connection]
honeydatax 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]
honeydatax has quit [Quit: Leaving]
troydm has joined #ocaml
<discocaml> <softwaresirppi> weak arrays meaning its no longer needed and could be collected by the garbage man?
omniscient has quit [Ping timeout: 244 seconds]
omniscient has joined #ocaml
gareppa has joined #ocaml
omniscient has quit [Remote host closed the connection]
honeydatax has joined #ocaml
<discocaml> <softwaresirppi> are if statements `if x then y else z` just syntactic sugar for `match x with true -> y | false -> z` ?
<discocaml> <softwaresirppi> or... is there anything im missing?
<discocaml> <softwaresirppi> are if expressions `if x then y else z` just syntactic sugar for `match x with true -> y | false -> z` ?
alexherbo2 has joined #ocaml
<discocaml> <contificate> They're not syntactic sugar for that, but that is equivalent.
<discocaml> <softwaresirppi> then why two things for the same functionality
<discocaml> <softwaresirppi> match is more powerful
f[x] has joined #ocaml
<discocaml> <contificate> convenience, same reason there's sequencing with `;` that you don't need because you could just use `let () = .. in let () = ..`
<discocaml> <contificate> the `if` form also allows you to drop the false branch in some contexts
<discocaml> <yawaramin> let div x y = (if y = 0 then invalid_arg "divide by zero"); x / y
raskol has joined #ocaml
honeydatax has quit [Quit: Leaving]
f[x] has quit [Remote host closed the connection]
tremon has joined #ocaml
Haudegen has joined #ocaml
<discocaml> <._null._> You might as well consider it to be syntactic sugar
<discocaml> <softwaresirppi> i tried writing it and got owned `let (<!>) f g = let _ = f in let _ = g in ()`
<discocaml> <softwaresirppi> it seems like the functions get evaluated before passing to `<!>`
<discocaml> <softwaresirppi> is there anyway to make them not evaluate? like lisp's (quote ...)?
<discocaml> <softwaresirppi> i wish all operators are overloadableee even the `;`;
<discocaml> <softwaresirppi> i wish all operators are overloadableee even the `;`
<discocaml> <Kali> ocaml is strict, not lazy like haskell
<discocaml> <Kali> `;` is not an actual operator but a type of syntax
<discocaml> <softwaresirppi> cool
<discocaml> <softwaresirppi> saddd
<discocaml> <Kali> wrap them in a `fun () -> ` and evaluate it in the function body
<discocaml> <._null._> `(&&)` is an overloadable operator which is not strict (in its second argument) by default, but as soon as you change its definition it becomes strict again
<discocaml> <softwaresirppi> `let div x y = if y = 0 then invalid_arg "wtf did you pass in, bruh?" else x / y` is also a thing
<discocaml> <softwaresirppi> yeahhh shortcircuitt
<discocaml> <softwaresirppi> strictness is not bad though
<discocaml> <softwaresirppi> thats clever
<discocaml> <Kali> ocaml also has lazy expressions that you can construct with `lazy ...` and force with `Lazy.force` so you could use that instead but it's easier to use `fun () ->` if you only use the value once
<discocaml> <softwaresirppi> seems like list elements and function arguments are evaluated from right to left
<discocaml> <softwaresirppi> cool
<discocaml> <softwaresirppi> i see
<discocaml> <softwaresirppi> `fun` is an odd keyword
<discocaml> <softwaresirppi> lol
<discocaml> <contificate> gotta remind yourself you're having fun
<discocaml> <Kali> yes, they are
<discocaml> <contificate> the "right to left" thing is to be consistent with the bytecode impl
<discocaml> <contificate> but is not formally specified for the native impl, but the consistency is the reason
<discocaml> <softwaresirppi> HOW
<discocaml> <softwaresirppi> WHY BYTECODE CHAR ABOUT THAT
<discocaml> <softwaresirppi> it shouldnt matter right??
<discocaml> <contificate> you can read the ZINC paper if you want the full details, but it's more efficient for curried functions to handle them that way
<discocaml> <softwaresirppi> wow this is why i ask you guys
<discocaml> <softwaresirppi> LINK EM PLEEEEASE?
<discocaml> <contificate> https://caml.inria.fr/pub/papers/xleroy-zinc.pdf section 2.2.3
<discocaml> <softwaresirppi> thank yuuu
<discocaml> <softwaresirppi> you have no idea how useful you guys are
alexherbo2 has quit [Remote host closed the connection]
olle_ has joined #ocaml
olle_ has quit [Ping timeout: 260 seconds]
raskol has quit [Ping timeout: 264 seconds]
alexherbo2 has joined #ocaml
raskol has joined #ocaml
Stumpfenstiel has joined #ocaml
Anarchos has joined #ocaml
<discocaml> <softwaresirppi> it even says "top level considered harmful" ☠️
<discocaml> <contificate> can't lie, I so seldom use the REPL in OCaml
<discocaml> <mbacarella> is OCaml SaaS ready yet?
<discocaml> <softwaresirppi> its my main learning tool
<discocaml> <softwaresirppi> SaaS is just money grab
<discocaml> <contificate> OCaml's editor experience is too comfy really
<discocaml> <contificate> no reason to have a sub-par experience in a REPL flailing around
<discocaml> <softwaresirppi> which editor you talking bout
<discocaml> <softwaresirppi> really?!
<discocaml> <contificate> I use emacs personally, but any of vim, emacs, vscode, etc. have support
<discocaml> <contificate> it's like
<discocaml> <softwaresirppi> im using kakoune
<discocaml> <softwaresirppi> emacs is heavy for me idk why
<discocaml> <mbacarella> yes money is good
<discocaml> <contificate> why would I type `#show_module Foo;;` when I can just hit `C-t C-t` twice on it
<discocaml> <contificate> and see the module def in another buffer
<discocaml> <contificate> that doesn't move when I type more things
<discocaml> <contificate> REPL is probably alright for absolute beginners or some isolated cases
<discocaml> <contificate> but like < 1% of my time
<discocaml> <softwaresirppi> if you make a SaaS app without maintaining a backend or something, i just dont think you are a good person.
<discocaml> <softwaresirppi> yeah i could do that in lsp as well
<discocaml> <softwaresirppi> thats me
<discocaml> <softwaresirppi> what else you like about your lsp config?!
<discocaml> <softwaresirppi> just to make sure im not missing out 😅
<discocaml> <contificate> my config is so minimal in emacs, I genuinely just have merlin mode for OCaml
<discocaml> <contificate> and that's basically it
<discocaml> <contificate> nothing special
<discocaml> <softwaresirppi> yeah thats what i asked merlin vs lsp
<discocaml> <contificate> lsp uses merlin afaik
<discocaml> <softwaresirppi> cool
<discocaml> <softwaresirppi> ive heard you guys get some exclusive features or somethin
<discocaml> <softwaresirppi> anyways damn it
<discocaml> <softwaresirppi> lets get back to camelling
<discocaml> <contificate> only features I need are seeing types, module signatures, and jumping through use-def chains
<discocaml> <softwaresirppi> Good!
<discocaml> <softwaresirppi> seeing types of what>
<discocaml> <softwaresirppi> seeing types of what?
<discocaml> <contificate> things in scope
<discocaml> <contificate> things under my cursor
<discocaml> <softwaresirppi> okay i have those available!
<companion_cube> Ngl, "destruct" action is also gold
<companion_cube> And local renaming. But both exist in merlin iirc
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
<discocaml> <mbacarella> what is a SaaS app without a backend?
<discocaml> <softwaresirppi> charging like adobe
<discocaml> <softwaresirppi> okay man you do you... im not judging
<discocaml> <mbacarella> I don't even know what you mean
<discocaml> <softwaresirppi> destruct?!
<discocaml> <mbacarella> am I missing out on a cool new elitism?
<discocaml> <softwaresirppi> yeahh i have that!!
<discocaml> <mbacarella> oh you mean like a subscription model for a delivered binary
<discocaml> <softwaresirppi> yepp
<discocaml> <softwaresirppi> evil
<discocaml> <mbacarella> I guess. it's kind of amazing software was ever considered a shrink wrap product in the first place
alexherbo2 has quit [Remote host closed the connection]
<discocaml> <softwaresirppi> what
neuroevolutus has joined #ocaml
<discocaml> <mbacarella> it's kind of amazing that someone thought to write software to floppy disks and put them in a box and sell them on a shelf at the store
<discocaml> <mbacarella> that's not really the lifecycle of software
<Anarchos> <discocaml> <mbacarella> i was the only mean to sell software before internet !
spew has joined #ocaml
<discocaml> <mbacarella> indeed
<discocaml> <softwaresirppi> haha
alexherbo2 has joined #ocaml
toastal has quit [Ping timeout: 246 seconds]
alexherbo2 has quit [Remote host closed the connection]
neuroevolutus has quit [Ping timeout: 256 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
raskol has quit [Ping timeout: 246 seconds]
raskol has joined #ocaml
YuGiOhJCJ has joined #ocaml
gareppa has quit [Quit: WeeChat 4.1.1]
bartholin has quit [Quit: Leaving]
Serpent7776 has quit [Ping timeout: 245 seconds]
spew has quit [Quit: spew]
alexherbo2 has joined #ocaml