« first day (2748 days earlier)      last day (2186 days later) » 

2:00 PM
yes
 
since your name is @Martijn I am summoning @tereško to insult consult you with this.
 
It is a generic importer. I get a class and a bunch of names of the setters
 
$reflection = new ReflectionMethod($class, $function); foreach ($reflection->getParameters() as $param) { echo $param->getType(); }
 
And I know they all have 1 parameter. I also have the value I want to input, I just need to klnow the type :)
Thank, I've got a few answers now, I'll check them out
 
but did you learn what reflections are?
 
2:02 PM
Haha not yet, I was responsing here. I'm going to do that now
 
:thinking:
 
That reflection snippet seems like it exactly what I was looking for
 
@Martijn ok, so now you have the wanted type and the value that you want to set. what will you do with that? just casting?
 
and a little validation. Like a dateformat as a string to the \datetime
 
2:19 PM
And today, I am yet another year closer to 30.
13
 
happy birthday
 
i turned 29 2 weeks ago so i know the feel of closing in on 30
 
happy birthday :)
 
@FélixGagnon-Grenier Happy birthday!! :)
 
2:20 PM
still feel like 20 :D
 
Happy birthday @FélixGagnon-Grenier! May your year be filled with maple syrup!
 
Anonymous
ey ! Happy Birthday Eh @FélixGagnon-Grenier !
 
and my mentality is till stuck at 18, so i'm still partying like crazy
 
eh
very maple syrup
@PeeHaa funnily, my sister offered me a bottle of porto mixed with maple syrup, so it starts well ;)
 
2:22 PM
\o/
:D
 
both things are very nice. but I'm unsure about the combination :P
 
@FélixGagnon-Grenier Happy Birthday!! \o/
 
@pmmaga it's reaaaallly nice :)
\o/
 
how old are you now btw?
 
@FélixGagnon-Grenier my condolences
 
2:23 PM
@mega6382 a small 28
 
Anonymous
jeez, you survived the plague
 
clearly ;)
 
@JayIsTooCommon watch it or you might not survive infancy
 
@FélixGagnon-Grenier Thats so old, you are like ancient :P
 
oh well :)
 
Anonymous
2:25 PM
@PaulCrovella <3
 
Joyeux anniversaire @FélixGagnon-Grenier
 
stream_get_contents fail to seek on streams modified by curl_exec – #76268
pg_escape_string, pg_send_query will cause a segfault in some rare cases – #76267
 
Wes
2:55 PM
dat spam. i'm seeing marvel venom movie ads everywhere
when they do this, it's because movie sucks and they are going to need to get as much as money as possible in the first days in cinemas
 
I want it to do well enough to convince them to make a carnage movie
 
Wes
all marvel movies suck now
 
bullshit. ragnarok was hella fun.
 
Wes
didn't watch that one
if it's deadpool "fun" then i'm not going to like it
 
@PaulCrovella no worries. He only likes "deep movies".
 
Wes
3:00 PM
...
i like any kind of movie. civil war was any kind of shit
 
seriously, I have not heard, that you liked any movie in past 5 years
 
Wes
deadpool wasn't fun at all
i didn't like many movies yeah, and i lost all my hopes
 
so .. your opinion does not matter
 
Wes
among marvel ones i liked only antman
did you take your pills today
marvel movies are just fan service
 
he's not wrong tho, you really did not like any movie in a long time ;)
 
3:02 PM
lol, so you think that the shittiest marvel movie was "the best"
 
Wes
doesn't matter the content
people just want to see captain america
 
antman was fun too. try ragnarok, it's better.
 
Wes
it's not shit, it was fun, but not teenage fun like deadpool
the last marvel movie i truly enjoyed is the original captain america
however, i did not watch the new spiderman
spiderman is usually fun
 
Wes
@FélixGagnon-Grenier they are so disappointing that i don't even try watching them
when i read that mad max is the best movie of the decade, i understand i'm evidently an outsider
 
Anonymous
3:07 PM
@Wes finally, someone agrees
 
Wes
> fan service
 
@Wes i'd skip that unless you're on a brain-off mcu kick
 
Anonymous
Main thing that bugs me is the mixing on individual films. I.e. If I'm watching a spiderman film, I don't want Iron Man to come and save the day. I'd watch avengers for that.
 
Wes
also tv series are crap.... at least the ones i've watched
 
I really liked the first season of daredevil.. nothing after that quite kept up
agents of shield needs to end.. got stuck on it during a brain-off mcu kick but my god is it not good
 
