« first day (2685 days earlier)      last day (2245 days later) » 

1:11 AM
morning.
 
I'm just off to bed :D
night
 
1:33 AM
@PaulCrovella wonderful. Took me about 60 min :-D
 
Took me longer I'm sure, though I don't remember how long. I really like how it's put together. Stuff like (...?)\1* making you reason about how things fit together and whatnot.
a lot of the others I'm spending time up front cleaning up the regexs, which is less fun
 
@PaulCrovella Yeah, it gives you information, when you have two chars on each side. Then with 6 chars there the second and fifth must be either equal or the second must be equal to the last char.
And in this case the second and fifth char cannot be equal given the constraints from the (forward leaning) diagonals
That's the type of thinking required here, combining multiple pieces of information given the current available information - I like it :-)
 
 
2 hours later…
3:39 AM
I made a bunch of classes and have them interact with each other for an assessment, now I'm hoping it's not a complete mess :s
 
Wes
3:58 AM
@Allenph try to fake the api, rather than mocking it
 
o/
 
 
2 hours later…
5:36 AM
Is there a way to use Null Coalescing operator together with htmlspecialchars? Something like this: <?=htmlspecialchars($text ?? ''; ENT_QUOTES; 'UTF-8');?>
 
Wes
6:03 AM
 
lol
 
7:02 AM
morning
 
If someone asks for an assessment for a job to reformat a CSV file, make calculations, convert the calculations to another currency, and output a table, is having 650+ lines of code with 6 different classes (Table, Currency, Money, Processor) a little bit overkill?
\o
 
Hi all
I am getting following issue which is related to mysql .But may be someone from this group help..
Starting MySQL database server: mysqldNo directory, logging in with HOME=/
 
@Alesana no
 
@PaulCrovella that indeed looks like a good one. Think I need more coffee first
Morning
 
@Gordon That's a relief
I was thinking that the more lines I cut out the less of a chance I write something that I should be ashamed of :P (only joking)
 
7:13 AM
Is anyone here to answer a simple question :_(
 
Dont ask to ask, just ask.
 
Alright sorry.
AFAIK you can either write a url string, for example in a form, in a way that contains some primary keys(like id) so that you can use GET method in another PHP script to request it from the server and do some operations with it, or you can send it using the POST method(for example using input type hidden). More precisely, I don't know the reason one might want to use the latter one...?
One reason to use post I can think of myself is that
 
GET requests are usually used for getting information from the server, POST requests are usually used for making changes on the server
 
this code is ugly:
<form action="editjoke.php?id=<?=$_GET['id']?>" method="POST">
@Alesana hmm... I should think about it. Thanks
 
@Simon.B This is not just ugly, this is dangerous too.
Always, filter your input and escape your output.
 
7:18 AM
Is there something wrong with writing function foo(string $asdf = '') {}?
 
@mega6382 What do filter/escape mean?
 
Gist is highlighting the '' as an error :|
 
@Gordon thx
 
@Simon.B Like, look at this part <?=$_GET['id']?> I would assume, that the value of $_GET['id'] must always be an integer, so, you need to filter it to make sure that any other value is rejected etc.
@Simon.B https://www.inanimatt.com/php-input-filtering.html
https://benramsey.com/articles/escape-output/
https://econsultancy.com/blog/2663-web-app-security-basics-filtering-input-and-escaping-output/
 
7:41 AM
looks like trait's are common to use in scala and java.
 
In Scala. In Java they are only around since Java 8 IIRC
 
@Gordon i didn't know it exist in scala though but not in java prior to java 8.
i have been looking some code and it's full of trait's and even on internet.
 
8:00 AM
epigrammatic terse and ingenious in expression; of or like an epigram.
 
!!dad
 
Dad, can you put the cat out? I didn't know it was on fire
 
Wes
8:11 AM
> siberian blast coming next week
why isn't summer yet
 
morningz
 
Wes
i'm sure global warming is an actual thing, but to be honest i haven't seen warm temperatures in ages :B
hey joe
 
mornin
 
o/
 
@Wes that's because warm temperatures are hard to see. While they are not totally invisible, temperatures in general are easier to feel than see.
 
Wes
8:18 AM
yeah you are very nice making fun of my poor english
what would be the word, feel?
 
global warming doesn't mean that your back garden is going to warm up ...
 
No, "see" is fine to say what you intended to say. I was just being my usual smartass me :)
 
