« first day (475 days earlier)      last day (4456 days later) » 

1:00 AM
Your question didn't actually contain a question. Jon Skeet once wrote a post about how to write the perfect question
 
oh crap forgot to ask it
 
Xeo
Ah, I remember my other question
Robot! Ranges!
 
@RMartinhoFernandes You must be talking to my blocked user :) I can't make heads or tails of it, but apparently there was a bad question involved. Kind of gives it away
 
What about them?
 
Xeo
Twitter it as a question for GN :)
 
1:01 AM
@sehe Yeah, I gave up on the ignore feature before. It makes you see people talking to ghosts.
@Xeo But what question?
"Ranges?"
 
Xeo
mmm
 
@RMartinhoFernandes Today I got desparate enough to try again. It worked till 30secs ago
 
What was Andrei pointing to when he said "pure"?
 
Xeo
"What are the plans for ranges in the STL? Currently, STL algorithms aren't composable. Any plans?"
 
stud moves :)
 
Xeo
1:03 AM
I see I have that "plans?" question twice in there. :s
 
Too late.
What are the plans for ranges in the STL? Currently, STL algorithms aren't composable. Any plans? #ch9live
I know STL is not a big fan of Andrei's ranges.
 
Xeo
I want to see a bitch fight
But yeah, Andrei's ranges aren't great.
They look way too much like Java iterators
 
Neither is Herb, IIRC: his complaint is that the overloads might break existing code
 
Xeo
@sehe Indeed.
 
@Xeo That doesn't sound like a real problem.
It's not like they're contaminated because of that.
 
1:05 AM
Butttt let's not forget we have #include <boost/range/algorithm.hpp>, boost::sort(C) | filtered(pred) | transformed(f);
 
> Of course C++ is much better for kernel workers? Who would be stupid enough to say otherwise?
 
Is Herb implying that JSF runs on C++ software?
 
Will this question be deleted? stackoverflow.com/questions/9122398/…
 
Xeo
3
Q: How to create the Cartesian product of a type list?

Jared HoberockI'd like to create the cross product of a list of types using variadic templates. Here's what I have so far: #include <iostream> #include <typeinfo> #include <cxxabi.h> template<typename...> struct type_list {}; template<typename T1, typename T2> struct type_pair...

lol
Should I retag that as ?
 
1:08 AM
Oh no, help from D. Kuehl D:
 
@Xeo Brilliant
 
"(...) you're going to have a drop in performance-" "Hmm." "-I didn't say anything when you were talking"
 
Well he was getting interrupted for that :p
 
Beyond the joke, do you think he really had a legitimate thing to say against the others? :p
 
1:11 AM
See, Bjarne looks like a monk even as he destroying his opponent copresenter :)
 
@Xeo: here's your bitch fight.
 
@LearningC no one helped you
what a bunch of lazy and self proud robots :D
 
Paraphrasing Bjarne: "Java code is not kernel code"
 
Haha Herb making sure to destroy Andrei.
 
Hey, don't diss robots. Robots are awesome.
 
1:14 AM
"By the way, you were wrong."
 
> My code doesn't have bugs, Bjarne.
 
@DzekTrek Well there are people trying.
 
@RMartinhoFernandes TBH i'd consider the absense of error checking a gruesome bug - kind of makes the joke fall flat
 
ideone.com/gCprx here is most of what you need, however it lacks some code, as you will see because I want to give you something to think for. ;)
 
1:15 AM
Coroutines!
 
That panel still going?
 
@CatPlusPlus yup
 
@RMartinhoFernandes :D sure, robo lord.
 
raises hand
 
Envy? No, I get to use C#. Just not async yet
 
Xeo
1:17 AM
The next question: You have is_nothrow_copyable and stuff
 
now I need to go to work, if you ave some q. call me, maybe I won't reply instantenously, but I will.
 
Ozzie osbourne is lighting his face with face tanner in the audience there
 
are you wathing conference?
 
posted on February 03, 2012 by Herb Sutter

GoingNative 2012 Day 1 is just concluding, and we’re getting ready for Day 2 tomorrow with more C++11 information and panels. Day 2 kicks off tomorrow at 9:30am U.S. Pacific time, with the theme “C++11 Today and Tomorrow.” Day 1’s focus was entirely about C++11 as it exists today; Day 2 is partly about C++11 [...]

 
Xeo
The fuck?
 
