<azonenberg> whitequark: my big problem with git is that submodule support is a bit awkward
<lain> also this ^
<azonenberg> i had a problem with clifford, of all people
<azonenberg> complaining he couldn't build gp4par
<azonenberg> b/c of missing source files
<azonenberg> ... in submodule dirs
<azonenberg> also the lack of an easy way to create monotonic rev numbers a la svn
<azonenberg> even if each revno is tied to a hash internally
<azonenberg> there should be a way to look at two commit IDs and tell which one happened first
<azonenberg> heck, even if they had a timestamp and a hash concatenated i'd be ok with that :p
<whitequark> azonenberg: they improved submodule support hugely
<azonenberg> whitequark: since when?
<whitequark> relatively recently
<azonenberg> i'm on debian using 2.1.4
<whitequark> so now you can set git pull and git push to do git submodule update for you
<whitequark> it's off by default
<whitequark> and recursive push
<whitequark> sec
<azonenberg> I have that in my current git
<azonenberg> That's the only reason i can get anything done
<azonenberg> (w/ submodules i mean)
<lain> yeah it's still not great
<whitequark> ah
<whitequark> yeah.
<whitequark> there's the "repo" tool
<azonenberg> i dont have recursive push as sometimes i dont want to push all changes to all repos right away
<whitequark> it fixes the recursive commit problem
<azonenberg> But i have recursive pull enabled
<whitequark> i dont think you can very nicely fix it in git itself
<azonenberg> the one thing that does not seem to be present, in my current tool at least
<whitequark> without making builds nondeterministic
<azonenberg> is recursive clone
<whitequark> hmm, recursive clone is old
<azonenberg> whats the option for that?
* azonenberg checks cloning into a temp dir
<whitequark> git clone --recursive
<azonenberg> Oh
<whitequark> I think its at least a few years old
<azonenberg> But there's no way to do a git config --global to force that on everywhere?
<whitequark> hm
<whitequark> looks like no
<whitequark> thats dumb
<whitequark> but easy to write a patch for...
<azonenberg> Yeah, a patch that will likely never be upstreamed
<whitequark> why?
<azonenberg> b/c it violates some obscure policy somewhere
<whitequark> I doubt it
<whitequark> and fetch
<whitequark> this is exactly similar to the recursive push
<azonenberg> well ok let me rephrase
<azonenberg> Recursive clone *by default* is likely to never be upstreamed
<azonenberg> Recursive clone as a config option might be
<azonenberg> Yet another thing that i might eventually work on if i have time :p
<whitequark> i think git doesnt break workflow in minor versions
<whitequark> this makes sense
<whitequark> they did some fairly drastic changes to git-add in git 2
<azonenberg> Well here's the thing
<azonenberg> If you add an off-by-default config option
<azonenberg> Even in a minor revision
<azonenberg> nothing breaks
<azonenberg> behavior is identical
<whitequark> um, sure
<azonenberg> The only thing that changes is if you turn the option on
<whitequark> off-by-default config option is sure to be merged
<azonenberg> And that's a conscious act that has the potential to break things
<whitequark> i was talking about --recursive by default
<azonenberg> Oh
<azonenberg> Yeah
<azonenberg> Screw this, why not
<rqou> btw who here wants to volunteer to maintain "build system duct-tape?" :P
* azonenberg goes and looks where the master repo for git is so he can work off the latest dev version...
<rqou> cr1901_modern?
<azonenberg> rqou: i'm already writing plenty of that over in #antikernel
<azonenberg> i dont need more :p
<rqou> lol
<whitequark> rqou: for what
<rqou> yosys+icestorm+arachne-pnr+openfpga
<whitequark> um
<whitequark> they all have build systems
<whitequark> and i even maintain one of them
<rqou> e.g. i have duct tape to pass "-mmacosx-version-min"
<rqou> and similar garbage
<whitequark> cant you just upstream that
<rqou> maybe?
<whitequark> CFLAGS+= for others
<whitequark> set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7) for cmake
<rqou> i also have stuff living in my bash history for "scavenge deps to build a static binary"
<whitequark> actually you dont need to do something
<whitequark> cmake automatically passes whatever's appropriate i think
<whitequark> depending on selected toolchain
<whitequark> unless you want it to be more restrictive
<rqou> er, when i tried it it would build sierra binaries
<whitequark> mm
<whitequark> okay
<rqou> i set it to 10.7 because that's the oldest one with libc++ support for c++11
<whitequark> cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 then
<rqou> right, but that -D flag has to live somewhere
<rqou> right now it lives in the jenkins config
<whitequark> in README?
<whitequark> i mean
<whitequark> it depends on xcode you have
<rqou> which isn't a very visible or maintainable place :P
<whitequark> no?
<rqou> i have no idea
<rqou> i just know that stack overflow told me to pass this flag
<rqou> and otool claims that the min version indeed gets changed when i do so :P
<rqou> i don't actually have a 10.7 system to test on
<whitequark> i have 10.8.5
<whitequark> in a vm
<whitequark> eh i have to boot it
<rqou> they work on my sierra actual macbook
<rqou> but anyways, the various jenkins configs have ~10 lines each of "random glue garbage build system stuff" that needs maintaining every now and then
<rqou> half of it is currently hacks to override pkg-config
<whitequark> rqou: um
<whitequark> set up an http redirect
<cr1901_modern> Build system duct tape?
<rqou> er, there is a redirect on the main page
<rqou> http://rqou.com redirects
<rqou> the "ermahgerd must encrypt everything people" discourage universal redirects because it masks misconfiguration/infoleaks
<whitequark> yes but not the direct link
<whitequark> ugh
<whitequark> make it manual
<rqou> yeah i'll fix this later
<whitequark> and this is ugly
<whitequark> I don't have copy-paste into VM
<whitequark> almost as bad as websites that won't work without www.
<whitequark> anywayy the binaries work
<rqou> niced
<whitequark> of gp4 tools
<rqou> *nice
<rqou> anyways, these binaries are specifically built with static linking rather than with homebrew
<rqou> so you don't have to go install homebrew and break your system to use them
<cr1901_modern> My website isn't *supposed* to work without www, but for some reason firefox claims it exists/the SSL certificate is bad
<rqou> my www/no-www should work correctly
<azonenberg> aaanyway i'm not gonna be writing a git patch any time soon
<azonenberg> Too many yaks to shave for now
<azonenberg> :p
<cr1901_modern> azonenberg: http://hackaday.com/2017/02/25/the-fab-lab-next-door-diy-semiconductors/ Junior in high school makes his own fab
<azonenberg> i think i saw that one earlier today
<azonenberg> trying to duplicate jeri's process
<cr1901_modern> Good lord he makes me look bad on all fronts lol. And that's discounting the equipment he has access to that I don't
<azonenberg> Lol
<azonenberg> i was just commenting a while ago about how sad it was that i'm surrounded by friends with sems
<azonenberg> and dont have one in my own basement yet
<cr1901_modern> I should've done something productive with myself in high school instead of playing video games all the time...
openfpga-bb has joined ##openfpga
<whitequark> sounds like rich parents tbqh
<whitequark> you don't get access to what's clearly written off semi equipment without someone to help you with auctions
<azonenberg> Yeah there didnt seem to a lot of homebrew there
<azonenberg> more like, grandpa used to work for TI
<whitequark> or that
<cr1901_modern> whitequark: I'm discounting access to equipment.
<openfpga-github> [openfpga] azonenberg closed issue #69: gp4prog times out too quickly switching modes on Windows https://git.io/vyT3i
<azonenberg> rqou: Let me know if this fixes your windows mode switch timeout issue
<whitequark> well yes you should probably have wasted less time
<cr1901_modern> The q I'm asking myself now is: "would have I understood semiconductors if they were taught in high school?"
<whitequark> but if you cant replicate what he did its not ur fault
<cr1901_modern> whitequark: fair
<whitequark> and im not even sure if hell get any results
<whitequark> hopefully yes but...
<whitequark> anyway i should try to get into contact
<whitequark> or azonenberg since he lives closer
<whitequark> :p
<cr1901_modern> whitequark: Can't speak for you, but my high school wasn't well off. I mean, I did well and was able to do well in college, but I've found the ppl I surround myself with whose level I strive to reach typically aren't EEs.
<cr1901_modern> They're either dropouts or CS-adjacents
<cr1901_modern> device physics was not offered at my uni- not enough interest, according to the person qualified to teach it. But I did push it at least :/.
<openfpga-bb> build #75 of openfpga is complete: Failure [failed test_openfpga_normal] Build details are at https://openfpga-dashboard.antikernel.net/builders/openfpga/builds/75 blamelist: Andrew Zonenberg <azonenberg@drawersteak.com>
<azonenberg> Ok, let's see why those are failing...
<azonenberg> complains about not finding the board
<whitequark> cr1901_modern: you don't need school for knowledge
<azonenberg> It worked when i ran it natively so why is the vm not liking it?
<whitequark> and you didn't even need it two decades ago although it was harder
<whitequark> and like you've mentioned, you're discounting access as an issue
<whitequark> now access *is* a huge issue, my school didnt even have a machine shop
<whitequark> and I'm still mad about it
<whitequark> the uni had a shitty one, which is spectacular given its size
<azonenberg> whitequark: I was homeschooled so i had basically nothing
<whitequark> maybe they just contracted everything out
<whitequark> azonenberg: hm, I've never considered this disadvantage of homeschooling
<whitequark> I guess it's attenuated by SIGs somewhat
<cr1901_modern> How'd you get access to one? Or did you just do your research until you had access and stored it to "long term mem"
<azonenberg> i took one class at a local uni on chemistry (outreach program targeting younger kids) which was nice
<azonenberg> and one on bio
<azonenberg> that was it
<whitequark> cr1901_modern: now I outsource
<whitequark> I don't mfg anything myself really
<azonenberg> That was actualyl one of the things pushing me towards software
<whitequark> but you still need to know techniques to design
<cr1901_modern> Fair
<whitequark> I still dont have access to a shop
<azonenberg> it was a technical field i could work on with pretty limited resources
<azonenberg> I only got into hardware when i went to rpi
<whitequark> maybe I'll move to CZ and buy equipment there
<whitequark> land is cheaper
<cr1901_modern> whitequark: School was a good motivator for someone passive like me :P. There were consequences if I didn't commit stuff to memory (like losing scholarship etc)
<whitequark> azonenberg: yeah this seems like a lot of the reason why people go into software
<whitequark> cr1901_modern: yes, thats what school is for
<azonenberg> the thing is i did breadboard some stuff before
<azonenberg> it just wasnt super high end
<whitequark> a stick. access. and encouraging to go wide and shallow as opposed to narrow and deep
<azonenberg> whitequark: also, can you investigate the buildbot config?
<azonenberg> its failing to detect the devkits
<whitequark> azonenberg: hmm.
<azonenberg> (I moved some cables around and rebooted the vm, so may have broke something)
<azonenberg> they show up in a lsusb in the vm
<whitequark> azonenberg: no
<azonenberg> Oh?
<whitequark> you broke it in your commit
<whitequark> if the board isnt in bootloader mode
<azonenberg> It worked natively when i tried it
* azonenberg looks
<whitequark> then the loop is never taken
<whitequark> at least thats my understanding
* azonenberg facepalms
<whitequark> I actually havent realized it when reviewing the commit
<cr1901_modern> whitequark: I still want my knowledge to be as wide as possible, even though I know from experience and others stories that it just doesn't happen. You eventually settle into a niche.
<whitequark> but it was obvious once its failed
<whitequark> cr1901_modern: nah
<cr1901_modern> This is what happened to my transmission line knowledge. I forgot most of it :/
<whitequark> you settle into a niche if you want to do anything novel
<cr1901_modern> And remember it is more painful than learning it the first time lol
<whitequark> theres only 86400 seconds in a day
<whitequark> and even on NDRIs you can only work maybe 18 hours of that
<rqou> (catching up) so about fab equipment
<cr1901_modern> I have to have 8 hours. My body cannot do 6
<whitequark> thats because you arent on NDRIs.
<rqou> $FANCY_SCHOOL's entire teaching fab apparently costs "only" $1mil
<rqou> and a hacky one can probably be set up for less
<whitequark> rqou: for far less
<whitequark> there are cleanroom-less techniques
<whitequark> which are cheaper
<cr1901_modern> Is equipment access that important? I mean, you seemed to turn out fine outsourcing stuff
<rqou> our cleanroom was barely clean, let's be honest :P
<openfpga-github> [openfpga] azonenberg pushed 1 new commit to master: https://git.io/vyTj1
<openfpga-github> openfpga/master 9ea79f2 Andrew Zonenberg: gpdevboard: Fixed bug in last commit causing board to not initialize correctly unless it's in bootloader mode
<whitequark> I think it doesnt really work with one person though
<rqou> there are students walking in and out all the time :P
<azonenberg> If i ever get back into home semi fab
<azonenberg> i'm going to try and glovebox it
<whitequark> cr1901_modern: you'll never be able to do that in the US
<whitequark> in RU machining costs are negligible
<whitequark> in Guangzhou also
<rqou> i think if i were to have a) a real job and b) a real house/lab space azonenberg and i can probalby get semi fab working
<whitequark> in US... lol
<whitequark> rqou: azonenberg: so I can stay I think 180 days on this US visa
<whitequark> assuming I have somewhere to live and the US doesnt turn into glass
<rqou> ugh US visa policies
<whitequark> I'd really like to collaborate on something like that
<azonenberg> whitequark: hey, you're russian - you should have no problems at the border
<azonenberg> ;)
<rqou> i can live in HK indefinitely
<rqou> and SZ for a year?? at a time before having to do a visa run
<cr1901_modern> Why is everyone on the west coast?
<rqou> i wonder which is more effective?
<rqou> i mean, i was born on the west coast
<cr1901_modern> (don't answer that)
<whitequark> azonenberg: we'll see
<rqou> also, 420smokeweedeveryday :P :P
<azonenberg> rqou: so my holdup on semi fab right now is a good climate-controlled lab area i can work in
<whitequark> I haven't had problems at the border so far
<whitequark> rqou: definitely not the US
<rqou> i swear i've in general been asked more questions at the US border than the CN/HK border
<azonenberg> My current plan is to buy a house in my current vicinity next sumer-ish
<whitequark> rqou: ... you've got asked questions at HK border?
<rqou> no :P
<whitequark> I just use the automatic gate
<azonenberg> They never asked me anything, lol
<whitequark> with my hkid
<azonenberg> and i'm not even a HK resident
<azonenberg> took one look at my passport and waved me on
<rqou> i saw a pakistani guy being asked questions in HK once
<rqou> :P
<azonenberg> i had more troubles on the way *home*
<rqou> ^
<whitequark> yeah HK is pretty permissive
<azonenberg> had to declare some of the various snacks etc i brought back
<whitequark> lol what
<azonenberg> No tax or anything
<whitequark> are they totally out of their minds
<azonenberg> the guy just wanted to know if there was any raw meat, fruit/vegetable products, etc
<azonenberg> totally reasonable disease control precautions
<rqou> heh at EWR i just said "uh, i have candy?" when asked
<rqou> and didn't have to declare anything
<azonenberg> But the form only had a box for "food / no food"
<azonenberg> (this was via the automated global entry kiosk)
<rqou> (this was when i was smugging cheese+kinder eggs :P)
<azonenberg> Lol
<azonenberg> anyway once i told him everything was commercially packaged, cooked, and sealed bakery products
<azonenberg> he didnt inspect my bag or anything
<rqou> i mentioned my father got inspected once entering SZ and the inspector basically said "wtf why did the guy outside send you in here?"
<azonenberg> only took like 15 seconds
<azonenberg> but technically i was still declaring it
<openfpga-bb> build #76 of openfpga is complete: Failure [failed test_openfpga_normal] Build details are at https://openfpga-dashboard.antikernel.net/builders/openfpga/builds/76 blamelist: Andrew Zonenberg <azonenberg@drawersteak.com>
<rqou> also, looking back i think in 2016 i technically exceeded my tax-free import limit
* azonenberg investigates what broke this time
<rqou> but china lies on customs declarations all the time :P
<azonenberg> whitequark: ok this is weeird
<azonenberg> whitequark, rqou: I'm getting bug #68 failures
<azonenberg> in the buidlbot vm
<whitequark> azonenberg: rqou: have I told the story about the customs in RU
<whitequark> here
<rqou> RU has customs? :P
<rqou> a) Are you gay? Y/N b) Are you from Crimea? Y/N :P :P
<whitequark> uhh no?
<rqou> i thought that's what RU customs would ask :P :P
<whitequark> i apparently look gay enough for random people on street to come up and ask and i never had any issues on the border wrt that
<azonenberg> c) do you support chechen independence?
<azonenberg> :p
* whitequark facedesks
<azonenberg> whitequark: lol interesting
<azonenberg> fwiw, $WIFE's aunt thought *I* was gay the first time she met me
<whitequark> really??
<azonenberg> Yeah, lol
<azonenberg> something about the way i acted
<azonenberg> And i'm as Kinsey-0 as they come
<whitequark> the people at the border *do* remember me personally though
<azonenberg> Lol
<azonenberg> You cross that much?
<whitequark> no, I'm that memorable
<azonenberg> Or is it just the flaming red hair
<azonenberg> Lol
<whitequark> the latter
<azonenberg> (how long have you been doing that?)
<whitequark> uhm...
<whitequark> since 2012 or so?
<whitequark> I think?
<azonenberg> Lol
<cr1901_modern> flaming red hair, huh?
<whitequark> I'm planning to do it for the rest of my life
<azonenberg> i mean in these parts it wouldnt make you stand out all that much
<whitequark> cr1901_modern: yup
<rqou> lol you're in seattle :P
<whitequark> and every time I dye it again I choose a slightly brighter shade of red
<azonenberg> There's a girl in my SAR unit, late teens or so, who has bright blue-green hair
<rqou> but then i'm in berkeley, so... :P
<whitequark> so far I havent run out of better dyes *but* I do have to import them from south korea
<azonenberg> And she goes out on rescue calls in the woods looking like that lol
<azonenberg> i'm kinda surprised nobody in the group has done a bleach followed by a fluorescein rinse
<azonenberg> forget the hi-vis jacket :p
<whitequark> incidentally this particular pigment is highly fluorescent
<whitequark> we've tried it with a UV laser with sebastien
<rqou> a lot of "super bright" pigments cheat that way
<whitequark> oh its just natural
<azonenberg> Lol
<rqou> same with detergents, fabric softeners, and paper
<whitequark> I suppose coupled double bonds just do it usually
<rqou> hmm i don't know too much about the mechanisms of florescence other than "electrons jump between orbitals"
<whitequark> the best part is it's "semi-permanent" but it washes out far less than the "permanent" one
<rqou> so do hair dyes actually chemically bond to your hair?
<rqou> or are pigments electrostatically attached?
<whitequark> they do
<azonenberg> whitequark: kinda surprised you havent tried Rhodamine B yet :p
<azonenberg> although its not the most friendly dye :P
<whitequark> azonenberg: thats very toxic
<azonenberg> That's why I said "kinda surprised"
<rqou> ah so that's why i can't "just go order it" and make nurdrage glowsticks :P
<azonenberg> rqou: pyranine and fluorescein are my preferred fluorescent dyes
<rqou> apparently for that particular reaction rhodamine b doesn't work super great either
<whitequark> anyway the customs story
<azonenberg> both are pretty easy to get hold of and relatively nontoxi
<azonenberg> c
<whitequark> my suitcase got xrayed
<whitequark> this time I had in it: some food, a phone, PCB vise, greenpak board, microscope, a set of RAC hoses, a manifold, and a bunch of smaller stuff
<azonenberg> Lol
<whitequark> the customs officer tells me to go unpack it
<whitequark> i'm like "no no no let me show you on the xray"
<rqou> anyways, this is nurdrage if you aren't familiar: https://www.youtube.com/watch?v=tItOOpyJP5k
<whitequark> he looks at me a bit then turns the display
<whitequark> "here are the hoses, they're in transverse direction... a microscope... a vise... what's that? a phone... and this is some food i brought as a gift"
<whitequark> to which he responds "alright you're free to go"
<azonenberg> Lol
<lain> hah
<whitequark> the next time I want to do the same but without looking at hte display
<whitequark> I remember where exactly in my suitcase everything is
<whitequark> I know how it looks on an xray
<azonenberg> meanwhile TSA flagged me on a domestic flight, and actually pawed through my suitcase, because of (of all things) business cards
<rqou> hamburg airport security was less than impressed with my "hack box" that was entirely blue-colored on the xray
<azonenberg> apparently they had a suspiciously high density in a large stack lol
<azonenberg> I was kinda amazed
<azonenberg> my backpack full of assorted electronics, wires, etc was the thing i expected to look funny
<azonenberg> i couldnt imagine what they wanted with a suitcase full of clothing
<whitequark> lol
<azonenberg> like, i can understand the stuff i bring on a trip looking weird in an xray
<azonenberg> but i wouldnt expect my clothing bag to be the one alarming :p
<azonenberg> whitequark: also, on topic
<azonenberg> i think i fixed the bug and pushed my change
<azonenberg> it's still erroring out
<whitequark> yes looking at it now
<azonenberg> kk
<azonenberg> if you want me to detach or power cycle the boards let me know
<whitequark> azonenberg: thats not bug 86
<whitequark> all tests have failed
<whitequark> azonenberg: can you cycle the boards
<azonenberg> Sec
<azonenberg> Detached from VM, unplugging...
<azonenberg> Re-attached
<azonenberg> Both in bootloader mode now
<whitequark> openfpga-bb: force build openfpga
<openfpga-bb> I'll give a shout when the build finishes
<openfpga-bb> build forced [ETA 1m08s]
<openfpga-bb> build #77 of openfpga is complete: Failure [failed test_openfpga_normal] Build details are at https://openfpga-dashboard.antikernel.net/builders/openfpga/builds/77
<azonenberg> Both in normal mode now
<whitequark> that... is a different failure
<whitequark> azonenberg: oh
<whitequark> look at test 2
<whitequark> it switched a devboard from bootloader to normal mode
<whitequark> but dindt discover a part in it afterwards
<azonenberg> Hmm
<azonenberg> Interesting
<azonenberg> oh i think i know what happened there
<azonenberg> Gimme a sec to investigate
<whitequark> there are also other bizarre failures
<whitequark> was the CI broken for a while?
<azonenberg> The CI was down for a while due to me pulling a devkit to work on another project
<azonenberg> i dont have enough greenpak boards
<whitequark> oh
<azonenberg> so all 46620 stuff was out for a few weeks
<azonenberg> anyway
<azonenberg> openfpga-bb: force build openfpga
<openfpga-bb> build forced [ETA 1m08s]
<openfpga-bb> I'll give a shout when the build finishes
<whitequark> okay looks like it bitrotted
<whitequark> azonenberg: did you swap them?
<whitequark> or insert wrong chip?
<azonenberg> whitequark: no
<openfpga-bb> build #78 of openfpga is complete: Failure [failed test_openfpga_normal] Build details are at https://openfpga-dashboard.antikernel.net/builders/openfpga/builds/78
<azonenberg> sec
<azonenberg> So that issue in test #2
<whitequark> thats less failures
<azonenberg> i think is related to the bootloader switchover
<azonenberg> in particular, the device indexing logic
<azonenberg> gets screwed up if a device's pid changes halfway through the enumeration
<azonenberg> i think it scanned one board twice and skipped the other
<azonenberg> b/c the libusb device list changed order when the board changed pid
<whitequark> so latch failed with no messages
<whitequark> and lfosc/rcosc failed
<whitequark> >Measured ring oscillator frequency (with divide-by-2): 613566755 Hz (expected 13500000)
<whitequark> why on earth
<azonenberg> Latch did not fail with no messages
<azonenberg> 4: ERROR: Test case not yet implemented
<azonenberg> :p
<whitequark> oh ok
<whitequark> I missed that
<azonenberg> that was an intentional failure from a while ago i had forgotten about
<azonenberg> that was supposed to remidn me to write that test case :p
<whitequark> why does ringosc oscillate at 600mhz
<azonenberg> i dont think it is
<azonenberg> i think the frequency counter is borked
<whitequark> :p
<whitequark> obviously
<azonenberg> i tried to use it to test some other logic, i forget what
<azonenberg> or no wait
<azonenberg> this IS what it failed on
<azonenberg> i'm remembering now
<azonenberg> i used the same freq count logic that we had for trimming the oscillator
<azonenberg> and for unknown reasons i got garbage when i tried to measure the other oscillators
<azonenberg> So it looks like we have one new bug, switchover of devkits between bootloader and normal mode breaks enumeration
<azonenberg> plus this old bug
<azonenberg> which never got reported in the tracker
<openfpga-github> [openfpga] azonenberg opened issue #71: gpdevboard OpenBoard sometimes skips or double-counts a board when switching from bootloader to normal mode https://git.io/vykvT
<azonenberg> whitequark: so #71 explains the failure of test 2 earlier
<azonenberg> test 4 is a known TODO
<azonenberg> We're still left with the oscillators doing really weird things
<azonenberg> Tomorrow if i get a chance i'll scope the output and make sure its actually toggling like it should be and not getting noise or something
<whitequark> sounds good
<azonenberg> when you have time can you look at those test cases on the hdl/pc side and see if you see anything obvious?
<whitequark> okay
<whitequark> I have some DMA work to finish in ARTIQ
<whitequark> then I have some openings
<whitequark> I might actually finish pcbhdl since I need it for the next project
<cr1901_modern> I'm writing some rust code... I have a change I want to make to my current code. I remember *what* the change is, but I don't remember why I wanted to make the change in the first place lol
<cr1901_modern> whitequark: Does Rust do something akin to "template parameter deduction" for input arguments to fcn impls w/ trait bounds?
<whitequark> elaborate
<cr1901_modern> i.e. impl myImpl{ open<S: AsRef<OsStr> + ?Sized>(name: &S) }=> open("COM39") works without me having to do myImpl::<String>open("COM39")
<whitequark> um, sure, that's just type inference
<whitequark> that +?Sized looks wrong
<whitequark> and that & too
<whitequark> just fn open<S: AsRef<OsStr>>(name: S)
<whitequark> this will accept any of OsStr, OsString, &OsStr and &OsString
<whitequark> erm
<whitequark> no such thing as OsStr.
<whitequark> so any of OsString, &OsStr and &OsString
<cr1901_modern> This is what I get for not looking at code for a week; I don't remember why I wanted to pass in &S
<whitequark> that said I think you'll have to convert a string literal to an OsStr
<cr1901_modern> I think I wanted deref-coercion to be forced to happen
<whitequark> explicitly
<whitequark> that doesn't make sense.
<whitequark> you don't need Deref if you use AsRef
<whitequark> there's an uh
<whitequark> impl<'a, T, U> AsRef<U> for &'a T
<whitequark> where T: AsRef<U> + ?Sized, U: ?Sized
<cr1901_modern> Ahhh right... In my code, "open" is thin wrapper for another function in another library. And I was trying to make the type sigs match
<whitequark> oh, hm.
<whitequark> impl AsRef<OsStr> for String
<whitequark> weird.
<whitequark> actually, maybe you aren't wrong.
<whitequark> the OsStr::new signature does that.
<whitequark> I'm not 100% sure why.
<whitequark> it shows that I don't use hosted Rust does it? :]
<cr1901_modern> lol... I'm giving it a chance
<cr1901_modern> I think I'm mixing up type inference w/ something else, hence why I got confused
<cr1901_modern> eg let x = 3.0 knows its a float b/c it matches the syntax for how you'd write a float
<cr1901_modern> but I don't think syntactic differences between Path, OsStr and str exist to distinguish a literal input arg?
<whitequark> the string literal has the type `str`
<whitequark> this usually autorefs to &str.
<whitequark> actually, not quite, hang on
<whitequark> *string* literals have the type &str
<whitequark> *array* literals have the array type. e.g. [1, 2, 3] is [i32; 3]
<whitequark> or not i32 if you're unifying it with an usize or something
<whitequark> oh, I remember now how the OsString thing works.
<whitequark> so Rust needs cheap conversion to platform strings.
<whitequark> however, platform strings aren't valid UTF-8 (except on macOS).
<cr1901_modern> ahhh, so in my open function, the open becomes specialized for OsStr since impl AsRef<OsStr> for str holds?
<whitequark> on Linux it's an array of bytes, on Windows it's UCS-2 and UTF-16 post-Vista (I think)
<whitequark> so Rust has invented an encoding called "WTF-8"
<cr1901_modern> hah
<whitequark> it's UTF-8 but you can use surrogate pairs.
<whitequark> this means that any valid UTF-8 is also valid WTF-8, so you can do an AsRef<OsStr> for str
<whitequark> however, when you *actually pass this to a Windows API*, it still has to be converted to widechar.
<whitequark> but your cross-platform code can enjoy the cheap conversion between str and OsStr, so it's a win.
<whitequark> anyway. there's an AsRef<Path>, AsRef<OsStr>, etc, for str.
<whitequark> and PathBuf, OsString, etc, for String.
<whitequark> so you can pass a String or a str to anything that expects an AsRef<Path>.
<cr1901_modern> I should look at the llvm to see which specialization of open is actually created (I assume it's open<OsStr>)
<cr1901_modern> or is that information gone by that stage?
<whitequark> usually you use a fn doit<P: AsRef<Path>>(path: P)
<whitequark> not with the & and ?Sized.
<whitequark> cr1901_modern: no.
<whitequark> I'm not super sure what are those for (they go hand in hand).
<whitequark> the type that implements AsRef<OsStr> in your case is &str.
<whitequark> so it'll be an open<str> specialization
<whitequark> open<&str> even
<whitequark> Rust never does implicit conversions for you
<cr1901_modern> Ahhh, so the conversion doesn't actually take place until as &OsStr is needed
<whitequark> it does autoref and autoderef sometimes
<whitequark> yes.
<cr1901_modern> (except for deref coercion?)
<whitequark> the conversion happens if you call the .as_ref() method
<cr1901_modern> Ahhh
<whitequark> which compiles to, ah, basically, ret
<cr1901_modern> lmao works for me :P
<whitequark> (well, just a no-op, it's ought to be inlined)
<whitequark> the *backwards* conversion though requires a linear traversal to validate UTF-8
<cr1901_modern> Makes sense
<cr1901_modern> Lastly, what is autoref/autoderef? Is autoderef another name for deref coercion?
<whitequark> autoderef is...
<whitequark> so if you have a &T, or &&T, or &&&T, or &&&&T, or &mut &mut T, or whatever
<whitequark> and you do x.foo() (where x: &T)
<whitequark> Rust will insert as many * as you need
<cr1901_modern> Oh, right. I remember that
<whitequark> autoref is...
<whitequark> so if you have a T
<whitequark> and you have a method T::foo that takes a &self
<whitequark> then Rust needs to insert a & and choose a lifetime
<whitequark> deref coercion is...
<whitequark> there are things like smart pointers. Rc<T>
<whitequark> you want to be able to do x.foo() (where x: Rc<T>) if T::foo exists.
<whitequark> so there's an impl Deref.
<cr1901_modern> if &T has Deref<U> implemented &T will become &U
<whitequark> impl Deref is basically overloading for *
<cr1901_modern> when &T is expected
<whitequark> and it works with autoderef too.
<cr1901_modern> It's one of the only automatic conversions IIRC
<whitequark> yeah
<whitequark> Deref and AsRef are not the same thing though.
<whitequark> you can only have one Deref impl but as many AsRef impls as you want.
<whitequark> this guides what you should implement yourself.
<whitequark> also there's Borrow, which is almost but not quite like AsRef.
<cr1901_modern> Yes. One of my confusions last week was AsRef vs Deref vs Borrow
<whitequark> I haven't a faintest clue what's the real difference between AsRef and Borrow and I'm not sure if anyone has
<cr1901_modern> the guide (kinda poorly IMO) explains the difference
<whitequark> I think Borrow is basically an implementation detail of HashMap
<whitequark> well not quite
<whitequark> but look at how it's used in HashMap
<whitequark> this is how you use Borrow.
* cr1901_modern nods
<cr1901_modern> I've almost got enough Rust under my belt to actually write programs okay. I next need to move onto macros and other higher-level concepts. Promises, and "what is a HKT and why doesn't Rust need them" specifically
<whitequark> I don't know how futures work in Rust.
<whitequark> I think HKT is just a bad idea.
<cr1901_modern> I'm DEF having more success writing Rust than OCaml
<whitequark> lolwhat
<whitequark> rust is an incredibly more complex language than OCaml
<whitequark> in fact it took me quite a bit longer to write decent Rust code than decent OCaml code
<whitequark> even though *going from OCaml* helped
<whitequark> actually, I nearly gave up on Rust once or twice
<cr1901_modern> Maybe it's the way I think... I can *try* OCaml again, but last time I wrote a program with it, I got stuck fairly quickly about "the best way to do things"
<whitequark> ah.
<whitequark> the OCaml standard library doesn't have batteries included.
<cr1901_modern> I was trying to write a small procedural generator for graphics, and got overwhelmed trying to structure it
<whitequark> to the degree that there's a project literally called "batteries included"
<whitequark> OCaml modules ~ Rust impls
<whitequark> hence the pattern of e.g. module Thing = struct type t val create : unit -> t end
* cr1901_modern should prob try again
<cr1901_modern> I could just be approaching it wrong. OCaml does appeal to me b/c there's some REALLY cool examples of writing parsers/interpreters for instance w/ minimal code
<whitequark> don't use camlp4.
<whitequark> don't use camlp4.
<whitequark> don't use camlp4.
<whitequark> in fact camlp4 doesn't even exist.
<whitequark> the existence of camlp4 is a prank by Daniel de Rauglaudre played on unsuspecting developers.
<cr1901_modern> I take it I shouldn't use camlp4
<whitequark> I'll tell you one fact about camlp4 that should demonstrate how fucked up the whole thing is
<whitequark> the *previous version* of camlp4 is called camlp5.
<whitequark> do you really want to use software written by a person who thinks this is sensible.
<cr1901_modern> Is it better than lwip :P?
<whitequark> it's certainly larger.
<whitequark> in fact if you ask the ocaml toplevel to print the signature of Camlp4, last time I tried it took it about 90 seconds
<cr1901_modern> erm o.0;
<whitequark> ... that's before it started printing, that is.
<whitequark> and then some.
<cr1901_modern> I will avoid camlp4 then
<cr1901_modern> I don't want to know
<whitequark> camlp4 consists of fucked up ideas implemented in fucked up ways and then composed in even more fucked up ways.
<whitequark> it's also completely undocumented.
<whitequark> and sparsely commented in French.
<cr1901_modern> Have you ever seen the xterm source code?
<whitequark> no, and given the context I'll take care not to accidentally do it
<cr1901_modern> Yes, I was going to ask for a comparison :)
<cr1901_modern> In any case, thanks for the help/feedback. I'm going to attempt to be productive
* qu1j0t3 was entertained
<whitequark> qu1j0t3: which part
<qu1j0t3> your review of camlp4, mostly
<whitequark> qu1j0t3: I've also driven much of the early adoption of ppx.
<whitequark> (actually I believe I wrote the first ever ppx tutorial)
<lain> ppx?
<whitequark> lain: ocaml's new syntax extension mechanism
<lain> ah
<whitequark> basically you can attach attributes to ppx nodes.
<whitequark> naturally, it's violently incompatible with camlp4.
<whitequark> in theory, they *could* be made compatible, but no ocaml developer has proven themselves capable of adding ppx support to camlp4
<whitequark> s/ppx nodes/ast nodes/
<rqou> so IME I feel like I _should_ understand all the features of Rust, but whenever I look at actual Rust code I can't understand wtf is happening
<whitequark> rqou: like which code
<whitequark> oh by the way whats the symbol like...
<rqou> like artiq :P
<whitequark> two horizontal lines, crossed by a half-circle with endpoints located vertically, of which about one half lies between the horizontal lines, and one half below them
<whitequark> and the bottom endpoint of the half-circle has a diagonal line towards the bottom right.
<whitequark> (I don't have a camera)
<rqou> er, ₹?
<whitequark> is that not descriptive enough
<rqou> the Indian Rupee sign
<whitequark> um
<whitequark> yeah thats it
<whitequark> why is it on my keyboard?
<whitequark> I bought the laptop in HK
<whitequark> it has euro and this thing
<rqou> I've never seen it ever
<rqou> I've only ever seen "Rs" used to represent rupees
<whitequark> amazing
<whitequark> anyway the artiq code
<whitequark> whc hpart isnt lcear
<whitequark> that's common when you're starting out with rust
<rqou> it's not that some part is unclear, it's just that it doesn't feel nearly as "immediately accessible" to me as C or Python
<whitequark> give it some time
<rqou> imho the book isn't super great
<whitequark> really?
<rqou> discussing with one of my housemates who was a lot more involved with Rust, he claims that the book ideally would have different contents depending on the target audience
<rqou> a "went to some $FANCY_SCHOOL" version, a "I want C with fewer bugs" version, and a "I used to use Python/JavaScript/Ruby" version
<whitequark> yes.
<whitequark> but we only have one steveklabnik
<cr1901_modern> steveklabnik has the patience of a fucking saint
* cr1901_modern wasn't productive. Go figure.
<cyrozap> rqou: "whenever I look at actual Rust code I can't understand wtf is happening" I think that's the case when learning any new language. When I first started out with Go, I couldn't understand any actual Go either. Now, I actually find it easier to understand than C++ (which I still need to learn).
<cyrozap> *any actual Go code
<rqou> but e.g. Python felt much easier to pick up
<rqou> although I guess this applies to trying to jump from "C with classes" C++ to "modern" C++
<whitequark> what sort of moron wrote the macos appstore.
<whitequark> I'm downloading xcode for the third time because something in that pile of trash broke and it doesn't install
<rqou> I should just give you access to my working VM :P
<whitequark> oh it's installing finally
<rqou> btw fun feature: if you don't have an en0 you can't access the app store
<whitequark> lolwhat
<rqou> something about how the auth logic works
<whitequark> rqou: wow
<whitequark> my VM restarted while downloading xcode, it turns out
<whitequark> because xnu crashed
<whitequark> "TLB invalidation IPI timeout"
<whitequark> sierra is *so slow* in a vm
<rqou> KVM?
<whitequark> it's not *actually* slow but the animations make it seem slower than it is
<whitequark> something about the software renderer I think
<whitequark> I already turned off everything I could but there are more
<rqou> meanwhile raspi manages to make the GUI fast while everything else (especially IO) is really slow
<cr1901_modern> Is the GUI fast b/c of the GPU blob?
<rqou> I have no idea
<rqou> I'm never touching the raspi GPU because I've seen its HDL source
<whitequark> lol
<cr1901_modern> It's crap? (Like most HDL source is)
<rqou> I honestly don't know any more than what has already been published/REd
<rqou> it didn't look substantially worse than any other HDL
DocScrutinizer05 has quit [Disconnected by services]
DocScrutinizer05 has joined ##openfpga
flaviusb has quit [Ping timeout: 240 seconds]
flaviusb has joined ##openfpga
cyrozap has quit [Read error: Connection reset by peer]
cyrozap has joined ##openfpga
cyrozap has quit [Remote host closed the connection]
cyrozap has joined ##openfpga
Hootch has joined ##openfpga
<cyrozap> whitequark: If you need Xcode, I can send you a download URL for the 8.2.1 xip.
promach has joined ##openfpga
digshadow1 has quit [Ping timeout: 240 seconds]
digshadow has joined ##openfpga
promach has quit [Ping timeout: 240 seconds]
Guest98562 has joined ##openfpga
promach has joined ##openfpga
eduardo__ has joined ##openfpga
eduardo_ has quit [Ping timeout: 260 seconds]
azonenberg_work has quit [Ping timeout: 240 seconds]
Guest98562 has left ##openfpga [##openfpga]
Bike has quit [Quit: leaving]
azonenberg_work has joined ##openfpga
felix_ has quit [Ping timeout: 260 seconds]
felix_ has joined ##openfpga
promach has quit [Ping timeout: 240 seconds]
promach has joined ##openfpga
promach has quit [Ping timeout: 240 seconds]
promach has joined ##openfpga
azonenberg_work has quit [Ping timeout: 240 seconds]
azonenberg_work has joined ##openfpga
<whitequark> cyrozap: it's installed already. but thanks
Bike has joined ##openfpga
kuldeep has quit [Remote host closed the connection]
kuldeep has joined ##openfpga
promach has quit [Quit: Leaving]
<digshadow> pointfree: any interest speaking mtvre on the 8th about psoc stuff? or need more time
azonenberg_work has quit [Ping timeout: 240 seconds]
azonenberg_work has joined ##openfpga
<rqou> cyrozap: are you a registered Mac developer?
<rqou> can I get you to sign a codeless kext at some point?
<whitequark> no they're combinatory
<whitequark> combinatorial*
* whitequark ducks
<rqou> Apple codesigning does timestamp, right?
<rqou> so your signature doesn't expire when the issuing cert does?
<whitequark> at least it has no variables
<rqou> oh wow I didn't even know about that
<rqou> at one point when I was making a Mac app bundle it wasn't even signable
<rqou> because the main binary was a bash script :P
<rqou> hmmm " SHA-1 hash (the only kind currently supported) requires ..."
<rqou> oops :P
<whitequark> thanks for reminding me to tweet about this :p
Bike has quit [Ping timeout: 260 seconds]
Bike has joined ##openfpga
Hootch has quit [Quit: Leaving]
<cyrozap> rqou: I have a developer account, but not the paid version. Even if I did, you need separate approval from Apple to sign kexts. This is actually one of the reasons I ditched OS X (the only Mac I use now is my work-issued MacBook Pro).