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/
<pippijn> whitequark: oh yeah, I remember why I didn't add the %token FOO "foo" change to menhir
<pippijn> whitequark: because now, at least the parser compiles with unmodified menhir
<pippijn> whitequark: well, before it did
<pippijn> whitequark: and the StateError exception could be added and hidden by the one in the generated parser, if it uses the modified menhir
<pippijn> whitequark: but I didn't actually do the latter
<pippijn> whitequark: it was a half-hearted attempt to stay compatible with unmodified menhir
<whitequark> I see
<whitequark> merr's token list parser is very fragile.
<pippijn> yes
<pippijn> everything about merr is fragile
<whitequark> ha
<pippijn> that's partially intentional
<whitequark> oh, it broke again
<whitequark> expected one of: "accept", "reduce", "shift"
<pippijn> oh
<pippijn> that's the automaton parser
<pippijn> that's bad, that shouldn't fail
<pippijn> why does it fail?
<whitequark> dunno
<pippijn> does it say where?
<whitequark> like if it will give me the position :p
<pippijn> hmm
<whitequark> of course no
<pippijn> yeah :\
<whitequark> I'm kind of not excited by a perspective of patching it even more
<whitequark> and I wanna sleep, it's 4 am
<whitequark> can you fix it?
<whitequark> I'll give you the automaton file
<pippijn> it's 2am here
<whitequark> oh right, you're british
<pippijn> whitequark: ok, give it to me
<whitequark> "colour" :D
<pippijn> hehe
<whitequark> it is somewhat huge
<pippijn> that's normal
<whitequark> let me more specific
<whitequark> it is fucking enormous
<whitequark> :D
<pippijn> oh
<pippijn> not that huge
<pippijn> just 600K
<pippijn> quite small for an automaton file
<whitequark> ha
<whitequark> I tried to keep the grammar simple
<whitequark> I hate complex LR contraptions
<pippijn> let me check what my C parser has
<pippijn> 2.3MB
<pippijn> that's enormous ;)
<whitequark> >"unexpected token '%s' after 'open'"
<whitequark> can't you generate these automatically?
<pippijn> yes
<pippijn> I could
<pippijn> I can do a lot :)
<pippijn> I just didn't do it yet
* whitequark nods
<pippijn> expected one of: "accept", "reduce", "shift"
<pippijn> good
chrisdotcode has quit [Remote host closed the connection]
<pippijn> Failure: 1:46: expected one of: "accept", "reduce", "shift"
<pippijn> that's better
<pippijn> except line number is not incremented
<pippijn> but I see what the problem is
<whitequark> yeah, you forgot Lexing.newline
<pippijn> whitequark: I expect TOKEN_NAMES
<pippijn> not Token_Names or anything
<pippijn> I'll fix that
<whitequark> oh, I fixed half of it
<whitequark> in t_lexer.mll
<pippijn> ok
<pippijn> I'll just copy that out then
* whitequark nods
<pippijn> ok
<pippijn> newline at end of file is required
<pippijn> it works with your automaton file now
zpe has joined #ocaml
<pippijn> ok
zpe has quit [Ping timeout: 240 seconds]
<pippijn> now let me figure out how to make a pull request :)
<whitequark> merged, though this is a bit strange
<whitequark> aren't you the maintainer? :D
<pippijn> ok
<pippijn> I don't know how that works
<whitequark> oh, it's simple
<pippijn> yeah, I got it now
<pippijn> I didn't know before
<whitequark> ok, sure
<pippijn> I never debugged a_lexer
<pippijn> it worked from the start
<pippijn> so I didn't need the new_line thing
<whitequark> ok, that part works... now need to teach my compiler tell merr the errors
<pippijn> but I added it now
<whitequark> the sample file would really be better off with camlp4
<whitequark> I think
<pippijn> yep
<pippijn> I'll do that
<pippijn> but not today, and not tomorrow
<pippijn> I have some pressure to finish my master's thesis
<whitequark> sure. I don't need it right now, either
<whitequark> > The state should be a number, and token is the token type constructor name, e.g. TkIF.
<whitequark> I will probably hack this through sexplib, for now
<whitequark> but this would also be better off with camlp4, I guess
<whitequark> or maybe menhir patch
<pippijn> menhir patch
<pippijn> ok, actually
<pippijn> camlp4 is fine
<pippijn> no
<pippijn> merr already knows all the token tycon names
<pippijn> it can emit that for you
<pippijn> that's easy
<pippijn> t_lexer gives you the list
<whitequark> right
<whitequark> so I do... try (parse lex) with Parser.StateError (token, state) -> print (token, state) ?
<whitequark> for -p
<pippijn> right
<pippijn> try merr -merr
<pippijn> that's the format it expects
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<pippijn> oh yeah, and merr does it wrong
<pippijn> $ echo "let" | _install/bin/merr.byte -merr -e -
<pippijn> (0, token)
<pippijn> because I was lazy
<pippijn> it doesn't print the token name
<whitequark> er
<whitequark> how is that supposed to work
<pippijn> I don't know :)
<whitequark> lol
darkf has joined #ocaml
chrisdotcode has joined #ocaml
<pippijn> apparently it sort of works
<whitequark> huh, 80 tokens
jpdeplaix has quit [Ping timeout: 248 seconds]
<pippijn> ok
<pippijn> whitequark: name_of_token
<pippijn> that gives the tycon name
ygrek has joined #ocaml
<whitequark> pippijn: it's circular though
osnr has quit [Ping timeout: 246 seconds]
<whitequark> I need that file to generate the -p executable
<whitequark> which I need to give to merr
<pippijn> right
<pippijn> :)
<pippijn> I'll have to split it
<pippijn> or use sed :)
<whitequark> Fatal error: exception End_of_file
<pippijn> whitequark: added a desc_of_token function, as well
<whitequark> more specifically retrieving error states... 100%Fatal error: exception End_of_file
<pippijn> returning the string after %token NAME
* whitequark nods
<whitequark> good
<pippijn> end of file hm
Drup has quit [Quit: Leaving.]
<pippijn> I don't know
Simn has quit [Quit: Leaving]
<whitequark> should I raise an exn as well?
<pippijn> [< 'Kwd "("; 'Int state; 'Kwd ","; 'Ident token; 'Kwd ")" >] → (state, token)
<pippijn> no
<pippijn> I don't think so
<whitequark> nothing changed
<pippijn> $ echo hi | _install/bin/cparse.byte -merr -
<pippijn> (538, EOF)
<pippijn> no exception
<whitequark> oh
<whitequark> oh right
emmanuelux has quit [Quit: emmanuelux]
<whitequark> I provided valid input to it
jpdeplaix has joined #ocaml
<pippijn> ah
<pippijn> yeah, merr is fragile :)
breakds has quit [Quit: Konversation terminated!]
<pippijn> I'm so happy that FOO _ works for nullary tycons
<pippijn> | EOF _ → "end of input"
<whitequark> so, where does merr write its functions? string_of_token?
<pippijn> which functions?
<whitequark> it wants me to provide a string_of_token function
<whitequark> which I guess it should also generate itself
<pippijn> yeah, I need to figure out a good way for that
<pippijn> because
<pippijn> TkIDENTIFIER of string
<pippijn> you will want to include the string in string_of_token
<pippijn> merr doesn't generally know how to turn a token into a nice string
<pippijn> it can do defaults, though
<whitequark> right
<pippijn> merr should have a default (desc_of_token) and you can add overrides
<pippijn> I don't know how to do that right, yet, and I'm in bed now
csakatoku has joined #ocaml
<pippijn> whitequark: ok, so apparently I made everything optional
<pippijn> you can run merr with only -a or with -a and -t or only -e and -p or everything
<pippijn> or nothing
<pippijn> but then the resulting code is useless
<pippijn> and doesn't compile
<pippijn> because of libmerr
<pippijn> but the intention was for everything to be optional
ygrek has quit [Ping timeout: 256 seconds]
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
csakatoku has quit [Ping timeout: 246 seconds]
csakatoku has joined #ocaml
<whitequark> pippijn: hm, it works
<whitequark> but gives strange results
<whitequark> pippijn: oh no, it just works
<whitequark> also: incredibly cool thingy
zpe has joined #ocaml
<pippijn> :)
zpe has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
<whitequark> pippijn: yeah, it needs... a lot of adjustment
<whitequark> I'll do something tomorrow
<whitequark> or maybe next week, not sure yet
q66 has quit [Quit: Leaving]
introom has joined #ocaml
ollehar has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
walter has quit [Quit: This computer has gone to sleep]
ben_zen has joined #ocaml
breakds has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
ollehar has quit [Ping timeout: 240 seconds]
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
ollehar has joined #ocaml
introom_ has joined #ocaml
introom has quit [Ping timeout: 268 seconds]
ollehar has quit [Ping timeout: 264 seconds]
ollehar has joined #ocaml
Watcher7 has left #ocaml []
travisbrady has quit [Quit: travisbrady]
zpe has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
breakds has quit [Remote host closed the connection]
chrisdotcode has quit [Ping timeout: 264 seconds]
justdit has joined #ocaml
thomasga has joined #ocaml
transfinite has quit [Ping timeout: 268 seconds]
chrisdotcode has joined #ocaml
thomasga1 has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
pootler has quit [Ping timeout: 256 seconds]
zpe has joined #ocaml
ggole has joined #ocaml
Yoric has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
Yoric has quit [Client Quit]
Yoric has joined #ocaml
Yoric has quit [Client Quit]
bkpt has quit [Quit: Leaving]
zpe has joined #ocaml
mye has joined #ocaml
csakatok_ has joined #ocaml
gnuvince has quit [Ping timeout: 246 seconds]
csakatoku has quit [Ping timeout: 246 seconds]
ygrek has quit [Ping timeout: 264 seconds]
pootler has joined #ocaml
ulfdoz has joined #ocaml
ulfdoz has quit [Ping timeout: 256 seconds]
ygrek has joined #ocaml
zpe has quit [Remote host closed the connection]
ggole has quit [Ping timeout: 256 seconds]
ben_zen has quit [Quit: sleeeeeeeep]
cdidd has joined #ocaml
zpe has joined #ocaml
pootler has quit [Ping timeout: 264 seconds]
f[x] has joined #ocaml
ggole has joined #ocaml
mika1 has joined #ocaml
eikke has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
cago has joined #ocaml
eikke has quit [Ping timeout: 268 seconds]
eikke has joined #ocaml
Snark has joined #ocaml
remyzorg has joined #ocaml
mlh has quit [Ping timeout: 252 seconds]
pootler has joined #ocaml
thomasga1 has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
skchrko has joined #ocaml
mcclurmc has joined #ocaml
ontologiae has joined #ocaml
Simn has joined #ocaml
chrisdotcode has quit [Ping timeout: 248 seconds]
beckerb has joined #ocaml
chrisdotcode has joined #ocaml
zpe has quit [Remote host closed the connection]
talzeus is now known as ioerror
ioerror is now known as talzeus
eikke has quit [Read error: Operation timed out]
eikke has joined #ocaml
zpe has joined #ocaml
q66 has joined #ocaml
remyzorg_ has joined #ocaml
remyzorg has quit [Ping timeout: 246 seconds]
mort___ has joined #ocaml
thomasga has quit [Quit: Leaving.]
mcclurmc has quit [Ping timeout: 246 seconds]
srcerer_ has joined #ocaml
pippijn_ has joined #ocaml
ohama has quit [Disconnected by services]
ohama has joined #ocaml
willb1 has quit [*.net *.split]
tchell has quit [*.net *.split]
pippijn has quit [*.net *.split]
srcerer has quit [*.net *.split]
mort___ has quit [*.net *.split]
eikke has quit [*.net *.split]
Snark has quit [*.net *.split]
cdidd has quit [*.net *.split]
ollehar has quit [*.net *.split]
contempt has quit [*.net *.split]
mfp has quit [*.net *.split]
Simn has quit [*.net *.split]
ontologiae has quit [*.net *.split]
jonafan has quit [*.net *.split]
avsm has quit [*.net *.split]
jbrown has quit [*.net *.split]
milosn_ has quit [*.net *.split]
cross has quit [*.net *.split]
yroeht has quit [*.net *.split]
rks`_ has quit [*.net *.split]
asmanur has quit [*.net *.split]
Khady has quit [*.net *.split]
IbnFirnas has quit [*.net *.split]
flux has quit [*.net *.split]
ccasin has quit [*.net *.split]
Ptival has quit [*.net *.split]
companion_cube has quit [*.net *.split]
vpm has quit [*.net *.split]
rgrinberg has quit [*.net *.split]
zzz_ has quit [*.net *.split]
bernardofpc has quit [*.net *.split]
lopex has quit [*.net *.split]
ousado has quit [*.net *.split]
thizanne has quit [*.net *.split]
dezzy has quit [*.net *.split]
<Armael> ew.
IbnFirnas has joined #ocaml
flux has joined #ocaml
ccasin has joined #ocaml
Ptival has joined #ocaml
companion_cube has joined #ocaml
vpm has joined #ocaml
rgrinberg has joined #ocaml
zzz_ has joined #ocaml
bernardofpc has joined #ocaml
ousado_ has joined #ocaml
mort___ has joined #ocaml
eikke has joined #ocaml
Simn has joined #ocaml
ontologiae has joined #ocaml
Snark has joined #ocaml
cdidd has joined #ocaml
ollehar has joined #ocaml
jonafan has joined #ocaml
lopex has joined #ocaml
contempt has joined #ocaml
mfp has joined #ocaml
avsm has joined #ocaml
ousado has joined #ocaml
jbrown has joined #ocaml
milosn_ has joined #ocaml
thizanne has joined #ocaml
cross has joined #ocaml
yroeht has joined #ocaml
willb1 has joined #ocaml
rks`_ has joined #ocaml
tchell has joined #ocaml
asmanur has joined #ocaml
dezzy has joined #ocaml
Khady has joined #ocaml
ousado has quit [Read error: Connection reset by peer]
ollehar has quit [Remote host closed the connection]
ollehar has joined #ocaml
contempt has quit [Max SendQ exceeded]
zpe has quit [Remote host closed the connection]
contempt has joined #ocaml
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
kaustuv has joined #ocaml
mrvn has left #ocaml []
<kaustuv> what's the difference between acknowledged and confirmed on the mantis bts?
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
<kaustuv> also, wow, is this really planned for 4.02? http://caml.inria.fr/mantis/view.php?id=6066
<gasche> kaustuv: "acknowledge" mostly means that someone took care to confirm that this is a sensible issue, to reduce the number of "new" (still-to-be-triaged) bugs
<gasche> "confirmed" generally includes the acknowledgment (no pun intended) that the issue is worth fixing
<gasche> that said, bug triagers are not necessarily consistent in this regard
<kaustuv> Hmm, I use "record" as a variable name in my code. If it is going to become a keyword I should plan ahead
<gasche> you probably don't have to worry about that
<gasche> introducing a new keyword is still unheard of (I don't think this will happen)
<flux> would it have been better to pick a bunch of potentially reserved keywords when 4.0 came out?
<flux> but that extension is going to be pretty nice it seems
<flux> especially for code dealing with 2d and 3d vectors
mcclurmc has joined #ocaml
<gasche> you are both talking about wojciech's "extensible records" proposal
<gasche> I haven't seen much endorsment for it yet, and I have no reason to believe it will actually end up in the language
<flux> assigned probably means 'under research' in this context
<gasche> in any case, certainly not with the proposed syntax
<gasche> Wojciech is very enthusiastic about new ideas, but other developers are often more conservative
<gasche> I don't know how well he knows the type-checker internals, but I wouldn't expect such a feature to be possible without Jacques' involvment, and an important amount of work
<asmanur> the gain of performance is not so clear is it ? because i believe that subtyping will have a runtime cost absent with objects ?
<gasche> (Leo P. White's extensible sum types work looks like a more credible potential candidate for inclusion medium-term, as the implementation is done)
<kaustuv> also re performance, I seem to recall that vtable lookups were cached in the implementation of objects...
<kaustuv> but if you were creating a lot of objects at runtime caching might still not be enough
<gasche> SML records are structural, but I think they don't have subtyping
<kaustuv> right, SML has no record polymorphism
<kaustuv> err, no row polymorphism
<gasche> so you can just sort the record fields and statically decide the field offset
<gasche> which is as efficient as OCaml's, I believe
ocp has joined #ocaml
<gasche> if you introduce row polymorphism but no reordering of field, you can get something efficient, but probably less convenient than what people want
<gasche> once you have a construct to hide fields, things get tough
<gasche> I think that syntactic sugar to make object values lighter to define would probably go a long way
<kaustuv> Is the general use case just something vaguely graphicsy? Because I think most graphics programs use homogeneous (4d) records everywhere
<kaustuv> What I miss from SML in OCaml is the general nth projection for tuples (i.e., #3 (x, y, z) = z, etc.)
ousado has quit [Quit: --]
<kaustuv> But I honestly think that record projections are better in OCaml
<gasche> nth-projection is a hack
<gasche> hm
<gasche> ok, it's actually equivalent to 4.01' type-directed record field disambiguation
<gasche> (... if we had made the sane choice of defining ('a * 'b * 'c) as syntactic sugar for {0: 'a; 1: 'b; 2: 'c})
<kaustuv> Actually this function is not legal in SML: fun third x = #3 x
<kaustuv> So you need to know the full arity of the tuple. In other words, #3 is not a function
<gasche> indeed
pippijn_ is now known as pippijn
<kaustuv> So it is exactly the same as record fields. You can't say this in SML either: fun field_foo x = #foo x
<gasche> type-directed disambiguitation doesn't make the construct first-class; for that, you need to move to type-classes (or more generally qualified types)
<gasche> I generally think that type-classes / implicits are the right way to handle syntactic overloading
<gasche> but there is an arguable case for having a second-class mechanism that enforces static resolution, instead of dynamic resolution, for performance-sensitive aspects of the language
<gasche> you could also have something equally convenient with only a type-class mechanism, but good features to control static application (and specialization) of non-operator-polymorphic code
<kaustuv> Well, sometimes these syntactic categories can be lifted to functions. E.g., you can say this in SML: List.foldr #2 0 [1, 2, 3]
<gasche> my understanding is that #n is always lifted to a function, but there is a failure if type inference did not determine the record/tuple shape
<kaustuv> type classes as long as instances are properly scoped and tracked would be great to have.
ousado has joined #ocaml
<kaustuv> I think the ocaml toplevel needs a -no-init-file comamnd even though I can fake it with -init /dev/null
<kaustuv> s/command/flag/
skchrko has quit [Quit: Leaving]
dsheets has quit [Ping timeout: 264 seconds]
eikke has quit [Ping timeout: 246 seconds]
Drup has joined #ocaml
dsheets has joined #ocaml
Drup has quit [Ping timeout: 246 seconds]
zpe has joined #ocaml
skchrko has joined #ocaml
eikke has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
_andre has joined #ocaml
oriba has joined #ocaml
cago has quit [Quit: Leaving.]
shepard` has joined #ocaml
<shepard`> hi everyone !
<shepard`> Does someone know if there is a standard file extension for the menhir parser generator ? (like .mly for ocamlyacc)
<shepard`> which would be directly recognized by oasis :p
<shepard`> or is there a way to tell oasis to use menhir and not ocamlyacc for a given file ? (for example through the _tags file, or directly through _oasis)
gnuvince has joined #ocaml
<shepard`> I tried to add ["myparser.mly -use-menhir"] to _tags, but it does not work :( (I get an ocamlyacc error)
<f[x]> -use-menhir is command-line option
<f[x]> why do you add it to tags?
ollehar has quit [Ping timeout: 240 seconds]
<shepard`> ah ok, I just need to do "ocaml setup.ml -build -use-menhir" :p
<shepard`> sorry for such an easy question then :p
Drup has joined #ocaml
<f[x]> hmm
<shepard`> 13:16 <f[x]> hmm
<f[x]> does it work?
<shepard`> yes, it works :)
<f[x]> hmmm!
<f[x]> ok then ;)
<shepard`> I get compile errors, but at least it calls menhir and not ocamlyacc :-)
<shepard`> thank you ! :-)
testcocoon has quit [Read error: Connection reset by peer]
<pippijn> shepard`: better add it to _tags
<pippijn> shepard`: true: use_menhir
testcocoon has joined #ocaml
breakds has joined #ocaml
redfire has joined #ocaml
csakatok_ has quit [Remote host closed the connection]
<whitequark> pippijn: some things I want to have in merr:
<whitequark> 1) parameterized EOF token. right now, if I make it %token <Location.t> EOF, it explodes
<pippijn> because of libmerr
<whitequark> 2) more flexible substitutions for token name... because "class name cannot be an integer", but "class name cannot be a constant"
<whitequark> yes, libmerr
<pippijn> 2) when merr uses camlp4, that is trivial (unless I misunderstand)
<whitequark> in fact, libmerr doesn't even need to import the EOF token
<whitequark> since I can just name it %token EOF "end of file"
<pippijn> right
<whitequark> camlp4, yeah
<whitequark> I'll probably rewrite it in camlp4, it isn't that big
<whitequark> but not yet
<pippijn> I'd do it, but I don't have time right now
<pippijn> maybe in august
* whitequark nods
<whitequark> why do you even need libmerr?
<whitequark> I'd just emit that single function right in the _errors.ml
demonimin has quit [Ping timeout: 260 seconds]
<whitequark> I imagine that merr could emit default handlers for everything right in the _errors.ml, and the user could override them if desired
<whitequark> with usual scoping rules
<whitequark> (with camlp4 preprocessor)
<pippijn> yep
<pippijn> that's the idea
ttamttam1 has joined #ocaml
lopex has quit [Remote host closed the connection]
ollehar has joined #ocaml
<eikke> anyone with async experience around?
walter has joined #ocaml
<f[x]> eikke, they are all blocked now
lopex has joined #ocaml
<eikke> haha
csag8264 has joined #ocaml
<pippijn> - | TK_TYCON s -> s
<pippijn> whitequark: this is now "type constructor"?
<pippijn> instead of the token value
<whitequark> pippijn: eh? that's just your code, moved around
<whitequark> let me look
<pippijn> no, you killed string_of_token
<whitequark> moved it to makeErr.ml
<pippijn> + | E_tokens.TK_TYCON _ -> "TK_TYCON"
<whitequark> I'll make merr write a dedicated file for generated stuff later
<pippijn> that's token name, not string_of_token
<whitequark> and will import it in makeErr.ml
<whitequark> oh
<whitequark> yes.
<whitequark> I killed string_of_token.
<pippijn> desc_of_token doesn't return the token value for value tokens
<whitequark> the generated code refers to the autogenerated definition directly.
<pippijn> but that's ok
<whitequark> I'll fix it later
<pippijn> in the future, it should, though
<whitequark> I may split the PR if you want
<pippijn> whitequark: it's fine
<whitequark> ok
<pippijn> hmm
<pippijn> levenshtein is in corelib
<pippijn> libmerr can die
<pippijn> or it should be renamed
<pippijn> because: Error: Error: Files c_errors.cmo and ../../../../_install/lib/ocaml/corelib/corelib.cma(Levenshtein) make inconsistent assumptions over interface Levenshtein
<whitequark> oh, I see
<pippijn> or rename levenshtein
<whitequark> Merr_levenshtein?
<pippijn> or make libmerr a pack
introom_ has quit [Remote host closed the connection]
<whitequark> yeah, pack will work as well
<whitequark> I'll do it later today
<pippijn> Merr.Levenshtein
f[x] has quit [Ping timeout: 240 seconds]
<pippijn> ok
<pippijn> done (for obuild)
<shepard`> 13:24 <pippijn> shepard`: better add it to _tags
<shepard`> 13:25 <pippijn> shepard`: true: use_menhir
<shepard`> Thank you
<shepard`> for the hint ! :p
malo has joined #ocaml
olvar has joined #ocaml
<olvar> hi guys, if I create an empty set, how can I add elements to it inside a for-loop?
cago has joined #ocaml
<olvar> I can use XX.add elt s which gives me a set with an extra element, but how can I update the value of the set s?
<olvar> is there a common idiom for this?
<adrien_oww> you could use a "fold" for that
<adrien_oww> instead of a for-loop
<olvar> yes, i guess i could, but I would rather avoid creating the lists needed
<olvar> do you know if there is a "procedural" way to do it?
caligula__ has quit [Ping timeout: 240 seconds]
<kaustuv> olvar: (let s = ref XX.empty in for i = 0 to 100 do s := XX.add i !s done ; !s)
mye has quit [Quit: mye]
<gnuvince> Anyone knows if this article is available elsewhere : http://eigenclass.org/R2/writings/fast-extensible-simplified-markdown-in-ocaml
<kaustuv> gnuvince: I think mfp's code for that article lives on in cow. https://github.com/mirage/ocaml-cow
<olvar> kaustuv: i've tried that, but it complains about XX.add returning a function
<Drup> olvar: you forgot some arguments then
<olvar> i have (let terms = ref SI.empty in for a = 2 to 100 do terms := SI.add a !terms done)
<olvar> kaustuv: Drup: ty, i'll check more carefully in a while
<Drup> (I would do that with a recursive function though :p)
justdit has quit [Ping timeout: 240 seconds]
<pippijn> olvar: do you use batteries?
<pippijn> olvar: if so, you can use Enum.fold and operator (--)
oriba has quit [Quit: oriba]
introom has joined #ocaml
<kaustuv> Enum.fold is kind of annoying here because Set.add curries its arguments the wrong way for fold
csag8264 has quit [Quit: bye]
<pippijn> kaustuv: flip
<pippijn> Enum.fold (flip IntSet.add) IntSet.empty (0 -- 100)
<adrien_oww> gnuvince: archive.org too
<Drup> pippijn: and this is how you quickly transform your supposedly easy to read point free code into spaghetti :D
<adrien_oww> :D
<flux> nah, one flip don't ruin it. I mean. you have a line that mentions Enum.fold, IntSet.add, IntSet.Empty, a range, you're going to guess what it means :-)
<kaustuv> If I never see another flippin' IntSet.add in my life, it will be one too many
<gnuvince> kaustuv: thank you
<flux> a type-directed function calling convention could be nice at times
<kaustuv> I think gasche is working on something like that
<flux> you would just put IntSet.add there and as long as it has different types of two arguments, it will know
<Drup> flux: labels are nice for that too
<flux> but they have their downsides
<kaustuv> Merlin actually makes labels very pleasant to use
<kaustuv> Gone is the look-up-docs-to-guess-what-the-label-is-called dance
<adrien_oww> reminds me I need to prepare a presentation to oups for lablgtk: with ocaml-ty, merlin, frp, ...
<pippijn> flux: that's like overloading
<Drup> adrien_oww: fuuusion !
<pippijn> also, I feel that such a thing could make error messages extremely confusing
<pippijn> and code, too
<adrien_oww> Drup: fusion? :o
<pippijn> wrong code would suddenly compile and do something unexpected
<pippijn> I'd rather be explicit with "flip"
<Drup> adrien_oww: "lablgtk: with ocaml-ty, merlin, frp, ..."
<adrien_oww> yeah, and probably a lot of fun
ttamttam has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
ttamttam1 has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
smondet has joined #ocaml
<olvar> I am sorry to keep bothering you guys, but could someone tell me why is this wrong? http://pastebin.com/uPyF1S6U
<olvar> I could use the code kaustuv pasted earlier, but Id like to know in what way i am thinking this wrong
tobiasBora has joined #ocaml
introom has quit [Remote host closed the connection]
<flux> pippijn, well, not quite, because there would still be only one possible function to call.
ttamttam has quit [Quit: ttamttam]
<flux> ambiquities wouldn't be solved
<pippijn> ok
<pippijn> I'm not sure I'd like that
<kaustuv> olvar: the add function in a map takes *three* arguments: key, value, and map
<kaustuv> you only give it two arguments
ggole has quit []
<olvar> kaustuv: lol, i am an idiot, there should read set
<olvar> thank you :P
<pippijn> and I'm not sure how that could be married to HM
<flux> pippijn, probably partial application wouldn't be quite compatible with that..
<kaustuv> gasche gave a talk where he had an idea that if there was a "hole" in your code of type ('a -> 'b -> 'c) -> ('b -> 'a -> 'c), then there is only function (upto usual extensional equality of functions) that can be plugged in there. So, e.g., if you said Enum.fold (? Set.add), then it would infer flip for ?
<kaustuv> it is an interesting idea if it can be made to work, but I am a bit skeptical
mort___ has quit [Ping timeout: 246 seconds]
<pippijn> that's interesting, but it would definitely require annot
<gasche> note that the "please generate some code here" is made explicit in this setting by the "?" marker
<pippijn> because you could end up with a lot of questionmarks in your code
<gasche> as opposed to, say, Scala's implicit coercions
<pippijn> you will want to know what function was chosen
<pippijn> I don't think I like this..
<gasche> (but in presence of appropriate tooling both are equivalent: you want a way to reveal anything implicit locally, be it the place and content of implicit coercion, or only the generated-term for the ?-hole)
travisbrady has joined #ocaml
<kaustuv> it doesn't matter what function was chosen if there can be only one inhabitant of its type
<gasche> today a colleage told me that he had needed something like this for some formal-circuits work of his a few years ago, and tried to get Coq typeclasses to do that for him (which did not work very well)
<kaustuv> (assuming these functions are effect-free, of course)
<flux> maybe pippijn meant if it was 'flip' that was chosen or something else
<gasche> but in general I agree with kaustuv that the practical applications are not convincingly present yet
<flux> I suppose the purpose was not to do a search of functions that would make it work
<flux> that would be way too general I think
<flux> List.iter (fun c -> Printf.printf "char: %c\n" c) (? "hello world") :-)
<Drup> how can I ask ocamlbuild to use menhir's merge function ?
<flux> albeit that would be pretty cool as well :-)
<gasche> what's menhir merge function?
<kaustuv> flux: that example doesn't fit the pattern. the type of the hole cannot involve concrete types like strings, ints, etc.
<Drup> gasche: have multiple .mly file and "merge" them into one grammar.
<gasche> (or one would take the convention to forget about all the constants at these types, effectively treating them like blind atomic types)
beckerb has quit [Quit: Konversation terminated!]
<gasche> Drup: there is a .mlypack target in menhir, but I'm not sure what it does and if it's what you're looking for
beckerb has joined #ocaml
<flux> kaustuv, would it do a general search of other functions then, say ('a * 'b * 'c) -> ('a * ('b * 'c)) ?
f[x] has joined #ocaml
<kaustuv> flux: gasche can answer that better, but I would guess "yes"
<flux> that would sometimes be nice, but I wonder how it works if you have types that involve resolving multiple holes to find
<flux> and in such complicated situations type feedback would indeed be important
<Drup> flux: doesn't Agda have something like that ?
<pippijn> Drup: put the names of the included files into a .mlypack file
malo has quit [Quit: Leaving]
<gasche> (I'm not sure I understood what flux's question was)
beckerb has quit [Quit: Konversation terminated!]
beckerb has joined #ocaml
Yoric has joined #ocaml
ben_zen has joined #ocaml
transfinite has joined #ocaml
eikke has quit [Ping timeout: 256 seconds]
olvar has left #ocaml []
eikke has joined #ocaml
zpe has joined #ocaml
<gasche> hnrgrgr: you should get a review comment on #4243 in a few minutes
<Drup> There should be an error when ocamlbuild can't find a file listed in a pack ...
<gasche> Drup: look at the mantis and, if there is not yet, submit a bugreport?
tobiasBora has quit [Read error: No route to host]
tobiasBora has joined #ocaml
<Drup> not sure if the mlypack is really working in fact
<gasche> does the _log say something about it?
<whitequark> Drup: it is
cago has left #ocaml []
mika1 has quit [Quit: Leaving.]
mort___ has joined #ocaml
ben_zen has quit [Quit: off to work]
ttamttam has joined #ocaml
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
shepard` has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
maurer has joined #ocaml
<maurer> Is there a way to get something similar to haskell's "deriving Read" in ocaml, or do I need to manually write a parser for a type?
ggole has joined #ocaml
<companion_cube> you'll need to write a parser
demonimin has joined #ocaml
<whitequark> maurer: check out sexplib
<maurer> whitequark: That site seems to demand access to my github account?
mcclurmc has quit [Read error: Operation timed out]
<orbitz> yes for now
<orbitz> maurer: you can look at Core which allows you to make data serailizable to sexp and bin trivially
<whitequark> orbitz: Core uses Sexplib, I think
<orbitz> Yeah
demonimin_ has joined #ocaml
demonimin has quit [Ping timeout: 260 seconds]
beckerb has quit [Ping timeout: 264 seconds]
malo has joined #ocaml
mrvn has joined #ocaml
<mrvn> has anyone tried lablqt?
tobiasBora has quit [Ping timeout: 264 seconds]
Yoric has quit [Ping timeout: 246 seconds]
dsheets has quit [Ping timeout: 268 seconds]
mort___ has quit [Remote host closed the connection]
srcerer_ is now known as srcerer
mort___ has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
f[x] has quit [Ping timeout: 246 seconds]
remyzorg_ has quit [Quit: Quitte]
tobiasBora has joined #ocaml
<ollehar> if I Unix.sleep within a lwt program, will lwt halt?
<adrien> yes
<ollehar> adrien: thx
tobiasBora has quit [Client Quit]
tobiasBora has joined #ocaml
<mrvn> doesn't lwt have its own sleep?
walter has quit [Quit: This computer has gone to sleep]
<adrien> it has an equivalent of most of the blocking functions for Unix (if not all)
jayprich has joined #ocaml
pootler has quit [Ping timeout: 264 seconds]
mort___ has quit [Quit: Leaving.]
Drup has quit [Ping timeout: 264 seconds]
Drup has joined #ocaml
breakds has quit [Remote host closed the connection]
Drup has quit [Ping timeout: 240 seconds]
ontologiae has quit [Ping timeout: 268 seconds]
darkf has quit [Quit: Leaving]
<travisbrady> Anyone know of a mirror of the omake site? metaprl has been down all day
<pippijn> travisbrady: you use omake?
<travisbrady> pippijn: I do not, but I'm trying to opam install meta_conv which requires it
<travisbrady> I'm currently hoping to move to ocp-build or Jenga. But both are not well-documented presently so I'm mostly sticking w/ ocamlbuild
<pippijn> http://webcache.googleusercontent.com/search?q=cache:http://omake.metaprl.org
<smondet> travisbrady: some people have mirrors of the repository: https://github.com/skydeck/omake https://github.com/skydeck/omake986
skchrko has quit [Quit: Leaving]
eikke has quit [Ping timeout: 246 seconds]
eikke has joined #ocaml
malo has quit [Ping timeout: 246 seconds]
pootler has joined #ocaml
ggole has quit []
ttamttam has quit [Quit: ttamttam]
ontologiae has joined #ocaml
tobiasBora has quit [Ping timeout: 276 seconds]
gustav___ has quit [Ping timeout: 246 seconds]
wozzzz has joined #ocaml
ttamttam has joined #ocaml
<maurer> Anyone have any experience with ocamlbuild?
<maurer> I'm having a hard time getting it to link against libraries
<maurer> if I pass -lib batteries, it fails to find a module that is in batteries
<maurer> if I pass -lib definitelynonexistent, it fails the same way, almost as though it is ignoring the option
ocp has quit [Ping timeout: 245 seconds]
<eikke> maurer: can't you use -use-ocamlfind and -package ... ?
<eikke> (I'm by far no ocamlbuild expert though)
<maurer> eikke: I see neither of those in the manpage for ocamlbuild
<maurer> ah, but it does show up in the error message
<eikke> I don't use batteries, but something like ocamlbuild -use-ocamlfind -package batteries mymodule.byte might work
<maurer> It seems to work
<maurer> I'm just confused as to why neither the manpage nor the html manual mentioned these flags
<maurer> both mention -lib instead
<maurer> which seems to be a no-op
tobiasBora has joined #ocaml
bondar has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
mrvn has quit [Ping timeout: 256 seconds]
mrvn has joined #ocaml
tobiasBora has quit [Ping timeout: 246 seconds]
<samebchase> Hello Everyone, Can someone point me to a small-ish project which makes good use of the available libraries, so that I can learn how to structure things
tobiasBora has joined #ocaml
Drup has joined #ocaml
cthuluh has quit [Ping timeout: 256 seconds]
<amiller> having trouble building 32bit ocaml on 64bit linux: "Make sure the C compiler gcc -m32 -O is properly installed."
malo has joined #ocaml
<amiller> it's on ubuntu 64 bit, it's following the command suggetsed by the install file:
<amiller> ./configure -cc "gcc -m32" -as "as --32" -aspp "gcc -m32 -c" -host i386-linux -partialld "ld -r -melf_i386"
yacks has quit [Ping timeout: 256 seconds]
yacks has joined #ocaml
<amiller> ah i think i just odn't have the proper 32bit dev libraries installed on ubuntu
ttamttam has quit [Quit: ttamttam]
<Simn> https://github.com/ocaml-batteries-team/batteries-included/blob/master/src/batIO.ml#L329 <-- why is this check >= instead of plain > (documentation says it raises Bits_error only if n > 31).
bondar has quit []
mort___ has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
jonafan has quit [Quit: leaving]
jayprich has quit [Ping timeout: 260 seconds]
bacam has quit [Ping timeout: 260 seconds]
clog has joined #ocaml
mrvn has joined #ocaml
ttm has joined #ocaml
mehdid_ has joined #ocaml
lusory_ has joined #ocaml
quelu has joined #ocaml
bacam_ has joined #ocaml
Yoric has joined #ocaml
jayprich2 has joined #ocaml
ousado has joined #ocaml
mort___ has joined #ocaml
yacks has joined #ocaml
malo has joined #ocaml
tobiasBora has joined #ocaml
wozzzz has joined #ocaml
eikke has joined #ocaml
maurer has joined #ocaml
travisbrady has joined #ocaml
transfinite has joined #ocaml
smondet has joined #ocaml
lopex has joined #ocaml
redfire has joined #ocaml
testcocoon has joined #ocaml
kaustuv has joined #ocaml
contempt has joined #ocaml
Khady has joined #ocaml
dezzy has joined #ocaml
asmanur has joined #ocaml
tchell has joined #ocaml
rks`_ has joined #ocaml
willb1 has joined #ocaml
yroeht has joined #ocaml
cross has joined #ocaml
thizanne has joined #ocaml
milosn_ has joined #ocaml
jbrown has joined #ocaml
avsm has joined #ocaml
mfp has joined #ocaml
cdidd has joined #ocaml
Snark has joined #ocaml
Simn has joined #ocaml
bernardofpc has joined #ocaml
zzz_ has joined #ocaml
rgrinberg has joined #ocaml
vpm has joined #ocaml
companion_cube has joined #ocaml
Ptival has joined #ocaml
ccasin has joined #ocaml
flux has joined #ocaml
IbnFirnas has joined #ocaml
ohama has joined #ocaml
pippijn has joined #ocaml
srcerer has joined #ocaml
q66 has joined #ocaml
chrisdotcode has joined #ocaml
madroach has joined #ocaml
jpdeplaix has joined #ocaml
troydm has joined #ocaml
gasche has joined #ocaml
alang_ has joined #ocaml
Arthur__ has joined #ocaml
PM has joined #ocaml
davekong has joined #ocaml
samebchase has joined #ocaml
pango has joined #ocaml
ggherdov has joined #ocaml
bobry has joined #ocaml
fayden has joined #ocaml
hyperboreean has joined #ocaml
wagle has joined #ocaml
rwmjones has joined #ocaml
tianon has joined #ocaml
Zeev has joined #ocaml
ivan\ has joined #ocaml
vext01 has joined #ocaml
xenocons has joined #ocaml
weie has joined #ocaml
zorun has joined #ocaml
iZsh has joined #ocaml
Nahra has joined #ocaml
chris2 has joined #ocaml
orbitz has joined #ocaml
jdoles has joined #ocaml
brendan has joined #ocaml
deavidsedice has joined #ocaml
pr has joined #ocaml
Derander has joined #ocaml
nicoo has joined #ocaml
montik_ has joined #ocaml
adrien has joined #ocaml
bitbckt has joined #ocaml
zopt has joined #ocaml
snarkyboojum has joined #ocaml
hnrgrgr has joined #ocaml
mal`` has joined #ocaml
def-lkb has joined #ocaml
Armael has joined #ocaml
Cypi has joined #ocaml
ipoulet has joined #ocaml
stomp has joined #ocaml
rossberg has joined #ocaml
fds has joined #ocaml
fasta has joined #ocaml
Leonidas has joined #ocaml
SuperNoeMan has joined #ocaml
jave has joined #ocaml
TaXules has joined #ocaml
amiller has joined #ocaml
Asmadeus has joined #ocaml
thelema_ has joined #ocaml
spearalo1 has joined #ocaml
bholst has joined #ocaml
alang has joined #ocaml
whitequark has joined #ocaml
noplamodo has joined #ocaml
jlouis has joined #ocaml
mathieui has joined #ocaml
olasd has joined #ocaml
MarcWeber has joined #ocaml
gbluma_ has joined #ocaml
NaCl has joined #ocaml
othiym23 has joined #ocaml
Jenza has joined #ocaml
dtg has joined #ocaml
vbmithr_ has joined #ocaml
patronus_ has joined #ocaml
BiDOrD has joined #ocaml
josch_ has joined #ocaml
talzeus has joined #ocaml
sgnb has joined #ocaml
Qrntz has joined #ocaml
lenstr has joined #ocaml
tlockney has joined #ocaml
adrien_oww has joined #ocaml
cow-orker has joined #ocaml
_habnabit has joined #ocaml
emias has joined #ocaml
j0sh has joined #ocaml
ia0 has joined #ocaml
ousado has quit [*.net *.split]
madroach has quit [*.net *.split]
troydm has quit [*.net *.split]
josch_ has quit [*.net *.split]
talzeus has quit [*.net *.split]
sgnb has quit [*.net *.split]
Qrntz has quit [*.net *.split]
lenstr has quit [*.net *.split]
tlockney has quit [*.net *.split]
adrien_oww has quit [*.net *.split]
cow-orker has quit [*.net *.split]
_habnabit has quit [*.net *.split]
emias has quit [*.net *.split]
j0sh has quit [*.net *.split]
ia0 has quit [*.net *.split]
ttm has quit [*.net *.split]
yacks has quit [*.net *.split]
chrisdotcode has quit [*.net *.split]
gasche has quit [*.net *.split]
pango has quit [*.net *.split]
lusory_ has quit [*.net *.split]
eikke has quit [*.net *.split]
travisbrady has quit [*.net *.split]
transfinite has quit [*.net *.split]
ohama has quit [*.net *.split]
hyperboreean has quit [*.net *.split]
wagle has quit [*.net *.split]
adrien has quit [*.net *.split]
montik_ has quit [*.net *.split]
nicoo has quit [*.net *.split]
Derander has quit [*.net *.split]
pr has quit [*.net *.split]
davekong has quit [*.net *.split]
bobry has quit [*.net *.split]
def-lkb has quit [*.net *.split]
mal`` has quit [*.net *.split]
hnrgrgr has quit [*.net *.split]
zopt has quit [*.net *.split]
snarkyboojum has quit [*.net *.split]
bitbckt has quit [*.net *.split]
smondet has quit [*.net *.split]
testcocoon has quit [*.net *.split]
kaustuv has quit [*.net *.split]
contempt has quit [*.net *.split]
pippijn has quit [*.net *.split]
srcerer has quit [*.net *.split]
jpdeplaix has quit [*.net *.split]
alang_ has quit [*.net *.split]
ggherdov has quit [*.net *.split]
vext01 has quit [*.net *.split]
xenocons has quit [*.net *.split]
chris2 has quit [*.net *.split]
deavidsedice has quit [*.net *.split]
Armael has quit [*.net *.split]
Yoric has quit [*.net *.split]
Arthur__ has quit [*.net *.split]
PM has quit [*.net *.split]
zorun has quit [*.net *.split]
iZsh has quit [*.net *.split]
jave has quit [*.net *.split]
SuperNoeMan has quit [*.net *.split]
Leonidas has quit [*.net *.split]
fasta has quit [*.net *.split]
fds has quit [*.net *.split]
rossberg has quit [*.net *.split]
stomp has quit [*.net *.split]
ipoulet has quit [*.net *.split]
Cypi has quit [*.net *.split]
redfire has quit [*.net *.split]
weie has quit [*.net *.split]
Nahra has quit [*.net *.split]
jdoles has quit [*.net *.split]
samebchase has quit [*.net *.split]
brendan has quit [*.net *.split]
bholst has quit [*.net *.split]
spearalo1 has quit [*.net *.split]
thelema_ has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
amiller has quit [*.net *.split]
TaXules has quit [*.net *.split]
maurer has quit [*.net *.split]
Zeev has quit [*.net *.split]
ivan\ has quit [*.net *.split]
orbitz has quit [*.net *.split]
noplamodo has quit [*.net *.split]
whitequark has quit [*.net *.split]
alang has quit [*.net *.split]
bacam_ has quit [*.net *.split]
gbluma_ has quit [*.net *.split]
MarcWeber has quit [*.net *.split]
olasd has quit [*.net *.split]
mathieui has quit [*.net *.split]
jlouis has quit [*.net *.split]
willb1 has quit [*.net *.split]
tchell has quit [*.net *.split]
mrvn has quit [*.net *.split]
Snark has quit [*.net *.split]
cdidd has quit [*.net *.split]
mfp has quit [*.net *.split]
Simn has quit [*.net *.split]
avsm has quit [*.net *.split]
jbrown has quit [*.net *.split]
milosn_ has quit [*.net *.split]
cross has quit [*.net *.split]
yroeht has quit [*.net *.split]
rks`_ has quit [*.net *.split]
asmanur has quit [*.net *.split]
Khady has quit [*.net *.split]
mort___ has quit [*.net *.split]
malo has quit [*.net *.split]
thizanne has quit [*.net *.split]
dezzy has quit [*.net *.split]
IbnFirnas has quit [*.net *.split]
flux has quit [*.net *.split]
wozzzz has quit [*.net *.split]
ccasin has quit [*.net *.split]
Ptival has quit [*.net *.split]
companion_cube has quit [*.net *.split]
vpm has quit [*.net *.split]
rgrinberg has quit [*.net *.split]
zzz_ has quit [*.net *.split]
bernardofpc has quit [*.net *.split]
lopex has quit [*.net *.split]
q66 has quit [*.net *.split]
mehdid_ has quit [*.net *.split]
quelu has quit [*.net *.split]
jayprich2 has quit [*.net *.split]
tobiasBora has quit [*.net *.split]
fayden has quit [*.net *.split]
rwmjones has quit [*.net *.split]
tianon has quit [*.net *.split]
BiDOrD has quit [*.net *.split]
patronus_ has quit [*.net *.split]
vbmithr_ has quit [*.net *.split]
dtg has quit [*.net *.split]
Jenza has quit [*.net *.split]
othiym23 has quit [*.net *.split]
NaCl has quit [*.net *.split]
Drup has quit [Ping timeout: 283 seconds]
ollehar has joined #ocaml
Drup1 has joined #ocaml
ocp has joined #ocaml
mrvn has joined #ocaml
ttm has joined #ocaml
mehdid_ has joined #ocaml
lusory_ has joined #ocaml
quelu has joined #ocaml
bacam_ has joined #ocaml
Yoric has joined #ocaml
jayprich2 has joined #ocaml
ousado has joined #ocaml
mort___ has joined #ocaml
yacks has joined #ocaml
malo has joined #ocaml
wozzzz has joined #ocaml
eikke has joined #ocaml
maurer has joined #ocaml
travisbrady has joined #ocaml
transfinite has joined #ocaml
smondet has joined #ocaml
lopex has joined #ocaml
redfire has joined #ocaml
testcocoon has joined #ocaml
kaustuv has joined #ocaml
contempt has joined #ocaml
Khady has joined #ocaml
dezzy has joined #ocaml
asmanur has joined #ocaml
tchell has joined #ocaml
rks`_ has joined #ocaml
willb1 has joined #ocaml
yroeht has joined #ocaml
cross has joined #ocaml
thizanne has joined #ocaml
milosn_ has joined #ocaml
jbrown has joined #ocaml
avsm has joined #ocaml
mfp has joined #ocaml
cdidd has joined #ocaml
Snark has joined #ocaml
Simn has joined #ocaml
bernardofpc has joined #ocaml
zzz_ has joined #ocaml
rgrinberg has joined #ocaml
vpm has joined #ocaml
companion_cube has joined #ocaml
Ptival has joined #ocaml
ccasin has joined #ocaml
flux has joined #ocaml
IbnFirnas has joined #ocaml
ohama has joined #ocaml
pippijn has joined #ocaml
srcerer has joined #ocaml
q66 has joined #ocaml
chrisdotcode has joined #ocaml
madroach has joined #ocaml
jpdeplaix has joined #ocaml
troydm has joined #ocaml
gasche has joined #ocaml
alang_ has joined #ocaml
Arthur__ has joined #ocaml
PM has joined #ocaml
davekong has joined #ocaml
samebchase has joined #ocaml
pango has joined #ocaml
ggherdov has joined #ocaml
bobry has joined #ocaml
fayden has joined #ocaml
hyperboreean has joined #ocaml
wagle has joined #ocaml
rwmjones has joined #ocaml
tianon has joined #ocaml
Zeev has joined #ocaml
ivan\ has joined #ocaml
vext01 has joined #ocaml
xenocons has joined #ocaml
weie has joined #ocaml
zorun has joined #ocaml
iZsh has joined #ocaml
Nahra has joined #ocaml
chris2 has joined #ocaml
orbitz has joined #ocaml
jdoles has joined #ocaml
brendan has joined #ocaml
deavidsedice has joined #ocaml
ia0 has joined #ocaml
j0sh has joined #ocaml
emias has joined #ocaml
_habnabit has joined #ocaml
cow-orker has joined #ocaml
adrien_oww has joined #ocaml
tlockney has joined #ocaml
lenstr has joined #ocaml
Qrntz has joined #ocaml
sgnb has joined #ocaml
talzeus has joined #ocaml
josch_ has joined #ocaml
BiDOrD has joined #ocaml
patronus_ has joined #ocaml
vbmithr_ has joined #ocaml
dtg has joined #ocaml
Jenza has joined #ocaml
othiym23 has joined #ocaml
NaCl has joined #ocaml
gbluma_ has joined #ocaml
MarcWeber has joined #ocaml
olasd has joined #ocaml
mathieui has joined #ocaml
jlouis has joined #ocaml
noplamodo has joined #ocaml
whitequark has joined #ocaml
alang has joined #ocaml
bholst has joined #ocaml
spearalo1 has joined #ocaml
thelema_ has joined #ocaml
Asmadeus has joined #ocaml
amiller has joined #ocaml
TaXules has joined #ocaml
jave has joined #ocaml
SuperNoeMan has joined #ocaml
Leonidas has joined #ocaml
fasta has joined #ocaml
fds has joined #ocaml
rossberg has joined #ocaml
stomp has joined #ocaml
ipoulet has joined #ocaml
Cypi has joined #ocaml
Armael has joined #ocaml
def-lkb has joined #ocaml
mal`` has joined #ocaml
hnrgrgr has joined #ocaml
snarkyboojum has joined #ocaml
zopt has joined #ocaml
bitbckt has joined #ocaml
adrien has joined #ocaml
montik_ has joined #ocaml
nicoo has joined #ocaml
Derander has joined #ocaml
pr has joined #ocaml
<mrvn> File "foo.ml", line 10, characters 34-37:
<mrvn> Error: Unbound type constructor b
<mrvn> Anyone an idea what the error is?
malo has quit [Quit: Leaving]
ttm has quit [*.net *.split]
yacks has quit [*.net *.split]
chrisdotcode has quit [*.net *.split]
gasche has quit [*.net *.split]
pango has quit [*.net *.split]
ousado has quit [*.net *.split]
madroach has quit [*.net *.split]
troydm has quit [*.net *.split]
josch_ has quit [*.net *.split]
talzeus has quit [*.net *.split]
sgnb has quit [*.net *.split]
Qrntz has quit [*.net *.split]
lenstr has quit [*.net *.split]
tlockney has quit [*.net *.split]
adrien_oww has quit [*.net *.split]
cow-orker has quit [*.net *.split]
_habnabit has quit [*.net *.split]
emias has quit [*.net *.split]
j0sh has quit [*.net *.split]
ia0 has quit [*.net *.split]
lusory_ has quit [*.net *.split]
eikke has quit [*.net *.split]
travisbrady has quit [*.net *.split]
transfinite has quit [*.net *.split]
ohama has quit [*.net *.split]
hyperboreean has quit [*.net *.split]
wagle has quit [*.net *.split]
adrien has quit [*.net *.split]
montik_ has quit [*.net *.split]
nicoo has quit [*.net *.split]
Derander has quit [*.net *.split]
pr has quit [*.net *.split]
ocp has quit [*.net *.split]
davekong has quit [*.net *.split]
bobry has quit [*.net *.split]
def-lkb has quit [*.net *.split]
mal`` has quit [*.net *.split]
hnrgrgr has quit [*.net *.split]
zopt has quit [*.net *.split]
snarkyboojum has quit [*.net *.split]
bitbckt has quit [*.net *.split]
smondet has quit [*.net *.split]
testcocoon has quit [*.net *.split]
kaustuv has quit [*.net *.split]
contempt has quit [*.net *.split]
pippijn has quit [*.net *.split]
srcerer has quit [*.net *.split]
jpdeplaix has quit [*.net *.split]
alang_ has quit [*.net *.split]
ggherdov has quit [*.net *.split]
vext01 has quit [*.net *.split]
xenocons has quit [*.net *.split]
chris2 has quit [*.net *.split]
deavidsedice has quit [*.net *.split]
Armael has quit [*.net *.split]
Yoric has quit [*.net *.split]
Arthur__ has quit [*.net *.split]
PM has quit [*.net *.split]
zorun has quit [*.net *.split]
iZsh has quit [*.net *.split]
jave has quit [*.net *.split]
SuperNoeMan has quit [*.net *.split]
Leonidas has quit [*.net *.split]
fasta has quit [*.net *.split]
fds has quit [*.net *.split]
rossberg has quit [*.net *.split]
stomp has quit [*.net *.split]
ipoulet has quit [*.net *.split]
Cypi has quit [*.net *.split]
redfire has quit [*.net *.split]
weie has quit [*.net *.split]
Nahra has quit [*.net *.split]
jdoles has quit [*.net *.split]
samebchase has quit [*.net *.split]
brendan has quit [*.net *.split]
bholst has quit [*.net *.split]
spearalo1 has quit [*.net *.split]
thelema_ has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
amiller has quit [*.net *.split]
TaXules has quit [*.net *.split]
maurer has quit [*.net *.split]
Zeev has quit [*.net *.split]
ivan\ has quit [*.net *.split]
orbitz has quit [*.net *.split]
noplamodo has quit [*.net *.split]
whitequark has quit [*.net *.split]
alang has quit [*.net *.split]
bacam_ has quit [*.net *.split]
gbluma_ has quit [*.net *.split]
MarcWeber has quit [*.net *.split]
olasd has quit [*.net *.split]
mathieui has quit [*.net *.split]
jlouis has quit [*.net *.split]
willb1 has quit [*.net *.split]
tchell has quit [*.net *.split]
mrvn has quit [*.net *.split]
Snark has quit [*.net *.split]
cdidd has quit [*.net *.split]
mfp has quit [*.net *.split]
Simn has quit [*.net *.split]
avsm has quit [*.net *.split]
jbrown has quit [*.net *.split]
milosn_ has quit [*.net *.split]
cross has quit [*.net *.split]
yroeht has quit [*.net *.split]
rks`_ has quit [*.net *.split]
asmanur has quit [*.net *.split]
Khady has quit [*.net *.split]
Drup1 has quit [*.net *.split]
mort___ has quit [*.net *.split]
thizanne has quit [*.net *.split]
dezzy has quit [*.net *.split]
IbnFirnas has quit [*.net *.split]
flux has quit [*.net *.split]
wozzzz has quit [*.net *.split]
ccasin has quit [*.net *.split]
Ptival has quit [*.net *.split]
companion_cube has quit [*.net *.split]
vpm has quit [*.net *.split]
rgrinberg has quit [*.net *.split]
zzz_ has quit [*.net *.split]
bernardofpc has quit [*.net *.split]
ollehar has quit [*.net *.split]
lopex has quit [*.net *.split]
q66 has quit [*.net *.split]
mehdid_ has quit [*.net *.split]
quelu has quit [*.net *.split]
jayprich2 has quit [*.net *.split]
fayden has quit [*.net *.split]
rwmjones has quit [*.net *.split]
tianon has quit [*.net *.split]
BiDOrD has quit [*.net *.split]
patronus_ has quit [*.net *.split]
vbmithr_ has quit [*.net *.split]
dtg has quit [*.net *.split]
Jenza has quit [*.net *.split]
othiym23 has quit [*.net *.split]
NaCl has quit [*.net *.split]
hcarty has quit [Ping timeout: 260 seconds]
hcarty_ has joined #ocaml
ollehar has joined #ocaml
Drup1 has joined #ocaml
ocp has joined #ocaml
mrvn has joined #ocaml
ttm has joined #ocaml
mehdid_ has joined #ocaml
lusory_ has joined #ocaml
quelu has joined #ocaml
bacam_ has joined #ocaml
Yoric has joined #ocaml
jayprich2 has joined #ocaml
ousado has joined #ocaml
mort___ has joined #ocaml
yacks has joined #ocaml
wozzzz has joined #ocaml
eikke has joined #ocaml
maurer has joined #ocaml
travisbrady has joined #ocaml
transfinite has joined #ocaml
smondet has joined #ocaml
lopex has joined #ocaml
redfire has joined #ocaml
testcocoon has joined #ocaml
kaustuv has joined #ocaml
contempt has joined #ocaml
Khady has joined #ocaml
dezzy has joined #ocaml
asmanur has joined #ocaml
tchell has joined #ocaml
rks`_ has joined #ocaml
willb1 has joined #ocaml
yroeht has joined #ocaml
cross has joined #ocaml
thizanne has joined #ocaml
milosn_ has joined #ocaml
jbrown has joined #ocaml
avsm has joined #ocaml
mfp has joined #ocaml
cdidd has joined #ocaml
Snark has joined #ocaml
Simn has joined #ocaml
bernardofpc has joined #ocaml
zzz_ has joined #ocaml
rgrinberg has joined #ocaml
vpm has joined #ocaml
companion_cube has joined #ocaml
Ptival has joined #ocaml
ccasin has joined #ocaml
flux has joined #ocaml
IbnFirnas has joined #ocaml
ohama has joined #ocaml
pippijn has joined #ocaml
srcerer has joined #ocaml
q66 has joined #ocaml
chrisdotcode has joined #ocaml
madroach has joined #ocaml
jpdeplaix has joined #ocaml
troydm has joined #ocaml
gasche has joined #ocaml
alang_ has joined #ocaml
Arthur__ has joined #ocaml
PM has joined #ocaml
davekong has joined #ocaml
samebchase has joined #ocaml
pango has joined #ocaml
ggherdov has joined #ocaml
bobry has joined #ocaml
fayden has joined #ocaml
hyperboreean has joined #ocaml
wagle has joined #ocaml
rwmjones has joined #ocaml
tianon has joined #ocaml
Zeev has joined #ocaml
ivan\ has joined #ocaml
vext01 has joined #ocaml
xenocons has joined #ocaml
weie has joined #ocaml
zorun has joined #ocaml
iZsh has joined #ocaml
Nahra has joined #ocaml
chris2 has joined #ocaml
orbitz has joined #ocaml
jdoles has joined #ocaml
brendan has joined #ocaml
deavidsedice has joined #ocaml
ia0 has joined #ocaml
j0sh has joined #ocaml
emias has joined #ocaml
_habnabit has joined #ocaml
cow-orker has joined #ocaml
adrien_oww has joined #ocaml
tlockney has joined #ocaml
lenstr has joined #ocaml
Qrntz has joined #ocaml
sgnb has joined #ocaml
talzeus has joined #ocaml
josch_ has joined #ocaml
BiDOrD has joined #ocaml
patronus_ has joined #ocaml
vbmithr_ has joined #ocaml
dtg has joined #ocaml
Jenza has joined #ocaml
othiym23 has joined #ocaml
NaCl has joined #ocaml
gbluma_ has joined #ocaml
MarcWeber has joined #ocaml
olasd has joined #ocaml
mathieui has joined #ocaml
jlouis has joined #ocaml
noplamodo has joined #ocaml
whitequark has joined #ocaml
alang has joined #ocaml
bholst has joined #ocaml
spearalo1 has joined #ocaml
thelema_ has joined #ocaml
Asmadeus has joined #ocaml
amiller has joined #ocaml
TaXules has joined #ocaml
jave has joined #ocaml
SuperNoeMan has joined #ocaml
Leonidas has joined #ocaml
fasta has joined #ocaml
fds has joined #ocaml
rossberg has joined #ocaml
stomp has joined #ocaml
ipoulet has joined #ocaml
Cypi has joined #ocaml
Armael has joined #ocaml
def-lkb has joined #ocaml
mal`` has joined #ocaml
hnrgrgr has joined #ocaml
snarkyboojum has joined #ocaml
zopt has joined #ocaml
bitbckt has joined #ocaml
adrien has joined #ocaml
montik_ has joined #ocaml
nicoo has joined #ocaml
Derander has joined #ocaml
pr has joined #ocaml
ocp has quit [Ping timeout: 246 seconds]
Yoric has quit [Ping timeout: 245 seconds]
gnuvince has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
ttm has quit [Read error: Operation timed out]
The_third_man has joined #ocaml
pootler has joined #ocaml
Neros has joined #ocaml
gnuvince has quit [Remote host closed the connection]
Drup1 has quit [Read error: Connection reset by peer]
Drup has joined #ocaml
Drup has quit [Read error: Connection reset by peer]
Drup has joined #ocaml
Drup has quit [Client Quit]
ollehar has joined #ocaml
Drup has joined #ocaml
gnuvince has joined #ocaml
bacam_ is now known as bacam
dsheets has joined #ocaml
<whitequark> pippijn: btw, it may make sense to represent unicode characters as utf8s
<whitequark> since `utfN` is technically not a character but a codepoint
<pippijn> yes
<pippijn> characters are utf8s
<pippijn> utf8s is a string of codepoints encoded in utf8
* whitequark nods
<whitequark> hm, wait
<whitequark> I think characters != codepoints only in utf16
<pippijn> no
<pippijn> what is a character to you?
<whitequark> combining marks are characters, too
* whitequark is reading Unicode glossary
<whitequark> a grapheme is definitely utf8s
<pippijn> ok, grapheme
<pippijn> so what is a character vs. codepoint?
<whitequark> for utf8 and utf32, characters = codepoints, since codepoint represents an integer of 0:10FFFF in these encodings
maurer has left #ocaml []
<whitequark> and in utf16, a character can be one or two codepoints
<whitequark> since codepoints are smaller
<pippijn> where are you getting this?
<whitequark> and in all of the encodings above, a grapheme is composed of base character and possibly some combining characters
<pippijn> utf16 != ucs2
<whitequark> uh, right, ucs2
<whitequark> or wait, let me check
<whitequark> no, utf-16
<mrvn> didn't utf16 have codepoints that change a mode so japan/china chars can be done?
<whitequark> hmm
<pippijn> mrvn: sounds horrible
<whitequark> pippijn: hey, you implemented this :D
<pippijn> I implemented encodings
<whitequark> also you're right, in ucs16 codepoints = characters too
<whitequark> argh
<whitequark> utf16
* whitequark . o O ( should sleep )
<whitequark> so to summarize: utf8, utf16, utf32 all have codepoint = character. grapheme = one or more codepoints or characters; same amount of both.
<pippijn> ok
<pippijn> and a glyph?
<whitequark> In displaying Unicode character data, one or more glyphs may be selected to depict a particular character. These glyphs are selected by a rendering engine during composition and layout processing. (See also character.)
<pippijn> I read it
<pippijn> what does it mean?
<whitequark> in some languages (something something arabic), the look of a character can be radically changed by adjacent ones
<whitequark> so that's different glyphs for the same character
<pippijn> ah, I see
<pippijn> makes sense
<pippijn> so I named my type wrong in deliantra :)
<pippijn> because there, a glyph is actually a grapheme
<pippijn> I'll rename that
<whitequark> deliantra?
<whitequark> mmorpg?
<pippijn> yes
<whitequark> you wrote that?
<pippijn> together with 2 other guys
<pippijn> and I wrote two console clients, one in C++ and one unfinished in ocaml
<whitequark> seems like a huge undertaking
<pippijn> yes, years :)
<whitequark> the graphics is painfully horrible :(
<whitequark> common for almost all foss games
<pippijn> but more content than every other foss game I know
<whitequark> totally believe you.
<pippijn> oh the memories: https://paste.xinu.at/jI1cA/
<whitequark> ohhh
<whitequark> release it already
<whitequark> and take my money
<pippijn> it's much more impressive when you actually play it
<pippijn> and things are animated
<pippijn> pulsating colours, changing graphemes, line of sight making unseen things grey
<whitequark> I've played dwarf fortress
<Drup> pippijn: did you looked at diablo rl ? :p
<whitequark> as I said
pootler has quit [Ping timeout: 246 seconds]
<whitequark> take my money :D
<pippijn> Drup: I don't know?
<pippijn> oh
<pippijn> Drup: no, but interesting
<pippijn> I didn't know about that one
<Drup> it's quite recent
<pippijn> ok
<pippijn> deliantra is quite old
<pippijn> and that screenshot is from 2010
<pippijn> 2010-10-20 10:40:12
<pippijn> Drup: aw
smondet has quit [Quit: Leaving]
<pippijn> Drup: not as nice as mine :)
<pippijn> Drup: we use unicode
<pippijn> (trying to use a subset supported by common fonts)
<pippijn> ☺
pootler has joined #ocaml
<pippijn> Drup: is diablo rl an online game?
<Drup> pippijn: I just linked from a gamer point of view, not programmer. ;)
<pippijn> yeah, but as a gamer, I like unicode stuff in text games
<Drup> pippijn: no, it follow closely the "story" of Diablo 1 but translated to a roguelike
<pippijn> ok
<Drup> so it solo permadeath and so on
<pippijn> deliantra is a lot of fun to work on
<pippijn> and also fun to play
<pippijn> I used to play that a lot
<pippijn> (too much)
<Drup> :D
<pippijn> I always do that.. when I find a game I like, I go crazy and become really good, and then my life is down the gutter
<pippijn> better be coding instead :)
<mort___> quick question - is there a way to pass switches (specifically -I) to ocamlc from the environment (ie not via command line)?
<pippijn> I don't think so
<mort___> hm - i thought as much (after reading man pages anyway)
<Drup> pippijn: the same, except I don't become any good at it, I just enjoy playing it ;)
<mort___> bother
<mort___> thanks!
<pippijn> mort___: mkdir ~/.bin; echo '#!/bin/sh' > ~/.bin/ocamlc; echo 'ocamlc -I $OCAMLINC' >> ~/.bin/ocamlc; export PATH=~/.bin:$PATH
<pippijn> wait
<pippijn> mort___: mkdir ~/.bin; echo '#!/bin/sh' > ~/.bin/ocamlc; echo 'ocamlc -I $OCAMLINC "$@"' >> ~/.bin/ocamlc; export PATH=~/.bin:$PATH
Snark has quit [Ping timeout: 246 seconds]
<pippijn> oh no
<pippijn> $* instead of $@
<pippijn> something like this, anyway.. I'm no good at shell script
<mort___> ack
<pippijn> I never know whether it's "$*" or "$@" or without ""
<mort___> will do that as a hack for now :)
<mort___> thx
travisbrady has quit [Quit: travisbrady]
<mort___> hm. actually no - this is to do with trying to build opam things inside nixos
<mort___> so overriding installed elements with shell scripts is messy
<mort___> hm
<pippijn> you use nixos?
<ousado> how about extending opam a little to replace nix :)
<pippijn> ^- grapheme
<pippijn> BatUTF8
<pippijn> reminds me, it was hard to deploy on a remote server, because batteries needed the camomile databases
<mort___> pippijn: trying to use nixos - would like to be able to use it as a mirage development environment
<mort___> ousado: i think that would not be a little extension :)
<pippijn> mirage?
<pippijn> https://github.com/mirage <- this?
<pippijn> oh
<pippijn> http://openmirage.org/ <- this?
<pippijn> that looks interesting
<ousado> that's avsms project
<ousado> pretty cool..
<pippijn> unfortunately
<pippijn> this is what the ocaml version is currently at
<pippijn> no UI
<pippijn> I need to get my widget toolkit done
<pippijn> I wanted to do it in a purely functional way
<mort___> pippijn, ousado: yes
<pippijn> I'm not happy with my protocol implementation
<pippijn> lwt is everywhere
<mrvn> can't use lwt with SDL I think
<pippijn> makes unit testing hard
<pippijn> I need to decouple it
<pippijn> but I'm not sure how
<pippijn> I could make my own network monad
<mrvn> pippijn: I buffer writes transparently in the background and have callbacks for incoming packets.
<pippijn> mrvn: is your network library monadic?
<mrvn> pippijn: Each packet is boxed with a size and type id and you register a handler for each ID.
<mrvn> The handler has to do the deserializing itself.
<pippijn> oh, your network framework defines a protocol
<pippijn> I can't use it then
<mrvn> Just the boxing.
<pippijn> can it be used to implement http?
<ollehar> gah, why can't I coerce record types!
<mrvn> actualy there are multiple classes. The base class just has on_read/on_write callbacks and the boxing then plugs into them to do more stuff.
<mrvn> pippijn: you could define a http class analog to how I defined a boxed class
<pippijn> ah
<mrvn> I still need to seperate connections and protocol more.
<pippijn> I like the fact that my client is almost entirely functional
<pippijn> everything except the map
<pippijn> that's an array
<mrvn> pippijn: I did a implementation of the core without objects too: http://paste.debian.net/14866
<pippijn> actually it's a lot of arrays..
<pippijn> it's a map_cell deque deque
<mrvn> No boxing in that one. Just an echo server
<mrvn> pippijn: where do you get your deque from?
<pippijn> my deque is 2 BatDynArrays
<pippijn> one for positive and one for negative indices
<pippijn> mrvn: that's a lot of mutation
<mrvn> pippijn: Huh? Only the write_bufs are mutable. That should be a queue
<pippijn> ok
<pippijn> hm, yeah
<pippijn> looks nice
<pippijn> well, I really like lwt for being monadic
<mrvn> The Hashtbl isn't functional and the write_bufs.
mcclurmc has joined #ocaml
<pippijn> this module connects to the server and returns 2 functions
<pippijn> a recv and a send function
<pippijn> the recv function is then called with a (handler : 'a -> string -> 'a Lwt.t) and an (env : 'a)
<pippijn> recv loops until the network connection dies
<pippijn> send writes commands prefixed with their length (16 bit) to the socket
<pippijn> the rest is done in the protocol handler
<pippijn> but the protocol handler doesn't know anything about send and receive buffers
<pippijn> the protocol handler doesn't know about a receive function, either, it just gets one message at a time, and a send function that it can use to respond
<pippijn> the protocol parser doesn't know about the send function, either, that one just parses messages
<mrvn> how do you know what a message is?
<pippijn> at first, a message is a byte string with a certain length
<mrvn> that kind of sucks for e.g. http.
<pippijn> mrvn: this is for deliantra
<pippijn> not http
<pippijn> this is not a framework
<pippijn> this is a networked game
<pippijn> I want to use a nice framework
<pippijn> lwt is pretty nice, so far
<mrvn> problem is how to do the GUI with lwt.
<pippijn> why?
mort___ has quit [Quit: Leaving.]
<mrvn> because when you call the GUIs event loop the lwt threads block
<pippijn> it's fine with lablgtk
<pippijn> lwt can be integrated with the glib event loop
<pippijn> or glib can use the lwt event loop
<mrvn> SDL sucks there. you can't even integrate sockets
<pippijn> and for deliantra, I want to make my own UI toolkit with ncurses
<Drup> why does opam suddenly want to downgrade lots of my package ? O_o
<pippijn> so that's easy, because ncurses just needs one fd: stdin
<pippijn> I stopped working on that, because I couldn't figure out a good way to get reasonable performance with immutable widgets
<mrvn> imho GUI elements are inheriently objects. Anything else is just painfull.
eikke has quit [Ping timeout: 240 seconds]
oriba has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<pippijn> mrvn: yes, objects
<pippijn> mrvn: but can't they be immutable objects?
<mrvn> so when I press a button you create a new one with pressed=true, then a new button box, new grid, new table, ...., new window?
<pippijn> well, that is the question
<pippijn> how does haskell do it?
<pippijn> monadic mutation?
<pippijn> I was thinking that you could have the structure separated from the behaviour
<mrvn> you can give every widget an ID and use the ID instead of the object in the parent. That way you only need to create a new button and the storage of all widgets by id.
<pippijn> yeah, my idea was a little different
ollehar has quit [Ping timeout: 248 seconds]
<pippijn> I was thinking I could have the widget hierarchy as structure and store the data model (including "pressed" or "checked" things) somewhere else
<pippijn> perhaps with an ID
<mrvn> still ends up with O(log n) for every action
<mrvn> Or can you do a functional map that has faster replace?
<pippijn> a very cheap O(log n)
<mrvn> n == number of widgets
<pippijn> no, but with a prefix trie on integers, that's pretty fast
<pippijn> you don't need to create new widgets all the time
<pippijn> or HAMT
<mrvn> every widget has a size that can change
<pippijn> actually
<pippijn> no :)
<pippijn> I don't need that
<pippijn> widgets only change size when the window resizes
<mrvn> yes. And then you recreate them all?
<pippijn> no
<pippijn> then I recompute the size for all
<pippijn> the size is already stored externally
<pippijn> by ID
<pippijn> O(log n) to look up
<mrvn> ==> n == number of widgets
<pippijn> yes
<pippijn> but lookups are fast, allocations are not
<pippijn> log_2 64 is still just 6
<mrvn> allocations are fast in ocaml
<pippijn> * 64 = 384
<pippijn> mrvn: small allocations are fast
<pippijn> recreating the whole widget tree on every change is not fast
<mrvn> mutables.
<pippijn> yes, maybe I really need to drop the idea of immutable widgets
<mrvn> I just change the pressed state. Not even an allocation for a bool
<pippijn> separating everything into maps is not pretty, either
<Drup> pippijn: do you have a reason for wanting absolutly immutable widgets ?
<pippijn> Drup: purely academic interest :)
<pippijn> just for fun
<mrvn> pippijn: yeah. It works but it is slower and ugly.
<pippijn> mrvn: the slower part is not important to me
<pippijn> the ugly part is
<pippijn> I want a pretty widget toolkit
<pippijn> nice code
<Drup> pippijn: wouldn't you be satisfied by frp ?
<pippijn> I don't know that
<Drup> pippijn: and http://erratique.ch/software/react for an ocaml lib
<pippijn> Summary: FRP is about handling time-varying values like they were regular values.
<pippijn> is that true?
<pippijn> time-varying?
<Drup> kind of, yes
<pippijn> what about user input?
<Drup> it's time varying values, isn't it ? :)
<pippijn> ok
<pippijn> for example
<pippijn> the frame that currently has focus must be highlighted
<mrvn> at time t1 the q key is pressed, at t2 the q key is released
<pippijn> ok, so React hides the mutation
<pippijn> right?
<mrvn> pippijn: Another idea that might work is to build a tree of the widgets and mutate it as the mouse moves so the widget under the mouse is always at the root.
<Drup> you could see it like that but I prefer to see it as a graph of dependency between values and "clever" reexecution of values when you replace a values by another
hnrgrgr has quit [Ping timeout: 246 seconds]
hnrgrgr has joined #ocaml
<pippijn> mrvn: that's an interesting idea
<Drup> and in fact, there is no real mutation, the old value is still there
<ousado> that's called a zipper, right?
<pippijn> mrvn: but what about widgets that change without user input?
<mrvn> pippijn: they will be slow
<pippijn> ok
<mrvn> pippijn: there might be ways to move them close to the top though.
<mrvn> haven't thought about that
<pippijn> in practice, I don't have a lot of widgets
<Drup> this solution seems ot me like a nightmare to code with
<mrvn> you need better graphics
<pippijn> what needs to improve?
<Drup> mrvn: there is no better graphics than ascii !
Neros has quit [Quit: No Ping reply in 180 seconds.]
<pippijn> I think it's pretty :)
<mrvn> My game is a bit like Master of Orion. I need a map of the galaxy.
<mrvn> wouldn't be pretty in ascii
<pippijn> ok, anyway
<pippijn> 5 frames
Neros has joined #ocaml
<pippijn> in the first frame, there is a map widget
<mrvn> Is a list of things one widget or a widget containing one text widget per line?
<pippijn> the map renderer renders into the frame
<pippijn> that list is one widget in the implementation in the screenshot
<pippijn> and statistics is also one widget
<pippijn> but maybe that will be different for the new client
<mrvn> For me it's probably a container with lots of widgets in it. Makes for a lot more widgets then.
<pippijn> yes
<pippijn> I think that will be one widget per item
<mrvn> I will probably have to deal with 1000 widgets.
<pippijn> all but 9 will be invisible
gnuvince has quit [Remote host closed the connection]
<pippijn> maybe they shouldn't exist, then
<pippijn> they can be created on demand
<mrvn> then how do you compute the size of the scroll bar?
<pippijn> there is a model, it knows how many elements are in the list
<pippijn> but the contents don't need to be loaded right away
<mrvn> makes sense
Neros has quit [Ping timeout: 264 seconds]
<mrvn> time to get some shut eye
<mrvn> Gonna finish my "connect" dialog tomorrow.
<pippijn> good night
pootler has quit [Ping timeout: 264 seconds]
pootler has joined #ocaml
pr has quit [Ping timeout: 240 seconds]
pr has joined #ocaml
pr has quit [Changing host]
pr has joined #ocaml
thizanne has quit [Ping timeout: 276 seconds]
thizanne has joined #ocaml
hnrgrgr has quit [Ping timeout: 276 seconds]
hnrgrgr has joined #ocaml