« first day (844 days earlier)      last day (4096 days later) » 

12:00 AM
It's worth those nuissances.
 
I hate it when a game has 50 save slots and I used them all.
It breaks the system.
 
save back at 1
 
I usually want to preserve early saves, for some reason..
 
Anyway, manual saving is fucking lame
 
@BartekBanachewicz But I'll keep it in mind for next time!
 
12:01 AM
the game should just unlock the parts you passed permanently
 
@BartekBanachewicz akin to slavery
 
@StackedCrooked heh, we used to do it in system shock 2. The game is great, but crashed roughly every 10 minutes
 
lol
 
12:02 AM
Reminds me of the Win98 days. Reboot after each online game.
@DeadMG Yes she can! Yes she can sir..
 
@BartekBanachewicz I didn't have an issue with SS2 MP.
you just have to get a decent user-made patch for vaguely decent stability on a modern machine.
 
@DeadMG modded or vanilla?
ah, yeah, mods solve it a bit.
 
vanilla at the time I played it
 
I remember when random stranger, asked about the game's creation date, missed... by 10 years.
 
lol
what, 1988? :P
 
12:05 AM
The first Java lambda's are being written at this very moment.
 
nah, the 10 years to the future
@StackedCrooked 0 fucks given by C++11 and Scala
 
Ell
are lambdas essential in a kitchen sink language now?
 
And all the other JVM languages.
Java is a really bad language.
4
It compensates for its verbosity by relying on IDE code generation.
That's so wrong..
 
Scala is a bit better
still, JVM sucks horribly
I even dislike Marshall JVMs :P
 
I read that JVM is actually good and that it's just Java that sucks.
 
12:08 AM
whatever. minecraft sucks because java
that's all i got to know
 
lol, I never actually played minecraft.
 
wait for my C++ version then.
 
user142019
@Ell depends on the paradigm.
 
user142019
For FP, OOP and IP, I'd say yes.
 
12:09 AM
Disclaimer: that might require a bit of patience
 
It depends on nothing.
Lambda's are like your hand and feet.
Nobody would complain if it was written in Python.
 
Ell
I'm just thinking. at the minute I see lambdas Just as convenience features
 
user142019
I need to find a good way to structure an AST.
 
user142019
I have never done this kind of thing before.
 
user142019
There are declarations, statements and expressions.
 
12:11 AM
@Ell Starting to use lambdas is like starting to walk on two legs instead of crawling on the floor.
 
fuck
is unsigned char and char guaranteed to be the same size?
 
user142019
Yes.
 
user142019
They're both one byte in size.
 
So it's safe to do raw copy of vector<unsigned char> into vector<char>?
 
@BartekBanachewicz Aliasing any type to either char or unsigned char is allowed. So you should be fine.
 
12:12 AM
Hm, should data from file be read as char or unsigned char?
 
@BartekBanachewicz always the latter, unless it's text
 
(sorry for all of the questions so rapidly)
 
If it's an old file I'd go for char.
 
user142019
Oh heh. Good guy C# standard has appendix with BNF notation of the entire language.
 
@BartekBanachewicz For some values of safe. If it contains values that won't fit in a signed char, it might not be so good (though on any practical system, it'll leave the bits intact and interpret them as unsigned).
 
user142019
12:13 AM
I can map this directly to Parsec! \o/
 
Does it make sense to make read<T>, and allow the user to specify if they want char or unsigned char then?
 
Ell
Isn't it a tree? I thought the clue was in the name o.O
 
@BartekBanachewicz Don't bother. The user can always cast to char/unsigned char if he/she really wants to.
 
I wanted to read values from files as unsigned chars, but OpenGL requires char. Shader code is only text, though.
 
@Zoidberg You probably can, but quite possibly don't want to. I haven't looked at C#'s very closely, but the BNF in many standards isn't what you'd want to use for a real parser.
@BartekBanachewicz I'd have to check to be sure, but I think GLSL restricts it to characters in a range where any sort of char should be fine.
 
12:16 AM
@StackedCrooked Okey. So, I know you're great and helpful, and you'll certainly be able to tell me how to create a vector<char> from a temporary vector<unsigned char>
 
@StackedCrooked Yeah, I was wondering where the votes were coming from.
 
So that no copy occurs.
I'm not quite sure where I should cast
 
@BartekBanachewicz reinterpret_cast :P
That would be UB actually.
I think.
 
I think that too -.-
 
Without a copy it's not possible.
 
12:18 AM
I'm going to Stack Overflow with it then
 
No copy?
lol
 
NO COPY
 
unless it isn't on SO it isn't proven :)
 
Without a copy you'd end up with two vectors having ownership of the same data.
 
Ell
Damnit. I'm falling asleeep. Help me!
 
