« first day (1502 days earlier)      last day (3440 days later) » 

Ugh it hurts! Stupid leg/knee. Evidently pain meds are running out.
 
@Fabor How did the sex change go?
 
Heh.
 
But serious what happened?
 
Average age in this room is about 50...
Hospital room that is
@PeeHaa surgery for my stress fractures. Had them for two years
They stuck a nail the size of my shin inside my tibia.
 
12:10 AM
So you will be pretty much handicapped for the couple of weeks / months?
 
Yeah. Just had some liquid morphine
Hopefully get some sleep. Night all
 
Night @Fabor
 
"liquid morphine" The best kind of morphine!
 
12:28 AM
diamorphine is fun, too ;-)
 
@RonniSkansing thanks
 
Do the magic internet points for questions/answers on Meta Stackoverflow go anywhere or are they just completely imaginary?
 
This whole thing is a lie.
 
1:00 AM
SO points == MSO points
 
1:14 AM
Apparently lolphp thinks relative namespaces are a lolphp
 
Its lolphp
 
1:31 AM
@NikiC Thank you thank you!
 
Hi, on loading localhost/Symfony/web/config.php it gives me five recommendations, one of them is "Install PHP 5.4.11 or newer if your project uses the logout handler from the Symfony Security Component." is this strictly necessary? my php version is 5.4.9
 
@user2495207 I am not completely sure, but if they ask for a PHP 5.4.11+ installation there's probably a bug fix that landed in that version that they rely on.
@nikita2206 Potentially, but it would be more helpful to insert into the middle in this case (I think).
 
@ircmaxell Is that a reference to /r/lolphp or relative namespaces?
 
@rdlowrey Are there any language level WTF's or missing functionality that you think could be proposed and implemented by the end of March?
Stuff you've come across in the Amp projects?
 
@LeviMorrison I'm around now for a few minutes :p
 
1:45 AM
^^ I forgot what I was going to ask you about.
Oh well.
 
Alas.
 
2:38 AM
If it was important enough I would have just asked when I pinged you ^^
 
3:08 AM
heh
 
 
1 hour later…
4:33 AM
What to do if erroneous answer was accepted?
 
Do your best to provide a correct answer and promote it.
And for this one, I'll be nice and say you can link it ^^
 
@sectus just leave it, i've upvoted it :)
 
5:25 AM
It's sad, but I have only one question (because it's fun) to promote in this chat. I do not think that they provides wisdom of ages.
 
5:48 AM
Whether there is an analogue of xhprof?
 
6:15 AM
@ircmaxell I think I need an invite code
morning all
@ircmaxell I really want an invite ... got any ?
 
Hello?
Is anyone on here available to chat?
 
perhaps ..
 
haha.
I am about to launch a new site, and I just wanted some feedback, if you don't mind?
 
ask your question, if someone wants to answer they will ...
I'm here but it's 6am, not really awake yet and about to grab breakfast ...
 
ok. Sure. Forgive me. I'm new to the IRC.
I have written my REST api, and can go 1 of 2 directions for my launch. I can either A) produce a Chrome Packaged App or B) Develop a website. My question is, do you believe Chrome Packaged apps are popular enough to release that first, over a website? Or would you do website first, then release chrome app later?
 
6:37 AM
@DanielSikes how are you going to promote your products?
 
I plan to use social media. This project in particular is specifically for the Digital Ocean community, so I'll be on their community site posting about my product.
@sectus Have you ever used Digital Ocean?
 
No
 
Oh? They are a great hosting solution. My project is built specifically for Digital Ocean users. Have you used Chrome Packaged apps at all?
 
I'm sure that it's great hosting. Yes, I have been using it for a while.
 
Awesome. Do you think it would be cool to start with a chrome app over a website?
 
6:51 AM
Why not both?
 
How much time it could take?
 
Well, I'm the only developer. I would like to launch my product whichever way i go the first week of December.
 
@user2495207 3v4l.org/SddDJ here is the bug that affects older versions
that's why you are recommended to use 5.4.11+
hell .. if you are making something new, you probably should have a box with 5.6 installed
 
Migrated several instances of an application today from 5.3 to 5.5
average response time decreased by 3 times
 
7:06 AM
that's probably caused by excessive amount of warnings produced
@zerkms have you checked the log files
 
@tereško I have. Everything works as expected
50ms -> 15ms
and it makes me worrying
but I couldn't find any anomalies anywhere
 
