« first day (2986 days earlier)      last day (1962 days later) » 
00:00 - 21:0021:00 - 00:00

12:05 AM
@kelunik pong, florian at margaine dot com if we can't find a common timezone
 
php 7.3.0 is not LTO ready – #77318
 
Wes
12:25 AM
undecided if i should go cell shading or soft shading
maybe both
 
12:54 AM
If I have the following session code, but the user closes their browser, will the session be deleted anyway?

session_start();

// server should keep session data for AT LEAST 1 week
ini_set('session.gc_maxlifetime', 604800);

// each client should remember their session id for EXACTLY 1 week
session_set_cookie_params(604800);
 
1:14 AM
How do you guys feel about GOTO in php? this works great in Rapid Programming, but never tried it with PHP
 
1:34 AM
are you talking about the goto function that's been in programming since BASIC? (probably longer)
if so...
@JhonatanVillena chat.stackoverflow.com/transcript/11?m=43620750#43620750 (doesn't pertain exactly to goto, it does relate to it)
I've decided I'm going to have a professional clean my vacuum cleaner because it's probably too far gross for me to clean it effectively. I just have to get quotes now... blah
 
2:01 AM
@Tiffany haha, never really used goto in php because its "bad practice", but im stuck with someone else's code that is not in a function, rather is just linear and calls a third party API. I just need to create a loop based on the API response so it can build another API call with my new parameters based on the previous response. Thus im considering adding a goto and use it kind of like a while loop.
 
@JhonatanVillena there are likely infinitely better ways to do it, but I can't recommend anything at the moment, nearing my bedtime and my brain is fried
 
@DMop Why not use setcookie() and getsetcookie() ?? you can set life time..
 
2:16 AM
@JhonatanVillena does that operate separately from the session functions or should I use that instead?
 
2:58 AM
@DMop hmm. if u r working in a session, you can store it as cookies so the data is stored in the client and not server. save your session as a cookie: session_set_cookie_params () .. to get it back just load up the cookies by using: session_get_cookie_params () and then start your session session_start(); if you don't load your session cookies before session_start(), it will start a blank session. php.net/manual/en/function.session-set-cookie-params.php
 
3:21 AM
oh GAWD ignore my last reply.. ¯\_(⌣̯̀⌣́)_/¯ .. you need to use cookies so if the end user closes their browser, you can call the cookies back.

use setcookie()... then at the start of your script, check if isset

you can do something like: $toSave = $_SESSION;
setcookie('savedSession', $toSave, time()+(86400 * 30), '/') <-- This will save for 30 days

to check if there is a cookie saved:
if( isset($_COOKIE['savedSession']){
 
 
3 hours later…
5:59 AM
I am no good at reading bitmasks. Which OpCache optimizations are enabled by default (0x7FFFBFFF)? On a related note, some of the optimization passes could use some more explanation on what they do (github.com/php/php-src/blob/master/ext/opcache/Optimizer/…). Maybe @NikiC can help? Thanks!
 
6:22 AM
AFAICS, the escape analysis is part of the DFA pass. Does DFA stand for deterministic finite automaton here?
 
6:37 AM
Add an optional group paramter for chown() and lchown() – #77319
 
 
1 hour later…
7:40 AM
In this context, DFA means data flow analysis, of course. Stupid (not fully awake) me.
 
8:00 AM
joyance Archaic. joyous feeling; gladness.
 
8:58 AM
@SebastianBergmann you were early
 
9:45 AM
@LeviMorrison no real objection, though we rather should deprecate warn-only assertions?
@SebastianBergmann well, if we want to more specific, we probably have to be a lot more specific
 
morns
 
@SebastianBergmann also: every except collect constants (which is marked unsafe as well) and function inlining
 
@FlorianMargaine We're usually in the same timezone, no? ^^
 
@kelunik yeah, but I'm usually busy in EU timezone :)
 
@FlorianMargaine Same here ;-)
Not sure, did I answer your PDO question regarding the timeout?
 
9:56 AM
@kelunik I don't think so, but Bob did, mumbling things about threads and alarms
 
Yes, same thought here, I don't see how PDO would do that without some regular scheduling of a timeout checker.
 
I guess one way would be to implement a PDOConnection::ping function, that userland would have to call
which kinda beats the point... idk
userland can already do a select 1 within an idle timeout
 
Yes. Just use amphp/sql if you plan to use long-lived connections. :P
 
@kelunik shameless plug :P
 
it already handles that?
 
10:01 AM
@FlorianMargaine Yes, we pool connections and remove idle connections from the pool.
 
@kelunik where? I can't see it
 
@FlorianMargaine Ah, sorry, forgot that pooling moved to github.com/amphp/sql-common/tree/master/src
 
@kelunik ah, thanks
that's cool
I can point people to that at least :)
 
