avsm changed the topic of #mirage to: mirage 2 released! party on!
<aantron> design and implement..*
<aantron> Drup: is this available in nice machine-readable form somewhere? i was thinking the same thing
<aggelos_> aantron: hey, it took me a couple of days to (maybe) figure out how to structure this webdav thingy independently of cohttp, you won't hear any complaints from me
<aantron> i actually have a nice requesting library (based on cohttp internally) lying around from a private project, but it would need some cleanup to be publishable..
<aantron> plus i would compulsively rewrite it anyway :p
<Drup> aantron: kinda, in the git repository of the spec
dsheets has joined #mirage
dsheets has quit [Ping timeout: 250 seconds]
thomasga has quit [Quit: Leaving.]
dsheets has joined #mirage
dsheets has quit [Ping timeout: 260 seconds]
dsheets has joined #mirage
dsheets has quit [Ping timeout: 240 seconds]
<aggelos_> ugh just checking for dumb stuff like <!ELEMENT allprop EMPTY > is so much boilerplate
dsheets has joined #mirage
dsheets has quit [Ping timeout: 244 seconds]
konrad has quit [Ping timeout: 260 seconds]
dsheets has joined #mirage
dsheets has quit [Ping timeout: 268 seconds]
<aantron> aggelos_: so you are going ahead with DTD parsing?
brson has quit [Ping timeout: 260 seconds]
dsheets has joined #mirage
dsheets has quit [Ping timeout: 260 seconds]
dsheets has joined #mirage
dsheets has quit [Ping timeout: 250 seconds]
brson has joined #mirage
mcclurmc has quit [Ping timeout: 268 seconds]
seangrove has joined #mirage
mcclurmc has joined #mirage
mcclurmc has quit [Ping timeout: 244 seconds]
jermar has quit [Ping timeout: 248 seconds]
dsheets has joined #mirage
dsheets has quit [Ping timeout: 250 seconds]
brson has quit [Quit: leaving]
dsheets has joined #mirage
dsheets has quit [Ping timeout: 250 seconds]
<maker> no more trash cans around in priscilla
mort___ has joined #mirage
mort___ has quit [Client Quit]
mort___ has joined #mirage
yomimono has joined #mirage
gemmag has joined #mirage
<yomimono> hi gemma! :D
amirmc has joined #mirage
jermar has joined #mirage
mort___ has quit [Quit: Leaving.]
mort___ has joined #mirage
dsheets has joined #mirage
mort___ has quit [Quit: Leaving.]
tomboy65 has quit [Ping timeout: 248 seconds]
amirmc has quit [Quit: Leaving.]
tomboy65 has joined #mirage
mort___ has joined #mirage
tomboy64 has joined #mirage
tomboy65 has quit [Ping timeout: 248 seconds]
mort___ has quit [Ping timeout: 250 seconds]
mort___ has joined #mirage
jgjl has joined #mirage
avsm has joined #mirage
thomasga has joined #mirage
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yomimono has quit [Ping timeout: 260 seconds]
thomasga has quit [Remote host closed the connection]
<aggelos_> aantron: not sure yet. yesterday, while waiting to fall asleep I was thinking that possibly I could trivially do the validtionto soup (in a single function), i.e. compile the dtd by hand
<aggelos_> and probably get it wrong
<aggelos_> but then I'd be ready for dtd validation using soup some day
tomboy65 has joined #mirage
avsm has quit [Ping timeout: 252 seconds]
tomboy64 has quit [Ping timeout: 260 seconds]
reynir1 is now known as reynir
dsheets has quit [Remote host closed the connection]
<aggelos_> wait, there is no webdav dtd or xsl?
<aggelos_> ok
<aggelos_> then why the hell use xml in the first place??
<aggelos_> oh right
<aggelos_> buzzwords
<aggelos_> I keeep forgetting
<aggelos_> ah now
<aggelos_> rfc appendix
tomboy64 has joined #mirage
<aggelos_> aantron: are you interested in eventually having dtd support in lambdasoup?
tomboy65 has quit [Ping timeout: 250 seconds]
dsheets has joined #mirage
<aggelos_> hmm
<aggelos_> now when did shaving this yak^Wcamel start looking like a good idea?
yomimono has joined #mirage
jgjl has joined #mirage
jgjl has quit [Client Quit]
tomboy65 has joined #mirage
tomboy64 has quit [Ping timeout: 244 seconds]
jgjl has joined #mirage
<gemmag> Hi yomimono - and everyone :) Loving catching up with what everyone is working on!
dsheets has quit [Remote host closed the connection]
jgjl has quit [Max SendQ exceeded]
ecerulm has quit [Quit: Connection closed for inactivity]
jgjl has joined #mirage
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tomboy65 has quit [Ping timeout: 248 seconds]
tomboy65 has joined #mirage
konrad has joined #mirage
dsheets has joined #mirage
djs55 has joined #mirage
dsheets has quit [Ping timeout: 244 seconds]
dsheets has joined #mirage
mcclurmc has joined #mirage
wiredsister has joined #mirage
dsheets has quit [Remote host closed the connection]
dsheets has joined #mirage
gemmag has quit [Quit: Leaving.]
djs55 has quit [Quit: Leaving.]
<aantron> aggelos_: i would be up for it. it would also be super cool if you wanted to work on it together :) if you want to give me a nudge, open an issue on lambda soup or markup.ml. but the right answer might be a new third library. anyway an issue would bring it to the attention of people not in IRC
<aggelos_> aantron: well I looked at the dtd parser in xml-light and reimplementing that seemed too large a detour
<aggelos_> just switched to xml-light for now, so I could make a bit of progress on webdav :(
<aantron> one of the best things for interaction with markup/soup might be to either write an xml-light -> signal stream function, or to port xml-light's (or some library's) DTD checker to be a filter over a signal stream or a tree built from signals
wiredsister has quit [Ping timeout: 276 seconds]
mort___ has quit [Quit: Leaving.]
<aggelos_> aantron: no lwt then?
yomimono has quit [Ping timeout: 240 seconds]
<hannes> morning
<aantron> aggelos_: lwt seems orthogonal to this discussion, what do you mean?
<aggelos_> aantron: I meant just in time resolution and parsing of the dtd
<aantron> right, streaming. i think a lot of properties captured by DTDs can be checked in streaming mode, and that would be the main advantage of having a DTD checker that works on a markup signal stream
djs55 has joined #mirage
<aantron> (at least i think you meant streaming)
<aantron> or... did you mean retrieval of the DTD, if the XML document is not standalone?
<aggelos_> I meant both
<aggelos_> well, non-blocking retrieval of the dtd is the bare minimum
<aggelos_> mm
<aggelos_> so I'm using xml-lite for parsing and markup for output
<aggelos_> and they both define a Parser module
<aggelos_> is there a way to get oasis to perform magic for me and dwiw
<aggelos_> ?
<aantron> hmm i dont recall having a module called Parser in markup..
<aantron> and yeah, i considered all these complications, such as DTD retrieval on demand, which is why i decided it might be best left to a separate library, since that's a whole project :)
<aantron> as long as markup provides all the key hooks and information, it should be straightforward to build a flexible DTD checker on top of it
<aggelos_> sorry, I meant Xml_parser
<aantron> i cant think of any trick for renaming these automatically.
yomimono has joined #mirage
<aggelos_> what would be the manual way?
<aantron> get the dev version of markup or xml-light, and rename the file and all references to the name, then compile. is it a public module in xml-light? its an internal module in markup, so you wouldnt break any API if you did it in markup
<aantron> i should probably scope the names anyway. care to open an issue?
<aantron> also, i was experimenting with using the namespaces tool, which would have the side-effect of scoping markup's internal modules automatically, but that is probably weeks away
<aantron> interesting. xml-light has both XmlParser and Xml_parser?
Algebr``` has joined #mirage
<aantron> ah. Xml_parser is the menhir/ocamlyacc-generated module.
<aantron> so i guess its internal in xml-light too, so it doesnt matter which one you do it in
<aggelos_> hmm
Algebr``` has quit [Ping timeout: 268 seconds]
yomimono has quit [Ping timeout: 264 seconds]
mrgrieves has joined #mirage
jermar has quit [Ping timeout: 244 seconds]
jermar has joined #mirage
beaumonta has joined #mirage
miragebot has joined #mirage
<miragebot> [mirage] talex5 pushed 2 new commits to master: https://git.io/va0wd
<miragebot> mirage/master 47b8186 Thomas Leonard: Disable warning 34 on static files...
<miragebot> mirage/master baefac7 Thomas Leonard: Merge pull request #516 from talex5/static-error...
miragebot has left #mirage [#mirage]
brson has joined #mirage
tomboy64 has joined #mirage
tomboy65 has quit [Ping timeout: 248 seconds]
jermar has quit [Ping timeout: 244 seconds]
tomboy64 has quit [Ping timeout: 244 seconds]
tomboy64 has joined #mirage
tomboy65 has joined #mirage
tomboy64 has quit [Ping timeout: 260 seconds]
mrgrieves has quit [Ping timeout: 260 seconds]
tomboy64 has joined #mirage
tomboy65 has quit [Ping timeout: 264 seconds]
jgjl has joined #mirage
mrgrieves has joined #mirage
mort___ has joined #mirage
tomboy65 has joined #mirage
dsheets has quit [Remote host closed the connection]
tomboy64 has quit [Ping timeout: 260 seconds]
mrgrieves has quit [Ping timeout: 276 seconds]
dsheets has joined #mirage
beaumonta has quit [Ping timeout: 276 seconds]
dsheets has quit [Ping timeout: 240 seconds]
mrgrieves has joined #mirage
gemmag has joined #mirage
<aggelos_> ugh tired
<aggelos_> sleep is underrated
<aantron> :p
<aggelos_> "when faced with two Xml_parsers, drowsily browse the internet" is what I say
<aantron> im going to prefix the modules today
<aggelos_> oh really
<aggelos_> that changes everything
<aantron> meanwhile i added https://github.com/aantron/markup.ml/commit/d010d5c0e52ac8eb21dfd655cb3eaf7fca8bd6c5#diff-1831d851f507fbb8d29c6c58c2d8223eR588, just waiting for travis to do its thing before committing
<aggelos_> now I can browse the net and feel good about it :)
mrgrieves has quit [Remote host closed the connection]
<aantron> hehe
<aggelos_> aantron: oh nice!
<aantron> you will still want to use a pinned version of markup, until the next OPAM release, though
<aggelos_> aantron: np
<aantron> do you still have a need for a "transform" function to avoid a ref?
<aggelos_> could make use of it to avoid the ref, yah
gemmag has quit [Quit: Leaving.]
<aantron> thoughts on interface? https://github.com/aantron/markup.ml/issues/9
<aggelos_> perhaps I'm not the best person to ask? for my use case an async stream is fine, so I'd prefer the more flexible interface
<aggelos_> but fwiw I can't tell from the sig why you want the option there
<aggelos_> in the first one I mean
<aantron> there needs to be a way to stop the stream that you are generating
<aggelos_> uh yah brain fart
dsheets has joined #mirage
djs55 has quit [Quit: Leaving.]
yomimono has joined #mirage
aantron has quit [Remote host closed the connection]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aantron has joined #mirage
<maker> is there any alive example of html templating using cow?
<maker> the new cow
<maker> the one without camlp4
<maker> on the latest commits I see all syntax extensions have been removed, so I think all the stuff I read on mirage-www is broken
<maker> and tests/ seems to "test" only xml
jgjl has joined #mirage
<aantron> aggelos_, you should now be able to use markup.ml master and xml-light together without conflicts: https://github.com/aantron/markup.ml/commit/f2e72e7b5bcc3c56d28e504d6301f3b6f0352774
<aantron> im going to add a transform function in a few hours, have to do a few other things first in life
<aggelos_> aantron: many thanks!
<aggelos_> pinned and back to compiling state
<aggelos_> hmm
<aggelos_> any software I could look at for best practices re: nested monadic stuff? (think 'a result Lwt.t)
<aggelos_> I mean, what I have now makes haskell look pretty attractive ;)
mrgrieves has joined #mirage
mrgrieves has quit [Quit: leaving]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brson has quit [Ping timeout: 240 seconds]
mort___ has quit [Quit: Leaving.]
tomboy65 has quit [Ping timeout: 276 seconds]
tomboy65 has joined #mirage
djs55 has joined #mirage
mort___ has joined #mirage
brson has joined #mirage
jermar has joined #mirage
seangrove has quit [Ping timeout: 276 seconds]
<aantron> aggelos_: what are you trying to do with the monads?
<aantron> any objection to transform : ('a -> 'b -> 'c list * 'a option) -> 'a -> ('b, 's) stream -> ('c, 's) stream ?
<aantron> (async version: transform : ('a -> 'b -> ('c list * 'a option) io) -> 'a -> ('b, _) stream -> ('c, async) stream )
<aggelos_> looks fine
jgjl has joined #mirage
tomboy64 has joined #mirage
<aggelos_> aantron: not much, working in lwt but also passing around result types, the different kinds of binds and maps seem a bit awkward
<aggelos_> especially since I've got a webdav_result_map :)
<aggelos_> was just wondering if this is as good as it gets ;)
tomboy65 has quit [Ping timeout: 244 seconds]
<aantron> i mean, specifically what do you want to do, and what is an obstacle right now?
<aantron> you have two monads and two separate bind operations, is that what you mean?
<aantron> and you'd like to use >>= (or some other syntax) for both?
<aantron> (in which case an easy way to deal with it is local opens, Lwt.Infix.(foo >>= fun _ -> bar >>= fun _ -> Other_module.(baz >>= ...) ...)
<aantron> not as neat as haskell, but still workable
<aantron> you can also try the various ppxs out there that try to make working with monads easier, by adding do-notations and the like
<aantron> i think the ultimate solution has to wait until ocaml gets modular implicits
<aggelos_> oh is that happening?
<aantron> afaik its supposed to happen "eventually" :p
<aggelos_> I was mostly whining about stuff like the last function def here http://paste.lisp.org/display/310213
<aggelos_> oh eventually
<aggelos_> ok then :)
<aantron> yeah. just tried searching for the latest status, but i couldnt find any recent comments on ETA
<aantron> well that map thing is usually solved with an infix operator or a syntax extension
<aggelos_> yah but how do ppl deal with two or three such types?
<aantron> well, you define these in separate modules, each such module containing the infix operators >>= and >|=
beaumonta has joined #mirage
<aantron> then you do a local open: Lwt.Infix.( (* Lwt's >>= is now visible as just >>= *) )
<aggelos_> and you do the thing above, ok
<aantron> yeah
<aggelos_> alright
<aggelos_> just thought I'd ask re: best practices
<aantron> there are also a bunch of ppxs for this
<aantron> Lwt has its own, but there are also generic ones, such as ppx_let, ppx_monadic, omonad, etc.
<aggelos_> seems a bit of overkill for this
<aantron> probably. but may be worth taking a look
<aggelos_> though OTOH, if not here then where
<aantron> after all as a user of the packages you only add "-package whatever_monad" and you get do-notation or whatever is provided :)
<aantron> you can do "opam search monad" to get an idea of the current selection
<aantron> most of them also allow you to pick a module somehow, for scoping bind and map. but ive stuck with local opens generally
<aggelos_> kk, thanks for theh guidance
jgjl has quit [Max SendQ exceeded]
seangrove has joined #mirage
dsheets has quit [Remote host closed the connection]
brson has quit [Ping timeout: 244 seconds]
dsheets has joined #mirage
<aggelos_> hmm do I really want to be parsing Content-Type using String?
<aggelos_> ugh might as well be coding in C then
<aggelos_> Str it is then :(
jgjl has joined #mirage
beaumonta has quit [Ping timeout: 240 seconds]
jgjl has quit [Max SendQ exceeded]
<aantron> there are also supposedly some nicer regexp libraries, none of which i have tried
<Drup> Use re for regexs
brson has joined #mirage
Algebr` has joined #mirage
beaumonta has joined #mirage
tekess has joined #mirage
yomimono has quit [Ping timeout: 244 seconds]
dsheets has quit [Remote host closed the connection]
jgjl has joined #mirage
jgjl has quit [Client Quit]
<aggelos_> ugh is there a definition of token in the sense of https://tools.ietf.org/html/rfc2616#section-2.2 already out there?
<aggelos_> I mean, I'm sure there Is, just not sure where
<aggelos_> ffs why does 2616 define token as a /blacklist/
<aggelos_> token = 1*<any CHAR except CTLs or separators>
<aggelos_> ok, that's kinda hard to express in any RE library
<aggelos_> it's hard to express in lex even
<aggelos_> someone was seriously expecting a call to iscntrl
djs551 has joined #mirage
djs55 has quit [Read error: Connection reset by peer]
<mort___> Astring is nice for string chopping and suchlike
<Algebr`> stringext nice too
Algebr`` has joined #mirage
tekess` has joined #mirage
beaumonta has quit [Ping timeout: 248 seconds]
tekess has quit [Ping timeout: 244 seconds]
Algebr` has quit [Ping timeout: 252 seconds]
<aantron> aggelos_: won't a negated character class ([^abcd]) do what you want with that blacklist?
<aggelos_> aantron: it will, currently trying to figure out how to construct the re from let tokchar2616 = "[]\000-\031\127)(><@,;:\\\"/[?=}{ \t]";;
<aantron> *shuts eyes*
<aggelos_> waiting for chthulu to go "did someone call?" any second now
<aantron> :D
<aantron> aggelos_: well, transform is in master now, so you can save those 2 lines that transform can save you :p
seangrove has quit [Ping timeout: 244 seconds]
<aggelos_> aantron: hold on, I'm almost done writing the parsing code for content-type
<aggelos_> probably the most boring thing I've done the last 6 months
<aantron> wow. content-type is exciting compared to what ive done in the last 6 months.. which is deal with HTML :/
jermar has quit [Ping timeout: 268 seconds]
<Algebr``> see content type editable
<aggelos_> aantron: b/c it can be done? :)
<aantron> thats one reason :)
<Drup> aggelos_: what's the problem with <any CHAR except CTLs or separators> ?
<Drup> Re.(compl [cntrl])
beaumonta has joined #mirage
beaumonta is now known as abeaumont_
<aggelos_> Drup: it's clearly a transcription from C and makes the regexp awkward
<aggelos_> sigh, ok, code is there. will start testing in a bit :P
<Drup> Does it ? I don't think the code I gave you is akward
<Drup> Just stop using the textual representation of regexp. You are only hurting yourself. Use the combinators, luke.
seangrove has joined #mirage
dsheets has joined #mirage
abeaumont_ has quit [Read error: Connection reset by peer]
<aggelos_> Drup: see above, it's not just the ctrl chars (which are covered by \000-\031\127 anyways)
abeaumont_ has joined #mirage
<Drup> aggelos_: I persist, combinators makes everything simpler. All regex in the usual syntax looks alien too me.
dsheets has quit [Ping timeout: 276 seconds]
<aggelos_> Drup: ok. I'm sure they do, forgive me but I'm not going to translate the above regexp right this instant though
<Drup> It is so bad, it seems to be mostly charsets
<Drup> ?
<aggelos_> Drup: it's not so bad. it's simply thankless work and I'm grumpy due to lack of sleep
<Drup> fair enough
<aggelos_> fwiw, this is what the totally untested version looks like http://paste.lisp.org/display/310222
<Drup> (btw, are you sure this langauge is regular ?)
<aggelos_> it's not, of course
<aggelos_> this was just for the lexing
<aggelos_> you'll notice the recursion in parse_param
<Drup> Why are you even using that for lexing instead of .. a lexer ?
<aggelos_> because there's just one pattern, the silly token
djs551 has quit [Quit: Leaving.]
<Drup> huh, ok
yomimono has joined #mirage
<aggelos_> mm and apparently there's no way to communicate the encoding to xml-light's parser
djs55 has joined #mirage
<aggelos_> technically I could do that for markup.ml
<aggelos_> not sure if I should be switching xml parsers again
<aantron> mmm what does xml-light do? assume input is ascii? utf-8?
<aggelos_> nfi
<aggelos_> hopefully it stays away from LANG at least :P
<aggelos_> hmm
<aggelos_> OR, one could go the cohttp way:
<aggelos_> let media_type_re = let re = Re_emacs.re ~case:true "[ \t]*\\([^ \t;]+\\)" in Re.(compile (seq ([start; re])))
<aggelos_> and accept invalid tokens
<aggelos_> (I honestly can't blame the author :P)
seangrove has quit [Read error: Connection reset by peer]
seangrove has joined #mirage