« first day (3339 days earlier)      last day (1592 days later) » 

1:50 AM
Feels like we're lacking test coverages on some areas ...
 
 
3 hours later…
4:35 AM
@LeviMorrison very unsound, in the extreme
doing the transport in the background is probably smart, but you should not mix threads and php ... unless ... well, you're me ... there's no gain to be had here by adding threads, there is no way to make serialization of another threads data safe
 
 
2 hours later…
7:02 AM
When Reflection triggers class load, property visibility is incorrect – #78921
 
7:24 AM
hey
not any body in here?
 
8:00 AM
vexillology the study of flags
 
 
2 hours later…
9:31 AM
Guys, is 170,000$ known a really much amount of money there? We can simply make a good company (office + hiring over 20 member) with that money in Iran..
Now I'm trying to understand, is that money like what 1 guy can have?
in other word, how much is the amount of a house?
 
how to configure gnupg – #78922
 
Why would PHP change these strings after persisting to a database?
&_nc_cat=100&oh=2709db2b099e5eb5bb6eb19654de828a&oe=5E7FF7C5
&_nc_cat=100&oh=2cda55a0255b0ef3afabe535412a43f8&oe=5E7FF7C5
you can see the second one is broke.
 
9:58 AM
@AshKetchum Because you told it to (where you told it to is a question which is impossible to answer without seeing code which reproduces the issue)
 
Wes
10:19 AM
it's not broke, it's entities encoded
 
@Shafizadeh it depends widely if you are in a rural or urban area and then which country. in europe you probably earn between 20.000$ (portugal, greece, idk about eastern europe) to 150.000$ and more for being an expert. houses in germany are between 200.000$ in rural areas to 1 mio in the pricy urban areas. with $170.000 yearly revenue i can sustain a software company of 1,5-2,5 employees in germany.
 
10:47 AM
@beberlei I see .. thx for your explanations. I guess it would be a good idea to look for an investor (which works using Dollar currency) for making a company which needs money in Rial currency.
 
10:57 AM
o/
Last night, I was helping someone scrape data from a page. He was trying to extract a JS object (JSON). In the JSON, there was HTML codes and something was wrong with them. I mean, I couldn't pass the data to json_decode. I got NULL.
For example:
{
	"html": "<script type=\"text/javascript\">...</\script>"
}
Notice the backslash in the ending tag.
If I remove it, json_decode works fine.
What could be the reason behind using </\script>?
 
Artifacts when convoluting image with transparency – #78923
 
11:44 AM
@akinuri what version of PHP?
at my former job, I ran a CSP on the website, and had it output violations to a script that would turn it into JSON... but my output would end up with leaning toothpick syndrome, it was related to the version of PHP I was on
@Shafizadeh where I live, which is a rural area, 170k is a lot, like more than the CEO made of my last job
 
Wes
i am writing an RFC. scared, eh?
 
one of your RFCs was like three lines...
several people thought it was a joke
 
Wes
lol
yeah
 
my second monitor bit the dust and Amazon has deals for monitors... I'm trying to decide what to get
 
Wes
the cheapest you can find. they become trash anyway after a couple of years
 
11:56 AM
yeah, I spent 10 USD on my last one, lol
teresko said to get one that turns vertically, made me think I could get a curved monitor maybe, and turn my primary monitor into my secondary, and turn that vertical
there was a nice Samsung monitor yesterday discounted to 120 USD, but I missed out, I spent too much time debating on it
 
Morning
 
12:24 PM
Any typescript/query-string users? I was query string with typescript to parse url params on the browser and it was working just fine before adding typescript.

After moving to typescript the following string: `?as=askdj&accountSetupWizard=1&c=231` gets parsed as: `Object { "?as": "askdj", accountSetupWizard: "1", c: "231" }`, notice the "?" mark and the quotes on the first object.

What could be wrong around here?
 
Wes
12:35 PM
@NikiC how bad would it be if we changed $array1 === $array2 to be inclusive also of the next auto increment value?
 
@Wes disastrous...?
 
Wes
$a = [0, 1];
unset($a[1]);
$b = [0];

$a === $b; is false
@NikiC it's not that common using arrays as list and maps at the same time
the risky code is just code using unset() rather than array_pop imho
 
12:57 PM
chm documentation format not updated since 23 Aug 2019 – #78924
 
1:27 PM
@Tiffany 7.2.5. I've investigated a little more. Learned that \s is not a valid escape sequence in JSON. So json_decode can't parse </\script>, but when this string is used as HTML (element.innerHTML = "...</\script>"), it works fine.
So I'm thinking maybe it's intentionally put there (to prevent data scraping?)
 
cmb
JS is more liberal than JSON, and interprets "\s" as "s"
 
