« first day (1646 days earlier)      last day (3296 days later) » 

3:06 PM
once i gave the fix for the still broken "scroll to #anchor" on php.net to @LeviMorrison but he didn't give a fuck :D
just for you to know.
 
Yeah that still annoys the hell out of me
Assuming you mean that thing where the actual point to where you want to scroll is underneath the header
 
i fixed that @PeeHaa
help me searching in this room. there was a pastebin or something with the fix
by the way what happens to so chat search? results are super random
 
No no non onononononon one does not simply search in chat
@Worf They moved to elastic search and somehow made chat search worse
 
php.net code is a total mess
no offense
 
Yeah that has already been established :)
 
3:16 PM
how do i pull request for php.net?
 
morning
 
found
@PeeHaa do you know other issues on php.net?
 
@Worf Ping people in here and I think you care PR against github.com/php/web-php
@Worf Not from the top of my head now
 
theres too much crap
 
3:19 PM
i am tempted to nuke everything
// Bind events for #[id]
$(window).on('hashchange', function(e) {
  e.preventDefault();
  return false;
});
hashchange is not cancelable
 
@Worf Yeah the code is one huge clusterfuck of maddness
 
@Worf you mean… you e.preventDefault() doesn't do anything, but throws no failure or similar?
 
yes, you can't prevent the default of "hashchange"
 
Mousetrap.bind("I space l o v e space P H P enter", function(e) {
flashMessage({text: 'Live long and prosper !'});
});
it doesn't even work
the first easter egg that doesn't work
 
do you guys use keyboard shortcuts on php.net?
 
Anonymous
nope
 
nope, the only shortcuts I use are php.net url shortcuts
 
nope
 
Anonymous
all I need is to search and read. So, no use-case for me.
 
3:34 PM
i don't know if i should make big changes or should just nuke everything
mousetrap seems to work only occasionally
i'd remove it entirely
 
Shoot a mail to webmasters first so you know you are not wasting time
 
try to type "logo" then ENTER on php.net
that works xD
 
Anonymous
 
@Andrea Thoughts on bugs.php.net/bug.php?id=69466?
@Worf No you didn't
You gave me something you thought would work.
:)
 
3:42 PM
@LeviMorrison yes i did.
my "thought" is "99% sure it's gonna work"
:D
 
the problem is that i have no idea how to run php.net locally
so i only asked you to test if it actually worked live
 
IIRC it only worked for certain cases or required HTML structure changes (fiendishly difficult)
 
what do you mean with html structure change?
i only modified common.js iirc
anyway i'm preparing a small PR, will you test it?
from "mysteries of php.net website"
> notes[2].find('.text').html("@BJORI DOESN'T LIKE SPAM").css('background-color', '#F9ECF2');
 
haha:
0
Q: Name of a class that creates a bunch of classes for a process

Levi MorrisonWe all know that the hardest parts of computer science deal with cache invalidation and naming things; my problem is the latter. I have a process that raises events when various things happen. Rather than creating all of the objects for all potential events before the process is started, I have ...

I don't think this should be closed.
Now that I've learned a lot more this isn't ambiguous at all; this is creation design pattern and there are a lot of well-named creational patterns.
 
3:50 PM
I don't either
 
(If anyone has enough rep on programmers, that is)
 
101 rep sorry
 
@LeviMorrison anyway i hope i didn't offend you. was just saying that i spent a considerable amount of time on that and i thought you already did merge the change in :P
 
490 or something, what rep do you need?
 
@Worf No worries :)
 
4:00 PM
@LeviMorrison do you think i should use things like document.querySelectorAll() ? supported since msie8
 
Definitely, as long as all of the browsers you support also support the feature.
 
so what browsers is php.net supposed to support?
 
Internet Explorer 3
 
it's time to move on from jquery
 
@Worf We sort of support IE 8.
> [Internet Explorer 8] will be supported on XP SP3 until extended support ends for that operating system which is April 2014. Similarly, it will be supported on Vista until extended support ends for that operating system in April 2017 (or unless and until they ship a new version of IE through a future OS service pack).
^ That's Microsoft's official IE 8 support statement.
 
4:05 PM
@LeviMorrison Isn't that already the case?
 
Sorry?
 
> or unless and until they ship a new version of IE through a future OS service pack
 
Oh, IE 9 is available but I don't know if a service pack bumps it to 9; there's a difference.
 
I am crawling through the service packs as we speak
Damn that microsoft site is shit
/me gives up
 
I think IE 8 is still the default for Vista Service Pack 2.
 
