« first day (2685 days earlier)      last day (2256 days later) » 

6:24 PM
yyyy-mm-dd makes so much more sense, though.
 
Nothing makes sense. Time is arbitrary.
 
no. yyyy-mm-dd is factually less ambiguous than the other ones. this is not arbitrary.
 
moderately, but once we assign rule systems for it, we might at well follow existing conventions. place values increase to the left.
 
there is literally no way of knowing for sure what 02-08-02 means.
 
@FélixGagnon-Grenier I was just being a smart ass.
 
6:27 PM
eh
I missed that, apparently
 
6:39 PM
it's rare that a piece of tech pleases me as much as I am pleased by wireless charging of my phone
 
the little things in life, they say
 
not about me they don't
 
I don't understand why that didn't happen sooner.
I mean...it's just a transformer, isn't it?
 
honestly, this is one of those rare things where I don't even care how it works
maybe that's why it pleases me so much
 
But...engineering...
 
6:42 PM
@symfony-users does dic really not use reflection and can't auto create instances by type hints? Did Auryn really spoil me that much?
 
Induction charging. Current through a coil induces a magnetic field, and conversely, a changing magnetic field induces current in a coil
 
@sorak Yeah. IE a transformer.
What do you guys think about the factory pattern? I understand the principle but I have yet to run into a case where I get a re-use. Almost always it's a 1 to 1 with a mapper.
 
Factories make sense when you need to create instances of a generic type (i.e. something with multiple implementations, typically an interface)
I used to epicly overuse it
 
I doubt this is the correct room, yet its the closest I could find, please direct me to a better one if such exists. Do any of you have experience with mediawiki's dpl extension?
 
Wes
6:59 PM
> Fake
Fakes are objects that have working implementations, but not same as production one. Usually they take some shortcut and have simplified version of production code.
 
How is that different than a mock? I'll have to Google.
 
Wes
a mock must be instructed step by step on what to answer back to the code being tested
 
@Wes Have a comment on my factory question?
 
Wes
a fake is capable of generating answers its own, it has fully working logic
what factory
 
@Wes I keep writing these factories for my data mappers to use, but they end up being 1 to 1 with my data mappers always.
 
Wes
7:04 PM
yes, what's wrong with that
 
There seems to be no point in reuse.
I understand building the repositories first, because if you don't start with repositories then it will be a nightmare to add them.
 
Wes
reuse of what
 
But factories can be easily added.
Because if you end up having a case where you can reuse your factory the only place it will be used when you make the change is the data mapper.
 
@tereško answer meh!!! must symfony's dic really be instructed on every type in an application? ^^^^^^
 
Wes
factory abstracts away the "new" operator
 
7:07 PM
Really it just changes the location.
 
Wes
imagine you have class Foo{} and a mapper that instantiates that class
 
All right...
 
Wes
so you have
$fooFactory = function(...){ return new Foo(...); };
$fooMapper = new FooMySQLMapper($fooFactory);
$fooRepository = new FooRepository($fooMapper);
right?
then you realize you could improve Foo with a different version of it that is faster
all you need to do is change
$fooFactory = function(...){ return new FasterFoo(...); };
this is what i do
$fooFactory = function(...){ return new Foo(...); };
$fooHydrator = function($dbRow) use($fooFactory){ /* db row to arguments */ return $fooFactory(...$arguments); };
 
ah, it's called autowiring
 
It just seems like I should be able to reuse factories.
 
Wes
7:12 PM
you can reuse them by stacking them one into another
like i just shown you
 
Yeah, but what does $fooHydrator actually do?
It just maps the data it has to some format used by FooFactory.
It might as well just map it to the object directly.
 
Wes
converts a row from a db query, to the arguments required by $fooFactory, which instantiates a Foo
 
That doesn't make a whole lot of sense to have $fooFactory then.
Because you already have that. It's the constructor.
 
Wes
you can't pass the constructor around
by the way, i need to add that in symbola
 
Why would you want to pass it around?
 
Wes
7:18 PM
public static function ctor(){
    return function(...$args){ return new static(...$args); };
}
 
It seems completely superfluous.
 
Wes
because you want to decouple it out
i just told you. if you have a million "new Foo()" in your code, you need to replace them all by hand
 
Oh...is it so you only call new in one object rather than whatever number of factories you have?
 
Wes
instead if you have $fooFactory = function(...){ return new Foo(...); }; and pass around $fooFactory
you just need to replace only that very "new Foo" for changing them all
!!wiki abstract factory
 