@kelunik how exactly are statements load balanced now? I remember that a weak point of the original amphp/mysql was that a statement executed twice would happen on a same connection instead of the statement being prepared and executed on a free connection (or generally: if the connection was busy, it would need to wait for the current command on that connection to complete)
 
10:09 AM
@bwoebi I think those are balanced now, but I'm not 100% sure. I didn't write much code for our SQL libs. It's mainly @Trowski and your thing.
 
@kelunik I'm wondering because I'm not really sure what github.com/amphp/sql-common/blob/master/src/… does - this also seems to be 10% of connections < ALL Statements, and not like in the docblock 10% < count(this statement)
Bit confused there
 
@bwoebi I don't understand your < signs, seems to work like the doc block promises.
 
Ah got it
 
10:27 AM
morning
 
@Trowski is there any reason for github.com/amphp/mysql/blob/master/src/StatementPool.php#L27 reset() and re-binding? Can't we just retain the current binding? This way round we're wasting quite some roundtrips and latency...
and even if params change, you can just overwrite their binding
 
Hi all
Someone please clear my doubt regarding the evaluation of a variable in for loop condition
Consider below code fragment :
<?php
$people = array(
array('name' => 'Kalle', 'salt' => 856412),
array('name' => 'Pierre', 'salt' => 215863)
);

for($i = 0, $size = count($people); $i < $size; ++$i) {
$people[$i]['salt'] = mt_rand(000000, 999999);
}
?>
I want to know whether the condition code $size = count($people); will execute on every iteration or it will get execute only on first iteration and for later iterations the stored value of variable $size will be used?
 
10:47 AM
@PHPLover php.net/for
 
11:15 AM
morning
@Trowski what do you think of this? it comes with the game and guide. I probably won't be able to buy it until January after checking my pay schedule this month.
 
11:36 AM
Morngisn
 
yo @PeeHaa
 
Wes
monno
 
o/
 
11:59 AM
I am configuring my database_connection.php file on a hosting site so instead of writing $dbHost = 'localhost'; what should I write ? the ip address of the site ?
or mydomain.com?
 
Wes
12:17 PM
i haven't used photoshop brushes in ages #flatdesign
 
@PHPFan that depends entirely on where the db is located
 
@Gordon so the url path to db?
 
@PHPFan if the db is on the same host, you keep localhost. if its on a different host, you put either the hostname or its ip
 
@Gordon if on a hosting site so the hosting site name?
 
@PHPFan the domain or IP address
if it's www.example.com you put www.example.com
or...example.com
shrug
Gordon will correct me
 
12:22 PM
@Tiffany mygivendomain.com or www.hostingsite.com?
 
which server that your domain is associated to is your database hosted on?
 
well
 
12:36 PM
 
1:07 PM
Good morning!
 
1:37 PM
You guys forgot to put php7apache2_4.dll in the windows downloads of PHP 7.3.0 – #77320
 
1:55 PM
@Jeeves No we did not
You downloaded the wrong version probably
 
Wes
@PeeHaa it amazes me that he/she didn't provide a link
literally one job
 
Maybe they got it through Web Platform Installer?
that's how I download PHP on my Windows servers
 
Wes
yes or explain how you got it
 
@Wes It downloaded zts version
 
but WPI assumes you're going to use IIS (I think), which is probably why the Apache dll wasn't included
I'll double check
WPI doesn't include the apache dll for 7.2.7
 
2:01 PM
@Tiffany It's probably nts
Or whatever installation tool you use repackages it
 
