« first day (2523 days earlier)      last day (2425 days later) » 

12:00 AM
Overloading is, afaik, a way for heavily typed systems to allow the same responsibility to be upheld by the same class without all the boilerplate
Php is moving towards more heavy typing
Hence, we should go toward overloading
 
@FélixGagnon-Grenier because method overloading also addresses these concerns. e.g. in Java without default values you happen to have foo() { foo(1); } foo(int) { /* real code */ }. And union types, well, if two types share the same handling, they obviously shall be able to be passed to the same function.
 
Oooohhh.. that's what union is actually useful for
 
@FélixGagnon-Grenier Especially for the default values case and like different functions for int and float (even though same handling) it would be quite tedious to have differently named functions.
But if you have that already, you're saving "boilerplate" against explicitness giving you useful information about what exactly is being executed, immediately with 1:1 method name mapping.
I'm not arguing against method overloading in general, but against method overloading given the possibilities we already have. In that case it's redundant and even possibly actively harmful.
\cc ^ @FlorianMargaine
 
I don't agree, but your arguments are fair
 
Thank you.
 
12:14 AM
@bwoebi what exactly is being executed should not be a concern, however. The idea behind oop contacts is we don't want to know exactly what is executed. I want to $instance->foo($theBar) and $instance->foo($theBaz)
However
Immediately after writing that I think of interfaces, and might not be sure of an actual legit use case
P.S. DID YOU KNOW TYPESCRIPT IS THE WORST TYPED SYSTEM????!!!!111111
 
@FélixGagnon-Grenier Right. bar and baz would typically share a common superinterface.
 
@FélixGagnon-Grenier I didn't - worse than coffee script?
/don't know either, just see JS devs inventing new things each month.
 
@Danack well, the thing is lately, strong of my experience with PHP Oop, I tried to use a typescript interface as you would use an interface
Except, it's all lies
Js has no idea about it all. You can't use an interface to typehint stuff
I was very put off. I was almost starting to think it could become sane.
 
Wes
let's pick the simplest example, the union null|SomeType
they don't have the same interface, obviously. you can't make them have the same interface. you can't make a nullobject out of a type with data
class NullUser implements User{
function getSurname(): String{ return "what do i return here?"; }
}
ergo, they are two completely different types that have no common interface. you can't break it down
and it's in these cases that you use unions or overloading if the consumer of your api expects to use one method name (for both the types)
unions and overloading solve the same problem
there is a post somewhere on the internet that shows the amount of code required in java's compiler that is required to implement overloading
basically mix overloading with generics and other stuff and you have a complete mess
if the disambiguation was made by the user in their method, it would just be a few lines long instead
 
As was prophecies, weeks of coding can save hours of using
 
Wes
12:28 AM
 
@bwoebi that's fair. Still in consideration, so idea is not decided yet
@FlorianMargaine polymorphism would be the inverse interface Renderable { public function render(); }
where you put the implementation on the caller, not the receiver
 
12:51 AM
> Declares a lambda of 1 argument which squares the argument.
fn($a) $a * 2; typo - multiply by two @ircmaxell
 
yeah, good point
not sure about that syntax anyway
 
I wonder what kind of beast the Inference engine will be like
Wait... Inference engine means something else - well, same difference
var $age = 0 { ... @ircmaxell forgot to put closing brace
Under examples of properties; after the getter and setter
 
that's changing anyway :D
 
Why? I love it!
 
Wes
generic variadics is the thing we need next
interface
    Function<ParamsTypes, ReturnType, ThrowsTypes> where
        ParamsTypes is <...mixed>,
        ReturnType is mixed,
        ThrowsTypes is <...Throwable>
{}

Function<
    <int, float, string>,
    int,
    <FooException, BarException>
> = function(int $a, float $b, string $c): int, throws FooException BarException{

};
rofl. does that look correct?
 
1:08 AM
@IROEGBU the concept will stay, but the exact syntax is tweaking
@Wes uhhhh
 
Wes
i have no idea how a function type declaration in the form of generics would be
there should be tuples probably for params
Function<Tuple3<int, float, string>, int, FooException|BarException> = function(int $a, float $b, string $c): int{};
that seems more correct :B
now, solve variance of the types. lol
 
I don't care for the exceptions part tbh, never liked that with Java...
 
Mornings
 
Wes
do you care about specifying the return type? then you should also care about specifying the throw types :D
\o
 
@Wes not really, becauise return only affects the parent scope. throw affects no scope unless there's a catch (and even if there is, the type is defined there)
 
1:19 AM
In test compile mode is coverage enforced?
 
I don't think so... I don't knowe
these are literally just ideas
:D
 
It should be... since it's baked into the language...
You just added something to the doc?
 
Wes
you need to give the opportunity to catch tho
 
adding tons to the doc :)
 
