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

Pages: 1-4041-8081-

Pointers

Name: Anonymous 2008-02-16 21:41

Pointers: what the hell are they good for?

Name: Anonymous 2008-02-16 21:45

>>1
Calling functions indirectly so that when you recompile them the changes are seen by all your code.

Name: Anonymous 2008-02-16 21:49

Finding things.

Name: Anonymous 2008-02-16 21:53

pointing

Name: Anonymous 2008-02-16 22:03

absolutely nothing.

Name: Anonymous 2008-02-16 22:11

>>5
SAY IT AGAIN

Name: Anonymous 2008-02-16 23:37

passing/moving items of arbitrary size in O(1), among things.
pointers.. in? C? x86 assembly? as a concept?

Name: Anonymous 2008-02-16 23:57

>>1
Von Neumann architecture would not work without pointers.

Name: Anonymous 2008-02-17 0:51

>>6
HOOO! YEAH! POINTERS!

it just doesn't sound as good.

Name: Anonymous 2008-02-17 6:37

>>1
Casting strings into integers.

Name: Anonymous 2008-02-17 6:39

What's the difference between point-free and regular programming when it comes to execution time?

cudder = tail

is as fast as

cudder x = tail x,

aye?

Name: Anonymous 2008-02-17 7:42

>>8
Is that so? I'm not so sure.

Name: Anonymous 2008-02-17 7:54

Using arrays of function pointers to emulate prototype-style OOP with structures.

Name: Anonymous 2008-02-17 13:48

They're mostly good for making jokes about "giving you a few pointers.", but they're also a crucial ingredient in the renowned Null Pointer Exception.

Name: Anonymous 2008-02-17 14:13

The pointer is essential to solving any programming problem. A pointer allows you to abstract some of your information. In most programming assignments one doesn't only use int, float, or any other primitive data types. They are called primitive data types because they only use 32 bits or less depending on your architecture. Most programs use abstractions to represent a single idea. For example, lets say I wanted to create a computer game with a person in it. In C I could create a struct with all the information a person would have (e.g. hair color, height, etc.). In C++ and Java I would create a class to represent the human. Pointers/references only store an address that points to the abstraction that was created, in our case a human. This allows easier manipulation of the "human" variable by enabling the programmer to pass a 32-bit address instead of megabytes of information to different functions of the same program.

In the long run pointers will save you a lot of memory space and other goodies mentioned above.

Good luck.

Name: Anonymous 2008-02-17 15:00

When all you have is a dereference operator -- everything is a pointer.

Name: Anonymous 2008-02-17 16:58

>>15
No it's not. The Turing machine does not use pointers, and can compute anything.

Name: Anonymous 2008-02-17 17:07

>>17
yhbt

Name: Anonymous 2008-02-17 17:33

>>18
yhbt

Name: Anonymous 2008-02-17 17:52

>>17
But the point of a turing machine isn't efficiency.

Name: Anonymous 2008-02-17 17:58

>>20
But >>17 shows that the statement "the pointer is essential to solving any programming problem" is false.

Name: Anonymous 2008-02-17 18:05

>>21
But that's false, pointers are there for efficiency.

Name: Anonymous 2008-02-17 18:23

>>22
But they're not essential.

Name: Anonymous 2008-02-17 18:35

>>23
I code in (scheme)

Name: Anonymous 2008-02-17 18:37

FUCK YOU ALL

Name: Anonymous 2008-02-17 18:38

lol j/k

Name: Anonymous 2008-02-17 19:11

or was i

Name: Anonymous 2008-02-17 21:21

or was *i

Name: Anonymous 2008-02-17 23:05

or was &i

Name: Anonymous 2008-02-17 23:26

or was ^i

Name: Anonymous 2008-02-18 10:05

or was !i

Name: Anonymous 2008-02-18 13:58

>>30-31
THOSE ARE NOT POINTERS

Name: Anonymous 2008-02-18 14:29

>>32
Those aren't the pointers you are looking for.

Name: Anonymous 2008-02-18 16:44

IP 0x41414141

Name: Anonymous 2008-02-18 17:39

>>34
Is that a perl -e 'print "A"x2048' or are you just happy to see me?

Name: Anonymous 2008-02-18 23:59

pointers
huh
whate are they good for
ABSOLUTELY NOTHING

Name: Anonymous 2008-02-19 3:13

My dog has no pointers.
How does he reference data through differing scopes?
Terrible!

Name: Anonymous 2008-02-19 3:22

i'll give you a pointer, stfu

Name: Anonymous 2008-02-19 3:25

A couple of pointers
------->
------->

Name: Anonymous 2008-02-19 15:07

I kind of understand pointers, but what about pointers to pointers?

Name: Anonymous 2008-02-19 15:17

>>40
An array of character strings, for example

Name: Anonymous 2008-02-19 15:25

I kind of understand pointers, but what about arrows?

Name: Anonymous 2008-02-19 15:29

