« first day (1084 days earlier)      last day (4090 days later) » 

06:00
Then again, what kind of idiot does this without taking measures for anonymity?
I hate empty variadic types. They cause a lot of errors and misery!
Though TMP from the start is already murder.
What?
@Rapptz When "iterating" with parameter packs. You should make a fallback case when the packs will eventually be empty.
user1804599
06:05
You need to do that anyway.
Yeah, you pretty much have to do it.
Sadly, yes.
@JerryCoffin yes. I've seen it before. Something like casperOne in like 10 some seconds.
user1804599
You cannot have recursion without terminating case because that would be infinite recursion.
How else do you expect to know when to stop? Magic?
06:06
@Rapptz I hope compiler magic would help. :)
user1804599
@Mysticial That doesn't count. I meant closed entirely by the community, not a mod.
Oh... I dunno. :)
user1804599
Mike the Headless Chicken (April 1945 – March 1947), also known as Miracle Mike, was a Wyandotte chicken that lived for 18 months after his head had been cut off. Thought by many to be a hoax, the bird's owner took him to the University of Utah in Salt Lake City to establish the facts of the story. Beheading On September 10, 1945, farmer Lloyd Olsen of Fruita, Colorado, United States, had his mother-in-law around for supper and was sent out to the yard by his wife to bring back a chicken. Olsen chose a five-and-a-half-month-old cockerel named Mike. The axe missed the jugular vein, ...
@chris I blame herb too, rooms still not clean!
06:13
@not-rightfold WTF.
lol. I've discovered that appending a dummy type after the parameter pack solved the empty pack problem.
> 1,583% funded
> It is not recorded what was eaten for supper that night
user1804599
06:29
Yay.
user1804599
Implemented io::pipe().
user1804599
Four SLOC :P
user1804599
Yet five includes.
user1804599
Also fuck headers; #pragma once boilerplate.
@not-rightfold Yeah! Go #pragma once!
06:34
@not-rightfold noize
I really need to learn how to use generators properly
hai all
@not-rightfold i do that all the time
user1804599
Fuck.
user1804599
What should I do in a destructor if ::close fails? :v
@not-rightfold how did it fail? or rather how can it?
@not-rightfold Unfortunately, there's not really a good answer for that situation.
user1804599
06:37
@GamesBrainiac Well, EBADF doesn’t happen and EINTR isn’t an issue (just retry until it doesn’t happen anymore), but EIO can certainly be a problem.
@GamesBrainiac Most obvious is that you've run out of disk space, but don't know it until the buffer(s) is/are flushed when closing.
Suddenly, a T-rex
user1804599
@JerryCoffin ::close doesn’t fail with EDQUOT or ENOSPC.
user1804599
But yes, a hardware error can be a problem here.
@sehe mawning
06:39
@not-rightfold I've certainly seen it (but, admittedly, long ago in a galaxy far, far away from Linux).
The charger for my mac is broken, I am sitting in a Apple store using their charger. The store staff are surprisingly friendly.
Maybe because I expect everyone to be assholes nowadays ...
give them more money, they'll be even bigger assholes more "friendly" :/
LOL, I am not an Apple fan ... I have mac & iphones because of work (share trading, making apps etc)
I got my first iphone years ago because that was the only phone on which you could trade shares.
@JerryCoffin Ahh, that makes more sense. I asked because it never failed for me, so yea...
@GamesBrainiac At one time it was pretty common. Now..a lot less so, even at worst.
06:47
> Effective GoF Patterns with C++11 and Boost presentation
^ IOW, a 1h23min Patterns + std::function<> fest for the lovers of UML
So to speak, I still don't know how to 'use' a mac ...
I could easily abuse one though, lol
@JerryCoffin Well yea, I mean how often do you expect to run out of disk space?
@GamesBrainiac Hasn't happened to me in years. Back in the days of floppy disks, it was pretty much a given that everybody did on a semi-regular basis.
@JerryCoffin Boy, you sure do have a lot of experience.
@JerryCoffin s/semi-// :)
06:53
@sehe lol
Thanks to jerry, I get what you and R. are saying XD
I'm 21 and I still remember running out of disk space regularly
I still run out on the same schedule, it's just that the time between occurrences increases at each occurrence
@MickLH too much porno downloaded?
2
mostly code and PDFs actually
I religiously grab everything I can find on uni sites just in case it disappears
and I check out basically every repo I find even mildly interesting
yea, i do the same
just bought a 1 TB HD to make sure I never run out
06:59
well not check out, just clone
haha same here
although very recently I had to add a 3TB to that
I should only have a few more cycles before I die
cpx
cpx
07:18
Do you guys think Head First book series great for learning?
Just for beginner purposes.
yea, i found it helpful when I was learning java
but for python i think python essential reference and programming python are much better alternatives
cpx
cpx
I'm going to learn some PHP.
don't learn php
its possibly the worst language on the planet
even worse than java
cpx
cpx
Well, how do I know before I learn it? :P
ask around
user1804599
07:23
Destructors are implicitly noexcept, right?
cpx
cpx
Is Java good to learn?
no
learn python
cpx
cpx
Actually, I need to write a small application in Java for my phone. It's Symbian S60.
user1804599
Scala.
07:28
Ah fuck.
The auto i = {...} just screwed me over
cpx
cpx
Maybe Python will run on Nokia S60 as well.
I'll learn Python instead of Java if it does.
user1804599
Jython!
Whew! At last I've finished func_info! coliru.stacked-crooked.com/a/8126a7ba5ab021c2
TMP's like hell!
cpx
cpx
mowning
o_0 dispite using my work phone (what I thought I was) rather a lot in London, some how didn't cost any more than normal
sweet :D
07:33
nice
@MarkGarcia Hm. Overcomplicated/overdesigned.
@Rapptz No it's not. It's just the support stuff that's causing the bloat (type_list and its getters, and the int_sequence and its generator). The rest boils down to deduce_func_types and deduce_functor_types, and of course, func_info.
It's still messy and has some edge cases in type_list.
@Rapptz lol! I'll try to fix it.
@MarkGarcia I've done the equivalent in < 50 LOC
07:42
@ScottW Hey babe.
Wassup?
@Rapptz Lemme see! :)
Hm, it seems I don't have it in a public repo.
I'll look for it.
I do hope we can use tab inside the stackoverflow editor one day like in the coliru one.
@Rapptz Hmmm. Your breaker cases are quite impossible to solve! func_info et al gets the information for a specific function. Of course it cannot know which template specialization or overload to choose. ;)
5
A: How can I let the compiler deduce the return type of a template?

