« first day (1405 days earlier)      last day (3540 days later) » 

2:00 PM
Actually, I think that function does always return false. However, remove that string cast and it will break a lot of the time.
 
@AndreaFaulds what case does that return true
@AndreaFaulds because it promotes numeric strings to numbers for efficiency sake
 
@ircmaxell That's not my problem, one sec.
Revised: function isMangled($key) { $arr = []; $arr[$key] = null; return (string)$key !== (string)key($arr); }
That will break on, for example, 2.5.
 
posted on August 21, 2014 by kbironneau

/* by Faith */

 
the float is truncated
 
@ircmaxell Yeah, I hate that. If 2.5 is "2.5" then the two should act the same. They don't.
 
2:03 PM
because PHP arrays don't support float keys
 
@ircmaxell - is it PHP related?
 
so it truncates to an integer
that to me is correct behavior
 
It isn't to me. We have string key support, why don't we just store it as a string?
If we have this notion that 2.5 and "2.5" are the same then we should actually treat them the same.
 
@AndreaFaulds because 2.5 is numeric...
imagine you have math that computes the index
and it returns a float, because math operations can do that
as long as you know all numbers passed to the array will be integers, then that's incredibly useful
 
Why not just explicitly cast to an int first?
 
2:06 PM
@rdlowrey I was being DIRTI. Wanted to get it all to work then I would refactor the pants off it.
 
user895378
@Ja͢ck awesome!
 
user895378
@Fabien it's cool, just keep me apprised of your progress :)
 
Will do :)
 
Also, array keys can overflow. If this is an associative array, it's a really awful one.
 
Fuck you Chrome with your fucked up font rendering
 
2:08 PM
@AndreaFaulds from a theory standpoint, it's a horrific structure. From a practical standpoint, it's incredibly useful
 
@ircmaxell Could you please forward this to the chrome team :P
 
user895378
@Jack one thing to note -- I'm not sure how good @chobie's English is (I believe he's Japanese). It's passable, but you may have to work with him a little bit communication-wise on that PR. Just a heads-up.
 
@ircmaxell From a practical standpoint, it's great so long as you know the ins and outs of how PHP implements arrays and don't assume that arrays work like everything else in PHP.
 
If you want to fix it, add support for true c-style arrays (non-sparse, int indexed only). And true dictionaries (hash table without ordering, using the pure key)
@AndreaFaulds even if you don't, the chances you're going to run into those edge cases are trivially small
if they weren't, the top PHP questions would be about arrays
but they are not.
 
Would we really have any advantage of using dicts without ordering?
 
2:10 PM
because most users understand them. Or don't need to because they work well enough in the general cases
 
@rdlowrey Thanks, I've added a comment ... let's see how it goes :)
Either that or he immediately gets it lol
 
Right, but I do care about edge cases. Arrays work most of the time, but they also break horribly sometimes, and I'm not fond of making userland developers have to worry about such edge cases.
 
@AndreaFaulds can you provide evidence that userland developers worry about such edge-cases? Or run into them enough to justify added complexity of having to add casts everywhere they need to access a key from a math function?
 
user895378
var_dump([PHP_INT_MAX+1 => 42]);
array(1) {
  [-2147483648]=>
  int(42)
}
 
user895378
^ Makes me crazy
 
2:12 PM
I know right, I thought everyone had switched to 64-bit already.
 
I'd like arrays to become true value<>value maps. I'd sometimes really like to use $array[$object] = $value;
 
@rdlowrey using a 32 bit system would drive me crazy too
 
@ircmaxell I'd imagine userland developers don't worry most of the time because PHP won't throw an error if it breaks something.
 
user895378
@ircmaxell It's my special needs windows box, man.
 
lol
 
2:13 PM
@AndreaFaulds again, can you cite where this is run into in the wild?
 
I'll have to find somewhere.
 
@rdlowrey also, doubles are truncated to integers :-/
 
user895378
@bwoebi yeah, that's the problem.
 
user895378
I wish it would just treat it like a string
 
something that drives me crazy? in_array
 
2:15 PM
@ircmaxell If integer keys and string keys are so different, then PHP should not have this façade of there being no difference.
 
