zolk3ri has quit [Remote host closed the connection]
shinnya has joined #ocaml
tokenrove has quit [Ping timeout: 240 seconds]
tokenrove has joined #ocaml
silver has quit [Read error: Connection reset by peer]
ygrek has quit [Ping timeout: 265 seconds]
mfp has quit [Ping timeout: 260 seconds]
<rgr[m]>
Drup: no, ssl is still the reference. Although it's on my todo list
<rgr[m]>
To have an independent ctypes example that is
FreeBirdLjj has quit [Remote host closed the connection]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 260 seconds]
VermillionAzure has joined #ocaml
Vermie has joined #ocaml
VermillionAzure has quit [Read error: Connection reset by peer]
aytas__ has joined #ocaml
VermillionAzure has joined #ocaml
Vermie has quit [Ping timeout: 276 seconds]
Vermie has joined #ocaml
aytas__ has quit [Ping timeout: 265 seconds]
aytas__ has joined #ocaml
VermillionAzure has quit [Ping timeout: 260 seconds]
Vermie has quit [Ping timeout: 260 seconds]
aytas__ has quit [Ping timeout: 260 seconds]
pierpa has quit [Quit: Page closed]
VermillionAzure has joined #ocaml
Jesin has quit [Quit: Leaving]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
shinnya has quit [Ping timeout: 256 seconds]
granttrec has joined #ocaml
<granttrec>
I am looking to get intimate with ocaml, what are some good books?
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
<discord3>
<mars0i> Real World Ocaml, or OCaml from the Very Beginning, if you want to start more gently. More here: http://ocaml.org/learn/books.html. RWO is available online as well as for purchase. The second ed is in development and is available online in its current state. https://dev.realworldocaml.org/toc.html
tarptaeya has joined #ocaml
mcspud has quit [Ping timeout: 256 seconds]
cbot has quit [Quit: Leaving]
mcspud has joined #ocaml
seangrove has joined #ocaml
<Leonidas>
granttrec: definitely RWO.
<Leonidas>
One of the best programming books I am aware of
tane has joined #ocaml
larhat has joined #ocaml
ozzymcduff has joined #ocaml
malina has quit [Ping timeout: 268 seconds]
ozzymcduff has quit [Read error: Connection reset by peer]
tane has quit [Quit: Leaving]
mk9 has joined #ocaml
noitakomentaja has joined #ocaml
larhat has quit [Quit: Leaving.]
Haudegen has joined #ocaml
ziyourenxiang_ has quit [Ping timeout: 248 seconds]
<ZirconiumX>
I went through RWO 1e; what are the changes for 2e (so far)?
jaar has joined #ocaml
cthuluh has quit [Remote host closed the connection]
<discord3>
<Christophe> On the structure it's moslty the same, but it's updated to newer version of OCaml and Core
argent_smith has joined #ocaml
jaar has quit [Remote host closed the connection]
jaar has joined #ocaml
<ZirconiumX>
Huh, okay.
mk9 has quit [Quit: mk9]
<discord3>
<Christophe> Also there should be new content such as a chapter on GADT but it's not released yet, it's just in the GIT
<discord3>
<Christophe> And of course there should be paragraphs rewritten and such, but that's not a change to structure
<ZirconiumX>
I've not yet found a point where I prefer Core to the default OCaml stdlib though. Core's philosophy of making everything an option type makes it harder to chain code.
<ZirconiumX>
I do see why they do it, but I find it a little awkward
<discord3>
<Christophe> it chains well with monadic operators though. They made me fall in love with monads 😃
<ZirconiumX>
Like, in the stdlib I can do `List.hd (List.tl foo)` and it'll throw if foo is not of length 2 or more
<ZirconiumX>
But that won't compile under Core
<ZirconiumX>
Are you saying I need to do something like `List.tl foo |> List.hd`? But isn't that just the same, or is this an operator I don't know of yet?
<Enjolras>
List.hd is a huge code smell though
<Enjolras>
this should not exist in any sane library
<ZirconiumX>
I don't think pattern matching against _ :: x :: _ is any more elegant
jaar has quit [Remote host closed the connection]
jaar has joined #ocaml
seangrove has quit [Ping timeout: 240 seconds]
<discord3>
<Christophe> more like Option.(List.tl foo >>= List.hd)
VermillionAzure has quit [Remote host closed the connection]
VermillionAzure has joined #ocaml
<discord3>
<Christophe> if List.tl foo returns None it straight returns None again, if it returns Some l' it will return List.hd l'
<discord3>
<Christophe> that will be an option again
<ZirconiumX>
So yeah, I was missing an operator. Thanks, Christophe!
<discord3>
<Christophe> And if your other function does not return an option it's fine, there's another operator, e.g. Option.(List.tl foo >>| List.cons 42)
<gonz_>
ZirconiumX: You were missing a concept more than anything; monads.
<gonz_>
`(>>=)` (`bind`) is one part of that
mk9 has joined #ocaml
mk9 has quit [Client Quit]
VermillionAzure has quit [Read error: Connection reset by peer]
jimt has quit [Ping timeout: 256 seconds]
<ZirconiumX>
Mmm, I've been trying to pick up monads though, gonz_
Haudegen has quit [Remote host closed the connection]
ozzymcduff has joined #ocaml
<reynir>
what is that?
jaar has joined #ocaml
granttrec has quit [Ping timeout: 240 seconds]
seangrove has quit [Ping timeout: 256 seconds]
seangrove has joined #ocaml
malina has joined #ocaml
jaar has quit [Remote host closed the connection]
jaar has joined #ocaml
dhil has quit [Ping timeout: 264 seconds]
seangrove has quit [Ping timeout: 260 seconds]
Haudegen has joined #ocaml
_andre has joined #ocaml
seangrove has joined #ocaml
TheLemonMan has joined #ocaml
ziyourenxiang_ has joined #ocaml
seangrove has quit [Ping timeout: 256 seconds]
neatonk has joined #ocaml
seangrove has joined #ocaml
dhil has joined #ocaml
spew has joined #ocaml
shinnya has joined #ocaml
Haudegen has quit [Remote host closed the connection]
seangrove has quit [Ping timeout: 265 seconds]
seangrove has joined #ocaml
mk9 has joined #ocaml
Haudegen has joined #ocaml
noitakomentaja has quit [Ping timeout: 250 seconds]
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
weird_error has quit [Quit: weird_error]
weird_error has joined #ocaml
weird_error has quit [Client Quit]
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mk9 has quit [Quit: mk9]
<pierpal>
there are camls all the way down!
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
jaar has quit [Remote host closed the connection]
jaar has joined #ocaml
letoh has quit [Ping timeout: 264 seconds]
letoh has joined #ocaml
mk9 has joined #ocaml
tarptaeya has quit [Ping timeout: 240 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
malina has quit [Ping timeout: 260 seconds]
dhil has quit [Ping timeout: 264 seconds]
dhil has joined #ocaml
mk9 has quit [Quit: mk9]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
malina has joined #ocaml
steenuil_ has quit [Remote host closed the connection]
roygbiv has joined #ocaml
roygbiv has quit [Quit: ™]
objmagic has joined #ocaml
mk9 has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
mk9 has quit [Quit: mk9]
pierpal has quit [Ping timeout: 248 seconds]
jaar has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 245 seconds]
<ZirconiumX>
Imagine I have a sum type of the squares of a chess board, and I want to convert them to a int from 0 to 63. Is there a more idiomatic and concise method than manually spelling out each of the 64 squares in a match expression?
pierpal has joined #ocaml
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ZirconiumX>
Essentially I just want to encode a range within the type system
<ZirconiumX>
And be able to convert that range to an int
ozzymcduff has joined #ocaml
<ZirconiumX>
Or do I just encode it as an int and assert the invariant of it being between 0 and 63
<discord3>
<Christophe> Because you can doesn't mean you should :I
mk9 has joined #ocaml
<discord3>
<Perry> Christophe gets it immediately.
mk9 has quit [Read error: Connection reset by peer]
<discord3>
<Christophe> I wonder what's going to be the adoption of Javascript like when was takes off
<companion_cube>
wasm you mean?
<companion_cube>
hopefully JS' adoption will decrease after a few years
<companion_cube>
(with a lot of inertia, sadly)
<discord3>
<Perry> That's not going to happen.
<discord3>
<Perry> It's going to start taking over even more from what I can tell. It's sad.
<companion_cube>
why so?
<discord3>
<Perry> Because Electron etc. are now the only way to do portable GUI apps.
<discord3>
<Perry> It's even worse now that Apple is deprecating OpenGL because that was one of the few remaining alternative paths.
<companion_cube>
but why wouldn't electron support wasm ?
<discord3>
<Perry> It might but that doesn't really help in the end. The damage is done. Web browsers are becoming the only real platform around.
<companion_cube>
yes, that sucks, I agree
<discord3>
<Perry> And the native language of the browser and its DOM is JavaScript.
<companion_cube>
however it's not exactly the same as JS taking off even more
<discord3>
<Perry> At least OCaml has a good story there.
kakadu has quit [Quit: Konversation terminated!]
<discord3>
<Perry> I think JavaScript is going to be the most dominant platform for end user apps for the next decade or so.
<discord3>
<Perry> It deeply disgusts me. 😐
<companion_cube>
:D
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<discord3>
<Perry> BTW, it's really sad that I can't write native GUI apps reasonably in OCaml. I'm on a Mac and there's basically no native way for me to do it. I could probably use jsoo to do something in electron but I'd hate myself.
<discord3>
<Christophe> Deprecating opengl?! Seriously Apple, not again...
yomimono has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 276 seconds]
<discord3>
<Perry> Yes, they're deprecating it, because their "Metal" API is faster. But it isn't cross platform. But they don't seem to get that this is a problem.
<discord3>
<Christophe> They don't care about compatibility with others. They have their own market
<discord3>
<Christophe> They're like Microsoft from the bad years.
<companion_cube>
is metal also faster than vulkan ?
<discord3>
<Perry> I have no idea. I know little about this stuff. I'm rarely interested in high performance graphics.
<discord3>
<Perry> Ah, apparently there's some sort of translator layer that will allow Vulkan to work on top of Metal, so there's that.
<ZirconiumX>
Moltenvk
FreeBirdLjj has joined #ocaml
<companion_cube>
don't worry y'all, the universal graphics interface of the future is javascript's canvas
roygbiv has joined #ocaml
ozzymcduff has joined #ocaml
tarptaeya has quit [Quit: Konversation terminated!]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Guest16961 has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
jack5638 has quit [Ping timeout: 256 seconds]
jack5638 has joined #ocaml
seangrove has quit [Read error: Connection reset by peer]
seangrove has joined #ocaml
kakadu has joined #ocaml
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 248 seconds]
bartholin has quit [Quit: Leaving]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
jnavila has joined #ocaml
seangrove has quit [Ping timeout: 255 seconds]
<hannes>
I'm trying to get my head around lwt, would someone have the knowledge whether I can gather statistics of how many tasks (a) have been created (b) are atm sleeping (I think I can get this from Lwt_engine), and (c) how many tasks finished so far, maybe (d) how many waiters/callbacks are around
<discord3>
<mseri> If you want to avoid browser I think the least evil for multiplatform gui is qt at the moment
<discord3>
<mseri> It is not too native feeling but it mostly works
<hannes>
ah yes, thanks for reminding me of that :)
<discord3>
<mseri> I have never tried to use it with ocaml though
<discord3>
<mseri> From a brief search it seems supported with lablqt
<discord3>
<mseri> Now lablqml
<hannes>
but I'm mostly interested in the metrics, not so much in the visualisation (want to connect my grafana anyways)
seangrove has joined #ocaml
neatonk has quit [Ping timeout: 240 seconds]
argent_smith has quit [Quit: Leaving.]
steenuil has joined #ocaml
roygbiv has quit [Quit: ™]
ygrek has joined #ocaml
malina has quit [Ping timeout: 256 seconds]
ziyourenxiang_ has quit [Remote host closed the connection]
ziyourenxiang_ has joined #ocaml
tokomak has joined #ocaml
_andre has quit [Quit: leaving]
jnavila has quit [Remote host closed the connection]
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
granttrec has joined #ocaml
<granttrec>
discord3: thanks for the recommendation, the tutorial on the site was nice for getting familiar with the syntax, although I am also new to functional programming, as a compsci undergrad I don't want a really slow book, would it be ideal I used RWO?
<ZirconiumX>
granttrec: discord3 is a bot
<ZirconiumX>
But RWO is a good book to at least flick through
<granttrec>
ZirconiumX: the AI's too good lol
<ZirconiumX>
It's passing through messages from IRC to Discord
<ZirconiumX>
Not an AI, but you want to ping the person in <brackets>
<granttrec>
makes sense, seemed like an odd username
<granttrec>
ZirconiumX: how did you get your start with ocaml?
<ZirconiumX>
I went through the OCaml.org tutorial, but it only really clicked when I stumbled across RWO
ygrek has quit [Ping timeout: 245 seconds]
<ZirconiumX>
Still, there are things RWO doesn't teach, and it does have something of bias
<ZirconiumX>
*something of a bias
malina has joined #ocaml
<ZirconiumX>
granttrec: the OCaml tutorial uses the OCaml stdlib, while RWO uses Core. There's also Batteries as a library, but I haven't heard too much about it. I have a lot still to learn ^_^
<ZirconiumX>
Also RWO uses the Async library, but the community uses Lwt
<ZirconiumX>
Feel free to ping/PM me if there's anything you want to ask a fellow newbie
drewr has quit [Ping timeout: 240 seconds]
shinnya has joined #ocaml
Guest16961 has quit [Remote host closed the connection]
cbot has joined #ocaml
Haudegen has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
Haudegen has quit [Remote host closed the connection]
cbot_ has joined #ocaml
noitakomentaja has quit [Remote host closed the connection]
noitakomentaja has joined #ocaml
cbot has quit [Ping timeout: 265 seconds]
kakadu_ has quit [Remote host closed the connection]