« first day (4181 days earlier)      last day (993 days later) » 

00:12
@bwoebi We switched to PSR-2 in Amp because we were tired of dealing with either questions or asking people to fix code style in PRs. This was some time ago of course, now Github actions would tell them to fix their code style.
00:51
Tabs > Spaces
 
1 hour later…
02:18
Hello guys; when I set my volumes in my docker-compose.yml file, the destination folder always is empty; why?

volumes:
- /var/www/html:/var/www/html:rw

When I run docker-compose exec php ls /var/www/html -l it returns 0 items.

I can't solve this problem; it's wasted most of my time ):
02:58
@MarkR Tabs + Spaces /runs
03:30
@X4748-IR Is the container running?
Try docker-compose run --rm php ls /var/www/html -l
 
2 hours later…
05:03
I'm seeing a lot of APIs from big companies such as GitHub, AWS and some other more medium-sized ones that have a hard limit on 1mb body size for HTTP responses.
I tried to search for some kind of HTTP specification that could justify this convention of "1mb max" but I couldn't, neither from a communication protocol POV of browser
Why is it common to adopt this 1mb max HTTP data size? Would anyone know?
05:56
@Trowski YES
Funny! It exists when I run:

docker exec nginx ls /var/www
It seems the containers are completely seperated; when I run docker exec nginx php -v

it returns that it couldn't find the binary file
06:25
It's solved; thanks.
 
1 hour later…
07:33
@LucasBustamante 1mb could be the size of response buffer in ngninx for example that is habdled in memory vs going to disk
08:51
Does anybody know of an example with Fibers that implements "concurrent" downloads from URLs?
Wes
Wes
09:15
i hate farmers and their DST
09:26
@MateKocsis Did you miss the second week in the doodle poll?
09:40
@Wes the association of DST with farmers is a myth, and pretty much the opposite of the truth: it's specifically an industrial age invention, promoted by industrialists in the era of 9-to-5 inflexibility
effectively, it's a trick by factory owners to get workers up an hour earlier
Cows don't care about what the clock says.
thankfully, it seems to be finally going out of fashion, with both the EU and US making progress towards abolishing it
although the US is using the bizarre label of "permanent DST", which actually means permanently moving everything one time-zone east
And they're already shifted too far that way anyway: blog.poormansmath.net/the-time-it-takes-to-change-the-time
I'm hoping Spain will take the opportunity to make their clocks match Portugal and the UK, rather than Germany and Italy
Wes
Wes
10:53
the world would be so much better without farmers
farmers probably say the same about software developers
Wes
Wes
:D
there'll be fun on the island of Ireland if the UK decide to not abolish it and the EU does.
@kguest Or when Ireland picks IST as default, and the UK GMT.
that too. :( :)
11:42
o\
(head bump)
11:55
\o @kguest
12:06
here you go: https://gist.github.com/azjezz/159cf34608e20215bd6f818014a2388c

This is the closest i can get to what you want, but downloading from a TCP server instead of a proper HTTP server, just have a TCP server running on that address.

if you want to really download from the web, you need to implement an HTTP client using sockets, or maybe curl handles, idk 🤷‍♂️

also, i made the read chunk size small so you notice the concurrency in the output :)
12:34
Morning o/
HAPPY MONDAY @DaveRandom!
happy and monday are mutually exclusive
12:57
I know... I like to torment him. =P
13:26
@Tiffany :-) \o/
14:16
An HTTP client can be as simple as just sending this:

fwrite($this->fp, "GET {$this->url} HTTP/1.0\r\nHost: {$this->host}\r\nAccept: */*\r\n\r\n");

:-)
Thanks though!
@Derick yes... but TLS stuff, redirects, .. etc :p
Sure, but I don't need that for a simple example.
14:39
@Derick updated the script, should look "simpler" now gist.github.com/azjezz/159cf34608e20215bd6f818014a2388c
15:02
@Trowski yes.
cmb
cmb
15:20
@NikiC I asked for subscription via mail years ago, but was told that would not be necessary.
16:03
posted on March 28, 2022

🎵Don't save... I don't need your data...🎵
16:27
posted on March 28, 2022

Hi there, I'm using Codeigniter project and I'm having trouble implementing a chart with my database.
What is this big lettered "Don't Hit Save:" thing spamming in here?
Can anyone help out? I can offer some reps
posted on March 28, 2022

@Derick Hi, can you help out?
16:33
@Derick Looks like an RSS feed gone bad.
@jobB No, and certainly not now you've personally tagged me.
@jobB Don't ask to ask, just ask.
4
Q: How to implement MYSQL data fetching in JS Gantt chart?

