« first day (3465 days earlier)      last day (1483 days later) » 

9:00 AM
Git mergin.
\o
 
9:17 AM
@LeviMorrison Why are you not allowing ddtrace in the cli-server SAPI? github.com/DataDog/dd-trace-php/blob/master/src/ext/…
And wouldn't it be a good idea to allow on CLI as well, as that makes testing much easier (trying to chase down bugs.xdebug.org/view.php?id=1775 here)
never mind, I read that switch the other way around -)
 
 
2 hours later…
11:07 AM
o/
 
Variable functions won't work with language constructs such as echo, print, unset(), isset(), empty(), include, require and the like. Utilize wrapper functions to make use of any of these constructs as variable functions.
what does this mean ?
 
That you can do: $name = "strlen"; echo $name("foo"); // returns 3
But that you can not do: $name = "include"; $name("/path/to/file");
 
11:23 AM
@de is there a way to distinguish a language construct like unset() with a built-in function ?
I didn't knew that unset() was a language construct until now
@Derick Found the answer I was looking for. Thanks
 
ok :-)
 
11:49 AM
Good morning o/
 
cmb
\o
 
12:32 PM
Minor Service Outage ・ Gists has Partial Outage
 
1:13 PM
Incident on 2020-04-11 13:12 UTC ・ Gists has Partial Outage
 
1:25 PM
Morning
I walked three miles last night for funsies
Surprising part is my legs aren't sore
 
1:43 PM
I wish I could do long walks again... (mind you, for me that's 10+ miles). I did have a lovely early morning run though of about 3 miles.
 
I might do another walk like that sometime this week. I ate way too much yesterday, which is why I went for the walk.
 
Mornings
 
@PeeHaa o/
 
Heya @StatikStasis o/
 
I would love to get into this (paramotor) youtube.com/watch?v=vh7lDPW7zYg&feature=youtu.be
 
2:00 PM
That environment looks nice (and cold)
 
Yeah- but it looks so blissful flying like this.
Apparently about 9k for the motor, 4k for the wing. No license or permit needed.
Usually about a 3 gallon tank, can stay up for 3 hours.
 
One of my coworkers in Norway had one, and he most definitely did need a radio license
 
@Derick Oh did he? Maybe I am missing some info- one of his videos the police were asking him about it. Maybe they just mentioned a permit.
 
It's possible that it was because he was near enough to an airport though. But I also think that for insurance he needed quite a bit of theory lessons about weather and lift etc.
 
@Derick Seems most countries don't need one: paramotorprodigy.com/blog/license
 
2:04 PM
You can't just buy it and fly :-)
 
Seems in the US it is self regulated... but just buying and flying would be a quick way to die. I would definitively want to get some training if I had the cash to even get into it.
Looks so relaxing.
 
that post also says you need to comply with air space regulations, and they might require you to need a radio, and to operate a radio you might need a permit ;-)
 
You're probably right.
I would need $12-14k first so I am a little ways away from being able to jump into the sport.
@Derick That's got to be a great way to spend a few hours. What was your co-workers perspective of the experience?
 
They loved it. I think 5 or 6 of them were doing it.
I might have photos... hang on
 
2:21 PM
can't find them, sorry
 
No worries, man.
 
Well, I found them, ut they're not online
 
Where his motor?
 
That was pre-motor :-)
 
Jeez! How to get killed! youtube.com/watch?v=03zlKJhMSZE
Maybe NSFL for some people.
 
2:36 PM
yeah... I think there were 3 broken arms and a broken leg in the 4 years I was working with them
And several tree landings
There is a "festival" in Voss every year where they went. All kinds of extreme sports: youtube.com/watch?v=45wMjzNB0Xk
 
3:01 PM
Incident on 2020-04-11 13:12 UTC
All issues have been resolved!
 
3:12 PM
file_put_contents can't create file with data:// wrappers ・ Streams related ・ #79467
 
3:23 PM
!!lxrfunction file_put_contents
 
