« first day (1765 days earlier)      last day (3409 days later) » 
00:00 - 17:0017:00 - 00:00

17:01
@NikiC agree 100%
Slightly disappointed nobody has read my TypedArrays source yet. I know nobody has, because nobody's inquired about a certain portion
@NikiC for Composer?
@Andrea I've seen it ;)
hehe
And I did wonder why you didn't just use rebinding or somethin
@NikiC that means I have to put the rebinding stuff somewhere, which I need in multiple places
17:03
@Andrea Yes
And having Voodoo::readBytes($arrayBuffer) is just ridiculous
So I put a discouragingly-long-named method on ArrayBuffer instead
It'd sure be nice if new strings didn't require heap allocations in PHP
Alas, tagged pointer strings are rather unperformant.
@Andrea yes, they are; at least for our needs.
See, what I'd like is if substr() could return a stack-allocated string in some circumstances, for example
That'd require fundamental internal changes though
@Andrea What'd be more useful is referencing partial strings. (instead of copying the whole)
@Andrea What kind of stack
17:16
@rdlowrey Just read through those tweets and I'm under the impression he feels hurt. I also generally don't understand how a tweet can be taken seriously in any direction at all. Seems it's a shit-storm machine for those who like to be involved in shit-storms and for those who wanna-be.
like what I often have when parsing strings… substr on each few bytes. It's slow, but there's no better way (when you have no known separator/widths)
@bwoebi That could work, but it's still a new allocation... wait, is it? zvals!
@NikiC function call stack
IS_SUBSTRING? :3
IS_CHANGE_TO_EVERYTHING_CHECKING_TYPES
yeah...
One of the nice things about bigints is that they would fit in where we already do type checks, so they would add barely any overhead
But string optimisations like these? There's no existing check
@Andrea uh, actually, with ZSTR_VAL macro we can do that transparently
17:24
@bwoebi It'd hurt performance just as much as tagged-pointer strings
(Unless accompanied by significant refactoring to ensure ZSTR_VAL is only used once per string, I guess?)
@Andrea you're actually right
That's the "issue" with the new zend_string*… no indirection pointer anymore
i found out what's the problem that the output of my file is wrong.. more about problem here - check UPDATE: http://stackoverflow.com/questions/32033617/php-changing-object-in-loop-while-iterating-over-it .. it seems that seek() is problematic and is somehow blocking correct reading of second line in my file. what can i do to solve this problem?
optimising any language with uncontrolled side effects must be hell
You can't optimise a->b->c(); a->b->d = 3; by only doing the dereferencing once, if you do not know whether c() changes a and a->b
Today is another of those zero productivity days
It happens...
17:31
Often ^^
too often, recently, for me :/
Yeah
@Andrea hence you need to statically analyze side effects.
@bwoebi you can't always do that, though! if you call into a library, for instance :(
Well, there's a good excuse to not allow shipping binaries :3
@Andrea We could introduce JIT optimizations. Like, an optimize-opcode before the end of each branch in order to optimize that branch for future runs
17:41
even JIT cannot help this specific case
ah?
Anonymous
17:52
@bwoebi ping
@samaYo pong
Anonymous
did u get my stupid question?
what question?
Anonymous
@bwoebi how would you get the keys for the paths in this example chat.stackoverflow.com/transcript/11?m=25108079#25108079
I have a novice question, I can buy a doamin in first ? (when I want buy it, It says me enter nameserver). then should I buy vps (host) in first ?
Anonymous
18:00
@Sajad nope, you can buy the domain first ... host is only required to host your content (web)
@Sajad Nameserver is the thing that resolves dns requests it's not a webserver
@samaYo what enter in the nameserver input ?
@PeeHaa I can change the nameserver later ? (when I buy my own host)
@samaYo I'm not sure what you mean?
Anonymous
@bwoebi did you see the code?
yes
18:03
I kwon this is a room for PHP
but do you use also Java ?
@JesusZavarce here and here are java rooms.
yes but the room is empty
Anonymous
Well, it should be possible to get /index /bar /tar as arrays from $this->routes['GET'] but for some reason it's not possible. I used array_keys() and/or array_values() to no avail
Anonymous
@bwoebi
@samaYo you want array_map("current", $this->routes['GET']) ?
Anonymous
18:12
I want whatever works, but my concern is, why it does not work as is. The $this->routes['GET'] array already contains the path for a key and the closure for the value, so .. the keys should be fetchable it's probably a bug or some weird feature .@bwoeb
@samaYo you're doing array_push, which is equivalent to $this->routes[$method][] = [$path, $handler]; … but you want $this->routes[$method][$path] = $handler; ?!
I updated the question here: stackoverflow.com/questions/32033617/… I don't know why is the output for second file wrong when I use seek... What could be wrong?
Anonymous
Yes, that's a slight error in my part, but even with the way I am doing it, it is possible to get the paths only in one array? @bwoeb
7 mins ago, by bwoebi
@samaYo you want array_map("current", $this->routes['GET']) ?
Anonymous
:)
18:46
hello everyone any codeigniter master here
@bwoebi If Generator::valid() returns false, I should be able to call Generator::getReturn(), correct?
@NikiC do I really need to return properties table from gc handler; they were never initialized by create_object, the class is final and doesn't declare props, there can't be any garbage in there, right ?
@JoeWatkins You still need to return for dynamic properties
this just occured to me ...
And at this point you can really just make it non-final and support properties
It's like, two lines you need to change
18:57
yeah ...
wait, two ?
er, one
The allocation ^^
ok good :)
oh so two
The gc you gotta change anyway, so it doesn't count :)
I think array is a good example
You can show off a lot of the handlers with it :)
see any one can help it's more sql and javascript problem than CI
http://stackoverflow.com/q/32036914/5231396
@NikiC yeah it is ... but ... it's difficult to know how to do it ...
if you use actual handlers, implementing interfaces like ArrayAccess is weird isn't it ?
so I just went with user interfaces that people are familiar with
or do you implement handlers and user interfaces and call handlers from user interfaces if no implementation is provided ...
I guess you're supposed to do that, right ?
19:02
@JoeWatkins Yeah, it gets a bit tricky. Typically you implement both the interface and provide handlers and in the handlers you check whether the associated interface method was overridden, and if so, call it.
aren't properties of an indexed array a bit strange too ?
oh maybe you'd use them for implementing a different resize criteria or something like that ...
it seems simple, but it's really not ... it's quite hard to come up with something that's actual simple, and do a complete implementation ...
everything is complicated when you think about it for a few days ...
19:23
@bwoebi I recompiled PHP 7 and my problem went away. Apparently that was a bug.
19:44
@NikiC there is a problem with doing it that way round, where you check for implementations in handlers ... it means your class's reflection is wrong, with all the clever things people do with reflection (di/service location/whatever the next cool thing is/voodoo that @Ocramius wrote) this can be a problem ...
and it makes it feel awkward whatever way you do it ... plus all the object guard stuff is private ... which makes you think you're not meant to use it ...
@JoeWatkins huh, why?
because you cannot declare that you implement for example ArrayAccess without providing the methods, regardless of the handlers that are set
if you reflect on a class that has read_dimension/write_dimension etc but no offsetSet/offsetGet etc, reflection is wrong ...
or incomplete, it doesn't tell you that arrayaccess is possible
You still implement arrayaccess
the methods you implement just won't be used, unless explicitly called
so in the method, call the handler, and in the handler, check for a user implementation ?
yes
19:49
i have this query in documentation of tokeninput.js
$query = sprintf("SELECT id, name from mytable WHERE name LIKE '%%%s%%' ORDER BY popularity DESC LIMIT 10", mysql_real_escape_string($_GET["q"]));
which is old fashioned
so trying to write in this format
$sql = $this
->db
->select('country_name')
->like('country_name')
->get('nm_country');
how could we pass $_GET parameter in query
is there any reason the guard stuff is private and would it start an argument if I just pushed a change to fix that ?
that
20:03
@Trowski as long as there was no exception
@bwoebi I was using a finally block, seemed to have caused a bug that was fixed.
@Trowski yeah, probably.
@JoeWatkins What do you need it for?
I think there are only two known finally bugs left
@NikiC the memory leak on multiple returns … and?
@NikiC for read_property/write_property/etc handlers where the user provided an implementation
you need to guard against recursion there ...
20:05
@bwoebi The retval memory leak and the thing with the exceptions
@NikiC ah yep
@JoeWatkins not sure I get what you mean there
As in, wouldn't you just forward to the std handlers in that case?
if you are implementing read_property, for example, lxr.php.net/xref/PHP_TRUNK/Zend/zend_object_handlers.c#553 you need to do the same thing the std one does
not if you're not using standard properties, no
a better example is implementing read_dimension on this indexed thing ...
You mean that in user offsetGet doing $this[$key] this should call your handler?
20:10
I think the user is supposed to be using parent::offsetGet
For read_dimension certainly -- it doesn't do recursion protection
but that's going to result in a call to the internal function which is going to invoke the object handler which is not going to invoke the user function which is going to invoke the and so on ...
You don't call the internal handler directly, you call a shared function ^^
Which doesn't do the inheritance check
That's how it works in SPL at least
bah
I guess you should just make it final after all :D
yeah it's difficult to cover all bases without restrictions
20:13
After all it's a data structure, that's something that may well be final
limited amount of time to explain all this ...
I could throw exceptions from write_property etc
yeah final is gonna be simpler ...
 
