« first day (1355 days earlier)      last day (3583 days later) » 

1:00 PM
This Lounge is not for children
 
I'm no child.
 
user1804599
> age 15
 
^^^^^^
 
your mother's not for children
@Insilico Yeah, it's so hot it's a charred corpse.
 
user1804599
Corpse Mariniers.
 
1:07 PM
why does age matter?
 
if PHP is so bad, why's it so popular? :| I like flask, simple design imo
 
cause you can be a moron and still use it
 
@Crow 90% of everything is crap, and that includes people.
 
and get some result
 
and most of the competition has other serious downsides, like Ruby being nearly as bad, or ASP.NET being Windows-only.
 
1:10 PM
I heard someone say it takes care of the apache config for you, so a lot of people are too lazy to do that... is that true?
 
how the fuck should we know?
 
@Crow PHP: the Burger King of programming languages.
 
ask "someone" and "a lot of people".
 
@Crow For PHP? The last time I had to use that I had to screw around with php.ini all over the place
 
#!/bin/bash
make $* 2>&1 | sed -u "s/boost::proto::exprns_:://g" | sed -u "s/boost::proto::tagns_:://g" | sed -u "s/boost::proto::argsns_:://g"
Now my errors look so much prettier.
Wish compilers had more options for output control.
 
1:12 PM
why did Valve have to totally break CS:GO?
grr
 
user1804599
Okay so uh 2D graphics.
 
user1804599
Luckily we have java.awt.Graphics2D!
 
@Puppy They didn't. They just preferred to
 
I could download another game to play but I just don't have the pipes.
 
1:21 PM
@sehe :D
 
@Puppy What did they do
 
@CatPlusPlus Reworked the matchmaking to push their paid DLC and take away the previous options for what game modes you wanted to play.
I guess that it's too much to ask to not filter maps by whether or not they're in active competition, when the player explicitly clicks "Casual" rather than "Competitive".
 
There's no server browser?
 
user1804599
> Enter new package name:
 
user1804599
sexy.rightfold.videogame
 
1:25 PM
@rightfold A hentai game? :)
 
@CatPlusPlus There is but nobody uses it- the servers are all empty.
 
Pff, playing with random pubbie scrubs
 
personally I'm perfectly happy with that
 
I don't like it at all
 
would be doing so right now, in fact, if I could still choose the maps I wanted
 
1:31 PM
Matchmaking is always terrible bullshit
 
dayum I'm riddled with holes
hmm
if I use static for static members a'la C++, does that match better or worse with dynamic for virtual functions?
 
user1804599
I’d just go with virtual.
 
I need dynamic anyway.
 
user1804599
Hmm.
 
user1804599
Clojure or Scala.
 
1:45 PM
@LightnessRacesinOrbit: Let's see: several hundred classes, each of them would need to be initialized with the config, and hold the config field, not to mention passing it from the top level class all the way down the tree, and updating that tree in case config changes live. Do you see any advantages over the global? — SF. 1 hour ago
It gets better
inb4 "guess you haven't worked on a large-scale project before then"
 
> Nuke it from orbit, it's the only way to be sure
 
Xeo
I think my guts declared war on me today...
 
@Xeo Sup.
 
Xeo
different war :P
Let's say I'm feeling very windy today
 
1:51 PM
I see
mine aren't too happy about being knifed repeatedly
but they'll live.
 
Xeo
what did they do anyways?
 
cut me open and stuck a camera inside and took some samples
 
lol someone actually stole the 300kth question
 
user1804599
user=> (reify String)
CompilerException java.lang.IllegalArgumentException: only interfaces are supported, had: java.lang.String, compiling:(NO_SOURCE_PATH:1:1)
user=> (reify Object)
#<user$eval3$reify__4 user$eval3$reify__4@398d46d4>
user=> (.isInterface Object)
false
 
user1804599
lolwat
 
Xeo
1:53 PM
lol
 
Object is special
and dumb as eating squirrel shit
 
user1804599
Meh.
 
