« first day (2301 days earlier)      last day (2644 days later) » 

Wes
2:00 PM
also indeed :P
 
you could risk damage to a fire truck, or just knock off a lock
 
They aren't really allowed to do that unless it's an emergency.
 
Wes
[this is fine.jpg] fire's not an emergency :B
 
any recommendation for "read later" addon on firefox?
 
Pocket?
 
2:05 PM
@tereško I heard about wallabag, but you need a server.
 
@iroegbu I was hoping for something that would cross the work-home account separation
 
Wallabag then
 
@Leigh What do you think about deprecating openssl_random_pseudo_bytes?
 
it took me 30s to freak out from using Pocket
 
2:12 PM
I think random_bytes should be preferred in every case here as it fails closed, doesn't have a strong parameter that might signal weak random, doesn't have a weird name (pseudo bytes or pseudo random?), and I think there are issues with openssl_random_pseudo_bytes with working and not reseeding, at least in older versions. At least something like that cased it to be removed from random_compat.
 
it decided to track my viewed tabs
 
@kelunik I think that one can wait
 
@NikiC Wait for what?
 
nevermind
still makes more sense to use random_bytes and shim it to openssl_random_pseudo_bytes on old versions
so deprecation does seem appropriate
but it's not particularly critical...
 
@NikiC At least the documentation should discourage its use on PHP 7.
It's currently something we recommend in the non-crypto-safe warning.
 
2:18 PM
@kelunik For what specific reason?
 
@Leigh See two lines below.
s/working/forking/
 
Right, the forking issue was addressed in (I believe)5.6
And I dug into the "strong" parameter when I was working on random_bytes, and from memory, it didn't make much of a difference
I'll have a look and see if I still have notes
(of course I might have missed something)
 
!!lxr openssl_random_pseudo_bytes
 
@kelunik The results page is not in the format I expected it to be
 
@PeeHaa Should probably link to our own LXR?
 
Anonymous
2:23 PM
I think that's still in beta?
 
@Tyrael LXR is broken again with heap error.
@JayIsTooCommon And the official one is still / again broken. I prefer something that works.
 
Anonymous
i guess
 
Anonymous
 
Looks like it always returns true
 
[insert XKCD random number joke]
 
2:27 PM
!!xkcd 13
@kelunik I don't care. if you want that go for it cc @DaveRandom
 
@kelunik Seems since 5.4.14 the "strong" issue was fixed
 
2 messages moved to Trash
 
!!xkcd nine
Damnit. Confused :D
 
2 messages moved to Trash
 
!!xkcd ayn random
(kinda annoying images are this big)
 
2:31 PM
yeah :(
 
2 messages moved to Trash
 
We you should make an autounonebox feature :-)
 
me? I think you meant @Jay :P
 
Anonymous
think about how much cleaner this would look if the commands were removed too... ahem @DaveRandom
 
ha :P
Was just about to suggest him :D
 
Anonymous
2:33 PM
siggest eh? saucy
 
:D
 
@JayIsTooCommon indeed
 
So, it's been crypto-quality (guaranteed by libssl) since 5.6.12 and fork-safety since 5.6.24 /cc @kelunik @NikiC - are there any other issues outstanding that make you want to deprecate it? (we should at least document that the strong param is meaningless if it is not already)
 
@JayIsTooCommon Do you need @DaveRandom's permission to work on the bot?
:)
oh wait
That's the PR I reviewed right?
 
Anonymous
'reviewed' yeah
 
2:36 PM
:P
Soooooooooo somebody could just say fuck it and merge it right?
 
Anonymous
My code has always worked seamlessly with Jeeves, I don't see why not....
 
Sounds dangerous like a job for @Ekin
 
Anonymous
oh, I haven't squashed commits yet though
 
:P enough with making me do the dirty work P
 
Oh that would be nice @JayIsTooCommon in case it all blows up as well as possible late review byt that dave guy
@Ekin :-D
 