4:15 PM
:-(
 
Honestly there's not much point in bumping support to IE 9. If bumped may as well go straight to 10.
 
Yeah. Good luck pushing that one :P
 
I'm waiting on Polymer to mature then I'll make the jump.
@PeeHaa This will not be difficult.
IE 8 is barely usable on our site as it is.
 
@LeviMorrison reminds me on phpsadness.com/sad/52
 
    $map = [
        '{' => '(?P<',
        '}' => '>[^/\\\\.,;?\n]+)',
        '[' => '(?P<',
        ']' => '>[0-9]+)',
    ];
Guys, what kind of stuff is that?
The values assigned to the key?
 
4:28 PM
looks like parts of regexes
 
Is there any site where I can understand that?
 
That was some sample code provided to me by teresko
 
looks like an excerpt of source-code. reading the whole sourcecode while understanding it should eliminate any questions ^ ^
 
I can understand the source
I know what it even does
But I want to understand the meaning of that greek stuff
 
4:29 PM
hmm, then you have not understood it completely.
 
(?P< is the beginning of a named group, i.e. (?P<foo>bar), the group will be named foo
 
"{hello}" will become '(?P<hello>[^/\\\\.,;?\n]+)'
 
This really is confusing to me. :/
He gave me that code as a sample Router
 
A'ight, I'll move it to pastebin.
 
4:32 PM
that's part of a caching configuration
so that you can create a caching key based on the cookie
 
He caches URI formats
 
Hassan, what confuses you? you wrote you know that the code does. It parses parameters from an URI
 
Yup.
But I want to understand what those
Regex stuff mean
I just know what the code does
 
Okay, regular expressions are a language of it's own.
Florian already gave you a link to a website that contains information about it.
 
Crap.
Yup, i am reading that.
Btw, would doing something like this be bad:
 
4:35 PM
Crap?
 
That was meant for Regular Expressions
They are greek
Would doing something like that be ok?
Line 9 is not supposed to have a comment, i commented it when i was debugging something
$router = new Router\Router();

$router->createRoute('/Routing/', 'LOL\lel', 'run');
$router->createRoute('/Routing/lol', 'LOL\lel', 'lol');
$router->createRoute('/Routing/hey', 'LOL\lel', 'hey');

$route = $router->runRouter();
That is how you implement it
 
if you want to know if something is OK, write a testcase that tells you it is.
 
I mean like, it works.
But would it be considered a proper way to achieve its task.
 
I can't tell you that. I can only say: Well in my eyes it does not look OK because that's a lot of code I don't have the time to read so I assume the worst and say it's not working.
 
@HassanAlthaf That's a fairly trivial regex… only special thing is named capturing groups here
 
4:45 PM
@bwoebi But I wanna understand it. :P Come on, I am learning.
 
14 mins ago, by hakre
"{hello}" will become '(?P<hello>[^/\\\\.,;?\n]+)'
 
@HassanAlthaf I gave you a keyword "named capturing group" ;-)
 
@hakre but what does all that mess mean?
 
@HassanAlthaf not mess, not greece, just regex and it's documented.
there is this nice regex book from o'rielly.
 
@hakre mind linking me to the book?
I really wanna learn Regex. It looks very useful.
 
4:48 PM
@HassanAlthaf There is good coverage of regex syntax on pcre.org/pcre.txt. search for pcrepattern(3)
It's the only reasonably complete guide to regular expressions ;)
 
@NikiC thanks a lot.
Your Fast-Route inspired me to code my own Routing library
I must say, I am in love with Fast-Route, haha.
 
@NikiC Just that it's a gigantic txt file… yeah…
 
@bwoebi you can type man pcre on your computer if you prefer
 
\Qabc$xyz\E
What does the \Q and \E mean in this?
 
there is the answer on the link @NikiC just gave
QUOTING

         \x         where x is non-alphanumeric is a literal x
         \Q...\E    treat enclosed characters as literal
 
4:55 PM
Oh, so everything inside \Q and \E is treated as a literal?
Thanks a lot.
 
@hakre This particular post ignores that some types are by definition not comparable, which means $a < $b for these types doesn't make sense.
This happens in compiled languages too; but they emit compile failures.
In PHP (and probably most dynamic languages) the result will be false instead.
The "solution" is simple: only compare things that make sense to be compared.
Make sure everything is the same type and that comparison makes sense for that type.
I don't mind PHP's dynamic type system, but people who complain about these things have one fundamental problem: they rely on dynamic typing too much.
1 < array() <- what sensible result can anyone expect here?
Just don't do the comparison, lol
 
Shit, this regex is greek, im done.
 
@HassanAlthaf Good thing about languages is: You can learn them.
Regex is not language though
 
Uhm, regular expressions denote regular languages…
 
Idk how people even understand them lol
 
5:04 PM
@LeviMorrison do you remember why var jHtmlBody = $('html, body'); for the "scroll to element" function?
 
Nope :)
 
