« first day (2659 days earlier)      last day (2286 days later) » 

11:01 AM
@Sean .......and the punchline is?
 
@Danack There is none ): I just have a bunch of stuff on and can't review peoples code at the same time. But when I don't some absolute crap gets passed through
 
Just to be clear, temp tables are fine since about ten years ago.....and for some multi level queries they are much easier to write, and be performant.
 
Absolutely
I mean right now all it's doing on each page load is creating the table and doing nothing with it.
 
11:18 AM
quizzical_dog.jpg
 
someone recommend some easy soothing music, no words, jazz like.
 
@Darius the philadelphia experiment
 
@ircmaxell Linked a nice playlist a few weeks ago
 
@Darius I usually open google play, and hit "radio" on Miles Davis.
 
Just checked miles davis, a little strong for me.
Jeez, he really loves the trumpet haha
 
11:31 AM
well, he is a trumpeter :P
 
Yeah, noticed. Something along the lines of this youtube.com/watch?v=Tt524wGJFqs
 
you could try Sonny Rollins if you like the sax better
or Charles Mingus for double bass and piano heavy stuff
 
Thanks, those two are great.
 
fuck, my brain is too dumb
 
11:35 AM
Made me laugh when I skipped to 4:05 @Danack
 
how far along are those cybernetic augmentations?
 
it gets even more relaxing later.
 
@tereško So far, you can turn on lightbulbs with your brain, when it has a chip installed.
 
yeah, that's shit
 
@Darius youtube.com/watch?v=BNOUDhklZKQ but it has words
 
11:36 AM
I need something for storing project's mental model
and, no, mindmaps are not an option, because the damned thing is too interconnected (and that's one of the things that I am actually trying to solve)
 
"Everyone" is raving about Adobe Muse for that sorta stuff.
I think it's more work than help though
 
anyone recomand me a video tutorial or link where i can get clear idea about Callback function of PHP?
 
I think it was Muse.. maybe some other adobe product, I can look it up again if you want a real answer.
 
@SwordI no. Read a fucking book/
I am kinda serious - the youtube "tutorials" are actively harmful
 
i try youtube for this but i didnt get good video that clearfy me.
 
11:39 AM
it's like the people, who make those tutorials, have been hired by Oracle to spread misinformation
 
I met a guy at the gym that works for oracle, so full of sh*t...
cocky MF
 
Wes
11:52 AM
what's your biggest repo on github guys?
need something not too big to test the static analyzer thingy :P
 
PHP.net Website Problem – #75877
 
oh, and this one is also quite fun: blog.toggl.com/world-created-programmer same folks
 
@Gordon I love bashing on PHP as much as the next guy, but in this case I don't see how it relates to PHP.. What are the tiny horses supposed to represent?
 
@pmmaga wordpresses
 
12:03 PM
:D
 
Hahaha, those are great
 
Anonymous
@pmmaga signs of stroke
 
memory leaks maybe? :P
 
I am trying to build an interface for all Mapper classes in my application which take Entities as arguments. But the thing is, most of my entities don't have a lot in common so, I can't do a public function store(Entity $someEntity);.
Is there a way to make the interface somehow?
 
12:15 PM
why cant you do store(Entity entitiy)?
granted, it will suck because you'll be able to any entities to it, but it's possible
 
@Gordon I can, but I don't have a class named Entity. I have an Entity class named User.
 
yeah, you probaby have an abstract class or interface Entity
 
But there's not a lot of things common between the entities, so doing an extends doesn't make much sense.
 
what do they have in common?
getId i guess?
 
@StefanoTorresi Yes.
 
12:17 PM
extract that in a interface and that's it
 
Is that a good idea?
 
it will still suck because the UserMapper will be able accept WhatNot entities then
 
that UserMapper could compose a generic mapper instead of implementing it.
 
@Gordon True. I want UserMapper to just have User.
 
I'd just write some mappers first and then extract a possible interface later
 
12:21 PM
@CoderDudeTwodee then you won't be able to implement a more generic contract
 
@StefanoTorresi Is that a good idea to have such a generic contract?
 
Well it depends. Do you need specific mappers to reuse the store logic? Then compose something that stores stuff, instead of extending it.
otherwise just duplicate the store method using specific entity types in their store signature
a little duplication is often better than a little dependency, or so they say in golang.
 
@StefanoTorresi So, different interfaces for different mappers?
 
you said you want UserMapper to only deal with User entities. That sounds like a specific contract you want to establish
 
@StefanoTorresi Oh, yeah. Looks like I am contradicting myself. I was wanting a way to make a generic contract and then I am wanting a specific one.
XD
 
12:27 PM
;-)
 