jobBI'm using AnyChart’s JS Charts library and I want to implement this with my project data's, I'm using Codeinghter framework and I want to know what's the best way to do this. I know it's very basic but any help is appreciated. Thanks. DATABASE Project Table id || name || start_date || deadline ||...

And don't ping people with your question
Right sorry.
16:34
@CharlesSprayberry If it does it again, I'll disable it.
New in chats
This is my question and I can't seem to get an answer and idk what to do lol.

https://stackoverflow.com/questions/71646935/how-to-implement-mysql-data-fetching-in-js-gantt-chart
I would offer up some bounty and then I have to wait 2 days which I can't as I need to get this job done with quickly
If you're in a hurry, you need to pay somebody.
I understand but I'm not in position to do that, the best I can do is offer my reputations
So I'm just hoping a good friend will help out lol
I have to travel tomorrow and I need to close this work today, otherwise I won't have time to finish it up anytime soon. That's why I'm offering reps through bounty to anyone who will help me out right now. I will put my question up for bounty after 2 days and give it to them
16:52
Can somebody help me to install `imagick` in docker? Here is my docker file:

FROM php:8.1-fpm-alpine

RUN apk update && apk add build-base && apk add autoconf

RUN docker-php-ext-install imagick && \
docker-php-ext-enable imagick

But doesn't work and returns:

error: /usr/src/php/ext/imagick does not exist
user17161735
if I'm not working with frameworks; to support multiple languages; It would be correct: implement CSV or JSon files, particularly they are supported by other multi-language environment editors; The idea would be to take the csv or json dictionaries, convert them to arrays in php and use them to replace the related html content.
@Arcanis-TheOmnipotent That is a way to do so. I don't know that it's the best way. :-)
@X4748-IR Isn't it in pecl? So perhaps docker-pecl-ext-install ?
It depends somewhat on the languages you need; many languages have absurdly complex mismatches that make straight replacement hard.
17:01
Exactly, right now, I'm trying it using PECL
I think we don't have such a command, I mean: docker-pecl-ext-install
posted on March 28, 2022