So JSON doesn't understand sarcasm?
So sad :(
 
@Girgias /s
 
Ah indeed
@NikiC removing the lines you pointed out in mbfilter.c still doesn't result in any test failures
Will try to investigate a bit more
Okay wait no I shouldn't remove those lines u.u gosh I'm tired
 
cmb
1:56 PM
If you removed them, my comment would apply (had that same thought as well). :)
 
Yeah I think I just need to return 0
And I still don't get any test failures
I don't get this code flow
 
cmb
There simply may not be any tests checking an empty needle.
 
That doesn't seem true, because when I did the conversion from warning to ValueError I got a bunch of Empty Delimiter exceptions that I needed to catch
Oh wait, there aren't indeed ...
Well time to write some tests
 
Wes
2:17 PM
how do i say blacklist without being offensive these days?
exclusion list. sounds good?
 
yeah
 
Wes
2:37 PM
yeah sounds reasonable ty
 
3:23 PM
@NikiC Just to confirm it doesn't make sense for (mb_)substr_count to take an empty needle right?
And I think I've also missed strrchr and strichr (and thus now their mb counterpart) the first time round
 
@Shafizadeh just be aware that with the iran sanctions its probably hard/impossible to find investors from europe and specifically the US.
 
Smallest flat where I live in London (24 m²) is something like £400 000 GBP
It's... bonkers
 
@Derick what magic is the commit with xdebug coverage speed improvements? hard to see what causes this
 
Wait for the article :-D
 
ack :D
 
3:32 PM
It's no magic, but instead of looping over all the classes and functions after each file has been compiled, and then check with a hash whether I've analysed them, Xdebug is now only doing that for any new classes or functions.
with 1000 class (and 1000 files), you'd end up looping only 1000 times, instead of 1000!
 
but that is already part of another commit? because it feels github.com/xdebug/xdebug/commit/… is not the whole picture
 
not 1000!, but ½*1000*1000
that is the whole picture
 
yeah i now see it
 
line 592 remembers the last indexed entry, and line 586 to 589 now loop from the back, and stop at the last seen index
 
thats really cleverly simple
 
3:34 PM
yes, the cleverness is really @NikiC's ;-)
O(n²) to O(n) really
 
user8207054
Is it possible to access strings that were generated in a foreach loop?
 
user8207054
So if the current String is 'test123' and the one before was 'test2455' I need to compare them.
 
What are you actually trying to do?
 
Should we avoid still avoid Laravel in 2020
 
If anything it's getting worse
 
3:46 PM
How so?
 
lol @PeeHaa really?
 
laravel isn
 
They are confusing traits with composition everywhere
 
laravel isn't bad, i wouldn't use it myself, but i do recommend it to people that are not yet very experienced
 
It is bad though
You ever seen a decently size application written with it?
 
3:48 PM
i have
the thing is, "decently sized" applications are not its use-case
 
I have too and it's slow as hell and near impossible to test in a sane way
 
small ones are?
 
I guess prototyping
 
i have news for you, almost nobody is really testing their code still in 2019 ;)
 
user8207054
@PeeHaa I try to add the "level" that is needed for the experience based on the title of the event. So if $event->title is Test - Stufe 1 and the next is the same it should add a div to it. This should happen with Stufe 2 and so on...
 
3:50 PM
@beberlei Depends what circles you are in
 
@beberlei I mean that's not really surprising is it though?
 
@YoKoGFX You need to remember the 'last' key yourself
 
If you are in a circle with laravel developers with a lot of visual debt I guess not :P
 
@PeeHaa just saying, a random person coming in here to ask what framework to use is probably best served by laravel, since that means they a.) don't have experience with frameworks b.) don't have someone else making the decision for them
 
Reason the more to not point to laravel
It used to be my job to clean up exactly those projects
 
3:51 PM
if you had pointed me to symfony in the first 5 years of my career i would have probably strangulated you in return :P
 
a.k.a. crisis management
@beberlei :-)
 
I go into freelancing boards. All I see is jobs for laravel, and cake. Or jobs looking for people to update their old queries to be able to update to a newer PHP version.
 
don't forget wordpress
 
while it is sad, junior developers usually don't learn something because you say "you have seen it before, thats why we do it $x instead of $y", they need to make the mistakes themselves
 
lots of workpress
 
3:53 PM
Yes mostly wordpress.
 
@beberlei It's a mentality problem
I don;t know I guess I just was lucky to have a good dev lead above me
 
most web agencies don't care about maintainable/fixable code though - because when their client "promotion" is done, they chuck it out. Their clients also are unlikely wanting to pay for upgrades. For this kind of stuff, Laravel is probably fine?
 
Yeah, but eventually you actually do have to make changes
And suddenly it costs way more that the initial project
The wordpress model
 
When I see jobs posted as PHP expert. Then you see Laravel as required. I think to myself you guys should talk to guys in room 11.
 
Unless they invested in a proper base
even be it laravel shivers
 
3:58 PM
@SalOrozco I don't think room 11 is a very good representation of the general class of php devs
 
