« first day (2623 days earlier)      last day (2325 days later) » 
01:00 - 18:0018:00 - 00:00

1:48 AM
@Wes I want something form of ADTs in PHP, like in Erlang, Haskell, Swift, Rust, and so on. the data constructors without parameters would be better without brackets
 
Wes
@Andrea
use function My\NS\Numbers\Decimal\d;
use function My\NS\ValueObjects\money;
use function My\NS\ValueObjects\emailAddress;
use function My\NS\Unicode\u;

d"1234.567"
money"199.99"
emailAddress"abc@abc.example.org"
u"unicode string";
 
@Wes oh dear
 
Wes
didn't you mean that? :P
i would like to save some parentheses
 
nah
 
Wes
right now i have d("") and u("") respectively for bigdecimal and unicode strings, and they are pretty annoying
several pairs of nested parentheses are really a mess to look at and read
what was your idea?
EmailAddress "foo@bar.org" it's pretty much like email"foo@bar.org"
isn't that what erlang does? :B
 
Wes
2:10 AM
!!comic
 
Usage: !!comic <mood> <quote text> Supported moods: neutral, angry, sad, grumpy, hangme, reply, thelook, wat
 
Wes
it's just better this way hahaha
 
5 messages moved to Trash
 
Question, top level googling didn't yield good results for me. If user uploads image with virus, and I convert jpeg to jpeg (downsize, etc), it gets rid of the virus, right?
linux environment
and... does that rule apply to PDF's?
 
Wes
2:25 AM
it depends on the interpreter. if the program you use to read pdf server sided is vulnerable, then the server is in danger
 
 
1 hour later…
Wes
3:40 AM
its snowing again. got beer provisions this time
 
3:53 AM
morning
 
4:03 AM
Wes Hodor
Wes how do you make that phpstorm gif ir video thing ?
 
4:24 AM
morning
 
4:37 AM
o/
 
morning
\o
 
4:53 AM
posted on December 20, 2017

New Cyanide and Happiness Comic

 
 
1 hour later…
Wes
5:59 AM
@Linus licecap?
 
@Wes yeah thanks.
 
Morning ppl
 
6:14 AM
mornin o/
 
Wes
\o
 
Apple admits to slowing down older iPhones, I guess their reasoning makes a little bit of sense though
 
Wes
it doesn't explain why they don't allow people to replace batteries
 
Which is becoming more common for phones that run Android, too
 
6:43 AM
@Wes Obviously because it's better if you buy a new device than a new battery.
 
Wes
ofc
and because "producing old batteries is expensive". so let's deny everyone to produce them
 
i got my first smartphone 10 months ago.
 
Wes
i mean aftermarket batteries
it's old already linus. welcome to this shit world :P
 
google.co.in/… i used this for 3 years :D
it's so much tough that crack anyone's head :P
 
Wes
can't watch pron on that one. otherwise same features :B
 
6:49 AM
:B
 
In the future our phones will physically upgrade while in our hands :P
 
@Wes Solution: Use the same battery format for all devices.
 
@kelunik Probably not for a long time... I was really surprised when they did that with the chargers
 
Wes
you don't have to convince me
 
@Alesana Because they had to.
 
I always see cv-pls and think that it is asking for a resume :P
 
7:14 AM
Hi guys
Actually i am planning for canada so just wanted to know how is the oppurtunity in canada for developers
 
@NikiC Yes, might happen, because here Loop::unreference() is triggered by a __destruct (not called directly within), which throws an InvalidWatcherError for whatever reason. I think it's somehow not garbage collected before as it should.
 
Anonymous
!!wotd
 
brumal wintry.
 
7:38 AM
There is a trend where after every new iPhone that comes out, there is a huge spike in the amount of searches for "iphone slow" for the previous version of the iPhone, which provides a secondary explanation as to why Apple is slowing down the older iPhones
 
g'day o/
 
7:54 AM
\o
 
o/ g'mornin
 
Wes
buondì \o
 
8:35 AM
guys, does someone know: does distance any effect on the earthquake feels stronger?
 
I didn't understand the question
I don't think I will know the answer anyways, but I still didn't understand it :P
 
