Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
"I also think it may be possible to *generator* primes even faster, "
but alas, *proofreading* is still not possible.
I guess we'll have colonies on mars before that happens.
Some things never change.
also, if I forgot to mention anyone, sorry, you can just throw something at me next time and we'll be even! I'm practically an alzheimer's patient in training, so I won't remember anyway.
Heres the sourcecode for the fixed version of the non-sieve prime generator:
run in repl, try 'isPrime(n)'
Doesn't have to iterate all the numbers before n to tell you primality.
Still running without fault. I'm currently checking all primes generated by it, under one million, to see if it fails anywhere.
So far it's working.
I only use a debugger in rare exceptions like memory corruption that causes a malfunction somewhere entirely else. Usually, it's reading the source to find bugs.
That's good because in my job, I'm working on legacy firmware for devices that are some hundred kilometers away, have no remote access, and that I have never even seen.
@Fast-Nop "I'm working on legacy firmware for devices that are some hundred kilometers away, have no remote access, and that I have never even seen."
Pardon the vernacular, but your job sounds fucking cool.
it's all asm or you work in something higher level?
what kind of devices anyway? (if thats not asking too much).
@Wisecrack It's all in C, only some really low-level parts in assembly. That's bare metal embedded systems, i.e. no operating system, and usually parts of some larger overall systems.
The cool part is figuring out how sensors and actuators are interfaced, where they are actually located (i.e. what exactly am I even measuring), and taking physics into account. Or sometimes working around seriously misdesigned hardware designs in software.
@Fast-Nop I'm going to assume you work for NASA or build hunter-killer drones from here on out. Don't correct me. It's fun to imagine.
Closest I ever got to bare metal was programming a simple worm on dos (think it was in nasm, fuck if I remember) and accidentally destroying my computer in the process. Oh and a few instances of blitting to screen over VGA.
Nothing like you're doing but I can understand the immediate appeal of tinkering at that low a level.
Are hardware bugs real common?
@Wisecrack Hardware bugs do happen, more on PCB misdesign level than in actual silicon. Or it's changes in the actual device.
Like, the one I have now changed some heated aluminium tank in favour of stainless steel. Problem is, that conducts heat way worse, so the outer temp sensors are a lot more decoupled from the temps in the vessel, which fucks up the control algo.
So it's about analysing the physics, coming up with ideas, and changing the software to address that. I have only schematics and pictures, and the testing is done far away by someone else.
sounds very fun to puzzle out.
you get to run simulations at least? Or is it more like "anticipate as many potential problems as possible, write tests for all of them, and then wait for feedback to determine what the issue is and implement a fix"?
@Fast-Nop "No, it's thinking ahead, getting the measurements, and then thinking again what the results mean and how to go ahead from there."
You are a bright man and I do not envy the tools you have been given, which apparently amount to coconuts and bamboo.
Carry on Gilligan. You seem like you're in another world.
I was gonna insert a reference to iron man here, "something something, next you'll tell me you got kidnapped like an errant weapons-manufacturing billionaire playboy, only to invent power armor using only scrap iron and some common tools" but alas it was too on the nose.
And this is the story about how my life got flipped, turned upside down.
You'll have to settle for fresh prince of bel-air references.
jiraTicket155770dDebugging is great.
Seems like many devs haven't really set it up because a print statements work in a pinch. And sometimes it's daunting if the setup doesn't work out of the box and you need to adjust some weird flag. Then people get used to it and think "I don't need a debugger!"
I think it's nice to help other team members set up their debuggers and show them how much nicer it is.
Dacexi24When there are only 2 pages on Google you know you're in serious shit.
practiseSafeHex21Fixing a parents iPhone, episode 1. Problem: "Whatsapp is gone off my phone" Debugging: Me: *unlocks phone...
nachocode7When you talk to other devs about what their code did. I also relate myself to this.