adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.2 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
oriba has quit [Ping timeout: 255 seconds]
<ollehar> oriba_: maybe try to adjust the gc?
<ollehar> to collect more eagerly.
tmtwd has quit [Ping timeout: 245 seconds]
<oriba_> ollehar: how could adjust the Gc help?
<oriba_> I think the lib just eats to much mem.
<ollehar> oriba_: not sure how, wait...
oriba_ is now known as oriba
<ollehar> "TL;DR: setting OCAMLRUNPARAM=s=4M,i=32M,o=150 can make your OCaml programs run faster. Read on for details and how to see if the garbage collector is thrashing and thereby slowing down your program."
<oriba> ollehar: I have no speed problem
jao has joined #ocaml
wagle has quit [Ping timeout: 246 seconds]
<ollehar> oriba: check out the link
<oriba> In the lib (csv.ml) is mentioned, that speed is a development goal. Maybe it's speed-vs-mem-consumption-tradeoff
<oriba> I just used that OCAMLRUNPARAM=s=4M,i=32M,o=150
<oriba> does not help
<oriba> So, I possibly need to parse the csv by myself.
dongcarl has joined #ocaml
<ollehar> "The space_overhead setting controls how aggressive the GC is about setting the slice size to a large size. This represents the proportion of memory used for live data that will be "wasted" because the GC doesn't immediately collect unreachable blocks. Core defaults this to 100 to reflect a typical system that isn't overly memory-constrained. Set this even higher if you have lots of memory, or lower to cause the GC to work harder and
<ollehar> collect blocks faster at the expense of using more CPU time."
AltGr has joined #ocaml
mcc has quit [Quit: This computer has gone to sleep]
<ollehar> oriba: so "o" should actually be low, sorry!
<ollehar> try with o=10 or something
<ollehar> (never tried myself)
<oriba> ollehar: this first looked better... but... it just needed more time until the mem was eaten up
<ollehar> oriba: rats
<ollehar> then I don't know. sorry :|
<oriba> before, the mem-usage nearly linearly over time increased... with o=10 the mem usage does not increase linearly... there are times, when mem-usage did not rise... but some time later, it did.
<oriba> so it slowed down.
<ollehar> yes, it would trigger more aggressive collection of memory
<oriba> ollehar: thanks for wanting to help me, but I think that - regarding mem-consumption - the csv lib is close to be crap.
<oriba> maybe it's super in speed, but not in mem
BitPuffin|osx has joined #ocaml
dongcarl has quit [Ping timeout: 240 seconds]
<ollehar> oriba: well, you could post it as an issue on github :)
<oriba> csv-lib store as lists, so it should not occupy too much memory
<ollehar> also write down what you tried.
<oriba> ollehar: yes, maybe I should do that :)
<oriba> writing down...hmhhh
<oriba> I just read the data ;-)
<ollehar> yeah, but with regard to o=10
<oriba> hmhh
<oriba> you mean I should write that down, so that nobody will help me with "try to tweak the Gc!" ? ;-)
<ollehar> oriba: sure :)
<oriba> (can copy&paste our discussion here)
<ollehar> how do you use the lib, btw?
<oriba> (and edit it a bit)
<oriba> First I used an installed package... 1.3.3 version. Then I used githiub-code and compiled it directly into my code.
<oriba> its the new code from github.
<oriba> same situation
wagle has joined #ocaml
<ollehar> oriba: your usage in your code is just one line, or...?
<oriba> ollehar: I tried this stuff a while ago and read the whole file.
<oriba> After people blamed me doing it wrong, I changed to reading line by line
<oriba> same result.
<oriba> So, it doesn't matter
<ollehar> oriba: could you paste somewhere?
<oriba> well... thought about going to bed soon. Could do it in the next days. Maybe kicking out unnecessary code, so that it's small and good for showing the problem.
<oriba> So, there seem no other libs for csv available?
keen____ has joined #ocaml
<ollehar> oriba: don't know
<ollehar> but... if you read line by line, you should do what you want to do line by line too, and not collect anything. that way, you can throw away any memory used for each line.
<ollehar> and memory usage will be constant.
keen___ has quit [Ping timeout: 264 seconds]
noplamodo has joined #ocaml
sailorswift has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<oriba> ollehar: but 157 MB should match into 1.8 Gb RAM? Even if reading it all...
<ollehar> oriba: maybe not...
<oriba> but it's just list of lists...
<oriba> no Map-stuff ...
<ollehar> oriba: what's in the lists?
<ollehar> I haven't read up on runtime representations of types in OCaml, so can't say much.
<oriba> the lists I mean are the csv-data structures
<oriba> string list
<oriba> But I used an Array to store the lists there
<oriba> Will try it with building a list by myself
<oriba> Maybe that saves more mem...
<ollehar> oriba: well, you could still post your code.
<oriba> yes.
<oriba> just want to look over it again, to not have introduced crap by myself ;-)
<oriba> Just rewrote from array of string list to list of string list
<oriba> helps no much
<oriba> so, will boil it down to some lines of code and then post it.
<oriba> but not now.
<oriba> need to go to bed soon.
<oriba> will be back next night I think.
<oriba> then with some code... and maybe opening an issue#
<ollehar> oriba: alright, sleep tight! the other dudes here will be able to help you, I'm sure!
<oriba> also with the original data
<oriba> Well, I think there is no help.
<oriba> I guess the lib eats too much mem.
<oriba> So, we could bet ;-)
<oriba> good night.
oriba has quit [Quit: WeeChat 1.2]
johnf has quit [Read error: Connection reset by peer]
pyon has quit [Ping timeout: 260 seconds]
johnf has joined #ocaml
jeffmo has joined #ocaml
pyon has joined #ocaml
swgillespie has joined #ocaml
segmond has quit [Disconnected by services]
seggy is now known as segmond
seggy has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tmtwd has joined #ocaml
<Algebr> how can I create a new type in a function body? for example let foo s = type exn += Foo of string ......some body logic.
<Algebr> rather in this case I am extending the exn type
mcc has joined #ocaml
ousado has joined #ocaml
<ollehar> Algebr: first class modules?
<ollehar> or extensible types, think there's a fork?
<ollehar> ah, they were added at 4.02 ^^
dongcarl has joined #ocaml
dongcarl has quit [Client Quit]
jeffmo has quit [Quit: jeffmo]
BitPuffin|osx has quit [Ping timeout: 260 seconds]
ollehar has quit [Quit: ollehar]
<pyon> I installed OPAM from source using `make cold CONFIGURE_ARGS="--prefix ~/.opam"`. I still don't have any OCaml compiler in my $PATH. How do I download the list of available OCaml compiler versions, so that I can `opam init --comp VERSION`?
izaak has joined #ocaml
oscar_toro has quit [Ping timeout: 240 seconds]
<Algebr> it probably would have been easier to just use a system provided ocaml compiler, like via brew or apt-get, then opam switch to the compiler version you wanted and then remove the system compiler
ygrek has quit [Ping timeout: 244 seconds]
c74d is now known as Guest68804
Guest68804 has quit [Ping timeout: 245 seconds]
c74d has joined #ocaml
struktured has quit [Ping timeout: 244 seconds]
Algebr` has joined #ocaml
Algebr has quit [Ping timeout: 244 seconds]
igoroliveira has quit [Quit: Connection closed for inactivity]
Algebr`` has joined #ocaml
Algebr` has quit [Ping timeout: 244 seconds]
darkf has joined #ocaml
apache2 has quit [Read error: Connection reset by peer]
apache2_ has joined #ocaml
flux has joined #ocaml
sgnb` has quit [Read error: Connection reset by peer]
sgnb` has joined #ocaml
jao has quit [Ping timeout: 272 seconds]
cthuluh has quit [Ping timeout: 252 seconds]
tmtwd has quit [Read error: Connection reset by peer]
cthuluh has joined #ocaml
samrat has joined #ocaml
tmtwd has joined #ocaml
tmtwd has quit [Remote host closed the connection]
<mcc> Hello. Could you help me understand this error message involving GADTs? https://gist.github.com/efaa43dc9104a2c2ff43 "This expression has type cChainedReturnType#0 but an expression was expected of type cReturnType#0"
<mcc> I don't know why it would want cReturnType#0 there.
wagle has quit [Remote host closed the connection]
<mcc> ...hm, the Merlin error message is a little clearer
MercurialAlchemi has joined #ocaml
<mcc> hm, it's compiling again
rossberg has quit [Ping timeout: 244 seconds]
rossberg has joined #ocaml
wagle has joined #ocaml
shinnya has quit [Ping timeout: 256 seconds]
ggole has joined #ocaml
mal`` has quit [Quit: Leaving]
MercurialAlchemi has quit [Ping timeout: 246 seconds]
mal`` has joined #ocaml
MrScout has joined #ocaml
samrat has quit [Ping timeout: 246 seconds]
izaak has quit [Quit: izaak]
native_killer has joined #ocaml
AlexRussia has joined #ocaml
<AltGr> Is the behaviour for Scanf.unescaped "\"" expected ?
<AltGr> (it raises Scanf.Scan_failure "scanf: bad input at char number 2: \"end of input not found\"")
psy_ has quit [Ping timeout: 256 seconds]
Algebr has joined #ocaml
swgillespie has joined #ocaml
MrScout has quit [Ping timeout: 246 seconds]
AlexRussia has quit [Quit: WeeChat 1.3-dev]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Algebr> I have this string as a key in a yojson object, "\u001b[33m[23:56:25] \u001b[0m\u001b[34mheaders\u001b[0m". My problem is that when I get a pretty printed representation of that via a yojson function and then feed that to print_endline, the correct coloring isn't occuring and I'm still getting that "\u001..." string
AlexRussia has joined #ocaml
<ggole> Is that \u001b supposed to be an ESC?
<Algebr> I assume so
<ggole> Try \027 instead
<ggole> (If you are control of the string, at least.)
<Algebr> not really, its created by ansiterminal
<Algebr> I'm getting it made via ansiterminal, then making it the key in a yojson object
<Algebr> then I'm calling a pretty function, then printing it.
<Algebr> but echoing the string works correctly.
<ggole> So where does the \u stuff come from? Printing the ocaml string in the toplevel?
<Algebr> ansiterminal made it
<ggole> So ansiterminal printed it somewhere, and you copied it (programmatically) into ocaml?
<Algebr> ansiterminal is an ocaml library, I made the string in memory in ocaml and then feed it, eventually, to print_endline
ely-se has joined #ocaml
<ggole> Dunno then.
<ggole> The string with ESC in place of whatever the \u is works fine for colouring a terminal.
<ggole> print_endline "\027[33m[23:56:25] \027[0m\027[34mheaders\027[0m"
<Algebr> right, it does
NingaLeaf has quit [Read error: Connection reset by peer]
<Algebr> Okay, its not ansiterminal's fault. Its Yojson that is change the string created by ansiterminal.
<Algebr> changing
<ggole> So it's converting to the equivalent JSON
<ggole> Presumably yojson has a function to go back the other way
<Algebr> it does, I'm using a pretty_to_string function, to get a string representation of the json
<Algebr> and then print_endline that
rbocquet has joined #ocaml
<ggole> I don't think that will do the conversion I had in mind
zpe has joined #ocaml
native_killer_ has joined #ocaml
yomimono has joined #ocaml
native_killer has quit [Ping timeout: 255 seconds]
sh0t has joined #ocaml
Algebr has quit [Ping timeout: 255 seconds]
tennix has joined #ocaml
yomimono has quit [Ping timeout: 246 seconds]
antkong_ has quit [Quit: antkong_]
oscar_toro has joined #ocaml
sh0t has quit [Ping timeout: 244 seconds]
matason has joined #ocaml
ely-se has quit [Quit: leaving]
mort___ has joined #ocaml
sh0t has joined #ocaml
dsheets has quit [Ping timeout: 246 seconds]
sh0t has quit [Ping timeout: 265 seconds]
Simn has joined #ocaml
yomimono has joined #ocaml
mcc has quit [Quit: This computer has gone to sleep]
<dinosaure> mfp: oh ok :d
yomimono has quit [Ping timeout: 244 seconds]
native_killer has joined #ocaml
native_killer_ has quit [Ping timeout: 244 seconds]
lewis1711 has joined #ocaml
yomimono has joined #ocaml
native_killer_ has joined #ocaml
native_killer has quit [Ping timeout: 246 seconds]
yomimono has quit [Ping timeout: 260 seconds]
<gasche> AltGr: no, the documentation says it should work if the string has no escapes
<gasche> you should file a bug report (and provide a patch?)
<gasche> hm
<gasche> the implementation is... audacious
yomimono has joined #ocaml
<AltGr> gasche: ok
Haudegen has quit [Ping timeout: 244 seconds]
<AltGr> done
rand000 has joined #ocaml
phree has joined #ocaml
rand000_ has joined #ocaml
phree has quit [Remote host closed the connection]
rand000 has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
<lewis1711> I've asked this before - but is there a good stand-alone mutable dynamic array/vector lib?
<mrvn> Easy enough to make using an array and adding the push/pop methods
<mrvn> If you want to insert in the middle then I think batteries and cores have ropes.
contempt has quit [Read error: Connection reset by peer]
<lewis1711> you mean append two arrays when it gets too big? yeah that's probably the easiest way
<lewis1711> just figure someone might have done it better and faster
contempt has joined #ocaml
<gasche> I would rather use Batteries' implementation but you asked for "stand-alone"
<gasche> (the implementation is almost identical but has tests)
<lewis1711> yeah I need to figure out whether I should use battery or core actually
<companion_cube> looks like it's not on opam, I'm surprised
<companion_cube> there is https://github.com/mmottl/res too
opios has joined #ocaml
yomimono has quit [Ping timeout: 260 seconds]
yomimono has joined #ocaml
obadz has quit [Quit: leaving]
opios has left #ocaml [#ocaml]
<orbitz> Are their any good solutions to doing lots od string building in an efficeint way? Specifically, if I have a tree of values and want to convert it to a string
<orbitz> In Erlang we haev iolists which let you build a something taht will become a string eventually
ggole has quit [Ping timeout: 264 seconds]
<companion_cube> Buffer?
<companion_cube> or just, write to a out_channel/formatter while traversing the tree
nullcatxxx_ has joined #ocaml
<orbitz> I don't necessairly have an out_channel. But yes I forgot abotu Buffer
<companion_cube> :)
<companion_cube> buffer + bprintf
<orbitz> I wish there was som ecute thing you could do where if you have (t -> string) you could let the compiler know "put directly in this buffer instead and skip any intermediate allocation" :)
<orbitz> not htat it's a problem for me right now, just contemplating
spacebat has quit [Ping timeout: 246 seconds]
spacebat has joined #ocaml
robbert has quit [Ping timeout: 264 seconds]
ggole has joined #ocaml
BitPuffin has joined #ocaml
kushal has joined #ocaml
ely-se has joined #ocaml
yomimono has quit [Remote host closed the connection]
antkong has joined #ocaml
ely-se has quit [Quit: leaving]
ollehar has joined #ocaml
kakadu has joined #ocaml
_andre has joined #ocaml
<flux> ocamlbuild apparently builds myocamlbuild if given no arguments. is it possible to augment the list of default targets?
pyon has quit [Quit: fix config]
<flux> ..from within a file, not from its arguments
pyon has joined #ocaml
<pyon> Is there any way to modify the template that `opam config env` uses to generate a script that modifies environment variables?
<flux> your options: 1) sed, or other post processor 2) modify source code to accommodate your shell and submit a pull request
<pyon> Ah.
<pyon> Never mind, I found the `$OPAMROOT/opam-init` subdirectory.
yomimono has joined #ocaml
<flux> ~/
<flux> oops
<pyon> Oh, apparently those scripts aren't templates. Those are generated by `opam switch` itself. :-|
octachron has joined #ocaml
<pyon> The problem I'm facing is that `opam config env` changes the $PATH to include the location of the currently selected OCaml compiler... but also removes the location of OPAM itself! :-|
igoroliveira has joined #ocaml
<flux> interesting, it almost sounds like a feature to do that :)
<flux> so after echo $PATH; eval `opam config env`; echo $PATH a directory has been removed from the path?
dongcarl has joined #ocaml
tennix has quit [Ping timeout: 260 seconds]
yomimono has quit [Ping timeout: 244 seconds]
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yomimono has joined #ocaml
yomimono has quit [Ping timeout: 252 seconds]
sepp2k has joined #ocaml
sailorswift has joined #ocaml
antkong has quit [Quit: antkong]
ryanartecona has joined #ocaml
native_killer_ has quit [Ping timeout: 246 seconds]
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jimmyjay has joined #ocaml
<jimmyjay> Error: This expression has type ('a -> 'b -> 'c -> 'd) -> ('a -> 'b -> 'c -> 'd) -> int * (basil * int) list but an expression was expected of type 'a
<jimmyjay> what flag can i disable to allow this little tricksy shit
AltGr has left #ocaml [#ocaml]
<ggole> Wat
<Drup> jimmyjay: what kind of code do you want to allow ?
<jimmyjay> that particular type, just force ocaml to reoconcile 'a
dongcarl has quit [Quit: Leaving...]
<asmanur> -rectypes?
<jimmyjay> cool that's what i need
native_killer_ has joined #ocaml
<Drup> probably -rectypes, yeah
<Drup> You should probably read the documentation about it, it's a bit weird
BitPuffin has quit [Disconnected by services]
itPuffinB has joined #ocaml
itPuffinB is now known as BitPuffin
<jimmyjay> oh dear lordy
<jimmyjay> |Error: This expression has type (('a -> ('b -> int * (basil * int) list as 'c) -> (int -> int * (basil * int) list) -> int * (basil * int) list as 'b) -> 'b -> int * (basil * int) list as 'a) -> 'c -> (int -> 'b) -> int * (basil * int) list but an expression was expected of type 'b
<ggole> Progress!
<ggole> Time to annotate some things, I would say
tennix has joined #ocaml
<jimmyjay> i'm trying to define a self interpreter for lambda calculus, it is only 20 lines of code
<asmanur> I think mint would be more appropriate then.
slash^ has joined #ocaml
Haudegen has quit [Remote host closed the connection]
kushal has quit [Quit: Leaving]
zpe has quit [Ping timeout: 245 seconds]
zpe has joined #ocaml
_andre has quit [Ping timeout: 250 seconds]
Haudegen has joined #ocaml
kolko has quit [Ping timeout: 255 seconds]
Haudegen has quit [Ping timeout: 252 seconds]
native_killer_ has quit [Read error: Connection reset by peer]
ChristopheT has joined #ocaml
Haudegen has joined #ocaml
jimmyjay has quit [Ping timeout: 246 seconds]
Haudegen has quit [Ping timeout: 246 seconds]
xet7 has joined #ocaml
<ChristopheT> In opam-lib, is there any reason why OpamRepositoryPath is not exported?
Haudegen has joined #ocaml
<Drup> ChristopheT: there is an #opam chan too, but AltGr is only around on japanese tz.
<Drup> so, you are better off asking on github
kolko has joined #ocaml
_andre has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
zpe has quit [Remote host closed the connection]
tnguyen has quit [Quit: tnguyen]
contempt has quit [Ping timeout: 246 seconds]
contempt has joined #ocaml
mahem1 has joined #ocaml
* mahem1 is wondering how one would generalize a memoize function that works for any amount of arguments passed to a function (Or having to pass function arguments as a tuple)
samrat has joined #ocaml
yomimono has joined #ocaml
<gasche> mahem1: let memo2 f = memo (fun x -> memo (fun y -> f x y))
tnguyen has joined #ocaml
tane has joined #ocaml
oscar_toro has quit [Ping timeout: 260 seconds]
ryanartecona has joined #ocaml
izaak has joined #ocaml
<mahem1> gasche: Ok, so one would need to manually create for each number of params? (i.e. memo3, memo4, memo5, etc)
<mahem1> But I guess you could create meme3 in terms of memo2, so that may simplify that process slightly.
kakadu has quit [Quit: Page closed]
MercurialAlchemi has joined #ocaml
keen_____ has joined #ocaml
<ggole> OCaml doesn't really support variadic functions
<Drup> as usual, you can cheat.
keen____ has quit [Ping timeout: 250 seconds]
<mahem1> ggole: I see.
<mahem1> Drup: Cheat?
<Drup> let ($) f x = memo f x
<Drup> let memo2 f x y = f $ x $ y
<asmanur> I don't see how it can work if mem uses a local hashtbl or a ref. would not be shared across calls
<octachron> you might also be able to use gadt to have something like two = S (S Z) and memo two (f: 'a -> 'b -> 'c)
octachron has quit [Quit: Leaving]
<gasche> indeed, this memo2 does not work
<gasche> and there is no need for GADTs here, just composing memo functions
<asmanur> gasche: but memoizing functions is a bit weird no?
tane has quit [Quit: Verlassend]
<mahem1> asmanur: So we would need to use nested hashtbls then? (One for x and a second nest for each y given an x)
<asmanur> yes, although if your memo is parametric, it seems way simpler to uses tuples..
<gasche> (gtg)
<mahem1> thamks, cya
mfp has quit [Read error: Connection reset by peer]
psy has joined #ocaml
psy has quit [Max SendQ exceeded]
psy has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
darkf has quit [Quit: Leaving]
jao has joined #ocaml
ryanartecona has joined #ocaml
ousado has quit [Changing host]
ousado has joined #ocaml
psy has quit [Disconnected by services]
tnguyen has quit [Quit: tnguyen]
psy_ has joined #ocaml
izaak has quit [Quit: izaak]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
nullcatxxx_ has quit [Client Quit]
tnguyen has joined #ocaml
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
martintrojer has quit [Read error: Connection reset by peer]
izaak has joined #ocaml
jwatzman|work has joined #ocaml
martintrojer has joined #ocaml
jeffmo has joined #ocaml
tennix has quit [Ping timeout: 256 seconds]
izaak has quit [Ping timeout: 265 seconds]
lewis1711 has quit [Ping timeout: 250 seconds]
yomimono has quit [Ping timeout: 245 seconds]
tennix has joined #ocaml
tennix has joined #ocaml
BitPuffin has quit [Disconnected by services]
tennix has quit [Ping timeout: 250 seconds]
itPuffinB has joined #ocaml
itPuffinB is now known as BitPuffin
jao has quit [Ping timeout: 255 seconds]
izaak has joined #ocaml
tennix has joined #ocaml
tennix has joined #ocaml
tennix has quit [Ping timeout: 250 seconds]
ygrek has joined #ocaml
tennix has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
Haudegen has quit [Ping timeout: 250 seconds]
tennix has quit [Ping timeout: 260 seconds]
MrScout has joined #ocaml
tennix has joined #ocaml
tennix has joined #ocaml
BitPuffin has quit [Ping timeout: 244 seconds]
tane has joined #ocaml
OnkV has joined #ocaml
ChristopheT has quit [Ping timeout: 244 seconds]
ryanartecona has joined #ocaml
alpen has quit [Ping timeout: 244 seconds]
mort___ has quit [Ping timeout: 246 seconds]
lordkryss has joined #ocaml
creichert has quit [Read error: Connection reset by peer]
swgillespie has joined #ocaml
tennix has quit [Ping timeout: 264 seconds]
jao has joined #ocaml
tennix has joined #ocaml
kushal has joined #ocaml
tennix has quit [Ping timeout: 260 seconds]
kakadu has joined #ocaml
tennix has joined #ocaml
tennix has joined #ocaml
tennix has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tennix has joined #ocaml
zpe has joined #ocaml
tennix has quit [Ping timeout: 240 seconds]
izaak has quit [Quit: izaak]
swgillespie has joined #ocaml
^elyse^ has joined #ocaml
tennix has joined #ocaml
zpe has quit [Remote host closed the connection]
tennix has quit [Ping timeout: 245 seconds]
zpe has joined #ocaml
zpe_ has joined #ocaml
tennix has joined #ocaml
zpe_ has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 246 seconds]
tennix has quit [Ping timeout: 260 seconds]
izaak has joined #ocaml
tennix has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
mea-culp` has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
mea-culpa has quit [Ping timeout: 240 seconds]
tennix has quit [Ping timeout: 265 seconds]
tennix has joined #ocaml
tennix has quit [Changing host]
tennix has joined #ocaml
ggole has quit []
tennix has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Ping timeout: 244 seconds]
tennix has joined #ocaml
tennix has joined #ocaml
slicefd has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tennix has quit [Ping timeout: 265 seconds]
shinnya has joined #ocaml
^elyse^ has quit [Quit: Leaving...]
tennix has joined #ocaml
tennix has quit [Ping timeout: 255 seconds]
<MercurialAlchemi> Ok, so you can use gadt to hide type parameters?
<MercurialAlchemi> that's crazy
<companion_cube> yep
<companion_cube> existential types rule
tennix has joined #ocaml
tennix has joined #ocaml
octachron has joined #ocaml
<MercurialAlchemi> I see that it gives a <poly> signature
<MercurialAlchemi> interesting
<MercurialAlchemi> I need to learn type theory one of these days
swgillespie has joined #ocaml
psy_ has quit [Remote host closed the connection]
samrat has quit [Ping timeout: 240 seconds]
rand000_ has quit [Quit: leaving]
tennix has quit [Ping timeout: 260 seconds]
matason has quit []
claudiuc has quit [Ping timeout: 244 seconds]
contempt has quit [Disconnected by services]
contempt has joined #ocaml
tennix has joined #ocaml
tennix has joined #ocaml
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ocaml
tennix has quit [Ping timeout: 272 seconds]
tennix has joined #ocaml
tennix has joined #ocaml
tennix has quit [Ping timeout: 246 seconds]
claudiuc has joined #ocaml
kushal has quit [Ping timeout: 272 seconds]
ygrek has quit [Ping timeout: 240 seconds]
sh0t has quit [Ping timeout: 250 seconds]
tennix has joined #ocaml
tennix has quit [Ping timeout: 272 seconds]
tennix has joined #ocaml
octachron has quit [Quit: Leaving]
^elyse^ has joined #ocaml
tennix has quit [Ping timeout: 260 seconds]
tennix has joined #ocaml
mea-culp` is now known as mea-culpa
kushal has joined #ocaml
tennix has quit [Ping timeout: 260 seconds]
slicefd has quit [Quit: Leaving]
MrScout_ has joined #ocaml
tennix has joined #ocaml
tnguyen has quit [Quit: tnguyen]
jwatzman2 has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
claudiuc_ has joined #ocaml
jwatzman|work has quit [Disconnected by services]
jwatzman2 is now known as jwatzman|work
jwatzman|work has quit [Changing host]
jwatzman|work has joined #ocaml
MrScout has quit [Ping timeout: 244 seconds]
claudiuc has quit [Ping timeout: 246 seconds]
ryanartecona has joined #ocaml
tennix has quit [Ping timeout: 272 seconds]
bbc has quit [Quit: ZNC - http://znc.in]
tennix has joined #ocaml
bbc has joined #ocaml
kushal has quit [Quit: Leaving]
kushal has joined #ocaml
xificurC has quit [Ping timeout: 240 seconds]
dongcarl has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
sepp2k has quit [Quit: Leaving.]
dongcarl has quit [Remote host closed the connection]
dongcarl has joined #ocaml
dongcarl has quit [Client Quit]
tennix has joined #ocaml
<flux> nooooo, new syntax extension mechanism for ocaml: http://www.lpw25.net/ocaml2015-abs1.pdf ;-)
tennix has quit [Ping timeout: 272 seconds]
mfp has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
ygrek has joined #ocaml
<Drup> flux: to be fair, it's very good
<companion_cube> what, macros? it's not really the same, is it?
<Drup> it's basically "metaocaml used for macros"
<companion_cube> you're not going to write ppx_deriving with that, I think
<Drup> companion_cube: well, if fills a similar niche.
<Drup> no, you're not
tennix has joined #ocaml
tennix has joined #ocaml
<companion_cube> so it's not the same niche
<companion_cube> I feel macros are more a competition to flambda
ollehar has joined #ocaml
<flux> I suppose macros is simpler than MetaOCaml. does it have higher chance of being integrated? of course, this is very early to be talking about such things..
<Maelan> Why “nooooo”?
<flux> maelan, it was a jab at ocaml's rocky metaprogramming history
ryanartecona has quit [Quit: ryanartecona]
<companion_cube> well first it needs be implemented :)
<flux> oh, so it's not?-)
<companion_cube> I don't think so
tennix has quit [Ping timeout: 255 seconds]
<flux> in any case, does this give any expressive advantage?
<flux> it seems like a milder version of MetaOCaml
tane has quit [Quit: Verlassend]
tennix has joined #ocaml
tennix has quit [Changing host]
tennix has joined #ocaml
<flux> that is, it doesn't compile at runtime
<Drup> it's not milder
<Drup> okay, imagine usual compilation is phase 0
<companion_cube> flux: it runs at compile time
<companion_cube> much more interesting :)
<Drup> MetaOcaml gives you access to phases *after* the compilation
<flux> companion_cube, well, that's what I said?-)
<Drup> macros gives you access to phases *before* the compilation
<Drup> it's not milder
<Drup> it's just the other direction
<companion_cube> it's different, but I'm more interested in macros
<companion_cube> and flambda
<companion_cube> :p
<flux> but it's still type safe, and whether you do it (say) at the beginning of the program or during compile time doesn't really give a great difference in the way the program is written?
<flux> you could write mostly the same things in both and it would work, except in metaocaml it would work even in cases where it doesn't work with macros?
<flux> or, alternatively you could optimize some metaocaml invocations to macros-like functionality?
<Drup> except the semantic is completely different
<Drup> and optimizations ca change the semantic are usually not a great idea, so as well extend the concept instead of just trying to do compiler magic
tennix has quit [Ping timeout: 250 seconds]
antkong has joined #ocaml
kushal has quit [Ping timeout: 246 seconds]
izaak has quit [Quit: izaak]
tennix has joined #ocaml
tennix has quit [Changing host]
tennix has joined #ocaml
<Drup> that can*
tennix has quit [Ping timeout: 265 seconds]
<companion_cube> I wish ocaml had effects :/
<flux> so I guess as macros cannot refer to non-macros, it means that they cannot do (say) IO?
<companion_cube> I think so
tennix has joined #ocaml
<companion_cube> they should be pure and terminating anyway
<flux> and as mentioned, they cannot produce new types or new modules (though they of course make function implementations)
<flux> so I'm a bit drawing a blank what use are they, except for performance optimizations in some rare cases?
<companion_cube> I guess performance optimizations too
<flux> and the performance benefitting cases would be more rare than they are for MetaOCaml.
<flux> companion_cube, so what else?
<companion_cube> I don't know
<companion_cube> I think flambda might be far enough for me
<companion_cube> if it's predictable/controllable enough
<flux> and able?
ollehar has quit [Ping timeout: 252 seconds]
tennix has quit [Ping timeout: 244 seconds]
<companion_cube> it looks very able, from what I could gather from Pierre :)
tennix has joined #ocaml
tennix has joined #ocaml
<companion_cube> so I was discussing dependent types for imperative languages with a friend, and we wondered whether separation logic was required
tennix has quit [Ping timeout: 260 seconds]
kushal has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
sunnymilk has joined #ocaml
<sunnymilk> is it true that ocaml doesnt support parallelism?
<sunnymilk> ie, i cant run two threads simultaneously
<flux> yes, ocaml doesn't support threading where more than 1 thread is running ocaml code at the same time
<flux> though there is promising work being done on that end at the moment, but who can say anything about the future.
<sunnymilk> ah okay thank you
kushal has quit [Read error: Connection reset by peer]
<flux> the traditional way around that is to use multiprocessing. you can easily serialize and deserialize ocaml data structures for that purpose, including functions when the sending and receiving parts are instances of the same program
tennix has joined #ocaml
tennix has quit [Changing host]
tennix has joined #ocaml
kakadu has quit [Remote host closed the connection]
<companion_cube> wow, mezzo is quite impressive... I'm reading slides again, and it's nice
<companion_cube> types changing after each expression must not be easy to deal with
tennix has quit [Ping timeout: 250 seconds]
<mfp> flux: doesn't 2.3 do exactly that? (re: "so I guess as macros cannot refer to non-macros, it means that they cannot do (say) IO?")
<mfp> "a second source of compile-time functions comes from importing compiled modules during compilation, making their values available for use in macros"
<flux> ok, so it would be able to, say, load and decode a JPEG file right into a value at compile time?
ollehar has joined #ocaml
<flux> if there are no limits to what a .cmo can contain, then it would look like that, yes
<mfp> seems so
struktured has joined #ocaml
<flux> so you could have: let asset1 = $(load_jpeg "foo.jpg")
<flux> that would be slightly cooler than having a separate program to generate the .ml for you during the build process
<flux> let git_version = $(eval "git ...") (* more practical example *) ;-)
<flux> s/eval/system/
<mfp> I'm trying to think of some use of macros to generate first-class modules...
<flux> well, it's not really different from just creating a bunch of functions with preknown names
<mfp> ... carrying types
<flux> ...that conform to a predefined module type?
<mfp> yes they'd have to be abstract or hidden behind an existential type (which amounts to "sealing" the module)
<mfp> what about pgocaml-like uses?
<Drup> mfp: that would amount to the F# thingy that allows to plug types from an external source
<mfp> yup, type providers is exactly what I had in mind :P
<Drup> I'm not fond of the feature, tbh
mea-culpa has quit [Read error: Connection reset by peer]
<Drup> (just as I don't like pgocaml's feature to type check again a live database)
<Drup> against*
<Drup> but yeah, you could do numerous things with macros that amount to that
<mfp> huh -k foo.cmo there's no way to escape OCaml's build system curse
<Drup> ^^
<mfp> will pragmas land in OCaml ~ 6?
ollehar has quit [Ping timeout: 260 seconds]
<Drup> I seriously doubt so
<Drup> Especially since you can pretty much already do pragma with ppx
jwatzman|work has joined #ocaml
<mfp> huh implicit -ppx pragma and then [%pragma foo bar baz] and N-pass ppx haha :/
<Drup> or a whole custom frontend
izaak has joined #ocaml
MrScout_ has quit [Remote host closed the connection]
Simn has quit [Read error: Connection reset by peer]
creichert has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
<Algebr``> Is there a way to catch this raised exception besides using _? let this_func () = let module Foo = struct type exn += Hidden of string end in print_endline "done"; raise (Foo.Hidden "wow")
<Algebr``>
^elyse^ has quit [Quit: Leaving...]
<Drup> nope
<Algebr``> Why? Isn't the += adding Hidden to the type exn?
<Algebr``> rather extending
<Drup> yes, it's adding a new constructor
<Drup> whic you don't export out of the "this_func" function
<Drup> so you have no way to pattern match on it
tennix has joined #ocaml
tennix has joined #ocaml