« first day (2382 days earlier)      last day (2791 days later) » 

03:55
Good morning
Mornin ^^
04:29
@kelunik I duplicated code because I assumed it would be used a lot because of async-interop. With that dead, I very much agree with your composition implementation.
@kelunik +1 for those names.
04:41
@kelunik I understand where you're coming from on pipe and capture, but it sure is nice to have those available for simple transformations. We should encourage coroutines, but it's nice to have options.
Morning o/
@trowski @linus \o
anyone know of a good xsd tools for linux?
@Orangepill o/
05:12
does anyone know if an older version of WAMP (v2.4) can support a newer version of PHP (v7.xx) without any problems?
Hi guys gd morning
Any idea how will I get a particular years month data from date in sql?
posted on April 24, 2017

New Cyanide and Happiness Comic

What do you mean by month data.... number of days in the month?
if date is 2017-04-24 then I want all the rows matching 2017-04 @Orangepill
05:32
datefield <=LAST_DAY(yourdate) and datefield > LAST_DAY(yourdate - INTERVAL 1 MONTH) should work
assuming it's a date field and not a date time
if it is a timestamp you probably want datefield < LAST_DATE(yourdate) + INTERVAL 1 DAY and datefield > LAST_DATE(yourdate - INTERVAL 1 MONTH) + INTERVAL 1 DAY
@astrosixer does that make sense?
I making it up
Have to implement this in yii
Okay @Orangepill
I got the idea
05:57
@astrosixer protip: "I have to implement this in framework x" is usually always the worse implementation. You don't get more out of a framework by just using as much of it as possible. In fact, from my experience, you are very often making things more complicated and lose performance. I learned that from ZF. So don't be afraid to use non-framework code when it's simpler code.
Thank you @Gordon
I am implementing it
morning Gordon
PHP has so many perfectly good wheels built in already, that I am reluctant nowadays to replace them with framework X for no good reason.
yeah, morning
please help me that is it possible to up pages to the same site from two diffrent machine using Filezila
06:13
why does 01 returns October instead January
using these code
$dateObj   = DateTime::createFromFormat('!m', $month);
$monthName = $dateObj->format('F'); // March
echo "<script>alert('".$monthName."');</script>";
06:41
@Trowski @bwoebi It hangs because that:
frame #0: PHPUnit\Util\ErrorHandler::handleError(errno=2, errstr="stream_select(): unable to select [4]"+, errfile="/home/travis/amp/lib/Loop/NativeDrive"+, errline=138, array(7)) at /home/travis/amp/vendor/phpunit/phpunit/src/Util/ErrorHandler.php:43
^ Forget what I just said.
Thank you @Orangepill and @Gordon it really worked for me
Its very simple code
07:16
@bwoebi It seems to be a PHPDBG coverage issue. Works fine with phpdbg -qrr vendor/bin/phpunit --verbose, hangs with phpdbg -qrr vendor/bin/phpunit --verbose --coverage-text.
Seems to be a generic coverage issue, same problem with Xdebug.
user924016
mornings
morning @RonniSkansing o/
Morning
07:33
meurnin
moengd
Huomenta
07:54
var_export does not export a parsable string representation of stdClass objects – #74493
@Jeeves morning from here.
@Linus From high abpve you mean.
morng
mornin PeeHaa
Good morning gentlemans and ladies
Anonymous
07:59
morn
Anonymous
@Jeeves @PeeHaa yohaa, how does the auto scrolling work? i see no reference to it in the xml
@JayIsTooCommon I don't know. How are you me?
@JayIsTooCommon AFAIK it's jquery magic. Not sure how it finds elements
Also WTF is the relation with the bug title
yo p/
oh lol
08:01
what's that, wave + self bitch-slap?
@JayIsTooCommon
I see what's going on
Anonymous
?
delimiter
Anonymous
yo dave
Anonymous
@PeeHaa heh, how does one edit the core :P ?
08:02
sauce is on github
Anonymous
is it spicy? I can't handle spice
can someone help to check why is giving that error?
s2 is array and i am giving treatment like that inside of the query
Anonymous
@PeeHaa thanks sister
08:05
not actually checked but that looks like a good candidate
@DaveRandom yep looks like it
yuk, monday
Anonymous
i guess filter is the best bet there
Anonymous
hey joe
08:08
jojoe
Anonymous
is docs a pita to build?
Imma go with yes :)
But for that ^ bug I would just change the JS i the browser to test
Anonymous
you're not just a pretty face
Morning 11
SSD has RIPd in peace
Anonymous
yo seno
08:11
@Sean I am dealing with the sameish thing. Only esxi boot usb died on me
so ... just throw it away ... the usual viking burial, three days of mourning and drinking, and then all over ... doesn't have to be over the top, just throw it away ...
Barely got two years out of it, not happy like :<
the good die young ...
one by one …
which word comes against "pros" ? A subject may has some "pros" and some what?
08:14
cons
yes , thx
@JayIsTooCommon talk to @LeviMorrison (about the web site, that repo, anyway)
.. what.
Building the doc sources themselves is pretty simple, there's a wiki walkthrough somewhere
3 messages moved to Trash
08:15
Hello, can someone help me please?
never set up a local instance of the web site, dunno how hard it is
Anonymous
@DaveRandom okies, cheers
Anonymous
08:18
ty
!!dontask
> Don't ask to ask, just ask @PeeHaa.
@ChristopheCosta ^
oh dammit
3 messages moved to Trash
Hello @DaveRandom
08:20
room topic changed to PHP: Support group for those afflicted with PHP. Don't ask to ask, just ask. Username auto complete is *tab, not enter. Chat Guidelines : guide.room11.org [php]*
Anonymous
@DaveRandom he already asked, was chasing I think
i ask on the top
pastebin is the code inside
Anonymous
@ChristopheCosta line 11, you've tried to use the array in a string
$dat_subcat_id
i need to change that to format array?
You need to use prepared statements
That can get a little complicated with IN() clauses
however I have thing somewhere, moment
15
A: How do I convert a dynamically constructed ext/mysql query to a PDO prepared statement?