Wes
i know guys, i was just making a joke :B
 
8:31 AM
@Wes it's called "winter"
 
Here in California winter doesn't exist anymore :(
 
Wes
i envy you @Alesana
i am always cold
 
it's -10°C -12°C outside
 
But you can always bundle up, you can't peel your skin off
That's not a challenge btw
 
Wes
you win teresko, but i'm close. -7°C
 
8:34 AM
they are promising, that it will drop down to -32°C this week
 
Wes
twitter.com/WesNetmo/status/966228286446669825 @JoeWatkins thoughts? i'll write tests :P
 
If the temp drop to 5°C we'll have a lot of dead people on our hands... Maybe, even at 10°C
 
Wes
pass by ref support is going to be annoying i guess
 
@IROEGBU I don't think you really have winters in Nigeria
 
Yeah, that doesn't exist here... Just dry and wet seasons - except for high altitude places
@Wes like readonly in C#?
 
8:40 AM
> if an immutable property contains an object, to preserve immutability, the object that is being assigned to the immutable property must also be immutable.
 
Wes
i don't like that
 
this is just wrong ... pester whoever wrote it to fix it
 
Wes
it's too overkill... and i don't see why php should pioneer something that no other language have
 
An UX question: What's the best page after getting logout?
1) home
2) login
3) blog
4) register
 
home
 
8:42 AM
it's wrong ... a misunderstanding of what immutable means: by using the immutable keyword, you are not declaring that the referenced object is immutable, but that the reference that the current object holds to another object (variable) is immutable ...
 
ok thx
 
Wes
what we should have is just constant references that allow mutable contents (just to distinguish from php constants that are both constant references and constant value)
 
@IROEGBU that's outside the window
 
@Shafizadeh the same page they were on when they logged out if they still have access
 
@JoeWatkins can't we just copy final from Java?
 
8:43 AM
@PaulCrovella well actually they don't access the previous page since the logout button is into user's dashboard
 
@tereško It still won't get as cold as your place though... Lowest I've experienced naturally is (~14°C)
 
@tereško are those cars working? Or should they wait there until spring?
 
they're working
it just snowed at night
 
Wes
@Gordon final means it cannot be overridden in inheritors, it's different from readonly
 
@Wes no, it also means you cannot change it once set
 
Wes
8:46 AM
java is strange then :P
 
In the Java programming language, the final keyword is used in several contexts to define an entity that can only be assigned once. Once a final variable has been assigned, it always contains the same value. If a final variable holds a reference to an object, then the state of the object may be changed by operations on the object, but the variable will always refer to the same object (this property of final is called non-transitivity). This applies also to arrays, because arrays are objects; if a final variable holds a reference to an array, then the components of the array may be changed b...
 
@tereško If I were you, I would think about an idea which is snow based. Your country has a good potential of snow.
 
Wes
java is wrong, even if java invented final :P
 
If I am using strict types with function example(): string, then does that make using /** @return string */ pretty obsolete?
 
yes
 
8:52 AM
And if I strict type the params I guess I shouldn't use `/** @param ... */ either
PHP 7 makes things much more simple haha
 
strict or not you shouldn't repeat in docblocks what is declared in code ...
and java is not wrong, it doesn't have an immutable concept built into the syntax of the language, instead it let's the author of a class declare what is immutable by cascading use of final ... a final class with final properties is considered immutable without a declaration that it is, a non-final class with final properties is considered immutable in some circumstances, but is generally a bad idea, but it will let you do it, because it doesn't know about immutability ...
 
That makes sense, I am just trying to make sure I am not missing anything here
 
I actually prefer a well defined model of immutability that's built in, but the one in that RFC isn't it ...
 
OK, how good is DuckDuckGo?
 
you don't want google to track you?
 
8:59 AM
yeah, kind of.
 
then use startpage.com, it's a proxy to google (results are still from google)
 
morning Jimbo
 
problem with namespace/spl_autoload following the directory structure. My index.php is in folder /proj , it declares namespace proj; at start of file. Inside my proj/ folder, I have a /lib folder. My storeItem class (StoreItem.php) is located in that /proj/lib folder, it declares namespace lib; at start of file. In my index, I "use lib\StoreItem;", I try to call new lib\StoreItem() and it fails, Fatal error: spl_autoload(): Class lib\StoreItem could not be loaded... any idea?
 
