« first day (1587 days earlier)      last day (3358 days later) » 

@AAB Hardcoded credentials are never a good idea
 
Not just that: credentials are not part o the source in general
and shouldn't land in CVS
 
Also creating a db connection inside the class looks odd to me
 
well, somebody has to do it anyway, because that's a case where you want lazy initialization
 
AAB
@PeeHaa Hardcoded credentials u mean the host,dbanme in my code?
 
4:02 PM
Also making every member public is what nightmares are made of
 
@NikiC to solve this all we need is some kind of pointer to the last offset for argument (reallocation can be done in ZEND_SEND_UNPACK) so that ZEND_SEND_VA* would use it to compute where their zval is stored in the stack... Basically we need to add one uint32_t to zend_execute_data structure, do you think it will degrade performance significantly?
 
@Ocramius I thought it was a constructor
 
AAB
@Ocramius PDO?
 
@AAB Yes
 
AAB
4:04 PM
@Ocramius I am using PDO in my current code..
 
@salathe Seems legit
 
AAB
@PeeHaa and username password should be private.
 
I love how that uksort thing is still available @salathe
@AAB ?
 
@PeeHaa :)
 
AAB
u said everything private is a nightmare
 
4:05 PM
No that is not what I said
 
AAB
oops public
:P
 
Everything should be private or at least protected imo
$dbHandler->con = 'poo';
WHat happens when you do that ^ ? :)
 
@AAB yes, the question is "why a wrapper?"
 
AAB
@PeeHaa The con object is lost
 
Morning! Busy week for me; first engaged, and now my birthday :-P
 
4:07 PM
Congratulations @DanLugg ! On your engagement :)
21
 
I tihnk yuo msitped sthmong @AAB
 
Also congrats on surviving another year.
 
@DanLugg Gratz man!
 
@NikiC Would be nice. Appending args to an args array is my main use case for cufa() today…
 
AAB
@Ocramius well using transaction for each insert seemed repetitive
 
4:09 PM
@AAB You don't need a transaction for every query...
 
AAB
@PeeHaa ok
 
Also you don't always have to prepare
 
AAB
prepare statements for insert/update/delete is not good?
 
Not if there is no dynamic data
 
Hello, any reason why the file_exists( ) function is not finding a file which has a space in its name ?
 
