<Algebr>
Drup: okay, but the stuff from 3.0 probably isn't an extension anymore, but what about GADTs, only introduced in 4.00, are they no longer an extension
<Drup>
imho, this notion of extension doesn't make sense anymore, period
<Drup>
but I sugest you ask the core team directly (either on mantis or on the mailing list) if you are willing to dedicate the time
<apache2>
is it possible to have when-guards only apply to some patterns? example:
<apache2>
match x-y with 0 when x=0 | 1 -> (*case 1*) | 0 -> (* case 2*)
<apache2>
or do I have to match x , x-y with ...
<dmbaturin>
apache2: Sure.
<apache2>
what's the syntax for doing so?
<dmbaturin>
Or, wait. Let me re-read the question. :)
Algebr has quit [Ping timeout: 244 seconds]
<dmbaturin>
Generally, if both x and y are in scope, this should work as is.
<Drup>
when are for a whole group of or patterns, iirc
__uu__ has joined #ocaml
<dmbaturin>
"let foo x y = match (x-y) with 0 when x = 0 -> 99 | 0 -> 98 | _ -> 97" apparently works as expected (foo 0 0 -> 99, but foo 2 2 -> 98).
<ely-se>
it means that (a, b) t is a subtype of (c, d) t if a is a subtype of c and b is a subtype of d
zpe has joined #ocaml
<struktured>
got it..interesting..thanks
ollehar has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
mobius-eng has joined #ocaml
zpe_ has quit [Remote host closed the connection]
struktured has quit [Ping timeout: 260 seconds]
rgrinberg has joined #ocaml
mort___ has joined #ocaml
larhat1 has quit [Quit: Leaving.]
rgrinberg has quit [Ping timeout: 264 seconds]
Muzer has quit [Ping timeout: 240 seconds]
Muzer has joined #ocaml
ely-se has quit [Quit: leaving]
ely-se has joined #ocaml
theblatt1 is now known as theblatte
amnn has joined #ocaml
AltGr has left #ocaml [#ocaml]
amnn has quit [Ping timeout: 252 seconds]
toolslive has joined #ocaml
__uu__ has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
Kakadu has joined #ocaml
rgrinberg has quit [Ping timeout: 272 seconds]
tibor_ has joined #ocaml
zpe has joined #ocaml
_andre has joined #ocaml
Lapinot has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBird_ has quit [Ping timeout: 244 seconds]
zpe has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
Haudegen has quit [Ping timeout: 268 seconds]
Haudegen has joined #ocaml
amnn has joined #ocaml
<Lapinot>
hi there
<Lapinot>
anyone fluent with the ocamlbuild system?
manuel_ has joined #ocaml
ceryo has joined #ocaml
rand__ has joined #ocaml
<companion_cube>
ask anyway?
<reynir>
Yes, there are usually people in this channel who know ocamlbuild well
<Lapinot>
hi!
<Lapinot>
yes so i am using jocaml, so i have the -use-jocaml switch, but when i include a package with -pkg, i get an "both define a module named ..." error
<companion_cube>
named what?
<Lapinot>
i think that jocaml is not a lot developped anymore so this may be a strange error... I think it comes from the fiddling that the jocaml guys did in the ocaml source
<Lapinot>
i have this pb with the Unix module
<companion_cube>
can you try compiling a trivial program with -use-jocaml?
<companion_cube>
oh, Unix
ely-se has quit [Quit: leaving]
<Lapinot>
i have a small file to reproduce the error
<companion_cube>
oh btw there's an opam switch with JOCaml
<Lapinot>
yeah i tried that some times ago, but i could manage to install packages with jocaml (some dont compile with jocaml, i have to compile them with the companion ocaml)
<companion_cube>
hmm :/
<Lapinot>
is there a "-I path/to/foo" command that could substitute a "-pkg foo" command in ocamlbuild
<Lapinot>
i tried "-I lib/ocaml/site-lib/foo" but it doesnt include
mort___ has quit [Ping timeout: 246 seconds]
<companion_cube>
-cflags -I,+path/to/foo?
<companion_cube>
(not sure)
<Lapinot>
hmm nope, i dont get it to work.. actually do i have to include a directory or the actual .cmxa file?
mobius-eng has quit [Ping timeout: 264 seconds]
<companion_cube>
maybe... :/
<Lapinot>
when i compile with "ocamlbuild -use-jocaml -pkg cryptokit a.native" (yeah its cryptokit that i need ><) the command exectuted by ocamlbuild (which fails) is "jocamlopt -I /prefix/lib/ocaml -I /prefix/lib/ocaml/site-lib/cryptokit -I /prefix/lib/ocaml/site-lib/num/prefix/lib/ocaml/unix.cmxa /prefix/lib/ocaml/nums.cmxa /prefix/lib/ocaml/site-lib/cryptokit/cryptokit.cmxa a.cmx -o a.native"
<companion_cube>
this looks good to me, so I really don't know, sorr
<companion_cube>
y
<Lapinot>
hmm ok thanks anyway! I am going to ask it on stackoverflow and explain a bit more
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mort___ has joined #ocaml
<toolslive>
what about using ocamlbuild with ocamlfind: ocamlbuild -use-ocamlfind .... and have the _tags file with something like true: package(snappy)
<toolslive>
that should do the trick for any package installed through opam
<Lapinot>
actually i tried it and the -use-ocamlfind flag is not exactly the best friend of the -use-jocaml flag: it overrides it and the whole things are compiles with ocaml compilers instead of jocaml compilers
rgrinberg has joined #ocaml
BitPuffin has joined #ocaml
zpe has joined #ocaml
<toolslive>
you can look at the _build/_log file and try to massage the inputs to get the desired output (that's what I do when I get into link errors)
<toolslive>
I typically nick the link/compile command, paste it in a script, and start to edit until it works, then I reverse engineer the changes into myocamlbuild.ml
<toolslive>
If anybody knows a better strategy, please share ;)
<Lapinot>
as you can see a did the 'edit until it works' step but i dont know how to do something with the myocamlbuild.ml file
FreeBirdLjj has joined #ocaml
amnn has joined #ocaml
<toolslive>
you can edit the 4.02.3/lib/findlib.conf file to get the correct compiler
<toolslive>
don't know if that helps
<Lapinot>
aha i will try that
<toolslive>
but that's with -use-ocamlfind again....
<Lapinot>
yep
<toolslive>
ocamlfind printconf will show you where to find stuff
zpe has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<jmasseo>
so my menhir thing last night(i had to run), to get it to allow a trailing separator, i copy/pasted the separated_list/separated_nonempty_list and make the call from separated_nonempty_list call back to separated_list, so in the event of an excess separator, it just returns an empty list.
<jmasseo>
i imagine that dramatically changes the stack behaviour.
<jmasseo>
i can probably optimize that
<Lapinot>
toolslive: i got findlib to select the right compiler, and now its slightly better, but it keeps including unix.cmxa so there is still the clash
manuel_ has quit [Quit: manuel_]
<Lapinot>
toolslive: ugly hack: it works when i delete "unix" from the requires field of crptokit's META file...
ely-se has quit [Quit: leaving]
FreeBirdLjj has quit [Remote host closed the connection]
<seliopou>
finally realized what jsoo stands for :/
<companion_cube>
:D
<seliopou>
that took way too long
<Drup>
seliopou: what did you though it was ? :D
<seliopou>
i duno like some subpackage of js_of_ocaml
<seliopou>
but then last night i was like... ohhhhhh
<jmasseo>
so i copied the separated_list stuff out of menhir std and modified it as such:
<octachron>
companion_cube, in your containers library, CCRandom.split_list does not yield an uniform distribution. Is that deliberate?
<companion_cube>
it's not deliberate
<companion_cube>
did you find a skewed distribution?
<companion_cube>
I'm really no expert in this kind of things
<octachron>
as far as I can see, the distribution is skewed in a quite complex way. Would you mind a pull request to fix that?
<companion_cube>
no I wouldn't. But I'd like very much to have insight in why it's skewed!
<companion_cube>
how did you discover that?
<octachron>
Essentially, looking at the source code.
<octachron>
The way the current implementation splits the integer to be summed does not really account for any combinatoric factor
jeffmo has quit [Read error: Connection reset by peer]
<companion_cube>
oh ok. Do you think in would be uniform in, say, rational numbers? or is it not related to integers beeing discrete?
<companion_cube>
anyway I'm willing to accept a PR fixing that
<octachron>
it is not really related, to discretness of integer. In fact the classical algorithm for sampling on the d-simplex is more the same between integer and real.
<struk|work>
I thought a result like type was introduced into the ocaml std lib? is this true? if so what version hasit?
<companion_cube>
struk|work: in the next version
BitPuffin has quit [Ping timeout: 255 seconds]
<struk|work>
companion_cube: trying to find the relevant commit on github..
<companion_cube>
look at the pull request, will be easier
<struk|work>
octachron: man that brings me back to my combinatorial optimization studies. I remember the prof described it as "if you have a hammer, treat everything as a nail"
MercurialAlchemi has quit [Read error: Connection reset by peer]
ceryo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
MercurialAlchemi has joined #ocaml
<struk|work>
companion_cube: so I noticed you went with a sub-typable version, while minsky went with (unsurprisingly) with the jane street version, pure variant, version
darkf has quit [Quit: Leaving]
<struk|work>
not sure which I even prefer really
mobius-eng has quit [Ping timeout: 240 seconds]
<struk|work>
interesting thread about that very topic in the PR at least
<companion_cube>
struk|work: you mean I used a polymorphic variant? yeah
<companion_cube>
it was to avoid using an authoritative type
<struk|work>
got it
<companion_cube>
but I'll provide a module for the new result type
<struk|work>
in other news, I see you factored out containers.misc :)
rgrinberg has quit [Ping timeout: 244 seconds]
<struk|work>
maybe I should just steal your hashset impl as its the only one I need
<companion_cube>
feel free to
shinnya has joined #ocaml
<companion_cube>
or you can git submodule the containers-misc repo
<struk|work>
git submodule? is that a thing?
xificurC_ has joined #ocaml
<struk|work>
https://git-scm.com/docs/git-submodule well I be damned, this could be useful at my company as we have holy wars about a single repo vs many little repos
xificurC has quit [Remote host closed the connection]
lopex has quit [Ping timeout: 240 seconds]
oldmanistan_ has quit [Ping timeout: 240 seconds]
Ravana has quit [Ping timeout: 240 seconds]
NhanH has quit [Ping timeout: 240 seconds]
tg has quit [Quit: Reconnecting]
flx has quit [Remote host closed the connection]
flxx has joined #ocaml
ggherdov has quit [Ping timeout: 240 seconds]
oldmanistan_ has joined #ocaml
xaimus has quit [Ping timeout: 240 seconds]
bjorkintosh has joined #ocaml
lopex has joined #ocaml
seako has quit [Ping timeout: 240 seconds]
xaimus has joined #ocaml
Ravana has joined #ocaml
bobpoekert has quit [Ping timeout: 240 seconds]
NhanH has joined #ocaml
NhanH has joined #ocaml
NhanH has quit [Changing host]
tg has joined #ocaml
bobpoekert has joined #ocaml
apache2_ has joined #ocaml
seako has joined #ocaml
Cypi_ has joined #ocaml
Cypi has quit [Ping timeout: 240 seconds]
apache2 has quit [Remote host closed the connection]
stux|RC-only has quit [Ping timeout: 240 seconds]
nzyuzin has quit [Ping timeout: 240 seconds]
jeffmo has joined #ocaml
nzyuzin has joined #ocaml
manuel_ has quit [Ping timeout: 240 seconds]
stephe has quit [Ping timeout: 240 seconds]
stephe has joined #ocaml
stux|RC-only has joined #ocaml
johnf has quit [Read error: Connection reset by peer]
manuel_ has joined #ocaml
<companion_cube>
struk|work: careful, submodule has some shortcomings
<companion_cube>
be aware of them
manuel_ has quit [Client Quit]
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<flux>
oh no! no commit activity in ocaml-multicore since the 1st of Oct!
<flux>
maybe if I refresh the page a bit more.. :)
<Lapinot>
haha
<flux>
I wonder if ffmpeg would be something that could be built decent ocaml bindings without a huge effort..
octachron has quit [Quit: Leaving]
t4nk397 has joined #ocaml
<t4nk397>
hello! I have a little question regarding the BatteriesIncluded package - it's Enum.t. is there a way to get the number of already consumed items? Something similiar to the Stream.count
<t4nk397>
it seems that Enum.count returns the number of the remaining items :(
<flux>
I guess if you can't see it, it doesn't exist
<flux>
maybe it could be added :)
<struk|work>
companion_cube: yeah I am just studying it for now, prob won't use it for my projects yet
ygrek has joined #ocaml
<t4nk397>
flux: should be awesome to have, though :) also, it's mentioned as a "new" Stream...
<t4nk397>
flux: I want to use Enum from the string inside my tokenizer and I don't want to have the current position moving everywhere :(
MercurialAlchemi has quit [Read error: Connection reset by peer]
<t4nk397>
e.g. I should have position-moving-code in each function I'd pass to the take_while, etc.
MercurialAlchemi has joined #ocaml
taigi100 has quit [Ping timeout: 246 seconds]
<t4nk397>
hm, are batteries updated at all :) as the latest release is dated by 2014
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
MercurialAlchemi has quit [Read error: Connection reset by peer]
ollehar has quit [Ping timeout: 256 seconds]
<struk|work>
I avoid batteries like the plague..but that's just me
MercurialAlchemi has joined #ocaml
t4nk397 has quit [Ping timeout: 246 seconds]
larhat1 has joined #ocaml
ygrek has quit [Remote host closed the connection]
swgillespie has joined #ocaml
ygrek has joined #ocaml
mobius-eng has joined #ocaml
<toolslive>
no. I avoid it too, (and I try to stay away from core too)
<toolslive>
kitchen sink type libraries that have developed their own eco-system
palomer has joined #ocaml
<palomer>
hey guys
<Mercuria1Alchemi>
"standard libraries" replacements are kitchen sinks by definition
<palomer>
if I include the expression (fun x -> 5) into my code, I don’t get a warning that x is unused
<Mercuria1Alchemi>
just depends on how big the sink is
<palomer>
is there a way to unable such a warning?
toomucht_ has joined #ocaml
toomuchtvrotsurb has quit [Read error: Connection reset by peer]
<palomer>
enable :P
<companion_cube>
-w +a
<companion_cube>
:P
jwatzman|work has quit [Ping timeout: 246 seconds]
<palomer>
cool
<palomer>
do you know how to add them to my _tags ?
<companion_cube>
the actual warning is listed in `man ocamlc` btw
<companion_cube>
true: warn(+a)
<palomer>
I’ll just do -w +a
<palomer>
I like warnings
<companion_cube>
I have +a -44 -4 I think
jwatzman|work has joined #ocaml
ollehar has joined #ocaml
marsam has quit [Remote host closed the connection]
<companion_cube>
Mercuria1Alchemi: it's sad that you think that
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Mercuria1Alchemi>
companion_cube: why?
<companion_cube>
some stdlib extensions are awesome ;)
<Mercuria1Alchemi>
well, that's not an indictment
<Mercuria1Alchemi>
it's just that if you're building a standard library, it's not specialized
<Mercuria1Alchemi>
I'm not sure "minimal" is really a desirable target
<Mercuria1Alchemi>
for this kind of thing
<struk|work>
sure, but I appreciate the acknowlegement that std libraries are nearly misnamed
<Mercuria1Alchemi>
it's a bit like these linux WMs "we are below X lines of code"
<Mercuria1Alchemi>
I don't really agree with the "standard libraries are an obsolete concept"
ggole has quit []
<toolslive>
the fun ends when you need to functorize your code to be able to work with both Core.async and Lwt
<Mercuria1Alchemi>
next thing you know, you open your favorite REPL in a language bulit by somebody who took that seriously, and you find out you can't open a bloody file
<Mercuria1Alchemi>
then you want to build a library, and you have 6 different hashmap implementations to choose from, so you resort to functorizing the world
<Mercuria1Alchemi>
oh wait, that's ocaml
<companion_cube>
well you can open a file in OCaml
<Mercuria1Alchemi>
yeah, but it's because the default stdlib is a kitchen sink :)
<Mercuria1Alchemi>
just a broken sink with a leaky faucet
<companion_cube>
well, some parts should die, but some others are decent
<Mercuria1Alchemi>
yeah, but if they were sufficient, nobody would write standard library extensions
<companion_cube>
sure they would, people in OCaml love to reinvent things that work
<companion_cube>
trust me on this ;)
<struk|work>
toolslive: re: functorize over lwt/async ...yep I'm doing that
<Mercuria1Alchemi>
up to a point
<toolslive>
yes, I failed to finish
<Mercuria1Alchemi>
if you look around, you often see bits of stdlib of other languages being rewritten and sometimes making it into the actual stdlib
<Mercuria1Alchemi>
but absolutely not to the same extent as ocaml
MercurialAlchemi has quit [Read error: Connection reset by peer]
MercurialAlchemi has joined #ocaml
eni has joined #ocaml
<toolslive>
the Java strategy was great: take the best library for X as a template for the X interface and let people plug in their on implementations (like java mail, java security, ...)
<companion_cube>
I'd like OCaml maintainers to accept contributions to stdlib a lot
<toolslive>
well, if you accept things you accept ownership and maintenance....
<flux>
but they have a point. once something goes in, they're stuck maintaining it forever. and ever.
<flux>
oh, whathesaid :)
<struk|work>
toolslive: eh java didn't actually do it right either. take google gauve's functional api for instance, which was completely rewritten in java8
<companion_cube>
but how difficult is it to maintain Option.>>= ?
<companion_cube>
or basic f unctions over List, Array, etc.
<struk|work>
not to mention the shittiness of java generics preventing a map.get(...) operation from being type checked.
<flux>
I guess it'd be reasonable to have the modules that are there be 'fully functional'
<flux>
but, then you want more things.. :)
<toolslive>
yes, I once suggested an improvement for the java std lib and it never made it. while it was 100% compatible and a serious performance improvement and shorter.
<toolslive>
0 feedback too.
<toolslive>
(and that was before 2000)
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<companion_cube>
flux: yeah, I'd like an Option module
<companion_cube>
and more feature-complete List, Array, ...
<companion_cube>
which is why I wrote containers actually
<flux>
but why can't an "ocaml distribution" do that
<toolslive>
also, insights change..... the attitude towards mutability in OCaml is different now compared to 2000.
<toolslive>
attitude towards the multitude of cpu cores too (but slowly) ;)
<Mercuria1Alchemi>
flux: what would be the advantage of an "ocaml distribution"?
<Mercuria1Alchemi>
apart from a faster release cycle
<apache2_>
String.index_from "a" 0 'a' == exn Not_found
<flux>
well, actually there are 'almost' ocaml distributions like ocamlbrew
<apache2_>
sorry no that's 0
<apache2_>
String.index_from "a" 1 'a' == exn Not_found
<flux>
but the benefit would be less load on the ocaml compiler team..
<companion_cube>
eww
<reynir>
struk|work: Why is it Map.get is like that?
<flux>
maybe more likely to actually happen.. :)
<apache2_>
String.index_from "a" 2 'a' == Invalid_argument "String.index_from / Bytes.index_from"
<apache2_>
how come the errors are different?
<companion_cube>
you mean the text of the error?
<apache2_>
yes
<apache2_>
well Not_found and Invalid_argument
<apache2_>
the doc says: Raise Invalid_argument if i is not a valid position in s. Raise Not_found if c does not occur in s after position i.
<companion_cube>
I guess 1 designs a "valid" position in the string, if you see it as a position between chars
<apache2_>
why is 1 a valid position in the string?
<companion_cube>
but I agree, it's strange
<apache2_>
I tried matching against char_of_int 0 .. 255, no matches
palomer_ has joined #ocaml
<Mercuria1Alchemi>
flux: well... I think that's something where the community could be involved in
palomer has quit [Ping timeout: 244 seconds]
palomer_ is now known as palomer
<apache2_>
for i = 0 to 255 do try Printf.printf "\n%d,%d\n" i @@ String.index_from "a" 1 (char_of_int i) with Not_found -> () done;;
<Mercuria1Alchemi>
you don't need to be a compiler guru to maintain an option lib
palomer has quit [Client Quit]
palomer has joined #ocaml
<toolslive>
yes, also, the stdlib has useless duplication in some areas, while it lacks consistency in others....
<reynir>
apache2_: should String.index_from "" 0 'a' raise Invalid_argument too?
<companion_cube>
pff, maybe it would be possible to ship the compiler with a "stdlib" that only contains some type definitions
<toolslive>
what you actually need is a tool that rewrites the real world code, whenever the language improves.
taigi100 has joined #ocaml
_andre has quit [Quit: leaving]
<companion_cube>
and the stdlib itself, built upon those types, would be provided by the community
<toolslive>
a sort of python2to3 that works ;)
<apache2_>
reynir: yes?
<apache2_>
reynir: looking for letters in a string that can't contain them is obviously an error
<reynir>
apache2_: what about String.index "" 'a' ?
<apache2_>
like allocating an array with two elements and requesting the third
<toolslive>
well, these days people tend to prefere None iso Not_found
jeffmo has quit [Quit: jeffmo]
<apache2_>
yeah, I think exceptions should die, but this is a bit weird :)
<taigi100>
hey guys , I need to multiply each element in a list x times, for example if I call func [1;2;3] 3;; it should return [1;1;1;2;2;2;3;3;3];;. What I've tried was something like : http://paste.isomorphis.me/wmT. I'm not sure how to make it return 'rez' ( If I add in rez at the end it sais it's unbounded ).
<companion_cube>
apache2_: no, exceptions are quite useful
<apache2_>
taigi100: List.fold_right (fun e -> fun acc -> e::e::e::acc) [1;2;3] [];;
marsam has joined #ocaml
<apache2_>
taigi100: iter returns unit, so you can't use that. you can use List.map and end up with [[1;1;1] ; [2;2;2] ; [3;3;3]] which you can then flatten.
<apache2_>
companion_cube: they're dangerous :(
<apache2_>
the compiler should have a way of making you handle them
slash^ has quit [Read error: Connection reset by peer]
Kakadu has joined #ocaml
<taigi100>
and How should I go about using .map ?
<taigi100>
I mean the function inside
<apache2_>
I think you should use List.fold_right in this case
<taigi100>
how?
<apache2_>
List.flatten (List.map (fun e -> [e ; e ; e]) [1;2;3]);;
<apache2_>
like I wrote above?
<taigi100>
It's not 3 always
<taigi100>
It's a param that get's passed in, I gave 3 like an example
<apache2_>
ah
<taigi100>
but building a list of lists sounds like an idea ( like you did with the map
<apache2_>
let n = 4 in List.fold_right (fun e -> fun acc -> let rec xxx acc = function 0 -> acc | i -> xxx (e::acc) (i-1) in xxx acc n) [1;2;3] [];;
<apache2_>
one approach
<taigi100>
yep
<taigi100>
gotta get used to using fold_riight
<taigi100>
xD
<apache2_>
cheers :)
ocaml413 has joined #ocaml
<taigi100>
thnx :P
<ocaml413>
hello! is there a way to implicitly open a module for all my files?
<taigi100>
also , know any good tutorials/explanations for sets/types ?
<ocaml413>
(i'm using oasis if it's important)
<taigi100>
I think you can use open Module in the Ocaml consolo
<taigi100>
console*
obadz has quit [Ping timeout: 256 seconds]
<ocaml413>
taigi100: what console are you talking about? as I'm compiling my stuff ;)
<taigi100>
idk xD new to ocaml
<taigi100>
just write open Module;; in the file
<taigi100>
works for me
<reynir>
ocaml413: A very ugly way would be to use a preprocessor that inserts "open MyModule" in every file
<taigi100>
couldn't you make a custom module that opens modules ? xD
<ocaml413>
taigi100: I wanted to skip the manul part :)
<ocaml413>
reynir: oh, it's so ugly, so I'll be the preprocessor myself :(
<taigi100>
well make a program that opens every file and writes it for you :P
<reynir>
ocaml413: heh sorry :)
<flux>
ocaml413, note that if you want to open multiple files, you can stick includes and module aliases in your Common module
<flux>
(files=modules of course)
palomer has quit [Quit: palomer]
<ocaml413>
flux: oh, it will simplify the job, thanks!
<ocaml413>
I wonder - do I need to include open-s in both .ml and .mli?
<ocaml413>
it complains if I'm not opening in .mli, but I'm checking the Ocaml sources and mli's don't contain any opens
<flux>
well, yes
<flux>
but usually people may use fully qualified names in .mlis
<flux>
and in fact opens are not very popular
<flux>
it can make it a bit difficult to see where symbols come from
<flux>
module aliases are nicer in that regard
<flux>
merlin makes it easier nowadays to find where a symbol comes from, though, but you're still reading the code with your eyes.. :)
<ocaml413>
flux: merlin is awesome, indeed! I'm using the Batteries, so it's a bit tedious to write Batteries.Enum.next everywhere, though, I open Batteries
<flux>
ocaml413, I think people think it's ok when you have one great library used everywhere
<flux>
it gets more annoying when you have five opens at the top of the file :)
rgrinberg has quit [Ping timeout: 265 seconds]
<ocaml413>
flux: I see, I won't open other modules :)
<ollehar>
best datastructure to handle list of allocations in mark-sweep gc? linked list, stack, ...? that is, how to organize the heap.
obadz has joined #ocaml
ocaml413 has quit [Ping timeout: 246 seconds]
demonimin has quit [Remote host closed the connection]
eni has quit [Quit: Leaving]
demonimin has joined #ocaml
jbrown has quit [Quit: Client exiting]
taigi100 has quit [Ping timeout: 246 seconds]
jbrown has joined #ocaml
<struk|work>
reynir: map is pre generics, so its sig is this: public V get(Object o) rather than public V get(K k)
<struk|work>
they could make the value typed because covariant return types work in java, but the method parameter change would break compliation of older code
jeffmo has joined #ocaml
MercurialAlchemi has quit [Read error: Connection reset by peer]
MercurialAlchemi has joined #ocaml
canhtak has joined #ocaml
<companion_cube>
I wonder whether Go will eventually add generics
marsam has quit [Remote host closed the connection]
freehck has quit [Ping timeout: 246 seconds]
lobo has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
<tibor_>
Hi
<tibor_>
How can I write a mach "| Some VType nf ->"?
<tibor_>
How can I write a match "| Some VType nf ->"?
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
ncthom91 has joined #ocaml
demonimin has quit [Remote host closed the connection]