« first day (2476 days earlier)      last day (2472 days later) » 

3:00 PM
are there any other good options?
 
AWS
 
Anonymous
Is there a way to delete a protected file in Linux without sudo?
 
Anonymous
Company is using shared hosting and I can't remove some Drupal8 config files
 
@Fabor They have Ubuntu VPS?
 
You can make one, but there's probably an AMI available, yes.
 
3:02 PM
They have too many products, I can't find a VPS xD
 
mornin'
 
o/
 
\o
 
Wut. Does anyone know why $index hasn't been marked as covered, indicated by the red block on line 42, when it has for the block after?
The exception it's wrapped around is covered, but that isn't. It's odd.
 
3:13 PM
What do you mean by "covered"?
 
Oh, sorry, phpunit's code coverage covered
 
xdebug or phpdbg?
 
xdebug
 
Try with phpdbg
 
I should install a debugger ...
 
3:14 PM
xdebug tends to get confused sometimes because of the way it works. phpdbg has been working better for me
 
@Sean 1. What red block? 2. What line 42? 3. That's a bad phone number validator.
 
I know it is ^
is_numeric is terrible for testing for digits only, tempted to do a small regexp
 
just test that the string is ten characters long
 
Also it's not a standard phone number, it's for an API which requires digits only
 
Digits only is a bad pattern
 
3:16 PM
or however many characters long it should be
 
Although ctype_digit() is probably what you think you mean
 
character limit varies, number possibly includes area code
 
Not to mention + for international prefix
 
@Sara oh cool, thanks. Didn't know about that
+ is not supported by the api
 
@Sara Could have a 00 requirement instead
 
3:17 PM
+18005551212 <--- Legit phone number
Yeah, + can be transliterated to 00
But it's a distinct meaning from, say: 442032868535 versus +442032868535
 
Huh, I always wondered how to add the + to an international number on an American phone, since it doesn't exist
 
The former might be a localized number, might be a London landline
 
> A string (up to 11 alpha-numeric characters) or an international mobile number (up to 16 digits) of the sender, to be displayed to the recipient, e.g. 447777123123 for a UK number.
 
Anonymous
aye, we have +44 in the UK
 
Oh wait wrong field
 
3:18 PM
@Sean Sending smses?
 
Yup.
 
Bottom line: + has a firmly established meaning and should not be omitted.
 
Actual bottom line: The API does not allow non numeric characters for the number.
 
The other delimiters: ( ) - SPACE you can be forgiven for stripping
Actual actual bottom line: Fix the API
 
"The mobile numbers are invalid or not an integer." is an error response, it says to just pass the area code sans +
 
3:20 PM
44 isn't an area code
 
international code*
 
If you have to send this to an API you don't control, fine. Store the value correctly and only strip it at the last possible moment prior to sending.
I'm going to be an annoying fuck regarding this, sorry.
 
Oh yeah, well ahead for that
Honestly phone number validation is something I don't even bring up in the office anymore
It's sparked up such stupid debates over it.
Stupid not in the sense that it's stupid to talk about this stuff, but the responses I've heard
 
"well screw international numbers"
 
Anonymous
#buildTheWall
 
3:22 PM
I dig a hole you build a wall
One day that wall's gunna fall
 
But yes, it's an API that's not ours. As PeeHee pointed out, it's an SMS sending service.
 
Anonymous
Is there a way to skip phpunit from being installed via composer?
 
Anonymous
--no-dev does not skip it for some reason
 
It's only in require-dev, yeah?
 
Anonymous
Yeah...
 
3:26 PM
Composer does --no-dev by default IIRC anyway, it's weird that it's not ignoring it
 
Anonymous
"require-dev": {
    "mikey179/vfsstream": "1.*",
    "phpunit/phpunit": "~4.0",
    "squizlabs/php_codesniffer": "2.*",
    "symfony/intl": ">=2.3",
    "symfony/validator": ">=2.3"
}
 
Anonymous
Yeah, I have about 30 libraries that install without issue, but when composer reaches phpunit/phpunit .. it exist with an error.
 
Anonymous
This is why I hate php, nothing really works as intended.
 
