« first day (1624 days earlier)      last day (3317 days later) » 

12:00 AM
guys any good reason for not being able to do a bitwise swap on non-trivially-copyable types?
 
...
 
Another part of the problem is that it does not want to let go off the tunnel. Once it matches you into the tunnel, you can drive even 1 km away from it on the street and it will still show your car in the tunnel, until it thinks you have not left the tunnel.
 
@Veritas "Any good reason why something not trivially copyable is not trivially copyable?" A. yeah, guess what. It turns out not to be trivially copyable!
It's basically the definition of the thing. Anyhoops, define your own swap and implement as bitwise if it happens to be valid for your type. Problemo solvo
 
@sehe No, it cannot be that. The tunnel is clearly a tunnel. Also, I am evaluating it as a person who worked on Alpine Electronics' car navigations. I am not making shit up.
 
@wilx WTH. Why would you be making things up
It's funny how you go from "the map data could have flaws" to "it is clearly a tunnel". I mean, what if the exact location is slightly inaccurate in the map...
 
12:03 AM
@sehe I mean, I am talking as somebody who has some experience with actual development of car navigations and how it does things. It is certainly possible to infer that from the map data.
 
I believe you. No clue how this helps refute the idea that the map could have inaccuracies
 
@sehe It does not matter. The algorithm has the information about it being or not being a tunnel.
 
..
 
Also, there is no inaccuracy here. I live here. :) I know how the streets look and where they are. They are on the map exactly where they should be.
 
@sehe Please here assume that all questions are retarded. Trivially copyable types were allowed to do bitwise copying because if not-trivially copyable you need copy semantics when creating a copy of the object. When swapping however there is still only one of each object and I can't think of why that may be dangerous.
 
12:06 AM
"A programmer is a person who will happily spend a day writing a program that solves a one-hour problem in one second."
 
@Veritas if it's not trivial, the compiler can no longer assume anything. What if the struct contains 'encrypted' data where the data is XOR-ed with the address of the struct? Clearly bitwise wap is not so ok then
 
Xeo
> We are writing to inform you that we were recently able to confirm that there was unauthorized access to a Slack database containing user profile information.
ffs
 
@orlp It fits. What it does not say, the programmer anticipates having to do the same task some time in the future and thus he is saving time this way. :)
 
@wilx you read the actual map data?
 
Xeo
> We are writing to let you know that there may have been unauthorized access to some of your Twitch user account information
 
12:08 AM
@sehe That's why I am asking. I was looking for counterexamples and that's a valid one.
 
contrived, but easy to see
 
@sehe What kind of issue with the map data beside position and tunnel attributes are you guessing at?
@Xeo Same day?
 
Xeo
Nah
Twitch was... 4 days ago
 
@Veritas Just think "what setup/teardown/interpretation could go in constructors/destructors beyond memory management of raw pointers" (even with just raw pointers, what about a linked list, simply swapping two elements would make the linking pointers wrong)
 
Xeo
Slack just now
 
12:10 AM
@wilx nothing. I'm amazed you can tell the position of the tunnel is accurate in Garmin's map data
I have no idea what Slack is, but I got such a mail as well
 
@sehe got it. I actually thought that something may be wrong with lists but I only thought of the heads.
 
Xeo
@Xeo: Just because it's legal doesn't mean it's a good idea. Enumerations are for enumerating. That's why they're called enumerations. It's sad that C++ allows this ("It is possible to define an enumeration that has values not defined by any of its enumerators") but I suspect it's for compatibility with existing, legacy, terrible, C software. — Lightness Races in Orbit 6 hours ago
Ugh.
So terrible.
 
@sehe Either way, it does not matter. The issue lies elsewhere, in the VP system.
 
@Xeo can't say I agree, even C# went out of its way to add the [flags] attribute to allow for use of enums that way
 
Xeo
I vehemently disagree with it vOv
 
12:13 AM
well at least we're on the same page
 
the page is https://chat.stackoverflow.com/rooms/10/loungec
 