that also causes the callback to executed twice
page scrolling usually happens on html but on php.net happens on body lol. no idea why
must be jquery retargeting to html. my god. remind me why i started this?
ah right because of @PeeHaa
:D
 
if(preg_match_all('/\{[a-z]\}*/', 'lol t{hi} is so m{a}i{339339}unf9{2}94jr {fkarkkr} haha', $matches)) {
        echo 'yes';
        print_r($matches);
    }
Sorta started playing with random Regexes
But, I don't understand why my results are not greater than str_len of 2
 
> I respect your decision to close the comments on this bug, as it was drifting into an extended debate, which would better be held elsewhere, e.g. the Stack Overflow page I linked (where get_defined_vars() is already mentioned), or a personal blog.

However, you should probably abide by that decision yourself, and not add comments which are just adding to that debate without others having the chance to respond.
 
My result:
yesArray ( [0] => Array ( [0] => {h [1] => {a} [2] => {f ) )
 
5:10 PM
Downloading 59GB for GTA V x)
 
@HassanAlthaf your * is not at the right place
 
Why can't I get the complete string for the match instead of just 2 characters of the match?
Oh, where should it be?
 
after the ]
 
@NikiC related to that bug? Well… for any discussion of that scope internals is a better place. [Though it probably would end in a shitstorm, so I'm not sure.]
 
Wow, regex is not that hard.
/\{[a-z]+[A-Z]*\}/
Guys, that regex seems to work fine to capture all text with lowercase and/or uppercase string inside { }
 
5:17 PM
@HassanAlthaf Regex is not greek… just not so easy. You have to learn it. I can't understand everything either… Give me an expression with *skip, *fail, *prune or whatever and my brain fails to unwind…
 
But, how can I make it even accept string which has numeric characters like 0, 0333, 2939293
 
@HassanAlthaf [0-9]?
 
I did try this:
/\{[a-z]+[A-Z]+[0-9]*\}/
But it stops capturing everything lol
 
@FlorianMargaine Are you trolling me? a manpage is nothing else than text with minimal formatting… It's still pure text.
@HassanAlthaf you eventually want [a-zA-Z0-9] ?
 
5:19 PM
This is the logic I want:
 
@BenjaminGruenbaum Can't you just change the title of the canon to include the other term?
 
a-z and/or A-Z and/or 0-9
 
45 secs ago, by bwoebi
@HassanAlthaf you eventually want [a-zA-Z0-9] ?
 
@PeeHaa no, one term is "the deferred antipattern" and the other is "the promise constructor antipattern"
"What is the promise constructor antipattern / the deferred antipattern and how do I avoid it" sounds really bad
 
"a.k.a."
 
5:21 PM
@bwoebi you are a champ!
 
@BenjaminGruenbaum I always feel confused when I hear people saying "What is X and why is it bad?" … Why do you hear something and ask what it is? You usually can google that… Then you might think about it yourself first… It's often pretty obvious that things are bad with enough experience.
 
@LeviMorrison reminds was not meant as accurate. I just wondered how to compare two hashes with each other which is done in the bug-report.
 
And if you don't have that experience… first learn the other things before asking for concrete random things…
 
And I remembered that one then.
 
5:49 PM
evenin'
@HassanAlthaf what have you been trying to do now ?
 
Is it possible to get the PID of a process I ran using exec() as the output of that command on a Windows server?
Hope I'm asking correctly lol
 
@tereško I wrote some code so far. About to test now, let me show you.
 
the runRouter() method seems to be in need of refactoring
 
@tereško Indeed, this was just the logic development. :P
I will clean up the code once my code passes some tests.
7
Q: A PHP User System

Hassan AlthafThis PHP User System was built with MySQLi and I also used Composer. I'm planning to improve this, and add more stuff and release it as a sort of a module for Composer. User.php (Controller File in the src/Controller) folder. <?php namespace Application\Controllers; use Http\Request; use Http\...

22 hours left on the bounty guys, give it a go.
 
/me is too lazy
 
6:03 PM
Woo, my router works.
Time to clean up the code, put it on review, and put it on GitHub.
 
my main issues with that code would be the SQL in User and ApplicationUser classes, application logic in thew controller and the redirect done in the controller
 
Thanks for the feedback, that is what my opinion was as well.
 
oh, and the relative path in the form's action
 
oh
which form
action="user/login
 
you have only one HTML form there
 
6:06 PM
That?
Basically, when the form is submitted
It redirects to user/login
['POST', '/user/login', ['Application\Controllers\User', 'login']],
Fast-Route calls new Application\Controllers\User()->login()
 
it works just fine if you only have the login form in /
 
What do you mean,
Oh, you're trying to say if the uri is like /hey/home
 
but if you are in the /documents then your form will be submitted to /documents/user/login
 
Oh
How could I avoid that?
 
make the user absolute
start it with "/"
 
6:08 PM
oh
Thanks a lot!
 
same goes for all the images in css
 
I logged that fix for the bug down
 
my first experience with git: cloning 20 years of commits. not sure if it's stuck or it's still working. because it's been an hour...
 
@Worf You're cloning PHP?
Well… impossible this takes an hour…
 
cloning web_php
 
6:17 PM
web_php?
main php.net site?
 
yes
meh i used github to edit the file
@LeviMorrison PR sent github.com/php/web-php/pull/68 99% sure it works. if you want clarifications about the code let me know
 
@Worf I know the previous implementer hard-coded 52 but I'd calculate it personally.
 
52 is used in several points of the file, i guess a constant is needed
i didn't change those tho
i tried to keep it simple
 
@Worf I am not certain this will work as intended. The common.js comes after the main content; will the browser scroll to the location before the javascript is parsed and loaded and events registered?
 
yes :P
 
6:30 PM
Also the callbackCalled = true; stuff looks suspicious
 
yes, because i don't know why $('html, body') was used
causes the callback to be executed twice
ideally scrolling should happen only on document.documentElement
but for some reason php.net scrolls on body
it is no different from previous solution anyway
i just prevented the callback to be executed twice
-var jHtmlBody = $('html, body');
^ from the old code
that's a temporary solution anyway. next weekend i will look at that more
 
Release Aurex 0.1.0.. if anyone wants to give constructive criticism please feel free as I could use it :-)
 
