« first day (1721 days earlier)      last day (3213 days later) » 

12:00 AM
right, that's set to 0
 
then it just should work?
 
but how do i assign the array to args[x]?
 
ZVAL_ARR(&args[x], array); ?
or what am I missing?
 
> Assertion failed: (((zend_refcounted*)(ref))->u.v.type == 7 || ((zend_refcounted*)(ref))->u.v.type == 8), function gc_possible_root, file /Users/tjerk/Documents/php-src/php-src/Zend/zend_gc.c, line 226.
hmm
 
show me your current code?
 
12:03 AM
hang on
 
ah obviously
 
probably heh
 
@Ja͢ck try ZVAL_COPY(&args[2], array); and then add a zval_ptr_dtor(&args[2]);
 
one before and the other after the call?
 
yeah, obviously^^
 
12:10 AM
that doesn't crash, but the array is not passed by ref
 
no? hmm
 
it seems to actually copy the array heh
 
oh
well, are you wanting to modify the array you're currently iterating on?
 
well ... that's a good question hehe
 
not sure what you're trying to achieve, hehe
 
12:12 AM
okay, but wait ... does ZVAL_COPY() actually copy the whole array, or what does it do?
 
ZVAL_COPY copies the array and adds a ref…
 
copies the array ... you mean, just the base structure, not all the elements yeah?
 
yes^^
 
okay .. then that should be good enough :)
 
I mean the pointer
please, tell me what exactly you want to do
 
12:14 AM
awesome .. then i shall update my test cases and bring this up for review ;-)
ah ... it's an implementation of .every() and .some()
determining whether a predicate holds for all or at least one element in an array
 
then I don't see why you want to pass the array be ref?!
 
a bit more can be seen here.
Yeah, me neither to be honest .. but I was curious heh
 
don't do weird things :-P
 
lol
 
@bwoebi go easy. Collaborative. Keep positive.
 
12:23 AM
@ircmaxell It's just the 140 char limit, so had to write two tweets. I'm not going to say his code would be shit. I just mainly like the arginfo summary ;-)
not that it's bad; it's just "eih, well, okay… hacked together".
@ircmaxell but maybe I conveyed a totally other message than intended?
if that's the case, tell me, and I remove my two tweets.
 
phew, for a moment i thought my future self made commits on the origin causing my push to fail ... i'm glad to know it was stupidity.
 
The first one was a bit aggressive...
 
@ircmaxell and the two read together?
 
The second is better
 
@bwoebi @ircmaxell @nikita_ppv so let's merge arginfo.php into php-cfg, add docComment support and make it do similar type-checking scans
@ircmaxell Anyway, I think that's a great idea, no?
 
12:37 AM
No, make a separate lib that uses php-cfg
It shouldn't be anything beyond the actual graph and standard transformations
Like SSA and variable flow graphs
The analyzers should build as a dependency
Speaking, I should go to a bar and work on the SSA impl
 
Though, I don't really get why the sql-inj finder is in the cfg repo instead of a separate repo. @ircmaxell
 
what are you guys talking about?
 
@Ja͢ck github.com/ircmaxell/php-cfg
 
thnx
 
@bwoebi it won't be for long.
I need some application that can guide the design
By putting itminmthe same repo, it lets me iterate faster. Then when it gets more mature, split them out
Notice they have separate namespaces. Preparing that ahead of time
 
12:51 AM
@ircmaxell a full whole-program static type analyzer would be actually nice…
 
OK, go for it
I am choosing to start small and we'll defined
 
I mean as a long-term goal. not now.
it's impossible to go from now to that.
 
It is a long term goal of mine
I want to build a few tools. A security scanner, a type analyzer, and an upgraded recki
Possibly even a jit compiler
 
ambitious :)
 
when you have very strong whole-program static analysis, you maybe even can do an AOT compiler maybe?
@Ja͢ck definitely. I'm fascinated by what Anthony is doing!
 
12:56 AM
@bwoebi hence upgraded recki
 
@ircmaxell ah okay.
 
The weird part is I will have more ability to do this stuff soon, but less time in which to do it.
 
@ircmaxell Why?
 
Can't talk about it much yet
But suffice it to say, it is good
 
1:15 AM
@bwoebi Did you happen to try building a shared extension on Windows?
 
