companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.05.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.05/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
malina has joined #ocaml
sam___ has quit [Ping timeout: 276 seconds]
sh0t has quit [Read error: No route to host]
sh0t has joined #ocaml
sam___ has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
sam___ has quit [Ping timeout: 246 seconds]
Ragora|Away is now known as Ragora
loceur has joined #ocaml
coventry has joined #ocaml
<coventry> What's a good way to deduplicate an abstract list in ocaml? In python I would keep track of seen elements using a list, but how can I create an ocaml set without knowing the element type ahead of time/
<coventry> ?
<coventry> All the ocaml solutions I'm finding on the web are quadratic time-complexity.
<coventry> Oh, looks like I want a hash table. https://rosettacode.org/wiki/Remove_duplicate_elements#OCaml
sh0t has quit [Remote host closed the connection]
pierpa has quit [Quit: Page closed]
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 248 seconds]
cbot has joined #ocaml
al-damiri has joined #ocaml
mfp__ has quit [Ping timeout: 240 seconds]
andreas__ has quit [Quit: Connection closed for inactivity]
jlam_ has joined #ocaml
nomicflux has quit [Quit: nomicflux]
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 246 seconds]
mcspud has quit [Excess Flood]
mcspud has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
teknozulu has quit [Ping timeout: 258 seconds]
MercurialAlchemi has joined #ocaml
enterprisey has quit [Remote host closed the connection]
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 260 seconds]
raphaelss has quit [Quit: Lost terminal]
sam___ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
sam___ has quit [Ping timeout: 246 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
govg has quit [Quit: leaving]
enterprisey has joined #ocaml
enterprisey has quit [Remote host closed the connection]
malina has quit [Ping timeout: 240 seconds]
mbuf has joined #ocaml
MercurialAlchemi has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 240 seconds]
aggelos_ has quit [Ping timeout: 246 seconds]
aggelos_ has joined #ocaml
sam___ has joined #ocaml
govg has joined #ocaml
sam___ has quit [Ping timeout: 240 seconds]
xaimus has quit [Remote host closed the connection]
mrsmkl has joined #ocaml
iitalics has joined #ocaml
malina has joined #ocaml
ShalokShalom_ has joined #ocaml
coventry has quit [Ping timeout: 240 seconds]
iitalics has quit [Quit: /thread]
ShalokShalom has quit [Ping timeout: 248 seconds]
cbot has quit [Quit: Leaving]
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 255 seconds]
aggelos_ has quit [Ping timeout: 246 seconds]
aggelos_ has joined #ocaml
jimmyrcom has quit [Ping timeout: 255 seconds]
sam____ has joined #ocaml
sam____ has quit [Ping timeout: 240 seconds]
malina has quit [Remote host closed the connection]
andreas__ has joined #ocaml
sepp2k has joined #ocaml
ShalokShalom_ is now known as ShalokShalom
ShalokShalom has quit [Quit: No Ping reply in 180 seconds.]
ShalokShalom has joined #ocaml
sam____ has joined #ocaml
sam____ has quit [Ping timeout: 240 seconds]
gasche has joined #ocaml
malina has joined #ocaml
sam____ has joined #ocaml
sam____ has quit [Ping timeout: 240 seconds]
sz0 has joined #ocaml
gasche has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
malina has quit [Remote host closed the connection]
jimt_ has joined #ocaml
jimt has quit [Ping timeout: 255 seconds]
<Leonidas> what is the weird foreach(x => ..., foo bar) syntax in OMake?
<Leonidas> I can use ... there which works but as soon as I put something else there it complains about arity
copy_ has joined #ocaml
jimt_ is now known as jimt
ziyourenxiang has joined #ocaml
mfp__ has joined #ocaml
malina has joined #ocaml
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 255 seconds]
dhil has joined #ocaml
dhil has quit [Quit: Quit]
teknozulu has joined #ocaml
dhil has joined #ocaml
kakadu has joined #ocaml
sam___ has joined #ocaml
freusque has joined #ocaml
nomicflux has joined #ocaml
ristos has joined #ocaml
demonimin_ has quit [Ping timeout: 240 seconds]
demonimin has joined #ocaml
nomicflux has quit [Quit: nomicflux]
nomicflux has joined #ocaml
fraggle-boate has quit [Remote host closed the connection]
teknozulu has quit [Ping timeout: 255 seconds]
sam___ has quit [Ping timeout: 255 seconds]
nomicflux has quit [Quit: nomicflux]
sam___ has joined #ocaml
mbuf has quit [Quit: Leaving]
dakk has joined #ocaml
aciniglio has joined #ocaml
FreeBirdLjj has joined #ocaml
soupault has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
malina has quit [Quit: Throwing apples of Montserrat]
aciniglio has quit [Ping timeout: 276 seconds]
sh0t has joined #ocaml
<Leonidas> is there a shuffle function in Jane Street Core? there used to be an Array_permute module but that seems gone
mengu has joined #ocaml
<Leonidas> Ok, I'm sorting with a random cmp instead, that works
<companion_cube> just copy the function from containers ;)
freusque has quit [Ping timeout: 260 seconds]
freusque has joined #ocaml
sam___ has quit [Ping timeout: 255 seconds]
TheLemonMan has joined #ocaml
sam___ has joined #ocaml
<def`> Leonidas: hm, sorting with a random cmp doesn't give you a good shuffling algorithm :o
MercurialAlchemi has quit [Ping timeout: 258 seconds]
<Leonidas> Drup: haha, I've implemented the ಠ_ಠ variant :-)
<Leonidas> maybe I should submit a PR to core_kernel or base or however that is called
<companion_cube> or just pick an existing function, you know
<companion_cube> it's like 10 lines
<Leonidas> companion_cube: yeah, but the fact that I made a crappy implementation proves that there might be some value to have it bundled in whatever container library of one's choice :)
<Leonidas> On the upside, the article linked by Drup is pretty interesting :)
nicoo has quit [Ping timeout: 248 seconds]
<abeaumont> I've library building problem: I've created a new file utils.ml, which contains a module Utils, which I want to become a submodule of Salsa20_core, so I do this: https://github.com/abeaumont/ocaml-salsa20-core/blob/master/salsa20_core.ml#L3 (following this answer https://stackoverflow.com/a/25486418), but the resulting library doesn't contain the Utils implementation, am I missing something? I thought it could be that Utils is missing
<abeaumont> in https://github.com/abeaumont/ocaml-salsa20-core/blob/master/salsa20-core.mllib, but then it keeps asking for the mli file, which I don't want to add since it's already a submodule at https://github.com/abeaumont/ocaml-salsa20-core/blob/master/salsa20_core.mli#L20
sam___ has quit [Ping timeout: 240 seconds]
<abeaumont> sorry for the long message
<Drup> Leonidas: Mike Bostock does amazing visualizations
<Drup> (well, he's the creator of D3 ..)
<Leonidas> oh, that explains things
sam___ has joined #ocaml
freusque has quit [Quit: WeeChat 1.7.1]
jlam__ has joined #ocaml
jlam_ has quit [Ping timeout: 240 seconds]
mengu_ has joined #ocaml
mengu_ has quit [Remote host closed the connection]
jlam_ has joined #ocaml
sapristi has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
jlam__ has quit [Ping timeout: 258 seconds]
aciniglio has joined #ocaml
nicoo has joined #ocaml
freyr has joined #ocaml
<freyr> I need help with jbuilder, could not compile a project which depends on sqlexpr, I've added (preprocess (pps (sqlexpr.ppx))) line but still getting ``Error: Uninterpreted extension 'sqlinit' ''
<freyr> What should I do, thanx
<rgrinberg> Was sqlexpr ported to ocaml migrate parsetree?
<companion_cube> that's pretty incredible that jbuilder requires everyone to migrate to the latest and greatest -_-
<abeaumont> oh, I was missing ~api parameter the Pkg.mllib
<freyr> rgrinberg: I suppose not, is it possible to build something that depends on sqlexpr with jbuilder?
<rgrinberg> It's not really practical. Best is to just move sqlexpr to the latest and the greatest
<rgrinberg> :)
<freyr> that's kinda dissapointing
<rgrinberg> Jbuilder cannot support every single legacy use case. Time is finite, etc.
<companion_cube> stuff that works is legacy now? -_-
<companion_cube> I suppose it's also useless to support 4.04, it's legacy too?
<companion_cube> (for what it's worth, jbuilder considers 4.02 legacy, I think)
ygrek has joined #ocaml
sam___ has quit [Ping timeout: 248 seconds]
sam___ has joined #ocaml
freyr has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
FreeBirdLjj has joined #ocaml
tane has joined #ocaml
govg has quit [Ping timeout: 248 seconds]
c1000wn has joined #ocaml
c1000wn has quit [Ping timeout: 240 seconds]
jlam__ has joined #ocaml
jlam_ has quit [Ping timeout: 255 seconds]
mehdib has quit [Quit: No Ping reply in 180 seconds.]
mehdib has joined #ocaml
<sgnb> companion_cube: jbuilder builds with 4.02... is it not working?
jimmyrcom has joined #ocaml
<companion_cube> or 4.01 perhaps
<companion_cube> something I still support
dhil has quit [Ping timeout: 255 seconds]
jlam_ has joined #ocaml
* sgnb doesn't like everything migrating to jbuilder, which is still beta, btw
jlam__ has quit [Ping timeout: 246 seconds]
<companion_cube> all on the hype train! ^^
<sgnb> companion_cube: how do you decide which version you still support?
<sgnb> (out of curiosity)
sapristi has quit [Remote host closed the connection]
<companion_cube> the lowest I can support without being too annoed
<companion_cube> depends on whether it's in a lib or a bin, ofc
sapristi has joined #ocaml
tokomak has joined #ocaml
jlam__ has joined #ocaml
jlam_ has quit [Ping timeout: 240 seconds]
dhil has joined #ocaml
jlam_ has joined #ocaml
jlam__ has quit [Ping timeout: 258 seconds]
soupault has quit [Remote host closed the connection]
mrsmkl has quit [Ping timeout: 260 seconds]
sapristi has quit [Remote host closed the connection]
aciniglio has quit [Ping timeout: 246 seconds]
sapristi has joined #ocaml
BitPuffin|osx has joined #ocaml
dhil has quit [Ping timeout: 246 seconds]
<sam___> companion_cube: thanks for the fix for qcheck, it seems to work fine for my purposes now
<sam___> when will 0.7 be released?
<companion_cube> soon, normally :)
<sam___> all right, no rush. im happy with using the --dev-repo for now
<sam___> slowly getting used to working with ocaml's ecosystem
Mercuria1Alchemi has joined #ocaml
<companion_cube> ^^
<companion_cube> a bit rough in the beginning, I know
mbuf has joined #ocaml
xuanrui has quit [Ping timeout: 258 seconds]
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
<rgrinberg> companion_cube: camlp4 also works but nobody suggests to support it forever
<rgrinberg> try seeing it from a more pragmatic point of view. jbuilder really doesn't have that many uses, it makes no sense to spend it on features that are going to be useless 1 year from now
freusque has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<companion_cube> well it makes the transition painful
<rgrinberg> especially when existing build system work very well with the legacy stuff. oasis will keep working for a long time :D
<companion_cube> I hope it works with omp
<companion_cube> otherwise we'll have a bad divide
<Drup> No it doesn't
<Drup> that's my big issue
<def`> jbuilder doesn't work with omp ?
<Drup> def`: making an omp-ppx with oasis is painful
<def`> ahhh, with oasis.
<Drup> yes.
<def`> Ah, the ppx driver part you mean.
<Drup> yes
<def`> Mixing findlib predicates and oasis is painful :/
<Drup> It's really painful for me at the moment for tyxml
<def`> (Well, finlib predicates alone are painful)
<def`> Did you manage to workaround ?
<Drup> I'm not sure what to do: I have a ppx library. In order for jbuilder to use ppxs, you need to driverify them, but you can't driverify them if you use oasis
Mercuria1Alchemi has quit [Ping timeout: 246 seconds]
<Drup> So I need to switch to jbuilder, but jbuilder is so opiniated that I can't really write the rest of the library the way it works currently. And I still have the camlp4 library too
<rgrinberg> Drup: make an issue in the oasis bug tracker? I think that for once this isn't something we can blame jbuilder for ;)
<Drup> rgrinberg: actually, we can
<Drup> "In order for jbuilder to use ppxs, you need to driverify them"
<Drup> this is the main problem
<Drup> if it was simpler to use non-driverified ppxs with jbuilder, It would bother me far less. I could take my time retireing the camlp4 quitely, then switch later on
<def`> Drup: I was able to driverify an oasis ppx, it wasn't pretty
<Drup> but I can't do that
<Drup> def`: I know you managed to do it, and I saw the result, which is my point :D
<Drup> The situation, currently, if I want to support all my users, is just mostly shitty. And that's mainly on jbuilder's refusal to support "normal" ppxs
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
<def`> I know.
<Drup> (I do not blame it on the omp/driver approach, which is a very good way forward. But the two modes should coexists fine. And in theory they can)
<Drup> (it's purely a jbuilder UI issue)
FreeBirdLjj has joined #ocaml
<rgrinberg> Drup: refusal is the wrong way to put it. I've had a look at it, given the way jbuilder works it's simply isn't trivial to support.
<Drup> meh. You can specify it manually so you should be able to make it work for almost every traditional ppxs
<Drup> I just don't buy that argument, sorry
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
<Drup> I'm not talking about ppx_deriving here, just simple ppx binaries
raphaelss has joined #ocaml
sam___ has quit [Ping timeout: 255 seconds]
<rgrinberg> Drup: i could give it another try but IIRC the last issue that I've encountered is that I simply couldn't find a way to make findlib preprocess something with -package args without compiling it.
<rgrinberg> I could get the preprocessing options with ocamlfind printppx though
andreas__ has quit [Quit: Connection closed for inactivity]
sapristi has quit [Remote host closed the connection]
mrsmkl has joined #ocaml
sapristi has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
Denommus has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
raphaelss has quit [Quit: Lost terminal]
sam___ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
xuanrui has joined #ocaml
sam___ has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
aantron_ has joined #ocaml
<aantron_> for those wondering if polymorphic variants are slower than regular ones: https://discuss.ocaml.org/t/lwt-core-refactored-and-documented-to-be-contributor-friendly/161/28
dhil has joined #ocaml
<companion_cube> o/ aantron_
Mercuria1Alchemi has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
<Drup> aantron_: I was just reading that, my first thoughts were: 1) non-poly variants are not always jump tables, it depends 2) I'm pretty sure you results will depends *a lot* on your hardware
<companion_cube> now that's a nice post
<Drup> but in general, poly vars should *not* be fasters
FreeBirdLjj has quit [Remote host closed the connection]
<Drup> if they are, the compiler is mis-optimizing something somewhere
<companion_cube> even though they are always boxed?
sapristi has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 255 seconds]
sapristi has joined #ocaml
mbuf has quit [Quit: Leaving]
<Drup> aantron_: I mean, your first graph really looks wrong
<Drup> companion_cube: I'm not sure what you are talking about
sapristi has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<companion_cube> yeah sorry, still thinking these variants should be dispatched with a perfect hashtable
sapristi has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
kakadu has quit [Quit: Konversation terminated!]
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
ayxih has joined #ocaml
<smondet[m]> Drup: I think I remember that X. Leroy talk about Compcert where for one of the benchmarks, Compcert was like 10x faster than `gcc -O3`. And the explanation was exactly that: the difference between binary search trees and jump tables is kinda unpredictable, sometimes you just get lucky (nb of variants / amount of code / state of the caches / whatever).
<smondet[m]> aantron_: very interesting post !
<Drup> smondet[m]: I'm not sure exactly in which cases matches are compiled to jump tables or binary trees
sapristi has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
aantron_ has quit [Remote host closed the connection]
aantron_ has joined #ocaml
MercurialAlchemi has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 240 seconds]
<mrvn> smondet[m]: The contents of your env and the adress space randomization generally has more effect than the difference between gcc -O2 and -O3.
noddy has joined #ocaml
<mrvn> Drup: if you have many cases the table gets to big to be practical. That's the obvious case. The more complex is when you have to find a hash function to do the table lookup and when to abandon that because the hash function is more expensive than the tree.
<mrvn> The expensive part is a guess. Depends on cache hits.
<mrvn> A search tree can be highly efficient if you always take the same path in a small loop so the branch prediction always guesses right
<Drup> the question was more about what the compilers actually uses as heuristic
<mrvn> For the hash funciton it can compute the cpu cycles. For the table it has to have some guess as to cache misses.
Algebr has joined #ocaml
<mrvn> but I get your point
<mrvn> What does ocamlopt do for matches?
copy_ has quit [Quit: Connection closed for inactivity]
sam____ has joined #ocaml
<mrvn> companion_cube: What do you mean poly variants are always boxed? They are just ints if the constructor has to argument iirc.
<mrvn> s/to/no/
<companion_cube> really? so it's all the same?
<companion_cube> so it's just integers that are not allocated from 0?
<mrvn> poly variants make a hash of the name and that is their tag/value.
<mrvn> Then you can find a relative prime so that each poly variant maps to an unique table entry for a jump table.
sam____ has quit [Ping timeout: 276 seconds]
<mrvn> And you can't have 2 constructors that hash to the same value. Ocaml will fail to compile then. So it only ever needs to check the hash value.
coventry has joined #ocaml
<mrvn> I would expect [> ] types to be slower than [ ], [< ] and non polymorphic variants.
xaimus has joined #ocaml
<mrvn> But I'm still wodnering what ocamlopt actually uses to decide between jump table and search tree
<aantron_> Drup: i tried a bunch of combinations and this is what i got on my machine
<coventry> In a function signature, how can I specify that an argument ought to be a Hashtbl without committing to the types of the keys and values? I asked a similar question yesterday, so there might be something fundamental about the ocaml type system I'm not getting.
<aantron_> im well aware that even C compilers generate jump tables, but i guess this would be slower on my hardware as well
<companion_cube> coventry: ('a, 'b) Hashtbl.t -> foo
<companion_cube> ?
<mrvn> coventry: let f (tbl : ('a * 'b) Hashtbl.t) = ...
<mrvn> sorry, ('a, 'b)
<aantron_> 2 and 3-case matches were compiled to if (abusing eflags in the 3-case case)
<coventry> companion_cube, mrvn: Thanks, just what I need.
<aantron_> everything else i tried was compiled to a jump table. i didnt experiement with guards or anything weird
<mrvn> coventry: or just simply use any of the Hashtbl function and it will infer it itself.
<coventry> mrvn: Yes, but I'd like to be able to specify types as documentation sometimes.
<mrvn> coventry: ocamlc -i foo.ml >foo.mli, then edit foo.mli
<coventry> Cool, thanks.
<mrvn> coventry: ocamlc -i is a great way to find out what the type for something should be or at least what the compiler infers for it.
<coventry> Yep, that looks like it'll be very handy.
<mrvn> coventry: I basically write all my mli files that way. When I'm satisfied an .ml file works I ocamlc -i it and then clean it up.
MercurialAlchemi has quit [Ping timeout: 246 seconds]
Hannibal_Smith has joined #ocaml
kakadu has joined #ocaml
ygrek has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
kakadu_ has joined #ocaml
groovy2shoes has quit [Ping timeout: 246 seconds]
kakadu has quit [Ping timeout: 246 seconds]
ayxih has quit [Read error: Connection reset by peer]
ayxih has joined #ocaml
<aantron_> and companion_cube: o/ :)
<aantron_> and thanks, also smondet[m] :)
<aantron_> Drup: i know they are not always jump tables, indeed i briefly mentioned it. but it seems like the compiler prefers to generate them quite often. it also generates them for polymorphic variants sometimes, when the variant hashes turn out to be dense. but this is comparatively rare
<aantron_> i'd be curious to see what other people get for performance of indirect jump vs binary search, on their processors. code for the benchmark is here https://gist.github.com/aantron/d6c5c86ba8142f8e2106a1ed96a4fb8d#file-benchmark-matching-ml
jnavila has joined #ocaml
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 246 seconds]
mrsmkl has quit [Ping timeout: 260 seconds]
al-damiri has joined #ocaml
jlam_ has quit [Ping timeout: 240 seconds]
jlam_ has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
jlam__ has joined #ocaml
jlam_ has quit [Ping timeout: 246 seconds]
ayxih has quit [Quit: mov $60,%rax xor %rdi,%rdi syscall]
tane has quit [Quit: Leaving]
ayxih has joined #ocaml
sapristi has joined #ocaml
aciniglio has joined #ocaml
xuanrui has quit [Remote host closed the connection]
aantron_ has quit [Remote host closed the connection]
aantron_ has joined #ocaml
<coventry> Is there any way to make a Set based on the type of another variable? I'd like to do something like "let f (i:'a) = let module S = Set.Make('a) in S.empty;;", but that gives me a syntax error on the second "'a".
<Drup> You can, but it's fairly advanced. What is your use case ?
ShalokShalom has quit [Read error: Connection reset by peer]
<coventry> Just learning the language at this point. Over-engineered solution to https://ocaml.org/learn/tutorials/99problems.html#27-Group-the-elements-of-a-set-into-disjoint-subsets-medium , but the over-engineering is just for learning.
jnavila has quit [Ping timeout: 240 seconds]
ShalokShalom has joined #ocaml
<coventry> If there's an easy pointer to the general method, I'd appreciate it. If it's too advanced for me now, I'm sure it'll be useful later.
<Drup> ah, I see
<Drup> so, yes, you can do it, but you need abstract local types
<Drup> and it's not going to work for the empty set
<Drup> and the use of the module need to be local :p
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
deciduously has joined #ocaml
<coventry> Thanks, Drup. Looks useful.
<coventry> Ah, great, googling for "abstract local types ocaml" was returning a lot of chaff. :)
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
M-jimt has quit [Ping timeout: 240 seconds]
hdurer[m] has quit [Ping timeout: 258 seconds]
timclassic has quit [Ping timeout: 258 seconds]
orbifx[m] has quit [Ping timeout: 246 seconds]
Bluddy[m] has quit [Ping timeout: 240 seconds]
M-martinklepsch has quit [Ping timeout: 255 seconds]
isaachodes[m] has quit [Ping timeout: 246 seconds]
samrat[m] has quit [Ping timeout: 246 seconds]
regnat[m] has quit [Ping timeout: 246 seconds]
yetanotherion[m] has quit [Ping timeout: 264 seconds]
copy[m] has quit [Ping timeout: 264 seconds]
srenatus[m] has quit [Ping timeout: 264 seconds]
sam___ has joined #ocaml
M-ErkkiSeppl has quit [Ping timeout: 246 seconds]
smondet[m] has quit [Ping timeout: 258 seconds]
xuanrui has joined #ocaml
pierpa has joined #ocaml
raphaelss has joined #ocaml
kolko has joined #ocaml
aspiwack[m] has quit [Ping timeout: 276 seconds]
sam___ has quit [Ping timeout: 260 seconds]
sz0 has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
jlam_ has joined #ocaml
jlam__ has quit [Ping timeout: 240 seconds]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 is now known as Guest65771
infinity0 has joined #ocaml
Guest65771 has quit [Killed (moon.freenode.net (Nickname regained by services))]
deciduously has quit [Quit: WeeChat 1.9]
aspiwack[m] has joined #ocaml
xuanrui has quit [Ping timeout: 248 seconds]
aciniglio has quit [Ping timeout: 248 seconds]
tautologico has joined #ocaml
<ShalokShalom> hi there
<ShalokShalom> how can i know, which type is used, since OCaml use automatic deduction?
<kakadu_> merlin has feature like 'show type of identifier under cursor'
<ShalokShalom> and just by reading code?
<kakadu_> you can perform type inference in your head :)
<ShalokShalom> so, Merlin is basically an IDE plugin?
<kakadu_> yep
<ShalokShalom> that sounds nice ;)
<ShalokShalom> hehe
<kakadu_> you can also write let (_:int) = expression and see the error message
<ShalokShalom> so just move my cursor to this type and go
<ShalokShalom> thanks a lot
aantron_ has quit [Ping timeout: 246 seconds]
<ShalokShalom> do you see any other solution for the syntax, next to Reason?
<ShalokShalom> i am on Linux, so F# is no choice
<kakadu_> merlin should work with Reason
<kakadu_> (I think)
<ShalokShalom> yeah
<ayxih> With -annot, caml compiler can write the type of every expression in a file. And with C-c C-t under GNU Emacs you can query the type of the enclosing expresssion.
<ShalokShalom> i mean in general
<ShalokShalom> do you know an alternative?
<kakadu_> I think that we mentioned everything that should be mentioned
<ShalokShalom> what you mean?
<ShalokShalom> ayxih: thanks a lot
<ShalokShalom> besides of this Types
<ShalokShalom> in general
<kakadu_> Ah
<ShalokShalom> OCamls syntax seems to offer some snares
<kakadu_> you are asking about other syntaxes?
<ShalokShalom> idk if this is correct
<ShalokShalom> yes, exactly
<ShalokShalom> and if you think, that this is the case at all
<kakadu_> There is revised syntax for ocaml but nobody uses it for new projects now (and you should not)
<ShalokShalom> (a complicated/confusing syntax in OCaml)
<ShalokShalom> does Reason solve issues?
<ShalokShalom> i know
<ShalokShalom> i already read on that
<kakadu_> I don't think that OCaml syntax is complicated or confusing :)
<ShalokShalom> the issue is, each syntax seems to solve some issues and raise up some more
<ShalokShalom> ok, you are used to it? since years, i guess
<ShalokShalom> i am a beginner
<kakadu_> I can recommend you to use that default OCaml syntax
<kakadu_> (but I'm not familiar with reason. From what I seen -- it doesn't worth your effort)
* kakadu_ should control my self and write capital letters sometimes. Otherwise I sound funny
<ShalokShalom> seems like they add ;; in those OCaml examples, just in order to give it a more complicated look
<ShalokShalom> from what i know is this just needed in REPL
<ShalokShalom> and they add ; in places, where OCaml works without one at all
samrat[m] has joined #ocaml
yetanotherion[m] has joined #ocaml
orbifx[m] has joined #ocaml
timclassic has joined #ocaml
M-jimt has joined #ocaml
Bluddy[m] has joined #ocaml
hdurer[m] has joined #ocaml
regnat[m] has joined #ocaml
M-martinklepsch has joined #ocaml
smondet[m] has joined #ocaml
srenatus[m] has joined #ocaml
copy[m] has joined #ocaml
isaachodes[m] has joined #ocaml
M-ErkkiSeppl has joined #ocaml
<ShalokShalom> again topic change: https://elixirforum.com/t/static-elixir/7757
sam___ has joined #ocaml
ski has quit [Ping timeout: 258 seconds]
kakadu_ has quit [Ping timeout: 240 seconds]
kakadu_ has joined #ocaml
sam___ has quit [Ping timeout: 260 seconds]
<kakadu_> Reason syntax seems to be more familiar for guys that come from C-like languages but for me it doesn't help so much
<kakadu_> Just decide anything
sh0t has quit [Remote host closed the connection]
<coventry> Why does "module SS = Set.Make(String);;" work, whereas for a set of integers a struct needs to be passed explicitly? Is "String" a struct? How do I access it from the toplevel, outside that construction context? ("String;;" gives "unbound constructor".)
<ShalokShalom> i mean, does it solve that issues?
<ShalokShalom> it claims to avoid fundamental issues
<ayxih> coventry, String is a module.
<Fistine> coventry: String is a module which already implements with string = String.t and with String.compare : t -> t -> int. So Set.Make(String) is legit
<coventry> Thanks, ayxih, Fistine. Is there a list of built-in modules?
<ShalokShalom> There's no more let vs val, or struct vs sig
sapristi has quit [Remote host closed the connection]
<ShalokShalom> kakadu_: ^
sapristi has joined #ocaml
<kakadu_> I can't say that these are fundamental issues
<coventry> ayxih: Thanks, so Int is a module, but I can't use it with Set.Make in the same way because it has no compare... Why doesn't it?
<ShalokShalom> not fundamental
<ShalokShalom> i think i choosed the wrong word here
<coventry> primitive?
<ShalokShalom> what ever
<ShalokShalom> :)
<ShalokShalom> so, they do not happen so often?
<kakadu_> `Lambdas as record fields no longer need extra parens` not very oftem for me
<octachron> coventry, the Int module is a compiler internal one: that's why the standard library link is more readable that the whole module index
<ayxih> coventry, Int is a module? I didn't know that. In any case, to be usable with Set.Make, a module must provide a type t, and a compare : t -> t -> int.
<coventry> octachron: Thanks. ayxih: At least, it's listed in the index of modules here: http://caml.inria.fr/pub/docs/manual-ocaml/libref/index_modules.html
<kakadu_> in `Pattern Matching` you avoid begin...end in nested matches sometimes by forcing people to write {} _always_
<kakadu_> I can't say that it is an improvement
<ayxih> coventry, didn't know that one. But it doesn't provide what's needed.
<ShalokShalom> I quote:
<ShalokShalom> OCaml already expects constructor argument types to be specified in tuple form, so it's confusing when a single constructor expects a single argument that happens to be a tuple type.
<ShalokShalom> What's even more confusing is that the constructors don't actually accept tuples, yet the syntax appear to resemble tuples.
<octachron> kakadu_, there is also the dreadful "===" and "=" for mutation
sapristi has quit [Remote host closed the connection]
<ShalokShalom> Sometimes the syntax for instantiating a constructor with multiple arguments overlaps the syntax for constructing a variant with a single argument that happens to be a tuple - so it looks exactly like you are supplying a tuple when you are not actually supplying a tuple.
sapristi has joined #ocaml
<ShalokShalom> kakadu_: there is no begin/end at all anymore, so far as i am aware
<kakadu_> ShalokShalom: Yeah, beginners often ask this question. Maybe Reason language solved this issue
<ShalokShalom> In Reason:
<kakadu_> After a lot of year I rarely face this issue
<kakadu_> years*
<ShalokShalom> Variant constructor types are expected to be listed as space separated lists, using parenthesis to group precedence (as with everything else).
<ShalokShalom> Tuples always look like tuples, and anything that looks like a tuple is a tuple.
<ShalokShalom> Constructing instances of the variant (as you would have guessed) follows function application style (space separated lists).
<ShalokShalom> I think about to fork Reason and create something like the best mix of it
<kakadu_> In Short: they like Haskell syntax more
<kakadu_> ADT resemble Haskell very much
<ShalokShalom> i think its relativly easy to modify the existing Reason infrastructure
<ayxih> Haskell synatx for constructors is really nice.
<ShalokShalom> So, might be that they face these issues more often, since they use it for webprogramming?
<octachron> ShalokShalom, if you are a beginner, I see little point in creating your own syntax; except if you really love writing parser/designing surface language
<ShalokShalom> i mean on top of Reason
<ShalokShalom> simply change some keys
<ShalokShalom> i am fine with the general syntax
<ShalokShalom> just wanna know, if it really solves issues
<kakadu_> ShalokShalom: I don't think that webprogramming specifics is related to this
<ShalokShalom> i see
Denommus has quit [Ping timeout: 255 seconds]
aantron_ has joined #ocaml
<octachron> ayxih, Haskell syntax does not map without troubles to OCaml due to the (relaxed) value restriction
<kakadu_> Can somebody tell me why they are using => instead of ->? To be more Scala?
<octachron> ShalokShalom, the issue that Reason try to solve is "attracting JS developpers" to OCaml for a good part
<octachron> kakadu_, JS uses "=>"
<ShalokShalom> yeah sure
<ShalokShalom> i am aware of this
<ShalokShalom> the question is: is there anything more?
<kakadu_> I don't think so
<kakadu_> octachron: ?
nomicflux has joined #ocaml
<kakadu_> ShalokShalom: The the tuples in ADT declaration will help to avoid some pitfalls but everything else is just `attracting JS developers`. IMHO
<ShalokShalom> how common are ;; in casual code?
<kakadu_> never appears. only in toplevel
aantron_ has quit [Ping timeout: 260 seconds]
<ShalokShalom> kakadu_: ok, thanks a lot
<kakadu_> octachron: Yeah, I googled it. Last time I wrote something in pure Javascript this thing didn't exist
<ShalokShalom> which is the reason why they changed your ~> to it
<ShalokShalom> ;; gets just used in the REPL?
<kakadu_> yep
<ShalokShalom> i see
<ShalokShalom> then its not that strange
<ShalokShalom> is it possible to port this tuples thing?
<Drup> john whitington's books are know yes. They are good.
<ShalokShalom> thanks a lot
<kakadu_> ShalokShalom: something like extra warning when you write without parenthesis?
<ShalokShalom> something like Tuples look like Tuples
<ShalokShalom> i think its nice to memorize so
<ShalokShalom> more easy
sh0t has joined #ocaml
<coventry> Why doesn't List.cons exist as a curryable function?
<ShalokShalom> i dislike that Reason forces you to use ; at the end of so many statements and {} too
<ShalokShalom> so a mix might be nice :)
<kakadu_> a chimera :)
<kakadu_> I don't think you need a mix, You need to pick something you dislike less
<ShalokShalom> haha, i am perfectionist
<ShalokShalom> maybe a chance, to overcome this illness
sapristi has quit [Quit: Leaving]
<ShalokShalom> Real World OCaml gets rewritten, maybe a nice followup after the Very Beginning Book
<kakadu_> I'm kind of going to sleep
<kakadu_> ShalokShalom: hope to see you there more often
<coventry> octachron: Ah, I'm on 4.02 from the avsm repo. Thanks.
<ShalokShalom> looks a little bit dry to me yet: http://dev.realworldocaml.org/
<ShalokShalom> kakadu_: good night, very nice, thanks a lot :D
cbot has joined #ocaml
Denommus has joined #ocaml
kakadu_ has quit [Remote host closed the connection]
coventry has quit [Read error: Connection reset by peer]
sam___ has joined #ocaml
mengu has joined #ocaml
Denommus has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
sam___ has quit [Ping timeout: 276 seconds]
jao has joined #ocaml
sh0t has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
theblatte has quit [Ping timeout: 240 seconds]
ziyourenxiang has quit [Ping timeout: 246 seconds]
_whitelogger_ has joined #ocaml
nicoo has quit [*.net *.split]
mengu has quit [*.net *.split]
orbifx[m] has quit [*.net *.split]
jlam_ has quit [*.net *.split]
ygrek has quit [*.net *.split]
_whitelogger has quit [*.net *.split]
bjs has quit [*.net *.split]
john51 has quit [*.net *.split]
cross has quit [*.net *.split]
keep_learning has quit [*.net *.split]
hannes has quit [*.net *.split]
Murmus has quit [*.net *.split]
iZsh has quit [*.net *.split]
bigs has quit [*.net *.split]
sheijk has quit [*.net *.split]
abeaumont has quit [*.net *.split]
relrod has quit [*.net *.split]
caw_ has quit [*.net *.split]
dmj` has quit [*.net *.split]
breitenj has quit [*.net *.split]
averell has quit [*.net *.split]
maufred has quit [*.net *.split]
dx has quit [*.net *.split]
bitbckt has quit [*.net *.split]
copy[m] has quit [*.net *.split]
isaachodes[m] has quit [*.net *.split]
samrat[m] has quit [*.net *.split]
kolko has quit [*.net *.split]
Hannibal_Smith has quit [*.net *.split]
zv has quit [*.net *.split]
Armael has quit [*.net *.split]
Drup has quit [*.net *.split]
engil has quit [*.net *.split]
eagleflo has quit [*.net *.split]
j0sh has quit [*.net *.split]
cthuluh has quit [*.net *.split]
hnrgrgr has quit [*.net *.split]
tianon has quit [*.net *.split]
emias has quit [*.net *.split]
stux|RC-only has quit [*.net *.split]
dogui has quit [*.net *.split]
jonesz has quit [*.net *.split]
clog has quit [*.net *.split]
xa0 has quit [*.net *.split]
hdurer[m] has quit [*.net *.split]
xaimus has quit [*.net *.split]
tokomak has quit [*.net *.split]
jimt has quit [*.net *.split]
Merv has quit [*.net *.split]
JSharp has quit [*.net *.split]
spion has quit [*.net *.split]
jlam has quit [*.net *.split]
rbocquet has quit [*.net *.split]
jun has quit [*.net *.split]
grandy____ has quit [*.net *.split]
thegameg has quit [*.net *.split]
jeffmo has quit [*.net *.split]
Rome has quit [*.net *.split]
andreypopp has quit [*.net *.split]
diginet has quit [*.net *.split]
Joost has quit [*.net *.split]
rjungemann has quit [*.net *.split]
littleli has quit [*.net *.split]
vodkaInferno has quit [*.net *.split]
sspi has quit [*.net *.split]
ggherdov has quit [*.net *.split]
chindy has quit [*.net *.split]
_andre has quit [*.net *.split]
picolino has quit [*.net *.split]
nullx002 has quit [*.net *.split]
rwmjones has quit [*.net *.split]
mami has quit [*.net *.split]
beanmachine has quit [*.net *.split]
cow-orker has quit [*.net *.split]
qmmm has quit [*.net *.split]
rixed_ has quit [*.net *.split]
bernardo1pc has quit [*.net *.split]
asm89 has quit [*.net *.split]
bsima has quit [*.net *.split]
richi235 has quit [*.net *.split]
shon has quit [*.net *.split]
bthom1 has quit [*.net *.split]
loceur has quit [*.net *.split]
nore has quit [*.net *.split]
DanielRi1hman has quit [*.net *.split]
gargawel has quit [*.net *.split]
Madars has quit [*.net *.split]
pierpa has quit [*.net *.split]
vodkaInferno has joined #ocaml
spion has joined #ocaml
jun has joined #ocaml
rbocquet has joined #ocaml
xaimus has joined #ocaml
chindy has joined #ocaml
Rome has joined #ocaml
thegameg has joined #ocaml
Joost has joined #ocaml
jao has quit [Remote host closed the connection]
grandy____ has joined #ocaml
dmj` has joined #ocaml
cbot has quit [Ping timeout: 261 seconds]
rjungemann has joined #ocaml
JSharp has joined #ocaml
Merv has joined #ocaml
jeffmo has joined #ocaml
cbot has joined #ocaml
srenatus[m] has quit [Ping timeout: 255 seconds]
M-ErkkiSeppl has quit [Ping timeout: 246 seconds]
andreypopp has joined #ocaml
tokomak has joined #ocaml
littleli has joined #ocaml
kolko has joined #ocaml
Hannibal_Smith has joined #ocaml
zv has joined #ocaml
Armael has joined #ocaml
Drup has joined #ocaml
engil has joined #ocaml
jonesz has joined #ocaml
eagleflo has joined #ocaml
j0sh has joined #ocaml
emias has joined #ocaml
stux|RC-only has joined #ocaml
dogui has joined #ocaml
tianon has joined #ocaml
clog has joined #ocaml
xa0 has joined #ocaml
hnrgrgr has joined #ocaml
cthuluh has joined #ocaml
aspiwack[m] has quit [Ping timeout: 255 seconds]
regnat[m] has quit [Ping timeout: 246 seconds]
timclassic has quit [Ping timeout: 246 seconds]
M-jimt has quit [Ping timeout: 246 seconds]
stux|RC-only has quit [Max SendQ exceeded]
sspi has joined #ocaml
mengu has joined #ocaml
bjs has joined #ocaml
ygrek has joined #ocaml
jlam_ has joined #ocaml
Murmus has joined #ocaml
john51 has joined #ocaml
cross has joined #ocaml
hannes has joined #ocaml
abeaumont has joined #ocaml
iZsh has joined #ocaml
bigs has joined #ocaml
sheijk has joined #ocaml
relrod has joined #ocaml
caw_ has joined #ocaml
maufred has joined #ocaml
dx has joined #ocaml
bitbckt has joined #ocaml
yetanotherion[m] has quit [Ping timeout: 255 seconds]
M-martinklepsch has quit [Ping timeout: 264 seconds]
Bluddy[m] has quit [Ping timeout: 255 seconds]
stux|RC-only has joined #ocaml
smondet[m] has quit [Ping timeout: 276 seconds]
rwmjones has joined #ocaml
nullx002 has joined #ocaml
_andre has joined #ocaml
cow-orker has joined #ocaml
picolino has joined #ocaml
mami has joined #ocaml
asm89 has joined #ocaml
beanmachine has joined #ocaml
loceur has joined #ocaml
bernardo1pc has joined #ocaml
bsima has joined #ocaml
qmmm has joined #ocaml
rixed_ has joined #ocaml
bthom1 has joined #ocaml
shon has joined #ocaml
nore has joined #ocaml
DanielRi1hman has joined #ocaml
gargawel has joined #ocaml
Madars has joined #ocaml
richi235 has joined #ocaml
jimt has joined #ocaml
kolko has quit [*.net *.split]
Hannibal_Smith has quit [*.net *.split]
zv has quit [*.net *.split]
Armael has quit [*.net *.split]
Drup has quit [*.net *.split]
engil has quit [*.net *.split]
eagleflo has quit [*.net *.split]
j0sh has quit [*.net *.split]
cthuluh has quit [*.net *.split]
hnrgrgr has quit [*.net *.split]
tianon has quit [*.net *.split]
emias has quit [*.net *.split]
dogui has quit [*.net *.split]
jonesz has quit [*.net *.split]
clog has quit [*.net *.split]
xa0 has quit [*.net *.split]
ggherdov has joined #ocaml
john51 has quit [Read error: Connection reset by peer]
john51 has joined #ocaml
zv has joined #ocaml
kolko has joined #ocaml
Armael has joined #ocaml
j0sh has joined #ocaml
Hannibal_Smith has joined #ocaml
engil has joined #ocaml
Drup has joined #ocaml
eagleflo has joined #ocaml
jonesz has joined #ocaml
clog has joined #ocaml
xa0 has joined #ocaml
emias has joined #ocaml
dogui has joined #ocaml
tianon has joined #ocaml
hnrgrgr has joined #ocaml
cthuluh has joined #ocaml