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.]
waleee has quit [Ping timeout: 252 seconds]
myrkraverk has quit [Read error: Connection reset by peer]
myrkraverk has joined #ocaml
<companion_cube> another day, another flash of anger at Buffer.t
<companion_cube> I should keep a count somewhere
<discocaml> <coolccat> Hi, is there any way I can wrap a string/buffer in an in_channel for unit testing?
<discocaml> <coolccat> I have a function that reads from an in_channel I want to test
<discocaml> <coolccat> Does a temporary file work maybe? Just create a temp file which contains the string and read from that + delete?
<discocaml> <coolccat> Hoping for an easier way though
hsw has joined #ocaml
<discocaml> <hockletock> https://ocaml.org/play#code=bGV0IGljX29mX3N0cmluZyBzID0KICBsZXQgcGlwaW4sIHBpcG91dCA9IFVuaXgucGlwZSAoKSBpbgogIGxldCBvYyA9IFVuaXgub3V0X2NoYW5uZWxfb2ZfZGVzY3IgcGlwb3V0IGluCiAgT3V0X2NoYW5uZWwub3V0cHV0X3N0cmluZyBvYyBzOwogIE91dF9jaGFubmVsLmNsb3NlIG9jOwogIFVuaXguaW5fY2hhbm5lbF9vZl9kZXNjciBwaXBpbgo%3D
<discocaml> <hockletock> that's what I used for that purpose in advent of code
<discocaml> <coolccat> thx!
<companion_cube> ahaha no you can't
alexherbo2 has joined #ocaml
alexherbo2 has quit [Ping timeout: 256 seconds]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #ocaml
tomku has quit [Ping timeout: 265 seconds]
tomku has joined #ocaml
torretto has quit [Ping timeout: 260 seconds]
torretto has joined #ocaml
Serpent7776 has joined #ocaml
toastal has joined #ocaml
pi3ce has joined #ocaml
bartholin has joined #ocaml
toastal has left #ocaml [Disconnected: Hibernating too long]
toastal has joined #ocaml
olle has joined #ocaml
alexherbo2 has joined #ocaml
<reynir> @hockletock I think you're in trouble if the write to the pipe blocks...
alexherbo2 has quit [Ping timeout: 256 seconds]
Inline has joined #ocaml
Tuplanolla has joined #ocaml
<discocaml> <ada2k> are there any proposals for an exn_bt type in stdlib?
<discocaml> <ada2k> i know picos has one, but stdlib domains also encounter the need for one: https://github.com/ocaml/ocaml/issues/12362#issuecomment-2214051633. having a shared type (even if it's just an alias for a tuple) would be good
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
<discocaml> <lukstafi> Somehow I missed the immutable arrays PR till it's been brought up on Discuss just now: https://github.com/ocaml/ocaml/pull/13097 . A bit strange that it doesn't mention the option to call them "tuples"? "immutable array" is a mouthful compared to "tuple".
tcfhk has joined #ocaml
toastal has left #ocaml [Disconnected: Hibernating too long]
thizanne has quit [Ping timeout: 258 seconds]
Fardale has quit [Ping timeout: 258 seconds]
Fardale has joined #ocaml
thizanne has joined #ocaml
<discocaml> <sim642> Tuple would be way more confusing, because existing tuples in OCaml have statically known length, but immutable arrays would not
toastal has joined #ocaml
<discocaml> <lukstafi> But the tuple family of types exist only in the metalanguage, not in OCaml 😉
<discocaml> <lukstafi> In OCaml there are only pairs, triples, quadruples...
<discocaml> <lukstafi> In fact it's more about the pragmatic choice allowing freezing of arrays into immutable arrays. Instead, you could have the option of no-copy injecting pairs, triples, quadruples... into the new types.
<discocaml> <lukstafi> *into the new (parametric) type
bartholin has quit [Remote host closed the connection]
bartholin has joined #ocaml
<discocaml> <drupyog> @lukstafi Good luck explaining to beginners (and not beginners) that a "triple" is not a "tuple" 😄
<discocaml> <drupyog> @lukstafi Good luck explaining to beginners (and not beginners) that a "triple" is not a "tuple" (with your definition) 😄
tcfhk has quit [Remote host closed the connection]
<companion_cube> But tuples are heterogeneous
<companion_cube> No relation to immutable arrays at all
<discocaml> <lukstafi> Right, homogeneous tuples.
toastal has quit [Ping timeout: 255 seconds]
<octachron> If tuple types were a true type familly, an immutable array could be written as "'elt immutable_array = ('elt * 'all) as 'all"
mbuf has joined #ocaml
<companion_cube> Really i wish people would focus on more important stuff than immutable arrays
<discocaml> <lukstafi> Because lists are good enough?
tcfhk has joined #ocaml
<discocaml> <deepspacejohn> Personally, I think user-implemented immutable arrays are good enough for the times when they're useful
<companion_cube> Arrays are good enough
GreaseMonkey has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
greaser|q has joined #ocaml
tcfhk has quit [Remote host closed the connection]
myrkraverk has quit [Read error: Connection reset by peer]
waleee has joined #ocaml
myrkraverk has joined #ocaml
waleee has quit [Ping timeout: 260 seconds]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
inline__ has joined #ocaml
Inline is now known as Guest6232
Guest6232 has quit [Killed (lead.libera.chat (Nickname regained by services))]
inline__ is now known as Inline
olle has quit [Ping timeout: 245 seconds]
dstein64- has joined #ocaml
Inline has quit [Ping timeout: 265 seconds]
dstein64 has quit [Ping timeout: 265 seconds]
dstein64- is now known as dstein64
Inline has joined #ocaml
Anarchos has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
mbuf has quit [Ping timeout: 252 seconds]
mbuf has joined #ocaml
mbuf has quit [Client Quit]
Anarchos has quit [Ping timeout: 252 seconds]
Anarchos has joined #ocaml
motherfsck has quit [Quit: quit]
Anarchos has quit [Ping timeout: 264 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 245 seconds]
Anarchos has joined #ocaml
waleee has joined #ocaml
Anarchos has quit [Ping timeout: 245 seconds]
pi3ce has quit [Ping timeout: 265 seconds]
Anarchos has joined #ocaml
pi3ce has joined #ocaml
tomku has quit [Ping timeout: 252 seconds]
greaser|q has quit [Changing host]
greaser|q has joined #ocaml
greaser|q is now known as GreaseMonkey
tomku has joined #ocaml
YuGiOhJCJ has joined #ocaml
Anarchos has quit [Ping timeout: 276 seconds]
Serpent7776 has quit [Quit: leaving]
bartholin has quit [Quit: Leaving]
chrisz has quit [Ping timeout: 264 seconds]
germ- has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
germ- has joined #ocaml
gentauro has quit [Read error: Connection reset by peer]
gentauro has joined #ocaml