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/
pi3ce has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
pi3ce has joined #ocaml
Haudegen has joined #ocaml
Haudegen has quit [Client Quit]
Tuplanolla has quit [Quit: Leaving.]
humasect has quit [Remote host closed the connection]
arya_elfren has quit [Ping timeout: 260 seconds]
soni_ has quit [Ping timeout: 260 seconds]
richardhuxton has quit [Ping timeout: 260 seconds]
soni_ has joined #ocaml
rustyne has quit [Ping timeout: 260 seconds]
rustyne has joined #ocaml
pluviaq has quit [Ping timeout: 260 seconds]
pmk has quit [Ping timeout: 260 seconds]
xvilka has quit [Ping timeout: 260 seconds]
richardhuxton has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 245 seconds]
pluviaq has joined #ocaml
pmk has joined #ocaml
xvilka has joined #ocaml
arya_elfren has joined #ocaml
humasect has joined #ocaml
spew has quit [Quit: spew]
humasect has quit [Ping timeout: 260 seconds]
immutable has quit [Ping timeout: 260 seconds]
Ankhers has quit [Ping timeout: 260 seconds]
sleepydog has quit [Ping timeout: 260 seconds]
_alix has quit [Ping timeout: 260 seconds]
seeg has quit [Ping timeout: 260 seconds]
xvilka has quit [Ping timeout: 260 seconds]
sleepydog has joined #ocaml
seeg has joined #ocaml
_alix has joined #ocaml
immutable has joined #ocaml
Ankhers has joined #ocaml
xvilka has joined #ocaml
nirvdrum has quit [Quit: Ping timeout (120 seconds)]
nirvdrum has joined #ocaml
nirvdrum has quit [Quit: Ping timeout (120 seconds)]
nirvdrum has joined #ocaml
terrorjack4 has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack4 has joined #ocaml
<discocaml> <softwaresirppi> Makes sense
<discocaml> <softwaresirppi> Haha
raskol has quit [Ping timeout: 265 seconds]
humasect has joined #ocaml
euphores has quit [Quit: Leaving.]
euphores has joined #ocaml
humasect has quit [Remote host closed the connection]
pi3ce has quit [Read error: Connection reset by peer]
pi3ce has joined #ocaml
<discocaml> <softwaresirppi> https://www.youtube.com/watch?v=wawMjJUCMVw
<discocaml> <softwaresirppi>
<discocaml> <softwaresirppi> No shirt. No shoes. Just a cigar and neural nets!!
bartholin has joined #ocaml
olle_ has joined #ocaml
germ has quit [Quit: ZNC 1.8.2 - https://znc.in]
germ has joined #ocaml
gahr_ is now known as gahr
humasect has joined #ocaml
humasect has quit [Remote host closed the connection]
olle_ has quit [Ping timeout: 260 seconds]
toastal has joined #ocaml
Serpent7776 has joined #ocaml
contificate has joined #ocaml
bartholin has quit [Quit: Leaving]
contificate has quit [Quit: Client closed]
Anarchos has joined #ocaml
soni_ has quit [Read error: Connection reset by peer]
xvilka has quit [Read error: Connection reset by peer]
_alix has quit [Read error: Connection reset by peer]
pmk has quit [Read error: Connection reset by peer]
seeg has quit [Read error: Connection reset by peer]
pluviaq has quit [Write error: Connection reset by peer]
pmk has joined #ocaml
Guest8824 has quit [Read error: Connection reset by peer]
xvilka has joined #ocaml
arya_elfren has quit [Read error: Connection reset by peer]
lane has quit [Read error: Connection reset by peer]
seeg has joined #ocaml
pluviaq_ has joined #ocaml
patrick_ has joined #ocaml
lane_ has joined #ocaml
pluviaq_ is now known as pluviaq
soni_ has joined #ocaml
contificate has joined #ocaml
_alix has joined #ocaml
Ankhers has quit [Ping timeout: 245 seconds]
ggb has quit [Ping timeout: 246 seconds]
ursa-major has quit [Ping timeout: 246 seconds]
rustyne has quit [Ping timeout: 246 seconds]
ymherklotz has quit [Ping timeout: 246 seconds]
whereiseveryone has quit [Ping timeout: 246 seconds]
b0o has quit [Ping timeout: 272 seconds]
seeg has quit [Ping timeout: 260 seconds]
xvilka has quit [Ping timeout: 260 seconds]
immutable has quit [Ping timeout: 245 seconds]
sleepydog has quit [Ping timeout: 245 seconds]
lane_ has quit [Ping timeout: 264 seconds]
henrytill has quit [Ping timeout: 272 seconds]
richardhuxton has quit [Ping timeout: 246 seconds]
soni_ has quit [Ping timeout: 260 seconds]
pmk has quit [Ping timeout: 260 seconds]
pluviaq has quit [Ping timeout: 260 seconds]
patrick_ has quit [Ping timeout: 260 seconds]
_alix has quit [Ping timeout: 265 seconds]
philipwhite has quit [Ping timeout: 272 seconds]
rustyne has joined #ocaml
lane has joined #ocaml
ursa-major has joined #ocaml
richardhuxton has joined #ocaml
Ankhers has joined #ocaml
immutable has joined #ocaml
philipwhite has joined #ocaml
sleepydog has joined #ocaml
whereiseveryone has joined #ocaml
xvilka has joined #ocaml
patrick_ has joined #ocaml
ggb has joined #ocaml
_alix has joined #ocaml
toastal has left #ocaml [Disconnected: Hibernating too long]
neiluj has joined #ocaml
pluviaq has joined #ocaml
pmk has joined #ocaml
henrytill has joined #ocaml
b0o has joined #ocaml
seeg has joined #ocaml
soni_ has joined #ocaml
arya_elfren has joined #ocaml
ymherklotz has joined #ocaml
bibi_ has quit [Quit: Konversation terminated!]
contificate has quit [Ping timeout: 256 seconds]
toastal has joined #ocaml
contificate has joined #ocaml
rustyne has quit [Ping timeout: 244 seconds]
_alix has quit [Ping timeout: 272 seconds]
Ankhers has quit [Ping timeout: 272 seconds]
lane has quit [Ping timeout: 272 seconds]
soni_ has quit [Ping timeout: 260 seconds]
pluviaq has quit [Ping timeout: 246 seconds]
patrick_ has quit [Ping timeout: 272 seconds]
philipwhite has quit [Ping timeout: 272 seconds]
immutable has quit [Ping timeout: 272 seconds]
richardhuxton has quit [Ping timeout: 272 seconds]
ymherklotz has quit [Ping timeout: 260 seconds]
arya_elfren has quit [Ping timeout: 260 seconds]
seeg has quit [Ping timeout: 246 seconds]
henrytill has quit [Ping timeout: 246 seconds]
ggb has quit [Ping timeout: 246 seconds]
xvilka has quit [Ping timeout: 246 seconds]
sleepydog has quit [Ping timeout: 246 seconds]
pmk has quit [Ping timeout: 272 seconds]
b0o has quit [Ping timeout: 272 seconds]
ursa-major has quit [Ping timeout: 272 seconds]
whereiseveryone has quit [Ping timeout: 272 seconds]
lane has joined #ocaml
philipwhite has joined #ocaml
pmk has joined #ocaml
whereiseveryone has joined #ocaml
sleepydog has joined #ocaml
xvilka has joined #ocaml
pluviaq has joined #ocaml
henrytill has joined #ocaml
ggb has joined #ocaml
patrick_ has joined #ocaml
richardhuxton has joined #ocaml
immutable has joined #ocaml
ymherklotz has joined #ocaml
rustyne has joined #ocaml
_alix has joined #ocaml
seeg has joined #ocaml
arya_elfren has joined #ocaml
Ankhers has joined #ocaml
b0o has joined #ocaml
soni_ has joined #ocaml
ursa-major has joined #ocaml
toastal has quit [Ping timeout: 244 seconds]
euouae has joined #ocaml
<euouae> Hello, I ^C interrupted an `opam upgrade`. I was given some commands to resume it but I didn't write them down. What should I do?
toastal has joined #ocaml
raskol has joined #ocaml
neiluj has quit [Ping timeout: 246 seconds]
<discocaml> <otini_> if you want to resume it, you can just run the command again
<euouae> It's telling me now that everything is upgraded but I know for a fact it's not true
<euouae> I interrupted it at 19/21 with some coq-* packages not yet upgraded
<reynir> there are some log files in ~/.opam/log/ -- maybe one of them has the error message? though I don't find the naming scheme helpful there...
<euouae> yeah, dates are missing as far as I can tell. those log files suck lol
<euouae> but I can list them by last modified and see what I can do
<euouae> well I know it was coq-stdlib
<euouae> I see this line: ~/.opam/opam-init/hooks/sandbox.sh build dune build -p coq-stdlib -j 11 --promote-install-files=false @install
<euouae> but these logfiles do not have any information with regards to the overall upgrade
<euouae> Basically I interrupted during that build of coq-stdlib
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
raskol has quit [Ping timeout: 246 seconds]
spynxic has joined #ocaml
YuGiOhJCJ has joined #ocaml
contificate has quit [Ping timeout: 256 seconds]
Fardale1 has quit [Ping timeout: 264 seconds]
Johann has quit [Ping timeout: 272 seconds]
thizanne has quit [Ping timeout: 272 seconds]
ohperitel has quit [Ping timeout: 246 seconds]
semarie has quit [Ping timeout: 264 seconds]
pandeyan has joined #ocaml
neiluj has joined #ocaml
pippijn has quit [Ping timeout: 264 seconds]
contificate has joined #ocaml
arya_elfren_ has joined #ocaml
m5zs7k_ has joined #ocaml
ggb_ has joined #ocaml
quernd803 has joined #ocaml
pmk_ has joined #ocaml
bacam has quit [Ping timeout: 252 seconds]
ymherklotz_ has joined #ocaml
gebn_ has joined #ocaml
YuGiOhJCJ has quit [Ping timeout: 260 seconds]
johnel_ has joined #ocaml
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
thizanne has joined #ocaml
ohperitel has joined #ocaml
bacam has joined #ocaml
YuGiOhJCJ has joined #ocaml
pippijn has joined #ocaml
anpad has quit [Quit: ZNC 1.8.2 - https://znc.in]
pmk has quit [Ping timeout: 252 seconds]
m5zs7k has quit [Quit: m5zs7k]
arya_elfren has quit [Ping timeout: 252 seconds]
arya_elfren_ is now known as arya_elfren
farn__ has joined #ocaml
ymherklotz has quit [Ping timeout: 252 seconds]
ggb has quit [Ping timeout: 252 seconds]
quernd80 has quit [Quit: Ping timeout (120 seconds)]
gebn has quit [Ping timeout: 252 seconds]
rak has quit [Ping timeout: 252 seconds]
johnel has quit [Ping timeout: 252 seconds]
farn_ has quit [Ping timeout: 252 seconds]
ggb_ is now known as ggb
quernd803 is now known as quernd80
ymherklotz_ is now known as ymherklotz
spynxic has joined #ocaml
Fardale1 has joined #ocaml
thizanne has joined #ocaml
thizanne is now known as 030AAKNTE
welterde has quit [Ping timeout: 276 seconds]
motherfsck has quit [Ping timeout: 276 seconds]
thizanne has quit [Ping timeout: 248 seconds]
gentauro has quit [Ping timeout: 252 seconds]
gentauro has joined #ocaml
rak has joined #ocaml
Johann has joined #ocaml
m5zs7k_ is now known as m5zs7k
contificate has quit [Quit: Client closed]
spynxic has quit [Client Quit]
lobo has quit [Ping timeout: 276 seconds]
<YuGiOhJCJ> hello, when I do "ocamlopt.opt main.ml" then "./a.out", I get "Hello, World!", however, when I do "ocamlopt.opt -c main.ml" then "ocamlopt.opt main.o" then "./a.out", I get no output, why it doesn't work in the second case please?
<euouae> YuGiOhJCJ: I would guess that it has something to do with an entrypoint
spynxic has joined #ocaml
<YuGiOhJCJ> yes, I think too but I am not sure how to specify the entry point to the compiler
<euouae> YuGiOhJCJ: try ocamlopt main.o -o main
<YuGiOhJCJ> indeed it works!
<YuGiOhJCJ> but I don't understand why
<discocaml> <._null._> euouae: you can do opam reinstall coq-stdlib and all packages which weren't fully installed
<YuGiOhJCJ> "a.out" is the default output name and "main" is the one specified output name with the option "-o", both files are supposed to be the same, just the name is different
<euouae> ._null_.: thank you! how can I find which packages were not fully installed?
<discocaml> <otini_> YuGiOhJCJ: "ocamlopt main.cmx" as the second command works
<euouae> YuGiOhJCJ: no, the compiler understands to do something different without the presence of -o. I think it's just creating another object file, or one with a dummy entry point
<euouae> or an exec with a dummy entry point*
<euouae> To understand more about these matters you'd invariably have to study a bit about the executable format like ELF. It's then an easy matter to investigate the produced files with `objdump`, `nm`, etc, to see exactly what they're trying tod o.
<discocaml> <._null._> euouae: that I don't know, but at worst you can reinstall everything you wanted to install (look for the opam install command in the shell history). If you really didn't install coq-stdlib, any other package reinstall is going to be fast in comparison
<euouae> shell history is deleted
<euouae> I have installed coq-stdlib because I use coq
<discocaml> <otini_> YuGiOhJCJ: I think the answer lies in:
<discocaml> <otini_> > Arguments ending in .cmx are taken to be compiled object code. These files are linked together, along with the object files obtained by compiling .ml arguments (if any), and the OCaml standard library, to produce a native-code executable program. The order in which .cmx and .ml arguments are presented on the command line is relevant: compilation units are initialized in that order at run-time, and it is a link-time error to use a component of
<discocaml> <otini_> > Arguments ending in .c are passed to the C compiler, which generates a .o/.obj object file. This object file is linked with the program.
<discocaml> <otini_> > Arguments ending in .o, .a or .so (.obj, .lib and .dll under Windows) are assumed to be C object files and libraries. They are linked with the program.
<discocaml> <._null._> euouae: you can either recompile packages which you think behave wrong, or recompile all packages in your switch
<YuGiOhJCJ> ok but it means that "ocamlopt.opt" has a different behavior from "gcc", with gcc I do "gcc -c -o main.o main.c" then "gcc main.o" then "./a.out" and I get ""Hello, World!"", so it is a bit confusing
<euouae> Yes it has different behavior, it's not the same.
<euouae> gcc will error without a main(), OCaml doesn't have this concept.
<discocaml> <otini_> also gcc only handles C files and object files, ocamlopt handles both ocaml and C so some difference is to be expected
<discocaml> <otini_> (ocaml and C and object files)
welterde has joined #ocaml
motherfsck has joined #ocaml
lobo has joined #ocaml
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
semarie has joined #ocaml
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
spynxic has joined #ocaml
spew has joined #ocaml
neiluj has quit [Ping timeout: 272 seconds]
euouae has quit [Read error: Connection reset by peer]
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
spynxic has joined #ocaml
myrkraverk_ has quit [Read error: Connection reset by peer]
myrkraverk__ has joined #ocaml
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
spynxic has joined #ocaml
<discocaml> <sabrinasummers> Hello
<discocaml> <sabrinasummers> Not looking forward to learning Ocaml 😁
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
<discocaml> <contificate> why not
<discocaml> <sabrinasummers> One more language to remember
<discocaml> <sabrinasummers> 😭
<discocaml> <contificate> that's why you gotta get mileage so it becomes second nature, not memorisation
<discocaml> <sabrinasummers> Advanced species my ass 😭
<discocaml> <sabrinasummers> We can't even have 1 coding language
spynxic has joined #ocaml
<discocaml> <sabrinasummers> I have to remember Python and Rust and C/C++ already
<discocaml> <sabrinasummers> But I have to learn Ocaml for my new job.
<discocaml> <contificate> you make it sound like it's rote learning
<discocaml> <contificate> but it's not, it's learning ways to express ideas
<discocaml> <contificate> the more you do it, the more familiar you will be with it
<discocaml> <contificate> to the point where you can go a long period of time without writing OCaml and still return to it
<discocaml> <contificate> I feel that way about languages I haven't seriously written in years - I could refresh the knowledge in an hour
<discocaml> <billdick> is there's a career channel?
<discocaml> <sabrinasummers> I dont know why I cant just use python 😭
<discocaml> <sabrinasummers> Many libraries are already written in C and Rust anyways
<discocaml> <sabrinasummers> And I can write my own Rust libs
<discocaml> <contificate> after reading your description, I think many would trade their internal organs for an internship at JS, so I wouldn't complain
<discocaml> <sabrinasummers> I suppose
<dh`> programming is just programming, languages are details
euphores has quit [Quit: Leaving.]
neiluj has joined #ocaml
<discocaml> <sabrinasummers> Thankfully it's not super urgent just something they want me to work on.
<discocaml> <sabrinasummers> Right now I am still working on Python stuff.
<discocaml> <sabrinasummers> Is there really no libs for things like random forest, xgb, etc?
<discocaml> <sabrinasummers> 😭
euphores has joined #ocaml
neiluj has quit [Read error: Connection reset by peer]
raskol has joined #ocaml
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
Tuplanolla has joined #ocaml
<discocaml> <gooby_clown> OCaml is better Python, no worries
spynxic has joined #ocaml
<discocaml> <contificate> inb4 Sab learns there's ways to call Python from OCaml and writes bindings for ML libs all day
bartholin has joined #ocaml
<discocaml> <sabrinasummers> Hmm
<discocaml> <sabrinasummers> bindings writing 😭
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<discocaml> <gooby_clown> I was gonna look into using matplotlib from OCaml but turns out Owl is pretty nice already
<discocaml> <gooby_clown> Oh My Camel will obsolete Python one day
<discocaml> <contificate> I write Python as though it's OCaml
<discocaml> <gooby_clown> Chad
szkl has quit [Quit: Connection closed for inactivity]
<discocaml> <JM> Pyml isn't bad, but having to switch programming language isn't that bad either.
<discocaml> <JM> I have my preference, but unless you asked me to write in some really esoteric language, the programming langage won't be a big issue.
<discocaml> <sabrinasummers> Write me Generel Number Field Sieve in Assemblyx86
<discocaml> <sabrinasummers> 🥺
<discocaml> <sabrinasummers> Write me General Number Field Sieve in Assemblyx86
<discocaml> <sabrinasummers> Pyml looks ok but not nearly as comprehensive as something like Sklearn
bibi_ has joined #ocaml
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
spynxic has joined #ocaml
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
spynxic has joined #ocaml
<discocaml> <gooby_clown> It's unfortunate machine learning has stolen the acronym from real ML
<discocaml> <gooby_clown> Meta Language
<discocaml> <gooby_clown> OCaML
<discocaml> <gooby_clown> OCaMachine Learning?
<discocaml> <gooby_clown> I don't think so!
<discocaml> <lukstafi> OCAML = Ocaml Compiles Algorithms for Machine Learning
<discocaml> <gooby_clown> Kinda ugly in all caps tbh
<discocaml> <gooby_clown> The name peaked at Caml Light
<discocaml> <gooby_clown> OCaml is all right but not as good
<discocaml> <Kali> outstandingly cool and magnificent language
<discocaml> <gooby_clown> I try to shill oh camel anywhere I go
<discocaml> <gooby_clown> Gotta bring in new blood
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
spynxic has joined #ocaml
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
spynxic has joined #ocaml
humasect has joined #ocaml
<bartholin> The O in OCaml stands for fOnctional
<discocaml> <sabrinasummers> And we're not giving it back
<discocaml> <sabrinasummers> 😈
humasect has quit [Remote host closed the connection]
humasect has joined #ocaml
humasect has quit [Remote host closed the connection]
humasect has joined #ocaml
<discocaml> <gooby_clown> 😠
<discocaml> <gooby_clown> How does an ML PhD look
<discocaml> <gooby_clown> I assume it's not just using pandas to do trivial stuff
<discocaml> <sabrinasummers> pandas is common but going beyond just basic stuff
<discocaml> <sabrinasummers> Pandas is really just a way to store the data
<discocaml> <sabrinasummers> Connecting multiple models, each with their own preprocessing pipelines, and optimized using genetic algorithms
<discocaml> <sabrinasummers> Then it gets more tricky
<discocaml> <sabrinasummers> But thankfully Sklearn makes it manageable if you know what you are doing
<discocaml> <sabrinasummers> Connecting multiple models in an advanced ensemble config, each with their own preprocessing pipelines, and optimized using genetic algorithms
<discocaml> <sabrinasummers> @gooby_clown
<discocaml> <gooby_clown> Right but I meant more, at undergrad levels AI is just applying existing stuff to slightly different scenario, each paper feels recycled, how does that change at PhD level?
<discocaml> <sabrinasummers> At PhD its basically making better methods for things
<discocaml> <sabrinasummers> For example I see very few people using things like supervised contrastive learning as a feature extraction method
<discocaml> <sabrinasummers> Despite my personal experience in it being the best one possible for downstream tasks
<discocaml> <sabrinasummers> But the paper on it was compelling so I implemented it
<discocaml> <sabrinasummers> Basically at PhD level you are testing other peoples theories and trying to make your own methods.
<discocaml> <sabrinasummers> @gooby_clown
<discocaml> <sabrinasummers> Despite my personal experience in it being the best one possible for downstream classification tasks
<discocaml> <sabrinasummers> But the paper on it was compelling so I implemented it, and cross validated to ensure its truly effective.
<discocaml> <sabrinasummers> But the paper on it was compelling so I implemented it, and cross validated on many datasets to ensure its truly effective.
<discocaml> <sabrinasummers> Basically at PhD level you are testing other peoples cutting edge theories / methods and trying to make your own methods.
<discocaml> <sabrinasummers> Basically at PhD level you are testing other peoples cutting edge theories / methods and trying to make your own theories / methods.
neiluj has joined #ocaml
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
spynxic has joined #ocaml
<discocaml> <gooby_clown> Pretty nice
<discocaml> <gooby_clown> You should work on bringing cutting edge ML to OCaml
<discocaml> <gooby_clown> In 10 years ML courses at community colleges will be teaching OCaml
<discocaml> <sabrinasummers> With how much microsoft is pushing Python I am not sure.
<discocaml> <sabrinasummers> You can even use it in Excel now.
<discocaml> <donderdag> microsoft is just doing embrace, extend, extinguish ™️
<discocaml> <gooby_clown> Maybe F# then if Microsoft has lots of say
<discocaml> <gooby_clown> ML.NET is already a thing anyways
<discocaml> <gooby_clown> Although I'm not sure how good it is
<discocaml> <gooby_clown> I'd like to see Python extinguished from web backends at the very least
<discocaml> <sabrinasummers> Python is only getting better
<discocaml> <sabrinasummers> I don't see why it would go anywhere
<discocaml> <sabrinasummers> With Kubernetes you can both scale and manage python fairly easily.
<discocaml> <donderdag> https://www.reddit.com/r/Python/comments/1gbu1g0/this_is_now_valid_syntax_in_python_313/ yeah it's definitely moving in a positive direction
<discocaml> <gooby_clown> I feel like Python's gonna see what's happening with TS now
<discocaml> <sabrinasummers> Nobody is forcing you to use this though
<discocaml> <gooby_clown> JSers going "omg bro that's unreadable types are useless bro"
<discocaml> <sabrinasummers> Most places have their own conventions anyways
<discocaml> <sabrinasummers> Except for chad Typescript users
<discocaml> <gooby_clown> Truly Chad
<discocaml> <gooby_clown> TS has such a good type system even
<discocaml> <gooby_clown> Pity they don't want to use it
<discocaml> <sabrinasummers> Python is just the fastest language for me to speedrun a dataset and understand everything about it and have a ML model made for it within a very short time span.
<discocaml> <sabrinasummers> I think Python will still be used at least for rapid prototyping.
<discocaml> <sabrinasummers> Even if the concepts get converted later on.
<discocaml> <gooby_clown> I'm fine with Python for ML personally, or anything that's not much code, mostly pressed when I see big projects written mostly in Python because it's really not a language that makes software engineering easier
raskol has quit [Ping timeout: 260 seconds]
Everything has joined #ocaml
humasect has quit [Remote host closed the connection]
humasect has joined #ocaml
humasect has quit [Remote host closed the connection]
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
spynxic has joined #ocaml
spynxic has quit [Remote host closed the connection]
spynx has joined #ocaml
spynx has quit [Remote host closed the connection]
spynxic has joined #ocaml
<discocaml> <donderdag> when a language that provides a feature you shouldn't use, it is inevitable that some people will use it (and even recommend it), and making workplaces enforce conventions that subset the language isn't exactly responsible language design. there's no one forcing you to use `global` or wildcard imports or `s or ''` instead of `s if s is not None else ''` either.
<discocaml> <donderdag>
<discocaml> <donderdag> in JavaScript, no one forced Prototype and MooTools to monkey patch the Array protoype. no one is forcing you to use non-strict mode. there's no one forcing you to use `==` or `with`.
<discocaml> <donderdag>
<discocaml> <donderdag> good design is all about guiding people towards avoiding mistakes. that's why ATMs force you to remove your card before they deliver the cash (otherwise you'd forget to take your card). that's why fire doors give you no option but to push them (because people died after panicking during a fire and trying to pull open a push door or push open a pull door). that's why strings and numbers are immutable in most languages. that's why Python has a
<discocaml> <qrpnxz> I been looking at clojure stuff these last few days and just absorbing the ideas. I probably won't use clojure much (for now at least), but i'll certainly be importing some of the ideas.
<discocaml> <contificate> what are these ideas, out of interest? my brief recollection of clojure is a reliance on HAMT-based data structures
<discocaml> <qrpnxz> Ideas that are very much applicable in OCaml. Datastructures are one, another one is what they call "references", which in OCaml we can get with `Loc.t` from the `kcas` library, which are references you access using Software Transactional Memory. These two work together very well in concurrent applications. You put only immutable data in these, so when you read you get a fully consistent state that is safe from meddling by other parts of the pr
<discocaml> <donderdag> when a language that provides a feature you shouldn't use, it is inevitable that some people will use it (and even recommend it), and making workplaces enforce conventions that subset the language isn't exactly responsible language design. there's no one forcing you to use `global` or wildcard imports or `s or ''` instead of `s if s is not None else ''` either.
<discocaml> <donderdag>
<discocaml> <donderdag> in JavaScript, no one forced Prototype and MooTools to monkey patch the Array protoype. no one is forcing you to use non-strict mode. there's no one forcing you to use `==` or `with`.
<discocaml> <donderdag>
<discocaml> <donderdag> good design is all about guiding people towards avoiding mistakes. that's why ATMs force you to remove your card before they deliver the cash (otherwise you'd forget to take your card). that's why fire doors give you no option but to push them (because people died after panicking during a fire and trying to pull open a push door or push open a pull door). that's why strings and numbers are immutable in most languages. that's why Python has a
Everythi1g has joined #ocaml
Everything has quit [Ping timeout: 276 seconds]
<discocaml> <qrpnxz> I'd be really nice if Stdlib added these structures. They saw the value of making `string` immutable, after all. Having `array` alone is a sad default state of affairs, but the tools are there to add what we need, and records are already mostly pervasibly immutable.
<discocaml> <qrpnxz> I'd be really nice if Stdlib added these structures. They saw the value of making `string` immutable, after all. Having `array` alone is a sad default state of affairs, but the tools are there to add what we need, and records are already mostly pervasively immutable.
<discocaml> <qrpnxz> Maybe @donderdag can add some to this topic. He knows more about clojure.
<discocaml> <qrpnxz> But that is some things I have identified
<discocaml> <Kali> try to avoid editing in the general channel since it's bridged to irc so it requires a message resend
<discocaml> <qrpnxz> sorry
<discocaml> <qrpnxz> And I agree with hickey it's not just a concurrent programming thing. Mutation can introduces all sorts of Weird interactions in your program, so it's good to avoid in general. But if you don't have the tools at hand, it's not easy. In OCaml it is easier than Java. In Clojure, everything is built around it. That's the neat thing about looking at other languages. It's not necessarily finding something you never heard of before, but seeing people
<discocaml> <qrpnxz> There are few languages where you can do stuff like STM and not have it be only for playing around. I know Haskell, OCaml, and Clojure have it.
<discocaml> <qrpnxz>
<discocaml> <qrpnxz> In Haskell you are quite limited because the only thing that can happen in the STM monad is STM stuff, which is basically nothing but data access. So you can grab state from multiple locations atomically.
raskol has joined #ocaml
<discocaml> <qrpnxz>
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
<discocaml> <qrpnxz> That is nice, but OCaml because it's more permissive and you can just do whatever with the warning that ofc transactions may be retried etc. you have more options.
<discocaml> <qrpnxz>
<discocaml> <qrpnxz> In Clojure it's built in, so you have more neat helpers like you can *optionally* wrap your code in something that makes normal IO code throw when run in a transaction to help you avoid doing it accidentally.
spynxic has joined #ocaml
<discocaml> <qrpnxz> (kcas, the ocaml stm lib, originally was designed around a monad interface, but they had the wisdom to liberate it)
<discocaml> <qrpnxz> (now it's direct style)
<discocaml> <qrpnxz> Man, I wish i could edit some of that, but out of consideration i will not
<discocaml> <qrpnxz> So sorry for bad wording
<discocaml> <Kali> well, you can send a message with a * or something to just indicate edits instead of editing the message
neiluj has quit [Ping timeout: 276 seconds]
<discocaml> <donderdag> also:
<discocaml> <donderdag>
<discocaml> <donderdag> for example, Clojure has an abstraction for data structures which support constant-time counting (length). throughout the standard library every function has its performance characteristics promised as part of the contract, no matter which data type you call it with. `count` and `peek` will always be O(1) - they aren't implemented for data structures where this would not be the case. `last` will always be O(n). `conj` ('conjoin' - prepends t
spew has quit [Ping timeout: 252 seconds]
<discocaml> <donderdag> `conj` is O(1) for vectors and (linked) lists, O(log32 n) for hash-maps and hash-sets
<discocaml> <qrpnxz> "O(1)" for vectors there is really log n, but tbf it's extremely slow growing, practically O(1)
<discocaml> <qrpnxz> `last` should be actually, reliably O(1) for vector though
<discocaml> <donderdag> oh, i'd always heard that adding to the end of a vector was O(1). but looking at the implementation, i guess you're right
<discocaml> <qrpnxz> Quote:
<discocaml> <qrpnxz> > Clojure, being a practical language, allows state to change but provides mechanism to ensure that, when it does so, it remains consistent, while alleviating developers from having to avoid conflicts manually using locks etc
<discocaml> <qrpnxz>
<discocaml> <qrpnxz> That is a good gist of it. I think an OCaml lover (in contrast to Haskell) can resonate with :) @contificate
<discocaml> <donderdag> `last` always does a linear walk, so it's O(n)
<discocaml> <qrpnxz> Adding to the end is super cheap. Definitely use it. The block size is 32. For 31 of those `conj`s, the operations is literally constant time. When the block is full, it gets inserted into the tree, which is log n time, very fast
<discocaml> <qrpnxz> Accessing the last is always constant time because the tail is kept at the top
<discocaml> <qrpnxz> Not for vectors, it's constant
<discocaml> <donderdag> not for `last`, only for `peek`
<discocaml> <qrpnxz> what is last doing
<discocaml> <qrpnxz> i hear last, i reckon it means get the last element
<discocaml> <qrpnxz> This seems to do it by iteration for something generic so that it can't take advantage. But if you could override for vector, it'd be constant
<discocaml> <donderdag> `last` is part of the 'sequence' abstraction, so the only thing it can do is use `first` and `rest` (or `next`)
<discocaml> <donderdag> not part of, but defined in terms of
<discocaml> <qrpnxz> > At the moment, I'm not sure it would be bad to have 'last' behave better for vectors et al while still promising in documentation to be not necessarily better than linear. But I do know this - it is seriously unimportant. We all have much better things to do, I hope, than argue over things like this.
<discocaml> <qrpnxz>
<discocaml> <qrpnxz> He seems open to it a patch that would make it fast for vectors specifically, but if that were truly so, surely someone has tried to get it pulled by now? And yet it hasn't happened.
<discocaml> <qrpnxz>
<discocaml> <qrpnxz> The answer is not wholly satisfying, but I can live with it. As far as O(n) being all that is *promised*, that I totally understand.
<discocaml> <qrpnxz> *seems open to a patch
bartholin has quit [Quit: Leaving]
<discocaml> <qrpnxz> Perhaps it's not easy to do that kind of specialization, in which case I also understand.
<discocaml> <donderdag> good question
<discocaml> <qrpnxz> > You can't just swap out sequences or lists for maps or sets in a program.
<discocaml> <qrpnxz> I think that's a good point as well. One thing I like about Rust docs is that they are very clear about perf behavior
<discocaml> <qrpnxz> (in stdlib collections)
<discocaml> <donderdag> i can't find any issues in the JIRA, i'd have to ask Alex Miller (Clojure's first mate) in the discord
<discocaml> <qrpnxz> > But lookup, under any name, shouldn't be, IMO, so it isn't in Clojure.
<discocaml> <qrpnxz> But you can abstract over functionals, right? Which vectors, maps, and sets implement. lol
neiluj has joined #ocaml
neiluj has quit [Ping timeout: 252 seconds]
<discocaml> <donderdag> do you mean Iterable?
<discocaml> <qrpnxz> The thing that allows you to do `({:a 1} :a)` and get `1`
<discocaml> <qrpnxz> `clojure.lang.IFn`
<discocaml> <donderdag> right, yeah. IFn. that's a synonym for `get` i believe
<discocaml> <donderdag> which is O(log32 n) iirc
<discocaml> <donderdag> lists don't implement IFn
Everythi1g has quit [Quit: leaving]
Tuplanolla has quit [Quit: Leaving.]
humasect has joined #ocaml
humasect has quit [Ping timeout: 276 seconds]
spew has joined #ocaml
neiluj has joined #ocaml
Serpent7776 has quit [Ping timeout: 252 seconds]
<discocaml> <astreamingcomesacrossthesky> Clojure's STM facilities are not much used as I understand it
<discocaml> <astreamingcomesacrossthesky> I believe RH even said somewhere that if he redid the language he would omit them
<discocaml> <qrpnxz> and replace with what? Manual locking? Certainly not 😄
<discocaml> <qrpnxz> Agents aren't a replacement because they are async and only suitable when you don't care about timing
<discocaml> <astreamingcomesacrossthesky> People use `core.async` for pure Clojure concurrency and then there's `java.util.concurrent` which as of JDK 22(?) also has virtual threads. Lots of options
neiluj has quit [Ping timeout: 276 seconds]
<discocaml> <astreamingcomesacrossthesky> I'm a daily Clojure user but my concurrency skills are pretty weak so I'm learning about this stuff atm
<discocaml> <qrpnxz> > core.async is a new contrib library for Clojure that adds support for asynchronous programming using channels.
<discocaml> <qrpnxz> Channels are great, but you don't have to limit yourself to this when you have the advantage of being in the same process. I've heard RH say specifically something like that should not be done hence he put in references and not did everything like erlang.
<discocaml> <donderdag> `atom` and `ref` are used, `agent` is not
<discocaml> <astreamingcomesacrossthesky> Yeah I've literally never once used an agent lol
<discocaml> <qrpnxz> agent seem useful for logging or counters, stuff that you just tell something to happen, but aren't waiting around.
<discocaml> <astreamingcomesacrossthesky> I think for in-process concurrency the solution is `j.u.c` classes, which RH also praises the utility of in some early videos on the language
<discocaml> <astreamingcomesacrossthesky> `future` is the fire-and-forget primitive if thats what you're referring to
Haudegen has joined #ocaml
<discocaml> <qrpnxz> futures are generally something you later await. In the case of agent I don't think there is any awaiting, it will just happen when it happens.
humasect has joined #ocaml
<discocaml> <qrpnxz> Though it does like you can await for all actions dispatched in the past in general, not by specific futures, to occur
<discocaml> <astreamingcomesacrossthesky> Then there's also `promise` but frankly I forget how that's even used
<discocaml> <astreamingcomesacrossthesky> I prefer to hide safely in ClojureScript and single-threaded runtimes 🤠
humasect has quit [Ping timeout: 276 seconds]
<discocaml> <qrpnxz> According to the docs, when you make a `future` there is an automatic mechanism to run the procedure you pass in thread and cache the result that may be access by de-referencing.
<discocaml> <qrpnxz>
<discocaml> <qrpnxz> `promise` doesn't do that, it just gives you an object that blocks when de-referenced until/unless it has been `deliver`ed to, which may or may not be done by another thread. It's a more general primitive.
<discocaml> <qrpnxz> *accessed
<discocaml> <astreamingcomesacrossthesky> Yeah I think people use `promise` in development for hot swapping out code
<discocaml> <astreamingcomesacrossthesky> I've seen it done for restarting web servers inside DI frameworks etc
<discocaml> <qrpnxz> promises are write-once. I don't see how one would use it for hot swapping
<discocaml> <qrpnxz> can be used as a trigger for sure though
spynxic has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
spynxic has joined #ocaml
neiluj has joined #ocaml
spynxic has quit [Client Quit]
spynxic has joined #ocaml
humasect has joined #ocaml