« first day (2781 days earlier)      last day (2161 days later) » 
00:00 - 15:0015:00 - 00:00

12:01 AM
@StatikStasis Watson introduces Holmes to "crap telly."
 
 
2 hours later…
2:28 AM
@Tiffany Ha! I love that one!
 
Wes
3:25 AM
mornin
 
3:39 AM
Almost midnight here. =) about to go to bed. Well... I’m off tomorrow so I’ll probably stay up a little longer.
 
Wes
\o gn
 
4:13 AM
Morning
 
4:29 AM
@bwoebi I found another way, which is in principle compatible with everything in all modes ... we just shallow copy the function, deep copy opcodes, and in executor function, set func shallow copy and opline to deep copy + offset, if we have it ...
as you said may need to take care of opline_before_exception and such, but can be easily calculated I think ...
 
Watching some Bob Ross. I love watching him.
 
5:04 AM
anyone here have experience with react-dev-server and a PHP back-end?
 
Trying to understand the "page" database schema for revisions. upload.wikimedia.org/wikipedia/commons/9/94/…
is a revision created, then page is created and linked to the revision?
Then everytime you change or add something, a revision is made and attached to the page?
I don't understand their purpose for "archive" and "page-props" table..
 
5:22 AM
mornin
 
5:41 AM
mornin
What is ZEND_USER_OPCODE?
 
Almost 2am. Time for some sleep. Night all.
 
There is no such thing like night :)
 
it's true, there's not ...
@brzuchal represents ... a .... user ... opcode ...
extensions can override the vm handler for a particular opcode with a user handler, and it's opcode num is replaced with ZEND_USER_OPCODE, and then looked up in a user handlers array (table) upon execution and forwarded to the function that set the override ...
 
@JoeWatkins interesting, any examples I can see?
 
searching on github on my repos, or nikitas, or dmitrys, or bobs might also turn up something interesting ...
or xdebug
or vld
 
5:55 AM
should I keep history of actions performed as numbers, or string to make things easier? e.g. action performed : update, or action performed: 1
in database.
numbers faster to lookup right? and less space.
 
@JoeWatkins thx
 
@Darius without really knowing the context: you can have an actions table that has all the distinct possible actions with a numeric key and an additional string for a name. and the actually performed actions table can have a fk to the distinct action
 
best of both worlds, thanks.
 
actions (id, name), performed_actions (action_id, performed_at)
 
Guys, shared servers and virtual servers are the same?
 
6:00 AM
Yep, to make it simple.
 
ah ok thx
 
To be more clear though, a VPS shares the same hardware, shared hosting servers can share same hardware as well. VPS's give you way more flexibility since it pretends to be a dedicated server.
@Shafizadeh Shared server hostings don't give you that much freedom, and doens't let you change every single setting on it.
 
ah I see
 
so, the answer is no, shared and virtual is not the same ;)
 
:-)
 
6:04 AM
Right? I say yes, then my explanation becomes a no..
 
6:25 AM
@Gordon sorry to bother, one more question came up. UserAgents, should I store them in their own separate table aswell? or just add a text column for "user-agent" for each action performed? Reading online it mentioned user agents can be ridiculously long, and I should use a parser (so maybe separate table with FK after parsed?) or just keep it as text. Not even sure if I need the data, but would make sense to hold onto it.
I do know for one part of the site I will need to store useragents (purchases)
For regular "update", "Delete" actions performed, I think IP would suffice right? Purchases would have their own table, which would then store useragent for argument sake if a chargeback occurs.
 
@Darius I'd use a string because there are a bazillion different possible UAs.
 
parse -> store in varchar 255?
 
@Darius why do you need to store UA at all?
 
and you likely don't need it anyway
you will have it in your logfiles
 
Gotcha.
 
6:30 AM
they can easily grow longer than varchar 255
 
oh my
 
Missing Chrome Canary. :P Good morning.
 
6:48 AM
morning
 
7:08 AM
\o
 
7:29 AM
morning
has anyone any idea why bootstrap is displayed like this ? image.prntscr.com/image/79odpcaDQYSs8UMe2ZRUdA.png
 
Either styles not applied, or you didnt setup navbar correctly
 
I checked all and it should work,maybe npm watch is needed
 