@Tiffany I cannot do imgur right now :)
 
ah
I can put it on something else I can share and send you a link via twitter, if you want the screenshots
 
I'm just gonna close the issue and let OP provide the info if they still have issues. Thanks though
 
I'm not already logged into twitter, blah
hm, 7.3 couldn't have been downloaded from WPI, it's not in there yet, 7.2.7 is the latest I can download through. So probably unrelated.
 
2:10 PM
Is WPI a MS thing?
 
Yes
kind of like apt or yum, except specific to web stuff I think
 
Yeah than it will not ship with the apache dll
 
The TL;DR is that there are two main version of php
thread safe and non thread safe
 
lol, it doesn't even have apache or nginx in it, like there are no search results for apache or nginx
 
Wes
2:13 PM
if i use php as apache module on windows, should i use the zts or not?
because every time i tried, the zts was the only one that worked
 
@Wes zts for mod apache
 
Wes
k
 
kind of wish I was still working with PHP so I could ask some of these programming questions and have it make sense >.<
time to go bug the Java people
 
is it possible to make dynamic content with a modal in php?
in a modal with php*
 
3:00 PM
@J.Doe ajax?
 
3:12 PM
ah, that weird perverse satisfaction when anything related to strings in your C code works
 
I don't believe it
half the functions are expecting a nul terminator while the other half is expecting it to be not there
 
@Gordon Satisfaction? I'd get suspicious.
 
@Gordon check you're running the right executable?
 
and the halfs are changing every other moon
 
@FlorianMargaine No way is it that predictable.
 
3:15 PM
good morning
 
@MadaraUchiha I didn't specify which other moon
 
The traditional Scottish moon.
 
@bwoebi You mean emitting an E_DEPRECATED at start-up if it's set to warn, or something?
 
would using a getter be a violation of IoC?
 
3:33 PM
@MadaraUchiha Mind helping me with this small problem? gist.github.com/mega6382/8a5f8a4e51af8081450cc1a352e51755
 
@mega6382 methodName: Exclude<keyof Foo, 'call'>, off of the top of my head
 
With "noImplicitAny" enabled, I get this error "Element implicitly has an 'any' type because type 'Foo' has no index signature." and google isn't of much help
 
Huh, for some reason it resolves to never
Huh
It seems like privates are not counted in keyof, I didn't know that.
 
sorry, got it
 
I don't think it's possible to describe the type you want.
 
3:37 PM
Now i get "Argument of type '"bar"' is not assignable to parameter of type 'never'"
 
@MadaraUchiha why is your hat so small?
 
You can workaround it by (this as any)[methodName] but that's hardly ideal.
@Naruto Some people tell me I'm compensating for something.
@mega6382 What's your use-case?
 
@MadaraUchiha I have a dozen of "get" methods, and I would like to have the ability to call them dynamically by user input(filtered and validated)
 
@mega6382 Make them public and use foo[whatever]
 
from what version of php can you use : any?
 
3:40 PM
@MadaraUchiha could I bug you for a code review of velocity code? or is velocity something you won't touch with a ten foot pole?
 
@Tiffany I hadn't touched velocity in years, my review will be of little help to you, I'm afraid.
(Even back then, I avoided it as much as possible)
 
@MadaraUchiha that really sucks
but I guess I don't have a choice
 
I'm bothered by doing this because I feel like it violates inversion of control, but I can't see a better way of doing it.
 
It's worth noting that you can't really get it in a safe way anyway unless you enumerate the possible inputs
 
@MadaraUchiha I am using decorators to make an array of acceptable inputs
So, its safe in that regards
 
3:44 PM
@mega6382 Decorators can't affect typing though
Can you whip up a slightly more complete example?
 
sure, give me a minute
@MadaraUchiha it is something like this gist.github.com/mega6382/8a5f8a4e51af8081450cc1a352e51755
I know its not how you are suppose to use decorators, but it kinda works
Also if I do something like this, it works:
let obj = this;
return obj[methodName];
 
@mega6382 Really? That's not what I get.
 
Sorry, its "let obj: any = this;"
 
@mega6382 Ah, well, sure, that's the same as (this as any)[methodName]
 
