Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Incrementing i

Name: Anonymous 2009-03-16 8:40

i++; versus i+=1; versus i=i+1;

Discuss.

Name: Anonymous 2009-03-16 8:56

++i;

Name: Anonymous 2009-03-16 9:00

++i for EXTREME PERFORMANCE

Name: FrozenVoid 2009-03-16 9:02

i += sizeof "";

Name: Anonymous 2009-03-16 9:42

#define inc(x) 1+inc(x-1);

Name: Anonymous 2009-03-16 9:49

Anyone who uses i=i+1 deserves a fate worse than a fate worse than death. i++ FTW

Name: Anonymous 2009-03-16 10:01

i -=- 1;

Name: Anonymous 2009-03-16 10:09

i=i+1 only makes sense if i is either infinity or negative infinity.

Name: Anonymous 2009-03-16 10:22

>>8
EXPERT MATHEMATICIAN

Name: Anonymous 2009-03-16 10:33

vinc=new Function("return ++arguments[0]")

Name: Anonymous 2009-03-16 11:22

function incrementation_numeric(){
 if(isNaN(arguments[0]))
{
 return 'Not a number'
}else{
 var bnum=new Number(arguments[0]+1)
  if(isNaN(bnum))
 {
   return 'Out of range'
 }else{
   return bnum
  }
 }
}

Name: Anonymous 2009-03-16 11:36

Mutable state considered harmful.

Name: Anonymous 2009-03-16 11:38

let i' = succ i

Name: Anonymous 2009-03-16 11:50

Pardon my mistakes, my C has gotten a little rusty.

for(char *c := NULL; i>0; --i){
   int j;
   if (c) j := strlen(c); else j := 1;
   realloc(c, ++j);
   c[j-2] := ' '; c[j-1] := '\0';
}
i := strlen(c); free(c);

Name: Anonymous 2009-03-16 12:06

>>2
>>3
Thread should've ended here. This is clearly the best solution, which will likely result in just one machine instructions, while all other variations need compiler optimizations turned on to produce good code.

Name: Anonymous 2009-03-16 12:43

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>15 does not understand /prog/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkm+gSQACgkQyfzi67YGTm/sUwCgpdoa9XiAng0QKcQpaDxBZ+XE
KLkAn16d/ylkMzIDZHN2BzU01PrXj5Ig
=0Abq
-----END PGP SIGNATURE-----

Name: Anonymous 2009-03-16 12:47

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>16 is DQN

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkm+gnAACgkQaCyy2qDbuDc0ygCfRaEZies8HRu/FtUwvxyIGokq
W2kAnim3SE4UK5T+/Y7o4hg8d4rn4Sjq
=u+mQ
-----END PGP SIGNATURE-----

Name: Anonymous 2009-03-16 12:50

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


We need a /prog/ keyserver.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkm+gvQACgkQds2F8BCEg8zMkQCdHM1gS8MzdSinxHf75y5tCKQX
DAsAoKPKPAV5xYS54/FeiXHWWNHLqFEh
=Dd6k
-----END PGP SIGNATURE-----

Name: Anonymous 2009-03-16 12:51

>>16
GPG crap
you wouldn't happen to know a guy by the name Donahoo would you?

Name: Anonymous 2009-03-16 13:36

>>16
>>18
Your GPG is ancient!

Name: Anonymous 2009-03-16 13:47

>>20
You mean stable. lol debian

Name: Anonymous 2009-03-16 14:01

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


>>16,18 might just be too dumb to use the correct gpg version.
Hint: gpg v2.x is called gpg2.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)

iEYEARECAAYFAkm+k70ACgkQdszBNMXUyxJrpwCgnMCVQX5xD1hOU1I28CZQcnr4
Ng4An0+5hO8G6sYnaw9jHRQUAv4WynCD
=ZDxf
-----END PGP SIGNATURE-----

Name: Anonymous 2009-03-16 14:34

I use state monad for that;

newtype State s a = State { runState :: (s -> (a,s)) }
 
instance Monad (State s) where
    return a        = State $ \s -> (a,s)
    (State x) >>= f = State $ \s -> let (v,s') = x s in runState (f v) s'

Name: Anonymous 2009-03-16 14:55

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


>>23
⑄ Please sign your posts! ⑄
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)

iEYEARECAAYFAkm+oG4ACgkQdszBNMXUyxJFwgCfb4yLHyO4HLQwe5JOOtj04IdD
A3IAoNcxF7/I8E4IXlmKgIOsFJ7JFFHE
=e6vw
-----END PGP SIGNATURE-----

Name: Anonymous 2009-03-16 14:56

GPGs Pretty Good

Name: Anonymous 2009-03-16 14:59

modifySTRef i (1+)

Name: Anonymous 2009-03-16 15:26

inc eax

Name: Anonymous 2009-03-16 22:50

(incf a)

Name: Anonymous 2009-03-17 2:39

>>27
Intel syntax considered harmful.

Name: Anonymous 2009-03-17 6:56

>>15

I don't think so, Dave.
i++;

Name: Anonymous 2009-03-17 9:02

++i > i++

Name: Anonymous 2009-03-17 9:07