You use cdn's?
 
no
 
7:39 AM
Again, either CSS isn't being loaded properly or your navbar html is messed up.
inspect element and see if there's any http errors
 
7:51 AM
 
morns
 
eh since when does packagist include js packages?
 
@Gordon Since, probably there's no filter for it, I guess.
 
estimable deserving respect or admiration; worthy of esteem.
 
8:14 AM
@Darius the problem was from build, I downloaded a build package ,thanks
 
@wes you guys deciding to get in on this Brexit + constitutional crisis lark?
 
8:42 AM
@bwoebi Well, if we get rid of $GLOBALS we don't
That is, we'd still need them, but it wouldn't matter anymore in most places
Maybe we should do that...
That is, disallow acquiring a reference to $GLOBALS (while $GLOBALS['foo'] etc can still be allowed)
 
9:00 AM
@NikiC A reference to $GLOBALS is one thing, but also many places not de-indirecting array access
e.g. min($GLOBALS) will give you an IS_INDIRECT … there are many more such functions in array.c
 
@bwoebi All of which would be solved if you can't acquire $GLOBALS
 
so you mean we should forbid passing $GLOBALS directly as a variable to anywhere?
 
@bwoebi Forbid accessing $GLOBALS without array access
 
yeah
sounds like a good idea
$GLOBALS is the only place where we have directly accessible IS_INDIRECT magic, or does it exist anywhere else?
 
An alternative would be to only prohibit actual references (&) to it and otherwise remove some of the magical behavior, i.e. give back an incref'd version that is COWd (stripping INDIRECTS) on modification
@bwoebi For object properties it's stripped out when cast to array (iirc)
Right now $GLOBALS is quite inconsistent in that you can do $a = $GLOBALS; and then $a['foo'] = x allows you to modify globals (If I remember that right)
 
9:07 AM
yeah, there we do have them just in write contexts, which is fine
@NikiC right
I'm just wondering how we would forbid that
variable variables are a thing...
 
excuse me what the topic now? Just joning this room
 
and anyway $GLOBALS["GLOBALS"] will still return the globals array @NikiC
we do quite some magic on the $this variable, I don't remember it all
 
TIL The Netherlands has the second lowest number of public holidays in the world
 
@bwoebi yes, we do a check for $this for var vars. Could do the same for $GLOBALS
@bwoebi hm yeah
 
get_defined_vars() can return $GLOBALS too if it was auto-initialized before
 
9:12 AM
@bwoebi I think the most robust way would be to not have a $GLOBALS variable at all and instead make $GLOBALS[$foo] basically a special syntactical feature roughly equivalent to ${$foo} (just global)
 
probably yes, though I don't know how much code out there relies on e.g. foreach()'ing over $GLOBALS
 
oh my haha
safest would be probably forcing a copy of $GLOBALS (stripping all the indirects) upon access
 
yes
 
And we can then exempt a few common use cases like $GLOBALS["key"]
 
9:22 AM
But that's going to be a lot trickier to implement than just forbidding it outright :P
And also has the disadvantage of being a behavior change, rather than a simple removal
So there isn't any good way to deprecate
 
there already was quite some behavior change in edge cases between PHP 5.6 and PHP 7
which just happened without many people noticing
 
@bwoebi we'd still have to forbid $a =& $GLOBALS right?
To avoid behavior inconsistency
 
@NikiC yes
well
 
@bwoebi Which of course comes with the usual complication of amIByRefOrNot($GLOBALS)
 
@NikiC $key = "GLOBALS"; byRefFunc($GLOBALS[$key]);
 
9:26 AM
@bwoebi I'd make the $GLOBALS["GLOBALS"] part of that already illegal...
Though really, it would be much easier to satisfy the iteration use case with a get_global_variables() function...
 
then you'll have to strip it from get_defined_vars() too
but I'm fine with removing them there
I find it anyway weird to see the superglobals part of globals
 
@Gordon Nigeria probably has the highest
 
!!dad
 
What did the donkey say? http://chat.stackoverflow.com/transcript/message/31303392#31303392
 
9:49 AM
since when does PHPUnit's assertEqual do strict comparison? I get failing tests when I assertEquals("123", new SomeClassImplementingToString(123))
 
