« first day (3394 days earlier)      last day (1551 days later) » 
00:00 - 18:0018:00 - 22:00

12:02 AM
Switzerland? Really?
@JonathonPhilipChambers You can always pick a different accepted answer anytime
@Alesana You know Switzerland taxes non-citizens at a higher rate, right?
 
Yeah it seems like an expensive place to live, but I need a lot of healthcare and what I'm getting in the states is just not cutting it
 
@Alesana Even worse. Switzerland enforces double-taxation laws, which require you to pay taxes both to Switzerland AND the United States.
But if the healthcare system about the US says anything is that's definitely severely broken.
 
Switzerland will give you your taxes back if you pay taxes in the US though
 
hello peoples
 
They take double at first but will give you your taxes back, so I guess it would be hard at first. So I guess I'll just have to go with some savings
 
12:15 AM
k bye
 
If only pharmaceutical companies would stop charging insurance providers $10,000 for an asprin... :/
 
12:31 AM
Seriously though
I need this one medicine, it's over $500 for a months supply and my insurance hasn't been approving it. So I just haven't been taking it
After over a month of trying finally today my insurance approved it so I can get it for $60
 
@Alesana The prescription insurance in this country is insane.
 
Insurance in general in this country is insane
I didn't have insurance from my last job so I just didn't go to doctors lol
The state sponsored Obamacare would have costed me $10,000 a year before it started paying things, and then it still wouldn't pay that much
 
Forget Obamacare
that's a mess
Thankfully though, most tech companies here have excellent health insurance.
At Spotify, I had to have major surgery and literally paid $0 out of pocket.
 
Yeah, my last company was a sketchy agency but now they take care of me
That's insane. I need to work there haha
Does Spotify use a lot of PHP? I wouldn't expect them to
 
On the web-side they do.
 
12:39 AM
Do the mobile/native app communicate with a php server?
 
They do, but only for registration and account related stuff.
All the music stuff has a different path.
Except for the Alexa and Google Home platforms. They have their own thing.
oh and playstation/xbox
 
I haven't had an Xbox for a while but last I remember Spotify was trying hard to keep it off there
There was a third party app to play Spotify but they shut it down
 
Spotify actually aspires to get into every device it can possibly get into including all the IoT
It's one of their key business strategies
What sets them apart from iTunes and Google Play and amazon's music thing is they want their clients to be in your face. They don't want to be viewed as a service, but as a product.
Much like Netflix, Spotify only becomes successful at scale. Without a mess of users and a ton of activity listening to music, they just don't make sense.
 
 
3 hours later…
3:17 AM
That makes sense, it's convenient being able to play my Spotify playlists from anywhere
I had a Toyota with entune which used to have Pandora on it, but they took it off for some reason. I always thought it would make a lot more sense for them to put Spotify on there, I don't know why they didn't
 
3:48 AM
Car manufactures are notorious for making integration an overly convoluted process, but Spotify has spent a great deal of effort trying to integrate into car audio systems.
 
 
3 hours later…
6:59 AM
Good morning.
 
7:31 AM
morfriningday
Jan 24 at 15:18, by DaveRandom
Rebbeculous is WoTD today
 
7:53 AM
o/
 
8:10 AM
o/
 
8:28 AM
\o
 
cmb
p/
 
\q
 
9:07 AM
o/
 
d
seems I got a problem with my shoulder
 
c-c-c-c-c-combo breaker
we still haven't managed a full 1920x1080 screen height, sort it out boys (and girls)
 
about 20 lines are needed to fill my screen...
which is 4k (or 3840x2160)
about 27 lines are needed when I put the browser in fullscreen mode.
@DaveRandom maybe we should resize our chat windows to a smaller height :)
let's retry
o/
 
no, @SorinNunca killed the mood, it has to be spontaneous, those are the rules
:-P
also resizing is cheating
it has to work on 1080 for the benefit of random visitors
I'm not catering for @bwoebi with his insane 1:1 resolution on a 4k display though :-P
 
