Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
chocojosh
Jun 9, 2007

D00D.

JoeNotCharles posted:

Jesus, what is it with you and your fetish for bitmaps?

I simply want somebody to show me how they can implement something using prime factorization or whatever in a way that is better than bitmaps. Nobody has been able to so far, or I am not understand them if there is a better way.

I still feel that I'm new to programming and second-guess myself a lot. I know that a lot of people on these forums know more than I do, but I simply don't see why you would use anything except for a bitset. I'm thinking that most of the people are deliberately posting outrageous solutions as a joke, but I'm not sure if maybe they are being just a bit serious at the same time.

chocojosh fucked around with this message at 20:10 on Apr 25, 2008

Adbot
ADBOT LOVES YOU

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.
I'm pretty sure everything that's been posted on the subject in this thread is 100% serious.

npe
Oct 15, 2004
Sometimes I think that if CoC had it's own YCS/helldump/BYOB style subforum, many people would have a hell of a time telling the difference.

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
The difference would be that we'd be allowed to have a "post hot programmer chicks and the most CoCeddest images u got" thread.

This technique works great on PS3 by the way, you can dedicate one SPU to prime flag encoding and one SPU to decoding, potentially leaving 4 or 5 for the rest of the game or application to make use of, and you can use 128-bit values to store more flags than ever!

king_kilr
May 25, 2007

chocojosh posted:

I simply want somebody to show me how they can implement something using prime factorization or whatever in a way that is better than bitmaps. Nobody has been able to so far, or I am not understand them if there is a better way.

I still feel that I'm new to programming and second-guess myself a lot. I know that a lot of people on these forums know more than I do, but I simply don't see why you would use anything except for a bitset. I'm thinking that most of the people are deliberately posting outrageous solutions as a joke, but I'm not sure if maybe they are being just a bit serious at the same time.

I don't see anything wrong with the bitmap solution, the numbers I used I randomly made up because they worked, I'm sure I could extend that technique for at least another 10 numbers :P , my point was that multiplying primes seemed wasteful.

TheSleeper
Feb 20, 2003

king_kilr posted:

my point was that multiplying primes seemed wasteful.

That's kinda the whole point. See: the guy who suggested using a bit field to store options then multiply out the primes, then factor the resulting number in order to figure out what options were set.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

JoeNotCharles posted:

Jesus, what is it with you and your fetish for bitmaps?

seriously man. You guys should use vector graphics instead, otherwise you lose a lot of flag resolution at higher word lengths.



Fib posted:

the difference would be that we'd be allowed to have a "post hot programmer chicks and the most CoCeddest images u got" thread.

the man always keeping po programmer folk down :mad:

edit:

rotor fucked around with this message at 22:39 on Apr 25, 2008

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
also:

Mikey-San
Nov 3, 2005

I'm Edith Head!

yaoi prophet posted:

Sometimes I think that if CoC had it's own YCS/helldump/BYOB style subforum, many people would have a hell of a time telling the difference.

The Something Awful Forums > Discussion > Serious Hardware/Software Crap > Goto Considered Helpful > so is it just me or is coldfusion kinda faggy or what

mantaworks
May 6, 2005

by Fragmaster

rotor posted:




mantaworks
May 6, 2005

by Fragmaster



alright im out

nebby
Dec 21, 2000
resident mog

mantaworks posted:


Sorry, ya gotta explain this one. (Yes, I know who that is, the wispy mustache gives it away.)

npe
Oct 15, 2004

npe fucked around with this message at 01:52 on Apr 26, 2008

Steampunk Mario
Aug 12, 2004

DIAGNOSIS ACQUIRED
GCH is leaking! :supaburn:

Mikey-San
Nov 3, 2005

I'm Edith Head!

Drx Capio posted:

GCH is leaking! :supaburn:

quotin dis for truth

mantaworks
May 6, 2005

by Fragmaster

nebby posted:

Sorry, ya gotta explain this one. (Yes, I know who that is, the wispy mustache gives it away.)

closest i can come to "post hot programmer chicks" (its his girlfriend/wife (hes my hero (not really hes a nerd)))

fansipans
Nov 20, 2005

Internets. Serious Business.

mantaworks posted:

closest i can come to "post hot programmer chicks" (its his girlfriend/wife (hes my hero (not really hes a nerd)))

If you can come to that, then you have serious problems.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
I am very, very sorry


(for posting this scandalous pic of tripletech, lol)

rotor fucked around with this message at 05:20 on Apr 26, 2008

Mikey-San
Nov 3, 2005

I'm Edith Head!


this guy is totally GCH

EssOEss
Oct 23, 2006
128-bit approved

chocojosh posted:

maybe they are being just a bit serious at the same time.

Hahahaha. No. You'd have to be seriously hosed in the head to actually consider using prime factoring version of bit vectors.

DoomCenturion
Aug 4, 2007

drat space alien demons killed my rabbit
Java:
code:
boolean func(){
  try{
    // poo poo code...
    return true;
  } catch (Exception e){
    //logging is for pussies
    return false;
  }
}
Checkin message: "Removed deprecated functions"

The code goes from this:
code:
@deprecated ...
to this:
code:
@Deprecated
Any class named "ASCIIString" or "Hex" (yes it was a fully implemented hexadecmical encoder written in Java)

