ocabot has quit [Remote host closed the connection]
discocaml has quit [Remote host closed the connection]
discocaml has joined #ocaml
companion_cube has joined #ocaml
jusensei2 has quit [Server closed connection]
jusensei2 has joined #ocaml
ocabot has joined #ocaml
h0rror has quit [Server closed connection]
h0rror has joined #ocaml
tomku has quit [Server closed connection]
tomku has joined #ocaml
leonardus has quit [Server closed connection]
leonardus has joined #ocaml
<discocaml>
<gooby_clown> I've seen it but, having boxed ints seems kinda crap, reminds me of Python
<companion_cube>
they can be unboxed in some circumstances, but yeah, it's not great
<companion_cube>
I do hope that what JST proposes will improve the situation
Fardale has quit [Server closed connection]
Fardale has joined #ocaml
ansiwen has quit [Server closed connection]
ansiwen has joined #ocaml
mal`` has quit [Quit: Leaving]
mal`` has joined #ocaml
ebb has quit [Server closed connection]
Serpent7776 has joined #ocaml
hrberg has joined #ocaml
jsoo has quit [Server closed connection]
jsoo has joined #ocaml
ebb has joined #ocaml
pie_ has quit [Server closed connection]
pie_ has joined #ocaml
vsiles has quit [Server closed connection]
vsiles has joined #ocaml
sagax has joined #ocaml
Putonlalla has quit [Server closed connection]
Putonlalla has joined #ocaml
bcksl has quit [Server closed connection]
bcksl has joined #ocaml
Anarchos has joined #ocaml
<discocaml>
<bluddy5> It's the price we pay for having low memory usage in general. The runtime is highly specialized for ints, bools and no other primitive type.
yziquel has joined #ocaml
dnh has joined #ocaml
noonien8 has quit [Server closed connection]
noonien8 has joined #ocaml
mima has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
amk has quit [Ping timeout: 245 seconds]
amk has joined #ocaml
<discocaml>
<gooby_clown> Hmm, how does the specialisation decrease memory usage?
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<companion_cube>
We could have a more sophisticated system like some scheme implems that use multiple tag bits
<companion_cube>
And provide transparent upgrade to bigint
<discocaml>
<bluddy5> Look at every other language with GC: they have much heavier memory usage per object in memory to describe different types in the runtime. Haskell can handle full ints and floats using these mechanisms. The CLR and Java runtime have complete type information in the runtime, which allows 'dumb' code like the GC to parse memory intelligently. OCaml is really at an extreme point from the memory usage POV.
<companion_cube>
Not unique again, see schemes, maybe other MLs
<discocaml>
<bluddy5> Yeah certainly not unique, but a different tradeoff point than our main competitors.
yziquel has quit [Quit: Ping timeout (120 seconds)]
<discocaml>
<gooby_clown> Aah I see
dnh has joined #ocaml
<discocaml>
<bluddy5> Look at most other languages with GC: they have much heavier memory usage per object in memory to describe different types in the runtime. Haskell can handle full ints and floats using these mechanisms. The CLR and Java runtime have complete type information in the runtime, which allows 'dumb' code like the GC to parse memory intelligently. OCaml is really at an extreme point from the memory usage POV.
<companion_cube>
I don't even know how the jvm scans the stack, does it have descriptors for what's boxed or not?
<discocaml>
<barconstruction> i totally get where you're coming from here but imo this is focusing too much on one part of the semantics of python. there is a lot of runtime cost associated w the fact x+y becomes x.add(y) becomes a dynamic method lookup in the table of attributes of x which has to be ready to throw an error if no such attribute exists
<discocaml>
<barconstruction> imo this is more to blame than unboxed objects
waleee has joined #ocaml
szkl has joined #ocaml
edr has joined #ocaml
emp has quit [Server closed connection]
emp has joined #ocaml
oriba has joined #ocaml
<discocaml>
<gooby_clown> Ah yeah fair point, Python ia even more ridiculous than I thought
greenbagels has quit [Server closed connection]
greenbagels has joined #ocaml
terrorjack has quit [Quit: Ping timeout (120 seconds)]
SoniEx2 has quit [Remote host closed the connection]
szkl has quit [Quit: Connection closed for inactivity]
SoniEx2 has joined #ocaml
terrorjack has joined #ocaml
waleee has quit [Ping timeout: 255 seconds]
<discocaml>
<leostera> does anyone know why we have [@@anotations] _after_ expressions and not before?
<discocaml>
<leostera> `let x = () [@@hello]` instead of `[@@hello] let x = ()`
<discocaml>
<leostera> @octachron ?
<discocaml>
<leostera> was thinking that writing them before would make a lot of let%extensions go _poof_
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ridcully has quit [Server closed connection]
ridcully has joined #ocaml
sim642 has quit [Server closed connection]
sim642 has joined #ocaml
Tuplanolla has joined #ocaml
dhil has joined #ocaml
<discocaml>
<deepspacejohn> You can do `let[@hello] x = ()` which is equivalent to `let x = () [@@hello]`.
hannes has quit [Ping timeout: 268 seconds]
<discocaml>
<deepspacejohn> (I don't have an answer to the original question, though.)
greaser|q has quit [Changing host]
greaser|q has joined #ocaml
greaser|q is now known as GreaseMonkey
sagax has quit [Ping timeout: 246 seconds]
Anarchos has quit [Ping timeout: 252 seconds]
chrisz has quit [Server closed connection]
chrisz has joined #ocaml
waleee has joined #ocaml
<discocaml>
<leostera> i can live with this!
<discocaml>
<charlielidbury> What property testing frameworks do people reccomend? I'm using QCheck but it seems to do a few things weirdly, if there was one which didn't that would be lovely
<discocaml>
<charlielidbury> For one, it seems to take ages to find obvious minimal counter examples:
<discocaml>
<charlielidbury> ```
<discocaml>
<charlielidbury> opam@f8e2dfe63494:/workspaces/ochre$ dune test
<discocaml>
<charlielidbury> random seed: 336997035
<discocaml>
<charlielidbury> -3868570873635643289
<discocaml>
<charlielidbury> -1934285436817821645
<discocaml>
<charlielidbury> -967142718408910823
<discocaml>
<charlielidbury> -483571359204455412
<discocaml>
<charlielidbury> -241785679602227706
<discocaml>
<charlielidbury> -120892839801113853
<discocaml>
<charlielidbury> -60446419900556927
<discocaml>
<charlielidbury> -30223209950278464
<discocaml>
<charlielidbury> ...
<discocaml>
<charlielidbury> -54
<discocaml>
<charlielidbury> -27
<discocaml>
<charlielidbury> -14
<discocaml>
<charlielidbury> -7
<discocaml>
<charlielidbury> -4
<discocaml>
<charlielidbury> -2
<discocaml>
<charlielidbury> -1
<companion_cube>
yeah it bisects, so what?
<discocaml>
<charlielidbury> 0
<discocaml>
<charlielidbury> ```
<discocaml>
<charlielidbury> RapidCheck for C++ will try 0 first, because that's going to discover the error way quicker, I think for this reason my test suite is taking longer than it needs to
<companion_cube>
are you testing over _all_ integers? interesting
<companion_cube>
the way qcheck works makes this a bit difficult because you'd have to try 0 every other shrink step
<companion_cube>
because it's fairly stateless when it does shrinking
<discocaml>
<charlielidbury> Well, I'm not used to have to reduce the search space to a smaller range just so the framework trys smaller values first
<discocaml>
<charlielidbury> so yes was testing all integers
<discocaml>
<charlielidbury> could you elaborate on this a bit? What do you mean?
<companion_cube>
well it generates random integers and "shrinks" when it finds a counter example
<companion_cube>
shrinking is a recursive process, it wouldn't start with 0
<companion_cube>
ah you might also want `Gen.graft_corners` or whatever it's called
<discocaml>
<charlielidbury> other frameworks don't start with a random integer, they start with 0
<discocaml>
<charlielidbury> because that will catch 90% of cases, and you'll typically be shrinking down there
<companion_cube>
that sounds like a thing very specific to rapidcheck :)
<discocaml>
<charlielidbury> hm maybe it is
<companion_cube>
if you have 5 inputs, do you try all combinations of 0 and random values for them?
<companion_cube>
or only all 0 first, and then random?
<discocaml>
<charlielidbury> You start with 0s then grow
<discocaml>
<charlielidbury> then shrink-grow-shrink-grow until you're in a local minimum
<companion_cube>
doesn't sound very random
<companion_cube>
I mean that sounds useful but it's not exactly quickcheck-like
<discocaml>
<charlielidbury> how you grow and how you shrink is random
<discocaml>
<charlielidbury> it uses all the typical psuedorandom number generation stuff
<discocaml>
<charlielidbury> I'm trying to lookup how the other ones do this because if this is the standard they're missing a trick!
<discocaml>
<charlielidbury> Okay well either way I'm gathering the answer is "no, I have configured everything fine, that's the expected behaviour" :P
<discocaml>
<charlielidbury> I'm wary of going off the beaten track just because it's what I'm used to, if this is what everyone does in OCaml land then it's probably good enough and I will reserve judgement until I'm better versed in it!
<discocaml>
<charlielidbury> But thanks for showing me that
<companion_cube>
👍
<discocaml>
<charlielidbury> Also, in rapidcheck you generate values with a statement like so:
<discocaml>
<charlielidbury> ```c++
<discocaml>
<charlielidbury> int x = *rc::gen::arbitrary<int>();
<discocaml>
<charlielidbury> ```
<discocaml>
<charlielidbury> which means you can conditionally generate things, like this:
<discocaml>
<charlielidbury> ```c++
<discocaml>
<charlielidbury> int x;
<discocaml>
<charlielidbury> if (cond) {
<discocaml>
<charlielidbury> x = *rc::gen::arbitrary<int>();
<discocaml>
<charlielidbury> } else {
<discocaml>
<charlielidbury> x = 5;
<discocaml>
<charlielidbury> }
<discocaml>
<charlielidbury> ```
<companion_cube>
see the monadic API in QCheck.Gen :)
<discocaml>
<charlielidbury> Ah thanks that's what I'm looking for :)
<discocaml>
<charlielidbury> Do you have any favourite docs for qcheck?
<greenbagels>
is there any way to mitigate the large binary sizes caused by using modules, even if you only want to use, say, one function from one submodule?
<greenbagels>
I imagine not, right? since native compilation links statically against the whole module object file?
<discocaml>
<charlielidbury> out of interest, what social media are you guys on CCBot using?
<discocaml>
<charlielidbury> ~~out of interest, what social media are you guys on CCBot using?~~ Ah it says IRC
<discocaml>
<Kali> irc, which is a protocol
<discocaml>
<Kali> edits resend messages
<discocaml>
<Kali> on the irc end
reynir has quit [Server closed connection]
<greenbagels>
#ocaml on irc.libera.chat
reynir has joined #ocaml
<greenbagels>
I wonder if I can @ people thru the bridge...
<discocaml>
<charlielidbury> @greenbagels boo
<greenbagels>
:p
<discocaml>
<Kali> you can, if you have their discord id
<discocaml>
<charlielidbury> I'm guessing that didn't work
<discocaml>
<Kali> then sending <@id>
<discocaml>
<Kali> however, plaintext does not do this
<greenbagels>
<charlielidbury> I'm guessing that didn't work
<discocaml>
<charlielidbury> my id is 110798372998221824
<discocaml>
<charlielidbury> that's my username
<discocaml>
<charlielidbury> you also missed the @
<greenbagels>
it did, but on irc the notification behavior is client-dependent
<greenbagels>
so for example on my client you just have to say my nickname for me to get pinged
<discocaml>
<charlielidbury> Oh right
<discocaml>
<charlielidbury> @charlielidbury
<greenbagels>
<@110798372998221824>
<discocaml>
<charlielidbury> I can ping myself that way, the discord text box corrects it to the internal representation, that must be how they encode tags in plaintext