user1804599
this is implicit with proxy but explicit with reify. :[
 
@LightnessRacesinOrbit Well, std::cout and std::cerr are "global" objects (within the std:: namespace), no?
 
Xeo
Are you trying to say that <iostream> is well-designed?
 
1:56 PM
It makes sense to me v0v
 
user1804599
std::cout and std::cerr should’ve been objects passed to main.
 
user1804599
Fuck globals.
 
eh
 
user1804599
eh?
 
Xeo
ええ?
 
1:58 PM
@rightfold So you would pass std::cout, std::cerr and std::vector<std::string> to main in your fantasy C++ world?
 
user1804599
Sure.
 
user1804599
As well as the initial working directory and environment variables.
 
Too many variables arguments
 
user1804599
Too many globals
 
Explicit implicit contexts
main() context Environment
 
1:59 PM
What's that?
 
user1804599
Pseudocode.
 
Plus: DI and easy to inject test values
 
user1804599
But with macros, today’s pseudocode is tomorrow’s reality! And next week’s maintenance PITA!
 
Really language-level IoC would be p neat
 
user1804599
I often use partial application for DI.
 
2:01 PM
Zoidlang featreq: make this
 
user1804599
And otherwise just constructor parameters (in case of multiple methods).
 
user1804599
@CatPlusPlus I don’t know exactly what you want.
 
user1804599
Scala has implicit parameters.
 
user1804599
So you could say def foo()(implicit env: Environment) = …; implicit val myEnv = new Environment(); foo().
 
Terrible
 
2:04 PM
It's dynamic scoping sort of
 
user1804599
Clojure with-bindings!
 
(with-parameters) except with a bunch of em packed in composable contexts
Something like that
 
user1804599
In Scala I used to use self-types for DI but I like constructor arguments better.
 
@Jefffrey They are and it's kinda dumb.
 
user1804599
2:07 PM
// So you could say this:
class UserCreator {
    this: { def logger: Logger } =>

    def createUser(username: String, password: String) =
        logger.log("User created!")
}

object Main extends App {
    val datLogger = new Logger
    trait UserCreatorDependencies { def logger = datLogger }
    val userCreator = new UserCreator with UserCreatorDependencies
}
 
user1804599
But it’s meh. And uses reflection at runtime.
 
user1804599
Implicits require things to be in scope all the time, which is suck.
 
user1804599
So hurray for constructor arguments.
 
stackoverflow.com/questions/24533259/… - is it possible to move it to codereview.SE?
 
user1804599
You can prevent the reflection by using a trait instead of a structural type, though. And then have UserCreatorDependencies extend that trait.
 
2:10 PM
@Jefffrey yes
and main is a global function
 
what's the point of dumb sock puppets? seriously why would someone think flush the chat with many similar avatars would cause a problem?
 
that's pretty low-level environment interaction
@chmod711telkitty Huh?
oh
I thought the Nazi screencap was a 'shop
lol
 
lolno
 
user1804599
Self-types are great.
 
@Abyx flag for moderation attention
 
user1804599
2:13 PM
Another option is to make UserCreator abstract and use an anonymous inner class.
 
user1804599
But I dislike that.
 
I still don't understand why they don't allow to automatically close as dupe of any SE website.
I think their excuse is something along the lines of: "meh, too much choice, people would be confused". Or something.
Should be asked on codereview.stackexchange.com — Abyx 5 mins ago
MUCH CONFUSION
 
user1804599
@TonyTheLion Awesome. I wish I had those skills.
 
@Abyx Lol, everybody's being so nice because she's a girl
@Jefffrey People got the migration wrong too often
 
2:17 PM
@LightnessRacesinOrbit dunno, I downvoted it
 
@LightnessRacesinOrbit I've never seen people get migration wrong tbh.
0
A: How to properly implement an overloaded function?

Alexanderyou writing a lot of code twice. perhaps you looking for template functions have a tutorial here http://www.cprogramming.com/tutorial/templated_functions.html bR Alex

 
@Jefffrey Nice for you
 
@LightnessRacesinOrbit lies, everyone here treats me like sh!t because I am a woman
 
@chmod711telkitty no, it's not because of that
 
yeah right I so believe you ...
 
2:21 PM
also it's "shit", not "sh!t".
 
I'm in love. Oh Elizabeth.
 
have you given the thought why there are so few females on this chat?
 
because programming is not for females.
6
 
@chmod711telkitty you are no woman
 
lol
PROGRAMMING IS NOT FOR PUSSIES YO
 
2:23 PM
yololol
 
because behaving like a girl/women you would not last an hour here ... the only way to deal with barbarians is to be a barbarian ... no offence ...
 
@chmod711telkitty what?
 
tempted to flag as offensive, just because there's "no offence"
 
user2985029
2:27 PM
@chmod711telkitty how does a woman behave that is different to the way a man behaves?
 
she's just being openly sexist. ignore her. check your privilege, kitty
 
Typical role for women are: teachers, nurses, care takers. Typical roles for me are: soldiers, traders & labourers ... go figure ...
 
@chmod711telkitty and whores.
 
there are man whores ... so ...
 
there are man nurses ... so ...
 
2:32 PM
welp there are women programmers
 
there are man teachers ... so ...
there are man care takers ... so ...
 
cake takers
 
^
 
^
 
2:33 PM
luv being a cake taker! <3 <3 <3
 
You are asking for a "X taker" joke. sorry
 
oh kitty is trolling again
 
And this is how PlayStations get hacked:
If the randomness is not very important, just use the first element in the set. — Willem Hengeveld Sep 10 '12 at 14:27
 
@chmod711telkitty there is an ayn rand joke here somewhere... but ewww Ayn Rand....
 
What's a valid vector product between two vectors in the form vectorA * vectorB = vectorC?
Component by component?
(assuming 2D vector)
 
2:48 PM
Dot or cross
 
cross is not defined for 2D vectors is it?
 
Well, cross or piecewise if you want to get a vector back
 
and the dot product returns a scalar, not a vector
 
@rubenvb Hm?
 
@Jefffrey correct - 2d vectors do not have a cross product
 
2:51 PM
Then the only multiplication left is the piecewise.
 
You can extend 2D vectors with z = 0 and it'll cross just fine
 
@Jefffrey What does "valid" mean?
 
@R.MartinhoFernandes defined in 2D space algebra
 
The thing about piecewise is that it's not very useful
 
Actually, valid means valid for an instance of Num in Haskell
 
2:53 PM
Don't make vectors Num god
 
@Jefffrey You mean like f : R^2 x R^2 -> R^2, f(x,y) = O?
 
inb4 don't make it Num shit I'm slow
 
@Jefffrey Give up, then. Num doesn't work for that.
Num sucks.
 
@R.MartinhoFernandes why f(x, y) = 0?
 
@Jefffrey It's defined in 2D space algebra.
It's the trivial one.
("2D space" sounds weird)
 
2:55 PM
vectors with 2 components, x and y
that's what I mean
 
I know.
It just sounds weird.
 
I know you know.
 
@LightnessRacesinOrbit That's the case with my "comment" as well. When doing reviews SO automatically posts these messages. If you keep seeing them from a range of reviewers then maybe think about changing up how you answer things a bit. ;) — CaseyB 22 mins ago
ITT I don't answer on SO properly
kik
 
Xeo
@Abyx We got one as an intern
 
3:10 PM
> "They could have punished him without these fascist sanctions.”
lolwut
I wonder what sort of "punishment" he has in mind for a habitual BITER then
got no place on the pitch
 
Have him play with a muzzle.
 
user3010322
@Xeo Y U NO TELL ME U ACCEPT INTERNS
 
user3010322
I would have interned in Germany with you!!!!
 
user3010322
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD::::::::::::::::::::::::::::::::::
 
user3010322
Who wants to do IT work when you can work with AS3 with Xeeeooo-chaaaaaan. <3333
 
user3010322
3:13 PM
@rightfold You're worse than @Borgleader. D:
 
@R.MartinhoFernandes lol
 
user3010322
@Rapptz Contact me, and maybe I can help you try to make a single game.
 
> fatal error: use 'template' keyword to treat 'slice' as a dependent template name
adds template keyword
> fatal error: 'slice' following the 'template' keyword does not refer to a template
 
user3010322
:D:D:D:D
 
C++ compilers didn't get the "errors telling you what to do are bad" memo
 
3:23 PM
But clang. World hunger is almost fixed.
 
@rightfold Yes, you can:
def shortStrings(xs: Traversable[String]) = for (x <- xs if x.length < 10) yield x
 
@R.MartinhoFernandes erm. Looks like you didn't know wat you were doing for a moment there
 
user3010322
@R.MartinhoFernandes Wait... slice ?
 
user3010322
Are you implemennting the bounds_iterator paper? :D:D
 
user1804599
@Jefffrey don’t call it *.
 
user1804599
3:35 PM
It will wreak confusion.
 
user1804599
Call it dot or cross, for example.
 
@EtiennedeMartel Their random number generator had the equivalent of a return 42 somewhere.
 
user1804599
You can use backtick notation to apply it.
 
@rightfold +, -, abs, negate and signum on a vector are all well defined
 
user1804599
Then implement those.
 
user1804599
3:36 PM
vOv
 
user1804599
If you need them.
 
I can just go with * piecewise and fromInteger x = Vec x x and be done for the day
@FredOverflow That's not true.
Vas te faire encule!
Menteur!
 
user1804599
Okay so uh.
 
@rightfold You mean like the math product of two lists? Strangely, I haven't found such a thing even for Haskell :-(
 
user1804599
3:45 PM
Cartesian product.
 
Yes, that's what Haskell does with 2 or more lists in the list monad.
a <- list1
b <- list2
return (a, b)

returns all possible combinations of the elements in list1 and list2
 
user1804599
def cartesianProduct[T, U](xs: TraversableOnce[T], ys: TraversableOnce[U]) =
  for (x <- xs; y <- ys) yield (x, y)
 
user1804599
With pimp my library you can even use it with infix notation!
 
user1804599
implicit class TraversableOnceWithCartesianProduct[T](xs: TraversableOnce[T]) {
  def cartesianProduct[U](ys: TraversableOnce[U]) =
    for (x <- xs; y <- ys) yield (x, y)
}
 
user1804599
8D
 
user1804599
3:50 PM
Implicit conversions FTW.
 
@TonyTheLion You like stars, eh? Here, I made this just for you:
#include <iostream>
void foo() { std::cout << "Hello Tony!\n"; }
int main() { (

       *****
      **   **     *        *
      **          *        *
      **       *******  *******
      **          *        *
      **   **     *        *
       *****

foo)(); }
9
@rightfold You should make TraversableOnceWithCartesianProduct inherit from AnyVal. Then it becomes a value class, and you save one level of indirection. Zero overhead.
 
user1804599
Oh, neat.
 
@FredOverflow Ewww, value/reference class bullshit.
 
user1804599
Doesn’t matter since things ought to be immutable anyway.
 
@rightfold It was terrible, I didn't even get half of the stuff done I had planned for the lecture. I'll do the rest next week :)
 
