« first day (3260 days earlier)      last day (1682 days later) » 

12:00 PM
A really nice to have would be if classes (both internal and user land) could be made fork-aware, to handle something - usually I'd expect that to be reconnecting to something, but it might be anything.
 
@Leigh yo, haven't seen you in a while.
what have you been upto?
 
@Jimbo how do you measure that? Things like cyclomatic complexity definitely don't tell you how understandable something is...
 
@ircmaxell comments help, properly named methods, classes, variables etc also help.
 
@mega6382 but how do you measure it?
 
@Leigh leiggghhhh!
 
12:03 PM
An interface (I don't really like the name Forkable, but let's go with it for the sake of discussion) that lets them opt-in to doing what they need when a fork occurs - but... Perl (I think? maybe it was Python) also had a concept of an object that isnt workable, and would throw an error if you try to fork with an instance in memory. I'm not sure how applicable that would be for php, but I'm sure greater minds than mine can imagine something that might need to be defined as un-forkable
 
I feel like we're arguing over things which a first year comp sci student is taught. Can you put a number on it? Not without a metric ton of machine learning. The very nature of these things is that they are qualitative.
 
@mega6382 Dunno when I was last here. +girlfriend, +mortgage, -girlfriend, working, sleeping. Nothing exciting.
Summer festivals, being out and about. Just did a 340km charity cycle. Got a cold.
Pretty much it
 
ugh. I just saw that auto correct. Should be "isn't forkable". Arguably all perl isnt "workable". :P
 
So, anyone think there would be any problem with me adding this to our email etiquette rules?
 
@mega6382 Trying to do as little PHP as possible tbh.
 
12:08 PM
 
@MarkR and qualitative leads to a ton of difference in opinion and experience. Hence the statement "all other things being equal, simplicity is more valuable than overabstraction" means something different to every single person. Some consider typeless spaghetti code simpler. Some like tons of interfaces and design patterns. It becomes a statement used to justify whichever style of code you like best. And as such is devoid of significant value unless you can objectively define simple ...
 
@ircmaxell Generally you'll have a bunch of people of varying skill levels look at something and if a junior can understand the code without having to ask questions then it's more understandable as it will cost the business less in training to work on it, which makes it objectively better for the business.
Seeing as skill levels can be measured.
So perhaps - the number of questions that have to be asked to understand a piece of code, given people of the same skill level.
 
@Leigh cool
@Leigh yeah, recently I too have been working more on TypeScript than PHP.
 
Morning
 
@Danack don't give Z any more ammunition to say you are being overly passive aggressive and claim you are causing a divide
 
12:13 PM
@mega6382 Been doing more devopsy stuff, mostly Go and Python for me
 
@Leigh cool, I wanted to work on Go too, but I think that @Jimbo has scared me off for now.
 
Wouldn't listen to him
He's the kind of person who thinks Go needs a DIC ;)
 
@Leigh Any language can use an injector - nothing wrong with that! In fact it speeds up development in many cases!
It depends on your team. There are so many purist asshats in Go, it's like a bunch of Laravel developers. You'll get a lot operations people who think they're elevated higher now because they know Go, but don't know general software engineering best practices and evangelise the language without much thought.
They feel like they belong somewhere finally. But there are also a lot of nice people who are learning, have experience with other languages also, and want to learn the industry best practices - not just those from a single language. It's worth it.
 
@Jimbo honestly, I don't know if I agree with that. Sometimes spending money on training can increase the efficiency and performance of the entire team. Specifically in this case, are there abstractions that need to be trained, than once understood increase productivity and/or safety by a non-trivial factor?
 
Training session #1: Use type hints, use strict types. Safety now increased :-)
 
12:18 PM
Sigh
 
Meh it's off-the-cuff, don't take it too seriously please
 
@Jimbo oh, I think it is a great discussion. Not trying to belittle it, but trying to seriously converse about trade-offs
 
@ircmaxell You are correct, it is not really possible to measure "simplicity", but if general best practices are used it can make life for the maintainers a lot easier.
 
@ircmaxell The thing is, don't we all generally agree on KISS?
I have never heard anyone have a problem with the simplicity in that. In fact, it's one of the only things I've seen management and developers agree on together :D
 