RapptzAs I've stated before, I've done this before with everything but it fails to work with std::basic_string<T,U> (and std::set and friends due to the use of std::back_inserter) because it'll just rebind it to std::basic_string<stuff,U> rather than an underlying container. Do note however that it wou...

07:45
Though I could try to have "partial information" functionality for the template.
@MarkGarcia That's why I stopped using function_traits
@who ever sent me that video, finally gettin around to watching Rhod getting a tattoo
@Rapptz Nice.
@MarkGarcia I overestimated, it's way less than 50 LOC :P
Whenever I think to myself "I should make a type_list!" I always remember std::tuple exists.
@Rapptz That's actually my first approach, but in my approach using type deduction, I'm quite uneasy with non-default-constructible types.
Anyway, type_list is a bit of generalization, and I like generalized things. :)
07:51
std::tuple is generalised and has a lot of neat utilities.
and if you need more, you can just expand tuple's interface
I could probably use std::tuple in there and perhaps cut down 1/2 the bloat.
Anyway, that was a nice (!!!) TMP experience. :P
lol
cpx
cpx
08:10
Python works on S60! Yay! Now, I don't need to learn Java!
@ScottW Hai
@cpx thank the heavens
@not-rightfold you're right scala isnt as bad as java
user1804599
I am always right.
no, you're not
you're sometimes right
@MarkGarcia when did the standard library get a tuple?
cpx
cpx
Is Python a script or language?
08:24
scripting language
@GamesBrainiac Since C++11. And there's still more to find!
whoah
i really need to look at cppreference again
cpx
cpx
So, everything I write in python must end with .py extension.
@GamesBrainiac And .
Apparently there's this company called mobclix that scams people out of ad money on Android.
08:25
well, whaddya know
cpp does have a tuple
Sooner or later cpp will have proper modules
I hate macros
cpx
cpx
Can I write something for TCP/IP in Python?
0
Q: How do I check to see if my array is in ascending order?

