« first day (1698 days earlier)      last day (3265 days later) » 

2:00 PM
@HalfEvil This is actually a very interesting problem
 
That's an instance where robot's recommendation to avoid "dumb" getter and setters actually bites you in the ass.
 
No, it's not.
 
@rightfold Well yeah often time I do. For example change the Human to a character and his car to an inventory. If the program is a game the characters inventory has to be mutable
 
@Jefffrey My answer is about "getter/setter pairs"
 
user1804599
2:01 PM
You can make the car private and provide a travel method on the human.
 
Ven
"tell, don't ask" or something :P
 
@R.MartinhoFernandes right
 
don't tell, don't tell
 
> Valid reasons to make getters or setters include [...]. Or maybe the value should be readable by clients but not writable (for example, reading the size of a dictionary), so a simple getter is a nice choice.
 
I remembered wrong.
 
2:02 PM
@rightfold Sure but if there is like 13 functions in the Car class making a new function for each and everyone of them in the Human class will get quite obnoxious
 
@HalfEvil What.
class Human {
public:
    Car const& car() const { return c; }
private:
    Car c{ 1 };
};
 
Ell
look but don't touch
 
A:\deploy2>prun.bat /r "counter.bat t1 1" "counter.bat t2 2" "counter.bat t3 3"
t1: 0
t2: 0
t3: 0
t1: 1
t2: 1
t3: 1
t2: 2
t3: 2
t3: 3
All tasks are done; exiting.
 
user1804599
@R.MartinhoFernandes then he can't change the speed.
 
/cc @sehe
 
2:04 PM
@R.MartinhoFernandes Yeah if it's Human::getCarSpeed() instead of Human::getCar()::getSpeed(). Doing that for many functions feel really wrong
 
user1804599
@HalfEvil consider whether the car does too much.
 
batch multithreading
 
@HalfEvil Why would you.
 
user1804599
Also, if cars should never be able to have their types changed, they shouldn't be assignable.
 
IOW, I don't care how many bad designs you can make.
 
2:05 PM
@R.MartinhoFernandes "You can make the car private and provide a travel method on the human." Might have understood him wrong
 
@Mr.kbok All tasks are done, exciting!
 
user1804599
Why is the car part of the human?
 
user1804599
Humans aren't made out of cars!
 
This is a terrible example anyway. What kind of API would have the human object own the car object?
 
user1804599
Maybe it's a classic case of the composition vs aggregations.
 
user406009
2:07 PM
Well, you only have 3 options: Humans own cars. Cars own humans. A list of car/human ownership relations.
 
IRL humans own cars
 
@rightfold It's a classic case of trying to reason around the semantics of a nonsensical example.
@Lalaland No.
class Human {
public:
    Car& car() const { return *c; }
private:
    Car* c;
};
Thanks.
There are so many options to consider here.
 
user1804599
Missing noexcept.
 
Don't care.
 
(removed)
 
2:09 PM
The last message was posted 1 hour ago.
 
missing sanity
 
user1804599
@Ven was this directed at me?
 
What is going
 
if you return a deref, shouldn't it be Car car() const { return *c; }?
 
user1804599
No.
 
user1804599
2:09 PM
You Wouldn't Copy a Car.
 
@FlorianMargaine Not if you want to preserve identity.
 
right
You wouldn't download a car
 
@rightfold I could if I would
 
@rightfold Would if I could
 
@FlorianMargaine But... no one knows, because the intended semantics of this example could be anything.
 
user1804599
2:10 PM
Symantecs.
 
semantics is IMPAHTANT
 
semantics
 
impotent?
 
@R.MartinhoFernandes Change the Human for a Character in a game and the Car for his inventory. Wouldn't it make most sense for the character to own his own inventory?
 
user1804599
2:11 PM
incompahtant
 
@FlorianMargaine That sounds problematic because then you have a mutable car the changes of which do not reflect on the car the Human object holds.
 
@buttifulbuttefly Everything batch is exciting because you assume it was impossible
 
user1804599
@HalfEvil perhaps.
 
@HalfEvil And why wouldn't it make sense for the inventory to be replaced as a whole?
 
objects relationships to each other in code don't necessarily represent their real life counterparts
 
user1804599
2:12 PM
Problem is, why would you want part of the inventory to be unwriteable?
 
@HalfEvil I asked why.
 
@Mysticial re your comment on my question: is it not? seems to me that a simple unrolling + constant propagation + folding should suffice, no?
 
hi @butt
 
hi @Tony
 
2:13 PM
wadup
 
user1804599
Tone The Sex Maniac
 
@buttifulbuttefly not much, been debugging C code from 15 years ago
 
But you can keep refining that example. Soon you'll realise that the things you think justify those dumb getter/setter pairs are things you don't want anyway because they only make the example more and more nonsensical.
 
@TonyTheLion oh that must be ~fun~
 
2:13 PM
much fun was had </sarcasm>
 
what kind of system is it if I may ask? to stand 15 years is quite honourable
banking system perhaps?
 
code was originally written in vc6, iirc
@buttifulbuttefly trading system
 
Ell
who can guess
 
Tick Dick
 
not quite 15 years, 12 years to be more precise
 
2:15 PM
and my english is not rich enough for the 1st
 
@Ell knight mars ticks?
 
@R.MartinhoFernandes Because each Character has their own inventory I guess.. Can't really see any scenario where one would like to replace someone's whole inventory, at least not in the game I thought of. It would most likely be unintentional if someone did it.
 
@buttifulbuttefly AFAICT it's a knighting.
@HalfEvil Character gets his backpack stolen. Character steals someone else's backpack.
 
@TonyTheLion And it's still alive? How's the code quality?
 
Ell
it is a knighting
 
2:16 PM
@HalfEvil More importantly, there's no reason to forbid it, not even in the game you thought of.
 
Ell
but you call knights sir
 
@buttifulbuttefly yep
 
Ell
sir man ticks
semantics
 
code quality is like reading hungarian notation c with classes code
 
2:16 PM
Oh gosh.
 
std::numeric_limits<double>::epsilon() / 10.
 
and it has a few 1000 line functions
 
@TonyTheLion it's called manual inlining!
 
:/
gotta love strcat, strcmp and strcpy and variants
its full of those
 
2:18 PM
@R.MartinhoFernandes Well yeah you're probably right. Although if each item in the game is unique/non copyable it's not possible to copy anyone's inventory anyway
 
and more
 
@Ell tickle my maleness with honor
 
@HalfEvil If the inventory is not copyable, it shouldn't be assignable either vOv
 
Inventory can be though as the possessions of the character. Then it makes no sense to change inventories, just the things that the player is in possession of.
 
and every container is a fucking linked list
 
2:18 PM
lol
 
what did I say wrong?
 
"linked list"
 
"container"
 
@R.MartinhoFernandes move assignment should probably still work though
 
2:19 PM
@HalfEvil True.
@TonyTheLion "fucking"
 
I don't know how to tell my boss that cipy pasting code all over the place is not a very good long term solution
 
ghosh
 
cipy pasting
 
slap him
 
nice typo
 
2:20 PM
Yeah, copy pasting is better.
 
user406009
Darn, the C++ type-checker is failing me. ideone.com/zT4nqB
 
@Lalaland Err, no.
 
there are const'antly problems
 
That's not what's happening.
 
Ell
2:22 PM
let's have a lounge quiz
 
What happening is, you assumed that template instantiations are covariant constnesswise, which is not true.
 
lets not
 
Ell
cmon this one is easy
 
@Ell Toe T Switch
A well known design pattern
 
toe kneet swearbutan
3
 
Ell
2:23 PM
lol
 
you turn me on, lying T bastard
 
Ven
@rightfold no.
 
a well know fail pattern
 
Ell
@BartekBanachewicz closer
 
@Ell That a singleton?
Please say 'no'.
 
Ell
2:23 PM
@R.MartinhoFernandes No, but that'd be a good one
 
> swearbutan
 
Ell
it's not a programming term
 
why did I laugh
 
Xeo
@Ell Tony the Lion?
 
Ell
@Xeo winnerrrrr!
 
2:24 PM
@Xeo what?
wtf
I'm not seeing it
 
Ell
toe knee the lie on
 
@Ell That was terrible.
 
@Xeo lol
 
you suck @Ell
 
2:24 PM
Can anyone help me out?
 
it was absurdly terrible
 
Ell
@R.MartinhoFernandes that was great
 
where are my cancer pills
 
Ell
if mine is so terrible, someone else do one
 
2:25 PM
(kidding, it was nice :) but far fetched)
 
Ell
@buttifulbuttefly aww fanku bby
 
anyone?
 