12:21 PM
@mega6382 my point I am trying to make is that those "best practices" are opinionated and not really universal. They depend a lot on context
@Jimbo yes, however what is the definition of simplicity, and what is "enough"? That's what I am trying to get at is context dependent
 
It's best practice not to use string length as your one and only hash key and look where that got us :|
 
@ircmaxell Sure but that could also mean that what you consider to be best practices and what those that will be maintaining your code consider best practices are entirely different things.
 
Still worth training for what to avoid. The discussion about best practices (last time) ended with a very clear "there's a lot of stuff that is clearly known as bad, and that can be taught as to be avoided"
Most of what I learned at University was about what to avoid in a codebase/thought-process, and not about what to follow.
 
I think that this quote should be kept in mind whenever you are writing code "Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live."
 
So everyone's understanding of simple is different. That's how the human brain works, no two are the same. But there must be a common scale or something in there somewhere that can be quantified otherwise nobody would be agreeing with it.
Is there a single word that can replace "simple" so that it's objective and measurable, as a copout?
 
12:25 PM
You know, thedailywtf.com is filled with stories of people who thought that their code was "simple"
 
Maybe I could say "objectively simple" and say FU!
 
I think "intuative" is what you may be looking for.
 
@Jimbo Indeed, I think that most people on board with the "rock and roll all night, party every day" philosophy
 
@DaveRandom Do you ever do any work?
 
12:25 PM
depends what you mean by "work"
 
@MarkR That's also subjective
We can all agree on simplicity > unnecessary complexity right. You can't really get unnecessary simplicity...
@ircmaxell I'll take a look, thanks
 
@Jimbo $_REQUEST
there is definitely such a thing as "unnecessary simplicity", it's a consequence of people not understanding the problem
 
According to this:
> Simplicity is objective, it can be probed.
@DaveRandom Isn't that accidental simplicity?
 
@Jimbo oh....I think you can. e.g. React JSX is better because of the shortcuts it takes.
 
But isn't that easy?
 
12:28 PM
"Simplicity is objective, it can be probed." - but you can assign different values to different tradeoffs......which means you can't measure 'total simplicity'.
 
@Danack React TSX is even better.
 
The question is not so much about defining simplicity/complexity, more about defining necessity
 
I really need to write a talk about context. Because I honestly feel that's one of the biggest missing factors in almost all quality and/or tools discussions
 
which is case by case
 
Context matters so much in these discussions
 
12:29 PM
@mega6382 yeah, defining the React state and props as TypeScript object is so intuuitive and easy, really helpful to work with :)
 
^^ what he said
 
What is "unnecessary complexity" for one organization may be "essential complexity" for another.
 
...and the definition of "necessity" can vary over time
 
@ircmaxell You haven't uploaded anything to your youtube channel in over 2 years, last time you told me you only create videos when you are motivated/inspired about something, so why not make a couple about this?
 
@ircmaxell But that's fine, for the other organisation it's no longer unecessary
 
12:32 PM
@mega6382 for me it is more about I need to wrap my head around the idea to create a narrative. I don't know what that narrative is now (it isn't clear in my head today), so :/
 
I'm confident in asserting that simple+working > complex+unfinished, but that's as far as I will go for a generalised statement
 
@DaveRandom that's where we started this discussion ;)
 
when, 1960? :-P
 
@DaveRandom I want to remove +working and +unfinished as that is extremely obvious and they cancel each other out
 
1 hour ago, by ircmaxell
@Jimbo I disagree entirely. Value isn't imparted onto code by how clean or simple or abstracted. It is imparted by the solving of a business challenge or problem. Only once the business value proposition is met fully and equally does "code quality" even begin to impact
 
12:33 PM
Goddamit, assuming they both meet the business' requirements of getting the job done :D
 
@Jimbo I very much do not believe those are obvious though.
 
@ircmaxell But nobody would say simple + unfinished > complex + finished
So if it's not that, then the other doesn't need to be there
 
only 11 years out
 
@Jimbo correct, because complex+finished >> simple + unfinished
 
@Leigh and now you’re here to stayyyy!
 
12:35 PM
@Jimbo Depends how much effort to finish
 
@ircmaxell Okay so: (complex+ finished > simple + unfinished) || (simple + finished > complex + unfinished) can be simplified to (finished > unfinished) and.... fuck
 
@Jimbo and yet people repeatedly seem to ignore the fact that finished > unfinished. Like, literally everyone, all the time.
and simplicity does tend to increase the likelihood of finished
 