Wes
@Shafizadeh it depends on the density of the ground. but chances are, the farthest it is, the weaker the earthquake feels.
friction in the earth crust dissipates the intensity from the epicenter
even in a almost friction-free medium like water the waves eventually dissipate away
 
Also, after a quick wiki read there are different types of earthquakes, all seismic activity is defined to be an earthquake i guess. Could be a bomb going off, or even tectonic plates rubbing against each other.
 
Ah I see, thx
 
mornin
 
8:44 AM
hello
if an issue was created oct.12 and it's still "open" and untouched, would you guys consider it accepted and will be fixed, or has someone just forgotten about it?
 
o/
 
o/
 
9:08 AM
@Daniel means you need to spam someone till it gets fixed
 
mornin
 
o/
 
o/
 
\o
 
9:31 AM
... someone in tr named their newborn 'bitcoin'
what is wrong with people
 
Yeah that's pretty messed up for the baby, should have named it Ethereum :P
 
:P
s/tr/crimea/ it seems... not that it matters at all
 
> Created in 2009 ... It has soared more than ... skeptics say it is a classic speculative bubble
 
Anonymous
> Crimea — an officially Ukrainian territory — has been illegally occupied by Russia since 2014
 
Even an article about naming a baby Bitcoin has to go into the drama
 
Anonymous
9:40 AM
ffs: I hate when the west and western media try to portray Russia this way.
 
Anonymous
Russia is like that fat kid in school who gets bullied by everyone
 
'western media'
it belongs to a group of pro-erdogan network I believe
 
Anonymous
Yeah, sadly they are just repeating what others say about Russia.
 
Wes
@Ekin i haven't bought bitcoin yet. how much money did i not-earn this week? :B
 
@Wes You actually saved a little bit of money!
 
Wes
9:51 AM
yee good news :B
 
yeah bch owners made more I believe
 
I have my Google Home Mini so I always just say "Hey Google, BTC TO USD" and it tells me the rate
 
I made some monies from zec and xrp
/meeting
 
10:08 AM
morning homies and fomies ...
 
How did you know I was foamy?
 
it's a gift, I can tell ... just by looking ...
 
Everyone knows you are foamy.
 
moin
 
o/
 
Anonymous
10:20 AM
\o
 
o/
 
@Leigh it's your 15 minutes of foam
 
mORNMGIN
 
\o
 
o/
 
10:28 AM
\o
 
@Leigh are your farts like bubbles?
 
Does anyone have an opinion about how warnings/notices should be reported in a parser that is written in PHP?
trigger_error() feels like a not-great solution
should I just have the parser accept a logger of some kind as an optional argument?
 
@Naruto depends how much soap I've eaten
 
^^
seems I've misinterpreted foam :P
 
11:06 AM
@DaveRandom yes
damn github
who the fuck thought it was a good idea to waste 5cm of screen space for every project that gets starred
It's my own projects dammit, I don't need to see a full description of them every time
 
@NikiC tnx
@NikiC div.watch_started div.p-3.my-2 { display: none }
 
@DaveRandom I sent a mail to support
 
Wes
someone remembers the tdd book? how do they call the given then when "tables"? i thought they called them "decision tables" but that's another thing (although related)
 
I can't believe this is an intentional change
They must have wanted to only show this if people star other peoples repos, or something
 
11:27 AM
tbh I never look at the feed, it may have always been like that
if I don't get a notification I don't see it
 
11:39 AM
@DaveRandom Is this your SOAP guy?
 
@jjok yes, warning about stuff like unknown transports
btw @jjok do you know if anyone is really using WSDL 2.0 in the wild?
I have never seen one
also, purely from a practicality PoV in terms of getting something that works in the 99% case, does anyone actually use anything other than <sequence> for the member elements of a complex type in WSDL for SOAP bindings?
 
@DaveRandom Don't know. Not that I know of.
 
the more I read these specs, the more I wonder what the hell these people were smoking. It is the most abstracted spec I have ever read, it's completely non-committal about pretty much every aspect of how a concrete implementation will look
I'm basically just implementing SOAP 1.1/1,2 over HTTP based on WSDL 1.1, in doc/lit representation, because I have never seen anyone actually use anything else
 
I have to admit I haven't read them.
 
pro-tip: don't
3
 