@Danack did you get a reply?If yes than I'd like my sample project :P
 
nvm…
 
 
1 hour later…
10:55 AM
Does stripos not work in PHP??
if(stripos($Description, 'viagra') !== false) {
			header('Location: add.php?Retry=2');
		}
Seems to no longer work since converting to PHP7
 
it's not php's fault that your code is shit
 
Ive read all about it and made sure everything is just right but it still wont work and Im thinking it stopped working about the same time I switched to 7
 
so we should take your word for it, that php 7 is broken
 
Thx for the compliment @tereško Not everyone is as genius as you. Didnt you get the memo on better relations?
Plz STFU and go away
I dont care if your king tut around here
Better yet IDGAF
If you aint got nothing nice or constructive to say dont say anything at all hows that?
So Ill ask again
Does stripos not work in PHP??
if(stripos($Description, 'viagra') !== false) {
header('Location: add.php?Retry=2');
}
Seems to no longer work since converting to PHP7
 
someone call Rasmus, php does not work anymore (it's urgent)
 
11:03 AM
@Stuart stripos didn't change behavior in 7 AFAIK so your problem is probably elsewhere. use a debugger to find out more or a few var_dumps to see if you're getting the values you expect
 
11:13 AM
@Stuart every time you come into this room, you are rude to people. Please learn to be polite or just don't come in here.
@tereško while true, that's still not a nice thing to say.
 
I know, but it looks like he is involved in some shady shit
 
@Danack c'mon.. he was provoked.. not like he started being rude out of nothing
 
@pmmaga people get treated differently when they've been obnoxious in the past:
...
 
^ now that comment of mine (the one he was replaying to) I felt was entirely justified :P
though, I sill can't remember how to spell "skull"
 
@tereško “replying to”
 
11:24 AM
@Stuart why don't you write a unit test for it? or a small reproducible test case?
 
@pmmaga @Stuart actually it did, sort of: 3v4l.org/Z7XT5
 
I stand corrected
 
@Danack You're putting the cart in front of the horse im sorry
@tereško Me, Shady? Youre a dumb ass
 
yeah, that'll help
 
Actually trying to keep shady away from a super legit motorcycle classifieds
Sorry Dave, Just the truth
So... working my way down the line...
@Gordon I thought that what I initially posted was a perfect reproducable case
trying to catch up
formatted and all
 
11:35 AM
fyi calling someone - anyone - a dumbass in a public forum is not likely to have a positive outcome for any involved party. Not a huge fan of that Jesus bloke but the whole "turn the other cheek instead of gouging someone eye out" thing does have some merit
 
Good point
 
@Stuart provide the value of $Description then it might be reproducible
 
^ what he said. It's impossible to know how code will behave unless you know what values were plugged into it
 
I need to put the keys to the Enola Gay in the safe
Gotcha @mega6382 and @DaveRandom
 
the absolute best thing you can do it to create a repro case on 3v4l.org
especially since that will show you one a single page whether there is a behavioural difference between 5.6 and 7.1
and if you check that "eol versions" box it will go right be to 5.0 (i think)
 
11:38 AM
Im gonna look into what $Description has inside of it (Which I think is just descriptive text) but @DaveRandom what were you saying via "actually it did, sort of"? That stripos was deprecated in PHP7?
Gonna look into that too Dave, Thanks
 
@Stuart no, the behaviour changes specifically in the case where you are running in strict types mode, and the input value is not a string
 
@Stuart he was saying that behavior has changed a bit in php7. Thats all
 
before I do, does anyone know of anything similar I could use thats fine tuned for 7?
Gotcha, Thanks Dave and Mega
 
defined "fine tuned for 7"?
 
engine talk
internal combustion engine talk, Sry
 
11:41 AM
yeh I know what it means :-P just not sure what you meant in real terms when asking for a code eval tool
 
Something fine tuned for 7. Dunno how else to describe it
 
ftr I have ruined many a 2-stroke in my time
 
for 7 or to 7
 
on a side note: trying to keep viagra away with a simple blacklist is a clbuttic mistake
 
IYKWIM
 
11:41 AM
I have dismantled loads of them, never successfully reassembled one yet
@Gordon actually that's a very good point, at least it should be a preg with \b
 
@Gordon believe it or not, This is my side hack in my code for those that slip by Google's Captcha so I can get back to motorcycle related content
 
stuff can get past recaptcha??
 
and not be tangled up in code
 
@DaveRandom even then people will just write v1agra instead
 
Amazingly once in a while a stray gets thru but Im sure everytime they do, G fine tunes the script a lil more to combat them
 
11:44 AM
I feel like it might be worth looking at your recaptcha implementation, because I have worked on a lot of spam magnet sites and I have never once seen something non-human get past recaptcha
 
Theres that "fine tunes" again
Might be a human setting their machine up to my site?
 
@Stuart enough with the “fine tunes”, at this point i am certain you are using that phrase incorrectly
 
Its not frequent at all and the only ones I ever see always have "Viagra" in the text somewhere
 
could be but that also seems unlikely tbh, I would say it's more likely that either there's some client-side validation that can be bypassed because there's no matching logic on the server, or simply you missed the captcha on some form somewhere
 
fine tune's?
 
11:46 AM
no.
it does not belong to the fine tune
nor is it a contraction of "fine tune is"
 
When you're bent over the fender adjusting a carb or ign timing you're fine tuning the car arent you?
Why not use fine tuning in this example?
or getting a guitar string just right?
or a piano?
Gotcha @DaveRandom My political english isnt as good as my street slang
 
@Stuart I know what fine tuned is but i am saying that you are not being descriptive enough to make sense out of what you are trying to say
 
lol Anyways....
 
@Stuart I am English, and a nerd, and a bit of an English nerd.
 
+1
 
11:50 AM
If you can hook me up with the 60th anniversary black and yellow vmax I will work for free
 
So, Im still perplexed as to why this doesnt work (allow me to further explain)
if(stripos($Description, 'viagra') !== false) {
			header('Location: add.php?Retry=2');
		}
im typing
$Description = what someone types into the details box here
BTW The viagra txt is me trying it out and it goes thru
 
Try something like stripos(strtolower($Description), ...
 
and that is the captcha in question. Yall dont be afraid to Captcha it
and see the rest
 
@mega6382 stripos is already case insensitive
 
but Mega wouldnt the i in stripos cover that?
 
11:54 AM
so if that aint working for you, then description is likely not what you think it is
 
Ah sorry forgot that
 
also, if you want the redirect to happen immediately, put an exit() after the header()
 
BINGO @Gordon Im gonna have to look into that
Thanks for the exit() Ive heard conflicting stories about that b4 also
but I think im gonna start rolling with it
(but im not actually "rolling") ... lol
b4 anyone corrects me
Taking a closer look into @Description Thanks @Gordon
exit might be all it needs brb
BOOM!! exit() fixed it
Thanks @Gordon
 
Wes
\o
 
@Stuart now thats a facepalm worthy moment.
@Wes yo
 
12:03 PM
Yep
I got them bastards now
 
Wes
slept in a strange position and now my whole right side hurts -__-
best monday ever.
 
WHY do actual human beings write scripts to push viagra and fake watches etc? Noone actually ever sends them $$ do they?
Dont they have anything better to do?
 
Wes
apparently it works
 
smh
Im always guilty b4 innocent, Just ask @tereško but thats ok b/c ive been roosting the competition since 09 and am gonna be the one with the last laugh
 
Wes
james veitch had a couple of guesses on how the thing works :P check his talks
 
12:09 PM
+1
 
1 hour ago, by tereško
it's not php's fault that your code is shit
sounds like my estimate was actually spot on
 
Oh Yea i forgot exit
 
@Stuart you don’t sound like a smart person btw at all
 
Im not
Dont know how too tie my shoes or where their going
 
12:13 PM
@Stuart you see thats what i am talking about, your sentences arent very articulate, and makes you sound dumb. Now i dont know if that’s intentional or just how you are.
 
Wes
12:25 PM
@kelunik should the same site support multiple libraries? namespace Vendor\Lib1*
 
@Wes That'd be very useful for Amp, yes.
 
Wes
given Vendor1\Lib1 and Vendor2\Lib2 what the urls should look like?
maybe we should restrict to one vendor only. otherwise urls are going to look funny
like amphp.org/amphp/aerys/...
 
@Wes Sounds reasonable, yes.
 
Wes
ok.... though changing it is not a big deal actually
 
@Wes You could also allow customizing the URLs with placeholders.
 
Wes
12:30 PM
what do you mean?
 
e.g. /{vendor}/{package}/{*} if you want multiple vendors, /{package}/{*} if you have only one vendor and /{*} if you have just one package.
If certain placeholders aren't present in the URL format, they have to be specified in the config.
 
Wes
yeah you can do that already... although it's not as nice as doing /{vendor}/{package} :P
 
@mega6382 I consider myself smart enough to be dangerous is about all. I really even forgot what "Articulate" and that word Dave used earlier mean about 20 years ago. 30 Maybe. Now Im a country boy who speaks from the hip with whatever's easiest to say
With a pretty classy farm, tractor, pond, dirt bike and sucj
such
and I do not chew or use tobacco, That shit's nasty and needs to be banned in favor of Marijuana
but youll have to get past my english inadequacies
do like long walks on the beach
 
and making noise ...
 
12:44 PM
@PeeHaa, what's the state of your mailgrab project?
 
@tereško Like all his other projects WIP
 
@Wes Isn't it likely that naming "Mr Scissors" as the new PM is going to piss off a lot of voters?
 
@IROEGBU the question is whether he himself used it in production
 
Wes
@Danack not too many imho. people voted A or B, and everybody was pissed that A and B decided to make a government together...
1 because A and B are fundamentally different
2 because it's never going to work
all this is facebook's fault
they still promote "no vaccines" ads
 
@tereško It's not supposed to be for production... I think it's just a "mail debugging" tool
 
12:59 PM
@IROEGBU well, yes "in production" as in: for use in the error reporting
 
I guess, you'll need this feature? No?
 
1:45 PM
@Ocramius what do you think about PDOStatement::fetchObject(), and should the ResultSets of amphp/postgres and amphp/mysql also provide such a function?
I mean, it would avoid dumb copy-assigning from one stdclass to a struct object
At least I found myself writing some code like this right now:
$obj = new Obj;
$obj->foo = $row->foo;
$obj->bar = $row->bar;
$obj->baz = $row->baz;
 
Wes
why do you need to copy? doesn't PDO::FETCH_OBJ do that already
 
@Wes I am using amphp/mysql … which gives me a stdObject, nothing I can hint against
And that's why I'm asking whether it's a good idea or rather a not-so-good one
 
Wes
what's a stdobject?
 
Eih, stdClass
 
Wes
so you want to cast a stdclass to a named class/struct that has the same named properties
 
1:56 PM
basically that
sure I could write a foreach loop
but I'm wondering whether I should do that at the API level
I mean, SQL allows you to alias fields via AS, then you'd just insert the name of your property there and magic will give you the object with the properties filled in
 
Wes
dunno
 
@Wes heck, I'm pinging Macro and not you :-P
 
Wes
:P
feels dirty. foreach seems the way to go
 
$obj = new Obj;
foreach ($row as $k => $v) {
    $obj->$k = $v;
}
doesn't really look less dirty
 
can anyone tell me why I fail to include a php file into another one?
 
2:01 PM
@Wes because… eih, what's this dynamic property access in your Repository code?!
 
@Riccardo because you made a mistake
 
I am very sure the file I've been attempting to include exists and is in the correct directory
@Gordon
 
@Gordon I believe the canonical answer is: youtube.com/watch?v=W23LKD9Z1hw
@Riccardo I suggest i) using PhpStorm ii) use absolute paths with __DIR__ iii) PhpStorm will then show you any errors on includes.
 