@DaveRandom If that's the case, and finished is more important, then simplicity has a higher weight towards finished so simple > complex
 
And what does finished even mean? Working?
 
@Jimbo yes, but... define "finished" :-P
 
12:38 PM
Morngins
 
A piece of software is only ever "finished" once it's no longer used.
 
@Leigh Depends on DoD. But generally probably in production and providing what the business required
 
#define FINISHED 0
 
They just don't make movies like this anymore youtube.com/watch?v=rpxVp1g8xMQ
 
@PeeHaa looks who’s here Pieter @Leigh
 
12:39 PM
@Jimbo Very little code in production is "finished". Always more that could be done
 
Oh hai le chuck!
I am a dairy farmer
 
I hate this conversation
 
@Kalle Why did this check change? github.com/php/php-src/commit/…
 
@Jimbo well, nobody's really happy about it
 
12:39 PM
Why can't I just write one shitty little sentence but NOEP.
> There are benefits in software development from simple code extremely obvious in it's intention than from clever abstraction and indirection, GIVEN THAT THE CODE DELIVERS ON THE BUSINESS REQUIREMENTS.
 
@Jimbo it's almost as if one-size-fits-all statements are... overly simple? :-P (and ironically, it seems like this one isn't even finished)
 
@Jimbo You don't have to write the sentence at all
 
@Leigh I am writing my sentence.
 
@Kalle This is causing out of bounds reads
 
Okay, I don't specify the number of benefits, there I got out of that one
 
12:41 PM
@DaveRandom lol
 
I don't even say it's better. Just that there are benefits
 
There are benefits to living under a bridge and drinking white spirit, just depends on your point of view
 
lol
 
@DaveRandom It's nice to be outdoors for a start
 
@DaveRandom Exactly.
 
12:43 PM
So, here is the conclusion.
> Its all a matter of perspective.
 
Which means: "It depends". Great. Thanks guys.
 
@Leigh low overheads, both figuratively and potentially literally (dependent on your choice of bridge)
 
I’ve missed this pedancy
 
anyone know how common deployment of ZTS builds are in the wild?
 
@JayIsTooCommon pedantry
drops mic
 
12:44 PM
do any distros/pre-built repos provide ZTS builds?
 
Boom. I was waiting for the irony
 
@DaveRandom Significant downsides too. You have to constantly avoid trolls.
 
trolls demanding tolls
 
Although you could just share your white spirits with them and get them drunk.
 
@DaveRandom hey
Are we gonna go to an NW talk sometime?
 
12:46 PM
@Jimbo You do realise where you asked that question, right? I mean this room is actually a relatively intelligent place to discuss it as well, if you put that out on twitter you may as well skip a step and move straight on to the bridge/white spirit idea
 
This is why I'm adding addendums to the bottom
But adding caveats for every single word makes it read more like a comedy
 
Maybe stop tryharding thought leadership and relax :)
 
@Leigh At least I don't put "thought leader" somewhere. Hey, why not try and have one sentence
 
@Jimbo I am sorry. I feel the discussion is quite important, even if it feels like nit picking.
 
cmb
@Stephen, ZTS is not uncommon on Windows; don't think it's common elsewhere
 
@ircmaxell I do feel like it's in a court of law and the topic has gone more towards picking on specific words not the general sentiment. But I'm getting that not even the general sentiment is okay.
(Not offended btw) - But do we pick on things like KISS? Nope, we just say it as the general sentiment stands
As long as I can get the general sentiment, people can debate away next to it
 
@Sean awesome bro! I’ll try get commitment from the others
 
@Jimbo and maybe that is the value it provides. Seeding the debate and discussion.
 
@ircmaxell for some projects I've seen, that day wouldn't stand out from any other.
 
Totally :)
 
12:56 PM
@cmb I was under the impression some extensions aren't compatible (or, more specifically aren't safe for multi-threaded usage) - is/was that (still) accurate?
 
cmb
That would be bugs, I think (at least for bundled exts)
 
@Jimbo No problem. I sentence you to 1 day of not thinking about meta shit and just building something.
 