12:27 AM
Go to sleep
 
@Ell Pick november or december 2010. Maybe december is best for quick effect. November is more long term.
 
@StackedCrooked std::move
0
Q: How to convert std::vector<unsigned char> to vector<char> without copying?

Bartek BanachewiczI weren't able to find that question, and it's an actual problem I'm facing. I have a file loading utility that returns std::vector<unsigned char> containing whole file contents. However, the processing function requires contiguos array of char. Since the class that's using the processing ...

 
@Ell Btw, are you in US? It's only about 7-8 PM there, not?
 
I feel stupid but (IOW sizeof(char) == sizeof(unsigned char)) isn't this obvious?
 
@Rapptz maybe it is, but it's very important to the question
crucial, I'd say
I am afraid that StackedCrooked might be right, and these two are totally different types -.-
damn fuck
 
12:36 AM
I actually don't even see why you're switching around lol
 
reinterpret_cast<char>(unsigned char) is invalid. Static cast, on the other hand, isn't -.-
@Rapptz opengl wants char**
 
int main() {
    unsigned char b = 'a';
    char c = (char)b;
}
lol
 
that's C-style cast
 
I know
 
Anyone here from Austin?
 
12:40 AM
@StackedCrooked Thankfully, no.
 
Most of coliru's visitors come from Austin apparently.
Lol, I got the wrong site. That's for my anime plugin.
 
lol
 
The real numbers are more humble.
 
@BartekBanachewicz Just read your data as char. Seriously. See the GLSL spec, section 3.1. The only place you can get something that won't play nice in ASCII (for example) is comments, which you don't care about anyway.
 
32 mins ago, by Bartek Banachewicz
Does it make sense to make read<T>, and allow the user to specify if they want char or unsigned char then?
 
12:46 AM
@BartekBanachewicz Short answer: no, it doesn't. Just use char.
@StackedCrooked Are those total visits or distinct IPs?
 
@JerryCoffin what about binary files? Functions reading them will require vector<unsigned char> =.=
 
Total.
 
@BartekBanachewicz You are still talking about reading GLSL, right? The spec is very specific about what characters are allowed, and it's pretty restrictive (everything it allows falls within ASCII).
 
@JerryCoffin the point is there's one function, ReadFile, that's gonna be used for both textual and binary files -.-
and, as I said, I could make two versions of it either explicitly or by template
I think I will make it template. That way I could even read it in bigger chunks
 
@JerryCoffin So, basically, it's a handful of users :)
 
12:53 AM
@BartekBanachewicz Yes, you could. Are you accomplishing anything by doing so? C and C++ have both done pretty nicely for quite a while with their low-level functions only reading/writing char.
 
@JerryCoffin but the other libraries require unsigned char* -.-
 
@Rapptz cuteness overload
 
Well, my kids are demanding supper. I'll be back later.
 
> renaming.py "screen size"
file opened OK
Traceback (most recent call last):
  File "D:\media\astronomy\hubble top 100 images\renaming.py", line 12, in <modu
le>
    for item in top100list:
  File "C:\Program Files (x86)\Python32\lib\encodings\cp1252.py", line 23, in de
code
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 63: chara
cter maps to <undefined>

[D:\media\astronomy\hubble top 100 images]
>
grr
a 1252 codec that can't deal with a byte value, a round double quote character.
 
oh damn now I need type erasure -.-
 
12:58 AM
i remember this from last year, python can't deal with windows text files. it's extremely annoying
@BartekBanachewicz u don't
 
@Cheersandhth.-Alf the file loading function is virtual
<headdesk>
 
Can they track laptops by their serial number?
 
they can track you anywhere
 
@Crowz no, but @StackedCrooked can track u by ur IP address
 
Yay
 
1:02 AM
He reminded me I needed to block google-analytics :P
 
oh it was my own fault. the file was utf-8, and python was not smart enough to recognize the encoding
 
FFS
m_FragFileData = std::vector<char>(
    reinterpret_cast<char*>(Frag.get().data()),
    reinterpret_cast<char*>(Frag.get().data() + Frag.get().size()));
yay, that's really great code -.-
 
i think you can do that easier, because i seem to recall overload where 2nd arg is size
 
@Cheersandhth.-Alf nope. It's { count, value }, and means something completely different
 
This question is something you should ask your debugger, not StackOverflow. — Rapptz 8 secs ago
 
1:10 AM
I'm an amateur, I'm not really professional with IDEs and don't do any corporate work. — sharksfan98 56 secs ago
I don't think you need to be a professional to know what a debugger is.
 
@BartekBanachewicz i'm pretty sure you're wrong there. lemme check
 
fucking vector fuck
-.-
I'm better off with memcpy, seriously -.-
 
