« first day (1456 days earlier)      last day (3484 days later) » 

Xeo
12:01 AM
@sehe Meh, I kinda gave up on all that
 
@StackedCrooked Right--I was only trying to figure the bare minimum that was unequivocally and absolutely necessary to have even the faintest hope of coming at least sort of close to saturating a connection. Bottom line: even on a purely theoretical, best-case basis, WS=3 is only adequate for quite short-range transmission.
 
Xeo
Also, I'm having sudden feeling of being increadibly bored.
 
@Xeo :S
 
Xeo
At least I had an awesome pizza tonight.
 
Ell
12:03 AM
I had average pizza earlier
 
user1804599
I had frikandel speciaal jonguh.
 
user1804599
En een nasischijf.
 
Xeo
welp, time for sleep
 
Good night
 
something with a silhouette of a crow on it, I now immediately feel the urge to buy it
 
12:14 AM
that... that might actually work o.o
 
lol
 
user1804599
I had an idea.
 
hold on everybody
 
Ell
Who was the kid who used to come here
Who's name had a crow in it
 
@Ell "Crow"?
 
12:24 AM
i am crow
but now just slightly more ambiguous
 
@Ell You mean @corvid
he used to be crow(s)
 
Jul 23 at 15:18, by Crow
oh hey, a crow just flew into my window. dumb crow.
 
I want fix but no hungaryann codes.
 
Ell
Oh right
 
12:33 AM
Some people say you shouldn't use prefixes for variable names and you shouldn't use get prefix for assessors. I think my example proofs that you do need to make at least a distinction at at least one place.
 
user1804599
@StackedCrooked ideone.com/idZ07p
 
at at least one place (he he, I got "at" two times)
 
@rightføld yeah, that totally solves my problem
 
If you really want immutable classes, then maybe getX?
 
user1804599
12:35 AM
Make immutability done through const.
 
^
 
Ell
C++ is so great
I love the metaprogramming side
Its so challenging and interesting and fun
 