@cmb hmm I think it was stuff like setlocale and (maybe not any more, I can't find confirmation either way?) gettext using some process-wide state, and thus potentially being incompatible with threads
 
that's nothing to do with php
 
cmb
that
 
1:03 PM
right, not suggesting it's a "bug" in php, but more so that it is a barrier to usage of a thread vs a forked proc.
 
no
it doesn't stop any other language, these things are unsafe at the library level, many things about standard c runtimes are not thread safe, people still use threads ...
 
these one word replies are spectacularly helpful.
 
sorry, I'm sorta doing more than one thing
 
cmb
ah, multi-threading :)
 
1:06 PM
thanks for the info guys.
 
more important than the processing models supported by third parties, is the processing model supported by all of PHP ... the processing model, whether threads are used or not, is shared nothing, there is nothing we can or should do to change that, because actually it provides a huge benefit to us, it makes everything infinitely more simple ...
so when it comes to the question of threads vs forks, it makes not a single bit of difference from a design standpoint, the only things to know is that both modes have different performance characteristics (nts is faster) and windows can't do forking ...
everything must behave the same whether threads are used or processes, and it must not appear as if you are using threads even if you are ...
tl;dr threads are bad mkay
 
@JoeWatkins what do you think about an abstraction of concurrent execution for the core? Something that could be backed by threads, or by fork(), or by exec() (potentially pluggably), but sharing a common abstraction?
 
I'm working on it
 
@ircmaxell @JoeWatkins this discussion earlier is what lead to my Q
 
@JoeWatkins Oh for core? I thought you were targetting just an extension
so nice :D
 
1:12 PM
parallel will eventually be an almost-all-mode-supporting thing, backed by fork in nts, and threads in zts and windows, I haven't figured out nts and windows yet and don't think I care about that ...
I am developing it there, when I'm done an RFC will appear ...
 
@JoeWatkins \o/
 
@JoeWatkins oh good, so I can forget all about this and go back to eating crispy pork skins
 
tighter integration may happen at that time, sugar or whatever ...
 
@JoeWatkins are you thinking of supporting worker pools as well with the same abstraction (potentially off-server)?
(not sure if that makes sense to be honest, just curious more than anything)
 
distributed parallel computing is exciting, but I've never done it ... if this thing gets into core, I'll sink all the time I can into learning how to do that ...
I dunno how long it will take to finish, there's quite a lot to do ... I have a prototype of the thing I describe, supporting nts, but the API needs changing, I need a couple of weeks to work on it (total, probably) and I don't know when I'll get that ... I think in another two months I can take two weeks of pto, so hopefully before the year is done ...
2
 
1:17 PM
nice :)
 
@JoeWatkins oooh parallel working on NTS as well, obviously forknig has overhead, but great if it were available everywhere. I still think with parallel, why not go towards always ZTS, even if its then run in php-fpm with only one thread. could simplify the "parallel is always available" story for devs. will be hard to convince everyone from this move though ;) i see dmitry chasing me off the grounds hehe
 
> obviously forknig has overhead
that's only half the story
zts itself has overhead
it has overhead incurred in almost every single routine, forking has overhead but because of cow optimizations and avoiding overhead incurred by zts instructions for accessing globals all over the codebase, it evens out ... in fact, the nts version will be measurably more efficient than the zts version under most normal loads ...
 
@beberlei heck, the default implementation could be a cooperative multitasking approach too ;)
 
thats interesting :-) i would have thought otherwise. thanks for clarification
 
I started to implement co-op in parallel, but it was widely misunderstood so I stopped because it was wasting too much time ... but async/await, if we're going to get it, should probably be built on top of the scheduler for parallel ... I can imagine ways to do that ...
 
1:23 PM
mmm async, jesus feature
 
@JoeWatkins that does make sense. Unless that scheduler is pluggable via libuv/libevent/etc, where Awaitable classes implement some sort of way to get the resource that's being awaited, and some idication on what type of modes to expect (perhaps something like a select syntax)
 
I would love a hybrid scheduler, fun to write ... but there's no point in starting any of that before the core of the thing is in ... once it's established that concurrency is a thing we do, and we have a real framework that supports it, we can do all that other stuff ...
 
Hi to all. A quick question I don't believe can be worked as a whole post:
If a function is defined like this: public function toUser()
{
return $this->authenticate();
}

is it correct to be called like this:

try {
$user = JWTAuth::toUser($request->input('token'));
??

Thanks
This is from an implementation of jwt-tymon on laravel
 
@JoeWatkins Oh totally. More just thinking about some interesting ideas about bridging concepts :)
exciting :)
 
