« first day (2201 days earlier)      last day (2969 days later) » 

15:00
@user6618037 No your foreach is correct the line with the explode isn't
user6618037
@PeeHaa I cannot believe that. It has taken me hours. :( Thanks man.
@PeeHaa what do you mean "revert to backup" ?
user6618037
@JayIsTooCommon cheers too.
If the disk isn't used after it you may still be able to get shit of it, but that's hard
Anonymous
@user6618037 yw
15:01
@MartinAJ It means you have learned the same lesson most of us have learned
@PeeHaa :-(
Do you care about the data or just the schema?
Anonymous
@MartinAJ have you actually tried importing it btw?
@JayIsTooCommon yes .. it throws error
Anonymous
ah.. well that rules out the editor... yeah backups :3
15:04
You really don't have a backup / temp directory / database whatever in whatever state hanging around somewhere @MartinAJ?
@PeeHaa I've changed the windows (OS) ... So all directories has been removed. I mean current directory is empty
Nothing on some external machine?
@PeeHaa sadly no .. maybe I be able to use some recovery software
@Ocramius ^_^ I think you missed the joke ^_^
You could try it, but if the reinstall has overritten the sectors or you have been using said machine chaces are slim
I think you should just: 1) cry 2) learn the lesson the hard way 3) move on
15:11
and backup next time
@PeeHaa moving on is hard :-(
@littlepootis also hearing this makes me angry .. I got it, right? stop telling me that !
On the upside. You will now be able to design your database without triggers / events and insane things like that \o/ :D
@MartinAJ Yeah I have been on that side a couple of times
@PeeHaa why are you thinking triggers are insane things?
Why does my quest have a -1 already? I've searched the SO and could not find the solution myself
I hate debugging applications which use them
Instant headache
15:14
@PeeHaa uhum
Is some of you interessted in a script that brings some functions to work with zendesk api ?
Then i will share it on git
@EthanJinksO'Sullivan Because it's a basic debugging question
!!canon errors
369
Q: How to get useful error messages in PHP?

CandidasaI find programming in PHP quite frustrating. Quite often I will try and run the script and just get a blank screen back. No error message, just empty screen. The cause might have been a simple syntax error (wrong bracket, missing semicolon), or a failed function call, or something else entirely. ...

^ @EthanJinksO'Sullivan that will solve it
@PeeHaa Looking at my local WAMP install, I see that I do have display_errors enabled. Is there a way I can check my PHP regex online somewhere?
15:19
@EthanJinksO'Sullivan regex101.com
@EthanJinksO'Sullivan Double check it. Do a phpinfo(); exit; in some file to confirm it's indeed enabled
Option2 is that something else is eating them
@Traxstar Great, thank you, very helpful
@PeeHaa Will do
ugh WP....
IIRC it's something like define('debug', true); in your init thing
Yeah, have that on as well
Also check your error log
15:22
I know PHP developers don't like WP since it doesn't follow modern PHP code
Right?
@EthanJinksO'Sullivan You could say that if you want to bring it in a nuanced way yeah
@EthanJinksO'Sullivan right
I heard wordpress is a new programming language
I heard on stackocerflow that it is operating system
is it now? I'm not in track with modern technologies any longer ..
15:30
I don't know that
Anonymous
@EthanJinksO'Sullivan Don't star things because they help you personally btw, stars aren't like upvotes :)
@PeeHaa phpinfo() says that I have display_errors "On"
(broken, but will build automatically now)
I do know it's better to hire student rather than wp developer as an PHP junior developer
@PeeHaa is an expert in that
15:36
"This question does not show any research effort; it is unclear or not useful"

Does my question not show any of this? I find SO very aggressive when you ask questiosn that seem "unworthy"
-1
Q: Regex to find and replace all internal links to protocol relative

Ethan Jinks O'SullivanDisclaimer: Before you -1 this question, I've already tried searching for a similar question on Stack Overflow and have yet to find the answer I need. If there is a previous question that has been answer, please bring it to my attention. Using the following regex in the preg_replace function fin...

@Duikboot enjoy the cake ;)
@Ekin gonna unpin your poll there ... I can see we were about as useful as a cock flavoured lolly pop ... expected ...
@EthanJinksO'Sullivan first, the community generally dislikes when you tell what to do ("before you downvote" stuff). second - I read your question twice and still in doubts what's the actual question is
ThW
ThW
@EthanJinksO'Sullivan You should not use regex for that but DOM.
@EthanJinksO'Sullivan it is actually unclear as the question does not show any actual problematic part; which probably means that you haven't done any actual debugging.
(first you talk about regex and then blank page??)
@JoeWatkins want access now?
ThW
ThW
@EthanJinksO'Sullivan and xmlns "urls" should not be modified, they are namespaces, changing them breaks the document.
15:41
@bwoebi yes please
@JoeWatkins DMing you in a minute
@AlmaDo Conversely, I only read the title here, and what they want seems pretty clear from that
@Leigh same was for me - before I've read the question (: Not that I didn't get it, just the exact issue was obscure to get
may be I'm just tired. Going to 6 weeks vacations tomorrow..
@EthanJinksO'Sullivan Why can't you generate protocol relative links in the first place, instead of trying to monkey patch them after the fact?
15:43
@Leigh This is for a WordPress plugin
Does that mean you have no control over the generation of the links?
@AlmaDo WHere to?
Also 6 weeks? wtf
@PeeHaa @DaveRandom Do you see value in InvalidWatcherException::getWatcherId()? github.com/async-interop/event-loop/issues/…
@Leigh No default option to make them protocol relative
@EthanJinksO'Sullivan Why do you even want to make them protocol-relative, just make them all https :)
15:46
Personally, I do, but this helps other users who run into the "mixed content" warnings
So this is a plugin you're developing?
@EthanJinksO'Sullivan If you make it all https you won't get mixed content messages
Already out and works as intended, but I am adding an option to turn only the internal urls into protocol-relative
@PeeHaa Nah it's not just for his site, otherwise it would be easy eh :)
15:48
@kelunik No specific opinion either way. @DaveRandom probably has something to say
Right now the plugin turns all URLs protocol-relative, internal & external
@Leigh But the plugin is about removing http urls in https contexts
@Leigh Right. I myself have no issue with it, but this is something people find helpful when they do not update all of their links to HTTPS properly
Nobody will install the thing on a http site I assume @Leigh
@PeeHaa It actually removes both protocols
15:49
@PeeHaa I just saw that @Jeeves logs watcher IDs.
Well unless they just want their URLs to be protocol-relative
@Wes Trying to create a regexp that will match chat pingable names and nothing else, see chat.stackoverflow.com/transcript/message/33690438#33690438
@EthanJinksO'Sullivan But why? The users of the plugin are people running tls (otherwise they won't get mixed content)
@bwoebi thanks, will test
You only have to change http -> https links
15:50
@PeeHaa something
See!
@kelunik not specifically, but I don't see any value in not having it there
That's up to them. This just helps ensure that the website runs on HTTPS
@JoeWatkins 5-6 fps… ouch.
lol ^
Get a pc already
15:52
Code should handle the exception in situ where it knows the ID @kelunik, letting the exception bubble is probably a leaky API. That said, it's implicitly a logic error anyway, which means that you will (should) only see it when debugging, which means that the more info that is available the better
@EthanJinksO'Sullivan Ok, ignoring the fact that regex is horrible for what you're doing, why don't you take a look at preg_replace_callback, and capture the full attribute, and process in the callback function. Use something like "(https?://[^"]+)"
@DaveRandom Code other than catch-all handlers should never catch that exception.
Also, move away from using / as your regex delimiter, you'll have more fun :)
@Leigh () seems like a poor choice :-P
Though not in that context :-D
@Trowski … actually, that's what I usually use^^
15:55
@Leigh Unfortunately, I do not claim to be a pro at PHP, but if there is a better process of doing it, I'm all for it
I find it even well fitting as it's capturing group zero ^^
~or GTFO~
@bwoebi Oh, does it ignore ) until it finds the matching delimiter?
@Wes Could you please stop making avatars? All avatars look too similar in color now.
@Trowski yeah, nesting works properly
@kelunik LOL … look at names :-)
15:57
@bwoebi Cool. I'll be switching to that then, lol.
@EthanJinksO'Sullivan Regex is generally not the correct tool for parsing and manipulating HTML
@kelunik it's Halloween! \o/
@Leigh Someone mentioned DOM as an alternative?
@Archer Not yet. :P
well... it's gonna be in a few days...
:/
15:59
@EthanJinksO'Sullivan DOMDocument yea, but it will spew on badly formed pages
earlier the preparation, the merrier it is....
@Leigh So then I am left back in regex. This was the only way I could find to get the solution that I wanted since this is on WordPress
!!should I pizza or greek?
You should pizza.
Screw you I want meat and a lot of it
16:09
!!should PeeHaa meat or veg
@PeeHaa should meat.
well there you have it
Good elephpant
You could make... pizza steaks
I hope that's a thing now
!!? pizza steaks
16:10
Search for "pizza steaks" (https://www.google.com/search?q=pizza+steaks&lr=lang_en)
• Nick's Pizza, Steaks, and More Restaurant Clevela… - 423-790-5850 - Police, military, fire department, and EMS discounts. 30 years of experience. Homema… (http://nickspizzaandsteaks.com/)
• Pizza Steak Recipe - Food.com - This was a favorite of my children when they were growing up- I started out using a basic Swiss Ste… (http://www.food.com/recipe/pizza-steak-228491)
• Pizza Wings Steaks & Things - 12 Reviews - Pizza… - 12 reviews of Pizza Wings Steaks & Things "I have not had a good 2016 and I just want
I think the food.com one is what you want
although it looks gross
Yeah doesn't look too tasty :P
^(1 step)
lol
16:12
it's hard
16:22
That's what @Jimbo's mom told me too
that was as easy as your dad @PeeHaa
errrrrr :P
@FélixGagnon-Grenier hey, that's you !
16:24
He's a true canadian noaw
I guess after a few years, i can put (part of) my face out there
1 sec
Having linkedin doesn't help you :P
1 second is over
Ugh can you flag users for being actively stupid?
And harmfully
16:27
dunno... :/
@PeeHaa @DaveRandom Maybe we should make @Jeeves more generic, so it can also be used with other platforms like Slack or Hipchat.
@bwoebi very ouch
#MakeJeevesGlobal \o/
Sounds cool although I know too littlw about those aevices to understand the feasibility. The fact that we are disecting him should help though
when I code on @bwoebi's computer, we finish each others commands ...
16:31
That's real love going on there
@JoeWatkins It a little funny … as long as it doesn't disturb you? :-)
Extreme pair prorgramming
:-D
@bwoebi :)
I can totally see that working out superb if @DaveRandom and I are going to do that.
I would result in 1 line written 2 lines deleted
Make it happen!
16:36
are you drunk ?
think about what making it more generic really means, it means making it more complicated ... if you don't intend to use it on the moon, don't waste time preparing it to go to the moon, that's obvious ...
Holy shit @JoeWatkins! You are right!
We need to go to the moon with it!
do they have slack on the moon ?
user4962466
nope but they will have it on mars soon
Mars even better!
@JoeWatkins Also I've heard nasa uses node. So we probably need to rewrite it in node instead too \o/
Anybody wants free reps?
@0x13a You do soundcloud?
@kelunik I like that. I've even started own impl on Slack RTM API inspired by @Jeeves called it @Bender from Futurama and run it in my company. Even wanted him to act like @Bender drinking all the time. Always complaining etc. But then havent got enought time to provide another features like NLP with conversation context detecting based on natural language like not with commands. Its quite interesting area
@PeeHaa awww shit
yeah forgot that one
that profile is such bs
Anonymous
@PeeHaa I want all of your rep. Now
17:11
:P
@PeeHaa me! me! me! me! me! me! me! me! me!
ctrl+c + ctrl+v ftw
Anonymous
@PeeHaa terminator thing, were you just thinking Wikipedia or other resources? So if Wikipedia fails, next resource, next resource, generic response? Because if so, I imagine response time would be shitty?
I did some experiments with google -> get first result -> get first paragraph
Anonymous
How?
Anonymous
First paragraph from google or from the result?
Too late @all op already "answered" it stackoverflow.com/questions/40245237/…
@JayIsTooCommon result
Anonymous
17:19
@PeeHaa O.o how? Without knowing what source that result will be from?
That's the problem and the reason it's still just experiments blindly getting the first p tag from sites are hit n miss
Anonymous
Ah I see
For some tests it worked great but for others i got e.g. a menu item :p
Anonymous
Yeah I can imagine. It's a good thought though, would be nice to have him handle more
Anonymous
@PeeHaa I wonder if you could search the result for $subject (ignore anything in brackets) is [content]. If not found, generic response. Could be a start
17:30
im just waiting for @Jeeves to turn sentinent
Anonymous
By generic response, I mean "why don't you fucking Google it?"
@JayIsTooCommon That's actually a good idea yeah
However with one big caveat: I need to find the subject
Which is totally doable for "who is [subject]"
We should probably have a better look into proper nlp tools at some point
But I can totally live with incremental improvements though
Anonymous
17:51
Fuck, my dog is 50kg.. I have 50kg crushing my face every night. I assume that's my beauty secret
Anonymous
@PeeHaa yeah bit by bit and then he'll live! >:)
18:04
** /dev/rdisk7s2
   Executing fsck_hfs (version hfs-366.1.1).
** Checking Journaled HFS Plus volume.
   The volume name is Macintosh HD
** Checking extents overflow file.
** Checking catalog file.
   Invalid index key
(4, 61384)
** Rebuilding catalog B-tree.
CreateNewBTree returned -34
   Disk full error
** The volume Macintosh HD could not be repaired.
grrr
2 hours ago, by PeeHaa
Get a pc already
lol
we are kinda serious
@bwoebi Get a bigger SSD. :-P
18:16
he cant
to get a bigger SSD, he need to take that thing to the "genius bar"
then again
I've repaired/upgraded several Macs.
ifixit.com is wonderful for that.
> it's not a bar, and those are not geniuses
Apple could at least fix one of those things. Serving alcohol would considerably improve the experience the genius bar. After enough drinks, they might start to sound like geniuses too.
I'm so gonna use this image in my code reviews :D
18:56
Who is in that background? A mystery indeed
2
19:18
evenin'
o/ ekn
\o
o/
\o
19:22
would it be bad if I add several methods like:
public function isPluralReflexivePronoun($tag) {
    return $tag == 'PPLS';
}
to brill tagger class?
Besides the fact I have no idea what Reflexive means I don;t see a problem
I think such methods would help for easy checks on specific parts, specially for transformation
# themselves ourselves yourselves
Although I would do ===
@Ekin ah
yeah, I was thinking the same
@Ekin Yeah. Small / tiny methods are sexy
19:24
You know,I'm not comfort with your new avatar .. :-) @PeeHaa ..!
alrite, having those on tagger side will help a lot on reminder
thx
@Shafizadeh You don't like james bond?
@PeeHaa somewhat ..
@Wes is an an actual james bond btw? If yes which one is it?
@Shafizadeh the expression is "I'm not comfortable with ..."
also, hi
and how did you experiment in feeding yourself end?
19:27
ah .. thx for the point ;-) also hi to you :-)
@tereško well last night, it was a bit unsalted, but the lunch of today was perfect :-)
it's a matter of practice
yeah .. anyway I'm getting use to it ("use to" means habit)
Is there anybody which know what's "latary" ?
'who' and 'knows'
and I don't. maybe you meant lottery or something
@Ekin do you mean "who knows what's "latary" ?
@Ekin yes .. I meant was lottery ..
anyway I've registered in it .. I hope I be accepted
yes, you are asking whether there is "anyone who knows X", you are referring to people
19:41
got it
okay, I'm going out for the last time here...
laters
nite all
20:04
@Trowski the SSD ought to be big enough…
@kelunik that "a bit late" comment was sent around 10 hours ago … dunno why it appeared only now
@Trowski it's like still 328 GB free
well… time to clone my desktop's disk and reinstall the OS…
copying with 320 MB/s <3
20:22
WordPress Plushie Kickstarter Everything unholy about PHP, summed up in a stuffed toy
Like a 20 mins to copy all files :-)
20:45
what does this link means about webapp sitepoint.com/easy-jquery-php-captcha
it is a jquery plugin
@Ekin If it don't see you anymore tomorrow. Safe travels
21:05
ping @JoeWatkins?
> Impact: Viewing a maliciously crafted JPEG file may lead to arbitrary code execution
> Impact: Parsing a maliciously crafted font may disclose sensitive user information
> Impact: Processing maliciously crafted web content may lead to arbitrary code execution
Shit's on fire, yo
21:27
fire. fire everywhere.
hey guys how long does a default session allow you to stay logged in? I read 30 minutes.
21:46
@Case It's not that simple
Assuming you are relying on the session simply being destroyed because it has not been used, then it depends on a couple of settings as well as how much traffic your server is getting
Read up on "session garbage collection"
also you should manually implement a guard to ensure that sessions won't still be valid if I come back to them a week later, and you should also ensure that PHP won't prematurely destroy sessions so that people won't get logged out unexpectedly
The long of the short of this is: PHP's sessions aren't a great way to do... well, much of anything really
22:04
… checked for badblocks, reinstalled and now copying files back with 410 MB/s <3
years ago doing all that took a full day… nowadays it takes 2 hours :-D
Thunderbolt is a nice thing.
I mean… I have an Ethernet cable too… but that's capped at 1 GBit/s i.e. 128 MB/s…
If you can copy it in 20 min, why wait an hour :-D
so you can legitimately drink more beer? oh yeah it's @bwoebi we're speaking about :D
@FélixGagnon-Grenier hahah :-P
If it's an excuse to do less work, sure :-P
But I'm anyway not aiming at working anything tonight
hey @bwoebi have you tried compiling php-uv on windows at all?
like, do you know if it's even expected to work?
@DaveRandom no.
22:16
I may try and do it tomorrow
@DaveRandom Apart from compile issues it should work though
Can someone please reopen my question? It's a legitimate issue I'm encountering. stackoverflow.com/questions/40233129/…
there's no windows specific code in the uv extension
Right, I was referring to whether the compile toolchain is remotely sane
oh wait no sorry it's a C compiler, I forgot, it's implicitly batshit crazy
@KingKongFrog /usr/bin/env php is, for whatever reason, giving you the cgi binary instead of the CLI one. Why that is I couldn't even begin to guess, but if you change the shebang to whatever which php gives you in a terminal, it should work
@KingKongFrog the question is still confusing… you get headers and do a CLI request? wut?
22:22
cgi
As in, traditional bullshit ancient CGI
which explains why argv is not working either
Presumably someone has symlinked the wrong binary somewhere and whatever user cron is executing it as has that as the first place there's a php binary in $path
uuuugh. There's these 50 GB … I've backed my .Trash folder up and copied it back too :-D
there are so many compiler warnings in php on win it is ridiculous, it's amazing anything ever works :-/
@DaveRandom Thanks for the suggestion. I've upated to /usr/local/bin/php but still get the same result.
@KingKongFrog what do you get if you run /usr/local/bin/php -v?
ektaphot@server13 [~]# /usr/local/bin/php -v
PHP 5.4.45 (cli) (built: Oct 4 2016 06:57:52)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.4, Copyright (c) 2002-2016, by ionCube Ltd.
with SourceGuardian v11.0.2, Copyright (c) 2000-2016, by SourceGuardian Ltd.
with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies
22:30
wow ioncube
oldschool
:-P
OK, what if you run that in cron?
(as in, just run php with the -v arg)
brb 5 min
PHP 5.4.45 (cli) (built: Oct 4 2016 06:57:52)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.4, Copyright (c) 2002-2016, by ionCube Ltd.
with SourceGuardian v11.0.2, Copyright (c) 2000-2016, by SourceGuardian Ltd.
with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies
weird
What if you run you set the cron line to * * * * * /usr/local/bin/php /full/path/to/pm_history.php April @KingKongFrog?
worked
lol
22:38
Well that's super weird and I got no clue why that would happen but at least you have a solution
works for me!
Thanks @DaveRandom
no worries :-)
VERY much appreciate your time
any time
Hey @room
I had a question: Does it make sense to use docblocks for hard typed languages?
Coming from PHP, now working on a Java Spring project, I'm wondering if there's any need to add a full docblock (with @param, @return, etc). I see perhaps a need to explain what the class or method does, but not much else?
22:47
Docblocks are supposed to be for documentation generation tools (hence the name). In that way it does make sense if you are actually going to do that. @return etc is arguably unnecessary in a context in which things like that can be inferred from static analysis and I'm not entirely sure why such things exist there, maybe to keep the doc gen tools simpler?
Oh no wait I do know why
it's because you can include a documentation description with the tag
like @return Foo The first matching Foo instance in the collection or whatever
@throws YouFuckedUpException when you fuck up
I see, still serves a purpose for adding descriptions
But it seems like we could just ignore that second piece....
take a look at this example from Oracle....
Indeed, although I would argue that if you aren't going to bother writing those and/or actually generate some documentation, there's no point in it being there at all
Let me paste the small example...
/**
 * Returns an Image object that can then be painted on the screen.
 * The url argument must specify an absolute {@link URL}. The name
 * argument is a specifier that is relative to the url argument.
 * <p>
 * This method always returns immediately, whether or not the
 * image exists. When this applet attempts to draw the image on
 * the screen, the data will be loaded. The graphics primitives
 * that draw the image will incrementally paint on the screen.
 *
 * @param  url  an absolute URL giving the base location of the image
lol that's Oracle's definition of "small"
lol...
notice the @return
22:51
@prograhammer Right, see all of that is descriptive, it doesn't contain any type info in the docblock
and even the @param don't bother to re-list the types.
Yup
It's purely for documentation purposes
Seems like for a hard typed language ^
Right, because you can get all that information from static analysis
yup, that's what I figured
So I think I'll not waste my time on putting all the types back up in the docblock, but I still want these descriptions here for other devs I think.
I think it let's other devs quickly look at the docblock and get an idea of what's going on, before even scanning the code.
Thanks @DaveRandom
22:55
@prograhammer Well I'd argue that in that example the docblock is pointless if you aren't going to actually generate docs tbh, there's nothing in that docblock that I can't figure out just as fast by reading the code
However I am a bad person so... do with that what you will
What about the summary?
The paragraph of description at the top
Do you see that as not useful?
Well a lot of that is talking about things that aren't really anything to do with that method
@prograhammer Useful, but in the wrong place
But look beyond this example.
In general, are these summaries useful?
It seems to be describing how some underlying renderer works, and that information belongs with the renderer
@prograhammer In the case where there is some information that cannot be easily determined just from reading the code, definitely
And yes I am totally nitpicking on that example
I think with IDE's able to do "auto docbock folding" it's not a bother to say that every class/method/property should have a summary docblock.
It wouldn't create any distraction to those who just want to see code.
22:59
Oh I 100% agree that "it fills my screen with comments" is not a legit argument against it

« first day (2201 days earlier)      last day (2969 days later) »