« first day (2389 days earlier)      last day (2559 days later) » 
00:00 - 19:0019:00 - 00:00

Wes
7:00 PM
 
hello, In php extension, I have a function to get object class as
``` zend_string *class_name;

if (!(class_name = Z_OBJ_HANDLER_P(obj, get_class_name)(Z_OBJ_P(obj))))
return NULL;
return ZSTR_VAL(class_name);```
With this, I get an error - Zend/zend_string.h(122) : Freeing 0x0000000103414c60 (56 bytes), script=-
I'm running PHP 7.1. Any idea why there is a memory leak here
 
@Wes not yet.
@JAamish do ctrl+k for code formatting. And no idea.
 
Wes
does that look like black pudding?
 
@JAamish Use Z_OBJCE_P(obj)->name to get the class name
Unless you are specifically building debugging functionality
In that case, you have to release the result of get_class_name
 
Yes, it is a separate function to get the class name.
Oh, should I use in this case zend_string_free?
 
Anonymous
7:09 PM
@tereško Have you seen Mr. Robot?
 
Anonymous
I am on S01E05 so far, it's shite
 
@samayo I watched first episode - wasn't too impressed and forgot about it
it has too much cringe for my taste
 
Anonymous
Same here. I was just shocked to see 96% on Rotten Tomatoes ...
 
Anonymous
I couldn't tell if the show got better with the newer episodes or I am missing something else
 
@samayo kinda the same as with Supergirl
 
Anonymous
7:14 PM
Anyway, I've stopped watching it for good. It's pretty generic movie without any redeeming feature
 
@kelunik @bwoebi @Trowski are there any async php frameworks who work with bare callback based flow?
 
@NikiC Another question is, zval *object is a input for a function. When I add add_next_index_zval(&params[0], object);, then I have to also perform Z_TRY_ADDREF_P(object);, otherwise I get a gc_root error. Is this because a reference of object is used, but the ref count is not incremented.
 
Anonymous
Oh God. I knew I wasn't gonna watch the movie/series when I saw the trailer alone
 
Anonymous
@tereško Is there something you have seen this month that is worth watching?
 
@Wes that looks exactly like black pudding
 
7:18 PM
@PeeHaa uh … ReactPHP?
 
I mean just plain bare callbacks not implementing promises like that
 
Wes
@Danack we call it sanguinaccio, it's pig blood, chocolate, pig fat bits, sugar
 
@PeeHaa well, how should that even work without some concept of placeholder?
 
@Wes and people say italians have a clue about cooking
 
PHP.net website down! – #74523
 
Wes
7:20 PM
@FélixGagnon-Grenier i didn't say it's popular
 
@bwoebi Simple callback param?
 
¯\_(ツ)_/¯
 
Anonymous
@Jeeves stop lying
 
@samayo I am not lying, answer my question!
 
7:21 PM
my money is on they have CORS enabled can't reproduce anymore, in the past I have had problems with that
 
Wes
eating pig's fat is not much different from eating its blood @FélixGagnon-Grenier vocedistrada.it/wp-content/uploads/2016/01/… it's good, but not a fan, not many are
 
@samayo not really. I re-watched some of Babylon5, but that was about it. The rest of the time has been spent on binging on various Warhammer 40k lore videos (I can provide links to channels) and all of the stuff from Isaac Artur
 
@JAamish yes
some function will increment the refcount themselves, some don't. add_ functions fall in the latter category
 
@PeeHaa callback to what?
 
@Wes sounds disgusting. Kinda like a sweet version of "blood sausage"
 
7:23 PM
I think I get what you mean … well, not that I'm aware of @PeeHaa
 
Anonymous
@tereško Never heard of Babylon5. Rating is more than decent. Is it like firefly? Because I would definitely watch that.
 
@tereško WAAAAAAAAGH
 
magicasyncFunc('something', callback)
@bwoebi kk tnx
 
@samayo it's a really good SciFi series, but with outdated special effects.
 
Farscape
 
7:24 PM
^ that one is awesome too (but special effects have aged a lot better)
 
@PeeHaa Everything I'm aware of has some sort of placeholder abstraction. Even Amp is technically just callbacks at the core.
 
I still need to watch Peacekeeper Wars
 
@Trowski Yeah. Writing some blog posts. Am more interested in the user POV
tnx
 
@tereško it helps that a lot of the special effects are puppets
 
Wes
@tereško it's totally not disgusting, but people don't feel comfortable with eating blood... i have no idea why. some thousands years old superstition or something
 
7:26 PM
@NikiC Got it. Another interesting thing I had was