@DaveRandom tz
 
9:18 AM
GMT, you?
 
@DaveRandom hm?
 
tz means timezone in my book
I don't know any other definition of it
 
GMT+1
 
@DaveRandom it wasn't an abbreviation. Rather an interjection (which German people tend to use)
 
ah, til
 
9:20 AM
ah, like ß
well.. at least I'm in the same tz as Germany is
I'm also in the same union as the UK for the last day this decennium.
And the decennium just started...
I wish it could be 1980 again... on my Atari 2600 with Space Invaders..
 
9:38 AM
Got the chance to introduce someone to PHP. He's a beginner, started with Swift and is now tryna learn PHP. He started with a PHP book from 2004 for some reason, a PHP5 book.

Any ideas for a cool beginner friendly project where I could showcase modern PHP
I'm thinking I should steer clear of any framework, should we do a to-do app :) ?
 
9:52 AM
I always recommend "think of a thing you want your computer to do and try to make it do it"
failing that I always suggest building a file management utility for the local filesystem, it's relatively simple and touches a lot of things
 
@DaveRandom Many people have problems leaving the past behind. There is Stella, MAME, DosBox, Wine, and more.
 
it's generally the first thing I do with a new programming language for that reason (if I don't have a specific thing to do with it)
@Code4R7 I used to use dosbox quite a bit, until I realised that actually I only really wanted it for SCUMM games, and ScummVM is a thing :-P
 
I didn't know about ScummVM, it looks interesting. I'm not that much into adventures.. I did play a few, only to learn that I'm bad in guessing what the game creators thought would be a logical next step. I think game creators think differently.. like.. Mac-ish.
Arcade games are much more enjoyable to me :)
 
10:13 AM
@DaveRandom thanks a lot
 
The first game that gave me some RSI was X-Wing
 
I'm trying to figure out how in Laravel (illuminate) the sessions work. Specifically, if any of the 'normal' php session code is used? I've been browsing through the code a bit and didn't find any references yet, but that isn't any proof of course. Is there anyone familiar with that code that can shine some light for me?
 
You mean Laravel doesn't Illuminate? :)
 
Larano it laradoesn't
 
@Nanne laravel uses symfony's http kernel
 
10:16 AM
larvel uses everything from Symfony
 
Don't use a framework, build your own if you need one.
Then you know what you're doing, and you don't need to explore somebody else's mind.
 
@PeeHaa I see, should've figured that one out. but do you know if symfony uses any of the php code? I mean I so see some things that look alike (the SessionInterface for instance), but i'm trying to find out if deep under the hood there is still some connection?
 
> if symfony uses any of the php code
wat
 
And don't implement SessionHandlerInterface, just write your own session code.
 
@Code4R7 eeuhm, thanks I guess? For some projects its a good thing, for others it isn't, but htat's not a usefull discussion, i'm just trying to figure out how other projects are working with sessions. And I AM writing my own session code, just trying to look into how other projects did it. That's why the question.....
@PeeHaa sorry, i meant if symfony uses any of the 'default' php session code. Like the global, the serializer, I don't know
 
10:22 AM
@Nanne They have different implementations
 
@Nanne Ah okay, you're looking for how others do it. Then look at Symfony for example. Don't take any inspiration from Laravel, you'll only go down the path of bad practices
 
Ow wait, they are using it for one specific sessioninterface
@PeeHaa yeah, that's the one I was looking for, shouldve found that one myself, sorry. Now I can start comparing the implementations :)
thanks!
 
np
 
@Nanne I know, my answer isn't particularly helpful if somebody requires you to look into code built on another framework.
 
@Jimbo well laravel led me to symphony, so it did help some :)
 
10:25 AM
fwiw @Nanne sessions take some up front thinking about what you want to do
For the most simple use cases session_* works "fine"
But sometimes you need more / better ways to handle sessions
 