compiler warnings with GCC9 – #78566
 
1:28 PM
yeah, it really is ...
but ... "Zend was never, ever intended to do that (I wrote it)"
 
hehehe
 
@JoeWatkins what would you need to go forward? an aspirational RFC that specifies that we want to go in this direction in PHP 8 by evaluating approach $x for example?
 
I need to finish the code first of all ... once we have a core framework, we can RFC all that stuff to death, redesign the API, integrate into core, add pools, talk about distribution ... the core framework is the hard stuff, writing an api will take 15 minutes ...
 
@JoeWatkins I don't care what anything was designed to do. I care about what it can do.
4
 
a watch that stops time for everyone but me would be good, do you happen to have one of those @beberlei ?
@ircmaxell this, all the way this ... I once ranted about the subject, but that was before it was the opening line to every single one of Z's emails ...
 
1:35 PM
@ConstantineBlack in a word, no. You're calling an instance method statically, it doesn't accept any args but you're passing one.
@ConstantineBlack is this the class you mean? github.com/tymondesigns/jwt-auth/blob/develop/src/JWTAuth.php
 
Hello Guys
Can you please name of all PHP frameworks that offer console application?
 
nah
 
sounds like a long list.
 
Suggest any 3 or 4
 
any 3 or 4
 
1:41 PM
Yes
 
I think we must misunderstand the question ...
I think the majority of frameworks support or integrate some kind of console component
 
I misunderstand most questions
its like a super power.
 
@JoeWatkins i meant, do you wwant to guard your investment into the core with a vote that some form of it will be accepted for php 8? so that you have a guarantee that the time you put in is rewarded. also $$$?
@Prabhash symfony, laravel, zend framework.
 
the only thing we can't reasonably do from core is support any syntax sugar, the core vote isn't really deciding the future of the extension, so at least I'm not wasting my time whatever happens ... donations will help keep it at the top of my list of things to do :)
 
Thank you @Beberlei
 
1:54 PM
@Stephen Yes, that's it
 
@beberlei I'm sure you wanted me to put a number on it, but that's too hard ... I have more than one project in development and more than one to maintain, people don't say what they donate for so I just sort of assign time in my head based on what that person seems to be interested in the most (because they open tickets or talk about it on twitter or whatever) ... I can't really figure out another way to do it, other than funding individual projects and that would make people choose
and we'd have less cool stuff ...
 
@ConstantineBlack that repo has some guides about how to use the class, I'd suggest looking there
 
@Stephen I will. Thanks.
 
not going to start anything new this year now though, I want stable releases of a few things before I start anything new ... so don't make any suggestions, or say or ask anything interesting until January, please ...
 
@JoeWatkins I have a plan to teach pigs to ride bicycles. in or out?
 
1:58 PM
full size pigs on full size bicycles ?
 
no, just like humans progress, miniature pigs, on small bikes with training wheels.
as they get bigger, so do the bikes.
until they get to clown-level, and then the bikes get tiny
ala Krusty/Homer
 
ping me when they are coming into the arena sideways on a harley ...
 
... are the Harley's sideways, or are the pigs riding side-saddle?
does that imply the pigs are in long dresses?
 
no, they are power sliding ... it's muddy, they're pigs ...
 
@Stephen Ever used JWT token auth?
 
2:01 PM
@ConstantineBlack no I don't chase shiny things.
 
@Stephen :) OK. Thought maybe could ask for alternatives than tymon-jwt. Thanks.
 
@JoeWatkins honestly I think it'll be more impressive with regular bicycles. hooves. pedals. the little triangle seat.
@ConstantineBlack oh I can recommend alternatives. Not JWT.
 
@Stephen Cookie-like or some other method?
 
@ConstantineBlack depends what your needs are, but you can make 'traditional' cookie/session based auth go a long god damn way.
 
@Stephen Yeah, I guess so; but I took this way with this thing and I want to learn how it works. No big goals here, simple authentication with login/register and then only allow some post-get requests with axios only if user has the token.
 
2:07 PM
@ConstantineBlack part of learning is accepting your mistakes.
 
@Stephen Haha! Exactly my thoughts right now. In the past two days, I have been thinking in rewriting the entire thing. Frustration vs persistence is always a difficult scale to balance I guess?
@Stephen Re-writing the back-end, the front work nice
 