Wes
it's just courtesy if you specify the types :P
 
1:22 AM
@Wes you can catch any, and then do whatever you want :D
:-P
 
Wes
@ircmaxell that reminds me of:
#PHP documentation in a nutshell /* @return mixed Fuck you, check the return type by yourself */
 
hwhwhw
hehehe
 
Wes
:D
 
Was looking for the "multiple inheritance" part, couldn't find it anymore... LOL
 
I removed it :-P
 
Wes
1:34 AM
remove inheritance altogether! :D
 
yup!
 
Wes
haha great :D
 
why have 1 when you can have 2 at twice the price!
 
yo help with some code bruv
mad ting
 
Wes
@ircmaxell what's your take on intersection types? i've used marker interfaces and i realized how things can go bad very quickly,
interface A{}
interface B{}
interface C{}
interface AB extends A, B{}
interface AC extends A, C{}
interface BC extends B, C{}
interface ABC extends AB, AC, BC{}
imo it would be much better if i intersected the type in the type declarations
function callme(A&B&C $ab){}
 
1:39 AM
@Wes I love the idea, but nobody else seems to understand the power of it...
 
Wes
i do. basically inheritance is all wrong
 
Yup, which is one reason I focused so heavily on the type system and so little on the inheritance system
 
Wes
i'll be the first user of your language :P
 
hehehe :D
technically I'm the first user...
$parser = new Prerano\Parser\Parser(new Prerano\Parser\Lexer);

$code = '
package Foo\Bar;

type foo = string|int;

';

var_dump($parser->parse($code));
 
Wes
okay, second :P
 
1:48 AM
third
 
o/
I came to the conclusion that I hate OOP PHP.
 
try OO in any oither language
(I shouldn't say that, but almost want to)(
 
Oh, I do a lot of C# stuff too.
I like it much better in C#.
The return type invariance in PHP makes me cry sometimes.
Internally, of course.
 
yeah, would definitely be nice
though variance isn't a trivial problem to solve
 
Yeah, I read up on it. Definitely seems like it would take a bit of work.
It got me thinking, though.
 
Wes
1:54 AM
variance shouldn't even exist, as inheritance shouldn't exist too :B
 
I'm beginning to feel like a lot of work is being put into PHP to make it just like other languages.
 
Wes
class A { fooSuper(): FooSuper{} }
class B extends A{ fooChild(): FooChild{} }
just add a new method with a different return type
i have yet to find a case in which that doesn't work
 
I was thinking more along the lines of interfaces declaring abstract classes as their return type.
 
Wes
you don't need abstract classes :P try to program using composition only, and with small classes only
 
Ah, see, I'm no expert. :P
 
1:58 AM
@ircmaxell serious question: did you ever take a good look at CLOS?
 
@FlorianMargaine clos?
 
Santa CLOS?
 
@ircmaxell common lisp object system
an object system where even fields are objects
 
Wes
i realize previous example was not great, what i meant was... you don't need this
interface A{ foo(): Bar; }
class AI implements A{ foo(): VariantBar{}; }
if you want only Bar to be inferred, you write only Bar. if you want to expose the functionality of VariantBar in a non polymorphic way, you add another method:
interface A{ foo(): Bar; }
class AI implements A{
   foo(): Bar;
   nonPolyFoo(): VariantBar;
}
 
classes are objects too :)
 
2:05 AM
@FlorianMargaine I've looked a bit, but not deeply
 
Me atm:
 
Wes
not enough mangas?
 
Me too, but with less question marks.
 
wth are you guys even talking about...
 
Composition.
 
2:07 AM
> expose the functionality of VariantBar in a non polymorphic way
 
Which involves ducks.
 
Wes
with that i meant that there is no need to annotate VariantBar unless VariantBar has more functionality (one or more methods) than a regular Bar
 
okay... I think I got what you just said...
 
Wes
\o/ yeee i am being clear :B
 
\o/
 
2:09 AM
\o/
 
Wes
sadly inheritance can't be avoided entirely because we don't have intersection types
you can however limit inheritance to just interfaces... which is acceptable enough
 
Is there a reason it should be avoided?
 
Wes
it does more harm than good, just that
 
I'd love to take you for your word, but I can't. Would you be able to elaborate? :)
(please)
 