1:18 AM
What?
 
Awesome, Herb is posting a blog post during his supposedly live cast
 
Herb is obviously writing behind his back.
 
And tweeting!
 
Xeo
He obviously planned that. :P
 
I prefer my version.
 
1:19 AM
GoingNative 2012: Day 2 Tomorrow (Friday) http://wp.me/peb5Y-mb
 
A TimeExpiredException sounds like a java Throwable
 
Xeo
So, I can finally go to sleep.
 
@RMartinhoFernandes it was interesting to see them actually argue on stage for a moment
 
Xeo
YaY
 
@Xeo +1
 
Xeo
1:19 AM
@MooingDuck Argumentation is good for language design. Otherwise you get Java.
 
good night
 
Welp, I'm not sure what I learned today other than how great the people behind C++ are in person.
 
@xeo java is so cool! :D
 
@Xeo it's not good on stage, it is good in the boardroom
 
@LucDanton I learned that you can put default at the top of a switch.
 
1:20 AM
@Xeo You must have missed all the evolution from Java 6 to Java 7? Too much argumentation and no (community) leadership is worse
 
@sehe all the evolution?
 
@RMartinhoFernandes So you learned something today, but you wish you didn't?
 
@LucDanton Kinda.
 
Xeo
Know what's sad, though? No STL tomorrow other than at the "Ask Us Anything" panel :<
 
@RMartinhoFernandes All the painful process, not the result :)
 
Xeo
1:21 AM
On the other hand, concepts!
 
something really scary is going on near my blocks
 
Xeo
And static_if
 
it's like someone is hawling, oh God
 
What happened to stream?
 
It's over.
 
Xeo
1:21 AM
@Pubby Over
 
Ha! I win one today!
 
Completely over?
 
Xeo
Blame my connection!
 
@LearningC did you solve your pandoras box?
 
@Pubby Until tomorrow.
 
1:22 AM
@RMartinhoFernandes They tried to fix generics to an extent. And they bickered over lambdas and closures until eternity. Meanwhile, .NET got those right too and expression trees, and - even C++ got lambdas...
 
Xeo
I was lucky enough to not get buffering during the panel just now. :)
 
@LucDanton I'll never be able to ever write a switch again without stopping to think about that! It's a mindbug!
 
@DzekTrek what pandoras box?
 
write()?
 
@DzekTrek oh I think I getting to a solution.
 
1:23 AM
@sehe Expression trees are shiznits.
 
@MooingDuck any suggestions ?
 
while (lst) { cout << lst->number << ' '; lst = lst -> next; } write inside your write() function and see what happens,
 
@DzekTrek I was thinking way to hard and forgot about the simplest funtion
 
So much awesome packed into something so simple.
 
@renatofernandes I haven't been paying attention I was watching the stream
 
1:23 AM
now I gave you too easy task to solve, it's practically solved.
 
Xeo
Okay, so, I need to prepare some questions and a twitter account for tomorrow
 
@RMartinhoFernandes Yeah that was a nice one. I learned it too, and I'm gonna use it. I like my early outs
 
@MooingDuck aha ooh alrite thanks anyway :P
 
@renatofernandes oh, still about iappend from half an hour ago?
 
Xeo
Ranges, polymorphical lambdas, functional style programming
 
1:25 AM
@MooingDuck aha ooh alrite thanks anyway :P
 
@Xeo Ask about monads.
:P
 
Xeo
What's that? :P
 
@MooingDuck yea i just wanna know when to use idelete to free memoery so i wont get tan error
 
lol :)
 
Xeo
Also, you got your own Twitter acc
 
1:25 AM
inb4 endofunctors and monoids.
 
@renatofernandes lemme study your code a sec and see how it works
 
@Xeo Actually concepts would be sweet to define monads. All we need now is a neat syntax for them.
 
in what point does c++ is going? - please, ask them that Q.
 
@RMartinhoFernandes Is that positive or negative? I don't personally like Expression trees, but it is certainly mocking Java's progress. Java 7 managed to break the JVM specs...
 
Why would you want monads in C++?
 
@MooingDuck im basically reversing the first list and consing one item each time of the new reversed list to the original second list.
 
