« first day (843 days earlier)      last day (4107 days later) » 

12:01 PM
@R.MartinhoFernandes As far as I'm aware, you can simply atomically swap out the node holding the value, and then destroy it on the calling thread- i.e., after all the structure mutation is done.
 
@DeadMG exception safety? mmm. less restrictive than trivial, afreed
@DeadMG Isn't that what libcds does - by freeing elements on a gc thread?
 
dunno, never checked.
 
It comes with pluggable gc implementations, and several highlevel lockfree container algorithms. I never noticed any undue restrictions on the element types there. Allthough that may mean I was just storing useless trivial items
Safe memory reclamation (SMR) algorithms:
    Michael's Hazard Pointer
    Pass-the-Buck SMR
    Gidenstam's Hazard Pointer with reference counting
 
..and you all hate pointers because they're too dangerous...
 
@MartinJames No. We hate them because they are often unnecessary risks
 
12:06 PM
@MartinJames dumb pointers are a sign of dumb code
 
The lockfee strctures don't sound a huge lot better..
..and it looks like my keyboard is going down as well..
 
@MartinJames How so. They're perfectly fine. Writing them is a different matter. Using then is the same as using ConcurrentBag in .NET 4.0: a walk in the park
 
@MartinJames How is that related to pointers in any way :psyduck:
 
I have found that, in general, the more difficult something is to write, the more bugs there are within. This does not encourage the use of stuff that is difficult to write!
 
@BartekBanachewicz That's wrong.
@MartinJames Like pointers.
 
12:11 PM
@R.MartinhoFernandes excuse me?
 
Lock-free structures are tricky to write, that's why you never write them by yourself
Same with things like crypto
Use already vetted implementation and don't even think about writing it from scratch
Also seriously "— pointers are bad — but lock-free structures aren't any better!11 — what"
 
Never got an exception when moving or copying a pointer.
 
@BartekBanachewicz Owning dumb pointers are silly. The rest is perfectly fine.
 
@R.MartinhoFernandes do you mean passing them around is also fine?
 
12:14 PM
Why wouldn't it?
 
well, lack of distinct ownership?
"who created object behind this pointer in the first place"
 
What if the ownership is clear: none.
 
the ownership is distinct- none
 
@MartinJames So? Are you saying first class objects were a mistake? This is central to C++, so if you dislike exceptions and non trivial constructors/destructor, you should consider using C
 
well if no part of the code owns it, it's ok.
 
12:16 PM
Doesn't matter who owns it
 
@BartekBanachewicz you may have meant "lifetime" - but that's the worst reason to use shared_ptr that is oft repeated. If you need GC, use a garbage collector
 
You assume it's owned, and you assume it's not owned by you
 
srp
 
Precisely. So, no 'new', no 'delete', but the pointers themselves are fine
 
12:17 PM
okey.
 
Somebody Else's Problem (also known as Someone Else's Problem or SEP) is a condition where individuals/populations of individuals choose to dissociate themselves from an issue that may be in critical need of recognition. Such issues may be of large concern to the population as a whole but can easily be a choice of ignorance at an individualistic level. Author Douglas Adams' description of the condition, which he ascribes to a physical "SEP field," has helped make it a generally recognized phenomenon. Somebody Else's Problem used to capture public attention on matters that may have been over...
 
",we will not teach c++11 because the supporting compilers are difficult to install"
 
@NolwennLeGuen WHAT?
 
@NolwennLeGuen Written in 2009?
 
@NolwennLeGuen It's true. VS11 requires I-don't-know-how-many restarts.
 
12:18 PM
^ That's how you sound when you say dependencies are difficult
 
@R.MartinhoFernandes lol
 
@CatPlusPlus grr.. that's a different story and you know it.
 
Said a week ago by my c++ teacher. All machines have vs10 and gcc4.7
 
I need to type faster
@BartekBanachewicz Ahahaha no
 
@NolwennLeGuen lololol
 
12:19 PM
@CatPlusPlus That's funny, because historically, compilers have had the least dependencies (they are at the very start of a system bootstrap)
 
@CatPlusPlus you always need a compiler; that's a must
 
Because it's a dependency
 
@sehe Compilers are dependencies. That was his point.
 
@NolwennLeGuen That's terribad.
 
And yet Windows ships with no compiler =/
 
12:20 PM
@nightcracker because you don't build windows.
 
@NolwennLeGuen did you maybe try to hint that 4.7 supports C++11?
 
Many Linux distros ship without a compiler too
 
@CatPlusPlus Most (only Sabayon, Arch, Gentoo come to mind, really)
 
I'd say most of them
 
@nightcracker Ubuntu used to ship without a stdlib. (dunno if true anymore)
 
12:20 PM
I don't know I didn't use most of them :v
 
Well, there's a shitload out there
 
@R.MartinhoFernandes I think it's still optional. Unless you do apt-get install build-essential
 
@nightcracker there's free windows SDK, it has compiler in it and it's pretty lightweight
 
Well at least on those platforms all you have to do is sudo apt-get build-essential (or similar) and you're done
@BartekBanachewicz: how lightweight?
 
Unless you live in 1995 it doesn't matter how lightweight
 
12:22 PM
@BartekBanachewicz Won't help. The real reason is "we can barely teach C-with-classes03; you think we can teach C-with-classes11?"
 
@nightcracker Windows 8 one is 568MB
 
Not exactly lightweight in my book =/
 
It's around 2GB I think
 
@R.MartinhoFernandes that's a great reason... NOT
 
I think I'm starting to hate everything
 
12:23 PM
On the other hand C++ compilers are large
 
It doesn't install everything into one place
 
And everyone
 
@NolwennLeGuen Don't do that.
 
@nightcracker So you do live in 1995
 
Don't become the cat!
 
12:23 PM
+1 ^
 
Give in you know you want to~
 
I actually like Cat's style
 
ITS OVER
 
KILL IT BEFORE IT LAYS EGGS
 
12:24 PM
:<
 
evil laugh
 
sadistic cackle
 
Do you say IP/UDP just like IP/TCP?
 
I say TCP/IP.
 
I dont say it its rude
 
12:26 PM
blank stare
 
@NolwennLeGuen Join the dark side
 
It's TCP/IP
 
Ah ok
 
oooh 70k, get me
 
12:26 PM
It's more than TCP and IP but you always say TCP/IP
 
@LightnessRacesinOrbit hi
 
And for UDP?
UDP/IP or ?
 
It's still TCP/IP
 
UDP/IP? -.-
 
@BartekBanachewicz you have to give credit: true reasons will always win over "right" reasons
 
12:27 PM
No one ever mentions UDP.
 
It doesn't matter which protocols you use, the model and the suite is called TCP/IP
 
@LightnessRacesinOrbit WHATS GOING ON
 
@sehe well it's apparent that they can't teach C++11
 
@CatPlusPlus: huh, I doubt that
@CatPlusPlus: I'm pretty sure that when I use UDP no TCP is involved
 
It doesn't matter
 
12:29 PM
@nightcracker TCP/IP != TCP
The Internet protocol suite is the set of communications protocols used for the Internet and similar networks, and generally the most popular protocol stack for wide area networks. It is commonly known as TCP/IP, because of its most important protocols: Transmission Control Protocol (TCP) and Internet Protocol (IP), which were the first networking protocols defined in this standard. It is occasionally known as the DoD model due to the foundational influence of the ARPANET in the 1970s (operated by DARPA, an agency of the United States Department of Defense). TCP/IP provides end-to-end c...
 
The name is immutable
It doesn't change
 
@R.MartinhoFernandes It's a well-honed secret weapon.
 
Ah OK
 
@NolwennLeGuen I'm not entirely sure
 
@NolwennLeGuen You are undergoing a ADHD attack.
 
12:31 PM
Rally the troops.
 
@LightnessRacesinOrbit my mistake i thought you were making a reference to a song
But apparently no
 
@NolwennLeGuen I was making a greeting
 
Impressive, huh?
 
You suck
Lzt me find you the video and youll understand
Its a popular meme really
 
anyone here?
 
12:38 PM
@NolwennLeGuen I wish you'd never done that.
@Crowz No.
 
I have a quick question... if you wanted to say (this or this) AND (this or this), how would you go about doing that?
ie, "if d or D is pressed AND w or W is pressed"
 
(this or this) AND (this or this)
There, I said it.
 
@LightnessRacesinOrbit but now my reply to you makes sense !
 
@NolwennLeGuen I can't believe GEMA doesn't block that shit.
 
GEMA wants you to suffer
 
12:40 PM
The paranthesis work?
 
Parenthesis might
 
@Crowz: yes, but I'd do it like this:
c = toupper(c)
if (c == "D" and c == "W")
in pseudocode not particularly applicable to any language
 
Ooo I see
 
toupper depends on locales.
Just saying.
 
I'm trying to get a game camera to work
 
12:43 PM
@Crowz use glm
now, what was the question again?
oh, indeed.
Now tell me @Crowz, do you have distinct "w" and "W" keys on your keyboard?
 
@NolwennLeGuen true.
 
Because apparently noone noticed that
5 mins ago, by Crowz
ie, "if d or D is pressed AND w or W is pressed"
 
@BartekBanachewicz I do
@BartekBanachewicz How? Noone is not even in the room!
 
@LightnessRacesinOrbit that must be hell of a keyboard
 
@BartekBanachewicz It's great
 
12:46 PM
@BartekBanachewicz: real men use an unicode keyboard.
 
@LightnessRacesinOrbit Does it have "lol" "omg" and "wtf" keys?
 
@BartekBanachewicz: nope, but it has poop emoticons.
 
@nightcracker real men use binary keyboard
 
@BartekBanachewicz: real men use a piano for all their typing.
 
@nightcracker I once thought about hooking my midi keyboard to the computer. It would be also funny other way round
 
12:51 PM
@BartekBanachewicz sure
 
yesterday I was trying to figure out how to keep any application window any window on top of others,, I should of mention if you ever used VLC media player
there is an option to keep it always on top
anyone know of any application that simple that can do something similar
 
1:06 PM
I am not going to ask how you found it
 
@FredMcgiff: see the no-helpdesk tag
 
@nightcracker who is FredMcgiff?
 
SharpKeys i have used to re-mapp couple keys so the Windows key can be assigned to logitec mouse side button as hotkey
 
@BartekBanachewicz: this guy that posted 2 seconds ago?
 
@nightcracker Oh, I probably have him plonked
 
1:08 PM
some applications have the feature we can keep the window on top always
 
stupid Chrome
 
@FredMcgiff: we had quite a bad experience with a help vampire yesterday, I'd suggest you take your question somewhere else.
 
didn't sync my fucking most used pages
:(
 
really just trying to tweak to applications team viewer , open remote connections and VMware virtual machines
 
@FredMcgiff: try asking it on superuser.com
 
Xeo
1:12 PM
@nightcracker Plonk him, I did too (a long time ago, it seems).
 
@Xeo As did I. Plonk that fuckface.
 
@Xeo done
 
0
Q: program crash when parsing value into 2d array

user1823986I have the following code which I am trying to insert the value that I retrieve into the text file. However, my program crashes when I activate the code. string array[50][7]; char line[3]; int i=0, j=0; ifstream myFile("test.txt",ios::in); if (myFile.is_open()) { while (myFil...

 
GOD I HATE PAYWALLS FOR PAPERS
 
ACTIVATE THE CODE
 
1:14 PM
LASER PRIMED?
 
@LightnessRacesinOrbit lol, voted TL.
 
COMMENCE PRIMARY IGNITION
 
STAND BY WITH TURKEY SANDWICH
NAVIGATION READY
 
CHARGIN MAH LAZER
SWOOPDAWOOP
 
Can't stop the photons.
 
1:17 PM
SERVER RETURNED 410 GONE
 
SERVER RETURNED 601 BAAACKK
 
Can you guys fix your Shift keys?
 
SHIFT KEY BROKE
 
So why is a std::set an associative array when an associative array is defined as a Key,Value pair? A set is just a Key. It seems like an exception to the rule or something?
 
Xeo
@TonyTheLion The key is the value :)
 
1:23 PM
ah
is the Key hashed or something?
for fast lookup
 
Xeo
unordered_set.
 
@TonyTheLion: Associative array means you can use the subscript operator to retrieve a value by key, rather than by index. I don't think std::set qualifies as an associative array. Rather, it is an associative container.
 
Xeo
std::set is really only useful for ensuring unique, ordered values.
 
that crusty crust punk
 
Guys, I wonder. We all love const references, but aren't they actually slower for small objects? Like a few dozen byte ones?
 
1:28 PM
One reference is not even a dozen bytes large.
 
@Bartek: Slower for doing what?
 
@AndyProwl passing in parameters
hm. Now I think about it... if there's more complicated stack of calls, there will be more copies
 
static_assert(sizeof(char) == sizeof(char&), "Hahahahaha, I'm cheating");
 
@BartekBanachewicz They are but your concept of "small" is way too large.
 
fadsoft.net/AlwaysOnTopMaker.htm looks like this one this one is successfully working very simple, but wish there was more options
 
1:30 PM
@DeadMG I was thinking up to glm::mat4
 
@BartekBanachewicz If no inlining happens, for fundamental types passing by value may be better (less indirection).
 
way too big.
 
@AndyProwl oh and there's a difference between assoc array and assoc container? I thought array was another word for container and vice versa?
 
@BartekBanachewicz We all love const references?
 
1:30 PM
@BartekBanachewicz That's sizeof(float)*16 = 64 bytes large!
 
@TonyTheLion "array" is one of those overloaded "it means whatever I want it to mean" kind of words...
 
@R.MartinhoFernandes I wasn't really sure where is the border
 
@jalf Humpty-Dumpty-speak.
 
@jalf they are often suggested as the superior way of passing parameters
 
@TonyTheLion: No, it is not really the same thing. An std::map or a std::unordered_map is an associative array, in that you can write something like m["hello"] = x; (resembling the array notation a[0] = x, but using non-integer values as a subscript). An associative container is, in general, one that allows you retrieving its elements by value rather than by position
 
1:32 PM
@jalf eh.
 
@TonyTheLion Associative array is a bullshit term that has no real meaning.
 
hmmm conflicting data
 
practically any container where you can look things up by something that isn't a linear search is called that
 
I guess pick one that makes sense, is the idea here
 
1:34 PM
@BartekBanachewicz Win!
 
I just noticed it
 
@BartekBanachewicz Not always
 
@AndyProwl so you're saying one is a generalization of the other?
 
@DeadMG Not in some languages. IME people saying "associative array" come from Perl, PHP and similar origins. (I think javascript used to mimic as dictionaries with integral keys)
 
-3
Q: Program crash when parsing value into 2d array

user1823986I have the following code which I am trying to insert the value that I retrieve into the text file. However, my program crashes when I activate the code. string array[50][7]; char line[3]; int i=0, j=0; ifstream myFile("test.txt",ios::in); if (myFile.is_open()) { while (my...

Poor @AndyProwl is not having a good day!
 
1:35 PM
@BartekBanachewicz For anything that isn't a fundamental type, decide by semantics: need a copy, pass by value; don't need a copy, pass by reference. The first scenario can be optimized further in corner cases by writing more code, but I think reasonably fast less code is a good start.
Fundamental types can be passed by value pretty much all over. I only pass fundamentals by reference if it's an output parameter or something.
 
@R.MartinhoFernandes That's what I was doing. I started to wonder however if the 12, 16 or 64 byte objects wouldn't be better passed by value, even when reading
 
@StackedCrooked I think you missed a song reference /cc @Nolwenn
 
@TonyTheLion: Array is an ambiguous term, yes, but there is an established glossary in this context I believe. "Associative array" is meant to be an array-like container where you retrieve elements by value rather than by position using the subscript operators
@LightnessRacesinOrbit: Thank you for pointing that out
 
@Ell it's hobbling along. I got dependency stuff figured out I think. And now I'm rewriting command generation
 
How much stuff do people understand of the questions? I feel stupid, I only know answers to very few of them
 
1:39 PM
@BartekBanachewicz That would be hard to tell without profiling. If your functions are candidates for inlining I bet passing by reference isn't worse (i.e. the compiler will optimise the pass by reference into pass-by-nothing).
 
@nightcracker I used to toy with my midi keyboard for application shortcuts. It started out with DAW/sequencer automation of course. I had a pedal board that was great for the purpose
 
@sehe nice
@Crowz most of us here have been programming for a long time
 
Like... how long? I'm at 2 years right now
 
@Crowz 5
 
1:41 PM
@AndyProwl You're wrong.
 
Dec 17 '12 at 22:15, by sehe
@CatPlusPlus AGREED, SHORT PASSWORDS ARE WAY TOO LIMITING IF YOUR KEYBOARD ONLY HAS UPPERCASE CHARACTERS
 
@DeadMG: Why?
 
@BartekBanachewicz I guess a smart enough compiler can also skip the copy altogether (considering that glm::mat4 example, which is a POD-ish type AFAIK) when inlining if you pass by value, but that requires some more smarts, so I wouldn't bet on it, but wouldn't bet against it either.
 
@Ell then I need to figure out MSVC's commandline crap, and then improve everything :)
 
firstly, because that would effectively exclude everything except a sorted array from being an associative array.
 
1:41 PM
@R.MartinhoFernandes const& it stays, then
 
whereas there are lots and lots of references of say, hash maps, hash tables, binary trees, etc, being considered associative arrays.
 
secondly, it discards all systems where you retrieve the value by some external key, rather than itself.
 
@sehe I set up a pop-up console to winkey+~, I'm considering buying a USB pedal to make it even easier
 
like, say, virtually all of them.
 
1:43 PM
@sehe honestly this thing has saved me so much time already
 
fact: associative array is a worthless term.
at most, the best you can get from it is that you can lookup a value by a key.
 
I prefer dictionary as the term
 
I like map. it maps crap to stuff
 
shit mang that's a long time to be programming
 
@Crowz it's nothing compared to the more senior programmers
 
1:44 PM
@R.MartinhoFernandes Don't forget the alignment issues.
 
@DeadMG: OK, "by value" was imprecise. I meant to say "by something else than their position". In fact, a set does not have a subscript operator, so it cannot qualify as an associative array
 
@AndyProwl but the meaning of "array-like" varies hugely depending on whether you're a C++ or a Python or a PHP developer :)
 
it's still very wrong.
 
How does one stay interested in a single subject area so long?
 
@Crowz single subject area?
 
1:45 PM
@DeadMG I don't think that matters if the copy is skipped, but yeah, it matters if it isn't.
 
@Crowz what are you talking about?
 
@jalf Also that. "Array" is defined by the language.
 
@nightcracker Programming, like, doesn't it get boring quick, like everything else?
 
@Crowz I've done user interfaces for World of Warcraft, and I'm currently working on a secure Distributed Hash Table (a peer 2 peer data structure)
 
@jalf PHP: where everything is an array (I have no idea; that's just what I heard)
 
1:46 PM
@Crowz programming is a tool to express yourself, not an activity per se
@Crowz do you get bored of talking as a mean of communication?
 
@DeadMG: OK, glad to know that. Can you suggest me a better reference than "The Standard C++ Library - A tutorial and reference"? My information comes from there mostly
 
@Crowz By harnessing the power of autism.
2
 
I don't really see it as expression. It's science and math, which are not really expression, as they have a definitive answer which either is right or is not right
 
When is unique_ptr gonna be added to the standard? 2014? 2017?
 
That helps as well :)
 
1:47 PM
oh F yeah. Engine 2.0-alpha0 finally builds
 
@StackedCrooked It already is Standard.
 
@StackedCrooked 2011. Yeah, they have time machines.
 
@Crowz I disagree
 
Honestly I've never understood why computer scientists are so enthralled by programming... like with video games, programming is pretty much the most mundane part of the process imo.
 
@Crowz language is a way to express your thoughts
@Crowz so is programming
 
1:48 PM
@Crowz So what is the definitive answer to programming?
 
I suppose so. I guess I just don't think logically
 
@Crowz well, if you don't know how to code - certainly. We are computer linguists
 
@jalf What I mean is, if you're doing a program, it works or it doesn't. No way around that. And on top of that, there is a measureable "more right" (like logN instead of N^3)
 
Programming is expression. You can think something up, and then express it through programming. I don't see what else it could be
@Crowz How is that different from, say, the english language? I say something, and it is either understandable English, or it is not
 
Xeo
@nightcracker: That Crowz guy is another one many (?) of us have plonked.
Just as a hint. :)
 
1:50 PM
@jalf Well, ya got a point.
I dunno I just don't think I have a scientific mindset and really just don't get it
 
@Crowz well what'cha doin here then?
 
@nightcracker for me my desktop background is a giant terminal session running screen
 
I ran astyle on the entire codebase
 
but when programming, just like with English, there is no limit to what I can express. I can make a million different kinds of games, or I can make an oil rig simulator or software to drive a jet fighter, or an interactive love letter to a girlfriend or anything else I want to make
 
Let's hope nothing's broken :v
 
1:51 PM
^ that went for over a year now
@CatPlusPlus not normally, but it doesn't do too well with templates. I think it is fair to say it mucks them up
 
@BartekBanachewicz I want to be decent at programming because I am a computer science student
 
C# code
 
@Crowz You don't need a particularly scientific mindset. You just need to have something you want to express, and get enough practice with expressing yourself through programming to be able to do it
 
Computer science is the theory behind programming
 
@Crowz that's pretty nonsensical if you don't like it. Also, CS != programming. Programming is a subset of CS
 
1:52 PM
@CatPlusPlus O wait. That's more risky since string literals can be incompatible/deceptive for astyle
 
@sehe I like my solution because it stays clear of my ALT-TAB stack, so I can work with two programs + a terminal really really fast.
 
@sehe Like what?
 
@BartekBanachewicz A less-mathy subset in many cases, yes?
 
@nightcracker I have a hotkey too
 
@sehe Add a second screen for documentation and we've got a great system :D
 
1:53 PM
@Crowz well, theoretical CS is pure math
 
@sehe I don't use GNU screen though, I have set up hotkey ctrl-1 to ctrl-9 for 9 terminals customly
 
@BartekBanachewicz Exactly. I absolutely CANNOT do math unless it's in programming
 
Arithmetic is not math~
 
var x = @"class Bla {
this.for (sure = 1);
{0}will; // not be unbroken";
@CatPlusPlus ^ contrived, but
 
What the hell are "Zero or one qualification conversion." in the C++11 standard under Standard Conversions?
 
1:54 PM
The committee forgot about unique_ptr entirely in 2011, but then before afterwards next October this current year, and also the current year at the time, they realised the mistake and went back to 2009 to add it before they will have made the mistake of publishing the standard will having forgotten it. They did it in a rush, and forgot make_unique as well, and will have already noticed that omission by 2012, but by then they were already back to 2013 from before in 2009.
So they would have going back to fix the mistake already have would making after coming back from fixing the previous fut
4
 
@nightcracker I don't need documentation (there's a browser under a different hotkey)
 
I probably don't have anything like that
 
That might have been too much.
 
@CatPlusPlus mostly algebra that ends up fucking me over. Still don't get the rules of algebra
 
@sehe manmode.
 
1:54 PM
@Crowz What don't you get
 
@CatPlusPlus Everything. What you are and are not allowed to do
 
@R.MartinhoFernandes Oh, I forgot to tell you. I installed whole XE 2013 on my workstation, works like a charm. Aaaaand you can get a 30-day trial for windows, I believe. The profiler that comes with it is really nice.
 
@sehe this is what it looks like: i.imgur.com/trLKih3.png
 
@nightcracker oh damn horizontal taskbar
 
1:55 PM
@nightcracker what's the terminal app?
 
@sehe his own creation (IIRC)
 
@BartekBanachewicz worse, random early wraparound
 
@CatPlusPlus I just don't really get when you can and can't do things and when to do certain things, basically. Usually I end up with an equation 10x more complicated than the original problem haha
 
Oh, equations
That's not really math either
 
1:56 PM
equasions
 
@sehe that wraparound is pdflatex's fault
 
Just algebra. It's my bane. I'm actually okay in like... geometry.
 
@CatPlusPlus What is math? Next you're saying (Number theory|set theory|linear algebra|calculus|...) is not math.
@nightcracker ok
 
@sehe No, that's math
 
@Crowz how much programming have you done? Or how long have you studied CS?
 
1:58 PM
@CatPlusPlus Why is equations not math? It's used in (linear) algebra, calculus, linear programming, optimization problems etc.
 
Because it's boring :v
 
@jalf 1.5 semesters
 
I had no idea there was 3 forms of initialization in C++. Dafuq.
 
@Crowz and how much have you programmed? :)
@TonyTheLion there are only 3?
 
1:59 PM
@jalf you want more? or you're saying I missed one?
 
@jalf just amateur stuff... github.com/DarkCrowz
 
I just learned: copy init, direct init, and aggregrate init
 
@Crowz java and more java FFS
 
only euler 1 and 2 in that python repo
 

« first day (843 days earlier)      last day (4107 days later) »