The abstract factory pattern provides a way to encapsulate a group of individual factories that have a common theme without specifying their concrete classes. In normal usage, the client software creates a concrete implementation of the abstract factory and then uses the generic interface of the factory to create the concrete objects that are part of the theme. The client doesn't know (or care) which concrete objects it gets from each of these internal factories, since it uses only the generic interfaces of their products. This pattern separates the details of implementation of a set of objects...
 
7:22 PM
@FélixGagnon-Grenier wat?
 
Wes
i can't make it simpler than that
 
Yeah. I see what you mean.
 
Wes
that said, it's true that factories in data mappers might look superfluous
they most likely are
that's why i told you to not use them for now :B
 
@FélixGagnon-Grenier Symfony's DIC always needs configuration. But if you are using one of the latest version, then then configuration can be very minimal, because they have added the prototype-based stuff
 
Ahhh.
 
Wes
7:24 PM
It would have a better chance if the BDFL of a major framework posted to the internals list how much they'd love to have it. https://twitter.com/taylorotwell/status/966293145704116224
 
@tereško yes, I am still investigating that, but I believe what I was looking for was "autowiring"
it's just that, when first reading the doc symfony.com/doc/current/components/dependency_injection.html, it seemed that one had to define every argument of all constructors in a system, and I was somewhat put off
 
@Wes For hell's sake...
$rs = $db
  ->select()->fields('id', 'name', 'email')
  ->from('user_table')
  ->whereLike(['email' => '%@example.com'])
  ->orderAsc('id')
  ->execute();
 
Wes
query builders are evil
 
I don't understand why people do that shit.
SQL is simpler!
 
Wes
yeah
 
Wes
7:54 PM
!!should i get a coffee or go to bed
 
You should go to bed.
 
Wes
don't tell me what to do.
 
:-P
 
@Wes you should get a coffee and go to bed.
 
Wes
and stare at the ceiling all night long
sounds like the title of a very shitty song
 
8:06 PM
dem rimes
 
how useful would you guys find it if array_fill could support a callable as the 3rd arg? array_fill(0, 10, function($key) { return rand(0, $key); })
 
Wes
not sure, i rarely use array_fill
 
this would make it a bit more useful, i think :P
 
Wes
i find confusing remembering what 0 and 10 are
same for range. so i'd probably for() it instead
 
@Wes twatwell should just take a long walk off a short pier
 
Wes
8:13 PM
@pmmaga array_combine(range(0, 10), (function(){ yield .... })()); is not much different tho
i wonder if it works
only takes arrays, not iterators
 
and you'd lose the info of the current index
 
@FélixGagnon-Grenier yes, that's the old config-only approach
it's fiddly, but works well enough
 
I'm rn trying to setup twig and a few interfaces. I don't get yml symfony's di system so far
 
8:36 PM
it was one of the cases I added in my "blank" project tempalte
you probably should use that repo as an example :D
 
what is better laravel + vuejs + nodejs or express + vuejs + nodejs ??????
 
@DarckBlezzer if those two options and trepanation were my only options - I would pick trepanation
 
@tereško what do you recommend me?
 
@tereško yes, I was actually roaming through /blank, which propelled me to learning more about symfony'd dic
... and actually, I apparently did not roam enough, because I was presently being angry at how sucky using absolutes paths was in a yaml file
 
@DarckBlezzer depends on what you are actually doing
@FélixGagnon-Grenier lol
 
8:47 PM
i need sockets, i think i will use php or nodejs,
and some interface for CRUD
and a lot of connections via sockets
 
What is a lot?
 
usually it goes one, two, a lot
 
both php and node have sockets at the "native" level
 
@FélixGagnon-Grenier Alternatively one, two, facebook
 
8:48 PM
well like 15k or more connections
 
sound like you should be looking at erlang/elixir :P
and, how any of this is related to Vue?
vue is just a jquery replacement
 
noo
It's worse
So much worse
 
probably
 
i was looking for some type of framework that help me with my project
 
? never tried it, but apparently my hipster js friends like vue.
@DarckBlezzer I don't think a framework will be able to help
unless you actually already have a design thought of, use cases, uml diagrams and pseudocode, choosing a framework right now will almost certainly paint you in a corner
 
8:53 PM
@FélixGagnon-Grenier I hope you are not relaying on them for actual practical advice
 
heh
it seems that I don't, since I haven't tried vue, did I? :P
 
.. just checking
 
> $container->setParameter('path.root', DIR);
\o/
 
While we are on the topic of socket @FélixGagnon-Grenier. Care to rubber duck me? :P
ooooooooooh waaaaaiiiiit
tnx :P
 
:D
 
8:59 PM
that was a pleasure
 