9:09 AM
morning
 
Hi Naruto
 
@Julo0sS What autoloader are you using? Your own, or Composer?
 
MGE
hey somebody used google calendar api in offline mode? I have a question
 
@jjok just spl_autoload_register() empty, since it follows my folder structure
 
@Julo0sS There isn't a default implementation.
 
If you want to use a PSR-0 or PSR-4 autoloading, you have to give it an autoloader that does that.
Are you using Composer?
 
actually no, i'm not using composer
 
Oh, OK. That says there is a default implementation. I didn't know that.
 
anyway, it still fails... idk why... I follow directory structure, case sensitive, and still get that error :(
 
aha… GaaS for Linux with Steam snoost.com
but it's too expensive for the time that I have for gaming.
 
MGE
9:25 AM
0
Q: Problems getting refresh_token from Google calendar API in offline mode using PHP library

MGEThe first time I sync an account with Google calendar, I get from the API response a response like this: {"access_token":"xxx","token_type":"Bearer","expires_in":3600,"refresh_token":"xxx","id_token":"xxx","created":1519204303} And I save this information in the ddbb, and then I can sync the us...

 
> asked 34 secs ago
have some patience
 
@Julo0sS for your StoreItem to follow the dir structure shouldn't the namespace be proj\lib?
 
i'll try
same error...
 
you also changed it in the first file?
 
9:31 AM
i did "use proj\lib" in index, and "namespace proj\lib" in StoreItem...
Fatal error: spl_autoload(): Class proj\lib\StoreItem could not be loaded in...
 
Is there any logical explanation that GitHub would highlight this as an error?
 
yes, the parser is out of date and thinks the type string refers to a class, and so can only have null or no default value ...
(it's a php5 parser)
 
Ah, I assumed it was something related to that after reading some others were having PHP 7 related issues
 
10:06 AM
Hi guys
I have small question here-
suppose I have a table which contains new columns then How can I alter table to add new columns to the table
 
@DaveRandom I'm understanding async / await after promises with swift. I thought you would be proud ;)
Beautifully, it automatically does it in a background thread
 
> They also analyze the role that mathematics plays in producing and maintaining potentially oppressive social, political, cultural or economic structures.
 
is that a joke page ?
 
no
 
wow
 
foreach ($myObject->toArray() as TypeDeclaration $object) { // ... why not?
 
10:40 AM
 
@Jimbo Yeah. Why Not?
 
well ...
enforcing types at the point of iteration is ... too late, isn't it ?
 
@Jimbo you need class-casting before you can have that feature
 
yeah, if we had casting it would make some sense
today you would only be able to throw a TypeError, and it's too late for that ....
 
@JoeWatkins How is it different from array_map(function(TypeDeclaration $object) {}, $myObject->toArray())?
 
10:54 AM
@jjok this is also the wrong place to enforce such a check
 
it isn't different ... but if what you want is a typed collection of things, then it's too late to ensure that at the point of iteration, it means that any code that handles the collection needs additional guards, or needs to do crazy things such as ^ ...
tl;dr what dave said ...
 
Ahh. I see what you mean.
 
all of these things that people suggest, typically what they actually want is generics, sometimes they just aren't aware of it
 
the next person to say generics without following it with a full and working implementation gets a punch in the throat ...
3
 
Wes
genetics
 
10:58 AM
g6s
 
Jen & Rick's
 
Does anyone have a PHP code example they can share, of validating an api response against the json schema defined as per its swagger/open api spec?
 
@Danack have you asked Mr Sturgeon?
 
Probably a good idea.
Also, when I go to to the pharmacy, I find buying generics are much cheaper than the branded medicine.
2
 
SIGSEGV at php_html_entities – #75989
 
11:01 AM
@tereško is something named "human-snow (or whatever similar)" in your country?
 
Morngins
 
I didn't mean in here, in here is one of the only places that an implementation might follow, I meant on internals, I'm sick to death of discussing it, unless we're going to actually do it ...
so you can stop being smart asses ...
and get on with that implementation, I expect it on my desk on friday ...
 
"can" and "will" are very different things
 
@JoeWatkins if we implemented a minimum viable product (generic classes/interfaces with invariant type arguments and a fucking huge "future scope" section), what would you estimate the chance of it being accepted would be?
possibly generic functions, but I personally think those are much less useful in PHP
 
11:13 AM
At over 1000 lines, I think I am finally finished with my PHP assessment for a potential job. I hope this is what they're looking for ¯_(ツ)_/¯
 
I think I can't guess, I don't know what the implementation looks like ... levi and I attempted a generic traits implementation but it turns out to be much more complicated than it sounds, much less useful if it doesn't support interfaces, and I don't have any good idea of how to implement generic interfaces ...
it's not simple, at all ... and if you can figure out how to do interfaces, then you can figure out how to do classes ... I can't imagine it, or do it ...
 
Well I guess I'll have a go. Clearly, since I am cleverer than you and Levi, it will be easy for me.
@pmmaga interested in working with someone cleverer than Joe and Levi?
 
@Alesana what was the task?
 
I think it could be done, but I don't think it can be done in a way that is simple to understand (implement), and I think that's the first thing it needs to be, as it represents a huge change to an already fragile (and strange) type system ...
 
@Shafizadeh not that I am aware of
 
11:20 AM
@tereško then you don't do anything with snow ..! we make human-snow like this:
 
@Leigh Build a file processor to calculate totals and profit margins, and total profits of items from a CSV file with items that have costs, prices, and quantity. Then I have to also display the total profits in CAD, then output a table in HTML
 
snow men
 
@JoeWatkins oh, it's called snow man? ok got it :-)
 
@Shafizadeh "snowman"
also, IIRC, it is haram on your country :P
 
:-) well no, it is not :-)
 
11:22 AM
@Alesana Sounds like a reasonable task, good luck
 
@tereško Seriously?!!??
 
something something graven images ...
crazy fucking nonsense ...
 
@Leigh Thanks! The assessment wasn't very clear on how they wanted it so I'm hoping I'm delivering the right script :P
 
@DaveRandom my guess is that doing it through either doc block, or some formal set of annotations, and then having it just enforced through static analysis, rather than run-time enforcement, is the only way to get something useful this decade.
 
11:27 AM
@Alesana Sounds like someone's just getting you to do their job.
 
@Shafizadeh also, you usually make them bigger ... using 3 snow balls, with bottom one being approximately 1m in diameter :D
 
@jjok I was skeptical about that at first, but the person is from a reputable-seeming recruiting company. We'll see what happens.
 
@tereško :D
 
11:45 AM
@Shafizadeh I see your snowman, I raise you "snow hotel"
 
can you please rephrase "you raise me" ?
 
@Patrick's book finally arrived in the mail!
 
== English == === Etymology === From gambling. === Phrase === I'll see you and raise you Used to accept (or call) a bet, and at the same time raise the stakes. I'll see your five and raise you ten. I'll see your bet and raise you one thousand. I'll see your $20 and raise you $200. More generally, used when someone produces or reveals something. One says this to announce they will answer by producing or revealing something of their own. I'll see your defective gallbladder and raise you one heart murmur and a kidney stone. Well, sir, I'll see your four months in Vietnam and raise you th...
 
11:57 AM
hmm, these days ".. but it's not progressive" sounds like an endorsement: time.com/5128388/altered-carbon-netflix-review
 
@tereško I didn't realize Time too had auto-playing ads. Those should be illegal.
 
ad-free link: archive.is/zbbep
 
I could even put on ad-block but it's not a big deal :P
How is that an endorsement? I must be missing something
 
@IROEGBU anyway, not sure what you mean exactly, but I guess it is a betting on that hotel you linked. And if it is a joke then ":D", otherwise, I have no idea what should I say :-)
 
