« first day (2183 days earlier)      last day (2783 days later) » 

1:12 AM
So, tl;dr docker is broken, and my buddy told me to use php -s and honestly I have no idea what that means, and google is bad when it comes to searching -s. Anybody know any good reference material etc so I can read up on how to spinup my dev server with this command?
 
1:41 AM
@SterlingArcher php -S localhost:8080 -t path/to/public/dir
then simply browse to http://localhost:8080
love how this is the opposite way tho - I'm usually stuck with telling people how to run docker :P
 
any documentation I can read up on? my google-fu is failing me I can't seem to search for specific commands like -s or -t
 
php -S (big S)
that's all the docs you need btw
see also php -h (help flag)
 
ahh didn't think about the help flag. google php -S just gives me tutorials :P
that was frustrating. thanks
 
@SterlingArcher also man php ;-)
 
2:47 AM
@Danack I am :)
 
3:42 AM
@Ocramius ok. I'm not sure how this will connect, because unknown background, but when watching this video, I had a background hockey game running. so while the robots were exchanging binary with the cute music, there was also hockey player telling "so we worked hard both side of the ice" over the sound. took me a little while to realize it, but before that, I was thoroughly confused, amazed, unsure of who I was, or what was happening in my life. +1000
 
4:41 AM
Moin
 
'nin
 
@FélixGagnon-Grenier wow.... that's deep
\o Joe
 
4:56 AM
o/
 
you guys do any JS? This chatroom is more active and i need help.
 
5:15 AM
JS killed my mother
 
:P
 
posted on October 07, 2016

New Cyanide and Happiness Comic

 
5:42 AM
Hi, anyone have idea about Link Checker script in Google Adwords?
developers.google.com/adwords/…
LABEL: 'zzz-tprgt',

ACCOUNT_CONDITIONS: ["ManagerCustomerId IN ['264-478-1075']"],

In the script, client id is '264-478-1075' and it's label is zzz-tprgt

I need to generate the LABEL dynamically from the client id. How to get it's corresponding LABEL from the client id.
any idea?
 
5:58 AM
gninorm
 
mrnng
 
ormin
!!friday
@Jeeves you suck
 
@JoeWatkins And you like it.
 
we already had this conversation @Jeeves
!!friday
 
!!rebecca
 
!!friday
 
@Ekin wait, you can have a dark UI for this chat?
want.
 
Good morning
 
6:21 AM
@Ocramius yeah, it's this one, here is the userstyle :-)
there are a few others too, but iirc this was the most minimal in dark ones back then
/me goes to get more coffee
 
I take no one here knows Faraday Oo
 
@Ekin done, much better, thanks!
 
I could have taken Tesla, but that would have ruined the pun
 
@Gordon it seems more likely that the joke just wasn't funny ...
 
impossible. I am cracking up about it, so it must be funny
 
6:27 AM
hehe
 
@Gordon I'm missing the cage…
 
see @Gordon, @bwoebi knows ... faraday invented cages, everyone knows that ...
moin bob
 
Anyone still needs a keybase invitation?
 
I have 20 something as well
 
@JoeWatkins well, yes. the weekday cage. he found out we are caught all week long. hence the TGIF moniker. Thank god it's Faraday
 
6:42 AM
we could inadvertently be expunging useful information from my memory by conducting this conversation ... it must stop ...
 
hi
somebody of wordpress woocemarce?
 
@bwoebi does this look terribad? trying something simple... I actually want to match that "I" in the long sentence too, while "I is" still fails.
 
i need some guidline in it
 
@Ekin wow, that poem is deep.
 
heh
 
6:47 AM
@Waqas_aamer guid.us
 
now I see I forgot to lessen dupe letters
 
just create five of them and put them on one line
like this
77c76535-7760-40d4-8760-6cb74c2d6f01 1edd3963-6f06-4961-9cea-871f79a3599e 74e7ff14-56d1-486f-8920-8a80d817b5bd
guidline
<<<< helpful
 
i need an extra field in woocomerace export plugin @Gordon
i want to add unit of measurement in the export file. Please guide me in this...@Gordon
 
aha! interesting.
 
6:55 AM
@Gordon ??
 