code:
class EntryPair {
  public String Name;
  public Object value;
  //getter/setters, etc...
}
I deal with anti-patterns and bullshit like this way too much.

heeen
May 14, 2005

CAT NEVER STOPS
But you could tell the noobs from the regulars that they insist there is a better solution that works in O(1) whereas the solution everyone else is raving about seems to require O(n^2); I mean, I'm not crazy to think of bitfields, am I????

kalleboo
Jan 13, 2001

Hjälp

Fib posted:

The difference would be that we'd be allowed to have a "post hot programmer chicks and the most CoCeddest images u got" thread.
There was a woman reading a Perl book on the Kyoto subway today.

more falafel please
Feb 26, 2005

forums poster

We had a girl programmer in our group once for a while but she wrote this code
code:
char* p = malloc(somesize);

p = malloc(somesize);

Mikey-San
Nov 3, 2005

I'm Edith Head!

more falafel please posted:

We had a girl programmer in our group once for a while but she wrote this code
code:
char* p = malloc(somesize);

p = malloc(somesize);

she wanted to make sure the memory REALLY WAS allocated, what's wrong with that

biznatchio
Mar 31, 2001


Buglord

Fib posted:

post hot programmer chicks

The first person to post a picture of Leah Culver gets a boot up the rear end from yours truly.

more falafel please
Feb 26, 2005

forums poster

biznatchio posted:

The first person to post a picture of Leah Culver gets a boot up the rear end from yours truly.

http://commons.wikimedia.org/wiki/Image:Grace_Hopper.jpg

bbq
Jan 21, 2006

get funky.
In my Intro to Engineering class:

code:
for i=3:6
    j=3;
    while j>0
        if j==3
            fprintf('    %s(%1.0f)= %1.0f', var(j),i,c(i))
        elseif j==2
            fprintf('    %s(%1.0f)= %1.0f', var(j),i,b(i))
        else
            fprintf('    %s(%1.0f)= %1.0f\n', var(j),i,a(i))
        end
        j=j-1;
    end
end
This was part of an assignment where we had to determine the output of the script by hand, so it was written by the professor

bbq fucked around with this message at 17:24 on Apr 26, 2008

duck monster
Dec 15, 2004

Jesus loving christ. If GCH emerges, I'm going to lobotomise myself so I can never understand any thread under the SH/SC forum tree again.

No. BAD NERDS. NO.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

Fib posted:

The difference would be that we'd be allowed to have a "post hot programmer chicks and the most CoCeddest images u got" thread.

Triple Tech
Jul 28, 2006

So what, are you quitting to join Homo Explosion?

rotor posted:

I am very, very sorry


(for posting this scandalous pic of tripletech, lol)

hott, $temp->rising

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.
I think you mean $hotness++. ($temp is a bad name for that because it's easy to mistake for a temporary.)

bcrules82
Mar 27, 2003
working in asic verification i deal with bitmasks all the time, and it frustrates me that there are consistently SW and HW bugs due to someone missing an 'f' in their mask or some nonsense. so i've been beating down on everyone to use a common set of macros. here are my favorites:

code:
#define MASK_WIDTH(width) ((width)<64 ? ((1ULL<<((width) & 0x3fULL))-1) : 0xFFFFFFFFFFFFFFFFULL)
#define BOOL(data) ((data) ? 0x1 : 0)
#define BIT(data,bit) (((data) >> (bit)) & 0x1)
#define BITS(data,msb,lsb) (((data) >> (lsb)) & MASK_WIDTH((msb)-(lsb)+1))
note: never assume a boolean value or 0 or 1

Flobbster
Feb 17, 2005

"Cadet Kirk, after the way you cheated on the Kobayashi Maru test I oughta punch you in tha face!"

bcrules82 posted:

[code]
#define MASK_WIDTH(width) ((width)<64 ? ((1ULL<<((width) & 0x3fULL))-1) : 0xFFFFFFFFFFFFFFFFULL)

FUN FACT: 0xFFFFFFFFFFFFFFFFULL is a special constant in C named as such because it's the only machine word that is just chock-FFFFFFFFFFULL of set bits.

mantaworks
May 6, 2005

by Fragmaster

biznatchio posted:

The first person to post a picture of Leah Culver gets a boot up the rear end from yours truly.

programming chicks != a pair of tits who think they can program

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

yah i'd booze it up pretty hard if I had to write lisp all day too.

npe
Oct 15, 2004

MagneticWombats
Aug 19, 2004
JUMP!

rotor posted:


yah i'd booze it up pretty hard if I had to write lisp all day too.

You just create an interpreter which has drunkeness built in and then you write in the meta-drunk-lisp language...

Moetic Justice
Feb 14, 2004

by Fistgrrl

yaoi prophet posted:



So quarter-precision numbers are finally catching on?

Adbot
ADBOT LOVES YOU

Steampunk Mario
Aug 12, 2004

DIAGNOSIS ACQUIRED

yaoi prophet posted:



Haha, I love the 1/2 being 0%. Some of the int-float-int-float conversion that I see sometimes is sickening. The compiler really should be stricter when you're going to 'promote' and lose data :(.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply