« first day (1620 days earlier)      last day (3554 days later) » 

14:01
sorry guys for asking here... but by wandering through s.o. it seems i've made everything correct but i still get the same error ...when you want to declare a function template whose template's arguments are the same of function's inputs classes... e.g.

template < class T > void PopulateGrid(const std::vector< T >& tVector,
boost::numeric::ublas::matrix< T >& tMatrix,
char by = 'rand');

is this declared properly? i would like to have a function which works on every classes that can be contained in tVector and tMatrix... :( according to this ---> http://stackoverflow.com/questions/19094340
user1804599
No, it's declared improperly.
user1804599
Function templates can only be declared properly in monospace font.
i do
Missed that.
I'll link you to an old answer. Let me find it.
14:04
thx
@LisaAnn Sounds like you're running into this:
453
Q: Why can templates only be implemented in the header file?

MainIDQuote from The C++ standard library: a tutorial and handbook: The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this? (Clarification: header files are not the only portable solution. But they are the most convenien...

@райтфолд lol
@LightnessRacesinOrbit It works with Visual studio.
gonna read, th you
14:06
@R.MartinhoFernandes About the only thing that does, no doubt.
@райтфолд heh
@LightnessRacesinOrbit You have to make it into a dependent type methinks
1 min ago, by Lightness Races in Orbit
have to do http://coliru.stacked-crooked.com/a/26e2ed15e69a1a40
(yeah)
it's just annoying
cos that M is only ever going to be able to be one thing
and the contract is a bit too complex to be worth documenting
@LightnessRacesinOrbit Yes, but you're never allowed to use members before the definition is in scope. It's... C++ as usual.
so it basically HAS to be a Mgr
and, not shown in the example, I end up with a circular dependency
@R.MartinhoFernandes I know it's just annoying
@LightnessRacesinOrbit More declarations!
@R.MartinhoFernandes A Grr is stored by value in Mgr (a few different instantiations, actually) - and shall remain so!
I saw this 'gimme teh codes' question and I just knew..
http://stackoverflow.com/questions/29233305/how-can-i-remove-an-inserted-letter-from-a-string
@Mgetz wtf
@MartinJames ;p
@LightnessRacesinOrbit it's pre-release, also I suspect it's due to an issue with symlinks not UB. But still...
@Mgetz Meh, deleting all files. I was hoping for nasal demons:)
14:11
@MartinJames I was hoping for that or the Girlfriend's pregnancy
@MartinJames Yeah, me too.
Try explaining that virgin birth!
@Mgetz doesn't look like UB but still lol
ASR
ASR
Hi I all I have one doubt, can any one clarify me?
@ASR only one... wow that is some faith
14:13
Consider yourself clarified.
You can go now.
(I'm a pope; I can clarify people)
Xeo
Xeo
1 message moved to bin
@ASR please as this on Stack overflow and not in chat
ASR
ASR
:(
user1804599
@Mgetz unreleased update :(
ASR
ASR
@Mgetz that was in SO already Still I have doubt
14:14
@ASR That was a wall of code, not a doubt.
@ASR then ask a new question about your doubts
IT WAS ALSO C# SO... FUCK OFF?
C++03... template friends?
@ASR no way. unbelievable. Wait while I call the newreporter
@LightnessRacesinOrbit ur doubt?
trying so hard not to address 'doubt'
14:17
@R.MartinhoFernandes hmm... as of the s.o. answer you kindly provided me with, in order to avoid having a huuuge header with inlined template function, is Luc Touraille's solution of #include "Foo.tpp" in the middle of header... the best possible?
@LisaAnn yes
or ".ipp"
up to you
@LisaAnn Yeah, the state of affairs is quite sad.
@LightnessRacesinOrbit @R.MartinhoFernandes thank both of you
I should learn proper English just to have good names for my objects
user1804599
14:20
Just for that?
user1804599
My JIT compiler is a template.
@LightnessRacesinOrbit template <typename> friend B; or something? Though I think that's C++11-only.
@R.MartinhoFernandes indeed
14:25
@Mgetz that's a legit new language feature
Xeo
Xeo
@R.MartinhoFernandes C++03
@Mgetz Why lol?
Xeo
Xeo
C++11 was friend TemplateParameter;
@sehe I could have sworn that template<typename T> as the official syntax since 98?
or am I completely missing something?
@Mgetz template<template<typename>typename>
14:26
@райтфолд so it is
user1804599
:[
user1804599
11 jun
@R.MartinhoFernandes ouch.... but I can see how that would be useful with nested templates
@Mgetz what robot said. Yes, you would have noticed if typename wasn't supported by MSVC there
@Mgetz I honestly don't see how it would be useful.
It's horrible.
What.
It prevents nothing.
It's just a syntactic bullshit.
class provides a much more distinctive clue that it's not a normal type parameter.
typename only obfuscates that.
@Mgetz Not at all related.
It's only that you can use typename as the keyword where you could only use class.
@райтфолд Many things remain relevant. And unanswered:
77
Q: Was this 4th grader's creationist quiz real?

TomOnTimeIs this 4th grader's creationist quiz real or a hoax?

5
user1804599
template<template <typename template>>->template typename()
user1804599
@sehe lol
@Xeo Yep perfect thanks :D
@R.MartinhoFernandes mleh. perhaps. you're arguing that it makes sense because you can't have int templates, right?
14:31
4 mins ago, by R. Martinho Fernandes
@Mgetz template<template<typename>typename>
@R.MartinhoFernandes yah what about it
template<template<typename>class> has a more striking visual cue that it isn't a type parameter (assuming you're not one of those heretics that uses class like @Xeo).
Xeo
Xeo
ehehehehe
@R.MartinhoFernandes is it? now it looks like it's a class parameter precisely as much as it used to look like a type parameter
Xeo
Xeo
typename is just too loooong!
14:33
except that template <typename T> int x; is not valid
@LightnessRacesinOrbit Yes, it is.
@Xeo use trait_t
WTF
I think you're too obsolete to have this discussion.
user1804599
I like typename.
Xeo
Xeo
14:34
1 min ago, by R. Martinho Fernandes
template<template<typename>class> has a more striking visual cue that it isn't a type parameter (assuming you're not one of those heretics that uses class like @Xeo).
In response to that
@Xeo ah, right
@R.MartinhoFernandes Charming.
C++1y doesn't exist yet.
I'm talking about C++, not the sandbox!
:ducks:
14:36
anyway, I thought you needed constexpr on that, is why I didn't think it were valid (plus GCC's rejection)
user1804599
Xeo
Xeo
lol
So what is your argument? If non-class types can be "templated" too. Why is typename obfuscation?
inb4 you can't have template template with non-class
user1804599
Clang supports static_assert with no message, but not variadic lambdas. Pfft.
user1804599
14:38
OMG Nested namespace definition
Xeo
Xeo
@LightnessRacesinOrbit That's not a non-class type, that's a template variable.
ok
ah man I wish I had uniform initialisation
never really had a strong desire for it until right now
They should allow struct there, not typename.
Xeo
Xeo
template<class T> using stuff = ...;
Or just nought.
Xeo
Xeo
14:39
what should that one use? :P
@R.MartinhoFernandes but struct can't have constructors and member functions or polymorphism!
inb4 kick
The word after the closing >, whatever it is, is just noise.
Oh tits, @ScottW sent me a friend request on Facebook.
just as side note ... if you want to std::random_shuffle() a whole boost::numeric::ublas::matrix it seems that mixing iterators .begin1() with .end2() does not go from the (0,0) cell to the (size_t, size_t) cell :P what a pity, my noobish rocks today :D
@EtiennedeMartel so?
14:40
template<template<typename> T> should be enough.
@LisaAnn lol nice try
mixing iterators is basically never a good idea
@R.MartinhoFernandes meh. template <typename T> Foo { /* members */ }; isn't enough
@LightnessRacesinOrbit That's that.
@EtiennedeMartel ok
Xeo
Xeo
@R.MartinhoFernandes Is that for passing variable templates?
(They're not allowed as template parameters :<)
@Xeo That shouldn't exist.
ASR
ASR
14:49
@R.MartinhoFernandes thanks I got
@LightnessRacesinOrbit How are you doing, by the way?
@ScarletAmaranth UFO sighted
sorry if i go back on that topic, but... would it make any difference implementing a template function via #include "Foo.tpp" (as suggested) as inline? my poor knowledges say that it makes difference, but my implementation is so long that i am quite sure compiler will ignore my inlining
it doesn't matter, no. Inline is always a hint. Pretty sure there's a entry for this
user1804599
Inline is an ODR tool.
14:53
@sehe i know it's a hint for the compiler, but it's the first time i use that kind of #include and was wondering if there was any peculiarity to pay attention to...
@EtiennedeMartel great thanks u
@sehe urrrmm...?
@LisaAnn includes have no effect. Includes just include code verbatim, so it's the same as implementing in the header directly
@ScarletAmaranth I see you were here yesterday as well. Carry on
@sehe ok ty i'll inline it
@sehe carry on I shall
15:03
"You can apply for this job here. Qualified applicants with criminal histories will be considered for the position in a manner consistent with the Fair Chance Ordinance."
interesting
companies usually don't write that in plain sight on an apply page
user1804599
> Uppercase and lowercase characters differ by just one bit and the ASCII
character 2 differs from the double quote by just one bit, too. That
made it much easier to encode characters mechanically or with a non-
microcontroller-based electronic keyboard and that pairing was found on
old teletypes.
user1804599
Awesome!
Xeo
Xeo
@LisaAnn The usual reason to keep it in an extra file and #include it is for seperation and clarity (which is the interface, which is the implementation, etc)
@MarcoA. finally a position you can apply for then!
@sehe damn you :|
15:13
@xeo got it
@sehe I can apply for any position I want. Just some of those applications might be thrown away without a second thought. :-)
@JerryCoffin You know.. you can't just tell a criminal applicant "you're not exactly what we're searching for, thanks for applying"
@MarcoA. Sure you can. It might not be a very good idea to do that, but you can do it anyway.
@JerryCoffin You don't have to send them your criminal record out of your own volition, no?
He might illustrate you how to use killall
15:18
Except killall from psmisc doens't killall on linux and some UNIXen
@sehe No, not that I know of, anyway.
This was a nice surprise the day that I troubleshooted a TRU64 machine
@JerryCoffin I never do send mine either
(inb4 my next job application gets refused because they found this in chat and never knew about humor)
user1804599
@sehe humor? so you didn't rape her?
@sehe I actually do have a criminal record. I got a traffic ticket once.
15:21
I see, joke-rapes are fine
The fines for rape are a joke
Fine? I am pretty sure they are sentences
It seems my boss likes to name things x_manager :<
When he's back from holiday there will be something to talk about.
@JerryCoffin Is that a crime?
@R.MartinhoFernandes Yeah, I think so.
@khajvah whoosh; you got raped by a fine joke
user1804599
15:25
We have a class AccountManager.
user1804599
However, it doesn't manage accounts.
I found a indexed_manager.
@R.MartinhoFernandes including, say, vases?
@R.MartinhoFernandes So do you have a manager_manager?
user1804599
It represents somebody who is an account manager. :D
15:26
@sehe lol ok
I have no fucking idea what this code does.
@R.MartinhoFernandes managers need to be indexed too
Half of it is because the names are horrible.
@R.MartinhoFernandes well, it manages the indexed
user1804599
It's a manager which is indexed.
15:29
Yeah. It manages. And is indexed.
@райтфолд I was about to say: "You shouldn't use "which" to refer to a manager; managers are people too", but then I realized that I wasn't sure that was true (even of the ones that look vaguely human).
Xeo
Xeo
@R.MartinhoFernandes "Boss, your naming sucks, you're fired"
@sehe lol
@Xeo Just need a check-in and check-out hook to keep x_manager, y_manager and z_manager in the repo where the boss sees them, but lets the developers see decent names instead. :-)
> The action is to fast paced! How am I suppose to keep up? Boss fights to hard, not enough free roam all set path. Also side note had to buy a PS4 for this game because the disc fo sho does not work on my Xbox One, believe me I tried everything the Rumors Aaron spread were lies. I do like all the gore though!
15:33
39
A: Can you write virtual functions / methods in Java?

duffymoAll functions in Java are virtual by default. You have to go out of your way to write non-virtual functions by adding the "final" keyword. This is the opposite of the C++/C# default. Class functions are non-virtual by default; you make them so by adding the "virtual" modifier.

^ Metacritic user review for Bloodborne.
4/10.
@EtiennedeMartel meta-Metacricitic review: Metacritic review shows terrible spelling, grammar, punctuation, and usage. 1/100.
user1804599
Xehe
Is there a quick reference page somewhere on the internet that tells the number of bytes in different data types (char, short etc.)?
Xeo
Xeo
platform-dependent.
15:40
Well, talking specifically C++/Windows
@DemCodeLines No but it shouldn't take more than 20 minutes to make your own for your specific environment.
FUCK YOU VISUAL STUDIO
user1804599
The number of bytes in a short, for example, is sizeof(short).
Xeo
Xeo
@DemCodeLines ... still platform-dependent.
15:41
> fatal error C1041: cannot open program database 'd:\dev\mynd\build\release\myndrecorder.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS
@DemCodeLines Still varies (16-, 32-, and 64-bit compilers on Windows, and possibly even differences between sizes with different 64-bit compilers).
@Xeo How more dependent do you get?
Xeo
Xeo
What Jerry says
tries to delete pdb file
> The action can't be completed because the file is open in Microsoft Visual Studio Express 2013 for Windows Desktop
Visual Studio: How Is This Still A Thing?
it's still a thing because nobody has built a better thing
15:47
It's easy to know when I'm using Visual Studio: I'm here complaining. Every single time I have to do something with it, it throws some nonsense at me.
well, there is CLion!
rawr
What do I have to do to debug through a call to std::function without having to F11 through ten levels of internals?
enable Just My Code
I think that they enabled it for native too in 2013
@Puppy No, that's bullshit.
user1804599
@R.MartinhoFernandes grep -v
15:52
what in particular is bullshit about it
@Puppy If by "enabled" you mean "added a placebo checkbox", yes.
offering free textplanations ok
@Puppy What about not actually doing that?
I.e. it's enabled (AFAIK it's always been) and I still have to step through all the internals of std::function.
I don't recall Just My Code not stepping over stdlib code
Xeo
Xeo
@Puppy That should be a per-step-into option. :/
@R.MartinhoFernandes How they determine what "your" code is, is... interesting.
15:55
Is there a feature they advertised that isn't sub-par?
user1804599
I want boost::nonmovable.
noncopyable does that.
user1804599
Wooot.
user1804599
Fucking awesome!
don't know why, there's hardly any useful types at all that are nomovable
Xeo
Xeo
15:59
@R.MartinhoFernandes Really? What a misleading name!
@Xeo It's an accident.
> The bottom line is that you the author of class Fred are responsible to make sure self-assignment on a Fred object is innocuous. Do not assume that users won’t ever do that to your objects. It is your fault if your object crashes when it gets a self-assignment.
Xeo
Xeo
@R.MartinhoFernandes Didn't that change, with declaring copy ops == deleting move ops?
@Xeo That's the accident.
Xeo
Xeo
I remember a proposal that move ops are never deleted or something. Maybe it's C++14
16:00
They're not generated, though.
If you have copy ctor, and no move ctor, it's always the copy ctor that gets used.
Xeo
Xeo
Yeah, and I think that changed with '14
IIRC
No.
The direction is to generate nothing when you put one of them.
@Xeo Changing that would be a ridiculous breakage for no justifiable reason.
Xeo
Xeo
Well, Howard Hinnant had some kinda proposal around generation / deletion of special members, and one of the options was to just generate everything all the time (except if sub-objects forbid that special member specifically)
I'd have to read up on it again to be sure, though
Which is too much effort
@Xeo That's broken.
It's the behaviour we had before moves, which is now deprecated.
Those members function as a unit, and if you think you're responsible for one, you are responsible for all.
(Pity they didn't realise that with hashes and equivalence)
Now please excuse me while I go step through std::function again.
@DonLarynx Self-assignment is a trivial edge case not worth any serious consideration, and secondly, pretty much all all strongly-exception-safe assignment operators get self-assignment safety for free.
16:10
@райтфолд ok, originality bonus awarded
@R.MartinhoFernandes If CL.EXE still bothers you, please use /FFS
@DemCodeLines Just ask your compiler.
@DemCodeLines I'm serious.
@Puppy Then why does isocpp.org have an FAQ on it?
@R.MartinhoFernandes yeah
16:12
std::cout << "int: " << sizeof(int) gives you the answer.
@DonLarynx Ew.
Really?
That sucks.
Though I think we had already established the curation in isocpp.org wasn't that good.
@R.MartinhoFernandes I think the compiler itself is okay. (Compare ICC/XlC++ etc.) Some of the debugging/analysis tools are fine (profiler/parallel task visualation). Extensibility is ok (although, don't ask the devs who have to write to these arcane APIs).
Of course, speed is ridiculous, stability abysmal and price unfathomable probably fair
@sehe The compiler is not ok. It's full of advertised features that don't really work. (And that's the primary reason I end up using this shit from time to time)
@sehe It's free now.
@R.MartinhoFernandes solution: don't read the advertising. (I know you're just having a different weighing, but I must conclude the compiler is usable. Mostly)
@R.MartinhoFernandes Full version?
Yes. With only commercial licensing restrictions or something.
user1804599
$ git show | xargs banner
16:16
Where's that rock. There must be a rock somewhere over my head
god damn it
user1804599
lol $ git show | xargs banner | xargs banner.
android build took me 3 hours because of a faulty cable
@R.MartinhoFernandes It's the Marshal Cline C++-FAQ content. They did inquire about a mass hyperlink edit on Meta
@R.MartinhoFernandes At least with a decent standard library, you can do a lot better than that. coliru.stacked-crooked.com/a/26df4a73c195055a
Of course, with g++, the results are basically worthless...
16:18
@sehe You look at the announcements and changelogs and whatnot and decide "within the range of compilers we have, we can use this set of C++11 features, let's get cracking", and then FUCK ALL WORKS WHEN YOU TRY TO BUILD ON MSVC
And I'm not even talking about betas or fresh features.
I'm talking about features that have supposedly been around for three or four major releases.
You know what. I worked with it. And yes I had my regular "ermagod nothing compiles on MSVC moments (days)" [just check the transcript] but by and large it is possible for me to use it without feeling totally handicapped
@sehe Thanks--that's definitely an improvement.
@DonLarynx Because the site is not cared for effectively.
16:26
can we dupehammer ?:
-4
Q: Creating a array of class objects (C++)

jimbo bobI have been trying to make a simulator which involves ants randomly running around (for now...) I want to make a array of "Ant" to contain all my ant information and later functions. How would I do that?? (example with my code if possible)(I know java fairly well so if you could relate it to java...

@Mgetz No, not any more. :-)
really? they removed the dupehammer?
so I just bought a tablet
oh nm I seee your joke there wasp
@BartekBanachewicz Did you get some chalk too?
@Puppy ha ha those ancient jokes
> , and you'll get an extra £25 off the tablet, bringing its total cost down to just £49.99. The deal is sweetened further by the inclusion of a free one-year Office 365 Personal subscription (and a 1TB on SkyDrive)
16:33
@Puppy What? You actually took something I said seriously? Even for a moment? What is the world coming to?
a slightly different location relative to the supermassive black holes at the core of our galaxy, I guess
@Puppy Inevitably so, I suppose.
@R.MartinhoFernandes "The uploader has not made this video available in your country. Sorry about that." Maybe I didn't miss a lot though...
@JerryCoffin HA!
16:37
@R.MartinhoFernandes BlackHoles 6: Revenge of the GEMA.
2
16:50
Ugh.
block_manager
I should have reviewed this code before I had to fix the bugs in it.
Unsurprisingly, it's just a collection.
@R.MartinhoFernandes Hmm...maybe we should rename the standard library collections. deque->multi_block_manager, vector->single_block_manager, list->sequential_node_manager, set -> indexed_node_manager, map -> indexed_node_with_associated_value_manager, multimap -> indexed_node_with_multiple_associated_values_manager. Management shall rule the world!
3
Hmm, the word "manager" would actually not imply that the thing holds and owns the 'managees'.
For instance, I guess a collection of 'managees' could have more than one manager, each one for a different managerial task.
ManagerManager
17:06
2 hours ago, by Jerry Coffin
@R.MartinhoFernandes So do you have a manager_manager?
@R.MartinhoFernandes I have 8 bosses (yes, I know, obvious--but unavoidable).
17:20
@JerryCoffin I call that a vice_president
loooool
Mgetz gets it
Mgetz it
@R.MartinhoFernandes rename it GEMA
17:39
@Mgetz I suppose that depends on the company--some have several layers of "directors" and such between "managers" and "vice presidents" (and then there's Italy, where "vice president" refers to the president being convicted of vice crimes).
8
@JerryCoffin lol
Yay I scored 44k at Falling Fellow
(actually random pause moment)
@JerryCoffin lol starred for accuracy
user1804599
17:52
hi there
@JerryCoffin Smooth.
user1804599
@R.MartinhoFernandes make a post-receive hook which greps for "manager" and notifies you.
I wonder, at VICE, is the VP the actual president?
@EtiennedeMartel somehow I suspect they use Editors not presidents
So, I stumbled on an online version of Keynes' The General Theory of Employment, Interest and Money.
Looks like pretty hardcore stuff.
I wonder if I can go in there without feeling lost right away.
17:58
Failed how? Do unnamed horrors from beyond space-time leak from the screen? — Alex K. 5 mins ago
lol
@EtiennedeMartel I'd guess you can. I've read parts, and never felt particularly intimidated, anyway.

« first day (1620 days earlier)      last day (3554 days later) »