Details
Joined devRant on 6/30/2018
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
@happygimp0 Thanks again, and no, I have zero idea about that, but I'll look it up.
-
@blindXfish for a lower fps?
-
@happygimp0 Thank you for your explanation, I'll try to go down the microcontroller/other output path if time allows.
And the printf() causing context switches/page misses problem, do you mean that in context of RT systems? I thought those things are unavoidable so I never think in terms of those while programming, but it makes sense in a RT system. -
@electrineer Just to make sure I understand you correctly, what you're saying is that I should have a 60Hz monitor with a 30Hz camera, and if I display different images every .016 seconds, I should be able to see this effect?
-
@Fast-Nop Thank you for your explanation, I am convinced to give up
Also I did consider the refresh rate, I thought that even if the "o" gets printed at a higher frequency than the screen's refresh rate, it lands up at the same spot right when the screen is refreshed, considering a complete oscillation of o takes t time, the screen refreshes once at t/2 and once at t, but I just realised according to that it should be visible only at 2 spots
Sigh, this was just an impossible/too hard to implement of an idea -
@iiii the only option that remains now is to start my program with 1 nanosecond and increment it once each time I press some key, only around 666666 possibilities to check, the brutest force in the entire universe
-
@Fast-Nop ughhh yeah, paste.org has been glitchy lately, behold the epitome of code sharing : https://walloftext.co/devrant
I'm don't entirely get what you're saying, do you mean that my mobile and my computer will have some difference at the smallest units of time?
I was trying to replicate this btw: https://youtu.be/_xTjyV8F6XU -
Is this a satirical post?
Feels like one I stg, but who'd put that much effort and time unless they're serious -
@halfflat Thanks a lot mannn
-
@alexbrooklyn Thanks for getting Rebecca Black stuck in my head
-
@Fast-Nop thank you amigo
-
@Fast-Nop
-
I understand they're lower bounding insertion sort's runtime with Ω(n) and upper bounding it with O(n²)
I said Omega of n² because since they're talking about Ω(g(n)), I put in something that makes the two definitions similar, so the difference is apparent, sorry for the confusion, I'll try to rephrase it.
The O definition is: When we say “the running time is O(n²), we mean that there is a function f(n) that is O(n²) such that for any value of n, no matter what particular input of size n is chosen, the running time on that input is bounded from above by the value f(n).
The Ω definition is: When we say that the running time (no modifier) of an algorithm is Ω(g(n)), we mean that no matter what particular input of size n is chosen for each value of n, the running time on that input is at least a constant times g(n), for sufficiently large n.
My doubt is, for O , they're introducing an extra function f(n) for upper bounding runtime, in Ω, they're not doing so, why? -
@turbod it doesn't sigh, my doubt is, why are they involving a f(n) with O(n²) for upper bounding, and straight away lower bounding with n² when it comes to Ω(n²).
-
Print changes and send them via pigeons
-
@irene I feel dumb for missing that XD, I've been reading The C Programming Language but I just began implementing pointers so yeah, sigh
-
@irene Ah okay thanks, I thought order didn't matter, only precedence did
-
@metamourge I don't get what's wwrong with ((*int)p)* or (*int)p*
(*int)p casts p
p* dereferences
But the compiler interprets the * as multiplication
Am I missing something about precedence? -
*(int*)p works but I have no idea why. Fucking pointers.
-
@TobiSGD Yeah I'm studying Computer System Architecture too. At this point I feel so lost XD maths, low level language, CSA, high level language, etc, I guess I just have to keep at it, there's no path to clarity, learn a bit here and there, and slowly things start connecting and becoming more clear.
-
@platypus guess I'll have to grab my screwdriver and transfer values between registers manually
-
@ddephor m8 i rel8 8/8
There's a new version of tensorflow every month, makes me want to not learn it because whatever I learn will be rendered obsolete within a few months. Then again, its a collaborative effort of the best minds in the field, is it even possible for a single person to be able to build something that can be on par with that framework in terms of features and logic? I guess its best to hop between huge gaps of versions. -
@haze Thanks, that's a great example, I'll keep it in mind.
-
@deviloper Yeah I feel likewise, those are the things you end up using at the end, this widespread opinion confuses me, I'm still learning low level stuff because of the things I mentioned before + I hope this opinion starts to make sense.
-
Needless to say, knowing low level languages is beneficial, the speed, embedded programming, most of the high level stuff is made with it, etc but I don't get this argument.
-
@Fast-Nop Ohhh I thought ctrl+D is supposed to be part of program and can be used as input, thank you so much for clearing this up for me.
-
@Fast-Nop Yeah but I had to workaround it in a way last character of the input stream has to be \n because Ctrl+D either flushes the input buffer and sends me back to the same loop, or bypasses all loops if there's nothing in the buffer
-
@Fast-Nop I do need to store some characters because modification of getline isn't allowed, so I have to start counting the input characters from the stream the moment the array gets filled, I guess the only way to do that is to use getline to clear the imput buffer+count characters along with it
-
@Fast-Nop wtf but its the first chapter and they've described nothing about dynamic memory allocation yet :/ searching online does yeild solutions like mine, but maybe the book assumes familiarity with C, idk man
-
@Fast-Nop What I did was terminating the loop in main with \n instead, it works BUT THIS EOF THING IS CONFUSING ME