My current convention is to use getThing() and mThing. This works, find for me, but the fact is that these two practices are looked down upon :(((
 
@Ell You mean... wait... what metaprogramming?
 
@StackedCrooked I used to do thing_, but no longer.
 
Ell
12:38 AM
Compile time stuff I mean
@stacked I use mThing if I have to have a Thing() member function
 
@StackedCrooked What I've learned so far is that if you need mX or _X or X_, then you are doing something wrong.
I used to do m_X, but then I realized I could be better than that.
 
user1804599
Nobody gives a shit name it whatever you want.
 
Ell
If I want a read only property I just do mProperty and make a function Property()
 
So I decided to drop C++, and learn Haskell and Python.
 
Ell
I just make it public if I want getters and setters
I've never had a write only property
 
user1804599
12:39 AM
And use a language that generates boilerplate for you.
 
I still think immutable classes in C++ are silly.
But w/e.
 
Ell
@sofffia then you ain't gonna like haskell
 
I prefer getCount() because you know it's an accessor. While count() can also mean an action. (But the real reason is that I can quickly see all accessors by typing get and triggering intellisense.)
 
user1804599
Invent a very funky name for getters.
 
user1804599
Like tnuoc.
 
user1804599
12:41 AM
Or queryCount.
 
On the other hand I use empty(), size(), begin() and end() for my container classes because it's nice to have the familiar stl interface.
 
Ell
Write a Property template that forwards assignment operator
and has implicit conversion to T&
 
getXOrSomething
 
user1804599
getDrunk
 
Ell
12:42 AM
gitGud
 
user1804599
You are a git yourself.
 
getRekt
 
I'm a hit.
 
Ell
@sofffia (something)
 
Ell
12:43 AM
getGone
 
getReadyThatWeAreLate
 
Ell
The lounge is much quieter atm
 
3 people just exited the room after this.
 
Ell
Chaotic lounge is unpleasant
 
I think I should stop trying to be funny.
Oh god
I have to wake up at 9 tomorrow
On saturday
 
user1804599
12:45 AM
@StackedCrooked I have a solution!
 
user1804599
No get prefix, no weird underscores, no casing difference.
 
Unicode!
 
@rightføld TELL ME!
 
user1804599
class Point {
public:
    Point(int x, int y) : x(x), y(y) { }

    auto xGetter() const { return [this] { return x; }; }
    auto yGetter() const { return [this] { return y; }; }

private:
    int x, y;
};
 
12:46 AM
Btw, I really dislike my colleges style of always using this-> for accessing member variables.
 
why
 
user1804599
Tell them, not us.
 
@rightføld But now I need to call p.xGettter()();
 
What the fuck happened to the starboard? lol
 
user1804599
@StackedCrooked unnice boobs
 
12:47 AM
@Mysticial Lol I hadn't noticed yet.
 
user1804599
@Mysticial morons.
 
That is the worst overkill I've seen this week
 
user1804599
@StackedCrooked Why do you not make x and y public?
 
user1804599
You can still indirectly assign them through operator= now.
 
@rightføld hm
 
user1804599
12:50 AM
H&M
 
I used to always make all members private. But over the last few years I became less strict. And this has caused some problems. So now I'm in the "members-should-be-private" camp again.
 
What kind of problems?
 
7uy90-
 
Go home Martin ;P
 
user1804599
I should study Klingon, get a child and talk Klingon to it.
 
12:52 AM
@Sofffia I had these configuration structs that stored user settings. There was no need for setters and getters really. Until I needed a way to enforce thread-safe access.
 
user1804599
Thread-safe access is done through copying, silly.
 
I copy your mom.
No need for sharing.
 
user1804599
Shared state is instant cancer.
 
Ell
My mom died in a photocopying accident
 
user1804599
Mine in a blogging accident.
 
Ell
12:55 AM
@martin been eating cucumbers again have we?
 
@Sofffia Dropped KB while making room for pizza. I'll look for the missing keytops tomorrow.
 
Recently I've been thinking about alternative ways to avoid code duplication. For example if I have a list of things that needs to appear at two places in the code, then I could that in a header file and #include that header where I need the stuff to be duplicated. This means I would, for example, have an #include in the middle of a class interface.
I wonder if this is common.
Or really bad.
Or just questionable.
 
Make an example
 
Ell
@stacked I considered this when writing cross platform stuff
#inude the public interface
Inside the class declaration
But I think its terrible
 
@Sofffia I'm reminded of boost/function/function3.hpp for example.
 
Ell
12:59 AM
ATM I do an include after a class declaration for some template specialisations
 
@StackedCrooked I'd say "really bad", at least as a general rule.
 
really bad? :(
Damn, I was almost gonna use it.
 
@StackedCrooked You can't turn that chunk of code into a function (or similar)?
 
More likely gonna be a list of enumerators.
Or a list of types.
Anyway, it's just something I wondered about. No biggy.
 
user1804599
@StackedCrooked Put them in a global and use that from those two places.
 
user1804599
1:05 AM
@StackedCrooked Use private inheritance.
 
@StackedCrooked Easy enough to put an enumeration in a header, and include the header in any TU needed. Maybe I was mis-reading your original statement though. When I said "really bad", I was thinking of a header that needs to be included inline exactly where you wanted the duplicated code. If you mean just moving an enumeration into a header, that sounds perfectly fine.
 
user1804599
I should write a function throw_errno<T> that throws T(std::make_error_code(static_cast<std::errc>(errno))).
 
@rightføld so enlightening
 
user1804599
I have duplication on lines 22 and 35 right now: github.com/rightfold/baka/blob/master/include/baka/io/…
 
user1804599
And also in pipe.hpp.
 
> But definitely too much hate on the author's part where disgust would be just fine.
lol
 
@rightføld better write a function then
or an include
 
I just enabled desktop notification. Somebody say something.
 
@rightføld Essentially the entirety of file_stream_read and file_stream_write are duplicated. I'd use something like this:
template<typename Op, typename Self>
class file_stream_op {
public:
    char* read(char* begin, char* end) {
        auto& fd = static_cast<Self*>(this)->fd;
        auto n = Op(fd.native_handle(), begin, end - begin);
        if (n == -1) {
            throw io_error(std::make_error_code(static_cast<std::errc>(errno)));
        }
        return begin + n;
    }
};
 
TIL about std::make_error_code
 
1:30 AM
Then file_stream_op<read, ...> is equivalent to file_stream_read, and file_stream_op<write, ... is equivalent to file_stream_write.
Oops--incomplete editing. read should probably be changed to operator() or some such.
 
Wasted my sleep for this, totally not worth it
Actually, i should rather use... well, not exceptions :P
 
1:56 AM
Is there a good textbook on app security?
 
@Loopunroller I've been there. Cat too.
 
 
2 hours later…
4:36 AM
user image
6
@R.MartinhoFernandes ^
 
@Borgleader Took me a while to see the number...
I can't believe I was happy to learn Windows security descriptors.
 
5:03 AM
I need to write down the reference story somewhere.
 
 
1 hour later…
6:14 AM
@JerryCoffin should be struct, it saves you a line :)
That's my only critique, I don't understand the rest.
 
@R.MartinhoFernandes We discussed this a long time ago, but I think I’m going to change all the result_of::foo stuff into aliases. The reason being, as usual, SFINAE. I’m surprised I never really run into this.
 
@sehe There's an implied 'etc' when I put an elipses. Anyway, all those things are done with commands and the commands are what people ask questions about when referring to vim. — The Wobbuffet 6 hours ago
Tempted to respond with
> @TheWobbuffet ahahahaha. "Commands are what people ask about" - that's not the case. Also, that's claiming nothing, as everything is a command. Also "There's an implied I'm right when I use ellipses".
 
@LucDanton: what does ... stand for in your code? — Piotr S. Oct 5 at 16:07
 
:D
@Loopunroller you can't waste something you never had (might as well argue you wasted "a life-changing epiphany" or "steaming sex with twins" :))
Robot would like that, I think
 
7:31 AM
@sehe Neat.
 
Yeah. I think that's cool. I'm still not considering buying one of these, but ... cool!
 
7:48 AM
yeah, 3D printers are one of things that are really cool and really want, but that sensible side of you is still able to point out you don't need it.
does remind me though, I still need to do a case for my Rpi+hdd
 
3D printers don't get my motor running at all.
 
@FredOverflow Using the wrong kind of plastic perhaps?
 
I meant the general idea of 3D printing.
Seems kinda pointless to me.
 
really?
are you are just how expensive it can be to make a plastic injection mold?
being able to knock out test pieces is great.
I've seen people use it to make plastic 'wire frame' castes, for broken limbs. Fit perfectly to your body, and you can still wash your limb.
 
is_invokable<Functor, Ret, Args...> or is_invokable<Ret, Functor, Args...>? I went with the first since that it was easy to replace the old is_invokable<Functor, Ret(Args...)> mechanically, but I keep forgetting the return type now.
 
8:15 AM
what's wrong with is_invokable<F, R(Args...)>
 
Function qualifiers, function parameter adjustments, and moving from packs to signatures and back.
Off the top of my head, I wish I knew where to find Daniel Krügler’s paper. (Fairly sure that’s his.)
 
is_invokable<F, R, Args...> makes no sense to me
 
The Standard uses something like CALLABLE(F, Args..., R) but that doesn’t work in actual code of course.
 
shouldn't is_invokable<F, Args...> give R as ::type?
 
Very unlikely.
 
8:19 AM
I think that's how I do it actually
lemme check
nvm I do R(Args...)
which I'm fine with
 
Oh it’s still named INVOKE even if there is Callable defined in terms of it as well. That’s not confusing at all.
Can’t find any paper. Not sure what I had in mind.
 
user1804599
8:56 AM
@JerryCoffin const fail
 
user1804599
Also this isn't duplication.
 
user1804599
These can change for different reasons.
 
user1804599
The just happen to be syntactically equivalent but that's a coincidence.
 
9:14 AM
hola
does anyone have access to pre-1998 draft versions of the Standard?
 
bah
I hate banks.
why does it take them so long to run such simple database transactions
 
@Puppy define long?
 
minutes? hours? sometimes days?
 
@Puppy days is easy: interest
 
you mean, stealing from me
 
9:17 AM
@Puppy of course
if you move 365 billion euros a year, that's interest rate * 1 billion of revenue for them. Say interest is 2%, that's 20 million right there.
and they move a whole lot more than 365 billion
if I bank internally (between savings/checkings accounts), the delays are seconds
 
so far my delays have all been measurable in days.
some transactions are instant but some take days.
 
I once had a mortgage payment bounce because it was made on May 1st
which in the Netherlands is a not an official holiday
but it is in most of Europe, and banks "were required" to postpone all transactions
needless to say, they charged me with late-mortgage penalty of 1% on the payment
 
I'm gonna look into switching banks I think
 
@Puppy oh that is an even bigger nightmare
I did that when I bought my house
 
well I can open accounts with as many banks as I like
if it just so happens that I never use this bank anymore, then oops I guess
 
9:25 AM
everything seemed to be going smoothly, except my old bank made an error and charged me with a final month of "debit card expenses", which was like 2 euros
but because the account had been emptied, that payment bounced, and they entered me into the "bad credit registry". This potentially could have blocked my mortgage agreement. IT took me 2 days of non-stop calling and threatening with legal action before they sorted this out
@Puppy the oops can have big consequences
 
yeah I'm feeling that
 
Argh. For some reason, I can't get boost to work, so I just threw the source into my project. Code blocks is having a mental fit, and crashing :/
 
user1804599
Install it.
 
user1804599
Don't copy it to your project.
 
no.
 
user1804599
9:33 AM
RTFM
 
I cant get it to work..
 
user1804599
You already said that.
 
lol
I tried downloaded it built.
 
congratulations
 
-_-
 
user1804599
9:37 AM
 
user1804599
10:14 AM
WTF
 
user1804599
I cannot mark this shit as a dupe of this shit because the latter has no upvoted answers.
 
post an answer, I'll upvote it
 
lol how true
 
user1804599
Nah, I'll just downvote both questions.
 
lol
 
user1804599
10:17 AM
They're bad regardless of how many duplicates there are.
 
hmm
need to pay agent fees online? -> online banking unavailable
 
10:34 AM
Can not believe I missed that...
I forgot to put class:: before my classes methods... argh.
 
your compiler should have trivially informed you that this is the case.
 
It was treating it like it was not meant to be in my c++ file. Should have picked it up..
Hmm thats odd. AFAIK my compiler is thinking that I am trying to deal with pointers when all I want to do is multiply... wtf
 
TIL people prefix class names with c.
I hate scientists writing code
 
@rubenvb MFC's CString
 
lower case c
and other stupid prefixes
 
10:48 AM
// get the current tile number
int tileNumber = levelMap[mapRows*width + currentTile];
 
Can anyone help lol
 
that's new
 
Shit. I learned to not do that back when I started.
 
10:49 AM
I can still find the question.
 
It's think of it like a pointer, but I dunno what else to do!
 
You haven't even asked the question.
 
Why is my code treating mapRows*width like a pointer operation and not multiplication?
 
Argh fine lol
 
10:53 AM
no.
firstly, I downvoted you, and secondly, the error message does not have anything to do with pointers whatsoever.
 
Gee, you were a beginner once to :)
 
yes, I was.
and I'm glad that the people in my environment slapped me down when I acted like that
 
sbi
@Puppy Actually, this room might have been better off if you had been. :)
 
well I certainly don't spam strangers with my questions
 
Alright, fair enough. I should have looked at my code more. Should have went through it. I was thinking that this was a valid question, but obviosly I was mistaken, sorry. Lesson learnt.
 
11:05 AM
well it could have been a valid question, with a bunch more information
 
sbi
@Puppy Not anymore. Had you, however, gotten the same welcome you now give all the beginners, you probably wouldn't give them such a bad one.
 
I'm pretty sure that I bummed answers to my questions off the Loungizens
but I'm also pretty sure that I stuck around to answer other people's questions in the Lounge
 
sbi
Yeah, @Puppy, you sure are nice enough. I'm just pulling your leg. (There's four of them, after all. Double the fun!)
 