swearbutan was what was actually there
 
swearbutan lol
 
I'll pay you.
 
2:25 PM
orangbutan
 
With whom?
I just need a quick tip
 
with the person behind the link
 
Not a tutor
 
I've heard he's a good coder
 
2:26 PM
I'll do it for free just to piss Barsteak Butanchewicz
So what is your question!!!!1
 
@buttifulbuttefly far-fetched /fɑː(ɹ).fɛtʃt/ adjective terrible.
 
oh man I want a steak now
 
@R.MartinhoFernandes lol
 
How can I add custom HTTP headers to HttpSendRequestA? Such as adding headers to a WinSock query? Note, this is a POST setting.
 
faɹ-fetched
 
2:27 PM
My HttpSendRequestA hangs, and I think it's due to the headers.
 
WinSocks go in the drawer next to the WinBoxers
 
toe-knitting fakeup
 
@AndrewPeters why are you using functions that end with A directly
 
damn I'm so inspired
 
now, why don't you use Casablanca
 
2:28 PM
Why not?
I'm not bisexual
 
they are macroe'd
 
I prefer A over W
 
@BartekBanachewicz Casablancas wear WinBoxers.
That was terrible.
 
@AndrewPeters I uh
 
Ell
Okay guys you can get this one
 
2:28 PM
6
A: how to contruct HttpSendRequest method of WININET

marcinjHere is a sample code you should be able to modify to your needs. I tested it with VS2005 using command line template project. #include <tchar.h> #include <wininet.h> /// .... HINTERNET hIntSession = ::InternetOpen(_T("MyApp"), INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0)...

I googled it
 
@AndrewPeters how can you prefer one over the other
 
Unless you prefer A&W, then you're just a typical american scumbag
 
you're not the one to prefer anything here
 
the answer might be helfpul
 
2:29 PM
@Ell D sign hand right
amirit
 
Thanks tony.
 
Ell
@buttifulbuttefly You're half way there
 
dobvious patturn
 
Xeo
@Ell Design back<something>
 
design pattern?
 
2:29 PM
pattern
 
Design by contract!
 
Xeo
ah
 
Ell
@TonyTheLion winnerrr
 
It's a pat in the back.
 
Xeo
2:29 PM
right, pat.
 
TERN RIGHT
 
no it's a PATTURN
 
Ell
I think robot got it straight away
 
isn't it DOBVIOUS
 
Ell
2:30 PM
If you all don't get this one straight away you're all bad
 
@TonyTheLion My code looks quite similar, what could be another reason for a hang in the HttpSendRequest?
 
We're all bad.
 
@Ell pantoona
 
No SI units allowed!
 
Bartek wins.
 
2:31 PM
Butt is it a metric tonne?
 
Ell
I don't know what pantoona is :(
 
> The HttpSendRequestA function represents headers as ISO-8859-1 characters not ANSI characters.
have you seen this in the docs?
 
@buttifulbuttefly It's not an SI unit!
 
@buttifulbuttefly AFAICT, they would need to be done precisely in that order. The disassembly suggests that there's no constant propagation done after loop-unrolling.
 
Ell
2:31 PM
Has nobody got it yet? :O
 
deesign patturn
I like it
 
Ell
@R.MartinhoFernandes Ohh
Robot, you answered this for one of my previous fun quiz questions
 
@Mysticial terrible
 
What?
I think everyone got it.
 