@Worf Having multiple $(document).ready() sections is a bit wonky too.
 
have you guys ever tried vanilla-js.com ?
@LeviMorrison I hope you are aware that having even a single $(document).ready() is completely unnecessary
 
absolutely not. that's the whole point of the observer pattern @LeviMorrison :P
 
6:36 PM
@tereško I am not confident that common.js is always loaded in the body; I think it may happen in the header sometimes in which case I think it is necessary.
My JavaScript-fu is a bit outdated and JS moves quickly :)
 
0
Q: A Router I coded

Hassan AlthafThis is router I created for use, however, I wish to refactor this code and make this more robust. I would really appreciate anyone who can: Point out how to make this code more robust, clean and flexible. Point out where code can be refactored and possibly how. Point out how the code could be ...

 
note: i don't know jquery. but i guess it's the same of DOMContentLoaded
 
@LeviMorrison if you add JS right before closing </body>, then it gets executed right after DOM is complete
 
*smells JavaScript in the PHP room*
 
@LeviMorrison just merge. i gamble my developer credibility on that :D i mean, even if it doesn't work it can't be worse than it was before
 
6:40 PM
@tereško Right, but I'm not sure that this script is always placed there.
 
6:53 PM
@LeviMorrison you can test some of the code from chrome dev tools anyway
not the .ready() but links
 
looks like I will be permanently switching to qBittorrent
 
just paste in the console the js from line 24 to 75
then try to click a link
> html_errors boolean
Turn off HTML tags in error messages. The new format for HTML errors produces clickable messages that direct the user to a page describing the error or function in causing the error. These references are affected by docref_root and docref_ext.
so to disable html errors i have to set it to On?
nope. it's just the documentation a bit confusing
 
7:55 PM
@NikiC This is maybe of some interest for you: phpdbg -p=func testfile.php … dumps the opcodes of func for you.
-p Outputs the main execution context
-p* Outputs all opcodes in the whole file (including classes and functions)
-p=function_name Outputs opcodes of a given function in the file
-p=class_name:: Outputs opcodes of all the methods of a given class
-p=class_name::method Outputs opcodes of a given method
[I need to improve the output format of it too now…]
@NikiC Before I start, do you have any suggestions what you'd like to see in the opcode dump?
 
Anonymous
damn, now that I have gitlab, I realized I need jenkins too.
 
Anonymous
I spend more time making things work, than I do learning stuff
 
@PeeHaa This is not spam, that's misunderstanding how the site works.
 
8:10 PM
It is an "unsolicited electronic message"
And OP even knew this
 
8:23 PM
[Lol my thesis – Summing up years of work in one sentence ](lolmythesis.com)
 
Anonymous
@Danack when are you going to get it?
 
it?
 
Anonymous
creating a link
 