4:11 PM
Which apperantlycan be the case:
if($args==null){
 
AAB
@PeeHaa @Ocramius My app has many forms so I have to write a lot of insert and select queries
 
Now that I took a better look at your code @AAB why are you starting transactions to begin with?
 
this for example "BJNA - Copy (3).sql"
 
It's only a single query you run in there
It either succeeds or fails
 
AAB
ok so If I have many rows to be inserted but I make it into a single query
as in INSERT INTO TABLE(cols) (?,?),(?,?),(?,?)
so the above statement will be considered as one too
?
@PeeHaa
 
4:15 PM
To be honest. No idea
 
AAB
449
Q: Inserting multiple rows in a single SQL query?

ritsI have multiple set of data to insert at once, say 4 rows. My table has three columns: Person, Id and Office. INSERT INTO MyTable VALUES ("John", 123, "Lloyds Office"); INSERT INTO MyTable VALUES ("Jane", 124, "Lloyds Office"); INSERT INTO MyTable VALUES ("Billy", 125, "London Office"); INSERT I...

^^^^
Multiple rows insert in a query so its a single statement too then?
 
1 min ago, by PeeHaa
To be honest. No idea
 
AAB
@PeeHaa Just one more thing
 
Don't think so now that I think about it
 
AAB
my app needs plenty of insert and select so any library that has say a function
insert(table,cols,vals) <-any thing in this format
for multi row insert
 
4:18 PM
Imho you are trying to abstract the wrong thing
 
@PeeHaa so many requests to my site requestable.pieterhordijk.com/recent :-D
 
hehehhee
Popular css file is popular :P
 
AAB
the prepare would be prepare("INSERT INTO TABLE(cols) (?,?),(?,?),(?,?)") wont this be a single thing
if so then using transaction is not required like u said..
@PeeHaa so do I write functions for insert select delete for my app on my own or use some library?
 
Neither. Just write a freaking query when you need it :P
The only reason I would ever abstract it away is when I would need to support different dbms'
Also what kind of thing are you working on that you need to do multiple inserts that much anyway?
 
@AAB doctrine dbal has functions for insert($table, $columns), update($table, $columns, $where) and delete, see github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/…
 
4:23 PM
@beberlei It would be odd if a dbal didn't have those ;-)
 
@NikiC I measured it and it seems like there's no difference... I'll try to implement mid-argument list unpack and propose it/RFC (not sure it's needed in this case)... There are functions like array_intersect_ukey that cannot be used with unpack currently (sadly)
 
AAB
@PeeHaa Its to add details from an excel sheet to the database
@beberlei I will look into it.
@PeeHaa So my summary
 
it feels like Lester is repeating himself a lot
 
@AAB Sounds legit
 
I see "database" and "64 bits" a lot in his mails
 
4:26 PM
i still havent understand his problem
 
You might want to look into LOAD DATA LOCAL INFILE is an alternative though, but I'm not sure whether that is sane @AAB
 
databases return ids as string, 32 vs 64 bit doesnt matter, and usually you don't need the id to be integer for calculation or something
 
@FlorianMargaine that's because he repeats it on all topics, specially the unrelated ones.
 
@beberlei But but but BIGINT!!!1111eleven :)
 
AAB
@PeeHaa can u tell more about it?
 
4:28 PM
People who repeat themselves are usually drunk or senile or drunk.
 
AAB
Thanks
 
Um, so, maybe old news, but 3v4l.com ? Apparently my birthday has rendered me senile.
 
@DanLugg what about it?
 
Is it a common thing for system administrators to disallow connection to a website via IP, only via domain?
 
4:29 PM
@DanLugg 3v4l.org
 
Derp ^^ Thanks :-P
 
@jskidd3 Or at the very least prevent directory listing
 
Dunno why .com was in my history
 
AAB
@PeeHaa Some People suggested that if i use stored procedure in the database its faster easier too maintain and the code looks cleaner..
 
@PeeHaa What risk does it pose to allow connection to a site via its IP address?
 
4:30 PM
@DanLugg today?
 
@ircmaxell Yessir!
23 mins ago, by Dan Lugg
Morning! Busy week for me; first engaged, and now my birthday :-P
 
HAPPY BIRTHDAY @DanLugg
4
 
@danlugg Happy bday
 
@jskidd3 No more risk than serving your pornsite instead of your legimate business site because the vhost is loaded first
 
user895378
@DanLugg Happy birthday dude!
 
4:31 PM
Thanks @ircmaxell @jskidd3 @rdlowrey
Craziness goin on for me lately :-D
 
@PeeHaa Lol, I don't get why people do it
 
user895378
Just posted my RFC draft for Generator Return Expressions. Feedback requested. /cc @NikiC
 
3v4l.org/qHMat <-- hmmm, issue with php7?
 
hello, does any one know how to convert excel time formate to php time format
i extracted the time from excel to database it is like 0.323232
?
 
?
 
4:38 PM
@DanLugg Did you do it near your birthday to make the date easier to remember?
 
....
 
@Fabor lol, it's pretty easy; it was a Friday the 13th :-P
 
heh
She see it coming?
 
Well, we were planning the wedding, so... yes? lol
 
@FaizRasool How about reading the documentation for the library you're using? .....and if you still can't figure out from that, ask a question which includes the name of the library and a small snippet of code that you think should work.
 
I hate wikitext
 
this what i found about excel time
i have like more than 100,000 records so i' m using github.com/box/spout
 
@DanLugg Quick turnaround I spent about 4 years engaged
 
@Fabor Yea, we're not going to do that :-P we're ... fast people? We met ~2 months ago
 
see another one how 0.25 is £0.13
 
4:42 PM
@DanLugg The minute man. :P
 
Hahahahaha
 
@Fabor I spent 6 months engaged.... I was with her for 4 years before that though
 
I eat fast. I run fast. I talk fast.
 
Sort of reverse for me @FlorianMargaine 11 months then engaged. then a few years later married.
 
@DanLugg I just hope for your to-be wife that you don't do everything fast.
 
4:43 PM
@FlorianMargaine No, just a lot :-P
 
does any one knows about how the 0.25 in excel equal to £0.25
 
morninggos
 
user895378
@ircmaxell Minor typo:
 
user895378
> Re-using namespaces to effect affect runtime is weird
 
4:48 PM
fixed
 
Thanks for taking up the RFC
 
Just out of interest, you can redirect to a GET resource after performing a DELETE request, right?
 
Hi Guys, just a technique question ! I have an ajax script that look for some operations status every 1 secondes, but I want it to halt on error has the php script will stop working either... My problem is that my php use die('reason') but I can't figure out how to retrieve the reason with the javascript... i'm using jQuery.post and i've already tried .fail has sugested in doc but it's not working... anybody have and better technique / idea ?
 
@ircmaxell awesome thanks
 
4:57 PM
@JonathanLafleur you should not use die on the back-end. Instead you should use the HTTP codes to denote that the request was not with status 200 OK
 
@ziGi wich status could I send back that will deliver the reason too ?
 
@JonathanLafleur in AJAX there are two callbacks that you can give to the post function as attributes one is for success, the other for failure so basically
 
what? die(mysql_error()) is not the universally correct way to quit a request?
 
@JonathanLafleur This is what exceptions are for. Instead of dying, throw a custom Exception and catch it at the top level. And then give a proper error response that your Ajax handler can understand.
 
4:59 PM
@JonathanLafleur what is the reason you want to send, it might be different reasons for example you can have problems with the DB, the other is that the business logic does not permit such operation to be done
 
@ziGi I understand that part, that's why I'm searching how to reach the failure ;)
 