Anonymous
2:38 PM
yeah I think you linked me somewhere how to do it, will try tonight
 
Anonymous
there's a good 83% chance it could blow up but that's what makes it fun
 
@Leigh I'm not aware of anything else
 
Alright, at this point in time, my opinion is: Leave it alone
 
ack
 
@JayIsTooCommon :)
 
2:41 PM
fin
 
If people are using openssl_pseudo_random_bytes() we should be happy ^^
 
I can'get the data from
http://stackoverflow.com/questions/2032924/how-to-partially-download-a-remote-file-with-curl
In which variable is the data stored?
 
@AbrarAhmed If you had to guess what variable would you think?
 
$data
 
My first intern supervisor just sent me the code I've done during my internship with him… I don't remember being THAT bad
 
2:44 PM
Oh, @NikiC is speaking at phpkonf :-) how nice
@Ocramius you too (still)?
 
@PeeHaa $data doesn't contain any because it is being used in an anonymous function.
 
@Trucy Bet I can beat you
 
Anonymous
@Ekin are you planning on going to PHPSC ?
 
$writefn also contains the data but is in the form closure object
 
@Jimbo Can you beat a 10-parameter function?
 
2:46 PM
@AbrarAhmed So what other variables do you have with a name that makes kinda sense?
 
@Trucy This was before I figured out recursion
user image
2
 
@JayIsTooCommon Dunno, at the moment I'm only considering the one in Belgrade and that phpkonf if I can arrange myself
 
Anonymous
@Jimbo oh how lovely, you even do a new line for your statement brackets
 
@Jimbo Holy everything that is holy…
@JayIsTooCommon As everyone should
 
@JayIsTooCommon Now that's fine
 
2:48 PM
French people...
 
Anonymous
</sarcasm> definitely not..
 
@PeeHaa $result gives a false Boolean
 
My favourite bit is foreach ($why as $youCantBe => $serious)
 
@AbrarAhmed ¯\_(ツ)_/¯
 
@PeeHaa I can't understand... help
 
Wes
2:50 PM
@Jimbo lol
 
@DaveRandom libdns
 
Anyone knows how to convert closure object to array
 
@AbrarAhmed (array) $closureObject
but I wonder why you would want to do this
 
Wes
@PeeHaa i will oppose very hard to any modification proposed by @DaveRandom
 
2:58 PM
 
Fair enough
Don't blame you
 
@Jimbo You know many (if not all) recursive algorithms can be written without recursion :)
 
@Gordon Dont know how to get data. So I am going to convert $writefn into array and then get the data
 
@AbrarAhmed I see nothing in there that would require you to convert a Closure to an array
 
God damn it people I am trying to work sleep.
 
3:00 PM
Oh hey Chris o/
What a coincidence
 
@AbrarAhmed that makes no sense
 
Yes by complete coincidence I turned up when there were 5 pings for me on the screen
 
@Gordon Then how can I get the curl data?
 
:D
 
