<guanohhh>
Anarchos: don't listen to me, but I think an mli is an interface and an ml is the implementation. If you are talking about getting away with just .mli files, I don't know.
narimiran has joined #ocaml
<d_bot>
<Bluddy> I believe there are certain cases where you can use just an .mli file. I think this works for types. (i.e. no implementation is needed)
mxns has joined #ocaml
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<d_bot>
<EduardoRFS> Yup, you can use a .mli if you're defining only types
<d_bot>
<mnxn> huh, didn't know that
<d_bot>
<mnxn> pretty cool
<d_bot>
<mnxn> dune wants a `modules_without_implementation` field for it to work though
<companion_cube>
Or, just use a .ml with types inside
<d_bot>
<darrenldl> @Cyclomatic Complexity good news: recur API is kinda in place, and for the example you mentioned "Every 2 months, this. And every week, on Monday and Friday" can be done as follows
<d_bot>
<darrenldl> bad news: it's a mess to implement fully : D (recurrence up to day level is done at least), and I have no idea if it'll make it into the final API
<d_bot>
<Bluddy> yeah not sure what the advantage is for .mli only
<d_bot>
<darrenldl> (oh hm, i misread the sentence, oop)
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
vicfred has quit [Quit: Leaving]
mxns has joined #ocaml
mxns has quit [Ping timeout: 246 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
mbuf has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
daimrod has quit [Ping timeout: 258 seconds]
daimrod has joined #ocaml
shawnw has joined #ocaml
decentpenguin has quit [Quit: ZNC crashed or something]
decentpenguin has joined #ocaml
<oni-on-ion>
why does ocaml toplevel not refresh file list ?
<oni-on-ion>
i create a file with toplevel loaded (just 'ocaml') and #mod_use or #load or anything, it cannot find the file until i restart the REPL. why is this
<oni-on-ion>
?
<def>
which ocaml version?
<oni-on-ion>
4.11.1
<def>
hmm, there was a change in 4.09 or 4.08. would you mind checking with an old version if you still have the problem? this look like a regression.
<oni-on-ion>
"cannot find xyz.ml" and its in the same dir. it is not a heavy problem, as i can just make the files i know i may need before starting toplevel
<oni-on-ion>
extremely reproducable
<def>
yep, that's a regression. it's worth reporting :o
<Armael>
narrow (1, 2, 3) = (1, 2) is going to return false, so at least it would be a bit surprising
mxns has joined #ocaml
<theblatte>
*ksssss*!
<zozozo>
cemerick: well, it won't horribly break things, but the gc will keep alive the third value as long as the tuple is alive
<zozozo>
additionally, you have Obj.truncate for this kind of things iirc
<companion_cube>
why use Obj
<zozozo>
companion_cube: because hacking the runtime if fun !
<zozozo>
*is
<companion_cube>
no it's not :p
<companion_cube>
it's dangerous and it requires unsafe levels of knowledge of the compiler
<zozozo>
well, it has to be, because else my job is not that fun, :p
<companion_cube>
sure, but the compiler doesn't change under your feet
<companion_cube>
by definition :)
<zozozo>
indeed, XD
<zozozo>
i'm more on the side of people that change the compiler under everyone else's feets, so, yeah I'm not a typical regular hack-the-runtime ocamler
<zozozo>
and flambda will break your program if you use Obj, so indeed probably not a good idea
<companion_cube>
exactly
<zozozo>
actually, maybe flambda2 will complain at compile-time if you do this kind of thing (though maybe it allows them because of gadts), let me check
<cemerick>
huh, narrow as above seems okay with flambda
<cemerick>
not really worried about gc, since everything's long-lived anyway
<companion_cube>
zozozo: how would it know?
<companion_cube>
change of size?
<zozozo>
companion_cube: flambda2 can keep track of a value's size and tag
<companion_cube>
ok, so indeed a `magic` that changes the size is invalid
<companion_cube>
btw, do you plan to be able to unpack non-escaping tuples/sums?
<companion_cube>
like a local option/local tuple
<zozozo>
you'd better wrap it in a Sys.opaque_identity at least
<companion_cube>
will you have attributes to ensure it does so, and warnings if it fails to do so?
<companion_cube>
(like [@tailcall])
<zozozo>
companion_cube: so for instance with a view function, assuming it's inlined, the intermediate value wil likely not need to be allocated
<zozozo>
for things like that across function borders, it's less easy to do (well less easy to determine when to do and precisely how to do that), so there are still some discussions about it
<companion_cube>
I guess we'll always be limited by the lack of proper value types
<zozozo>
well... starting with flambda and in the backedn, it's not really that much of a problem, I think (but just to be sure what do you mean by proper value types ? the kinds proposed in the unboxing RFC ?)
objmagic has joined #ocaml
<companion_cube>
yeah, something that is a value and not a block, even though it's not `int`
<companion_cube>
(or a restriction thereof)
nullcone has joined #ocaml
vicfred has quit [Quit: Leaving]
gareppa has joined #ocaml
Jesin has quit [Quit: Leaving]
gareppa has quit [Quit: Leaving]
Jesin has joined #ocaml
mxns has quit [Ping timeout: 258 seconds]
mxns has joined #ocaml
Jesin has quit [Quit: Leaving]
mxns has quit [Ping timeout: 260 seconds]
Jesin has joined #ocaml
mxns has joined #ocaml
wonko7 has quit [Ping timeout: 258 seconds]
amiloradovsky has joined #ocaml
narimiran has quit [Ping timeout: 240 seconds]
wonko7 has joined #ocaml
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<companion_cube>
is there a way to insert raw html into tyxml?