« first day (2377 days earlier)      last day (2557 days later) » 

 
1 hour later…
1:32 AM
fascinating.
 
2:10 AM
Can anyone point my in the right direction for uploading an image/file to a PHP server (via API). I'll be sending from Python
 
2:46 AM
!!rfcs
 
 
1 hour later…
4:12 AM
@TristanWiley look up $_FILES and move_uploaded_file. Should get you started. Also php://input
 
morning
 
morning linus
o/
 
morning guys
 
o/
 
4:36 AM
readdir strips leading and trailing quotes in a filename – #74472
 
Wes
\o
 
4:58 AM
 
Wes
@Linus please remove, that site is very much spam, also the preview is not available
got bombed with ads and popups attempting to install chrome extensions
 
@Wes sorry to late :( can i flag to mod?
 
Wes
nah no prob let's just ignore it :B attention people, don't click that pic ^ :B
 
Im a child I want to click it
lol
 
Wes
you could probably do it if you have an ad blocker or something :B
 
5:35 AM
'nin
 
morning joe
o/
 
Wes
o/
 
5:53 AM
\o mornin Joe
 
6:09 AM
Morning
 
morning
 
6:30 AM
mornings
 
posted on April 19, 2017

New Cyanide and Happiness Comic

 
7:12 AM
 
morning
 
mornifdgafd
 
uuuh
 
7:34 AM
@DaveRandom Clojure: Deliver a jar, no one has to know.
 
Wes
7:46 AM
morning again
 
again o/
 
uh
why is @Ocramius against the PDO Float Type RFC?
 
hey is there a known way to require a Phar from within another Phar without it just going cuckoo bananas
i don't mean embedding one phar within another, just a require 'Foo.phar' line
 
@FélixGagnon-Grenier enjoy: youtube.com/watch?v=hu4_8NqpjWo //cc @MadaraUchiha
also, warning - you will need a beer for this
 
moin
@MadaraUchiha :-P
 
Wes
8:02 AM
@FlorianMargaine i would vote no just for PDO::PARAM_FLT
can we just bloody write FLOAT
 
^ that
 
Live vs WIP (ignore the exact logo color; I know it's wrong and am working on it)
 
Anonymous
mornin
 
Wes
@LeviMorrison i like the look of php.net already though
 
Anonymous
@Wes wa?
 
Anonymous
8:04 AM
@LeviMorrison Is the hope folder filled with pictures of me?
 
lol no
 
Wes
@JayIsTooCommon it doesn't have to be cool, it must be usable
 
@Wes Did you look at the WIP?
 
Wes
yes. i think i prefer the old one, but i would improve the colors
like the header must be visually separated from the "intro" thing
 
8:07 AM
@FlorianMargaine PDO::PARAM_FTL ?
 
Honestly I don't think "FLT" is descriptive enough...
 
@FélixGagnon-Grenier , @MadaraUchiha sorry ... it ended up not all that funny and more frustrating
:(
 
Wes
because humans like visually grouped stuff, boxes, lines etc. help understand what's what, even if it's not even needed in theory, it's just something you expect to see @LeviMorrison
 
PDO is designed to represent SQL, why not use the full name of the SQL name it mirrors?
 
Wes
that's the best explanation i can give :B
 
8:10 AM
 
Wes
it doesn't have to be a strong division though @LeviMorrison, like just a slightly different brightness of the same blue hue would look great
 
@Wes You do realize this is the only page there won't be a division, right?
 
Anonymous
!!wotd
 
kerfuffle: a fuss; commotion.
 
Wes
yes. but homepage is important :P please trust my web design experience at least a bit. lines are all what we have in these flat design days, they are the landmarks of layout @LeviMorrison
without them, you feel lost
anyway the syntax error in the php homepage is totally php @LeviMorrison :D
 
8:17 AM
@Wes Of course it is important.
Our current one sucks and has sucked for a really long time.
Our docs are much better.
 
Wes
have you seen msdn?
imho, that sucks
php.net is ok imho. of course you can improve it, but it's not really needed
brb going out for a while
 
"So we are getting a generation of developers now, which have been growing up without hardware or state. They learned programming on AWS and take RDS for granted, which means they have never actually seen hard(-ware related) problems. They also learned programming with the Javascript framework of the week, and think that real software can be written this way."
/me is so happy that he learned programming using M68K Assembly and C on the Amiga way back when.
 
mornin r11
 
@SebastianBergmann the bug is really not related to that though
especially the node.js core developers don't have this mindset
 
8:33 AM
Colors are off, definitely.
I am so bad at color sometimes >.<
Hopefully will do better after some sleep.
 
@LeviMorrison htmlentities lacks of `\` in front of function name
 
TIL this is an actual thing
 
@brzuchal You mean this slash right? \
 
yes
Would it be possible to write a custom language parser and compiler which produces opcodes so they can be run via PHP VM just like Java runs its bytecode produces by other than Javaa lnguages such as JRuby or JPython etc. ?
And yes I know it's as always some weird thing :)
 
the problem is not producing the opcodes
the problem is executing them
 
8:44 AM
@brzuchal Theoretically but our VM is designed for PHP semantics only.
 
@LeviMorrison imagine a new language
 
Yeah, why target the PHP VM?
lol
 
For fun, for experiment
Maybe it'll bring some new ideas
Semantics I think is quite similar to JVM
Let's say I wanna write new language strictly typed and not lazy loaded
And like PHP and this could bring me possibility toi operate on PHP created objects in my language too
 
8:58 AM
@brzuchal wat :p
Morning all
 
Anonymous
moin pieman
 
@PeeHaa Fully Qualified Function Names Are Awesome And Do All The Things.
 
...
 
@PeeHaa I think I made mistake I assumed name resultion always is applicable for function calls, but in global scope maybe it isn't I don't know
 
So stupid
 
9:01 AM
Hello Good Morning,
 
@PeeHaa I'm inclined to agree, however I also still find myself doing it.
 
Anonymous
@ChristopheCosta who's good morning?
 
how to get variable for previous page?
for all
:) @JayIsTooCommon
 
There are some cases in which it does make sense - e.g. I prefer \Amp\resolve() in its FQ form because it's better for code clarity
 
@DaveRandom college freshman prefixes all calls with the namespace delimiter, has crazy inefficient queries.gif
 
9:03 AM
i try by session
but is not the solution
 
@PeeHaa <iframe src="college freshman prefixes all calls with the namespace delimiter, has crazy inefficient queries.gif">
 
@ChristopheCosta sessions are your solutions or cookies - PHP is share nothing between requests
 
or is iframe href? I forget don't care
 
Anonymous
@ChristopheCosta you're going to need to give some code and explain what you mean by 'not the solution', in order to get some help.
 
9:06 AM
user image
4
 
i will do pastebin explain the situation
 
@DaveRandom I just "import" those too. Especially with IDEs there is no confusion for me
And even without IDE support I see what's happening
 
@PeeHaa In the specific case of resolve(), this is a big argument IMO. Those function primitives are basically a DSL and the required prefix is short. I think it reads better, in the same way as $dnsResolver->resolve($name) reads better than $d->resolve($n).
IMHO, YMMV, WTF, BBQ, ETC
 
the result of the Session is NULL
 
9:25 AM
prepping to deploy new 7.1 images to one of our servers to see if instrumentation lights up like a christmas tree
 
@DaveRandom Yeah that's pretty much up to personal preference which I understand more than crappifying codebases by littering it with slashes everywhere just because somebody read it made a difference
IMHO, YMMV, WTF, BBQ, ETC
:)
@Leigh Didn't you just move to 7.0? :P
 
Before feb I was on a different team, and their product moved 5.6 -> 7.0 end of last year
this team is still on 5.6, so moving it to 7.1
 
can someone give ideas, please?
that value is not save in database
but i need them for put in one table in previous page.
 
@ChristopheCosta your assignments are backwards... page1 needs to assign to $_SESSION, and page 2 needs to assign from it
also make sure you did session_start() on both pages
 
session_start();
i have in both pages
 
9:34 AM
Morning 11!
!!voting pdo_float_type
 
• pdo_float_type - Yes (2: 50.0%), No (2: 50.0%) (https://wiki.php.net/rfc/pdo_float_type#doodle__form__pdo_float_type)
‌ ◦ Yes: adambaratz, hywan
‌ ◦ No: mbeccati, ocramius
 
@ocramius ^ Why no? :o
 
So I got declined for a conference 2 years ago, last year received an email saying I should apply again, so I did, got rejected. This year got rejected again, then two of their speakers cancelled and I've been invited. Yay or nay?
 
Anonymous
yay :)
 
@JayIsTooCommon Bit hard not to feel like the 'reject candidate' though...
 
9:38 AM
@Jimbo yay. spite is pointless.
 
Anonymous
be good to prove them wrong though
 
Fit in a pun at the start of the talk, ace the rest of it
 
@PaulCrovella Pride helps lots in other parts of life :P
 
@Jimbo what does pride have to do with it? what's the practical value of not doing something you've been trying to do for years?
 
@PaulCrovella It wasn't like I really needed to do it, it's exhausting! Sure it adds a +1 to my speaker profile but it was more that I had some good shit to help people with, and then getting knocked back from the helping people so many times
I know I know I'm being retarded
@PaulCrovella I'll think about it, don't think it's just spite, there's something else I can't put my finger on, don't mean to be dickish
 
9:43 AM
@Jimbo Tough life bro
 
Wes
@Jeeves i want to learn programming, how do i do?
 
@Wes Interesting.
 
Wes
@Jeeves give me more info
 
@Wes More what?
 
@Jeeves How do I learn programming
 
9:45 AM
@Jimbo Good for you, but all programming languages are in english.
 
Anonymous
@Jimbo I get it.. If I was rejected for a job twice and then they offered me it because someone backed out, I don't think i'd take the job. Buut, it could be the best talk you ever do. You'll never know if you say no.
 
@JayIsTooCommon Butthurt IMO
 
@DejanMarjanovic Maybe I'm butthurt
 
It's normal, and you should be, but deal with it.
 
@Jeeves you back again :-P
 
9:46 AM
@Linus pokes you more.
 
@Linus Stop flirting with @Jeeves
 
@Jimbo I wasn't flirting. How old are you?
 
> Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.
 
:P
 
random quote
 
9:47 AM
Does anybody know why pacl command doesn't work from crontab, only direct from console in Ubuntu?
 
@AlexStanese Probably because you made a typo
 
Because it's pecl, not pacl?
Also... why would you run pecl in a cron?
 
I'm running pactl
its not a typo
63
Q: Terminal command to set audio volume?

MariusI have an external sound card which mostly works fine, except that when its first plugged in, or when I turn on my laptop, the volume gets set to 100%. That is, the overall system volume, as shown in the sound indicator. What I'm looking for is a terminal command that will set that volume to 50%...

 
it works perfectly from console but from crontab nothing happends
 
9:49 AM
so still not pacl then
 
I assume it's expecting a tty then, although I have no idea what it even does
 
it changes the audio volume
what do you mean with tty?
 
!!man tty
 
!!? tty
 
Search for "tty" (https://www.google.com/search?q=tty&lr=lang_en)
• TTY - Wikipedia - TTY, in electronic or electromechanical communications, was used to refer to "teletype" or perhaps… (https://en.wikipedia.org/wiki/TTY)
• What does "TTY" stand for? - Ask Ubuntu - 11 jun. 2014 - On the Wikipedia's article (Computer terminal) under the hard copy terminals section… (https://askubuntu.com/questions/481906/what-does-tty-stand-for/482244)
• What is a TTY? - AboutTTY.com - TTY stands for Text Telephone. It is also sometimes called a TDD, or Telecommunication Device for t… (http://www.abouttty.com/)
 
9:51 AM
:P
That shout of sheer happiness :P
 
Wes
@PeeHaa man? :B
 
@Wes Yes, man
 
is it monday again ?
wtf @PeeHaa
 
Sorry
 
Wes
ahaha
 
9:52 AM
Almost half way though @JoeWatkins. Only 2.5 more mondays left
 
5 messages moved to Trash
 
This is my first Ubuntu installation so I have no idea how to make this work :)
 
Wes
@NikiC what's the purpose of empty abstract class Stmt extends NodeAbstract{} ? just a marker, legacy of a previous version of the lib...?
 
@FlorianMargaine Just noticed platform.sh is sponsoring the conf I'm going to on Friday :D
 
@AlexStanese somehow I have a feeling it might be to do with the --client-name option, like maybe it's pulling a default value from your env and when you run it from cron that's not there. Documentation for that command is weak though.
 
9:55 AM
@PeeHaa Are you.. feeling alright? :P
 
@Sean ?
 
@DaveRandom THanks. I've just found this same issue here:
https://askubuntu.com/questions/526287/change-system-volume-using-crontab-pactl
 
No? :)
 
But it doesn't work from me. It just changes the selected audio output. If the Speakers are selected it changes the speakers volume, if the HDMI is selected it changes the HDMI audio outpus. I want it to work witht the sound settings closed and affect the HDMI audio or both of them. How can I do that?
 
> The PulseAudio sound server interprets the file ~/.config/pulse/default.pa on startup, and when that file doesn't exist /etc/pulse/default.pa. source
 
9:58 AM
@Wes marker
not all types are allowed in all positions
 
Somehow I feel like the answer to your problem is in there. Either the reason your cron is not working, or some config to make the cron unnecessary (cron does not feel like a good solution to the problem at hand)
 
well not really marker, it's just proper types
 
I tested cron with other commands and it works just fine
Basically I want to make everyday at hour 23 the volume mute and on 7 in the morning unmute
 
Install windows and use a proper shell like powershell
 
Wes
ok, i'm a bit lost. i don't think i know exactly what a statement is. how does that differ to expression? and Node?
 
10:02 AM
@AlexStanese ah OK that is a more suitable use for cron. Well the problem is something to do with the environment, most likely the cron job is running as a user that does not have some value in its env. So maybe an env var set in bashrc? Or perhaps it uses a unix socket and the user cron is running as doesn't have permission to access it?
 
!!? expression statement
 
Search for "expression statement" (https://www.google.com/search?q=expression+statement&lr=lang_en)
• What is the difference between an expression and… - 18 jan. 2011 - In Python, what is the difference between expressions and … Expressions only contain… (http://stackoverflow.com/questions/4728073/what-is-the-difference-between-an-expression-and-a-statement-in-python)
• c# - Expression Versus Statement - Stack Overflow - 21 aug. 2008 - I'm asking with regards to c#, but I assume its the same in most other … Expression:… (http://stackoverflow.com/questions/19132/expression-versus-statement)
 
Anonymous
@AlexStanese You look remarkably like Bieber, we should be friends.
6
 
s/related/creepy
 
Hahah
 
Anonymous
10:04 AM
@PaulCrovella don't be jealous.
 
@MadaraUchiha please mod-abuse so @JayIsTooCommon is called @JayIsTooCreepy
 
Wes
@JayIsTooCommon omg i thought the same.
 
@DaveRandom can mod do that?
 
Dunno
 
yes
 
10:05 AM
I hope so
 
Wes
thanks niki :B
i actually didn't know the difference..
i used the words interchangeably i think
 
Anonymous
@DaveRandom catchy
 
Wes
and Node is all of them? so what is not a Statement? whitespace perhaps?
 
whitespace is nothing
it's not being interpreted at all
 
10:09 AM
@DaveRandom I also think it's that case but i have no idea how to troubleshoot this. I'm in my first ubuntu installation here :D
 
@AlexStanese start here. There's a pretty good chance that if it's failing, it's telling you why it's failing.
 
@AlexStanese Can't you just get one of those timer plugs/sockets instead and just cut off power to the speakers? :P
 
I've just tried this:
and it works if I leave the HDMI selected
http://prntscr.com/ey7nrv
If I close the sound settings with the Speakers selected it changes the volume form the speakers
 
Anonymous
what's the use case here?
 
@PeeHaa Unfortunately not because I want to manipulate the TV speakers and not the normal speakers
 
10:13 AM
:(
 
I have some monitors where I want to run some videos and I want to set them to automatically mute on hour 23 and unmute on 7 in the morning
This is the code I tried with
* * * * * export DISPLAY=:0 && amixer -D pulse sset Master 0%
but I have no idea that the export DISPLAY means
or does
 
Anonymous
would it not be easier to try and mute the video's themselves, rather than speakers?
 
good idea but how to do that automatically ?
the videos are running on vlc
 
Anonymous
depends what you're using to play the videos
 
isn't vlc having some remote api ?
 
10:18 AM
Yeah think so
 
I have really no idea
 
Think they even haz rest
 
but if vlc has some console command to mute the volume from all videos I think that is it!
 
Anonymous
@AlexStanese wiki.videolan.org/VLC_command-line_help some commands there for volume and sound
 
10:20 AM
@brzuchal I don;t really need to conrtoll it remotely because I can access the whole desktop through Teamviewer
There are only key settings for volume
 
Anonymous
@AlexStanese --no-audio
 
Anonymous
have a read through it, I think it'll do what you want.
 
Thanks
and how would be the command?
vlc --no-audio ?
 
Wes
nope sorry @NikiC i don't get what is a Node that is not a statement, there are so many types and i'm failing to understand the hierarchy :B
 
11:09 AM
@JayIsTooCommon with vlc --no-audio it runs another instance of vlc without audio, it doesn't mute the current one
 
I will just stick with mpv
 
Wes
$ID = random_int(0, PHP_INT_MAX);
if($this->message->isTagUsed($ID)){
    throw new Error(
        "The given separator ID is already in use. " .
        "Congrats for nailing the only integer from 0 to " . PHP_INT_MAX . " that you aren't allowed to use"
    );
}
shit can happen.
 
Anonymous
why is the ID a random int?
 
Anonymous
@AlexStanese I don't know vlc sorry, was just giving resources
 
Wes
after that it will become an id, unless it's used already
 
also old
 
> Published on Mar 23, 2014
yep, about 3 years old
 
DNC
Guys when we create an API for our php functions, how do we secure it? I mean all the functions are accessible by a specific url. Which means everyone who knows this url can fire up your functions? Please give me some keywords what I need to search for
 
authentication...maybe via JWT
 
11:37 AM
@DNC can't you just make the API server to be visible only in local network?
or are you querying it from JS client?
 
Wes
old too :P
 
@Wes AS IS THE VIDEO. /ba-dum-tish
 
Wes
:B
 
DNC
@tereško the API is on server, but the requests will be done by mobile phones via iOS and Android apps. So it needs to be visible for all networks
I just created a question for it. link: stackoverflow.com/questions/43494815/…
 
11:46 AM
the simplest option would be to use Basic Auth (if you are using HTTPS)
 
DNC
Are there other ways? I am not using HTTPS yet since it is in developing phase. Will be switching to HTTPS later
 
beyond that there is one-time-token approach, which can function without SSL
as for JWT, it seems like a really annoying solution from what I have seen
and you can use Basic without HTTPS ... just dont deploy it in production without it
 
@DNC oauth
 
@PeeHaa that would be a terrible idea :D
 
Why? (only read the OP)
Mobile apps and accessing resources
Anything I am missing?
 
11:53 AM
because OAuth is a system for authorization, not authentication
 
Actually it is (too)
well it can be crammed into one that is
But isn't it about resource access from mobile apps?
 
DNC
Yeah it is
@tereško OAuth with HTTPS, will it be good enough for production?
 
What in specific do you need?
 
depends
 
7.1 on 25% of our traffic, one endpoint failing non-critically
 
11:57 AM
ship it
 
DNC
Reading/updating variables in mysql databases which are located on server
 
nah, time for lunch
 
@Leigh Are you running with opcache?
@DNC That's not specific :)
 
yea opcache will be running, but it's a fresh container
 
> Hyper Text Coffee Pot Control Protocol
 
11:58 AM
it's actually a db query that is now returning null for one col where it didn't before... really weird
 
DNC
@PeeHaa What do you want me to describe? About the data in databases, I don't want anyone else to read/update those without my permission
 
error is clearly further up, the bound param must have been mutated
anyway, lunch, because I got meeting at 2 and I only get an hour :P
 
> only get an hour
 

« first day (2377 days earlier)      last day (2557 days later) »