Ell
Nobody said it :(
 
2:33 PM
@AndrewPeters You should post a question on Stack Overflow with your code and describe exactly what happens when you run it. Make sure any reader can run the code somewhere and reproduce your issue.
 
Ell
the answer, I mean
 
@Ell Everyone's ashamed of that word.
 
Ell
Haha
 
why not keep optimizing in a loop until an iteration does not change anything?
meh I don't really know how optimizers work
 
@R.MartinhoFernandes I am confused is the secret "masturbation"
 
2:35 PM
@buttifulbuttefly How do you evaluate whether a change is for the better?
@buttifulbuttefly I.e., some of those changes could be pessimisations.
 
@buttifulbuttefly Because you can end up in an infinite loop where the state of the program converges onto multiple states in a cycle.
 
@Mysticial That can be tested for as well.
 
user406009
@buttifulbuttefly Isn't there something called profile guided optimizations for this type of thing?
 
It, however, implies that some of those changes are not optimisations, otherwise it wouldn't loop.
 
@R.MartinhoFernandes Yes, only if the cycle is short. But the cycles are unbounded.
 
2:37 PM
@R.MartinhoFernandes I guess there must be heuristics. What I meant is, worthy optimizations may appear only after others are done, so a fixed order of passes may not be optimal.
 
@buttifulbuttefly Yes, but it's easier to know that at least it is good.
 
Ell
I'll stop with these if someone asks me to
 
@buttifulbuttefly A brute-force loop of optimisations may be worse than the fixed order, even though neither is optimal.
 
@Ell Assweed
Donkeysea
 
The thing with the fixed order is that it is easier to know it works.
 
2:38 PM
Mammalplant
 
Ell
@buttifulbuttefly closer the first time
 
it's mulebubble duh
 
Oh and btw, compiler optimization is an NP-complete problem.
 
@R.MartinhoFernandes Indeed
 
assplant
 
2:39 PM
I liked "assweed" though
has a nice ring to it
 
yeah
 
Ell
it's not weed
 
nobody asked you
 
Ell
it's underwater weed
which is called... ?
 
@Mysticial my life is an NP-complete problem
 
2:39 PM
Assseaweed
 
@Ell seaweed
 
Donkeyseaweed
 
Ell
Nope
 
@TonyTheLion Your mom's an NP-complete problem.
 
Mammalseaweed
 
2:39 PM
your moms weed
 
assseaweed?
 
@Mysticial lol
 
Seaweed is a macroscopic, multicellular, marine algae that lives near the seabed (benthic). The term includes some members of the red, brown, and green algae. Seaweeds can also be classified by use (as food, medicine, fertilizer, filtration, industrial, etc.). The study of seaweed is known as Phycology. == Taxonomy == A seaweed may belong to one of several groups of multicellular algae: the red algae, green algae, and brown algae. As these three groups do not have a common multicellular ancestor, the seaweeds are a polyphyletic group. In addition, some tuft-forming bluegreen algae (Cyanobacteria...
 
weaseed
 
Ell
it's a kind of seaweed
 
2:40 PM
ANSEA
 
assalgae
no, that makes no sense whatsoever
 
LAMINAR
KELP
 
donkeyocean
 
Ell
@buttifulbuttefly ...
 
2:40 PM
Am I bad
 
Ell
(stick them together)
 
ASSKELP
ASK HELP
 
Ell
which sounds like .... ?
 
HASKELL
 
Ell
2:41 PM
you guys are going to hate me
 
Asskelp Oriented Programming
 
Ell
@buttifulbuttefly ding ding ding
 
You're terrible at this.
 
@Ell terrible
 
2:41 PM
Someone has to say it.
 
Assweed was better
 
it
 
yeah
 
user1804599
What can you do with AOP you can't do with DI and decorators?
 
@rightfold Wank
 
Ven
2:42 PM
inject dependencies
 
Let's make a language called assweed.
 
Hello people!
 
Hello assweed!
 
Xeo
@EtiennedeMartel Hello, non-people.
 
@EtiennedeMartel assweed or gtfo
4
 
2:42 PM
> ASK HELP
> HASKELL
seems apt
 
user1804599
@Ven you can do that with DI.
 
Hask-hell
 
Ven
@rightfold oh, I read that backwards, sorry
 
I'll show myself out.
 
Ell
@EtiennedeMartel Hi
I might prepare a sheet of these questions we can all enjoy on a wednesday evening
 
2:44 PM
@MarcoA. Lèche ma raie vaseuse.
 
:?
 
I'm inventing a new acronym: POS - Plain Old Shite
Your code is POS.
 
@MarcoA. Feel free to Google translate it.
 
hmm
 
user1804599
Don't know whether I should add component discovery to my DI library.
 
2:46 PM
@TonyTheLion lol
 
@EtiennedeMartel fails : (
 
@Mr.kbok Of course you can have background jobs (aka processes) and await them
 
user1804599
@Ven good, otherwise you could DIAF
 
@Mr.kbok as I think you've demonstrated
 
@MarcoA. Alright, so, it means "lick my slimy ass crack".
 
2:49 PM
your asscrack is slimy?
ew
 
It's hot in here.
These things happen.
 
Ven
@rightfold thanks <3
 
@KirilKirov just wondering if that can be done with less source — mert yeniay 14 mins ago
...
 
Ell
this one might take a while
 
@sehe That was rather involved though
 
2:51 PM
apple ticket beesaw
 
ok my turn
 
it's underticket
@Mr.kbok skynintendo niggerhouse rockmatrix
 
Hi! A guy reported an issue against one of my project, where he says the error message he got from the compiler is: error: no viable conversion from 'std::ostream' (aka 'basic_ostream<char>') to 'bool'. WTH, a stream should be convertible to bool! My code is like bool Foo::baz { return _stream; }, where _stream is a member, fwiw.
 
Ell
cloudness blackhouse rockmatrix
 
Getting closer :)
 
2:52 PM
Any idea? Both clang 3.7 (in g++ mode with libstdc++) and g++ 4.9 on Linux compiled without complaining.
 
Ell
what the hell could rock matrix be :L
cloudness blackinn stonegreen
 
@StefanoSanfilippo Would be a good idea to ask the guy about what broken compiler he uses.
 
Ell
cloud backup storage
 
Closer!
 
Banania is where the bananas come from.
 
2:54 PM
Banania is probably a bit misleasing
 
@R.MartinhoFernandes You're back!
 
What?
@StefanoSanfilippo Yeah, always ask for compiler version and build commands used.
 
Just testing some things with rvalues and std::move. How come this doesn't work? pastebin.com/SzqWXXpP thought about it for a while but can't figure it out. (The error message says that I'm trying to reference a deleted function).
 
Ell
I'm fairly sure cloud is right
 
@BartekBanachewicz, I am not awake at 2 AM
 
2:55 PM
Forgot to mention that, it's clang 3.4 (XCode). Make is just cmake + make all
 
Sorry =(
 
@HalfEvil you might want to provide an SSCCE that is actually pasted on a site with a compiler.
 
It's not cloud
 
@HalfEvil Btw, use the official Lounge-approved C++ SSCCE service: coliru.stacked-crooked.com
 
mine is easier in the meantime
 
2:55 PM
Guys.
 
lol dude
 
It's ok if you play this game, but...
 
@Ell graphical puns with unknown mechanics be hard; let's go shopping
 
Xeo
@BartekBanachewicz sehe?
 
Ell
feather people circle
 
2:56 PM
Can you stick to one at a time?
 
Ell
+1 to robots suggestion of one at a time :P
 
I'll post it after kbok's is solved
 
AFAICT there were already two ongoing.
 
Ell
let's do kboks, mine then barteks how about that? :)
 
2:56 PM
@Xeo birds of a feather inspire racism by keplerian motion
 
...
-2
Q: Error when overwriting value in unsigned char array

MaxiWhy do I get the error message error: invalid conversion from ‘const char*’ to ‘unsigned char’ [-fpermissive] if I try to overwrite a certain value in an array of data type unsigned char? The data type I want to overwrite the value is also a unsigend char.

 
@EtiennedeMartel When have I been gone?
 
What's yours @Ell? I didn't see it
 
@R.MartinhoFernandes Okay it worked there so I guess it's just VS 2013 :/
 
@Mr.kbok Right above yours.
 
Ell
2:57 PM
@Mr.kbok just above yours
 
Thanks
 
oohh lol
the image didn't load
 
14 mins ago, by R. Martinho Fernandes
I'll show myself out.
 
@HalfEvil Oh. That's an easy one.
 
(hihihihi)
 
2:57 PM
@HalfEvil VS2013 doesn't automatically generate move constructors.
 
14 mins ago, by R. Martinho Fernandes
I'll show myself out.
i.e. outing
 
my work machine ran out of memory
fuck 4GB of RAM
 
Xeo
I just recently upgraded mine to 16 gig \o/
 
Ell
cloudness blackparking stonebinary
 
Xeo
2:58 PM
no more clawing at the edge of swap-death with UE running
 
@R.MartinhoFernandes = defaulting it doesn't work either. But I guess it doesn't support that either than :|
 
Xeo
@HalfEvil correct
 
@HalfEvil You're right.
 
Xeo
VS'15 does!
 
@Xeo Thrashing is so much fun.
 
2:59 PM
@Xeo lucky you
 
it's lightness
 
@Ell It's not cloud though
 
@Mr.kbok cloud console development something something rocks binary
 
Ell
lightness races in orbit :P
light nes racist inn ore bit
4
haha that was a good one :P
 
yeah :)
 
2:59 PM
lmao
 

« first day (1698 days earlier)      last day (3265 days later) »