user1804599
> zero size arrays are an extension
 
user1804599
buttocks
 
11:09 AM
If a mod wants to delete my post, I'm all for it. I'm gettin' outa here though.
 
@Benjamin: Oh, this is game programming? Of course! I should have realized this when I saw the bad code. That's always a dead giveaway. — sbi 2 mins ago
lol
 
user1804599
Yay llvm.gcroot works!
 
sbi
@Mixerman123 Why don't you just do this yourself?
 
@rightføld I don't understand how, though. The semantics of LLVM IR and that intrinsic don't seem readily compatible to me.
but I never looked into it in that much detail.
 
user1804599
This is what I generate right now:
 
user1804599
11:18 AM
%x = call i8* @styx_alloc(i32 %x_size)
%xptr = bitcast %x_type** %x to i8**
call void @llvm.gcroot(i8** %xptr, i8* null)
 
user1804599
And I wrote a C++ function that reads a data structure LLVM generates and lists all roots.
 
sbi
@Xeo Groan!
 
Ell
12 hours ago, by Ell
@Puppy what does signature look like?
 
Ell
that is llvm bytecode?
 
sbi
11:27 AM
@Nican I prefer UTF-8.
 
Ell
whatever it's called :3
 
user1804599
@Ell No, it's LLVM assembly.
 