11:49 AM
That seems reasonable. It's mainly for your benefit anyway, isn't it?
 
I'm looking for a software pattern that I don't know the name of:
On a class I have a static method that should return different values depending on the class of the caller, i.e.:
```
Class Foo
{
static public f($caller) {
if (get_class($caller) == 'Bar') {
return 'Called by Bar'
}
if (get_class($caller) == 'Cee') {
return 'Called by Cee';
}
}
}
```
This feels like something that's been done a million times before, so I was wondering if there was a specific pattern for it
edit: Huh, no markdown
 
@jjok well yes, but this is by a long way not the first time I've wished something like this existed, so I am anticipating it being useful to other people
unlike most of my OSS projects :-P
it's only on the back of a bunch of work I have recently done in C# that I have a clear idea of what I actually want in PHP
 
@SimonThordal why do you think you need it? What problem are you trying to solve with that code?
 
^ that
ftr there is a simple built-in way to do that, but I'm not telling you what it is until you explain why you want it
 
Foo is a model that should return a different query statement based on where it is being called from. In reality it would be something like:
class Article
{
}
bleh, let me edit
 
11:53 AM
Why would you not just have separate classes?
or methods?
 
@SimonThordal don't make an active record - it is a terrible idea
 
or just make the callers pass an argument that actually makes sense instead of being magical about "ohhh I was called by that? Then I'll do this!"
 
@DaveRandom I would just make sure it solves your problem. Then, if it can be reused or modified to help other people, that's cool too.
 
Right, my edit dissapeared. As said it returns different query statement depending on what called it to reflect the structure of the database. I have a bunch of different models that can show a newsfeed, for instance persons and subject. In the DB a person can be mentioned by a subject and an article can be relevant_for an article. Now, I want to be able to generate a feed that can be a mix of subject and / or persons. So the article would get the id's and classes of whatever...
it is generating a feed for and then construct the correct query based on the classes
 
@jjok Oh hi, we haven't met. I massively over complicate everything and am borderline obsessive-complusive, especially when presented with an "interesting" problem, where "interesting" is defined as "the sort of thing that would make most people want to kill themselves, which usually requires reading incredibly dry nonsensical spec documents several times".
 
11:59 AM
what are "models"?
 
Also I now have 2 weeks off work and not much to do with the time
 
models as in MVC, in this case Laravel models
 
ah, so, not-actually-mvc
 
or models
/out
 
well .. neither them too ... anyway, it's a laravel thing, so I tap out
 
We're not actually using the Laravel ORM, so this is more of a general thing
 
I might have some basic grasp on MVC, but I dont do Laravel .. or ORMs based on activerecord anti-pattern
@Patrick not a pun. I don't read that crap for the same reason why I dont practice hate-watching in youtube
 
@SimonThordal I have neither the time nor the energy to actually carry this conversation to it's conclusion, but I will say this: to solve your immediate problem, you should either use different classes or different methods to disambiguate, depending on how much logic is behind each variant.
 
Thanks anyway, I'll see if I can't find a way to do this in a reasonable way
 
what you should actually do is try to eliminate the keyword static from your codebase entirely
 
12:05 PM
@DaveRandom he can't. It's laravel's eloquent .
 
@DaveRandom leave my named constructors alone :*(
 
@SimonThordal If you are calling a static method of a base class, the base class can determine the child class fqn with static::class. If you are calling another class with no inheritance relationship, the only way to do it by inspecting the call stack, which you should not do because 1) it will be unreadable af 2) it will be slow af
 
@SimonThordal if you just need a view on the data, you can skip your "models" and use a query object instead
the model layer usually contains business logic. you just need a query/view on the data
 
@Patrick there are obviously exceptions and nuances, but understanding them first requires the paradigm shift and then generous amounts of experience
 
I'll take a look at that instead, determining the class seems pretty horrible
 
12:12 PM
@DaveRandom makes sense. But people take the "never use statics" dogma a little too serious sometimes
 