Anonymous
 
Anonymous
Alright, one more user to throw into the ignore list ..
 
Anonymous
3:29 PM
Be gentle now, no need for throwing
 
@Sean No, it does --dev by default.
 
Anonymous
I want to remove it from composer.lock ... but I'm sure the consequences might be worse
 
evenings lads
 
o/
 
@samayo Then remove it from your dependencies.
 
Anonymous
@kelunik If you mean from the composer.json it's not there ...
 
Then run composer why phpunit/phpunit.
Or run composer update if you just removed it from composer.json.
 
Anonymous
 [InvalidArgumentException]
  Could not find package "phpunit/phpunit" in your project
 
Anonymous
I didn't remove composer.json it is there, but it doesn't have phpunit as a dep gist.github.com/samayo/ab5e246eba9857ba11d66738eabbb29d
 
@PeeHaa As I've asked before, willing to commute to AMS? :P
 
Anonymous
3:36 PM
@kelunik this is the error log if it makes sense to you
 
Anonymous
It breaks when reaching phpunit.
 
@samayo Just manually delete it. The issue is not Composer or PHP, it's the custom installer you're using.
 
Anonymous
I am using composer, there is no custom installed. I even remove /vendor and then run composer install
 
Anonymous
Anyway, I will remove it from composer.lock
 
@samayo What's the second line here then?
- Installing phpunit/php-code-coverage (2.2.4): Loading from cache
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
 
Anonymous
3:44 PM
It's all drupal. But when I saw the error the first time I removed vendor/phpunit and tried again ... maybe that's why it's loading it from cache
 
Did you try rm -rf vendor composer.lock && composer install?
 
Anonymous
Nope, I only removed vendor/ if I removed composer.lock then all the libraries would have difference versions than the libraries the app uses
 
Anonymous
I pushed this from local to prod, so locally it works fine but if I removed the lock file it will not have the exact same libs as my local ...
 
why aren't you setting the version of the libs the app uses, in composer.json itself then... :/
 
@samayo And why did you remove phpunit then?
 
Anonymous
3:49 PM
Because the first time I saw this error: rmdir(/home/.../vendor/phpunit/phpunit/tests/_files): Directory not empty it indicates that phpunit could not be installed properly due to some file already existing, so I removed the whole vendor/phpunit
 
Anonymous
@Kaori This is Drupal, there are over 100 lib there, it's simply better to do composer require xyz and let it handle the versioning itself
 
Anonymous
eh... I will just upload it via FTP
 
4:05 PM
evenin
!!dad
 
I am terrified of elevators, I'm going to start taking steps to avoid them
 
Stickers of the new Amp logo are on the way! https://t.co/mkiJYE5P0s
4
 
@Trowski Coooool
@pmmaga I may be more flexible now :-)
 
@PeeHaa I wanted to support reusing the same statement if you prepare the same query twice on the same connection.
I can tag it tonight if you can wait. :-)
 
@Trowski I can wait for tonight :P
No stress
 
Anonymous
4:17 PM
@Trowski @WesStark \o/
 
@PeeHaa I have a PoC working, but I need to add a couple tests and polish it up.
 
@Trowski You just keep the statements in a collection?
 
@PeeHaa Not exactly, because I want destruction of the statement object to deallocate it.
 
How can i get those stickers? :P i want one
 
@Trowski Also the other way around I assume? But that would be hard
Because postgres can deallocate statements at will too
 
4:23 PM
When can I get my amp hoody?
 
@PeeHaa You mean an explicit deallocate() method?
 
Uhmm not sure I get what you are doing now I read back :P
When you say you are reusing the statement are you sending the prepare to the server anyway and just reuse the actual statement object?
 
No, I don't send anything to the server again, I just reuse the handle.
 
Anonymous
@Trowski put it on redbubble so we can buy it
 
@Trowski That might be problematic. Because postgres can remove prepared statements serverside when needed
 
4:27 PM
@samayo Never head of that. I'll look into it.
 
So you still have the statement client side but it may already been gone on the server
 
@PeeHaa Why would the server spontaneously deallocate a statement?
 
