« first day (419 days earlier)      last day (4530 days later) » 

Xeo
12:00 AM
else no
 
it would be way cooler if it did
 
so range() needs a begin() and end().
 
Xeo
@keithlayne Why?
There'd be no difference
And no gain
 
because I said so, dammit!
 
Xeo
Shaddup
 
12:01 AM
okay, seriously, is there a way to iterate over a range of ints with the new for?
besides specializing your pair on ints, that is
 
Xeo
Not directly, but Boost.Range has irange :)
And it's actually quite a hassle to make that type yourself
 
If you could overload operator* for ints, it would be enough :)
 
Xeo
with all the iterators and stuff
 
Not my words! Stepanov's!
 
Xeo
Yeah
 
12:02 AM
@Xeo really?
 
Xeo
struct myint{
  int i;
  int& operator*(){ return i; }
  myint& operator++(){ ++i; return *this; }
  // ...
};
 
would be great for vector, etc. initialization by iterators
input iterator is all it would need to support
 
@keithlayne There's std::iota.
 
Xeo
for(auto i : make_range(myint{0}, myint{10})){
  // iterate 0..9
}
 
@RMartinhoFernandes it's nowhere near as awesome
 
12:05 AM
std::vector<int> x(10);
std::iota(x.begin(), x.end(), 0);
 
that syntax is wrong, robot
it's UB
 
Syntax is correct!
 
Khehe, iota, nice try.
 
Xeo
@RMartinhoFernandes What the fuck does iota stand for?
 
Anyway, I wrote that make_range thingy.
Because why not. It probably has bugs anyway.
That'd be an achievement, I guess.
 
12:07 AM
@Xeo It's a greek letter: ι.
 
Xeo
Grrreat... And why is it named like that in the stdlib?
 
Go uses that for enums and whatnot.
 
Wait, it's real. Do I feel silly now.
 
12:09 AM
Well, no, I don't, sleep deprivation.
 
@CatPlusPlus What is real?
Deep question.
 
Square root of two.
 
"iota" means "the slightest amount".
 
@RMa I was looking up the syntax to smack you with it, realized your whore self edited it.
 
@keithlayne The syntax was correct!
All parentheses were matched and all that.
 
12:11 AM
douche
 
Xeo
@RMartinhoFernandes Great, clang doesn't like that move construction from pointer to pointer -.-
 
What move construction?
Also, OMG, I wrote char x[] = "blah";! How could I?
 
That's fine.
 
Xeo
@RMartinhoFernandes In make_pair and the return value from it
 
12:15 AM
So, make_pair for pointers is broken in clang?
 
Xeo
seems like it :s
or rather, not make_pair
 
Xeo
but move construction of pointers
lemme test
woops
there is a * missing
 
Lol.
Fail.
Also why C++ grammar sucks balls.
Anyway, screw that assignment, I'm going to sleep.
 
Xeo
12:18 AM
xeo@void:~$ cat Desktop/t.cpp
#include <utility>

int main() {
  char *p1 = 0, *p2 = 0;
  p1 = std::move(p2);
}
xeo@void:~$ clang++ -std=c++0x Desktop/t.cpp
In file included from Desktop/t.cpp:1:
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4/utility:62:
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4/bits/stl_pair.h:60:
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4/bits/move.h:57:14: error:
      rvalue reference to type 'typename std::remove_reference<char *&>::type'
now
 
Also, null fucking ptr.
Would have made the error obvious before.
 
Xeo
yeye
GCC 4.5.1 runs fine
and MSVC10 too
 
Of course it does! GCC is not a pile of shit.
Oh, wait.
 
Xeo
So yeah, Clang bug I'd guess
 
Watcha waitin' fo'?
Report it.
When I finally switch to clang I want that shit perfect.
 
Xeo
12:24 AM
@RMartinhoFernandes Looking through SO to see if a thread already exists. :P
I'll just ask it as a question, and @JohannesSchaublitb will surely point me to an already long submitted bug report :P
 
Ok. I'm going to sleep.
 
Xeo
I'm soon going to follow suit
 
You gentlemen have a good night.
 
Xeo
@RMartinhoFernandes Ha, it was a bug in stdlibc++ that made clang error. Seems like GCC 4.5.1 doesn't have that fixed yet.
 