ZVAL_STRING(&func, "is_callable");
ret = call_user_function(CG(function_table), NULL, &func, ...
....
ZVAL_STRING(&func, function_name);
ret = call_user_function(NULL, object, &func
...
zval_dtor(&func);

After doing this, I see a memory leak. However, for the second call_user_function, if I use another zval, for e.g. func2 and dtor it separately, then it works correctly. Is there a way to zval_dtor all references in one call.
 
@Tiffany they were good. But you probably will want to re-watch the original series.
 
@Wes what's it taste like?
@tereško probably will only need the last few episodes. Funny thing is I bought PKW while I was in the middle of watching Farscape then never watched PKW when I finished. -_-
 
Wes
chocolate cream. if you eat it without knowing what it is you would just think it's some kind of cream/cheese with chocolate in it
 
any resources avilable that can teach how to store and retrive images using the path ..... would be a great help
 
Wes
though the version with pig fat bits in it is more suspicious :B but doesn't taste like blood
 
7:28 PM
"paths"...
riiiite
 
@PeeHaa None that matter except for react with event emitter callbacks.
 
@Wes it's not superstition on my part. I suspect it might have some evolutionary-physiology related issue underneath.
 
@PeeHaa there you go
 
Still no clue what path means
 
@bwoebi Simple callback param like JS did.
 
Wes
7:29 PM
could be
 
@kelunik Thanks
 
URL path, query string?
 
@Tiffany am I only one who thinks that the quality of sci-fi series has dropped in past decade ?
 
@PeeHaa i am trying to store and retrive images for a website .... went through few docs suggesting that storing the path of image in the db and retriving the images using the path would be the best bet instead of storing the entire image in the db
 
@Smple_V Ah yes
Store the path (or just the filename)
What is the specific issue you are having?
 
7:31 PM
@Smple_V you should actually store only the filename
the path should be dictated by the configuration
 
It's not different from storing any other thing
 
either i cant find a source that could give a framework to understand how i can use it
but doesnt seem to make much of sense ...any other source that i can look into ?
 
@tereško seems like a lot of the better sci-fi shows were released in the 90s.
 
@Tiffany aside from Stargate:Universe and Expanse - yes
 
@Smple_V What in specific didn't make sense. The TL;DR is: store the image on the filesystem, store the filename in the db
That's about it
 
7:38 PM
@tereško SGU didn't impress me that much, though I was told that it gets better in the latter half of the first season
 
You can hash the image to prevent duplication
 
they turned an action show into a drama and it started out awkward
 
And spread it over multiple directories if you have a lot of images
But it's really not much more
 
@Tiffany lately I have just stuck with audiobooks
 
@PeeHaa thanks for the help and suggestion. Am a newbie in php, having said that if you could let me know how could i proceed in storing and retriving the images using path
 
7:41 PM
there's still plenty for me to watch, Battlestar Galactica, SGA, for example
 
have spent almost like 2.4-3 hrs doing the path thing .... storing and retriving images from db using the blob was't that typical
 
Wes
i could never enjoy battlestar galactica
despite the plot is awesome
 
@Smple_V I am pretty busy right now, but if you can ask a very specific question I might be able to help you or somebody else in here might be able to point you in some direction
 
@Wes try "Lost Fleet" audiobooks
 
7:56 PM
@tereško Have you read/listened to any Asimov?
 
@Tiffany not yet
 
his writing is a bit dry, but it's a break from dystopian scifi
a lot of scifi is dystopian, I find
it's depressing
 
try Lost Fleet then, it's not dystopian
it's a military sci-fi
 
why's paperback 99 cents, but kindle is 7.99 -_-
argle bargle
 
^ also recommended source for audiobooks
 
8:07 PM
@JAamish You should zval_dtor(&func) before you overwrite it with the new function name
 
@proficientEnglishSpeakers is "this [thing] does not contain any [stuff]" ok, or should it rather be "does not contain a"?
 
"it's empty"
:P
 
heh. yeah, this "thing" is not a container per se :D
 
@FélixGagnon-Grenier then "there is nothing in it"
 
@FélixGagnon-Grenier probably 'any', unless it's a specific thing.
 
8:11 PM
@FélixGagnon-Grenier very much non proficient English speaker here: both are correct but the first has more emphasis on the fact there isn't something in it
 
But listen to the @Danack he met the queen once
 
exact sentence: "This study does not contain any media file."
 
pluralise that.
 
@JoeWatkins halp, we can't english
 
8:12 PM
:D
 
Sure what's next?
Ask @DaveRandom?
hahahaha
 
@PeeHaa I think he was Irish
 
@NikiC Thanks. I will do that. One more issue I had was, I'm assume the This variable in execute_data is the one that contains the object. When I use "is_callable" check with this object, it returns success in all cases (even when the function name is incorrect). I see this problem only with the "This" object. Any idea why it could happen.
 
> Mostly just telling @DaveRandom to work on amp/dns
 
8:13 PM
@tereško That's before his sober period
 
Irish and sober in the same sentence. You okay @PeeHaa?
 
@FélixGagnon-Grenier That was the point ;-)
 
@JAamish how are you calling is_callable?
 
Anyway back to trying to parse markdown ihavenoideawhatiamdoingdog.gif
 
8:16 PM
@NikiC, this is the snippet of the code

......
zval params[1];
zval is_callable;
zval func;

ZVAL_STRING_COMPAT(&func, "is_callable");
ZVAL_NULL(&is_callable);
if (object) {
array_init(&params[0]);
add_next_index_zval(&params[0], object);
Z_TRY_ADDREF_P(object); // add_ functions do not increment refcount, do it manually
add_next_index_string(&params[0], function_name);
} else {
ZVAL_STRING_COMPAT(&params[0], function_name);
}

ret = call_user_function(CG(function_table), NULL, &func, &is_callable, 1, params TSRMLS_CC);
 
@JAamish Could you at least format your code as code if you are so inclined on dumping walls in here
 
ctrl-k, or indent with spaces.
 
@JAamish aaaaaaaa
 
@Danack I tried ctrl-k, it ain't working.
@PeeHaa sorry about the dumping!
 
This_is_a_test()
 
8:18 PM
@JAamish Check out the zend_is_callable function. You don't have to do a PHP function call for this
 
This_is_a_test()
 
@Danack hmmm... shit, really? k thanks :)
 