@Patrick isn't that how dogma works?
For example, in high school they teach you Newtonian physics. It's not correct, it's a massively simplified version of the nuances that are wrapped up in Einsteinian physics and quantum. But it works well enough that people can get somewhere with it, and eventually they start to notice that the model doesn't actually match reality exactly. When they start to ask that question, only then are they ready for "modern" theoretical models.
If you tried to teach high school students relativity straight off the bat, none of them would end up being physicists because it's just too complicated to grab people's interests with no foreknowledge
Not everyone is interested enough to ask those questions, and you can't make them be interested in it
 
Problem is that sometimes those high school students are involved in code reviews
 
Yes, that is indeed a problem
 
Wes
@Patrick ahah
beautiful
 
@DaveRandom Not sure it's fair to say "none of them", maybe it should be taught like that as a filter
 
12:22 PM
science needs non-geniuses
Einstein would never have built the LHC if left to his own devices
(probably)
I regard myself as acceptably OK at OOP, I would not have got here without first spending several years not really understanding it
 
Hey, anyone know where I can find a list of sms gateway domains?
 
12:42 PM
@KerrialBeckettNewham yeah, on google.
 
@mega6382 checked, couldn't find a full one. full meaning international/global
 
what do you mean by "SMS gateway"?
Do you mean companies who provide SMS dispatch services, or do you mean actual SS7 gateways?
I will tell you right now that a comprehensive list (of either) does not exist
 
pretty sure ss7 gateways are not supposed to be connected to the public internet either
 
typically SS7 gateway relationships are carrier-to-carrier only, peer numbering is not regulated by any kind of international body - there is no IETF for telephone numbering
god I wish there were :-/
 
@DaveRandom I was looking for mail to sms gateway domains list.
 
12:53 PM
email-to-SMS is very hit and miss, a lot of carriers simply don't do it
you would have to research individual carriers
 
@DaveRandom Fuck!
@DaveRandom how does fb/google manage it?
 
what you probably need is an actual SMS gateway service...
 
@DaveRandom yes, probably.
 
@KerrialBeckettNewham they are most likely SS7 peers
 
they have thousands of engineers to throw at problems like that.
 
12:55 PM
they are huge companies who can invest in infrastructure like that
 
@Danack makes sense, was just curious.
 
@Leigh that is so random, why would you put an NTP server on a signalling gateway :-S
you agree on a clock source, you don't make the gateway the clock source :-P
 
@DaveRandom No idea, but the domain of x.internal and it being a public facing SS7 gateway seems like a ton of fun as a target
 
@Leigh when you say target. what do you mean?
 
The long of the short of it is that whatever you problem is @KerrialBeckettNewham you are going to have to pay for a service. There are no free services (certainly nothing even remotely universal) precisely because it is as complicated and messy as has just been described above ^
that kind of service takes a lot of man hours to build and maintain, someone has to pay for them...
 
I'm hiring some php med-senior devs in Ukraine. Can someone give me a list of 10 or so traits I should be looking for specific to php?
and thx
 
@DaveRandom mostly, because he had nothing to do with particle physics :P
 
@DaveRandom Yep, it's hilarious how much of a complete mess it is...
 
@tereško yes I realised that about 5 minutes after I wrote it :-P
 
1:04 PM
The question I posted above for , be sure to read its contents. It is just amazing how people think.
 
@DaveRandom almost everyone thinks, that they are ok at OOP :P
 
@KerrialBeckettNewham there are plenty of services that are very reasonably priced though, and in my experience if you are putting serious volumes through them they will be happy to negotiate better prices than they advertise
it's a very competitive industry
 
@DaveRandom Cheers, I'll have a look at them.
 
@KerrialBeckettNewham personally I like textlocal.com, they are UK based but they have good international connections as well
 
@SuperUberDuper 1. knows php, 2. knows php7, 3. knows SQL, 4. knows regexp, 5. knows some OOP, 6. knows how to use composer, 7. has github and/or stackoverflow account, 8. knows what dependency injection is, 9. knows what SOLID is, 10. has strong/angry opinions about some php frameworks
4
 
1:09 PM
@DaveRandom Thank you :)
 
@tereško yes, but I can back it up with this implementation of the AcceptablyOkObjectOrientedProgrammer interface.
 
thx @tereško
 
@DaveRandom Hey! Do you fancy explaining the LifX LAN protocol to me? Thanks :P
 
@tereško Which framework do you have strong feelings about?
 
most of them :D
 
1:12 PM
lol :D
 