[ /php-src/ext/standard/file.c::576 ] /* {{{ proto int|false <b>file_put_contents</b>(string file, mixed data [, int flags [, resource context]])
 
@PeeHaa What happened to Jeeves 2?
And did you see the FF7 stream?
 
It's now using the original jeeves' creds
 
ah gotcha!
Jeeves Jr.
 
@StatikStasis Nope. Not yet :( For one I confused the days to watch it live. And for two I will probably watch it back later this weekend \o/
 
3:24 PM
You should do that Jeeves II, Jeeves the III, etc.
 
I hope I don't rewrite everything so I don't need a Jeeves III :P
 
@PeeHaa Yeah, I was probably being too technical and caused confusion because I said Friday at midnight. Friday at midnight is 00:00:00, just after Thursday at 11:59:59. I'm not sure if it is better to say Thursday at Midnight, for a Friday 00:00:00 time or not.
 
+
 
> riday at midnight is 00:00:00, just after Thursday at 11:59:59
You want to get in a fight with me? That's how you get in a fight with me!
:P
Friday at midnight is Sat 00:00 try to change my mind :D
 
is it possible to use the file:// wrapper with relative file-names? The help page somewhat creates the impression it would, but I can't manage it.
 
3:31 PM
It says it does it
As usual just use a absolute path though
 
maybe I should better read the exact warning ^^:
$ php -r 'echo file_get_contents("file://.gitignore");'
PHP Warning:  file_get_contents(): remote host file access not supported, file://.gitignore in Command line code on line 1
 
What does it say?
 
it thinks it's remote.
I guess this needs an ini setting.
 
Seems like a bug to me?
 
but it's on?!
$ php -i | grep allow
allow_url_fopen => On => On
allow_url_include => Off => Off
 
3:33 PM
@PeeHaa lol- that's what I am saying. I bet in Marketing they say Friday Midnight for Sat 00:00:00, but I just did not think about that.
 
@PeeHaa: would you say it's worth to report?
 
Probably. Either the docs are wrong or their is a bug
 
I mean $ php -r 'echo file_get_contents(".gitignore");' just works.
 
For funsies what happens if the filename doesn't start with a dot??
 
6 mins ago, by PeeHaa
Friday at midnight is Sat 00:00 try to change my mind :D
"Friday = Saturday, change my mind"
 
3:35 PM
People who say xday midnight and mean next day 00:00 are animals
:P
 
lol
Or they just like to be correct. But, I get it!
@PeeHaa So... you're an animal?
 
ugh I wrote that wrong :D
And out of the edit window now
 
lol
It's forever wrong.
 
yep :P
 
I'm gonna star it!
 
3:39 PM
oh btw I got something you might like
 
I agree with it.
What's that?
 
Sound track of a game we have been playing: open.spotify.com/album/…
Has some nice stuff imo
 
I've almost bought that game sooooo many times.
 
:D
We are playing the sequel now. But it is EA for now
The first one was such a gorgeous game
 
I watched sips play it.
I need to figure out how to get more attention to my channel. I would love to be doing videos full-time... plus things are stressful at work at the moment. I got a new title and a raise, but it's not worth it imo.
 
3:43 PM
:(
 
@StatikStasis I try to prevent new titles and just take the raise.
 
lol- yeah, that would be nice.
 
cmb
4:43 PM
@hakre if you specify file://, relative paths are not supported. allow_url_fopen is irrelevant for the file wrapper; that wrapper does never allow to access remote resources.
 
Well those docs are lying :D
 
Well, they don't provide a relative example starting with file://, but plenty ones w/o. Not so sure how bit a liar that is the docs :D
 
cmb
Well, they don't really distinguish between file://path and path.
 
@cmb Would it be worth for this one wrapper to have support for relative paths?
or is it a safeguard because "oh I didn't know that a non-relative path start with a slash" situations?
oh yes, better keep it that way.
 
cmb
I'm not really sure. In my former comment, "they" referred to the docs.
 
4:55 PM
examples are fine in there.
 
cmb
But if in doubt, leave the implementation, and improve the docs.
 
yes, this will break, better not support relative paths in there, too late.
I could imagine they (not the docs) might write file://dev/null not understanding they are writing a relative path here.
 
 
2 hours later…
6:29 PM
@Derick It works with the CLI SAPI, but for most functionality you need to set env var DD_TRACE_CLI_ENABLED=1.
I don't know why they decided to do that; it's been that way since I joined last year.
 
 
1 hour later…
7:39 PM
@ThW: Just did a base TestCase that allows to run the same testsuite from PHP 5.3 - 7.4 w/ the different Phpunit versions (for 8 for the first time it needs some patching w/ sed, but it's very little). github.com/ktomk/pipelines/blob/test/tests/TestCase.php - patching: github.com/ktomk/pipelines/blob/test/tests/shell/…
but the test-suite is more smallish, so this is not a one-size-fits it all thing.
 
@DaveRandom ping
 
8:19 PM
@Jimbo you pang?
 
@DaveRandom I heard you liked DNS
 
...so I queried your mum's A record?
 
fuck
that's a good one
I need some advice on how to configure something.. I've set up my first ever DNS server (whoahhh)
 
what like just internally at home?
 
Nah on a digitalocean node
I'm connected to it via openvpn
 
8:29 PM
oh public
wait, you mean DNS server right?
 
dnsmasq
My end goal: a docker container (irrelevant probably) on this node can only be accessible when I'm on a VPN. I have OpenVPN running.
 
At first I was gonna use a reverse proxy and whitelist to IP range being on the vpn
But I figured DNS server is better as there won't be any 403s as the domain won't resolve publicly
 
possumry
 
My question: is that bullshit? But also: How can I get the DNS to work over openvpn. I can curl my test.local on the node and it hits my dnsmasq server, saw in the logs, great. But I want to curl test.local on my laptop and it'll work
 
8:31 PM
the naming sounds like and added layer of complication I must admit :-P
what's being a vpn server?
the host box for the docker container?
 
Yeah
Both dnsmasq and openvpn are running on that host box
in docker (in host mode though so it's like docker isn't there)
 
I'm just thinking that it might be simpler to just bind docker and the VPN into a private virtual subnet
bbiab
 
Well in order to get this working, I had to run ip -4 address add 192.168.146.16 eth0
on the host box
That related?
No idea about private virtual subnets
sounds kinky
Also if you're not the right person to ask, let me know. It's impossible to find someone who knows though because this spans several technologies
 
@Jimbo basically a docker bridge network
all you need is for whatever is running on the docker container to be on a network than isn't routable from anywhere unless the VPN is connected
naming and DNS is somewhat immaterial
it's just resolving names to IP addresses
what matters is how you get to the IP address
 
Will an overlay network work? Because next I want to put one of these containers on another node and have that one only available over vpn
PS - they're already all on the same overlay network
> unless the VPN is connected
This is the part I have no idea about
Also I'm still aiming to go to whoami.mydomain.com and be routed to my shitty whoami container. All that should only work when I'm on the vpn
 
9:17 PM
I'm having 2 php int variables , $i and $j. Now I want to have a name in input created from those variables, something like:
<input type="text" name="<?php echo $i.$j; ?>" size="1">
Is that correct ? And what do I write in $_POST[ ] to retrieve it?
 
9:38 PM
@domocar1 $_POST[$i.$j]
 
Thanks :)
 
if those are not integers, you can run into problems to encode the HTML properly. Just saying, you're perhaps aware of that already.
 
@DaveRandom figuring out how to set the docker bridge network up isn't that trivial (once you know it it's simple)
 
@kelunik Just noticed that somebody submitted one of my amphp middleware projects to the README for the http-server project. Was not expecting that tbh... I'm planning on spending some more time on it this weekend. I noticed that you had tried to ping me... let me know if there's anything
 
9:54 PM
Hello, for Check active or not active(status) item what is the better for performance? tinyint(1) <-- 1 true 0 false Or enum('active','notactive')
 
@LaraBell what kind of performance? number of letters needed to be typed in a query?
 
@hakre read and write
 
@LaraBell more bytes in the second, for both read and write, so I guess it is a little bit slower. But performance related questions can only be answered by measuring the system under load and comparing the performance metrics.
Choose what works better for you.
 
@hakre actually what is true way for boolean values
 
@hakre casting false to string doesn't really help determining between a true failure and simple timeout getting hit on the handle/socket. How am I supposed to know when it's a legit failure now?
 
10:06 PM
@TravisHansen do I understand right that you're looking for timeouts and a timeout would constitute a failure?
@LaraBell Mysql has no booleans AFAIK. Typically it's an integer (INT) which by convention can only be 0 (for false) and 1 (for true). See as well 9.1.6 Boolean Literals
* booleans = Boolean Types
 
@hakre i think tinyint is a better choice, u confirm?!
 
e.g. you can name the column active and then query it: SELECT ... FROM ... WHERE active
@LaraBell You have a good nose ;) Go for the INT. Make it unsigned and not nullable.
 
@hakre thanks ;)
 
user11867329
PHP has to have an answer for my question.

I need to crawl and fetch 3/4 elements from product pages on different websites.

Is there a simple way for a script/app to sift through all products and fetch 3/4 elements, then place a in a .json or .csv?

I have jsdom and node.js as a main environment.
 
user11867329
Or maybe a chrome extension/macro that repeats the same task when ran?
 
user11867329
10:17 PM
I could simply click the product, run script and poof.
 
or a python bot?
 
user11867329
Python room will tell me to f*ck right off.
 
and JS room?
empty?
 
user11867329
Yep
 
user11867329
and JS wouldn't really be a good approach I think
 
user11867329
10:17 PM
python/node.js/php
 
user11867329
would make more sense (imo)
 
node.js is JS, isn't? at least last time I looked it was.
so let's see what could bring you forward.
what is bothering you most with the problem at hand?
 
user11867329
Well the issue is pretty simple, say you go on a Amazon product, any product.

I simply need to setup a macro template (or any sort of automation) to copy the same elements/parts.
 
hey @Ocramius
 
user11867329
So I don't have to use mouse to select title, then select description, then select price, then select...
 
10:21 PM
so you like to scrape websites.
 
@hakre yeh
 
@Ocramius do you accept patches for coverage-checker.php ? ^^
 
user11867329
@hakre "Like" is an overstatement.
 
I think that thing is abandoned: do you want to take over maintenance?
 
@Ocramius was there a repo?
 
10:24 PM
Don't remember
too many projects :X
 
@Ocramius you for sure. but you remembered the file-name?
 
Oh, I think it was only a blog post
 
ah, never read that one. PHP 5.3+ variant including floats (two digit precision) - forked from the VersionEye module.
it's quite handy for local builds.
@OakDev so you have to scrape websites, right?
 
11:02 PM
@ha
@hakre no, I'm looking for the previous behavior (and what IMO aligns better with the doc) which is, if I'm non-blocking and hit a timeout, it should not be a failure
failing on something that's essentially assumed to happen seems...off
 
11:28 PM
@TravisHansen so the false appears to harsh, signalling an error which is none?
if it's non-blocking, why is casting to zero-length string harmful?
you can still do eof() check if there is an error, or is that not possible?
two sequential freads and then eof check IIRC.
maybe a zero-byte read.
IIRC I had the situation reading from stdin streaming and it returned false. but the stream was not yet at the end. perhaps PHP 7.2. so the "error" handling needed me to read in further and eof() was not true.
I should have that under test and could easily run with PHP 7.4.
 
11:52 PM
so, tested. the original runtime was php 7.3. now running with php 7.4 I get a stream related error with a bad file descriptor on write. so there are behavorial changes. and mine is even more harsh as it's an error. You're not using error suppression, right?
 

« first day (3465 days earlier)      last day (1483 days later) »