@AndreaFaulds one question doesn't really prove it's a huge issue
@FlorianMargaine because you missed the third parameter: 3v4l.org/HB6NM
 
@ircmaxell yeah I know, I just always use it now
 
@AndreaFaulds again, it's a lesser of evils and usefulness...
 
I never really got why numeric keys are translated to integers in arrays...
 
but hell... the 1st time this bug happened...
 
2:17 PM
@ircmaxell another person had the same problem, FWIW stackoverflow.com/questions/17215530/…
 
@bwoebi efficiency of lookup, and because most of the time you try to access a float key, you want the integer that it truncates to...
@AndreaFaulds two low-voted questions don't prove that it's a massive problem... just saying
 
@ircmaxell That's making massive assumptions about use cases.
 
user895378
@Ja͢ck + @DaveRandom As much as I'd like to see libuv in core, part of me thinks it might be a losing battle. We might be better served to just concentrate on improving the php-uv extension.
 
@rdlowrey Agreed, which is why I focused my attention on getting it easier to bundle :D
 
user895378
There seems to be so little understanding of and appreciation for the massive benefits of libuv in internals. It's like everyone lives in this little walled-off world where everything is synchronous. If we can't have threads then we should at least have a decent event model so that some form of concurrency is a reality.
 
2:19 PM
@AndreaFaulds absolutely it is. And if the assumption was wrong for the vast majority of use-cases, you'd see tons of people complaining about it.
 
@rdlowrey Give it time ... :)
 
By the way, Anthony, I really don't like the float vs string keys difference in array keys.
 
Well, I found a third person complaining about it: stackoverflow.com/questions/15536751/…
 
but people in general don't. There are some suprises here and there, but for the most part it's incredible useful. It helps the 99% at the expense of the 1%. And that's important
 
It's just another strange conversion case.
 
2:20 PM
@LeviMorrison I'm not saying it's good or not. I'm saying it's insanely useful
 
@ircmaxell I don't think it does. It helps 99% until they enable emulated prepares then BANG
 
@rdlowrey I am agree with all. But there's time to change people's minds. And it doesn't actually need to have any BC implications, and it's not like 7 is the last PHP version ever
 
We should do one thing and do it consistently
It helps everyone until they switch shared server host
 
Like being consistently late? :)
 
It works fine on your machine
 
2:21 PM
@AndreaFaulds The first part of that sentence is often said ... and then a list of things comes up :)
 
@AndreaFaulds that's not what that question asks
 
If PHP really has "1", "1.0", 1 and 1.0 be the same then they should be the same consistently
 
All design is balancing tradeoffs. Consistency is awesome, and should be strived for. However usefulness and practicality are also really important.
 
Right.
Which is why PHP should work the same across different environments (useful, practical) rather than just on your machine.
 
@ircmaxell I disagree on the "insanely useful" part. A bit useful at best.
 
2:23 PM
@ircmaxell oh, really? Usually only when the float() value is exact.
 
@AndreaFaulds spend some time in ##php. You'll quickly get a handle on the issues that really are hard to understand, and those that cause problems. In the 5+ years I've been in that channel, I've never seen someone asking about it...
 
@LeviMorrison I used to think it was useful, but I have to say I've only needed this maybe once or twice, for graphics applications
 
@LeviMorrison more than a bit
 
It saves some people 5 characters for the sake of breaking other's code if they change environments.
 
change environments?
 
2:26 PM
So how exactly does it know to stop @DaveRandom. An empty array from the response triggers it how?
 
@ircmaxell Depending on the availability of emulated prepares, for example.
 
@AndreaFaulds ummm... that's not how emulated prepares work. You'd have to enable/disable them in code
and they are suppored back to such ancient versions of MySQL that CentOS 4 series supported them
 
@ircmaxell Arrays are a common pain point, particularly references.
 
@ircmaxell Fair enough.
 
2:28 PM
@LeviMorrison agree 1000% on references. Just not float->int key conversion being a pain point (yet alone a big one)
 
@LeviMorrison Oh god that. I want to add let just for that.
 
all abstractions leak
 
@ircmaxell You can still make them less leaky.
 