To make room for others
I am 99% sure I read that yesterday when looking into the length thing
Let me try to find it again
 
@PeeHaa Then that could happen to any statement, regardless of reuse.
 
It could I guess. But the probability is higher if you need to keep it for a longer time
 
4:29 PM
I can see that happening… but then your application is holding onto statement handles without using them for long periods of time (so I'm assuming).
 
Yeah not sure about the rules for deallocation. Trying to find it
 
@PeeHaa awesome! :) I'll send you a DM
 
tnx
hmmm can only find deallocations on session ends now
 
@PeeHaa That would make more sense. Randomly deallocating would cause havoc.
If the server runs out of memory it should just error further prepares.
 
As always database x docs sucks
 
4:42 PM
:P
 
Yeah nvm me @Trowski
It's tied to the session
 
Excellent.
@Fabor If you're willing to pay for it maybe we can work something out. :-P
Ugh… how I loathe expiring passwords…
 
@Trowski I tend to use random objects on my desk.
probably a bad idea
 
Where are my Amp stickers??
 
4:59 PM
@Trowski Ah paying, my one weakness.
Room 11 is 100% discount I thought
 
@Tiffany This case is especially infuriating, as the rolling bank password causes the synchronization in the accounting software to fail, so every three months I have to manually log in, change the password, then update it in the accounting software.
@Fabor Pssh… hoodies are expensive. There's a Room 11 discount, but it's not that deep.
 
heh. I doubt you ship to Vietnam anyway.
 
Lol
 
I've seen that same meme for several countries. Usually Italy.
And yes… shipping to Vietnam would probably cost more than the hoodie.
 
Anonymous
5:43 PM
Yeah, that's why you upload it to redbubble.com/shop/php?page=1&accordion=product and just make money
 
Anonymous
I buy many stickers from them usually they cost $2-3 with the shipment.
 
Anonymous
If you want to just upload and buy the sticker yourself, nothing beats stickermule.com
 
5:54 PM
@tereško Think you'll have time today for the PC build? :) You're not obliged to do it on any timescale.
obligated*
 
hollywar q: FooInterface, AbstractBar and BazTrait or just Foo, Bar and Baz (other variations welcomed) ?
 
6:26 PM
can someone reccomend me a method
i have controllers with lots of functions
and every of those function need to check for autentification
i can do it in constructor and throw error
but, how do i handle this error? create my own error handler?
or there are different methods
 
Anonymous
All functions need to authenticate?
 
need to check if user logged
right now it look ugly, every function have this
try{ if (!$this->auth()) Throw new exception('login failed'); ... } catch ...
id rather have this in constructor
but i dont know how to handle this error from constructor
 
Anonymous
Yeah, maybe ... it's interesting. Frameworks today hide so much of the implementation detail, I still don't know how these issues are handled
 
in short, this
5
Q: Breaking the constructor

Emanuil RusevIs there a way to prevent object creation within its constructor, so that: $object = new Foo(); echo $object; // outputs: NULL

 
Anonymous
but I'm sure @tereško can provide excellent help
 
6:31 PM
but without this part
    try{
    throw new SQLException("SQL error message");
}catch(SQLException $e){
    print "SQL Error: ".$e->getMessage();
}catch(Exception $e){
    print "Error: ".$e->getMessage();
}
how do i edit code?
 
errr, how do you edit code?
you mean message?
 
yes, to show as code
 
four spaces in front, or press ctrl-K
 
Anonymous
select all (ctrl+a) then ctrl+k
 
) doesnt work, well thanks, ill wait for teresko
 
6:34 PM
@samayo you don't need to select it first in chat
 
Anonymous
try{
    throw new SQLException("SQL error message");
}catch(SQLException $e){
    print "SQL Error: ".$e->getMessage();
}catch(Exception $e){
    print "Error: ".$e->getMessage();
}
 
Anonymous
hmm ... TIL
 
sorry, wrong window
i ment this, im just confusing everyone
5
Q: Breaking the constructor

Emanuil RusevIs there a way to prevent object creation within its constructor, so that: $object = new Foo(); echo $object; // outputs: NULL