oh .. wait, you said "response time decreased"
I somehow read it as "my site got slower"
 
either is suspicious
but in this case it's a good surprise
 
well, 5.3 -> 5.5 should be 50% faster, IIRC
 
that's what I expected as well
these guys know how black friday works
 
7:10 AM
did you change anything else ?
like, migrate to FPM
 
Well, this time it was a major upgrade
ubuntu precise -> ubuntu trusty
so versions of everything has changed
as of php fpm was switched from tcp to unix socket
(it doesn't produce any noticeable difference though)
 
not on it's own, no
 
so I suppose it might be some magic default php5-fpm or nginx setting
since I don't performance optimize either and run on 99% default settings
 
could be that nginx team has improved the defaults for php , but it makes me wonder if you are not running on some "minimal" setup (as in, low amount of connections available)
 
tomorrow I will try to see difference for trivial hello world
or basic maths
without any IO
 
7:20 AM
btw, I think 5.5 was bundled with opcode cache
 
@zerkms If you change it back to TCP/IP, does it slow down again? :)
 
@Ja͢ck nope
@tereško yep, on 5.3 it was APC
 
Many improvements were made in 5.4
Better memory footprint being one of those.
 
mornings
 
7:43 AM
moin
common mark has a nice c library now ... someone should do ext ... @Jack ...
 
7:57 AM
Morning
 
8:14 AM
good meurning!
 
moin
 
posted on November 26, 2014 by nlecointre

/* by Domas */

 
Hows it going joe
 
hi guys
I've a problem in using wordpress
I'm new to wordpress.
I've downloaded and installed AMPPS.
 
8:21 AM
I've downloaded, unzipped and copied wordpress folder in www folder in AMPPS.
Which file to open first ?
@Gordon Thanks
 
@Fabor not bad, still not properly awake yet ... daughter is 10 today and woke us up really early ...
 
it must be a troll, @Naruto
 
@JoeWatkins wish her a happy birthday :)
 
8:41 AM
Good morning.
 
Morning
@DipaliPatil Well even at WP.SE you would be kicked. Read the documentation please and stop being lazy.
Reading ircmaxell's article http://blog.ircmaxell.com/2014/11/alternatives-to-mvc.html
I think I've been using something like "RMR - Resource-Method-Representation" latetly.
 
@tereško A bad one then :D
 
@JoeWatkins Markdown to HTML you mean?
 
8:56 AM
hi all
 
@Julo0sS yo
 
getting this from pdo :
Call to a member function execute() on String in .... line....
i'm doing an execute with an id as data, like this :
execute([':id'=>$id])
 
@Julo0sS the error is self-descriptive...
 
yes, but even if my $id is a string, that should not cause any error
omg
ok x)
 
9:01 AM
my brain still sleeps...
 
some brains never wake up
 
lol
 
hehehe
A just had a cup of coffee :)
 
i should get one too
i include my functions file in my index.php
i have a function which creates a file
 
9:06 AM
if i create a file doing "./file.txt" where is it located? in my index.php folder, or in my functions.php folder by default? (mean, the default path when calling a function)
 
@Julo0sS If you call index, then in the same folder as index
 
i call my function in my index... ok then, but if so, imagine. My index is located at : "/folder/index.php"
my functions located at "/folder/php/functions.php"
my function creates file on : fopen("./files/file.txt")
folder "/folder/files/" exists
and i get error "no such file or directory"
 
@Julo0sS ../files/file.txt ?
 
@JoeWatkins Ah, yup yup ... the reference implementation :D
 
Did you know that ./ means current directory?
 
9:11 AM
No way!
 
yes
 
well is shared library too ... it's the only implementation for now ...
it looks quite nice ...
 
current directory, for index, is /folder
and i want to write into /folder/files
so it's correct, isnt it?
 
oops
 
9:12 AM
da fak
there are 5€ left in my bank account
 
noice!
 
@tereško o_O
 
@tereško so you're not short yet
 
yeah .. I wonder where I wasted it all
 
you interested or shall I do it ? @Jack
 
9:13 AM
it's the 26th... salary's coming soon
 
@Julo0sS does file.txt exist? Do you have the rights?
 
I got tomorrow and friday off work @FlorianMargaine because black friday ...
 
@JoeWatkins don't you have a huge backlog you should be trying to reduce? :)
 
black friday isn't much a thing in France
 
9:14 AM
@Ja͢ck of what ?
 
@HamZa have rights, not existing yet, tested another function which creates file before, and working, but called from another folder where i didnt have this relative path issue
 