the question is not if the abstraction leaks, but is the abstraction useful. And if it is, the leak is justified. If it's not, then it is.
@AndreaFaulds less leaky at the loss of usefulness of the abstraction.
 
Since array operation aren't immutable the by-val nature of them really stinks.
 
2:30 PM
@ircmaxell Not necessarily.
 
user895378
I had a one-character bug because of by-value array passing that totally broke parallel artax requests yesterday. I was missing the & on an array in a closure use() statement (my fault, probably not PHP's).
 
Maybe we should add reference semantics arrays. (Serious suggestion)
I think that's far nicer than using references.
Call them something else though...
I mean add, too, not change what arrays do.
 
@Fabien When there is nothing left to do (no streams being watched and no pending timers), the loop breaks
Or at least, should break
 
Perhaps... we could call them vectors.
 
user895378
@DaveRandom FYI if you're using artax it's unlikely that that will happen though.
 
2:31 PM
@rdlowrey Oh?
 
Is this often a little... delayed to happen?
 
user895378
Because artax keeps the socket connection open in case you need it again.
 
Oh because of the pool
 
@AndreaFaulds try this: remove that conversion (internally add a cast if IS_DOUBLE to string), and then run the tests of major frameworks and applications like wordpress and other major open source projects. And see if you get passes or fails...
 
right
@rdlowrey Surely there should be an inactivity timeout though?
 
user895378
2:32 PM
There is.
 
@LeviMorrison make an SPL data structure, with efficient storage...
 
user895378
I think it's 30 seconds by default. Can be configured.
 
@ircmaxell Who'd have ever thought of that solution?
:D
 
OK so likely your script will hang for 30 secs
 
I know, right
it's an amazing revolation
 
2:33 PM
@DaveRandom That explains it :)
 
@ircmaxell I am well-aware it would break existing code. Such code can most likely be fixed.
 
In which case @Fabien you'll want to keep track of the responses and stop it manually when there are no pending timers
 
user895378
^ that @Fabien
 
pending timers?
 
@AndreaFaulds IMHO that's the wrong way of approaching a change.
 
user895378
2:34 PM
pending anything. timers, streams, process signals.
 
Also @rdlowrey that should be easy enough to circumvent, all you need is to track the number of pending timeout timers, and stop if count(timeoutTimers) == count(timers)
@Fabien Sorry, s/timers/responses/
 
user895378
if (empty($this->pending)) { $this->reactor->stop(); } // add me where you process resolved responses
 
@rdlowrey No that assumes that Artax is "in control"
 
Does PHP have some sort of hashing mechanism for comparing objects?
 
spl_object_hash
 
user895378
2:35 PM
spl_object_hash dang too slow
 
only if the objects are alive
 
@ircmaxell ?
 
you can't store the hash, and then compare it later in the future without holding a reference to the object, since PHP will re-use object buckets after destruction
 
It needs a method on Reactor for (pseudo) getActiveWatcherCount($type = WATCHER_TYPE_ALL) @rdlowrey
 
How do I track the number of pending timeout responses?
 
user895378
2:36 PM
@DaveRandom no i meant add that in his own code
 
If that existed it would be doable, built in to Artax
 
spl_object_hash is just the memory address of the object's storage pool offset
 
Basically, you are taking a memory location. Since memory gets reused it can cause issues if the objects aren't alive.
 
user895378
@DaveRandom that wouldn't help though because if there are no active watchers the reactor will stop on its own
 
user895378
You shouldn't count on the reactor to just stop because you never know what a library is doing under the hood.
 
2:37 PM
Hmm
 
user895378
Some code somewhere might schedule something to run once every five minutes to garbage collect resources unbeknownst to you (for example).
 
Objects can't overload the equality operator, right?
 
@LeviMorrison and not just any memory location, a memory location that will be reused
 
@rdlowrey Yeh but the point is there are active watchers, the timeout timers. If you could query the reactor for the number of active watchers, you could have Artax stop the reactor if and only if the number of watchers == the number of Artax internal timeout watchers
 
@AndreaFaulds nope
internal ones can
 
2:38 PM
@rdlowrey I gTalked you what I am doing (because work) but can be discussed here.
 
user895378
@DaveRandom that just seems really hacky.
 