(actually that's largely true, I had the sound off)
Also wtf people requesting access to the fucking bin
 
3:01 PM
Yeah kill it
Considering you are always in there for some weird reason :P
 
The Closure object is the object representation of a callback. Converting that to an array will achieve nothing. It won't even be useful anymore then.
 
@PeeHaa I belong in the bin on account of me being rubbish
 
@Leigh So I can do recursion, without recursion?
 
seriously though, I really am very busy
 
@DaveRandom s/rubbish/garbage
 
3:03 PM
@Jimbo In PHP, I've found sometimes maintaining my own stack is more efficient than function calls
 
No, I'm English.
 
yes
:P
 
In England PHP is not a garbage collected language, it's a rubbish collected language
7
 
as a language it has been collected, and it's rubbish
 
3:04 PM
In England PHP is not a garbage collected language, it's a rubbish collected language
 
@Jimbo not really a nice example - but this is something that I originally developed as recursive, then made.. not.. github.com/lt/PHP-Shamirs/blob/master/lib/…
 
Anonymous
@DaveRandom you are weirdly in rooms permanently
 
Yes I'm a professional lurker
 
Anonymous
nvm ..
 
@Gordon I cant find anyway to get the curl data
 
3:09 PM
@AbrarAhmed yes, I understood that. I cannot help you with that. But I can tell you that converting the Closure object to an array does not help either.
 
@Gordon thank you
 
@NikiC ping
 
@JoeWatkins pong
 
instamerge that bugfix to keep it out of sight, or merge at last moment because sec ?
 
@JoeWatkins I think it can be merged right away (if tests pass ^^), as the issue has been publicly discussed anyway. Someone else will have to handle 5.6, I don't think I have push access to that
 
3:24 PM
ok
can I merge into that branch, not sure how it's restricted ?
 
@DaveRandom $_BISCUIT
 
Anonymous
@PeeHaa I hear y'all being trumped? Wilders?
 
3:39 PM
Evening room
 
Evenin'
 
@NikiC green, you gonna merge it, or shall I ?
 
3:58 PM
@JayIsTooCommon yeah dunno. Even if he gets big it's going to hard for him to find parties willing to work with him
 
/me releases 7.1.2RC1
 
@Leigh Failing closed.
 
4:35 PM
Morning.
 
morning Levi.
 
4:52 PM
@tereško `why would controllers listen to changes in database?
I mean, why the fuck would you call something like that "a controller" ?`

I don't know what else to call it.
 
Alternatives to polling a MySQL DB several times a second in PHP?
Anyone?
 
@Allenph What do you need to happen based on the polled data?
 
5:08 PM
o/
sockets?
 
5:25 PM
@kelunik you're saying that's a problem?
 
5:45 PM
I remember php making a copy of arguments passed by value only if the value was changed. How is this called?
 
@TomasZubiri cow
 
Thank you
 
@user2353938 A process is polling to see if it needs to create workers. Each worker manages a queue which is firing off an API call every second.
 
@Allenph use redis/message broker, and make whatever is writing to the DB also push a notification to Redis/message broker
 
@Danack The queue service is a decentralized server cluster.
Ehh, maybe a Redis server on each server might work...
 
Wes
6:01 PM
evenings
 
morning
 
So, I haven't decided yet, but let's just suppose I poll MySQL every second, right? Now suppose there is a timeout, or it takes more than a second. Aren't these SQL queries blocking? The next iteration of the timer will not run till the SQL response comes back, yeah?
I could use promises...but how do I manage those promises and when will they get called back?
 
6:18 PM
Use queues like for eg. RabbitMQ then.
Then just run few workers burning jobs.
No need for pooling SQL queries.
 
Hello,
someone works in the past with google charts
?
 
@brzuchal I've already been through job queues. That's not going to work.
 
6:46 PM
@Allenph they could block if you want them to. Do you mind race conditions?
 
@NikiC Dear Yasuo, please refrain from proposing new features or bug fixes for PHP. Thanks!
 
@Ekin trip to Istanbul got veto'd by my GF :-(
 
@solarc Race conditions?
 
@Ocramius Tell her you're going to Constantinople instead.
 
@crypticツ there's something like Assert::allOf() in the assertion lib I linked
@Danack IKR
 
6:50 PM
Could I use ReactPHP tick to defer it?
 
user895378
@Allenph don't poll, use a message queue from which you can just receive notifications when there's work to be done.
 
I really do like the throne room, where they did emperor coronations
 
@Ocramius :( well, understandable anyway
 
user895378
If the answer is polling you're almost always doing it wrong
 
I really wanted to go, but I generally spend a lot of time around home and her, so it may be a problem if she revolts :P
 
6:51 PM
:D
 
@Allenph what happens if two process run at the same time and both grab the same row of data?
 
@solarc, I already have a sheme for that.
scheme*
Certain servers are assigned certain queue IDs.
@rdlowrey Already tried Gearman.
 
@rdlowrey I think you're the 5th person to tell him that.
 
someone once told me of a place online where I could create and host a wordpress site online for free
any ideas?
 
@solarc you can do select ..... for update to achieve row level locking. But yeah......sql querying is just the wrong solution to the wrong problem here.
 
6:56 PM
... wordpress.com?
 
@Danack
I must be completely lost here.
 
@Allenph Instead of polling you should use a message queue!
 
This is my first experience with a process as a service. I write REST APIs for a living.
Number 6. I guess I should take another look at this.
 
do use a framework for writing RESt APIs
 
@SalOrozco, mhm. I use my own, but I basically only wrote the router.
The rest is pieced together from other projects.
 
7:15 PM
very nice What do youse to host Angular apps ?
 
7:26 PM
evenin
@Allenph I have no idea, but it would be some structure in DAL
also, I am not entirely sure how exactly one goes about attaching a php-based observer to RDBMS
 
hello
 
o/
 
\o
phone is optimizing apps again after battery died
argh
 
7:44 PM
@SalOrozco What do you mean?
@SalOrozco
I usually use just the server for smaller projects (Apache) but on large scale projects like the one I'm working on, I use Amazon S3 and Cloudfront.
All of the assets are compiled, and Cloudfront allows me to stream the content from the S3 bucket extremely fast, and over SSL.
 
user895378
@Allenph Gearman is the 2003 way to do it ... wouldn't recommend
 
And it's all scalable.
@rdlowrey
What is the 2017 way to do it?
@rdlowrey I thought about using Amazon's queuing service, but it can take up to two minutes from start to finish. That's unacceptable here.
I need this to happen AT LEAST once a second.
Well, in this case, I need the event to be emitted and collected in less than a second.
 
Wes
stackoverflow.com/questions/20091527/… that would be useful to have
 
@Allenph try ZeroMQ with as many workers as needed
 
8:14 PM
good: Everything operating normally as of 2017-02-02T20:13:46Z
 
Wes
8:27 PM
gn all
 
Allen recently doing some angular stuff. Not sure what the best way to bundle for production.
 
8:57 PM
@SalOrozco I'm guessing you're here for PHP and you think NodeJS is icky...so do I. But, I use it for one thing.

On my development machine and in the development branch of my repo, I keep a gulpfile and a package.json for NPM. I use Gulp to compile SCSS, and CSS (Including libraries) into one file. It does the same thing for all the front-end JS. It also checks the syntax before it compiles, and won't compile unless the syntax is correct.

Gulp also has a deploy task. After the JS and CSS is all compiled and minimalized into one file each, deploy gets rid of all the CSS and JS files. It al
 
@Allenph some people do it with Angular cli, some with gulp. It's why I wasn't so sure.
 
I tried with webpack and failed miserably
 
lol
I tried different tutorials around the web, and they all do it different, got kind of confused, and discouraged.
 
You know, this async PHP is a good oppurtunity to take advantage of composer and do some of the stuff we do with Node and gulp.
 
I like the gulp way. What Allenph mentioned.
 
9:06 PM
opportunity*
@SalOrozco the only problem I have with Gulp is that it's not perfect in the deploy task.
It can't delete itself, etc.
 
whats async php
 
asynchronous @SalOrozco
 
concurrency
 
I was thinking it was a tool
to minify and compile scss in a php envirement with composer
 
9:24 PM
@SalOrozco That's what I was saying. It's possible to do that.
With things like React.
 
hello every one , I am using twig without symfony , I want to inject default variables into all templates , there is a tutrial here : symfony.com/doc/current/templating/global_variables.html but it is for symfony ... do someone has some advices?
 
@Allenph ah reacPHP?
 
@JoeshRazor your $twig object should have an addGlobal method
 
@SalOrozco or amphp.org
 
ahh very cool
 
9:32 PM
@solarc thank you , let me check
 
pls halp how do you fix a mysql installation
sudo mysql -u root gives access denied
for priviledges operations
how can I give root privileges if it doesn't have them already?
Starting mysqld with --skip-grant-tables "doesn't work", the process just dies right away
 
@Allenph did you have to an actual question if were you under impression that your setup is somehow special?
@NikiC which tutorial are you following?
 
@solarc okay, that gets me into skip-grant-tables mode
I ran UPDATE mysql.user SET Grant_priv='Y', Super_priv='Y' WHERE User='root';, but after disabling skip-grant-tables same problem
 
Just change the password, rather than poking permissions?
mysql -u root mysql
UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;
 
9:46 PM
I haven't lost my password ('')
I can log in as the root user fine (under sudo), but the root user doesn't have privileges to do anything
 
That's weird - never seen that.
mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost';"
mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1';"
mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'::1';"
mysql -uroot -e "FLUSH PRIVILEGES;"
or not.....if Super_priv is special.
 
I've just run a query to manually set all the priv flags
I think it worked
 
How'd you lose those flags?
 
I'm not totally sure
The problem I was actually trying to solve was that mysql requires sudo for the root user
I probably ran something I shouldn't have
unfortunately that problem still exists
Okay, ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '' did the trick
bah, I wasted an hour on this crap
 
10:15 PM
@tereško I didn't understand your question. Also why are good programmers always so hostile? Christ...
@SalOrozco Do you know what async is? If you're going to be using Angular you REALLY need to understand async.
 
php_imagickpixel_object *internp;
// other lines here.
internp = Z_IMAGICKPIXEL_P(getThis());
if (php_imagickpixel_ensure_not_null(internp->pixel_wand) == 0) {
    return;
}
Is there any sane way to turn that into a macro?
 
yeah
 
Instead of a messaging service can I just use a RESTful API on each server in the cluster that stimulates the process which controls the workers? That way the application API can just add an entry to the DB and then stimulate the "controller" to avoid the "controller" polling.

The controller would still check the DB for failed processes etc on startup, but after that, an API event should suffice.
@SalOrozco Was that "yeah" at me?
 
@Allenph yeah
 
@SalOrozco I'm confused on where you were confused then.
 
10:21 PM
you keep using that word, controller, but it does not mean what you think it means
 
@tereško I know that. But I still don't know what to call it.
 
@Allenph I was just confused on how to bundle angular for production. Like I mentioned I followed many online tutorials and they all did it differently. Some didn't even explain how to bundle. I'm on the right path now. Going to do it with gulp
 
@tereško I'm just used to building front end and back end apps on MVC and MVVM and it seems like a good translation for naming that particular process.
@SalOrozco If you happen across a method for Gulp to remove itself and all the configuration files, let me know if you don't mind.
 
@SalOrozco I personally would go with webpack instead, you would get at least some sort of dependency resolution
 
@Allenph I will.
@tereško you know any good resources on how to do it with webpack?
 
10:25 PM
no
 
11:09 PM
@SalOrozco that is some kind of starting point github.com/petehunt/webpack-howto
also, have you tried the documentation? it works
 
Hey guys, quick question: Is this safe from SQL injections? $results = $conn->query("SELECT COUNT(*) FROM users");
There are no variables taken from the user, it's all done to just simply count the records in a table.
 
Chromatic prepare statements
 
@Chromatic that's right
 
@FélixGagnon-Grenier very nice.
 
@SalOrozco don't automatically say that...
@Chromatic why are you asking?
 
11:13 PM
I've been looking at security and wanted to make sure that the above code is okay to use
 
If there's no variables.....how could anything be injected?
Then yes - if the query string is a fixed string, then nothing can be injected into it.
 
@Danack you are right, but he should know.
 
I have done prepared statements
on the ones that DO take variables
I just wanted to make sure that it was 100% okay to have that to merely count records
(I'm working with pagination and so to set a limit I need to get total pages etc)
Alright, thanks @Danack :)
 

« first day (2301 days earlier)      last day (2644 days later) »