<aantron_>
if you can propose a good interface for formatting a tree structure as an event stream, i can add it to markup.ml
seangrov` has joined #mirage
<aantron_>
i guess xmlm already has some interface for this, so perhaps this is your best bet for the time being. but i may want to emulate it as well :)
ecerulm has quit [Quit: Connection closed for inactivity]
aantron has quit [Read error: Connection reset by peer]
rudenoise has quit [Remote host closed the connection]
aantron has joined #mirage
yomimono_ has quit [Ping timeout: 250 seconds]
mort___ has joined #mirage
gemmag has joined #mirage
copumpkin has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gemmag has left #mirage [#mirage]
gemmag has joined #mirage
mort___ has quit [Quit: Leaving.]
djs55 has joined #mirage
abeaumont_ has quit [Ping timeout: 250 seconds]
Algebr` has quit [Ping timeout: 268 seconds]
rudenoise has joined #mirage
ezyang has quit [Remote host closed the connection]
yomimono has joined #mirage
yomimono has quit [Ping timeout: 240 seconds]
thomasga has joined #mirage
rudenoise has quit [Remote host closed the connection]
<haesbaert>
nuc1 is back
<haesbaert>
machine rebooted probably due to power outtage
thomasga has quit [Quit: Leaving.]
thomasga has joined #mirage
rudenoise has joined #mirage
yomimono has joined #mirage
seangrov` has joined #mirage
<thomasga>
a new version of mirage.io will be online soon, where the HTML templates don't use camlp4 anymore. If you see some style breakages please report them!
<yomimono>
yaaaaaaaay!
<haesbaert>
fyi: nuc1 is back, machine had rebooted.
seangrov` has quit [Ping timeout: 264 seconds]
thomasga has quit [Quit: Leaving.]
dsheets has joined #mirage
yomimono_ has joined #mirage
yomimono has quit [Ping timeout: 244 seconds]
yomimono_ has quit [Ping timeout: 260 seconds]
thomasga has joined #mirage
djs55 has quit [Quit: Leaving.]
beaumonta has joined #mirage
thomasga1 has joined #mirage
thomasga has quit [Read error: Connection reset by peer]
mort___ has joined #mirage
yomimono_ has joined #mirage
miragebot has joined #mirage
<miragebot>
[mirage] samoht pushed 2 new commits to master: https://git.io/valmN
<miragebot>
mirage/master c1520cb Mindy Preston: re-run oasis to get correct version number (2.7.0)...
<miragebot>
mirage/master 7779a7b Thomas Gazagnaire: Merge pull request #513 from yomimono/fix_version...
miragebot has left #mirage [#mirage]
jgjl has joined #mirage
mort___ has quit [Ping timeout: 244 seconds]
jgjl has quit [Max SendQ exceeded]
thomasga1 has quit [Read error: Connection reset by peer]
copumpkin has joined #mirage
djs55 has joined #mirage
<yomimono_>
hey djs55, I was just trying to pin your ppx ocaml-cstruct PR
<yomimono_>
it depends on type_conv though which depends on camlp4... how about ppx_type_conv instead?
<yomimono_>
(also it's super rad that there's a ppx ocaml-cstruct :D)
jgjl has joined #mirage
mort___ has joined #mirage
nullcat has joined #mirage
beaumonta has quit [Ping timeout: 240 seconds]
mort___ has quit [Ping timeout: 276 seconds]
<aggelos_>
aantron: thanks, I just did a silly wrapper let el ?ns ~name ~attrs elems for now
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<maker>
how was it called the thing on the top of cohttp for a more complete http library?
<maker>
the one with routes and stuff
<aggelos_>
aantron: would be nice to have a way to construct a stream from a list of signals w/o having to resolt to Markup.stream + mutable var though
<Khady>
maker: opium?
<Khady>
there is also ocaml-webmachine
<maker>
Khady: it was machine something
<maker>
there you go
<maker>
thanks!
<aggelos_>
oh that looks like something I'd want to take a look at too
<yomimono_>
this might go nicely on the nuc box :D cross-posting to canopy
dsheets has quit [Remote host closed the connection]
djs55 has quit [Quit: Leaving.]
jgjl has joined #mirage
rudenoise has quit [Ping timeout: 250 seconds]
thomasga has joined #mirage
Algebr`` has joined #mirage
rudenoise has joined #mirage
Algebr` has quit [Ping timeout: 264 seconds]
thomasga1 has joined #mirage
thomasga has quit [Ping timeout: 276 seconds]
rudenoise has quit [Remote host closed the connection]
thomasga1 has quit [Ping timeout: 240 seconds]
Algebr`` has quit [Remote host closed the connection]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ecerulm has joined #mirage
mort___ has joined #mirage
seangrov` has joined #mirage
seangrov` has quit [Ping timeout: 248 seconds]
rudenoise has joined #mirage
dsheets has joined #mirage
jgjl has joined #mirage
jgjl has quit [Max SendQ exceeded]
jgjl has joined #mirage
djs55 has joined #mirage
jgjl has quit [Max SendQ exceeded]
dsheets has quit [Remote host closed the connection]
dsheets has joined #mirage
dsheets has quit [Remote host closed the connection]
dsheets has joined #mirage
jgjl has joined #mirage
<ecerulm>
beginner question: If I pass a PCI-passthrough a device, can I write a driver for it in "ocaml" ? is there an "usual"approach to PCI devices in mirage? In my case the pci device would be an encryption accelerator
jgjl has quit [Max SendQ exceeded]
tchell has joined #mirage
<tchell>
what happened to cow.syntax?
miragebot has joined #mirage
<miragebot>
[mirage] samoht pushed 3 new commits to master: https://git.io/valVA
<miragebot>
mirage/master 2210255 Amir Chaudhry: Update Readme...
<miragebot>
mirage/master ca98dfe Amir Chaudhry: README tweaks
<miragebot>
mirage/master fa0dd45 Thomas Gazagnaire: Merge pull request #508 from amirmc/readme...
miragebot has left #mirage [#mirage]
* maker
is free atm. Is there anything crypto-releated he might help with?
jgjl has joined #mirage
mort___ has quit [Quit: Leaving.]
mort___ has joined #mirage
jgjl has quit [Max SendQ exceeded]
seangrov` has joined #mirage
<mort___>
quick q - trying to use jsont from daniel to parse some json — it's nice! but anyone used it to parse json where the field names are dynamic? ie., things of the form { "dynamic": { id: 0, name: "some name" }, "also_dynamic": { id: 1, name: "some other thing" } }
amirmc has joined #mirage
mcclurmc has joined #mirage
ansiwen has quit [Remote host closed the connection]
ansiwen has joined #mirage
rudenoise has quit [Remote host closed the connection]
jermar has quit [Ping timeout: 260 seconds]
seangrov` has quit [Ping timeout: 260 seconds]
<mort___>
hm. i think i need anonymous members.
<aantron>
aggelos_: i was thinking before of adding a function like transform : ('a -> 'b stream -> ('c * 'a) option) -> 'b stream -> 'a -> 'c stream
beaumonta has joined #mirage
<aantron>
the 'a would be for the state that you currently have to keep in refs when transforming streams
<aantron>
the function receiving the whole 'b stream allows it to read the argument stream multiple times before providing one element of type 'c, and these elements are used to construct the result 'c stream
<aantron>
is this the kind of thing you had in mind when talking about transforming lists to signal streams?
<aantron>
or just "of_list", which already exists?
jermar has joined #mirage
<aggelos_>
aantron: is of_list exported?
<aggelos_>
aantron: yah the transform thing seems more ergonomic
<aantron>
that example converts a cohttp response stream for markup parsing.. and yeah its annoying. i may want to switch to char stream in some future breaking release, i am not sure yet. i think it would take more usage by more people to know what is better
<aggelos_>
can I realy on markup to do the validation according to the webdav dtd?
<aantron>
no, markup doesnt parse the dtd, except to make sure quotes and < > are balanced. it gives you the string, but it doesnt understand the contents
<aggelos_>
well, the requested properties, obviously
<aggelos_>
I mean, I can do a recursive descent parser by hand
<aantron>
its something i considered adding, but havent seen a demand for yet
<aantron>
aggelos_: would lambda soup be useful for your purpose?
<aggelos_>
but was wondering what the most caml-ish way would be
<aggelos_>
not terribly familiar w/ the ocaml library landscape, as you may have realized ;)
<aantron>
Drup: i dont think aggelos_ needs a sloppy parser for webdav, though
<Drup>
let me find the name
<aggelos_>
annnfi, depends on what the client impementations actuall produce
<aggelos_>
please excuse the typos, at marrakesh and the line is kinda loaded, so no echo
<aantron>
np :)
<aggelos_>
or, at least, typing ahead a lot
<Drup>
xml-light
<aantron>
well as long as they produce balanced tags and no weird entity references, any xml parser should be able to read their requests
<Drup>
it contains some dtd things
<Drup>
The implementation is discutable, unfortunatly
<aggelos_>
aantron: I'm not worried about that, I'm worried about unexpected elements, missing elements, weirdly nested elements and whatnot
<aggelos_>
Drup: "discutable"?
<aggelos_>
ah, disputable?
<aantron>
to get elements quickly out of a tree of markup, i would suggest lambda soup
<Drup>
aggelos_: questionable
<Drup>
(yay frenchism)
<aantron>
of course its my library so maybe you need a second opinon :p
<Drup>
aantron: isn't a char Lwt.stream terrible for perf ?
<aggelos_>
Drup: oh, there's the equivalent of "discussible" in my native language too
<aantron>
Drup: i dont have char Lwt.streams, but char Markup.streams
<Drup>
aantron: still the same
<aantron>
and its probably terrible
<aantron>
so i am likely to change it.
<Drup>
aggelos_: greek I guess ? :p
<aggelos_>
Drup: gee, what gave me away? :P
<Drup>
"Angelos Oikonomopoulos"
<Drup>
That's sooooo greek
<aggelos_>
hmm
<aantron>
oh and despite the lambda soup readme, it works fine with XML. especially if you use Markup.parse_xml first, and then send the signals to Soup.from_signals
<aggelos_>
well if I'm going to switch, I should do it sooner rather than later
<aggelos_>
aantron: good to know :)
<aggelos_>
wondering if webdav has more complex xml constructs lurking in dark corners (that would justify switching to a validating parser)
thomasga has quit [Quit: Leaving.]
<Drup>
(If you were wondering, aggelos_, No, I can't guess native language based on engrish. I can sort of do it for french and german, and a friend can do it really well for some other languages, but not greek :p)
<aggelos_>
Drup: I wasn't (fwiw I expect it varies w/ the speaker a lot)
<Drup>
It does, but there are patterns based on the language
thomasga has joined #mirage
<aggelos_>
I find that easy to believ
<aggelos_>
*e
djs55 has quit [Quit: Leaving.]
<aggelos_>
so
<aggelos_>
I want to say that the webdav stuff seems easy to parse by hand and that it's just stupid webdav and if I get it wrong who cares
<aggelos_>
but I have the feeling I'll regret that
<aggelos_>
eh screw it, lambda soup and selectors it is
<aantron>
:p
<aggelos_>
aantron: ok sorry, not the endorsement you might feel lambda-soup deserves, my annoyance is at webdav of course
<aantron>
you can get very precise with lambda soup as well, using its various functions directly instead of selectors. but obviously you wont get validation against DTD
<aantron>
lol
<aggelos_>
mm, "namespaces are ignored"?
<aantron>
like mentioned, we (meaning i probably :p) could add DTD validation to markup.ml, but maybe the right thing to do is to write or port an existing validation library on top of markup
<aantron>
yeah, lambda soup was originally written with ocamlnet as the low-level parser
<aantron>
which didnt support namespaces.. so lambda soup didnt support them. i didnt change the interface later when i switched the parser
<aggelos_>
k
<aantron>
if this is critical, please let me know. maybe open an issue to track it
<Drup>
I wonder how feasable it would be to make a "tyxml generator" that takes a dtd and generate a combinator library.
<aantron>
Drup: didnt i ask you about this before? :p
<Drup>
Possible
<aantron>
i thought it would be somewhat feasible
<Drup>
This is not the first time I think about it
<Drup>
That is not over enginnered to death by a milions of rules to encode html weirdness
<aantron>
i think its best left for sane xml formats
<Drup>
:D
<aantron>
but for html you could do something like run the generator as a starting point for correction by a human. not sure what the value would be
<aggelos_>
hmm
<Drup>
The really difficult things in html are the whole "a in a" kind of cases
<aggelos_>
hmm
<aggelos_>
Soup.from_signals is .sync only
<aggelos_>
not a big problem, I guess
<aantron>
aggelos_: yeah. right now you have to use a stupid hack
<aantron>
to_list, of_list :p like in the "advanced example"
<aantron>
if from_signals accepted an async stream, the result would have to be inside a concurrency or CPS monad, or would have to be provided by a continuation call
<aggelos_>
was going to do that, yah :)
<aantron>
Drup: i was thinking of this also when making the ppx. it's maybe conceivable that one could take a DTD, and generate tyxml functors for that XML language together with enough reflection information for the PPX to work. typed attributes might be challenging though, as i dont think this is encoded nicely by DTDs
<aantron>
in general though, given some comments i saw about DTDs being considered obsolete, i decided not to think about it too much
<Drup>
Yes, that's also why I didn't really pursue this (and time ..)
<Drup>
Also, for tyxml, a better idea is to fetch the html5 list of tag/attributes and do basic verification, so that we know if we are missing things
<aantron>
aggelos_: the interfaces between libraries are a little rough right now. i had some dreams about making nice chains of request, parse, analyze, but it takes an enormous amount of time to design all these things properly. so far i had time for parsing and analysis, but not requesting, and not the stream types that would tie all these together