I know what I have in mind, I might try and throw a patch together, would demonstrate it better I think
 
user895378
If you want to break execution you should just keep track of the conditions that should result in the break yourself and manually call stop.
 
user895378
You know the conditions that should cause a break. You shouldn't fiddle with numeric counts and try to know what internal implementation details are doing.
 
2:39 PM
@rdlowrey probably true
 
@ircmaxell Ah, thanks.
 
user895378
@DaveRandom the combinator functions are also really useful for this.
 
user895378
So you don't have to keep track of pending future events yourself.
 
Hey guys how to set timeout on file_get_contents?
 
user895378
$combinedPromise = After\all($arrayOfPromises);
$combinedPromise->when(function() { $this->reactor->stop(); });
// modified for readability
 
user895378
2:41 PM
^ All our pending jobs are finished. Stop the reactor.
 
I need to compare performance of arrays and SplFixedArray on master.
 
@LeviMorrison with NG?
 
quite fast in 5.3/5.4: github.com/ircmaxell/php-ndata
 
Last time I checked SplFixedArray generally lost cpu performance, but used less memory. I wonder how much these have changed.
 
2:43 PM
@rdlowrey The tracking of issues for me got a little deep because the response of a request can dictate a number more requests I need to send.
 
@ircmaxell Here's another possibly BC-breaking idea I've had: disallow hex numeric strings
Since we don't support them consistently and they are a source of problems
 
@ircmaxell Hey, how to set timeout on file_get_contents?
 
send 2. Response comes back with 4 & 5 new urls to call which again happens. But 4 & 5 could be 2 & 12
 
user895378
So you just add something like this after you process each response:
 
user895378
if (empty($this->pendingRequests) && empty($this->requestQueue)) { $this->reactor->stop(); }
 
2:45 PM
@LeviMorrison in my tests it always won performance wise
at least for non-trivially small arrays
 
Have you tried nesting them?
Basically always lose for me.
This wasn't on master, though.
 
user895378
@Fabien I'm not sure I see why you're even trying to stop the script in the first place. Shouldn't it just run forever and periodically check to see if it has new URIs it needs to scrape?
 
As far as I could tell, it's because array indexing isn't a function call but it is on the SPL structure.
 
Negative. That's a good way to get blocked for this :)
 
user895378
@Fabien No one said you shouldn't throttle the requests yourself.
 
2:46 PM
I can explain on gTalk if you like. Might not be necessary
 
user895378
Hammering some service in a loop is never a good idea :)
 
Unless you are trying to hammer a service.
 
user895378
Something like this is what I mean ...
 
@AndreaFaulds I already have a PR+RFC for that
 
user895378
// repeat every 30 seconds
$this->reactor->repeat(function() { $this->sendSomeRequests(); }, $msInterval = 30000);
 
2:48 PM
Jobs are queue based to allow scaling.
 
@AndreaFaulds yup… conversion with base_convert only, please…
 
user895378
@Fabien Then listen on STDIN for newline-terminated URIs
 
@bwoebi that gets tricky... With large floats
 
> But the framework will enforce you to follow a specific pattern, may it be mvc or another one. If the framework is designed such that you should build your code following the mvc pattern, it's an mvc framework.. reddit.com/r/PHP/comments/2e5fjc/…
 
user895378
$this->reactor->onReadable(STDIN, function() {
    while ($line = fgets(STDIN)) {
        // do something with $line
    }
});
 
2:49 PM
.. I should just give up
 
@NikiC You do? That's awesome
 
it should be reflexive IMHO: $a === (float) (string) $a for all float vlaues of $a... Which means that some sort of scientific notation would need to be supported...
 
@NikiC It solves one of the reasons for the binary string comparison RFC (that md5() password == bug), so I'm all for it.
 
Currently the reactor is running via Alert\run([$application, 'run']);
 
@tereško I speed read the first 5 or so posts on that thread, and I already give up. Just let them think what they want if they're not willing to learn...
 
user895378
2:50 PM
@Fabien alternatively you could make your script a server that runs all the time. It sits there idling and clients can connect any time to send it URIs that need to be scraped.
 
user895378
@Fabien There are just lots of different ways to do what you need
 