@JAamish I'm not sure why this would behave differently for &data->This
 
@FélixGagnon-Grenier I think it's a collective noun - when you're referring to no elements of something. Which is why sometimes 'a' could be correct, mostly for comedic effect.
 
@NikiC I want to write it as a common function for both PHP5 and 7. Will zend_is_callable work in that case. In in zend_is_callable, is the zval *callable the parameter that takes in object?
 
8:21 PM
@JAamish it takes the callable in the same form as usual (array for methods)
 
> Prison warden: Does this cake contain any saws for cutting through prison bars?
> Prison visitor: This cake doesn't contain any saws.
Not funny.
 
:D ugh sry yeah. not funny.
 
> Prison warden: Does this cake contain a saw for cutting through prison bars?
> Prison visitor: This cake doesn't contain _a_ saw. (it contains 5).
 
@NikiC Got it. I will use it instead! that seems to be simpler
 
@JAamish "PHP 5 and 7" poor soul
 
8:22 PM
/moderate amusment
 
@NikiC :)
 
@Danack hmmm. the potential for moderately good puns is... high
yes, that makes sense. I believe I can get people to accept me changing the stuff.
 
Anyone know what PhpStorm calls the "hide the minimised versions of Javascript files" feature?
 
@Danack like, prevent it from appearing in search results?
 
8:39 PM
curl_setopt_array($this->curl, [
          CURLOPT_CUSTOMREQUEST => $method,
          CURLOPT_POSTFIELDS => $image,
          CURLOPT_HTTPHEADER => [
            'Content-Type: ' . $mimeType
          ]
        ]);
 
I'm having trouble figuring out how to APPEND to CURLOPT_HTTPHEADER not overwrite it.
 
@Danack you old school. y no npm?! :D
@Danack is this related, or am I not undestanding?
oh actually the second answer there seems better yet
 
Wes
@tereško probably the same as:
 
as I keep finding jobs that require knowledge of React, I question whether or not I should learn it. it seems like a trendy new tech that will fade out after a couple years
 
Wes
8:51 PM
usually js stuff has an average lifetime of 6-12 months
 
misspelling the large hadron collider gives it a whole new meaning, and I can't stop giggling about it (/cc @littlepootis)
 
Wes
lol
 
@Wes have you learned it?
 
@Tiffany I believe in react. but tbh, after learning some of them, the time required to learn and use js frameworks lowers drastically
 
@FélixGagnon-Grenier I do in the background, but for dev, and for teaching PHP devs, and embedding the react stuff into a reveal.js slide deck, not using NPM is better.
 
8:59 PM
reconsidering my life
 
Date diff is bad calculated, in same time zone – #74524
 
I hate rebooting, so many windows to reopen
 
Chrome just decided my self-signed certificate I made like a month ago is not trustable even though I explicitly told it it was.
What the crap?
I just checked in authorities...it should be trusting it...
What the balls?
 
Achievement unlocked: Shredding a production database where the last backup is 2 weeks old.
 
@bwoebi Smooth move.
 
9:06 PM
@bwoebi shredded how?
 
@PeeHaa An UPDATE query over the two main tables with a bad WHERE condition
 
@bwoebi what dbms?
 
mysql / myisam
no binary logs or such
 
@bwoebi :)
 
oh fuck :(
Welcome to the club though
 
9:15 PM
@Tiffany I will have to agree with @Wes on this one. You probably would get more benefit from investing time to learn pure ecmascript
 
Wes
you? agree with me? how much alcohol did you have? :B
 
and as a side note - I think most of the technology, that comes out from facebook, could be characterized as "bad practices with large advertising budget"
@Wes two beers
 
mmmm, reminds me I bought a six pack of chocolate porter. I justified it with "it's my birthday, dammit."
as long as I drink it sloooowly
 
Wes
happy birthday @Tiffany :B
it took me 5 days to write a bunch of functions. not because it's complex code, but i wanted it to be pretty
 
yeah ... that
my condolences on your birthday, @Tiffany
 
Wes
9:33 PM
what a nice man :D
 
 
1 hour later…
10:38 PM
haha, I ended up okay, no migraine, and I like chocolate porter
 
 
1 hour later…
11:39 PM
Chrome headless is shipping in M59 and it's full of awesome: http://bit.ly/2pBRLyJ - great hands-on tour by… https://twitter.com/i/web/status/859186457155481600
 
00:00 - 19:0019:00 - 00:00

« first day (2389 days earlier)      last day (2559 days later) »