yep I am stupid and JS stinks
:P
 
I may have overwritten WebSocket with my own thing by.. uhm.. accident :P
 
I wish "use strict" also prevented scope boundary violations :-/
 
@DaveRandom But that would make JS less of a wild west
What's the fun in that?
 
9:03 PM
"srsly strict";
11
I suppose that's the advantage of stringly typed optional pragma, you can basically do whatever the hell you like and it's backward compatible
 
"srsly strict";
 
📎: "It looks like you're writing your own ORM. Have you considered using one that's already written, tested, and widely supported like Doctrine, Propel or Eloquent?" — tadman 27 mins ago
 
@DaveRandom So you like it strict, but not that strict
 
...is that a clippy emoji?
 
9:07 PM
lol it is :)
I suggest the yellow speech bubble for the next unicode version tomorrow
 
it's a comment made by 100k user to a complete newbie
 
@tereško I do not see a big issue except Propel and Eloquent
 
@DejanMarjanovic so you think it is appropriate to tell a newbie: "use an ORM"?
 
@tereško not really, I would say you have to understand it before you use it, but...
 
Wes
9:16 PM
Time: 3.08 minutes, Memory: 10.00MB
OK, but incomplete, skipped, or risky tests!
Tests: 4804, Assertions: 9670677, Incomplete: 1.
the speed of paratest is insane
i spent hours of my life waiting for phpunit
 
So is the number of assertions :P
 
9 million assertions in <5k tests?
 
Wes
just trying it out :P
 
@Wes just use java
 
Wes
that's fast? :B
 
9:19 PM
... you know, the solidity of a software is not directly proportional to the number of assertions that test it ;)
 
we could probably switch the entire test suite of php-src for those tests :D
 
Wes
> just trying it out :P
 
a more interesting thing about it, for me, and I haven't looked to see whether this is doable or not, is whether you can synchronise the runners to e.g. run both client and server end of a network test
although tbh that would be more useful in run-tests.php
 
@DaveRandom Writing an amp implementation of sqlite would be much more useful
(to me right now)
 
non-blocking sqlite isn't really a thing? (right?)
it's local, all access and computation is effectively atomic
unless you are waiting on locks I suppose
 
9:24 PM
Now go do it
 
dunno how you would do that though
 
Stop with the excuses already...
 
I never really looked into how it worked
y u no postgres?
 
I don't want external dependencies in the form of extra binaries
:)
 
for what, sorry?
 
9:26 PM
That uhmmm... <sub><sub>smtp thing</sub></sub>
 
sure I figured, but what do you need persistence for? i.e. what's the actual end game?
 
It's a smtp catch all for debugging purposes. So it would be nice to be able to persist mails over multiple sessions
 
if you are storing mail, some sort of document-based storage probably makes more sense
although it also sounds like you don't really need concurrency
 
It also has a web UI
Basically: mail comes in -> mail gets pushed to connected clients on the frontend
I probably have something to show for soonish so it either makes more sense or well.. you can laugh
:-)
 
@PeeHaa OK, and where does the persistence layer fit in to this? So that another client can connect and get historical mails?
 
9:30 PM
@DaveRandom yes either another client who connects. Or after a restart of the server
 
I'd be tempted to just throw them in apcu and persist them into a json file or something (or even just dumping the raw MIME messages to individual files), possibly rehydrating apcu on restart
 
would be waaaaaaay simpler than rdbms
 
I am currently just pushing ^ those to connected clients
@DaveRandom hmmmm that could actually work I guess
Didn't think of apc
 
minimum viable it would be fine, can always add frilly bits later
 
9:33 PM
Agreed
@DaveRandom Or much more likely call it good enough and abandon the project
 
@DaveRandom story of my life
 
Wes
in unrelated news, i'm loving css grid
can't wait for a better support
there's always a safari or a msie ruining my plans
 
I ignore IE. Safari is kinda annoying though
 
Apr 27 '16 at 19:28, by Paul Crovella
safari is just ie for hipsters
 
:( wikimedia stopped providing squid reports I think
 
Wes
9:42 PM
can you believe i still get msie8 users
it must be trolls
 
@Wes I ignore people on XP
:)
@Wes When you do client work what browsers do you support?
 
Police report filed. Apartment looking through security footage. Bank account contacted. Credit monitor established. Insurance contacted and claim created. Now I simply sit and wait. Apparently ~40% of stolen cars are recovered. Glad I work from home.
Car recovered. I am the most embarrassed person on the planet right now. I woke up early sick/jet lagged and wanted to get food. Instead of walking to nearby store I drove. Then forgot I drove and walked home. Fucking jeeeesus christ I am so embarrassed.
facepalm
 