Wes
i doubt i will be good at explaining it, but you can look up for "composition over inheritance" papers on google
 
2:17 AM
Will do, thanks.
 
Wes
in few words, a lot of tiny entities are easier to handle, maintain, etc. than big god classes that do all the things
also interface segregation is an important read - it's obviously related
 
is websocket's data frame format viable for storing data on disk?
 
cough ahem
I need to give you the "hardware is cheap" argument.
/s
 
I was actually looking for efficient parse-able data storage formats for one of my personal projects... :P well, I could've just used JSON or something, but that wouldn't be new or anything :B
 
Wes
2:35 AM
public function clone(){} works in php7 omg. sexy
 
such sexy
yo@Wes
are you angry at me like @JayIsTooCommon, 'bout what I said of ROs earlier?
 
Wes
what did you say about ROs?
 
11 hours ago, by Félix Gagnon-Grenier
@MadaraUchiha It seems RO are being named for how much they implement @Jeeves or how much current RO's find they're nice, rather than moderation ability or management of newcomers
 
Wes
damn i should really go to bed... 5 am lol. my best coding moments are always at the wrong time
 
thx @Saitama
 
2:47 AM
yw
@Wes what would you benefit from going to bed? have some pizza instead!
 
Wes
i haven't touched jeeves, nor i am nice. but i am a good moderator
pahaha
 
lol
I don't think I've ever seen you moderate anything ;)
but! you must know wine, ur italian right?
what does "cahors" appelation tells you about?
yeah, I'll let you read
 
Wes
i have no idea what that is. don't be cryptic please, i'm tired :B
 
oh, it's only a type of wine, I think
like, a term for wine that goes mostly malbec 80% and Merlot 20%
nvm
 
Wes
2:52 AM
you are so french canadian
 
I french a lot, yes
 
Wes
:B
 
:P
 
in any event, I feel like Jay was totally not agreeing with me that ROs should have a greater responsibility towards new users than regulars, I would be keen on listening to what you think about it
But, since you are tired, probably the berst thing would be to postpone that conversation
 
dude. the ever-surprising @Saitama ;)
 
;)
 
Wes
@FélixGagnon-Grenier room owners basically have no special privileges. i think we all should behave better, regardless of the "label"
 
exactly. you don't have privileges, you have responsibilities.
responsabilities towards this room, towards the regulars, towards the newcomers
 
Wes
i feel sometimes we are too harsh to newcomers for example... they are immediately assaulted with stuff like "codeigniter sucks!" "laravel sucks!" "gtfo wordpress"
 
2:58 AM
well, that's a start, I guess.......
 
Wes
are you referring to something in particular? i didn't notice particularly non-nice behavior lately :B
 
Wes
teresko i am guessing?
 
it literally took half an hour for people to actually get there. And maybe Levi finally kicked them, maybe not
no, that abusive newcomer, insulting us way before teresko kicks in to preserve us all
I mean, if what you say of ROing is "bah, we have nothing more", why do they exist at all?
 
Wes
what you are saying is - "if i were room owner i'd have kicked him" :B
that's why room owners should be plenty, because there should be always one around
 
3:02 AM
yes. if you were a room owner, you would have done the same
(hehehe)
I mean, I really don't want to insult you, or any other RO, but you are not doing RO work
 
Wes
i just wasn't around
 
or, you are doing it on a level I am completely oblivious of
I know
 
Wes
you can't blame me for that :B
 
I know, and I love you, you must know that
I am completely not speaking on a personal user to user level
just that, as I am visiting other rooms, and realizing what ROs do over there, I realize maybe we could stop being the canadian chat room of SO
someone please star that.
 
Wes
cmon, that doesn't happen too often. you have no idea the shit we had in the html room lol
 
3:05 AM
yeah, I guess so ;)
 
@Wes what happened? :B
 
yeah what happened?
@Saitama btw I call bs on that.
 
Wes
@PeeHaa i think this felix guy here wants to be room owner. he said he would be better than you at kicking people
:D
 
@FélixGagnon-Grenier well, idk, but it was worth a snort of air from the nose
 
@Wes or, maybe I just want a way to attach my understanding of what moderating a room is to what you guys are doing ;)
@Saitama abnd, that it did provoke :B
 
3:10 AM
nvm
 
no worries :)
 
also, I am drinking some argentinian cheap wine, and I am not impressed
I should have bought the expansivier bottle
 
Wes
dude if room owners are around they will do their job. @peehaa in particular doesn't even try to negotiate and starts kicking around like ronaldo
 