4:00 PM
@MadaraUchiha hmmm, so there is no real way for me to use this[methodName], except if i make them public?
 
@mega6382 Yeah, I'm afraid not. It seems like the design decision they made is that types look the same from everywhere (there was a suggestion to make privates appear in keyof when used inside of the class, but it was rejected)
I still kinda don't understand the use-case though. What are you trying to achieve by writing it this way?
 
4:29 PM
@Jpv Thank you that's really helpful! just to confirm, the example you showed would load the entire server side session made through session function into a client side cookie to be used later?
 
Wes
4:51 PM
@Danack twitter when u have time.. haven't modified what you asked yet. focused on the colors mostly
 
@MadaraUchiha I think this problem will have a much nicer solution in typescript, but I seem to be approaching it php style
Also, apparently I can use this[methodName] if I add [key: string]: any; in my class. Like
class Foo{
    [key: string]: any;
    ...
}
 
5:07 PM
knock knock
 
come in
 
you ruined it
 
:D
 
have you never done a knock knock joke?
 
@Tiffany I have and I wanted to ruin it. Lets start over
 
5:08 PM
knock knock
 
Who's there?
 
doctor
 
doctor who? :P
 
nope, Doctor Strange
 
lol
 
5:09 PM
 
5:29 PM
!!rfcs
 
There are no RFCs in voting. Sorry, but we can't have nice things.
 
 
2 hours later…
7:04 PM
GBP has pennies, Euros have cents. Is there a common name for the fractional part of a currency?
 
Wes
cents @Danack
short of centesimals
 
@Danack We call ours both cents and pennies.
 
Wes
or "onehundredths"
 
Usually cents during a transaction.
 
@Wes ....pennies are called cents?
 
7:07 PM
We'll say penny or pennies if we're trying to find change and we say "I only have pennies."
 
@Danack cents are called pennies, except for in GBP, they are only called pennies, but in US cents and pennies are the same
 
Wes
@Danack that is the universal name i think, not sure if they are universally called that way
 
ah! "Fractional part of currency..." Yeah, we call that by cents only.
 
I thought it was pence in UK?
 
@Tiffany that's plural, i think
 
7:10 PM
@mega6382 as opposed to pennies?
 
Pennies are physical
 
I like the term "quid."
 
Cents are the value
 
@Tiffany I believe so, yes
 
I am not giving you 32 pennies if I give you a quarter, a nickel, and two pennies
I am giving you 32 cents, but only 2 pennies
(in the US, this is)
 
7:11 PM
@Alesana that's an interesting point
 
@Alesana but you can give 32 pennies ... if you're a sadist/masochist
 
"That'll be eleven dollars and forty-two pennies."
 
paying large bills in pennies out of spite
 
Uh, I've got 1,142 pennies. Sorry
 
^If you're paying the government they have to take it.
 
7:12 PM
Actually
 
DMV, Post Office, etc.
 
Only if they're rolled up in the penny rolls
 
But if you just have a bunch of pennies, they don't have to take it
 
Not if it is the government.
 
7:13 PM
@StatikStasis and banks will take it too, most likely, but I believe you'll have to roll them
 
One second let me find the story.
It's due to the conditions on the note.
 
@Tiffany that's actually not allowed in the UK - royalmint.com/help/trm-faqs/legal-tender-amounts Or at least the person who is owed the debt can refuse payment in the form, and for the debt to still exist.
 
@mega6382 most banks will take it and convert it to larger bills. some banks have scales that will count the pennies for them
 
@Alesana Found it: "One might feel bad for the Lebanon DMV employees, who chose to count the coins by hand. But Stafford is within his legal right. According to the U.S. Department of the Treasury, "United States coins and currency are legal tender for all debts, public charges, taxes and dues” under the Coinage Act of 1965."
This article had the reason government owned facilities require it: heraldcourier.com/news/…
 
7:17 PM
brings up another point, if a business says they only except debit or credit card, they're breaking the law
 
Hmm for some reason I thought that I read that they could require that it be in rolls
 
Which law?
 
@Tiffany I used to believe that, but then I learned it wasn't true. Now I'm confused
 