sbi
Wow, The National and Bon Iver on stage together. I wish I had seen that myself. I'm always surprised when two singers/bands I like suddenly collaborate whereas I hadn't known that they even had heard of each other.
 
12:35 AM
Hrm, want a syntax filter for my new language: C++ -> CC.s/::/ ( . ) ( . ) /g
It's pronounced "pair of C's"
 
sbi
Anyway, I'm done playing into Santa's hands for tonight. It's late, I'm tired, and I gotta get up in little more than 4hrs. I'd better be going to bed. G'night everybody!
 
Xeo
G'night from my side aswell
 
All namespaces are delimited by boobs.
std::pair<T, U> => std::nice_pair<D, DD>
 
Xeo
@RMartinhoFernandes your ideone code works perfectly fine now, after fixing two lines in libstdc++'s move.h header. :P
 
 
2 hours later…
2:29 AM
hello
 
Am.
3:27 AM
Is there much difference in programming C++ in Visual Studio compared to Nokia's Qt creator?
 
There are differences between Visual Studio versions regarding C++ language features. So I would imagine there would be implicit differences between the two compilers.
What are you aiming at doing Am?
 
3:44 AM
Is there anything to do about serial upvoting? A guy just went through and upvoted all my answers that had a negative score.
 
3:58 AM
They do get canceled out by the script at the end of the day. I'm not sure on the exact time though.
 
4:48 AM
Who here is in the sf bay?
 
sf bay?
 
san francisco bay area
 
@dreamlax & @MooingDuck I figured out what was happening. I was using the parent class constructor, and since I didn't have access to the parent class' private date, I wasn't actually creating a list with my derived classes. I ended up just writing a constructor for each of my derived classes and it ended up working right.
@Anfurny Oh, I thought you meant Science Fiction, lol. And that's my fav SE site.
 
5:04 AM
ah hah
 
@OghmaOsiris Thanks so much for helping me! I was able to figure it out from the debugger. I was checking EVERYTHING expect for 1 counting variable that I was overlooking. That counter variable was what tipped me off to the whole thing not being initialized properly. Again, thanks so much!
 
5:16 AM
Did you just say that at yourself?
 
@Anfurny Yeah, it was a continuation of the other long one I wrote, lol
 
5:40 AM
Should I be concerned that valgrind says this: ==3989== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from 6)
why did it suppress 6 from 6
what does that mean
 
 
2 hours later…
7:52 AM
ohau
 
8:15 AM
Mawning :)
 
8:34 AM
¬_- ... morning...
 
9:29 AM
Hello all
Whats up
 
Morning
Today I slept until 10:20, that's 9hours of sleep! It was really needed
 
Try to think of new c++11 questions
Try to think of new c++11 questions
 
So that you can answer them and get rep?
 
No
So that i have another question
 
for what? =)
 
9:33 AM
@ManofOneWay ¬_¬ time zones... it's too early to comprehend them right now
 
For the lulz
 
I can give you some compiler questions instead
 
@thecoshman You're from the UK ? =) Then it's not too early!
 
@ManofOneWay ಠ_ಠ
 
9:47 AM
lol
 
@DeadMG How's the compiler going?
 
and fyi, I am from the UK, I live in Ireland now
and it still too early
 
still working
but I can start JITting simple code soon, I hope
 
What language are you compiling?
 
my own
 
9:59 AM
@ManofOneWay that
 
@DeadMG How does it look? =)
 
a bit like C++ but no templates
 
@DeadMG I've been wanting to write my own language/compiler for a while now. I've got "the dragon book", are there any other recommended reads?
 
book reading is for pussies
 
10:01 AM
@dreamlax modern compiler implementation in C/Java/ML is a good book
it's more practical than the dragon book
 
who'd want to implement a compiler in any of those languages?
 
Sounds a bit more modern by the sounds of it
 
@DeadMG your using...?
 
@DeadMG diku.dk/hjemmesider/ansatte/torbenm/Basics might be worth a peek as well, especially for the price (free)
 
C++ of course
 
10:02 AM
and compiler implementation was one of the design goals with ML :)
 
didn't know that, truthfully
 
And of course, lots of people want to write everything in Java because that's all they know
 
the only thing I know about ML is that I very rarely see questions on it
 
And I guess C is just a useful common denominator. If a book describes how to do something in C, then everyone can read it and get something useful out of it
 