fuck ortograph
 
Wes
3:11 AM
in fact it's a race for who will be the first one to kick, but only as long we are around
 
@Wes it is also possible that I am on a somewhat different timezone
 
Wes
i don't know what we can do more than that
 
well, I'll open my eyes more, and try to reset my current assessment
maybe you really are taking care of it, and I just can't see
 
Wes
also for very severe cases there's still flags
i would make you room owner if depended on me though, i made RO only very long time members and i really shouldn't add more :B but i bet peehaa will do for sure
 
Which is what I feared the most, and also why I did not speak about that in so long
There is no way in hell that I want to be nominated RO after seeming like begging for it. yes, that may be misplaced pride
I just wanted to assess wether or not my vision of this had any grounding in reality, and for what I think I am getting as feedback from current ROs, it's not...
that being said... sure, bring the italic around. I'll be sure to moderate my timezone around.
 
Wes
3:18 AM
nah lol, i'm not thinking of that. it makes sense... there aren't many room owners from america, there are levi and ircmaxell but they are not around much lately, it makes sense to have one that is often here
also paul often disappears... so
 
Wes
ahahaha
 
s/clarinet/violin/
 
on a side note, I BOUGHT THE ONI SKIN FOR GENJI YESTERDAY
 
LoL, I take it?
shit, it's been so long since I played I don't know the gig anymore
 
here you go, some pro genji plays: xboxdvr.com/gamer/TandemMeerkat62/video/36281037
 
I suppose it's not possible to use the zip functions without enabling it in the config file, is it?
 
Wes
no but there are userland polyfills @JennaSloan i've used one once, it was even fairly fast
 
Genji is Overwatch.
 
Wes
but it's just the first i've found
 
3:47 AM
@jhmckimm ikr
 
@Wes Thanks, but I think first I'll try begging the network administrator to enable it.
 
Wes
that was surprisingly not-entertaining
 
It's the best one I could find
 
Wes
@PeeHaa oh i missed this message
@FélixGagnon-Grenier apparently peehaa was not happy with that
 
4:26 AM
@JennaSloan urgghhh..... not at all
BTW morning r11
o/
 
4:43 AM
 
5:24 AM
@Wes Standalone PHP router library?
 
@Wes Heard recommendations for Symfony. Wanted to see what you used.
 
Wes
i put routes in a database, with the full relative path. i find that comfortable when you care managing error codes, redirects and kinda stuff
also i have a complete history of urls that exists and that existed. i'm not suggesting you to do that. it's probably overkill :B
 
@Wes That seems weird to me...and like significant overhead.
 
Wes
matching a string in a database in an indexed column is probably faster than doing massive use of regexps like many routing libraries do
 
5:32 AM
@Wes Do you separate that router from the code? (I.E. do you model your routers)
 
Wes
if there is overhead i doubt it's noticeable. the only site i have as proper sample has about 50 million urls and the lookup happens in 0,000n seconds
 
Typical DB structure?
 
Wes
there are two domains, the business domain and the application domain
routing is part of the site's application domain
 
I have very little knowledge of layered architecture.
@Wes Is this why I'm having such difficulty learning the repository pattern, etc?
@Wes Also you need to set up a PayPal, man. You've taught me a lot. Let me grab you a coffee or something.
 
Wes
it's just about separating everything that concerns the business domain with everything that concerns the domain of the application (or the applications) that has the purpose of making the business domain accessible to other entities (humans, bots, remote services, whatever)
i didn't help much so far, but thanks for the offer :D i believe in free knowledge
 
5:40 AM
@Wes Woah. That sounds a lot deeper than just like "MVC."
 
Wes
layers!
 
?
 
Wes
 
@Wes I don't understand the diagram, let alone how it fits in with anything else. I'm looking for an example implementation on YouTube.
This is n-tier architecture, yes?
 
Wes
i was looking for a better pic...
pfffff
sorry too tired
 
5:54 AM
mornin
 
@Wes No problem. My girlfriend just got home. Thanks for the introduction to that though. Later.
 
morning
 
Wes
6:11 AM
\o
 
o/
 
Wes
@Allenph anyway, it's all very subjective. the important bit is that you have to work with layers. like, if your business is selling vegetables you don't want to have stuff that is about caching vegetables pictures in the same layer. think of small applications, as small as they could be to make sense on their own, and stack them up in layers to build programs, sites and stuff
i am not great at explaining :B
are you cooking today joe?
 