@sehe yes, yes it is...
 
This is pretty damn Orwellian: http://boingboing.net/2015/03/26/australia-outlaws-warrant-cana.html
Organizing a race called the En Dash. No one will know how long it's supposed to be.
 
user1804599
:P
 
12:31 AM
 
need to vote today ...
 
sounds like really you shouldn't
 
I don’t really consider enums to be a language feature, in any language.
 
@райтфолд doesnt load for me
 
12:34 AM
Ironically, Java has nice features there
 
user1804599
@Borgleader refresh
 
user1804599
 
alweer
 
@sehe I thought they were sort-of AlgDT-like but I’m actually not too familiar with them.
 
Xeo
Hm, I think I whipped this cream a bit too much
 
12:35 AM
it's easy to add meta-data to enum members (you can add methods, data fields)
 
Xeo
Memo: whipping cream with a shaker is maybe not the best way
 
@райтфолд lol :D
 
@sehe You 'consume' them via matching with switch right? (incl. in those methods, should you need it)
 
@Xeo Whipped it to death?
 
Xeo
It's chunky
So I got... whipped chunks, not whipped cream.
 
12:37 AM
Can they be recursive?
 
@LucDanton Yeah. Nothing exciting there
@LucDanton I don't think so. It's java!
 
cba to check for myself or find out :)
 
me neither
 
I have slept through the evening, now it is 1:38 in the morning and I feel like going out. I probably shouldn't.
 
@wilx How so?
 
12:39 AM
@sehe That’s kinda my point though. It’s a half-arsed ADT largely unlike C-style enums. What is there to say about enums from a language-agnostic perspective?
 
@Jefffrey Too late, it seems to me. Though many pubs are still open.
 
Do you usually go out alone?
 
@Jefffrey Yes.
Quite often.
 
Interesting
 
@райтфолд still not working, i get the page but the video wont show
 
12:41 AM
Urrrg. Here's some distraction, wilx:
 
@Borgleader Your Flash is broken?
 
So maybe the sane way to do things is to have ADTs and a concise way to define flag types :v
 
LOL! RT @successfulsw: From a usability point of view it make more sense if FireFox showed a message when Adobe Flash has *not* crashed.
 
@sehe lol
 
Xeo
12:43 AM
So, Pillars of Eternity seems to be all the rage right now. Coworker mentioned I should play Baldur's Gate beforehand.
 
@sehe What is the "Morality Dress Code"?
 
how would I know. Did you reach the bottom?
 
@Xeo I'm interested but I have way too many games already =/
I might get it when its cheaper
 
@sehe Yes. It is a satire.
 
The Bar-Miztvah attack. File under: reasons to stop using RC4. Also file under: extremely impractical attacks http://www.imperva.com/docs/HII_Attacking_SSL_when_using_RC4.pdf [pdf]
 
12:48 AM
@sehe Ah. Well, that is sad.
 
Xeo
Why?
 
@sehe Is that a swap operator I’m seeing?
Alright, time to uninstall GHC to install GHC. Long live GHC!
 
Yup
 
My professors tell me I'm the only person they've ever come across who uses ++i instead of i++
And people tend to comment on this practice
 
Wait till you write if (42 == answer) { std::cout << "Thanks for all the fish\n"; } // Yoda was here
 
12:55 AM
Is there a common name for the information <position, direction>?
 
@MohammadAliBaydoun Wear it as a badge of honour. One eyed among the blind. :)
 
@AndyProwl Don’t think so.
 
@wilx :D
Today, I realized I don't know C++
I want to buy a book and relearn it all
 
@AndyProwl dynamics, maybe... Nothing better popping up
 
@sehe I never do that. I want to read the code in the order of English sentence would.
 
12:56 AM
"If 42 is the answer"...
 
@MohammadAliBaydoun o.o
 
@sehe Not bad
 
@Borgleader It's a phase
 
@wilx I always set the expected value to the left. The expected value defines the branch more than the method to produce the actual value
 
