sb0 changed the topic of #m-labs to: ARTIQ, Migen, MiSoC, Mixxeo & other M-Labs projects :: fka #milkymist :: Logs http://irclog.whitequark.org/m-labs
deep-book-gk_ has joined #m-labs
deep-book-gk_ has left #m-labs [#m-labs]
forrestv has joined #m-labs
rohitksingh has joined #m-labs
rohitksingh has quit [Client Quit]
<GitHub149> [smoltcp] whitequark pushed 2 new commits to master: https://git.io/v7lTY
<GitHub71> [smoltcp] whitequark closed issue #30: Rust version requirement in README needs an update https://git.io/v7WKs
<GitHub149> smoltcp/master a98a80e whitequark: Update README....
<GitHub149> smoltcp/master 0482afc whitequark: Simplify signature of UdpSocket::send_slice....
<GitHub31> [artiq] jbqubit opened issue #807: sawg full-scale noise after halting demo_2tone https://github.com/m-labs/artiq/issues/807
<GitHub116> [smoltcp] whitequark closed issue #31: server example crashes when binding UDP socket https://git.io/v7WKR
<GitHub86> [smoltcp] whitequark pushed 2 new commits to master: https://git.io/v7lT7
<GitHub86> smoltcp/master 265e6f6 whitequark: Add UdpSocket::is_open, similar to TcpSocket::is_open in function....
<GitHub86> smoltcp/master 9525e32 whitequark: Remove unused imports.
<travis-ci> m-labs/smoltcp#163 (master - 265e6f6 : whitequark): The build passed.
cr1901_modern has quit [Quit: Leaving.]
cr1901_modern has joined #m-labs
cr1901_modern has quit [Ping timeout: 240 seconds]
<GitHub156> smoltcp/master ee0b8b3 whitequark: Rework and test raw sockets.
<GitHub156> [smoltcp] whitequark pushed 1 new commit to master: https://git.io/v7lIL
<travis-ci> m-labs/smoltcp#164 (master - ee0b8b3 : whitequark): The build passed.
mumptai_ has joined #m-labs
mumptai has quit [Ping timeout: 240 seconds]
<sb0> whitequark, if I use send() instead of send_slice(), I save one data copy, correct?
<sb0> is it correct that send() is giving me a pointer into the TCP buffer that I should fill myself right after calling the function?
<sb0> it says "contiguous" free space. if the socket has just been connected, is it going to reliably give me all the space available in the TCP buffer?
<sb0> (I want to use this for HTTP requests without supporting keepalive)
_whitelogger has joined #m-labs
<sb0> whitequark, also I don't know what the length should be until I write the slice (e.g. using write_fmt ...)
<sb0> whitequark, other than that, smoltcp is great work! it's really nice to be able to write your code on a PC first using the tap interface.
<whitequark> sb0: re "save one data copy": correct
<whitequark> "giving a pointer into TCP buffer" correct, TCP, UDP, whatever
<whitequark> it says "contiguous" free space because if the TCP buffer's start of free data is 1 before the end, then it will give you a slice of length 1
<whitequark> so yes, if it has just been connected, you will get the entirety of the buffer you've allocated
<whitequark> and yeah, that's how I test everything too
<sb0> whitequark, is it possible to get the largest possible slice first, then tell how many of it you've written and should be transmitted?
<sb0> *how much
<whitequark> not currently but I think I can support that
<GitHub64> [artiq] jordens commented on issue #807: `artiq_run` does not implement controlled termination of experiments. You need to use the full `artiq_master` setup and graceful termination for that. https://github.com/m-labs/artiq/issues/807#issuecomment-318881683
<GitHub3> [artiq] jordens closed issue #807: sawg full-scale noise after halting demo_2tone https://github.com/m-labs/artiq/issues/807
<whitequark> it's actually quite easy, sec
<whitequark> sb0: hang on
<whitequark> write_fmt doesn't give you the length
<whitequark> sb0: what you can do is...
<sb0> whitequark, but it shrinks the slice. i can compare it to the original length to determine how many bytes were written.
<whitequark> sb0: does it?
<sb0> yes. and anyway I ended up using Cursor
<whitequark> there's no std::io on no_std
<whitequark> no io::Write, no io::Cursor
<sb0> ah
<sb0> then no write_fmt either?
<sb0> it's part of io::Write
<whitequark> write_fmt is a part of core::fmt
<whitequark> so you have that
<whitequark> I think I can `impl fmt::Write for TcpSocket`
<whitequark> it's a bit weird but sure, convenient
<sb0> which write_fmt?
<sb0> I'm talking about the write_fmt from impl<'a> Write for &'a mut [u8]
<sb0> that's io::Write
<whitequark> can you show me your code?
<whitequark> it's an AB issue
<sb0> it's using Cursor right now.
<whitequark> I want to see other parts
<whitequark> well or let me write a sample of how I want to do it, that also works
<sb0> then I want to do Reply::new() with the buffer I get from the send() method
<whitequark> why do you want to pass slices around?
<sb0> what else?
<sb0> sockets?
<whitequark> yes
<whitequark> or ...
<sb0> I don't have threads, so there is nothing sensible to do if the output doesn't fit in the transmit buffer
<sb0> so I might as well pass the transmit buffer instead of the full socket
<whitequark> this also works
<whitequark> the reason I suggested passing sockets around is precisely the length issue
<sb0> io::Result?
<sb0> I thought there was no io?
<whitequark> what is this software for? ionpak?
<sb0> yes
<sb0> fmt::Write doesn't let me write binary data, does it?
<whitequark> it doesn't, indeed
<whitequark> if you want binary data just pass the socket around, I don't really see a reason not to
<whitequark> write!() will work with a socket in a moment
<sb0> well I don't strictly need binary...
<sb0> essentially the logo but that can be SVG
<GitHub163> [smoltcp] whitequark pushed 1 new commit to master: https://git.io/v7lGk
<GitHub163> smoltcp/master 6bc6cc7 whitequark: Implement fmt::Write for TcpSocket.
<whitequark> here
<whitequark> use this to parse the incoming request, instead of some horrible clutch
<whitequark> ok, I'm almost entirely done with smoltcp refactoring that should make fast retransmit work reliably...
cr1901_modern has joined #m-labs
_whitelogger has joined #m-labs
mumptai_ is now known as mumptai
mumptai has quit [Quit: Verlassend]
mumptai has joined #m-labs
deep-book-gk_ has joined #m-labs
deep-book-gk_ has left #m-labs [#m-labs]