archived
stringclasses
2 values
author
stringlengths
3
20
author_fullname
stringlengths
4
12
body
stringlengths
0
22.5k
comment_type
stringclasses
1 value
controversiality
stringclasses
2 values
created_utc
stringlengths
10
10
edited
stringlengths
4
12
gilded
stringclasses
7 values
id
stringlengths
1
7
link_id
stringlengths
7
10
locked
stringclasses
2 values
name
stringlengths
4
10
parent_id
stringlengths
5
10
permalink
stringlengths
41
91
retrieved_on
stringlengths
10
10
score
stringlengths
1
4
subreddit_id
stringclasses
1 value
subreddit_name_prefixed
stringclasses
1 value
subreddit_type
stringclasses
1 value
total_awards_received
stringclasses
19 values
True
xrymbos
null
Not quite the same thing. \` will jump back to the start of the line you were at, but ' will jump back to exactly where you were.
null
0
1318974957
True
0
c2sjtdn
t3_lfblq
null
t1_c2sjtdn
t1_c2segrj
null
1427750128
3
t5_2fwo
null
null
null
True
enherit
null
Points taken.
null
0
1318975076
False
0
c2sjtxu
t3_lghyk
null
t1_c2sjtxu
t1_c2sjo9h
null
1427750139
2
t5_2fwo
null
null
null
True
xrymbos
null
When you make a jump, the mark ' is set to where you made the jump from. ` is the command to go to a mark.
null
0
1318975110
False
0
c2sju3k
t3_lfblq
null
t1_c2sju3k
t1_c2sgiet
null
1427750133
2
t5_2fwo
null
null
null
True
julesjacobs
null
That isn't the same as then you'd get a syntax tree representation at run time instead of compile time. That means that running the code would be very slow, plus it wouldn't integrate with the existing language features. For example say your language didn't have a switch statement and you wanted to define one. Inside t...
null
0
1318975191
True
0
c2sjuif
t3_lc3ae
null
t1_c2sjuif
t1_c2rm1c7
null
1427750140
1
t5_2fwo
null
null
null
True
quotability
null
Except Windows.
null
0
1318975255
False
0
c2sjutg
t3_lgfp0
null
t1_c2sjutg
t1_c2shxqd
null
1427750144
-2
t5_2fwo
null
null
null
True
Peaker
null
That's what uintptr_t is for...
null
0
1318975270
False
0
c2sjuvt
t3_lgjhl
null
t1_c2sjuvt
t1_c2si88n
null
1427750144
4
t5_2fwo
null
null
null
True
zztraider
null
> There is often nothing associating the name of the file you're working on and the region of code you're in. Again, I'd argue poor naming. If you have good naming and you're unfamiliar enough with your code base that filenames aren't enough to get you in the right file, thumbnails probably aren't going to help muc...
null
0
1318975273
False
0
c2sjuwg
t3_lgecn
null
t1_c2sjuwg
t1_c2sji8y
null
1427750145
2
t5_2fwo
null
null
null
True
Peaker
null
It has meaning for threaded code too. Whether or not you access volatile variables in an infinite busy-loop, for example, may change whether the compiler is allowed to optimize that loop away. More accurately, it changes whether you invoke UB or not.
null
0
1318975402
False
0
c2sjvj6
t3_lgjhl
null
t1_c2sjvj6
t1_c2sjnlz
null
1427750152
2
t5_2fwo
null
null
null
True
maep
null
You're on!
null
0
1318975452
False
0
c2sjvr8
t3_lgfp0
null
t1_c2sjvr8
t1_c2sj44d
null
1427750155
2
t5_2fwo
null
null
null
True
specialk16
null
Definitely have to give this a try. The only reason why I stick to Eclipse is mostly because most guides use it and it's officially supported by Google. But once you get a basic grasp of how the platform works, the IDE you use shouldn't matter.
null
0
1318975455
False
0
c2sjvs0
t3_lgebd
null
t1_c2sjvs0
t3_lgebd
null
1427750155
2
t5_2fwo
null
null
null
True
[deleted]
null
Great tutorial! Thank you!!
null
0
1318975546
False
0
c2sjw9a
t3_lfvr3
null
t1_c2sjw9a
t3_lfvr3
null
1427750161
2
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1318975684
False
0
c2sjwww
t3_lgfp0
null
t1_c2sjwww
t1_c2shy2e
null
1427750170
1
t5_2fwo
null
null
null
True
afabad
null
Straw man, isn't it? I never said it did. I just said he was in fact using the proper definition of "functional".
null
0
1318975750
False
0
c2sjx91
t3_l0ml6
null
t1_c2sjx91
t1_c2scdcw
null
1427750174
1
t5_2fwo
null
null
null
True
wadcann
null
>I don't understand why people dislike const Well, I dislike it for two reasons. * Lots of APIs were designed without `const` in mind, and thus don't play nicely with it. If `const` had been around since the dawn of time, it wouldn't have been such an issue, but as-is if I have a const value and need to shove it ...
null
0
1318975777
False
0
c2sjxdt
t3_lgjhl
null
t1_c2sjxdt
t1_c2si573
null
1427750176
5
t5_2fwo
null
null
null
True
bamdastard
null
update your driver.
null
0
1318975893
False
0
c2sjxxv
t3_lg6zg
null
t1_c2sjxxv
t1_c2sik7p
null
1427750183
1
t5_2fwo
null
null
null
True
Anpheus
null
I disagree because I think indexing into lists of things is a prominent source of error in programs. Introducing an easy way to do something that is likely to be a source of errors is something I oppose in principle.
null
0
1318975948
False
0
c2sjy8o
t3_lbxq9
null
t1_c2sjy8o
t1_c2rh4br
null
1427750187
1
t5_2fwo
null
null
null
True
automaticit
null
Code one up off the top of your head, bug-free, first-pass, in front of a technical interviewer? No, I don't expect that, which is a clarification I probably should have included up there. Be able to pseudo-code it on the whiteboard like when they were first introduced to it in their sophomore data structures class? Ta...
null
0
1318976029
False
0
c2sjyn3
t3_lf038
null
t1_c2sjyn3
t1_c2sb4pc
null
1427750193
1
t5_2fwo
null
null
null
True
[deleted]
null
Are you trolling, or just ignorant? I work with microcontrollers for a living and I know about MMIO - but the *fact* is that both C and C++ share a memory model that is not aware of threads, and does not require an optimizer to assume that there are threads. It doesn't matter whether a location in RAM is changed beca...
null
0
1318976207
False
0
c2sjzj5
t3_lgjhl
null
t1_c2sjzj5
t1_c2sjnlz
null
1427750207
8
t5_2fwo
null
null
null
True
theeth
null
LLP64 (what Windows 64bit uses) doesn't have 64bit ints (nor longs) either.
null
0
1318976276
False
0
c2sjzvq
t3_lgfp0
null
t1_c2sjzvq
t1_c2sjutg
null
1427750209
9
t5_2fwo
null
null
null
True
grauenwolf
null
That could certainly work, but then you are polluting your view-model with pure data concerns. Even worse, you may have to deal with the nested collection problem. VM --> List<Customer> --> Customer --> List<Order> I have never seen a satisfactory solution to wrapping sub-view-models around col...
null
0
1318976330
False
0
c2sk056
t3_lg1xx
null
t1_c2sk056
t1_c2sgb5b
null
1428192061
1
t5_2fwo
null
null
null
True
grauenwolf
null
> question: if the wrapper is calling a remote service, why would the .NET framework generate new threads for that call? wouldn't the service call block until the service returns a value? Do you always call it from the UI thread? Are your users pissed off at you yet? If you are making a blocking call *and* you app...
null
0
1318976427
False
0
c2sk0ly
t3_lf1px
null
t1_c2sk0ly
t1_c2sgc8q
null
1427750220
1
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1318976462
False
0
c2sk0qf
t3_lgfp0
null
t1_c2sk0qf
t1_c2sjs2x
null
1427750220
1
t5_2fwo
null
null
null
True
grauenwolf
null
> actually, i've written them to be pseudo-immutable, using readonly private members and constructor setting in C#, so i think we're good for now. How are they pseudo-immutable? That sounds like read immutability to me.
null
0
1318976474
False
0
c2sk0u1
t3_lf1px
null
t1_c2sk0u1
t1_c2sgc8q
null
1427750231
1
t5_2fwo
null
null
null
True
inahc
null
yeah, that stat sounds completely BS. if my cellphone call doesn't go through, then usually either I wandered into a dead area or there's some big event clogging up the cell network. as for landlines, I don't remember one single failure in my entire childhood or teenaged years. one in seven would mean one every coupl...
null
0
1318976500
False
0
c2sk0yt
t3_lg6ms
null
t1_c2sk0yt
t1_c2sjlzs
null
1427750223
4
t5_2fwo
null
null
null
True
bobstevens
null
I've actually added a couple custom attributes to GCC to provide some compile-time guarantees for Cell. They're useful as documentation as much as for the guarantees they provide, and I view const in a similar way. Even if it doesn't provide guarantees strong enough for a compiler to optimize around, it's useful info...
null
0
1318976507
False
0
c2sk10a
t3_lgjhl
null
t1_c2sk10a
t1_c2sjxdt
null
1427750224
6
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1318976529
False
0
c2sk14i
t3_lg940
null
t1_c2sk14i
t1_c2sgc4o
null
1427750229
2
t5_2fwo
null
null
null
True
grauenwolf
null
> For example say your language didn't have a switch statement and you wanted to define one. That is not why I want this.
null
0
1318976554
False
0
c2sk18w
t3_lc3ae
null
t1_c2sk18w
t1_c2sjuif
null
1427750228
1
t5_2fwo
null
null
null
True
sindisil
null
Not in C99. int32_t, if defined, will be exactly 32 bits. int_least32_t will be at least 32 bits.
null
0
1318976672
False
0
c2sk1t1
t3_lgfp0
null
t1_c2sk1t1
t1_c2sjnsp
null
1427750234
4
t5_2fwo
null
null
null
True
MarshallBanana
null
I have never said it wasn't.
null
0
1318976723
False
0
c2sk22i
t3_lgfp0
null
t1_c2sk22i
t1_c2sjq8r
null
1427750239
-4
t5_2fwo
null
null
null
True
Maristic
null
The way to say it without giving too much away is to say that it's 64-bit, specifically [LP64](http://en.wikipedia.org/wiki/64-bit#64-bit_data_models).
null
0
1318976771
False
0
c2sk2bl
t3_lgfp0
null
t1_c2sk2bl
t1_c2shfrc
null
1427750241
6
t5_2fwo
null
null
null
True
MarshallBanana
null
Which is why I asked "such as", as I don't know a system could have a byte size different from 8 bits, but I have not heard of a system in use today that does.
null
0
1318976782
False
0
c2sk2di
t3_lgfp0
null
t1_c2sk2di
t1_c2sjq7m
null
1427750243
2
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1318976798
False
0
c2sk2gl
t3_lg940
null
t1_c2sk2gl
t1_c2shk3c
null
1427750245
6
t5_2fwo
null
null
null
True
julesjacobs
null
It is an example. Specifically an example that disproves your previous claim: > The only great idea left in lisp is the one no one talks about, the ability to cleanly express object literals. **Once you have that everything else that lisp offers is just a library call away.** Though object literals make extending ...
null
0
1318976803
False
0
c2sk2hi
t3_lc3ae
null
t1_c2sk2hi
t1_c2sk18w
null
1427750245
1
t5_2fwo
null
null
null
True
OceanSpray
null
The main problems I see with JavaScript are: 1) JavaScript is a programming language intended for human use rather than for interpretation by a machine. Dart is the same. That means that your browser's resources are being wasted on parsing instead of doing the actual computation it was told to do. 2) JavaScript and D...
null
0
1318976841
False
0
c2sk2mt
t3_la9ma
null
t1_c2sk2mt
t1_c2semgl
null
1427750248
0
t5_2fwo
null
null
null
True
MarshallBanana
null
So is it, on that DSP?
null
0
1318976862
False
0
c2sk2op
t3_lgfp0
null
t1_c2sk2op
t1_c2sjp7q
null
1427750250
2
t5_2fwo
null
null
null
True
SciK
null
It’s very accurate. WebGL is defined as a 3D context for the HTML5 canvas ([source](https://www.khronos.org/registry/webgl/specs/1.0/#1)).
null
0
1318976961
False
0
c2sk36p
t3_lg6zg
null
t1_c2sk36p
t1_c2sjf9r
null
1427750252
-2
t5_2fwo
null
null
null
True
elder_george
null
Well, he says in context of LP64 data model used in Linux, MacOSX et al. Also he may be trolling us, poor LLP64 guys (j/k).
null
0
1318977028
False
0
c2sk3iv
t3_lgjhl
null
t1_c2sk3iv
t1_c2si88n
null
1427750257
1
t5_2fwo
null
null
null
True
ISV_Damocles
null
I know about monkeypatching, but that requires much more effort on the part of the developer -- a conscious effort, and usage of the monkeypatching pattern ought to be mentioned in the documentation. A variable that is changed into another type can be a careless mistake, and not noticed for months, and therefore the w...
null
0
1318977039
False
0
c2sk3ku
t3_l9v2n
null
t1_c2sk3ku
t1_c2sa8up
null
1427750258
1
t5_2fwo
null
null
null
True
MarshallBanana
null
True, but irrelevant to the topic.
null
0
1318977075
False
0
c2sk3re
t3_lgfp0
null
t1_c2sk3re
t1_c2sjo9a
null
1427750260
-6
t5_2fwo
null
null
null
True
inahc
null
is it just me, or do some of those anti-pattern pages say a whole lot of nothing? they took a whole page just to say "be careful when handling input", and didn't actually have any useful explanation of any details.
null
0
1318977254
False
0
c2sk4mc
t3_lg6ms
null
t1_c2sk4mc
t3_lg6ms
null
1427750275
2
t5_2fwo
null
null
null
True
grauenwolf
null
You forgot, I don't see the ability to create arbitrary syntax to be a net positive, but lets say I did. Going back to this statement: > This is what Lisp macros allow you to do: you can manipulate syntax tree at compile time which results in code running at run time. Well in .NET a lot of the code is compiled a...
null
0
1318977287
False
0
c2sk4sk
t3_lc3ae
null
t1_c2sk4sk
t1_c2sk2hi
null
1427750276
1
t5_2fwo
null
null
null
True
grauenwolf
null
Depends on what you are trying to acomplish.
null
0
1318977312
False
0
c2sk4wm
t3_lg1xx
null
t1_c2sk4wm
t1_c2sio6m
null
1427750277
1
t5_2fwo
null
null
null
True
Smallpaul
null
No. The circle of "code written in C" would be bigger than the circle "code written in Haskell", because C would allow you to write it in a functional style, an imperative style, an OOP style, a type-safe style, a type-unsafe-style, etc. Any smart or stupid way you could think to solve the problem, C would allow you to...
null
0
1318977337
False
0
c2sk50x
t3_lfm1k
null
t1_c2sk50x
t1_c2sjjlw
null
1427750278
2
t5_2fwo
null
null
null
True
grauenwolf
null
It can be just a dll or exe, but it doesn't have to be. You can have multi-file assemblies, though I can't think of anyone who actually does.
null
0
1318977546
False
0
c2sk62c
t3_lg1xx
null
t1_c2sk62c
t1_c2sg10z
null
1427750290
2
t5_2fwo
null
null
null
True
elder_george
null
Using `volatile` for interthread communication in C/C++ is usually plain wrong. And this is why this document deprecates it. Using `volatile` for `special` memory areas (usually, memory-mapped registers) is well justified (and actually that's what `volatile` was invented for).
null
0
1318977630
False
0
c2sk6i1
t3_lgjhl
null
t1_c2sk6i1
t1_c2sicfj
null
1427750297
5
t5_2fwo
null
null
null
True
elder_george
null
As I said in other place, using `volatile` for interthread communication C/C++ memory model (unlike JVM and CLR which have more strict memory models) is usually a mistake in a long run. However, it's totally OK to use volatile for accessing memory-mapped I/O ports etc..
null
0
1318977787
False
0
c2sk7bq
t3_lgjhl
null
t1_c2sk7bq
t1_c2sj9vh
null
1427750307
10
t5_2fwo
null
null
null
True
Maristic
null
A favorite example of mine which drives some people crazy is to ask them what this code does: mytype* p; p = NULL; printf("p = %p\n", p); printf("*p = %p\n", *p); Most people will say it segfaults. Nope. The correct answer is “tell me more about `mytype`” (and perhaps ask if the code is C or C++). If it's C++, th...
null
0
1318977861
False
0
c2sk7oz
t3_lgfp0
null
t1_c2sk7oz
t3_lgfp0
null
1427750313
1
t5_2fwo
null
null
null
True
sindisil
null
Yes. Yes it is.
null
0
1318977957
False
0
c2sk86q
t3_lgfp0
null
t1_c2sk86q
t1_c2sjnf1
null
1427750319
7
t5_2fwo
null
null
null
True
grauenwolf
null
I prefer to say "pass a reference by reference".
null
0
1318977960
False
0
c2sk87l
t3_lg1xx
null
t1_c2sk87l
t1_c2sgx3a
null
1427750319
1
t5_2fwo
null
null
null
True
[deleted]
null
Thanks for writing that! > Johan Tibell gave a long talk at 2010's CUFP about performance in Haskell. This I guess? http://johantibell.com/files/slides.pdf > Simon Marlow has recently written a great guide about this And this. http://community.haskell.org/~simonmar/par-tutorial.pdf
null
0
1318977976
False
0
c2sk8a5
t3_lfm1k
null
t1_c2sk8a5
t1_c2sjflm
null
1427750320
1
t5_2fwo
null
null
null
True
SuleyJoe
null
Even if you don't have experience with 64bit systems, it seems logical that increasing the size of the most widely used data type, would introduce looooooooooots of issues in many existing programs.
null
0
1318978027
False
0
c2sk8is
t3_lgfp0
null
t1_c2sk8is
t1_c2shy2e
null
1427750322
5
t5_2fwo
null
null
null
True
Timmmmbob
null
Haha, that's a beautiful grammatical brain-hurter. Did you mean you "never use stdint types any more", or you "always use stdint types"?
null
0
1318978052
False
0
c2sk8nw
t3_lgfp0
null
t1_c2sk8nw
t1_c2si68s
null
1427750332
3
t5_2fwo
null
null
null
True
julesjacobs
null
Whether you view it as a net positive or not doesn't change the fact that object literals are not sufficient for creating new syntax that integrates with the existing language. .NET indeed has a way to compile code at run time, although generating IL is extremely ugly and Linq expression trees are limited. This is goi...
null
0
1318978366
True
0
c2ska98
t3_lc3ae
null
t1_c2ska98
t1_c2sk4sk
null
1427750346
1
t5_2fwo
null
null
null
True
SuleyJoe
null
They probably think a pointer should fit into an int. In reality there's no connection between the two.
null
0
1318978388
False
0
c2skacn
t3_lgfp0
null
t1_c2skacn
t1_c2sj397
null
1427750355
1
t5_2fwo
null
null
null
True
[deleted]
null
Look at this code. int done = 0; while( !done ) do_stuff(); The compiler can optimize it to this: loop: do_stuff(); goto loop I would love to hear your explanation for why this legal optimization does not cause a bug - even in the case where another thread modifies the flag. Seriously. I want t...
null
0
1318978576
False
0
c2skbbt
t3_lgjhl
null
t1_c2skbbt
t1_c2sk7bq
null
1427750361
-10
t5_2fwo
null
null
null
True
SuleyJoe
null
> Making things easy to rea, I found this typo ironic and funny.
null
0
1318978620
False
0
c2skbjw
t3_lgfp0
null
t1_c2skbjw
t1_c2sj13y
null
1427750363
1
t5_2fwo
null
null
null
True
freedoodle
null
Agree, names are good. That's why many people use things like Solution explorer for visiting a place. You should check out this reference, [How Are Java Software Developers Using the Eclipse IDE?](http://www.cs.ubc.ca/spider/murphy/papers/mylar/software-eclipse-usage.pdf) The plugin you pointed out helps out when yo...
null
0
1318978703
False
0
c2skbza
t3_lgecn
null
t1_c2skbza
t1_c2sjuwg
null
1427750378
1
t5_2fwo
null
null
null
True
SuleyJoe
null
Cool story.
null
0
1318978712
False
0
c2skc0v
t3_lgfp0
null
t1_c2skc0v
t1_c2si9ox
null
1427750369
6
t5_2fwo
null
null
null
True
generalT
null
i used the term "pseudo-immutable" because types in C# (AFAIK), with the exception of string, are mutable, as compared to a language like F#, where the mutable keyword is needed explicitly to create a mutable type. i can see why "pseudo-immutable" could be misleading and incorrect, however, given that immutability can...
null
0
1318978718
False
0
c2skc26
t3_lf1px
null
t1_c2skc26
t1_c2sk0u1
null
1427750369
1
t5_2fwo
null
null
null
True
pkrecker
null
:FufBuffer :FufCoverageFile My life would suck without them.
null
0
1318978760
False
0
c2skc9s
t3_lghyk
null
t1_c2skc9s
t3_lghyk
null
1427750372
2
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1318978770
False
0
c2skcbi
t3_lf1px
null
t1_c2skcbi
t1_c2sk0u1
null
1427750372
1
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1318978862
False
0
c2skcsj
t3_lfm1k
null
t1_c2skcsj
t1_c2sjh5d
null
1427750380
1
t5_2fwo
null
null
null
True
cojoco
null
Okay! I hope you're still around when I come to collect.
null
0
1318978883
False
0
c2skcwd
t3_lgfp0
null
t1_c2skcwd
t1_c2sjvr8
null
1427750380
1
t5_2fwo
null
null
null
True
fjonk
null
I don't get this. I'm a mediocre programmer, good enough to write/maintain many kinds of programs, worse on project euler, type theory etc. I started with c, which I learned from "info libc" and there's been several things I've had trouble to understand. Pointers and c arrays has not been one of those things. But still...
null
0
1318978911
False
0
c2skd1j
t3_lgfp0
null
t1_c2skd1j
t3_lgfp0
null
1428192058
1
t5_2fwo
null
null
null
True
ethraax
null
Ah. I've never used SciPy so I really can't comment on it, I just wanted to point out that even though MATLAB may be widely used, it clearly doesn't heed the "many lessons" we've learned about array languages over the years.
null
0
1318978947
False
0
c2skd8i
t3_lg5ri
null
t1_c2skd8i
t1_c2sizoo
null
1427750395
3
t5_2fwo
null
null
null
True
generalT
null
ah. we have uncovered the underlying assumption. our calls to remote web services are not triggered by a UI- they are actually triggered by a remote component calling one of *our* web services, which then calls the remote services (i can explain in further detail if you want). our component then waits for the remote...
null
0
1318978970
False
0
c2skdcm
t3_lf1px
null
t1_c2skdcm
t1_c2sk0ly
null
1427750396
1
t5_2fwo
null
null
null
True
bbibber
null
Most real 64 bit platforms out there define int (and unsigned int) to be 4 bytes wide.
null
0
1318979088
False
0
c2skdwz
t3_lg59j
null
t1_c2skdwz
t1_c2sgct5
null
1428192057
1
t5_2fwo
null
null
null
True
paranoidinfidel
null
Methods yes...Properties yes A collection is a proper class whether you like it or not and there is nothing wrong with properties on them. Your opinion that it is "clearer" is simply not the case - what OOP rule does this break? A method implies an operation of some kind - to perform work on the collection, which ma...
null
0
1318979151
True
0
c2ske7o
t3_lg1xx
null
t1_c2ske7o
t1_c2sh45u
null
1427750400
-1
t5_2fwo
null
null
null
True
generalT
null
what was ErstwhileRockstar talking about? sheesh.
null
0
1318979296
False
0
c2skeya
t3_lf1px
null
t1_c2skeya
t1_c2sjcrn
null
1427750410
1
t5_2fwo
null
null
null
True
zzyzzyxx
null
That's because an array is explicitly a non-modifiable lvalue, not because it doesn't decay to a pointer.
null
0
1318979351
False
0
c2skf7e
t3_lgfp0
null
t1_c2skf7e
t1_c2sjprr
null
1427750414
14
t5_2fwo
null
null
null
True
nexuapex
null
My understanding is that they still do decay into a pointer there, but it decays into an rvalue, which can't be incremented.
null
0
1318979383
False
0
c2skfcp
t3_lgfp0
null
t1_c2skfcp
t1_c2sjprr
null
1427750415
1
t5_2fwo
null
null
null
True
_kst_
null
It *does* decay to a pointer in that context. It's a constraint violation because the resulting pointer isn't an lvalue.
null
0
1318979573
False
0
c2skg8n
t3_lgfp0
null
t1_c2skg8n
t1_c2sjprr
null
1427750423
3
t5_2fwo
null
null
null
True
_kst_
null
Very close. The third exception is when it's a string literal *used to initialize an array object*. If you write: char *ptr = "hello"; char arr[] = "hello"; the first string literal decays to a pointer, but the second one doesn't.
null
0
1318979650
False
0
c2skgmu
t3_lgfp0
null
t1_c2skgmu
t1_c2sjbpt
null
1427750437
9
t5_2fwo
null
null
null
True
poo_22
null
One more question, how do i paste something over something else? The equivalent of selecting something and hitting ctrl+v to replace it with what's in your clipboard.
null
0
1318979686
False
0
c2skgt4
t3_lfblq
null
t1_c2skgt4
t1_c2s9lt8
null
1427750431
1
t5_2fwo
null
null
null
True
-888-
null
Sorry, but your first question just smacks of being a weenie question.
null
0
1318979775
False
0
c2skh92
t3_lgfp0
null
t1_c2skh92
t1_c2sk7oz
null
1427750445
2
t5_2fwo
null
null
null
True
_kst_
null
All four printf calls have undefined behavior. printf's `"%p"` format expects a `void*` argument. A special rule guarantees that `char*` (and `unsigned char*`, and `signed char*`) will work, but not `int*` et al. The fix is to cast the argument to `void*`. printf's `"%p"` format creates an *implementation-defined* ...
null
0
1318979864
False
0
c2skhnz
t3_lgfp0
null
t1_c2skhnz
t3_lgfp0
null
1427750445
20
t5_2fwo
null
null
null
True
zzyzzyxx
null
Ah, yes, thanks for the clarification.
null
0
1318979932
False
0
c2skhzo
t3_lgfp0
null
t1_c2skhzo
t1_c2skgmu
null
1427750456
1
t5_2fwo
null
null
null
True
catcradle5
null
`int a = "hello";` WHY WON'T IT WORK
null
0
1318979982
False
0
c2ski77
t3_lg59j
null
t1_c2ski77
t1_c2senlx
null
1427750453
4
t5_2fwo
null
null
null
True
zzyzzyxx
null
It decays to an lvalue, just a non-modifiable one.
null
0
1318979983
False
0
c2ski7g
t3_lgfp0
null
t1_c2ski7g
t1_c2skfcp
null
1427750453
6
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1318980022
False
0
c2skie1
t3_lgfp0
null
t1_c2skie1
t1_c2sjfq6
null
1427750463
1
t5_2fwo
null
null
null
True
zzyzzyxx
null
It decays to an lvalue, just a non-modifiable one.
null
0
1318980061
False
0
c2skikk
t3_lgfp0
null
t1_c2skikk
t1_c2skg8n
null
1427750460
4
t5_2fwo
null
null
null
True
Maristic
null
> Sorry, but your first question just smacks of being a weenie question. Uh, duh. The whole context here is “So you think you know C?”.
null
0
1318980136
False
0
c2skiyo
t3_lgfp0
null
t1_c2skiyo
t1_c2skh92
null
1427750466
1
t5_2fwo
null
null
null
True
theeth
null
Actually no, it's a Windows platform specific because they use LLP64 as their data model. Even GCC on Windows has 32 bit longs.
null
0
1318980324
False
0
c2skjvf
t3_lgjhl
null
t1_c2skjvf
t1_c2sifej
null
1427750480
5
t5_2fwo
null
null
null
True
lordlicorice
null
int is only guaranteed to be 16 bits. I tried to be smart: http://i.imgur.com/QbURh.png
null
0
1318980335
False
0
c2skjx0
t3_lgfp0
null
t1_c2skjx0
t1_c2siynb
null
1427750480
15
t5_2fwo
null
null
null
True
elder_george
null
I think there's some misunderstanding here. I *don't* argue this code is correct. What I say is code using `volatile` for cross-thread communication will be probably incorrect as well because of relative weakness of C/C++ memory model. Because of this, in my opinion, one *shouldn't* just share unguarded `volatile` ...
null
0
1318980400
False
0
c2skk7w
t3_lgjhl
null
t1_c2skk7w
t1_c2skbbt
null
1427750485
6
t5_2fwo
null
null
null
True
Rhomboid
null
Almost all 64 bit operating systems of today are either LP64 or LLP64, and therefore have 32 bit 'int' types. You'd have to be talking about some obscure Cray supercomputer from the early 90s to run into ILP64.
null
0
1318980644
False
0
c2skldn
t3_lgfp0
null
t1_c2skldn
t1_c2siynb
null
1427750496
8
t5_2fwo
null
null
null
True
how_gauche
null
> The problem I see with Haskell, Lisp, Prolog, whatever, is that they are great for toy problems. They work fine in universities, where the professor invents the problems he wants to solve. The "problems you see" are figments of your own imagination, and your ignorance of what Haskell is and what it does shine thr...
null
0
1318980867
False
0
c2skmey
t3_lfm1k
null
t1_c2skmey
t1_c2sjovl
null
1427750508
0
t5_2fwo
null
null
null
True
sltkr
null
> Not necessarily 32 bits. In this case yes, except that I actually made an error: it's 31 bits. Exactly 31 bits, regardless of how big integers really are, due to the way modular arithmetic works: the higher bits don't influence the lower bits when adding or multiplying.
null
0
1318980888
True
0
c2skmif
t3_lfsfk
null
t1_c2skmif
t1_c2shpx7
null
1427750511
1
t5_2fwo
null
null
null
True
flukshun
null
what assumption are you referring to? edit: ahh, i'm guessing this one: >In this case, sizeof(int) is 4. fair enough...though on x86 that's a pretty safe assumption. anyone know of some architectures where that's not that case?
null
0
1318981113
False
0
c2sknm5
t3_lgfp0
null
t1_c2sknm5
t1_c2sjnsr
null
1427750530
0
t5_2fwo
null
null
null
True
rampant_elephant
null
It wouldn't be excessively hard in the JavaScript to have two correct answers - and to display a hint that if you enter xxx08 as the first answer that 8 byte ints are unusual.
null
0
1318981131
False
0
c2sknnf
t3_lgfp0
null
t1_c2sknnf
t1_c2shfrc
null
1427750530
1
t5_2fwo
null
null
null
True
[deleted]
null
You could guess based off your anecdotal assumption of "raw numbers," or you could actually read the link: "Many 64-bit compilers today use the LP64 model (including Solaris, AIX, HP-UX, Linux, Mac OS X, FreeBSD, and IBM z/OS native compilers). Microsoft's Visual C++ compiler uses the LLP64 model. "
null
0
1318981151
False
0
c2sknso
t3_lgfp0
null
t1_c2sknso
t1_c2sjfq6
null
1427750533
3
t5_2fwo
null
null
null
True
insanemal
null
Yeah.. it might do things like act as a frame-buffer target. Imagine what magic you could do with one of those... If only people had them years ago.. we could have had all kinds of cool things. I'm just glad they combined this with a high speed language like JS. No point in wasting mountains of CPU cycles for things ...
null
0
1318981295
False
0
c2skofq
t3_lg6zg
null
t1_c2skofq
t3_lg6zg
null
1427750542
5
t5_2fwo
null
null
null
True
Naatan
null
My sentiments exactly. I don't get why people use that license.. it practically makes your software unusable to 99% of the developer community. I love Open Source but I have serious problems with any one license, open source or otherwise, enforcing you to license your own product in a certain way.
null
0
1318981321
False
0
c2skojw
t3_lbalr
null
t1_c2skojw
t1_c2s5dsv
null
1427750543
1
t5_2fwo
null
null
null
True
aaronla
null
Pardon the late reply, it's been a busy day. This too can be a nice approach, provided that long long is sufficiently sized (it usually will be) and long-long arithmetic is available to you (not always available in embedded applications). Good analysis too. I'm curious, might your approach depends more heavily on inde...
null
0
1318981363
False
0
c2skoqb
t3_lfsfk
null
t1_c2skoqb
t1_c2sezw7
null
1427750545
1
t5_2fwo
null
null
null
True
ewiethoff
null
From [The Blob AntiPattern](http://sourcemaking.com/antipatterns/the-blob): > Do you remember the original black-and-white movie The Blob? Better than you do, pal. It was in color. > Whenever the jelly thing eats (usually unsuspecting earthlings), it grows. Meanwhile, incredulous earthlings panic and ignore th...
null
0
1318981376
False
0
c2skosi
t3_lg6ms
null
t1_c2skosi
t3_lg6ms
null
1427750545
5
t5_2fwo
null
null
null
True
1010011010
null
I know, let's use two shitty things!
null
0
1318981434
False
0
c2skp27
t3_lg661
null
t1_c2skp27
t3_lg661
null
1427750547
2
t5_2fwo
null
null
null
True
[deleted]
null
> Because of this, in my opinion, one shouldn't just share unguarded volatile variables between threads. I never said "volatile" was *sufficient for all cases* - just that *occasionally* it is also necessary. Largely, it's necessary to tell the optimizer "leave this variable alone, you can't assume it doesn't chang...
null
0
1318981479
False
0
c2skpa1
t3_lgjhl
null
t1_c2skpa1
t1_c2skk7w
null
1427750555
-4
t5_2fwo
null
null
null
True
birdFEEDER
null
This is exactly what I assumed. In the absence of a defined sizeof(int), I assumed 64 bits since it was stated that it was a 64-bit system.
null
0
1318981532
False
0
c2skpjd
t3_lgfp0
null
t1_c2skpjd
t1_c2sjfos
null
1427750552
12
t5_2fwo
null
null
null
True
elsjaako
null
Couldn't you just give another answer when the +8 solution was given? Not that it really matters, you're not basing test scores on this. Anyone who got this wrong because they used the wrong int size knows they sort of got it right.
null
0
1318981765
False
0
c2skqnj
t3_lgfp0
null
t1_c2skqnj
t1_c2shfrc
null
1427750564
1
t5_2fwo
null
null
null
True
w_daher
null
Agreed.
null
0
1318981921
False
0
c2skrej
t3_lgfp0
null
t1_c2skrej
t1_c2sk2bl
null
1427750570
1
t5_2fwo
null
null
null