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
acathla` is now known as acathla
acathla has joined #m-labs
acathla has quit [Changing host]
bentley` has quit [Ping timeout: 240 seconds]
bentley` has joined #m-labs
<GitHub53> [artiq] sbourdeauducq pushed 4 new commits to master: http://git.io/v3eYv
<GitHub53> artiq/master 54d85ef Sebastien Bourdeauducq: master,gui: show Git commit messages in schedule
<GitHub53> artiq/master 585bb23 Sebastien Bourdeauducq: master: add ddb/pdb args
<GitHub53> artiq/master 42010fc Sebastien Bourdeauducq: gui: regenerate argument setter when modified from repository
<sb0> rjo, the coveralls report is pretty inaccurate. should we keep the badge or not? (and coveralls at all)
<sb0> it also breaks e.g. https://coveralls.io/files/1024646802 and coveralls tech support still don't know why
travis-ci has joined #m-labs
<travis-ci> m-labs/artiq#382 (master - c80f0fa : Sebastien Bourdeauducq): The build has errored.
travis-ci has left #m-labs [#m-labs]
<rjo> we could tune the relevant sources that it considers and do the bitstream generation under coveralls. but you can remove the badge. afaict keeping the call does not hurt.
<rjo> sb0: ^
cr1901 has quit [Ping timeout: 265 seconds]
cr1901 has joined #m-labs
<whitequark> and session.c also has different algorithms than comm_generic.py... meh
<whitequark> (looking at synchronization code)
cr1901 has quit [Ping timeout: 265 seconds]
cr1901 has joined #m-labs
fengling has joined #m-labs
<sb0> whitequark, from a user perspective, cleaning up/optimizing this code is *much* lower priority than getting travis-ci and packages to work again after the llvmlite rename, or getting UDP to work in the GUI on windows
<whitequark> well, I need some of it to add strings, and either way, I'm almost done
mumptai has joined #m-labs
<GitHub175> [misoc] whitequark pushed 1 new commit to master: http://git.io/v3eNA
<GitHub175> misoc/master cf3a9e0 whitequark: libbase: add const qualifiers.
<GitHub81> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3vkN
<GitHub81> artiq/new-py2llvm ecdebc0 whitequark: session.c: refactor.
<sb0> whitequark, have you tested that the idle experiment still works OK after this change?
<whitequark> I've tested the coretool, but not idle experiment. but that's easy to check.
<whitequark> oh, and the non-idle one.
<sb0> no, it's not easy to check, since the idle experiment doesn't work with serial
<sb0> ppp would solve this; unfortunately, lwip behaves in its typical annoying way when ppp is used
<whitequark> it is. how do you think I debugged this before I had kernel uploading working? :)
<whitequark> and yes, it works
<sb0> how do you detect the host disconnecting from serial?
<whitequark> I don't. I comment out those parts, and push the log to serial
<whitequark> main: session_end(); while(1) kloader_service_essential_kmsg();
<sb0> so, if you don't detect the host disconnecting, how do you know when to run the idle kernel?
<sb0> oh
<whitequark> :p
<sb0> well, sure, that will work
<whitequark> (typical annoying way) which is?
<sb0> but the point was checking that all those changes you made to session.c don't introduce regressions wrt the idle experiment NORMAL startup, not after getting it to run by hacking the runtime
<sb0> this happened with ethernet before, the problem was it didn't had enough memory
<sb0> instead of printing an error or warning message, it behaves in the most obscure and painful to debug way
<sb0> and please do not debug ppp now, the compiler is very late already
<sb0> and ppp is purely optional.
<whitequark> wasn't planning to
<sb0> you can test the idle experiment with buggy ppp, though
<whitequark> speaking of the idle experiment, I don't see why it would not work. I mean, it works when session_end is called, and I haven't changed *that*
<sb0> bugs are smart.
<GitHub115> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3vOW
<GitHub115> artiq/new-py2llvm 4efae2b whitequark: Formatting.
<sb0> I'm also concerned about the removal of the mem/data ack distinction, which I didn't do for fun but because lwip zero-copy requires it
<whitequark> sb0: I grepped it before removing and one of the pointers wasn't used
<whitequark> which is to say, maybe I was wrong, but not any more wrong
<sb0> both pointers are used
<sb0> buffer_out_index_data and buffer_out_index_mem
<sb0> maybe you grepped an old and buggy version?
<whitequark> ok, I see now, I was wrong in removing that
<GitHub150> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3vGi
<GitHub150> artiq/new-py2llvm f5ea202 whitequark: session.c: bring back session_ack_{consumed,sent}....
<sb0> what happens if you try to RPC a list that does not fit in the buffer?
<sb0> details, details... so much time
<whitequark> session restart
<whitequark> and "Failed to send RPC request" in the log
fengling has quit [Ping timeout: 245 seconds]
<sb0> send_rpc_value doesn't test the return value of out_packet_chunk
<whitequark> hm, yes
<sb0> (also, this code should be refactored at some point to use pbufs, which will solve the problem of long lists in addition to improving performance)
<whitequark> what are pbufs and how would they help?
<GitHub177> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3vnP
<GitHub177> artiq/new-py2llvm 1d61e44 whitequark: session.c: ensure session reset on out buffer overrun during RPC.
<sb0> they're called mbufs in the bsd kernel and (i think) socket buffers in linux
<whitequark> I am not familiar with either
<sb0> they're basically a linked list of (pointer, size) that represent the concatenation of all the buffers pointed to
<whitequark> ah, scatter/gather I/O
<sb0> yes
<sb0> though that's used internally as well, not only for IO
<whitequark> I'm not sure if that will be such a big win
<sb0> for small RPCs, no, if you are RPCing a 50M list then it can be passed directly in-place to the network driver
<whitequark> well, assuming it has no pointers inside
<whitequark> an RPC can only return an int32?
<sb0> for now yes, but removing that limitation would be welcome.
<sb0> one issue is how to annotate the type, as you don't know what it is until the execution is done
<sb0> there is the "-> " syntax...
<whitequark> yes
<whitequark> (there's no other reasonable way)
<whitequark> a somewhat trickier issue is returns of lists.
<whitequark> they need to be allocated, and an allocation must happen inside the caller.
<whitequark> however, the caller doesn't yet know how much it needs to allocate.
<sb0> how would you even type-annotate them?
<whitequark> oh, yeah, I was going to ask: which calls exactly become RPCs?
<sb0> any call that doesn't have @kernel or @portable
<whitequark> ok, so here's the issue
<whitequark> let's say the experiment has attributes "a" and "b", containing instances of class "C", which has a method "m", which is host-only
<sb0> attribute consistency? yes, that's the user's problem.
<whitequark> whuh?
<whitequark> no, I mean, how do you figure out on which instance to call the RPC?
<sb0> a RPCd function is not allowed to modify attributes that are cached in the core device
<sb0> ah
<whitequark> I can only think of putting an unique "id" field in every proxied object, on the device, and the method would pull it out and send along with the RPC
<sb0> well, yeah, you need to add something like that ...
<whitequark> so there would be an rpc_map and also self_map.
<whitequark> or more like obj_map.
<sb0> fine.
<whitequark> an especially annoying part of that is handling cycles
<whitequark> but it's doable
<sb0> hmm, why do you have to handle cycles?
<whitequark> well, what do I do if "a" has an attribute containing "b", and "b" with "a"?
<sb0> how is that a problem for generating object IDs?
<whitequark> no, but since the objects also have other attributes, which may be even modified by the kernels, the identity needs to be maintianed
<sb0> ?
<whitequark> say, how an object from the host is represented on the device?
<sb0> I see the cycle problem with representing host objects on the device
<whitequark> struct { int32_t id; int32_t now; struct { int32_t id; int32_t number; } ttl1, ttl2; } experiment;
<sb0> but this doesn't have to do with object IDs or RPCs, does it?
<whitequark> no
<whitequark> I'm really glad I bothered with adding the ARTIQ IR
<whitequark> it makes this kind of thing--some ad-hoc code generation, like for print statements, or RPCs--really easy
<whitequark> and you still have the nice things, like type information, or variable or attribute names, unlike when poking LLVM IR
<whitequark> also, IR is not tree-structured, so I can just put QuoteT(obj) into IR and expand it into a sequence of instructions initializing it in the IR generator
<whitequark> ah, crap
<whitequark> what to do with strings contained in an exception
<whitequark> they have to live forever.
<whitequark> ok, so they will have to be interned.
<whitequark> no good way around that :(
<GitHub37> [misoc] whitequark pushed 1 new commit to master: http://git.io/v3vVT
<GitHub37> misoc/master d88904b whitequark: libdyld: add const qualifiers.
<whitequark> Python doesn't allow you to fake an exception backtrace :(
<whitequark> could only do this: https://i.imgur.com/dpoWkbB.png
<GitHub166> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3vyl
<GitHub166> artiq/new-py2llvm 27d2390 whitequark: Add zero-cost exception support to runtime and host.
<GitHub90> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3vHq
<GitHub90> artiq/new-py2llvm 96c7701 whitequark: Add column marker to ARTIQ exception traceback.
<whitequark> of course, when it really shines, is in cases like this: https://i.imgur.com/ZOsh45p.png
nicksydney_ has joined #m-labs
<whitequark> could even put it on the bracket
<GitHub157> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3vQ9
<GitHub157> artiq/new-py2llvm acd8d63 whitequark: transforms.ARTIQIRGenerator: IndexError loc should point to "[".
nicksydney_ has quit [Remote host closed the connection]
<GitHub159> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3v5X
<GitHub159> artiq/new-py2llvm bdcf7f1 whitequark: ARTIQIRGenerator: add semantic locs to all other implicitly raised exceptions.
<whitequark> ok, let's add RPCs now.
<cr1901> fake an exception backtrace? What do you mean by that?
<whitequark> raise an exception whose backtrace will say what I want it to say
<whitequark> and not the trace to the `raise` statement
<cr1901> Sounds like the main use for that is to filter the backtrace normally generated by raise to get rid of the crap you don't want to see
<whitequark> no, the use for that is inserting foreign backtraces, like from ARTIQ
cr1901_modern has joined #m-labs
<cr1901_modern> I probably should've renamed "cr1901" to "cr1901_netbook" to keep naming consistent...
<GitHub165> [artiq] sbourdeauducq pushed 4 new commits to master: http://git.io/v3fOQ
<GitHub165> artiq/master 1818e81 Sebastien Bourdeauducq: client: log display support
<GitHub165> artiq/master c003040 Sebastien Bourdeauducq: doc: core device page
<GitHub165> artiq/master 0a6fcd9 Sebastien Bourdeauducq: Revert "comm_generic: cleanup"...
travis-ci has joined #m-labs
<travis-ci> m-labs/artiq#383 (master - e8aa825 : Sebastien Bourdeauducq): The build has errored.
travis-ci has left #m-labs [#m-labs]
<GitHub74> [artiq] sbourdeauducq pushed 4 new commits to master: http://git.io/v3fav
<GitHub74> artiq/master 16af80c Sebastien Bourdeauducq: doc: add core device explanation
<GitHub74> artiq/master 671a3f1 Sebastien Bourdeauducq: doc: precision about dds batch time
<GitHub74> artiq/master 400b414 Sebastien Bourdeauducq: master,client: support scanning specific repo revisions
travis-ci has joined #m-labs
<travis-ci> m-labs/artiq#384 (master - f81b2eb : Sebastien Bourdeauducq): The build has errored.
travis-ci has left #m-labs [#m-labs]
<whitequark> sb0: hrm, actually the RPC handler in session.c is structured extremely weird and not convenient for the compiler at all
<whitequark> why not just dissect va_args as you go, instead of always going through at least one level of indirection?
<whitequark> well, I guess that would result in code duplication for things like lists, so maybe it makes sense
_florent_ has joined #m-labs
ylamarre has joined #m-labs
<GitHub141> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3JYK
<GitHub141> artiq/new-py2llvm ee3f35c whitequark: Improve error message on passing an argument twice.
cr1901_modern1 has joined #m-labs
cr1901_modern has quit [Ping timeout: 250 seconds]
<GitHub155> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3J8s
<GitHub155> artiq/new-py2llvm 13ad9b5 whitequark: Allow to dump ARTIQ/LLVM IR for stitched code.
<GitHub141> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3J8M
<GitHub141> artiq/new-py2llvm 22457bc whitequark: Ensure uwtable is added to all generated functions.
<cr1901_modern1> whitequark: After seeing your twitter post about GEP, I decided to look up what GEP is. It makes sense, except for uglygep. Is uglygep the LLVM equivalent of aliasing with a char * in C?
cr1901_modern1 is now known as cr1901_modern
cr1901 has quit [Ping timeout: 260 seconds]
cr1901 has joined #m-labs
_florent_ has quit [Read error: Connection reset by peer]
cr1901_modern has quit [Quit: Leaving.]
cr19011 has joined #m-labs
cr1901 has quit [Disconnected by services]
cr19011 is now known as cr1901
<rjo> sb0: nice.
cr1901 has quit [Read error: Connection reset by peer]
<rjo> sb0: that design looks gopod to me. people might demand buttons to rescan the repo and commit from the gui. don't know how far educating on consoles and good text editors will get us here.
ylamarre has quit [Ping timeout: 255 seconds]
<GitHub45> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3Ugj
<GitHub45> artiq/new-py2llvm b26af5d whitequark: Implement sending RPCs.
<whitequark> ok, you can now send RPCs.
<whitequark> with tuples, nested lists, strings, all that fancy crap
<whitequark> but no receiving a reply, oh no no
<GitHub27> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3UaA
<GitHub27> artiq/new-py2llvm 153592f whitequark: Naming.
cr1901 has joined #m-labs