@Riccardo being sure and knowing are two different things
 
@Danack i'm not using any IDE
@Gordon I have created a file in a given directory that's why I am sure
 
2:07 PM
yet you fail to include it
 
may I show you the code on pastebin?
 
sure
 
Wes
i made this spreadsheet online which has the generate the excel feature, so that they need to update the data in one place only... instead they keep updating the excel files (they have dozens, with dates...) but not only that... sometimes they update the excel sometimes they update through the web ui... so every month i need to figure out what's the actual updated data between a fuckton of poorly maintained xls and the web ui
 
@Wes I'd recommend just start overwriting the local copies, after giving them notice that the local copies are not to be edited.
Or password protect them to be readonly.
(which I think is a thing.)
 
@Gordon this is the pastebin link
 
2:22 PM
Hi guys
 
in the example i gave you I forgot to include a file
I need to remake the whole thing
 
Does PHP offer anything that would tell me if a var holds an object implementing toString without using reflection?
 
@tereško lol- you live for these moments. =D
 
pastebin.com/MkKxBNKa this is the correct pastebin
 
@Gordon good ol' method_exists?
 
2:27 PM
@Riccardo Correct path to your db file?
 
@Gordon The best way to find out is not needing to know.
 
Wes
@Danack the excuse is: they don't always have internet
 