try {
        $object = new Foo();
    } catch (Exception $e) {
        echo $e->getMessage();
    }
 
What do the methods do?
 
Build failure on solaris in 32bit compilation – #74997
 
6:41 PM
what's going on? i.imgur.com/ySwlVxm.png
@Trowski omg, you actually did it lol
 
@WesStark Somebody shared a link or image on a shady site in chat
 
oh. makes sense
 
We have a couple of those in our transcript
I think you can just find the offending image and remove it
Maybe ask @MadaraUchiha to remove it proper
 
no need to ping was probably removed already
i'm sure i've added sugar in the bloody coffee. but seems i haven't -__-
 
@WesStark Of course, it's awesome. Soon to be stuck to my laptop.
 
6:50 PM
will you be carrying around the proof of my incompetence :B
 
no, he will be carrying around the proof of your awesomeness @WesStark
 
i'm not buying that
@Trowski you didn't get too many stickers, right?
:B
i might be already working on an improved version...
 
@WesStark 100
 
that's ok. i feared it would be way more than that :D
 
7:07 PM
I want one, but I don't have any place to put it.
and I would feel like a fraud, since I don't use amp. :X
How can I politely tell someone that their question sucks and they need to edit it? They pasted whole chunks of code.
 
> solaris in 32bit
Sucks to be that person.
 
7:22 PM
is GuzzleHTTP some kind of accepted standard for implementations (of psr-7 stuff) ?
 
@FélixGagnon-Grenier It just implements it afaik
 
would r11's github github.com/Room-11 be a good place for one?
 
For one what? :)
 
ugh yeah, http request / response implementation
I think I asked that a few months ago, and it came out that we didn't agree on anything, but maybe some day we'd have a unique http request object
 
if you can find people wanting to do it or you want to do it under the org go ahead :)
I am not that big a fan :D
> and it came out that we didn't agree on anything
:P
 
7:26 PM
:P
 
@tereško Skyrim :)
 
@Fabor holy shit that's beautiful
also, I might have accidentally flagged it, not sure I think I first misclicked when answerting your message
sorry @10k-ers if I did
 
@FélixGagnon-Grenier It takes like a day of modding to get that setup. Plus your PC probably should be at least able to play Crysis on Ultra :P Rough list
 
... I need to upgrade my rig
 
@FélixGagnon-Grenier You didn't
 
7:31 PM
k great :)
 
is a 1070 enough?
 
I upgraded late last year :) it's a beast
 
@FélixGagnon-Grenier youtube.com/watch?v=ETdHaFz3pVQ
 
7:34 PM
!!should I update my code with namespaces or implement a URL converter?
 
@Tiffany Long ago just like hears you thrive to get in again.
 
wat
!!should @tiffany should update code with namespaces or @Tiffany implement a URL converter
 
@‌tiffany should @‌Tiffany implement a URL converter.
 
oh, I did it wrong
 
not nearly as much as I did
 
7:35 PM
You should implement a URL converter.
 
two times... I guess I'll work on that
 
Anonymous
@Jeeves you suck!!
 
@samayo And you like it.
 
Anonymous
lol
 
@FélixGagnon-Grenier It's the de-facto standard for doing HTTP requests with PHP. You should use Artax instead. ;-)
 
7:37 PM
@Trowski Where do you guys come up with the names for your stuff?
 
I'd love to further push Artax as it has the broadest appeal of all the Amp packages IMO.
 
is there a way to use @depends in PhpUnit across multiple classes ?
 
@Tiffany That's @rdlowrey's department. Artax is the horse in the Never Ending Story.
 
I'm often fascinated by the names of amp's packages
 
Aerys is the only other "named" package. The rest are simply what they are, e.g. dns, file, websocket
 
7:44 PM
thought there were more, hmmm
 
parallel is a little vague, but still very much says what it does.
 
Anonymous
I still don't understand what each package from amphp does or is used for..
 
@samayo amphp/amp is the main framework of course that provides the basic tools to do async in PHP, such as the event-loop, promises, and coroutines.
The other packages largely provide the service for which they are named.
 