@JoeWatkins of .. whatever is in your backlog lol
 
@FlorianMargaine yeah we don't pay attention either ... but shhhhh ...
 
@Julo0sS I usually don't help with such debugging issues since most of the times it's PEBCAK
 
9:15 AM
hm, I use PEBKAC
not like it matters anyway.
 
@HamZa ... :P
 
@JoeWatkins hmm, so you reckon we should create a project with submodule first?
 
@FlorianMargaine E_FRENCH :P
 
as in, we can't really assume people have the markdown lib installed already.
 
@FlorianMargaine salary is on 10th
 
9:16 AM
though we could have a --with-markdown=../src/etc/etc
 
I think it's a commercial "thing" everywhere that celebrates the birth of a certain first century Jew, just by chance because last payday before xmas
@Ja͢ck haven't really got a backlog, I don't think ... unless someone is waiting for me to do something, in which case I forgot, in which case it wasn't that important in the first place, probably ...
@Ja͢ck just do it in normal way with cmark lib dep ...
 
but it looks like I have somehow managed to piss away all of the "official salary" in about 15 days
 
morning
 
moin @PeeHaa
 
@tereško ow..
 
9:17 AM
@JoeWatkins sure, i'll play around with it
 
@Ja͢ck cool
 
based off master
 
will have to feed some of the "unofficial" part into the card
 
@tereško Do you have enough food stock? ...
 
well ... no one is using that yet ...
 
9:18 AM
yeah
 
do 5.4+, I'll pr 7 compat when you have something ...
 
kay
 
tss
Joe wanna do the fun thing eh?
:P
 
@HamZa naah, it's all fine (the official salary is about 1/3 of what I actually get)
 
master is much nicer to work with
 
9:18 AM
I'm just surprised
 
> Your branch is behind 'upstream/PHP-5.6' by 563 commits, and can be fast-forwarded.
whoops
 
@tereško well ping me if you need any help :)
 
@FlorianMargaine it is when you are doing php stuff, but much of a muchness for something like a normal ext, because just light wrapper ...
 
@HamZa tnx
 
np
 
9:19 AM
the only differences for most ext is going to be object handlers are slightly different ...
 
and derefencing--
 
if the ext uses lots of hashtables, then you'd have to change all that too, but if you are just wrapping third party then no worries ...
@Ja͢ck you mean zval **
wouldn't be normal to use two levels of indirection in an ext anyway, if you have a reference it's zval *
so @Jack, need the classes Parser, Node, and possibly Renderer ... gonna use objects, right ?
 
Oh, I was thinking of providing a C interface first.
 
Hai all
 
9:25 AM
@Ja͢ck you mean procedural ?
 
Yeah
 
GROSS
 
MD -> HTML ... HTML -> MD
 
what you mean ?
 
The lib transforms MD into HTML and vice versa, correct?
 
9:27 AM
correct
 
Actually ... we could make it export into DOMDocument :D
 
but why bother with a procedural interface, it will be awkward to use resources, and you'd have to use resources ...
 
cmark_md_to_html() and cmark_html_to_md() ... no?
sure we can expose the whole shebang ...
but i'm not sure whether that's so beneficial at this point.
how many times would you want to fiddle with individual nodes if you can just let DOM read the HTML that it produces?
 
I think so, has ast of md, traversal of tree, injection ...
 
That's not mutually exclusive.
Both things can be exposed in the lib ext.
 
9:32 AM
why require DOM both the extension and knowledge of it ... imagine how useless DOM would be if they took this approach and only exposed html_to_array() and that sort of thing ?
you shouldn't assume what people will like, the best abstraction possible allows someone else to make those decisions ... I'd really go for an OO api ...
 
I'm not assuming what people will like ...
What I'm saying is that building the simplest use-case first is a strategy :)
 
http://thecodinglove.com/post/103627133337
The coding love
When I started working with vim
nlecointre
1416994231
 
@Ja͢ck it is, but every use case isn't so hard ...
 
I didn't say it was :)
Does the JavaScript API expose an OO interface?
didn't check
Ah, it does .. cool, makes it easier to mimick
 
well, it might be a bit awkward to copy the js one ...
 
9:48 AM
Just need some idea of an OO abstraction
 
oh. damn. I hate regex recursion segfaults.
 
<?php
use CommonMark\Parser;

$node = Parser::parseDocument(
    file_get_contents("/usr/src/pthreads/README.md"));