Off work today- it’s raining so my wife cannot ask me to really do anything outside the house... it’s the perfect day!
 
@Riccardo Or which one is not working, all of them ?
 
Wes
has anybody experience in making web apps that work offline?
 
2:28 PM
@Ende the file I fail to include is the db connection
 
@pmmaga that would work, yes.
 
which is in the first piece of code
 
I have vat registration system and once it is completed i am showing list of vat registration form on interface.So what should be its api?
https://example.com/vat
 
@Wes you mean they have an offline mode?
 
Does this look good?
 
2:29 PM
@Riccardo the path to the file is correct?
 
yes it is
the files are on the same folder
 
ah oke
 
@NikiC I want to limit the values in an array to scalar only, incl. objects that can have a string representation. any ideas on how to approach this without needing to know?
otherwise I'll use method_exists
 
Wes
@StatikStasis like a site that once loaded is always kind-of accessible regardless of the internet connection. like that queues the operations until the device goes online again
 
he means the LocalStorage thing
 
2:32 PM
@Gordon The point was that you might want to not allow objects with string representation in that situation
In PHP __toString has no well-defined role (in the sense of debug vs display)
So allowing objects with __toString for example implies that you also allow all Exception objects
 
Which is quite likely not what is desired
 
hmm, valid point
 