yeah, I know @PeeHaa :) the problem is i'm looking at a big project that didn't do much up-front thinking, so i'm trying to slowly start towards a more scalable solution, starting out with peeking at what the rest does.
step one is probably going to be being less reliant on the sessions, but at the end we need to fix some concurency issues
 
@Nanne That will indeed be the limit, I assure you :)
 
session locks?
Or just general performance?
 
> memory_limit set to 1400M
Yes it does :P
 
10:29 AM
well, its not very original of a problem: some of the requests are statefull where they shouldn't so either you're waiting on locks or you leave the door open for concurrency issues. We do the second now with reasonable success, but when we start doing more and more concurrent request, it's going to be a problem ....
 
Ah ye good ol session abuse :-)
 
yeah... so the actual fixes have quite a clear path. Less early session start stuff, etc etc
but if you're at it, i thought, lets see if we need / can do more :)
 
10:41 AM
@Sherif about the starred image about FFI: why is it bad?
I'm still looking forward to use FFI some day...
 
 
2 hours later…
1:05 PM
This will drastically compress all italian language chats emojipedia.org/pinched-fingers /cc @Ocramius
 
1:15 PM
 
@NikiC is there a specific reason why ;zend_extension=opcache is not added to our ini's by default or can I just add the line in our two ini's?
 
Morning
 
o/
 
@DaveRandom The difficulty I have had with just bike tires, tubes, lining up the stem with the rim, etc. dissuades me from ever wanting to try a vehicle tire without the equipment they use.
 
If I can make my own MVC framework am I good enough for a junior position?
 
1:27 PM
Sure
being able to smash rocks together would also do that
It's junior for a reason :)
 
I know that being able to make your own MVC isn't a qualification but its the best I can say that shows my level of knowledge
Am I good enough for a midweight position?
 
mid level is mostly where people starting to understand that MVC is a myth
 
It says very little you can make an MVC framework. It's how good it is that says something to be honest. That's what I would look at. But you asking this question like this would sorta keep me back from thinking you more then junior
I mean, if it works it says something, but it could be a hacked together random set of madness, or it could be the best code ever, we don't know :)
 
I'm applying for my first ever job hence why I'm asking.
Is linking it here an option to get a review? It's fairly small.
 
@AshKetchum The best way to talk code is to share said code
@AshKetchum yes.
Note though some people in here are brutally honest
 
1:31 PM
I prefer brutal honesty over lying to save somebody's feelings.
 
It also matters why you did it. If you did it as a learning exercise, all good. If you did it because all the existing frameworks suck in your opinion, that's a red flag
 
First thing I notice is everything is static crap
 
I did it so I would understand PHP more.
Laravel is pretty good, it has its ups and downs as do all frameworks, I wasn't trying to replace any.
 
No it is not
 
@PeeHaa can you elaborate?
on the static crap
 
1:33 PM
Everything I have opened so far is static and has state
Meaning everything is global mutable state
 
brb going to clone it real quick so I can follow along
Can you explain why global mutable state is bad?
 
I mean RouteProvider is static other than that...
 
@AshKetchum There is a reason why you don't find global $foo in any sane code base. On top of that you have tight coupling \o/
 
Haven't checked it all yet.
there is also DependencyProvider
What is tightly coupled?
 
1:42 PM
Yes with another static method
@AshKetchum tightly coupled is where you are using some dependency (say another class) in a class without any way to swap it out
Consider the following:
class A {
    public function foo()
    {
        $b = new B():

        // do something with $b
    }
}
vs
class A {
    private $b;

    public function __construct(B $b)
    {
        $this->b = $b;
    }

    public function foo()
    {
        // do something with $b->
    }
}
 
To have the zend engine yell about memory leaks while writing an extension do I just need to use a debug build of PHP?
 
In the first example it is tightly coupled
 
ah so dependency injection
 
Yes
 
I can't for the life of me see where I've created a new instance inside a method, could you point me to it?
 