Zahra MahmoodSo I have an array board[][] whose values keep shuffling around. It is a square array with dimensions d*d. I want to check the array to see if all of its values are in ascending order. for (int i = 0; i < d; i++) { for (int j = 0; i < d; i++) { if (board[i][j] == (d * i) + j + 1...

heh, terrible question
OP doesn't know about Quicksort apparently
or just C's existing sort
Xeo
Xeo
C's existing sort is quicksort :P
qsort.
@Jefffrey VAOs are not needed for anything
08:31
@GamesBrainiac the connection tuple-module-macro seems random. And yes, there is talk about modules in C++. But why hate macros? There's nothing to hate about except the bad use of macros. Don't blame macros for what people do with them ;)
They make a few things easier, that's all
Xeo
Xeo
@ArneMertz Macros are the reason headers have to be read over and over again :(
@ArneMertz no, but modules would be much better. I hate macros, because they are very repetive. Xeo makes the point.
@Cat you'd need to elaborate
@BartekBanachewicz where is cat?
08:33
@Xeo how that?
Xeo
Xeo
@ArneMertz Conditional compilation with #if[def].
1
Q: GCC c++11 using a lot of RAM with STL bitset<UINT_MAX>

asalicWhile compiling my program today, I noticed something very strange (which I'm sure can be explained somehow) in the memory consumption pattern of GCC (compilation step). The process called "cc1plus" was using approximately 10 GB of RAM for a program with less than 10 000 lines of code. After com...

@Xeo so you refer to include guards as macros as well? IIRC many compilers recognize include guards and treat them like #pragma once, i.e. they don't repeatedly scan the headers. I could have misunderstood that tho
does anyone know how much memory you get on Coliru?
Xeo
Xeo
@ArneMertz That's a very special case of conditional compilation. It's either "all of it" or "nothing".
@TemplateRex That would be @StackedCrooked
08:39
@Xeo ok then I don't see how other cases of conditional compilation cause multiple header reads. care to give an example for a common case?
@TemplateRex IIRC he has less than 1 GB RAM so it's not much but enough for toy programs.
@Rapptz ok, that is consistent with my experiment (bitset<4 billion> is about 0.5 Gb)
user1804599
How do I stop Vim from trying to reindent lines when I insert punctuation?
0
Q: Implement sizeof operator using Bitwise Operation

user2775291During Interview ,One question I faced One Questions to Implemet Sizeof Operator using Bitwise Operation ONLY .

what?
how the hell would you do that?
user1804599
I don’t want it to suddenly reindent when I hit , or <? or whatever.
Xeo
Xeo
08:42
@ArneMertz Everytime it's not "all or nothing". For one include, a define may be present, while for another, it is not. An interesting example is probably #define MY_PROJECT_COMPILATION in an internal .cpp file, while the header has MY_PROJECT_EXPORT defined to either __declspec(export) or __declspec(import) depending on the MY_PROJECT_COMPILATION macro.
@TonyTheLion rotate
Xeo
Xeo
And then class MY_PROJECT_EXPORT MyClass{ ... }; and the likes
Xeo
Xeo
MSDN, not wikipedia.
Also, it's an answer vOv
Robot got 161 votes for his 1-line answer :P
08:46
@Xeo ah so you are relating to multiple reads across translation units? Ok, that of course is related to modules. I never would have labeled those uses of the PP as macro. I think I got it :)
Xeo
Xeo
@ArneMertz Every #define is a macro. :)
user1804599
@TonyTheLion shamelessly assuming C and repwhoring. :P
you whore
also, I always get confused on how to use Linq's select
what is it actually for?
what happens when I do mylist.Select(x => x); ?
@Xeo well that's one definition of the term macro :-) Others would restrict that to actual uses of defines that generate code. Excluding #if(def)
Xeo
Xeo
@TonyTheLion transform
@TonyTheLion Identity
08:49
hmmm
Xeo
Xeo
@ArneMertz According to the standard, it's a macro. :P That's all I care about.
select is map in Haskell / Python terms
It's just called select because of SQL
the more I use scala, the less i hate it and the jvm
it has some really awesome shit
Xeo
Xeo
Did you try LLVM Haskell?
@Xeo Yea, I did not like it all that much
You have to define a function multiple times
To handle different scenarios
Xeo
Xeo
No
08:51
It feels more mathematical
but i dnt like it
besides, scala has awesome ides :P
Xeo
Xeo
Haskell is math personified languagified.
@GamesBrainiac IDEs are overrated.
dunno about that, i love intellij ides
and visual studio for R# is just sublime for C#
Xeo
Xeo
wat
That sentence made no sense
visual studio with R#
or resharper
my bad :P
08:58
0
Q: Sets, Functors and Eq confusion

Chris TaylorA discussion came up at work recently about Sets, which in Scala support the zip method and how this can lead to bugs, e.g. scala> val words = Set("one", "two", "three") scala> words zip (words map (_.length)) res1: Set[(java.lang.String, Int)] = Set((one,3), (two,5)) I think it's pretty clear...

ohhh, for Haskell nerds
error: no match for 'operator=' (operand types are 'const std::pair<const char* const, int>' and 'const std::pair<const char* const, int>')

« first day (1084 days earlier)      last day (4090 days later) »