« first day (1491 days earlier)      last day (3475 days later) » 

4:08 PM
Patience, it's a Saturday.
 
it depends on the saturdays
some are very lively
 
Usually not in a good way.
 
well, "lively" usually isn't in a good way on internals tbh
it's either calm and valid discussions
or "lively"... circlejerks? Not sure it's the correct term
let's just say "debates".
 
4:41 PM
Ugh
Should to_int("+10") be allowed? Because I think it shouldn't, but now /r/lolphp is mocking me and they've vote brigaded the /r/PHP thread...
 
4:53 PM
@AndreaFaulds why do you think that casting back to a string and getting the same result is important?
 
@AndreaFaulds is reddit really a place to look for feedback on a RFC? Ignore the trolls, everyone appreciated work being done, anyone who has a real, non troll opinion could just give you some feedback on the rfc in a real constructive fashion and not on some lame ass site =]
 
5:03 PM
@Danack I don't, really. I decided to make it do that because it provided a simple definition of lossless.
I wonder if it might actually be better to allow whitespace and signs and so on. It'd make it more practical and perhaps intuitive.
It's not like (int) allowing whitespace is a problem. It's (int) allowing trailing characters, strings and floats out of range, etc. that's a problem.
 
I think I agree on the characters but I guess not allowing whitespace would still be correct, as it's trivial to remove that, if the user wants to allow whitespace - but it's not trivial to remove the others.
 
It's trivial to remove a plus sign too, though.
 
trim() vs ` if(substr($x, 0, 1) === '+') {$x = substr($x, 1);}`
 
@Danack ltrim($x, '+')
 
@AndreaFaulds you should like this
feedback appreciated wrt config.m4 though, I think I did that wrong
and I'll wait for the feedback on the ML wrt sapi/main
 
5:16 PM
@FlorianMargaine I do like it, but you probably shouldn't use relative includes
 
@AndreaFaulds yeah, dunno how to fix it though
 
#include "main/foo.h" is better than #include "../../main/foo.h"
 
help appreciated
it works?
 
Yeah, we do this all the time
 
is it because it's run with -Isapi/?
 
5:17 PM
Oh, uh
 
cool. In the config.m4, I also use relative paths
 
I mean #include "sapi/main/foo.h" then
since there's an -I/ in there somewhere, I think.
@FlorianMargaine Yeah, not sure about the .m4
 
@AndreaFaulds If someone did care about whitespace/other characters, wouldn't it be easy to do the "is the result of to_int as a string the same as the input" in userland? And they could also customise which bits they care about.
 
@AndreaFaulds compiling... header change means ./vcsclean et al though, need some time
 
@FlorianMargaine Changing the #include path to be non-relative doesn't need a clean, though.
 
5:20 PM
I'm not sure about that :P
 
@Danack True.
 
the headers system in C is so complicated that it could... better safe than sorry
I really need to read a clear explanation of how it works tbh :/
I can "hack around" with it... but it feels... hm, not good
alright, fixed the relative include paths.
@JoeWatkins feedback? Especially wrt config.m4, I recall that you know your way around them...
also... isn't fmargaine@php.net supposed to be an alias for my email? (it's not...)
 
@NikiC A mere 3 hours later, I think of a better retort:
$x = "10.0";

if (try_to_int(try_to_float($x)) != try_to_int($x)) {
    //The wtf factor is high
}
 
@FlorianMargaine goto master.php.net and search your settings there
@Danack yeah, 4 wtfs/sec
 
5:35 PM
@bwoebi you mean people.php.net? master redirects to php.net
 
@Danack That's something that's bothered me too
 
@FlorianMargaine /login.php
 
I wonder if we need, like, try_to_numeric
 
does this setting mean it's not an alias?
and is instead a full blown email account?
 
5:37 PM
@AndreaFaulds Not sure how that would help in this scenario - to be clear I was meaning that (float)10.0 can be cast to int but (string)"10.0" can't be, is not obviously correct to me at least.
 