Besides the... weird decisions in the codebase of laravel the community is the worst out there
 
most of us work on PHP I think?
 
They take anything stupid totwell says (no matter how wrong) and take it is the truth
Sanity be damned
@Derick I would say it's 50/50ish
me for example is just a docs monkey
 
you contribute...
 
@Derick I have become a better dev because of some of the guys here. Always advise me to stay away from most frameworks. Pointed me to good learning material.
 
4:02 PM
@Derick True
 
fair enough - I think frameworks have a place, but I also think it's good to know how to do things properly without a framework.
Mostly to learn what not to do :-)
But, that experience takes years…
 
I work with laravel on a daily basis, but we don't talk about it ...
 
lol
 
@JoeWatkins I'm sorry ;-)
 
@JoeWatkins You want us to talk about it more? :P
 
4:04 PM
Tell us about it.
 
:D
 
yes Joe, tell us what you really think :D
 
Great now we summoned @Trowski...
 
I'm trying to say don't let a laravel requirement put you off ... I have a lot of fun, there are lots of opportunities to teach, and you can write good software with laravel, you can write it with anything ...
 
@JoeWatkins How hard was it for your team to unlearn all that crap?
 
4:07 PM
you don't have to buy into every idiom it's sellin ... it's a set of components that are well tested, and that work ... and you can treat it at such ...
 
I have learned a lot from you guys. I still feel like a noob. I know it takes years. Is there any way to get better faster?
 
well they didn't, they still "speak laravel", but that's cool, whatever gets the job done ...
they just know what not to do, but they can continue to speak in laravel and feel comfortable, and use all the same learning materials and resources, and it's a lively ecosystem ... it's healthy ...
what I consider technically perfect and what I consider fit for production are very wide apart, as they should be ... aiming for technical perfection isn't a reasonable thing to do for a business ... perfectly reasonable to aim for technical perfection if you are the author of a component the business relies on ... so I'll approve things that aren't technically perfect, but I'll take the opportunity to teach them what is technically perfect, and on the next refactoring day
they got something to do ...
I won't speak about laravel or any of this for another few months now, let's go back to pretending, please ...
 
the problem with open source imho, a very long time they can easily be technical perfect, but when they get traction they suddenly become much more like a business
and you need to change it up a little otherwise feature velocity goes to 0
 
well it's obvious why, when traction is achieved, they fail to maintain perfection ... it's because of the demand on their time, and likely a lack of resources ... you're right, they're functioning like a business, but not being paid ... I'd wager in a lot of cases if someone funded the thing, they'd at least be closer to maintaining perfection ...
 
4:38 PM
@JoeWatkins Yeah, I'll have to serialize in the same thread, then transfer in the background.
 
5:31 PM
Has anyone here tried FFI, yet? I'm getting class 'FFI' not found when I try it.
 
@kelunik Did you enable the extension?
 
@NikiC Oops, nope, thanks!
 
user8207054
6:30 PM
Does someone know how to grab the previous key inside the same array inside a foreach function? From what I can see "prev" is deprecated since PHP 7 so it doesnt work. (I also tested it, it doesnt work.)
 
Do you have a code example?
 
user8207054
@samayo yes, one momement
 
user8207054
@samayo gist.github.com/YoKoGFX/935df1c1de27c22647c7b17b8ef630e9 please note that this is just a pain to read :D But I think that what could also work is to grab the last key by its index number. The compare happens at if ($event->title != prev($title_dump))
 
Why do you need to use prev() as opposed to using the key?
Is there something I am missing?
 
user8207054
What I am trying to do is compare different event names and if they match add the "category" But there are several with the same name. So there would be "Test - Stufe 1" several times and then there would be "Test - Stufe 2" and so on... But beteen them I need to add the "Stufe X" and a spacing.
 
6:49 PM
I don't know much about your code, but prev isn't deprecated in php 7 3v4l.org/fR9PT
Or I might be wrong. I haven't used PHP in a long time
 
user8207054
Yes, but it is in foreach and this is the issue.
 
I don't know, it seems to me like you are doing the harder way.
 
@Tiffany I see
@beberlei You are right
 
7:16 PM
Any recommendations on a nice and safe library for image uploading?
 
@samayo yea, I was checking that out. Is it production-ready?
 
or intervention php
Yes, double pinger :)
 
Thanks! :D
 
 
2 hours later…
8:55 PM
@samayo bulletproof seems to want to create a bulletproof dir, is there a way I can change that behavior?
$image ->setLocation(__DIR__ . "../../public/static/img/"); seems to have no effect
 
9:28 PM
Check your permission
@2dsharp let me know if it works
 
10:22 PM
Can't preload class ... with unresolved initializer for property ... – #78925
 
 
1 hour later…
11:40 PM
@JoeWatkins why y u no @ xmas party? :D
 
@DejanMarjanovic you do still exist :-P
 

« first day (3339 days earlier)      last day (1592 days later) »