@sehe I’m surprised I never noticed this in your code.
 
12:58 AM
Maybe just a very good book on TMP would give me that confidence I need
 
I'm not methodical about it I guess.
 
@MohammadAliBaydoun i prefer phasers
 
This is also a lot clearer with API styles like if (-1 != somecall(asdasd,.asdad))
@MohammadAliBaydoun just, use the Booze Library
 
What do you think of ML-style cases?
 
I've seen them. And forgotten.
 
12:59 AM
@sehe But ;~;
@sehe I do!
 
Booze can give you that confidence boost
 
@sehe For one, they clearly separate the scrutinee from the, well, cases.
I wanted to find a nice traditional ML example with | for separating the cases but I don’t know where to look :(
 
I got into Competitive Programming earlier in the Fall
I haven't written software since
I want to write code for fun again :<
 
Standard ML (SML) is a general-purpose, modular, functional programming language with compile-time type checking and type inference. It is popular among compiler writers and programming language researchers, as well as in the development of theorem provers. SML is a modern descendant of the ML programming language used in the Logic for Computable Functions (LCF) theorem-proving project. It is distinctive among widely used languages in that it has a formal specification, given as typing rules and operational semantics in The Definition of Standard ML (1990, revised and simplified as The Definition...
Ctrl-F 'case' I guess.
There’s one further down with ye olde shape example.
 
I like that. Seems very similar to Haskell, F# and the lot
 
1:05 AM
Yes, 'ML-style' includes the lot.
 
Okay. So the answer was "I like it"
 
Modern MLs I know off the top of my head are SML (above) and OCaml. Haskell and F# are the two offshoots I can cite off the top of my head, too.
@sehe There’s some BNF/switch fallthrough inspiration in there, IIRC OCaml lets you group different cases with the same branch e.g. 0 | 1 => blah.
 
Xeo
Alright, time to sleep
 
@Xeo 'night
 
1:22 AM
@Xeo Night
 
@Xeo night
@Xeo Oh and before tomorrow comes, you suck for getting AZ before me. :)
 
if i get some code snippet from SO, do i need to cite it or something?
or does CC let me just take it?
 
I do just because I don't like stealing without credit.
Not sure what CC says.
 
Code is CC-By-SA
 
> user contributions licensed under cc by-sa 3.0 with attribution required
 
1:29 AM
Some users say their code is public domain.
there's a meta question about it
 
how do i cite this?
45
A: Slicing a dictionary by keys that start with a certain string

Mark ByersHow about this: def slicedict(d, s): return {k:v for k,v in d.iteritems() if k.startswith(s)}

 
@Rapptz Which might be a pointless thing to say, depending on jurisdiction.
 
Just a link would probably be fine.
 
k
 
Nobody cares about snippets, especially trivial ones
 
1:30 AM
@LucDanton CC0~
 
@Rapptz Is that what they are saying?
I’m clarifying for everyone, I know you know.
 
131
Q: Can we get some explicit clarification on the *intended* legal usage of code from SO answers?

Spencer RuportI was recently told by someone that due to the fact that Stack Overflow uses the CC BY-SA 3.0 license any code examples cannot be used in a commercially available closed source application. This individual works for a relatively large international corporation and regularly speaks with lawyers of...

By definition the CC licenses weren't designed for software / source code licensing. Stack Overflow uses the CC-BY-SA because it's intended as documentation resource, not as code repository. So you won't get an official interpretation on that, in particular not in a generalizable form. — mario Feb 21 at 0:55
 
@Rapptz Now that I think about it, it’s sort of weird that such a question was asked so late in the game.
 
There are many but this is the one that made me add the disclaimer on my profile.
 
All my public code I consider to be "public domain". I wish not having a license implied public domain.
But not having a license means copyrighted. IIRC.
 
1:37 AM
Yeah.
 
A license can never take away any rights.
 
The whole licensing thing sometimes seems like a role-playing game.
 
All it can do is grant rights - the default scenario is that someone has absolutely no rights to your code.
 
3
A: Can we get some explicit clarification on the *intended* legal usage of code from SO answers?

Spencer RuportI received a response from Stack Exchange. Spencer, Sorry we haven't been able to give you more help. More sorry that I still can't add much helpful info. Giving a response that I know is not solving someone's need is about as unsatisfying as this job gets. I checked back with the f...

Oh interesting.
 
"You are allowed to do this, but not this." etc.. But it's almost never legally enforced.
If someone violates GPL then the author can't do much. Can you sue someone from another country? (If you are not rich?)
 
1:42 AM
shit it's almost 3 AM
 
If an answer consists in whole of code, and is substantial enough (<- how much is 'enough' can only be determined in court, on a case basis), and no 'excerpt' is made (i.e. copypasta the whole) then there is no exception. Obviously Jeff was aware of this but I still feel like there are people that are just going to see 'code' and 'exception' together and run away with it.
 
i'm adding token rules like:
t_PLUS = r'\+'
to make a master regex, i'm '|'.join()ing them. however, i need to append/remove from the join() when i add/remove a rule. to find a more convenient approach, i tried going through globals() looking for things that started with `t_`, but globals() is not ordered in the way I declared the variables. I need to preserve the order (eg, to make `=` not mask `==`)
halp?
 
@StackedCrooked You can use a local court probably
 
But what if the person violating your license is in another country.
 
Yes I saw that part too
 
1:44 AM
Can a local court deal with that?
 
Anyway in case of GPL there are watchdogs you can alert
 
λ :i Monad
class Applicative m => Monad (m :: * -> *) where
 
The reason I doubt this is because of this stupid example. When I was a kid my father moved to the Netherlands and he stopped paying alimony. The institutions told my mom there's nothing they can do about that.
 
1:59 AM
can't figure out a solution. i cri.
i'll bother the python room tomorrow
cya for now, gonna sleep
 
2:26 AM
[5.18/1]"In all cases, the assignment is sequenced after the value
computation of the right and left operands, and before the value computation of the assignment expression" Since it doesn't specify the order of application of the side effects doing stuff like A[i] = i++; is still undefined right?
 
Boy, I'm stupid.
10
 
@R.MartinhoFernandes we all know
everyone here is stupid
Lounge<Stoopid>
 
What's up?
 
I opened a package and tossed the contents in the rubbish bin instead of the packaging.
 
what was the content?
 
2:31 AM
lol
 
does that mean that the xor thing a ^=b ^= a ^= b is well defined?
 
what that are you talking about?
 
@Veritas what are you going on about
 
@Andy twas a book
 
aw... is it damaged?
 
2:35 AM
I was just taking a look at the standard and since c++11 apparently there have been some changes to sequence points.
 
Dunno.
I'm walking back to the bin where I tossed it.
Gonna go all hobo on it.
 
the above xor swap wasn't valid before but it may be valid now, not sure if I interpret it correctly.
 
Oh, I thought you tossed it in a bin in your house
 
Wait... how far did you go after tossing the book?
What were you doing? ... reading the packaging? =/
 
2:38 AM
Dunno, 500m.
I put the packaging in my backpack.
And went home.
Seems sorta ok.
 
Good to hear
 
A slightly broken corner.
 
is it a programming book?
 
No.
... cooking.
 
I see
Well, at least you haven't lost it
 
2:41 AM
It has a story now
 
Maybe your subconscious doesn't really care about cooking?
"quick throw it away, brain will never figure it out"
 
ITT Robot is anorexic
 
I would like to have a beer but it's 4 AM
dilemma
 
@R.MartinhoFernandes Threw away cooking book, your subconscious doesnt want you to eat -> anorexic. Its obvious
 
2:45 AM
Do it.
I'll have some gin with you.
 
Deal
Got it. Cheers
 
@R.MartinhoFernandes Similar things happen to me when I'm thinking about something.
Like if I'm overthinking about something, I might get out of my home and head in the very opposite direction I should go. And then after few meters, I realize I'm going nowhere and switch back.
I don't think that's stupidity.
 
@Jefffrey It's just distraction
I hate this antivirus I can't disable it and it's been making my laptop barely usable for like 3 hours now
scan64.exe and mcshield.exe you must die
 
This gin is great.
 
2:55 AM
There was this one time, that I was supposed to drive and follow another car in order to get in some place. Problem was that I was thinking about something else entirely while driving, and we were driving down one of those streets I travel across very often. So when there was the "enter highway" lane where I usually go to, I turned and took the highway while my friend went on.
 
Beer's okayish
It's cold at least
 
Fucking parity.
 
@Jefffrey Taking wrong turns happens to me all the time
 
It was one of those "damnit, you had one job" kind of deals
 
Yep, I know that feeling
 
3:07 AM
Beer's gone
 
@Jefffrey That is why you have car navigation.
 
I managed to fuck with a GPS too
 
This keeps happening, even though I have nobody plonked.
 
What keeps happening?
 
Your messages are not merged
 
3:09 AM
oh
I don't see them merged either
chat bug?
 
Unmerged messages. Andy is different! Lynch him!
 
If Cat was here we would say that chat is Very Well Programmed
 
*Coded I think
 
ah, it's coded
 
@Jefffrey Programmed, with zeroes and ones put in by shorting two wires in steady rhythm.
 
I thought they were many more
 
All right, I think it's time to sleep
 
Yeah, me too. Good night
 
Hopefully no sickness tomorrow. Night
 
 
3:15 AM
@AndyProwl Also I tried to install the OpenGL Haskell bindings and no version from 2.2 to 2.8 included seems to compile. Which is hilarious.
 
Good night.
 
That's the kind of roulette I was talking about
 
4:03 AM
Damn I look good
As long as judges think that a spoof domain name is "ingenuity", we will not be safe. Please educate the old twats. Thanks.
 
4:46 AM
Is it just my imagination or should this individual know better?
 
don't see anything wrong atm
just skimming
outside of using namespace std
ooh it's gone down south
alrighty
 
um
Robert
the famous mod
using an internet tutorial from cplusplus.com of all places to teach C++
you are okay with this?
 
I was skimming the tutorial to see if it was bad
It was.
Started out decently.
 
5:08 AM
ok sorry
 
5:20 AM
Picked up the Programming Pearls book, @JerryCoffin .
Only in the first couple articles so far, but I keep thinking "this what the STL is for."
I'm thinking I should do his bit-twiddling exercises just to stretch my brain anyway.
But every time he asks a question "how would you do X" I think "I'd just use such-and-such STL container with the appropriate STL algorithm."
Although I've already been impressed by some of the clever solutions.
The good clever, not the bad clever.
 
@LightnessRacesinOrbit There's no question there.
 
@RobertHarvey I believe he's talking about your comment
Not the question closure.
lol @ someone calling you a douche
 
Any tutorial ought to suffice. I know you guys have really high standards for C++ literature, but seriously, his question isn't rocket science.
I picked the first tutorial I found. Which is more effort than the OP apparently put into his question.
Perhaps even a good C++ book. It still amuses me that some people think they can learn programming from scratch by asking Stack Overflow questions.
 
@LightnessRacesinOrbit I wouldn't say "wouldn't know better" if the user is just a clueless newbie. But I have seen 10k users post that kind of stuff.
 
So I guess anything on cplusplus.com is verboten, then?
 
5:33 AM
wow trying to get some help and Harvey is being a douche — ryan m. 39 mins ago
ahahahaha
and they say the Lounge is bad
;)
 