@sehe Positive. Expressions trees are sweet for generating code at runtime.
 
@DzekTrek a singular point?
 
@Pubby FTR, I was being silly.
 
@RMartinhoFernandes I'd rather have had true quoted constructs like Boo's, Nemerles (F#?)
 
1:27 AM
yep :) there is no advance at all since 2000
c11 is just a good wrapper thing, nothing else
 
@sehe You mean, the interpolation bits? Because you can already get trees from things like x => x*x.
 
I think I might have two persons on my block list soon
 
What you can't do is stuff like x => $y * x
 
@RMartinhoFernandes indeed
 
:D
 
1:29 AM
Are the GoingNative talks over?
 
But I agree. Boo's quasiquotes would be better.
 
@RMartinhoFernandes Hygienic macros if you will
 
@renatofernandes k, got it
 
room topic changed to Lounge<C++>: You can put default at the top of a switch. [c++] [c++11] [c++-faq]
 
@RMartinhoFernandes Good thing is that CLR allows you to mix and match. If only Boo/Nemerle didn't assume so much library support. (Not that I really worry about bloat in .NET projects anyway)
 
1:31 AM
@renatofernandes (1) while(!iempty_huh(il1)) so it stays in the loop until il1 is empty (the last part of the list passed in). From then on il1 is empty. At the end of the function you have idelete(il1); and delete the last bit of the list you were passed. That's not right
 
Never tried Nemerle, but I really like Boo's metaprogramming tools.
When Roslyn comes out, I'm planning to see if I can write something like boo's meta-attributes.
 
@MooingDuck don't i want to delete it cause im not using it anymore?
 
@RMartinhoFernandes Nemerle is on par, a bit more PF inspired and a bit less Pythonesque. I like Nemerles list comprehensions better (but it has been such a long time that I couldn't quote you any examples right now)
I think these days I'd try my hand at F# before anything else for .NET
 
"every ilist created by icons must eventually
// be freed (exactly once) by being a member of
// an ilist that is consumed by delete"
did you make that list with icons?
 
Xeo
@sehe That reminds me that I wanted to implement list comps in C++
 
1:33 AM
Ok guys, off to bed/
 
@Xeo Yeah, doesn't it remind you that you couldn't find a suitable set of operators?
 
@renatofernandes keep in mind that il1 is a list that someone handed you. You just deleted part of it. They might get mad at you.
 
@Xeo Yeah, I'd like that too. And make them lazy generators
 
Xeo
@sehe G'night.
 
@sehe Like Boost.Range?
 
Xeo
1:34 AM
@RMartinhoFernandes No, @Luc was just too lazy to deal with manually transforming the expression tree to fit the wanted operators. :>
 
@RMartinhoFernandes Yeah, supposedly adapts generator functions; I tried that once for 5 minutes, couldn't make it work and had to drop it for lack of time. I'm gonna rewrite my toy chess engine in C++11 sooner or later and revisit that
 
To be honest, I don't use list comprehensions that often in Haskell.
 
@MooingDuck are you suggestioning that i only idelete my acc then ?
 
@Xeo Boost Proto transformations, count as non-manual?
 
@renatofernandes the second problem is that you have to call idelete on each and every list you created via icons. You only delete the last one made. You have to loop through acc and delete the entire thing. (I would make that it's own function, it's easier)
 
1:35 AM
@Xeo Yeah, lazy.
 
@renatofernandes yes
 
@MooingDuck idelete already loops and deletes the entire thing. It's documented, and it is how it is implemented.
 
@RMartinhoFernandes No but that is because you can do fixed point combinators with your eyes closed? (I have no idea what I just said, I just parrot those words :))
 
lol
fix f = let x = f x in x
 
@RMartinhoFernandes the documentation is vague on if it's recursive: "every ilist created by icons must eventually be freed (exactly once) by being a member of an ilist that is consumed by delete"
 
1:37 AM
That was with my eyes closed! I can do it!
:P
 