!!dad
 
12:05 PM
Did you hear about the followup to the database movie? It's a really great SQL
3
 
@Shafizadeh It's just a way to say "While you may have snowmen like that, it doesn't compare to our snow-hotels"
 
Ahh ... I see! Yes @IROEGBU, yours are much better since there here's a little snow
 
12:25 PM
@Jeeves (╯°□°)╯︵ ┻━┻
 
@Wes no it offers a method for every request-method, so post/put/delete are also available
 
12:43 PM
Interesting. Onwards from that talk yesterday about strict settings in corporate, a policy was put in place which auto locks screens after 5m last month
Just discovered one of the team has put on software to keep his PC active, because he went to lunch 40m ago and his pc is still unlocked.
 
@Sean I have my machine set to auto-lock after not very long (maybe 3 mins or so) and I have found that it will just stop doing it if I don't reboot my machine for a long time (Win10)
never bothered to work out what causes it, I just take it as a sign that I need to reboot :-P
 
Haha :P Sounds about right
 
only happens on my home machine though, office machine doesn't seem to have the problem
 
> (Win10)
 
but yeh, it may not be intentional
 
12:47 PM
Just checked, it's definitely software
 
@Sean post a status update on his facebook
 
@Danack my colleagues OSX machine periodically forgets that flash drives are a thing, so don't give me that :-P
@Sean http://
 