@Bartek: We did you give up the template-based solution?
 
@AndyProwl the file reading function is virtual
 
Ok. But I'm stumped on this one. Your comments are obsolete, and I prefer you help me on this one (I'm 14 and don't have any money), or leave with your snippy comments. As an Open-source collaborator, I hope people would be nice enough to contribute for free. — sharksfan98 1 min ago
?_?
 
1:15 AM
@Bartek: I see. Well, I don't think there is a way out. You will likely have to live with the copying
Or rewrite LoadFile for signed chars
Write another version of LoadFile I mean
 
std::copy(Frag.get().begin(), Frag.get().end(), m_FragFileData.end());
fuck it, we'll do it live
 
@Bartek: the last argument doesn't look good. Did you mean .begin()?
 
@AndyProwl if the m_FragFileData is empty, begin == end
 
@BartekBanachewicz sorry, you're right. i half-remembered the wording about the iterator argument constructor changing in c++11. and it did but it was not as i recalled.
 
Stackoverflow is a question and answer site. I don't believe that include insulting the Op. Go back to reddit if you want to behave like this @Rapptz — sharksfan98 56 secs ago
^^ ouch...
 
1:19 AM
@Bartek: Then you'll have to use an insert iterator. copy() won't add elements to your container
 
you can use a std::back_inserter to use copy though
 
@BartekBanachewicz A simple for loop should do. You could use dst.reserve(src.size()) before.
memcpy will also work.
If you resize first.
Don't fret.
 
Thought I would give Boost.Coro a try, and as it turns out the docs are misleading from the very start. A portent of things to come?
 
I used back_inserter
 
std::copy(src_start_iter, src_end_iter, std::back_inserter(my_vector))
 
1:23 AM
Misleading docs are not necessarily a sign of bad code.
 
I gave coroutine a try today as well. Needed some help though.
 
@Cheersandhth.-Alf WTF about stdio.h?
zomg
comments got modded
 
It DID deteriorate pretty badly...
I wish 10ks could see deleted comments.
 
fuck it I closevoted it
OP is an idiot
what else do we need to take it down, really? -.-
 
1:29 AM
guys I hate people :(
 
@Mysticial nothing to see, really.
 
@BartekBanachewicz it's pretty ungood to use <cstdio> in C++11. because in C++11 it can freely place names in the global namespace. which means that code using e.g. unqualified printf will most likely compile, but not necessarily on some other compiler
 
@Cheersandhth.-Alf what do you mean by "on some other compiler"
 
some compiler that complies with the C++03 requirements
 
it's pretty fucking useless to use either version, actually
 
1:31 AM
although i don't know about one
:-)
 
exactly.
 
better safe than sorry, that's my view of it
 
also, please don't use the word "ungood"
 
Orwell (1984)
that gives me creeps, really.
 
1:33 AM
u know the etymology of "c++" don't u?
 
actually, no. Well, C++ language is an obvious derivative of the C operator, but I don't know the origin, no
 
@BartekBanachewicz I like that word.
 
@Mysticial have you read 1984?
 
@BartekBanachewicz No, but I hear it enough to know it.
 
@Mysticial Well, so you should be able to understand my feelings towards this word.
 
1:36 AM
@BartekBanachewicz "Stroustrup addresses the origin of the name in Chapter 1 of his book, The C++ Programming Language, remarking that another interpretation of the C++ name could be seen from the appendix of George Orwell's Nineteen Eighty-Four. Of the three segments of the fictional language Newspeak, the "C vocabulary" is the one dedicated to technical terms and jargon. "Doubleplus" is the superlative modifier for Newspeak adjectives. Thus, "C++" might hold the meaning "most C-like" in Newspeak. "
 
@BartekBanachewicz In other words, your feelings towards the word "ungood" are ungood.
 
@Cheersandhth.-Alf oh gawd.
 
C# has much nicer etymology
 
????
 
1:39 AM
8 mins ago, by Cheers and hth. - Alf
@BartekBanachewicz it's pretty ungood to use <cstdio> in C++11. because in C++11 it can freely place names in the global namespace. which means that code using e.g. unqualified printf will most likely compile, but not necessarily on some other compiler
 
I need to know if I should use <csomething> headers or <something.h>.
I had always used <something.h>, then I started always using <csomething>, and now everything I believed turned out to be fake!
 
Don't use either <stdio.h> or <cstdio>
both suck
simple.
C library should be removed from C++ in C++Next. I never understood the reason to drag this crap around
 
I like <cassert>
 
i believe there's boost for that
 
So... Graphics Software Intern? Do you work with opengl?
 
