[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>python

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 51
Thread images: 8

>python
>>
hurr, "nothing" is the same as "the number 0"
>>
File: 1485262515835.jpg (76KB, 1065x859px) Image search: [Google]
1485262515835.jpg
76KB, 1065x859px
>>60010093
I don't want to come off as defending the memesnek, but god damn you're retarded.
>>
>>60010093
Are you retarded?
>>
>>60010093
Ctard detected
>>
File: out.png (4KB, 167x109px) Image search: [Google]
out.png
4KB, 167x109px
Python has its issues. But this isn't one of those issues.
>>
File: reading.jpg (35KB, 720x600px) Image search: [Google]
reading.jpg
35KB, 720x600px
>>60010093
>>
>>60010152
second post best post
>>
>>60010093
There's a difference between an empty room and no room. 0 ≠ Null
>>
>>60010258
unless you use C when NULL == 0
>>
>>60010304
What is '\0' in c? Is it different from NULL?

I was halfway through a C book a few months ago. I need to pick it back up.
>>
>>60010335
its actually just 0

C maps it to that to make it easy to add null terminators
>>
>>60010093
Re tard C tard
>>
File: glasses-03.jpg (70KB, 513x800px) Image search: [Google]
glasses-03.jpg
70KB, 513x800px
>>60010345
>C maps it to that to make it easy to add null terminators
ah.
>>
>>60010335
It's the character constant for the null character, which is used to signify the end of a string. However, it is guaranteed to have the integer value of 0 as well.
>>
>>60010093
So THIS... is the power of C toddlers
>>
>>60010093
Yeah, because it's correct. "None" in programming is different than "none" in English. In programming, it means "no answer".
>>
>comparing objects of different types
>surprised with False

are you retarded?
>>
>>60010384
I thought it meant "no memory address"
>>
>>60010304
#define NULL 0
NULL == 0

No shit sherlock.
>>
Meanwhile in JavaScript land

'\t\r\n' == 0
",,," == new Array(4)
'foo' + + 'foo' == 'fooNaN'
>>
>>60010490
Might be as well, but in Python and some MLs, I'm only aware of it being the return value for functions without a return specified which are only used for their side effects. I believe Ocaml usually has unit returns in those cases though.
>>
>>60010571
congratulations you have figured out that null is not a keyword in C
>>
>>60010595
Some others:
'foo' + + '' == 'foo0'
{} + [] == 0
[] + {} == "[object Object]"
>>
>>60010689
Even better, NULL isn't even defined in C by default, it ships in stddef.h

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html#tag_13_47
>>
>>60010834
yeah that's what it means when something isn't a reserved word
>>
>>60010834
<stddef.h> is guaranteed to exist, so you can always use it.
But yes, he said it was not a keyword.
>>
>>60010093
i'm dead
>>
File: make bait great again.jpg (32KB, 600x600px) Image search: [Google]
make bait great again.jpg
32KB, 600x600px
>>60010093
>>
zero in C isn't null, it's just zero, there is no null in C.

pointers that point to zero memory address are invalid, and that is used as their non-set state.
>>
>>60010093

That's a perfectly reasonable answer though.
>>
>>60010595

>'foo' + + 'foo' == 'fooNaN'
This one makes sense. You're using the unary + operator to turn 'foo' into a number, but it's not a number so you get NaN.
Then you concatenate foo to NaN.
>>
>>60013122
what ?
NULL == 0 == \0
>>
>>60013438

What are you trying to say?
NULL is just a zero, a define

if you write
int x = NULL;
x = x + 1;

it will work just fine. There is no real null.

'\0' is a char that its int value is zero.
>>
>>60010204
lol matrix bro cool leet hax
>>
>>60013539

did matrix use the green fonts because leet h4xx0r5 used it or did leet h4xx0r5 started using it after watching the matrix
>>
>>60013552
it was blue on black before the matrix, matrix stole the idea and made it green because of of that whole motif thing they had going
>>
>>60013552
>>60013593
actually matrix l33t falling green on black text was inspired by 1995 ghost in the shell credits
>>
>>60010093
>Compares Integer with Boolean
>Surprised by the result

What are you, retarded?
>>
>>60013625

this
>>
>>60013634

Cfags don't understand what a boolean is.
>>
>>60013654
I'm Cfag and I understand.
Where's your god now?
>>
>>60013634

How is None a boolean?
>>
>>60010131
Anon Samma if I may,

0 can be a form of null, it can represent the lack of therefor by extension 0 could in theory be used in place of null, as 0 of something is considered nothing.

Thank you ^.^
>>
File: 1439348283926.jpg (49KB, 576x402px) Image search: [Google]
1439348283926.jpg
49KB, 576x402px
>javascript
>>
>>60013772

why has he written * instead of =?
>>
>>60013539
>lol matrix bro cool leet hax
I was using "green on black" years before the Matrix. Back then I was struggling to learn this OS called "UNIX". And the default colors DE the school was using were burning my eyeballs. Although I don't remember if I selected the color scheme on my own or stole it from one of my classmates.

But I really did enjoy the movie.

And yes, your comment did rustle my jimmies.
>>
>>60013811
var x * 3;
'5' + x - x

does this
x = 0;
x = x * 3;
int('5' + str(x)) - x;

in pseudocode
>>
File: 0 and null.jpg (97KB, 1024x576px) Image search: [Google]
0 and null.jpg
97KB, 1024x576px
>>60010093
>>
>>60013900
kek
>>
>>60010093
>>60010169
>>60010355
>>60010376
>>60013654
Samefagging Rust shill detected.
Thread posts: 51
Thread images: 8


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.