8:43 PM
@bwoebi sounds very useful
 
@NikiC Also, any suggestions for opcode dump improvements? [currently just proxying from print command]
 
I can't seem to make it work
is this in master?
 
@NikiC Yes
 
it's always nice to see torrent incoming with 8MB/s
 
:)
 
8:56 PM
@bwoebi okay working after full rebuild
@bwoebi step one: make this work for a 100 char terminal (or less)
 
... 100 char wide?
 
e.g. start by dropping the unnecessary indent on the left which already eats 16 chars
step two: show something useful for Cn
can prob drop the addresses for the oplines too, those are probably not particularly useful in this context, right?
 
@NikiC Well, it's the same opcode addresses than in normal execution
 
function name: 
	Internal PDOStatement::execute()
 
... or maybe not.
@NikiC I thought I disabled that?
 
9:00 PM
ah, that does not display well ... theres a \2 after "function name: " Probably not supposed to be there
 
There are some function names which include \0-bytes etc.
 
@bwoebi you're probably directly printing a zend_string or something like that
 
@NikiC yes, I am
[Oh, lxr hadn't updated yet…]
 
		L5	0x7fa7a26b6f40 UNKNOWN                        $dbh                 <unused>             <unused>
^-- That might be a DATA opcode
 
@NikiC ZEND_OP_DATA?
yep… that's the only case I can imagine
 
9:04 PM
@bwoebi yes
 
@NikiC I wonder whether I should add "ZEND_OP_DATA" in the array in lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_opcodes.c
or whether I should handle it manually in my code…
 
@bwoebi Sounds reasonable to add it
 
9:22 PM
@NikiC okay, added this one
I like writing PHP to improve php-src :-D
Good night
There now only are two gaps in ops list… 41 and 49 …^^
 
9:44 PM
@NikiC okay… 100 chars wide is feasible if I drop the opline address.
I'll work on it tomorrow…
 
@PeeHaa eventually it finished cloning:
Submodule 'distributions' (https://git.php.net/repository/web/php-distributions.git) registered for path 'distributions'
Cloning into 'distributions'...
fatal: early EOF
fatal: The remote end hung up unexpectedly
fatal: index-pack failed
error: RPC failed; result=18, HTTP code = 200
Clone of 'https://git.php.net/repository/web/php-distributions.git' into submodule path 'distributions' failed
Completed with errors, see above.
no idea what that means
 
The network request got interupted, probably
 
no idea why that would happen. connection is fine :|
so without submodules it cloned it almost instantaneously
i guess i need to know what submodules are
 
10:00 PM
@Worf Why are you cloning that?
It contains the zips of all released versions of PHP.
 
so i was downloading 20 years of php releases?
:D
lolz
 
That explains the connection timeout....
 
now i'm trying to get the clone working just to see what was the issue, but it was for a change on php.net which i already PRed, i did it on github
 
All the repose are listed at git.php.net - I guess you meant git.php.net/?p=web/php.git;a=summary
 
i have no idea, this is what i did github.com/php/web-php/pull/68 :| i guess it's fine, levimorrison already take a look at it
 
10:11 PM
WHOA you were downloading the distributions? HAHAHA no wonder it was taking so long
 
10:24 PM
:'(
 
I updated my Enum Draft RFC; what else am I missing? /cc @NikiC @bwoebi @iroegbu @rdlowrey
I know each section is a little sparse; I'm talking about broader picture things. What topics am I missing?
 
10:43 PM
anyone here good with computers ?
8
I have a problem which I have no idea how to even start fixing.
 
@tereško what is it?
 
so ... I have RAID-0 of two SSDs. It's working fine. But if I make the PC to go into sleep mode, when it awakes, it cannot find anything to boot from.
rebooting does not help
but physically turning the box off and on again does help
I have no idea where to even start looking for the solution (the google query gives me nothing useful).
it is KINDA like what described here: superuser.com/questions/84534/…
but my setup is completely different
 
i have no idea, i didnt play with raid enough
if you have a double bios motherboard you could try updating your bios to a newer version
 
uefi is up to date
 
10:56 PM
@tereško Can you give an exact message?
 
nope
it said something about "CMOS unable to find compatible boot device"
 
@tereško 100% reproduce rate?
 
I have got this situation twice
and on the first occurrence I panicked and rebuilt the RAID
 
I would check that your master boot record and whatnot are good
 
11:23 PM
no
UEFI cannot see the physical disks
 
11:43 PM
gn all
 
11:58 PM
who here actually likes PHP? :D
I love it, but have yet to find someone else who does :P
 

« first day (1646 days earlier)      last day (3296 days later) »