How do you guys go about doing e2e testing with php and mysql? Do you have some sort of db reset script that changes the test DB to be in a certain state? Also I was thinking of automating the tests with nightwatch, unless you have a better reccomendation..
 
@SuperUberDuper I use phinx to seed the test db
 
I guess there are separate ways to do php unit and integration tests. I'm going to host both the client and server in the same repo.
phinx cool, I;ll check it out
is phinx.org like the industy standard?
 
@SuperUberDuper A lot of ORMs have their own migrations stuff.
Phinx is a standalone package.
 
@SuperUberDuper There really isn't a standard
 
1:16 PM
I see
Maybe someone here I could hire as a 3rd party consultant to review code from time to time.
 
@SuperUberDuper yes, you set up two different configurations files for PHPUnit, one for unit tests and one for integration tests
 
@SuperUberDuper If you want to have the browser clicking around the website, maybe have a look at Mink and Behat.
 
and e2e tests are different from integration?
im from the js land
Mink and Behat vs nightwatch, any opinions too?
 
@SuperUberDuper we do not really do end-to-end tests here. That's what QA department is for
 
1:19 PM
@SuperUberDuper If you're already used to writing tests in JS, then I would keep doing that.
 
question, is php losing market share to node?
 
@SuperUberDuper Does it matter?
 
@SuperUberDuper Not enough to matter.
 
@SuperUberDuper based on what metrics?
 
Maybe if they rewrite Wordpress.
 
1:23 PM
@jjok It is not about wordpress itself but vast sea of plugins it has.
 
Wes
everything is losing market share to node
 
I would estimate, that all languages are using a bit of market share to nodeJS
 
@jjok I reckon I could knock up a PoC PHP lib for that in an hour or two, sure :-P
 
ok, php is fine for me atm cause the devs are cheap)
 
Wes
before node, everything was losing market share to ror. today nobody cares about ruby anymore
 
1:24 PM
esp in eastern Europe
 
@SuperUberDuper not really. It's just that there are quite a lot of shitty devs, that you can get for cheap
 
seems like a nice chat room here
I see
 
a senior PHP dev will cost maybe 5% cheaper (if you are lucky) than a Java senior dev
 
how do you spot a bad php dev?
 
by their code
 
1:26 PM
@SuperUberDuper It is really not, you just happen to come on a lucky day.
 
/me has been freshly fed, so the bloodlust is a bit curtailed
 
@Jeeves Maybe you can add this to your joke repertoire: @SuperUberDuper "how do you spot a bad php dev?" @tereško "by their code"
 
@jjok I don't have a programmer.
 
Wes
- lemme grab a drink from the fridge
- https://pbs.twimg.com/media/DRhDkmLWAAUVLsd.jpg
- dies from thirst
 
1:43 PM
In php projects like a mini social network would you keep the client and server code in the same repo?
for SPA's we nomally split this out, but with php I'm not so sure
 
depends
how is client communicating with the server?
 
tbh I don't know how my team will go about it as I'm taking a hands off approach
im busy doing my react and node stuff for other clients
 
well, is the client code is pure ecmascript/typescript app, then I would put it in a separate repo from the backend
and let the communicate over rest
 
I don't think they have the skills to do a SPA
 
1:47 PM
the reason for splitting them in separate repos is moslty the difference in directory structure conventions
 
So would you recommend a SPA out of the box since this is greenfield?
 
@SuperUberDuper Not if they don't have the skills.
 
And if they do?
 
I'm not sure what definition you are using for SPA
 
SPA will be better long term and for UX?
single page app
 
1:51 PM
yes, but what you mean by "single page application"
it's basically as vague as "website"
 
@SuperUberDuper If SPA means being coupled to whatever JS framework is popular right now, I would guess that it would be harder to maintain long term.
More dependencies to be kept up to date.
 
@jjok that's what npm and ava is for
 
ok, non SPA for now then
its good enough for FB and amazon
 
@SuperUberDuper I expect they have people working full time on maintaining those applications though.
 
2:11 PM
Holy shit. What happened to the github timeline thing? O.o
It's yuuuuuge
 
????
looks the same
 
wat
You don't have those almost half page repo info when starred things?
 
ah yes
old news
2 days
yeah its bad
 