3:55 PM
@sehe I haven't known that for hours.
 
@Puppy Scala value classes are not what you think they are; they are "invisible wrappers".
You cannot, for example, have a value class with two fields like in a C# struct.
 
wow, so it's like the regular value/reference class bullshit but somehow fucked up even more?
 
A value class is a wrapper around a singular value, meant to make implicit conversions cost-free at runtime.
 
> (...) using Proto is even simpler.
From the docs.
 
@Puppy How does Wide deal with the class/struct issue?
 
3:58 PM
(Context removed on purpose)
 
@FredOverflow What class/struct issue?
 
@Puppy Does your type system support both value types and reference types, or does the user decide how he wants to deal with the types like in C++?
 
the user decides how he wants to deal with it.
having the type author arbitrarily decide that some classes should be reference-only and others should be value-only is batshit insane.
the only thing dumber is having the language author do it
having the user make a much more informed, use-case-specific choice is the only sane option.
 
Well, reference types also have good properties. For example, you never run into object slicing in Java.
 
slicing is a theoretical problem, not a real problem.
 
4:01 PM
cakes?
 
i'll get a slice, thanks
 
mmm, cake.
 
59
Q: How do you do dependency injection with the Cake pattern without hardcoding?

BillI just read and enjoyed the Cake pattern article. However, to my mind, one of the key reasons to use dependency injection is that you can vary the components being used by either an XML file or command-line arguments. How is that aspect of DI handled with the Cake pattern? The examples I've seen...

 
Hmm.
Is there anyway to get the type of a function argument, assuming my function type is a template parameter?
 