hahahahahha
 
Wes
HAHAHAHA
 
s/jet lag/drugs
 
Wes
9:50 PM
@PeeHaa i do what i can lately. the fact that browsers proliferated so much and they are so volatile forces me to give no guarantee on the supported browsers. it's a good excuse :B
chrome breaks basically every month... there's nothing i can do about that
 
lol that's some shame right there indeed
 
Wes
the issue i have this month, is media queries not being applied
 
lolwat
 
lolwat lolcat
 
Wes
i had to remove <link> from dom and put it back in order to force the render
with a setinterval, like a cave man
 
9:52 PM
lol that is just terrible
 
Wes
what can i do. i have no idea why that happened
and web fonts, that's a classic
 
webfonz
 
Wes
suddenly you get letters replaced with a square, for no reason whatsoever :B
 
@Danack isnt' he an SC2 caster ?
 
@Wes Seen that too I think on FF
 
Wes
9:55 PM
you have no idea how many times i had to change to a different font lol
 
Think it was with font awesome
 
@tereško yes, or more other games now seeing as SC2 is boring.
 
I'm stupid, what's wrong here? I get can't set className of undefined.
div = document.createElement('div').setAttribute('data-href', item.url);
div.className = 'entry';
 
Don't chain it like that, don't make you variable global en don't use className as afaik that is not standard
 
kk.
Thanks
 
10:02 PM
twitch.tv/day9tv - story time
 
lol
 
someone call the government ... our national flag has apparently changed
 
is that like, not yet but soon?
 
@Allenph thank you !
 
@DejanMarjanovic have you people begun the fourth reich?
I thought it was supposed to be a stealth project
 
10:09 PM
@Danack great talker tbh
 
yep.
 
@tereško well not sure if you missed it, but it's that blue area with stars
 
...
 
Wes
eh, pretty much
except the mass murdering
 
"I'm Terry Benedicting"
 
10:25 PM
\o/
 
After watching multiple youtube videos of "twitch" streams, I'm convinced every twitch streamer is mentally ill.
 
Wes
.................FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 384 / 536 ( 71%)
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 448 / 536 ( 83%)
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 512 / 536 ( 95%)
FFFFFFFFFFFFFFFFF............................................... 576 / 804 ( 71%)
just after i said "after this i'm going to bed"
 
:D
 
Wes
wat
 
Just acknowledging your pain.
 
10:30 PM
@Wes needs a U at the end of that
 
Wes
@jwage after so many consecutive FFFFFFFs, it should really print out some UUUUs
i am planning a PR for that
found the problem, no idea how to solve it. i never go to bed happy, there's always something disturbing the tranquility of my sleep
 
\o
G'dafternoon 11
I'm still amazed that there is no mobile chat application for SO/SE, but I guess usually people are on their computer when they want to chat on here anyways
 
10:49 PM
Laravel or Symfony ?????
 
Wes
vanilla
 
pistachio
 
@Wes Huzzah! We're doing DDD for the domain layer.
The Bootstrap is a bit strange, but.
 
@Wes you recommend me vanilla?
@PaulCrovella what is it?
 
a member of the cashew family
3
 
11:02 PM
^ Rofl.
 
Wes
lol
 
@PaulCrovella ¬.¬
 
@PaulCrovella chances of it being an actual web framework were about 50/50 pistache.io (close enough)
 
Elegant and c++
riiiiite
 
Wes
lol
 
11:08 PM
@PaulCrovella pistacho is better than nodejs + express?
@PaulCrovella pistacho is better than erlang/elixir?
 
11:20 PM
@DarckBlezzer Dude, you're seriously missing the meaning of this conversation.
 
Wes
only 5 FFFFFs
 
11:33 PM
The C/C++ editor from JetBrains is called CLion and its quality is far worse than PhpStorm or IntelliJ IDEA.
 
@Wes Do you have a public repo where I can study how you're doing your tests on all of these objects?
 
Every codebase I've opened in it so far has "errors" shown by the editor that don't actually exist.
 
If you ever go trough the trouble of configuring it for php-src, please share it ^^ I'd also like to give it a try but never actually put the effort
 
@Danack Hahahaha.
@pmmaga It's definitely not good enough for php-src lol
 
Wes
meh, going to bed
gn all
 
11:39 PM
gn
@LeviMorrison why?
 
6 mins ago, by Levi Morrison
Every codebase I've opened in it so far has "errors" shown by the editor that don't actually exist.
 

« first day (2685 days earlier)      last day (2256 days later) »