|
if you want a float literal write it as 420.69f
|
# ? Nov 21, 2014 20:41 |
|
|
# ? Apr 27, 2024 21:16 |
|
whatever floats your boats
|
# ? Nov 21, 2014 21:18 |
|
this is my spare time project for the next weeks
|
# ? Nov 21, 2014 21:18 |
|
ive just noticed thats some weird compression on the stones from the iphones
|
# ? Nov 21, 2014 21:20 |
|
thread just got a lil weird
|
# ? Nov 21, 2014 21:21 |
|
so they finally got "hospital" there in nz?
|
# ? Nov 21, 2014 21:24 |
|
yeah but just the one though. and the fuckin queues are insane. legs been broken for weeks but finally got out of the rain and could see a doctor. at least i think he was a doctor, he had a white shirt on, which is pretty rare around these parts. must have been rich and smart i rekcon
|
# ? Nov 21, 2014 21:32 |
|
echinopsis posted:also can unity apply a torque as opposed to a directional force? i wonder if that might change the feel of it any? so i tried this, and while it works, it's not that great. see for yourself Doc Block fucked around with this message at 00:09 on Nov 22, 2014 |
# ? Nov 22, 2014 00:01 |
|
echinopsis posted:
ohhhhh echi =/
|
# ? Nov 22, 2014 00:12 |
|
stay strong echo baby penis
|
# ? Nov 22, 2014 00:15 |
|
baby? thats me
|
# ? Nov 22, 2014 00:37 |
|
echinopsis posted:ive just noticed thats some weird compression on the stones from the iphones i am really looking forward to the RAW capture in android 5
|
# ? Nov 22, 2014 01:38 |
|
Doc Block posted:why can't the compiler figure out that "69.69" should be a float when I'm assigning it as a float's value? not really a loss of precision issue there IMHO It's because c# does whatever Java dors, and Java is a language made to keep idiots from hurting themselves, not to be productive
|
# ? Nov 22, 2014 01:42 |
|
echinopsis posted:
R.I.P. oval office
|
# ? Nov 22, 2014 01:42 |
|
lol if rip oval office isnt a popular surf clothing label in your country
|
# ? Nov 22, 2014 01:46 |
|
echinopsis posted:
experimenting on disabled children??? what the gently caress man
|
# ? Nov 22, 2014 02:33 |
|
someone has to do it
|
# ? Nov 22, 2014 02:38 |
|
Doc Block posted:just a directional force you loving idiot be explicit with your constants always
|
# ? Nov 22, 2014 02:40 |
|
compilers being clever is literally the worst thing you could ask for in a programming env
|
# ? Nov 22, 2014 02:40 |
|
stupid idiot shitfuckers want a compiler to be a magic box that does everything they want it to and its "bad and dumb" if it does something they don't expect, like doing the right thing by not implicitly assuming a potentially lossy type like a lesser precision floating point. making your lang be strict when it's going to demote a datatype's width to something shittier is extremely valuable and you should be thanking C# for saving your dumb rear end
|
# ? Nov 22, 2014 02:42 |
|
i like strongly typed languages because they're all "gently caress you, this is how i, the computer, work, you need to actually understand that and i'm not going to hold your hand and make the best guess." u learn much more about how computers work with data when you're given restrictions like that
|
# ? Nov 22, 2014 02:43 |
|
jonny290 buy a Teensy 3.1, 96mhz of raw power with the convenience of arduino environment C, or you can just do raw C and use the on-board programmer, you just drag and drop your compiled friend onto your teensy 3.1 and off it goes.
|
# ? Nov 22, 2014 02:44 |
|
i made a gift for a friend that streamed .wav files off an sd card while pushing the data to an i2c sound device while also driving a 96x64 oled rgb screen with animated sprites (it was bit banging SPI also because for w/e reason i couldnt get the display driver to play nice so it fell back to bit bangin, still there was enough speed and bandwidth to do all these intense peripheral actions) you helped me build the little audio amp if you remember (i was sending in way too high a signal until i put a 64k pot on there and toned that poo poo way way way down)
|
# ? Nov 22, 2014 02:45 |
|
i dont understand why it can't just be settable flag? its super annoying when trying to use immediates in unity
|
# ? Nov 22, 2014 02:47 |
|
i once was explain to a student why the brightness of his led kept resetting to zero every few seconds when he was just ++; the brightness variable, and when what was happening on a register level clicked he suddenly had the biggest mind-blown hollywood-hacking-movie-all-the-3d-puzzle-pieces-slot-into-place-ACCESS-GRANTED grin very gratifying
|
# ? Nov 22, 2014 02:48 |
|
Doc Block posted:so i tried this, and while it works, it's not that great. see for yourself that owns you just need to modify friction
|
# ? Nov 22, 2014 02:50 |
|
and that student later designed the therac 25
|
# ? Nov 22, 2014 02:51 |
|
there is nothing clever or wrong with the compiler seeing that I typed a floating point number where a single-precision floating point number should go and saying, "Gawrsh, I'll bet he wants to pass that in as a float!" and then creating it as a float. and if you type in a literal that's a whole number it'll automagically cast it to single-precision float at compile time, just not for floating point literals. "He typed 4? Sure, I can make that into a float at compile time, no prob. But 4.0? You can gently caress off with that poo poo, dude." Doc Block fucked around with this message at 02:56 on Nov 22, 2014 |
# ? Nov 22, 2014 02:52 |
|
it's not like I'm trying to pass a double variable in place of a float. any reasonable compiler should see a literal/immediate/whatever you want to call it getting passed as a float and do the right thing. or do you think the compiler should throw an error if it sees code:
or what about C code:
|
# ? Nov 22, 2014 03:04 |
|
Doc Block posted:it's not like I'm trying to pass a double variable in place of a float. any reasonable compiler should see a literal/immediate/whatever you want to call it getting passed as a float and do the right thing. as a dude who learned what fuckers C compilers and linkers are yes when im doing constants i just about always always always append a type qualifier like if i'm doing an unsigned long i'll do #define MY_SHIT_PISS_VARIABLE 88ul its also really good form to put 'f' after any sort of thing you wanna be a float or 'D' for doubles just do it, putting random numbers in a field and praying the compiler does the write thing is dumb and bad
|
# ? Nov 22, 2014 03:07 |
|
Doc Block posted:it's not like I'm trying to pass a double variable in place of a float. any reasonable compiler should see a literal/immediate/whatever you want to call it getting passed as a float and do the right thing. yes to all this
|
# ? Nov 22, 2014 03:07 |
|
if you think no its because you've never lost weeks and weeks of time to weird bugs that come from implicit casts
|
# ? Nov 22, 2014 03:07 |
|
any opportunity you have to be very explicit about a constnat or a magic number you should take it
|
# ? Nov 22, 2014 03:08 |
|
LOL that's loving ridiculous and insane. No, I am not going to type specific integer types for integer literals unless required because I'm typing a long or something. And I'm not going to do it for floating point numbers either without a damned good reason. I regularly write code that has to work in both 32-bit and 64-bit environments. On both OS X and iOS, the commonly used types CGFloat, NSInteger, and NSUInteger are 32-bits in size in 32-bit environments but 64-bits long in 64-bit environments. The statement Objective-C code:
Objective-C code:
|
# ? Nov 22, 2014 03:28 |
|
And unless I was writing pure C, I would do const for magic numbers instead of #define's, to keep the kind of type safety that matters.
|
# ? Nov 22, 2014 03:30 |
|
it's you, you are the programming disaster
|
# ? Nov 22, 2014 03:33 |
|
Doc Block posted:And unless I was writing pure C, I would do const for magic numbers instead of #define's, to keep the kind of type safety that matters. you are entering the pain tunnel there is no return the world has no corner dark enough for people like you
|
# ? Nov 22, 2014 03:34 |
|
I don't give a gently caress if you've had to tug your dick in the apple namespace comment the intent of your lovely methods keep it simple rear end in a top hat avoid singletons in most cases match the formatting of the agreed upon styling name your loving variables classes and methods well and verbosely take advantage of any features in the language that reduce ambiguities and for gently caress sake qualify your magic constants
|
# ? Nov 22, 2014 03:38 |
|
I do all of those things. My magic constants are better than yours because they contain actual type information:Objective-C code:
is 100 times better than C code:
|
# ? Nov 22, 2014 03:48 |
|
|
# ? Apr 27, 2024 21:16 |
|
Doc Block posted:I regularly write code that has to work in both 32-bit and 64-bit environments. On both OS X and iOS, the commonly used types CGFloat, NSInteger, and NSUInteger are 32-bits in size in 32-bit environments but 64-bits long in 64-bit environments. The statement it's almost like there is a reason uint32_t and uint64_t and the others exist
|
# ? Nov 22, 2014 03:48 |