@StatikStasis basically the same thing you just said, I don't remember the law
because money says "this is legal tender for all debts"
they have to accept cash
 
I believe that law only refers to government owned operations.
 
7:18 PM
For Government organizations
"Private businesses are free to develop their own policies on whether or not to accept cash unless there is a State law which says otherwise."
 
Private businesses have a lot more power.
 
But there are parts of the government where you can't pay in cash either
So I'm confused
 
@StatikStasis @Alesana "coins are legal tender for all debts, public charges, taxes and dues." treasury.gov/resource-center/faqs/Currency/Pages/…
@Alesana I see, you've already posted that link
 
"Same goes for the government. Unless there is a state or municipal law or rule that requires them to do so, no government entity has to accept your pennies for payment" is what someone says on Quora, but I guess it's not relevant if the Treasurty says otherwise
 
7:21 PM
I have a giant bowl of funfetti cake dip ...
 
@Tiffany We have cookies at the coffee pot that I wish would hurry up and be taken because I grab one every time I walk by.
 
I have a beer
 
we had a potluck
 
@tereško I thought you were a wine-guy.
 
so I brought cake dip, funfetti cake mix, vanilla yogurt and cool whip
 
7:23 PM
@StatikStasis I do prefer wine, but the winter has started in Latvia
which means that these days I prefer shop as close to home as possible
 
I have a major headache and an extremely strong desire to quit my job
 
@Alesana migraine?
 
I think that funfetti cake dip or beer would be better
@Tiffany Not quite
 
caffeine withdrawals?
 
Not that either
Just had a conference call with the owner of my company and a client who I've been working with
 
7:26 PM
@Alesana didn't you get a new one just recently ?
 
@tereško I got a big raise but not a new job
 
@tereško Aaaaaaaand now I am watching a Riga, Latvia VLOG. youtube.com/watch?v=7-axP2YepeE
 
I know someone said "That's a new job" because the percentage of the raise was similar to the increase someone gets when switching jobs
 
is it enough for medical insurance now?
 
@Tiffany I still don't know what to do about that. The Obamacare plans have a $8000 deductible on top of a ~$2,000 yearly premium, so really insurance doesn't kick in until I spend $10,000 on insurance
 
7:30 PM
good lord
I think that's how it is for my dad
 
The plans differ, from $2,000 deductible and $8,000 premium, to $5k and $5k, to whatever else. But, all of them would be around 10k a year
 
I can't remember what my deductible is, I think it's like 1500-ish
 
That would be nice
 
I pay... 72 dollars a year for my insurance
 