so I kinda assumed that it would have virtually no support
 
10:03 AM
Yeah.. I have the C book
 
My brother is a heavy Java developer... he swears by it... I haven't been programming much lately but it's mostly been in C or C++, or occasionally Objective-C
 
Wow, chat just crashed Chrome
well, part of Chrome
 
anyway, the differences between those 3 editions are pretty minimal. In our compiler course at uni, we were told to just buy one of them, whichever language we preferred
 
it was out of memory, but nor really. My whole system froze to a crawl though
 
@dreamlax here, we mainly swear at it
 
10:05 AM
@DeadMG What intermediate languages are you using? RTL?
 
@jalf: Haha, yeah I kinda gathered. I've never bothered to learn it... it seems so popular yet I've never been motivated to try it out
in fact I've played around with C# considerably more for some unknown reason
 
@ManofOneWay LLVM IR
wtf is RTL?
@dreamlax Java is like C#, but with almost all of the good, useful features cut
 
Maybe RTL is defined in one of those pussy books
 
In computer science, register transfer language (RTL) is a term used to describe a kind of intermediate representation (IR) that is very close to assembly language, such as that which is used in a compiler. Academic papers and textbooks also often use a form of RTL as an architecture-neutral assembly language. RTL is also the name of a specific IR used in the GNU Compiler Collection, and several other compilers, such as Zephyr. In GCC In GCC, RTL is generated from the GIMPLE representation, transformed by various passes in the GCC 'middle-end', and then converted to assembly language. G...
sound icky
oh GCC crap
 
@DeadMG: Ah... I'll continue to steer well clear of it then!
 
10:08 AM
well I'd certainly never use anything GCC-specific
unless I were forced to, fuck you LLVM
 
Has anyone looked at GCC source code recently? The last time I looked at it, it took my eyes weeks to recover
 
@DeadMG what's up with LLVM?
 
no linker
 
@DeadMG it uses the system linker
either binutils (through gcc) or MSVC's link.exe
 
right
but I certainly can't ship MSVC's linker to anyone who wants it, it goes against the licence agreement
so effectively, I have to use the GCC linker
 
10:09 AM
Yeah, or use the LLVM linker and run the code through JIT?
 
no
stand-alone executables only
 
@DeadMG: If it's alright with you, would you mind pasting a bit of your language in a pastebin or so... I'm interested to see it, purely for curiosity and learning purposes
 
are you kidding? it's only mostly defined
 
I remember a while ago, someone kicked up a fuss about Wikipedia deleting a page this guy wrote about his own language called Seed 7. I was more-or-less interested in it just because I like seeing new things, but the language didn't particularly offer anything revolutionary or circumvent existing language design flaws.
The website also looks ilke it belongs on Geocities or something
It reminds me a lot of pascal with all the "begin" and "end"
 
@DeadMG afaik there are people working on a llvm linker. So just wait a year or two. ;)
 
10:22 AM
lol
hmmm
 
@jalf see above github repo. I hope it'll take a bit less long than two years....
 
just realized that I don't have unions, which is no big deal for me, but I need them to interop with C code
 
If anyone here wants to experiment with Clang/LLVM or GCC's std::thread support on Windows, help yourself to my toolchain builds: sourceforge.net/projects/mingw-w64/files/…
For a 32-bit version, just change the 64 to 32 in the link
For Clang you'll need both the gcc and clang package, see above discussion about missing linker
 
@DeadMG depends on how much you want to interop with C code. Plenty of languages don't have unions (because they're really really icky if you want reasonable type safety)
 
no language is useful without C compatibility
 
10:30 AM
@rubenvb what's the status on all this for msvc?
 
you can't even write to a file with the Windows API without using a union
 
@DeadMG Sure you can. Just not via Windows.h
Look at .NET's p/invoke
or, well, any other language's interop mechanism
 
sure, but one of the parameters is a union
 
@jalf the main problem is linking: Clang uses a different ABI (calling convention stuff) and name mangling, so you can generate all the Clang C++ code you want, you won't be able to link with MSVC's STL
 
a pointer to it, I guess
you could just enforce it's non-use, it's not that important
 
10:31 AM
@DeadMG one of which parameters?
 
And exceptions are equally broken on MSVC Clang.
 