Danack is really correct in what he's saying
 
@ziGi there's folder creation failure, path failure, filename failure, compile failure etc..
 
ok
that is handled failure, since you know on the back end when this happens
 
can any one can write forumla for this
The integer portion of the number, tttttt, represents the fractional portion of a 24 hour day. For example, 6:00 AM is stored as 0.25, or 25% of a 24 hour day. Similarly, 6PM is stored at 0.75, or 75% percent of a 24 hour day.
i'm sorry been dumb at this point
 
5:01 PM
Tell me how you handle successful replays to the AJAX post
 
@ziGi with echo
 
posted on February 19, 2015 by kbironneau

/* by daMax */

 
that is ok, but I guess you return JSON objects right?
 
damn gtg already noon, be back after lunch I have an apointment
 
@JonathanLafleur Each of these could be a separate exception (or just a generic YourLibraryException with a different message for each one) - but yes, exceptions are the way of communicating that something went wrong from a deep application layer to the top one.
 
5:02 PM
I return a logfile
I'll try exceptions thank you guys !
 
@Danack additionally you can do logging if you have exceptions caused by DB failures etc. so you know that something is wrong and show generic message to the user
 
Yes. So long as you know what you're doing
That article does have a single serious error in it, but the rest is correct imo.
 
@rdlowrey looks okay
 
user895378
@NikiC So you don't mind working on the patch for that if I announce it on the list later today?
 
@DaveRandom is a catchall to a different domain "normal"?
 
5:08 PM
@rdlowrey yeah. maybe I should just implement a patch right away
to make sure everything works
 
And commit it while no-one is watching.
 
user895378
@NikiC Okay, I'll hold off sending anything to the list until I hear from you.
 
@PeeHaa Meaning catchall forwarder for domain-a.com forwards all messages to mailbox@domain-b.com, or <address>@domain-a.com is fowarded to <address>@domain-b.com?
 
user895378
@Danack The key is coordinated commit activity. You need someone else to run interference.
 
Both are usually supported by most platforms
 
user895378
5:09 PM
So you commit your thing at like 3am. Meanwhile you have some PRs you want to merge immediately before and after your commit and you then have someone else push distractions like .phpt test updates ;)
 