DaveRandomMigrating your queries from ext/mysql to PDO prepared statements requires a new approach to a number of aspects. Here I will cover a couple of common tasks that regularly need to be performed. This by no means an exhaustive to match every possible situation, it is merely intended to demonstrate s...

See "Using an array to construct a value list for an IN (<value list>) clause"
mysqli makes that really god damn hard because of the stupid by-ref behaviour
(use PDO)
08:29
thanks
mysqli is not so much "mysql improved" as "mysql differently crappy"
08:41
mornin
morning
moarning
Anyone going for DDDX in London on Thursday?
09:20
> £650 + VAT
Er, nope.
In early birds it was 195 only :)
that's basically the entirety of my "official salary"
oh :/
I got refund from my company for tickets and flight in sort of bonus
then again ... I am not all that convinced that DDD is a practical option
at least, not at the scale that I operate at
well, there is much more work to be done
09:27
DDD is awesome even for smaller scale apps (DDD, not CQRS/ES)
green and red book are a good start (and not that expensive)
what's wrong with Evans' book?
whole exploration whirlpool and iterative meetings with domain experts, learning UL, involving developers to boring meetings and modeling
yeah, those are actually the parts, that I have not see anywhere in the wild
but then again, I am just a frog in a well
@tereško I got both Vernon's and from Evans but feeling lack of time to deeply study them
Wes
Wes
\o
09:32
o/
@Patrick I'd agree to parts of DDD
@tereško much better explanations and structure, foreword by evans in IDDD explains it well
@Gordon which parts not?
@Patrick all the parts adding complexity instead of tackling it
I think that covers most of the parts :D
@Gordon yeah I feel it often gets muddled together with overengineered stuff
the actual DDD parts are quite simple
aggregates, value objects, repositories etc
and bounded contexts ofc
Which is why I like the books by vernon, they start with the easy stuff and talk about the rest later and he explains that its optional and only makes sense in certain cases
09:35
I'm always confused when need to think which one is redbook and which one is bluebook because in Polish translation the colours are swapped :)
blue is evans. the "technical" book. red is vernon. the "business" book.
IDDD (red) contains everything you need to know about implementation
DDDD (green) is a nice overview and short book, can be read by managers and domain experts
It's easy to say
Thats Polish Evans
@tereško not related to DDD
09:37
And that is Vaughn Vernons in Polish translation
@Gordon vernons red book is very technical. the green one is the business book
@brzuchal just buy them in English ;)
I got both in Polish I was worried I won't understand their meaning because my English is not so advanced
fair enough. your english won't become more advanced if you read it in polish though
09:39
I hate non-English technical books. But maybe Polish ones are better than the German ones
They're quite good, but I don't know German ones, I can only present general info about myself in German
Everyone here uses English technical terms anyways, so I just get confused when they are translated to German
Fassadli, Fabrikli, Dekoratörli
09:43
aaa
swiss german :)
Factory, Decorator
Facade
All is clear to me, You can speak to me in German :)
TIL (the hard way) auto_increment value only stays in memory in mysql. If you restart it with an empty table, that value will be reset to 1 :/
@pmmaga UUID to the rescue ;)
@pmmaga The AUTO_INCREMENT value can be set at CREATE TABLE in mysql in one statement;
I'm trying to use UUID's where it's possible
09:45
@Patrick probably a good idea
may be an issue performance wise though
@pmmaga what are you doing that you have to optimize for insert performance?
Just looking at Jeeves' launcher.php, is it better to validate config settings as a pre-check process to eliminate those ternaries when setting up the aerys host?
Yes
Somebody just really loves ternaries
@Patrick adding jobs that should be processed ASAP. that table is part of a poorly implemented job queue
@pmmaga i doubt it would be a problem, but do some benchmarks if it worries you
10:05
@kelunik uh, which failure exactly?
@bwoebi That hanging due to onReadable not being triggered.
@kelunik you mean the hanging observed when running with uv and native?
I also got it hanging with the normal cli binary…
@bwoebi Me, too, but only with Xdebug and coverage.
I meant a clean binary without xdebug
@pmmaga using mysql as a job queue. Sounds like something stupid I would do :P
Although I have used postgres instead :-)
10:28
Interestingly, I can't seem to find a resource online (bar a few low voted / small answered SO questions) which explains what routing/dispatching is, and why it's beneficial
At least in the context of a web app.
Ah there's this one that's tucked away, guess I can use that.
Cannot find the canon for you... :-( Use !!canon list to list all supported canonicals.
Cannonball in place! I mean... canonical 'routing' was added successfully.
Where is @cspray these days, anyway?
1)Passing 1st parameter like this user.php?id=1 and 2) Passing 2nd parameter like this user.php?webname='Abhi' and I m unable to use this two parameter for clean URL Rewrite and the problem I m facing is whichever URL rewrite code i write first it is executed and not both here is URL Code for id RewriteRule ^user/(.*)$ user.php?id=$1 [L] and for webname RewriteRule ^user/(.*)$ user.php?webname=$1 [L]
Casing doesn't match webName -> webname
Also just use PHP for handling requests / urls
10:36
Here's a piece of general advice: don't use a RewriteRule more complex than RewriteRule .* index.php [QSA,L]
basically what @PeeHaa said
Route all requests to a single entry point script and dispatch based on $_SERVER['REQUEST_URI']
@PeeHaa yeah that was writing mistake and I could not understand what you mean about can I get any kinda of example based on my problem ?
55
Q: Redirect all to index.php htaccess