@Trowski eih, no.
 
Whatever I guess. I was just looking for some consistency.
@bwoebi Maybe I could just leave the functions for now, but export the ce's as well, does that make sense for now?
 
1:31 AM
@Trowski Uh, I wouldn't like an API we just introduced and should be removed to leak into release first…
 
I could just leave zend_get_default_exception() and zend_get_error_exception() then.
And export all the ce's.
 
yeah
 
heyyy :D
just some question here, I'll leave the script here, this does not work on lower versions of IE and firefox, but works perfectly on latest IE and google chrome
<script type="text/javascript">
var cutTextareaBtn = document.querySelector('.js-textareacutbtn');

cutTextareaBtn.addEventListener('click', function(event) {
var cutTextarea = document.querySelector('.js-cuttextarea');
cutTextarea.select();

try {
var successful = document.execCommand('cut');
var msg = successful ? 'successful' : 'unsuccessful';
 
@bwoebi Should I add a deprecated note above the other functions? How does that sort of thing work?
 
yes please add some notes, I mean tried it on the lower version of IE and firefox, but nothing happens, it does not highlight the text inside the textbox
 
1:41 AM
@Trowski yeah, just write into header and .c file that one shouldn't use them but the externs.
 
1:59 AM
@bwoebi Seem reasonable? github.com/php/php-src/compare/…
 
@Trowski Uh, I'd keep the naming convention of the exported symbols though…
error_ce may well be clashing with a file's static context.
 
Oh, good call.
 
I was reading developerscollege.com/2015/06/… but the section about "Abstract syntax tree" seems bugging me
Especially this line "Adding a JIT compiler would make PHP7 even faster.". I thought that I read somewhere that it isn't that simple
Any thoughts?
 
I can't stop laughing... gfycat.com/SelfassuredDefiantBrant
5
 
DNC
@HamZa check skype
 
2:06 AM
@ircmaxell omg this is horrible
 
@ircmaxell poor being :(
 
DNC
@HamZa ?
 
@ircmaxell :-/
 
@bwoebi So then the next question: should I clean up all the uses of zend_exception_get_default()? lxr.php.net/…
 
@Trowski I'd say yes, but I'd ask @NikiC too.
 
2:49 AM
Hello guys
I have a very basic and controversial as well
As many developers at the starting point use default image library gd2 but is there any better option
Is there any other php library which is fast ,efficient and good in image processing in terms of quality
 
@John You could use GIMP from the command line... Not saying it's "better", just an option
 
Actually my concern is about image cropping and resizing
Looking for a library which can give final output a "wow" feeling
 
lol
 
Will gimp work in that way?
 
You can't just improve the quality of an image, so the wow feeling you're searching for doesn't exist
Otherwise try ImageMagick.
 
3:17 AM
@bwoebi @NikiC Any thoughts before I merge? github.com/php/php-src/compare/…
 
 ZEND_API zend_class_entry *zend_ce_throwable;
+ZEND_API zend_class_entry *zend_exception_ce;
@Trowski prefix or suffix the _ce?
 
@bwoebi Hmm.. I didn't notice you prefixed it, bah.
It was a suffix before.
 
@Trowski I didn't prefix it…
 
user4268046
Is there a visibility in php similar to java's protected?
 
No, throwable I guess I can blame on myself :)
I was looking at zend_ce_division_by_zero_error when I said that.
 
user4268046
3:20 AM
Basically some way to allow specific other classes to access it.
 
@TheMineBench Yes, PHP has public, protected, and private.
 
user4268046
Yes, but protected in php only allows sub/super classes to access it.
 
@Trowski I copied from you ^^
 
user4268046
Whereas in java protected allows other classes in the same dir to access it.
 
3:22 AM
@bwoebi And I copied from the other interfaces. Alright find-and-replace, lets make them prefixes.
 
hehe
 
@TheMineBench Yeah, PHP has no friend or package class concept.
 
user4268046
Oh... so there is no way to achieve this?
 
@TheMineBench What are you trying to accomplish with the friend class?
 
user4268046
I have a date class that has some methods that should only be accessed by the manager, and some that should be editable by anyone.
 
3:31 AM
Is there a way you could put those methods into another object the date class would hold and would only be exposed the manager?
Maybe passed to the constructor of the date class by the manager, then not made available through the date class at all?
 
user4268046
Sorry, Data class
 
user4268046
Not date x)
 
Ok, doesn't change the question above though.
 
user4268046
Yeah, I suppose I could do that... but meh, having a "friend" system would be nicer x)
 
Generally I've found that if the design requires a friend class, then the design might be flawed.
 
4:28 AM
Yea you can't write PHP code like you write Java classes. The JVM allows you to share things across/within packages. PHP has no such concept. It's shared nothing architecture. So there's no point in trying to give classes visibility in PHP. If they aren't included, they aren't visible to your code.
 
4:41 AM
lol
 
5:03 AM
@Trowski just ping @NikiC so that he can look if that's what we wanted or if he has any objections whether something should be retained…
 
@bwoebi Yep, I'll wait for him to reply before I merge.
 
@Sjon while you're here… It's always annoying to see how your syntax parser is completely outdated :-P (when testing PHP 7 features) ^^
 
morning :D
 
yeah, morning :-)
@Sjon also… what's the version segmentation fault tab is against?
 