LOL
I didn't even bother to read the comments until now. hehehe
 
Had this playing in the background for a while. So many pov.
 
5:46 AM
Hellooooooooooooo c++ girls and boys :P
 
anyone here read the book National righteousness and national sin: the substance of a discourse delivered in the Presbyterian church of South Salem, Westchester co., N.Y., November 20, 1856, by Aaron Ladner Lindsley ?
 
@orlp Please also Specify the author's phone number :)
 
@ProblemSolver 911
 
@orlp 0
 
Gotta admit the motions seem realistic.
 
5:54 AM
@StackedCrooked I was just browsing reddit
learned a new term today
'classturbation'
masturbating while in class
 
Interesting.
 
Never heard of it either.
 
In Sweden we have fickrunk. Somewhat similar.
 
They are tricking you into using the term.
To make you end up in awkward situation.
> I was expecting fan death.
lol
 
Classturbation - noun. Def: Classifying for the joy of classification and the satisfaction of seeing one's own categories.
 
6:56 AM
ok sorry
 
7:19 AM
@LightnessRacesinOrbit im sorry
 
7:39 AM
Where can I find a list of standard library equivalent to boost libraries?
 
@Elvisjames you mean the modern parts, or every portion of the standard library that was ever inspired by a boost module?
 
The modern ones
well i'm looking for some specific ones though
 
 
The TS isn't what he's looking for lmao
Only FileSystem TS and any and optional are even part of boost.
 