@ircmaxell not an issue if bigint would pass.
 
@AndreaFaulds nope, doesn't solve that
 
@ircmaxell On that note, is it a good idea for us to have precision be an INI setting? I wonder if it leads to problems (pure speculation)
@NikiC oh?
 
that issue comes from doubled with exponentials, not hex
 
2:52 PM
Ahh, I see
 
@bwoebi yes, still an issue even if bigints pass. Because double, not int
 
@ircmaxell ah, another thing on the list: remove locale-dependent float-to-string-cast...
 
@AndreaFaulds please, no more ini settings...
 
By the way, can I revive my patch to get rid of alphanumeric increment and decrement? We do, after all, have range()
 
@NikiC +1 to that
 
2:52 PM
@ircmaxell I mean, should we get rid of it.
 
@AndreaFaulds Oh, then +1 from me
 
I think it makes the result of (string)$some_float do different things based on environment...
@NikiC +1
@NikiC Has that bitten you? I know you live in Germany, so...
 
@tereško that whole thread... sigh
 
yeah
 
@AndreaFaulds No, do I look like someone who makes use of locales?
 
2:54 PM
@NikiC How can we know? We never seen your face?! :O
 
user895378
@NikiC You look like someone who makes use of geodesic wireframes to me.
 
user895378
gravatar jokes \0/
 
user895378
I'll be here all week.
 
@ircmaxell not sure why doubles?
 
@bwoebi bigints won't remove doubles. So you still have the double-printing problem.
 
2:56 PM
@Fabien Hey do you know how to do a timeout on a file_get_contents?
I'm using this:
$url = "http://example.com";
$content = file_get_contents($url);
//if(!empty($content)) header("Location: $url");
So I can check if is the website up or down
 
@ircmaxell I'd actually like to remove doubles with exact values…
 
But the problem for me is, when is it down the timeout is too long
 
I remember some float to string locale issue where going back to a float didn't work properly.
 
@NikiC ...your machine's probably set to en.en-GB, isn't it?
 
@ircmaxell just use doubles when you really need to represent non-natural numbers
 
2:58 PM
@AndreaFaulds No, I use normal english
 
en.en-US?
 
(:P)
 
@bwoebi which still doesn't solve that problem
 
Speaking of bigints, I need to work on them again
 
@TomášAresakMalčánek look in to using github.com/rdlowrey/Artax
 
2:58 PM
The bulk of the work is literally just updating tests
That's partly why I made the integer semantics RFC. I'm trying to backport some changes so I know they're final and done before I fix their tests.
Rather than change a bunch of tests then have to change them again when I change my mind...
 
@ircmaxell what problem are we now talking about?
 
@bwoebi conversion of large doubles to strings...
 
Do we always print doubles at full precision?
While you're here, @NikiC, are you happy with the Closure::call RFC now that I got rid of unbound scoped closures?
 
Question, knowledgeable room.
$array[$i] *= 2;
^ For SplFixedArray that doesn't work.
I was pretty sure we fixed that (Jack did some work, right?)
 
@rdlowrey you ever come across a situation with an SSL stream where select/poll etc report that there is data to read but there actually isn't? I'm thinking TLS heartbeat?
 
3:08 PM
@ircmaxell you can't fix that one I think.
 
:18416624
andreas-air:~ ajf$ php -r '$x = new SplFixedArray(1); $x[0] = 4; $x[0] *= 2; var_dump($x);'
object(SplFixedArray)#1 (1) {
  [0]=>
  int(8)
}
 
@bwoebi my point being that it must be reflexive. It is today, and any changes to number parsing in the future must keep it that way...
 
user895378
@DaveRandom I haven't encountered it. I think the php-src internals should avoid notifying you of readable data and just consume the protocol-level data itself.
 
@LeviMorrison it doesn't?
 
@AndreaFaulds php --version?
 
user895378
3:09 PM
But I also account for that scenario either way when I perform reads so I'm not sure.
 
:18416704
andreas-air:~ ajf$ php -v
PHP 5.5.15 (cli) (built: Aug  2 2014 13:35:03)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
 
@LeviMorrison all 3v4l.org/EFCm2
 