1:46 PM
@PeeHaa non-issue. I will never change B anyway and if I have to change B I can just do a global search & replace in my IDE :trollface:
 
@Gordon madlad
 
@AshKetchum No need for a new keyword. calling a static method has the exact same effect
 
In case you say for instance, rename that static class?
 
Being able to call the static method which holds state is the worst
 
and then have to change it in lots of places?
 
1:47 PM
As it is just another global
 
@Girgias I blame Nikita for making phpstorm so damn effective at all the things :D
 
anything else I need to work on?
 
@AshKetchum maintenance, testability, less wtfabilty/m
 
So what would be a better way to use my provider classes, new them up initially and then constructor inject them to where I need them?
 
Yes
@AshKetchum That basecontroller is uselss
 
1:48 PM
right now it is
 
The fact that there is something called basecontroller is already a pointer something went wrong
You echo data straight from your controller instead of returning a response
 
I wanted to inject my template engine instance but didn't want to do that in every controller
so I thought inject into base controller
then I'll be able to just use it like it was there
 
Don't do that
You don't always need your template engine
 
inject it into every controller?
hmm
that's true
so inject it if I need it
into the specific controller
 
yes
either manually or using a di injector / auto-wiring thing
 
1:50 PM
The actual question is why use framework when you have composer. I mean not Laravel.
 
@Ghostff Depends on your definition of framework I guess
 
laravel.
LARAVEL
 
lol
 
lolavel!
 
Not sure whether pile of poop === framework
:P
It is, but just not a good one
But to come back to your composer thing
Once you have a list of packages to create a certain application you basically have a framework
Also @AshKetchum: tests
And finally since you called the thing MVC. Please explain what part is MVC?
 
1:55 PM
I mean, it has Controllers
It will soon have views and models, I didn't really finish it.
 
It's probably a good idea to think about other things than trying to dump stuff in specific directories and calling it mvc
Note that even laravel doesn't say they do mvc
 
@Gordon that's an interesting take to say the least :')
 
@Gordon that's all of what's needed to actually talk Italian
 
I made a framework for a sweedish cow hearder... It used Yodel Moo Uddertroller.
... that seemed funnier in my head
 
Not strictly a PHP question but what's a good prefix to use for presentational ui components that display certain types of data - e.g. boolean, state, text, number, money etc... I was thinking something like ValueIndicator or ValueDisplay... not sure
I can never get naming right
 
2:02 PM
@MarkR lol
 
2:14 PM
When the CSRF token is invalid in an XHR, how should the app respond to the user?
Should the user get a message only, like 'CSRF token invalid, please retry or login again'
(in a more human form)
or would you offer a 'retry' button with the correct token to retry the XHR ?
 
2:36 PM
03?
A mismatch exception?
 
If they've got a CSRF error, tell them something has happened and leave it to them to find out. Giving them a button to click which executes with the correct CSRF effectively requires the user to do one obvious click to allow the vuln.
 
@MarkR thanks for confirming my assumption
 
and users are dumb and will always click the button
 
I fear you're quite right
 
2:55 PM
Any idea why i cant catch "Catchable fatal error: Object of class __PHP_Incomplete_Class could not be converted to string" with \Throwable ?
 
Are you echoing something you've unserialized?
 
@user3655829 That seems gross regardless :P
 
I am in the debugging phase :( I want to know whats serialized and why but therefore i have to lookup whats inside $args which is passed into array_values
@PeeHaa just for debugging purpose
 
:-)
 
hmm i just spammed myself with debug emails i got it. But still a "catchable fatal error" should be catched :D
or could be catched
 
3:01 PM
aye
 
3:13 PM
also is it intended that is_object on an __PHP_Incomplete_Class is false?
 
I would say yes
btw are you not just looking for php.net/manual/en/… @user3655829?
 
my router is held with a bungee chord to the grate on a window ... I fucking really hate using 4g, it sucks so much ass ...
it just dropped to 6mpbs from 20 today for no reason, didn't move it in months ...
</rant>
 