Wes
@Danack eh. god
 
thanks
 
2:33 PM
lol
 
Wes
it is true that mobile internet is always expensive af here... but hell, it's for work
 
@Tiffany a link for you dev.to/colinmtech/…
 
@Wes I feel like the google sheets chrome app can at least partially solve this problem, but also I think sharepoint has a load of stuff that can manage merging offline changes natively in excel as well (@Tiffany might know something about that)
 
Wes
would be great if it has an api... let me check
 
I'm not really familiar with the finer points of O365, sharepoint or really anything since O2007/Exch2010 though so I can't give you much more info than "I think this exists" :-P
@Danack the JSON schema stuff you were doing, are you running the server side of an API that is publishing a schema or just trying to consume one?
 
2:51 PM
@DaveRandom I'm doing server-side, another person on the team is the consumer for half of it. An external client is the consumer for the other half of it. It's testing that 2nd half that I care more about, as it seems sensible to make us look competent to them at least.
oh, apparently that whole bug I was having was due to casting to object inappropriately.....
I LAUGHED. HAHAAHAHHAAHAHAHAHAHAHAHAHAHHA
 
@Danack the reason I ask is, I'm wondering if you have a test suite, or at least a schema with some sample documents that are expected to conform to it?
@Danack as in, you had cast an indexed array to (object)?
 
@DaveRandom that's what I was attempting. Setting up a integration test that checks that the data returned by the api conforms to the schema. Sent an endpoint via twatter.
 
@DaveRandom as in I'd put in an (object) at some point because I thought I had to - but that was wrong.
 
@tereško Functioning. Everything that is implemented works fine. Anything not yet implemented is here github.com/PeeHaa/mailgrab/issues
 
2:58 PM
@Danack that sort of thing, btw, is the precise reason I quickly concluded that I needed a data structure with strong semantics, hence github.com/DaveRandom/JOM (also because it's drastically easier to deal with stuff like internal JSON ptr resolution if you have a traversable tree)
 
@PeeHaa any specific issues that I should know about?
 
00:00 - 15:0015:00 - 00:00

« first day (2781 days earlier)      last day (2161 days later) »