Why can't I mix fixed-font and non-fixed in chat, hngh
 
Warning: Attempt to assign property of non-object in /Users/levijm/perf.php on line 19
 
user895378
$data = @fread($sock);
if (isset($data[0])) {
    // got something
} elseif (isSocketDead($sock)) {
    // unload if necessary.
} else {
    // got empty data somehow. Disregard.
}
 
user895378
3:10 PM
@DaveRandom ^
 
 17 $array = new SplFixedArray($size);
 18 for ($i = 0; $i < $size; $i++) {
 19     $array[$i] *= 2;
 20 }
This is on master.
 
@ircmaxell You could give it a binary encoding back… but I doubt that this is the way. I doubt that there a nice solution exists.
 
@LeviMorrison That won't do anything as the default value is NULL isn't it?
 
@bwoebi a nice solution to what?
 
@AndreaFaulds It will be 0, but yeah.
 
3:12 PM
yesterday, by DaveRandom
@AndreaFaulds Yeh that doesn't work. Some elements of SO chat are a little retarded (markdown impl is missing some bits as well)
 
@LeviMorrison 3v4l.org/uR5AG
 
:18416787 Not for me:

andreas-air:~ ajf$ php -v
PHP 5.5.15 (cli) (built: Aug  2 2014 13:35:03)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
andreas-air:~ ajf$ php -r '$x = new SplFixedArray(1); $x[0] *= 2; var_dump($x);'
PHP Warning:  Attempt to assign property of non-object in Command line code on line 1

Warning: Attempt to assign property of non-object in Command line code on line 1
object(SplFixedArray)#1 (1) {
  [0]=>
  NULL
}
 
@ircmaxell to cast doubles lossless to strings
 
@Fabien Willn't it will be easier to get curl for a content and timeout?
 
3:15 PM
 
How many binary digits is a decimal digit roughly equivalent to? 5?
 
@AndreaFaulds it takes 4 to represent a decimal digit
log(10) / log(2) === 3.32192809489
 
@ircmaxell Was going to say, BCD usually uses 4 or less
 
so it takes 3.32 bits to represent a decimal digit
 
3:19 PM
@ircmaxell On master I'm getting better results for array than SplFixedArray for performance.
 
Barely related, one of the fun bits of the bigint patch is trying to guess if gmp will abort PHP and usually succeeding
 
@LeviMorrison for large arrays? or small ones? and what access pattern?
 
For ideal case, full sequential iterations.
 