it's 5.6.0 now. And for the syntax-parser; I agree
 
5:14 AM
syntax-parser should be 5.5 currently, right?
 
but it's not my parser and I prefer to target stable versions primarily
its ace9's default php worker
 
@Sjon yeah, which wasn't updated since june last year…
 
@bwoebi If you upgrade it I'll install it :)
 
@Sjon I have no idea what type of generator they use to generate the parsing file
 
@bwoebi me neither.. but it's possible to find out
 
5:20 AM
@Sjon looks like php.js
and doesn't seem like well-maintained…
 
@bwoebi github.com/kvz/phpjs/commits/master looks pretty active?
 
not that
php.js
niklasvh/php.js @kelunik
 
gud morning guys...I want to add radio option to my website any ideas how to do that??
 
@bwoebi hm?
 
5:25 AM
@bwoebi sry I'm a bit busy, I'll have more time later
 
@Sjon no problem… one just sees you so rarely in this room :-)
 
@user12688 You mean like an option to translate TCP/IP to radio waves?
 
@bwoebi Yeah, but why do you pings me with that?
 
@bwoebi yeah I didn't have enough reps to speak :X :D
 
@Sjon oh, looks like you recently repwhored a bit :-)
 
5:28 AM
@bwoebi I did indeed
.. contribute to so
 
@Sjon That's no excuse. You could have just pinged one of us if you have a single question or answer, I think 2 up-votes would have been no problem. :P
 
@kelunik … and to ping us, he'd first have to be in this chat, hehe
 
just like this gaana.com/radio
 
@Sherif and the internet on radio, right?
 
5:29 AM
@bwoebi exactly
 
@bwoebi on twitter or something else, like Sebastian did. ;-)
 
@Sherif i like that
 
@kelunik mh ^^
but actually, getting 20 rep isn't hard^^
 
@bwoebi It's called WiFi
 
@bwoebi Yeah, that's also true ^^
 
5:31 AM
@bwoebi everything is easy if you know how
 
@Sherif mh… radio is really ranging until 3 GHz^^
 
@bwoebi Just because we increased the frequencies doesn't change the fact that we're using a 100+ year old technology to make TCP/IP "cool"
 
@Sherif meh… sending raw data over Ethernet protocol ftw.
 
Yes, let me get out my 2400 mile ethernet cable and connect it to the data center.
One moment...
oh wait... ethernet has maximum range of 05. miles
DAMN!
I be screwed!
 
I said Ethernet protocol…
 
5:34 AM
Oh
You did indeed.
 
the protocol communicating via MAC addresses…
 
I liked it better when it looked like I could read.
 
haha
also… Ethernet cable… optical fiber is also an ethernet cable…
 
0
Q: Introduce Ctrl + Arrow to reply to messages in chat

kelunikCurrently, Ctrl + ↑ / ↓ has the same effect as ↑ / ↓, it edits messages. It would be nice, if Ctrl + ↑ / ↓ could be changed to quick-respond to other messages instead. This avoids having to switch from keyboard to mouse everytime one wants to respond to a specific message.

^ just in case anybody else misses that. /cc @rdlowrey
 