<?php $fp = fopen("path/to/exportfile", 'a'); fwrite($fp, "mega blaziken"); fclose($fp);
 
Thanks sir for your reply, but i didn't get it
 
Sorry, can't help. Am no good with wordpress liberace
I am more of a guitar guy than a piano player
but have you tried wordpress.stackexchange.com?
 
Morning room
 
Wes
7:12 AM
!!rebecca
 
i just created it, thanks @Gordon
 
you are welcome!
 
Wes
. #Debian #Linux installs on Florida. https://t.co/KxiaOIaQz7
3
:D
gl to florida
 
won't people get hurt ?
didn't several hundred people already die ...
it's not so funny, it's a real thing ...
 
7:19 AM
It's still funny, it combines a real world concept with a ridiculous one to make the brain discover the obvious oxymoron
basics of satire
 
people died yesterday
 
but yeah, loads of people will lose homes, everything
 
people will continue to die today
 
yes, well aware
 
you don't laugh at that ...
no matter what shape it is ...
 
7:20 AM
I get to laugh at darker stuff
 
@Ocramius coca cola really is laughable
 
good one ;-)
 
@Ekin so, what do you want … \bI(?='m\b|\s(?!is\b)) ?
 
assuming my make test fails with a segfault. how would I go about finding out what caused it? its says core dumped in the diff file of the phpt test, but I dont see any core dumps in that directory. and I am unsure on how to use gdb with make test. or rather I am clueless.
 
Wes
@JoeWatkins yeah it's not funny. people in cuba and haiti died, several hundreds of them
 
Anonymous
7:24 AM
mornin
 
Wes
though i heard it slowed down a lot so hopefully nothing too serious will happen to america's east coast
 
O/
 
Wes
mornings
 
On my way to rainy Barcelona woo
 
@bwoebi currently "I am who you are" grabs both "I am" and "you are" but it only matches "I am" in case of "I am not you"
did that make sense? /still too early
also mornin
 
7:26 AM
please be more specific with what you want it to match @Ekin
 
meurning
 
!!version
 
Anonymous
 
): not deployed yet
 
Anonymous
7:27 AM
oic :P
 
Wes
@Ekin are you teaching jeeves the mr.robot syndrome ? :D
 
Anonymous
yo @Jimbo
 
Anonymous
how's the food?
 
@bwoebi em, sorry, this might be more helpful
 
7:31 AM
@Ekin so, you want to match all pronouns, including a correct form of to be if it's there?
 
@JayIsTooCommon I could murder a dominos pizza right now
Also I don't think I've ever been this exhausted from travelling before
 
true, yes @bwoebi
 
Anonymous
@Jimbo Looks like it's a good laugh though
 
Yeah it is, proper laugh. Going to get smashed on Saturday night, already got some swear words in Bulgarian that I can throw around (Y)
 
Anonymous
lol
 
7:33 AM
Hi..I'am new on SOAP Web Service.( code.runnable.com/V_dOtpVyvYp9Z9--/php-web-service-for-wsdl ) I try running this example but .not work and get me error : SoapFault: looks like we got no XML document in C:\xampp\htdocs\.....
 
@Jimbo you didn't even begin with the conference, slacker!
 
@Ekin regex101.com/r/StBCNF/10 … this?
 
\o/ yes
thank you!
 
@Ekin Well, easy enough for me; no problem ;o)
 
:-)
now I wonder if the J modifier would work okay with preg
3v4l shows it does for 7.1.0RC2 - 7.1.0RC3
 
7:51 AM
aha! So when PHP segfaults it doesnt dump into the current dir. at least not on ubuntu. on ubuntu the core dump is piped to apport and apport will save a crash file in /var/crashes. however, you cannot use that with bdg. instead you have to use apport-retrace -g _usr_bin_php7.0.1000.crash which will start a gdb session
 
@Gordon it does what's specified in /proc/sys/kernel/core_pattern
 
yes, which is piping to apport on ubuntu
 
you can do echo core > /proc/sys/kernel/core_pattern if you want a segfault to dump a core file in $PWD
 
apport is needed for whoopsie so I'd rather not change the setting
 
nice about apport-retrace -g, didn't know that
 
7:54 AM
took me a couple of questions on SO and AskUbuntu to get there
 
