nicholasf has quit [Remote host closed the connection]
mcc has joined #ocaml
nicholasf has joined #ocaml
sh0t has quit [Ping timeout: 250 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
sh0t has joined #ocaml
trevorriles has quit [Ping timeout: 244 seconds]
trevorriles has joined #ocaml
rgrinberg has joined #ocaml
unbalancedparen has joined #ocaml
unbalancedparen has quit [Client Quit]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sdothum has joined #ocaml
two_wheels has joined #ocaml
silver has quit [Quit: rakede]
jimt is now known as Jim7J1AJH
fluter has quit [Ping timeout: 250 seconds]
fluter has joined #ocaml
jeffmo has quit [Quit: jeffmo]
tmtwd has joined #ocaml
seangrove has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 252 seconds]
yunxing_ has quit [Remote host closed the connection]
seangrove has quit [Ping timeout: 252 seconds]
adelbertc has quit [Quit: Connection closed for inactivity]
A1977494 has joined #ocaml
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shim has joined #ocaml
Jim7J1AJH is now known as jimt
shim has quit [Quit: WeeChat 1.5]
Algebr` has joined #ocaml
kushal has joined #ocaml
nicholasf has quit [Remote host closed the connection]
yunxing_ has joined #ocaml
yunxing_ has quit [Remote host closed the connection]
yunxing_ has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
yunxing_ has quit [Quit: Leaving...]
sh0t has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
tmtwd has quit [Ping timeout: 264 seconds]
seangrove has joined #ocaml
tmtwd has joined #ocaml
nicholasf has joined #ocaml
nicholasf has quit [Ping timeout: 250 seconds]
nicholasf has joined #ocaml
FreeBird_ has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Ping timeout: 244 seconds]
saruta has quit [Ping timeout: 244 seconds]
yunxing_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
saruta has joined #ocaml
yunxing__ has joined #ocaml
seangrove has quit [Ping timeout: 252 seconds]
yunxing_ has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
tmtwd has quit [Ping timeout: 272 seconds]
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
shinnya has joined #ocaml
yegods has quit [Ping timeout: 246 seconds]
pierpa has quit [Ping timeout: 272 seconds]
seangrove has joined #ocaml
MercurialAlchemi has joined #ocaml
tmtwd has joined #ocaml
kolko has joined #ocaml
kolko has quit [Read error: Connection reset by peer]
f[x] has joined #ocaml
ygrek_ has joined #ocaml
f[x] has quit [Remote host closed the connection]
mcc has quit [Quit: Connection closed for inactivity]
tmtwd has quit [Ping timeout: 250 seconds]
kolko has joined #ocaml
kolko has quit [Read error: Connection reset by peer]
kamog` has joined #ocaml
kamog has quit [Ping timeout: 240 seconds]
mpenet has joined #ocaml
yunxing__ has quit [Ping timeout: 250 seconds]
AltGr has joined #ocaml
Algebr` has quit [Ping timeout: 250 seconds]
adelbertc has joined #ocaml
dexterph has joined #ocaml
seangrove has quit [Ping timeout: 272 seconds]
kushal has quit [Quit: Leaving]
seangrove has joined #ocaml
tristero has quit [Ping timeout: 276 seconds]
seangrove has quit [Ping timeout: 258 seconds]
Simn has joined #ocaml
yegods has joined #ocaml
larhat has joined #ocaml
FreeBird_ has joined #ocaml
jwatzman|work has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 258 seconds]
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
<tormen>
Hi. How can one "assert" that something is NOT an "option" ?
<flux>
assert (x = None); ?
<flux>
do you mean the type?
<tormen>
I mean distinguis int option from int or string option from string
<flux>
you want to have a polymorphic function but so that its input argument cannot be an 'a option?
<flux>
you cannot write a polymorphic function that distinguishes between types
<tormen>
flux: I have a record with all fields OPTIONAL that is filled across function calls but in the end I need to assure that some fields are not an option when changing to the FINAL data type that has 2 fields NON option(al).
<tormen>
flux: so I have type a_optional and type a... I guess a better way of putting this is to force the type on the function that will need the FINAL type "a" ... (because I am afraid ocaml would put the a_optional type there)
<flux>
perhaps some example code would be good
<flux>
you cannot expect the types to vary per input data to your program, though :)
<tormen>
flux: :)
Orion3k has quit [Ping timeout: 276 seconds]
nicholasf has quit [Remote host closed the connection]
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Orion3k has joined #ocaml
nicholasf has joined #ocaml
nicholasf has quit [Ping timeout: 252 seconds]
emmanueloga has left #ocaml [#ocaml]
nicholasf has joined #ocaml
Orion3k has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
A1977494 has quit [Ping timeout: 240 seconds]
yegods has quit []
fraggle_ has quit [Read error: Connection reset by peer]
kushal has joined #ocaml
fraggle_ has joined #ocaml
A1977494 has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
ygrek_ has quit [Ping timeout: 240 seconds]
fraggle_ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<tormen>
flux: thanks! ... your feedback made me realise that I should tackle this a different way
<tormen>
(I separated optional from mandatory parameters... cleaner and "securer" that way)
<tormen>
s/parameters/fields/
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Kakadu has joined #ocaml
Hakey has joined #ocaml
sdothum has joined #ocaml
ygrek has joined #ocaml
silver has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
TheLemonMan has joined #ocaml
adelbertc has quit [Quit: Connection closed for inactivity]
TheLemonMan has quit [Client Quit]
FreeBirdLjj has joined #ocaml
dhil has joined #ocaml
rossberg has quit [Remote host closed the connection]
rossberg has joined #ocaml
thomasga1 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
thomasga has quit [Ping timeout: 252 seconds]
seangrove has joined #ocaml
two_wheels has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
kushal has joined #ocaml
AltGr has left #ocaml [#ocaml]
BitPuffin has joined #ocaml
darkf has quit [Quit: Leaving]
sagotch has joined #ocaml
<sagotch>
Hi all, do you know if it is possible to pin a subdirectory of a git repo with opam ?
<sagotch>
I want to pin ocamlnet, but sources are in a `code` directory and the opam file expect it to be at root
thomasga1 has quit [Quit: Leaving.]
thomasga has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
AltGr has joined #ocaml
FreeBirdLjj has joined #ocaml
kamog` has quit [Remote host closed the connection]
tristero has joined #ocaml
saruta has quit [Ping timeout: 264 seconds]
seangrove has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
thomasga has joined #ocaml
Muzer has quit [Read error: Connection reset by peer]
<thomasga>
sagotch: unfortunately not yet. There is a discussion about it for opam 2.0. That something pretty useful to me too, so I hope it will be in.
saruta has joined #ocaml
Muzer has joined #ocaml
kushal has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 272 seconds]
mpenet has quit [Remote host closed the connection]
Orion3k has joined #ocaml
<sagotch>
thomasga: okay, thanks!
yunxing_ has joined #ocaml
yomimono has joined #ocaml
yunxing_ has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
A1977494 has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
AltGr has left #ocaml [#ocaml]
FreeBird_ has joined #ocaml
seangrove has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
hcarty has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
saruta has quit [Ping timeout: 276 seconds]
groovy2shoes has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
saruta has joined #ocaml
mehdib is now known as mehdi
mehdi is now known as mehdib
FreeBird_ has joined #ocaml
dexterph has quit [Ping timeout: 240 seconds]
sepp2k has joined #ocaml
ncthom91 has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 250 seconds]
bobry has joined #ocaml
AltGr has joined #ocaml
sh0t has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
tvynr has joined #ocaml
mcc has joined #ocaml
seangrove has quit [Ping timeout: 250 seconds]
kushal has joined #ocaml
seangrove has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
malc_ has joined #ocaml
nicholasf has quit [Remote host closed the connection]
seangrove has quit [Ping timeout: 240 seconds]
FreeBird_ has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
nicholasf has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
A1977494 has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
FreeBirdLjj has quit [Ping timeout: 250 seconds]
FreeBird_ has quit [Ping timeout: 258 seconds]
Sorella has quit [Quit: Connection closed for inactivity]
nicholasf has quit [Remote host closed the connection]
Sorella has joined #ocaml
AlexRussia has quit [Ping timeout: 240 seconds]
bobry has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has quit [Ping timeout: 258 seconds]
slash^ has joined #ocaml
FreeBirdLjj has joined #ocaml
AlexRussia has joined #ocaml
<tvynr>
I'm writing some PPX extensions for my project that we hope to use long-term. I've noticed that parsetree.mli, the definition of the AST, varies significantly between compiler versions 4.02 and 4.03 but hasn't changed much in trunk. Does anyone know how likely that interface is to stay stable?
<rgrinberg>
tvynr: I don't think we've had a minor version without breakage yet
<rgrinberg>
but we've only had a few at the infancy of the feature :P
<tvynr>
Drup: I've taken a closer look and it seems that the difference is a bit smaller than I'd thought.
<tvynr>
rgrinberg: 4.02 -> 4.03 has some breakages. For instance, "Pstr_type of type_declaration list" vs. "Pstr_type of rec_flag * type_declaration list" and "Pexp_apply of expression * (label * expression) list" vs. "Pexp_apply of expression * (arg_label * expression) list"
<Drup>
there was quite a bit of changes for last version, I don't think it's going to be that much next time, but it's still going to change a little bit, at least for new syntaxes
kolko has joined #ocaml
larhat has quit [Read error: No route to host]
<tvynr>
rgrinberg, Drup: But I get the sense from you both that you think they intend to maintain some kind of compatibility in the future; am I correct?
<tvynr>
rgrinberg, Drup: I'm mostly trying to figure out how to write my PPX extension once and not have to update it for every version of the compiler. :-P
<Drup>
not really, no
larhat has joined #ocaml
<tvynr>
I mean, adding a variant here or there makes sense.
larhat has quit [Remote host closed the connection]
<tvynr>
But I'm not clear on how one makes a good compiler-version-independent OPAM package for a PPX extension. Is there some abstraction I'm missing?
<Drup>
So, to really answer your question, the good way is to use ppx_metaquot/ppx_tools/ppx_core overlays as much as possible
<tvynr>
Hm.
<tvynr>
I've been looking at ppx_metaquot, but it doesn't seem to shield me from a lot of the specifics. Maybe I'm misunderstanding the interface I'm given.
nicholasf has joined #ocaml
<tvynr>
I'll dig into this a bit more. Thanks for the perspective. :)
<Drup>
tvynr: it doesn't shield you from everything, but that's why you have the other overlays
<tvynr>
Drup
<tvynr>
heh
<tvynr>
enter key
Algebr` has joined #ocaml
adelbertc has joined #ocaml
<tvynr>
Drup: I'll take a closer look at ppx_core; I don't think I'd understood that one to be so important.
<tvynr>
Drup, rgrinberg: Thanks for the info. I'm glad there's a community around this stuff; the documentation is still a bit thin yet. :)
<Drup>
it's not that important, it's convenient
pierpa has joined #ocaml
<Drup>
For exemple, lwt's code for the ppx works for both version (using various stuff in ppx_tools)
<rgrinberg>
Drup: here's to hoping that 4.04 will not break everyone's ppx's :P
<companion_cube>
ahah. ha. ha.
<Drup>
rgrinberg: heh, it probably will, and we will introduce some various things in ppx_tools, and it will be fine
<companion_cube>
o/ rgrinberg
<rgrinberg>
Drup: how are you liking topkg?
<Drup>
lol
<Drup>
I am not.
<Drup>
it solves none of my problems and try to solves a bunch of stuff that are not a problem for me.
<rgrinberg>
I knew you didn't like the old topkg but this one seems to have new features
<rgrinberg>
like the doc upload stuff
FreeBirdLjj has quit [Remote host closed the connection]
<rgrinberg>
Anyway, I'll at least give it a try...
<Drup>
rgrinberg: the doc upload stuff is literally 5 lines in my makefile that I copy around, I don't need extra tooling for it
<Drup>
oh yeah, and compile-time dependency is a huge NOPE for me.
<rgrinberg>
you can "vendor" it if you'd like ;)
<Drup>
yeah, right, the vendoring part is bigger than the oasis codegen, so no.
<Drup>
it does far less, it's less convenient and it's not as well tested
<Drup>
It works very well for one-module libraries, I agree on that :)
al-damiri has joined #ocaml
<companion_cube>
bigger than oasis? wow :D
<Drup>
companion_cube: I meant "vendoring topkg" vs "oasis's codegen"
<Drup>
not "topkg vs oasis"
BitPuffin has quit [Read error: Connection reset by peer]
<companion_cube>
yeah yeah
<companion_cube>
obviously topkg cannot be as big as oasis itself
<Drup>
that would be difficult ^^'
<companion_cube>
oasis is as big as the sum of every Bünzli lib :D
<Algebr`>
is topkg just for packaging libraries, not building?
<Drup>
I guess ?
<rgrinberg>
yeah, topkg seems to be a replacement for $ ocaml setup.ml -install
<Drup>
It's for packaging libs *on opam*
<rgrinberg>
yup - it's also opam aware so i think it may have some integration with opam publish as well perhaps?
<Drup>
so it does even less than that, rgrinberg.
<Algebr`>
companion_cube: hows oasis ?
<companion_cube>
the maintainer is slowly integrating the changes, so it's good
thomasga has quit [Quit: Leaving.]
<Algebr`>
I emailed Sylvain asking why the github issues thing was disabled and he told me bug tracking was on the forge.
<rgrinberg>
Drup: companion_cube I want a bunzli version of $ true
<Algebr`>
-_-_
<rgrinberg>
See how much more minimalistic it will be
<Algebr`>
companion_cube: also wanted to update some stuff in oasis itself, but oasis itself, the project doesn't even dogfood the latest version of oasis
<Drup>
the forge is very annoying, yes
Fleurety has quit [Remote host closed the connection]
Fleurety_ has joined #ocaml
<Algebr`>
I don't understand how an offically sanctioned ocaml project, saying that because its under the ocaml github umbrealla, has disabled issues
<Drup>
Algebr`: it's normal for a project to have one bugtracker
<companion_cube>
ah, the gnu true
<Drup>
you don't want having questions splited in multiple trackers
<companion_cube>
just use a BSD version ? :p
<rgrinberg>
companion_cube: i want a bunzli version :P
<companion_cube>
meh
<rgrinberg>
bsd one is bloated
<companion_cube>
I want to avoid bash
<Algebr`>
Drup: agreed, just don't understand why the easy and nice formatting github one would be eschewed
<companion_cube>
anyway, gotta go
<companion_cube>
see you
FreeBirdLjj has joined #ocaml
<Drup>
Algebr`: because it was on the forge first, and migrating trackers is hell
<Algebr`>
Drup: its one day of tedious effort
FreeBirdLjj has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 264 seconds]
<Drup>
I don't disagree with you, it should be migrated, the forge is a huge PITA. I explained why it's not the case. Contrary to what you tend to claim a bit quickly, ocaml library authors don't do things just to annoy their users. :D
<Algebr`>
I would do it for him if I had access
kushal has quit [Ping timeout: 240 seconds]
<rgrinberg>
Algebr`: you should do oUnit too while you're at it
<Algebr`>
I don't like oUnit anymore. alcotest is my testing goto now
<yomimono>
+1
<Drup>
At some point I wondered which one I should used, and I realized that I didn't understood oUnit's API after reading it for 5 minutes (I was tired ..). So I used alcotest
mcc has quit [Quit: Connection closed for inactivity]
thibm has left #ocaml ["WeeChat 1.5"]
gustav has joined #ocaml
kushal has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
Denommus` has joined #ocaml
Denommus has quit [Ping timeout: 244 seconds]
StrykerKKD has quit [Quit: Leaving]
yunxing_ has quit [Remote host closed the connection]
inr_ is now known as inr
yomimono has quit [Ping timeout: 240 seconds]
Zreynir is now known as reynir
yunxing_ has joined #ocaml
mrvn is now known as anyone
anyone is now known as mrvn
seangrove has joined #ocaml
<seangrove>
Hey all, I'm trying to make `module ProcessSet = Map.Make(String)`, but instead of string, I want String keys, and a value of (string * int)
<seangrove>
I assume there must be a pretty straightfoward way to do it, but it's not jumping out at me :)
<flux>
what's the difference between string and String keys?-)
<flux>
and the value can be anything (polymorphic) already
<seangrove>
flux: Sorry, typo
<seangrove>
Oh?
<seangrove>
Ok, very cool, thank you
<flux>
so it sounds you are done already :)
<seangrove>
That means a hashtable can have different types of values per key?
bensu_ has joined #ocaml
<seangrove>
Haha
<flux>
well, no
<flux>
one hash table can have only certain type for key and certain type for value
<seangrove>
Ok, that makes it simpler
<seangrove>
Sounds good
<flux>
also Map is not a hash table
<seangrove>
flux: Yes, good point, mixing up my projects
scarygelatin has joined #ocaml
Kakadu has quit [Quit: Page closed]
tane has joined #ocaml
ollehar has joined #ocaml
ncthom91 has joined #ocaml
Kakadu has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
rgrinberg has quit [Ping timeout: 244 seconds]
<pyon>
In a “module type”, how can I specify that an abstract type member is a subtype of another?
TheLemonMan has joined #ocaml
rgrinberg has joined #ocaml
yunxing_ has quit [Remote host closed the connection]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jeffmo has quit [Quit: jeffmo]
bensu_ has quit [Remote host closed the connection]
bensu_ has joined #ocaml
Algebr` has joined #ocaml
<Algebr`>
Speaking of testing earlier today, can bisect_ppx play nicely with alcotest?
<rgrinberg>
Algebr`: I don't see a raso why it shouldn't
<rgrinberg>
s/raso/reason/
<Algebr`>
actually I don't quite understand how to use bisect_ppx
<Algebr`>
How does it know what parts are not covered. Maybe will just wait for anntron to explain
bensu_ has quit [Remote host closed the connection]
jeffmo has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
MercurialAlchemi has joined #ocaml
<rgrinberg>
Algebr`: I think the idea is that only the code that you want covered should be preprocessed with the ppx extension
<rgrinberg>
So your tests (in w/e framework) should only link to the runtime bisect dependency
<Algebr`>
looking for example ode
fredlhsu has joined #ocaml
yunxing_ has joined #ocaml
<rgrinberg>
Your tests/code should not be modified for bisect to work
MercurialAlchemi has quit [Ping timeout: 272 seconds]
<rgrinberg>
so I'm afraid the only example code you will find is how to configure the build system
<rgrinberg>
So: 1) preprocess your code with bisect.ppx 2) Run your tests with bisect runtime lib linked in 3) generate the bisect report with bisect-ppx-report using all of those artifacts generated from the run
<Algebr`>
I see
<Algebr`>
bah, can't do: class foo = let module Foo = struct end in object end
<mrvn>
Algebr`: yes you can, just not as simple as that
<Algebr`>
mrvn: I figured you knew how to
<mrvn>
let module E = (val (module struct external stub : string -> #oLabel OClass.t = "caml_mrvn_QT5_OLabel_make" end) : Make)
Simn has quit [Ping timeout: 264 seconds]
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Algebr`>
wow
<mrvn>
not sure where I got that "val" part from
rgrinberg has quit [Read error: Connection reset by peer]
<mrvn>
# module type FOO = sig end class foo = let m = let module Foo = (val (module struct end) : FOO) in (module Foo : FOO) in object end;;
<mrvn>
module type FOO = sig end
<mrvn>
class foo : object end
tvynr has quit [Ping timeout: 260 seconds]
<mrvn>
don't ask me why you need that double let but somehow you do
bensu has joined #ocaml
Simn has joined #ocaml
AltGr has left #ocaml [#ocaml]
<mrvn>
who caresß it's obsolete anyway
<mrvn>
ups
<Algebr`>
thanks
<Algebr`>
Also odd: class foo = let open Bar in object end
ia0 has quit [Quit: Reconnecting]
ia0 has joined #ocaml
StatelessCat has quit [Ping timeout: 260 seconds]
octopus has quit [Ping timeout: 264 seconds]
<mrvn>
so overall: module type FOO = sig end class foo = let m = let module Foo = (val (module struct end) : FOO) in (module Foo : FOO) in let open m in object end;;
ia0 has quit [Client Quit]
ia0 has joined #ocaml
nicholasf has quit [Remote host closed the connection]
octopus has joined #ocaml
nicholasf has joined #ocaml
<Algebr`>
mrvn: also I forgot, for both the bars in: class foo = let bar = 10 in object and class foo = object val bar = 10 end, both get evaled at object init time right, or does the code between class and object run before the object instance variable?
StatelessCat has joined #ocaml
<mrvn>
Algebr`: object init time but afaik different storage
jerith has quit [Ping timeout: 244 seconds]
<Algebr`>
I don't get it at all what's the point of that split
<mrvn>
evaluated in order you write it in
jerith has joined #ocaml
<mrvn>
class foo = let bar = 10 in let baz = bar in object end works. object val bar = 10 val baz = bar end does not
darkf has joined #ocaml
fredlhsu has quit [Quit: fredlhsu]
<Algebr`>
I see, but then why can't the val's just reference each other
<Algebr`>
also that last let m = let module example doesn't work for me
ygrek has quit [Ping timeout: 272 seconds]
<mrvn>
I think for instance varaibles the evaluation order is undefined
<Algebr`>
I think there's an extra in?
fredlhsu has joined #ocaml
<mrvn>
Algebr`: probably
<mrvn>
never tried it
<mrvn>
Not sure what the point would be of defining a local module and opening it
rgrinberg has joined #ocaml
<Algebr`>
not doing that, just wanted to open a local module
TheLemonMan has quit [Quit: Changing server]
<Algebr`>
just want class foo = let open Bar in object end
tvynr has joined #ocaml
<mrvn>
class foo = Bar.(object end)?
<Algebr`>
tried that
<Algebr`>
pretty clear the object system gets no love
fds has quit [Ping timeout: 276 seconds]
vbmithr has quit [Ping timeout: 260 seconds]
asm89 has quit [Ping timeout: 264 seconds]
fds has joined #ocaml
<mrvn>
Algebr`: try a recursive module / object combo.
vbmithr has joined #ocaml
<Algebr`>
nah, too much effort, just will write out the module
<def`>
Algebr`: code between class is evaluated before the object instance variable
<mrvn>
def`: why aren't instance variables evaluated in order?
<Algebr`>
def`: okay so still during init time, just before instance variables
w1gz has quit [Ping timeout: 276 seconds]
w1gz has joined #ocaml
<def`>
Algebr`: not necessarily
<def`>
class foo = let x = 10 in fun y -> object method sum = x + y end;;
<def`>
class init time can happen much before object init time
<def`>
class init happens while evaluating class expression
<def`>
and object init when using a "new" expression
<def`>
mrvn: I have no absolute reason, as a sound approximation could exist
<Algebr`>
when is evaluating class expression, that's literally whenever someone uses a module with that class?
<def`>
mrvn: but it seems that the provably sound orders can as well be rewritten using class-lets
asm89 has joined #ocaml
<def`>
Algebr`: yes
<Algebr`>
oh wow, glad I asked about this!
<mrvn>
probably because the instance could be a function calling methods of the class and then the next instance varaible could call it without the class being complete
<mrvn>
# class foo = object(self) val call = self#bla method bla = () end;;
<mrvn>
Error: The instance variable self
<mrvn>
cannot be accessed from the definition of another instance variable
<mrvn>
or not
<def`>
:)
<mrvn>
can you class foo = let rec t = 1 and object end;; in some way?
<def`>
Algebr`: class-expressions behave a lot like expressions, except they define classes.
<mrvn>
ocaml classes always give the nicest error messages
ollehar has quit [Ping timeout: 264 seconds]
<def`>
Separating expressions from class-expressions (in other word, classes are not first-class values) help in having an efficient compilation scheme, and, that's more subjective, cover most sane use cases.
<def`>
(And other use cases are anyway mostly unexplored as most other languages are far from being able to express these cases)
<def`>
mrvn: recursive modules for that :-)
<mrvn>
def`: requires lifting
th5 has quit [Remote host closed the connection]
fredlhsu has quit [Quit: fredlhsu]
Orion3k has quit [Ping timeout: 260 seconds]
fredlhsu has joined #ocaml
tvynr has quit [Ping timeout: 244 seconds]
tane has quit [Quit: Verlassend]
troydm has quit [Ping timeout: 244 seconds]
fredlhsu has quit [Quit: fredlhsu]
Orion3k has joined #ocaml
fds has quit [Changing host]
fds has joined #ocaml
troydm has joined #ocaml
stux|RC-only has quit [Ping timeout: 244 seconds]
nicholasf has quit [Remote host closed the connection]
stux|RC-only has joined #ocaml
nicholasf has joined #ocaml
saruta has quit [Ping timeout: 264 seconds]
tvynr has joined #ocaml
sh0t has quit [Remote host closed the connection]
Orion3k has quit [Ping timeout: 250 seconds]
yunxing_ has quit [Remote host closed the connection]
A1977494 has quit [Remote host closed the connection]
<Algebr`>
how to make oasis not have to bother with this message, W: Tests are turned off, consider enabling with 'ocaml setup.ml -configure --enable-tests'
<Drup>
well, turn on the tests ? ^^'
yunxing_ has joined #ocaml
<Algebr`>
yea but I mean to say write something in the oasis file that make it such that you don't have to do: ocaml setup.ml -configure --enable-tests
<Drup>
I frankly consider rather bad to enable tests by default :/
Orion3k has joined #ocaml
<rgrinberg>
Yes, this is something I've had to undo in many opam packages.
yunxing_ has quit [Remote host closed the connection]
Algebr` has quit [Ping timeout: 250 seconds]
yunxing_ has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
saruta has joined #ocaml
Algebr` has joined #ocaml
tmtwd has quit [Ping timeout: 244 seconds]
sh0t has joined #ocaml
yunxing_ has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 244 seconds]
<aantron>
Algebr`: rgrinberg seems to have give a good explanation of bisect (thanks!), but let me know if you have questions
<aantron>
as for alcotest, it should work fine
madroach has joined #ocaml
wiredsister has joined #ocaml
seangrove has quit [Ping timeout: 240 seconds]
<Algebr`>
I'm still a little unclear how a test_case.ml ends up corresponding to actual source code. How does bisect know the connection if all I'm giving it is file names
<aantron>
Algebr`: suppose you have some file "foo.ml" that you feed to bisect, and it has code like let () = print_endline "hello"
<aantron>
bisect rewrites that to say 'let () = Bisect.Runtime.do_some_init;; let () = Bisect.Runtime.here (1, 10); print_endline "hello"'
<aantron>
very roughly speaking
<aantron>
the ".here" function causes Bisect.Runtime to update some internal data structures that count visitation
<aantron>
and the ".do_some_init" function registers a callback at_exit, that writes those data structures to a file
<aantron>
so test_case.ml doesnt actually know that foo.ml is instrumented in this way
<aantron>
the coverage information is gathered as a result of just running the code under test, no matter how you run it - as long as it was instrumented by the ppx
nicholasf has quit [Remote host closed the connection]
yunxing_ has joined #ocaml
nicholasf has joined #ocaml
<Algebr`>
I see
<Algebr`>
thank you
seangrove has joined #ocaml
<seangrove>
Is there a way to get the return status from Unix.create_process
<aantron>
shouldn't waitpid do it?
<seangrove>
aantron: Isn't that blocking? I want to know 1.) if the process successfully 2.) if it's still alive
<seangrove>
process *launched* successfully
<aantron>
i think if you pass WNOHANG it won't block
<pierpa>
to exist the return status the process must be dead, no?
<seangrove>
But I want the process to keep running concurrently with my ocaml process (I'm launching lots of processes)
<seangrove>
aantron: Ah, interesting
<seangrove>
pierpa: Yes, true. So I can launch Unix.waitpid in an lwt thread, and then if it returns then do my callback there, perhaps?
<aantron>
hmm, just curious, is lwt_process insufficient?
<pierpa>
hmmm
<seangrove>
aantron: Sorry, should have mentioned that I don't know too much about what's available. I'll definitely look into lwt_process
<aantron>
ive used it a few times, its pretty decent. have to write docs for it :p i am not sure what exactly you need to do, but if you need to poll, then if you have an lwt thread that corresponds to a process, you should be able to poll the status of that thread
<seangrove>
aantron: Poll via lwt_process, or some Unix module function?