David EricssonMy apologies for the 10000000th question on this topic, but i just can't get it to work the way i want it. I'm writing a simple php mvc'ish framework. I want this framework to be able to be installed in any directory. What my php script does : Grabs the request uri and breaks it off into segmen...

@Sean did you decide about phpsc?
(you know it's going to be the last one, btw)
@DaveRandom And why it dont take both rule and only one whichever is written on top
Wes
Wes
10:41
mornin
@DaveRandom and [QSA,L] is used because ?
@AbhiBurk rtfm :-) (I linked it above)
@DaveRandom Not yet, I need to work out if I can afford it along with everything else that wants to take money away from me. I'll have a look tonight
@kelunik I know why.
@DaveRandom yeah thanks
10:42
seriously, stop trying to use mod_rewrite for routing, it's stupidly complicated and generally stupid
@bwoebi And why?
@AbhiBurk QSA will copy the query string from the original url to the new one. L tells the server to stop looking at rules and to use the resulting URL as the final result.
Also ^^^ this
@Sean be quick, now they announced it will be the last I suspect the tickets will sell out fast(er)
@DaveRandom It's ok I told people you were going so interest plummeted
10:44
@_DaveRandom It's ok I told people you were going so interest plummeted
Anonymous
I need to get my ticket too
get on it
@kelunik @Trowski #define FD_SETSIZE 1024 - one cannot use file descriptors of 1024 or greater within select(). And with uv, we happen to not clean up things properly and are leaking many circular references with uv callbacks (which go undetected as resources do not have get_gc). Thus every driver persists through the end of the tests, at which point our fds are around 1600, which is too high for select().
And that's why we also get the issue when creating a new socket pair, because these will have fd >= 1024
Does the set size also denote the highest id it will accept?? :-/
@DaveRandom yes.
because it's a bitset
10:49
oh OK
that's a shitty API but that at least is a logical limitation
at least on macOS
other implementations may differ (after all, it's hidden behind macros)
hi guys, can any tell me how to make a video live steam? My requirement is to create a new web application for a e-learning website. How can i do this?
Three priorities then I guess, PHPSC, SSD, Japan Expo
Followed by computer chair, computer carrier, and insomnia 61
Farewell dolla.
Anonymous
computer carrier?
Yeah, one of those trolley things that you slide under your tower and wheel it around
Lugging that massive lump of metal was painful on my arms, and left some nasty bruises
Anonymous
10:53
sounds like you need a laptop :P
@DaveRandom well, it's basically just yelling at you: "don't leak your fds!!!"
but it also explains why I couldn't run Aerys on native with more than a thousand concurrent clients
any doctrine experts around? stackoverflow.com/questions/43586191/… thanks in advance
@bwoebi is there any way we could modify the stream_select() impl to leverage saner APIs underneath?
(or expose epoll()/kqueue() to userland)
@DaveRandom that's basically what things like uv do, with a Windows layer.
It's probably reasonable to say that it's a limitation of the native drivers and if you want to support higher values you need an ext
It's an issue if it breaks tests though
is there any way to get tests to run in process-level isolation?
11:01
@DaveRandom it breaks tests because of limitations of uv
11:15
@bwoebi I'm lost
@DaveRandom we hold circular references to the loop within callbacks for watchers which again are also referenced inside the callbacks
and the cycle goes undetected there
@bwoebi And don't have more than 1024...
that too…
What's the recommended extension choice now when UV leaks and is still experimental and native doesn't support more than 1024 handles?
@kelunik uv.
11:28
What's with ev and event?
uv doesn't leak, except if you have multiple loop instances
And what do we do now?
probably: finally use objects instead of resources inside UV
How long will that take?
What do we do with NativeDriver? Can we issue a warning if one is close to the FD limit?
Wes
Wes
@NikiC how can i clone recursively a node?
11:40
@DaveRandom is your lxr intended for general people's use? Adam's lxr was mentioned on internals, and it would be a good point to announce yours if that was what you wanted.
@Danack sure, although the plan is to add some redundancy/load balancing
where's the internals thread of which you speak?>
@kelunik I'd \assert(1024 > (int)$stream); in stream watcher register
I haven't really been paying attention to it for months now
@bwoebi That's fine with me. How does it work on Windows?
@bwoebi I'd like to see that before 2.0.
11:51
@kelunik Windows uses the same POSIX select() API
@Danack sent a message, can you let me know if you get it, I've found sending as @php.net is flaky recently :-/
@DaveRandom What about receiving, you think it can happen that mails are not forwarded? (I mean, of course it can happen)
Well it's hard to know when you don't get stuff, obviously, but afaik it's working
just sent myself a mail from work account, will see if I get it
oh yeh got it pretty much instantly
that's going through 2 layers of forwarding as well I think
12:11
Funny question, what do you name a class that looks up user information from the database with functions like emailExists(), phoneExists(), getUserIDbyEmail()?
@CoderDudeTwodee Bob…or UserInformation… with the preference for Bob
@Gordon I think Bob looks better.
Wes
Wes
Geraldine
@CoderDudeTwodee I am sure @bwoebi will agree
hehe
12:19
I am gonna name it Rachel.
Name it @PeeHaa, and try to get it higher up in the Google rankings than him
@Peehaa is all over Github
That's not the only thing I am all over cc @Jimbo
Wes
Wes
ahahaha i saw that coming
@Wes you saw @PeeHaa coming? mmmmkay
12:25
stackoverflow.com/a/12410219/889949 <-- "To debug your IDE, use another instance of your IDE". OK, kinda inception-ish but whatever. Guess what happens when you do that? Both instances crash, but only after consuming every last byte of memory that it can and fucking the whole system for 10 minutes.
@Gordon We all saw @PeeHaa coming
eeeeew
Wes
Wes
@Gordon yeah thank you for the mental image :B
yw
!!urban Peehaa
12:30
:P
[ PeeHaa ] A cowboy shouting peeee haaa! while peeing and swinging a lasso.
s/peeing/coming
Anonymous
'lasso'
s/lasso/shoelaces
a shoelaces?
12:31
you heard.
dont urban it
[ it ] The word the Knights of Ni cannot hear or say.
1 message moved to Trash
Ah right. I had to default to 1 instead
@Gordon Does RegisteredUser work?
@CoderDudeTwodee How should I know? It's your code
Wes
Wes
12:35
@CoderDudeTwodee more like UserRepository/Mapper, but you should try working with aggregates rather than fetching small pieces of information. e.g. fetchUserByEmail rather than emailExists
Anonymous
!!wotd
synesthesia: a sensation produced in one modality when a stimulus is applied to another modality, as when the hearing of a certain sound induces the visualization of a certain color.
I always thought that sounded kinda fun, although I'm sure people who have will not agree
depends exactly what actually happens, of course
Anonymous
lol, sentence example
Anonymous
> Her first book, about synesthesia, titled Tasting the Universe, will be out in March 2011 from New Page Books.
12:39
!!dave
@DaveRandom should work on DNS lib.
Anonymous
helpful
ffs, yes I really will actually do that
Anonymous
!!peehaa
Sorry :-(
!!peehee do all my work for me
12:40
@PeeHaa should be pitied.
Well I disagree
!!dave
@DaveRandom should work on DNS lib.
!!poop-on daverandom
💩 on @DaveRandom
Anonymous
12:42
and you thought @Jeeves was useless @JoeWatkins, pfft.
@JayIsTooCommon I remember everything.
:)
@Wes Thanks!
@Wes Also I need to do some checking if an email already exists during registration, is having an emailExists() a bad idea?
@DaveRandom Hendrix had that
Anonymous
@realDonaldTrump when everyone at the party is talking politics and you don't know what to say https://t.co/2XcG7fOuwe
Wes
Wes
12:49
not too bad i suppose
@Gordon So did one of the famous german/austrian classical composers, I forget which one
Wes
Wes
guys, i'm traversing a class' methods using reflection, i want to get a method's original name if it comes from a trait. any idea how to do that?
Anonymous
Apr 13 at 14:51, by JayIsTooCommon
@Wes god, you're gross.
Wes
Wes
not as much as your mom :B
@Wes afaik, not possible
12:53
@Wes you're out of luck. traits don't know where they came from.
^
It just adds a ptr to the trait member into the class def itself
@kelunik I'll tell you once I'm able to estimate the time needed
the class doesn't have any actual reference to the trait
(that's sort of the point of traits)
BetterReflection might be able to do it
Wes
Wes
damn. /deletes everything for the tenth time
XY: what are you actually doing @wes?
Wes
Wes
too long to explain
i had a go at it and failed :X
@bwoebi I think an explicit if is better there, as it's probably only encountered on production.
it would break the model if in runtime you could tell (since then the trait would carry type info, breaking the concept that allows it to work). However, you could make an argument reflection isn't really runtime...
i tried abusing the prototype to carry that info.. it didn't go well :X
12:58
Dunno, I suspect if you did that then you would end up with people using traits as multiple inheritance with userland checks and then complaining it's slow

« first day (2382 days earlier)      last day (2791 days later) »