4:10 PM
I'm out.
 
@EtiennedeMartel example code please
 
λ> magnitude . normalize $ Vec 1 1 :: Double
0.9999999999999999
ouch
 
@FredOverflow There.
See the comment on line 22.
 
user1804599
@FredOverflow What was it about?
 
(For reference, I'm using VS2012, so I can't use variadic templates)
 
Xeo
4:20 PM
@EtiennedeMartel hahahaaha
no
 
@EtiennedeMartel I don't think it's possible. At least I don't see a straigh-forward way.
 
@Puppy I need to know how you really feel about the issue.
 
Xeo
Imagine if Func had template<class T> void operator()(Handle const&, T) :D
 
@EtiennedeMartel Don't worry, the same would apply to VS2013.
 
Fucking hell, something called function_traits would be really useful in the standard.
 
Xeo
4:21 PM
no
NO
function_traits is fucking useless
 
@rightfold Writing an immutable stack in Java, with foldRight (remember?) and filter methods.
 
user1804599
olol
 
@Xeo Well, it would have one use in my case. So not useless.
 
Xeo
Did ThePhD rename himself to Etienne or something?
@EtiennedeMartel it is
it's broken
 
user1804599
Etienne u suk
 
Xeo
4:21 PM
the very idea of it is broken
 
