« first day (2449 days earlier)      last day (2503 days later) » 

12:19 AM
@NikiC @JoeWatkins it makes me very sad that this bug/PR never followed through:
"Constant numeric strings become integers when used as ArrayAccess offset"
https://github.com/php/php-src/pull/1649
https://bugs.php.net/bug.php?id=63217

On a scale of increasing difficulty from 0 to 5, how difficult would it be to fix this?
Can borrow most of the work done in that PR, but I'm not sure what the changes in zend_inference.c would be.
 
 
1 hour later…
1:50 AM
Question, I'm sending out emails with smtp and php for user activation emails. I set the from email address as noreply@site.com , but the hidden headers show the authenticated user as darius@site.com. I looked at other emails from sites like american express, but don't see the authenticated user tag, how are they sending these out then? Should i ask this on serverfault?
If i send via php without smtp, it says phpmailer and blah blah blah, but was told the deliverability is much lower without smtp according to google.
or should i create a noreply@site.com email address and deny incoming connections?
 
@Darius you don't want to use external services like mailgun ?
 
I don't, I've considered it but would rather learn the system.
I found the answer I needed though by googling some more eventually.
Thanks!
more postfix configurations :p
 
 
1 hour later…
3:35 AM
morning
 
Morning @wespa
 
3:59 AM
Even minor issues can be vulnerabilities at scale 😂 https://t.co/v2ntifh2B9
 
4:18 AM
\o
 
o/
 