:(
 
gonna have to unfollow lots
 
2:13 PM
@PeeHaa they made it more web 2.0
 
its growing on me
 
Can't all designers just die in a fire and stop touching the things I need to use pleease
@SuperUberDuper It grew for me too. That's the problem :P
 
2:27 PM
yeah, they have made that thing unreadable
 
@PeeHaa It's very annoying. But they also introduced new things in it. It contains if people start following you now.
 
2:50 PM
follow info is nice
unfollow would be even nicer
 
3:30 PM
@SuperUberDuper Like a fungus
 
lol
 
@PeeHaa
 
@fapore
 
QSY?
 
Neh
You?
:P
 
3:46 PM
Haven't smoked since I was 7
6
 
:D
 
My bad habits are copious amounts of sugary foods.
 
and playing with balls
@Fabor meeting up with Mikel tonight
 
I like that amp promise docs update @kelunik
 
@Leigh Ooh, don't forget to make fun of him for me
 
3:52 PM
And for me
Tell him he smells
 
@PeeHaa :)
 
<3
@Wes seen first two episodes of dark last night. Think it's going to be an ok series
 
4:04 PM
ip2long – #75715
 
@Jeeves That's.. a valid ip??
 
@PeeHaa How do you know?
 
Dunno. Maybe ask @DaveRandom
I'm sure he has printed out the rfc and put it over his bed
9
 
RecursiveArrayIterator does not traverse vars by reference – #75716
 
Good guy @LeviMorrison <3
 
4:12 PM
@PeeHaa ?
 
4 mins ago, by PeeHaa
@Jeeves That's.. a valid ip??
 
@PeeHaa I wasn't saying you had a couch. I said I had a couch.
 
I felt the same as what you said, but wasn't sure about it all
 
@PeeHaa Pretty sure it's valid.
 
@PeeHaa Ah. Yes.
 
4:14 PM
Well it's three of us against one. We can take him on
:P
 
RecursiveArrayIterator does not traverse arrays by reference – #75717
 
4:29 PM
> Generics can only be used in type hints since they are erased at runtime. (Typing[4124])
Thanks, HHVM/Hack!
The code is something like this:
if (!($item instanceof T)) {}
 
@LeviMorrison o.O
@PeeHaa any sequence of four octets is an IPv4 address. whether it goes somewhere useful is another question. 196.168.0.0 is a pretty normal address really
 
4:48 PM
Hack is weird. They do interface KeyedIterable<Tk, +Tv> but then function concat<Tu super Tv> instead of function concat<Tu: -Tv> or something...
I also expect this was added to the language at a later date because of the definition of IteratorAggregate's getIterator() definition:
interface IteratorAggregate<+Tv> extends Traversable<Tv> {
  /**
   * Returns an iterator to be used to iterate over the object's elements.
   *
   * @return - An `Iterator` for iteration.
   */
  public function getIterator(): Iterator<Tv>;
}
Ought to have been something like this instead:
Well, they still haven't added a way to reach into the type of a generic thing. Something like this:
interface IteratorAggregate<T: Iterator> extends Traversable<T::ValueType> {
  /**
   * Returns an iterator to be used to iterate over the object's elements.
   *
   * @return - An `Iterator` for iteration.
   */
  public function getIterator(): +T;
}
 
@PeeHaa An IP ending with 0 is perfectly legal.
And routable, depending on whether your network hardware supports it
https://en.wikipedia.org/wiki/IPv4#Addresses_ending_in_0_or_255
There you go
 
5:04 PM
Are everyone's bodies ready for Falcon Heavy yet?
 
5:39 PM
mysqli_bin_result drops datetime precision – #75719
 
If you really hate someone you have to buy a Christmas present for buy them Getting Over It on steam.
 
Nite aĺl
Have a happy friday
 
\o
 
5:55 PM
hmmm. when seeing D├®c├®d├® in the source code of a page, does that mean it's literally borked characters? what encoding is firefox reading markup with when seeing source?
alternatively, do these look familiar to anyone? They're not the general doubly encoded utf8 characters I am used to see when I fail at utf8
 
01:00 - 18:0018:00 - 00:00

« first day (2623 days earlier)      last day (2325 days later) »