I will make a few more mapper and find out what works best as @Gordon said.
Thanks.
 
"Well.. actually.. 90% of shark attacks happen in shallow water" "well no shit, that's where the people are" haha, Bill Burr is great.
 
@Darius I find it somewhat surprising though given that their preferred mode of attack is getting below the prey and then propel upwards
but yes, obviously that's where the people are
 
I heard it depends on the aggression of the shark and it's partly based on the species.
and most tend to be "accidents" by the shark
where they thought it was something else
Wonder how they figured out what the shark thought
 
Wes
12:42 PM
hit that 10k objects "limit" again, i tried to keep all project code in form of phpparser nodes, and it's slow af
it's much faster parsing them only when needed without keeping them in memory :\
 
morning
 
happy furday
 
speaking of fur... cats
@DaveRandom can you get an API key for Jeeves for imgur?
 
I guess so? We don't really have an assigned account, generally either me or @PeeHaa just generate something
 
okay
something I've wanted to add, but need an API key added to Jeeves :P
 
12:49 PM
what does it need, just a valid email address?
 
Should I lazily load PDO?
Does that do any harm than good?
 
I guess so?
 
!!lxr socket_export_stream
 
[ /ext/sockets/sockets.c#2426 ] PHP_FUNCTION(socket_export_stream)
 
@Tiffany see gtalk
 
12:56 PM
Ever look at the code you just made for 30 minutes straight and think: Fuck
?
 
Wes
@CoderDudeTwodee means open the connection?
if yes, you could definitely do that, but it's not going to be a big change :D
 
@Wes yes.
 
doing lazy loading for DAL is useful, but with PDO you won't see a big improvement
it becomes critical, when you have SOAP or some notREST client as your DAL
because initializing a SOAP client can take quite long
 
@SaltyPotato often
 
and same goes for an HTTP client, that requires some strange authentication on init
 
1:04 PM
@SaltyPotato "Fuck" like "Fuck I'm good" or "Fuck, I am an idiot"?
because the latter happens much more often than the former :P
 
@tereško Sooo, not doing lazy loading.
 
someone gave me a wireless charger for my phone and I'm disproportionately pleased by it, like the child that I am
 
Wes
@StefanoTorresi does it ever happen to you that you brag about it, you write comments, documentation.... and then you realize that it's all shit..... my poor self esteem :B
 
@Wes yea but that usually happens months after :D
 
Wes
12 hours ago, by Wes
my code gets old as i write it
 
1:10 PM
at least you're releasing stuff, I don't even do that because I know it sucks :P
 
Wes
i don't release anything :(
 
the problem with releasing stuff is people use it and then you have to maintain it, whether or not it sucks is largely orthogonal to this
 
that's actually the least of my thoughts. The first worry is "is it good enough?"
 
Wes
i would love to be that guy for once. all the stuff i did sux and nobody gives a damn about it :B
 
usually the answer is "no."
yea, same :P
 
1:12 PM
@StefanoTorresi that really does not matter
seriously
if it actually sucks, no-one will use it
(people still might not use it even if it doesn't suck)
but if people do use it then a) it definitely doesn't completely suck and b) some of those people will probably want to help make it better
people bitch about FOSS user culture a lot, but there are some good people out there
 
@DaveRandom that's why I much prefer contributing rather than trying to do something useful of my own.
 
Fill the void. If there is no void that you know how to fill, just help plug the holes in the thing that's already filling the void.
unless that thing sucks and was made out of cheese or something, then by all means make a better void-filler
 
RecursiveTreeIterator::setPostfix has wrong signature – #75878
 
Wes
@LeviMorrison dave found these yesterday, the core constants without CONST_CS. we should begin fixing those for a starter lxr.room11.org/…
 
I was compelled to google "cheesey void" off the back of that message and the results are most disappointing
@Wes N.B. that is probably not even an exhaustive list within php-src
or at least, you can't know that it is
 
Wes
1:19 PM
you mean there are other ways to register constants, or lxr is imprecise with search?
 
both
REGISTER_*_CONSTANT are macros, there are almost certainly other weirdo macro chains people have created somewhere
and ctags is not 100% reliable, it does mis-label symbols in some places
 
Wes
i see, but better than nothing. constants shouldn't be too many anyway
 
I have a feeling that you are gonna have a bad time with lxr.room11.org/xref/php-src%407.2/ext/session/session.c#1451 in particular
I am willing to bet that will cause all kinds of shit
 
Wes
sigh
 
has anyone here used AWS to host a webiste
 
1:52 PM
@Koosh the company, that I work in, use it.
but if you want to know "how", that's sysadmin shit
we here are just your garden variety code-monkeys
 
We also use AWS, but we do a lot more than "host a website"
 
that reminds me ,.. is "code monkey" considered racist in 2018?
8
 
o_O
 
Wes
yes. everything is
 
Wes
2:00 PM
well, that's not really important. it's just a test :B
 
Guess who fried their mobo
 
you?
 
Wes
ahahaha
no, joe? :B
 
oh shit
 
Tried installing the new power supply...
 
2:02 PM
@Tiffany it actually looks like pretty good example of how to write unit tests
 
Aaaand it won't boot up anymore
 
though, it lacks coverage-definitions
 
@tereško I'm more harping on @Wes for telling @Allenph to not use extends
 
Even the previous power supply doesn't work anymore ;-;
 
I really do not understand DDD followers :(
 
Update docs for APCu with regards to rfc1867 support – #75879
 
Wes
@Tiffany chances are, that method could have been injected instead
doesn't mean it's automatically crap code :B with extend you need to be more careful, just that
 
why are you trying to demonize a perfectly fine OOP solution?
 
Wes
ok i'll shut up
just check "composition over inheritance" @Tiffany
 
@Wes :P
 
Wes
2:10 PM
not going to argue with teresko after 20 hours at my computer
> I would rather have I <3 @PeeHaa tattooed on my bottom
 
Can't you do that either way?
 
Wes
would you be proud of it? :B
 
Yes
 
Wes
i wouldn't :B
 
@Wes you should check it yourself
 
Wes
2:14 PM
pffffffff
 
you seem to not actually understand, what it is about
 
:(
 
and also, looks up LSP
 
my car has LSP
oh wait… no… that's ESP
acronyms… so confusing
 
Wes
listen, 20 hours. i know what lsp is, i don't think you know what composition over inheritance is. lsp dynamic dispatch can be done on $this or another object just as well
but extends is a form of high coupling. if you don't agree with that fine, but shut the hell up
 
2:18 PM
also, what's "high coupling" ?
 
Wes
tight coupling, or whatever you call it.
 
names have meaning
 
Wes
"high coupling" About 206,000 results (0.50 seconds)
 
please, don't appeal to popularity
and please stop telling people "extend is bad", because it is not
try to limit your religious fervor
 
sorry @Wes
 
Wes
2:23 PM
i suggest what i want to my friends if i think i am helping them. tell me, what's the difference between doing $this->foo() and $this->thirdparty->foo()?
 
one breaks the encapsulation
also, those both have different visibility ... though, if you have broken the encapsulation, I guess it would not matter
 
I am thinking of building a wrapper class for PDO (does NOT extend it) that helps me do a few simple CRUD operations. Are there any disadvantages to this?
 
Wes
if i am handing myself th data to foo() means that i really want that to happen
encapsulation is not just within a single class
you can have layers, you know...
 
Or should I be writing plain PDO instead?
 
2:28 PM
@CoderDudeTwodee what problem are you trying to solve with that?
or are you doing it just because you think you might need to
 
Wes
as usual you attack me without providing explanations. that means you are wrong
 
@Wes what the fuck are you talking about?! I provided the reasons.
please stop with this fucking passive-aggressive bullshit
 
Wes
you started it
 
I did :<
 
@tereško Just an added bit of abstraction. To save myself from writing a 3-4 lines of code every time. (Preparing, binding, executing when I can do it with one function)
 
Wes
2:32 PM
@Tiffany it's ok i'm just giving him what he wants
 
@Koosh I did, I do.
 
Wes
he enjoys creating conflicts :B
 
@Tiffany here is the simple version: "extend" is not bad. Same way as null is not bad. It is just part of the language. It can be abused and overused, but it is perfectly fine part of code.
 
this is neat hackr.io
 
Wes
the fact that languages like php don't have namespace visibility like java, or class friendship, doesn't make extends good. it is just the only option
 
2:34 PM
@CoderDudeTwodee when you try to make something too generalized, you will end up hiding part of the functionality. In general, making "database class" is a pointless exercise
 
Wes
but if you allow access from other classes, you can always wrap them with hidden visibility
 
@tereško It does hide the functionality, but something like insertRecord() does what it says it does, it inserts the record but without me having to worry about how it actually inserts the record. Isn't it as bad as making custom functions?
 
Finally got a chance to play with aerys for something meaningful, little stuck on something. I need to read messages from a rabbit queue and broadcast to websocket clients. Consuming the queue is a blocking process so it needs to be spawned into it's own worker, how do I go about adding that process to the main loop? (Currently using vendor/bin/aerys - do I need to write my own launcher?) (@kelunik)
 
@CoderDudeTwodee but you should worry about how you insert data. Sometimes to save a single entity you will need to insert into two tables, sometimes you need a transaction. Sometimes you need to delete the old rows, before you write new ones.
 
2:40 PM
@Leigh amphp/process or amphp/parallel is what you're looking for there.
 
Yea looking at WatcherProcess::spawn already
 
@tereško True, that wrapper won't work for something a bit more complex than just adding a few fields to only one table.
Understood.
 
@CoderDudeTwodee if you "standardize" the inserts, your DB schema will suffer, because you will be forced to have the same general .. emm ... pattern for all your tables
 
@Leigh Ignore that, that's only for Aerys workers.
We're planning on moving it into a separate package.
 
@Leigh why is consuming the queue a blocking process?
 
2:43 PM
@FlorianMargaine Because I want to use 'consume' rather than poll with 'get'
It blocks and fires a callback when a message is received
 
wasn't there a rabbitmq library for amphp?
 
Gotcha.
 
There is a STOMP library, isn't that a different protocol to AMQP proper?
 
@Leigh Sounds like something where you could write a simple class implementing Amp\Parallel\Worker\Task in amphp/parallel and use the worker pool.
 
@Leigh still, that sounds like something that should be non-blocking at the event loop level.
 
2:44 PM
@Leigh Why is reading from the rabbit queue a blocking process in the first place?
 
If a method returns DateTimeImmutable, is it a violation of LoD when using it like $foo->getDateRequested()->getTimestamp()? Should I just have a method on the original object like getRequestedTimestamp() instead?
 
2 mins ago, by Florian Margaine
@Leigh why is consuming the queue a blocking process?
;-)
 
@kelunik Because it's using ext/amqp AMQPQueue::consume
 
Nvm xD
 
@Leigh Do you need that, or is STOMP enough?
 
2:46 PM
I don't know anything about STOMP... does my vanilla rabbitmq support STOMP? :D
 
Not going to be possible to enable it (it's a production system, ops will be funny about it)
 
Ok lets step back a little bit, is it possible to add to the main loop from the file passed to aerys via -c, or am I going to need to fork vendor/bin/aerys and add to the loop there?
 
The funny thing is, to do web sockets with rabbitmq listening, I used STOMP etc. The stack just got a little ridiculous. We have STOMP, WAMP v2, about 60 different protocols
 
2:53 PM
You don't need your own vendor/bin/aerys. What do you mean with "add to the main loop"?
 
Regardless of whether I create a separate worker and use the blocking approach, or use the bunny lib you linked, or whatever. I need to add to the main Amp loop to react to messages being received
 
The event loop in Amp is global, you can just use Amp\Loop where you need. If you use the react-adapter, you just use ReactAdapter::get() and pass that instance to the ReactPHP library where it requires an event loop.
 
oh... they're all static methods, I completely glossed over that
Ok great, that means I can get to it, thanks, that makes things easier :D
 
evenings
 
@Sean yes and no. First of all, in this specific case you can say that you are simply dealing with data-type. But the solution would actually be setRequestedTimestamp(int $timestamp), if you wanted to strictly apply it. This is of those cases, where pragmatics does not play all that well with theory. I would just use the datetime as it is instead in this case
 
2:59 PM
Makes sense, cheers. Also super interested in this RMQ + Aerys discussion, I tried to use it a while back and got stuck very early on
 
@Sean the thing with LoD is that it also is very open to interpretation.
It's not so much a law as it is a rule-of-thumb. As in - it's what you do by default, unless you have a practical reason not to.
 
Clients <- WSS on Aerys <- RMQ Result Topic <- RMQ Worker
\-> API on Aerys Web Server -> RMQ Process Topic ^
Not sure if it was stupid or not, but it meant I had to listen to a RMQ topic and for WebSocket connections, and I had no idea how
 
I have two servers with two different projects in phpstorm, TL;DR I had to remap the drives to different drives, but now phpstorm is giving both projects the same name, which is confusing as fuck.

If I delete the .idea folder in each project root and start over for each, will that end up being more work than trying to fix the problems I'm having in the projects currently?
I'm thinking a clean build for both projects would be good regardless
but I'm not sure if that's "good practice"
 
3:15 PM
it will just inherit your defaults
if you enable composer sync it will re-set up all the stuff that can be inferred from composer.json
if you are worried, just rename .idea to idea.old
then you can just revert it
@Tiffany open one of the project, right click on the root node in the "project" panel and do refactor->rename, and choose "rename project" (rather than "rename directory")
then close it and open it again because it does weird stuff when you do that
 
okay
 
Can anyone tell me what are the use cases when I might need this Aerys thingy?
 
shits and gigs
 
"thingy"? -.-
 
@CoderDudeTwodee probably not what you want
 
3:18 PM
I'm just going to rebuild it from scratch because phpstorm is bitching about VCS, and I deleted the git repos in this project because they're unnecessary.
 
@Tiffany I really hope you are not committing your .idea to repos :D
 
@StefanoTorresi :P Have been heard about it quite a bit lately. Very curious.
@FlorianMargaine Maybe I will, someday.
 
@tereško nope
 
So... Google directly shows SO answers now. i.imgur.com/xTkdfaj.png
 
I'm trying to get my code organized again, because in November-December, changes were being made directly to prod, changes were being made to master branch on dev, and basically everything is a fucking mess that I'm trying to clean up.
 
3:22 PM
@kelunik nice
 
@Tiffany sounds like someone need his/her hands pulled off and shoved up the ass so far that he/she can tickle the tonsils
 
@FlorianMargaine But only in the incognito tab for me.
 
@tereško it's my fault. I didn't enforce the proper workflow on a vendor
 
@CoderDudeTwodee it's over 10k loc + ~140k of deps, wouldn't call it a "thingy" :P
 
@Tiffany ouch
 
3:26 PM
@StefanoTorresi Well, my bad. What is Aerys though? Just curious.
 
!!package amphp aerys
 
[ amphp/aerys ] A non-blocking HTTP/Websocket server
 
@CoderDudeTwodee it's an application server. it runs your PHP code without using the fastcgi protocol or builtin webserver modules.
 
Like Apache?
 
@DaveRandom creating new project from files, at the "Add Remote Server" window, it wants a Name, Folder, and Browse files on server. Documentation says that it wants the root of the server, but UNC isn't supported. ...Do I have to map another fucking drive to C:\ of this server?
 
3:32 PM
@CoderDudeTwodee it lets you do without apache, albeit you would usually put a reverse http proxy in front of it, and that could very well be Apache. But it wouldn't be Apache to run PHP anymore.
 
Gotcha. I might give it a try after I am done with my current project.
 
@StefanoTorresi You don't need something in front.
 
I didn't say "need" ;-)
but I would probably do that anyway, are there any pitfalls to it?
 
To not putting one in front? :)
 
no, to put a reverse proxy in front of it :p
 
3:37 PM
I'd probably do it, because PHP doesn't properly support session tickets, but otherwise there's no need for that.
 
@DaveRandom nevermind, I got over it and mapped the drives. This is the only thing that truly pisses me off about phpstorm/jetbrains products
 
@Tiffany "Open directory" works fine for me with a UNC path...
just tested it
 
Looking for Symfony/Sonata help
 
File -> Open Directory -> Type full UNC of dir in address box -> OK, opened the directory as a project
 
why didn't I do that
 
3:45 PM
@kelunik you mean TLS session tickets? yeah :-/
 
FML
 
@bwoebi yes
 
@bwoebi also no sessionIds? tickets are only useful in distributed cases, right?
 
@kelunik well, there is no need to put a reverse proxy in front of unicorn or expressjs either, but people still do that for a great variety of reasons
 
Is it possible to listen for two things at once from what I mentioned above? (i.e. for new websocket connections & for rmq queue consumption using that bunny lib)
 
3:47 PM
@StefanoTorresi Which reasons?
 
dunno, SSL termination? caching? redirections? logging? not having to directly expose the application server to external connections?
 
@Tiffany tbh the whole concept of working on a network share makes me a little uncomfortable though, it implies that you are working on something that someone else might change at the same time. I would try as hard as possible to just use git and work locally...
you will also have issues in that any feature that relies on filesystem monitoring won't work properly
 
@DaveRandom most of the time, I'm the only one modifying the code. The exception to that is if there's a project that is requested and it's out of my skill range, then we outsource it to a local business (who wrote the code originally). Should've had them work on a separate server in December but wasn't thinking about it at the time.
 
git All The Things
 
I can say with confidence that I'm the only one working on it 95% of the time.
and I have three web servers
 
3:55 PM
Happy freitag
 
regarding the messup with my .idea folders, a new drive was added by GPO that overwrote one of my drives I had mapped for a web server, so I decided to remap two of them to drives that hopefully won't be used at an enterprise level. I'm guessing phpstorm got confused over the drive changes.
 
!!lxr stream_socket_enable_crypto
 
[ /ext/standard/streamsfuncs.c#1495 ] PHP_FUNCTION(stream_socket_enable_crypto)
 
@Tiffany mklink /d "C:\local\directory\path" "\\server\share"
you don't need to burn drive letters to make network paths behave as local resources
@Jeeves here be dragons
@pmmaga what you want is about a million layers of abstraction away, what are you actually looking for?
I know where a lot of it actually is
 
trying to understand the last param of that function
 

« first day (2659 days earlier)      last day (2286 days later) »