Ta, sometimes my type no work so good
 
That guy also makes the best stickies application for windows, by a very large margin
 
and install a BSOD simulating screensaver. I had tons of fun with these
not sure if they are still around win10 though
 
12:50 PM
@Gordon also set the screensaver to a static image of the desktop and unplug the mouse/keyboard
 
screenshot the desktop, set it as wallpaper, remove all desktop icons/toolbars
 
@DaveRandom nice :D
 
or just set the desktop background to same and delete all the icons and hide the taskbar
 
change the keyboard language while you're at it
 
@PaulCrovella and invert the image, and also invert mouse movement.
 
12:52 PM
I see, I am in fine company when it comes to unlocked computers
 
also tape the underside of the mouse
 
there's a very old thing which I currently can't find which reverses the monitor configuration at random intervals
 
Even worse than BSOD, set it to "Applying Updates 10%"
 
The classic "It is not safe to turn off your computer" from W95
I've just realised how fucking annoying it must be to work with me
 
@DaveRandom Or set it to a ransomware screen and unplug mouse and keyboard
 
12:55 PM
@DaveRandom every company needs a Mischief Executive Officer
 
One time, we set a guys local SQL server install to create a file on his desktop every 10 minutes
He couldn't find it for days
 
doesn't have to be unlocked to have some fun ... even a locked computer can have the hard disk removed in a couple of seconds ... then you get a bsod and "Insert a valid boot device and press enter" which is an excellent way to induce panic ...
 
For a locked one, all you need is lovely little USB device that pretends to be an ethernet adapter and sets itself up as the default route
 
if you sit close enough, plug in your own wireless mouse dongle
 
if he is a developer, globally replace semicolons with a greek question marks (;) in his code
 
1:01 PM
@DaveRandom :P I'd definitely like to help out with it if you got a direction for the implementation :)
 
@Gordon or remap his semicolon to insert that instead
 
oh, that would be truly evil
 
Remap his space bar to... tab
 
or tab to space or both
 
@Leigh someone always has to push it too far.
 
1:12 PM
I like watching things burn
Like.. the world
 
so that's why you have all those DVDRs lying around
 
Last time I dusted inside my PC case (which was probably about 3 years ago...) I disconnected the DVD drive, because I never use it
We're not alone after all
 
> When you’re in a discussion with Framework fans
stop right there, you've already made your mistake
 
nah, framework fans are like vegans. they will tell you their favorite framework and force the discussion onto you.
 
@Leigh yup, looks like there are some other sentient life forms out there
 
1:24 PM
@Gordon java is my favourite framework
also our instana license is expiring in few days :D
 
@DejanMarjanovic contact sales?
 
yes, that is what the little annoying popup is saying
 
btw, I have no idea what company you are working for, so I cannot even check
 
gebruder dassler
 
oh
 
1:31 PM
Is the AWS Certified Developer - Associate certification worth it?
 
@mega6382 I just saw that in CV yesterday, actually it was Architect - Associate, that makes no sense :)
 
@mega6382 have you ever seen it listed as a requirement for a job you wanted? or even one you didn't want?
 
@DejanMarjanovic Yeah, there are actually 3 different certification like, "Developer, Architect and DevOps"
@PaulCrovella No, not really.
 
@mega6382 Let me know if it's worth it :)
 
Wes
1:52 PM
afternoons
 
o/
 
I hate when I'm trying to find something and I can't remember where it's located
I need to write it down...
 
it down
5
I've done it for you, did it help?
 
I want to know how I can get more...information from my stack trace when an error is reported
because it cuts off after a certain point and I can't get anything useful
 
log_errors_max_len = 0
 

« first day (2685 days earlier)      last day (2245 days later) »