optional
any?
 
7:45 AM
already listed
 
you edited it in
 
before your comment
 
not on my screen
latency ftw
 
I only added in optional.
 
Are boost bind and std bind equvalent?
 
7:51 AM
don't use bind vOv
 
not sure about equivalent
std bind was def. inspired by boost though
 
and then rendered obsolete by lamdas
 
> * GHC now has preliminary and experimental support for DWARF based debugging.
How come I made jokes about the land of the Elves but didn’t think of Dwarves before. Oh well.
I guess the AMP stole the spotlight because it’s the first time I heard of these features.
 
@LucDanton o_O
 
@ScarletAmaranth If you’ve heard of it, Backpack has apparently gained a lot of traction and this is part of 'merging' it into the language.
Well, into GHC at least.
I know I’ve read one of the drafts but I don’t remember anything exciting about it. It’s probably not MLy enough for me.
 
8:04 AM
I have some googling to do :)
 
8:24 AM
@ScarletAmaranth I might use a reminder myself.
 
I think the world would be a better place
if cplusplus.com would be deleted
all those poor beginners...
 
8:36 AM
I stand corrected, I think I read one of the earlier paper and skipped the final one. It’s much more satisfying.
 
8:50 AM
TIL shared_ptr's constructor has an overload which accepts auto_ptr<T>.
 