@ConstantineBlack replacing auth with something less... shiny shouldn't really require rewriting the entire thing, but you do you.
also, because I finally found the relevant picture. cdn.someecards.com/someecards/usercards/…
 
@Stephen Yeah, re-set it would more appropriate. Anyway, be well.
 
how the heck did I end up with a url missing the extension.
 
@bwoebi Assertion failed: (loop->watchers[w->fd] == w), function uv__io_stop, file src/unix/core.c, line 896. Ideas of what would cause that?
I can reproduce it consistently with http-server dev-master, run test/test-server.php, then download https://github.com/summerwind/h2spec/releases/latest/download/h2spec_darwin_amd64.tar.gz, unpack it and run ./h2spec -p 1338 --tls --insecure --strict twice. The second time the server will crash.
 
2:17 PM
 
if I have class A { use MyTrait; } class B extends A { } - is there a possible way to have a class C extends A that removes MyTrait? Everything else about class C is the same as class A but I don't want everything that MyTrait provides.
 
@GlenSolsberry No
 
not really. it may be easier to have B use the trait and C not. both extending A
 
@NikiC That's what I thought.
 
I will just leave this answer putting private methods in traits here... stackoverflow.com/a/35414075
 
2:28 PM
Okay. Time to figure out the inheritance scheme then
unuse would be nice lol
 
2:47 PM
@GlenSolsberry Consider composition instead of inheritance.
Composition is usually the better option.
 
i got a code to upgrade infront of me :X undefined constants were used to flag things. Nice. Now nothing works
"Just stick to php 5.6"
 
@user3655829 what does "flag things" mean?
 
@Trowski I remember this one I think, happens when multiple handles are used for the same fd
 
I don't think anything about undefined constants changed ... unless you are upgrading to PHP 8 already? :P
 
I've seen it multiple times when I had amp with libuv, been a long while now though
 
2:55 PM
@Ekin The only way that would happen is if PHP is giving me a different resource, but with the same underlying fd.
 
like \if (!defined('PHPUNIT'))
no i think this code was running on php 7.0 and is now running under 7.2 nothing very new
But its the first time i saw the break with this style. And i looked a bit over the very big source and its sprayed all over the place :(
 
@user3655829 Nothing about that code should have changed.
 
3:21 PM
is this thing on?
 
teeeest
 
Apparently usernames might be broken
 
I got timeouts when trying to post that ^
 
Nikic - I sent an email which possibly you might not have seen. I'm not waiting for a response, but if you wanted to I'm planning to post an email to internals around 6pm.
And as pings are broken right now, you might not get that either...
 
I've been having problems with timeouts on the stackoverflow chat for the past... im going to say few days
 
3:25 PM
Mark would you say around the same time you became somewhat of a regular here?
I am not saying it's your fault, but
Definitely your fault
 
Pfttt, charming.
 
Thank you!
 
You just jealous of my super saiyan swagger.
 
lol
That might be very true
 
But nah, I've been around a few weeks now and ive only really started experiencing timeouts and errors getting to the page the last few days or so
 
3:27 PM
So you are saying the longer you are here the worst it gets? :P
 
cmb
@user3655829, see 3v4l.org/ooLLe
 
@PeeHaa That's what my ex girlfriends told me.
 
:D
Funny though
Your mom used to say the exact same thing to me
 
I'm guessing Danack isn't going to be posting a 20 page ode to Joe's hat. Which is a shame, it's an epic hat.
 
Are pings working now @peehaa
looks like it....
 
3:35 PM
yep
 
@NikiC I sent an email which possibly you might not have seen. I'm not waiting for a response, but if you wanted to I'm planning to post an email to internals around 6pm.
 
@Derick I just stumbled upon your bananas :) github.com/xdebug/xdebug/blob/…
 
@NikiC @cmb btw, thank you both for your extreme patience dealing with a dozen or so bug-ridden PRs, you made me want to do more.
 
cmb
@Stephen, your PRs were actually quite good. Really. :)
 
3:44 PM
God I love amphp.
 
@SammyK First day as part of Cisco and already stealing code? ;-)
 
@Derick I might have to steal it later. Right now it's just flying past my debugger window. :D
 
4:06 PM
@Sean Awesome! I'm curious as to what you're doing with it?
@SammyK My brother-in-law works for Cisco in their virus and malware department.
 