@Danack I rationalised that because 10.0 isn't how that float is represented if you var_dump it. It comes out as just float(10)
And allowing any decimal points at all seems weird
@FlorianMargaine No, we just forward it. If you turn it off... I'm not sure what happens, actually.
 
@AndreaFaulds hm... so it should be an alias right now, right?
 
@FlorianMargaine If you're florianm or something, then emails sent to florianm@php.net will be forwarded to the email address you have on file
 
well, it doesn't
it's fmargaine@php.net
(i've looked in my spam folder, yes)
 
Weird :/
Maybe that checkbox does make there be an actual account. Lemme check what setting I have.
 
5:41 PM
thanks for taking your time.
 
I have that checked.
I just emailed ajf@php.net and I received the email I sent to myself at my actual address (ajf@ajf.me).
 
damn.
I just emailed too... didn't get any mail
 
Lemme try emailing you.
 
who should I send a mail to if that doesn't work?
wut
I got your mail :|
 
lol
 
5:43 PM
OK, it's working then.
 
... why can't I send a mail to myself then? :|
 
Try again? Make sure you spelled it right?
 
oh well
if it works for you...
checking if it works from my wife's account
 
@FlorianMargaine when you send to yourself gmail does weird things...
 
@FlorianMargaine Looks like you successfully emailed yourself?
 
5:52 PM
@AndreaFaulds no, it's from my sent mails
 
@bwoebi Gmail will thread it, yes.
@FlorianMargaine Oh. Are you sure? Isn't that your Inbox?
 
@AndreaFaulds absolutely certain
anyway, just tested from my wife's mail, it works
so gmail does weird things
 
^^
 
I don't use Gmail ;)
 
gotta go
cya
 
5:53 PM
You know, argh, I'm not sure what the future of typing in PHP is.
 
@AndreaFaulds well, everything but really strict typing.
 
Python's model works well: strong typing (no implicit conversions), but dynamic
C, C# etc. have strong, static typing, that works well
Perl has weak dynamic typing
 
PHPs model works well too…
 
PHP has this weird weak dynamic/strict dynamic fusion
 
People just always search issues where none are.
 
5:56 PM
@bwoebi PHPs model works well once you start treating everything strictly...
Basically PHPs model works well if you don't use it.
2
 
err what?
 
@NikiC Exactly my thoughts
I wonder if I shouldn't quit PHP development and make my own language. Or work on SpiderMonkey and V8 or something.
 
We have enough general-purpose languages…
 
Sure, but toy languages are fun, and there's always room for experimentation.
@bwoebi I wish these issues were non-existent.
 
I still don't get the issue with PHPs typesystem. All what we want is checks so that we don't get errors and warnings when calling the method and function.
 
6:02 PM
PHP's types are perfectly fine, it's the implicit conversions between them that are the problem
 
@bwoebi You mean you don't get how things like sha1(str1) == sha1(str2) are very very horrible?
 
The idea, on paper, is that PHP automagically converts types for you
In theory, you never have to worry about converting types
 
@NikiC that's another issue. That's comparison with equal types which is fucked up...
 
The idea, on paper, is that PHP automagically converts types for you. In theory, you never have to worry about converting types. In practise Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn dear god help me I tried to compare two strings and it told me they were equal when they weren't HELP ME ZALGO COMES AAAAAAAAAAAAA
 
@AndreaFaulds First thought: bobince
And I fully agree that types shouldn't be casted when having equal types…
 
6:06 PM
@bwoebi No, but they should be casted for the whole thing to be consistent.
 
haha, stop trolling me xD
 
If 1 and "1.0" are equal, and "1" and 1.0 are equal, then "1" and `"1.0" should be for consistency
But this causes SO MANY PROBLEMS
PHP's typing model is fundamentally broken
 
@AndreaFaulds for equal types it always should be like ===, no matter what.
 
@bwoebi But that leads to inconsistency, that's the problem. That breaks transitive comparison.
I'm seriously tempted to ragequit PHP development, I'm ultimately wasting my time here. I don't really like PHP.
 
s/rage//
 
6:12 PM
:p
 
feel free to quit (if you really don't want), but don't ragequit
 
Oh no, the only rage shall be on room 11 :p
 
ahahaha
 
Hey @NikiC... why do you try? What makes you keep going?
 
Word
So, the internet is so crap down here...
 
6:19 PM
@ircmaxell Where did you pop up from all of a sudden? :p
 
In trelew airport waiting on a plane
 
Have you read the chat up to now?
 
A little bit
Hard problems are no reason to quit. Dumb ones are. Figure out a solution, is def not trivial...
But that's the fun, right? Finding a problem we have no idea how to solve, and finding a workable solution...
 
I'm not sure it's a problem that can be solved. It's a fundamental issue with PHP.
 
Every problem has a solution. It just may not be one we like ;-)
 
6:31 PM
Casting functions and strict hints aren't the way forward, they fit a completely different typing model into the language, that's bad.
That scalar type hinting RFC might have been the way forward, but... argh. I don't know any more.
 
That's why we pay you the big bucks... To solve problems like this...
 
I wish I was paid for this :p
Hmm, well.
 
:-P
 
Any `Jekyll` guys here?
http://stackoverflow.com/questions/26949281/jekyl-getting-the-related-posts
 
If I stick around I stand a small change of finishing bigints and getting them in. And then one more language, at least, has sane integer handling. And that'd make me happy.
I don't really know why, but for some reason I particularly care about how languages handle integers. I think it's one of C's worst legacies.
Yes, not checking for overflow is slightly faster on most conventional processors. That doesn't mean you shouldn't do it.
Even if bigints don't get in, the prerequisite RFCs will still have made PHP be slightly better here.
 
6:42 PM
Hello.
 
@ShowTime Hi.
 
Little question about prepared statements. Should you:
bind_param -> execute -> bind_result -> fetch -> store_result (if I want to use num_rows after fetching) OR should you do it in the following order:
bind_param -> execute -> bind_result -> store_result -> fetch
Php docs made me really confuse.
 
@ShowTime No, you should use pdo
 
I can't just switch an entire project to PDO, started it with MySQLi so will have to stick with it.
 
I'm sorry for you :p
 
6:45 PM
@PeeHaa Why PDO vs MySQLi?
(I've never used MySQLi :p)
 
@AndreaFaulds Because mysqli has a horrible horrible api
no named params
no automagical binding
 
It's only the where in (?, ?, ?) bit that is horrible.
 
Danack, what do you mean ?
 
@Danack I disagree
Any serious query becomes a pain to maintain imo
 
@PeeHaa, name me one thing about PDO that would make me switch from MySQLi in the future ? Nobody has brought this issue up with me before.
 
6:48 PM
@ShowTime I just named two
 
@ShowTime PDO has a way of binding multiple params at once (or something) that makes doing queries that use a where in select with multiple values be a lot nicer than doing it in MySQLi.
 
By 'no named params' you mean you don't have to do the bind_param("ssi", ...) part ?
like you don't have to specify what type of variable you'll be using ?
 
@ShowTime that is one part of the horrific api yeah
but named param means I can do SELECT foo FROM bar WHERE id = :id instead of SELECT foo FROM bar WHERE id = ?
And simply (in most cases) execute it like:
$stmt->execute([
    'id' => 1,
]);
Which is sooooooo much nicer
But I see rewriting any serious application is not what one would want though ;)
 
^ Exactly.
So ugh, could you answer the question above please ? ^^
 
Nope. That would involve me looking up the manual pages because I mostly don't use mysqli. So I suggest you do what I would have done otherwise (looking at the manual pages)
 
6:53 PM
Yup, which is what I did.
I was actually thinking you know the answer (implying you also worked with MySQLi)
 
@ShowTime If you looked at the manual pages I don't see the question, because I am fairly certain the answer is in there?
There should be example code?
 
Nor the store_result nor the fetch pages don't contain an example that puts them both in one single program.
However, the store_result mentions 'while it is not highly advised to always use, using it won't cause any performance decrease'
 
Maybe @AndreaFaulds has something useful to say considering she apparently uses it?
 
@PeeHaa Uses what?
 
MySQLi
 
6:57 PM
mysqli?
Ow wait. Misread :P
sorry :-)
 
@PeeHaa You didn't misread, I made a mistake and quickly edited it, but you didn't notice the edit ^^
 
oh I see. /blame @AndreaFaulds
 
Nobody here used MySQLi >_>
/mood sad
 
@ShowTime Well I can help you nonetheless
Try out both versions and check out the result :)
 
They both work but I'm trying not to affect the performance of the program
 
7:01 PM
@ShowTime I don't think either way would be worse / better in terms of performance
 
6
Q: What's the difference between the mysqli functions bind_result, store_result and fetch?

CeleritasI'm running into problems knowing when and what to call after mysqli_stmt_execute How do you know when to call mysqli_stmt_bind_result mysqli_stmt_store_result mysqli_stmt_fetch

Figured out deceze's answer is the best, which makes me therefore think it should be: store_result and fetch afterwards.
 
@ShowTime Both answerers know what they are talking about in general ;)
 
Yea, tho' the one I mentioned made it more explicit.
 
/r/lolphp is causing me grief
 
php stops grieving you when you go with the strict types everything. That means type-hint classes and cast scalars when possible or throw InvalidArgumentException.
In fact, it becomes really powerful then. ^
 
@Leri so:
2 hours ago, by NikiC
Basically PHPs model works well if you don't use it.
 
so... php has a model?
 
@CSᵠ Yes, just an awful one.
 
7:31 PM
ha.. what's that model?
 
@AndreaFaulds The only php model I know is: do whatever heck you want
 
^ that
 
@Leri That's not what I mean.
 
What do you mean then?
zvals?
 
Er, the whole typing model of dynamic, weak typing
 
7:34 PM
@AndreaFaulds And exactly how is it broken?
 
@Leri God, do I really need to explain this? There are a lot of examples.
 
I know but quite large number of them also apply to other dynamic languages.
I don't see how exactly just php is broken.
Implicit type evaluation may lead to an unexpected (for developer) results everywhere where it happens.
 
dynamic is much better than the strict dinosaur, if done right
 
It's developers responsibility to avoid bugs caused by that. If I wanted something strict, I'd go with strict language. However, I like when I can do dynamic things without much hooks via reflection.
 
should i replace "better" with fancier ?
 
7:39 PM
And I don't even mention that reflection is hell slow in most of strictly typed languages and you end-up with lots of additional work to solve performance issues.
I remember writing IL just because C# is so strict.
 
Replace php with lisp for good dynamic typing
 
7:54 PM
@SakhalTurkaystan Fek off filthy spammer
 
8:04 PM
hehe
 
Thanks @Shog9 :-) yw. -s
<3
 
@PeeHaa did he declare his intentions to ban you or why do you thank him?
 
@bwoebi He mod banned the spammer
 
oh, okay
 
8:23 PM
Oh man, ahahaha
I thought I'd come up with a revolutionary new typing system
Then realised I just invented C
2
 
twitter.com/rasmus/status/533715791191887872 … Someone needs to spam Rasmus with encrypted junk…
@AndreaFaulds oh, you genius :-D
 
@bwoebi Actually, I did come up with something new when I thought about it, but forget that, because it's funnier if I didn't :p
 
:-P
 
Argh, whenever I want to make a language, it ends up as Haskell
But I don't want to reinvent Haskell
 
I hope you're joking.
 
8:34 PM
@BenjaminGruenbaum ?
 
There are lots of ways to improve Haskell.
 
Oh, sure.
 
What're you making a language for?
 
Just as a hobby project.
 
@BenjaminGruenbaum Andrea realized that it's much easier to write a new language than fix a single problem in PHP.
5
 
8:36 PM
@NikiC And far more enjoyable to do, too. And quicker.
The language will probably end up being an imperative language (like PHP etc.), but with immutable data structures and a lot of other functional goodies. Strongly typed, but somewhat dynamic.
 
@NikiC single problem, :lol:
@AndreaFaulds oh cool, let me know when you're done inventing scala.
 
@BenjaminGruenbaum Welp
 
Do Scala but with enums and no object and not having to put everything in a class or object.
Also, .view should be the default for laziness because it's annoying to type every time.
 
I'll certainly have a look at it.
 
You'll find it a very enjoyable compromise between PHP and Haskell.
 
8:58 PM
We'll end up with a variety of dialects of PHP which all have a transpiler back to PHP :-D
 
sounds like jabbascript
 
Welcome to JS land :D
 
(coffeescript, typescript, etc)
 
^ exact
 
Aw... ninja'd
 
8:59 PM
@bwoebi Why bother compiling to PHP, though?
Why not JS?
 
because shared hosting
 
@AndreaFaulds because JS is ... eih ... JS.
 
> Active member for a year, earning at least 200 reputation. This badge can be awarded multiple times.
 
@PeeHaa Yearling, the next?
 
My 4th
Holy crap my life sucks
 
9:01 PM
@AndreaFaulds even Hack doesn't compile to JS…
 
@bwoebi A limited subset could be compiled to JS.
 
@bwoebi yet
@AndreaFaulds why not LLVM? What's the big idea in compiling to JS?
 
@BenjaminGruenbaum well, we definitely need a JS-to-PHP transpiler (but not in the other direction)
 
If not actual machine typed bytecode, compile to Java bytecode.
 
@BenjaminGruenbaum LLVM isn't suited to dynamic languages, and more importantly, I don't know LLVM ^^
 
9:07 PM
@bwoebi because why would anyone want to run php code on the client.
 
@bwoebi we need libuv in php first
 
@bwoebi what
 
@FlorianMargaine @rdlowrey did that.
 
@BenjaminGruenbaum I think he means natively.
 
Protip: don't make PHP do things that are not its use case. Lots of languages do that.
 
9:09 PM
@BenjaminGruenbaum what bwoebi said
 
@BenjaminGruenbaum then I wouldn't have to write any of these JS things for client side…
 
that said, I'd like Damien's suggestion first marc.info/?l=php-internals&m=141484779905152&w=2
 
lol, php is a much worse language.
It's hilariously bad for juggling state.
 
JS has warts, but if you scrape them off, there's a beautiful language underneath. PHP has warts, but if you scrape them off, you've removed the whole dermis.
 
it's been tuned for 10 years for the request/response immutable share nothing dynamic case.
It was not very good to begin with.
I don't realy like design by committee either.
 
9:12 PM
@BenjaminGruenbaum what do you mean state here?
 
PHP: The Good Parts wouldn't be a small book, but it wouldn't be useful.
 
@AndreaFaulds haven't you seen it?
 
@BenjaminGruenbaum The joke image? Yes.
 
damn, ninja'd
 
@FlorianMargaine Also seen that joke.
 
9:13 PM
my internet connection sucks right now :(
 
I'm having fun with Section 14 of Mysql manual and nbsock/amp…
 
define "fun"
 
@FlorianMargaine I enjoy writing a parser for mysql connection protocol.
 
Already written a 350 line parse() function, just for the generic packet types <3
 
9:19 PM
heh
 
What are you writing it in?
 
PHP, what else?
Wouldn't be funny to do that in C…
 
but it'd be slow :(
You don't have a JIT
 
@BenjaminGruenbaum it's goto-style just like Daniels http parser
that has to be fast enough.
for everything else, you could try to put Anthonys Recki-CT behind that particular thing.
 
@bwoebi have it on github?
 
9:24 PM
@CSᵠ no, not yet. I just begun today.
 
@FlorianMargaine no, it's a binary protcol… more like github.com/amphp/artax/blob/master/lib/Parser.php#L117
@FlorianMargaine what you have there looks more like a tokenizer :-D
 
@bwoebi nah... it's fundamentally similar to the goto parser
 
// Beginning of my parse function:

		start: {
			switch ($this->state) {
				case ParseState::START:
					goto determine_packet_len;
				case ParseState::PARSE_SEQ_ID:
					goto parse_seq_id;
				case ParseState::PAYLOAD:
					goto payload;
				case ParseState::OK_PACKET:
					goto ok_packet;
				case ParseState::ERR_PACKET:
					goto err_packet;
				case ParseState::EOF_PACKET:
					goto eof_packet;
				case ParseState::INSERT_ID:
					goto get_last_insert_id;
				case ParseState::STATUS_FLAGS:
 
js goto?
 
9:28 PM
fyi goto in php is slow.
 
hmf
can't search goto on lxr.php.net...
 
@FlorianMargaine ZEND_GOTO
 
@NikiC it's not slow?
Well. Slow is relative. What are you comparing to?
 
@bwoebi slow as in, it's not just a jump, as it could be.
 
9:33 PM
@NikiC it could? So why don't you then optimize that if you know that it could?
 
@NikiC What exactly is this doing there apart from the jump? Not sure what it tries to do that zend_brk_cont thing
 
@bwoebi Freeing loop variables in case you're jumping out of a loop
 
and freeing switch var in case I'm jumping out of switch…
 
switch creates a new context?
 
9:37 PM
@FlorianMargaine no, but it keeps the variable to compare to because of fallthroughs.
 
@bwoebi yes
 
@NikiC suggestion: optimize it and put a ZEND_FREE before if we're doing a goto in a switch/loop? And if we're not in a loop or switch, we can just jump.
Would that work?
 
@bwoebi yes. that's what I'm referring to ;)
we have the same issue with break/continue as well
 
you can be certain that break/continue are used in a loop though
 
9:42 PM
@NikiC why is it an issue there? In case of break/continue we need that freeing anyway?
 
@bwoebi yeah, but for example a break; can be done with just a jump. A multi-break needs to emit additional frees
 
@NikiC you mean replace the break by a jump to the ZEND_FREE op at the end of the loop?
 
@bwoebi yes
 
So, why can't the break just free itself and then jump to the op after the ZEND_FREE? Does that make any difference?
 
just a question of efficiency
doing one jump is better than having to consult an additional structure and performing frees based on it
anyway, just a suggestion :)
 
9:49 PM
@FlorianMargaine why not break here after assign? github.com/Ralt/phpdbg-ext/blob/master/src/phpdbg/…
 
@CSᵠ just a bug :)
the parser is far from finished
and will probably never be finished anyway... unless @bwoebi has any news
 
be sure to fix/rewrite
 
@CSᵠ look at the last commit
> Non-working
and since phpdbg maybe won't have an xml protocol, this work will probably be useless.
 
@FlorianMargaine The issue is: I hate writing docs :-(
So it taking eternally long
 
@bwoebi docs are necessary for your RFC?
 
9:54 PM
@FlorianMargaine not for the RFC, but for the RFC to succeed.
 
@FlorianMargaine most things are...
 
@bwoebi ok
 
(I mean: better XML protocol docs withe examples)
That's what I've begun… I just can't find any fun in doing it.
That's why it takes me so long :-(
 
It's basically find an example, execute it, copy it, write one or two sentences, format it and do the next one. :-/
 

« first day (1491 days earlier)      last day (3475 days later) »