« first day (1450 days earlier)      last day (3500 days later) » 

Ell
12:00 AM
Yeah
I've only needed them for collision detection
 
(however the answer quotes D&E, which is older than the paper)
so perhaps the reason is lack of a good proposal
 
Ell
Yeah
 
do you guys have any suggestions for this? coliru.stacked-crooked.com/a/bffc91e67f8a27d5
 
what kind of suggestion?
 
feedback? if you spot something that could/should be done differently, and whether or not you like the idea
 
12:10 AM
> T operator*() const { return cur_; }
illegal.
 
why?
 
all non-input iterators must return lvalues.
 
does it have to be an Iterator though?
 
so I should make it an inputiterator?
 
I don't think the range-based for loop requires it
 
12:12 AM
(I wanted to be lenient and allow multiple passes, but if it has to be an inputiterator...)
@AndyProwl range-based for requires begin and end that return some kind of iterator
 
not sure if they require the full Iterator concept, though.
 
@nightcracker Yes, but I don't think it requires that the Iterator concept to be satisfied
 
I think they only require something that might kinda vaguely look like an iterator.
 
fair enough
but better be off doing it properly, no?
 
honestly, if it's just for this use case, I'd keep it simple
 
12:14 AM
no reason this can't be used in other places than just for-based loops
 
what I'd probably add is deduction of the counter type based on the second argument
because that's often size_t
and you don't want to write range(std::size_t{0}, v.size())
but you don't even want warnings about conversions or signed/unsigned comparisons
 
The iterator concept requires copy constructible, operator++, and operator*.
iirc
 
@AndyProwl that's just range(v.size())
 
@nightcracker ok, say you don't want to start at 0
@Rapptz copy-assignment too
and destructability
 
12:18 AM
@Puppy is there a way to allow multiple passes without returning lvalues?
 
not within the Standard iterator model.
 
lame
guess it's just InputIterator then
@AndyProwl I'd probably do range<std::size_t>(1, v.size()), but do you have a better solution?
 
@nightcracker I'd do type deduction based on the second argument and static_cast the start to the type of stop
 
actually
hell I can do template<class Start, class Stop, class Step>
as long as the different integers can compare ==
 
user1804599
-2
Q: PYTHON, COMPUTER SCIENCE, PROGRAMMING

