2024-06-22 03:58:26 Anybody ever tried a PineTab2 Linux tablet? 2024-06-22 03:59:30 Seems kind of interesting, but apparently they ship it as an "enthusiast" gadget - no guarantee that all of the drivers and so on are fully functional yet. 2024-06-22 03:59:43 Inexpensive, though. 2024-06-22 04:00:23 It runs an ARM based Arch distro. 2024-06-22 09:55:08 KipIngram: I think if I considered one of those I'd check out reviews 2024-06-22 10:15:52 What do you call the word that prints ? when it can't be found or is generally bad input 2024-06-22 10:16:21 I've called it HUH or WHAT previosuly 2024-06-22 10:22:46 Or CONFUSED 2024-06-22 13:37:32 ?no-such-word 2024-06-22 13:58:08 https://www.neilhenning.dev/posts/yourownconstantfolder/ this is why i'm interested in forth. i'm so sick of this shit with c compilers, doing absurd rain dances with compiler extentions and hoping their overcomplicated optimizers will produce the assembly you wanted. 2024-06-22 16:26:30 C compilers can be really clever. On the other hand, C compilers can be really "clever" :P 2024-06-22 16:44:08 "C compilers", just say it like it is: LLVM 2024-06-22 16:44:54 I've come to rely on GCC for being less agressive and a bit dumber, although apparently that's going out the window now 2024-06-22 16:45:16 Why do projects/standards etc always get taken over by people who wished they were using the other product? 2024-06-22 16:45:54 Is there a usable OS written in Rust yet? 2024-06-22 16:46:12 The whole OS, apart from some small bits of assembly glue, so not Linux. 2024-06-22 16:49:23 I'm always curious about this criticism of C compilers. When have you cared about what assembly it outputs? Was there a time something went wrong that was actually the compilers fault as opposed to not recognizing UB or something? 2024-06-22 16:49:59 Getting C compilers to vectorize consistently can be difficult 2024-06-22 16:50:30 That's a good point 2024-06-22 16:50:47 MrMobius: With mainstream compilers I've only seen it screw up some esoteric new C++, and some inline assembly parameters 2024-06-22 16:50:56 It does seem like a minority case though. I always assumed people were complaining about something else. 2024-06-22 16:53:06 And the assembly being sane is useful when debugging, but to be fair I don't really mind if it's a bit obfuscated but faster 2024-06-22 16:53:35 I've run into issues with writing firmware for x86 where the compiler now vectorises by default, and it was generating exceptions because vector instructions weren't enabled in that environment 2024-06-22 16:53:52 And you could say "well firmware writers should know this", but apparently they don't lol 2024-06-22 16:54:47 I do look at my assembly output a LOT, for debugging, and also analysing functions I've written for performance to see what approach the compiler took and if there's any obvious way to nudge it to be better 2024-06-22 16:55:40 Weirdly one of the most common optimisations I've made in response to this analysis is making aggregates static const. Dirt simple change that seems to hugely improve code, even when it seems like it shouldn't matter. 2024-06-22 16:56:48 Like in cases where you'd expect these advanced compilers to detect it's essentially no different whether it's static const or not, but aggregates still just trip them over somehow. 2024-06-22 16:57:03 Maybe it's because the optimisation work focuses on certain fields, like scientific computing 2024-06-22 16:57:14 There's no "one size fits all" 2024-06-22 16:58:45 MrMobius: the link is actually about trying to get it to fold sqrt constants. i actually love c, but the deficiencies i find with it (which admittedly have not held me back much) are mostly that you have to resort to tricky methods to do things like embedding binary blobs in your code (linker gimmicks), or compile-time computations (which forth can do naturally), and fixed point arithmetic feels very 2024-06-22 16:58:52 awkward because the * and / operators aren't multi precision, and again you can't drop to assembly without nonstandard extensions (which i fully acknowledge my answer to that is ironically to use a nonstandard language entirely) 2024-06-22 16:59:24 I also love C and agree those are the big shortcomings 2024-06-22 17:00:25 That and the new standard is just C fetishising and voted on by people who don't understand or appreciate C, and care more about language lawyering than improving the language 2024-06-22 17:00:51 oh yes, c stopped at c99 imo 2024-06-22 17:01:05 Forth is a fun hobby for me, I'll definitely voice if it becomes more than that! 2024-06-22 17:01:31 and i only say c99 because i really like named initializer lists 2024-06-22 17:02:18 C23 does have #embed for "Binary resource inclusion" https://en.cppreference.com/w/c/preprocessor/embed 2024-06-22 17:02:32 zelgomer: And compound literals? 2024-06-22 17:03:00 But yes named/indexed initialisers FTW 2024-06-22 17:03:55 zelgomer: interesting points. I just use 5-10 lines of Python to convert a binary blog into a char array as needed. for assembly, I just create a separate assembly file and follow the calling convention then link that in so there's nothing inline 2024-06-22 17:04:20 I guess mixing C and assembly in the same function is tough 2024-06-22 17:04:24 compound literals are ok i guess, but honestly i quit using them because vim's syntax didn't like it, and i don't really miss them 2024-06-22 17:04:38 I use linker scripts to include binaries 2024-06-22 17:05:09 but now your build depends on either a python interpreter or a specific linker 2024-06-22 17:05:22 I also ran into that, I've turned off C's bracket error highlighting as a workaround 2024-06-22 17:06:00 I only cross compile as I'm writing firmware mostly, so I can just mandate GCC + GNU binutils 2024-06-22 17:06:28 and if you use a separate assembly file, then you're depending on a specific assembler :) 2024-06-22 17:06:59 these probably aren't real problems but it bothers the purist in me 2024-06-22 17:07:02 I prefer GCC's guarantees over standard C's lack of guarantees 2024-06-22 17:07:19 I don't write GNU C, but I do rely on GCC's sane implementation 2024-06-22 17:08:06 The standard has some silly things unspecified that just create horrid workarounds for 'portable' code, but really are non-issues on normal implementations 2024-06-22 17:08:38 lol like signed overflow is undefined? 2024-06-22 17:08:50 Yeah 2024-06-22 17:09:46 you only rely on the python interpreter if the binary blob changes during development 2024-06-22 17:09:50 If you use -fwrapv 2024-06-22 17:10:29 It's simple enough that it can be written in name-your-scripting-language-of-choice 2024-06-22 17:10:30 in fact i think the thing that set me down this path of dissatisfaction in the first place was when someone showed me that gcc -O2 would produce a better loop if your bounding var was signed, because the undefined overflow allowed it the flexibility to not generate code to handle it at all 2024-06-22 17:11:00 Use -fwrapv 2024-06-22 17:11:25 But it is annoying that C compilers especially seem to need many flags to do what most people expect them to do 2024-06-22 17:11:32 see, and now you hit me with some weird flag for it 2024-06-22 17:12:02 Like warn you about clearly broken code, not make crazy assumptions using rules that only language lawyers know about, etc 2024-06-22 17:13:16 MrMobius: ah so you're checking the output into your scm 2024-06-22 17:15:16 Bit of a freudian slip that I *didn't* call him out on that :P 2024-06-22 17:15:33 You'd be horrified at what I check into VCS 2024-06-22 17:17:41 zelgomer: ah I can see why you might not want that 2024-06-22 17:21:43 on another subject, i think i'm going to bitbang pic icsp with my pc's serial port. 2024-06-22 17:23:38 dtr for the reset pin, rts for data, and then send the character 0f or 3f or something for a clock pulse 2024-06-22 17:24:04 good idea or bad idea? 2024-06-22 17:25:24 could be good. there are all kinds of pic programmer projects out there 2024-06-22 17:25:35 zelgomer: what kind of pic? 2024-06-22 17:26:55 The PIC is bit-banging? 2024-06-22 17:27:46 no, my pc will be banging bits to program the pic 2024-06-22 17:29:03 MrMobius: pic32mxnumbersnumbersnumbers 2024-06-22 17:36:38 So there's something between to convert +/-5V to something your PIC can handle? 2024-06-22 17:37:47 Or can you go straight in with that? 2024-06-22 17:41:38 Sorry if this is a noobish question, I'm not strong on electricals 2024-06-22 17:42:30 oh no there will be a max232 or something between 2024-06-22 17:42:58 but the goal is for that and the connectors to be the only required hardware 2024-06-22 17:45:09 rs-232 is actually like, 0 is anything between -15 and -3 and 1 is between +3 and +15 (may not have remembered the ranges exactly right) so you definitely need a translator 2024-06-22 17:45:43 voltmeter says mine is producing -8 and +9 2024-06-22 17:49:08 zelgomer: nice. I like pic32s. I have a programmer which was expensive :/ 2024-06-22 17:49:41 How slow are you allowed to run ICSP? 2024-06-22 17:50:20 I'm assuming as slow as you want given there's a clock signal? 2024-06-22 17:50:20 I bought an sbc to put on my desk for MCU programming. haven't figured out if it will do pic32s so still stuck trying to find a place to stick my windows laptop when I need it 2024-06-22 17:55:05 Sounds like an interesting project 2024-06-22 18:07:18 MrMobius: i actually have a programmer, too. the whole thing is a box of handmedowns i dug out of a closet. i just want to diy and not use any vendor software because something is wrong with my brain. 2024-06-22 18:09:29 I've got the same illness 2024-06-22 18:46:25 zelgomer: that's a cool project anyway 2024-06-22 19:18:42 bah, just checked the data sheet. the icsp pins have a 3.6v max. so my max232 isn't going to cut it, after all. so i either need a different plan or just give in and use the official programmer. 2024-06-22 19:20:30 maybe could put voltage dividing resistors on the output, but now it's creeping close to the "minimal hardware required" threshold 2024-06-22 19:42:55 hmm. do you have 5v from the max232? you could use some 7400 logic to level shift and an ldo 2024-06-22 19:52:48 the max232 outputs 5v on the ttl side but anything >3.6 is going to damage the pic. data sgeet says i can put up to a 100-ohm resistor in series with the icsp signals, so i can use 100/68 to divide it down to 3.3ish 2024-06-22 19:54:41 the other problem i have is that the max232 only has 2 receivers and i need to control 3 signals. could just use a second max232 i guess, but it would be cool to reduce this in some clever way :) 2024-06-22 19:55:19 like veltas, i'm actually not a hardware guy. haven't touched this level of stuff in many many years. 2024-06-22 19:58:49 I understand the ttl issue. you can get an 8 bit port that takes 5v input and outputs at 3.3v or some other voltage 2024-06-22 19:59:48 another option is an MCP2221 if you can use usb 2024-06-22 20:13:09 yeah i could buy a level shifter but now i have to open my browser and order something LOL 2024-06-22 20:41:24 There are 3V3 RS-232 driver/receiver's 2024-06-22 20:48:24 Almost everything I know about electronics I learned at my job, bugging a hardware designer 2024-06-22 20:49:42 Well bugging multiple designers, but there was one in particular who really helped me early on, even though I think he was rolling his eyes the whole time a bit! 2024-06-22 20:50:33 Because most of the firmware developers at my company come from an electronics background, I am a bit of an exception coming from pure software 2024-06-22 20:51:34 So I must have seemed quite unfit for the job at the time 2024-06-22 20:56:57 I'm quite comfortable with schematics but have zero experience designing 2024-06-22 20:57:40 i've only designed hardware in school or for fun, never professionally 2024-06-22 20:58:15 and then my "for fun" has really just been tinkering on a bread board and not actually design 2024-06-22 21:00:57 I would love to play with bread boards, been so busy recently with work :( 2024-06-22 21:14:00 veltas: this is actually a project that's been on my mind for about a year now. i make very very tiny baby steps on the weekends when i actually have time and energy. it's been incredibly slow going. 2024-06-22 21:15:53 actually a year ago my idea was completely different. i was playing around with 555 timers, shift registers, and latches to capture a stream of bits from the UART data signal and then latch it for bit-banging. i actually got it to work, but the tolerances on my caps are so wide that i have to watch a test pattern on the oscilloscope and use potentiometers to calibrate the timers for the shift registers 2024-06-22 21:15:59 and latch clocks 2024-06-22 21:16:38 i'm so proud of it i can't bring myself to tear it down, so one column of my breadboard is unusable, but it's so complicated and finnicky it's totally not worth pursuing any further 2024-06-22 21:17:36 Maybe draw a schematic for it so you can dismantle it without 'losing' it 2024-06-22 21:17:41 i have a beautiful ascii schematic of it 2024-06-22 21:17:49 i'll pastebin it, one moment 2024-06-22 21:17:59 Yeah I've got to see this lol 2024-06-22 21:22:30 veltas: https://paste.debian.net/plainh/a4d6cf0d 2024-06-22 21:25:41 Ah that is beautiful 2024-06-22 21:25:48 It lived up to its description 2024-06-22 21:25:58 that is pretty good 2024-06-22 21:45:49 this is the sort of stuff that a crazy person would do 2024-06-22 21:46:08 why crazy? 2024-06-22 21:46:48 because there are surely more rewarding ways to spend my free time 2024-06-22 21:47:04 I had one of these as a kid https://en.wikipedia.org/wiki/Gakken_EX-System and used to draw interesting circuits out on paper :P 2024-06-22 21:47:20 zelgomer: how so? 2024-06-22 21:48:25 Can say that about Forth and a lot of things 2024-06-22 21:49:29 You say this but I will never regret the hours I've spent on this sort of stuff instead of e.g. playing Minecraft or whatever. Maybe there are more productive things, but this is a wholesome hobby/craft. 2024-06-22 21:50:20 It does help to be a bit self-aware of your eccentricities 2024-06-22 21:50:20 Anything you've enjoyed wasting time on isn't a waste of time 2024-06-22 21:50:34 Yes but some stuff I enjoy makes me feel empty 2024-06-22 21:50:34 GeDaMo: i've never seen that before and now i want one 2024-06-22 21:51:00 I enjoy watching TV but I feel empty if I spend a whole day watching TV 2024-06-22 21:51:12 I don't think I did anything useful with mine, probably just weird noises and such 2024-06-22 22:39:34 "useful" that word has no meaning here 2024-06-22 23:58:13 well since i'm going to be ordering something anyway (looks like probably max3232)... can somebody please remind me what those wires are called that are individual wires but have little sheathes on the ends so that you can attach them to header pins? 2024-06-22 23:59:21 the ones with 100 thou pitch between pins?