>>29
Your considered harmful

Name: Anonymous 2009-03-17 9:09

>>31
undefined behavior, lrn2c

Name: Anonymous 2009-03-17 9:11

>>32
You're ALL considered unscientific and ultimately destructive.*



* The Sussman, 2008

Name: Anonymous 2009-03-17 9:13

>>33
how is it undefined? i guess i should have written
++i = i++;

confusing yes but well defined

Name: Anonymous 2009-03-17 9:23

>>35
idiot

Name: Anonymous 2009-03-17 9:30

>>36
[b]GENIUS[\b]

Name: Anonymous 2009-03-17 9:58

>>35
you modify i twice between sequence points.
you'd probably just end up getting i incremented one or two times, but in cases like that the compiler could rape your sister and still be complying with the standard.

Name: Anonymous 2009-03-17 11:39

>>38
the compiler could rape your sister
Fuck, I'm going to start using ++i = i++; in all programs I write just in case someone ever writes such a compiler.

Name: Anonymous 2009-03-17 12:32

>>39
You know, aniki, I'll rape your imouto for free if you want. No questions asked.

Name: Anonymous 2009-03-17 12:37

>>40
Are you a robot or some kind of android?

If not, no deal.

Name: Anonymous 2009-03-17 17:37

>>41
My phone runs Android, does that count?

Name: Anonymous 2009-03-17 20:06

  INC                    INC Increment memory by one                    INC
                                                        N Z C I D V
  Operation:  M + 1 -> M                                / / _ _ _ _
                                 (Ref: 10.6)
  +----------------+-----------------------+---------+---------+----------+
  | Addressing Mode| Assembly Language Form| OP CODE |No. Bytes|No. Cycles|
  +----------------+-----------------------+---------+---------+----------+
  |  Zero Page     |   INC Oper            |    E6   |    2    |    5     |
  |  Zero Page,X   |   INC Oper,X          |    F6   |    2    |    6     |
  |  Absolute      |   INC Oper            |    EE   |    3    |    6     |
  |  Absolute,X    |   INC Oper,X          |    FE   |    3    |    7     |
  +----------------+-----------------------+---------+---------+----------+

  INX                    INX Increment Index X by one                   INX
                                                        N Z C I D V
  Operation:  X + 1 -> X                                / / _ _ _ _
                                 (Ref: 7.4)
  +----------------+-----------------------+---------+---------+----------+
  | Addressing Mode| Assembly Language Form| OP CODE |No. Bytes|No. Cycles|
  +----------------+-----------------------+---------+---------+----------+
  |  Implied       |   INX                 |    E8   |    1    |    2     |
  +----------------+-----------------------+---------+---------+----------+


                                            BASIC TO MACHINE LANGUAGE   243
~


  INY                    INY Increment Index Y by one                   INY

  Operation:  X + 1 -> X                                N Z C I D V
                                                        / / _ _ _ _
                                 (Ref: 7.5)
  +----------------+-----------------------+---------+---------+----------+
  | Addressing Mode| Assembly Language Form| OP CODE |No. Bytes|No. Cycles|
  +----------------+-----------------------+---------+---------+----------+
  |  Implied       |   INY                 |    C8   |    1    |    2     |
  +----------------+-----------------------+---------+---------+----------+

Name: Anonymous 2009-03-17 21:44

>>43
INC - increment.  Add one to the operand and replace it.  May
      refer to the accumulator.  (N,Z).  Does not change the
      carry bit

INX - increment X.  Add one to the contents of the X register
      and place the sum back in X.  (N,Z).  Does not change
      the carry bit.

INY - increment Y.  Add one to the contents of the Y register
      and place the sum back in Y (N,Z).  Does not change
      the carry bit.

...
[m]    We now list all the possible 6502 instructions by mode of address.
Following the mnemonic we show the numberic op-code, the number of
cycles required to execute the instruction and the number of bytes
it occupies, including the address field.[m]
...
Absolute
...
INC - EE,6,3
...
 Zero Page
...
INCZ - E6,5,2
...
Implied or Accumulator
INX  - E8,2,1
INY  - C8,2,1

...
Zero Page Indexed
...
  INCZX - F6,6,2
...
Absolute X
...
INCX - FE,7,3

Name: Anonymous 2009-03-18 6:07

Resurrection bump

Name: ​​​​​​​​​​ 2010-10-25 8:24

Name: Anonymous 2011-02-03 3:26

Name: Anonymous 2013-09-01 19:42


Uh, there were only two infodumps, and the majority of the story was non-infodump. The 'angst' is called drama. If that's how you viewed Michiru route, I'm guessing you didn't feel attached to the characters at all, in which case it only makes sense that you don't enjoy a charage.

Name: Anonymous 2013-09-01 20:28


 my god this is bugged as fuck

Name: Anonymous 2013-09-01 21:13



It could have been something great if it went for something like 30-35 episodes. I can't see how a chiru adaption would work since it has a lot to do with the narration and naturally an anime wouldn't have that. I would like to see EP5 animated though, even if it's butchered by DEEN.

Don't change these.
Name: Email:
Entire Thread Thread List