@Ekin yes.
 
yeah (?J) worked with all
 
On my way to Spain today Jimbo :P Likely nowhere near you though
 
Anonymous
holiday @Sean ?
 
Aye, work holiday for the weekend
 
Anonymous
8:09 AM
you lucky bitch
 
frorning
 
@Sean yeh sorry, I got something brewing that I really wanna finish up before I deploy
 
Wes
lol :P
 
\o Morn Dave
 
8:24 AM
@Ekin yeh have fun with that, I got this far and gave up because English is an epic headfuck of a language
I found that I couldn't even describe the rules in English, let alone code
 
heh, yeah I saw that then wanted to try out whether I could use one preg_replace for both pronoun & to be
and now yours will help me refactor my code
 
@Ekin could hook up an NLP parser instead
 
this has been suggested a few times, but frankly the idea bores the shit out of me. If someone else wants to do it, knock yourself out.
 
yeah that'd be way more stable/proper
maybe someone would like to take it for that hacktoberfest thing
 
Not sure if my PR counts for hacktoberfest. The issue was tagged in it that I referenced but the PR isn't.
 
8:36 AM
good meurnins
 
@Gordon it may be in the root source directory, where you ran "make" ...
 
@Sean I'm not there yet! Where you heading
 
if it says it was dumped, it was dumped somewhere, but some distros have a post-processing thing for bug reporting that intercepts them ... sometimes they are not written to disk if that is running ...
 
@Jimbo Barcelona~
 
Nice, that's where I'll be buying my bike
 
8:38 AM
do you mean crashing ?
 
@DaveRandom NLP in PHP is a bitch, that's why I opted for the Stanford JAVA one
 
Burn
 
@JoeWatkins Shhh, don't tempt fate ;)
But yes, very likely
And I still have 8 years no claims! Boom
 
what's riding like over there, are there lots of bikes on the road ?
 
@JoeWatkins There's some, but they're not particularly fast ones. In fact the fastest one I've seen was a Ducati 848, took a photo of it just before it got put onto the back of a tow truck. They certainly don't do the 'biker nod' but I nodded at every single one anyway :P There's a lot more mopeds
No super bikes that I've seen apart from that 848... I want to have the fastest one on the island
 
8:41 AM
Say I have a bunch of classes which implement the same interface. The interface defines a single method. The implementation is static across all objects of these classes, it literally just returns an integer and will never change. Is it worth defining the method as a static implementation instead?
 
still lots of moped will educate car drivers in the right sort of way for real bikes ... so that's good ...
 
Yep
 
@JoeWatkins thanks. found it already.
 
@Sean Why not have it as a constant then?
And Abstract Class instead of Int
 
I'm always a little upset when the nod isn't returned ... I might start following people who don't return, they are obviously up to no good ...
 
8:42 AM
I need to learn what Police look like too over there
 
@Jimbo then it's no longer part of the contract though. unless you put it in the interface
 
Well, different classes return different ints
 
Every time I went on the motorway, I would literally check every car for if it's a cop
 
But they're all hard coded into the class.
 
ha, they have mopeds ...
 
8:43 AM
:D
 
and seats ...
(the car make, and probably somewhere to sit also)
 
tbf I think the implementation i've done is totally wrong
 
Anyone got that pic of Daniel and Anthony on the boy band pic?
 
guys a question
i have an app and stored data of the app in mysql db
within a user sana with pass ***********
if i publish my app can people access the data?
its PC app with c# language
 
probably
this isn't the place for C# questions anyway ...
(configuration data like that is usually written to text sections in the binary, plain)
 
8:51 AM
but my db stored within a user which has a password
if so, then what is the Adv. of that password
 
but if the password is distributed with the app, then it's probably distributed in plain text, someone smart enough, or just with the right tool, can read that configuration
 
^
It's pretty easy, really.
 
the real question is, is mysql a suitable data source ...
you should speak to C# folks ...
 
i encrypt the c#
 
wut
 
8:53 AM
iam afraid mysql be accessed
 
@HamreenAhmad if you put it literall in your code, yes
 
you encrypt wat m8
 
i use .net Obfusecator for the c#
 
Wes
we don't do C# here
 
iam afraid mysql db be access via .frm .opt
 