ERROR: `/tmp/pear/temp/imagick/configure --with-php-config=/usr/local/bin/php-config --with-imagick' failed
The command '/bin/sh -c pecl install imagick && docker-php-ext-enable imagick' returned a non-zero code: 1
@X4748-IR Probably missing the library. Usually the output is a lot more chatty than that
user17161735
@Crell probably these are the languages to support: english; Spanish, French, Portuguese, German, Mandarin, Hindi, Arabic, Bengali, Russian, Indonesian..
posted on March 28, 2022

Derick has stopped a feed from being posted into this room
17:09
@Arcanis-TheOmnipotent Yeah... that's going to have edge cases.
Disclosure: I'm on the FIG working group for figuring out a common translation API, and we're exploring the various existing standards from major international organizations. They're all funky and messy and have holes in them. :-) It's a very hard problem space.
user17161735
what is FIG?
PHP Framework Interoperability Group. The PHP de facto standards body.
user17161735
what I am going to do is create a platform for other developers to integrate their developments; then the platform must have support for these languages, maybe the developers who use the platform do not have or do not want to support all the languages... in that case I was thinking of using csv or json; I also heard that yaml files are a good idea...
user17161735
the issue would be that I am not going to give multilanguage support to the end user, it will depend rather on the developers who integrate their developments in the platform.
user17161735
@Crell ok
user17161735
17:14
php natively is looking for a solution... for this?
FROM php:fpm-alpine

RUN apk update && apk add build-base && apk add autoconf

RUN pecl install imagick && \
docker-php-ext-enable imagick
What could be wrnog? ):
user17161735
@Crell Is there any progress that they have documented?
Not at this point. It's still early and we're not sure to what extent we should pick an existing sub-standard standard and just use it.
@X4748-IR You need to show the errors. As I said, you likely don't have the imagick libraries installed — as per the link I gave you earlier: discuss.circleci.com/t/how-to-install-php-imagick-php-extension/…
user17161735
It seems to me that they should suggest a standard that already has software that allows professional and open source editors/translators; make a correct output of the translation dictionary and that this output file is easy to integrate with php even natively.

Now I have another question, what would be the correct way: use the printing of variables or the substitution of string?
17:20
That's one of the considerations we are looking at, yes.
user17161735
@Crell is it a closed development team? how can i contribute?
There's a formal working group, but anyone with relevant domain experience is welcome to stop by our Discord channel and chat. ("relevant domain experience" meaning "has experience working with the insanity that is multilingual translation APIs" not "I write PHP and have opinions.")
user17161735
ok
@Crell This is why zeta components picked QT's "Linguist" format: zetacomponents.org/documentation/trunk/Translation/phpdoc/…
There's a link to the FIG discord on our website: php-fig.org
17:25
that URL is timing out
Fixed
user17161735
@Crell I understand, well my doubts are more focused on the format and use of the files (dictionaries), not on the translation to be used; since as you say ... depending on the context the same text can have different meanings or vice versa.
@Crell Don't edit source files on the server — again! :-þ
@Derick I'm actually pushing hard for us to NOT standardize the storage mechanism for translations. :-)
@Crell API only standards aren't really standards. What's the point?
17:28
@Arcanis-TheOmnipotent Very broadly, there's 2 options: "Here's an English string with placeholders and values for the placeholders, use a lookup table to swap out the English string for something else if appropriate." And "Here's a lookup key with values for placeholders, use a lookup table to swap out the key for a language-based string." And in both cases, then interpolate the placeholders into the string.
@Derick unless they define the behavior and constraints associated with that API, no?
The tricky bit is the interpolation, because, eg, you may have to deal with gendered languages, or languages with multiple forms of plural, or stuff like that.
@Derick It worked for PSR-11 and PSR-14.
user17161735
@Crell That would be perfect and adequate if the sites had an optimized and working cache, the translation in real time can cause an excessive consumption of resources. in the end the cache means that the translated will be somewhere else stored as a portal at all.
FWIW, that's what the Zeta API has too: zetacomponents.org/documentation/trunk/Translation/…
@Arcanis-TheOmnipotent I have no idea what you're saying there.
user17161735
17:31
@Derick what is FWIW,?
For What It's Worth
@Crell I think they're saying that caching translated strings is an important thing. And I agree.
user17161735
@Crell my question is related to the saving of the translations; and you are arguing that you are pushing to avoid it in FIG; I answer that if you don't save it you would have to consume translation services in real time... in the end, if the cache of any web system is not configured... this will cause a high consumption of resources; In the same way, at the end, the cache will end up saving the result of the translation; or at all what comes out on the screen...
You wouldn't need to do a real-time pull. But a focus on "how does a library get a translation of its string" is still a complex problem space that is (mostly) independent of whether translation packs are shipped in JSON wrappers or XML wrappers. And in either case, you'd want to have a local store to back your translation engine, probably using a DB.
What a lot of systems do is download a text file in whatever form, then import that into a read-optimized DB table, and then use the DB table at runtime for doing the actual translation.
user17161735
@Crell You try to replace the people who are dedicated to the translation / editing of content; implement AI for anything Open Sources and I would leave the Human professionals in their posts to continue doing their semantic translation work.
huh?
user17161735
17:40
what a translator does professionally is to use appropriate semantics for the context; hardly an AI will come close to this point... and when you try to do something with that degree of professionalism... we are bordering on artistic aspects that only a human can do... I would give you a software that helps you in the management of that translation to generate the translation/dictionary files suitable for the development software...
That... is entirely irrelevant to this discussion? :-)
user17161735
but I don't see myself professionally consuming a translation database... I would prefer to pay a translator for something friendly to the human eye.
I never said anything about AI translation. At all.
user17161735
@Crell Of course not... the point is how you want the translation service to be consumed... if from a database (or and IA)... this has another side of the coin...
user17161735
@Crell fixed
17:43
It's no different than the JSON/CSV file you suggested to begin with. Just bulk imported into SQL for better performance.
Even better performance would be if everybody knew Esperanto.
user17161735
when you mentioned that the problem of translation is the context; it is because you are looking for something generic that cannot be 100%; Two things must be offered: either it is done by consuming services or a professional is hired; the integration made by FIG must take into account both sides of the coin. and not force the use of a service in a single standard.
I think @Crell is talking about translating single strings inside an app for commonly used phrases, and not for arbitrary text.
user17161735
my mistake; my question was about default text:
$sayHelloWorld = [ 'en'=>'Hello World!','en'=>'Hello world!'];
user17161735
17:52
csv, json or yaml ... the the right way to storage dictionary for lang translations on ML System
user17161735
taking into consideration that there must be a translation professional behind these files.

and that it is compatible with some software help the translation like OmegaT
IGP
IGP
18:25
o/
18:44
@StatikStasis incoherent grumbling
19:12
=D
19:59
wiki.php.net/rfc/undefined_variable_error_promotion has passed with 80% of the vote, and while it'll be years before it actually has an effect, I think today is a bloody good day for PHP.
Sealed classes, though, are not looking good. Still undecided myself.
@MarkR Congrats. Continuing on when a variable is undefined is a bit insane IMO, glad to see it nuked.
@Crell As am I. I can't decide if a type declaration would better solve the problem or if sealed classes still serve another purpose.
@Trowski For me, it's that 80% of the time IMO an ADT would be a better choice. Of course... we don't have those yet either. I'm not sure how common that other 20% is.
I think a lot of the No votes are thinking of service objects and going "why?", when the use cases are all for value objects, monadic wrappers, and stuff like that.
@MarkR The proposal themselves always explain the "Yes" vote. I wish any "No" votes had a place to explain their reasoning behind a vote against an RFC. I know that comes out in the internals email list, as well as discussions in here but would be nice to have that in one place for reference.
@StatikStasis I made a sub-vote below it to try and get some idea.
20:08
...yeah... I did not scroll far enough. =/
Good on you for thinking to do that for information gathering. That should be a standard.
@Crell Probably, yes. If I knew someday we'd have type aliases + package visibility, I'd say no. I think we'll get the former, but I'm not sure about the latter.
I won't hold my breath for package visibility.
Right, so I'm inclined to vote yes because it does nicely solve a fairly common problem for open-source libs.
That's kind of where I am leaning. It's not a great solution to the problem space, but it is a solution, and doesn't necessarily preclude the better solution (ADTs).
Though with the current numbers, it still isn't passing even with both of us.
IGP
IGP
I'm curious. What's the argument against the error promotion for undefined variables?
20:16
True, I'm not sure how @kelunik feels about it.
@IGP Breaking existing code.
IGP
IGP
But it's targeted at a next major version
It's kind of expected. Breaking existing code with a minor version version however...
A lot of people see deprecation warnings as an immediate break, because that's how their CI is setup.
Also, the breaks in 8.0 (notice -> warning) pissed off a lot of people anyway.
IGP
IGP
So nothing should ever be deprecated because it makes the static code analysis look ugly?
/shrug Don't ask me, I votes Yes on it. :-)
But legit, making work for people when a new version comes out is not-nice.
/me votes Yes on sealed classes, just in case it helps.
20:22
o/
Massive backward compatibility breaks would not be accepted by people unless there are enough new features or benefits introduced on the version to balance it out.
So I'm very much excited and looking forward to PHP 9.
Whether the improved strictness itself is a new feature is a matter of opinion.
@sj-i or there was a cockup, and no-one noticed the breakage.
20:37
haha, likely.
@Crell People having to work when a new version comes out, is the price of having a new version IMO. You don't have to use the latest version, but if you want the new shineys and not to have to purchase for backported support, there's a different cost.
Sure, but the cost is generally born by OSS volunteers, in practice.
I heavily sympathize with both positions here, to be clear.
OSS volunteers are vocal, but represent a tiny, tiny percentage of PHP developers
That RFC that past probably just cost several million dollars, but I guarantee it'll save many times that in the next 20 years.
err... passed, I know how to speil, honest
20:55
Personally, I am OK with the current move in the language. My current colleagues are all writing good code well enough, so having no trouble.
There would be not-so-small people having trouble with the breakages though.
@MarkR \o/ indeed
I wonder what feature would make those people happy in PHP9...
that's easy, generics :P
:P
@IGP Because, sometimes, it turns out to just not be important if the code is a little broken. You can log it and happily move on.
21:08
@bwoebi If there's a high cost for fixing the error I could understand that argument. But an undefined variable? That seems to be a pretty straightforward fix, if possibly tedious.
@CharlesSprayberry it's not about fixing it, it's about the application continuing happily. It's trivial to fix it, once logged.
Eh, perhaps. I was in the camp that undefined variables shouldn't be allowed before the RFC :P
21:37
Next up, properties? :-)
@MarkR Sounds good to me!
22:03
I think this direction of making everything just error out is actively harmful in the long run. I'm even wondering whether this should be more an additional per-file mode (like strict/weak typing)…
That depends heavily on whether the errors are useful in telling you how to fix them.
My thought is, by the time you see the warning your application has likely already done something you didn't intend it to (or at the very least weren't clear about). That's just bad design.
If people fixed their bugs as soon as they showed up in their error logs, then naturally these changes won't effect them for the most part, as they won't have anything that would trigger them.
22:50
@ircmaxell I made the testsuite of FFIMe pass again now - and it'll test against /usr/lib/system/libsystem_platform.dylib on MacOS :-) [I had to quickly stuff in fat binary support for this to work in the object-symbol-resolver]
Sometimes I get lazy and use raw PHP for templates of email or CLI output or other texts, but the automatic erasure of EOL right after closing PHP tags is a pain.
Does anyone else want the ability to terminate PHP blocks without erasing trailing EOL, with a syntax like =?> ?
@ircmaxell I totally only now realized that also pushed something to FFIMe, noticed when getting a merge conflict - I guess that's now the start onto having something deeper

« first day (4181 days earlier)      last day (993 days later) »