@rdlowrey Yeah - we need a few people doing many merges and then sneak a small commit in between :)
 
user895378
Exactly!
 
@DaveRandom yeah that first thing
 
@LeviMorrison debugging a production system, or perhaps staging environment, you can switch between 0 and 1 without cache regeneration ...
 
@PeeHaa Oh right, well yeh I've done that loads of times (it's how all my domains work, forwarding everything on to gmail)
 
5:11 PM
@Danack I know some people who are developing in Java even use aspect oriented programming to add an additional wrapper level of final exception checking and logging, which I find a bit hacky but he says that it helps a lot with notifications about foul code that hasn't been caught because of improper code logic.
 
@rdlowrey We may want to forbid by-reference returns from generators
 
It's down to the host though, not every platform supports it and not every package comes with the feature
 
@NikiC why?
 
user895378
@NikiC I have no problems with that. If you think it's a good idea I'm happy to add it to the RFC.
 
@bwoebi It's useless feature and pita to implement
 
5:13 PM
@DaveRandom Cock. Zimbra doesn't seem to support it
 
@NikiC It's not more useless than by-ref on normal funcs/methods.
@NikiC and sure it's a PITA with php 7?
 
@bwoebi Of course it is. by-ref return is only useful for __get etc and this is not relevant for gens
 
user895378
I can imagine scenarios where people return things by-ref and then they're never ever freed and you create pernicious memory leaks in long-running applications.
 
@PeeHaa I imagine there are 3rd party services to do it that you could point the MX to (never looked though)
 
@rdlowrey Why on the earth one should return something by-ref besides objects that are reference types by default?
 
user895378
5:16 PM
They shouldn't :)
 
@NikiC I'm not sure, but is it really a PITA?
 
@NikiC and that's really just a workaround of using arrays instead of objects
 
@bwoebi yes. because getReturn will need to return by-ref or by-val depending on the generator
 
@ircmaxell It's frivolous, but you could mention that use strict; currently is used for critical functionality that would be seriously broken as an argument against it ;)
 
oh hai @Andrea
evening all
 
5:18 PM
@JoeWatkins hi ^^
 
@Andrea :-)
 
@NikiC you can always return by ref… but once it's a refcount == 1 (equal to by-val) and once it's a refcount > 1. (by-ref)
 
I'd actually like to patch HHVM to fix that issue with it, but I don't have the patience to build it...
 
ahah that easter egg is just funny
 
@NikiC But maybe… first do the patch, then we can look at how easy it is to add it?
 
5:23 PM
@bwoebi if we always return ref you could use the retval in ref context irregardless of whether it returned a ref
@bwoebi Just look at the crap we do for closure __invoke
I am not willing to do a memory allocation to support someones crap reference code
 
mhm… well… just first do the simple patch, then I can see myself if it's a PITA, okay?
 
/s/irregardless/regardless/
 
user895378
@NikiC Should you find the generator return patch straightforward, consider this my advance offer to also write up an RFC for yield from should it be possible to implement it sanely/quickly for 7.0 ;)
 
@Andrea I'll point fred at it, he likes jokes
 
@bwoebi I am against this in principle, for the record
 
5:28 PM
@NikiC not sure which crap… (master) I just see a simple zend_call_user_func
 
That's why he works with PHP.
*rimshot*
 
news.php.net/php.internals/83228 <-- I don't know how else to say it...
 
@bwoebi We allocate a temporary function with the correct return-by-reference-ness
 
internals is alive, with the sound of Anthony and Zeev arguing ... it's almost nostalgic :D
 
@Sara yay!
 
5:28 PM
@Sara I will write an apology email shortly (after this meeting). Thanks for clarifying
It was mostly Francois's mail that set me off (the private and the public one)
 
@ircmaxell I'm sorry to have put you in that spot by misrepresenting zeev's involvement
 
@NikiC where?
 
@Sara I'm sorry to have put you in the spot as well
 
@Andrea hah, oh well
 
5:30 PM
though, for the record, I'm glad what was said was said, because I do know of other instances of that happening (people have contacted me on the side). It's just not my place to say anything. The only reason I said it in your case was because you said it in a public chat room...
 
