shortcircuit has quit [Read error: 104 (Connection reset by peer)]
shortcircuit has joined #ocaml
shortcircuit has quit [Read error: 104 (Connection reset by peer)]
shortcircuit has joined #ocaml
<orbitz>
hardcopy: hi
<hardcopy>
how are you?
<orbitz>
i'm swell youreslf?
<hardcopy>
good
AxleLonghorn has left #ocaml []
<orbitz>
good talk
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
palomer__ has quit [Read error: 104 (Connection reset by peer)]
dobblego has quit ["Leaving"]
|jeremiah has joined #ocaml
<ikatz>
quit
ikatz has quit ["Killed (einride (requested by panasync))"]
ikatz has joined #ocaml
hardcopy has quit []
love-pingoo has quit ["Connection reset by pear"]
pango has quit [Excess Flood]
seafood_ has joined #ocaml
dibblego has joined #ocaml
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
optikal has quit [Read error: 104 (Connection reset by peer)]
rodge has quit ["Leaving."]
struk_atwork has quit [Read error: 104 (Connection reset by peer)]
struk_atwork has joined #ocaml
jdrake has quit [Read error: 113 (No route to host)]
palomer has joined #ocaml
marmottine has joined #ocaml
<palomer>
what's your favourite font?
love-pingoo has joined #ocaml
* palomer
is puzzled that there is no function UTF8.sub
<palomer>
any extlib wonks around?
al-maisan has joined #ocaml
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
al-maisan has left #ocaml []
al-maisan has joined #ocaml
<palomer>
let utf8sub str i j = UTF8.init (j-i) (fun x -> UTF8.get str (x+i)) <--this is the function I wrote
filp has joined #ocaml
ygrek has joined #ocaml
rby_ has joined #ocaml
rby has quit [Read error: 110 (Connection timed out)]
rby_ is now known as rby
middayc has joined #ocaml
digger has joined #ocaml
middayc has quit [Read error: 104 (Connection reset by peer)]
middayc has joined #ocaml
munga has quit ["Leaving"]
OChameau has joined #ocaml
marque has joined #ocaml
middayc has quit []
<digger>
anyone here take a crack at that netflix thing?
bluestorm has joined #ocaml
<palomer>
nope
<digger>
i'm seeing that. or not, as the case may be.
<digger>
how about...anything I should know about bigarray and camlfloat?
seafood_ has quit [Read error: 110 (Connection timed out)]
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
<digger>
you know, i like irc
<digger>
talking to myself is more interesting with some help with pretending someone is listening :-)
Yoric[DT] has joined #ocaml
digger has quit []
<Yoric[DT]>
hi
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
marque has quit [Read error: 110 (Connection timed out)]
jlouis has quit [Remote closed the connection]
gaja has joined #ocaml
marque has joined #ocaml
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
authentic has quit [leguin.freenode.net irc.freenode.net]
Proteus has quit [leguin.freenode.net irc.freenode.net]
authentic has joined #ocaml
Proteus has joined #ocaml
<Yoric[DT]>
bluestorm: ping
<bluestorm>
pong
Proteus has quit [Connection timed out]
Proteus has joined #ocaml
struk_atwork2 has joined #ocaml
filp has quit ["Bye"]
structured has quit [Success]
structured has joined #ocaml
zmdkrbou has quit [Remote closed the connection]
svenl has quit [Remote closed the connection]
zmdkrbou has joined #ocaml
svenl has joined #ocaml
<bluestorm>
err... was hoping an email answer from the extlib mailing list, and got an "[ocaml-lib-devel] give her climax every night"
<ulfdoz>
can you need it? *scnr*
<bluestorm>
Yoric[DT]: any feedback on that Option.bind proposal ?
<bluestorm>
i'm unsure about the argument orders actually
<bluestorm>
i intended it with the option first, but wrote it naturally with the function first ^^
authentic has quit [leguin.freenode.net irc.freenode.net]
authentic has joined #ocaml
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
struk_atwork has quit [Read error: 110 (Connection timed out)]
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
carm has joined #ocaml
struk_atwork has joined #ocaml
TychoBrahe has quit [Read error: 104 (Connection reset by peer)]
structured has quit [Read error: 104 (Connection reset by peer)]
hkBst has joined #ocaml
<Yoric[DT]>
bluestorm: :)
<Yoric[DT]>
Actually, I wanted to discuss something else.
<Yoric[DT]>
But turns out that real-life is calling me.
<Yoric[DT]>
I'll try and pop back in about 20 minutes.
struk_atwork2 has quit [Read error: 113 (No route to host)]
<bluestorm>
no problem
Snark has joined #ocaml
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
hkBst has quit [leguin.freenode.net irc.freenode.net]
authentic has quit [leguin.freenode.net irc.freenode.net]
hkBst has joined #ocaml
authentic has joined #ocaml
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
authentic has quit [leguin.freenode.net irc.freenode.net]
hkBst has quit [leguin.freenode.net irc.freenode.net]
hkBst has joined #ocaml
authentic has joined #ocaml
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
<Yoric[DT]>
bluestorm: I'm back.
<Yoric[DT]>
I wanted to discuss the idea of a syntax extension which I believe could be quite helpful for monadic programming.
<bluestorm>
hm
<Yoric[DT]>
At the moment, I'm not satisfied with pa_monad, because it feels un-camlish.
<Yoric[DT]>
>>= is verbose
<Yoric[DT]>
But I believe we could recycle the current stream parser syntax to turn it into (among other things) a monadic syntax.
<bluestorm>
how so ?
<flux>
yoric[dt], what do you mean by >>=? isn't the point of pa_monad to remove the >>='s?
<bluestorm>
flux: he probably meant ">>= if you choose not to use any extension"
<Yoric[DT]>
indeed
<Yoric[DT]>
>>= as "the alternative to pa_monad"
<Yoric[DT]>
Now, I have a mapping in mind.
<Yoric[DT]>
Let's assume we have a syntax such as
<Yoric[DT]>
match foo with monad (M)
<Yoric[DT]>
| [< bar >] -> ...
<Yoric[DT]>
...
<bluestorm>
instead of (perform bar <-- foo; ...) ?
<Yoric[DT]>
Not yet.
<Yoric[DT]>
[< a = bar; b >] maps to bind bar (fun a -> b') (where b' is the encoding of b)
authentic has quit [leguin.freenode.net irc.freenode.net]
hkBst has quit [leguin.freenode.net irc.freenode.net]
hkBst has joined #ocaml
authentic has joined #ocaml
<Yoric[DT]>
[< ... >] -> foo maps to return foo
<bluestorm>
hm
<bluestorm>
i'm not sure about this because
<bluestorm>
you would use the identifiers bound by the patterns inside the [< ... >], and not only outside (and more often inside that outside, probably)
<Yoric[DT]>
[< 'pattern >] maps to some additional function
<Yoric[DT]>
What do you mean ?
<Yoric[DT]>
and | composition of parsers maps to some additional function
<Yoric[DT]>
(Say M.either)
<bluestorm>
hm
<bluestorm>
there are different use case for the monadic sugar, and it some of them you heavily re-use bound expressions
<Yoric[DT]>
and, of course, we could have a short-hand notation just like "parser" is equivalent to "fun x -> match x with parser"
<Yoric[DT]>
So ?
<bluestorm>
eg. do a <- something; b <- succ a; c <- succ b; return c
<bluestorm>
to do that in your syntax you'd either chain the "match with .." construction, or write something like [< a = smthg; b = succ a; c = succ b >] -> c
<Yoric[DT]>
Yes.
<bluestorm>
does the current stream syntax allows for re-use of patterns defined inside a [< ... >]-expression in that expression ?
<bluestorm>
hm
<bluestorm>
that may not be an issue anyway
<Yoric[DT]>
I don't think it's an issue, indeed.
carm has quit [Remote closed the connection]
carm has joined #ocaml
<Yoric[DT]>
One of the advantages of this proposed syntax is that we could plug-in more powerful parsers instead of stream parsers, without having to learn a new syntax.
<Yoric[DT]>
I grant you that it's not a huge benefit, but it's nice.
<Yoric[DT]>
The other advantage is that I feel it looks more OCaml-ish than either pa_monad or >>= .
<flux>
"look and feel" issues can be highly subjective, though
<Yoric[DT]>
I agree.
<bluestorm>
the genericity of the "with foo" construct is indeed nice
<bluestorm>
do you have an idea of other syntax extensions we could model on this thing ?
<bluestorm>
(bitmatch was a close miss :-' )
<Yoric[DT]>
You mean "match x with [not-parser]" ?
<bluestorm>
yes
<Yoric[DT]>
Or with monads ?
<Yoric[DT]>
Well, regexps, micmatch, bitmatch I guess.
<bluestorm>
(does it turns "monad" into a keyword ?)
<Yoric[DT]>
I have ideas for Erlang-ish communications.
<Yoric[DT]>
I guess. I'm not 100% sure about the semantics of Camlp4 in that case.
<Yoric[DT]>
We could use another word than monad.
<flux>
:)
<flux>
oh, there was a context, too ;). is there code in the wild that would use monad by itself? I think it's possible..
<Yoric[DT]>
In that case, we could even hijack "parser", provided we supply a modified [Stream] module.
<bluestorm>
hm
<bluestorm>
type-conv does not seems to make the words used keywords
<bluestorm>
so it should be possible to do the same here
<Yoric[DT]>
flux: you mean as a keyword or as an identifier ?
<flux>
as an identifier; how much code would not work if 'monad' were a keyword
<bluestorm>
not very much probably, but you still have to consider that when creating syntax extensions : the less intrusive, the better
<bluestorm>
(and don't forget that for some people the ultimate language-sex-appeal test is the number of keywords)
<Yoric[DT]>
I agree that I would prefer if "monad" did not end up becoming an identifier.
TychoBrahe has joined #ocaml
<bluestorm>
in your match foo with [< bar >] -> foobar example, what is the 'foo' part used for ?
<Yoric[DT]>
I'm not sure.
<Yoric[DT]>
Just as I'm not sure what the meaning of [< ...; stuff >] means when [stuff] is an identifier.
<Yoric[DT]>
In stream parser context, it would be something like initial condition / continuation.
<Yoric[DT]>
In my mind, such a syntax extension would involve a super-set of monads anyway.
<Yoric[DT]>
So these two aspects could be left as hooks for modules which mean to implement it.
<Yoric[DT]>
s/it/them/
<bluestorm>
i bet you hope that a monadic parser library would fit nicely in that syntax
<Yoric[DT]>
That was the original idea.
<Yoric[DT]>
But, again, I have the feeling that we can build [typed] Erlang-ish communication on top of such a syntax.
<bluestorm>
using | as sums would make sense
<bluestorm>
match ? with monad Option [< a' = eval a; b' = eval b >] -> a + b | [< >] -> raise Failure
<bluestorm>
(there is a problem with the implicit return at the right hand side : what about people returning monads ? in that case i could want to do an action, then return None)
<Yoric[DT]>
Ok, we could forget about the implicit return.
<bluestorm>
we still don't know what could go in "match ? with" :p
seafood_ has joined #ocaml
TaXules_ is now known as TaXules
al-maisan has quit [Read error: 113 (No route to host)]
seafood__ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
sporkmonger has joined #ocaml
bluestorm has quit [Remote closed the connection]
al-maisan has joined #ocaml
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
al-maisan has quit [Client Quit]
jonafan_ has joined #ocaml
LordMetroid has joined #ocaml
al-maisan has joined #ocaml
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
jonafan has quit [Read error: 110 (Connection timed out)]
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
al-maisan has quit [Client Quit]
LordMetroid has quit ["Leaving"]
det has quit [Remote closed the connection]
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
Associat0r has joined #ocaml
munga has joined #ocaml
carm has quit [Read error: 110 (Connection timed out)]
seafood__ has quit [Read error: 110 (Connection timed out)]
jdrake has joined #ocaml
TheLittlePrince has joined #ocaml
al-maisan has joined #ocaml
spainish has quit [Read error: 110 (Connection timed out)]
TheLittlePrince has quit [Client Quit]
magthe has joined #ocaml
al-maisan has quit [Read error: 113 (No route to host)]
al-maisan has joined #ocaml
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
al-maisan has quit [Client Quit]
marmottine has quit [Remote closed the connection]
al-maisan has joined #ocaml
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
bluestorm has joined #ocaml
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
psnively has joined #ocaml
psnively has quit [Client Quit]
psnively has joined #ocaml
<psnively>
Testing
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
<Yoric[DT]>
mmmhhhh....
<Yoric[DT]>
I have a design issue.
<Yoric[DT]>
From the output of a parser, I wish to create a lazy list of productions.
<Yoric[DT]>
(actually, this parser is used as a simple lexer)
<Yoric[DT]>
Now, the parser may succeed or fail.
<Yoric[DT]>
I'm wondering what I should do in case of failure.
<Yoric[DT]>
Just return the empty list or raise an exception ?
<psnively>
Return list option?
<struk_atwork>
if parser shouldn't fail, throw exception, if it fails often..do somthing like psnively said
<Yoric[DT]>
psnively: that's bound to have weird semantics
<Yoric[DT]>
Plus the main thing is that, in case of failure, I want to raise the details on the failure.
<Yoric[DT]>
So in that case, it would be Either rather than option.
<Yoric[DT]>
But then, that's not very compliant with lazy lists.
Demitar has quit [Read error: 110 (Connection timed out)]
<psnively>
Hmmm, good points.
<Yoric[DT]>
I guess I could return [either list], with the convention that, in case of error, the rest of the list should be empty.
<Yoric[DT]>
But now, that's very weird.
<psnively>
Yeah.
jonafan_ is now known as jonafan
<Yoric[DT]>
I guess I'll make it so that an exception is raised whenever the corresponding element of the list is evaluated.
twobitwork has left #ocaml []
Associat0r has quit []
postalchris has joined #ocaml
al-maisan has quit [Read error: 113 (No route to host)]
Associat0r has joined #ocaml
<Associat0r>
guys what is the best example of an idomatic ocaml game?
<hcarty>
Associat0r: Do you mean a game written in OCaml?
<Associat0r>
yeah
<Associat0r>
or game engine
<Associat0r>
I know a few exist but I need idiomatic ocaml
<Associat0r>
as an example
<hcarty>
What do you mean by idiomatic OCaml?
<Associat0r>
and since I am no ocaml expert it is hard for me to decide what is good practice
<hcarty>
Ah
<Associat0r>
in the style of ocaml
<Associat0r>
like a C++ game in the style of C++ instead of just a better C
<hcarty>
flux wrote a game, I don't remember the name though
<flux>
I don't know how "idiomatic" it is, though, in the sense of demonstrating best practices :)
<Associat0r>
also what about the mlgame lib?
<flux>
never heard of that one
<flux>
looks interesting though
<flux>
last release december 2005..
<hcarty>
Associat0r: Games are not very common (yet) in the OCaml community. So they may not be the best place to look for best practices.
<flux>
these days I'm thinking that opengl is the way to go, though
<flux>
even if you do just 2d
<Associat0r>
I am mainly looking at architecture, doesn't matter if it is 2D or 3D
<flux>
well, find all the games you can and look how they've been done, perhaps you'll pick some ideas
magthe has quit ["Ex-Chat"]
<Associat0r>
any other non game projects that I can look at that are good practice ocaml and with good examples of design patterns written in functional style
<Associat0r>
?
<flux>
I haven't actually that much read code from other projects than written into mine, so I can't really say..
<Associat0r>
flux : did you run into any performance issues with functional style in your project?
<flux>
not per se, but blending bitmaps in ocaml wasn't very fast, so I ended up caching the produced bitmaps
jlouis has joined #ocaml
<flux>
it would likely be faster in C, but I don't know if by a margin large enough to not require caching
<flux>
also I'm associating largish structures (instruction to build a bitmap) into ready-built bitmaps; if I used some other identifiers, that lookup process would be faster
<flux>
I don't anymore remember what consumes the most time in Goba, though
<Associat0r>
Goba?
<Associat0r>
ah your game
<flux>
I believe though that writing the game in ocaml does make the target demography smaller, especially if one has dependencies
<Smerdyakov>
In Debian, it's a non-issue.
<Associat0r>
I am gonna write it in F#
<Smerdyakov>
apt-get that sucka and your dependency problems are solved.
<Smerdyakov>
Non-issue with F#, too.
<flux>
smerdyakov, well, sexplib didn't use to be in debian for a while, I don't know if it's now
<flux>
I begun providing binaries too :)
<flux>
I haven't actually looked if they've been downloaded at all, though..
rodge has joined #ocaml
<flux>
also ubuntu had broken ocamlnet package (just a binary package bug)
* struk_atwork
is reading up JoCaml
munga has quit ["Leaving"]
aryx has joined #ocaml
OChameau has quit [Read error: 110 (Connection timed out)]
aryx has left #ocaml []
<psnively>
I think O'Caml should be (haven't tried it yet) awesome for writing games. In particular, it's tough to imagine a better language for writing scene graph APIs in.
Demitar has joined #ocaml
<psnively>
I have played a bit with ocaml-sdl and lablgl. Good times.
<psnively>
The new bit-level pattern matching extension should make reading/writing all sorts of weird game-oriented file formats a lot easier, too.
aryx has joined #ocaml
<psnively>
A multi-player game in JoCaml would be interesting. I dunno how well JoCaml handles join/leave events, though, relative to something like Spread or my poor beloved Ensemble.
<struk_atwork>
psnively, jocaml seems pretty concerned about those issues..as shown in their distributed programming chapter
<psnively>
Good to know. I just wonder how it relates to reliable multicast systems in general.
<psnively>
I certainly like the Join Calculus model.
<aryx>
is there a project to merge gentoo ebuilds with godi ?
<aryx>
I like godi and gentoo/portage and it's sad that those very similar tools can not use a common base
<flux>
the union of people using both gentoo and ocaml might just be a little bit less than the critical mass required.. well, I suppose it takes only one dedicated person :)
<aryx>
:)
<struk_atwork>
psnively, the join calculus is new to me...thats the part I'm absorbing
tty56 has joined #ocaml
smimou has quit ["bli"]
<psnively>
struk_atwork: Me too. I'm certainly no expert. But anything that helps mitigate deadlock/race conditions statically is good.
<palomer>
haxe looks cool!
yminsky has quit [Read error: 110 (Connection timed out)]
tty56_ has joined #ocaml
marmottine has joined #ocaml
postalchris has quit [Read error: 110 (Connection timed out)]
tty56 has quit [Read error: 110 (Connection timed out)]
<struk_atwork>
psnively, agreed whole heartedly
postalchris has joined #ocaml
* psnively
needs to learn more about process calculi, dammit.
tty56 has joined #ocaml
<struk_atwork>
psnively, lots of things we all need to learn
<psnively>
Yes. Disciple looks pretty tasty, too.
Choupinou has joined #ocaml
yminsky has joined #ocaml
tty56_ has quit [Read error: 110 (Connection timed out)]
<palomer>
is it possible to find out all the files in the current directory that end in "foo"
<palomer>
?
<ulfdoz>
echo *foo?
<struk_atwork>
palomer, in ocaml, or in unix?
<palomer>
in ocaml
TychoBrahe has quit [Read error: 110 (Connection timed out)]