flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
chrisdotcode has quit [Ping timeout: 260 seconds]
walter has joined #ocaml
walter has quit [Client Quit]
Drup has joined #ocaml
mfp has quit [Ping timeout: 264 seconds]
Drup has quit [Quit: Leaving.]
q66 has quit [Quit: Leaving]
yacks has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
dsheets has quit [Ping timeout: 268 seconds]
Myk267 has quit [Quit: Myk267]
talzeus has joined #ocaml
willb1 has quit [Ping timeout: 248 seconds]
n06rin has joined #ocaml
demonimin has quit [Ping timeout: 264 seconds]
willb1 has joined #ocaml
n06rin has quit [Read error: Connection reset by peer]
n06rin has joined #ocaml
demonimin has joined #ocaml
ygrek_ has joined #ocaml
n06rin has quit [Read error: Connection reset by peer]
n06rin has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
ygrek_ has quit [Ping timeout: 264 seconds]
talzeus has quit [Remote host closed the connection]
Neros has quit [Read error: Operation timed out]
chambart has joined #ocaml
chambart has quit [Ping timeout: 264 seconds]
ygrek_ has joined #ocaml
structuralist has joined #ocaml
n06rin has quit [Ping timeout: 264 seconds]
n06rin has joined #ocaml
bondar has quit [Ping timeout: 246 seconds]
zarul has quit [Ping timeout: 268 seconds]
zarul has joined #ocaml
ben_zen has quit [Quit: sleeeeep]
<adrien> morning
<adrien> pippijn: thinking again about the things I can and can't do with pmake, I'm really seeing how gmake has to be quite a lot more complicated and slower
<adrien> but some of the gmake stuff is really useful =/
talzeus has joined #ocaml
callen has quit [Changing host]
callen has joined #ocaml
talzeus has quit [Remote host closed the connection]
n06rin has quit [Ping timeout: 240 seconds]
ygrek_ has quit [Ping timeout: 260 seconds]
n06rin has joined #ocaml
chrisdotcode has joined #ocaml
hto has quit [Quit: Lost terminal]
hto has joined #ocaml
structuralist has quit []
Yoric has joined #ocaml
talzeus has joined #ocaml
Yoric has quit [Ping timeout: 248 seconds]
ulfdoz has joined #ocaml
Simn has joined #ocaml
Yoric has joined #ocaml
talzeus has quit [Remote host closed the connection]
Yoric has quit [Ping timeout: 248 seconds]
talzeus has joined #ocaml
chrisdotcode has quit [Ping timeout: 240 seconds]
Myk267 has joined #ocaml
talzeus_ has joined #ocaml
talzeus has quit [Ping timeout: 268 seconds]
ollehar has joined #ocaml
Snark has joined #ocaml
ollehar has quit [Read error: Connection reset by peer]
chrisdotcode has joined #ocaml
ollehar has joined #ocaml
ggole has joined #ocaml
Yoric has joined #ocaml
weie_ has quit [Quit: Leaving...]
j0sh has quit [Ping timeout: 246 seconds]
j0sh has joined #ocaml
Yoric has quit [Ping timeout: 248 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
n06rin has quit [Ping timeout: 264 seconds]
testcocoon has joined #ocaml
chrisdotcode has quit [Ping timeout: 240 seconds]
ollehar has quit [Ping timeout: 245 seconds]
mfp has joined #ocaml
asmanur has quit [Read error: Operation timed out]
asmanur has joined #ocaml
<gasche> asmanur: I would like to know what you changed in mlorg to adapt to 4.01
<gasche> your 0.1.2 archive decompresses into a 0.1.1 directory
<gasche> (I tried to diff the two archives and that made it more painful that it should be)
<gasche> in fact
<gasche> http://iuwt.fr/~asmanur/mlorg-0.1.2.tar.gz and .../mlorg-0.1.1.tar.gz are the exact same file
<gasche> yay
<gasche> (which is also the same as mlorg-0.1.tar.gz ?)
<mrvn> change is an illusion, things always stay the same
<asmanur> gasche: the hash was not the same
<asmanur> were
<pippijn> adrien: yes
<gasche> asmanur: I complain that is much too hard to find which changes you made for 4.01
<asmanur> gasche: ok so mlorg-0.1.2 unpacks to mlorg-0.1.1 but this should be the correct tarball
<asmanur> gasche: I sent you a link yesterday
<gasche> I can't see anything in your gitorious history about it
<pippijn> adrien: some of the gmake stuff is necessary unless you generate makefiles
<gasche> you need to update gitorious more frequently
<gasche> or make this git repo findable somehow
<pippijn> adrien: with gmake, you have a functional programming language
<gasche> (eg. reference it in the README or something)
<gasche> hm
<pippijn> adrien: you can implement automake (or anything else) in it
<gasche> this links seems down from my machine
<pippijn> adrien: but in my experience, you (I) don't really want to
<asmanur> gasche: which one ?
<gasche> ping kiwi.iut.fr doesn't work
<gasche> so both
<asmanur> (it's iuwt.fr)'
<asmanur> and from germany it seems to work
<gasche> pinging iuwt.fr works
tobiasBora has joined #ocaml
<asmanur> yes, they are not the same servers
<asmanur> i tried through 2 servers and both work
<gasche> hm
<asmanur> ok ping does not work but wget works
<adrien> pippijn: yeah, agreed, it can go too far
<gasche> ~/projects/mlorg works from another server in France
<asmanur> perhaps the DNS is not up to date verywhere
<asmanur> gasche: why do you care so much about the migration ?
<gasche> well
<asmanur> the issue opened by avsm was pretty clear on what would be the change
<gasche> upstream needs to know about how changes break user code
<gasche> (eg. it would have been nice of you to comment on the PR discussing this change that you needed to make a change to mlorg)
<asmanur> ??
tane has joined #ocaml
<asmanur> did you want me to say "Oh to update it to 4.01 i needed to remove the multiple definition of this method"
<gasche> in the mantis PR about multiple method definitions, yes, that would be helpful
<adrien> reminds me I need to open a PR because the manpage isn't up-to-date about warnings
<pippijn> adrien: this is one of my more harmless ones
<pippijn> adrien: plays well with automake
<pippijn> adrien: I have had complex macro magic going on before I used automake (to achieve basically the same as what automake does)
<adrien> harmless? you're sure,
<adrien> $(foreach S,$(patsubst lib%,%,$(subst .la,,$(filter %.la,$($(subst /,_,$(subst $(top_srcdir)/,,$(<D)))_LDADD)))),-I$(abs_top_srcdir)/src/library/$S/include)\
<adrien> :P
<pippijn> yes, imagine the less harmless ones
<pippijn> at least this one is declarative
<pippijn> and it doesn't call functions
<pippijn> at least no user defined ones
darkf has quit [Quit: Leaving]
cdidd has quit [Read error: Connection reset by peer]
cdidd has joined #ocaml
Jenza has left #ocaml []
<asmanur> gasche: so I was supposed to dig some hypothetical PR on mantis just to comment ?
<pippijn> adrien: gmake becomes a pain when your path names contain spaces
<mrvn> try having : in directory names
<pippijn> heh
<pippijn> yes
weie has joined #ocaml
tobiasBora has quit [Ping timeout: 264 seconds]
<adrien> which is actually very common with C:/
<pippijn> hm
<pippijn> does gmake's abspath on windows produce C:/ paths?
<pippijn> if not, that's not very common
ohama has quit [Ping timeout: 264 seconds]
ohama has joined #ocaml
Neros has joined #ocaml
zpe has joined #ocaml
<adrien> depends which make you use
<adrien> and in cygwin, you can have to pass windows paths to binaries that are native (non-cygwin)
watermind has joined #ocaml
xavierm02 has joined #ocaml
ygrek has joined #ocaml
ygrek_ has joined #ocaml
Yoric has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
xavierm02 has quit [Ping timeout: 264 seconds]
yacks has quit [Ping timeout: 240 seconds]
Yoric has quit [Ping timeout: 248 seconds]
gustav_ has quit [Remote host closed the connection]
yacks has joined #ocaml
xavierm02 has joined #ocaml
beginner42 has joined #ocaml
<beginner42> i am trying to write the zmq recv function, does someone who uses ctypes sees the error in my code? Line 12 always returns -1
q66 has joined #ocaml
n06rin has joined #ocaml
Anarchos has joined #ocaml
Drup has joined #ocaml
ygrek_ has quit [Ping timeout: 260 seconds]
Yoric has joined #ocaml
ygrek has joined #ocaml
Yoric has quit [Ping timeout: 248 seconds]
ben_zen has joined #ocaml
Yoric has joined #ocaml
xavierm02 has quit [Ping timeout: 260 seconds]
tane has quit [Quit: Verlassend]
Yoric has quit [Ping timeout: 248 seconds]
xavierm02 has joined #ocaml
xavierm02 has quit [Client Quit]
xavierm02 has joined #ocaml
xavierm02_ has joined #ocaml
xavierm02_ has quit [Client Quit]
xavierm02_ has joined #ocaml
xavierm02_ has quit [Client Quit]
xavierm02 has quit [Remote host closed the connection]
xavierm02-A-P has joined #ocaml
xavierm02 has joined #ocaml
xavierm02-A-P has quit [Ping timeout: 264 seconds]
Drup has quit [Read error: Operation timed out]
wmeyer has joined #ocaml
<wmeyer> hello.
xavierm02-A-P has joined #ocaml
<adrien> \o
<wmeyer> o/
<pippijn> hi wmeyer
<pippijn> how's it going?
wmeyer has quit [Ping timeout: 240 seconds]
<adrien> I like to think he's depressed because he has too much to do
xavierm02-A-P has quit [Ping timeout: 264 seconds]
<adrien> :D
<pippijn> haha
<pippijn> I know that feeling, though :/
<pippijn> but only when I'm not working
<adrien> he asked me for patches, I sent him 11 patches and a couple big ones :)
pango has quit [Quit: Client exiting]
pango has joined #ocaml
xavierm02-A-P has joined #ocaml
pango has quit [Read error: Operation timed out]
xavierm02 has quit [Ping timeout: 256 seconds]
ygrek has quit [Ping timeout: 260 seconds]
pango has joined #ocaml
tobiasBora has joined #ocaml
tane has joined #ocaml
Drup has joined #ocaml
xavierm02-A-P has quit [Read error: Operation timed out]
xavierm02-A-P has joined #ocaml
xavierm02 has joined #ocaml
xavierm02-A-P has quit [Ping timeout: 260 seconds]
xavierm02-A-P has joined #ocaml
xavierm02_ has joined #ocaml
xavierm02-A-P has quit [Read error: Operation timed out]
xavierm02_ has quit [Read error: Connection reset by peer]
xavierm02 has quit [Ping timeout: 264 seconds]
tobiasBora has quit [Quit: Konversation terminated!]
n06rin has quit [Quit: Leaving.]
tobiasBora_ has joined #ocaml
Snark has quit [Ping timeout: 268 seconds]
xavierm02 has joined #ocaml
xavierm02 has quit [Ping timeout: 252 seconds]
dsheets has joined #ocaml
xavierm02 has joined #ocaml
beginner42 has quit [Quit: Leaving]
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
<aggelos_> hmm. I'm writing a program which is doing comparisons of somewhat complex data structures
<aggelos_> so I'm juggling too many balls there and I was wondering if I could use the type system to make sure I won't ever mix which side a given subset of the data structure is from
<aggelos_> so some kind of Left/Right type wrapper around the same basic types, which ensures you can only generate lists of types wrapped with Left or similarly for Right, but you can't mix them up
<aggelos_> not quite sure how I'm supposed to do that though
<aggelos_> is that even possible?
<aggelos_> I'm more than glad to do my own digging if someone can provide pointers :)
<Anarchos> why not use the standard = ?
walter has joined #ocaml
Snark has joined #ocaml
<aggelos_> Anarchos: I'm sorry, was that addressed to me?
tobiasBora_ has quit [Ping timeout: 267 seconds]
<xavierm02> aggelos_ : I'm not sure what you want but you might want to look up phantom types. And I think Anarchos' question was indeed for you and unless your structure is made so that you can have reference loops, you probably should use = like he said.
yacks has quit [Quit: Leaving]
<xavierm02> wait
<xavierm02> you have a tree and you want to remember if your node came from the right or the left?
<gasche> aggelos_: OCaml does not have the perfect solution to your problem, which is an explicit cooercion to a non-unifiable type
<gasche> I'd say the simplest thing is to use
<gasche> type 'a left = Left of 'a
<gasche> type 'a right = Right of 'a
<gasche> and wrap your values with Left and Right as appropriate when you access them
<gasche> another solution would be to wrap your code in a functor
<gasche> module Data(M : sig type 'a t type left type right) = struct ... end
<gasche> in the code you can use (left t) and (right t) as distinct types, but then instantiate the functor such that they actually are the same
<gasche> (one issue with this encoding is that you don't have aspect to the underlying type of your values, only their left or right-ness; if you cannot be polymorphic on the types of the data structure, you have to add one more type parameter to t)
<aggelos_> gasche: right, I was going to ask that. the structure of the code is that two external files are analyzed (complex data structures being built and all) and then I need to do the left/right comparison
<aggelos_> so I need to be able to access all the elements constituting the data structures with compare_nodeset (l : LeftNodeset) (r : RightNodeset)
<aggelos_> which would recurse (well, it's more complicated than that, but...) into compare_node (l : LeftNode) (r : RightNode) and so on
<gasche> I think you should try the really simple (type 'a left = Left of 'a) approach first
gnuvince has joined #ocaml
gnuvince has quit [Changing host]
gnuvince has joined #ocaml
<gasche> its only issue is that wrapping and unwrapping Left/Right has a performance cost
<gasche> if you have code working in this style, you can try to convert to more complex solutions that remove that performance cost (such as the abstraction over phantom types I proposed)
<aggelos_> fair point
<gasche> but doing both at the same time looks like a sure path to mental exhaustion
<aggelos_> alright, I'll try that first then
<aggelos_> thanks, that helps a lot
walter has quit [Quit: This computer has gone to sleep]
<Anarchos> gasche your insights on types and modules are much more powerful than mines :)
walter has joined #ocaml
Neros has quit [Ping timeout: 268 seconds]
milosn has quit [Read error: Operation timed out]
as has quit [Quit: Connection closed for inactivity]
testcocoon has quit [Quit: Coyote finally caught me]
walter has quit [Quit: This computer has gone to sleep]
testcocoon has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
tobiasBora_ has joined #ocaml
walter has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
yacks has joined #ocaml
hellome has joined #ocaml
hellome has quit [Read error: Connection reset by peer]
chambart has joined #ocaml
hellome has joined #ocaml
testcocoon has joined #ocaml
tobiasBora_ has quit [Quit: Konversation terminated!]
<gasche> Anarchos: that's unrelated, but I don't like the built-in polymorphic comparison functions
<gasche> they're a defect, from a language design point of view
darkf has joined #ocaml
<companion_cube> for which typeclasses would be the perfect fix ;)
<aggelos_> gasche: so if I have code that does List.combine left right (or hand-coded functions with similar signatures) and I want to preserve the left/right-ness in the resulting pairs, what would be an elegant way to handle that?
<gasche> well
snearch has joined #ocaml
<gasche> if "left" is of type (foo left list) and "right" of type (bar right list), you'll get a (foo left * bar right) list as a result
<ggole> List.combine doesn't 'merge' the types or anything
<aggelos_> ah sorry, it's foo list left etc
<gasche> ah
<gasche> in that case you have to implement a function ('a list left -> 'a left list)
<gasche> (or change your code to produce an ('a left list) in the first place)
xavierm02 has quit [Ping timeout: 256 seconds]
Arsenik has joined #ocaml
<aggelos_> well, when the most general containers to be compared are generated, it's not entirely clear which will be right and which will be left, so I can't easily do the latter
<aggelos_> the thing is, list is not the only container I'm dealing with
<aggelos_> so I'd like to have a more generic approach
<aggelos_> hmm. possibly I should be going through .enum to do such packing/unpacking
<aggelos_> hmm
<aggelos_> no, I don't think that'll work either
<gasche> if each container provides a "map" function, writing the left-traverse shouldn't be hard in term of code lines
<mfp> gasche, companion_cube: any idea about how the work on implicits is going? (re: modular type classes as killer app for applicative functors)
<gasche> the thing is, later you'll want to change your code in a different style where ('a list left -> 'a left list) is the identity function
<companion_cube> mfp: no idea
<companion_cube> gasche: better provide a fold operator
<gasche> mfp: not very fast because Pierre and Grégoire are busy with other things
<gasche> (Grégoire is working on a very related topic, Pierre on compiler optimizations)
<mfp> the other side so to speak (inlining across functorization and HOFs) seems to be moving nicely indeed
<adrien> ah, right, I need to bribe hnrgrgr to work on ocaml-ty :P
<adrien> hnrgrgr: oh, btw, I talked to you about ocaml-ty at the last oups; it worked well for what I wanted =)
<adrien> hnrgrgr: but you need to fix the testsuite :P
<aggelos_> hmm
<aggelos_> let lr_bind (le : BatEnum.Enumerable left) (re : BatEnum.Enumerable right) (f : 'a -> 'a -> ('b, 'b)) -> ('b, 'b) BatEnum.t
<aggelos_> possibly something like that
testcocoon has quit [Quit: Coyote finally caught me]
<aggelos_> ah, missing the left/right in the results
<aggelos_> *return type
walter has quit [Quit: This computer has gone to sleep]
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
testcocoon has joined #ocaml
<Anarchos> gasche yes i agree for the default comparison (=)
ulfdoz has quit [Read error: Operation timed out]
testcocoon has quit [Quit: Coyote finally caught me]
xavierm02 has joined #ocaml
milosn has joined #ocaml
testcocoon has joined #ocaml
<xavierm02> gasche : When you say "I'd expect an user to rather represent infinite structures another way, or use a purity assumption on either arguments, to use a specialized implementation with O(1) memory consumption", 1) How would you expect infinite structures to be implemented? 'a -> bool ? 2) What do you mean by "purity assumption"? Having a function f:'a -> 'a in O(1) so that f(u_n)=u_{n+1}?
<jpdeplaix> hnrgrgr: you should also consider merging ocaml-ty and ocaml-implicit with trunk (you can do it with the github mirror, I tried)
beginner42 has joined #ocaml
bondar has joined #ocaml
snearch has quit [Quit: Verlassend]
testcocoon has quit [Quit: Coyote finally caught me]
Yoric has joined #ocaml
chambart has quit [Ping timeout: 264 seconds]
testcocoon has joined #ocaml
ulfdoz has joined #ocaml
<gasche> xavierm02: one of the (somewhat implicit) guarantees of Stream and Enum is that if producing the next element produces a side-effect, this effect will only be performed once (even if you access the effect several times)
Yoric has quit [Ping timeout: 248 seconds]
<gasche> so if you implement a function take_n : int -> 'a list option that returns the n next element of the enum (without popping them, that is), you *must* store those elements somewhere to return them when someone asks them again
Yoric has joined #ocaml
<gasche> in the context I was discussing, a purity assumption would be "it's fine to call next() two times instead of memoizing the result"
<gasche> which is more or less what the Seq data-structure of Batteries does
<gasche> (Seq don't require cloning, you can just call the "next" function again)
<xavierm02> so then it would take that Enum with the purity assumption on a specific side and simply go though it to get the next element instead of storing it?
<xavierm02> I don't think I understand what you're saying >_<
<companion_cube> I think that if you want memoization then lazyList is the right thing
<companion_cube> otherwise, an iterator should be consumable
Drup has quit [Ping timeout: 256 seconds]
<gasche> xavierm02: to compute the cartesian product, you have to output the same element again and again
<gasche> with Enum, once you forced an element once, you have to store it for as long as it may be needed again
<gasche> with Seq, you can simply call the corresponding "next()" function again, without having to store it anywhere in the meantime
<xavierm02> companion_cube : it was about computing the cartesian product of two possibly infinite enums. So you have to enumerate the "diagonals" which means going though the first n elements of one list in the "normal" order and backwards on the other list. So having a lazyList would make it O(n^2). If there was a doubly-linked-lazylist, I'd use it but untill then, I'll stick to Enum + dllist :)
walter has joined #ocaml
<companion_cube> oh oO
<companion_cube> I didn't thnk it would be assuming the enums could be infinite
Myk267 has quit [Quit: Myk267]
<gasche> xavierm02: note that you could reuse you dllist trick with lazylists as well
<xavierm02> companion_cude : well otherwise, you would just get them in the lexicographical order and it wouldn't be funny :D
<gasche> but lazylist have the same problems as enums here: enumerating elements of the cartesian product consumes and ever-growing amount of memory
<xavierm02> yes
<gasche> (square root of the output size for a good impl. such as yours, but nonetheless)
Yoric has quit [Ping timeout: 248 seconds]
<xavierm02> it only happens when both are infinite though
<gasche> I don't understand, it happens each time you use this implementation
<xavierm02> no
<xavierm02> the infinite amount of memory is only if both sets are infinite
<gasche> infinite, yes
<xavierm02> and otherwise
<gasche> but "ever-growing as long as there are still elements" holds even in the finite case
<xavierm02> yes
<xavierm02> but the size of the dllist is the size of the smallest enum
<companion_cube> it looks reasonable to ask one of the enum to be finite, to me
<gasche> I think as well, but xavierm02 has a different usecase where an infinite-resilient enum is important
<gasche> I'm fine with having an implementation for this as well, but I'm saying that I suspect Enum are not the right level of abstraction because of this memory-consumption issue
<xavierm02> what would the right level of abstraction be?
<companion_cube> gasche: what do you think of the idea of just using standard streams, as in biocaml ?
dnm has joined #ocaml
<gasche> standard streams don't support cloning and fast-counting
<gasche> if you don't need any of those, I'm fine with streams
<gasche> that said
<gasche> the Enum implementation is insane
<gasche> but Stream is not much better
<gasche> If you want to keep things simple even under the abstraction boundary, I don't think any of those library meet the goal
<gasche> (maybe your Sequence is better)
<gasche> as I said, I think there is an open research problem
<gasche> (at least a research problem; I'm not certain that I have looked at related work hard enough)
<gasche> xavierm02: I mostly don't know your problem domain so I couldn't recommend an abstraction level
<gasche> but for the *specific* task of computing diagonals of infinite structure, Seq looks like a better choice, if you indeed can make this purity assumption I'm talking about
<gasche> (I don't know)
<companion_cube> gasche: yes, but I feel like Enum is trying to do too much
<gasche> I think we proper understanding of the principles, it should be doable
<gasche> people implement concurrent copy-on-write data structures
<gasche> Enum is perhaps surprisingly close in terms of difficulty, but definitely not harder
<companion_cube> otoh, a good iterator abstraction should also be lightweight
<gasche> hm
<companion_cube> I read some code of format.ml, and the defintion of formatter was awfully *big*
<gasche> if I had enough time, I would suggest we band together to do the basics of an Enum formalization by the JFLA deadline :]
<gasche> unfortunately I'll be leaving next week and my plate is full until then
<gasche> and I feel it's rather a few months' work than a few weeks
<gasche> companion_cube: the new code by Benoît Vaugon ?
bjorkintosh has joined #ocaml
bjorkintosh has left #ocaml []
<companion_cube> no, the old one in 4.00
<gasche> ah
<companion_cube> it's just the type formatter itself, an huge record
<companion_cube> a*
<gasche> ah you mean the pretty-printer
<gasche> yeah, it's hairy code
<gasche> PPrint is maybe a bit nicer
<companion_cube> yeah
<companion_cube> the thing I like in Sequence is how lightweight it is ^^
<companion_cube> but it's not powerful enough for many uses
<xavierm02> Well I don't have a "problem". I just want (mostly for fun) to represent set, monoids, groups, rings, fields in ocaml. And since I want to be able to "see" what set I have, I want to be able to print a few elements and therefore to enumerate the elements of the set. Also, being able to enumerate the elements make it easier to run some tests etc.
walter has quit [Quit: This computer has gone to sleep]
<companion_cube> then, can't you take a few elements for each set, and take their product?
<companion_cube> if they're infinite it won't make any difference, you can't compute the full product
<xavierm02> well I could do that
<xavierm02> but I can also have my thing listing them all and just take the first n elements when I print and add ...
walter has joined #ocaml
<xavierm02> the only problem with my script is the memory it uses on big sets but If I only compute 20 elements, I don't have this problem
<xavierm02> and I like that idea that If I run my script long enough, I'll actually cover all elements
<companion_cube> listing them all is impossible if they're infinite
<xavierm02> (because since int is bounded, the sets are in fact finite)
Yoric has joined #ocaml
<xavierm02> (not just, int, all the types, because they have a finite representation, only have a finite number of elements so the sets are finite)
<ggole> Excepts some are more finite than others.
xavierm02 has quit [Ping timeout: 256 seconds]
<mrvn> except lists are infinite. you can make the longer and longer (in theory, until you exhaust the address space)
<Anarchos> mrvn well if i remember, lists have a max number of elements, is it 16384 ?
<mrvn> no. A list node is a block containing a pointer to the next and a value.
<mrvn> As long as you have ram you can make the list as long as you like
<Anarchos> mrvn make sense
<ggole> Arrays are somewhat limited on 32-bit machines.
<mrvn> nope.
shinnya has quit [Ping timeout: 245 seconds]
<mrvn> strings are
* Anarchos points to the manual for such limitations
<mrvn> 16MB for strings on 32bit.
<ggole> Why do you think BigArray exists?
<mrvn> strings are the smallest, arrays are larger, same as records and tuples and pretty much everything else is limited by the size of a value.
Snark has quit [Quit: leaving]
ggole has quit []
Yoric has quit [Ping timeout: 248 seconds]
<mfp> wut? max 2**22 array elms on 32-bit
<mfp> -1
xavierm02 has joined #ocaml
<mrvn> The size of the "size" part in the blocks metadata
<xavierm02> did gasche answer me?
<xavierm02> I timed out -,-
Yoric has joined #ocaml
<mrvn> apart from the cleaning up part linux has already done that
<mrvn> ups, ewin
<gasche> 21:07 < gasche> xavierm02: I mostly don't know your problem domain so I couldn't recommend an abstraction level
<gasche> 21:08 < gasche> but for the *specific* task of computing diagonals of infinite structure, Seq looks like a better choice, if you indeed can make this purity assumption I'm talking about
<gasche> 21:08 < gasche> (I don't know)
<xavierm02> ah
<xavierm02> I got those messages
Yoric has quit [Quit: Instantbird 1.5a1pre -- http://www.instantbird.com]
walter has quit [Quit: This computer has gone to sleep]
<xavierm02> then I asked what you meant exactly by unit tests and if using the code I have that outputs a finite number of elements of AxB for all cpossible A and B (empty, one element, two element, infinite) and checking the resulting string would be ok
Yoric has joined #ocaml
<mrvn> on RPI I use 1ns.
xavierm02 has quit [Remote host closed the connection]
<beginner42> i try to describe a C structure from zeromq and map it to an ocaml record, but what can i do when the c structure member has as name the underscore sign ?
<beginner42> typedef struct zmq_msg_t {unsigned char _ [32];} zmq_msg_t;
<mrvn> you name it differently or leave it out as its private.
<mrvn> type id_t; type zmq_msg_t = { id : id_t; }
<beginner42> i dont have to define id as array 32 uchar?
<mrvn> it depends on what you want to do with it.
lenstr has quit [Quit: ZNC - http://znc.sourceforge.net]
LeNsTR has joined #ocaml
<beginner42> i need to call this function ZMQ_EXPORT int zmq_msg_init_size (zmq_msg_t *msg, size_t size); before i can call the zmq_msg_send function
<beginner42> i need to pass this zmq_msg_t type
<mrvn> where zmq_msg_t is the header and is followed by the payload?
<beginner42> like there
<mrvn> wait, no. That would need **
<mrvn> beginner42: The zmq_msg_t will contain a pointer to the data buffer.
<mrvn> anyway, it is some abstract data type that is 32byte big. Keep it abstract.
<beginner42> like you wrote before?
<mrvn> type zmq_msg_t; val zmq_msg_init : int -> zmq_msg_t
<mrvn> And zmq_msg_init is a C function that allocates and inits the structure.
<mrvn> You probably want to use a custom block for it with finalizer.
<beginner42> i am using ctypes,
<mrvn> ever used custom blocks before?
<mrvn> sorry, no idea how you do that in ctypes.
<beginner42> i am trying to do it like here
Yoric has quit [Ping timeout: 264 seconds]
<watermind> any idea what this may be (on opam update)? .opam/opam/extprot.1.1.1.opam", line 12, character 25-26: parse error.
<watermind> the offending line is ["omake" "test"] {ounit:installed}
tani has joined #ocaml
tane is now known as Guest95848
Guest95848 has quit [Killed (asimov.freenode.net (Nickname regained by services))]
tani is now known as tane
<mrvn> beginner42: I don't think it is a good idea to use only ctypes. You want some hand written C stubs.
ulfdoz has quit [Ping timeout: 268 seconds]
<beginner42> mrvn: is it a concern about speed or feasibility?
<mrvn> both
<mrvn> e.g. you want a send function that can send strings. But that should run without the runtime system locked.
zpe has quit [Remote host closed the connection]
<beginner42> i cant call these functions with ctypes?
tobiasBora has joined #ocaml
Neros has joined #ocaml
<mrvn> beginner42: I don't see how. you can't release the global lock from inside ocaml.
Yoric has joined #ocaml
<mrvn> beginner42: look at the source for the Unix.write function for example.
<beginner42> mrvn: for what should i look out there? the external unsafe_write function?
<mrvn> beginner42: yes, the C stub that writes out the string in 16k chunks.
<beginner42> where do i find the stubs?
<mrvn> next to the ml file
<mrvn> It's a container to make the file bigger and harder to read requiring not just a parser for the data but also another parser for the xml part.
<mrvn> args, ewin again.
Arsenik has quit [Remote host closed the connection]
tane has quit [Quit: Verlassend]
thomasga has joined #ocaml
ollehar has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
osa1 has joined #ocaml
chambart has joined #ocaml
<companion_cube> looks like with opam and system's compiler, ocamlbuild still doesn't find libs
<companion_cube> meaning that ocamlbuild is the system one, and it doesn't use the ocamlfind from opam and the libs installed via opam
Drup has joined #ocaml
zpe has joined #ocaml
thomasga has quit [Quit: Leaving.]
zpe has quit [Ping timeout: 268 seconds]
<rks`> companion_cube: that's probably a bug worth reporting, isn't it?
<companion_cube> I'd be very surprised if it isn't reported
<companion_cube> let's see
beginner42 has quit [Quit: Leaving]
<companion_cube> I don't find such an open bug
<companion_cube> rks`: do you use opam with the system compiler?
AdmWiggin has joined #ocaml
<rks`> sometimes, not at the moment though
<companion_cube> wow, so it looks like I had both an opam-installed ocamlfind and a distro-based ocamlfind
<rks`> however companion_cube, looking at the sources of ocamlbuild
<rks`> it seems to be looking for ocamlfind in the path
<rks`> well actually, it searches in the "command path"
<companion_cube> never mind, removing the system ocamlfind fixed it
<rks`> which is PATH
<rks`> so it's ok.
<rks`> ok :)
<companion_cube> the path must have been slightly different (like, ignoring the path to opam?)
<rks`> well, the order is always important, anyway, good night.
<companion_cube> good night
breakds has quit [*.net *.split]
tianon has quit [*.net *.split]
ccasin has quit [*.net *.split]
The_third_man has quit [*.net *.split]
orbitz has quit [*.net *.split]
yacks has quit [*.net *.split]
gnuvince has quit [*.net *.split]
Simn has quit [*.net *.split]
hto has quit [*.net *.split]
gildor has quit [*.net *.split]
ski has quit [*.net *.split]
LeNsTR has quit [*.net *.split]
brendan has quit [*.net *.split]
wormphlegm has quit [*.net *.split]
maufred_ has quit [*.net *.split]
pippijn has quit [*.net *.split]
lambdaTerrorist has quit [*.net *.split]
CissWit has quit [*.net *.split]
bondar has quit [*.net *.split]
cdidd has quit [*.net *.split]
talzeus_ has quit [*.net *.split]
zarul has quit [*.net *.split]
transfinite has quit [*.net *.split]
tov has quit [*.net *.split]
wagle has quit [*.net *.split]
ivan\ has quit [*.net *.split]
srcerer has quit [*.net *.split]
paddymahoney has quit [*.net *.split]
tauntaun has quit [*.net *.split]
bobry has quit [*.net *.split]
technomancy has quit [*.net *.split]
k4nar has quit [*.net *.split]
thelema_ has quit [*.net *.split]
so has quit [*.net *.split]
patronus has quit [*.net *.split]
noplamodo has quit [*.net *.split]
vbmithr has quit [*.net *.split]
jdoles has quit [*.net *.split]
xaimus has quit [*.net *.split]
skchrko has quit [*.net *.split]
manud has quit [*.net *.split]
rossberg has quit [*.net *.split]
gereedy has quit [*.net *.split]
alexey has quit [*.net *.split]
aggelos_ has quit [*.net *.split]
ivan\ has joined #ocaml
paddymahoney has joined #ocaml
breakds has joined #ocaml
ttm has joined #ocaml
orbitz_ has joined #ocaml
yacks has joined #ocaml
gnuvince has joined #ocaml
Simn has joined #ocaml
hto has joined #ocaml
gildor has joined #ocaml
ski has joined #ocaml
skchrko has joined #ocaml
manud has joined #ocaml
rossberg has joined #ocaml
gereedy has joined #ocaml
alexey has joined #ocaml
aggelos_ has joined #ocaml
jdoles has joined #ocaml
ollehar has quit [Write error: Broken pipe]
ccasin_ has joined #ocaml
LeNsTR has joined #ocaml
CissWit has joined #ocaml
brendan has joined #ocaml
wormphlegm has joined #ocaml
maufred_ has joined #ocaml
pippijn has joined #ocaml
lambdaTerrorist has joined #ocaml
cdidd has joined #ocaml
talzeus_ has joined #ocaml
zarul has joined #ocaml
transfinite has joined #ocaml
tov has joined #ocaml
wagle has joined #ocaml
tauntaun has joined #ocaml
k4nar has joined #ocaml
bobry has joined #ocaml
technomancy has joined #ocaml
thelema_ has joined #ocaml
so has joined #ocaml
patronus has joined #ocaml
noplamodo has joined #ocaml
vbmithr has joined #ocaml
xaimus has joined #ocaml
ollehar has joined #ocaml
ollehar has quit [Remote host closed the connection]
ollehar has joined #ocaml
ollehar has quit [Remote host closed the connection]
ollehar has joined #ocaml
gnuvince has quit [Ping timeout: 260 seconds]
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
q66 has quit [Quit: Leaving]
ollehar has quit [Ping timeout: 268 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
lopex has quit [Ping timeout: 245 seconds]
Simn has quit [Quit: Leaving]
zarul has quit [Ping timeout: 268 seconds]
zarul has joined #ocaml
jbrown has quit [Ping timeout: 276 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-130604]: i've been blurred!]
lopex has joined #ocaml
zarul has quit [Read error: Operation timed out]
zarul has joined #ocaml
jbrown has joined #ocaml
UnixPower has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]
pango has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
chambart has quit [Ping timeout: 264 seconds]