var_dump($parser, $node, $node->getHTML());
?>
 
10:05 AM
That's not OO at all.
<?php

echo cmark_markdown_to_html(file_get_contents($argv[1]));
Hurray .. its works
 
yeah it's not ...
<?php
use CommonMark\Parser;

$file   = fopen("/usr/src/pthreads/README.md", "r");
$parser = new Parser();

while (($line = fgets($file))) {
    $parser->parse($line);
}

$parser->finish();
fclose($file);

var_dump($parser);
?>
for some reason parse_document returns a node, and doens't take a parser ... parse_line takes a parser, and is void ...
it looks like nice api at first glance, but have to dance around a bit to make nice api actually ...
 
You're still talking about theory here, right? :)
Don't tell me you have already implemented the above in C :P
 
theory, that works ....
I have yeah ...
 
=.=
 
lol
crazy joe
 
10:13 AM
mornigns
 
@JoeWatkins so what was the point asking me then?
 
mornings. someone using php 5.6.3 (both x86 & x64) on windows? i have a reproducible crash (preg_replace_callback)
 
I can throw away that much c, took ten minutes, I was just looking by doing ... you carry on ...
it's pretty awkward really when you look close ...
 
lol
 
they #define finish as cmark_finish ... some strange stuff going on up in here ...
 
10:15 AM
How can I match a string that starts with $start, contains $str and ends with $end?
I currently have #$start(?=.*$contains).((?!$end).)+$end#, but that seems to make regex stack overflow via recursion...
 
@Mario I have a box, details?
 
/$start.*$str.*$end/ ?
Though, that might recurse too.
 
code is:
<?php

function test($test)
{
return preg_replace_callback('@(["\'])((?!\1).)*\1(*SKIP)(*F)|\s+([A-z-:_]+?)(?=[\s/>])@si', function($test){ return "a"; }, $test);
}
test(file_get_contents(__DIR__ . "/the_guardian.com.txt")); // get the html source code of theguardian.com
 
@Ja͢ck Well, I need to match of $start$start$str$end$start$end only $start$str$end ...
 
moment, let me spin it up
What do you get, segfault?
 
10:18 AM
the trivial regex would match just all.
yeah, segfault with too big backtrace
 
@bwoebi stack overflow, you think?
 
i don't know what is it. wait
 
@DaveRandom definitely.
@DaveRandom when input is small enough, it works.
 
I have a "svg" file, when i use it in web mode, i link images with image tag and xlink:href attribute. But now, i need to generate a pdf with the svg. So, i need to parse my "html svg", find <image tags, find their href attribute, and replace the <image tags by the content of the file located at href (these files are all svg files)... Anyone could tell me whats the best way to do that?
 
@JoeWatkins My 10 minutes piece of code here .. I'll add bits and pieces as I have pockets of time :)
 
10:20 AM
@DaveRandom i.imgur.com/WZ7yTFg.gif happens with cli as well tho
 
segfaults on *nix as well, it will be a stack overflow
 
oh
 
@DaveRandom well, I am on *nix … ^^
@DaveRandom the question is just, how to do it then.
 
hang on, I think there are coincidentally two instance of the same issue here
 
hm?!
 
10:23 AM
@Mario and @bwoebi both have regexes overflowing the stack :-P
 
lol
 
oh
 
@Mario what are you trying to do?
 
just that my regex is much simpler :-D
 
@bwoebi yours seems like /^$start.*?$contains.*?$end$/ should work?
 
10:25 AM
@DaveRandom are you trying to ping me?
 
@JoeWatkins I've added you as collaborator, btw, just in case.
 
@DaveRandom that preg_replace_callback is supposed to convert html5's boolean attributes, like <input disabled> into the xml equivalent <input disabled="disabled">
 
@Ja͢ck cool
 
@DaveRandom oh, ungreedy matches
 
:-P
@Mario Y U NO DOM/XPATH?
 
10:26 AM
@DaveRandom no, doesn't work as expected
 
Real life example?
 
@DaveRandom matches in $start$end$start$str$end the whole
 
i'm doing that exactly for that @DaveRandom i'm converting html5 to xhtml5 to load it into domdocument, via loadXML()
 
@bwoebi needs /s?
 
@DaveRandom no difference
@DaveRandom to be precise, I want to match only one $start and one $end where $str is in between.
 
10:28 AM
@Mario Why not just loadHTML()?
 
i can't use DOMDocument::loadHTML() because creates too many problems
 