@ircmaxell I woke up to DMs from Ze'ev asking what he'd said
 
@ircmaxell I would not be surprised to hear of instances like it, yeah.
@Andrea I think fred might have been trying to pull you into hhvm dev with that
@Andrea We'd all quite like your intelligence and energy
@Andrea But I know you like... a student and stuff.... "studying"...
We do internships...
 
heh
 
@NikiC hmm… not sure. I'd need to play with your patch later to see if there's an easy way or not…
@Sara why are you always putting an apostrophe in the middle of Zeevs name? :o
 
5:34 PM
@bwoebi Because that's how he spells it.
 
@Sara oh okay
 
is it really ...
 
It gets anglicized all over the place though, so it usually looks like Zeev
 
that's how it is on twitter ...
 
user895378
You know, like B'laké
 
user895378
5:35 PM
obscure comedic reference is obscure.
 
@zeevs Random question unrealted to RFCs. Is it "Zeev" or "Ze'ev"? I've been writing the latter for years, am I insane?
 
ah good, research ...
 
I'm kinda hoping it turns out to be Z'e'e'v
 
what do you think ' is replacing ? moar e ?
 
"\u{921fd}Z\u{e1810}'\u{e1810}v"
 
5:39 PM
hehe
 
A glottal stop.
AIUI, it's more like zev, then zeev in pronunciation
 
@SaraMG I got used to writing it as Zeev, to avoid SQL injections I guess back in the 90′s :)
3
brilliant ...
 
Haha :-)
 
That seems to mean I'm right.
Woot
 
user895378
@JoeWatkins I don't understand why assert (false, "..."); is better than throw new Exception('...'); ... can you explain the logic?
 
5:41 PM
@JoeWatkins :D
 
it does, 1 internet point for @Sara
 
@JoeWatkins ahahahaha
 
@rdlowrey It's about skipping checks in production envs
 
@rdlowrey it's optimized away in prod
 
The irony being that Zeev, as one of PHP's "co-architects", is possibly responsible for the problems he had ;)
 
user895378
5:42 PM
Ah I see.
 
@rdlowrey what those guys said ...
 
user895378
Ping avalanche.
 
stackoverflow.com/questions/28613043/… the files should be shown in the web browser in a custom way with some functionalitys
 
I've no idea how that is made into two syllables ...
 
people, use IPA to describe pronunciations
English has very... loose spelling.
[zeʔev] is how Ze'ev/Zeev is pronounced
/ʔ/ (dotless question mark) is a glottal stop
/z/ and /v/ are what you think they are
/e/ is the "ea" in "great"/"slate"/"hate" without the "y" at the end
 
5:45 PM
@Andrea You need to know it in order to use it ^^
 
@NikiC it should be taught in schools, it's really easy to pick up and an invaluable tool
 
yeah ... I remember everything
I was taught at school ...
I don't think we are though, are we ?
 
No, it'd be great if it was though
It'd be useful for teaching English spelling, at the very least
 
@Andrea But is it (invaluable)?
 
Also useful for teaching foreign language pronunciations (French, German, whatever)
 
5:47 PM
we learned this in school, however in class 6 or so, when you normally dont care about anything school related
 
@NikiC Yes, because it's the only way to unambiguously write down a pronunciation
 
@Andrea Which is something I need all the time ... ?
 
It comes in handy sometimes. :p
 
I mean, I totally get that it's useful for you, but for most people
 
@NikiC no, but nor is the difference between igneous and non igneous rocks ...
 
5:49 PM
Useful if only to teach English and second-language spelling.
 
I learnt Latin - which means I can understand my school's song. Who needs to be able to pronounce modern languages?
 
user895378
I don't know why we don't just spell everything using the PGP word list.
 