Oh noes, that was 'pointless combinators' (misspelled on purpose; I know it's free)
 
`#include <stdio.h>

int min1, min2;
int input;

int main(){

min1 = 9999;
printf("Enter a set of integers:");
while( scanf("%d", &input) ){
if(input < min1){
min1 = input;
}
}
printf("%c", min1);
return 0;
}`
why does it just freeze?
 
@MooingDuck The by being a member part is key.
(And the implementation doesn't lie :P)
 
@MooingDuck do i have to do the same with il2 too? since i use icon ... the thing is i want to produce that list thou
 
yanking power cord, bye
 
1:37 AM
Bye.
@sehe Sorry for dragging you when you wanted to go to sleep.
Oops, I did it again.
 
@RMartinhoFernandes alright, not vague, it's contradictory
@renatofernandes why would you delete il2? That belongs to someone else too :D All you delete is acc (Though R.MartinhoFernandes says you have that part right already)
 
@MooingDuck No, it's not contradictory. It says that idelete deletes all members of the list you pass in.
 
@LearningC what was the input? A file or keyboard?
 
@MooingDuck but i used icons to edit il2 ? or should i set il2 to a variable and edit that?
 
@RMartinhoFernandes alright, I'm convinced
@renatofernandes you need those to still exist after the function, (so you can return them) so don't delete them
 
Xeo
1:40 AM
I'm off too.
One question for the robot though.
When do you actually sleep?
 
@renatofernandes you had the deletion of acc correct. Sorry for the confusion. I misread the documentation
 
@MooingDuck alrite so what's my problem then? :S ... also i test by code in another ui file which deletes the list's tit returns
 
@Xeo Depends. Last week I slept at night.
 
@renatofernandes note that your return list and il2 share nodes. If that wasn't the intent, then you have a lot more work to go
 
This week I'm sleeping in the afternoon.
 
1:42 AM
you can also sleep in 20 minute shifts
YAY AWAKE 4 EVAR
 
@renatofernandes I dunno, if you made the first change I suggested it should be fine, depending on the function that calls it
 
Xeo
Crazy robots.
Well then, g'night.
 
Good night.
 
@LearningC also, min1 should probably default to INT_MAX in "limits.h"
 
@MooingDuck i removed my idelete(il1); ... that change?
 
1:43 AM
@RMartinhoFernandes I notice that our schedules have quite a lot of overlap more often than not. Or maybe it's just confirmation bias.
 
@renatofernandes yeah
 
@MooingDuck yeaa i did that still error's in my test file thou ? :(
 
@renatofernandes what's the error? Double delete?
 
@LucDanton Seems like we switch phases at similar points in time.
 
around the lines of .... Invalid read of size 4
= at 0x80484ED: idelete (ilist.c:55)
= by 0x80486C6: main (ilistui.c:31)
= Address 0x41970d0 is 0 bytes inside a block of size 8 free'd
= at 0x40257ED: free (vg_replace_malloc.c:366)
= by 0x80484FC: idelete (ilist.c:56)
= by 0x80486AE: main (ilistui.c:29)
= Invalid free() / delete / delete[]
= at 0x40257ED: free (vg_replace_malloc.c:366)
= by 0x80484FC: idelete (ilist.c:56)
= by 0x80486C6: main (ilistui.c:31)
= Address 0x41970d0 is 0 bytes inside a block of size 8 free'd
 
1:44 AM
@RMartinhoFernandes Oh, I don't switch most of the time. I drift.
 
Ah, I see. I do drastic switches from time to time.
 
I drift, too, and sometimes it overflows and goes back to normal.
 
Just go to japan for a week :D
(unless you're already in japan)
 
@renatofernandes Alright, basically the problem is someone calls your concatenation function, and hands you two lists. You're making a temporary copy of the left one acc and then duct-taping it backwards to the right one, and then give the duct-taped back as the result. If the "someone" deletes both teh duct-taped and the right one, that's bad. So you need to also make a copy of the right one, kinda like you do for the left one.
 
I don't even want to go to the shop, because it's far away and cold outside.
 
1:47 AM
@renatofernandes and sadly, it is time for me to go home
 
@MooingDuck so set a varialle to il2?
 
@renatofernandes I am assuming that Invalid free() / delete / delete[] means you deleted the same memory twice
@renatofernandes basically yes. Just like you did for il1.
 
@MooingDuck awww alrite, thnks for looking it into me :)
 
Why are you doing cons lists in C, anyway?
 
Take a guess.
 
1:49 AM
Doubly linked lists are better for imperative code.
Then concat is not so scary.
 
@CatPlusPlus its a homework assignment
 
Ouch homework in C++
 
It's stupid.
 
Do you plan to become a C++ programmer?
 
If the sole purpose is to demonstrate cons lists, then it shouldn't be in C.
Even Java would be better.
And that's not something I say lightly.
 
1:52 AM
You could have said C#.
Oh, wait you were trying to pick a bad language in which it would be better, to make your point.
Nevermind.
 
I wouldn't necessarily call java a bad language
but as a golden rule, ANY languages that run off a SECOND computer like system, are always the worse of the two, being compared to compiled native languages like C++
 
No, the biggest problem of Java is not performance.
 
Comparing it to C++, yes
 
Ok, then what is the even worse problem
 
1:56 AM
Lack of expressiveness, for once.
 
I never thought a programming language would incorporate expressivity
in its function, yes, but not in the language :s
 
Dear God and horny horns.
You still didn't solve it?
 
I believe I troll'd the chat into silence :( carry on?
 
@Hoxieboy The number of interesting concepts you can easily express in Java is severely limited.
 
Languages don't have performance.
 
2:01 AM
@RMartinhoFernandes I guess you could input "easily" as a factor, but I'm sure its possibly the same in C++
 
No, C++ is more expressive.
 
:) the only troll here who is qualified to do so is robot. There is strict rule here, "No trolls, violators should be conded" @Hoxieboy
 
lol
 
now @RMartinhoFernandes is typing in google a word conded to see what it matches for. :D
 
languages can have performance, by the way, take for instance Python, it is an interpreted language and must therefor run through its interpreter before being executed, unless it is compiled. C++ is directly compiled and thus runs faster, for it goes through only one front, not two
 
2:04 AM
Wrong.
Spanish is not faster than French.
 
Take a test, you will see otherwise
 
Python is not an "interpreted language".
C++ is not a "compiled language".
 
There is no such thing as interpreted language.
Languages are not concerned with implementation details.
 
@CatPlusPlus true.
 
java is an interpreted language as well
 
2:05 AM
Wrong again.
 
Even if such thing existed, Java is not interpreted even in JVM.
But then again, "interpreted" is muddy terrain anyway.
 
Java is interpreted by the JVM, I don't see how it couldn't be otherwise.
 
CPU is an interpreter, too.
 
yes
 
JVM has JIT.
What's executed is mostly native code.
 
2:06 AM
@Hoxieboy Just so you know, there's a native Java machine.
"Interpreted language" is meaningless.
 
@RMartinhoFernandes that doesnt mean everyone uses it
 
Hell, there's GCJ which produces standalone executables.
It's a silly notion.
 
that brings me back to C++
 
Plus, interpreted programs can run faster than compiled programs.
 
it depends on the code that is contained within the program itself
 
2:08 AM
See, now you're making sense!
 
-.- haven't I always
 
`while((input=getchar()) != '\n'){
if(input < min1){
min1=input;
}` can someone tell me what is wrong with this?
 
Not really, no.
 
You didn't make sense when you said some language was faster than another.
 
2:09 AM
@LearningC What's min1?
 
scanf("%d", &min1);
 
meh code is code, unless you are running it on a jaguar super computer going at 1 pedaflop a second, i doubt you will see a difference in a hundred thousand for loops
:)
 