Fiber optics doesn't change its maximum range, btw.
 
5:37 AM
@Sherif isn't it more like 20 km?
 
No, it's more like 2, but you still need a repeater to strengthen the signal.
 
definitely not 2^^
 
Well, it depends on how much bandwidth you're transmitting.
For standard 100 Mbps for example you would be lucky to get 2
 
you can transmit a one TBit/s via fiber over 20 km.
 
With 10Gp you're looking at more like 500 meters
 
5:39 AM
It all depends on the fiber cable though.
 
Not really. Fiber optics are fiber optics.
 
It's not the cable that makes the range longer or shorter.
hint there's a bit of an art to building out these fiber optic back bones ;)
 
it does. The cable determines how much energy is lost
 
http://css.dzone.com/articles/streaming-radio-player--- can any one explain the below three lines to me from that site.... 'url' => 'http://www.di.fm/eurodance',
'br' => 96,
'stream' => 'http://scfire-mtc-aa06.stream.aol.com:80/stream/1024'
 
5:42 AM
the problem with sending so much data is that we don't even have that much data to send :-D
 
its inside an array
 
@bwoebi What Internet do you surf? According to Cisco, we've reached nearly a Zetabyte of data transmitted over the Internet annually.
That's roughly 16 Pbps
16 times the world record you mentioned
 
@Sherif sure… but you don't get all that data together to a same node.
It's distributed all over the place
 
That's why it's called the Internet
 
if you'd expose one IX at 16 Pb/s, he'll break down under the load.
 
5:48 AM
Right, one guy on the network sending 16 Petabits of data per second to himself.
Clearly that's what I was talking about.
 
Also…
...
ehm
1 ZB/y is about 50 TBit/s @Sherif
(one year having about 32 million seconds)
 
> Total Internet traffic has experienced dramatic growth in the past two decades. More than 20 years ago, in 1992, global Internet networks carried approximately 100 GB of traffic per day. Ten years later, in 2002, global Internet traffic amounted to 100 gigabytes per second (GBps). In 2014, global Internet traffic reached 16,144 GBps. Table 1 provides a view of the historical benchmarks for total Internet traffic.
You have to read the whole thing. I don't remember all the numbers off the top of my head, but I know we've reached ~1 ZB of global internet traffic
 
yeah, what I'm saying.
 
good moaning
 
Ah right, it was 16K gbps not 16K tbps
you're right
So I was off my an order of magnitude... Sue me
 
5:53 AM
@Sherif and generally an IX has capacities for like up to ten TBit/s maximum.
 
@bwoebi What does that have to do with anything? We're talking about global traffic.
 
the current generation doesn't even know what it's like to dial in anymore and how you should be prudent when it comes to downloading / uploading ...
 
@Ja͢ck it does (the latter). Mobile internet.
 
heh
Mobile might as well be dialup.
 
My 4G mobile connection is shitloads better than my old dialup
 
5:56 AM
I've seen some pretty shocking numbers from the mobile carriers about what their average speeds per client were a few years ago.
 
@Sherif yeah, getting exponentially faster…
 
@Ja͢ck Yea, that's if you're getting 4G. Most people don't get 4G all the time.
 
I know, I'm privileged ;-)
 
Half the time my phone isn't even getting 3G
...let alone 4G
 
@Sherif I'm waiting for 5G.
 
5:57 AM
probably because everybody else around you is hogging it up with their spotify haha
 
Spotify doesn't even consume that much really. I've downloaded most of my playlists
 
I want Infinite G!
Oh, you can do that .. shows how much I know lol
 
Spotify doesn't need that much data, even things you didn't download but listened to are all cached locally.
 
I don't spend that much of my 3GB traffic per month anyway, unless I'm on the train for half a day
 
heh, I could consume 3GB in about 1 day
 
5:59 AM
When inside it switches to WiFi ;-)
 
but I also use my phone for work and everything else
 
do you carry battery packs with you? heh
who's scared of 23 if-elseif statements .. not i!
 
@Ja͢ck nah, my battery is generally pretty good. It's when I watch a lot of netflix that it'll drain pretty quick, but even then should be enough to last me the day.
On idle my phone can last about 10 days.
 
what kind of magic phone is this then?
 