>>42
lolFun :: (Bool -> [Char]) -> Char
means that the function takes a predicate (Bool) and a list of Chars, then the predicate is applied to the list and returns a single Char.

Name: Anonymous 2008-02-19 15:34

>>301

Null pointer exception

Name: Anonymous 2008-02-19 15:36

>>43
You don't understand arrows, or Haskell.

Name: Anonymous 2008-02-19 15:44

>>45
Please explain Haskell to me.

Name: Anonymous 2008-02-19 15:46

>>46
Read SICP.

Name: Anonymous 2008-02-19 15:56

>>47
Please explain what's wrong with >>43.

Name: Anonymous 2008-02-19 15:57

>>48
The (->) function is not an arrow -- it is the function creation function.

Name: Anonymous 2008-02-19 17:46

>>49
Explain how -> isn't an arrow. It has an arrow line and an arrow head, ergo, it must be an arrow.

Name: Anonymous 2008-02-19 17:49

→ is an arrow, -> is a hyphen and a greater-than sign.

Name: Anonymous 2008-02-19 17:51

>>51
Fuck off.

Name: Anonymous 2008-02-19 18:00

>>51
▬▬▬▬▬▬▬▬▬▬▬▬▬► EXPERT UNICODE ARROW PROGRAMMER ◄▬▬▬▬▬▬▬▬▬▬▬▬▬

Name: Anonymous 2008-02-19 18:02

Well, my EMACS supports ``proper arrows''.

http://i27.tinypic.com/30jtiqo.jpg

Name: Anonymous 2008-02-19 18:07

>>54
Your font rendering looks like shit.

Name: Anonymous 2008-02-19 18:09

>>55
Are you gay or something.

Name: Anonymous 2008-02-19 18:14

→ is an arrow, -> is a hyphen and a greater-than sign.

It's actually a hyphen-minus and a greater-than sign.

``'' is a hyphen.
``'' is a minus sign.
``-'' is a hyphen-minus.

Name: Anonymous 2008-02-19 18:29

>>54
wow, what the fuck

get some real fonts

Name: Anonymous 2008-02-19 18:37

>>54
anti aliasing and bytecode interpreter NAO!

Name: Anonymous 2008-02-19 18:44

>>58
like what?

Name: Anonymous 2008-02-19 18:45

>>54
Needs more JPEG artifacts.
Seriously, what the fuck? Why can't people figure out what image formats are best for what kinds of images?

If it has as few colors as this one, use either GIF or PNG, and only use GIF if your image editor can pick a sane palette.

Name: Anonymous 2008-02-19 19:55

>>60
ProggyFont

Name: Anonymous 2008-02-19 20:00

>>60
Comic Sans

Name: Anonymous 2008-02-19 20:18

>>61
Maybe it isn't JPEG artifacts, but that noise is actually part of the font?

Name: Anonymous 2008-02-19 20:56

>>63
Hey /prog/, let's make a monospace bitmap version of Comic Sans, suitable for coding. The best of both worlds.

Name: Anonymous 2008-02-19 21:08

>>61
>>54 here, and I'm proud to announce that I have successfully trolled you.

Name: Anonymous 2008-02-19 21:19

>>66
>>61 here, and I'm proud to announce that I have successfully trolled you.

Name: Anonymous 2008-02-19 21:33

>>67
This may surprise you, but I invented the ``>>61 here, and I'm proud to announce that I have successfully trolled you.'' meme.

Name: Anonymous 2008-02-19 21:41

>>68
This may surprise you, but I invented the ``This may surprise you, but I invented the x meme'' meme.

Name: Anonymous 2008-02-19 22:57

>>69
This may surprise you, but I invented English.

Name: Anonymous 2008-02-19 23:11

Pointers let you in effect pass a small object (i.e., the pointer to a big object) instead of copying a big, full object.  Pointers are also useful when you want a function to modify something outside of itself.

Name: Anonymous 2008-02-19 23:16

>>70
This may surprise you, but I invented language.

Name: Anonymous 2008-02-19 23:37

>>72
This may surprise you, but I invented humans.

Name: Anonymous 2008-02-19 23:43

>>73

Then... what created you?

Name: Anonymous 2008-02-19 23:46

This may surprise you, but I invented the universe meme.

Name: Anonymous 2008-02-20 0:03

>>41
Haven't tought of it that way, it seems clearer to me now, thanks man.

Name: Anonymous 2008-02-20 0:15

>>74
Java.

Name: Anonymous 2008-02-20 7:51

>>74
The Sussman, obviously.

Name: Anonymous 2009-03-06 12:11


they are my dogs we can do   that in PHP   Now you have   a programming language   you learned and   picked it up   for a bunch   of 6kb jpeg.

Name: Anonymous 2010-12-17 1:37

This post brought to you by the Gay Nigger Association of America

Name: Anonymous 2013-08-05 16:36

>>81
gay hymie association of america

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