mcclurmc has quit [Remote host closed the connection]
tlockney is now known as tlockney_away
rgrinberg has quit [Quit: Leaving.]
mcclurmc has joined #mirage
rgrinberg has joined #mirage
brson has quit [Quit: leaving]
mcclurmc has quit [Remote host closed the connection]
philtom has quit [Ping timeout: 246 seconds]
mcclurmc has joined #mirage
mcclurmc has quit [Ping timeout: 245 seconds]
mcclurmc has joined #mirage
mcclurmc has quit [Ping timeout: 255 seconds]
rgrinberg has quit [Quit: Leaving.]
mcclurmc has joined #mirage
mcclurmc has quit [Ping timeout: 255 seconds]
hhugo has joined #mirage
englishm has quit [Remote host closed the connection]
englishm has joined #mirage
englishm has quit [Remote host closed the connection]
englishm has joined #mirage
mcclurmc has joined #mirage
mcclurmc has quit [Ping timeout: 245 seconds]
englishm has quit [Remote host closed the connection]
englishm has joined #mirage
englishm has quit [Remote host closed the connection]
englishm has joined #mirage
andreas has joined #mirage
englishm has quit [Remote host closed the connection]
englishm has joined #mirage
mcclurmc has joined #mirage
mcclurmc has quit [Ping timeout: 246 seconds]
hhugo has quit [Quit: Leaving.]
hhugo has joined #mirage
hhugo has quit [Client Quit]
englishm has quit [Remote host closed the connection]
englishm has joined #mirage
AltGr has joined #mirage
englishm has quit [Remote host closed the connection]
englishm has joined #mirage
thomasga has joined #mirage
mcclurmc has joined #mirage
mcclurmc has quit [Ping timeout: 255 seconds]
andreas1 has joined #mirage
andreas has quit [Ping timeout: 258 seconds]
andreas has joined #mirage
andreas1 has quit [Ping timeout: 246 seconds]
andreas1 has joined #mirage
andreas has quit [Ping timeout: 260 seconds]
andreas has joined #mirage
andreas1 has quit [Client Quit]
andreas1 has joined #mirage
djs55 has joined #mirage
djs55 has quit [Client Quit]
djs55 has joined #mirage
andreas has quit [Ping timeout: 260 seconds]
andreas has joined #mirage
andreas1 has quit [Ping timeout: 240 seconds]
andreas1 has joined #mirage
mcclurmc has joined #mirage
andreas has quit [Ping timeout: 245 seconds]
avsm has joined #mirage
mcclurmc has quit [Ping timeout: 245 seconds]
thomasga has quit [Quit: Leaving.]
andreas has joined #mirage
thomasga has joined #mirage
andreas has quit [Client Quit]
andreas1 has quit [Ping timeout: 255 seconds]
<vbmithr>
bnwr: did you fix your aspcud problem ?
<vbmithr>
use aspcud-svn
thomasga has quit [Quit: Leaving.]
hhugo has joined #mirage
hhugo has quit [Ping timeout: 260 seconds]
mcclurmc has joined #mirage
thomasga has joined #mirage
mcclurmc has quit [Ping timeout: 245 seconds]
dsheets has joined #mirage
andreas has joined #mirage
hhugo has joined #mirage
hhugo1 has joined #mirage
hhugo has quit [Ping timeout: 272 seconds]
dbuenzli has joined #mirage
dbuenzli has quit [Client Quit]
avsm has quit [Quit: Leaving.]
englishm has quit [Read error: Connection reset by peer]
mort___ has joined #mirage
thomasga has quit [Quit: Leaving.]
thomasga has joined #mirage
thomasga has quit [Quit: Leaving.]
mcclurmc has joined #mirage
mcclurmc has quit [Ping timeout: 245 seconds]
thomasga has joined #mirage
englishm has joined #mirage
jonludlam has quit [Ping timeout: 260 seconds]
avsm has joined #mirage
hhugo1 has quit [Quit: Leaving.]
jonludlam has joined #mirage
mcclurmc has joined #mirage
mcclurmc has quit [Ping timeout: 255 seconds]
hhugo has joined #mirage
mcclurmc has joined #mirage
mcclurmc has quit [Ping timeout: 258 seconds]
mcclurmc has joined #mirage
<vbmithr>
dsheets: yo
<dsheets>
vbmithr, hi
<vbmithr>
dsheets: I made a mistake when patching ipaddr, I'm going to correct
<vbmithr>
I think we want string when it's a full string to convert to sth
<vbmithr>
and Bytes.t when there is an offset involved
<dsheets>
erm probably something like that
<vbmithr>
Pierre Chambart just discussed this with me
<dsheets>
but we could just supply both
<dsheets>
i'm not clear on the coercion story
<vbmithr>
yes…
hhugo has quit [Quit: Leaving.]
<dsheets>
e.g. would it be friendlier to just give you entry points that coerce for you?
<dsheets>
or copy whatever...
<vbmithr>
I'm not sure either
<vbmithr>
Not sure if I understand what you mean correctly
<vbmithr>
In the general case, yes, functions should be provided for everything
<vbmithr>
two functions that take an entire bytes or string
<vbmithr>
functions that operate on bytes and do not take an offset
<vbmithr>
functions that operate on bytes and do take an offset
<vbmithr>
and the same for string
<vbmithr>
so 4 cases
<vbmithr>
But it's a bit heavy
<vbmithr>
confusing
<dsheets>
there are also _exn vs 'a option variants
<vbmithr>
forgot those
<vbmithr>
So yes, really not sure we should double everything
<dsheets>
for the input side anyway
<dsheets>
before this gets released, we'll have to do a fairly extensive look at consumers which assume string interfaces
<dsheets>
I think this change is interface-breaking so we'll bump the version to 2.6 or 3.0
<vbmithr>
the additional confusing thing is that "bytes" is used here to mean "string that contain raw bytes" vs "human readable"
<vbmithr>
I falled into that trap when I renamed bytes as Bytes.t basically
<dsheets>
yes...
<dsheets>
bytes is a statement about representation not type
tlockney_away is now known as tlockney
<vbmithr>
Pierre Chambart says "either you get things from IO and then you have a bytes type, either you got string litterals"
<vbmithr>
According to him, it is generally unneccesary to double functions that operate on strings
<vbmithr>
dunno if it applies well here
<vbmithr>
My take is still to use Bytes when there is an offset involved, and string otherwise
<vbmithr>
So you get the bytes function for free, with the small drawback to have to specify offset 0 -> Bytes.length buf
<dsheets>
hmm? i don't understand the small drawback?
<dsheets>
also, i foresee some IO operations producing strings when they want to return those buffers to multiple consumers and ensure that they aren't sharing state
<vbmithr>
I mean, if you have a bytes of size 4
<vbmithr>
and you want to make of_bytes
<vbmithr>
You have to do of_bytes_raw buf 0 4 instead of of_bytes buf
<vbmithr>
because of_bytes operate on a string
<dsheets>
oh, yes, that's fine, there is not length parameter because it is fixed by the standard
<dsheets>
so you just have to say "0"
<vbmithr>
yes.
<vbmithr>
indeed
<bnwr>
vbmithr: haven't tried since then. I'm coding on my office's computer
<bnwr>
I ssh into it if I need to work from my laptop
<vbmithr>
bnwr: but yeyah the package aspcud is broken on arch, use -svn
<bnwr>
I'll try with the svn version though
hhugo has joined #mirage
<vbmithr>
bytes vs string requires quite to rethink a lot of things
philtom has joined #mirage
<thomasga>
avsm: the conduit API for mirage is quite weird
<thomasga>
you need both a vchan implem and a tcpip stack to be able to be able to instanciate it
<thomasga>
ie. you can have pure vchan or pure tcpip
<dsheets>
vbmithr, yeah... i'm not sure i understand the best way to design interfaces in the new bytes/string world
<thomasga>
*you can't*
djs55 has quit [Quit: Leaving.]
<vbmithr>
same here.
<vbmithr>
I'm staying away of this ATM
<thomasga>
avsm: I'll try to find a better way later
<thomasga>
(seems that tweets are correlated to locality)
<dsheets>
selection bias activated
brson has joined #mirage
seangrove has joined #mirage
englishm has quit [Remote host closed the connection]
englishm has joined #mirage
<seangrove>
Hey all, I've been working with small OCaml examples, building my way up to tinkering with Mirage. I'm curious how many other libraries should 'just work', and how much of it all needs to be totally rebuilt - for example, this websockets library https://github.com/vbmithr/ocaml-websocket
<seangrove>
I see it uses cohttp instead of mirage-http, but the websocket-specific bits seem to be in pure ocaml
<seangrove>
Is it a matter of refactoring, or would it be a total rewrite?
<seangrove>
Apologies in advance if this is a naive question
mort___ has quit [Ping timeout: 272 seconds]
andreas has quit [Quit: Leaving.]
stevej has joined #mirage
jonludlam has quit [Quit: Coyote finally caught me]
rgrinberg has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
rgrinberg has joined #mirage
dsheets has quit [Ping timeout: 255 seconds]
thomasga has joined #mirage
englishm has quit [Remote host closed the connection]
englishm has joined #mirage
thomasga has quit [Client Quit]
thomasga has joined #mirage
thomasga has quit [Client Quit]
tlockney is now known as tlockney_away
andreas has joined #mirage
jonludlam has joined #mirage
tlockney_away is now known as tlockney
seangrove has quit [Ping timeout: 260 seconds]
tlockney is now known as tlockney_away
mort___ has joined #mirage
thomasga has joined #mirage
dsheets has joined #mirage
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #mirage
hhugo has joined #mirage
jonludlam has quit [Ping timeout: 245 seconds]
djs55 has joined #mirage
avsm has joined #mirage
thomasga has quit [Quit: Leaving.]
jonludlam has joined #mirage
hhugo has quit [Quit: Leaving.]
jonludlam has quit [Ping timeout: 255 seconds]
jonludlam has joined #mirage
AltGr has left #mirage [#mirage]
brson has quit [Quit: Lost terminal]
brson has joined #mirage
rgrinberg has quit [Quit: Leaving.]
djs55 has quit [Quit: Leaving.]
mort___ has quit [Quit: Leaving.]
englishm has quit [Read error: Connection reset by peer]
englishm has joined #mirage
thomasga has joined #mirage
tlockney_away is now known as tlockney
rgrinberg has joined #mirage
mort___ has joined #mirage
mort___ has quit [Remote host closed the connection]
mort___ has joined #mirage
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #mirage
seangrove has joined #mirage
avsm has quit [Quit: Leaving.]
mort___ has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
englishm has quit [Remote host closed the connection]