#avr Logs

Mar 10 2018

#avr Calendar

01:18 AM day__ is now known as day
01:25 AM day__ is now known as day
05:22 AM polprog: behold the best music visualizer ;) https://puu.sh/zEygM/208cc2183d.png
05:41 AM nohitzzz: have you found any pentagrams?
05:41 AM polprog: not yet
05:41 AM polprog: :P
05:41 AM Xark: ...looks like that song in the screenshot visualizes as a yellow building. Hmm...
05:42 AM polprog: got a VHS rip of my uncle playing bass on a concert in his city in 96
05:42 AM polprog: so im sitting and de-noising it
05:43 AM polprog: quite funny cos ardour can play backwards
05:43 AM polprog: german funk backwars sounds like the stuff from nightmares
05:43 AM polprog: forwards its very nice music :D
07:09 AM antto: polprog, how bout this https://i.imgur.com/NJtN3nl.png
07:09 AM polprog: trippy :D
07:09 AM polprog: whats that?
07:10 AM polprog: what program*
07:10 AM antto: https://i.imgur.com/OLwAAlU.png
07:10 AM antto: it's my realtime spectrograph ;P~
07:13 AM antto: but that's the new and unfinished version, the old one is smaller and uses FFT: https://i.imgur.com/sOCLtHI.png
07:14 AM antto: this is from a track by Astral Projection ;P~
07:55 AM polprog: wow
07:55 AM polprog: awesome
09:14 AM Ameisen: Trying to figure out how to implement a templated type-safe printf that's fast while also small
09:14 AM Ameisen: the fastest approach is that it generates function code for all used permutations of arguments. That will be quite large.
09:15 AM Ameisen: Might be able to generate a recursive variant that processes each argument individually. That way, it only needs to generate code for every argument _type_, which'd be smaller
09:33 AM polprog: im not sure if thats a sane approach
09:34 AM polprog: but i once decompiled ArrayList.class (its Javas array on steroids)
09:34 AM polprog: it had like 100 methods defined that did the same thing, just each one had a different number of args
09:34 AM polprog: or maybe it wasnt arraylist but something else
09:35 AM polprog: anyway. that was the standard library....
09:38 AM antto: i wonder if template metaprogramming can be applied to Ameisen's problem
09:41 AM polprog: for variable length arg id put a pointer and length pair. then iterate over
09:41 AM polprog: or just use varargs
09:42 AM antto: why printf?
09:42 AM antto: how about something like "cout <<"
09:43 AM polprog: eww
09:44 AM polprog: uart << "hello" ; maybe
09:45 AM polprog: that could make i2c/spi sane
09:45 AM polprog: i2c1 << start << 0x55; i2c1 >> a; i2c1 << stop;
09:45 AM polprog: hmm
09:46 AM Ameisen: Generally, if it does the same thing, code folding/dce will fix it
09:46 AM Ameisen: Java doesn't do it because javac doesn't perform optimization
09:46 AM Ameisen: it relies on the JIT
09:46 AM polprog: dce?
09:47 AM Ameisen: dead code elimination, there's also duplicate code folding
09:47 AM polprog: ok
09:48 AM antto: this is some old shizzle i have where i made something similar to cout (echo) https://i.imgur.com/D8irZ.png
09:49 AM antto: iirc i used stringstream underneat
09:50 AM polprog: damn imgur
09:50 AM polprog: im getting some crappy 320x200 thumbnail. or it redirects me to the mobile site
09:55 AM polprog: antto: did i show you this? https://youtu.be/S9Ni_4lSKCw
09:56 AM antto: wut's that?
09:56 AM antto: ascii scope?
09:56 AM polprog: my c++ plotter/oscilloscope lib
09:56 AM polprog: yeah. i added persistence
09:56 AM antto: funky
09:57 AM polprog: initially wanted that to become an ansi-art scope
09:57 AM polprog: and the screen would display that
09:57 AM antto: i was messing around with a scope too, but it eats too much cpu
09:57 AM polprog: i could put that on telnet somewhere. or as a looped video on my site
09:57 AM polprog: its a fake scope
09:58 AM polprog: the points are generated by a thread
09:58 AM polprog: i learnt threading in cpp ;) and a lot of cpp
09:58 AM antto: https://i.imgur.com/UPge3L5.png https://i.imgur.com/CDO5uYY.png
09:58 AM polprog: wow
09:59 AM antto: mine is dual channel, it should work similar to an analog(ue) scope
09:59 AM polprog: have you seen cool-retro-term?
09:59 AM polprog: you should now implement a terminal emulator using that as a display
09:59 AM antto: i don't think so
09:59 AM polprog: cos your one looks way better
09:59 AM antto: well this thing has XY mode, so..
09:59 AM antto: the first pic is when i play the famous "youscope.wav" thing
10:00 AM polprog: i immediately noticed :)
10:00 AM polprog: theres also oscillofun demo
10:00 AM antto: it's fully cpu rendered, so it eats the whole cpu alive :/
10:00 AM polprog: lo
10:00 AM polprog: l
10:01 AM antto: well, not the whole, just one core ;P~
10:01 AM polprog: two traces, two cores!
10:01 AM antto: nope
10:01 AM polprog: why not
10:01 AM polprog: joking. i know
10:01 AM antto: cuz i didn't
10:02 AM antto: it's made with wdl/IPlug, so it's standalone/vst
10:02 AM polprog: nice
10:04 AM antto: https://i.imgur.com/IGTim7y.png
10:58 AM polprog: awsomness
10:58 AM polprog: antto: ^
10:59 AM polprog: just exported the denoised track
10:59 AM polprog: ill listen to it and send it to my uncle
12:11 PM rue_shop3: hmm I need to work on my digital scope sometime
12:12 PM rue_shop3: my motivation took a hit when I got the logic analyzer and realized that almost everything I want to have a logging scope for it digital
12:13 PM rue_shop3: it? is? hows that a miss?
12:16 PM Tom_L: Saleae does a fine job of that too.
12:16 PM rue_shop3: they insisted on going 64 bit for some reason tho
12:16 PM rue_shop3: so I have to use a really old version of the software
12:17 PM Tom_L: they have all them online
01:47 PM polprog: I needed a digital scope to show how a cap charges on the science day at school
01:59 PM learath: ?
02:00 PM learath: not just https://www.youtube.com/watch?v=rPqP4qyrSiQ ?
02:14 PM polprog: i should play the piano more
02:15 PM polprog: i havent played for a good 5 years :(
02:30 PM nabil: Hi
02:30 PM nabil: anyone has this book in pdf
02:30 PM nabil: electronic instrumentation by hs kalsi 3rd edition
02:30 PM nabil: ?
02:37 PM nabil_: Hi
02:37 PM nabil_: <nabil> anyone has this book in pdf electronic instrumentation by hs kalsi 3rd edition?
03:23 PM Ameisen: weird
03:24 PM Ameisen: added __attribute__((interrupt)) to usb_isr, and the flash size of the entire thing dropped 3KiB
04:28 PM polprog: Ameisen: what cpu? id love to see the difference in generated assembly
04:29 PM Ameisen: Cortex M4
04:32 PM polprog: what micro? stm32?
04:33 PM polprog: duh wait that is m3
04:33 PM polprog: brainfart :D
04:33 PM Ameisen: nxp
04:33 PM Ameisen: though GCC doesn't optimize at that level
04:36 PM polprog: i wonder if bluepill can run linux. some discovery boards do according to elinux wiki
04:41 PM Emil: No
04:41 PM Emil: Well
04:41 PM Emil: Yes
04:41 PM Emil: but no
04:42 PM Emil: polprog: you need a mmu to run mainline lenux
04:42 PM Emil: polprog: mpu can work with a fuckton of patches
04:42 PM Emil: and without either you basically need emulation :D
04:47 PM polprog: if they managed to port linux to a GameBoy Advance...
04:47 PM polprog: ok. so it runs. but its not sonething id like to do
04:47 PM polprog: kinda like writing x86 bootloaders
04:47 PM polprog: just fucking dont. or stop when you write one that prints a char to the screen and jumps to an infinite loop
04:47 PM polprog: Emil: how 2 install kali on arduino?
04:48 PM Emil: polprog: that's spot on :D
04:48 PM Emil: "hay guise hao do I instlal kali lenux on my arduino!? pls help"
04:50 PM polprog: hey kids wanna see some protected mode code? cmon, first one's free
04:52 PM Emil: "hey kid you want to try this new distro flavour? I've got all the cool new kernels right here also. First sample's free."
04:52 PM polprog: lol
04:53 PM Emil: "https://i.imgflip.com/264zq1.jpg
04:57 PM polprog: Slitaz
04:57 PM polprog: if you ever need a distro that runs on 24 mb of ram and no HDD
04:57 PM polprog: tbh if you found an x86 emulator for some micro, it would probably run there
04:57 PM rue_: new computers are just gonna have 8000 arm cores anyhow
04:57 PM rue_: x86 is going away
04:58 PM polprog: it is indeed
04:58 PM polprog: CISC is going away
04:58 PM Xark: rue_: RISC-V FTW! :D
04:59 PM rue_: there will only be one arm core running the machines, the other 8000 will be emulated on the video chip
05:00 PM Xark: rue_: Instead of ARM, it may be be RISC-V.
05:00 PM rue_: ok I have to go ditch a truckload of scrap metal
05:00 PM rue_: as soon as i get it loaded into the truck
05:01 PM Xark: rue_: Hitting the bare-metal. Have fun!
05:01 PM polprog: also hi rue_
05:01 PM rue_: the can on the deck is full, the bucket in the shop is full, and the crate is full
05:01 PM rue_: thats all I got
05:03 PM polprog: would love to get a riscv microcontroller/pc to play with
05:04 PM Ameisen: hmm
05:04 PM polprog: oh theres qemu
05:04 PM rue_: and all serial io
05:04 PM polprog: hmm
05:04 PM Ameisen: binary flash is 44848B, before I really start working on anything
05:04 PM Ameisen: ARM stuff is big
05:04 PM rue_: huh
05:04 PM rue_: the 4 pin dupont interconnector just got more popular than the 80mm fam grill
05:04 PM Ameisen: mostly stuff in libm and libg
05:05 PM rue_: https://www.thingiverse.com/thing:2798730
05:05 PM rue_: why do people really like this?
05:05 PM rue_: why was the fan grill so popular?
05:05 PM rue_: WTF IS IT WITH PEOPLE?
05:06 PM rue_: anyhow
05:06 PM Xark: polprog: And if you want real HW, there is https://www.sifive.com/products/hifive1/ or LoFive https://groupgets.com/manufacturers/qwerty-embedded-design/products/lofive-risc-v
05:06 PM polprog: hardware is nice to have
05:07 PM Xark: polprog: Indeed. You can also run 64-bit RISC-V Linux in a browser https://riscv.org/software-tools/riscv-angel/
05:07 PM polprog: haha
05:08 PM Xark: polprog: It works amazingly well (but only 15.5MIPS on my machine)
05:08 PM polprog: im running it on firefox in android
05:08 PM polprog: i never saw linux printk() with a speed of a 1200 baud link
05:08 PM polprog: i can literally see the characters appearing one after anither
05:09 PM Ameisen: Xark - my MIPS emulator can run in a browser
05:09 PM Ameisen: doesn't run particularly WELL, but it runs
05:09 PM Xark: Yeah. Well, this is one of those "the elephant can fly" things. It is no so much how fast or high it flies. :)\
05:09 PM polprog: very nice; reminds me of how i compiled linux under qemu
05:09 PM Ameisen: way faster than 16MIPS though
05:09 PM Xark: not*
05:10 PM Ameisen: However, I only implemented the bare necessities in MIPS, so it can't run Linux
05:11 PM Xark: Ameisen: This is also 64-bit.
05:11 PM Ameisen: I could make my MIPS emulator 64-bit. Don't care too since I don't need it
05:11 PM Ameisen: MIPS64r6 isn't that different from MIPS32r6
05:12 PM Xark: Ameisen: RISC-V is a close cousin to MIPS. Mostly just smaller immediate values, no delay slot and a few other tweaks.
05:12 PM Ameisen: It shouldn't be particularly slower than 32-bit so long as 64-bit registers exist, which they do.
05:12 PM polprog: mips looks cool as well
05:12 PM Ameisen: Presuming you're running your browser as a 64-bit app
05:12 PM polprog: if only i could find some hardware running linux on mips
05:12 PM Xark: Ameisen: I could see it being an issue for fast Javascript emu.
05:12 PM polprog: i could program for it c and asm
05:13 PM Ameisen: the jsvm in your browser should be optimizing your the target
05:13 PM Ameisen: polprog - I mean
05:13 PM Ameisen: you can write software for my MIPS emulator
05:13 PM Ameisen: certainly doesn't have linux though
05:13 PM Xark: polprog: You can get dirt cheap PIC32 board and run http://retrobsd.org/wiki/doku.php
05:13 PM Ameisen: it basically has an MPU
05:13 PM polprog: Ameisen: i know. but hardware is hardware
05:13 PM Ameisen: my emulator runs faster than any actual MIPS hardware.
05:14 PM Ameisen: :D
05:14 PM polprog: lol
05:14 PM Ameisen: for integer ops, at least
05:14 PM Ameisen: floating point... should still be faster
05:14 PM polprog: Xark: wow i thought pic is its own ISA
05:15 PM Xark: polprog: Well, PIC32 is basically MIPS32 (licensed by Microchip).
05:15 PM Ameisen: My MIPS emulator can run freestanding but was designed to be embedded in other applications
05:15 PM Ameisen: though it has a built in gdb server
05:15 PM Ameisen: so you can debug
05:15 PM Xark: polprog: There are a bunch of PIC architectures (the small ones are generally crap).
05:16 PM polprog: Ameisen: link me the emulator. ill take a look at qemu as well
05:16 PM Ameisen: https://github.com/ameisen/vemips
05:16 PM polprog: tomorrow
05:16 PM polprog: :P
05:16 PM Ameisen: you'll have to port it to Linux, though
05:16 PM Ameisen: might be a bit of fun.
05:17 PM Ameisen: Win64 ABI and SysV ABI are different for 64-bit, so the JIT's machine code generation needs to be altered a bit
05:17 PM polprog: no idea about this
05:17 PM Ameisen: probably runs fine in WINE though
05:17 PM polprog: i guess ill run it under wine eventually
05:18 PM Ameisen: goal is to embed it into a game where you can program ships and stuff to fight
05:18 PM polprog: woo
05:18 PM Ameisen: though in the end I may switch to riscv after a prototype
05:18 PM polprog: so i know what i will be doing tomorrow
05:18 PM polprog: which, as usual, is not what i should
05:19 PM polprog: thanks a lot and good night :P
05:19 PM Ameisen: I have it embedded as a library already
05:19 PM Ameisen: need to flesh out the interrupt system a little to make it better suited for callbacks to the host application
05:19 PM Ameisen: it can do it now, it's just a little clunky
05:20 PM Ameisen: each VM is self contained, so you can parallelize execution easily
07:26 PM _ami_: nuxil: Emil: its here... Rigol scope: https://pbs.twimg.com/media/DXw8qvHU8AMaDSV.jpg :)
11:23 PM day__ is now known as day