« first day (1121 days earlier)      last day (4053 days later) » 

02:00
But I am aware of using tabs for indentation, and spaces for alignment on top.
Don't mix them
@Jefffrey Yeah, or any language with properties. It's a shame that C++ does not have them. I cannot imagine GUI code without them.
@MartinJames Cough cough C-compatibility...?
I don't get how that example shows off the "magic" that is properties
@Jefffrey Yeah - fuck C.
02:02
You don't need properties for UI
You do need reactive programming
That's nice UI code
@CatPlusPlus No, strictly, you don't.
I am going so slow...
Propery getters/setters are an implemetation of reactive programming that I find very useable.
I have no one to play video games with :(
Oh look! It's popped up again:
http://stackoverflow.com/questions/19885455/counting-lines-in-a-file
I wonder which uni/prof has issued this assignment recently?
02:12
@MitchWheat Thanks you troll. — CharlieK 5 mins ago
are you allowed to do names[a][b] = "ben"?
for?
well i'm trying to store names into a 2d array
C or C++?
02:14
@Mr.1.0 Are you using C-style arrays?
Might I suggest std::string?
And std::vector?
well i'm taking an intro c++ class and we have to learn the fundamentals so we can't use those :(
lol
Ok.
Assuming names is a char ***.
02:15
Seasoned with a little bit of salt and a good wine.
Should work.
Wait.
Why do you have a 2D array of names?
@Pawnguy7 How do you expect the memory layout to be for those char*?
Not sure what you mean.
Nothing. I'm stupid.
what is invalid conversion char* to char?
02:21
Probably means you are trying to convert a char* to a char.
how do i fix it?
By reading a C++ book.
user2985029
how would i go about deleting my account?
126
Q: How can I delete my account?

SauronHow can I delete my Stack Exchange account(s) and what happens to content I've posted when my account gets deleted? For more information, see "How do I delete my account?" in the Help Center. Return to FAQ index

Neeeeext.
02:24
@Mr.1.0 somewhere you are converting badly.
I assume it is where you are allocating these arrays or something.
Are you using new?
no let me show my code one moment
The top-left corner of the black should be where the green is.
Sigh.
@Pawnguy7 How did you draw the green?
It is where the... viewport expands too, kind of.
So this must be related to my flipping thing.
user2985029
@Pawnguy7 i dont have that button
02:27
@axrwkr which?
ideone.com/QuTqtW my error is at line 18
user2985029
@Pawnguy7 all
@axrwkr Read the answer again.
> If your account has never voted or posted a question or answer more than once, you should see a self-delete option
If you interacted with the site (you did) there is no delete button anyway.
You have to follow the first two steps.
user2985029
02:28
@Jefffrey yes, so i've interacted a lot, but i wanted to disconnect
user2985029
how can i do it fast
> Edit the About Me section of your profile to "please delete me".
21 secs ago, by Jefffrey
You have to follow the first two steps.
> Go to the Contact Support page and fill out the form. One of the items in the topics drop-down list is for account deletion.
> This account is temporarily suspended for rule violations. The suspension period ends in 7 days
02:30
33
Q: Users should not be able to wipe their record by requesting account deletion and then recreating the account

ManishearthSometimes, suspended users request deletion, which is usually provided to them. However, if they log in again with the same OpenID, a new profile is created (attached to the same network account), with a new association bonus. No traces of their previous incarnation is left (not the deleted post...

@axrwkr are you trying to deactivate your account to reactivate it and remove your suspension?
Bad boy!
@Mr.1.0 words[i][y] is a char. You are assigning it to a char[]`.
It seems my flipping causes me nothing but problems.
ok so what about words[i][y] = 'a' that doesnt work
Error?
no console just closes
02:36
How do you know there is an error then?
Unless your IDE does something for you.
This program will close by itself once it runs that block.
@Jefffrey have you ever flipped something?
Burgers, yes.
For many things I have made.
I flip the y.
Can I buy an XBox(vanilla xbox) game online? (not an xboxer)
So y + x is higher up on the screen.
Seems easier to think that way.
@Pawnguy7 Yes, I tried once and I'll never do that mistake ever again.
02:39
oh? :D
Just learn to reason with the Y axis pointing down.
@CaptainGiraffe what is a nonvanilla xbox game?
@Pawnguy7 x-bone? It is a regular xbox.
@Jefffrey what makes you reach that conclusion?
@Pawnguy7 That flipping it can be a pain in the ass.
02:41
It can.
But you only draw it in one place.
Upsidedown logic is in many places.
What do women masturbate to?
pawn guy what did you mean by new?
operator new.
You don't use it, don't worry.
@EtiennedeMartel Did you watch the WCS Blizzcon finals?
02:59
@EtiennedeMartel Somewhat valid question.
rofl woot ... is this legal??
@User17 -You have an odd premise of what is illegal
@CaptainGiraffe odd premise?
A Joking image of BG?
I'd question the legality too.
03:10
"is it illegal to pay someone to photoshop an image for me?"
Well.
Somebody is making money.
Or hopes to, anyway.
Off of somebody else.
Without permission.
Anywho, night.
You're 47 minutes early.
The two graphic designer I usually use are both busy :/
3 days wait for 2 hours work ...
maybe 3 hours worth of work
But I don't want to fork out a fortune to get the graphics done
04:06
@User17 so do it yourself :D
couldn't be bothered ... :D also professionals do a better job than me
0
Q: who is responsible? for tghatis hath happenduede?>

user241204what havfe you do ne to me? wju dodot upi doe;ete ,eu accpimg? I went to sleep and then i woke up and then i found mthat my account what gone> who did it@?>@ wjhat it uyou? i can't take this any more>? i am in pain? my hands are broiken, and then i hurethy my head. why did that happen, what ...

^^ dafuq?
04:32
ideone.com.FdmAM1 what is wrong with this code? it only fills the 2d array with 's' and nothing else
@Rapptz Funny how things change, and now nobody would bat an eyelid at that kind of thing.
Sad.
04:57
hum. range based for and ADL are fubar :(
Heyo.
Is there a 'canonical' answer for make_overload or similar on SO?
How'd you deal with the std::begin/std::end sadness I'm dealing?
also I don't know what make_overload is
@Rapptz Point me.
6
Q: Range-based for loops and ADL

HighCommander4The C++0x standard working draft states (section 6.5.4) the following about the begin() and end() calls that are implicit in a range-based for loop: 'begin' and 'end' are looked up with argument-dependent lookup (3.4.2). For the purposes of this name lookup, namespace std is an associat...

@Rapptz I'm pretty sure that the behaviour is conformant.
05:01
I assume. I just think it sucks
I don't like providing begin/end members
Ya, ADL is (ime) an either-or proposition.
@Rapptz Use ADL.
meh, maybe.
So what's make_overload?
The global namespace is worse anyway, and writing ADL barriers is a special case.
@Rapptz make_overload([](int) {}, [](double) {})(0.) // call second lambda
I don't know how that'd work.
I found this while searching for how other people designed their ranges.
As a hint, it doesn't work well with surrogate call functions :v
05:10
I've never supported those or even thought about them.
ikr
@Rapptz no homo
wot
There's a range::hetero. But no homo.
lmao
I decided I'm not a bad person if I use iterators.
@Rapptz Why would you be a bad person for using iterators?
05:15
Ah nvm make_overload, I'm not making that answer.
I did in the end.
0
A: Simulating non-local (or free) variables in a locally defined struct

Luc DantonThe lambda expressions of C++ are the capturing mechanism and inline object literals of a sort. Depending on your exact purpose, they may be more convenient than a local struct definition. As a motivating example, consider the following: // environment int offset = 42; struct local_type { ...

@Borgleader particularly slide #38
ever since I saw that it made me feel a little bad and not want to make my own range thing
I'm bored
While that was an interesting presentation, that also seemed to be an ad for D
Well they are free to advertise one of their only good features.
05:30
Haha
Chances of STL switching to ranges though is minimal
i think
probably
I don't get why that made you want to not make your own ranges.
I wanted to make something useful without reinventing the entire wheel.
Sublime Text 3 must be retarded.
Welp. Back to ST2.
@Rapptz Yes, and a range library is useful, and C++ doesn't have one.
Ok boost has one, but it has drawbacks iirc
yeah but if ranges are meant to replace iterators, it feels weird to use them internally
05:43
Meh, implementation isn't interface.
@Rapptz How so?
@Code-Guru Because my sublime-project isn't working
dragging and dropping my folders doesn't work either :|
@Rapptz that sucks
@LucDanton hey, even you went the iterator-less approach :(
I just started using Sublime Text like a month ago. So I'm more of a noob with it than with most things...which is saying something
05:45
you contribute to my "I feel bad for liking iterators" feeling!
Well it's not a prohibition or anything. But it's true that anyone can write a range without knowing about iterators.
@Rapptz For mapping and filtering, where do you put the functors?
I had this
I removed it though.
Not very convenient semantics, right?
the interface was okay
Can't return an iterator using a local functor though.
@Rapptz No non-default-constructible value types?
05:51
hey, I did say I removed it
:(
I'm questioning the 'okay' assessment :p
i.e. I consider the requirement for a valid instantiation part of the interface
I'm trying to think of an example when you map to a non-default-constructible type
I'm sure there are some
I just can't think of any atm
Anything const, although I'd need to double check that to be sure. Plus returning const is super weird, const prvalues and so on.
Still though, when it comes to const: any reference type.
meh :s
how do you deal with that?
I don't store the result, I pass it on directly (i.e. when front() is requested).
I assume Boost.Iterator's transform_iterator does that in operator* as well.
05:57
fair enough
I know where I can improve that but the reasons for going with iterator is simply due to range-based for and <algorithm>.
i.e. for(auto&& i : map(v, [](auto&& x) { return x + 10; }) { ... }
I wouldn't mind "rewriting" <algorithm> but I don't know how you'd do that with range-based for.
unless I make something like, for(auto&& i : loopable(map(v, [](int x) { return x * 3; }))) { ... }
You can remap any range to an input iterator and range-for only needs that (not even that tbh). I'm growing more uneasy with that though, it's quite a hack.
loop mah, 3 closing parentheses :(
I had to triple check.
It's the IEnumerable/IEnumerator situation.
loop(r) is okay.
but I would rather not go to that level
Re: ADL, I'm fairly sure you can go using namespace range_for_hack; and have subsequent range-fors work without the need for ADL. Could be wrong though!
06:03
loop(r) becomes a bit strange when lazy/infinite ranges get into the mix..
how would you define the "end" of an infinite range vs an "end" of a basic range..
Easy: are_we_done_yet(r) { return false; }
throwing more hacks into the mix :P
What? No.
It was the answer of the end of an infinite range: there ain't one.
yeah
I could make ranges inherit from range::loopable
but then that'd be weird
Is that about ADL?
06:07
kinda
My first attempt with ranges was making iterators that defined the behaviour and then a range would encapsulate that implementation behaviour. You know, like you saw with the mapper thing except I made it with numeric ranges, etc.
Anyway. Time to play video games.
I'll tackle this another time and tell you how it goes if you're interested.
@Rapptz Nah it's okay I have my own video games to play.
06:27
morning
up so early
06:45
been thinking
ATM I only do an ADL-alike for binary operators.
maybe I should do it for unary as well
 
1 hour later…
07:59
@LucDanton I meant in regards to the range library!
08:27
@Rapptz I know, I'm just having fun. And video games.
08:37
what is this "fun" thing.
09:03
so it looks like I will have to write my own unit testing framework. /joy
A faggot, in the meaning of "bundle", is an archaic English unit applied to bundles of certain items. Alternate spellings in Early Modern English include fagate, faget, fagett, faggott, fagot, fagatt, fagott, ffagott, and faggat. Sometimes called a short faggot, a faggot of sticks equals a bundle of wood sticks or billets that is three feet (0.914 metres) in length and two feet (0.609 metres) in circumference. A brush-faggot (sometimes shortened to brush) was a bundle of similar size made of brushwood. A long faggot of sticks equals a bundle larger than three feet long. In a book on slan...
I just made myself the best cup of coffee :P
so how many faggots are you?
09:29
lol
09:45
ergh I feel like le shit
@TonyTheLion I didn't realise it had some sort of size requirement :S
@TonyTheLion christ man, you nearly brought me tears with that one
o_0 erm... do youtube not control what adverts they show?
@thecoshman hahah :)
I just had some 'twink watch' advert
it was... bizzare
09:57
anything that makes money
soon they'll start showing porn ads
it wasn't even advertising anything as far as I could see
@rightfold woohooo! :D
10:30
My throat is full of pain, my eyes are exploding, my nose is cold and my fever is rising. Good morning everyone.
@Jefffrey Same here. My hands ache too.
:(
THE_WORD_FIZZ = 'Fizz'
THE_WORD_FUZZ = 'Fuzz'
THE_WORDS_FIZZ_FUZZ = 'Fizz Fuzz'
THE_MODULUS_OPERATOR = :%
THE_NUMBER_THREE = 3
THE_NUMBER_SEVEN = 7
@Jefffrey What happened, did you go to a concert last night?
lol + lol
@Jefffrey lol + lol == lmao
10:41
can someone help me with my 2d array? ideone.com/G9ofv5 it starts at line 61 i'm trying to populate the array with chars
the problem is it adds the same chars for every row
for(int a = 0; a < StrLen(token); a++)
You don't want to compute the length of the string on every iteration.
Why did you implement strlen yourself?
its for class
user1804599
@FredOverflow for (auto&& a : token).
10:43
@TonyTheLion Probably because strlen violated the naming conventions? ;)
user1804599
@Mr.1.0 use std::vector or std::array.
8 hours ago, by Mr. 1.0
well i'm taking an intro c++ class and we have to learn the fundamentals so we can't use those :(
user1804599
Why not?
user1804599
He never said that.
10:44
i wish i could but i would fail the assignment if i did
user1804599
@FredOverflow lol
wow! it's really been 8 hours that's embarrassing
You can simplify your if (...) return true; else return false; functions like so:
bool StrGreat(char a[], char b[])
{
    return StrLen(a) > StrLen(b);
}
I don't know. I think that forcing the use of C-style arrays in C++ is wrong and painful for the students, but at the same time I wouldn't want my students to finish my class without knowing their existence and being able to master them.
oh that's cool. i use that
10:48
@Jefffrey Depends on the level of the class.
@Mr.1.0 The inner for loop from line 68 to line 73... why don't you replace that with a call to your StrCopy function? As a benefit, you'll also get correct NUL termination for words[a] ;)
True.
I wouldn't consider anyone a master of C++ without being able to handle it, but I'd certainly grant basic or intermediate levels without it.
Ell
Ell
When would you use a c style array instead of std array? Ever?
10:51
Out of curiosity, should indexes of C-style arrays be of type std::size_t for correctness?
Unless you have char arrays with more than 2 million elements, it probably does not matter.
@Ell You shouldn't, but when in front of legacy code you should be able to understand it.
@FredOverflow But is should be that type, right?
Ell
Ell
Ah of course
if i used the strcopy wouldn't that remove the 2d array.
std::array<T, N> would probably be equivalent to T[N] by an optimising compiler :s
10:54
@Ell No.
The projects calls for extracting tokens from a file, create a sorted two-dimensional array of all the tokens.
@Jefffrey Right. C has size_t and uintmax_t for this very purpose.
@Ell Sometimes C arrays are more convenient. For example:
int numbers[]              =  {2, 3, 5, 7} ;   // size is automatically inferred
std::array<int, 4> numbers = {{2, 3, 5, 7}};   // size must be defined manually
// Also, I can never remember if I need two sets of braces or just one...
Good to know.
@FredOverflow only one. Also: auto numbers = make_array(2, 3, 5, 7);
10:55
@Rapptz Is equivalent in a non-optimising compiler, realistically.
@FredOverflow You can use a make_array to get around that.
@Mr.1.0 I have no idea what you're talking about. StrCopy does the same loop you're doing now, but with correct NUL termination. StrCopy does not "remove 2D arrays", whatever that means. Of course you would have to call it like StrCopy(words[a], token); and not like StrCopy(words, token); if that's what you're worried about.
user1804599
@DeadMG except [] and data would require new stack frames.
StrCopy? Nice case.
@DeadMG Is that a standard function?
29
A: How to emulate C array initialization "int arr[] = { e1, e2, e3, ... }" behaviour with std::array?

Pavel MinaevBest I can think of is: template<class T, class... Tail> auto make_array(T head, Tail... tail) -> std::array<T, 1 + sizeof...(Tail)> { std::array<T, 1 + sizeof...(Tail)> a = { head, tail ... }; return a; } auto a = make_array(1, 2, 3); However, this requires the compiler to do NRVO,...

10:58
@rightfold If the performance of a non-optimising compiler bothers you, then don't use a non-optimising compiler.
@FredOverflow No- it's kinda like make_unique, appears in most utility libraries and it's very simple.
Is it going to be in C++14?
Nope
didn't go into C++14 though.
It should.
user1804599
Call it mkarr and it will be available in C14.

« first day (1121 days earlier)      last day (4053 days later) »