Then comparing with character codes makes no sense.
You should be extracting whole numbers, that is.
Well, unless you do want to compare character codes with that number, then your code is fine.
 
I'm no pro with C++ (why am I here :D) but isn't get char looking for a single letter, and you're having it compare \n, which is technically two bytes?
 
\n is not two bytes.
 
2:11 AM
@CatPlusPlus I'm extracting numbers
 
"characters"
 
'\n' is always a single character.
 
It's a character literal, not a string literal.
@LearningC With getchar? No.
 
@CatPlusPlus (There are multi-byte character literals, but that's not good for anyone's sanity)
 
I'm trying to compare the first integer with the rest
 
2:12 AM
@RMartinhoFernandes I know, but he was thinking about "\n".
scanf can extract numbers. getchar on its own extracts one byte.
with "123" on input getchar will return '1'.
 
@CatPlusPlus can I put scanf() in the condition of a while loop?
 
And it's not even a digit yet.
Dunno, it should return something.
 
Yes. while(scanf(something something) == number_of_items_to_read)
 
I'm not using C or C library.
40 files and 600kB of code. Yuck.
I'll never get this done.
 
I wonder if declaring input as an int before the while loop would do anything :s
 
2:17 AM
Still stomping singletons?
 
600kb of code? How long have you been working on your program O.o
 
