companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.14.0 released: https://ocaml.org/releases/4.14.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Soni has quit [Ping timeout: 258 seconds]
raskol has joined #ocaml
gio123 has joined #ocaml
<gio123> hi
<gio123> octachron: very last question if you are still here
<williewillus> is there a canonical place where the trunk manual is rendered?
wingsorc has joined #ocaml
waleee has quit [Ping timeout: 248 seconds]
rambocoder_ has joined #ocaml
Soni has joined #ocaml
rambocoder_ has quit [Client Quit]
bobo_ has joined #ocaml
spip has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #ocaml
gio123 has quit [Quit: Client closed]
azimut has quit [Ping timeout: 240 seconds]
gravicappa has joined #ocaml
spip has joined #ocaml
bobo_ has quit [Ping timeout: 260 seconds]
TakinOver has quit [Ping timeout: 255 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Haudegen has joined #ocaml
azimut has joined #ocaml
mbuf has joined #ocaml
mbuf has quit [Quit: Leaving]
raskol has quit [Ping timeout: 276 seconds]
szkl has joined #ocaml
trev_ has joined #ocaml
<octachron> williewillus, not at this moment.
<d_bot> <ostera> is it possible to broaden the type of a polymorphic variant through a coercion?
<d_bot> <octachron> ``let f x = (x:[`A]:>[> `A])`` ?
<d_bot> <ostera> ```ocaml
<d_bot> <ostera> let a : [ | `A ] = `A
<d_bot> <ostera> let b = (a :> [> `A ])
<d_bot> <ostera> let c : [> `A ] list = `C :: b
<d_bot> <ostera> ```
<d_bot> <ostera> yes
<d_bot> <ostera> that snippet i posted gets me an error:, essneitally `b` wasn't coerced to `[> \``A]`
<d_bot> <ostera> (welp, i can't backtick right)
<d_bot> <octachron> You are missing the ground type in the coercion. `` let b = (a : [ `A ] :> [> `A ]) ``
azimut has quit [Ping timeout: 240 seconds]
<d_bot> <ostera> i see, that helps with coercing b
<d_bot> <ostera> but it still won't fit into c :think:
<d_bot> <glennsl> Because you're trying to prepend to `b`, which is not a list maybe?
<d_bot> <ostera> oh :Facepalm:
<d_bot> <ostera> my bad, i've been writing too much rescript, need to brush up my ocaml
<d_bot> <ostera> ```ocaml
<d_bot> <ostera> let c : [> `A ] list = [`C; b]
<d_bot> <ostera> ```
<d_bot> <ostera> this works as expected
gio123 has joined #ocaml
<d_bot> <ostera> thanks @octachron @glennsl :Prayge:
<d_bot> <ostera> now lets see how this works when the original polyvariant comes from a ref 😛
<d_bot> <glennsl> I'm curious why the compiler is not able to infer the ground type here though, like it usually is able to. And why is the coercion then just ignored? Should the coercion not error?
wingsorc has quit [Quit: Leaving]
<d_bot> <octachron> The ground and target types probably end up sharing a variable type `x:[> A] as 'a:> [> A ] as 'a` which result in closing the coerced type. (aka the issue is that ``[> `A ] as 'a`` is ``[ `A ]`` for some value of `a`.
<d_bot> <glennsl> Ah, yeah that makes some sense. Thanks!
gravicappa has quit [Ping timeout: 276 seconds]
gio123 has quit [Quit: Client closed]
gio123 has joined #ocaml
gio123 has quit [Quit: Client closed]
gio123 has joined #ocaml
<gio123> octachron
olle has joined #ocaml
gio123 has quit [Quit: Client closed]
bartholin has joined #ocaml
gio123 has joined #ocaml
<gio123> octachron : hi
<d_bot> <glennsl> gio123: Please stop nagging people. It's annoying, some might find it rude, and it certainly won't make anyone more willing to help. If you have a question, just ask it. If someone then wants to help you they will.
Haudegen has quit [Quit: Bin weg.]
<gio123> glennsl: shut up
<gio123> it is not ur buisness
<d_bot> <NULL> Way to go if you want to get help
<octachron> It is however part of IRC etiquette.
<octachron> Discussion should be structured in a sufficiently asynchronous way that users from Eris might be able to participate.
<gio123> ok
<gio123> it means I should not join this chanell
<d_bot> <Bluddy> You can be in this channel, but there are social rules to observe. Nobody here is working for pay - we're all volunteering to talk about a topic we enjoy.
Anarchos has joined #ocaml
<gio123> ok
<gio123> octachron  help me a lot
<gio123> I do not think everyone knows threads here
<octachron> Most of your problems are not directly to threads. And I am very far from being the best expert on threads in this channel. Thus, it is all-around better to ask your questions directly to the channel.
<gio123> what is termination criteria of server_fun ?
<gio123> what deacreases? when this function terminates?
Haudegen has joined #ocaml
gravicappa has joined #ocaml
amk has quit [Ping timeout: 258 seconds]
raskol has joined #ocaml
amk has joined #ocaml
raskol has quit [Ping timeout: 258 seconds]
<gio123> any help?
<qwr> that doesn't seem threads specific question, but ocaml generally - this function seems to always recurse unless some of the called functions throws an exception
gio123 has quit [Quit: Client closed]
<haesbaert> ETOLATE
gio123 has joined #ocaml
<gio123> sorry disconected
<gio123> did someone reply?
<haesbaert> 2:27 < qwr> that doesn't seem threads specific question, but ocaml generally - this function seems to always recurse unless some of the called functions throws an exception
trev_ has quit [Remote host closed the connection]
<gio123> so, server_fun will never stops. No?
<gio123> which function may throw exceptiion?
<haesbaert> unless someone somewhere throws an exception, that seems to be the case.
<qwr> afaik probably none of the functions called there, so the function probably won't terminate
<gio123> it terminates
<gio123> let test =
<gio123>   let s = start_server [("userA", "passA"); ("userB", "passB")] in
<gio123>   post s "userB" "passB" "Welcome to my OCaml blog.";
<gio123>   post s "userA" "passA" "My name is A and I'm starting my own blog!";
<gio123>   post s "userB" "12345" "I am a hacker attacking B's blog now!";
<gio123>   post s "userB" "passB" "You can have threads in OCaml!";
<gio123>   read s "userB"
<gio123> for this input
<qwr> the code would be clearer if it included the opened modules (Event and Thread)
<gio123> open Thread
<gio123> open Event
<gio123> i have them
<qwr> gio123: i had to guess
<gio123> qwr: so, could you tell me again please,
<gio123> whether server_fun terminates in general?
<gio123> but, I gave you test and it terminates...
<qwr> i would have to debug to see what it actually does - i've not used the event module and looking the code and api doc it doesn't look like it would actually terminate - maybe it just waits forever on sync for example?
pippijn_ is now known as pippijn
gravicappa has quit [Ping timeout: 248 seconds]
<gio123> do not know :(
<qwr> add prerr_endline "something"; into few places?
<gio123> where?
<Anarchos> sometimes a transform a value XX in (XX:int), just to let the compiler spits its type....
<qwr> or replace create server_fun [] with join (create server_fun [])
<Anarchos> once i am satisfied with the real type, i put it again in (XX:real_type) : no overhead as with prerr_endline at runtime, and you got source documentation for free :)
<qwr> then the join will wait for server thread termination and you'll get to see if it actually terminates
<gio123> aha
<gio123> it does not terminates no
<gio123> qwr
<gio123> what happened?
<qwr> gio123: what you mean? if the join keeps waiting it means that the server_fun thread stays alive, probably indefinitely waiting on some blocking Event function like sync
<gio123> why does it terminating before and does not terminates now?
<qwr> it wasn't before - you didn't change the function
<qwr> the initial communication went fast, the main thread exited taking the whole process down and you had no idea what happened with the thread
aspe has joined #ocaml
waleee has joined #ocaml
motherfsck has quit [Ping timeout: 246 seconds]
Sankalp has quit [Ping timeout: 248 seconds]
Sankalp- has joined #ocaml
Sankalp- is now known as Sankalp
gio123 has quit [Quit: Client closed]
rgrinberg has joined #ocaml
tiferrei has quit [Remote host closed the connection]
tiferrei has joined #ocaml
emp_ is now known as emp
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
spip has quit [Ping timeout: 248 seconds]
spip has joined #ocaml
waleee has quit [Ping timeout: 255 seconds]
spip has quit [Ping timeout: 246 seconds]
rgrinberg has joined #ocaml
gravicappa has joined #ocaml
bobo_ has joined #ocaml
vicfred has joined #ocaml
raskol has joined #ocaml
aspe has quit [Ping timeout: 255 seconds]
brettgilio has quit [Ping timeout: 248 seconds]
aspe has joined #ocaml
xgqt has quit [Remote host closed the connection]
xgqt has joined #ocaml
zebrag has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
brettgilio has joined #ocaml
<d_bot> <Bluddy> ok it's official - I LOVE ppx_import
<d_bot> <Bluddy> importing from your own mli file is SO nice
bartholin has quit [Quit: Leaving]
aspe has quit [Quit: aspe]
tiferrei has quit [Remote host closed the connection]
tiferrei has joined #ocaml
tiferrei has quit [Client Quit]
raskol has quit [Ping timeout: 260 seconds]
waleee has joined #ocaml
amk has quit [Remote host closed the connection]
amk has joined #ocaml
Haudegen has joined #ocaml
aspe has joined #ocaml
aspe has quit [Quit: aspe]
raskol has joined #ocaml
azimut has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
Anarchos has quit [Ping timeout: 255 seconds]
vicfred has quit [Remote host closed the connection]
vicfred has joined #ocaml
Anarchos has joined #ocaml
raskol has quit [Quit: Lost terminal]
bobo_ has quit [Ping timeout: 260 seconds]
bobo_ has joined #ocaml
<d_bot> <mbacarella> in there much overlap in code generation on all of the ARM platforms? e.g. do Apple Silicon, AWS Graviton and 64-bit Raspberry Pi backends share ARM-specific code?
<d_bot> <octachron> There is only one ARM64 backend in term of code.
Anarchos has quit [Ping timeout: 256 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #ocaml
gravicappa has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amk has quit [Ping timeout: 260 seconds]
amk has joined #ocaml
bobo_ has quit [Ping timeout: 248 seconds]
bobo_ has joined #ocaml
<d_bot> <mbacarella> thanks
<d_bot> <mbacarella> is there more info about the compiler `-linscan` option? Sounds like it improves compile times but may reduce "the quality" of the generated code? (as per here: https://github.com/ocaml/ocaml/issues/5324).
rgrinberg has joined #ocaml
Haudegen has quit [Ping timeout: 248 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
wingsorc has joined #ocaml
vicfred has quit [Read error: Connection reset by peer]
vicfred_ has joined #ocaml
drewolson has quit [Ping timeout: 248 seconds]
rak has quit [Ping timeout: 255 seconds]
sparogy has quit [Ping timeout: 255 seconds]
ns12 has quit [Ping timeout: 248 seconds]
towel_ has quit [Ping timeout: 276 seconds]
sim642 has quit [Ping timeout: 256 seconds]
rak has joined #ocaml
<companion_cube> it's linear scanning for register allocation, which I think is linear time
<companion_cube> (whereas the usual graph coloring can be NP complete — caution: memories from ~2009)
sparogy has joined #ocaml
drewolson has joined #ocaml
ns12 has joined #ocaml
towel has joined #ocaml