And again, it annoys me that some people are putting line breaks in their mails at 80 (?) chars on internals :-(
 
@rdlowrey What should getReturn() do if an exception was thrown?
 
@bwoebi some people quote without breaks yet use breaks in their own writing...
 
5:51 PM
@JoeWatkins I have no idea what an igneous rock is. But I get your point ^^
 
user895378
@NikiC Hmm ... my first inclination is null there because the generator is no longer valid but there was no return ...
 
user895378
I'm not sure.
 
user895378
Then again, if you call Generator::getReturn() after it has already thrown that's probably a logic error.
 
It's mainly annoying… a small wall of text and then 80%+ of the screen white :s
 
@Andrea My keyboard doesn't have a ʔ key :p
 
5:52 PM
@Sara nobody's does
 
But anyway, I must off to work
 
@bwoebi 80, or 76? If they're breaking at 80, they're doing oldschool pedantic linebreaks wrong.
 
@NikiC I'd say throw the exception. Nothing was returned, so…
 
user895378
@NikiC I think throw again in that case. Any time a return; statement was either (1) not present or (2) not reached it should throw.
 
@Charles no idea, I didn't count…
 
5:54 PM
@rdlowrey I am agree
 
user895378
Actually, are we sure it should throw if no return was there?
 
can anyone say it any differently to Stas so he gets what I'm talking about static analysis?
 
@rdlowrey a return is always present ^^
 
user895378
Okay, so we're on the same page.
 
@ircmaxell No, I don't talk to Stas
He twists words too much.
 
5:55 PM
@rdlowrey yup, imply a return null.
 
user895378
will update the draft to state that explicitly ...
 
@Sara btw, do you have objections to allowing return in generators?
 
:-/
 
@bwoebi Oh, stupid thing
Our argument was for nothing
I forgot that we already use & with generators to specify by-reference yield...
so we literally can't return by-ref
 
@NikiC Uh… I'd now imply that we should mirror yield behavior to return, intuitively.
 
6:06 PM
return &$foo
:-P
 
42 mins ago, by rdlowrey
@NikiC Should you find the generator return patch straightforward, consider this my advance offer to also write up an RFC for yield from should it be possible to implement it sanely/quickly for 7.0 ;)
@NikiC ^
 
@bwoebi yeah, let me finish this patch first :D
 
user895378
lol
 
You're already working on it?
 
then we can see how hard that would be. I'd go for the yield* syntax btw. reserved keywords and stuff
@bwoebi working on what?
 
6:09 PM
@NikiC on the return thing
 
user895378
The thing I love about @bwoebi is ... his capacity for patience has actually improved tremendously from what it once was.
 
user895378
(as far as I can tell)
 
@bwoebi Yeah, it's already done. I just haven't tested it yet. So I'm still at that moment where I can pretend that it actually works :D
 
uh, so fast? :o
 
@rdlowrey My capacity for patience has continuously decreased :/
 
user895378
6:10 PM
php can have that effect, I think.
 
No, @rdlowrey has this effect.
He's bringing updates so slowly… I can't do anything but be patient :x
 
user895378
Yes, if you have to wait on me to finish things ... well you end up doing a lot of waiting.
 
hehe ;-)
 
@rdlowrey Quality takes time :)
 
user895378
It totally does.
 
user895378
6:17 PM
You can't rush art ;)
 
user895378
 
user895378
You rush a miracle man you get rotten miracles
 
Heh, writing tests always takes so much longer than implementing stuff ...
 
@rdlowrey yes, I do not even plan to be able to include a working session middleware. ^^
 
@NikiC because you have to fix all those bugs the tests uncover
 
6:23 PM
@ircmaxell bugs? I don't make bugs :P
 
/me forgot, the wunderkid makes features that only a mere mortal could call a bug :-P
:-P
 
@NikiC Just some extra features :P
 
@kelunik Exactly!
Extra features ... like segfaults :)
 
user image
10
 
@NikiC Marketing would prefer it if you would call it dynamic halting.
 
6:31 PM
@kelunik give things time… he has time until php 7.0 release :-P
 
/me hates translation English resources to Georgian
 
6:53 PM
@Danack I don't think we should do that; it may have conflicts with the under-discussion RFC for "static halting".
 
Nah it's fine. Static halting is when your code won't run at all...
 
@ircmaxell :)
 

« first day (1587 days earlier)      last day (3358 days later) »