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

C is crap

Name: Anonymous 2015-09-08 21:42

The next time I hear some idiot say ``an array is just a pointer'' I'm going to write an OS in Haskell and remotely install it on their computer.

Name: Anonymous 2015-09-08 22:58

an array index is just a pointer

Name: Anonymous 2015-09-09 13:55

A pointer is just an array index.

Name: Anonymous 2015-09-09 16:17

Arrays and pointers in C is kind of subtle thing that people can easily screw up or misunderstand if they aren't careful

The solution constituted the crucial jump in the evolutionary chain between typeless BCPL and typed C. It eliminated the materialization of the pointer in storage, and instead caused the creation of the pointer when the array name is mentioned in an expression. The rule, which survives in today's C, is that values of array type are converted, when they appear in expressions, into pointers to the first of the objects making up the array.

(https://www.bell-labs.com/usr/dmr/www/chist.html)

And for extra fun, below is an excerpt from the source code to the UNIX 7th edition C compiler (c01.c):

/*
* A mention of an array is turned into
* a pointer to the base of the array.
*/
struct tnode *
disarray(ap)
struct tnode *ap;
{
register int t;
register struct tnode *p;

p = ap;
/* check array & not MOS and not typer */
if (((t = p->type)&XTYPE)!=ARRAY || p->op==NAME&&p->tr1->hclass==MOS
|| p->op==ETYPE)
return(p);
p->subsp++;
*cp++ = p;
setype(p, decref(t), p);
build(AMPER);
return(*--cp);
}

Name: Anonymous 2015-09-10 3:07

アッラーアクバル

Name: Anonymous 2015-09-10 13:31

>>5
ユ メナ アレイアクバル

Name: GNG is Not GNU 2015-09-12 21:38

The C language didn't even realize what a BOOLEAN was until they officially introduced it in c99 (or was it c98)...

As for writing an OS in Haskell - a clue to you: operating systems have something called side effects, all sorts of them, at all times - Haskell tries to wish away side effects and pretend they can be magically isolated (out of site, out of mind) when obviously this is not the case. Imagine a file system that has no side effects (sorry user, you can't save your file to your hard disk - we don't allow side effects - oh wait, we just implemented a file system using MONADS with our GONADS ten years later after we realized the OS now needs side effects!)

Name: Anonymous 2015-09-12 21:39

Recursion is just goto.

Name: Anonymous 2015-09-12 22:17

Goto is just continuations.

Name: Anonymous 2015-09-12 22:54

>>9
I fucking hate this idiot shit

it's so wrong

so wrong

Name: GNG is Not GNU 2015-09-12 23:08

in super mario bros one for nintendo, a continuation was the pause button on your remote control. You could pause the game and then continue it later. Someone from the Ivory Tower decided to turn this into a programming language feature.

"What are they good for?

There is more to continuations than just a parlour trick to impress Haskell newbies. They make it possible to explicitly manipulate, and dramatically alter, the control flow of a program. For instance, returning early from a procedure can be implemented with continuations. "

GOTO exitlabel;
....
exitlabel: goto considered harmful but ivory tower panzies reinvented the wheel and claimed it as their own.

Name: GNG is Not GNU 2015-09-12 23:39

Name: Anonymous 2015-09-13 2:26

>>11,12
Time was when neither goto nor anything else was considered harmful.

Name: Anonymous 2015-09-13 9:25

>>10
Reality is like that. You can't always like it, but it catches onto you, and you end up spewing butthurt on textboards, which doesn't change the fact that continuations and GOTO are the same thing under different names.

Name: Anonymous 2015-09-13 10:14

>>14
they are not the same at all

Name: Anonymous 2015-09-13 10:14

>>14
thinking this is proof you don't understand them

Name: Anonymous 2015-09-13 13:11

>>15-16
Which is essentially what continuations are--GotoStatement?s that are "cleaner" with regard to the underlying machine (goto statements where the label can be saved in a variable).

http://c2.com/cgi/wiki?ContinuationsAreGotos

Name: Anonymous 2015-09-13 13:41

>>17
no they're not

Name: Anonymous 2015-09-13 15:06

>>10,15,16,18
thinking this is proof you don't understand them

Name: Anonymous 2015-09-13 15:37

>>14
Reality is like that. You can't always like it, but it catches onto you

"It's very foolish to think reality is normal." - Terry Davis

Name: Anonymous 2015-09-13 16:23

>>17
Nice link to Know Your Meme, brogrammer bro.

Name: Anonymous 2015-09-13 16:28

>>22
check my dubs

Name: Anonymous 2015-09-13 16:49

>>18-19
Multiple shitposting won't change the fact continuations are GOTOs, samefag.

Name: Anonymous 2015-09-13 17:30

>>23
it's not shitposting and thye are not gotos

Name: Anonymous 2015-09-13 18:16

>>23
Some say shitposting shapes one's own reality.
If one shitposts that it's not shitposting and shitposting shapes one's own reality, is it still shitposting?

Name: Anonymous 2015-09-13 18:23

>>24
You still haven't declared a single difference between continuations and gotos, you just keep shitposting in the hope that that will magically affect reality.

Name: Anonymous 2015-09-13 21:21

LISP

Name: Anonymous 2015-09-14 4:56

is Defer in Golang just a goto that goes up, and makes it hard to reason about the prog? In fact pretty much everything is just a goto. Break is a goto, return is a goto, continue is a goto, exit is a goto, exceptions are intraprocedural gotos or COMEFROMS, traps are gotos, HALT is a goto...

Name: Anonymous 2015-09-14 9:43

Continuations are LISP's alternative to setjmp/longjmp. And they're fine. But it's still not ``goto''.

Name: Anonymous 2015-09-14 12:16

>>26
difference between continuations and gotos: continuations have natural semantics in terms of the theory of lambda calculus and are relevant to the foundations of computing science, goto doesn't have any theory except in terms of the execution model of instruction pointer based computers

Name: Anonymous 2015-09-14 13:52

>>28
this is the deluded and confused mind of a "continuations are just goto"-believer. they are not.

Name: Anonymous 2015-09-14 13:58

>>7
As for writing an OS in Haskell - a clue to you: operating systems have something called side effects, all sorts of them, at all times - Haskell tries to wish away side effects and pretend they can be magically isolated (out of site, out of mind) when obviously this is not the case. Imagine a file system that has no side effects (sorry user, you can't save your file to your hard disk - we don't allow side effects

I know, right? Gets me every time when I attempt to say add two numbers in HASCAL and can't because allocating memory for a new number is a side effect and I need a NOMAD for that. Curses!

I think HASCAL fans need to reevaluate their assumptions if they think that they can add numbers or create lists in their toy language.

Name: Anonymous 2015-09-14 15:31

>>30
goto doesn't have any theory
This is the kind of ignorant motherfucker who gets a CS degree these days.
You aren't fit to scrub toilets at McDonald's.

Name: Anonymous 2015-09-14 19:15

>>33
show me the theory?

p.s. http://community.schemewiki.org/?call-with-current-continuation-for-C-programmers

"Not a goto"

reified continuations are much more similar to setjmp/longjmp than goto. Only an idiot would compare them to goto.

Name: Going GNG is Not GNU 2015-09-14 19:17

if you can implement a continuation in a procedural language and emulate continuations, then goto does have theory, because you just created continuations in C language.... Also just because it has theory behind it doesn't mean it's good. Consider the theory of evolution, which is correct - this doesn't make it good. Evolution requires 99 percent of species going extinct. It's correct, but not good. Haskell means 99 percent of haskell programmers go extinct.

Name: Anonymous 2015-09-14 19:25

>>34

comparing them to goto was just being nice. Intraprocedural gotos are even worse than local gotos. Comparing them to setjmp/longjmp is being honest, while comparing them to a goto is being nice. But since setjmp and longjmp are also known as intraprocedural gotos with more features, you can in fact use "goto" to describe continuations. You're just using LaynesLaw to try and win an argument, but it's not helping.
See
http://c2.com/cgi/wiki?LaynesLaw

Name: GNG is Not GNU 2015-09-14 19:30

https://en.wikipedia.org/wiki/Setjmp.h

"When a "non-local goto" is executed via setjmp / longjmp ,"

See, people view setjmp and longjmp as non local gotos.. so it's perfectly fine language to say continuations are like gotos, or more specifical non local gotos (intraprocedural).

Name: Anonymous 2015-09-14 19:31

"non local gotos" is a retard name for something that completely isn't a goto, at all - it's the same idotism that thinks continuations are related to goto.

Name: Anonymous 2015-09-14 19:39

>>38
You are going to a different part of the code, even worse so than a local goto where at least it is local which is much safer. Someone who continually brings up LaynesLaw has lost the argument, even though they tried to win it.

Name: Anonymous 2015-09-14 19:42

It goes something like this:
The first stage is denial.
The second stage is..
The third stage is...
Then it is accepted as self evident, that continuations are non local intraprocedural gotos.
Note: the first stage is denial. This is the most important stage.

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