Wes
3:13 PM
@PaulCrovella endless fights in the dark
i think i quit daredevil after i waited 5 minutes for a fight scene to end, but it didn't
 
I keep getting `Call to undefined function imageftbbox()` but I can't understand why.
I have built PHP with `--with-gd --with-freetype-dir'`
 
@Wes well yeah, that's kinda his shtick. you gotta let some shit slide for any comic book show
 
Wes
also he has no clue of what's going, he just punches and kicks people at random... the plot is everywhere but where the protagonist is....
 
Anyone would like to support my idea of improvement for PHPStorm Add ability to convert anonymous class into named class please raise a thong
@Wes maybe you?
 
@yessure no line like freetype-config not found. on the output of configure when you run it?
 
Wes
3:18 PM
i only use boxer sorry
 
@pmmaga no, no errors
 
anyone got a handy helper for converting float to datetime with microseconds lying around before I waste 10 mins writing another one?
 
isn't DateTime doing it out of the box?
 
@yessure did you try running gd_info?
 
@brzuchal int yes new DateTimeImmutable("@{$int}") but that doesn't work with floats and afaik the only way to do it is with createFromFormat("U u"), which requires separating out the secs/usecs and multiplying the fraction part by 1000000
 
3:23 PM
@DaveRandom DateTime::createFromFormat('U.u', (string)$microtime) doesn't work?
 
@brzuchal no, because u is "number of microseconds", not "fraction of a second"
 
got it
 
@pmmaga I ran phpinfo, and in the gd table there isn't any mention of freetype.
 
try gd_info that will tell you about it
 
it's not complicated, just seems like something that someone would already have
 
3:25 PM
Ok
Array
(
[GD Version] => bundled (2.1.0 compatible)
[FreeType Support] =>
[GIF Read Support] => 1
 
@yessure so yeah, no freetype support, you have to check the output of configure for some hints on why that is
btw, are you the OP here? bugs.php.net/bug.php?id=76264
 
maybe
 
@yessure you probably want to check in the config.log (or similar) that everything was actually found.
 
@brzuchal turns out this actually is how it works, but it's documented wrong and it borks when the string has more than six digits in the fractional part :-/
Had to do this: 3v4l.org/XZiG0
which is horrid but I think it is all necessary (sanity checks appreciated though)
 
I got
checking for GD support... yes
checking for FreeType 2... yes
 
3:41 PM
@DaveRandom $timestamp = +$timestamp will handle the appropriate int/float cast automatically
 
oh cool
til
tnx
 
o/
 
@yessure whens the last time you did a make clean?
 
I really wish this would stabilize and browsers would adopt it: :has.
 
months ago
 
3:43 PM
I want to style kbd elements a certain way only if they don't contain other kbd elements. I don't want to put classes on there or fix it up using JavaScript. If anyone has any other clever tricks let me know.
 
@yessure Well.....why not try doing a make clean now.
 
@Danack in the build directory?
 
@DaveRandom also, why not \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $timestamp))?
 
@PaulCrovella because apparently I'm rubbish at printf
:-P
ty
 
you're welcome
 
3:49 PM
so actually that whole thing can be done in an acceptable one-liner
return \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6f', +$timestamp));
possibly even without the +
 
you don't need the +, it's headed to float either way
 
winrar
so In fact I can bin off the extra fcall layer as well
 
should use the capital F though, as lower case is locale-aware
 
@yessure yes.
 
oh btw, on those decimal types - userland type should be string. only proper way for someone to handle them is with bcmath
 
3:55 PM
OK, so given all that @PaulCrovella does 3v4l.org/qGl71 seem reasonable?
@PaulCrovella agreed, but this is a layer to normalise external data which can arrive in all sorts of weird and wonderful formats
 
@DaveRandom right, one set of which is (sadly) 754's decimals
 
hmm I have ran it. However I don't think it's needed. I'm building php 7.2.4
 
I read that as 5.2.4 at first
 
@DaveRandom why would you be passing it a DateTimeImmutable, and if you do why would you send a format along with it?
(or DateTime)
 
4:05 PM
"the science news"
 