nexus 6
 
6:04 AM
really, 10 days? that's absurd, even my BB didn't get that.
are you sure you're not visited by the recharge fairy at night?
 
heh
No, theer phones are ultra conservative in sleep mode.
With moderate use you probably get about 3 days out of it. Excessive use you should still manage to get a full day.
I still have my old Nexus 5 that I bought 2 years ago and the battery is still pretty decent.
Samsung makes damn good phones.
Or are these manufactured by LG? Hmmm I can't remember.
 
Well, my S2+ almost never survives a single day. ^^
 
These phones are quite comparable in quality to the new iphones
not quite the same price tag though
 
lol
 
6:16 AM
Volkswagen Feature .. I like it!
 
That's priceless
 
@Sherif Nexus 5 is LG :)
Nexus 6 is Motorola ... that's so odd, why do they pick a different manufacturer each time?
 
@Ja͢ck Yea, I just noticed the logo when I looked on the back of my phone
 
Nexus 7 is Asus ..
 
@Ja͢ck Probably because they bid on the contract?
Whoever has the lowest bid wins.
 
6:19 AM
Probably .. it's interesting how they've streamlined it such that they can switch manufacturers like that
 
Also probably has something to do with the fact that Google bought out Motorola Mobility a while back.
 
how to upload files using php
suppose we have files 6
i am uploading file1 and file6
in my database we have fileds like this file1,file2,file3,file4,file5,file6
if we upload file1 and file6 it should go to file1 and file2
is it possible
?
 
Yes
Also, you really ought to normalise your database table.
Pro tip: when you see anything called "<name>1, <name>2, etc.", assume that you're doing the wrong thing.
 
may be
how
is it possible
 
How to normalise? By reading up on database normalisation
 
6:28 AM
i thinks this is simple tasks for experts
 
what you thinks about experts doesn't really matter.
it's you who has to do it :)
 
i not an expert
 
Hmm, after reading this, I wonder, isn't tilde expansion as easy as getenv('HOME')? ;-)
 
@madu I'm not an expert either, but that doesn't mean you can't learn youtube.com/…
If you follow the simple explanations in those videos you will find that database normalization really isn't all that complicated.
It just requires a bit of thinking first and then once you apply it - it becomes second nature.
 
The env can be overridden
 
6:35 AM
or normalisation for the British folks ^.^
@CiaranMcNulty sure it can, but why
 
@Ja͢ck To hell with the English! We speak American
<insert evil grin here>
 
@Ja͢ck you can also use eval echo ~ and let the shell do the work
Hm that is in backticks ^
 
o.0
 
Miiiiight be unsafe ;-)
 
It's not a question of safe or unsafe, it's just .... why man?
 
6:41 AM
lol
 
PHP provides you with functionality to deal with the environment. Why opt for a less orthodox approach when a more adopted one is readily available.
In either case PHP's environment requires that you explicitly import as it is isolated from your shell.
 
preg_replace('/^~/', getenv('HOME'), $path); boom!
 
Yea, but whatever you got from getenv you had to have explicitly placed there with setenv.
 
assert(getenv('HOME')); //... :)
Perhaps I should mention that I'm running cli heh
 
That would give you a parse error.
 
6:45 AM
Though, even under Apache you will most likely see that variable.
 
Sure, but it is still imported by the SAPI and configurable
 
Yep, I don't see a problem with that.
You could also do HOME=/path/to/nowhere php script.php ... I like flexibility :)
 
heh
 
@Ja͢ck But you can't do HOME=/foo echo ~, at least ~ will remain pointing to your home directory.
 
Yeah, you can't fool the shell .. :P
 
6:50 AM
@Jack getenv('HOME') covers tilde expansion sure, backticks + eval lets you do generic path expansion
 
@Ja͢ck Really? I seem to recall a not-so-distant CVE that says otherwise
 
@CiaranMcNulty eval() is just overkill imo
@Sherif I didn't mean to make that come with any amount of authority :)
I'm not trying to save my script from all the evils in the world
 
I was specifically talking about the Bash shell.
You can fool the shell ;)
 
Ah yeah, I remember that. Of course, in the context that I said it, though, it was more hypothetical.
 

« first day (1721 days earlier)      last day (3213 days later) »