@bwoebi Have you got an example string please?
@Mario such as?
(just trying to understand the issue)
 
mind if I commit an OO interface @Jack ?
 
well it doesn't understand new self closing tags such as <progress>
 
seems a shame to throw away, sorry I'm such a shit ...
 
10:29 AM
<div><progress>foo<b>bar</b></div> is converted to <div><progress>foo<b>bar</b></progress></div>
 
@Mario Ahh OK I see what you mean. Well, loadXML won't play nice with that either
 
it does, because before loadXML() i manually preg_replace <progress> to be <progress/>
 
@DaveRandom fyi: I'm trying to parse partially invalid html (so that's why no DOM :-( ) example is: <table></table>...<table>abc online shjv </table>...</table> and my regex <table(?=.*online).((?!<\/table>).)*<\/table>
 
@Mario Well that should make loadHTML() work properly as well, and it won't require the attribute replacement step
 
is it @DaveRandom ?
gonna try then
 
10:32 AM
@DaveRandom only thing I can guarantee is that there's no other <table> inside the wanted match.
 
@bwoebi Given that HTML, what's the actual thing you want to spit out at the end? Are you trying to convert it to valid HTML or what? (so, strip out the first </table> or something?
 
@JoeWatkins Yeah, most definitely .. I've added you to the project :)
I most definitely don't mind, I mean
 
cool ...
 
@DaveRandom php crashes anyway even if skipping that, looks like the html source is too big or something
 
10:36 AM
@Mario Maybe maybe not, what line does it crash on?
 
@HamZa much better :-)
 
@HamZa shiny
 
@HamZa do you also eventually know why that doesn't segfault, but the other one does?
 
Thanks :)
 
@DaveRandom i have other regexs running
 
10:37 AM
@bwoebi lolwut, I didn't follow the whole conversation. So no :)
 
@HamZa It'd be nice to understand what I did wrong …
 
@bwoebi so what's the regex that's segfaulting?
 
Hello all
 
@HamZa foo(?=.*bar).((?!qux).)*qux
 
@bwoebi it doesn't segfault on regex101....
 
10:40 AM
@DaveRandom anyway @PeeHaa said that regex worked on php 5.5
 
@HamZa I mean, with big input
 
@Mario @ThW do you have a solution to the problem that DOMDocument can't handle HTML5 self-closers? (see message this is replying to)
 
@bwoebi define big input?
 
@HamZa up to 70 KB of data
 
How many of you use wordpress, I find it better to use my own templates....I dont know what I'm gonna use next...but u might be miles ahead of me...so can you guide me what to use....wordpress, joomla or druple ?
 
10:44 AM
@Mario btw what are you actually trying to do with the input data? Do you want to extract some info from it or what?
 
@DaveRandom not actually doing anything yet, just wanted to know if it was possible to load a html5 source into dom without breaking it too much :P
 
@bwoebi Hmmm I've been thinking but I've got no idea at the moment. Maybe drop it in the regex room and see if someone there knows the reason?
 
@Mario I suspect the short answer is "no", I would give the long answer as "no, use phantomjs"
 
@HamZa feel free to…
 
@DipaliPatil Wordpress is horrible, I think this is fairly universally accepted. If all you want is to use a CMS as the end-user, it's probably not the worst option. A few people have told me that Drupal 8 is considerably less horrible (the best option of the 3 you stated).
I don't actually know though, as I've never used Joomla or Drupal, and I try not to think about when I used WP.
 
10:49 AM
@DaveRandom bad news! :( :P
 
@Mario @ThW may have a solution although he seems to not be here atm
first result if I google "domdocument html5"
 
yea checked it. i don't know if i want to parse a 350kb source with php. it can't be as fast as parsing it with an extension
 
btw. @HamZa all what you did is ungreedy matches with negative lookahead, right?
 
@bwoebi I used this technique stackoverflow.com/questions/406230/…
 
@Mario a) E_PREMATURE_OPTIMISATION b) not necessarily. libxml2 is fat and slow and stupid
 
10:58 AM
@DaveRandom So is your mother...
 
:D
ahah
 
@PeeHaa True, but irrelevant
 
@PeeHaa Oooooo no you didn't :D
 
lol
 
:D
 
10:59 AM
Ugh, bitbucket and pgsql use the same shade of blue in their logos, I keep losing tabs in the sea of similar-looking favicons :-(
 

« first day (1502 days earlier)      last day (3440 days later) »