@Trowski thats no way to talk about IOS
/me ducks
 
@Trowski btw, are you on a nix with uv?
 
@Ekin macOS, so sort of but no.
 
ah, alright. I managed to get a core dump trying to run phpunit on http server :-P could just be my uv
 
4:12 PM
@Trowski Oh nice! I work at Datadog though. :)
 
Any tips on this problem? / a good pattern that tackles this
Laravel btw
 
@PeterTheLobster That's like, an "almost" event sourcing?
 
@Jimbo I'm not too familiar with event sourcing.. I believe that's more related to transactions, no?
account balance, movements etc. no?
 
@PeterTheLobster Well you store the state of every model change and each time you want the current state you replay all of them on top of each other. Depends where you apply it. Orders with time-based stuff it's good
 
posted on September 19, 2019 by James Mallison

There are benefits in software development from code extremely obvious in its intention rather than unecessary abstraction and indirection. Short: Simple code extremely obvious in intention over unecessary abstraction and indirection.

 
4:15 PM
Ah fuck
forgot about that
@PeterTheLobster As for your problem: Maybe it's just an authorisation problem? You ask an 'auth service' "can this object do Y" and hide the logic in there?
 
Well yea the problem is doing it efficiently I think
Because for example I need to authorize each resource when displaying it in the resource index
So checking the history 25 times isn't great
But I can't really think of a better solution than flagging the model instance directly in the db
 
Imagine you're writing this bit of logic without anything else surrounding it. Would it be possible to write a single query to get that information?
 
Because right now I already have 3 similar datetime columns to determine if something occured for similar reasons - e.g. completed_at, invoiced_at, paid_at
 
(from the DB)
 
I'm not sure. Because it might be that in the future a feature gets added for revoking invoicing approvals and I'm not sure how I would query for that - the query would have to be something like - exits([approval_sql]) AND NOT exists([revoke_after_approval_event_timestamp])
And I feel like that would be a tough query to write
 
4:23 PM
@PeterTheLobster you almost certainly want to have those entries stored in a separate table, with an event type, and date columns. fyi you're also missing invoice_cancelled and invoice_written off events.
 
I've found my new most hated thing in the world - debugging swoole in production on kubernetes.
 
@PeterTheLobster If you're using a framework, don't you have an authorisation framework in there somewhere?
You need fine-grained stuff that's all
 
@Danack I mean I have them stored that way right now. The problem is determining efficiently if the event happened and has not been negated by another event since then.
 
yes.
 
4:25 PM
@Jimbo Well I do but I still need to write this check by myself.
I guess flagging the model when the event occurs and then removing the flag when the approval is revoked is the simplest option
I just don't like that I already have 3 columns that serve this purpose already so I though there might be a more abstract/generic way to store/query the information
 
Incorrect evaluation of ?? and ? containing expression – #78568
 
@JayIsTooCommon you do have a habit of messaging me immediately after I stop paying attention to chat :-P
I can prob do NW in oct
or we could just $beers++ in general
 
guys I'm making a Slogan for a sport-related product
which one is correct?
- Beyond the borders of Fandom
- Beyond the borders of Fanhood
 
4:45 PM
Isn't one UK one US?
I've definitely heard fandom more
 
Neither lol
 
:-)
@PeterTheLobster thx
 
true fans don't respect borders.
 
ah - good point
 
yolo
Does anyone have a handy script to detect a regex pattern?
 
4:51 PM
@samayo "detect" a regex pattern?
 
Yeah, if a string is (or contains) a regex pattern. Like: $str = "[a-zA-Z]+" @ircmaxell
 
try to use it, and catch an error
there's no such thing as a regex to match a regex, if thats what you mean
 
@samayo what classifies it as a regex?
 
ask if it has ever dated anyone called Reginald.
thank you, thank you. I'll be here all week. tip your waitresses.
 
@ircmaxell Good question. I guess the brackets in this case. [anything]
 
4:54 PM
\[[^\[]+\]
 
Thanks, you saved me an hour def!
 
... and then someone does $str= '\w+';
 
yup, but at the same time, you have to define your grammar if you want to parse it
 
@ircmaxell true. without context of what he wants to achieve its a bit vague, to be honest.
 
@Stephen precisely :)
 

« first day (3260 days earlier)      last day (1682 days later) »