flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
guillem has quit [Remote closed the connection]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
rogo has joined #ocaml
seafood has quit []
redocdam has quit []
TaXules has quit [Remote closed the connection]
TaXules has joined #ocaml
CRathman has joined #ocaml
CRathman has quit [Client Quit]
CRathman has joined #ocaml
jeddhaberstro has quit []
Proteus__ has joined #ocaml
tvn1981a has joined #ocaml
Kopophex has quit ["Leaving"]
Proteus_ has quit [Read error: 113 (No route to host)]
mikezackles has quit [Read error: 110 (Connection timed out)]
struktured_ has joined #ocaml
bluestorm has quit [Remote closed the connection]
seafood has joined #ocaml
marmotine has quit ["mv marmotine Laurie"]
det has joined #ocaml
ygrek has joined #ocaml
struktured_ has quit [Read error: 110 (Connection timed out)]
mfp has quit [Read error: 104 (Connection reset by peer)]
ygrek has quit [Remote closed the connection]
tvn1981a has quit [Remote closed the connection]
ygrek has joined #ocaml
seafood_ has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
thelema has quit [Read error: 110 (Connection timed out)]
<palomer> flux, you around?
<flux> yes
Associat0r has quit []
CRathman has quit [Connection timed out]
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
seafood has joined #ocaml
seafood_ has quit [Read error: 110 (Connection timed out)]
asmanur has joined #ocaml
mfp has joined #ocaml
vixey has joined #ocaml
CRathman has joined #ocaml
fy___ has joined #ocaml
fy___ has quit [Client Quit]
CRathman has quit [Connection timed out]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 54 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood has quit [Connection timed out]
asmanur has quit [Read error: 110 (Connection timed out)]
jeddhaberstro has joined #ocaml
seafood has joined #ocaml
seafood_ has quit [Read error: 110 (Connection timed out)]
bluestorm has joined #ocaml
asmanur has joined #ocaml
Watza has joined #ocaml
<Watza> J'ai trop mal dormi
<Watza> j'espère que vous, vous avez bien dormi !!
<Watza> allez bizou la room
Watza has left #ocaml []
<fremo_> </mylife>
Yoric[DT] has joined #ocaml
Linktim has joined #ocaml
jeddhaberstro has quit []
Gionne has joined #ocaml
knucker has joined #ocaml
knucker has quit [Client Quit]
jlouis has joined #ocaml
ofaurax has joined #ocaml
knucker has joined #ocaml
Gionne has quit ["Leaving"]
<knucker> Hello, in http://pastebin.com/m56ebbcc5 I get a warning that I cannot understand It says that I am not matching opt_args (a string list) exhaustively... I am matching on [], [opt_arg], _ ... any clues?
<bluestorm> knucker:
<knucker> I've placed a comment "BEGINNING OF WARNING" for where the warning is relevant... and placed the full compiler warning at the end
<bluestorm> you don't match the more-than-one-element case
<bluestorm> [] is the empty list and [opt_arg] is a singleton list
<bluestorm> two-element liste and more are not matched
<knucker> I'm matching _
<bluestorm> aah
<bluestorm> indentation failure
<bluestorm> | _ -> goes for the "try .. with
<bluestorm> use a begin .. end around your try with construct
<knucker> ?
<bluestorm> match ... with ... -> try ... with .. -> ... | ... -> ...
<knucker> ahhh gotcha...
<bluestorm> the last pattern is attached to the "try ... with" match clauses
<bluestorm> i should have seen that earlier
<bluestorm> but your hell-a-lot-more-than-80-columns lines distracted me
<bluestorm> :-'
<knucker> Fixed! thanks
<bluestorm> i suggest you try indenting a bit less
<bluestorm> 8-indentation is not really feasible in a functional language, where there is quite a lot of nesting
redocdam has joined #ocaml
<bluestorm> i think the ocaml de facto standard is 2, but you can use 4 if you're used to bigger indents
<knucker> 8 indentation? These are tabs... it's probably just pastebin
<knucker> OcaIDE renders these as 2's
asmanur has quit [Remote closed the connection]
<bluestorm> ah
<bluestorm> "why you shouldn't use tabs for indentation", explained to kids
asmanur has joined #ocaml
<bluestorm> are you an Erlang user ?
<knucker> There's a very big debate.... I generally prefer spaces.. just never bothered changing the settings in Eclipse :-)
<knucker> Yeah, I do use erlang.. there I stick to spaces (I got around changing preferences)
<bluestorm> i knew i had already seen that _obj pattern trick somewhere :p
<knucker> It's the two languages I am learning at the same time.. I wish it would be easy to use them together... but hell.. I'm just starting
<knucker> That's mentioned in the Ocaml oreilly PDF too, though
<bluestorm> hm i've seen some Erlocaml noise some time ago
<knucker> ...at least I think... if not, it's a good practice _regardless.. (IMO)
<knucker> OCaml is very interesting.. shame it doesn't support proper threads... doing a heavy-weight RPC call isn't always practical if all you want to do is use another CPU
<bluestorm> you can use fork
<knucker> fork, as in C-Unix fork?
<bluestorm> yes
* knucker shivers with distaste
<bluestorm> :p
<bluestorm> actually there is an OCaml module implementing the Thread modules (and more) over processus with fork
<knucker> I'll have a read up.. you still don't address the main advantate of threads... being able for two things to read the same data
jeddhaberstro has joined #ocaml
tomh has joined #ocaml
jeddhaberstro has quit []
CRathman has joined #ocaml
CRathman has quit [Remote closed the connection]
knucker has quit ["Leaving"]
bzzbzz has joined #ocaml
asmanur has quit [Read error: 60 (Operation timed out)]
jeddhaberstro has joined #ocaml
zopelander has joined #ocaml
zopelander has left #ocaml []
<bluestorm> would anyone be interested in a pa_where syntax extension, allowing unconstrained "where" backward-declarations in the classical syntax ?
<vixey> why would that be used instead of let?
<bluestorm> because it allows top-to-bottom declarative style
<bluestorm> it is not meant to replace let, but having both is useful
<bluestorm> the syntaxic drawback is another "dangling" case : let a = b in c where d = e and f = g
<bluestorm> (and i'm ashamed to admit that as long as i haven't actually tried the camlp4 implementation, i have no idea how the ambiguity will he resolved, even if i could probably enforce one direction or the other with levels)
<bluestorm> vixey: when writing/using haskell, don't you feel that having both "let" and "where" declarations is useful ?
<bluestorm> s/using/reading/
Associat0r has joined #ocaml
<bluestorm> hm
<vixey> I think it let rec
<bluestorm> syntaxic problem : "where" at toplevel would force ";;" on the precedent let-declaration
<vixey> in haskell they use a lot of indentation for the parsing
<bluestorm> vixey: mutual recursion can emulate top-to-bottom style but it add subtleties, bugs, and comprehension difficulties
<vixey> wheres are mutually recursive
<vixey> I was imagining,
<bluestorm> hm
<vixey> X where Y as let rec Y in X
<bluestorm> nope, you would need an explicit "rec" declaration
<bluestorm> x where Y => let Y in X
<bluestorm> hm
<bluestorm> let's force ;; for now
<bluestorm> btw
<bluestorm> i think it would be feasible to write a dangling-warning extension
<vixey> it sounds like a lot of work to me
<bluestorm> that is, an syntaxic extension that would detect dangling case and check that the indentation is consistent with the actual meaning
<bluestorm> vixey: wich one ?
<vixey> adding where and such
<bluestorm> hm, "where" should not be very difficult, camlp4 is a flexible tool
<bluestorm> l
jeddhaberstro has quit []
<flux> bluestorm, haskell can better get on withthe where-syntax due to lazy evaluation
<flux> let a = print_endline "foo" where _ = print_endline "bar"
<flux> I suppose whomever writing that would be evil, though ;)
seafood_ has joined #ocaml
<flux> now, lets say if all the identifiers on the right side of where were defined with let foo = lazy(expr) and when referred on the left side they would convert into Lazy.force foo.. ;-)
<vixey> Has anybody added something like do notation?
<bluestorm> vixey: yes
<bluestorm> btw
<bluestorm> do you know if someone has a syntax extension for let! monadic notation in OCaml ?
<bluestorm> it is nicer than the Haskell do notation
<bluestorm> flux: i don't think strictness would be a problem
<vixey> I've not heard of this notation
<bluestorm> i mean
<bluestorm> vixey: instead of
<bluestorm> a <- b
<bluestorm> you write
<bluestorm> let! a = b in
<flux> bluestorm, do you think my example would not compile, or that it is clear to understand?
<bluestorm> (it is nicer in OCaml because it is more coherent with the syntax, whereas "<-" makes sense in Haskell because it is similar to the declaration syntax)
<mfp> <bluestorm> would anyone be interested in a pa_where syntax extension, allowing unconstrained "where" backward-declarations in the classical syntax ? -> I once wrote a left-associative pa_where (not right assoc as in the revised syntax IIRC)
<bluestorm> any code left ?
<mfp> let! looks pretty good
<vixey> >>= \o ->
<flux> bluestorm, would it only change the <- to let! or also some other aspects?
<mfp> let me see....
<bluestorm> flux: i think that top-to-bottom evaluation may have side-effects, and that you have to admit that :p
<bluestorm> for example
<mfp> the good thing about let! is that you don't need let () = foo () in ... anymore
<flux> bluestorm, yes, top-to-bottom is what one expects in ocaml, and where breaks it?
<bluestorm> do_something_with a_value where a_value = initialize_something (); blah
<mfp> (i.e. ';' doesn't change)
<flux> besides didn't pa_monad actually prefer using <-- instead of <- in order to get better error messages or something? let! would fix that too.
<bluestorm> (hm, i actually use "top to bottom" for a where-using declarative style, so there may be a confusion here :p )
<mfp> <-- instead of <- because there's already a use for <-
<bluestorm> (i you can do let main_function = .... wher auxiliary_function = ... and other_small_function = ...
<bluestorm> )
<bluestorm> hm
<bluestorm> too much typos : lunch time !
<mfp> bluestorm: found it
<mfp> some version of "it", at least
<mfp> that version uses where a = foo and b = bar for non-recursive, where rec a = ... and b = ... for recursive bindings
guillem has joined #ocaml
seafood has quit [Read error: 110 (Connection timed out)]
seafood_ has quit []
ofaurax has quit ["Leaving"]
BipedMan_ has quit [Read error: 110 (Connection timed out)]
<bluestorm> mfp: that's fine
<bluestorm> i would like to extend it to structure items
<bluestorm> but i'm not terribly happy with the "just add toplevel 'where' " idea
<bluestorm> (as let a = b where c = d where e = f would be dangerously dangling)
<bluestorm> in a revised syntax context, where let = ... and where value = ... could some the problem
<bluestorm> but it is both heavier an incoherent with the classical syntax
jeddhaberstro has joined #ocaml
<mfp> bluestorm: hmm adding it for structure items.... maybe simply let foo () = ... and bar () = .... where baz x = ... ?
<mfp> some problems with the monomorphism restriction though
rstites has joined #ocaml
<bluestorm> how so ? if you translate where into let, how does the restriction happen here ?
<bluestorm> hm
<bluestorm> the problem is that
<bluestorm> bar () = ... where baz x = ... should be parsed as bar () = (... where baz x = ...)
<mfp> let a = ... and b = ... loses polymorphism somewhere
<mfp> let bar () = .... where would, and bar () = ... where wouldn't
<mfp> "and" disambiguates
<bluestorm> ah
<bluestorm> that's clumsy :D
<mfp> the point of where for str_items is sharing a helper func for several such items, right? we do need something to differentiate let a = (... where ...) from top-level where
<bluestorm> hm
<mfp> plus how would where be scoped otherwise?
<bluestorm> i'd use toplevel-where as a global declaration
<bluestorm> hm
<bluestorm> you're right that local sharing makes more sense
<mfp> what about some other keyword for str_items, say a top-level "with"
<bluestorm> we should keep with for higher purposes, aka type-conv
<bluestorm> mfp: actually i quite like the where let ... = ... and where value .. = solution
<bluestorm> as it is extensible to some other think like where module and where type
<bluestorm> (where type being moderately useful as we have implicit recursion already)
<mfp> hmm only affects it if "with foo = ..." were placed right after a type declaration, which doesn't make much sense (we'd have let in that case)
<bluestorm> the problem is that "where value" would hardly make sense in classical syntax
<bluestorm> (is the "where let" overhead acceptable ? i think it is)
<mfp> a bit heavy :/
<bluestorm> mfp: an other keyword could be a solution but i don't think "with" is a good idea
<bluestorm> hm
<mfp> and where foo = ... vs. where value foo = ....?
<bluestorm> yes
<bluestorm> the idea being that "where value" is naturally toplevel
<mfp> without let
<bluestorm> ah
<bluestorm> we could allow both "where let ..." and "where ...", saying that "let" is a reasonable default
<mfp> this supports the 3 behaviors, in-expr where foo = ... w/o overhead, let x = .. and y = ... where .... for shared aux function, and top-level struct items with where
<mfp> as long as you can still use where ... ;-)
<bluestorm> the bonus is that it is extensible to "with module ..." and such in the future if it makes sense
<bluestorm> hm
<bluestorm> i quite like that consensus : modulable let and "let" default
<mfp> the only problem I see is the extra reserved word in the orig syntax
<bluestorm> s/modulable let/modulable where/
<mfp> (value)
<mfp> ah where val
<bluestorm> ah
<bluestorm> great :]
<bluestorm> are you interested in doing the implementation, or should i try something now ?
<mfp> feel free to code the str_item extension :-)
<bluestorm> hm btw
<bluestorm> i think we should advertise our syntax extensions more
<bluestorm> (say, on the mailing list)
<mfp> everything should be advertised more
<mfp> there's a sort of mental block there
<mfp> posting mere ANNs (instead of thoughtful discussions about the type system) to the ML feels sort of wrong
<bluestorm> hm :p
<mfp> there's much more code being written than the world knows
<mfp> the example to follow here is Haskell
<bluestorm> haha
<bluestorm> paste IRC notification ?
<mfp> ppl have no problem uploading semi-trivial (but useful) things to Hackage
<bluestorm> i'm always afraid of that idea when using the haskell paste, but being able to criticize the code of anonymous ocaml beginners in the comment sounds like fun :-'
<mfp> haha yes IRC notification...
<mfp> of the links submitted to reddit
<Smerdyakov> I dislike the free-for-all populist atmosphere of the Haskell community.
<mfp> the way dons does on #haskell all the time to gather votes :-P
<vixey> haha
<bluestorm> Smerdyakov: "free-for-all" ?
<Smerdyakov> bluestorm, no quality standards
<bluestorm> (my idiomatic "free for all" expression is a Quake gaming term, not really compatible with "populist" :p )
<Smerdyakov> bluestorm, no organization
<bluestorm> ok, i see
<Smerdyakov> BTW, you guys had might as well not waste your effort, since both ML and Haskell will be obsolete soon. ;)
<mfp> I find it irritating at times (trivial stuff being upvoted or announced as a huge leap for mankind only because it's Haskell)
<vixey> Smerdyakov: tell me more?
<bluestorm> vixey: Coq + pwnzor
<Smerdyakov> vixey, I predict the future is split between languages with non-trivial type-level computation and DSLs.
<vixey> mfp: I heard that "using call/cc is scheme is daily activity but using callCC in haskell requires a PhD"
<mfp> but I'm envious of the high-speed devel cycle, with frequent uploads to hackage
<vixey> daily activity/run of the mill
<bluestorm> vixey: there is a funny paradoxical thing here
<bluestorm> haskell users tends to be highly educated
<bluestorm> but they're quite noisy when they create, say, a darcs-to-RSS program
<bluestorm> that said
<mfp> right, the simple things everybody else does
<bluestorm> i don't want to bash haskell users, the community also has very good things and the language is of course interesting
<mfp> but then somebody write it in Haskell and it's a huge discovery
<bluestorm> hm
<mfp> *writes
thelema has joined #ocaml
<bluestorm> i'm quite admirative of the accessible computer science vulgarization that some people in the Haskell community do
<vixey> Smedyakov, ok but who is going to replace Prolog, that's what I want to know :)
<bluestorm> (think sigfpe)
<vixey> Smerdyakov* sorry
<bluestorm> and i'm very happy the planet initiative led me to discover such things in OCaml
<bluestorm> ( the jane street blog posts are usually quite interesting too )
<bluestorm> hm btw
<bluestorm> the jane street summer projects are coming to an end
<mfp> there's cool stuff happening in lambda-land indeed
<bluestorm> i've seen some quite cool final reports
<bluestorm> pa-do, awful name for Delimited Overloading, looks like very useful
<bluestorm> ( Float.(1 * 2 + sqrt 3), reloaded )
<flux> would it be useful with monads?
<mfp> is that the Jane St. one or the other one?
<bluestorm> Jane St. one
<mfp> -> IIRC there were 2
<bluestorm> flux: i was thinking of using it for F# workflows
<mfp> one in ocamlcore
<bluestorm> wich are a generalisation of monadic DSL
<bluestorm> hm
<flux> bluestorm, F# workflows?
<mfp> Float.(1 * 2 + sqrt 3) hmm it turns literal ints into floats too?
<flux> anyhow, I think I'm most interested in the ocamlwizard project
<bluestorm> mfp: yes
<mfp> I'm not sure that's a good thing
<bluestorm> of course, Option.(foo >>= return bar) is already feasible with pa-do
<bluestorm> ahem
<bluestorm> foo >>= fun bar -> return baz :-'
<bluestorm> and i think they have the necessary machinery to write something like Option.(let! bar = foo in return baz)
<bluestorm> but that would need the introduction of the let! keyword as an additional syntax extension
<mfp> after all pa_monad does perform with Option bar <-- foo; Option.return baz already
<flux> then there's pa_openin - its main prblem is that is messes up tuareg's indentation ;)
<bluestorm> flux: pa_do can do a little more than that
<bluestorm> for example you can specify literal int conversoin
<bluestorm> (ok, not very useful for monads)
<flux> bluestorm, are such conversions compile- or runtime?
<bluestorm> hm
<hcarty> bluestorm: Are the final reports for the projects available somewhere? They don't seem to be on the Jane St. OSP site
<bluestorm> default conversions are runtime (you convert 1 in, say, foo_of_int 1)
<bluestorm> but you can optimise it by hand for compile-time doable conversions
<bluestorm> hcarty: hey, i was looking for you some hours ago, to tell you about the pa-do project
<bluestorm> i found the OSP mailing list
<bluestorm> where they have two or three reports
<bluestorm> ( pa-do, a succint report of the GC thing, and Qt-Caml, iirc)
<bluestorm> i guess the other ones are coming soon
<hcarty> bluestorm: Cool, thanks
<bluestorm> flux: but pa-do is interesting as you can do on-the-fly rewriting of the inside expression
<hcarty> I haven't gone through the irssi log yet... there has been a lot of activity over the last 12 hours
<bluestorm> for example we could, say, add the let! keyword as a "let" alias in the Ocaml syntax
<bluestorm> and then change the meaning inside some of the Foo.(...) forms
<mfp> bluestorm: where's the ML? google doesn't seem to know about it
<bluestorm> so instead of a monad-specific syntax extension, you have a generic DSL capacity
<vixey> is Foo.(...) different to <:foo<...>> ?
<bluestorm> yes, <:foo< ... >> is quotation in Calmp4
<bluestorm> while Foo.(...) is meant to be used in non-camlp4 user code
<mfp> thanks
ygrek_ has joined #ocaml
<bluestorm> hm
<mfp> I was looking for "OCaml summer of code" but this isn't google's
<bluestorm> pa-do could also be used to do in-place inline of binds and return
<bluestorm> as Yoric[DT] was doing for performance reasons
ygrek has quit [Remote closed the connection]
<rstites> Is it possible to use DDD (Data Display Debugger) with the Ocaml Debugger?
pango_ has quit [Remote closed the connection]
<flux> rstites, it should be possible with ocamlopt-compiled binaries. I however haven't tried it (or gdb).
<rstites> Thanks. I'll try that.
pango_ has joined #ocaml
jeddhaberstro has quit []
<hcarty> pa_do certainly looks nice. And pa_infix look like a useful result from the project as well
<bluestorm> hcarty: i have mixed feelings about breaking the OCaml fixity/precedence conventions
<bluestorm> on one hand it will be certainly be handy (for example we could use F#-compatible >> and |> piping combinators)
<bluestorm> on the other, having a mixing of strict standard rules and lousy exceptions may become quite a nightmare
<bluestorm> mfp: i get some delicate conflicts :p
<hcarty> I like that it is possible, but I agree that it has the potential for horribly unreadable code
<bluestorm> let a = b where let c = d where val foo = bar works
<bluestorm> let a = b where c = d ;; where val foo = bar works
<bluestorm> but let a = b where c = d where val foo = bar explodes in flames
<hcarty> Hopefully programmer restraint will kick in at some point
<vixey> very worrying
<bluestorm> hcarty: hm
<bluestorm> you shouldn't count on that imho :D
jeddhaberstro has joined #ocaml
<bluestorm> actually they hardcoded the interdiction for users to overload the already defined OCaml infix identifiers
<hcarty> I may have to change the syntax of the extension I've been using... Module.(...) has acted like pa_openin. With pa_do it means something different. Though I suppose pa
<hcarty> _do could be modified to do that as well
<bluestorm> no need to modify pa_do actually
<bluestorm> hm
<bluestorm> there is a lid hook
<bluestorm> lemme check you can also hook on qualified names or uid
Kopophex has joined #ocaml
<bluestorm> hm
<bluestorm> no there isn't
<bluestorm> but you could probably do that with add_expr
<hcarty> I may make a feature request
mishok13 has joined #ocaml
ygrek_ has quit [Remote closed the connection]
<hcarty> I've found Foo.(...) to be quite useful, particularly when accessing record fields to avoid a.Foo.x + b.Foo.y and similar
ygrek_ has joined #ocaml
<bluestorm> hm
<bluestorm> i think you could do that on a per-module basis with the Delimited_overloading.add_expr hook
<bluestorm> but it would probably a better idea to enable that globally
<bluestorm> mfp: modulo a little stream-testing hack, i got it working
<hcarty> Yes, I think it seems messy otherwise
<hcarty> Of course, all of this syntax manipulation can get quite messy...
* vixey feels this way also..
<bluestorm> hcarty: i don't think so
<bluestorm> i'm quite confident actually that pa_do could become an efficient reponse to the "no + overloading" complains
<bluestorm> wich are a quite major part of the complains i hear about OCaml actually
<hcarty> bluestorm: I certainly agree
<bluestorm> (people tends to wrap that into higher purposes such as "no overloading" or "no subtyping of the base types" or what not, but what they really want is only a + barely working on floats , int32 and bigints)
<bluestorm> you should make your proposal about the implicit opening
<hcarty> I'm writing up a feature request for the forge tracker now
<flux> implicit opening?
<hcarty> flux: Module.(expr) would act like pa_openin was used in (expr), in addition to the rest of the pa_do translation
<bluestorm> hm
<bluestorm> with one more delete we could even have that revised syntax compatible
mikezackles has joined #ocaml
<mfp> bluestorm: great, reading it
vixey has quit [Read error: 104 (Connection reset by peer)]
<bluestorm> ( remove the .html to have the plain source )
vixey has joined #ocaml
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
<bluestorm> o_O here comes the nasy bug
<bluestorm> let a = b where type u = v
<bluestorm> +t
<bluestorm> ah
<mfp> I'm still trying to understand why where type u = v is allowed at all
mishok13 has quit [Read error: 104 (Connection reset by peer)]
<bluestorm> actually
<bluestorm> i think that it is type u =v where
<bluestorm> the where get eaten by the new str_item rules, then it fails, but nothing happens :]
<bluestorm> haha
<bluestorm> turning value_val into "val" seems to fix the problem :D
jeddhaberstro has quit []
<bluestorm> magic bugfix uploaded : http://bluestorm.info/camlp4/dev/pa_where.ml.html
<mfp> value_val being value_val: [ [ "val" -> () ] ], this is puzzling
<bluestorm> we should probably ask ertai
mishok13 has joined #ocaml
<bluestorm> mfp: with the current behavior
<bluestorm> let a = b and c = d where e = f get parsed as let a = b and c = (d where e = f)
<bluestorm> is that a problem ?
kelaouchi has quit [Read error: 104 (Connection reset by peer)]
<mfp> bluestorm: this prevents the use of let ... and ... where .... for shared aux functions
<mfp> so yes, a bit of a problem
<bluestorm> how would you translate it ?
<mfp> it seems I didn't consider let ... and ... originally (or I did it in another version, dunno)
<bluestorm> let a, c = b, d where e = f ?
<bluestorm> hm
<bluestorm> i get your point about the monomorphism restriction :p
<bluestorm> mfp: i don't think there is an easy ocaml translation for the "shared aux functions" idiom
<bluestorm> that is, simple enough that it feel natural as a mechanic translation
<mfp> yeah, it seems you'd need let (bar, baz) = let foo = ... in ...., .... which sucks
<bluestorm> using the default easy implementation (current behaviour) and letting the user use his own sharing-fu looks like a reasonable choice
<mfp> hmm given pa_where.cmo, reasonably good-looking literate OCaml could be produced easily
<mfp> w/o extra markup, just > where val foo x = ....
<mfp> as in .lhs
<bluestorm> is that of any use ?
<mfp> blogging ;-))
<bluestorm> i agree saying at the beginning of a blog post "this text is a compilable program" is very classy
<mfp> isn't this the reason why Haskell's got it?
<mfp> ;)
<bluestorm> hm
<bluestorm> you should give your email, so that once i post this to the mailing list, you can get cheap viagra too
rwmjones has joined #ocaml
<mfp> great
<bluestorm> btw
<bluestorm> if you're in a writing mood, i wouldn't mind if you wrote the ML post yourself :-'
<bluestorm> my english is not so great and that tends to get stressful when doing "important" (sic) things
vixey has quit []
<mfp> oh um I'm still subject to my self-imposed caml-list silence
<mfp> one extra post and I'll get into the double digits (!)
<mfp> you see, this is what I referred to before
<mfp> breaking caml-list's silence for anything else than some deep typing issue feels wrong :-P
<bluestorm> hm
<bluestorm> so i'll do it
<mfp> if you don't, I'll post tomorrow :)
<mfp> huh, you shouldn't trust me on this, I'm realizing I've got outgoing mail that's been pending for several months
Linktim_ has joined #ocaml
ikatz has quit [Read error: 110 (Connection timed out)]
<bluestorm> mfp: done
<bluestorm> half an hour for a mail, i'll do better next time
<mfp> thanks
<mfp> it often takes me much longer :-S
<bluestorm> but you don't use infamous and motivating out-of-context quoting techniques
Linktim has quit [Read error: 110 (Connection timed out)]
vixey has joined #ocaml
vixey has quit [Connection reset by peer]
vixey has joined #ocaml
<rwmjones> bluestorm, can you put a LICENSE file in there, otherwise Debian & Fedora can't package it
Asmadeus has joined #ocaml
<rwmjones> bluestorm, does this work:
<rwmjones> f a c where let a = b and c = d
<rwmjones> ?
<bluestorm> let a = b and c = d in f a c
<bluestorm> the LICENSE file should contain the whole GPL text ?
<rwmjones> bluestorm, just a sec
<gildor> bluestorm: what about hosting your project on forge.ocamlcore.org ?
<bluestorm> gildor: why not
<bluestorm> i haven't used any SCM yet
<bluestorm> mfp: do you have a forge account ?
* rwmjones downloads every fedora kernel RPM ever made ...
<mfp> bluestorm: nope, will register if needed
<rwmjones> bluestorm, so where let ... and ... does work?
<bluestorm> yes
<gildor> bluestorm: if you want to create a project, do it quickly, i am about to leave for vacation for 2 weeks -- after that this will be other forge admin that can allow creation of the project
<bluestorm> you can use "where" instead of "where let"
<bluestorm> gildor: ok
<rwmjones> ah that's better then
<bluestorm> let's find where the project creation page is
<gildor> i think i go to bed in 1 or 2 hours (leaving early tomorrow morning)
<gildor> go to "My Page"
<bluestorm> yeah, found it
<gildor> "Enregistrer un projet"
<mfp> infamous quoting techniques -> I guess I deserve it. All in all, it's a good thing you sent the ANN. I'd just have said that the revised syntax/Haskell's where can be elegant at times, that it's a pity it's not available in the original one, and where the extension can be dled from.
<rwmjones> bluestorm, you need to s/Red Hat/.../ in that file actually
<bluestorm> mfp: isn't there a link at the end ?
<mfp> bluestorm: what I mean is that if I had posted the ANN I'd have given much less info than you did
<mfp> so your post is better than what I would have written
<bluestorm> « Please describe your Registration Purpose in a more comprehensive manner »
<bluestorm> that was is funny
<bluestorm> s/was/one/
<bluestorm> gildor: is there a lower size limit ? 300 words did not sound that bad
<bluestorm> (ok, i admit i have absolutely no idea of what should be written here, i mostly pasted the meaningful part of the mailing-list annoucement)
jeddhaberstro has joined #ocaml
vixey has quit []
<gildor> bluestorm: that is only to explain why it is interesting to be hosted on the forge
<gildor> people wrote thing like "to use svn"
<gildor> i don't think there is a lower size limit
lispy has left #ocaml []
<bluestorm> hm
<bluestorm> strange
<bluestorm> i removed the pasted part
<bluestorm> and now it is much shorter and works
<bluestorm> anyway, gildor , project sumbitted
<gildor> and project approved
<gildor> the scm will be setup in the next cron job
<bluestorm> rwmjones: i also uploaded (same URL) an archive with a LICENSE file
<mbishop> Man, this scheme interpreter in OCaml is impressively full features heh
<bluestorm> how does it goes performance-wise ?
Anarchos has joined #ocaml
<Anarchos> hello everybody
<mbishop> not sure
<bluestorm> mfp: now that the project is created, you should try to get an account, so that you can benefit from requests, complains, bugs and angry users too
fyfy has joined #ocaml
fyfy has quit [Read error: 104 (Connection reset by peer)]
<mfp> bluestorm: OK, registered as mfp. Do you need me to request to join the project or can you do it directly?
ygrek_ has quit [Remote closed the connection]
<bluestorm> no idea
GustNG has quit [Read error: 104 (Connection reset by peer)]
<mfp> I'm requesting it through the sys then, you should receive an email with approve/deny links shortly
<bluestorm> done
<bluestorm> i uploaded the two files
tomh has joined #ocaml
fy___ has joined #ocaml
fy___ has quit [Read error: 104 (Connection reset by peer)]
fy___ has joined #ocaml
<rwmjones> thanks
<Anarchos> i am implementing a jvm in ocaml :) interesting exercise
<hcarty> Anarchos: Then, using ocaml-java, you can have a jvm running ocaml running a jvm...
<Anarchos> yes :)
<Anarchos> i do it because i ported ocaml to beos, but there is still no java !
<bluestorm> my hat to the one allowing ocaml to run a jvm running ocaml
<Anarchos> i don't guarantee performance though
Yoric[DT] has quit ["Ex-Chat"]
Anarchos has quit ["Vision[0.8.5-0418]: i've been blurred!"]
<mbishop> a JVM in OCaml? neat
fy___ has quit [Read error: 110 (Connection timed out)]
Linktim_ has quit ["Quitte"]
seafood has joined #ocaml
<jeddhaberstro> Does the books "Developing Applications With Objective Caml" actually teach functional programming, or does it just teach the syntax of OCaml, and it's standard library?
<bluestorm> jeddhaberstro: it does, to some extent
<bluestorm> i think it's a good introduction if you're new to functional programming
<jeddhaberstro> k
<jeddhaberstro> Do you know of a better to place to learn functional programming?
<jeddhaberstro> (preferably using OCaml or some Lisp variant language to teach it)
<bluestorm> i think OCaml is the best language out there to learn (typed) functional programming from the imperative land
<bluestorm> and this book is a good introduction to the language
<jeddhaberstro> ok
<jeddhaberstro> thanks
<bluestorm> an other often cited document for learning OCaml is http://files.metaprl.org/doc/ocaml-book.pdf
<jeddhaberstro> thanks
<jeddhaberstro> which is better?
jlouis has quit ["Leaving"]
<bluestorm> i don't know
<bluestorm> i have only read the first one
<jeddhaberstro> ah, ok
<bluestorm> both are good documents : what you will need is time and good questions
gildor has quit ["leaving"]
mishok13 has quit [Read error: 110 (Connection timed out)]
mishok13 has joined #ocaml
<jeddhaberstro> I think I'll take my chances with the first one :)
<bluestorm> rwmjones: your reaction speed is impressive, but i a bit ashamed of the little testing the extension has received yet
<bluestorm> i mean, there is an wanna-be-exhaustive test battery in the archive, but that's not "real code"
<bluestorm> that said, i don't except any bug (the implementation is not very complex), but you never know
<bluestorm> i'm currently writing something that will use it, so that would make some real code
<Asmadeus> Well, I think most can live pretty well without it so I won't even bother trying it. That being said, it's true that it sometimes feel more natural and can be "nice", but... Well, I'm not being negative, but I don't know if there will be that many users
<Asmadeus> Only time will tell :)
CRathman_ has joined #ocaml
<bluestorm> Asmadeus: i'll use it, and that's a very good starting investement in "user hapiness feedback"
<bluestorm> (do you sometimes read Haskell ? it's after a little haskell meal that the urge for "where" is the strongest)
<Asmadeus> Yeah, that's what I was too lazy to write afterall :P One's mostly coding for themselves
crathman has joined #ocaml
CRathman_ has quit [Client Quit]
crathman has quit ["ChatZilla 0.9.83 [Firefox 3.0.1/2008070208]"]
<jeddhaberstro> where can the accompanying source-code to the exercises and example applications for the book be found?
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
<bluestorm> jeddhaberstro: probably in your head :p
<jeddhaberstro> :P
<bluestorm> ( no kidding, PDF are a pain in the ass, but writing the code source read in the lecture yourself is probably one of the best training to get used to the syntax quickly )
<jeddhaberstro> oh, i'll type it all out, i just wanted to look at some of the programs now and read through it
<bluestorm> ah
<xevz> http://ocaml-tutorial.org/ is quite good for being as short as it is... :)
<bluestorm> jeddhaberstro: http://caml.inria.fr/about/taste.en.html maybe
<jeddhaberstro> nope :(
<bluestorm> btw, if you want to use the interactive toplevel (wich imho is really great for beginners), you should install a line-editing tool such as ledit or rlwrap
<bluestorm> hm
<jeddhaberstro> I'm using textmate as my editor, then just copy and pasting into the toplevel for now
<bluestorm> hm
<jeddhaberstro> which works well enough for now
<bluestorm> hostile operating system spotted :-'
<jeddhaberstro> :P
seafood_ has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
<jeddhaberstro> will be back in a few
knucker has joined #ocaml
<mbishop> Why does OCamlForge have a code snippets page with a bunch of other languages, but not OCaml?
<mbishop> I thought the point was like, putting OCaml code snippets (as well as other language snippets) but it seems to be just for other languages
<bluestorm> mbishop: OCamlForge is a recent initiative, so everything is not as polished at it could
<bluestorm> this is just the generic Forge software, wich provides this functionality
<bluestorm> and you must have noticed that there is _no_ code snippet in any language posted right now
<mbishop> yeah
<mbishop> I wanted to post some ocaml snippets :(
<bluestorm> let's use "Other Languages" for now
<bluestorm> you're right that the Forge could be tailored for the more specific use of the OCaml community
<bluestorm> but it seems gildor just left for holydays, so we should not except anything right now
Asmadeus has quit ["nightynight !"]
dobblego has left #ocaml []
guillem has quit [Remote closed the connection]
knucker has quit ["Leaving"]
mikezackles has quit [Connection timed out]