8:54 AM
Write a backend for your PC app.
 
btw those file on server
 
i.imgur.com/9weI4f8.png So that's a really shoddy implementation diagram of what I'm doing
 
@Rahul i instal mysql silently on the PC and that files on the PC of the app
 
I understand it's bad because StringType should probably not use the knowledge of what its child classes implement, however, I don't really know a nice way of doing it without pasting validation checks for each extended type.
validate() is called in StringType::__construct
 
@HamreenAhmad that sounds scary
 
8:59 AM
we don't do C#. we wear glasses
6
 
Treat your application as any other client. Don't trust it right away. If your application is decentralized, use something like SQLite. If it isn't, require users to login, or whatever means of auth you come up with..
 
also, talk to C# folks
 
Haha
 
@Sean why would these methods needs to be public? if PostCode is a VO it shouldnt expose these but just check the length in the ctor
 
9:02 AM
@Gordon Was just looking for a way to reuse validation checking without duplicating code
I guess maybe it could define check methods in StringType and extend them if needed?
 
@Sean what do you mean by reuse validation checking?
 
@Gordon the idea was that StringType uses instanceof to detect which kind of validation to check
 
can you put up a gist with the code instead of the image
 
Sure
 
@Danack depends on the usecase. One major flaw is the stock cooler (if it's the old model), because that think is fucking loud. If you get that build you would have to but something like Hyper 212 and replace it (which would also let you do at least 10% overclock, if not more). As for the rest ... it depends. Are you a gamer, because if you are, then that PSU will become an issue. Oh ... and you probably dont need the optical drive.
 
@Danack hard to say about the price. You should try to recreate it in uk.pcpartpicker.com and see how much are you paying for the service of someone assembling it
 
Easy to change the implementation for this. It works but it just feels "wrong"
 
@Sean I like the idea of the interfaces but the concrete implemention on the stringtype is horrible
you will have to touch the stringtype each time you add a new restriction type
also, it's quite a lot of code just for the postcode. not sure you need all that if you can just achieve the same by hiding it all in the PostCode VO, e.g. without extending or implementing anything
 
Well that's kind of what I was trying to prevent. There's a bunch of classes which extend off of StringType, so it was an effort to try and not just have to copy and paste max/min string length checks across them all
I mean it does entirely make more sense to put them in each VO rather than it's current set up imo
its*
 
@Sean why not just implemented them as protected methods?
 
9:26 AM
@DaveRandom defined and used in StringType?
 
I might be wrong on that, but I find it weird that on the one hand, PostCode is-a StringType, but on the other hand, it might or might not implement these interfaces
know what I mean?
 
Yeah, that's why I thought it was a bit off when I took another look
StringType implements none of those interfaces, so it relies on knowledge that it might be extended, and that those child classes might implement those interfaces.
It also goes against the use of interfaces as you pointed out, since this is all internal checking.
 
it will work because of the if-checks, e.g. you can substitute the StringTypeA for the StringTypeB but it smells like a broken hierarchy nonetheless
 
To be honest I'd rather be clear and upfront rather than attempt to be a little more DRY. It's probably going to be worth checking these in the constructor of the VO itself rather than StringType
At the very least it won't cause a hierarchy smell and can be easily changed later.
 
What you could do is make the Restrictions into static validators and then use those in the PostCode object. It will hard couple the VO to the validators though
e.g. in the ctor if Restrictions\MaxLength::isValid($postCode, 42) && Restrictions\MinLength::isValid($postCode, 12) && Restrictions\Pattern::isValid($postCode, "/foo/")
 
9:35 AM
any suggestion on that gist.github.com/rahulpandey/28065b550ff6f8954ccb it is good to use singletone class
 
Aye, I see where you're coming from
 
@Rahul it's a singleton so it's bad by default
 
Could always use traits chuckles
 
\o
 
o/
 
9:37 AM
@Gordon because of object will be in memory until the server restart ?
or some other reason ?
 
no, because it's completely unneeded for this piece of code. no kittens will die when you instantiate a second instance of that
 
got it thanks
 
@Sean yes, traits would be another option
 
what I also like to do sometimes is put a public static validate($validate) onto the VO so I can use it as validator for that particular type. I then use the validator internally in the ctor in case I need an instance of the VO and when I dont need one, I just validate via the static method.
@DaveRandom that's definitely better than before, though one could still argue that it will require touching the stringtype when you want to add additonal validations
 
9:46 AM
@Gordon well sure, but only re-usable ones, and only to add. Anything that's subtype-specific would live in the subtype
ftr I generally do not subscribe to the idea that when I write something I get it right first time and will never touch it again, which is effectively what "do not modify..." dictates
 
you could also compose from individual types, e.g. new MinLengthString(new MaxLengthString(new PatternMatchingString(
 
Wes
People claim happiness cannot be photographed. They are wrong. https://t.co/tsu5WQjb5L
 
Anonymous classes: can I store the definition of one in a variable then instantiate it later?
Or to do that would I need to store it in an anonymous function and call that that then returns the newly instantiated anonymous class?
 
@Gordon Personally I'm not sold on Compose All The Things. Opinions are fluid though.
 
Anonymous
@Wes beautiful
 
9:56 AM
hi
 
@DaveRandom I agree.
@Jimbo you can probably somehow get the name of the class through reflection or via get_class
php > $cls = get_class(new class extends StdClass { private $foo = 42;  });
php > echo $cls;
class@anonymousphp shell code0x7f90b22620da
php > var_dump(new $cls);
object(class@anonymous)#1 (1) {
  ["foo":"class@anonymous":private]=>
  int(42)
}
@Jimbo ^
 
Hmmmm
Never thought of that, nice
I did this...
    if (strstr($method->getDocComment(), '@decorate\logger'))
    {
        /** Anonymous class within anonymous function **/
        $autoLogger = function($object, Monolog\Logger $logger) {
            return new class($object, $logger) {
                public function __construct($object, $logger) {
                    $this->object = $object;
                    $this->logger = $logger;
                }
                public function __call($method, $args) {
                    $response = call_user_func_array([$this->controller, $method], $args);
 
user3119231
Hello, I saved a sha512 hashed password into the database. (strlen = 60 oc) However if I compare my password (via login form) with the one in the database (password_hash(hash("sha512", "test", true), PASSWORD_BCRYPT)), using password_verify, it returns false. Am I'm missing something?
 
Yes
Yes you are
 
user3119231
Is there an explanation or is this all? :D
 
10:10 AM
you are missing a proper hashing algorithm
!!docs password_hash
 
[ password_hash() ] Creates a password hash
 
You shouldn't be using any other hashing function with password_hash.
 
@AllenJB Not true
 
user3119231
thanks guys. your advice?
 
But you shouldn't be using SHA-512, and you definitely shouldn't be using the raw parameter set to true
Raw set to true can cause null characters in the output, which effectively shortens the length of the password
And with raw set to false, SHA-512 is too long
 
user3119231
10:13 AM
What would you choose (in view of security) ?
 
Also, make sure that the password hash field in the database is long enough (if you store the 60 character hash in a varchar(50), the saved hash will be invalid)
 
Sec, I think Scott wrote up something about the optimal hashing to use
 
user3119231
@AllenJB really? ._.
 
that kinda makes sense doesn't it?
 
@Maurize In my experience it's a fairly common error when people complain that password_verify isn't working as expected
 
user3119231
10:14 AM
In this case database is okay. It's more my hash
 
@Maurize scroll down to "Limitations of bcrypt" -paragonie.com/blog/2015/04/…
 
user3119231
@Leigh awesome, thanks! exactly what I've searched for.
 
> Pointers in C are easy and fun to learn.
why do I think the page I am reading is lieing to me?
 
@Gordon that's what she said?
 
@Gordon Why do you? They are perfectly easy to comprehend, maybe not exactly "fun" to learn about, but dead simple in concept
 
10:23 AM
@Leigh because they are currently the constant source of segfaults to me
which obviously is my fault
up to the extent that it's not funny anymore
 
> iOS... Android... Windows phone... Blackberry. Long ago, the four
nations lived together in harmony. Then everything changed when the iOS
Nation attacked. Only the Nokia, master of all four elements, could stop
them. But when the world needed him most, he vanished.
get it?
 
no
 
... :( well... that's something referencing Avatar: The Last Airbender
 
!!google Avatar: The Last Airbender
 
Search for "Avatar: The Last Airbender" (https://www.google.com/search?q=Avatar%3A+The+Last+Airbender&lr=lang_en)
• Avatar: The Last Airbender - Wikipedia, the free… - Avatar: The Last Airbender (Avatar: The Legend of Aang in some regions) is an American animated tel… (https://en.wikipedia.org/wiki/Avatar:_The_Last_Airbender)
• Avatar: The Last Airbender (TV Series 2005–2008)… - Animation · In a war-torn world of elemental magic, a young boy reawakens to undertake a dangerous… (http://www.imdb.com/title/tt0417299/)
 
10:33 AM
anime shrug
 
nope
cartoon*
 
stahp waiving with pointers at me
 
lol
 
10:46 AM
@Gordon ****
 
pfff ;)
 
if you have any questions, feel free to ask them ...
 
thanks.
 
is it that you're not really sure what a pointer is for, or where it exists ?
(I can guess that from previous problems you had/questions you asked)
 
I understand what a pointer is. It's a reference to some memory segment. It's just a matter of properly reading function signatures, e.g passing a char to zend_string_init will make it segfault because it wants a char*
I am just not used to having to pay attention to that
 
10:55 AM
ah
 
@Gordon you prefer C++ generics and template mess?
@Gordon because pointers are really easy
arithmetic, implicit casting etc. isn't always that obvious though
 
Can I show you a thing, and you tell me if it solidifies your understanding or confuses it please @Gordon ?
 
@bwoebi I prefer $a = "foo" and not having to bother when I pass it to fn($str) ;)
@JoeWatkins sure
 
if this is formatted really poorly, gimme a minute
 0 1 2 3 4
 - - - - -
|H|E|L|L|O|
 - - - - -
Pointers reference vertical lines: the start of an area of memory.
The memory itself is inbetween the vertical lines.
 
I know
 
11:01 AM
Pointers themselves take up memory, but only enough to store the location of a vertical line.
I know you know, I'm asking if this kind of explanation would have saved you from figuring it out yourself ...
 
yes, actually. it was a picture like that that explained it to me
 
right okay good, just for me own reference ... I know you got it already ;)
 
I always preferred it like
addr value
-----------
ab04 1234 <-- this is a number in memory
ab08 ab04 <-- this is a pointer to the same number in memory
 
I'm thinking of the children @Leigh
 
Could probably do a lot better for children without a text based presentation medium :)
 
11:07 AM
IMO, that whole aspect of memory allocation and pointers to it is what makes C hard to grasp when you are coming from a language where these things are hidden from you
 
@Leigh I haven't had to explain this yet, but guess I will ... was just a rough idea of how I might do it ...
 
I agree, once the various concepts of memory are clear, pointers shouldn't be too hard. It's like an XY problem, trying to explain pointers but you should explain memory
reddit.com/r/learnprogramming/comments/1ehg69/… I quite like this graph paper analogy
2
 
oh yeah ... thankfully, we will start at the beginning :)
 
Not just for the concept of pointers, but for the concept of memory too - and kids should have access to graph paper
Unfortunately it wont be possible to get the kind of graph paper with bold and lighter lines, where the areas between bold lines are subdivided into 8 smaller areas, that would be perfect
Looks like it's most commonly subdivided into 25 :/
 
@Leigh sounds like you discovered a gap in the market
 
11:15 AM
I imaged searched for a 1x64 grid, and looked for a grid generator, before just using text ... I'll definitely need someone to make arty stuff for me ... I was just seeing if the explanation with boxes made sense, it seems too ...
in general, you remember how you learned stuff ?
 
by repeatedly banging my head against the wall until either the wall or my head gave in
caveat: not sure banging the head of the kids against walls will make their parents send them again ;)
 
I shall try not to harm them too much ...
 
11:30 AM
another word for pipe that does not start with p ?
 
tube?
 
@tereško thanks. The use-case is mostly compiling packages, and playing league of legends. And yeah - a noisy cooler would be annoying. Thanks for pointing that out.
btw the days of me over-clocking anything are over. I just can't be arsed with that anymore.
 

« first day (2183 days earlier)      last day (2783 days later) »