actually, it's not that important to use layers. The main thing to look out for is that your architecture looks somewhat like pasta, e.g. the result should either be Spaghetti code, Lasagna code or Ravioli code.
also, it's a common misconception that IT stands for Information Technology. It stands for Italy.
It's also very self evident if you watch a developer code for some time. They'll be cursing and handwiggling at their code a lot.
 
Wes
 
6:22 AM
whoa. disgusting
 
Wes
AHAH with a shovel. beautiful
 
it's noodles ?
 
@Wes evening shift, done it last night also ... was alright, nobody died still ... some people did complain ...
 
Wes
what did you cook?
 
6:27 AM
moin o/
 
lots of curry, hunters chicken, burgers, and fish and chips
 
Anonymous
@FélixGagnon-Grenier FWIW if somebody is being offensive, you should just flag it, not wait for an RO
 
I hate the word offensive
 
Anonymous
Does it offend you?
 
no, it pisses me off
 
6:31 AM
What one person finds offensive might be okay to someone else...
Also, good mornings
 
Anonymous
Moins
 
can we be grown ups and stop arguing about RO's please ?
 
Had about 3 hrs sleep... I'm going to sleep in the server room when I get to the office
 
Anonymous
6:35 AM
@JoeWatkins +1 on the latter
 
Anonymous
Though just discussing. Not arguing
 
conflict keeps appearing on my screen
we should argue about stuff that matters, like who can do the best burps ...
it's me ...
 
Wes
@JoeWatkins eh. i only made long time regulars and php contributors room owners. it's not that i made them king. i thought you guys would agree with/not care about that
 
I don't disagree, it's useful to have RO's on all the time, I don't particularly care how many there are ... what I care about is that we don't argue about who is and who isn't an RO, because we're adults ...
2
(except @Jay)
 
Anonymous
Can you stop saying adult, no one wants to be an adult
 
6:40 AM
Wes has removed Andrea from the list of this room's owners.
 
Anonymous
Agree with the rest though
 
Anonymous
... I'm gonna go have a shower.
 
Wes
ok. everybody happy now? :B
 
well not really, that's probably going to create more conflict ...
 
Wes
6:42 AM
i think none of those i just removed cared about being room owner in the first place, so everything's going to be fine
no drama intended
 
I'll take your word for it ... you didn't need to remove yourself ...
 
Wes
i made the mess, i do the cleaning
 
Anonymous
Only one person said it was weird Wes, you didn't need to do that. I think we should all just hold hands.
 
Wes
but i don't want peehaa to be upset <3
 
@Wes see what I said
 
6:46 AM
My 2c: unless someone can and wants to be responsible for the messages in this room, they shouldn't be RO. We shouldn't just make people RO because they are regulars. That's not what it's for and there is no reason to be pissed if you are not a RO when you are a regular. It doesnt make you less of a regular. RO is a mini mod position.
 
(= Ive never been RO and happy bout it, dont need any powers to clean up
 
Anonymous
@Wes I don't think any of us will ever see @PeeHaa upset :p He's the most easy-going tit around
 
Wes
@Gordon it's always useful to have someone that has an eye on the room around
 
and also someone with really pink boots ...
I think it would be useful if current RO's agree to stop acting unilaterally and make who becomes an RO a collective decision by majority vote ...
 
Anonymous
^
 
Wes
6:53 AM
a vote even. i thought we were all friends
 
we don't need to argue about who can and can't be an RO, if someone wants to do it and has the time (and is obviously present enough to be effective, and isn't an idiot), then we can just vote on it, it would take a day or two to resolve ...
 
@JoeWatkins IMO, the issue is not that they are unelected but rather that after a certain number all this add/remove nonsense starts. we had this happen in the past.
 
Anonymous
!!wotd
 
normally a room kick party would start this convo
 
Anonymous
Oo can we have a kick party
 
6:55 AM
Is there any issues atm with room ownership?
 
@Gordon it starts because it's accepted that an RO can act unilaterally ... if we just say we're not going to do that any more, whatever the root cause of the problem, the problem goes away ...
 
Wes
i can't believe that we are still discussing this. anyway sorry. it's my fault, i should've asked
 
we're not discussing it, we're discussing solutions to stop it happening again ...
 
also, I dont understand why someone needs to be a RO to help moderating the room, especially when they are a regular. You can still tell trolls to stfu or help newbies with how to ask proper questions or inform people not to random ping. Just by tying a chat message. Being a RO only enables you to kickban and move messages if they don't get it. You only need a RO for escalation.
 

« first day (2523 days earlier)      last day (2425 days later) »