Wait, so being able to get the types of a function's arguments, or its return value, or whatever, is not useful?
 
Xeo
return value, for specific set of arguments, yes.
argument types, no
 
(I don't care if there's already something called function_traits that sucks)
@Xeo But what about my case?
 
Xeo
Tell me, what is the type of the second parameter of the following function:
template<class... Args> void f(Args...);
 
user1804599
int
 
4:24 PM
I don't care about that. My function can take two paramters. That's it.
I could always just go with std::function.
 
Same not workiness.
 
Xeo
3 mins ago, by Xeo
Imagine if Func had template<class T> void operator()(Handle const&, T) :D
or if its operator() was overloaded
 
I want the user to not have to specify the same types multiple times.
Is that too much to ask?
It's about readability.
 
user1804599
Deduction!
 
user1804599
More indirection!
 
user1804599
4:25 PM
Problem solved!
 
user1804599
Hmm.
 
user1804599
This is the first time I’m using infinity as float value.
 
Don't do this at home.
Or at work.
Just don't.
 
this is indeed how I work
 
user1804599
 
user3010322
4:38 PM
 
user3010322
YES I CAN MAKE UNICODE HEARTS.
 
@Xeo we have some, but still, the ratio is quite low. on the other side we don't have many male testers
 
We don't have any female programmers here.
 
@rightfold yes
 
Ratio is 3:0.
@rightfold 0/10 paint is not black.
 
4:40 PM
 
user1804599
That guy is funny.
 
@R.MartinhoFernandes lol
 
user3010322
@R.MartinhoFernandes Kinky.
 
user3010322
@EtiennedeMartel function_traits might help you in your case, I think, but...
 
I feel guilty for having world coordinates in double.
 
4:42 PM
@R.MartinhoFernandes we have loads of ladies... like 1 per dozen guys (ish)
 
user3010322
I dunno. I can't grok why your thing is going through the code the way it does.
 
Scala seems interesting.
 
user1804599
It is interesting.
 
user3010322
Also, LOL
 
user3010322
VS 2012?
 
user3010322
4:44 PM
No variadic templates?
 
user3010322
I threw out my non-variadic function traits ages ago.
 
user3010322
@thecoshman 8/10 pretty good reflexes
 
@ThePhD or 0/10 no commitment
 
@thecoshman We don't have a dozen programmers.
 
4:47 PM
@R.MartinhoFernandes vOv
 
user3010322
The ratio of females to males was actually pretty even in Microsoft Studios
 
user3010322
... Then I re-ran the list filtering by who was a Software Development Engineer. -INF.# ._.
 
@Chimera Those accents drive me insane.
 
@FredOverflow LOL
 
user3010322
But on this team, there are THREE WHOLE WOMEN doing development!
 
user3010322
4:50 PM
One of them is my mentor!
 
user3010322
She has a PhD and everything.
 
user3010322
She drives circles around me in conversations about programming. ._.
 
@ThePhD woohoo?
 
user3010322
But one day, I'll be able to keep up!
 
@ThePhD so do rocks, your point?
 
4:51 PM
@ThePhD Does she a have a PhD or The PhD?
 
user3010322
@ParkYoung-Bae Both!
 
My Brazilian namesake is trying to upgrade his healthcare plan, I think.
 
@ThePhD gigidy!
 
user3010322
@R.MartinhoFernandes Did they accidentally send you the mail?
 
They often do.
There are at least three other "Martinho Fernandes" and they all have extreme difficulty giving people their email address.
Passive phishing.
 
user3010322
4:54 PM
Heh.
 
@R.MartinhoFernandes and suck at tax evasion it seems :P
 
Aaaaa whole day designing database and I'm still not done
 
One of them handles the finances for some religious sect.
 
Capturing flexible and freakin' large graph-based structure into a rigid relational database is not fun
 
@CatPlusPlus Why do you design a database? Aren't the available ones good enough?
 
4:58 PM
ho ho ho funny
 
@CatPlusPlus int id, string jsonData job done :P
 
I'm thinking about using JSON but I still need relations anyway
 

« first day (1355 days earlier)      last day (3583 days later) »