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
<whitequark> sb0: i'm amaze. my qemu hack works quite well.
<whitequark> sudo apt-get install 'rustc=1.6.0*' cargo && cargo install vnc && rvncclient 101.78.236.68 --heinous-qemu-hacks
fengling has joined #m-labs
fengling has quit [Ping timeout: 272 seconds]
fengling has joined #m-labs
evilspirit has joined #m-labs
tija has joined #m-labs
tija has left #m-labs [#m-labs]
ylamarre has joined #m-labs
ylamarre has quit [Client Quit]
evilspirit has quit []
sb0__ has joined #m-labs
<sb0__> whitequark: what is everyone else doing?
<sb0__> you just spent days on this vnc stuff.
<cr1901_modern> sb0__: I was unable to get an answer on how to fix the view problems on qt forums. I'm currently implementing a double slider in the link rjo gave to me and moving all the shared code to that file. Give me an hour and I'll update you. I'm knocking this out this morning.
<cr1901_modern> (I don't think I'll be done in an hour. I'm just going to ping at semi-regular intervals)
sb0__ has quit [Ping timeout: 252 seconds]
sb0___ has joined #m-labs
FabM has joined #m-labs
sb0___ has quit [Ping timeout: 252 seconds]
bb-m-labs has quit [Quit: buildmaster reconfigured: bot disconnecting]
bb-m-labs has joined #m-labs
<whitequark> ok, now to do make conda run on it...
sb0__ has joined #m-labs
fengling has quit [Ping timeout: 272 seconds]
fengling has joined #m-labs
sb0__ has quit [Ping timeout: 252 seconds]
fengling has quit [Ping timeout: 272 seconds]
sb0__ has joined #m-labs
<sb0__> whitequark: did you know that windows supports IPC semaphores?
<sb0__> "Threads in other processes can open a handle to an existing semaphore object by specifying its name in a call to the OpenSemaphore function."
<sb0__> so your idea of shared memory IPC (with the notification problem) can actually be done portably.
sb0__ has quit [Ping timeout: 252 seconds]
<whitequark> sb0: so, futexes+devshm on linux and shared memory+semaphores on windows?
sb0__ has joined #m-labs
<sb0__> there are sysv semaphores too... but anyway, pipes seem better supported by asyncio
<sb0__> i'm on some shitty hotel wifi right now that blocks everything except http and disconnects you every hour, sending you to a page telling you to accept their conditions (again)
<sb0__> interestingly, windows doesn't support overlapped IO on anonymous pipes, only named ones...
<sb0__> in asyncio, they work around this by creating a named pipe and opening it locally... https://github.com/python/asyncio/blob/master/asyncio/windows_utils.py#L113
<sb0__> i guess this comes from this stupid overlapped flag you need to specify at file open time and cannot change later
<sb0__> since you cannot know if the other end of the pipe will need overlapped or not
<sb0__> and instead of fixing this crap, microsoft developers implemented remote connections to named pipes. pure mission creep. one would use TCP in this case...
<sb0__> oh, actually windows named pipes should be easy with the (undocumented) ProactorEventLoop.create_pipe_connection() ...
<sb0__> they're bidirectional, even
sb0__ has quit [Ping timeout: 252 seconds]
sb0__ has joined #m-labs
<sb0__> i wonder how many applications that define a signal handler process -EINTR without bugs
<larsc> 5
<larsc> is my guess
<GitHub11> [artiq] jordens pushed 3 new commits to master: https://git.io/vzPm2
<GitHub11> artiq/master 2832d20 Robert Jordens: Merge remote-tracking branch 'm-labs/master' into ppp2...
<GitHub11> artiq/master 0151ac5 Robert Jordens: ppp: update documentation
<GitHub11> artiq/master 2c847b3 Robert Jordens: Merge branch 'ppp2'...
<GitHub90> [artiq] jordens deleted ppp2 at 8cbb60b: https://git.io/vzPmy
<rjo> sb0__: be aware that if you or somebody updates our lwip, this will likely break the ppp version (but maybe it breaks the kc705 setup as well).
<sb0__> rjo: ah, good!
<sb0__> is there any reason to keep the ppp branch or should i delete it?
<rjo> as i said. if you are happy that i did not wrongly drop any changes from that branch, it can go.
ylamarre has joined #m-labs
ylamarre has quit [Read error: Connection reset by peer]
ylamarre has joined #m-labs
sb0__ has quit [Ping timeout: 252 seconds]
sb0__ has joined #m-labs
<GitHub28> [artiq] jordens pushed 1 new commit to master: https://git.io/vzP05
<GitHub28> artiq/master 0079aa4 Robert Jordens: runtime/main: style, wording, 1s ppp holdoff
<rjo> sb0__: i'm happy to get the heat for the artiq->artiq.language transition. ok if i just go ahead?
<rjo> or does anybody have a significant thing pending that this would conflict with?
<sb0__> rjo: ok. just make sure to inform Joe or there will be drama again...
<rjo> sure. there iwll be an email
<rjo> will
<rjo> sb0__: why are the PHASE_* constants handled specially in the imports but not all the other things from coredevice.dds?
<sb0__> the other things are normally created via the DDB
<rjo> ah. ...or emitted byt the compiler.
<sb0__> importing them in artiq is not the best thing to do, so if you have a better idea, I'm all ears
<rjo> make them attributes of DDSBus?
<sb0__> of course, they could easily be defined as self.dds.PHASE_*, but that makes the syntax cluttered
<rjo> anyway i feel there is a "DDS_" missing in the constant name
<rjo> or string them
<sb0__> that would work... assuming the new compiler is smart with strings (the old one was not)
<rjo> set_phase_mode("tracking")
<sb0__> whitequark: can the new compiler do constant folding/propagation and DCE with strings?
<rjo> ah. right. that might be nasty.
<whitequark> sb0__: for a dozenth time, it can (this is a trivial IR transform), but i don't think it should do it in ways that affect semantics, because of what I have described many times
<sb0__> well, more than that would be needed, as the phase mode is stored in the object
<sb0__> what would actually be needed is some sort of string -> int map that is built at compile time
<whitequark> (well, not entirely trivial, monomorphism checking has to be moved later and i have to be able to represent untyped code in IR, but it doesn't need much labor)
<whitequark> can you elaborate on the problem with DDS constants? I don't understand it
<whitequark> set_phase_mode("tracking") is gross
<rjo> it is pythonic
<rjo> at least half-pythonic
<whitequark> frankly, if yes then being pythonic is wrong
<whitequark> well, whatever, not like my opinion of the language can get worse
<whitequark> anyway, yes, I can support what you want quite elegantly
<rjo> problem is objects being created (in self) but other material from the module does not end up in the namespace
<whitequark> the string literals will become polymorphic in their type and they would automatically coerce to anonymous sum types
<whitequark> so... something like this
<whitequark> def set_phase_mode(self, type: OneOf("foo", "bar", "baz")):
<whitequark> then you can compare them as usual
<whitequark> this is basically how integer literals work (you can compare int32's and int64's to zero, for example), but applied in a different way
ylamarre has quit [Quit: ylamarre]
<rjo> and the comparison and the argument are folded?
<whitequark> the strings used in such a fashion are interned, so comparisons on them are just pointer comparisons
<whitequark> I can also give LLVM the information about exhaustiveness, but that's unlikely to matter outside very hot code
<sb0__> whitequark: i'm sure it can, my question was whether it does. there isn't much time for more compiler stuff right now...
<whitequark> rjo: note, you will not be able to pass a string to such a method from an RPC.
<whitequark> (this is implementable but requiers lots of runtime machinery, which i think we don't have time to make)
<rjo> ack. sounds complicated enough to not do any of this right now.
<rjo> otoh, i have nothing against artiq.language cross-importing lots of things from artiq.coredevice, especially since a large part of the language is a language for the coredevice.
<sb0__> maybe the PHASE_* constant can be put into a 'generic DDS' module... but that would be a very small one.
<sb0__> *constants
<rjo> and then be part of the language?
<whitequark> rjo: it is not very complicated
<sb0__> for a wide definition of language, yes
<whitequark> rjo: actually, you can use it right now, string literals are *already* interned
<whitequark> (but you get a small performance hit because it falls back to strcmp)
<rjo> sb0__: specifically it would be artiq.language.dds(_constants)
<sb0__> sounds ok
<rjo> whitequark: no need ;)
<rjo> sb0__: ack.
<rjo> sb0__: but then there would be something similar for 'from artiq.coredevice.exceptions import RTIOUnderflow'
<sb0__> yes...
<sb0__> maybe have "artiq.common" that imports the commonly-used stuff in experiments...
<sb0__> from both language and coredevice
<rjo> or we can just elevate these constants/exceptions, little tools to artiq.coredevice and then experiments can do "from artiq.language import *" and "from artiq.coredevice import *"
<rjo> that's the latter
<sb0__> two imports instead of one...
<rjo> that would be fine by me.
<rjo> or we put both of them (and maybe others) into "from artiq.experiment import *" and recommend that.
<sb0__> yes
<rjo> ok. i'll do that then.
<rjo> also. have you silently agreed to relative imports ("from . import stuff")? whitequark is using them heavily in compiler but i remember it caused problems if you are running from artiq top level and do not have PYTHONPATH=. and artiq is not accessed through sys.path
<whitequark> oh yeah there was something like that
<whitequark> i think whatever change was necessary to my workflow was so simple that i never managed hit that again
<whitequark> i /think/ doing python setup.py develop --user does some symlink magic that alleviates that?
<rjo> yes sure. i remember pointing that out when it came up. but still. we should agree that relative imports are ok (or not).
<whitequark> i say develop --user is unobtrustive enough
<GitHub63> [artiq] sbourdeauducq pushed 1 new commit to master: https://git.io/vzP9Q
<GitHub63> artiq/master 8befc6a Sebastien Bourdeauducq: protocols: add pipe_ipc (incomplete)
<rjo> whitequark: there are a few of seemingly debug print()s in coredevice.runtime and core.comm_generic. can they go?
<sb0__> whitequark: did that build a misoc legacy package? http://lab/buildbot/changes/105
<sb0__> i'm not getting relative import issues, even though I'm using PYTHONPATH and not setup.py develop
<sb0__> did they fix something in 3.5, maybe?
mwalle has joined #m-labs
<mwalle> sb0__: anyone there?
<whitequark> rjo: I don't remember any which means they should probably go.
<whitequark> just rip them out, git revert exists
<rjo> whitequark: ack.
<sb0__> mwalle: hi
<rjo> ok if I move ARTIQExceptions to coredevice.exceptions? it is only used there and itself wants stuff from coredevice.
<rjo> ARTIQException
<whitequark> sure but take care to grep for paths
<whitequark> there might be some code that compares qualified names
<GitHub116> [artiq] jordens created namespace-experiment (+6 new commits): https://git.io/vzXJ3
<GitHub116> artiq/namespace-experiment 5460d24 Robert Jordens: manual: __version__ cleanup
<GitHub116> artiq/namespace-experiment c1c831c Robert Jordens: artiq: move namespace artiq.* -> artiq.language.*...
<GitHub116> artiq/namespace-experiment e41b747 Robert Jordens: artiq.experiment: merge language and coredevice namespaces...
<rjo> sb0__, whitequark: ^ could you do a quick review? i'll send out an e-mail when i merge this.
<GitHub180> [artiq] jordens pushed 1 new commit to namespace-experiment: https://git.io/vzXJ7
<GitHub180> artiq/namespace-experiment 62e51c5 Robert Jordens: update release notes
<whitequark> rjo: are you sure you want to rename artiq_* fields? core_exception looks like something from core python
<rjo> whitequark: runtime_exception then?
<whitequark> well my concern is, we are adding unusual attributes to core classes
<whitequark> someone going "WTF is this attribute?" should have an easy time figuring it out
<rjo> i did not like ARTIQException because that was not descriptive enough.
<whitequark> nono, not ARTIQException class
<whitequark> I'm talking about the artiq_exception attribute, which is attached to anything propagated out of core device
<whitequark> like a KeyError
<rjo> ok. but who are you worried about here? sombody inspecting that exception?
<whitequark> yes
<rjo> if i did that i would prefer information about "what it is/what it means" over which package it comes from.
<rjo> or do you not like the public-ness? what about py_exn.__core_metadata__ ?
<rjo> or the like.
<sb0__> rjo: i'd remove the commented-out lines in doc/manual/conf.py
<sb0__> # The full version, including alpha/beta/rc tags. # release = 'prerelease'
<whitequark> rjo: you are extending core classes.
<whitequark> if you are to avoid name clashes, include your name in your extension, not some generic word.
<rjo> sb0__: both lines? there are many "documenting lines" like the first
<sb0__> no, the "release ="
<rjo> sb0__: ack
<rjo> whitequark: ok. since this is pretty internal, let's go for ".artiq_runtime_exception"
<rjo> length does not matte rmuch here
<whitequark> sure
<rjo> whitequark: should we not move the printing of the CoreException to after the encapsulating python exception?
<rjo> whitequark: or better, inject that part into the traceback at the run() location?
<whitequark> rjo: it's currently printed after the encapsulating exception
<whitequark> since the traceback is appended to the message as \n
<rjo> in artiq_run it is "print(core_exn); raise py_exn"
<whitequark> hmm
<whitequark> just raising it should be enough
<GitHub91> [artiq] jordens pushed 3 new commits to namespace-experiment: https://git.io/vzXqn
<GitHub91> artiq/namespace-experiment 0e2c6c1 Robert Jordens: doc/manual: cleanup commented out variables
<GitHub91> artiq/namespace-experiment 408430b Robert Jordens: doc: update Underflow catching example
<GitHub91> artiq/namespace-experiment 8db9c53 Robert Jordens: CoreException: store at 'py_exn.artiq_core_exception'...
<rjo> sb0__, whitequark: ok if i move the Release Notes out of "RELEASE" into RELEASE_NOTES.rst to be ".. include:" ed in the manual?
<GitHub30> [artiq] sbourdeauducq pushed 1 new commit to master: https://git.io/vzXqP
<GitHub30> artiq/master dcea678 Sebastien Bourdeauducq: protocols/pipe_ipc: implement AsyncioChildComm for Unix (affected by python/asyncio#314)
<whitequark> I don't care.
<sb0__> ok
<sb0__> the buildbot also hits asyncio/#314... so it's probably not a race