I finally used Amp\Loop
 
@PeeHaa should write more blog posts about asynchronous programming :D
3
 
7:58 PM
Artax is an HTTP client. Aerys is an HTTP/1+2 and websocket server.
@Vamsi New project?
 
@Tiffany I hope I will eventually
 
nah, was just experimenting with it. but if I understand it more, will integrate it with a background worker
 
would help the job hunt
 
@Vamsi If you haven't, check out the docs: amphp.org/amp/event-loop The docs are still a WIP for most packages, but the docs for the main Amp package done.
 
The reason I am looking actively for a job is partly the reason why I cannot write blog posts atm :)
 
8:01 PM
@PeeHaa They absolutely help. It shows not only that you know how to code, but that you're able to communicate about what you know and teach others.
 
Anonymous
@PeeHaa Move to here, you'll find plenty
 
I have plans in NL
@Trowski Yeah I know. But time and other stuff are kinda limited
Days are just waaaaay too short
 
@PeeHaa You might want to finish and "professionalize" the home page.
 
Might indeed do that :P
 
@Trowski yup, checking it. Thanks
 
8:06 PM
@PeeHaa and the brain can only program so much in a given day.
 
@Tiffany Depends on the day though. When the stars align just right I can do it for days the entire day
Especially hobby dev after work dev works just fine for me
 
@PeeHaa Was looking for your blog and ran across it is all :-D
 
I could fix some things but actually finishing my own site is something that I have never succeeded in :D
It used to display nginx's 403 for months if not a year so that's progress
 
Hmm… the code example in your blog post would not run in the way that's shown.
 
I know
That's what the follow up was for due 3 months ago :P
The actual scheduling / sequence
oooor promises
 
8:11 PM
@Trowski I thought Artax mainly executed requests, not give you a usable request object reqpresenting the requiest PHP received :)
 
oooor just generators
 
@PeeHaa good luck with the Job search . I don't have any connections there, but I have heard Leaseweb ( hosting company ) always looking for PHP devs.
 
tnx
 
@PeeHaa Yeah, alright. A note would help explaining that code flow doesn't work exactly this way, but the example is conceptual.
@FélixGagnon-Grenier Right. It does what Guzzle does… only better.
 
