avsm changed the topic of #mirage to: mirage 2 released! party on!
AltGr has joined #mirage
javamonn has quit [Remote host closed the connection]
javamonn has joined #mirage
javamonn has quit [Remote host closed the connection]
javamonn has joined #mirage
javamonn has quit [Remote host closed the connection]
javamonn has joined #mirage
javamonn has quit [Remote host closed the connection]
kdef has quit [Quit: Leaving]
javamonn has joined #mirage
javamonn has quit [Remote host closed the connection]
MrScout has quit [Ping timeout: 245 seconds]
javamonn has joined #mirage
brson has quit [Quit: leaving]
javamonn has quit [Remote host closed the connection]
javamonn has joined #mirage
MrScout has joined #mirage
MrScout has quit [Ping timeout: 245 seconds]
javamonn has quit [Remote host closed the connection]
davidshore has joined #mirage
nullcat_ has joined #mirage
nullcat_ has quit [Client Quit]
nojb has joined #mirage
nullcat has joined #mirage
nojb has quit [Quit: nojb]
nullcat has quit [Ping timeout: 245 seconds]
davidshore has quit [Quit: leaving]
nojb has joined #mirage
larhat has quit [Quit: Leaving.]
nojb has quit [Quit: nojb]
nojb has joined #mirage
thomasga has joined #mirage
nojb has quit [Quit: nojb]
avsm has joined #mirage
guillain has left #mirage [#mirage]
guillain has joined #mirage
jonludlam has quit [Ping timeout: 244 seconds]
mort___ has joined #mirage
vpm has quit [Ping timeout: 264 seconds]
dsheets has joined #mirage
mattg has joined #mirage
mort___1 has joined #mirage
mort___ has quit [Ping timeout: 256 seconds]
yiannis_t has left #mirage [#mirage]
M__ has joined #mirage
nojb has joined #mirage
avsm has quit [Quit: Leaving.]
nojb has quit [Quit: nojb]
jonludlam has joined #mirage
nojb has joined #mirage
thomasga has quit [Quit: Leaving.]
thomasga has joined #mirage
mort___1 has quit [Quit: Leaving.]
AltGr has left #mirage [#mirage]
mort___ has joined #mirage
andreas has joined #mirage
nojb has quit [Quit: nojb]
avsm has joined #mirage
M__ has quit [Ping timeout: 246 seconds]
mort___ has quit [Quit: Leaving.]
mort___ has joined #mirage
larhat has joined #mirage
nojb has joined #mirage
nojb has quit [Ping timeout: 240 seconds]
M__ has joined #mirage
sigjuice has quit [Quit: ZNC - http://znc.in]
larhat has quit [Quit: Leaving.]
M__ has quit [Ping timeout: 246 seconds]
thomasga1 has joined #mirage
thomasga has quit [Ping timeout: 265 seconds]
mort___ has quit [Quit: Leaving.]
dsheets has quit [Ping timeout: 264 seconds]
M__ has joined #mirage
dsheets has joined #mirage
mort___ has joined #mirage
M__ has quit [Ping timeout: 246 seconds]
thomasga1 is now known as thomasga
nojb has joined #mirage
mort___ has quit [Ping timeout: 245 seconds]
mort___ has joined #mirage
M__ has joined #mirage
quelu has joined #mirage
nojb has quit [Quit: nojb]
javamonn has joined #mirage
tlockney is now known as tlockney_away
nojb has joined #mirage
larhat has joined #mirage
kdef has joined #mirage
avsm has quit [Quit: Leaving.]
avsm has joined #mirage
nate_prime has joined #mirage
avsm has quit [Quit: Leaving.]
<M__> Hi all, is there any xen or xenserver API that can return a unikernel's ip address?
MrScout has joined #mirage
<mort___> that would be a XenStore matter
<mort___> (but unfortunately i can't recall the exact syntax and am not in a position to access a xen box right now … :(
<mort___> that is, if you're in the dom0 outside the unikernel, xenstore can tell you that
<mort___> if you're inside the unikernel of course, you should know what ip address was assigned
<M__> thanks, I will look at xenstro
<M__> xenstore
<nate_prime> Hi, are there any guides on how to use cstruct or simple projects that I could look at?
<nate_prime> I'm trying to have my mirage server read a simple protocol but I'm kinda lost as to how to use cstruct to define and then read it in
<nojb> you can look at mirage-tcpip for inspiration, e.g., ARP https://github.com/mirage/mirage-tcpip/blob/master/lib/arpv4.ml
<nojb> but in general Cstructs are a close relative of 1-dimensional bigarrays
<nate_prime> thanks for the link
<nate_prime> do you know what "attach()" they refer to on line 106 above the `input` method?
<nate_prime> would that be like V1_LWT.STACKV4's listen_tcpv4?
<nojb> I think so
<nojb> nate_prime: you can see here https://github.com/mirage/mirage-tcpip/blob/master/lib/tcpip_stack_direct.ml#L131 how ARP input handler is attached to the nework stack
<nate_prime> so a type has a cstruct definition? because `arp` is defined as a type on line 23 and as a cstruct on line 45?
<nojb> those two are completely independent
<nate_prime> thanks for the use case and clarification
<nojb> the arp *type* is just the type of data structure that is used to keep track of the state of ARP
<mort___> yes — the cstruct { } is simply used to generate set/get accessors into a bigarray via the syntax extension
<mort___> (iirc)
<nojb> the arp *cstruct* is just a syntax extension (camlp4) that defines a bunch of getters and setters that are named {get,set}_arp_*, one for each field
<mort___> :)
<nojb> see the README at https://github.com/mirage/ocaml-cstruct for the cstruct (and cenum) syntax extension
tlockney_away is now known as tlockney
<nate_prime> so if I want to parse a simple message like "*2\r\n", is using a cstruct even the right move?
<nojb> that depends - Cstructs are used pervasively in the mirage IO infraestructure, so it is convenient to use them in order to avoid having to convert back and forth to some other datatype (like strings)
<nojb> in other words - cstructs are just byte buffers
<nojb> the syntax extension will help you if you are parsing binary protocols
<nojb> for text protocols it doesn't really make that much of a difference
<nate_prime> part of the protocol is text (redis protocol). It seems like it is maybe possible to do it without cstruct and just use io_page?
<nojb> Io_page handles memory allocation - I don't think it will help you much ...
<nojb> my suggestion is to think what you want to do as if you were dealing with plain old strings - afterwards it is rather easy to translate that to cstructs
<nate_prime> sorry for my confusion, I'm generally feeling lost with the mirage libraries. I'll give it a try with strings and then attempt the translation
<nojb> imho, it is better to just forget about mirage at first, write your code and then (only then) make it a functor of the mirage signatures in order to port it to mirage
andreas has quit [Quit: Leaving.]
guillain has quit [Ping timeout: 240 seconds]
guillain has joined #mirage
brson has joined #mirage
nojb has quit [Quit: nojb]
mort___ has quit [Quit: Leaving.]
jonludlam has quit [Ping timeout: 240 seconds]
nojb has joined #mirage
nojb has quit [Client Quit]
dsheets has quit [Ping timeout: 256 seconds]
dsheets has joined #mirage
MrScout has quit [Ping timeout: 245 seconds]
MrScout has joined #mirage
mort___ has joined #mirage
nate_prime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
M__ has quit [Ping timeout: 246 seconds]
MrScout has quit [Remote host closed the connection]
tlockney is now known as tlockney_away
MrScout has joined #mirage
thomasga has quit [Quit: Leaving.]
justincormack has quit [Ping timeout: 256 seconds]
nojb has joined #mirage
nojb has quit [Client Quit]
thomasga has joined #mirage
tlockney_away is now known as tlockney
nojb has joined #mirage
jonludlam has joined #mirage
mort___ has quit [Quit: Leaving.]
mort___ has joined #mirage
mort___ has quit [Quit: Leaving.]
andreas has joined #mirage
justincormack has joined #mirage
javamonn has quit [Remote host closed the connection]
brson has quit [Quit: leaving]
nojb has quit [Quit: nojb]
andreas has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]