lain has quit [Ping timeout: 260 seconds]
scrts has quit [Ping timeout: 240 seconds]
scrts has joined ##openfpga
lain has joined ##openfpga
<rqou> woot, i made a lot more things be working: https://rqou.com/jenkins/job/open-fpga-tools/
<rqou> now i just need to fix macOS hacks
<rqou> openfpga unfortunately won't be fixed until azonenberg looks at the no-udev PR
<rqou> because i honestly _cannot_ figure out how to obtain libudev
<jn__> (eudev is a fork of udev)
<rqou> well, i have no idea about any forks or whatever, but somehow libudev seems to require obtaining all of systemd?
<rqou> why are udev and systemd related?
<cr1901_modern> rqou: LFS book page on udev explains this in detail IIRC
<awygle> rqou: dangerous question lol
<rqou> every time i ask questions like this i have found i get ignored for being not "in the loop" enough
<rqou> i just want to friggin obtain a libudev.a
<jn__> just build eudev's libudev then
<jn__> (it *should* work, but i'd better not make any promises)
<awygle> rqou: it's a fraught issue. basically the systemd guys decided that systemd needed udev, and that it didn't make sense to hold it as an external dependency.
<awygle> you can build udev from within the systemd tarball
<awygle> or at least you could in 2012 when they merged... hope that's still true
<awygle> but because of the "systemd eats everything" and "who gave the pulseaudio guy the keys to PID 1" memes, it's something where people get tense and usually just walk away because they don't want another Internet Fight
<rqou> hey jn__ and awygle, you two seem to be "in the loop" enough. plz tell me if this no-libudev poking of sysfs is "safe" or not: https://github.com/rqou/openfpga/blob/hidapi-test/src/vendor/hidapi/linux/hid.c#L342
<rqou> worked on the three systems i tested, but these systems are all debian-ish
<rqou> (sid PPC, sid x86_64, raspbian jessie)
<jn__> i don't know how udev works :(
<rqou> idk if fedora or some other more-systemd-infected distro has a different sysfs layout or not
<jn__> PPC? what kind of PPC box do you have?
<rqou> an old imac g3 (the fruit-colored CRT ones)
<awygle> hoo... i don't know if i'm *that* far into the loop. i *think* this works, and sysfs tends to change slowly these days, so you're probably ok
<jn__> rqou: hmm, yummy :)
<rqou> i looked and usb isn't officially documented as "stable" in sysfs
<rqou> however looking at the code i don't think it's changed in a way that affects me in over a decade
<jn__> if you want to dive deep into sysfs, here's the ABI documentation: https://www.kernel.org/doc/Documentation/ABI/
<rqou> yeah i looked there
<rqou> usb isn't there
<awygle> so you're just trying to eliminate the hidapi dependency on libudev?
<rqou> yeah
<rqou> because libudev is dumb
<awygle> lol
<rqou> it really only needs to read three files or so
<rqou> ugh and i just noticed that among the code i deleted was code that sets the global locale for some reason
<rqou> thanks hidapi, you're totally supposed to do that
<awygle> can you use the libusb implementation instead of the hidraw one?
scrts has quit [Ping timeout: 240 seconds]
<jn__> "/sys/dev/char/%d:%d/device/../../%s" seems weird because the maj/min numbers would cancel out if you pre-normalized it, but what do i know about the intricacies of path resolution (esp. considering symlinks)
<rqou> sure, except now you're dependent on libusb
<rqou> i specifically want as few dependencies as possible
<awygle> at least you can build libusb :P
<rqou> jn__: yeah, that did look weird, but it works
<rqou> because of symlinks in sysfs, it doesn't cancel out
<rqou> also, libusb also (optionally) depends on libudev
<rqou> i don't know what breaks if you don't have it though
<rqou> Works for Me(TM)
<awygle> i seriously doubt the usb sysfs tree will change, stable or not. so yeah, if it Works For You, call it good
<rqou> so fedora or whatever can't have a different sysfs layout for lulz?
scrts has joined ##openfpga
<awygle> uh hmm. well. there's an old sysfs layout. and a config option to turn that on.
<awygle> but sysfs layout is tied to the kernel, red hat can't just make one up. so 2 options at most.
<rqou> so a big reason i'm concerned is that the kernel documentation for hidraw claims that you _must_ use udev to find hidraw device nodes
<rqou> except that afaict this claim was written by the same person who wrote hidapi (the userspace library)
<rqou> also, that part of the code has never changed ever since hidraw existed
<jn__> AFAICS (there was a discussion about udev in #s6-offtopic today) the mechanism by which udev (the program) works is also called udev, or something like that
<rqou> wat
<rqou> also, afaik i don't give a shit about udev the program
<rqou> i just care about libudev
<rqou> which is just an overcomplicated file parser
<jn__> i think i can only contribute more confusion, at this point, so i'll shut up
<rqou> hmm i just found a document that claims reading uevent requires kernels >= 2.6.24
<rqou> so rhel 5 doesn't work
<rqou> although iirc rhel 5 isn't supported for other reasons as well and azonenberg said he didn't care
<awygle> if you're on a 2.6 kernel you deserve what you get imo
<rqou> hey, rhel 5 is supposedly still in extended support
<rqou> unlike e.g. winxp :P
<pie_> internals stuff http://www.joshbarczak.com/blog/?p=1028 (gpu driver stuff)
<pie_> have a good read
* pie_ still trying to get himself to go to bed instead of reading RE stuff
<awygle> does anybody know where to get these FPGA benchmark designs i keep seeing in all the papers?
<awygle> "MCNC benchmarks"?
sn00n_ has joined ##openfpga
laintoo_ has joined ##openfpga
ovf has quit [Disconnected by services]
ovf has joined ##openfpga
brizzo_ has joined ##openfpga
brizzo has quit [Disconnected by services]
laintoo has quit [*.net *.split]
sn00n has quit [*.net *.split]
brizzo_ is now known as brizzo
digshadow has quit [Quit: Leaving.]
scrts has quit [Ping timeout: 248 seconds]
<awygle> pie_: that was fascinating, thanks for sharing
scrts has joined ##openfpga
digshadow has joined ##openfpga
digshadow has quit [Ping timeout: 246 seconds]
<rqou> why does everything in Homebrew have to have a stupid name?
<jn__> beer beer beer^W^W^W
<qu1j0t3> haha rqou
<rqou> could brogrammers please take fewer bong hits while coding kthx
<awygle> rqou is real salty today. build systems will do that to you.
<qu1j0t3> i've been in that place a few times
<qu1j0t3> and yeah at these times cuteness in tools is not very welcome
<rqou> ugh, one of the ftp.gnu.org machines seems to be down
<rqou> hmm, only down from my home network?
<rqou> hmm, or not??
<rqou> can someone ping 2001:4830:134:3::b for me please?
<jn__> doesn't reply
<rqou> hmm, so not just me
<rqou> thanks FSF
digshadow has joined ##openfpga
<awygle> the arachne-pnr code is very idiosyncratic and essentially devoid of comments
<rqou> oh i haven't looked inside
<rqou> it's pretty portable and i haven't had too many problems compiling it
<azonenberg> awygle: have you looked at the gp4par/xbpar code?
<azonenberg> it needs some refactoring, but i think it should be fairly easy to follow
<rqou> oh wtf abc thinks macos is LIN64
<rqou> i guess?
<rqou> sure, why not :P
<rqou> azonenberg plz review udev PR plz review udev PR
<rqou> :P :P
<rqou> but seriously, i'm trying to make https://rqou.com/jenkins/job/open-fpga-tools/ all green again
<rqou> right now it's blocked on "how the f*ck do i get libudev?"
<rqou> i'm currently making the icestorm flow have fewer problems and bustage
<rqou> e.g. by not using sed :P
<awygle> azonenberg: i haven't spent a ton of time in there but it seems much more sane than arachne
<awygle> based on existence of comments, superior use of classes, less-terrible brace style :P
<azonenberg> lol
<rqou> woot successfully tricked abc into building with the args i want
<awygle> xbpar use java braces, arachne uses like... Evil Java Braces
<awygle> err not java, allman
<awygle> it gives up two levels of indentation every time it opens a block
<azonenberg> lol
<azonenberg> I use visual studio / ansi style bracing
<rqou> now look at xc2bit :P
<rqou> (the code style is different)
<awygle> i always put the brace on the same line as the thing. i like being able to fit more stuff vertically
<azonenberg> awygle: its weird, i do that with begin/end in HDL
<awygle> rqou: you could say that :P
<azonenberg> But not in curly brace languages
<awygle> azonenberg: huh, interesting
<awygle> wonder what that says about you as a person
<azonenberg> Just the way i learned them, lol
<azonenberg> i used asic-world tutorials for verilog and a visual studio '98 book for C++
<awygle> ugh would it be too much to ask that *something* be passed between functions in the arachne placer without being a class variable?
<awygle> way too many no-argument member functions
<rqou> hey azonenberg can i bother you with a request?
<rqou> can you package a blinky for ice40 and for gp4 into a nice zip
<rqou> with a build.sh or something
<azonenberg> Not ice40, i have no experience w/ icestorm
<azonenberg> as far as gp4, file a ticket or something
<azonenberg> i'm busy w/ something else now
<rqou> what are you working on?
<azonenberg> Among other things, cleaning up and putting away SAR gear
<azonenberg> have to go through all of my supplies, inventory them, etc
<rqou> huh, i didn't realize how long that took
<rqou> i guess this is a "real" mission? :P
<azonenberg> well i came home yesterday afternoon, wife wanted me to cook stuff
<rqou> not just "went for a hike"
<azonenberg> then i had work today and we went for a walk in the park
<azonenberg> So i didnt have a ton of time to actually do it
<azonenberg> And yeah it was a weekend of training that got cut short when the sheriff wanted help with a follow-up to an evidence search we did a while back
<rqou> gotta keep that spreadsheet of doom updated :P
<awygle> rqou: https://github.com/nesl/ice40_examples may help you with a blinky (it actually contains an example named blinky)
<azonenberg> its not just that, i have to go through and make sure i have batteries in everything charged
<azonenberg> replace the chemlights i used
<rqou> wait not like "normal people" with their emergency flashlights with dead batteries? :P
<azonenberg> inspect the first aid kit... I had a tincture-of-benzoin swab burst and contaminate the steri-strips i carried in the same packet, now i have to replace them both (and get a more crush-resistant benzoin container)
<azonenberg> Lol
<azonenberg> I have a headlamp that takes either an 18650 or two CR123s that is USB rechargeable when loaded with an 18650
<rqou> ohh nice
<azonenberg> then the handheld light i normally keep on my belt, same deal
<azonenberg> Then i carry i think three pairs of CR123s in my pack
<rqou> hmm why does stuff seem to build faster now? must be warming up all the caches or something
<azonenberg> Plus two 6" green chemlights, one 6" red
<rqou> double-caching is always fun
<azonenberg> and a lot of the little 1.5" mini ones in red/yellow/green
<rqou> (macos vm on linux host, because cross-compiling for mac is apparently painful)
<azonenberg> But yeah, i take mission readiness seriously
<azonenberg> Oh, and I also ran out of vacuum packed single-serving bags of Combos and M&Ms
<azonenberg> so i have to open a big party bag and have a fun filled hour or so with the foodsaver :p
<rqou> btw did you see that apparently whitequark also obtained a vacuum sealer?
<azonenberg> Yeah lol i did
<azonenberg> And Combos are actually a lot better than pretzels
<awygle> azonenberg: in the zombie apocalypse i'm heading to your place
<rqou> yes, sounds like a good idea
<azonenberg> They're round, no sharp edges to puncture the wraper
<azonenberg> and break vacuum
<awygle> (seriously though the SAR stuff is an amazing thing, good on you for doing it)
<rqou> azonenberg also has enough firearms to fend of zombies
<azonenberg> And the cheese filling holds them together even if they crack a bit
<rqou> and he's on a defensible island
<azonenberg> rqou: i have a rifle and pistol each for me and the wife, hardly enough for a serious apocalypse :p
<awygle> yeah the ferry ride is definitely where i would end up dead
<rqou> wait awygle are you in the bay or in the seattle area?
<awygle> seattle
<azonenberg> yeah we need to meet up some time
<azonenberg> rqou: oh, and sunscreen had to get restocked too
<azonenberg> I carry a few single-use packets in my first aid kit
<rqou> is that really necessary?
<awygle> oo yeah i bet that got used this weekend
<awygle> gorgeous
<rqou> i usually just have a big bottle of spf50
<azonenberg> Gave almost all of them out to trainees who forgot theirs, plus used the last on myself
<azonenberg> Bottles are big and heavy, plus they can leak easily
<rqou> oh yeah i've definitely had that problem
<azonenberg> foil packets inside a ziploc? not going anywhere
<rqou> hack: put bottle in ziploc
<rqou> doesn't fix the heavy part though
<azonenberg> I do that with my bug spray, havent picked up single use wipes for that yet (but some other folks carry those)
<rqou> arrgh abc plz compile faster
<azonenberg> But i plan to
<rqou> someone please write a "def" that's a rewrite of "abc" except understandable by not-grad-students
<rqou> :P
<azonenberg> rqou: and for a search on a nice day i'll usually bring a bottle and leave it in the car
<azonenberg> use it on myself at base camp
<azonenberg> then i'd use the packets on somebody else if i had to
<azonenberg> but i forgot to bring the bottle to training...
<rqou> waiit
<rqou> abc is C code
<rqou> not C++
<awygle> rqou: It's Both! (TM)
<rqou> er, it's actually least-common-denominator(C, C++)
<rqou> why?!
<awygle> because it hates you :D
<rqou> > someone please write a "def" that's a rewrite of "abc" except understandable by not-grad-students
<awygle> personal favorite line from abc's README: "Unfortunately there is no comprehensive test suite. Good luck!"
<rqou> and alanmi doesn't even have office hours
<rqou> he's a researcher, not a professor
<rqou> anyways, so glad i cut down the autobuild time by like 2 hours
<rqou> by not building yosys under qemu
<awygle> is there a way to prove equivalency of two ice40 bitstreams, does anyone know?
<rqou> it's theoretically possible to do
<awygle> like "these will produce the same functional circuit"?
<awygle> i have zero idea how hard that is
<azonenberg> You can do equivalency checking with a sat solver if you had a bitstream-to-netlist converter
<azonenberg> idk if icestorm has one
<awygle> "For example icebox_vlog converts our ASCII file dump of a bitstream into a Verilog file that implements an equivalent circuit."
<awygle> that sounds like i might be able to make that happen...
<rqou> whee, time to do the reboot dance to see if my new binaries work
<awygle> azonenberg: is there like... a thing i can just feed a couple verilog files to and get out a "y/n" equivalency check? some yosys-smtbmc command maybe?
m_w has quit [Quit: leaving]
<rqou> lol, tools work better when you give them the .pcf file :P
eduardo_ has quit [Ping timeout: 260 seconds]
<awygle> they also work better when they *produce output*, which this branch no longer does... whelp that's enough for tonight i think.
<awygle> goodnight all
<rqou> well, raspi build works
<rqou> amazingly fast too
<rqou> <10 seconds
eduardo_ has joined ##openfpga
amclain has quit [Quit: Leaving]
scrts has quit [Ping timeout: 260 seconds]
scrts has joined ##openfpga
scrts has quit [Ping timeout: 240 seconds]
scrts has joined ##openfpga
sn00n_ is now known as sn00n
Hootch has joined ##openfpga
Jarth_ has joined ##openfpga
Jarth_ has quit [Ping timeout: 276 seconds]
pie_ has quit [Read error: Connection reset by peer]
pie__ has joined ##openfpga
Jarth has joined ##openfpga
scrts has quit [Ping timeout: 240 seconds]
scrts has joined ##openfpga
scrts has quit [Ping timeout: 255 seconds]
scrts has joined ##openfpga
scrts has quit [Ping timeout: 255 seconds]
scrts has joined ##openfpga
scrts has quit [Ping timeout: 255 seconds]
scrts has joined ##openfpga
Jarth has quit [Ping timeout: 260 seconds]
HandyAndy has quit [Quit: Leaving]
Jarth has joined ##openfpga
specing has joined ##openfpga
scrts has quit [Ping timeout: 268 seconds]
scrts has joined ##openfpga
Jarth has quit [Quit: Leaving]
Jarth has joined ##openfpga
Jarth has quit [Quit: Leaving]
<felix_> fyi: in the 34c3 there will be assemblies for different topics; we probably should say that we want to have a fpga assembly. they're also looking for ideas how to make the venue look nice; the venue this year isn;t the congress center in hamburg, but the exhibition hall in leipzig
scrts has quit [Ping timeout: 240 seconds]
scrts has joined ##openfpga
nicdev` has joined ##openfpga
nicdev has quit [Remote host closed the connection]
<openfpga-github> [yosys] azonenberg pushed 4 new commits to master: https://git.io/vQxrD
<openfpga-github> yosys/master 85d667c Robert Ou: makefile: Add the option to use libtermcap
<openfpga-github> yosys/master f074169 Robert Ou: Fix build warnings for win64...
<openfpga-github> yosys/master c00d8a5 Clifford Wolf: Add $alu to list of supported cells for "stat -width"
<pie__> best waifu
scrts has quit [Ping timeout: 255 seconds]
<azonenberg> whitequark: has a great anime pcb pic
<azonenberg> that they found somewhere on pixiv, i lost the link sadly
<azonenberg> it's a bunch of anime schoolgirls with like hand trucks and cranes and stuff
<azonenberg> loading components onto a pasted PCB
scrts has joined ##openfpga
nicdev` has quit [Remote host closed the connection]
nicdev` has joined ##openfpga
pie__ has quit [Read error: Connection reset by peer]
pie_ has joined ##openfpga
<whitequark> think i lost it too
azonenberg_work has quit [Ping timeout: 255 seconds]
scrts has quit [Ping timeout: 258 seconds]
scrts has joined ##openfpga
amclain has joined ##openfpga
digshadow has quit [Ping timeout: 248 seconds]
digshadow has joined ##openfpga
digshadow has quit [Client Quit]
digshadow has joined ##openfpga
digshadow has quit [Ping timeout: 240 seconds]
<lain> in_an_alternate_world_where_smd_components_are
<lain> er
scrts has quit [Ping timeout: 246 seconds]
<lain> I forget the artist name but they're easy to find with reverse image search, they have a few other similar images. one with the girls waving a flag to indicate a bad capacitor (from there top of the capacitor), and another where they're on break, hanging out on an 8-pin DIP
azonenberg_work has joined ##openfpga
scrts has joined ##openfpga
scrts has quit [Ping timeout: 260 seconds]
m_w has joined ##openfpga
scrts has joined ##openfpga
scrts has quit [Ping timeout: 260 seconds]
digshadow has joined ##openfpga
scrts has joined ##openfpga
deep-book-gk_ has joined ##openfpga
deep-book-gk_ has left ##openfpga [##openfpga]
<rqou> oh btw i just remembered something
<rqou> azonenberg: mithro has been working on a "actually works DRC" as well
scrts has quit [Ping timeout: 276 seconds]
scrts has joined ##openfpga
<pie_> lain, :D :3
<lain> :3
* pie_ attempts lookup on iqdb
<lain> oh right I'm on my laptop now, not my phone
<lain> I'll find it, one sec
<pie_> well aparently artist is "syego"
<lain> yeah that's the one
<lain> https://www.pixiv.net/member_illust.php?id=7282341 this is the artist's page on pixiv
<lain> but I forget if you need a login to view that
<pie_> i tink you primarily need login for nswf, otherwise idk
<pie_> nope looks like you need a login for anything thats not thumbnails :/
<pie_> oh wait no thats just an image made of smaller images
* pie_ facepalms
<lain> haha
<rqou> is there an up-to-date "which moonrunes do i click to make a pixiv account" guide? :P
<lain> some of the artist's works are mildly nsfw
<lain> rqou: go to pixiv.net and the bottom left has a language picker :P
<rqou> wait it does now?
<lain> choose english / ??? / profit
* rqou is an oldfag :P
<lain> :P
<pie_> lain, this some serious hardcore porn for the victorian ages
<lain> hahaha
<pie_> kawaiitronics
<lain> maximum kawaii
<lain> :O
<lain> why wasn't that one on their pixiv!
<lain> or did I just miss it
<pie_> > dont skip lead day
<lain> lool
Hootch has quit [Ping timeout: 258 seconds]
pie_ has quit [Read error: Connection reset by peer]
pie__ has joined ##openfpga
<rqou> wtf
<rqou> wctomb has hidden persistent state
<rqou> that's not necessarily thread-safe
<rqou> "It updates the shift state, which is stored in a static anonymous variable known only to the wctomb() function"
<rqou> what i'm learning is that correctly implementing text file parsing on a "modern" system is pretty much impossible to do correctly
<rqou> (unless you use musl, which deliberately does not have these footguns)
<pie__> huh...
* jn__ recommends reading skarnet.org and cr.yp.to for inspiration
digshadow has quit [Remote host closed the connection]
pie__ has quit [Ping timeout: 240 seconds]
digshadow has joined ##openfpga
pie_ has joined ##openfpga
<azonenberg_work> sooo i decapped the blown coolrunner
<azonenberg_work> nothing visible at top layer :(
<rqou> er, this is the one you blew on purpose, right?
<rqou> not the ones i sent you?
<azonenberg_work> yes
<azonenberg_work> I didnt do those yet
<azonenberg_work> wanted to get high res package shots first
<rqou> anyways, i've recently been distracted by someone explaining to me why kicad _needs to_ block the UI thread to parse a file
<rqou> parsing data in standard, portable C is f*cking impossible
<azonenberg_work> ??
<rqou> the scanf family of functions is affected by locale
<rqou> which is a global, process-wide setting
<rqou> not per-thread
<rqou> meanwhile, wxwidgets also sets the process locale to format numbers for the UI
<rqou> (presumably, some other UI toolkits do too)
<rqou> the locale-insensitive or per-thread locale extensions all don't work reliably cross-platform
<rqou> mostly because windoze is a fail
<azonenberg_work> How about not using scanf? its c++, you can use std::string functions etc
<azonenberg_work> or just call atoi() etc by hand and manually parse the other stuff
<azonenberg_work> is atoi locale dependent too?
<rqou> i believe it is
<azonenberg_work> Doesnt really matter though
<azonenberg_work> its such a trivial function to reimplement
<rqou> sscanf isn't
<azonenberg_work> True :p
<rqou> and atof isn't either :P
<awygle> atoi returns 0 on invalid input
<azonenberg_work> But from what i know of kicad's file formatting
<awygle> and doesn't have to set errno
<azonenberg_work> it would be easy to parse without all that power
<rqou> kicad's problem is with floats
<azonenberg_work> atof is not that hard to do IMO
<rqou> ok, you try it :P
<azonenberg_work> what? you go a byte at a time
<azonenberg_work> if non-numeric stop
<azonenberg_work> if numeric, temp = temp*10 + current digit if we're left of the decimal point
<azonenberg_work> etc
<azonenberg_work> should be like 20 LoC if you don't need to support scientific notation
<rqou> you do
<rqou> also, that almost certainly has incorrect rounding behavior
<awygle> what is your locale that is interfering with e.g. strtof working correctly?
<azonenberg_work> why? do they not just printf %f?
<oeuf> rqou: yeah
oeuf is now known as egg|egg
<azonenberg_work> Re rounding, nobody cares, kicad's internal units are nanometers
<rqou> kicad also locks the locale to run printf
<azonenberg_work> +/- a nm or two is not a problem
<rqou> well, some of the file formats aren't
<rqou> awygle: "one half" is 0.5 under en_US but 0,5 under fr_FR for instance
<rqou> anyways, musl libc's implementation of "string to float" is 500 lines
<awygle> ah. amerocentrism strikes again
<azonenberg_work> rqou: yeah but that handles all of the weird quirks like scientific notation
<azonenberg_work> Which you dont need
<rqou> are you sure?
<azonenberg_work> kicad floats are all nnnn.nnn
<azonenberg_work> as far as i've ever seen
<rqou> are you really sure? :P
<rqou> also, your proposed trivial algorithm can't handle e.g. "-INF" or "NAN"
<azonenberg_work> Yes, neither of which should ever occur in a kicad file
<rqou> are you sure?
<azonenberg_work> My point is, the full libc parsing capabilities are not required in this case
<rqou> this _is_ kicad we're talking about :P
<azonenberg_work> Lol :p
<egg|egg> rqou: you mean "given that this is an IEEE 754, you've got to ask yourself one question: do you feel lucky?"
<rqou> ok azonenberg_work, what about "-0"
<rqou> you lose again :P
<azonenberg_work> rqou: Slently convert to 0
<azonenberg_work> nobody cares
<azonenberg_work> The goal is not to 1:1 convert every 32-bit ieee754 bit sequence to ascii and back
<azonenberg_work> the goal is to serialize coordinates of objects
<rqou> what happens when you deserialize?
<azonenberg_work> You get back another ieee754 float which is within some tolerance of the original
<rqou> i don't want my cad files to shift several nm every time i resave it
<azonenberg_work> The rounding would be deterministic though
<awygle> is this C or C++? istringstream imbued with your preferred locale?
<rqou> borked on mingw
<azonenberg_work> e.g. 1.2341 and 1.2342 might round to 1.2340
<azonenberg_work> but 1.2340 would round to 1.2340 consistently
<azonenberg_work> So rounding won't compound
<rqou> but are you sure your proposed algorithm doesn't compound rounding issues?
<rqou> what if my number is bigger than 2^24, does your algorithm round consistently?
<egg|egg> lain: quite :D
<rqou> welcome to floating point
<egg|egg> \o/
<lain> welcome to the NHK
<awygle> rqou: seriously? mingw broke locales for stringstream? ugh
<rqou> mingw broke f*cking everything
<rqou> waiting for midipix to get themselves more working
<lain> win10 has a variety of linux userlands now, just run in that and screw mingw
<lain> :P
<rqou> locales are actually bonus fun on windows because every c runtime (yes, there can easily be multiple in the same process) has a separate idea of what the global process locale is
<lain> (and yes you can pipe between win and linux apps now, and there's various interop stuff)
<awygle> "portable" is a huge pain
<lain> awygle: indeeeeed
<rqou> anyways, i believe i now understand how to rip out musl's implementation of printf/scanf
<awygle> to build yosys under cygwin you have to remove -fPIC from CXXFLAGS
<rqou> meh, cygwin is an even bigger pile of broken
<rqou> i build yosys under mingw for my nightly binaries; seems to work ok
<awygle> vastly prefer cygwin to mingw, but that's because i am very unix-focused generally
<rqou> awygle: lazy way to get yosys: https://rqou.com/jenkins/job/open-fpga-tools/
<rqou> if you trust binaries compiled by "some dude on the internet"
<awygle> rqou: of course i trust you :P i like to have the source around. this was for hacking on arachne-pnr so i wanted to be able to *see* what i was breaking, just in case
<rqou> btw these binaries are actually signed with gpg
<rqou> not that that tells you all that much
<rqou> it's more for anti-tampering than authentication
<balrog> rqou: reproducible builds would be the right thing to do :P
<rqou> sure, wait for me to update my build instructions, and then file a PR
<balrog> haha
<balrog> rqou: just wondering btw... regarding VHDL+Yosys, what's wrong with the ghdl route?
<rqou> ghdl seemed to be pretty hard to understand
<rqou> and doesn't support the crazy insane generic package features
<rqou> and didn't seem to have an easy way to add support for that
<awygle> gotta read ada
<balrog> supposedly generic packages are supported (but not generic subprograms)
<rqou> hmm, maybe it was that
<balrog> awygle: I mean with being able to read VHDL I guess you're halfway there?
<rqou> i'm surprised generic packages are supported though
<lain> the ghdl author is working on a yosys thinger
<lain> it sorta works
<balrog> lain: yeah but slowly :P
<lain> yes
<lain> also yeah ghdl is incomprehensible
<balrog> rqou: that's what I was kinda referring to -- https://github.com/tgingold/ghdlsynth-beta
<rqou> probably works more than mine
<lain> I use it, I prefer it to other vhdl simulators, but I don't understand it
<rqou> yeah iirc the ghdl parser was a giant several-kloc file
<lain> yeah and it's ada, and there's like no comments
<lain> and the variable names are non-obvious
<rqou> (although my parser is also a giant several-kloc file, but it's bison)
<lain> (at least to me)
<rqou> with basically no advanced features used, so converting it to another tool should be possible
<awygle> how's the quality of the yosys codebase?
<rqou> although unfortunately my parser currently requires GLR
<rqou> i believe my grammar _should_ be LR(k > 1)
<rqou> but i never tried converting it or anything
<rqou> at some point i should write rust-glr (or does this exist already?)
<lain> lol 8907 lines
<lain> it's not as uncommented as I remembered
<lain> but it's still pretty crazy
<rqou> one thing that's nice about being in berkeley:
<rqou> if you look at the bison generated output for a GLR parser, you'll see
<rqou> /* C GLR parser skeleton written by Paul Hilfinger. */
<rqou> who happens to be an (in)famous professor here :P
<awygle> ha!
<balrog> infamous for?
<rqou> so if i try to write rust-glr and get stuck i can ask him for help :P
<awygle> extremely difficult intro classes
<balrog> hah
<rqou> although i got really lucky(?) and avoided any classes with him
<rqou> unlike one of my housemates who ended up with iirc 3 classes with him
<balrog> for some reason I keep seeing John Ousterhout all over the place :P
<balrog> Tcl/Tk, Magic, and some other EDA related things
<rqou> yeah, but now he ended up at the "other" school :P
<awygle> i liked my one class with hilfinger, but i had a pretty easy semester at the time so it wasn't too bad
<rqou> 61b or compilers?
<rqou> :P
<awygle> 61b
<rqou> ah
<rqou> (intro data structures, for anybody following along)
<egg|egg> balrog: rqou: well, knowing a bit of Ada and having talked about VHDL with rqou, they're really not the same thing (and vhdl does seem like it has a lot of strange things tacked on in a way that doesn't feel very Ada-like)
<balrog> egg|egg: I was being mildly facetious
<balrog> not at all serious there :)
<balrog> also hi
<egg|egg> hi :-)
<rqou> awygle: i took cs61b with jonathan shewchuk, fortunately :P
<awygle> never had a shewchuk class, heard he's good
<rqou> someone got really offended by his "girlfriend" joke my semester
<awygle> still salty 61a is python now :(
<balrog> awygle: what was it then
<rqou> scheme
<awygle> Scheme
<balrog> ahhh :/
<rqou> i took the python version though
<balrog> if you had said "Java" I'd have said that Python is better
<balrog> but scheme -> python... ehhhhh
<rqou> with the lecturer that UCB stole from Google
<rqou> the one that is now something like 2000 students
<awygle> scheme is a fantastic introduction to *computer science* because it's a very regular language that you can learn in 90 minutes. it gets out of your way and lets you focus on concepts. python is a syntatic-whitespace nightmare of a language.
<awygle> </soapbox>
<balrog> awygle: fix your editor :D
<rqou> oh wait no cs61a is "only" around 1000 students
<rqou> our data structures class is java instead
<rqou> java kinda sucks
<balrog> egg|egg: ahh, the core developer of ghdl is also a team member for GNAT
<awygle> yeah that was a sad. but it was probably good to get some kind of exposure to java at least
<balrog> not surprising, heh
<egg|egg> balrog: also, GNAT tends to not implement the standard grumble grumble grumble
<balrog> egg|egg: it doesn't have flags to switch on the standard?
<rqou> egg|egg: it has a G in front, what did you expect? :P
<egg|egg> balrog: no I mean, there are bugs too
<egg|egg> rqou: fair
<balrog> egg|egg: everything has bugs
<egg|egg> yes, but significant ones that never get fixed :-p
<rqou> like character encodings? :P
<egg|egg> the other day I was poking at coextensions
<rqou> ugh whoever invented the idea of "setlocale" needs to be taken out and shot
<egg|egg> (that's something in Ada 2005 where you can via a very roundabout way have an object that actually owns allocated memory and destroys it)
<rqou> also i just discovered something the other day
<rqou> hidapi is also evil and sets the process locale when you initialize it
<balrog> rqou: file a PR :)
<rqou> meh, i already deleted it in my fork
<balrog> it claims it only sets it if it's unset
<rqou> right, but (at least on Linux) it starts out unset
<rqou> which behaves like "C"
<rqou> for bonus points, it tries to set it to the system locale
<rqou> which is dumb for multiple reasons
<rqou> * it doesn't fix your parser if that was what you were trying to do by setting the locale
<rqou> * you're a library, this isn't your job to set the locale
<balrog> fwiw Tristan wants people to write testcases and file issues against ghdlsync-beta
<rqou> oh really? boy will i have lots of bugs for him :P
<rqou> vhdl has tons of stupid corner cases
<rqou> e.g. abusing the hell out of generics
<balrog> rqou: well make sure GHDL can handle it first and file a bug against GHDL first ;)
<rqou> i love (/s) how vhdl's type system is simultaneously extremely powerful and also pretty useless
<rqou> vhdl effectively has type-level integers, but you can't do much with it because there's no type inferencing
<lain> yep
<lain> I use vhdl because verilog is too fast & loose with... everything
<rqou> like character encodings? :P :P
<lain> lol
<lain> that's the least of my worries
<rqou> although verilog does at least forbid ebcdic :P
<rqou> unlike C
<lain> charsets I can deal with
<lain> that's my editor's problem
<lain> I'm more concerned with language footguns
<rqou> what if it's been encrypted with ebcdic? :P
<lain> verilog is purely composed of a carefully-constructed chain of footguns made to resemble an HDL
<rqou> lool
<rqou> tell azonenberg_work that :P
<lain> vhdl is composed of things intended to look powerful but are actually made useless due to implementation details. its only redeeming quality is that it is, in fact, strict. overly strict, but strict nonetheless :P
<rqou> sooomeone here decided to write an ELF parser in verilog :P :P
<lain> yeahhh
<rqou> brb going to grab nomz
<lain> azonenberg, lately at least, uses a more strict subset of verilog to avoid this
<lain> like asm.js for verilog XD
<azonenberg_work> i've done this with all of the languages i work with
<azonenberg_work> same with e.g. C/C++
<awygle> i think i would like vhdl but all of my experience is in verilog *shrug*
<azonenberg_work> I use a strict subset that bans most of the obvious footguns
<awygle> verilog has that kind of built in considering the incredibly spotty support for most language features
<awygle> "we finally mostly support verilog 2001!" "but... it's 2017..."
<lain> yeah
<lain> vhdl2008 is the same way
<lain> basically nothing supports it, or doesn't support it fully
<lain> vivado finally supports it, but ghdl doesn't have fully support
nicdev` is now known as nicdev
<lain> the most annoying lack in ghdl is named things.. I forget the official term, but it's a feature where you can name a signal based on the hierarchy, so say you want to grab a signal called 'x' in the entity that instantiated you, you can do ^.x or something, where ^ means "up one level" (you can chain that so ^.^.x, etc) or you can go down levels, blah blah
<lain> VERY useful for testbenches
<lain> ghdl doesn't support it ;-;
<lain> I think modelsim might, but modelsim doesn't support PSL (unless perhaps if you pay many dollars, I dunno)
<lain> ghdl does support (some of) PSL
<lain> blar :P
<lain> </rant>
<balrog> file bugs for missing features? :)
scrts has quit [Ping timeout: 255 seconds]
scrts has joined ##openfpga
<lain> yeah
<lain> he's been working on it for years
<lain> I'm not holding my breath
<azonenberg_work> lain: so i think i showed you what i did with isim
<azonenberg_work> in verilog
<azonenberg_work> bridging libjtaghal to four simulated signals
<azonenberg_work> using pipes
<azonenberg_work> so i could jtag a simulated TAP
<azonenberg_work> Won't work for PSL, but at least makes up forthe lack of VPI
<lain> yeah
digshadow has quit [Ping timeout: 246 seconds]
scrts has quit [Ping timeout: 260 seconds]
scrts has joined ##openfpga
<pie_> oh thats the pseudovector stuff
<pie_> ^wrong chan
digshadow has joined ##openfpga
digshadow has quit [Ping timeout: 240 seconds]