<jbapple>
Using types like 'a . ([>qux] as 'a) -> 'a
<jbapple>
This produces strange errors like: Error: This pattern matches values of type [< `bar | `baz | `muk of 'a * 'b ] but a pattern was expected which matches values of type [> qux ] The second variant type does not allow tag(s)
<jbapple>
Which confuses me - this error usually lists what tag(s) are not allowed
<jbapple>
But here it seems to think said list of tags is empty
ggherdov has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
fantasticsid has joined #ocaml
pango is now known as pangoafk
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
Tobu has quit [Changing host]
Tobu has joined #ocaml
larhat has joined #ocaml
Cyanure has quit [Ping timeout: 246 seconds]
Cyanure has joined #ocaml
tufisi has joined #ocaml
ftrvxmtrx has joined #ocaml
cago has joined #ocaml
mika1 has joined #ocaml
ggherdov has quit [Remote host closed the connection]
sgnb has joined #ocaml
Cyanure has quit [Remote host closed the connection]
thomasga has joined #ocaml
ankit9 has quit [Quit: Leaving]
cago has quit [Quit: Leaving.]
djcoin has joined #ocaml
hto has joined #ocaml
Cyanure has joined #ocaml
cago has joined #ocaml
<djcoin>
Does any Ocaml project have been submitted/accepted for Google Summer of Code ?
<Ptival>
djcoin: doesn't look like there was
<rixed>
although there were for Haskell, Scala, and a few other FPlangs.
<Ptival>
yes
<rixed>
I don't remember having seen some proposals, though. Maybe next year the community should think about it?
<Ptival>
Inria is probably not going to make the effort, but some other organizations could potentially
<djcoin>
Yep
<Ptival>
(OCamlcore, OCamlpro, Jane St., IRILL, etc.)
<rixed>
Ptival: of course I was not thinking about inria :*) rather ocamlpro
<rixed>
There were some GSoC in the past related to OCaml IIRC.
<rixed>
Supervised by Jane St.....
<rixed>
let me look...
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<Ptival>
Gabriel Scherer made up a list of things we would like to see done, maybe the remainder of the list can be turned into GSoC proposals next year... this will need mentors though
<rixed>
No it was not GSoC but Jane Street Summer Project :)
<Ptival>
oh right, they have their own thing going onj
avsm has joined #ocaml
<rixed>
Ptival: where's that list?
<Ptival>
not public yet
<Ptival>
(because not finished yet)
<thomasga>
I guess ocamlpro could mentor GSoC projects
<thomasga>
just need to see what that means in practice
<adrien>
lots of work
<thomasga>
if someone is interested in that, we can at least discuss to understand how much work
<avsm>
too late for this year
<thomasga>
ok
<adrien>
but find some people who've mentored and talk to them; or at least some blog or mailing-list posts
Kakadu has joined #ocaml
<reynir>
I wanted to participate in gsoc, but I was a week or two too late :/
<gildor_>
but I doubt that any project backed by a commercial company (ex-OCamlCore, OCamlPro, Jane St) will get a GSoC
<adrien>
didn't AdaCore get something?
<gildor_>
GSoC is more about community effort that cannot get money otherwise
<gildor_>
adrien: no AdaCore in the accepted mentoring organization since 2009
<adrien>
ok, my bad
<gildor_>
adrien: I am not 100% sure, it is just that I really doubt OCamlPro can be a mentoring org
<gildor_>
adrien: an as far as I understand the feedback we got from GSoC, we had with C. Troestler, anyone that want to re-apply as a GSoC mentoring organization, should reuse the project on the forge
<gildor_>
adrien: because how long you have been trying to get a GSoC matters
<gildor_>
adrien: or you should apply for a more focused GSoC (e.g. batteries, oasis, ocsigen)
<gildor_>
adrien: at least a project that has dozens of commiters and a living mailing list
munga has joined #ocaml
<gildor_>
Ptival: ^^^ (all what has been said to adrien)
<avsm>
gildor_: huh? xen has mentored several years, despite being commercially backed
<avsm>
ocaml certainly fits... just needs to pass their other criteria
<gildor_>
avsm: it was labelled Xen.org and starts with "Xen.org is an open source community"
<gildor_>
avsm: I just say that it won't have been possible for, e.g., OCamlCore itself to be a mentoring organization
<gildor_>
(or Jane Street, maybe INRIA can make the cut)
hcarty has quit [Ping timeout: 245 seconds]
hcarty has joined #ocaml
bacam_ is now known as bacam
<gildor_>
that is not a question of the organization, but more a question that Google should not pay someone (i.e. mentor) that is part of a commercial org without looking to create a contract with this commercial org.
<gildor_>
i.e. lawyer stuff
<gildor_>
avsm: ^^
<gildor_>
avsm: BTW, I doubt Citrix can apply for a GSoC
<gildor_>
(I think a lawyer will say "don't create a formal bound")
mfp has joined #ocaml
<gildor_>
mfp: upgraded sqlexpr yesterday
<gildor_>
mfp: no more need for a Lwt_pool if I understand correctly
<avsm>
gildor_: we mentored well before xen.org, as Xensource
<avsm>
and mentors dont get paid, only students (who aren't part of the commercial org)
<mfp>
gildor_: it's been a while, but I guess you're referring to Sqlexpr_sqlite_lwt. It uses an internal thread pool to avoid blocking on calls to sqlite3's API.
<gildor_>
avsm: seems like there are smthg like a $500 for mentoring, but we don't reach that stage with our previous attempt, so maybe I am wrong
avsm has quit [Quit: Leaving.]
<gildor_>
avsm: concerning commercial org, I think that maybe Xen was considered extremly important, whereas OCaml will not
<mfp>
for some reason, ocaml-sqlite3's handles must be used from the same thread that created them, so I couldn't just use Lwt_preemptive over a pool of handles
roha has quit [Remote host closed the connection]
<f[x]>
mfp, why?
<f[x]>
what happens if you violate that?
<f[x]>
afaik the sqlite3 constraint (in default build mode) is a reasonable "one thread at a time using handle"
Hussaind has joined #ocaml
<mfp>
f[x]: quoting from sqlite3.mli: "type db [...] NOTE: DO NOT USE THIS HANDLE WITHIN THREADS OTHER THAN THE ONE THAT CREATED IT!!!"
<mfp>
with that much emphasis being put on this, the least I'd expect is a segfault, but I'd better not try
<f[x]>
I see
<f[x]>
maybe that was left from the old dark ages when sqlite had such limitation by itself
<f[x]>
I don't see any thread-local usage in the stubs
<gildor_>
when avsm will be back, adrien and Ptival: ok, read more closely docs, commercial org can be a mentoring org, the product must be licensed under OSI approved license
The_third_bug has quit [Ping timeout: 248 seconds]
<gildor_>
so I was wrong, though it is probably a little bit harder for commercial org
The_third_bug has joined #ocaml
* gildor_
need to work now, bye bye
cago has quit [Quit: Leaving.]
lihaitao has joined #ocaml
ztfw` is now known as ztfw
zuymanto has quit [Quit: zuymanto]
zuymanto has joined #ocaml
Kakadu has quit [Quit: Page closed]
zuymanto has quit [Quit: zuymanto]
_andre has joined #ocaml
hyperboreean has quit [Ping timeout: 245 seconds]
hyperboreean has joined #ocaml
eni has joined #ocaml
eni has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
cago has joined #ocaml
ankit9 has joined #ocaml
Submarine has joined #ocaml
struktured has quit [Remote host closed the connection]
struktured has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
gmcabrita has joined #ocaml
Tobu has joined #ocaml
eni has joined #ocaml
BiDOrD_ has joined #ocaml
gnuvince has quit [Ping timeout: 250 seconds]
BiDOrD has quit [Ping timeout: 246 seconds]
<gildor_>
avsm (FYI): ok, read more closely docs, commercial org can be a mentoring org, the product must be licensed under OSI approved license
rossberg has quit [Ping timeout: 260 seconds]
rossberg has joined #ocaml
roha has joined #ocaml
mfp has quit [Read error: Connection reset by peer]
oriba has joined #ocaml
rixed has quit [Ping timeout: 245 seconds]
ankit9 has quit [Ping timeout: 260 seconds]
rixed has joined #ocaml
mfp has joined #ocaml
ankit9 has joined #ocaml
everyonemines has joined #ocaml
gnuvince has joined #ocaml
struktured has quit [Ping timeout: 265 seconds]
fraggle_laptop has joined #ocaml
emmanuel__ has joined #ocaml
saml has joined #ocaml
gnuvince has quit [Ping timeout: 248 seconds]
tmaeda is now known as tmaedaZ
gnuvince has joined #ocaml
smondet has quit [Ping timeout: 248 seconds]
oriba has quit [Quit: oriba]
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
tmaedaZ is now known as tmaeda
lihaitao has quit [Quit: Ex-Chat]
Submarine has quit [Quit: Leaving]
Cyanure has quit [Remote host closed the connection]
eni has quit [Ping timeout: 260 seconds]
smondet has joined #ocaml
ulfdoz has joined #ocaml
oriba has joined #ocaml
bkheops has joined #ocaml
eni has joined #ocaml
<hcarty>
diml: I have started getting EINTR exceptions during zeromq calls under Lwt. Is it possible that Lwt is causing these?
<hcarty>
diml: I'm not sending any signals myself that I know of.
<bkheops>
hello, I want to get a side-effect in a string or in a buffer. For example : "print_int 5" , result is unit, side effect print 5 on the top level but I want 5 in a variable.
<bkheops>
*print_int 5
<mrvn>
bkheops: Printf.sprintf "%d" 5
<hcarty>
bkheops: or string_of_int
<mrvn>
yeah, depending on wether you just want the int or more.
<thelema>
If you want arbitrary printing to a buffer, you can use batteries' BatIO which has a full printing system that can go to string, buffer, Unix.channel, Pervasives.channel, and more
<flux>
to me it sounds like he wants to put functions into a buffer?-o
<diml>
hcarty: lwt does not send signal either
<bkheops>
ok, it was a bad example^^, i use Curl binding and I want to get response in a variable :). I think I can use what you says thelema
<hcarty>
diml: I didn't think so. Thanks.
<hcarty>
bkheops: Yes, Batteries' IO system or you can use the Buffer module
<hcarty>
bkheops: I've done the same thing. I think the OCaml libcurl bindings come with an example showing how to do this.
<thelema>
bkheops: if you're lazy, you redirect curl's output to a file and just open that file
<flux>
ah, right, I misunderstood
<bkheops>
yes I'm ! lol. I will try 2 solutions. Thank's guys !
<f[x]>
that example would really benefit from setting some timeouts
<bkheops>
hcarty : exactly what I want !
<hcarty>
bkheops: But take f[x]'s recommendation/warning or you could end up with stalled downloads that never quit :-)
j2d2j2d2_ is now known as j2d2j2d2
ankit9 has quit [Ping timeout: 240 seconds]
oriba has quit [Quit: oriba]
andreypopp has joined #ocaml
bumb has joined #ocaml
bumb has quit [Quit: bumb]
<mrvn>
I want to move parts of one big file into its own file. Any suggestions how to do that so that git keeps the history intact for the moved stuff?
philed has joined #ocaml
<adrien>
git can notice that to some extent
<adrien>
maybe try and see how well it manages
<adrien>
(maybe it'll do better if you do it in several commits)
<adrien>
but you won't keep the history
<mrvn>
I was thinking maybe first copy the whole file and then cut them both down in a second commit.
<mrvn>
For the new file it would then look like a rename + lots of deletion
cago has quit [Quit: Leaving.]
<rixed>
mrvn: git will figure it out, give it a try.
<hcarty>
diml: Any idea why I would get an (unhandled) EINTR on "readable"? Again, Lwt's prevention of complete backtraces makes this difficult to track down.
philed has quit [Ping timeout: 272 seconds]
munga has quit [Ping timeout: 244 seconds]
ulfdoz has quit [Ping timeout: 265 seconds]
ulfdoz_ is now known as ulfdoz
<rixed>
hcarty: there was a bug like this in some versions of lwt some time ago... like in 2.0 or so.
<diml>
hcarty: it has been fixed in the development version
<hcarty>
mrvn: From the SO post, it sounds like the gui is the only means to show the history.
<mrvn>
hcarty: what gui? qgit doesn't.
<hcarty>
git gui blame
<mrvn>
git: 'gui' is not a git command. See 'git --help'.
<hcarty>
"git gui blame unit"
<hcarty>
mrvn: Ah, then you don't have it compiled/installed
<hcarty>
mrvn: I tested it here and the annotation works
<mrvn>
same here. why doesn't git blame show the same?
<hcarty>
I don't know, but it would be really nice if it did
<diml>
mrvn: you can try git blame -C
<rixed>
mrvn: mv NEWS OLDS; git add OLDS; git rm NEWS; git commit -m 'test'; then gitk shows: rename NEWS->OLDS (and so does git status before the commit)
<rixed>
mrvn: although I don't know how to get the information from git gui, which I'm not used to.
larhat has quit [Quit: Leaving.]
<hcarty>
diml: That looks like it does it, or at very least something close.
<mrvn>
rixed: I know.
<mrvn>
Wow, it even gets that the indentation changed because I moved a submodule into its own file.
<mrvn>
But only on unit.ml, not item.ml. Probably because item.ml is really short.
<rixed>
there are various heuristics implemented here and there in git tools that will detect (or not) such moves. git database itself does not stores this info. but this works quite well in practice.
<mrvn>
rixed: I think that sucks. git should realy have a mv and copy thingy.
<rixed>
mrvn: other VCS I know does this for rename only, which is not enough in practice. I'd rather have strong heuristics able to detect I moved a subset of a file than a whole or nothing thing. But I'm sold to git ;)
<mrvn>
rixed: Nothing wrong with a good heuristic. But I know what I'm doing. No need to guess. I should be able to tell git what I did and have git store that information.
<jaxtr>
ahh it's a wonderful day
<Hodapp>
Also, Linus totally flamed the hell out of someone on the Git mailing list for suggesting it should be written in C++ instead of C, and the discussion is hilarious.
Submarine has joined #ocaml
<mrvn>
jaxtr: The burning sunlight, the oxidizing fresh air und the noise pollution from the song birds?
<mrvn>
Hodapp: obviously git should be written in ocaml.
<hcarty>
mrvn: One can only assume that was the outcome of the mailing list discussion.
philed`` has joined #ocaml
philed` has quit [Ping timeout: 272 seconds]
ftrvxmtrx has joined #ocaml
<Hodapp>
mrvn: Isn't there a source control system written in OCaml? Maybe Darcs?
<Hodapp>
a similarly-designed one at that
djcoin has quit [Quit: WeeChat 0.3.2]
bkheops has quit [Remote host closed the connection]
tmaeda is now known as tmaedaZ
sivoais has quit [Ping timeout: 265 seconds]
emmanuel__ has quit [Quit: @+]
avsm has joined #ocaml
<hcarty>
Hodapp: darcs is written in Haskell
tmaedaZ is now known as tmaeda
<Hodapp>
close enough.
Snark has joined #ocaml
* Hodapp
ducks
hiptobecubic has joined #ocaml
fraggle_laptop has quit [Remote host closed the connection]
<hiptobecubic>
I assume that's handled cleverly by the compiler to avoid massive amounts of duplication somehow?
<flux>
you don't need to copy much if te rest of the stuff keeps the same
sivoais has quit [Ping timeout: 252 seconds]
sivoais has joined #ocaml
<_habnabit>
OOP and immutability fit together _brilliantly_
<_habnabit>
mutation is a curse
<Hodapp>
_habnabit: Why brilliantly?
<mrvn>
hiptobecubic: Not at all. the compiler simply duplicates when you tell it to duplicate.
<_habnabit>
why not? the idea of having objects with methods is great
<Hodapp>
_habnabit: objects with methods isn't really OOP...
<_habnabit>
it isn't ???
<Hodapp>
the emphasis put on it by the guy who invented the paradigm in the first place is on the message passing, not the objects
<_habnabit>
okay, so
<Hodapp>
to the extent that he didn't like it being called "object-oriented" because people were focusing so much on the objects and ignoring the messaging
<Hodapp>
and rather regretted choosing that term
<hiptobecubic>
well it's a bit stupid to call it "object oriented" and then be upset when people assume it's oriented around working with objects.
<hiptobecubic>
ocaml stuff doesn't seem to handle "make -jN" very well
<hiptobecubic>
at least, wyrd fails and ocamlc fails
<_habnabit>
hiptobecubic, you're not using ocamlbuild?
<hiptobecubic>
I didn't write this software.
<hcarty>
hiptobecubic: That's more of a 'feature' of the Makefile than the language
<hiptobecubic>
well i suppose the dependencies aren't properly mapped out then
<hcarty>
If the Makefile isn't structured to be -jN friendly then it doesn't really matter what the underlying language is.
<hiptobecubic>
very true
sivoais has quit [Quit: Lost terminal]
sivoais has joined #ocaml
junsuijin has joined #ocaml
junsuijin has quit [Client Quit]
<Hodapp>
hiptobecubic: Alan Kay was not concerned so much with the focus on objects, but more on how 'object' in general became such a watered-down term that was used to the exclusion of messaging, which he felt was at as much or higher importance to the notion of an object.
<Hodapp>
hiptobecubic: In addition to this, he defined it as referring to "only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things."
<Hodapp>
encapsulation (as is often the purpose of objects + methods), polymorphism, and inheritance are really kind of orthogonal to all that
<Hodapp>
and really the way he defined it is now a bit closer to agent-oriented programming than modern OOP is
<Hodapp>
everyonemines: was that to me?
<everyonemines>
just a comment on OO not ending up as Kay intended
<Hodapp>
is anything in Java the way anyone intended?
<Hodapp>
well, I guess it's almost the way everyone intended, which is part of its problem.
<pippijn>
hiptobecubic: to avoid copying a lot of data, keep your functional objects small
<pippijn>
hiptobecubic: if you have 200 int members in your object, then copying it will copy all 200 int values
<pippijn>
hiptobecubic: but if you organise those 200 int members in sub-objects, then only the pointers to those sub-objects are copied
skchrko has joined #ocaml
ankit9 has joined #ocaml
<everyonemines>
or you could use array refs
<everyonemines>
* arrays or refs
<Hodapp>
everyonemines: that is quite an interesting article.
<pippijn>
arrays are mutable
<everyonemines>
so?
smerz has joined #ocaml
Hussaind has quit [Remote host closed the connection]
<hcarty>
everyonemines: Indeed - thanks for sharing the link
<everyonemines>
:-)
<hcarty>
OCaml's objects support functional updates, so you don't need to copy (much of) anything.
<Hodapp>
what are 'functional updates'?
ulfdoz has quit [Ping timeout: 245 seconds]
<hcarty>
Hodapp: If an object has 200 attributes and you want a new object with only two of those changed, the other 198 will be shared between the objects
<hcarty>
For records, the syntax is: let new_record = { original_record with field_x = new_value }
<hcarty>
The syntax is similar for objects but I don't remember it off the type of my head. It's in the manual in the object section...
<mfp>
let module Lwt = BatOption in lwt x = expr_stmt a in lwt y = expr_stmt b in Some (a +~ b) :-P
<pippijn>
hah
<pippijn>
yeah..
<pippijn>
there should be a generic syntax extension for monads
<mfp>
let! nearly made it
<pippijn>
something that simply uses the >>= that's currently in scope
<mfp>
IIRC it got shot down because of some problem with and bindings (but the need/use for it in Lwt is Lwt's thing, with it not being monadic and all)
<pippijn>
by the way, I tried the lwt thing
<pippijn>
just for fun
<pippijn>
Error: This expression should not be a function, the expected type is
skchrko has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120423211717]]
_andre has quit [Quit: leaving]
Submarine has quit [Quit: Leaving]
<mrvn>
Hmm, this is disapointing: computing a distance map: 6.369427 per second, 0.157000 seconds each, A*: 14.084507 per second, 0.071000 seconds each.
oriba has joined #ocaml
<mrvn>
If I need a goto for 1-2 units then A* is faster but 3+ a full distance map is better. At least for longer paths.
<mfp>
pippijn: Option.bind is inverted :-/
hiptobecubic has quit [Ping timeout: 245 seconds]
<mrvn>
someone wants to implement a Delaunay triangulation for me?
<hcarty>
Or one of the other modules at that level
<mrvn>
yeah. Problem is I need the intermediate structure used to lookup which triangle a point belongs to, too.
eni has quit [Quit: Leaving]
<_habnabit>
iter_triangles ?
<mrvn>
No. One of the algorithms to create the triangulation creates a tree of triangle where you can find the triangle a point is inside of in O(log n).
horatio_cromwell has joined #ocaml
<pippijn>
mfp: ah yeah..
<pippijn>
mfp: that's why I had let (>>=) x f = Option.bind f x in
<thelema>
pippijn: you may be pleased that batteries 2 has BatOption.Monad.bind with the arguments in monad order
<pippijn>
I wonder what the advantage of the "with module Module in" form of pa_monad is vs. the "with Module.bind" form
saml has quit [Quit: Leaving]
uncharted_territ has joined #ocaml
<mrvn>
anyone know of a module for a bidirectional map?
<mrvn>
I need a map of (x, y) <-> dist
<mrvn>
One using hashtbl preferably.
<thelema>
mrvn: on my todo list (for the LRU cache in BatCsche
<pippijn>
is it recommended to use named arguments to functions as much as possible?
<pippijn>
I mean parameters, not arguments
<mrvn>
pippijn: The stdlib usualy provides both
<pippijn>
what's the disadvantage of using them?
philed``` has quit [Ping timeout: 252 seconds]
<pippijn>
s/using/providing
<mrvn>
# let f ~x ~y = x + y;;
<mrvn>
val f : x:int -> y:int -> int = <fun>
<mrvn>
# f 1 2;;
<mrvn>
- : int = 3
<mrvn>
Does the compiler generate better code without labels or why aren't they always used?
<mrvn>
Or is it because the type gets longer because it includes the labels?
<mrvn>
thelema: I was thinking of just using 2 Hashtbl.t. One forward and one backward. Problem is that removing (x, y)<->d needs to only remove that d from the second Hashtbl that maps to (x,y). The d is in no way unique.
<thelema>
you can't do this if the keys in both tables aren't unique
<thelema>
so what do you want the reverse lookup to return?
<mrvn>
thelema: val find_all : ('a, 'b) t -> 'a -> 'b list
<thelema>
eww, multimap in one direction?
<thelema>
I guess you could do that.
<hcarty>
mrvn: Partial application changes a bit if I recall correctly. It also affects your ability to pass functions around directly.
<mrvn>
hcarty: you can do "f ~y:1". But is "f 1" or "f ~x:1" any different?
<thelema>
mrvn: no difference
<hcarty>
mrvn: If you have let f g x = g ~y:x then it makes a difference
<mrvn>
Error: This expression has type x:int -> y:int -> int but an expression was expected of type int -> int -> int
<pippijn>
mrvn: ah. there it is
<pippijn>
that's why..
<mrvn>
hmm, I would have thought that should work.
<pippijn>
I would have, too
<thelema>
yes, I wonder if there's a bug in mantis for this
<mrvn>
# let g = (f :> (int -> int -> int));;
<mrvn>
Error: Type x:int -> y:int -> int is not a subtype of int -> int -> int
<thelema>
or a reason why it can't be done.
<hcarty>
Labels don't affect code generation
<mrvn>
That would be correct syntax, right?
<hcarty>
At least not from the C binding point of view...
<Qrntz>
this generates absolutely exact assembly
<Qrntz>
well, the basic case we have here
<_habnabit>
approximate assembly is a code smell anyway
<mrvn>
How does f y:1 look like in memory?
<mrvn>
Or more specific how does the closure know which slots for its arguments are filled and which pending?
<thelema>
mrvn: probably some slight variant of a normal closure
<mrvn>
I wonder wether it includes a lookup table from name to slot.
<mrvn>
Then again: Error: This expression has type x:int -> y:int -> int but an expression was expected of type y:int -> x:int -> int
<thelema>
probably not with any names, probably just positional
<mrvn>
If it would use a lookup table then that could be allowed.
<thelema>
nah, I bet it's just like records - the names just stand for positions
<mrvn>
thelema: as in (f ~x ~y ~z) with y:1 gives [|0 2|] as indexes?
<thelema>
possibly a bit-vector of what indexes are filled, and an array of filled values
<thelema>
I'm just guessing, though.
<mrvn>
thelema: bit-vector would limit it to x arguments.
<mrvn>
unless it uses multiple values as needed
<thelema>
well, I don't think you can get more named parameters until you've passed values for all existing ones, can you?
<mrvn>
thelema: A function can have more than 32 parameters
<thelema>
yes, but there's already special handling for functions with more than 5
<thelema>
brb, ubuntu upgrade
thelema has quit [Quit: leaving]
<gildor_>
pippijn: oasis can create and install (including META) syntax extension, but using it in the package you are building is a bit trickier, though not impossible
<gildor_>
pippijn: basically you have to add CCOpt: -ppopt _build/src/pa_foo.cma and pray for this file to be created before you call it
<gildor_>
(i.e. that the build order is good, even if you didn't specify it)
<pippijn>
ah
<pippijn>
I think I need to make separate packages, thought
<gildor_>
but that is a work in progress. I create syntax extension myself and want to have something that works (TM) in the future, for my own use
<mrvn>
gildor_: extunix adds a dependency on the pa_foo.cma file if I read the code correctly.
roha has joined #ocaml
<gildor_>
mrvn: oh yes, this is not impossible to do, you just add to write extra things in myocamlbuild.ml -- like you will do without oasis
<gildor_>
ahhh, running oasis 0.1.0~alpha3 again (though it gives me an error that I need to solve when trying to upload packages)
<mrvn>
mfp: Isn't that more a reverse binding than two-way?
<mrvn>
mfp: let pattern = value in expression ===> (fun pattern -> expression) value, let! pattern = value in expression value (fun pattern -> expression). looks like the reverse.
<pippijn>
I want this syntax: match foo with Module.({ a; b; }) -> ()
<mrvn>
# let foo p = let P.({ x; y }) = p in x + y;;
<mrvn>
Error: Syntax error
<mrvn>
me too
<mrvn>
Since let make x y = P.({ x; y }) works the other way around should work too.
struktured has joined #ocaml
<pippijn>
yes
<pippijn>
the problem is that P.(...) is an expression
<pippijn>
but I think it should be allowed in a pattern
<mrvn>
Why is that an expression? Should be more like a namespace.
<pippijn>
it's like (let open P in ...)
<mrvn>
P.({ x; y }) should be identical to { P.x; P.y }