1 hour later…
21:26
Is it possible I could use my $counter++; as a # total after the Previous Trips label? See my pastebin here
anyone happen to know if there is any appreciable different on performance between:
echo "foo";
and:
echo <<< 'TEXT'
foo
TEXT;
I want to just display the total number after Previous Trips like this: Previous Trips ($counter)
Also, is there a better name for embedded text than 'HTML mode' e.g.
<?php

    echo "this is some code"; ?> __What is this bit called__<?php
    echo "this is more code";
?>
21:43
@Danack no difference (it's exactly the same opcodes)
cool.
@Danack template mode.
So mote it be.
22:07
a short question, when I flag a comment, other see it as flag ? or just modirator ?
which comment do you flagged let me see and tell you @Sajad :D
ok wait ...
@AnmolRaghuvanshi I flagged this comment
how you see it ?
content of that comment is : I don't want to start an editwar, but IMHO ...
only moderators could see it @Sajad
@AnmolRaghuvanshi then you see it normally ?
yup
yes @Sajad
22:16
@AnmolRaghuvanshi alright, tnx
@Sajad i invited you to new plz join the room want some help
@Ja͢ck you are a moderator, right ?
@Sajad I may have wasted many hours on this platform, but I'm not a mod ;)
@coderabbi @mamdouhweb we are all human. Except @nikita_ppv who is currently a rack of servers somewhere in Berlin.
heh
22:19
@Ja͢ck ok, I want to know, when I flag a comment, other people still can gives it voteup ? or they see it as flagged too ?
what exactly do you mean by flagging a comment?
you mean giving it a thumbs up?
@ircmaxell still that joke… even after you've met him … :-D
@Ja͢ck no, flag. {rude or offensive, not constructive, obsolete, ...}
oh .. sure, as long as the comment is still around people can vote
until a mod agrees with the flag and removes it
@Ja͢ck aha, then just I and mod see it as flagged, right ?
22:22
ya
@Ja͢ck ok tnx :-)
It's such a great feeling to see stuff I added to PHP in the official manual :D
intdiv() is documented, \u{ is documented, the octal fix is documented, bitwise shifts are documented, Closure::call() is documented...
As is type hinting of course
@bwoebi just because
:-D
@Andrea And if you hadn't given up on it, bigints would be documented too!
@bwoebi they were not going to pass
22:30
@Andrea they weren't? really?
Why do you think I withdrew it?
user895378
If anyone feels like updating the manual the new ReflectionClass::isAnonymous() method is currently missing from the ReflectionClass docs /cc @JoeWatkins
@Andrea because you quit internals?
user895378
I'm too lazy to bother with it.
@bwoebi Oh, yeah, I quit the same day I started the vote on it
^^
@rdlowrey hah, Reflection
nobody cares about Reflection
...;_;
22:32
@Andrea don't remember what exactly happened back then… So can't tell if sarcasm or not^^
@bwoebi No, serious
I checked the date
So, why are you saying they weren't going to pass?
@bwoebi the vote might actually have passed, but I was starting to think it wasn't going to
I mean, even the scalar type hints passed
@Andrea Yeah, I'd actually liked to know if there were interest or not.
22:36
If scalar type hints can pass, anything can pass!
4
@ircmaxell ... ... ... ... ...
@NikiC okay… then I need to set up the RFC for removing declare(strict_types=1) mode again ^^
@NikiC heh
@bwoebi no way, type checking is useful :(
Nikita just said it would pass!
@NikiC :-P
@NikiC you know I jest because of the enormous amount of respect I have for you
22:48
Perhaps, it was the use of the singular?
22:59
> Warning

> Any output (including whitespace) between a switch statement and the first case will result in a syntax error. For example, this is invalid:
THIS IS WHY PEOPLE HATE PHP
I can fully appreciate why this is
But it's obnoxious
@Andrea feel free to add an exception here…
@bwoebi I might well
I wonder if it could be snuck into PHP 7 grins devilishly
By the way, C allows everything there… ^^
@bwoebi ...why am I not surprised
C's switch is literally goto, isn't it.
@Andrea it is
23:02
now I want to implement switch with macros... because I'm evil...
@Andrea yes - which you probably already know about, but may have blanked from your memory.
@Andrea … my point is that I'm surprised why PHP doesn't allow anything between { and first case
@Danack Duffs device is just a harmless application of that ^^
switch with macros... :D
D-:
and yes, you can do switch with macros
I just figured out how
one sec...
23:05
@Andrea What exactly do you mean with that?
@bwoebi replace switch() with macros
Why do I now hate myself for having the idea of allowing goto with a dynamic label… like goto $var;, parsing $var as a string value…
@Andrea really evil thinking
@AnmolRaghuvanshi of course
all C's flow control statements could be replaced with macros if we only had goto-as-an-expression
23:18
inline ASM to make it a jmp? :P
hah
why would I get this error message when working locally but not from the server? "Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in /Volumes/.../.../ontheway/add_destination.php on line 51"
this is line 51 while( $row = mysql_fetch_array($results) )
@benlevywebdesign that means $results is NULL
Abe
Abe
#codeterrorism
@benlevywebdesign are you aware that mysql_* functions will stop working in few months
Check the line that sets $results
Also, why are you using mysql_ in 2015?
23:21
old project
Here is the short snippet:
hello
$sql = "SELECT
ontheway_tripinfo.tripname as tripinfoid,
FROM
ontheway_tripinfo,
ontheway_destinations
WHERE
ontheway_tripinfo.id = ontheway_destinations.tripinfoid

AND
ontheway_tripinfo.id = $id";

$results = mysql_query( $sql );

while( $row = mysql_fetch_array($results) )
{
$tripname            = $row ['tripname'];
$tripinfoid          = $row['tripinfoid'];
}
you can almost outright s/mysql_/mysqli_/ for the whole project and be ok AFAIK.
also, you should always check the return from your mysql_query, if it's false/null, then look in the mysql_error for why.
@NeoThermic do what?
$results = mysql_query( $sql );
if (!$results) { echo mysql_error(); die(); }
23:28
No about the other thing for the whole project...
(Note: again, mysql_ functions are deprecated and will be removed soon. Plus handling mysql_error like that isn't great)
ah, string replace mysql_ for mysqli_
You have an error in your SQL syntax...for the right syntax to use near 'FROM ontheway_tripinfo, ontheway_destinations WHERE ontheway_' at line 3
i don't have any error.. :P
How can it be line 3 or is it line 3 of the block of code?
ontheway_tripinfo.tripname as tripinfoid,
FROM
that comma might be your problem :)
23:32
@Anmol What are you talking about
it's expecting more.
haha yup that was it
Stupid me
now spend a bit of time replacing mysql_ for mysqli_ :)
If I do that it should almost be a seamless transition?
in theory, yes. In practise, do check
23:34
I'll try one file at a time
for safety
so php has also included anonymous class like java and c#...
@NeoThermic Different question...Is it possible I could use my $counter++; as a # total after the Previous Trips label? See my pastebin here
Abe
Abe
i like design by contract, although i'm not sure about the syntax
DNC
DNC
PHP programmers, listen carefully:
Abe
Abe
did you guys check the rfc drafts?
@DNC NO
DNC
DNC
23:42
I am looking for a web developer that is really good at basic math.
Now where is my guy? give me a yell
basic math means what 1,2,3 or calculus algebra and number theory
DNC
DNC
Algebra
DNC
DNC
Social media
23:46
plz refer to www.freelancer.com
plz don't use plz lolz
DNC
DNC
@benlevywebdesign if you're interested, give me your Skype id so I can tell you more
I suck at math
Thats why I am a visual/web designer
DNC
DNC
If you're good at that, I can use you too, than you will work together with someone who is good with math and PHP
are you making some kind of educational tool?
DNC
DNC
23:51
No and I can't tell you about the project in here. If you're interested give me your Skype id. I have multiple projects going on
I don't just give my skype ID out
Abe
Abe
@JoeWatkins i like design by contract, although i would like a way to reuse expressions, say: pastie.org/10355629 and most importantly i would like to be able to decide what kind of exception to throw. it would be way more useful if we had that not just for assertions. would that work? cc @internals
welcome @Fedora please read the room rules! Thanks!
DNC
DNC
@benlevywebdesign Ok, I added you
23:55
added me where?
DNC
DNC
Skype
DNC
DNC
Don't ask questions, just accept
Well I don't use the same name on here as for skype if I had one
hirings are done here don't know that :P
DNC
DNC
23:57
@Fedora Are you a freelancer?
@benlevywebdesign I know, just check it and you'll see
I don't use skpe
@DNC Stop spamming.
00:00 - 17:0017:00 - 00:00

« first day (1765 days earlier)      last day (3409 days later) »