if the router isn't partially broken or overheated, you want to scan the environment for external routers... in my neighbourhood there are 100+ WiFi networks but my router works fine (NightHawk)
for a remote location I use a 12db antenna, which would work over a distance of 25 miles according to the manufacturer.
 
3:38 PM
@JoeWatkins given your employer, can you actually still say things like "it sucks much ass" without conjuring vivid images?
 
@JoeWatkins sounds like you need some starlink by the end of the year :-P
 
4:04 PM
I'm planning to go over interview questions with my counselor next week, he asked if there are any questions I would like to practice. I have one or two I'd like to go over but anyone have any suggestions? tech/non-tech
 
4:44 PM
Hmmm
 
@Tiffany I know a question to ask them instead :p
 
I'm going to re-ask, because the SO answers talk like everyone in society understands technical terminology, they don't.
Why are global variables and static classes bad practice? Are they for the same reason?
 
4:59 PM
@PeeHaa I dont want to serialize things. I just wanted to understand how and what object got into the session and where its used. But i deleted my session and crossed the fingers for the weekend
 
5:17 PM
@user3655829 Can't you just inspect the serialized data for that?
@AshKetchum a public static method which handles state is for all intents and purposes the same as a global variable
 
Thats what i tried but i couldnt catch it because its actually not a catchable fatal error
 
@user3655829 huh?
I said inspect the serialized data
As in the string
Not trying to unserialize it
 
The problem was that this is a line thats calles 500times
and i needed the occurrence of that fatal error
to get the stacktrace
 
Isn't it serialized stuff in the session?
I don't understand what you are trying to tell me :D
Either way: drink time \o/
 
So I can think of a public static method as a global function
 
5:21 PM
Think of it as global state
Because that is what it is
 
I was aware that i got a incomplete object in the session. But i did not know why its consumed or how its got to this point.
 
Can you explain why global state ( in reference to my repository ) is bad?
 
@user3655829 But how would you ever get a stacktrace when unserializing
That stracktrace is long gone
 
I understand it doesn't have its own state each object instance of that class but why is that a bad thing if its treated correctly.
 
5:22 PM
@AshKetchum Maybe read my answer again?
 
i did not unserialize anything. it was just a array_values call on an array. No idea i wanted to catch the fatal error and call ->getStacktraceasString
 
So you want the trace of the thing that "outputs" it nor what inputs it in the first place?
@AshKetchum Do you understand why using the global keyword is a bad idea?
 
I wonder how i get a incomplete_class in 3v4l?
brb
 
I can see why it can sometimes be a bad idea, by sometimes I mean because it has a global state and that state could be changed by any object.
 
> because it has a global state and that state could be changed by any object
boom
It makes for very brittle systems that are hard to test
 
5:27 PM
The harder to test argument is more important. Because most singletons are now DI globals :)
 
You mean singletons registered to a DI container are static classes under the hood? I don't get you.
@PeeHaa I guess a junior wouldn't understand that unless they've been put in situations like that IE in a job.
It's still good to keep an open mind that global can sometimes be good, but rare?
I guess one could say globals are redundant when we have DI
 
If you want to show a junior why singleton and globals are bad show them a small method which calls ::getInstance on some class and load some global. Then challenge them to write a unit test.
 
why is getInstance not __getInstance ?
 
or whatever you call the singleton getter
 
5:50 PM
No i tried enough to say that its not possible for userspace php devs. Is there any way to create a __PHP_Incomplete_Class without using sessions? new __PHP_Incomplete_Class(); does work but that alone works pretty good and is not the same as if its got loaded via $_SESSION
3v4l.org/KtJDB is "somewhat" the same. What is an "Recoverable fatal error". How do you recover from that fatal error? Atleast it doesnt say catchable but there is an error with that word and its not catchable
but i guess its fixed now in 7.4 :D just years to wait
 
00:00 - 18:0018:00 - 22:00

« first day (3394 days earlier)      last day (1551 days later) »