user142019
1:50 AM
Left "(unknown)" (line 1, column 21):
unexpected "@"
expecting "abstract", "as", "base", "bool", "break", "byte", "case", "catch", "char", "checked", "class", "const", "continue", "decimal", "default", "delegate", "do", "double", "else", "enum", "event", "explicit", "extern", "false", "finally", "fixed", "float", "for", "foreach", "goto", "if", "implicit", "in", "int", "interface", "internal", "is", "lock", "long", "namespace", "new", "null", "object", "operator", "out", "override", "params", "private", "protected", "public", "readonly", "ref", "return", "sbyte", "sealed", "short", "sizeof"
 
user142019
lol.
 
2:06 AM
@andr yeah, with ES mostly
 
2:30 AM
^ So good dancer it doesn't matter that it's all out of synch
 
@BartekBanachewicz damm! you have some mortal poison in your fingers... lol
 
2:43 AM
What?
@andré i totally didnt get that one
 
So what's the deal with doctor who? Is season 7 over?
 
3:00 AM
Hi guys
I've got great news
 
Dickbutt?
 
I found out, java's Hashmap pwns C++'s map
thats it, pwnage
 
3:10 AM
SO down?
 
not anymore
oy I finally get to close questions
 
@Rapptz congrates!
 
thanks :D
 
woah congrats!
Last time I checked you barely had edit privilege. Did you learn from Luchian? :)
 
3:27 AM
I just started posting answers more
 
Woah, did like half the people just disappear?
 
yeah SO outage killed everyone
 
I see a lot of your comentaries on newbies question suggesting then to "read a book".
Anyway, I answered a question of yours, did it help?
 
@Mysticial Quite a few of us were getting redirected to Area 51.
 
@JerryCoffin I surprisingly didn't...
I see that meta is all over it too.
 
3:28 AM
@Mysticial Yup -- like kids who've had their candy taken away... :-)
 
@AndréPuel Huh. Why are you in my room?
 
hey
lol
the stack outage killed you guys
 
@Rapptz That sounds so wrong...
 
@Mysticial Possibly! I meant chat room.
 
@Rapptz I am still figuring this chat thing out, I randomly clicked around and ended in "your" room
 
3:30 AM
Ah.
 
@AndréPuel It's not his room. If it was, his name would be italicized. :-)
 
@JerryCoffin It is
I didn't mean Lounge<C++> I meant RapphD
 
Although TBH, I would nominate Rapptz as the next room owner.
He's in here more than I am now.
 
You're never here. :(
 
@Mysticial Might not be a bad idea. We don't seem to be at our quota right now...
 
3:32 AM
I'm almost always lurking so I do see everything. But I've been mostly silent this past month.
 
Nothing wrong with not saying much.
 
@Mysticial The Revenge of Jay and Silent Mysticial!
 
@Rapptz Granted, I've been involved in a lot of admin work over at Anime.
But I still post here a lot more than I do there since obviously there's a lot more traffic here.
 
but we're also different people
probably a better reason than traffic I would think
 
Is it just me noticing this, or do a lot of things make chrome crash?
 
3:38 AM
@Crowz My Chrome crashes if I download something at a 50/50 chance and I still can't figure out why.
 
@Rapptz Same here, and recently, the back button on Netflix
 
Every few hours or so FF on my machine fails to find the network connection.
So I have to restart it.
Pisses me off.
 
I must be unique -- Chrome runs for weeks at a time for me, with no problems at all. Anymore, I only use FF when I need color management, but I can't remember the last time it crashed either.
 
GM @all
 
night
Damn... this finally fell off the front page of HN. I was enjoying those votes.
TIL: That question gets posted on HN every month.
 
3:47 AM
lol
 
I follow HN, but it has too much traffic for me to see everything.
I wouldn't know if any of my stuff was linked unless it made front page.
 
hi @Mysticial
 
hi
 
h r u?? @Mysticial
i am new to this room
 
busy
 
3:50 AM
oh!.. fine@Mysticial
 
I heard IA64 went "both ways" in the prefetcher when it had no BTB history. is that true?
 
I have no clue.
I don't even know for x86.
 
x86 relies on static predition: jumps back are assumed taken, jumps forward assumed not taken. there are prefixes that reverse that default though
 
@doug65536 The static prediction is when the branch history is cold.
 
0x2e prefix means hint-not-taken, 0x3e prefix means hint-taken
yes, Im talking about when it has no history
 
3:58 AM
Yeah, I wouldn't the Opcodes. I'm not THAT low-level...
 
@doug65536 Yes and no. No, it doesn't actually do this for branch instructions (would probably be pointless in most cases, because memory bandwidth and instruction decoding would be a bottleneck). What it does is add predication for lots of instructions (which isn't really new -- ARM does the same).
 

« first day (844 days earlier)      last day (4096 days later) »