:(
I wish
 
7:32 PM
We have two plans, I'm on the base plan. Premium plan costs more, but covers more, and deductible might be lower.
oh yeah, I'm at the time of year that I usually max my prescription deductible, lol
It's nice going to the pharmacy and hearing "that will be zero dollars"
 
^That is nice
 
Nice, that's too bad it's near the end of the year
 
I pay 72 dollars a year, my employer pays around 4k a year...
 
I really need a new job haha
I think the responsible thing to do is wait 4 more months though until I have had 1 year of experience where I am
In the meantime I need to work on an open source project
 
@Alesana Jeeves has some issues
 
7:38 PM
Heh
 
there's also Code Triage
 
I was on there, I didn't see any projects that really stood out to me
 
@Alesana Ever thought about using the Freelance sites?
One of my friends did that a lot on the side. He ended up doing a lot of work for a company in Seattle and it grew into a FT position.
 
@StatikStasis I signed up, but I saw like 5 minutes after anyone posted anything there were already some 20 offers from people in all sorts of countries for a lot less than I would work for
 
You have to keep looking. He faced the same issues. But you kind of get a feel for what to bid on.
 
7:41 PM
I wouldn't do online work unless you really want to work from home, since you live in the US. Build some experience--you mentioned open source work already--and get a better job.
(Right? or am I crazy on that?)
 
I work from home now and I hate it
 
@Alesana What do you do?
 
@LeviMorrison if your university offered you a full-time position, would you take it? (whether it's a staff position or faculty/research assistant or whatever else there is under instruction)
 
@Tiffany I took it 6 years ago lol
 
I do web development and programming, lately it's been more on the programming side. We are a digital marketing firm.
 
7:42 PM
@LeviMorrison but does it include benefits and stuff? or is it just moneys?
 
It has good benefits, and my boss has obtained better raises than normal for us.
 
nice
 
Do you think finding a better company now would help more than staying with my current company for a full year then moving?
 
@Alesana Start looking now, but there is something to be said for experience too.
 
I worked here as 40-hour temp worker (before ACA came into effect) without benefits/insurance for a while, then two year later my position was made full-time with benefits
 
7:44 PM
@Alesana How long have you been working for your current employer?
 
@mega6382 8 months now
@LeviMorrison I have my resume updated for when people contact me, I guess I will start applying around though. I am getting experience on paper where I am now but in reality I was gaining a lot more experience before I was working here, working on my own projects
 
@Alesana Even if you don't take jobs that you interview for, interviewing is valuable experience.
You get to learn about other companies, so you better understand the market conditions. And it helps you to interview for the jobs you will take.
 
@Alesana Yeah, you should build a little more experience, recruiters don't really like job hoppers, but as @LeviMorrison said you should still start looking for a job
 
Plus, you never know when you'll find the jewel you are looking for.
 
@Alesana Plus (piggybacking on what @LeviMorrison said) doing interviews when you're not pressured to find a job fast, really helps to relax and take in more about doing an interview. You'll be able to refine your interviewing skills during the process.
 
7:47 PM
That's true. I get contacted by recruiters a lot and I'm responsive (usually)
I think I have a good idea of the market, but I could definitely use experience interviewing
Right now we have ~30 clients, there is a project manager, a designer who sometimes codes, and me. I try to write quality code but when there are so many clients and I am being pushed to just "Make something work" it makes it pretty hard, so I feel like I don't get the time to really learn how to program better like when I was working on my own projects
So I went from gaining actual experience, but none on paper - to gaining experience on paper, but not much actual experience
I feel pretty conflicted about it
 
Another thing you can do in your evenings is solve coding puzzles. Try solving the same problems in all languages you are interested in getting a job in (maybe both PHP and Javascript).
And then once you are done with it in each language, go back over it and try and simplify and improve it.
It's an exercise that really helps, I think.
 
I think these Advent of Code puzzles are good for that. I've been publishing my solutions to GitHub
Going back over them is a good idea though, I need to research into different algorithms and make them run a lot faster
 
Wes
just realized alesana with a bit of a mustachio would look like jon snow
winter is coming.
 
:P definitely heard that one before
 
Wes
lol
 
8:06 PM
@tereško What is the "watery sour cream" like stuff that they drink in Latvia? (Mentioned in this video.)
@Wes OMG
 
Wes
right? :B
 
Kefir or kephir ( kə-FEER), alternatively milk kefir (to distinguish it from water kefir) or búlgaros, is a fermented milk drink made with a yeast/bacterial fermentation starter of kefir grains, that originated in the northern parts of the Caucasus Mountains. It is prepared by inoculating cow, goat, or sheep milk with kefir grains. Traditional kefir was made in goatskin bags that were hung near a doorway; the bags would be knocked by anyone passing through to keep the milk and kefir grains well mixed. == Etymology == The word kefir, known in Russian since at least 1884, is probably of Caucasian...
it's actually quite ok, but the place they went to is shit (that dumpling spot is basically frequented by students .. at the end of the month)
 
@StatikStasis the Americanized version is like chocolate sour yogurt, lol
I've bought some before, it's not too bad, but definitely takes some getting used to
 
8:24 PM
@tereško kafir? :P
 
@LeviMorrison yeah
 
bloody VS Code lacking a damn default print command
and bloody printcode extension lacking a landscape feature
I guess scratch file in phpstorm it is ... so I don't have to download/install n++
 
I hate being really hungry but not having any appetite
 
8:53 PM
how is it possible? when you're hungry, you must have appetite too naturally.
 
@Shafizadeh stomach is growling, but brain says "I'm full"
one of my medications causes this
 
00:00 - 21:0021:00 - 00:00

« first day (2986 days earlier)      last day (1962 days later) »