Also @NikiC, the leaks shown here - they're not on me, right? Should I be suppressing them or fix them at the source? (PS if you'd rather I ping someone else just let me know, not sure who else to go to here).
https://travis-ci.org/php-ds/extension/jobs/248640651
 
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE  63 / 293 ( 21%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 126 / 293 ( 43%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 189 / 293 ( 64%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 252 / 293 ( 86%)
FFFEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE                       293 / 293 (100%)
fuck.
@rtheunissen i've lost all my hopes
 
@WesStark I see some F's at least :)
What are you testing?
 
it's a calendar/journal/agenda thing for a client
 
4:32 AM
@WesStark do you ever sleep?
 
why people keep saying me that
 
because you seem to be always in here
 
i sleep, but i wake up early because i went running
 
@WesStark Why E of all letters?
 
@littlepootis because E = errors
 
4:35 AM
Mornings
 
@Gordon on a more important note, imgur.com/a/XFYpb (saw this?)
 
@WesStark haha. no.
 
it didn't took me a lifetime :P
 
@WesStark s/took/take
 
thanks.
i always do that mistake
 
5:06 AM
posted on June 30, 2017

New Cyanide and Happiness Comic

 
again I forgot it's friday,friday ...............
 
-16 days
6
 
divide by zero :P
 
this is ro abuse!
 
@Kurisu no, this is:
 
5:18 AM
@WesStark :c
 
:P
 
ive set a goal today. i want to do the city from end to end (it's a small town) running
it's basically a marathon :B
at a decent pace, like 10km/h
 
i can hardly run 10 meters :P
 
@WesStark a marathon is 42km
 
@Gordon s/42km/42,195 m
sorry
 
5:26 AM
@Gordon yeah, it's gonna be 20+km, and then back home :B, so it's 40km
 
not so small town then
 
it is small, but roads aren't perfectly straight. i need to find a good path and avoid the hills especially
 
yo wtf. @WesStark is ro now?
 
yeah, we got tired of kicking him so we gave him permission to do it himself
 
lol
 
5:32 AM
member when google maps used to work
those were the days
 
they still work
 
meh, just let me process the jealousy, I'll talk to you again later Wes
 
therefore, these are the days
 
@FélixGagnon-Grenier i've been here for ages
 
@FélixGagnon-Grenier you can always go to italy and torture Wes for his account creds and impersonate him in the interwebz
 
5:34 AM
@WesStark riiiiiite ;)
 
i am...
 
windows + php, sucks so much
 
turns out it's much less @Gordon i could do the perimeter instead
also google maps doesn't understand tunnels
you can't pass through them
 
@WesStark you can't if they are demolished
points to head.jpg
oh. nvm
 
yeah a straight track is just barely 10km lol. i need to do the perimeter
@Kurisu i've heard that word yesterday
are you watching me? :B
 
5:40 AM
courtesy of google, in the same plane
 
should mean parallel surfaces
 
@WesStark ye.... yes!
yeah
 
@tpunt please do
morning bitches
loving the cartoons @Wes, facial expressions are cool .,..
 
yeah the perimeter looks more like a marathon
 
monrings, joe
 
5:46 AM
@JoeWatkins :D
ah, i need to do one with a hammer
 
@WesStark usually, this amount of preparation results in the objective not being completed at all
 
it will take me months
right now i run in circles basically, i can do about 10km at 10km/h then i die. doing 3 times that is going to take a while
 
morning Joe
 
\o
 
5:57 AM
feels like monday ... I blame @PeeHaa
 
ITS FRAIDAY
 
wtf, I thought it was tuesday
I think you may be wrong, I'm pretty sure it's tuesday and feels like monday ...
 
fair enough.... but! you need to check out this... http://stackoverflow.com/questions/tagged/pthreads
6
 
you fucking fucker
fine, it's friday ... but I didn't deserve that ...
 
lol
 
6:03 AM
afk, walking dawgs
 
\o
 
6:23 AM
@WesStark 10 km/h is quite fast
 
that's an average... it's just because i sprint downhill and on flats, otherwise i basically walk
would be a start if i could keep a constant pace rather than doing that...
 
When I was still treadmilling I usually did intervals. 1 minute at 6 km/h, then 1 minute at 10 km/h. then the same for 2 minutes, 3 minutes, then 4 and back to 3, 2, 1 in one run.
 
@Kurisu son I'm not disappoint
 
@Kurisu well played
 
thank you, ladies and gentlemen
 
6:36 AM
i do the actual exercise only when i go up hill. my path starts with a considerable hill and i spend most of the time there, then i go down hill, at about to the same height of where i started in just few minutes. i like that because i spend most of the energies when i'm fresh, and then spend the rest of the time absorbing the lactic acid
i'm sure that if i decided to change path i would last less
 
telnet mapscii.me
 
i need to keep track of my pace better. do you know if there are apps that tell a road's inclination? :B
 
@JoeWatkins that is cool
 
'telnet' is not recognized as an internal or external command, operable program or batch file. #windows
 
wow, they stopped shipping telnet with windows ... probably the only useful program that was ever included out of the box ...
 
6:45 AM
mornin
 
maybe powershell
 
I hate that thing, it's crap
 
o/
 
The term 'telnet' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spel
ling of the name, or if a path was included, verify that the path is correct and try again.
same
 
@WesStark use your windows bash
 
it's just disabled, but there ...
 
@Gordon bashershell?
powerbashell?
 
are you on drugs ?
 
yes :B
brb, time for work
lata
 
6:49 AM
lata
 
@JoeWatkins traceroute bad.horse
 
haha
 
@JoeWatkins do you know out of your head if something was changed between 5 and 7 that would cause object_init_ex to raise a segfault in zend_get_class_entry in 5?
 
object_init_ex doesn't call zend_get_class_entry in either version
 
hmm, the segfault goes away when I remove that particular call though
 
6:55 AM
wait, you are calling zend_get_class_entry yourself after object_init_ex ?
235  ZEND_API zend_class_entry *zend_get_class_entry(const zval *zobject TSRMLS_DC) /* {{{ */
236  {
237  	if (Z_OBJ_HT_P(zobject)->get_class_entry) {
238  		return Z_OBJ_HT_P(zobject)->get_class_entry(zobject TSRMLS_CC);
239  	} else {
240  		zend_error(E_ERROR, "Class entry requested for an object without PHP class");
241  		return NULL;
242  	}
243  }
244  /* }}} */
so if no error is raised, then the fault is because the object is not initialized properly ... my guess would be that the zval you used for object_init_ex is not allocated ... but it's a stab in the dark ...
 
no. I am never calling it directly. or maybe I do through some macro, but not literally.
 
have you ventured into the world of "watching" yet ?
 
I'm having a complete ballache trying to get composer to composer install on building a docker container, so the user doesn't have to do it. Anyone achieved this?
 
@JoeWatkins I guess not
 
6:58 AM
moin
 
@Jimbo you mean running composer as a docker command in a docker file?
 
R.P
@Jimbo You mean only after first run?
 
you should find a good article about watchpoints, they are extremely powerful stuff ... you can set a watchpoint on an address (like the address of a zval or zend_object) and a breakpoint is triggered when the memory at the address is altered ... so you can see where this kind of error is happening and why without having any good guess where to start, other than the address of a thing ...
 
@Gordon Yes. I currently have: RUN ["/bin/bash", "-c", "composer install --no-interaction"] and I've tried many different ones, but the container just won't start when I have that there. Also for syncing, because it's defined as a volume, I have to do:
COPY ./composer.json /appdata/composer.json
WORKDIR /appdata
 
a fault in that function means something is going wrong with the handler table, so you'd set a hardware watchpoint on the address of the handler table and see what is messing it up just by running the program ... is the general idea ...
 
7:00 AM
@JoeWatkins ok. my gdb fu is basically limited to calling run and bt. I wish I could get this thing hooked up to vs.code. but I'll try to learn something new. thanks
 
@Jimbo yeah, I was banging my head on my desk about that just sooner today. am interested in some answers too. I actually got the composer to run, but not to be visible to the image using it afterwards.
forgot the docker-compose at work tho..
 
@Gordon it shouldn't be so tricky to be productive, you might actually be able to use the builtin help/manual pages to learn about it ...
 
morns
 
maybe not :)
(gdb) help watch
Set a watchpoint for an expression.
Usage: watch [-l|-location] EXPRESSION
A watchpoint stops execution of your program whenever the value of
an expression changes.
If -l or -location is given, this evaluates EXPRESSION and watches
the memory to which it refers.
 
@Jimbo no idea. I usually dont use the brackets though but just RUN /some/shell/command -with args and I am not sure why you wanna exec it through bash instead of using composer directly. have you tried that?
@JoeWatkins so the location is the address where it segfaults?
oh no, it says expression
 
7:05 AM
but it's quite simple, in principle anyway ... break at the get_class_entry function, when you hit the breakpoint, print the address of the handler table, set a watchpoint at the address (watch *0x00000000), run the program again, the program may break several times on that address (because it maybe used in initialization of engine and re-used at runtime, and because the memory may change state more than once in an acceptable expected way) ...
you'll eventually see a break that doesn't look right, the memory may point to a nonsense address, or be null or something like that, at this point you can backtrace and see how you got there ...
am I making sense ?
 
you probably do, but I need time to wrap my head around it
 
@FélixGagnon-Grenier The only thing I've figured out is to do the docker-compose and then && docker-compose run <name> composer install
So you give that as the full command to run in the readme
 
in general, I know how to use a debugger in java and php, so breakpoints and watches are not new to me. just using gdb feels alien
 
gdb feels like a debugger to me, everything else is fluffy fashion nonsense ...
 
hmm, watch -l zend_get_class_entry gives me Cannot watch constant value `zend_get_class_entry'.
 
7:11 AM
you break at zend_get_class_entry, so that you can get the address to set hardware watchpoint ...
 
ah. ok. now I got Breakpoint 1, zend_get_class_entry (zobject=0x7fffed818ae8)
 
so break zend_get_class_entry, then run, then when you hit the break, print the address you are interested in (the handler table of the zo), it'll say something like 0xF0F0F0F0 (only a real address), then watch *0xF0F0F0F0, then optionally clear the break at zend_get_class_entry and then run the program from the start ... ignoring breaks at zgce (watchpoint breaks are distinct)
watch *addr is how you set a hardware watchpoint at specific address, and you want to use hardware watchpoints because software ones are slower than coastal erosion ...
 
but wont that give me the same backtrace that I get from typing bt when the segfault occurs?
 
eventually, but it will also break every time the memory is changed ... one of those traces is going to tell you what is happening ... but not the last one that you get when the fault just occurs ...
maybe the one before, or the one before that ...
 
morning
 
7:15 AM
how do I print the handler table of the zo?
 
it's usually obvious in which frame things go wrong, and it's usually the next frame, or the next frame +1 that is where the fault occurs ...
the handler table is part of _zend_object_value, which is part of the _zval_value
&zobject.value.obj.handlers
I think ... but php5 ...
 
hm, I dont know the commands to do that. let me find a tutorial
 
do what ?
print &zobject.value.obj.handlers
in the first break at zgce should give you the address you are interested in ...
you might also have luck setting the watch on the address of the zobject itself ...
or on the refcount part of the struct ... it depends what you find on the first attempt ... I probably would have started with the handler table address
 
I can see that the zobject address changes between the breaks
 
what do you think that might be ?
 
7:21 AM
different objects probably
 
are you initializing many objects ?
 
yes, at least three. a pecl http client, a pecl http request and an observer that I wrote. And I think it is the observer thats failing me on 5. it works in 7
 
okay so when you hit the first break at zgce, print the name of the class entry to check you're in the correct frame
oh
okay so in the backtrace, somewhere will be a vm function (execute_ex or execute_internal or whatever), goto that frame (frame 2), and look at execute_data.opline.lineno and stuff to determine where you are in the script ...
 
mornin
 
or, you could source .gdbinit from php-src root ,and do "zbacktrace" ... but that doesn't always work ...
 
7:25 AM
@FélixGagnon-Grenier docker-compose run php /bin/bash -c "composer install -d /appdata && /appdata/vendor/bin/phpunit /appdata/test/"
I just had to add this to the README "if it's your first time running the container"
 
:37897882 #0  0x000000000084eb14 in zend_get_class_entry (zobject=0x7fffffff95e0) at /tmp/php-build/source/5.6.30/Zend/zend_API.c:237
#1  0x0000000000899a28 in ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER (execute_data=0x7ffff7f76700) at /tmp/php-build/source/5.6.30/Zend/zend_vm_execute.h:33483
#2  0x000000000088a0c0 in execute_ex (execute_data=0x7ffff7f76700) at /tmp/php-build/source/5.6.30/Zend/zend_vm_execute.h:363
this?
 
or frame 1, both same execute_data ...
execute_data.opline.lineno and execute_data.op_array.filename/line_start/line_end will help to zero in on location ...
 
line 52
 
if it's a single file thing, then you should be able to tell what object is being initialized, if many files, check op_array.filename ...
 
yes, it's a test stub I use
cool
 
7:30 AM
okay, so continue until you get to the right break
then in the correct break, you're interested in address of ht, or the address of zval itself (function param) ... once watchpoint is set, run program from the start ... you may miss the interesting frame on the first run, so take note of how many times you continue ... the interesting one will be ultimate or penultimate break most likely ...
gotta go afk, school run ...
 
ok, I think I got it now. will fiddle around. thanks a lot. helped tremendously
 
7:56 AM
!!remind amphp logo in 24 hours
 
Reminder 37898403 is set.
 
!!remind are you doing the logo? in 25 hours
 
Reminder 37898415 is set.
 
!!remind @WesStark isn't doing the logo :( in 26 hours
 
Reminder 37898461 is set.
 
Anonymous
8:02 AM
mornin
 
indeed
 
\o
 
are you still planning on being a policeman, or are we onto fire fighter, or astronaut today ?
perhaps cowboy ?
 
me?
 
no Jay
 
Anonymous
8:04 AM
aha i'm already on the waiting list for fire fighter, police are still not recruiting
 
Anonymous
And astronaut, my muscle mass is far too heavy for the ship :/ sucks.
 
village jay
macho macho man
 
I'm surprised there's a queue for that ...
 
Anonymous
Down in Devon there's a queue for everything -.-. 6 month waiting list
 
it should be easy to find you a cowboy costume .... the upper age limit on those kinds of costumes is like 13 usually ...
 
8:06 AM
mornes 11 o/
 
Anonymous
yo pedorth
 
so for the moment, you are one of us ... one of us ... one of us ... one of us ...
wait, I thought you were moving up north to go into the police ?
 
ThW
Morning
 
maybe there's no waiting list for fire fighters in big cities, possibly ... have you looked at that ?
I can still talk to a fire fighter ... I prefer that ... and it's excitement from the first shift maybe ...
it's also more heroic than issuing penalty points or dealing with drunken youths ...
 
Anonymous
8:11 AM
I wouldn't move up north for fire fighter, not much progression opportunities. And yeah, if I manage to get into one of the forces around Chester, then i'll be relocating :)
 
oh so you apply to specific forces, or you apply and they tell you where they have positions ?
I think you are not thinking outside of the box with the fire fighter thing ...
 
ThW
 
Anonymous
No you apply to specific forces. It's actually a BS system. Every force has a different website and recruiting system, there's no global vacancy system.
 
Anonymous
@JoeWatkins I know I know, I could be a stripper on the weekends. I'm just not that confident yet
6
 
you could do that ... but there's some opportunity to earn a decent wage, you excell at it, do it for ten years or whatever, then you have 10 years experience as a real world fire fighter, this qualifies you to provide very expensive consultation services to builders/architects, do firechecks for landlords, there's a million self-employment opportunities, or opportunities to work in some relevant field earning a lot of money without actually risking your life any more ...
 
8:14 AM
@ThW what was that called?
 
ThW
Grisù is the title character of an animated television series of the same name. The character was created by brothers Nino and Toni Pagot (best known as the creators of Calimero). It first appeared in a 1964 black-and-white animated series of commercial shorts for the Mentafredda Caremoli candies, part of the television program Carosello. A television series consisting of 52 episodes with the adventures of Grisù aired for the first time in 1972. The character also named a series of book for children. The protagonist of the series is a young dragon named Grisù that, despite being the youngest of...
 
Anonymous
@JoeWatkins eh, does not sound incredibly boring to you?
 
right. those were the days
 
sure, if you work in Devon ... but what if you work in Dubai, or some other fast growing city like that ... it's what you make it ...
 
Anonymous
that's a good point, I guess
 
Anonymous
8:18 AM
you're not just a pretty face @JoeWatkins
 
I think the fire fighter thing presents more opportunities long term than the police ...
what happens when you join the police is you sign your life away, like the army ... you either work there for your entire life, or half of it, then become a security guard, or at best a body guard ...
 
Anonymous
That's a bit broad.. If you stay on the beat, then yes. But there's so many different branches that can set you up for careers too. Firearms, dog handling, air etc..
 
the skills of a fire fighter are valuable outside of the trade of fire fighting ... once you have mastered the trade you have really great opportunities, to either make money ... or if you're not into that, go train or work anywhere in the world, areas of conflict maybe ...
 
and let's not forget… the hose
 
although the way that things are going there, you may soon have to crack down on those pesky users of encryption :x
 
8:25 AM
 
#nothomophobic
 
@JayIsTooCommon well sure, but outside of the police force, the skills of a firearms expert, or dog handler are not really that useful ... there's some opportunity, but since the main users of firearms and aggressive dogs in the whole country are actually the police ... that's a considerable restriction ...
 
Anonymous
@pmmaga I'm trying to get away from the desk though. Would be interesting mind
 
Anonymous
@WesStark hahahah
 
8:27 AM
@Wes your elephants are getting out of control
 
@JayIsTooCommon aye, forgot that that was the main goal :P
 
indeed
 
@WesStark hahaha
 
@WesStark ahhahahhaha
 
0.000000781024968 T
it is the answer to everything
 
Anonymous
8:30 AM
@JoeWatkins again, a good point.
 
Anonymous
Stop giving me reality please. Now I know how @WesStark feels.
 
life sucks
 
Moin
 
Anonymous
yo ofthedead
 
8:31 AM
@WesStark seriously i can't stop laughing i just spat coffe on my desk :P
 
Anonymous
Who would have thought a squid with a thong would be so funny
 
IT IS AN ELEPHANT
 
stop teasing wes, he's sensitive ...
see, shouting ...
 
i am
 
:P
 
8:33 AM
if you were hiring tree surgeons to start work at 9am in your garden, with fucking chain saws, would you tell your neighbours ?
oh and a chipper ... goood ....
 
i wouldn't unless saturday or sunday
people are supposed to be awake at 9 am
 
maybe it's because I'm old ... but I consider old people because I mostly live around old people
retirement/own your own house age ...
 
old people usually wake up early
 
some aren't well ...
stop arguing with me, my neighbours are shit bags ... you have to agree ...
 
well, then tell them if they are ok with that. at least the older ones
 
8:37 AM
If you used a class to handle form data for a specific form, would you group it by context or by the fact it's for a form? E.g. /Login/Form or /Form/LoginForm or something similar. Unless there's a pattern name for it I'm unaware of
 
depends
 
It's the first class of it's type if that's any help. It's for a rather specific form. Not just logging in like the example.
 
trying to wordify thoughts
 
i wouldn't group them at all. form validation is just type validation and conversion, sanitization
what i do is validate/sanitize data procedurally in the controllers
 
I do that now, but I dislike having to look through large controller methods for larger forms
 
8:43 AM
I don't think there's a correct answer
 
Never is with PHP :P No worries, I'll stick with procedural for now I think. Thanks anyway#
 
except Form/LoginForm has one too many Forms in it ... but you can reason about it either way ...
 
Anonymous
That's why i'd have Form in the namespace with the class name Login. Not sure if it's right to rely on namespace, but I do it all the time
 
@Sean perhaps you can move some validation in the services/DOs?
 
what if you're writing a form based application, where nearly every class you create could reasonably have Form in the namespace ?
 
8:46 AM
@WesStark With this code, that's blue sky thinking
 
Anonymous
@JoeWatkins go away with your good points.
 
@JayIsTooCommon go away with your ugly face
 
Anonymous
Should a back-ender even be aware of front-end forms? Shouldn't it be generalised to a POST/PUT for whatever subject?
 
BAM right out nowhere
Also I've not tried this thing really before, I was looking at how CodeCollab did it, with a route for rendering the form, and a route for processing
 
depends what you mean by frontend ... you might mean frontend at server or client side ...
 
8:50 AM
the processing route loaded a form object with request data. if it failed validation, it would pass that object back to the form render route and let it pre-fill previously entered fields
I have two routes for viewing and POST handling, but currently passing data from the POST route to the GET routeis getting annoying when the form has a lot of inputs
Maybe the lesson here is don't trust @PeeHaa's code :V
 
Anonymous
I guess it would be smelly to use the subject VO/Entity for holding invalidated data
 
Anonymous
19 hours ago, by JayIsTooCommon
Common sense is a form of intelligence that isn't very common
3
 
Would you class it as a VO though? I mean it's purpose is to take in a request array, provide methods to get the specific form data back and to check if it's valid or not. Maybe that breaks SRP tbh
 
regarding the segfault I mentioned a few days ago. I got some more information and posted it in https://github.com/krakjoe/apcu/issues/245

can anybody of you guys make sense of the behaviour described?

we are still in the process of getting valgrind and php-debug setup in production to get a proper valgrind trace... its the first time we do it so it might take a bit more time... just in case noone of you has an idea whats going on with the information we have right now.

//cc @bwoebi @NikiC @Danack @JoeWatkins
 
oh god, I really hate apcu
I can't guess
if I didn't say anything useful by sunday, poke me
 

« first day (2449 days earlier)      last day (2503 days later) »