umar arshadWRITE THE CODE FOR THE FOLLOWING DESCRIPTION. USE PYTHONG def display_rotated(character, n): '''(str, int) -> str Return a string that demonstrates a rotation of the given character. The character should be rotated by n positions. >>> display_rotated('d', 1) 'Rotating "d" by 1 characters...

 
user1804599
12:21 AM
lol
 
oh wait I do compare < between start and stop
 
@rightfold lol
 
USE PYTHONG
 
@nightcracker simplified version
(just to show what I meant with the deduction thing)
no error handling etc.
 
@AndyProwl that is dangerously broken
oh
ok
range(0, 1, 2) would be hilarious :P
 
12:23 AM
yeah
 
I don't use a default argument step though
so I don't have to sanitize the input when not needed
 
makes sense
 
@AndyProwl nope, this is very very dangerous
 
stuck on this:
 
12:27 AM
@AndyProwl consider what happens with range(-2, 0u)
 
argument constructor that recieves the following parameters
the address of a C-style string
 
@user2122179 this is not a helpdesk
@user2122179 stackoverflow.com
 
This is not a desk at all
 
hell, even help is not here
@AndyProwl static_cast<unsigned>(-2) is rather large :)
 
@nightcracker right, but if you do that, you're looking for troubles
the common use case for me is to iterate through a standard container
 
12:28 AM
@AndyProwl your suggestion does that for range(-2, 0u)
 
@nightcracker yes, but writing that means looking for trouble. Why would I write range(-2, 0u)?
the common use case for me is range(0, v.size()) or something
 
my intention was not to prevent you from shooting your foot
just to simplify common use cases
but granted, it has disadvantages
 
@AndyProwl it's rather obvious in there, but what about this? range(-10, wrapping_container.size() / 2)
where wrapping_container is some sort of container allowing negative indices to wrap around
 
@nightcracker what are you going to do with a negative index on a container?
meh, how common is that
 
12:31 AM
@AndyProwl ring buffers? python lists?
it's incredibly useful
 
Anyway in that case I'd write range(-10, int{wrapping_container.size()} / 2)
not saying it's not useful
just not common
at least for me
 
yeah, I'd rather stick with the safe-but-slightly-annoying
 
rather than spend-half-a-day-to-find-this-stupid-bug
 
sure, it's a valid decision
 
12:32 AM
lol
 
user1804599
baka
 
user1804599
go to sleep nerds
 
@Sofffia digging in the graveyard?
I think that clip was old before I was born
 
what does "baka" mean?
 
user1804599
idiot
 
12:33 AM
I see
 
@AndyProwl there is a more verbose (library-side) solution that's graceful for both use cases
 
@nightcracker (there's also Boost.Range btw)
 
@AndyProwl No, I think he just insulted you.
 
@AndyProwl I propogate the T, U, V into range_object
 
@nightcracker You must be very young.
 
12:35 AM
@Sofffia ah, so "baka" does not mean "idiot"?
 
@AndyProwl and implement a proper unsigned-signed comparison function using template programming in the sanitizing code
 
@Sofffia Yes, thank you, well done for spotting the obvious reference
 
@Sofffia 19?
 
user1804599
12:35 AM
lekker, een cracker
 
@AndyProwl this doesn't affect the loop performance at all, since comparing start == end is safe
 
@AndyProwl it does
 
@nightcracker CSI: New York has been around for less than 19 yo, m8.
 
user1804599
crackertrekken
 
Noun: hyperbole (plural hyperboles)
  1. (uncountable) Extreme exaggeration or overstatement; especially as a literary or rhetorical device.
  2. hyperbole f (plural hyperboles)
  3. hyperbolē f (genitive hyperbolēs); first declension
 
12:36 AM
@Borgleader all right
 
Noun: joke (plural jokes)
  1. An amusing story.
  2. Something said or done for amusement, not in seriousness.
  3. (figuratively) The root cause or main issue, especially an unexpected one
  4. joke f (plural jokes)
Verb: joke (third-person singular simple present jokes, present participle joking, simple past and past participle joked)
  1. (intransitive) To do or say something for amusement rather than seriously.
  2. (transitive, dated) To make merry with; to make jokes upon; to rally.
 
Adjective: ok
  1. (informal) Alternative capitalization of OK.
Noun: ok
  1. genitive plural of oko
  2. ok n (genitive singular oks, plural ok)
  3. ok (plural okok)
  4. ok n (genitive singular oks, nominative plural ok)
  5. ok n (genitive oks, plural ok)
(3 more not shown…)
Adverb: ok
  1. also; and also
  2. ok
  3. ōk
Conjunction: ok
  1. and
  2. ok
 
We can stop now.
 
we can
do you guys know a set of overloaded C++ functions that you can pass two arguments x and y that will do correct comparisons regardless of the (un)signedness of x and y?
 
user1804599
12:38 AM
Never compare values of different types.
 
user1804599
 
no such thing as correct comparison of signed/unsigned.
 
of course there is
maybe not in one CPU instruction, but that wasn't a requirement
bool less(signed x, unsigned y) { return x < 0 || static_cast<unsigned>(x) < y; }
one example
 
user1804599
Do an explicit cast at the call site.
 
12:44 AM
Fun fact: "Chicago", read in italian (specifically "Ci cago"), equals "I shit in it".
 
user1804599
 
inb4 bin
 
user1804599
There is no one here with bin powers.
 
user1804599
(POST PONIES!)
 
user1804599
Lounge<Creampie>
 
12:48 AM
postpone it
 
user1804599
Clojure's recur is nice.
 
user1804599
It errors if it's not in tail position.
 
Night
 
user1804599
-1
Q: homosexual love end of days

user15452I am Gay. I asked jesus one day if being Gay was a sin because I believe whole heartly that I was born this way and if I could change it I would because its all I want to be is normal not for man but for my father in heaven Jesus Christ. Jesus responded to me and said I love you for who you are...

 
user1804599
 
@rightfold I bet you wanna bake a creampie with @AlexM. :P :P :P
 
there, comparison between signed and unsigned
@rightfold > I know according to the book of
THIS CLIFFHANGER
I NEED TO KNOW
 
1:20 AM
Since when NaCl forms molecules? — Matteo Italia 10 hours ago
 
user1804599
I had a nice onion sauce today with my kebab.
 
user1804599
It was nice.
 
user1804599
I love onions.
 
0
A: Is it possible for life to evolve on planets without water?

SlashthedragonThere are self reproducing masses of chemicals at one confined location in the universe. These are fuelled by the photons emitted from a nearby nuclear furnace. The major elements in the self reproducing masses are hydrogen, oxygen and carbon. Because carbon is the "slut" of the elements, it like...

 
wow
 
1:30 AM
i've started repeatedly F5ing everything
time for bed
 
@woolywhale Sorry I can't downvote currently. What was your particular question again? Which anomalies did you notice, when you stepped through your program with a debugger, or with a decent test case you've been writing for it? — πάντα ῥεῖ 2 hours ago
Apologizing because he can't downvote? hmm....
 
So I just won another Civ5 game. I should start playing at King because Prince is too easy for me.
 
> carbon is the "slut" of the elements
 
such slut
 
more like Queen #amirite
 
1:36 AM
#lolno
 
@Code-Apprentice We aren't even 2 hours past UTC midnight and he's already run out of votes? Holy shit.
 
> two hours ago
but that does make sense..it's been a while since I ran out of votes in one day
 
Regardless, he's cast 50 votes today. As in: since 102 minutes ago.
 
no, the comment was made two hours ago, so he cast 50 votes "yesterday" (in SO days)
 
But if you look at his profile, he's already hit 50 today. And today started less than 2 hours ago.
 
1:44 AM
hmm...didn't look at his prof
 
So regardless of whether he ran out yesterday, he already ran out today.
 
was just deducing based on the comment timestamp
where do you see how many votes someone has cast?
 
Their profile, bottom right corner.
 
hmm...I wonder how frequently that is updated
 
minutes
 
1:49 AM
Flaming Skeeball
 
So exclusive Jon Skeet doesn't have the badge.
 
Good observation
 
I forgot
what was the best way to evaluate a parameter pack again?
 
2:20 AM
char dummy[] = { '\0', (args, void(), '\0')... };?
^that’s a GCC workaround actually, you want something like eat_everything_type dummy { args... }; with struct eat_everything_type { template<typename... Any> eat_everything_type(Any const&...); };
 
2:41 AM
 
2:59 AM
So I just watched "The Cabin in the Woods", good stuff
 
 
1 hour later…
4:07 AM
been a long time since I saw a movie
 
There are no movies here
 
5:03 AM
@StackedCrooked The last few movies I've seen were disappointing, but this one was really good.
 
5:38 AM
Smash 4 is so fun
 
6:26 AM
tiiiired
even though all I did was 3 hours driving today
 
7:02 AM
Windows can destroy itself:
http://stackoverflow.com/questions/26200357/how-to-change-ntfs-files-acls-externally
I don't know whether to laugh or cry.
 
7:18 AM
for you wizards
2
Q: What is an `int foo::*bar::*`?

zneakA cool thing with C++ is that it lets you create variables of pointer-to-member types. The most common use case seems to be to get a pointer to a method: struct foo { int x() { return 5; } }; int foo::(*ptr)() = &foo::x; foo myFoo; cout << (myFoo.*ptr)() << '\n'; // prints "5" However, me...

 
Using template<typename Type> using alias = Type; might help, too.
 
7:55 AM
@chmod711telkitty 3 hours driving is petty tiring in itself. You pop round to the nearest corner shop?
 
8:22 AM
back home already ...
too much sun shine, too much food .. not enough water ... feels like sun dried bacon ~_~
 
8:57 AM
so i've watch about half of series one of BSG, all I can think is, what have they got against squared corners?
 
9:37 AM
@MartinJames No, idiots can destroy Windows
 
Ell
NaCl is a crystal not a molecule
 
@CatPlusPlus Heh, true. I've actually found Windows to be reasonably resilient. I've never had to do a reinstall, (except after system disk hardware failures).
 
If you have a Linux with a MAC system you can fuck root capability to do anything too
Which is why idiots shouldn't play with security settings
Setting F on the entire drive is dumb
boo hoo I can't edit protected files but oh god this system is full of malware
 
9:57 AM
@LightnessRacesinOrbit I have to do that everyday with my neighbor's goat
 
the camping ground where we based at last night had no water source other than a small creek nearby, but wallabies, wombats, duck, magpies ... pretty much every other animals drink from the same creek too!
 
@Xeo cool
did you see now why I said satoshi was the best character? :D
 
once (sometime last year) we were forced to share water source with the sheep, not happy!
 
@Xeo I didn't like the ending, too inconclusive for me
 
Xeo
@AlexM. yea
@AlexM. I found him a bit annoying at times.
 
10:07 AM
 
Ell
@TonyTheLion lol
 
@TonyTheLion lol
 
hi
With usage of DList pointer in DListnode class, Does DList class break abstraction or encapsulation rule here?
0
Q: Is this a doubly linked list?

overexchangeBeing from Java background, Below is the C++ code from which i would like to understand the conceptual usage of DList listp; member in DListNode class. I could not understand, How DList type object can be casted to DListNode type in code node->add ( (DListNode*) this, this ) ; and this.tail ...

 
10:33 AM
Because, `rem()` method of `DListNode` class returns node which is dangerous
and `rem()` is public method. user who can access `DListNode` `rem()` method can tamper complete list because `DList listp` is a member of this class.
 
user1804599
> this.head = (DlistNode*) &dummy ;
 
user1804599
whaha what the fuck
 
seen it
embedded-end optimization.
 
user1804599
Also, that whitespace. Are you ThePhD?
 
nullptr is just fine
 
10:48 AM
it's not fine because you can't go backwards from it.
although that code still expresses it in a dumb way (better with inheritance so it's well-defined)
 
You can't do anything with a pointer to a pointer force-casted into an unusable pointer that doesn't point to anything anyway
 
user1804599
It casts DListNode** to DListNode* so it's terrible case closed.
 
It still needs special-casing
So good job on optimising a thing by adding another thing and not achieving anything
 
user1804599
lol parenthesised return value.
 
@CatPlusPlus It does point to something- a DIListNode*. If DIListNode is say, struct { DIListNode* next; DIListNode* tail; };, then ifhe accesses the head he will get a pointer to ... a memory area containing a pair of pointers, just like expected.
and adding one pointer into the list object is way less expensive than a dynamic allocation.
 
10:53 AM
It's pointing to a pointer that points to null
Which is also force-cast
It's dumb
 
which is exactly what you'd expect as the head pointer of the last node.
I'm not saying that it's not dumb or terribly expressed
I'm just saying that it does, at least in theory, serve a purpose.
 
Oh yeah I see what you mean
Still dumb
 
that's a creepy sounding thing to be able to do :S
 
Ell
yeah sounds odd
 
11:09 AM
@thecoshman is she the robot's girlfriend?
 
So who are the top 3 C++ people in this room?
 
Ell
As a guess, robot, luc danton and puppy. But idk
Most people are pretty alright
 
@chmod711telkitty they don't exist
 
user1804599
I want to migrate to Poland.
 
user1804599
But I have to learn Polish.
 
11:21 AM
@thecoshman that's a mongolian tradition, much like didgeridoos, but internally
 
@rightfold WTF? Why would you do that?
 
user1804599
Because NL sucks.
 
@sehe indeed. mighty impressive sounding I'd say, I don't say it, but I'd.
@rightfold and Poland is an improvement?
 
user1804599
Of course.
 
@thecoshman She has awesome control. And the quality of the overtone isolation is also quite unlike anything I've heard before
@rightfold cough
@rightfold learn shoe polish
 
11:28 AM
right
clothes, phone, money, pills, umbrella
toiletries
 
you packing up?
 
yep
going back to Bristol today for about a week
 
umbrella - doesn't get much more British, I'd say
 
easier than packing a coat
 
What, you don't have a coat?
 
11:29 AM
I do have a coat
 
I need to lose more weight before it'll fit me properly again
 
sounds drug addictive
 
but an umbrella is substantially smaller and lighter
and my suitcase is pretty small given my trip duration
 
@chmod711telkitty go play with some birds
 
11:32 AM
birds? they still come & beggging for food @ my windows
 
@Puppy wow. that's kind of a confronting reality. I'd be nowhere without a coat though.
 
user1804599
Coat of arms.
 
user1804599
Or maybe I should move to the US.
 
Yeah. You'd thrive there.
 
@sehe my thoughts too.
@Puppy he he he, I know what you mean, but it still sounds very lady like to say 'toiletries'
 
Ell
11:37 AM
@rightfold don't be silly
 
@sehe no need, just tough it out :P
 
Ell
@thecoshman what would a man call them? o.O
 
@Puppy for a week, a backpack would do me
 
user1804599
@Ell Why is it silly?
 
Ell
cos USA is terrible
 
11:38 AM
@thecoshman 's what I do
 
Ell
Everywhere is terrible.
idk
 
user1804599
What is terrible about it?
 
Ell
move to germany
 
@Ell ... toiletries :(
 
Ell
@rightfold it's full of americans ;)
 
user1804599
11:38 AM
lolno, I'd have to learn German
 
user1804599
My choice is basically the Netherlands, Flanders, Suriname, USA, Australia, UK, Canada, New Zealand, some other obscure English speaking countries and maybe South Africa.
 
Move to Gent.
 
user1804599
Australia and New Zealand would be particularly nice, since they're very far away from all the morons I know.
 
haha USA
 
USA is pretty big
 
11:42 AM
Canada is like 100000x better choice if you really want to switch continents
 
user1804599
As long as I don't have to speak French I'm totally fine with Canada.
 
@rightfold ooh, South Africa... yeah... I'd choose life.
@rightfold also, Ireland :D
 
user1804599
Je m'appelle rightfold.
 
user1804599
@thecoshman I count that as UK no matter how much not UK it might be.
 
sack le blur
 
11:44 AM
UK also sucks
 
@rightfold best not come here then.
oh, wait, it's more suck re blur
 
user1804599
Ununited Kingdom
 
well... that's more down to those pesky picts up north
 
@rightfold How does it suck? Grass is greener on the other side of the road effect taking the better of you?
 
Ell
@rightfold northern island is UK
 
11:46 AM
@VáclavZeman I've found that the grass does indeed seem greener here in Ireland then back on Britian.
 
Ell
republic of ireland isn't UK
 
@Ell which northern island?
 
user1804599
Ireland is part of "that thing" so I count it as UK.
 
@Ell That does not count. That's pretty much the same country. /me runs...
 
Ell
 
user1804599
11:47 AM
How about Wales? :D
 
@rightfold UK
5
 
Ell
@rightfold if you like getting wet all the time :P
 
user1804599
I like drizzle.
 
Wales is good if you like sheep...
But yeah, Ireland probably isn't a good idea, it's expensive here. Well, the houses aren't. Put it this way, I find London prices fairly ok.
 
Ell
@thecoshman where in ireland are you from?
 
11:50 AM
@Ell erm... the foreign part...
I'm not Irish :P
But I live right in the middle
 
user1804599
> Are you a permanent resident of the United States and have your alien registration card (Green Card) or other proof of permanent residence?
 
user1804599
I like how alien registration cards are called green cards.
 
user1804599
Little green men.
 
where's that from?
huh... I guess I should go shopping... pick up these few things.
ergh.... fine... off to shops I go. laters.
 
@thecoshman Hah! That's pretty good.
 
user1804599
 
@rightfold sexist!
 
@rightfold lekker illegaal!
 
Xeo
12:13 PM
@thecoshman On a Sunday?
 
Ahhhh this. This. I work from home for 80% of my month and, whilst doing so at the home in which I live alone is not perfect (it's easy to be forgotten when you're seen), it's a damn right better than when I had a partner who worked in a nearby office from 6am-4pm and could never understand that I was working harder during 10am-7pm than she ever would in her life. It was incredibly frustrating. — Lightness Races in Orbit 7 secs ago
 
12:41 PM
@LightnessRacesinOrbit How do you quote in here?
Never asked that before.
 
If you post a link to a comment, it will get expanded automatically
Otherwise, "> text" to get text quoted
 
@rightfold the Isle of Man is also not part of the UK
The Isle of Man (/ˈmæn/; Manx: Ellan Vannin [ˈɛlʲən ˈvanɪn]), otherwise known simply as Mann (Manx: Mannin, IPA: [ˈmanɪn]), is a self-governing British Crown dependency located in the Irish Sea between the islands of Great Britain and Ireland. The head of state is Queen Elizabeth II, who holds the title of Lord of Mann. The Lord of Mann is represented by a Lieutenant Governor, but its foreign relations and defence are the responsibility of the British Government. The island has been inhabited by humans since before 6500 BC. As one of the six Celtic nations, Gaelic cultural influence began in the...
 
Neat, VBox's virtio seems to be working
 
Lemme try
44 mins ago, by chmod 711 telkitty
@rightfold sexist!
Neat. Very neat.
 
Also works with comments on SO
 
12:45 PM

Sandbox

Where you can play with regular chat features (except flagging...
 
you can even get a bit inceptiony
 
Go to the fucking sandbox with this nonsense tia
Also stop starring useless crap
4
 
No. Oh, that one. Canceled
 
things exist for a reason ... or many, no crap is useless ...
 
12:47 PM
that's manure
 
@sehe WAT!?
that's not RAII
 
@Xeo yes...
@Mgetz he never mentioned Isle of Man :S
@CatPlusPlus virtio?
 
Paravirtualised hardware
 
oooh...
I see...
(not really)
 
Lower overhead, better performance
Since it can use fine-tuned protocol instead of emulating a real device
 

« first day (1450 days earlier)      last day (3500 days later) »