If it were just that. I'm trying to bring this codebase into bit better shape.
 
@CatPlusPlus can I do this? while( scanf("%d", &input) != '\n' ){
 
No, that's meaningless.
 
@LearningC No, scanf returns the number of items read. You want to test if it read 1 item.
 
2:19 AM
@RMartinhoFernandes so I can test it is is smaller than min1?
 
You are trying to read one number at a time, so you want to loop while scanf returns one.
What kind of wildcard can I use to match files without extension?
 
Apart from singletons, I have to get rid of serialisation code, then get rid of libtcod and SDL, then get rid of deprecated OpenGL stuff, then get rid of event handling code, then rewrite all of it and make it compile and work again.
@RMartinhoFernandes *.?
 
@CatPlusPlus So, basically start again?
 
this may sound dump, but how can I join economics, math and physics on stackoverflow with this account?
 
Well, I'm not touching game logic.
 
2:22 AM
@CatPlusPlus Won't that require a dot at the end? (testing)
 
@RMartinhoFernandes Do you understand my issue, on why im getting errors?
 
@RMartinhoFernandes It has a dot at the end.
Question mark is not in code font. Pay attention.
 
I mean, it will match foo. but not foo, because the latter doesn't have a dot.
 
No, it shouldn't.
dir /A:-D *. returns Makefile
 
@RMartinhoFernandes so how do I keep a while loop going until it returns everything?
 
2:24 AM
$ ls
foo  foo.
$ ls *.
foo.
$
@CatPlusPlus Ah. Damn, Windows.
@LearningC It will return 0 when it doesn't read a new number.
 
@RMartinhoFernandes Can I do this while(scanf("%d", &input) != 0)
 
@RMartinhoFernandes When I put that into my code it freeze
 
Do you know how to use a debugger?
 
nope
 
2:29 AM
What kind of retarded teachers are these?
 
Does it have one for gcc?
 
Well, you need to learn how to use a debugger.
 
They expect us to know what the bug is.
 
When your code doesn't work, you can't just stop and ask someone else.
You need to investigate the problem.
And that can be made easier with the proper tool: a debugger.
 
@RMartinhoFernandes find . -maxdepth 1 -not -iregex '^[.]/.*[.].*$' -type f -print !
 
2:30 AM
@CatPlusPlus Thanks. I selected the files manually :P
 
@LearningC What input are you giving it?
 
@RichardPennington I'm giving it integers
 
The only time I use scanf is when I'm writing a test suite for a standard library. scanf is bad.
 
Is it ok to have 2 scan f? like this `scanf("%d", &min1);
while(scanf("%d", &input) != 0){
min1=input;
}
`
 
Sure, as long as the input is something like "10 5"
 
2:45 AM
@RichardPennington Yea I'm inputting "92 83 83 292"
 
@LearningC You probably want the loop to look like "while(scanf("%d", &input) == 1) {" EOF is returned when the input ends or an error occurs.
 
@RichardPennington so when the scanf() is reading it will be 1?
 
If 1 integer is found, yes.
 
can somewone explain to me what it mean to make a function run in O(1) time
 
2:55 AM
It means it runs in a constant time, regardless of input size.
 
when I run the code it will continue to scan even after I press the return key. It only exits when I enter a non integer item.
 
like how would the body function look like more or less ?
like less looops or something like tht?
 
scanf skips whitespace, which includes the newline.
 
@RichardPennington Will this do it? while((scanf("%d", &input) == 1) && (input != '\n'))
nope it doesn't
 
Input will never equal '\n'. This is one reasone scanf is bad. You don't have enough control.
Terminate on -1 or some other integer value.
 
2:59 AM
Well, it could equal '\n'.
 
We never use scanf in the embedded world. :-)
 
If it's 10.
 

« first day (475 days earlier)      last day (4456 days later) »