to WriteFile
you can't even prototype the function without being able to describe the union
 
@DeadMG you don't need to, if you're in another language. :)
 
lol
 
Only C/C++ need prototypes in the first place
 
10:33 AM
well, sure, I could special-case the Windows API or write a C++ wrapper over it, I guess
but that's not very general-purpose
every language needs prototypes for functions that won't exist until run-time- even .NET has them with P/Invoke
 
but the prototype doesn't have to exactly match what's specified in windows.h
 
well, of course, there's some translation
 
it just has to be close enough that your compiler can generate code that uses the correct abi
 
but you can't lose the core concept, or the result won't work
 
translate a union into a variant or something, perhaps?
 
10:35 AM
typesafe variants aren't ABI compatible with unions
 
AFAIK, LLVM abstracts everything away to the level of it's IR structs, properly aligned.
and codegens the calls from there with proper arguments in the places where they belong.
 
in your language, you specify a prototype for the function which takes a variant of the possible union members. Then your compiler generates code to convert that into a union
or just do as .NET does: the parameter is a pointer, not a union
So they jsut pass it as IntPtr
 
yeah, it is a pointer, and I could just call it void*
but then, it's not exactly going to be easy to pass anything other than null for such a parameter
that reminds me, I forgot null, true, false and a bunch of other useful keywords :P
I guess I could just make the user do the casting
 
10:57 AM
obtw
what do you guys think of using += and -= instead of << and >>?
 
@DeadMG for streaming? Or for shifting?
 
streaming
 
I'd say you're going from iffy to evil.
 
well, imo, + for insertion makes a lot more sense than <<
but oh well, I could just stick with the C++ operator
 
I disagree. + implies the existence of - as well
also, you're not building a string, which is a sort of meaningful use of +
you're pushing data to a stream
 
11:01 AM
there is a -, extraction
 
Does there need to be an operator for inserting/extracting? Are there any other languages with an operator like C++'s? (genuine questions)
 
most use shitty string interpolation
like Console.WriteLine("{0} + {1} = {2}", 5, 5, 10);
 
Anyone understand this question? What's a 2D ring buffer? A torus buffer?
 
@KerrekSB fairly sure it would be where you have an array, that you keep adding to, but wrap around once you overflow. Kind like a FIFO stack
not actually read the question, but that's what I asume he is on about
 
that's a regular ring buffer, not a 2D ring buffer
 
11:12 AM
having read the question... huh
 
maybe it's just a ring buffer of ring buffers?
 
@DeadMG that
but then... the idea of a ring buffer is the FIFO access isn't it...
 
@thecoshman A ring buffer isn't really FIFO.
 
@KerrekSB that's the main reason I would use such a system...
 
11:21 AM
What's with all the silly flags?
 
you know... if find it very hard to take you seriously @cat just because of your name... I'm sorry :(
 
@CatPlusPlus I was just wondering exactly that
especially the "I just reject one more than you" one
 
I don't think anyone ever took me seriously.
2
 
I just voted "invalid" on all of them
 
@CatPlusPlus huh... that's kind of like saying "this sentence is false"
 
11:24 AM
It's simple fact, not a paradox.
 
@thecoshman True.
 
@CatPlusPlus "kind of"
 
11:47 AM
Do you understand the third question there?
I don't understand how you could generate code out of that if you don't know what the predicate and expression are.
 
sbi
12:27 PM
This is a nicely presented statistic about the 10billion app downloads Android counted this months.
 
I wonder what's in the Other category.
 
porn, obviously
 
sbi
12:45 PM
@RMartinhoFernandes Other stuff, usually.
 
Right, of course. How could I forget that.
 
sbi
@RMartinhoFernandes Being a robot, how could you forget anything?
Speaking of which, I noticed a considerable increase in your need to edit your messages. :)
 
I think I'm garbage-collected. I can't forget things on purpose, but if I don't use them for some time, they're gone.
 
keep in mind he's a robot from the fifties
2
 
23rd century!
 
12:56 PM
oh my bad
 
@sbi is that... exponential growth o_0
 
sbi
@RMartinhoFernandes Yeah, but from a 23rd century as envisioned in the 50s!
 
@sbi so shiny :D and such short skirts ¬_¬
 

« first day (419 days earlier)      last day (4530 days later) »