I just want to find the time to spit out the second one instead :(
 
8:16 PM
@Trowski Oh, I see I wasn't clear. Indeed, I prefer artax for doing requests! However, I was looking for a general, recommended psr-7 implementation of the request PHP receives, like Patrick's http repo
 
@FélixGagnon-Grenier Oh, sorry, then I'd use zend diactoros.
@PeeHaa I know what you mean. I have several blog ideas I just haven't done. Some of it is time, some of it is motivation.
 
@Trowski Exactly those two things
 
8:31 PM
vacation next week and I'm staying home!
I can work on stuff... in between bouts of path of exile
 
staycation
 
@Tiffany I never could get myself over the first ten hours of play. at some point, is moving around less of a struggle?
I hate my character having to walk.
 
Yeah, there are skills that make moving faster.
 
@Fabor here i was, happy that she hadn't called it that
 
I use whirling blades + faster attacks.
 
8:34 PM
@PaulCrovella :P Next I will be sure to use "guestimate"
 
I have a friend that basically gives me stuff any time I log on. He gave me the items for a build that's really cool.
including a 6L chest piece :O
 
Nerds -_-
 
@Fabor says the also-nerd
 
@Tiffany `lol, nice
 
8:38 PM
@FélixGagnon-Grenier he's using whirling blades + faster attacks as well, so what it shows in the video is how the skill moves
 
8:51 PM
Does "advance" mean "relationship"?
> I didn't make a sexual adavnce on anybody
 
@Shafizadeh not quite. I'm trying to think of a better word but I can't come up with anything right now.
 
ah ok thx
 
"relationship" generally implies that there's something meaningful between the people involved
 
So "advance" means "move" ?
 
advance means step forward, make a move
 
8:56 PM
I see, thx
 
@WesStark thanks :P my brain is ded.
but four minutes until I can go home, so it doesn't matter.
 
you should've googled it, like i did :B
 
English is your native @Tiffany, right?
 
@Shafizadeh correct
 
Ah ok :-)
 
8:57 PM
I sometimes struggle for the right word on stuff
 
@WesStark I did it too .. but still I like to ask .. asking shows me more dimensions of a subject.
 
you like to ask because you love to make @PeeHaa happy
 
You know, you should be so happy because of your native language @Tiffany. If I knew English, I could do lots of think I wish.
@WesStark :D
 
@Shafizadeh yeah but I don't know any other languages. I'm not special.
 
@Tiffany yes, you are
 
9:00 PM
anyway, home time
 
@FélixGagnon-Grenier d'awwww, thanks
 
I believe just knowing English ie enough.
 
@PeeHaa ugh, there's way too many stuff to implement in psr's RequestInterface
yes, many, as in one stuff, two stuff, three stuff. thanks.
 
callable typehint generates redundant and unnecessary deprecation warning – #74998
 
9:08 PM
.... today's very good idea at minus 5 o'clock: "hey guys, why not let's add the other project's react component into our angular4 application, for the lulz" other guy: "yeah sure!"
 
@FélixGagnon-Grenier there's Danack's talk about that i think. tl;dr psr sucks
 
> If you have a function/method that takes an argument typehinted with callable, and you pass it an array of static strings which references a method that's not defined as static, you'll get a deprecation warning about making a static call to a non-static method -- even if you never actually invoke the callable.
Is it me being bad in english, or am I actually correctly still wondering what it is that is described there?
 
if you have a function that takes an argument typehinted with callable:
class Crap{ function bar(callable $arg){} function nonstatic(){} }
and you pass it an array of static string which references that is not defined as static:
(new Crap)->bar(["Crap", "nonstatic"])
which is exactly what it should do
 
@FélixGagnon-Grenier Translating to English "I'm passing something that's not a callable but kinda sorta looks like a callable to a callable typehint and expect it to work"
 
you want it to fail fast
where did you read that?
but what you should actually do, is avoiding callable altogether. Closure::fromCallable is the way, and always type hint for Closure
also avoid stuff like ["Foo", "bar"]()
it's incredible that thing even exists...
that's like saying
$x = function(Bar $bar){ /* i'm never using $bar */};
$x(333); // so i should be allowed to do this
 
9:46 PM
@NikiC if i propose a feature deprecation, should i also include the removal version, or should i go with "remove when appropriate, using another rfc" ?
 
@WesStark usually you will want to specify the removal version
 
would that be binding in case the rfc passes?
 
Unless there are special circumstances, like we cannot removing this in PHP 8 because it's used so much?
@WesStark Yes. You'd essentially need another RFC to not remove it
 
ok. makes sense. thanks
 
greek sucks
they really shouldn't have stuck that stupid case mapping for greek sigma into the language agnostic part of unicode
Because of that, and only because of that, lowercasing a string requires both infinite lookahead and infinite lookbehind. Yay
 
9:58 PM
which sigma?
 
Their economy sucks anyway, just leave it out.
 
@PaulCrovella They use a different sigma if it's at the end of a word...
Usually it's σ, but at the end of a word it's ς.
 
@FélixGagnon-Grenier zend diactoros is kind of ok.... github.com/zendframework/zend-diactoros The problems with it are inherent to PSR-7
 
10:15 PM
also the talk about interface segregation covered that a bit
 
yea.
 
you see, i was paying attention :B
 
@NikiC ah, that one. well, all case mapping in unicode is language agnostic
 
There are also language-specific mappings
For Lithuanian and Turkish
 
are you talking about SpecialCasing.txt? that's not comprehensive, it's a general guide to a few important things
 
10:26 PM
Yes, I'm talking about SpecialCasing
 
you probably want cldr.unicode.org
heh, the sigma thing is in SpecialCasing, but commented out
 
The main rule is not commented out
 
10:58 PM
@JoeWatkins would it be possible to fix this 3v4l.org/udtL7 ? there's no YYYY in the "trace as string"
 

« first day (2476 days earlier)      last day (2472 days later) »