who uses auto_ptr<T>
honestly, it should be removed
 
It's funny since C++11 deprecated auto_ptr while introducing shared_ptr.
 
auto_ptr is removed in C++17.
 
good
 
auto_ptr was useful for a few cases
 
8:51 AM
now gimme concepts and modules
 
It will be missed.
 
@LucDanton not really though
 
no more move-on-copy
 
guys do you wanna know how to get 55 reputation?
4
A: What if thread exits before calling pthread_join

orlp What will happen if the main tries to join a thread which already exited? The join operation will immediately finish and return.

 
The most important resource I can think of right now is you. Don't waste your time. (a) start somewhere (b) ask targeted questions on SO only — sehe 40 secs ago
Somehow that may come across complimenting. Of course, it's more of a rebuke
 
8:53 AM
Recently I got a copy of the original Design Patterns book.
 
@orlp nah. Yesterday I answered 1 question outside my usual tags. It was disappointing to see it immediately generate more rep than on most boost answers combined, daily or weekly
@StackedCrooked So, now you can do the sky-diving and your bucket list is empty!
 
I'm too afraid of heights for sky diving.
Don't really get the "Prototype" pattern.
 
Ask the Lobster :)
 
Hy all/
 
Uhoh. A facebook user
 
8:57 AM
It is allowed to ask for support on chat?
:D I have only 15 yearr
And i know c++ :))) soo much
 
@CosminIovan That's enough time to learn c++
 
Yep, i know
 
@CosminIovan Not really. But you can ask as long as you (a) don't annoy (b) don't expect to get an answer (the main site is for that)
 

« first day (1624 days earlier)      last day (3317 days later) »