user1804599
Though I should pass a type descriptor instead of a size to styx_alloc.
 
@sbi UTF-9 is a great sequel though
 
sbi
Jun 1 '12 at 15:56, by FredOverflow
Is USB the successor to USA?
 
11:34 AM
@sbi should we be more social and use CPWEs?
 
sbi
How would I know? I have no idea what that even is.
 
ffs
you bloody imbred
CPU + social = CP-WE
any way
 
sbi
Ah, so it means Central Processing Weekend?
Mhmm.
 
Xeo
Grisaia Trilogie by Sekai Project /cc @StackedCrooked @AlexM.
(I think you two were reading VNs too?)
 
blargh, I wish one could forward declare a class-template as template<class...> class X, even if the definition of X is template<class> class X :(
 
11:44 AM
live.com still limits passwords to 16 characters
 
Yup
My university limits it to 12 for uni web accounts.
Is it because they store raw passwords somewhere? Who knows.
 
@rightføld LLVM IR.
 
Their 2FA is acting weird
19 more expired passwords to go
 
Standard footnote 306: "The morphemes of showmanyc are “es-how-many-see”, not “show-manic”."
 
Xeo
oh hey, PayPal stopped being stupid, it seems.
 
11:57 AM
Impossible
 
@Xeo no they didn't
Perhaps they just moved their stupidity away from you
 
Xeo
For my case from yesterday, I mean
 
user1804599
@Puppy documentation calls it "LLVM assembly language."
 
Xeo
I can pay with my bank account again
 
sbi
@R.MartinhoFernandes He's a Brit. They all binge-drink.
 
12:04 PM
doesn't binge imply that it's confined to individual episodes, rather than a perpetual non-stop thing?
also hi
 
Xeo
@jalf It's an episodic perpetual non-stop thing, like TV soaps!
 
sbi
@jalf From what I know, it's a weekly occurrence there. Every Friday night.
 
@Xeo See... you just needed to chill and wait!
 
Ell
@jalf I think binge just implies a lot in order to get drunk
 
not sure what to do today
 
12:21 PM
Origin is terrible at passwords
 
sbi
@sehe Vat haff you against ze Gerrmun akzent?
 
Reminder: hardware upgrades for the #stackexchange network (including #stackoverlfow) start in about 2.5 hours: http://stackstatus.net/post/99587389234/server-maintenance-saturday-oct-11th-2014
 
3
A: How to get the size of an Array?

Gavin HIn C/C++, arrays are simply pointers to the first element in the array, so there is no way to keep track of the size or # of elements. You will have to pass an integer indicating the size of the array if you need to use it. Strings may have their length determined, assuming they are null termina...

Let the hatred begin.
0
A: How to get the size of an Array?

manuelI found solution. int myarray[143]; cout << myarray(setA)/4; You may change the array length. In case that I may be wrong.

wtf is this
 
@FredOverflow I wish we had a flag for this
"A retarded answer"
 
It doesn't even compile.
 
user1804599
12:33 PM
@FredOverflow wrong
 
@FredOverflow Upvoted jk
Haha
 
sbi
What happened to Too localized as a close reason? I don't think this could be of benefit to anyone else, since it's only the guy's own specific code.
 
user1804599
Meta Stack Overflow happened to it.
 
~~too rude~~
 
> i m making a school admin system project.in this project i m creating a unique id with the help of class,sec,gender.id is created.i want with the help of id i creating a QR code.and this qr code show in same page in textbox.and qr code save in folder not in database.i m making a project in myeclipse 8.6. so please give a code or idea.
 

« first day (1456 days earlier)      last day (3484 days later) »