@PaulCrovella I have several different databases which use unpredictable driver implementations (e.g. some use sqlsrv and some use freetds-based things, some use ext/pg and some use PDO/pg), and also a bunch of external API clients and all sorts of stuff, all of which will be passing data through this adapter (data warehousing related, bag of shit, you don't want to know).
basically I could write 30 different adapters, or this. I concluded that this wold be less painful in the long run.
I may yet be proved wrong
 
@DaveRandom can't you use PostgreSQL connection facilities to provide unified interface?
 
not without even more arsing about
 
keyword: "foreign data wrappers" wiki.postgresql.org/wiki/Foreign_data_wrappers
 
I'm pretty fucked off with the whole thing tbh, I'm only doing anything at all because my boss has told me to press on with creating something but we are both pretty confident this whole project will get cancelled long before anything remotely usable appears
but a whole load of 3rd parties are involved
 
4:10 PM
same project you're doing the geoip lookup for?
 
well, exploring those foreign-wrappers could be useful for future projects too
 
@tereško I have heard of this but never actually tried it, may bugger about with it at some point
I do have an ideal candidate for it where I could actually make a useful thing as well
@PaulCrovella yes
 
do a quick read-up (so that you can explain to your boss the jest of it), and if you get the approval, it might be a solution for your problem, @DaveRandom
 
sounds about right
 
basically we are getting paid so I am doing it, but the second I feel a sniff of disinterest I will push very hard to fuck the whole thing off
 
4:12 PM
Empty on constant array – #76269
 
@tereško certainly some of it
 
and if the thing gets canceled, you will know a really good tool for integrating clusterfucks in less-shit way
 
@tereško So, what name did you use for your mapper interface?
 
the 3rd-party APIs with 3rd-party SDKs (one of which returns date/times as float timestamps, hence the original problem) are still an issue
 
@mega6382 canPersist .. because I am lazy
 
4:14 PM
hahaha :P
 
@tereško well I've actually got a multi-module application that's been partially migrated from SQL server to postgres right now, could definitely help with the rest of that migration
 
posted on April 25, 2018 by CommitStrip

 
kind feel for him though - "The date can be specified in any format." is just screwed up
 
@MadaraUchiha You sure you are in the right room?
 
4:29 PM
Probably not
 
@MadaraUchiha fixed, but did you have to ping me in PHP? it smells like failure in here
And that's just from @PeeHaa
 
@SterlingArcher well it does now
 
@SterlingArcher Dunno what you're talking about
You're the one who pinged me here
 
@SterlingArcher Hey dude! Shut up
Nobody fault I am here. Don't put this on the rest of the room
 
4:30 PM
Hi Peehaa <3
 
For the curious, was talking about this comment
 
Also borken Enlgish <3
So they finally kicked you out @MadaraUchiha?
Good good
 
Who's "they"?
 
they
 
The JS monkeys
 
4:32 PM
they have monkeys now?
 
I'm offended
I should throw poo at you
 
> My main account on SO was deleted for walking into a chat room
Classic
 
> I was punched for walking in the bar
 
> Oh yes, in case you didn't know, moderators can see who flags what.
Do you actually get tooling for that now @MadaraUchiha?Or is that a userscript still?
 
> I didn't make an account to get out of a ban, I made an account because a mod deleted my account.
 
4:35 PM
@PeeHaa If we catch them red handed, we can see it
But we still have no log with names
 
lol
 
I happened to be in the chatroom at the time to catch it
 
> Is that all, or do you want me to go back further than the last 3 days?
@MadaraUchiha Yes, we want you to go further than 3 days back
:P
 
@mega6382 Expanded a bit in a comment
 
I also posted a raw transcript
 
4:37 PM
I don't enjoy airing peoples' dirty laundry, I like to give juuuuust enough dirty laundry for them to make a rope and hang themselves on it.
 
There's a LOT so you gotta do some filtering
 
"You were told to fuck off, yet off you have not fucked." probably wouldn't go over well on meta, would it
 
@SterlingArcher I like it.. o wait. this isn't the js room
 
Wait this isn't JS?
 
No, it's patrick.
 
4:38 PM
you js people never know what this is
7
 
this is sparta, duh
 
@PaulCrovella 👏
 
oh wait I just got it
lmao not bad
 
tf are all the js people doing here?
 
4:39 PM
well Madara and I are almost always in the PHP room are we not?
 
Makes me wonder what PHP regs hang in JS room
 
ohh there are a few
 
I do sometimes.
 
Madara migrated to JS room tbf.
 
4:42 PM
Where have you been @Fabor?
 
@Allenph jQuery
 
@Fabor migrated? how long ago, he's been a js room regular since pre-mod
 
Caught in a while loop.
 
he was an RO iirc
 
@rlemon Yup, I only really came back to the PHP chatroom after being elected
 
4:43 PM
Which were you first @MadaraUchiha?
 
I beleive @FlorianMargaine also, hangs out both here and in the js room.
 
Florian was for sure in the JS room for a long time
I don't even write PHP, I'm here for @PeeHaa and @Wes
they're funny
 
Funny as in to laugh at rather than with.
 
sometimes. mostly @Wes for that tho :P
 
@Fabor It's not funny to laugh at special needed people
 
4:46 PM
in HTML / CSS / WebDesign, Sep 21 '14 at 21:07, by user652649
once i was so hungry that i faked to have guests at home. i bought 10 crispy mcbacons. i had to buy 10 cokes too, for not creating suspicion
 
Wes
:B
 
hehehe
 
Wes
this mocking the php programmer thing has gone out of hand though
 
lol, dude that story cracks me up every time
 
@PeeHaa lol
 
Wes
4:47 PM
:B
 
you were worried about mcdonalds employees looking down on you.. jesus dude
 
Wes
on that note, crispy mcbacons are back
they didn't sell them for years
 
lol
 
Once you hit manager at McDonalds I hear it's a good career.
 
@Wes time for a party!
 
Wes
4:48 PM
:B
 
@rlemon that's like if you ever have to buy something embarassing, always buy a birthday card with it
 
ohh no dude I own it
keep eye contact with the teller
smile, "yea, this is mine"
 
@Fabor unfortunately, they have the same rates of advancement as for drug dealers
 
@SterlingArcher "ohh, I see you got the rope, the shovel, the oil, and the birthday card... paper or plastic?"
 
plastic duh
 
4:50 PM
 
lol
 
xD
 
Saw an interesting thread in reddit. Question was "What are lifes mini-games". So for instance a RL mini-game might be throwing a balled up piece of paper in to a bin. Or smashing a mosquito.
 
not irritating enough
 
4:55 PM
!!urban peehaa
 
[ PeeHaa ] A cowboy shouting peeee haaa! while peeing and swinging a lasso.
 
Always a classic
 
!!urban rlemon
 
[ rlemon ] The most incredible guy in the universe, end of story. He’s sweet, caring, and truly amazing. He isn’t concerned with himself at all, but instead he’s concerned with other people. He always knows the perfect thing to say and the right time to say it. He takes your breath away and leaves you speechless. And he has a way of making your heart melt like no one else ever will. Robert is so wonderful, it’s almost impossible to find the words to match.
 
:(
Cap fails on that
 
4:56 PM
Why?
 
too long
 
ah
 
ako
Hi
I have a question about php
0
Q: How php loads it's modules?

akoI compiled php-7.2.4 from source on my Debian-9 machine, but did not configure anything related to php.ini and now all of the modules that i need are loaded when running php -m on terminal, but when running php --ini from terminal there is no loaded .ini configuration file. I wonder how php loads...

 
@Jeeves thats just stupid
 
ako
Can anyone help please?
 
4:58 PM
!!urban phomies
 
[ phomies ] PHP homies
 
now thats a cool urban entry
 
@mega6382 no u
 
@ako if you are not adding any extension= or zend_extension= entries, the extensions you see on -m are the ones that were statically linked for your build
 
ako
@pmmaga I didn't understand :(
 
5:01 PM
anjyway, JS people, whilst you are here, you might do something good. What does this error mean? Error: spawn phantomjs EMFILE
 
ako
@pmmaga I have not configured any .ini file
 
@ako exactly, so the extensions you see there are the ones that are built in your binaries
 
@mega6382 same thing it means outside of js
too many files
also phantom is dead. chrome headless is teh new hotness
 
Its legacy code. :(
 
regex-related functions crash instead of triggering memory-limit error – #76270
 
5:03 PM
@ako for instance ./configure --enable-mbstring builds mbstring statically. so there is no need for extension= on any ini file because it is already loaded
 
ako
@pmmaga And what if i want to add xdebug extension for example?
 
Wes
@Jeeves y u no provide an actual script..
 
ako
@pmmaga Yes i configured it like ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/lib/x86_64-linux-gnu --with-openssl-dir=/usr --with-openssl url=/usr --enable-mbstring --with-mcrypt=/usr --enable-soap --enable-zip --with-curl --with-gd --with-zlib-dir=/lib
 
@ako xdebug can't be compiled statically, as any zend_extension. so for xdebug you always need to add a zend_extension entry
 
ako
@pmmaga Add to where?? to witch file??
 
5:04 PM
> crashes and produces a f*****g blank page
Another satisfied customer :D
 
@ako php -i will show you where php is looking for ini files
 
yeah he got way angry at the end there
 
ako
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => (none)
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
The output says that no config file has been loaded
I must make it?
 
@ako so that tells you were you have to create a php.ini file for it to be loaded
 
ako
@pmmaga Thank you, i'll try it.
 
5:34 PM
I tried to rebuild and now I'm getting the error recipe for target 'ext/gd/libgd/gdft.lo' failed. Full log is here pastebin.com/RZi2NwD5
 
@Wes Is it normal to have a JsonSerialize interface for a domain object or is that a code smell?
 
Wes
it's acceptable
php should have a generic serialize() interface that can be used for multiple things, json, serialize()
but unless the language does that, it's not going to work in userland, as it requires changing json_encode, serialize
or maybe not. serializing objects is not quite the same thing as converting objects to json
 
Sorry for the lazy request but can I get a regex for preg_split() by new line that is not inside quotes?
 
Wes
any quotes, or just e.g. html attributes
 
Seems wrong to me to have an object convert itself to a different format. I was thinking you would tell me to use some kind of factory or something.
If it's normal though it would certainly be easier...
 
5:52 PM
just double quotes "foo \n bar"
 
Wes
xy @Fabor what's the format of the string?
can quotes be nested? are them escaped?
@FélixGagnon-Grenier happy bday <3
 
thank you!
 
@Wes It's a CSV, quotes shouldn't be nested, they will be escaped presumably. Honestly we just accept many input forms sadly
Split csv line by new line presently, but now someone sending newline inside "Hello Bro, \n How are you"
 
Wes
is literal "\n" in the csv or an actual newline character?
 
Actual new line
currently we just have preg_split("/\r\n|\n|\r/", ...
 
6:09 PM
pretty sure there is a perl flavored meta character for newlines
 
Wes
its \n :P
preg_split("/\r\n|\n|\r/"...) php handles it
preg_split('/\r\n|\n|\r/'...) preg handles it
 
@Wes hmmm... please elaborate
 
evenin
 
Wes
preg_split("@\n@", ...)
preg_split('@\n@', ...)
both work and do the same thing. the first \n is handled by php itself and converted to the LF byte, the second is handled by preg, and does the same thing @FélixGagnon-Grenier
 
If I plugged my keyboard into my HiFi system, would that be considered stereotyping?
 
6:13 PM
it's still "handled" by preg when php converts the \n to its equivalent entity
but yeah, the conversion is not made at the same time in both cases
 
Wes
3v4l.org/R5t5K @FélixGagnon-Grenier
which is identical to
var_dump(preg_split('@\n@', "hello\nphp\nworld"));
and functionally identical to
var_dump(preg_split("@\n@", "hello\nphp\nworld"));
anyway @Fabor you should just use phpspreadsheet
 
@Wes I know but that's a future iteration. :-/
As with most issues like this - not my code originally :P
 
WAMPSERVER 3.1.3 32 bit, PHP 7.2.4 Oracle Client 11g issue – #76271
 
^^ that poor, poor person.
 
Wes
you can wait for the regexp wizards but i'm fairly sure any regexp solution would suck over phpspreadsheet
 
6:20 PM
We're scaling the suck horizontally. :)
 
Wes
take some time to learn it. it's super simple
 
famous last words
 
Can you read from a given string or do I have to write it to a temp file then load it?
 
Wes
you can read from string yes
 
Wes
6:33 PM
just buy a windows
 
Apple sucks ass
 
@tereško I remember you telling me not to have collections with sort methods on them. What do you do?
 
Wes
ORDER BY in sql?
 
So having an additional mapper method instead?
My mapper is getting really really thick for some objects.
And the tests are getting unwieldy.
getAll + getAllSortedBySomeProperty?
 
@Wes Think I am blind, can't find anything documentation about read (maybe load) from string.
 
6:46 PM
whatever the abstraction, a collection always ends up being a navigation over an sql query
the hard part, ime, is making the abstraction able to manage all cases without taking up too much time writing boilerplate classes
to be able to list entities from a collection, you need to be able to select a subset(page) of it, in the right order, and get pages over that collection
so, indeed, the sort method can't happen in php over a collection, it needs to be there when selecting the rows in the db. I generally treat the sort order as a condition like parent entity or entity status
 
@Allenph how about getAll($sortBy)?
 
Wes
@Fabor it's ridiculous if it's not possible to do that :P
 
@Wes Agree. Just not seeing anything in docs or via google
 
Wes
you might be right
 
Back to horizontal regex \o/
 
Wes
6:54 PM
lol
 
@Fabor What are you looking for?
and where?
 
Wes
do you have tests for the thing @Fabor ?
 

« first day (2748 days earlier)      last day (2186 days later) »