milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
talzeus has joined #ocaml
ygrek has joined #ocaml
mfp has quit [Ping timeout: 269 seconds]
walter has joined #ocaml
yacks has joined #ocaml
osa1_ has joined #ocaml
osa1_ has quit [Client Quit]
osa1 has quit [Read error: Connection reset by peer]
walter has quit [Ping timeout: 260 seconds]
gnuvince has joined #ocaml
gnuvince has quit [Changing host]
gnuvince has joined #ocaml
shinnya has joined #ocaml
Drup has quit [Quit: Leaving.]
yacks has quit [Read error: Operation timed out]
gnuvince has quit [Remote host closed the connection]
gnuvince has joined #ocaml
gnuvince has quit [Changing host]
gnuvince has joined #ocaml
Myk267 has joined #ocaml
zpe has joined #ocaml
csakatoku has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
yacks has joined #ocaml
shinnya has quit [Ping timeout: 264 seconds]
dnm has joined #ocaml
gnuvince- has joined #ocaml
gnuvince has quit [Disconnected by services]
gnuvince- has quit [Changing host]
gnuvince- has joined #ocaml
gnuvince- is now known as gnuvince
ihm1 has joined #ocaml
zRecursive has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
ben_zen has quit [Ping timeout: 256 seconds]
ihm1 has quit [Quit: ihm1]
zpe has joined #ocaml
pango has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
dtg_ has quit [Ping timeout: 246 seconds]
dtg has joined #ocaml
zRecursive has joined #ocaml
LeNsTR has quit [Changing host]
LeNsTR has joined #ocaml
cdidd has quit [Ping timeout: 268 seconds]
LeNsTR is now known as lenstr
cdidd has joined #ocaml
<adrien>
morning
breakds has quit [Quit: Konversation terminated!]
lusory has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
orbitz_ has quit [Quit: Reconnecting]
orbitz has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 264 seconds]
lusory has joined #ocaml
Snark has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
weie_ has joined #ocaml
weie has quit [Ping timeout: 264 seconds]
q66 has joined #ocaml
ttamttam has joined #ocaml
skchrko has quit [Quit: Leaving]
bondar has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
ontologiae has joined #ocaml
skunkwerks is now known as dch
ttm is now known as The_third_man
ygrek has joined #ocaml
zRecursive has left #ocaml []
skchrko has joined #ocaml
Simn has joined #ocaml
ontologiae has quit [Ping timeout: 248 seconds]
cago has joined #ocaml
darkf has quit [Quit: Leaving]
djcoin has joined #ocaml
Neros has quit [Ping timeout: 264 seconds]
hyperboreean has quit [Ping timeout: 264 seconds]
rwmjones has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
zpe has quit [Read error: No route to host]
zpe has joined #ocaml
ben_zen has joined #ocaml
testcocoon has quit [Ping timeout: 245 seconds]
Kakadu has joined #ocaml
ben_zen has quit [Ping timeout: 256 seconds]
rwmjones has joined #ocaml
mort___ has joined #ocaml
mika1 has joined #ocaml
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
Neros has joined #ocaml
ggole has joined #ocaml
ontologiae has joined #ocaml
berenger_ has joined #ocaml
<berenger_>
hi
<rks`>
hello
<companion_cube>
world
<Kakadu>
salut
ontologiae has quit [Ping timeout: 248 seconds]
Neros has quit [Ping timeout: 245 seconds]
mfp has joined #ocaml
dsheets has joined #ocaml
jdoles has quit [Read error: Operation timed out]
jdoles has joined #ocaml
ttamttam1 has joined #ocaml
ttamttam2 has joined #ocaml
ollehar has joined #ocaml
ttamttam has quit [Ping timeout: 276 seconds]
Yoric has joined #ocaml
ttamttam1 has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
chambart has joined #ocaml
Neros has joined #ocaml
zarul has quit [Ping timeout: 260 seconds]
Neros has quit [Ping timeout: 245 seconds]
thomasga has quit [Quit: Leaving.]
chambart has quit [Ping timeout: 260 seconds]
ygrek has quit [Ping timeout: 260 seconds]
Kakadu has quit []
zRecursive has joined #ocaml
Kakadu has joined #ocaml
ben_zen has joined #ocaml
ygrek has joined #ocaml
csakatok_ has quit [Remote host closed the connection]
n06rin has joined #ocaml
Neros has joined #ocaml
zRecursive has left #ocaml []
talzeus has quit [Remote host closed the connection]
talzeus has joined #ocaml
ben_zen has quit [Ping timeout: 256 seconds]
talzeus has quit [Remote host closed the connection]
_andre has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
skchrko has quit [Ping timeout: 245 seconds]
zarul has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
skchrko has joined #ocaml
n06rin has quit [Quit: Leaving.]
demonimin_ has joined #ocaml
demonimin has quit [Ping timeout: 264 seconds]
talzeus has joined #ocaml
dch is now known as skunkwerks
walter has joined #ocaml
talzeus_ has joined #ocaml
talzeus has quit [Ping timeout: 240 seconds]
iZsh has quit [Excess Flood]
iZsh has joined #ocaml
breakds has joined #ocaml
breakds has quit [Remote host closed the connection]
cago has quit [Quit: Leaving.]
lusory has quit [Ping timeout: 240 seconds]
bondar has quit []
cago has joined #ocaml
cago has quit [Client Quit]
n06rin has joined #ocaml
cago has joined #ocaml
saml has joined #ocaml
paddymahoney has quit [Remote host closed the connection]
cago has quit [Quit: Leaving.]
cago has joined #ocaml
skchrko has quit [Quit: Leaving]
gnuvince has quit [Ping timeout: 245 seconds]
mika1 has quit [Quit: Leaving.]
cago has quit [Quit: Leaving.]
cago has joined #ocaml
paddymahoney has joined #ocaml
walter has quit [Ping timeout: 245 seconds]
cago has quit [Quit: Leaving.]
ontologiae has joined #ocaml
thomasga has joined #ocaml
shinnya has joined #ocaml
AdmWiggin is now known as tianon
bondar has joined #ocaml
ttamttam2 has quit [Quit: ttamttam2]
testcocoon has joined #ocaml
thomasga has quit [Quit: Leaving.]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
thomasga has joined #ocaml
mort___ has quit [Ping timeout: 276 seconds]
balouis has left #ocaml []
thomasga has quit [Quit: Leaving.]
ontologiae has quit [Ping timeout: 260 seconds]
<ollehar>
using ocamlnet, can I print out my current working dir?
<adrien_oww>
why ocamlnet? you have Sys.getcwd
<ollehar>
adrien_oww: thanks, will try that
Yoric has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
bondar has quit [Ping timeout: 245 seconds]
chambart has joined #ocaml
ontologiae has joined #ocaml
n06rin has quit [Quit: Leaving.]
dnm has quit [Ping timeout: 256 seconds]
ulfdoz has joined #ocaml
Drup has joined #ocaml
watermind has joined #ocaml
thomasga has quit [Quit: Leaving.]
Kakadu has quit []
ontologiae has quit [Ping timeout: 264 seconds]
chambart has quit [Ping timeout: 245 seconds]
ygrek has quit [Ping timeout: 256 seconds]
ontologiae has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<watermind>
is there anything similar to Haskell's print, which just prints any value that it knows how to print?
<watermind>
or is the standard way to print a value, to use a printf?
<pippijn>
watermind: no
<pippijn>
watermind: haskell has type classes, which enable print overloading
<pippijn>
watermind: ocaml has various modules (sexplib, deriving-ocsigen, ...) that allow you to inspect data
<watermind>
pippijn: yes I understand, but in theory equality also does and one gets away with it in ocaml
<pippijn>
no
<pippijn>
equality is very simple
ollehar has quit [Ping timeout: 245 seconds]
<pippijn>
it just compares the complete memory (graph) structure starting at some point
<ggole>
Polymorphic equality is also problematic: you can get infloops and exceptions quite easily.
<pippijn>
huh?
<pippijn>
in ocaml?
<ggole>
Yep
<watermind>
pippijn: and testing equality in a function returns an exception
<pippijn>
ggole: you mean comparing functional values?
<pippijn>
how do you get infloops?
<ggole>
Circular structures.
<pippijn>
really?
<pippijn>
I thought it would work
<Qrntz>
I always thought it produced an error on circular structures
<Qrntz>
well, structural equality anyway
<pippijn>
why doesn't it just work?
* Qrntz
shrugs
<pippijn>
you just need to keep track of what you already compared
<ggole>
You can either run out of stack or infloop
<pippijn>
sure, running out of stack is possible (though you could implement it so that you can run out of heap)
<watermind>
pippijn: this is also SML has type variables of the form ''a aside from 'a
zpe has quit [Ping timeout: 248 seconds]
<watermind>
pippijn: these are polymorphic types with equality (a sort harcoded class)
<ggole>
Keeping track means equality runs slower and takes memory
<pippijn>
ok
<pippijn>
ggole: fine :) I guess it's not worth it
<pippijn>
type classes are also slow
<watermind>
type classes are just syntactic sugar for an extra implicit dictionary argument
<pippijn>
slow(er)
<pippijn>
yes
<pippijn>
and deriving-ocsigen and sexplib both have their ways of implementing that
<watermind>
they are slow but much of it can be specialized at compile time
<pippijn>
deriving does it with modules
<pippijn>
sexplib with functions
<watermind>
haven't looked into sexplib yet :/
<watermind>
todo list
<pippijn>
I like sexplib
<pippijn>
because it's bijective
<pippijn>
deriving (Show) is one way
<watermind>
right
<adrien>
kerneis: hi, for cross-compilation, we should install i686-w64-mingw32-ocamlopt(.opt)? I'm not sure how the patches implement it but OCaml will only install the compilers but not target-specific ocamldoc, camlp4 and ocamlbuild
<watermind>
so, really basic question, typically how do you print a list? was looking at printf but didn't find a flag for it
<pippijn>
watermind: yeah
<pippijn>
I don't know
<pippijn>
I always made my own ad-hoc one
<watermind>
right
<pippijn>
I should put it in my ExtList module..
<adrien>
kerneis: let me know if that's an issue (but I'd really prefer to not install an additional "camlp4"; there's a requirement that the native compiler and the cross-compiling one are the exact same version)
<watermind>
I'm using core... I'll try to find something there
djcoin has quit [Quit: WeeChat 0.4.0]
tane has joined #ocaml
Anarchos has joined #ocaml
Drup has quit [Ping timeout: 248 seconds]
dnm has joined #ocaml
<def-lkb>
watermind: i make two functions, one for printing a value, the other for parametric list printing (generally, just inserting commas) then use the "%a" flag of Printf
<def-lkb>
you may also be interested in the %t flag
<watermind>
def-lkb: oh interesting
BiDOrD has joined #ocaml
ollehar has joined #ocaml
<watermind>
when performing matches with more than one argument it is considered better style to do match x , y with than match (x,y) with right?
ontologiae has quit [Ping timeout: 248 seconds]
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
<mrvn>
I always () tuples.
<watermind>
right
ollehar has quit [Ping timeout: 240 seconds]
ollehar has joined #ocaml
<pippijn>
I don't have a strong feeling either way, yet
<pippijn>
() is probably cleaner, but I omit them all the time
<watermind>
right
<watermind>
thanks mrvn, pippijn
<adrien>
I don't do it for match ... with
<adrien>
but because it's not ambiguous
<adrien>
to the reader I mean
<companion_cube>
I never (,) unless it's ambiguous :p
<adrien>
in every other place, I use it
<pippijn>
I'm like companion_cube
<adrien>
watermind: you should look at the revised syntax btw
<adrien>
not necessarily to use it but to read about some possible changes and some reasons behind them
<watermind>
that was my thought process with ommiting it within with
<watermind>
adrien: I thought the revised syntax was just to showcase the capabilities of camlp4/5
dsheets has quit [Ping timeout: 256 seconds]
<watermind>
adrien: I wasn't crazy about some of the changes, e.g. lists
asmanur has quit [Ping timeout: 264 seconds]
<watermind>
to me having [x::y] mean x::y is extremely confusing
<watermind>
how would one denote, well, what is now [x::y]?
<pippijn>
[[x::y]] maybe
<adrien>
the revised syntax hasn't really taken off
<adrien>
few use it
<pippijn>
I only know camlp4 uses it
<pippijn>
that's it
<adrien>
as far as I'm concerned, I'd like a middle-ground
<adrien>
or rather part of the original and part of the revised
<Qrntz>
some parts of it feel wrong
<Qrntz>
like the capitalized boolean values
<Qrntz>
some don't, though, like explicit sequences
<Qrntz>
a mix would be great
<watermind>
the one part I liked the most was the intention beyond the extra brackets in match
<ggole>
Prolog does lists that way
<watermind>
to avoid ambiguity with e.g. ;
<ggole>
It's quite annoying.
<watermind>
but I'd prefer an endmatch
<ggole>
(Although it's possible that I only think that because I'm used to the ML style.
<ggole>
)
<watermind>
well if we think of :: as being an operation then x::y makes more sense
<ggole>
It's just an infix constructor, so I don't see the need for enclosing []s.
<watermind>
exactly
jayprich has joined #ocaml
troydm has joined #ocaml
morolin has joined #ocaml
<mrvn>
[x::y] would be a list of list
<mrvn>
(x::y) would be more logical, like (1+2) * 3
<watermind>
is there some de-facto standard lib / tool for testing, similar to Haskell's Quickcheck? I've noticed there's at least an Quickcheck port to OCaml, but my first impression was that of just a small one person project
<companion_cube>
I think OUnit is more popular, but it's not really the same thing as quickcheck
<watermind>
I see
Simn has quit [Read error: Connection reset by peer]
<Anarchos>
companion_cube what does OUnit achieve ?
<companion_cube>
it's just unit testing
<ggole>
Unit tests.
<ggole>
I tend to just write a bunch of asserts.
<ggole>
Property based testing might be nice though.
<companion_cube>
OUnit makes it easier to format output, this kind of things
<companion_cube>
it's not ground breaking, but still nice
<ggole>
Yeah, catches exceptions for you too.
<ggole>
(For the cases where that's what you want.)
asmanur has joined #ocaml
gour has joined #ocaml
<Anarchos>
companion_cube and for code coverage ?
<companion_cube>
I'm not sure you can do it in OCaml
<companion_cube>
probably needs to instrument the bytecode
<gour>
evening
<companion_cube>
hi gour
<gour>
am i right that labltk project is only announced, git repo is empty?
<gour>
in his post the author complained only about one of his criteria: 4. Efficient storage reclamation
Yoric has joined #ocaml
<adrien>
I'll wait for the next iteration of parallel things
<adrien>
solutions rather
<adrien>
because until then, you're talking to people who complain about parallel support but who wouldn't write parallel code anyway
<mrvn>
then again from my tests ocaml uses half the memory perl does and a quarter of what python wastes.
<adrien>
so, when they can't complain anymore, we'll have gotten rid of half of the annoying people :)
<adrien>
gour: as for storage reclamation, I think people assume GC = slow
<mrvn>
adrien: a modern GC is equal to a modern malloc on a single core. Multicore things look different.
<gour>
adrien: only that?
<adrien>
yeah, pretty much
<adrien>
(to both :P )
<mrvn>
adrien: storage reclamation should also read resource reclamation. There is more than storage that you need to track.
Yoric has quit [Remote host closed the connection]
<gour>
ocaml is getting better or will receive some multi-core support?
<mrvn>
gour: there are at least 2 projects for it in usable state.
<companion_cube>
ocamlpro is working on a multi-runtime OCaml
<companion_cube>
I assume the other project is at ocamllabs?
<rks`>
yes
<gour>
i saw about ocamlpro's work in news
<gour>
so, one of the big(gest) complain about ocaml will go away soon (or later)?
Yoric has joined #ocaml
<Kakadu>
Can I write `cd` in opam file?
<Kakadu>
is this command supported?
<mrvn>
gour: I would be happy with a framework for explicit vectorization of small code fragments.
<gour>
mrvn: uhh
* gour
is thinking about (possibly) more general stuff like unicode support, GUI bindings etc.
<Anarchos>
gour i made a gui binding
<mrvn>
gour: well, that has nothing to do with multi-core support
<Anarchos>
it is easy even if ocaml is single threaded
<companion_cube>
I'd rather have monocore performance improvements
<mrvn>
Anarchos: ocaml is multithreaded
<gour>
right, but those falls in the 'missing' category
<gour>
Anarchos: for which toolkit?
<Anarchos>
mrvn hmmm can you say more ?
<Anarchos>
gour the Haiku API
<gour>
ohh, that exotic forl of beos :-)
<Anarchos>
gour not fork, but reimplementation, as Haiku folks never used beos code.
<mrvn>
Anarchos: ocaml has a Thread module that lets you create threads as much as you wish. They just can't run ocaml code concurrently.
<gour>
Anarchos: i stand corrected ;)
<mrvn>
Anarchos: same thing as python
<Anarchos>
mrvn ok i say multithread but not concurrent (sorry for the wrong word, in french we use both for the same things which is rather confusing)
<rks`>
Anarchos: no we don't.
<Anarchos>
rks` shhhhhhhh keep quiet :)
<rks`>
(and you meant to say "in france")
<companion_cube>
people speak french outside of France
<mrvn>
Most people use multithreading to do IO without blocking everything. And for that ocamls Thread module works just fine.
<watermind>
so in OCaml the proper way to say, map a list, is by making it tail recursive
<mrvn>
watermind: The proper way to map a list is List.map
<watermind>
first pass returns aninverted mapped list, then we revert that
<companion_cube>
mrvn: unless the list is too long
<watermind>
mrvn: yes I'm talking about the List.map implementation
<pippijn>
BatList.map is tail-recursive through mutation
<watermind>
at least as it is in Core
<mrvn>
If the list is realy long then you use batteries BatList.map
<gour>
is anyone familiar with both OCaml and Ada can shed some comparison'cause I'm still looking at the latter?
<watermind>
gour: they're completely different
<gour>
watermind: well, language-wise they did, but wonder about suitability to write real-world gui app with them
<watermind>
I get why the accumulator 2 pass strategy makes sense (to save stack)
<companion_cube>
I don't really understand the author of the blog post "deal breakers"
<watermind>
gour: I don't thing either is what you want
<mrvn>
watermind: wastes ram and cpu though
<companion_cube>
C++ has most of his so called deal breakers
<watermind>
mrvn: why ram?
<gour>
watermind: like, performance, ecosystem, general support etc.
<companion_cube>
if you need really long lists that you need to keep in the same order, better re-think your requirements
<companion_cube>
otherwise List.rev_map is fine
<mrvn>
watermind: because you create the list backwards and then again when you reverse it
<watermind>
mrvn: eh of course you're right
<gour>
watermind: so, what do you recommend? C(++)?
<mrvn>
companion_cube: obviously the author listed all the things wrong with C++ and then went on to show that no other language fixes them all.
<companion_cube>
heh
<companion_cube>
pretty accurate
<pippijn>
companion_cube: why rethink my requirements?
<watermind>
gour: I know nothing about GUI's, but ADA is geared towards critical software, and I don't know about OCaml library support for GUI's other than it does have some GTK stuff
<gour>
rust is close for him
<mrvn>
watermind: and gl and qt and sdl
<companion_cube>
pippijn: because a list may not be the best thing for your task
<watermind>
mrvn: right, like I said, I don't know much about it
<pippijn>
what would be better? arrays?
<companion_cube>
or some tree-ish thingy?
<companion_cube>
Do you really need to keep in the same order?
<pippijn>
yes
<companion_cube>
arf
<pippijn>
and the order is not alphabetic
<companion_cube>
arrays are probably more compact anyway
<pippijn>
or in any way defined by a ordering predicate
<mrvn>
pippijn: do you need to access the n-th element?
<pippijn>
no
<companion_cube>
a kind of B-tree would be nice
<mrvn>
pippijn: or check if something is in the list or insert things?
<mrvn>
pippijn: If you use any of the primitives taking O(n) time then look for a better structure
<gour>
watermind: yeah, but GTK is not suitable for anything except linux and seeing that GTK devs say GTK is for 'small apps only' makes me wonder whether i want gtk4
<companion_cube>
shameless self-advertising, probably not what you need actually
<pippijn>
mrvn: just map
<pippijn>
but I inlined map
<companion_cube>
but it looks like a good structure for this kind of things is needed
<mrvn>
pippijn: map is O(1) per element.
<pippijn>
yes
<pippijn>
actually I found this
<companion_cube>
something akin to ropes but for arrays
<mrvn>
O(n) total. Can't be better
<pippijn>
going from List.map (closure) to an inlined map with a recursive function
<pippijn>
gains 300% performance
<pippijn>
in my use case
<mrvn>
pippijn: closures are not inlined
<pippijn>
I know
<pippijn>
that's why I gain 300% performance :)
<mrvn>
that alone is probably the 300% you gain
<pippijn>
all the closure allocation is gone
<pippijn>
it's not about inlining
<pippijn>
function calls are cheap
<pippijn>
it's all the closure allocations
<gour>
anyone tried nimrod?
<mrvn>
pippijn: do you apply the closure fully?
<pippijn>
I compiled with -inline 0
<watermind>
pippijn: what is an inlined map with a recursive function?
<companion_cube>
gour: I looked at it a bit, it's quite nice for an imperative language
<watermind>
pippijn: not sure if I'm following
<companion_cube>
pippijn: why do you disable inlining?
<pippijn>
mrvn: let do_it a b c = List.map (fun elt -> let foo = something a elt in bla c foo) b
<rks`>
pippijn: -inline 0 doesn't mean no inlining, you might be surprised :)
<mrvn>
watermind: let rec mymap = function [] -> [] | x::xs -> (f x)::(mymap xs)
<pippijn>
companion_cube: for profiling
<gour>
is ocaml compiler still performant as it used to be or losing some ground in comparison with C(++)?
<pippijn>
enabling inlining gains about 14%
<pippijn>
or let me check.. I wrote it down
<companion_cube>
gour: it's probably not as efficient as good C++
<watermind>
mrvn: ah right so the usual map implementation but inlined in the function and using an f in scope
<watermind>
shouldn't the compiler be able to optimize that?
<mrvn>
watermind: eliminating the closure
<pippijn>
Disabling OCaml runtime bounds checking in the arrays gained just about 3%. Approximately 8% can be gained
<pippijn>
from using the inlining option in the OCaml native compiler. A larger difference can be achieved by tuning the
<pippijn>
OCaml garbage collector. Choosing an appropriate size for the minor heap, in which young objects are kept, so
<pippijn>
that all temporary lists that are created and discarded in every iteration can fit in it, can drastically improve
<pippijn>
performance. Experimental results show up to 34% improvement for small expressions with a minor heap size
<pippijn>
of between 8 and 32 kilobytes.
<pippijn>
oops
<gour>
companion_cube: i read that it was very close to C(++), but in the language shootout i see that eg. Ada's gant is mostly better, although i'm aware o benchmark's metric
<watermind>
mrvn: in some map implementations they do precisely this, they make a subfunction that doesn't call the f
<watermind>
mrvn: wouldn't that change to the implementation of map be enough?
<companion_cube>
gour: small benchmarks are not very representative imho
<mrvn>
watermind: you can't do that in a map implementation since that always gets a closure.
<pippijn>
mrvn: the closure is formed from capturing the lexical environment
<pippijn>
*not* doing that, by always passing all the captured variables down to the (tail-)recursive call, speeds up my use case by 300%
<pippijn>
and now I'm thinking of writing an AST transformation in camlp4 or with the now -ppx
<pippijn>
that does exactly this :)
<watermind>
mrvn: I guess so, but since that closure is never passed as an argument within the map function, I thought maybe it could be optimised away
<watermind>
mrvn: if the map call is inlined should be an easy optimisation no?
<pippijn>
s/now/new/
<mrvn>
watermind: the closure is still there and not inlined
<ggole>
How could it be optimised away? Map assumes that its function argument is in the standard representation, ie, a closure.
<watermind>
mrvn: maybe I don't know which closure we're talking about... it's the closure for ~f, the argument of map, right?
<mrvn>
watermind: yes
<ggole>
You could allocate the closure on the stack, maybe
<ggole>
Or do some strange inter-procedural register allocation to stash the environment for f in registers that List.map happens not to touch
<watermind>
mrvn: I don't get why it must be there... give me a second... let me write something
<mrvn>
you need to inline the closure so it can be optimized away
pkrnj has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
ggole has quit []
chambart has joined #ocaml
BiDOrD has quit [Read error: Connection reset by peer]
<mrvn>
pippijn: afaik you can't do AST transformations after the inlining.
<pippijn>
mrvn: but you can inline AST fragments
<pippijn>
menhir does that on its generated code before emitting
<mrvn>
pippijn: How do you inline List.map from camlp4?
<adrien>
wmeyer: ah, OK
<pippijn>
you'd definitely want to be conservative in deciding eligibility
<adrien>
wmeyer: well, at least there's nothing like that planned for other tools? :P
<pippijn>
mrvn: well
<pippijn>
mrvn: in theory, you wouldn't
<wmeyer>
yes, there are some plans to split the distro
<mrvn>
pippijn: obviously doing those optimizations would be nice. But you would have to do that in the ocaml compiler I believe.
<pippijn>
mrvn: ocaml{c,opt} could do it, if it also stored the AST in .cmo/.cmx
<pippijn>
alternatively, it could be done on the IR
<pippijn>
I don't know how much is actually in that IR
<pippijn>
whether there is enough code in the cmx to do that
<pippijn>
and enough information about the code
<pippijn>
but you could do the transformation for local functions
tani has joined #ocaml
<pippijn>
and you can hard-code an AST version of List.map into the tool
<pippijn>
as a proof of concept, it would be enough
testcocoon has quit [Ping timeout: 245 seconds]
<pippijn>
I think I'll do this after my master's thesis
BiDOrD has joined #ocaml
<pippijn>
maybe on -ppx
<pippijn>
and using compiler libs to do some of the work
<pippijn>
like scope binding
<Anarchos>
pippijn i learnt a lot reading the management of scope in coq
<watermind>
pippijn: yeap
tane has quit [Ping timeout: 245 seconds]
<adrien>
wmeyer: could such things be made public? (these plans and any other that might exist besides the world domination ones)
<pippijn>
wmeyer: may I suggest something to you?
<adrien>
it'd really help some contributions (not necessarily mine) by driving them in the right direction
testcocoon has joined #ocaml
<wmeyer>
adrien: I'd hesistate, as it's just a discussion, and the small users like we are not that affected, if they use OPAM.
<wmeyer>
adrien: I am open!
<wmeyer>
We really like contributions
<pippijn>
ok, never mind then
Yoric has joined #ocaml
<wmeyer>
pippijn: what you are cooking in camlp4
<pippijn>
nothing
j0sh has quit [Ping timeout: 260 seconds]
<pippijn>
I was optimising my code last week
j0sh has joined #ocaml
<wmeyer>
pippijn: I am still thinking how to turn K-framework to a compiler
<pippijn>
and I found that this transformation would be very useful
<pippijn>
and I think it's not hard
<wmeyer>
in form of Treematch
<pippijn>
yeah, I was going to suggest something about that
<adrien>
wmeyer: thing is that if someone starts a patch that goes against the discussion, well, it's wasted time
<wmeyer>
but I don't know how much time I will have for that :)
<wmeyer>
so it's still on my mind
<wmeyer>
adrien: we are conservative
<wmeyer>
we will not accept patches that hurt the quality of the code, or un-needed ones
<wmeyer>
in your case, I found that cross-compilation is damn useful
<wmeyer>
the problem is maintaibility :)
<adrien>
imagine I make a patch but everyone else has agreed to get the same result but differently because they've found an issue with the approach I've chosen
<adrien>
but I didn't know about that
<wmeyer>
my promise is that I can look into any of the patches, actaully many of them are committed, by Gabriel or Alan or me
<adrien>
and if someone wonders what he can do to help, seeing the big plans is a good thing
<wmeyer>
I will commit your cross compilation patches this week so you can sleep well :-)
csakatoku has joined #ocaml
<wmeyer>
to all concerned, the OCaml team is looking at the patches, but we are extremely careful for instance for the compiler patches. But runtime is also easy to break.
<wmeyer>
if that sounds encouraging
<Anarchos>
wmeyer we know we have a very dedicated inria team :)
<wmeyer>
yes, Anarchos, thanks for noting it
<adrien>
well, it was mentionned before; I think we would welcome a cwn for the private ML :)
<Anarchos>
wmeyer since 1996 i learnt caml light in "prépa" and i never stopped programming in ocaml :)
Yoric has quit [Ping timeout: 246 seconds]
<pippijn>
wmeyer: I might move to london in the next few months
<pippijn>
if I find work
<adrien>
never forget
<adrien>
they have no bread
<pippijn>
that's bad
<wmeyer>
pippijn: I would say, why not cambridge
<pippijn>
wmeyer: I might not move to london after all
<pippijn>
maybe cambridge
<wmeyer>
Caml labs?
<pippijn>
anyway, somewhere near london
<pippijn>
ocaml labs is jane street?
<wmeyer>
no
<wmeyer>
it's Cambridge University sponsored by JS
<pippijn>
oh
<pippijn>
maybe
ontologiae has joined #ocaml
<wmeyer>
adrien: yes, I agree
<wmeyer>
raising mantis issue, and forwarding it too the list
<wmeyer>
would be good
<wmeyer>
I don't know how to actually force people to look at mantis and find the problems there to fix
darkf has joined #ocaml
<Anarchos>
wmeyer promise them $2,56 ?
<wmeyer>
Anarchos: :-)
<def-lkb>
ola
<wmeyer>
def-lkb: hi
<Anarchos>
wmeyer or a full time job
<wmeyer>
well, we have it, OCaml labs
<Anarchos>
wmeyer as soon as my first order verifier is polished, i will consider funding my own business..
<wmeyer>
nice
<Anarchos>
wmeyer i never saw a verifier able to deal with the whole ZF theory , and with inputs in latex
<Anarchos>
wmeyer due to ocaml i think i will able to finish that
gour has quit [Quit: WeeChat 0.4.1]
<wmeyer>
good luck with it Anarchos :-)
<Anarchos>
wmeyer well the verifier is written
<Anarchos>
i just need to understand how to deal with ambiguous notations in latex
<wmeyer>
you are not sharing the source code I assume?
<Anarchos>
wmeyer sure i can
<wmeyer>
Anarchos: Latex is macro based
<wmeyer>
so it's not easy to parse it
<wmeyer>
ok, so is it open source?
<Anarchos>
wmeyer svn://78.224.15.127 if ever interested
<Anarchos>
wmeyer i have not decided yet for a licence, but i am open to share code here
<wmeyer>
ok, thanks
<Anarchos>
it is in real alpha state anyway
<Anarchos>
but i would be glad to have comments on it
Yoric has joined #ocaml
ulfdoz has quit [Ping timeout: 264 seconds]
ben_zen has joined #ocaml
Yoric has quit [Ping timeout: 240 seconds]
Kakadu has quit []
chambart has quit [Ping timeout: 246 seconds]
<kerneis>
adrien: I think it will be ok that way (ocaml-autoconf detects tools one at a time), but I'll keep your remark in mind, thanks
Anarchos has quit [Quit: 'night]
<kerneis>
adrien pippijn baking your own bread with a home bread machine is surprisingly easy
<kerneis>
that's how I survive here
chambart has joined #ocaml
<def-lkb>
kerneis: where are you?
<CissWit>
Hi, i have a makefile that generates dependencies automatically with ocamldep. I have a "src" directory which contains all my sources and a "build" directory where i generate all build files (cmo, cmx, etc). Is there an easy way to use ocamldep for this or am i stuck with my ugly "cd src; ocamldep *.ml *.mli | sed" ?
walter has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
csakatoku has quit [Remote host closed the connection]
<mrvn>
what is the sed for?
<CissWit>
to add the build directory when necessary
<mrvn>
oasis/ocamlbuild uses the same setup. maybe you can look there
gasche has quit [Ping timeout: 260 seconds]
tani has quit [Quit: Verlassend]
<wmeyer>
CissWit: just use ocamlbuild
gasche has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
lusory has joined #ocaml
<CissWit>
i'll have a look, thx
jayprich has quit [Ping timeout: 248 seconds]
csakatoku has joined #ocaml
pkrnj has quit [Quit: Computer has gone to sleep.]
BiDOrD_ has joined #ocaml
BiDOrD has quit [Remote host closed the connection]
jayprich has joined #ocaml
csakatoku has quit [Ping timeout: 248 seconds]
BiDOrD_ is now known as BiDOrD
milosn has quit [Read error: Connection reset by peer]
<ollehar>
is this just my makefile that is strange? I can't abort a compilation once it has started :P
milosn has joined #ocaml
<ollehar>
using vim, btw
milosn has quit [Read error: Connection reset by peer]
Drup has joined #ocaml
milosn has joined #ocaml
ggherdov has quit [Ping timeout: 256 seconds]
levi` has joined #ocaml
levi has quit [Read error: Connection reset by peer]
levi` is now known as levi
osa1_ has joined #ocaml
BiDOrD has quit [Read error: Connection reset by peer]
BiDOrD has joined #ocaml
dsheets has quit [Ping timeout: 248 seconds]
milosn has quit [Ping timeout: 245 seconds]
ollehar has quit [Ping timeout: 245 seconds]
ontologiae has joined #ocaml
milosn has joined #ocaml
BiDOrD has quit [Read error: Connection reset by peer]