|
who are you all
|
# ? Nov 23, 2013 15:11 |
|
|
# ? Jun 8, 2024 07:43 |
|
I'm not there :/
|
# ? Nov 23, 2013 15:12 |
|
man i really wish there were a flag for gcc to make it do constant string interning. that's one thing java did right. the lack of it is making life miserable for me right now :/
|
# ? Nov 23, 2013 16:56 |
|
lmao at this Chinese guy
|
# ? Nov 23, 2013 17:10 |
|
he works for blackberry/RIM afaik
|
# ? Nov 23, 2013 17:11 |
|
Otto Skorzeny posted:man i really wish there were a flag for gcc to make it do constant string interning. that's one thing java did right. the lack of it is making life miserable for me right now :/ how would this be possible with C's compilation model? (or does gcc fail to identify identical string literals even in the same compile unit?)
|
# ? Nov 23, 2013 17:12 |
|
Notorious b.s.d. posted:how would this be possible with C's compilation model? you would need to have the memory for the .exe writable, then for each string literal keep an array of pointers to the binary that you need to patch with the interned value before execution, then have an interning function to get the interned pointer, also afterwards remove writable bit and set executable bit... something like that, details details
|
# ? Nov 23, 2013 17:45 |
|
Notorious b.s.d. posted:how would this be possible with C's compilation model? i'm talking in the same compilation unit. when i look at the map file, i can tell it's not interning/deduping when i do something like this code:
|
# ? Nov 23, 2013 17:45 |
|
MononcQc posted:this way lies INTERCAL PleasingFungus posted:I assumed that was the joke it was really a reference to how in HTTP you can do everything with just GET, to the extent that the imperative word "get" becomes a formality or a matter of convention, or politeness like with the word "please" I have no idea what INTERCAL is like
|
# ? Nov 23, 2013 18:13 |
|
Max Facetime posted:I have no idea what INTERCAL is like it's a programming language designed by eric raymond. that tells you pretty much all you need to know
|
# ? Nov 23, 2013 18:16 |
|
my pregnant wife just called and said she hit a deer on the highway on the way to her parents house for the weekend while im stuck at work. gently caress this gay earth
|
# ? Nov 23, 2013 18:19 |
|
Otto Skorzeny posted:i'm talking in the same compilation unit. when i look at the map file, i can tell it's not interning/deduping when i do something like this wfm, executable contains only one "Butts" even with -O0 obviously foo and bar aren't the same, since declared variables must have their own address.
|
# ? Nov 23, 2013 18:24 |
|
Max Facetime posted:it was really a reference to how in HTTP you can do everything with just GET, to the extent that the imperative word "get" becomes a formality or a matter of convention, or politeness like with the word "please" Here's what it's like: quote:INTERCAL has many other features designed to make it even more aesthetically unpleasing to the programmer: it uses statements such as "READ OUT", "IGNORE", "FORGET", and modifiers such as "PLEASE". This last keyword provides two reasons for the program's rejection by the compiler: if "PLEASE" does not appear often enough, the program is considered insufficiently polite, and the error message says this; if too often, the program could be rejected as excessively polite. Although this feature existed in the original INTERCAL compiler, it was undocumented. Otto Skorzeny posted:it's a programming language designed by eric raymond. that tells you pretty much all you need to know Actually Don Woods and James M. Lyon
|
# ? Nov 23, 2013 18:55 |
|
|
# ? Nov 23, 2013 18:56 |
|
suffix posted:wfm, executable contains only one "Butts" even with -O0 i have to assume he's using some bespoke embedded compiler because they are notoriously bad. if your compiler isnt putting them const char arrays in its own little memory hugbox, write a preprocessor that searches for something like @"this is my string" and converts it to a macro and prepend the data at the top of the file. also tell your wife to hide in its abdomen for warmth
|
# ? Nov 23, 2013 18:58 |
|
Posting Principle posted:
Yurii Rashkovskii. He actually owns bex.io
|
# ? Nov 23, 2013 18:58 |
|
MononcQc posted:Yurii Rashkovskii. He actually owns bex.io cant you get your own thread in which to dock dicks
|
# ? Nov 23, 2013 18:59 |
|
bitcoin exchange as a service loving kill me now
|
# ? Nov 23, 2013 18:59 |
|
that was my reaction the first time around too
|
# ? Nov 23, 2013 19:02 |
|
Notorious b.s.d. posted:how would this be possible with C's compilation model? link time optimization
|
# ? Nov 23, 2013 20:11 |
|
Zlodo posted:link time optimization link time code gen maybe otherwise not enough information would be retained in the .o
|
# ? Nov 24, 2013 00:59 |
|
also gcc's LTCG is terribad. i went to the effort of packaging an entirely separate toolchain on centos 6 to be able to use ltcg...and it couldn't build openmpi with ltcg turned on
|
# ? Nov 24, 2013 01:01 |
|
Nomnom Cookie posted:also gcc's LTCG is terribad. i went to the effort of packaging an entirely separate toolchain on centos 6 to be able to use ltcg...and it couldn't build openmpi with ltcg turned on this is what c-language programmers actually believe
|
# ? Nov 24, 2013 01:48 |
|
Symbolic Butt posted:I'd say he's pretty hosed that, and no physics professor will ever trust the port anyway because they're superstitious about numerical programming and that its absolutely vital to have run to run consistency over multiple decades. the reason the poor bastard has f77 source to begin with is (for example) somebody at cern wrote that strong interaction monte carlo in 1982 and so many papers have been published using that library that if you wrote a paper with a different implementation it would probably be rejected out of hand they will of course never notice that you recompiled the same f77 on completely different platforms with different compilers and incompatible floating point hardware
|
# ? Nov 24, 2013 02:41 |
|
Base Emitter posted:they will of course never notice that you recompiled the same f77 on completely different platforms with different compilers and incompatible floating point hardware These sort of large physics programs also routinely require user modification to get them to work in new use cases, so similarity between different groups software is often fairly limited.
|
# ? Nov 24, 2013 09:52 |
|
Nomnom Cookie posted:link time code gen maybe otherwise not enough information would be retained in the .o ltcg is a type of lto. a compiler could very well use normal .o w/ extra data to do lto but yeah ltcg is the best king of lto. also use clang not gcc
|
# ? Nov 24, 2013 11:03 |
|
Nomnom Cookie posted:link time code gen maybe otherwise not enough information would be retained in the .o COMDAT optimization is enough actually. This is how Visual C++ does it: allocate a COMDAT for each string, and give it a symbol name that's a mangling of the string contents. at link time, identical strings = identical COMDATs with identical names, so only one instance is kept
|
# ? Nov 24, 2013 12:21 |
|
idk poo poo about the VS toolchainZlodo posted:ltcg is a type of lto. a compiler could very well use normal .o w/ extra data to do lto it could but i have a very hard time believing that a *nix compiler would, because it would break compatibility with a 20 year old linker or elfutils or some poo poo. and i was working on clang but then quit that jerb. worked there 2 years but all i miss are those spec files. my artisanal gcc rpms
|
# ? Nov 24, 2013 19:06 |
|
Base Emitter posted:they will of course never notice that you recompiled the same f77 on completely different platforms with different compilers and incompatible floating point hardware pointsofdata posted:These sort of large physics programs also routinely require user modification to get them to work in new use cases, so similarity between different groups software is often fairly limited. are u tellin me nobody made their own science_float type? it would be really easy then you could define how many bits it is and how the floating point works - ohhh physicists they are psychotic, nvm
|
# ? Nov 24, 2013 19:11 |
|
when i was like 13 i coded up a type in C++ for numbers with several hundred digits. I thought i was gonna crack some greatest prime factors and make a bunch of money. I found a thing online where they had huge numbers, and if you could tell them the greatest prime factors they'd give you like $30,000. I wrote a p cool algorithm that would exclude some results logically and thought I was hot poo poo. I fed in the number from the contest and pressed enter and it sat there for a while so I did some napkin math and figured out it would take somewhere between 300 and 5000 years for it to complete
|
# ? Nov 24, 2013 19:16 |
|
Socracheese posted:when i was like 13 i coded up a type in C++ for numbers with several hundred digits. I thought i was gonna crack some greatest prime factors and make a bunch of money. I found a thing online where they had huge numbers, and if you could tell them the greatest prime factors they'd give you like $30,000. I wrote a p cool algorithm that would exclude some results logically and thought I was hot poo poo. I fed in the number from the contest and pressed enter and it sat there for a while so I did some napkin math and figured out it would take somewhere between 300 and 5000 years for it to complete so on your current pc it would take, what, six seconds?
|
# ? Nov 24, 2013 19:19 |
|
Socracheese posted:are u tellin me nobody made their own science_float type? it would be really easy then you could define how many bits it is and how the floating point works - ohhh physicists they are psychotic, nvm for all operations, the "science_float" type calls out to a REST API to hire a postdoc to do the math on a hp48g and return results at the of a term
|
# ? Nov 24, 2013 19:20 |
|
Notorious b.s.d. posted:for all operations, the "science_float" type calls out to a REST API to hire a postdoc to do the math on a hp48g and return results at the of a term heh
|
# ? Nov 24, 2013 19:23 |
|
Notorious b.s.d. posted:so on your current pc it would take, what, six seconds? yeah im sure u could use a cloud gpu cluster or something these days so i doubt anyone offers prizes like that anymore or the number is like 2048 digits long now
|
# ? Nov 24, 2013 19:25 |
|
Socracheese posted:are u tellin me nobody made their own science_float type? it would be really easy then you could define how many bits it is and how the floating point works - ohhh physicists they are psychotic, nvm http://www.cs.berkeley.edu/~wkahan/ieee754status/754story.html
|
# ? Nov 24, 2013 21:59 |
|
Socracheese posted:are u tellin me nobody made their own science_float type? it would be really easy then you could define how many bits it is and how the floating point works - ohhh physicists they are psychotic, nvm sure you could do that. now you're using soft floats instead of hard floats and your program is 10000x slower. have fun!
|
# ? Nov 24, 2013 23:36 |
|
Socracheese posted:then you could define ... how the floating point works don't even loving joke
|
# ? Nov 24, 2013 23:40 |
|
Socracheese posted:when i was like 13 i coded up a type in C++ for numbers with several hundred digits. I thought i was gonna crack some greatest prime factors and make a bunch of money. I found a thing online where they had huge numbers, and if you could tell them the greatest prime factors they'd give you like $30,000. I wrote a p cool algorithm that would exclude some results logically and thought I was hot poo poo. I fed in the number from the contest and pressed enter and it sat there for a while so I did some napkin math and figured out it would take somewhere between 300 and 5000 years for it to complete same, except a file compressor that tries every possible program and picks the shortest one that matches the file ah, to be young and innocent and know nothing about runtime complexity
|
# ? Nov 24, 2013 23:50 |
|
some people, when confronted with an underflow, think "i know, i'll make my own floating point". now they have 5.6 x 1057 problems
|
# ? Nov 24, 2013 23:53 |
|
|
# ? Jun 8, 2024 07:43 |
|
Nomnom Cookie posted:some people, when confronted with an underflow, think "i know, i'll make my own floating point". now they have 5.6 x 1057 problems when i quote this elsewhere, should i cite it as [Cookie 2013] or what
|
# ? Nov 25, 2013 00:12 |