php > $x = 1;
php > for ($i = 2; $i < 100; $i++) {
php {     $x /= $i;
php { }
php >
php > $str = (string) $x;
php >
php > ini_set("precision", 20);
php >
php > var_dump($x, $str, (float) $str);
float(1.0715102881254668584E-156)
string(20) "1.0715102881255E-156"
float(1.0715102881254999801E-156)
 
The first assigns, the second multiplies by 2 and reassigns.
 
3:20 PM
@ircmaxell ^ this is my point.
 
@bwoebi still reflexive, as $float === (float) (string) $float
I don't care if all values stored will be able to be represented on all architectures. I care that the conversion is reflexive for a current runtime...
 
@ircmaxell That's not true. Look again
 
@LeviMorrison yes true, look again
 
1.0715102881254668584E-156 != 1.0715102881254999801E-156
 
@LeviMorrison yes, precision was changed between output and input
@LeviMorrison 3v4l.org/KW2iV
 
3:23 PM
> Warning: ini_set() has been disabled for security reasons in /in/KW2iV on line 8
 
@LeviMorrison doesn't matter, even without setting it, it will still work
the reason he gets different answers is the string cast is separated from the float cast by the precision change
put them both on the same side, and you'll get the same answer
which is the case when $float === (float) (string) $float...
that breaks down around NAN and INF, since (float) "INF" is float(0)
 
user3502925
Hy all
 
@ircmaxell Oh yeah, that bugs me. Not sure if it's a good idea, but we should perhaps make "INF" cast to INF.
 
user3502925
Please someone tell me how can i get my values from this query.

$Query =
'SELECT
'.$DB_Column['About_Me'].',
'.$DB_Column['Avatar'].',
'.$DB_Column['Clan_Tag'].',
'.$DB_Column['Month'].',
'.$DB_Column['Day'].',
'.$DB_Column['Year'].',
'.$DB_Column['Website'].',
'.$DB_Column['Website_Link'].',
'.$DB_Column['Email_Address'].'
FROM
'.$DB_Table.'
WHERE
'.$User['Username'].'='.$_SESSION['IsLogged'].'
';
 
3:26 PM
@AndreaFaulds possibly
 
user895378
@ircmaxell Reddit downvotes can only mean one thing: you're doing something right.
 
user3502925
I want to get email address etc.. of the logged user this session is username
 
@ircmaxell Can't help but think it would lead to even more weird security edge cases though.
 
Gotta love it when something (cpanel related) compresses your PHP file in to one line and makes it <?phpfunction(...
 
@AndreaFaulds I don't know about security edge cases, but it could lead to weird bugs
 
user895378
3:28 PM
@Fabien gross.
 
user3502925
Please help me
 
@Fabien the problem isn't compressing PHP files, but using CPanel
 
Indeed. unsure why we have it. Everything else we have we host ourselves.
 
@JavedAhmadzai Only if you fix that sql injection hole
 
user3502925
SQL Injection?
 
3:29 PM
@ircmaxell Yeah
 
user3502925
its selected query
 
user3502925
Already fixed
 
@Ja͢ck But... but... ass-guard depends on cactus.
 
@ircmaxell Actually, only tangetially related... should I make a version of switch which compares strictly? switch strict () {} perhaps?
 
user3502925
@Pe
 
3:30 PM
@Peeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
 
@AndreaFaulds I'd be very wary of adding new control structures
 
user3502925
@PeeHaa i want to get email etc.. and show to user with select query
 
@ircmaxell It'd be a modifier to the existing one, not an entirely new one.
 
user3502925
@AndreaFaulds Can you help me please.
 
also: be very careful with adding a new keyword, especially one as possibly used as strict...
 
3:31 PM
@ircmaxell I'd try not to add a new one, that's just an idea. There might be something existing we could use.
@JavedAhmadzai use a database query function?
 
user3502925
PDO Sqlite
 
@DanLugg :)
 
@JavedAhmadzai Performing a query is something I could help you with, but it's incredibly basic and I suspect you can find the answer easily by looking at PDO's documentation or using Google. So I, at least, am unwilling to help.
 
@Naruto Scotland
He's gone :-)
 
Oh no
Derick's written a post about Backwards Compatibility
 
Guys, I'm reconfiguring my VPS ('cos I'm awesome and effed it up with style) and I need to add `git` to the sudoers file to the apache username; Thing is I'm not sure if the line I'm making is correct (syntax is correct, I'm just not sure If I'm not doing more than I want to);
`apache ALL=(ALL) NOPASSWD: /usr/bin/php, /usr/bin/git` I don't know if I need the `ALL = (ALL)` part since I only want "php" and "git" to be able to be ran from sudo without password
PS: I'd ask in ServerFault but I don't have enough points to go on chat ;x
 
I'm not so sure with << and >> changes now. Do we assume everyone who used them knew the poorly-documented specifics of AMD64 bitwise shifts and their code actually relied on it, or do we assume most people who used them did not and assumed they worked in the way they now would?
 
point being we shouldn't just break BC because we can
we shouldn't just change behavior because we think it's logical to
what's the benefit? Why the risk of breaking things in odd ways for users? If there's a significant win to it, then great! But if the win is minor, or not significant then the potential pain is likely not worth it.
 
All the changes in that RFC are necessary for bigints.
Though they have their own BC problems generally
Until now, you could reasonably assume <insert large integral> would be a float
 
3:57 PM
@AndreaFaulds what happens if big ints never makes it in?
 
@ircmaxell Well, bitwise shifts are still more consistent than they were before.
 
6 hours fixing 1 bug
http://www.best-english.sk/wp-content/uploads/2013/09/mouse-481x230.jpg
 
again, consistency for the sake of consistency is great when designing a language. But it's horrific when refactoring, as you're going to potentially break things in weird ways for what benefit
 

« first day (1405 days earlier)      last day (3540 days later) »