« first day (1867 days earlier)      last day (3080 days later) » 

12:06 PM
Someone posted a CI or die link yesterday.. anybody got it close by?
 
Hello I have an issue
I receive a website I have to change which has a utf-8 doctype. When I insert the text into the FRENCH version which contains é è and I don't encode it It just looks like: "dès que leur facture d’installation"
When someone else tries this in the same file and saves it. It just shows correctly...
This wil cost me hours in the future to change all those characters manually.
Every suggestion is welcome to fix this. ( I tried on a Windows and A OSX machine ) both result in the same issue. When the external person who made the script tries it it just works by copy pasting the french text into it.
I even tried the samen editor... but without any succes. I tried the FTP file browser, I tried another FTP client ... nothing helps .
 
@Duikboot Make sure your IDE also has UTF-8 set as character encoding
 
@Oldskool :: Encoding : Unicode ( UTF-8) is on for Fraise Editor. -- UTF-8 is als on in Atom.
Even : paste.ee/p/tMk6l doesn't help me. ( <meta charset="utf-8"> ) is in my HTML.
 
htmlspecialchars just uses your default encoding unless you tell it otherwise
so that's probably not UTF-8 in your case. And either way, it's always best to enforce UTF-8, so you can deploy it on any server.
 
why do you encode it before you save? Ow you don't, nvm :P
As what oldskool said, it's probably the encoding of your IDE
 
12:19 PM
But I checked that one, it's utf-8 in both editors I tried.
<li>L’Action n’est... >< on the page in the browser.
 
so basically your problem is: you type in é or à or w/e on a page, then upload the file and it doesn't show correct?
 
@Duikboot Also note that there can be a difference in the default encoding of your IDE and the encoding of specific files in your project. Your IDE can have UTF-8 as default, but if another character set is set specifically on the file you're editing, it still won't work until you change that.
 
OK I tried to get my current encoding: ASCIIASCIIJISASCII
When I execute this: paste.ee/p/nJDew
 
Is that supposed to be L'Action and n'est? Looks like smart quotes issue to me
 
@MarkBaker Quotes and èéê chars. It was just a small example that paste. From a large thing.
Is it normal it retrieves : ASCII in stead of UTF-8?
 
12:25 PM
If there's smart quotes involved, more likely to be an MS charset
 
echo mb_detect_encoding($str); :: ASCII
echo mb_internal_encoding(); :: ISO-8859-1
Is what I retrieve as results.
 
Try setting your default to UTF-8: stackoverflow.com/a/9351983/214577
 
So : header('Content-Type: text/html; charset=UTF-8'); can also work
header('Content-Type: text/html; charset=UTF-8'); works!
damn
 
@Oldskool Eew don't do that on the php.ini level
 
@PeeHaa Why not? UTF-8 is my common default on all my PHP projects anyway
Might as well set it there.
 
12:29 PM
Really oldskool thanks a lot I have to change the layout for 10 websites
But every file I change with a é french letter in it got broken because of that problem .
 
@Oldskool Portability--, debugging_wtfing++
 
Hmm, yeah OK valid point. DevOps mindset got me there ... I never deploy to any servers that I don't manage myself ;-)
But it can't hurt to enforce UTF-8 (like I mentioned before)
 
Can someone now explain me on which level this went wrong?
 
477
Q: UTF-8 all the way through

mercutioI'm setting up a new server, and want to support UTF-8 fully in my web application. I have tried in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL and...

TL;DR make sure everything is UTF8 (what @Oldskool told basically)
 
Sweet sweet sweet, happy french reading now.
 
12:38 PM
hey, im working on a geo location application. And i need some help figuring out how to filter out noise :p
 
@KristianHareland Turn down the volume?
 
lol, i dont know tbh, its fetched with javascript and passed to my logger
 
What sort of noise are you getting?
 
The lat/long is jumping far off
example: was in norway -> jumped to armenia
 
if your class implements Iterable, should current($class) and reset($class) not return the values of $class->current() and $class->rewind() + $class->current() ?
 
12:43 PM
@MarkBaker didn't know you could use sprint in php, seems I've learned something new today :)
 
@alcohol Yes it should
What are you actually asking?
 
i just need to compare [0] to [1] : if 1 is over 60% the same, it is relevant otherwise not. If irrelevant, try 0 against 2, if relevant, use 2 as relevant compare agains4
etc
 
Small other Q: When a domain is not reachable like site.com only www.site.com then it's just the www. record which is missing right?
 
i must be doing something wrong lol. its not working as expected.
 
basics of what i want to compare ^ this would be relevant. then it would use [12] to compare against [13] if [13] is not relevant, [13] is moved to irrelevant array, and [12] is compared against next -> [14] if [14] is relevant, use [14] to compare against [15]
 
Abe
12:52 PM
@KristianHareland does that make any sense, mathematically? :P
you should compare to highest and lowest values in the set instead, not one against another
 
well, my math skills is bad.. really ba
the thing is, this is supposed to plot lines into a map afterwards
is it allowed to share urls in here ?
 
@Naruto - SO's spelling correction is a PITA.... it also hates strpos() correcting it to strops()
 
0
Q: How to stop google indexing URLS containing a certain word?

shineIs there a way to stop google indexing any page that contain limit=all using robots.txt http://domain.com?brand=2058&limit=all my domain look like this

 
Hi.
:]
 
12:56 PM
@shine Is there any particular reason for that?
 
Abe
@KristianHareland you want to filter those values to a percentage radius starting from the average center of all of them?
 
i want it to filter away all noise, as you see on the map (on the right side) it shows a little spinning around while zoomed in
 
@PeeHaa Are you active right now?
 
@HassanAlthaf because the url take long time to fetch when google indexing is working the site going to slow thats why.
 
Oh ok.
 
1:01 PM
@abe i have been thinking about trying: $MatchA = similar_text($Value['lat'], $match[$a + 1]['lat'], $Lat);
inside a foreach loop and keep values i want to keep in a temporary array
 
Abe
@KristianHareland that's harder than you might think :P it's called simplification, afaik
try one dimensional first though
 
why do people even answer questions like these?
 
Abe
with random values, before trying to apply it to the map
 
so ex: see if it can output matches for a one dimentional array ?
 
1:06 PM
oh my..
 
Abe
it's just proportions really
try to think about it, it's not that hard, perhaps just hard to implement easily
 
Alright, i will try it out.
 
Abe
i'm not very good with math either though :P trying to think of a simple solution but i don't see any..
 
@Sean tbh, you shouldn't upgrade production to version 7.0.0 unless you are spending like $40,000 a month on server costs
 
> X-Powered-By: PHP/7.0.0RC7
Oh wait. I shouldn't. Damn
 
1:20 PM
@PeeHaa not up-to-date yet?
 
:P
@MarkBaker I'm missing a new RC?
 
@Duikboot I found your alt account? stackoverflow.com/questions/33939795/… xD
 
Oh released today. Yeah will update tonight
Bitches love non production ready bleeding edge software :)
 
Abe
@KristianHareland though your idea of just killing two+ too close nodes wasn't a bad idea either
 
1:24 PM
hmm, ill pass over what i have now. @abe
 
Abe
compare A with B, if they are in less than 1km radius, substitute them both with average of them, then repeat with this new value being A with another B
it's not ideal but could work
 
i dont even know if this is functional, i just wrote something i had in my head. lol
 
Abe
lol, similar_text
 
hehe
but you get the idea tough :p
 
1:31 PM
hi
 
hi
 
hi
 
<?php
$Regex_Pattern = "/([a-z])\\1/";
$handle = fopen ("php://stdin","r");
$Test_String = "aa";
if(preg_match($Regex_Pattern, $Test_String)){
print ("true");
} else {
print ("false");
}
fclose($handle);
?>

I was practicing regex on PHP ... wondering why do we have to use \\1 instead of \1 for backreferencing?? Plz suggest
 
echo $Regex_Pattern with and without the extra slash, and see the difference.
 
it returns false if i use \1.. but in regex101 use of \1 is valid.. regex101.com/r/nB5vP3/1
 
1:36 PM
Try it here: regextester.com
You can mouse-over each section and it tells you the eval
 
var_dump("/([a-z])\\1/");
var_dump("/([a-z])\1/");
// string(11) "/([a-z])\1/"
// string(10) "/([a-z])/"
Without the extra slash, your regex is actually /([a-z])SOH/ where SOH is the unprintable character with ASCII value 1 -- asciitable.com
 
Is there an http header which sets the encoding without setting the mime type?
 
In double-quoted strings in PHP, backslash then a digit represents a character. E.g. "\41" is the exclamation mark character !
(FUUU Markdown)
 
markdown wins
 
haha, it always does :*(
 
1:42 PM
Similar problem should arise for the use of \w insn't it? bt if I replace ([a-z])\\1 with (\w)\\1 it returns true...
 
Just use single quotes for defining regexp's - it saves a lot of sanity.
 
No, because that's not one of the "backslash escape sequences" that PHP changes. See php.net/manual/en/… for more info
 
@PeeHaa Make one, RFC it ;)
We all obey the internetz rfcz
 
Thank You all for the help :D
 
Abe
@PeeHaa for instance?
 
1:45 PM
@PeeHaa "Content-Encoding:gzip"
(Nice one chrome, just delete the required space, why not.)
Encoding is probably not what you meant - did you mean charset?
 
@Danack Thank you for single quote suggestion :D
 
@Abe, it actually worked. lol.
after a little tweaking
 
Can anyone guide how to resolve issue of decoding below symbols
(\u0ab8 \u0aa6\u0acd\u0ab8\u0acd\u0aab \u0ab8)
in *WordPress* . I am getting proper in Core PHP using **utf8_unicode_ci** . But dont know how to set in *Wordpress*.
 
Abe
@PeeHaa like Content-Type: text/*; charset=UTF-8 not sure it's valid, though. probably not :P
 
Hmm. If an API request to delete an item fails because the item never existed, should it report back a failure?
 
1:53 PM
from 998results to 127 :p
 
@Sean yes - and as it's user error a 4xx - "410 Gone - Indicates that the resource requested is no longer available and will not be available again."
 
2:07 PM
github.com/alcohol/iso3166/pull/3/files why does current() and reset() not work as expected on something implementing \Iterator? did I fail at reading manual? :<
 
@alcohol they were off there face when the iterator iterator iterator stuff was implemented. Do you have a link to a failing test?
 
posted on November 26, 2015 by nlecointre

/* by Tipsette */

 
@alcohol It looks like a bug....
It's just returning the key that is current before the reset.
 
how to combine the two requests mysql
"SELECT titlu_app, titlu_m, titlu_f, descriere_m, descriere_f FROM aplicatii WHERE id = ?";
"SELECT id, titlu_app FROM aplicatii WHERE visible = '1' ORDER by id DESC";
 
2:22 PM
@Chris you almost certainly want to use a left join - tizag.com/mysqlTutorial/mysqlleftjoin.php
@alcohol Do you want the 'honour' of reporting a bug? or shall I?
 
@Danack But it is one and the same table mysql "applications".
 
oh, in that case, just read the manual.
 
good mornings
 
hey @hakre
 
2:46 PM
@Danack i dont understand why it returns the value of the internal position property of the instance at all. it should at the very least return something from the $countries array?
 
@alcohol it's returning the current key value before reset is called. aka it's a massive bug.
 
that seems like a bug someone would have discovered ages ago though, not very plausible it is still there. something else must be wrong.
 
@alcohol or, it shows how many people use the Iterator object. I'm just about to open a bug, here is the repo case:
@NikiC Presumably this bit of the manual needs updating for 7 php.net/manual/en/function.current.php ? In particular:
> The current() function simply returns the value of the array element that's currently being pointed to by the internal pointer. It does not move the pointer in any way. If the internal pointer points beyond the end of the elements list or the array is empty, current() returns FALSE.
As that is no longer true 3v4l.org/I5aSv ?
 
@Danack I don't understand. That statement is still fully correct
Foreach doesn't change the array pointer anymore, so it stays at the first element
 
In 5.x, doing a foreach would go off the end of an array, and so current() would return false.
ok.
 
2:56 PM
@nikic why do current() or reset() return the internal iterator position value of my class implementing \Iterator, rather than what the implementation of current() returns?
 
Need help creating a simple IF statement which checks if my sql returned string $row['status'] is equal to 'E' then if so, change $row['status'] to 'Enrolled'

I've tried:
if ($row['status'] == 'E') {
$row['status'] = 'Enrolled';
}

But doesnt seem to work. Can anyone help?
 
@methhead What's the definition for $row?
 
$row = $result->fetch_assoc()
 
@met
errr
@methhead do you actually also run an UPDATE statement with the new values?
 
@alcohol I'm not exactly sure what you're asking. current() etc are array functions, they don't operate on Iterators
 
2:58 PM
I dont physcially want to change the value stored just the way it is printed on the page if possible?
 
They'll treat an Iterator like any other object
 
@NikiC o, then it's a case of me making a bad assumption.
 
Arghh what. Why do you need to commit to add a tag?! Stupid .hgtags
 
@alcohol Generally, I'd recommend against using current() etc. They're pretty much being phased out
If you need to keep track of a position in an array, using ArrayIterator is a lot more explicit and safe
 
@NikiC yeah i was just playing around with implementing Iterator
 
3:04 PM
@NikiC .....ow? Aren't they meant to work on all things that are foreach-able?
 
@Abe Without the text thing
@Danack Eeerrr yes sorry charset
 
Abe
@PeeHaa why that? how would an UA interpret it?
 
@Danack i guess you need to implement a lot more for that to work as expected, looking at php.net/arrayiterator
 
@PeeHaa what exactly are you trying to do?
 
Fuck if I know. @Abe I am working with a horrible system. Which routes stuff in a horrible way so lets just say there is no easy way for me to plug into it find out what the actual mime type I need to send, but I need to change the charset @Danack
 
3:07 PM
@alcohol you don't need to implement anything. It is it's own implementation:
$foo = ['aaa', 'bbb', 'ccc'];
$obj = new ArrayIterator($foo);
foreach ($obj as $value) {
    echo "$value \n";
}
 
And yes I am looking for a quick fix where I should actually fix it proper
 
@Danack they work on array and objects, but only in the sense of simple object iteration (over properties)
 
@Danack i meant, if you want to accomplish the same, e.g. in my scenario
 
@alcohol so your data can't be transformed to the appropriate array? The stuff is looked up dynamically?
 
@Danack i don't follow?
 
3:10 PM
This is the 21st century, why are people putting down "AJAX" as a listed skill on their CVs?
 
@alcohol Sorry if I missed it in the scrollback, but why are you calling current() and friends on Iterators?
 
@salathe cause I stupidly assumed that would work
 
Abe
@peehaa
class TextContentType{
    function __construct($encoding, $defaultMime = "text/plain"){
        $this->encoding = $encoding;
        $this->mime = $defaultMime;
    }
    function setMime($mime){
        $this->mime = $mime;
    }
    function __toString(){
        return $this->mime . "; charset = " . $this->charset;
    }
}
 
Anonymous
@Sean because it is better than knowing jQuery
 
Abe
using something like this perhaps?
 
3:11 PM
@NikiC what's the point of that behavior…?
 
@alcohol hehe, that's fair even if wrong
 
@Abe I don't have a sane way to get the mime type
 
Abe
(and evaluate it as string later)
 
@NikiC it appears to be interacting slightly with the Iterator interface 3v4l.org/C6MvK - i.e. the current() value is 3. I guess that is just an artifact of magic.gif.
 
Are do you want me to push everything as text :P
 
Abe
3:12 PM
you set a default mime, like text/plain, then you tune it (with $obj->setMime($nowihaveit)) once you get it
 
@Danack As I already said, current() family on objects works using simple object iteration
That means iterating over properties
Your first property happens to have value 3 there
 
Abe
and evaluate as string only when needed (string)$obj
 
@Abe Yep, overengineering everything. \o/ And encoding vs. charset btw. :P
 
Gah… I'm each time more annoyed about the three-way comparison operator it's being presented like an important feature of PHP…
 
@NikiC where do you get the value 3 from? i don't see it :\
 
Abe
3:15 PM
@kelunik yeah. #fail
 
@bwoebi but... but... spaceship!
@alcohol the position property
 
ah right
 
@salathe That's a stupid name… Let's call it three-way comparison :-)
 
@Abe The issue is that there might not be a "nowihaveit" moment
 
@alcohol The 3v4l link @Danack posted above
 
3:16 PM
As said. This horrible is horrible
 
cause it does increment. but reset() doesn't actually trigger a reset() call on the iterator implementation
 
@bwoebi That sounds like it's comparing three valus
$a < $b < $c That's a three way comparison...
 
@bwoebi yeah, do we actually call it the spaceship operator in the docs? *goes to check*
 
@NikiC what does reset() call then? \Seekable's seek()?
 
@alcohol It doesn't call anything
 
3:17 PM
@alcohol no, none of those functions have any bearing on the Iterator
 
It simply has nothing to do with Iterator
 
@NikiC so its impossible to create a class that can be treated as an array?
 
Maybe they'll get it if we both shout the answers :P
 
@salathe I said it before and I'll say it again … spaceship operator is a failure … PHP should have listened and implemented <-o-> and |-o-| instead. tie fighters are just cooler
 
Abe
@PeeHaa how is that possible
 
3:18 PM
@alcohol yes.
 
Abe
in that case, serve it as plain text, no?
 
alright :p
 
@Gordon and such good timing if PHP 7 had those operators :)
 
@alcohol You can only make a class that behaves as an array under certain operations. Iterator is used to make it behave like an array under foreach iteration
 
@salathe yeah, but no … missed opportunity
 
3:19 PM
@Abe In the land of crap systems everything is possible
 
@NikiC yeah it's not very clear from the documentation which interface / implementation allows for which behaviour, imho
 
@alcohol you saw the comment? Your data appears to be a flat array, and you don't appear to be modifying it while you iterate over it (only when the object is created)....so you can just return an ArrayIterator that contains the data, after you've poked the keys.
 
Fuck it I'll just rewrite it and be done with it
 
Iterator is not really making an object behave like an array, it just so happens that Iterators and arrays (and boring objects) are iterable (with a small "i")
 
Abe
Content-Type: text/x-i-have-no-freaking-clue; charset=UTF-8
 
3:20 PM
:P
 
Content-Type: text/yaml; // will solve your problems
 
@Danack yeah, but that seems like more work than I am doing now.
 
.....4 lines of code...
 
@Danack i was just playing around with Iterator. not sure if i will even keep it
 
Good news of the day: I'm getting a PHP 7 elephpant. *happy dance*
 
3:21 PM
@Danack no i mean like, creating a whole new array just for the sake of that..
 
Everyone should be using generators anyway, iterators are sooooo last decade :P
 
@Danack also it works as is already.
 
(As an SPL fanboy [for better or worse], I didn't just say that)
 
    public function getIterator()
    {
        foreach ($this->countries as $country) {
            yield $country[$this->iteratorKey] => $country;
        }
    }
 
Wishes he could be as cool as @salathe, what with his elephant herd, and his dynamic data generation
 
3:23 PM
@NikiC huh i didn't consider it like that yet, nice
does that actually work though? I thought getIterator had to return an instanceof Iterator. plain arrays don't work?
 
a generator object, which is an iterator.
 
ah right
 
please somebody ping me ... (I'm doing an experience)
 
@Shafizadeh experiment*
 
tnx
 
3:36 PM
ping @Shafizadeh
 
@salathe - there's so much more to SPL than just the iterators, as a SPL fanboy myself, I can recommend the cool that is Generators, and still use SPL datastructures etc
 
@MarkBaker good point :)
 
Mooorningsss11
 
Good morning
 
3:51 PM
@MarkBaker What structures?
Also, generators aren't really SPL…
 
Nope, Generators are a better alternative to the generic iterators in SPL
But SPL has stacks, queues, heaps, fixedArray, doubly-linked lists, priority queues, etc as datastructures
 
@MarkBaker the only data structure worth using in SPL IMHO is ObjectStorage
the rest of them are a bit... sad
@HassanAlthaf yes
 
Thx
Nice lecture btw @ircmaxell
 
thanks
 
3:56 PM
@Fabor Well, My experiment was done! Thanks.
 
Unfortunately had to skip a lot. I have limited internet data.
 
@salathe if strings have been pulled properly, everyone who contributed should be getting one (or at least the vast majority should)
 
@ircmaxell oh really, that's great news for everyone :D
 
@ircmaxell - yet still typically more memory efficient than userland equivalents, not always much faster though, and they all have some drawbacks
 
how would contributed be defined?
 
3:59 PM
@ircmaxell SplQueue can be justified as well
 
@NikiC Not in my opinion
because there is no peek function. And iteration is non-destructive
 
Queue and Stack are identical, just the retrieval flag setting, and they're both dependent on dll
 
@ircmaxell Justified in the sense of better than array_shift
It's unfortunate that SplQueue and SplStack both extend SplDoublyLinkedList
 
@NikiC in that sense all of them are justified. In the sense of "are they good at what they do" not so much
 
Apart from just being wrong design, we'd also be able to provide more efficient implementations in that case
 
4:01 PM
I find every time I need a queue or stack, I make my own, because I just can't stand the spl structures (they don't have what I need, and they have what I don't want)
@salathe not up to me, but how I've been pushing it is code committers, RFC voters and documentation editors
 
Editors with a small "e" I hope :)
 
Which means I'll still miss ot, as my commits were all done by dsp
 
yeah code authors (using Git terms) would be better
"Hey, you nice person who made a PR that got merged... here you go!" :)
 
@salathe that's already done for php-src, it's a lot harder for docs tho
 
It's rebecca day for real tommorow
 
4:04 PM
@ircmaxell the list is also muuuucchh smaller for docs, I'm betting.
the hard part is, no contact info for the contributor :(
(we should totally move to Git)
 
@MarkBaker you have code in 7?
@MarkBaker did you do a PR?
because you're in neither of my lists
 
Only inherited from 5 - SPL dlls
 
actually, DSP has no commits in 7 either
 
so, php7 release in December? :p
 
(the things you don't like :)
 
4:07 PM
gist: php 7.0 contributors by commit number, 2015-11-20 17:32:32Z
[tyrael@Ferencs-MacBook-Pro php-src.git (PHP-7.0 ✗)]$ git shortlog --summary --oneline --no-merges PHP-5.6..PHP-7.0|sort -r
  1878	Anatol Belski
  1563	Dmitry Stogov
  1144	Xinchen Hui
   728	Nikita Popov
   287	Bob Weinand
   120	Andrea Faulds
    97	Kalle Sommer Nielsen
    97	Christoph M. Becker
    93	Stanislav Malyshev
    64	Jakub Zelenka
    57	marcosptf
    57	krakjoe
    53	Anthony Ferrara
    52	Rasmus Lerdorf
    48	Christopher Jones
    44	Remi Collet
    44	Aaron Piotrowski
    43	Reeze Xia
    36	Michael Wallner
    35	Timm Friebe
    34	Pierre Joye
    34	Julien Pauli
    32	Tjerk Meesters
    30	Yasuo Ohgaki
    29	Márcio Almada
    25	Ferenc Kovacs
    25	Daniel Lowrey
    24	Lior Kaplan
    23	Adam Harvey
    17	Andrey Hristov
    16	Sara Golemon
    15	Matteo Beccati
    14	George Wang
    14	Danack
    13	Levi Morrison
    13	Derick Rethans
    11	Popa Adrian Marius
    11	Brad Broerman
    10	Florian MARGAINE
     9	jfha73
     9	Nuno Lopes
     9	Joshua Rogers
     8	Antony Dovgal
     7	Johannes Schlüter
     7	Gustavo Frederico Temple Pedrosa
     7	Felipe Pena
     6	Martin Jansen
     6	Leigh
     6	Keyur Govande
     6	Joe Watkins
     6	Hannes Magnusson
     6	Côme Bernigaud
     5	Trevor Suarez
     5	Sobak
     5	Nikhil Vimal
     5	Nayana Hettiarachchi
     5	Kévin Dunglas
     5	Guilherme Blanco
     4	Wei Dai
     4	Scott
     4	STANLEY SUFFICOOL
     4	Jeff Welch
     4	Edgar R. Sandi
     4	David Zuelke
     4	Anton Blanchard
     3	Дмитрий Пацура
     3	Veres Lajos
     3	Steven Hilder
     3	Sebastian Bergmann
     3	Mats Lindh
     3	Masaki Kagaya
     3	Juan Basso
     3	Gernot Vormayr
     3	Elan Ruusamäe
     3	Dominic Luechinger
     3	Dmitry Patsura
     3	Andreas Heigl
     3	Adrian
     2	王星星
     2	zxcvdavid
     2	root
     2	nikita2206
     2	mcq8
     2	Stanley Sufficool
     2	SammyK
     2	Rouven Weßling
     2	Peter Cowburn
     2	Niklas Keller
     2	Matthias Breddin
     2	Mariano Iglesias
     2	Magnus Määttä
     2	Lauri Kenttä
     2	Julio Pintos
     2	Joey Smith
     2	Jille Timmermans
     2	Jefersson Nathan
     2	Gustavo André dos Santos Lopes
     2	Francois Laupretre
     2	Dreamsxin
     2	Daniel Persson
     2	Christian Wenz
     2	Cameron Porter
     2	Bogdan Andone
     2	Alexander Lisachenko
     1	zhangjiayin
     1	zborboa-google
     1	xingxing
     1	vlakoff
     1	unknown
     1	softwarespot
     1	renyongquan
     1	olshevskiy87
     1	nil0x42
     1	n0ts
     1	matbech
     1	matason
     1	m.bennewitz
     1	lesniewskister
     1	julien.pons
     1	jrchamp
     1	hakre
     1	gron1987
     1	c9s
     1	Yuchen Wang
     1	Willian Gustavo Veiga
     1	Tim Siebels
     1	Thorsten Rinne
     1	Taoguang Chen
     1	Shafreeck Sea
     1	Sebastian Brandt
     1	Sean DuBois
     1	Scott MacVicar
     1	Sammy Kaye Powers
     1	Ryan McCullagh
     1	Rodrigo Prado
     1	Richard Quadling
     1	Radu Brănișcan
     1	Pierrick Charron
     1	Peter Dave Hello
     1	PeeHaa
     1	Paul Tarjan
     1	Paul Oehler
     1	Paul Annesley
     1	Ole Markus With
     1	Nicolas Grekas
     1	Michael M Slusarz
     1	Metalaka
     1	Maxime BESSON
     1	Mathieu CARBONNEAUX
     1	Marc Bennewitz
     1	Lynn
     1	Loïck Piera
     1	K.
     1	K
     1	Josef Šimánek
     1	Jin Hu
     1	Jan Starke
     1	James Titcumb
     1	Ingo Walz
     1	Hugo Fonseca
     1	Hugh Davenport
     1	Havard Eidnes
     1	Geolim4
     1	Freek
     1	Frank Stolle
     1	Fabian Franz
     1	Eric Stenson
     1	Eric F
     1	Dominic
     1	Di Wu
     1	Dejan Marjanovic
     1	Davey Shafik
     1	DQNEO
     1	Colin O'Dell
     1	Chuan Ma
     1	Christian Weiske
     1	Chris Wright
     1	Chris Tankersley
     1	Chris Christoff
     1	Caleb Champlin
     1	Boro Sitnikovski
     1	Arjen Schol
     1	Ard Biesheuvel
     1	Archil Imnadze
     1	Anthon Pang
     1	Andy Footner
     1	Andrew Smith
     1	Andrew Murray
     1	Andrew Kehrig
     1	Alexander Moskaliov
     1	Alexander Moskalev
     1	Aidas Kasparas
     1	Adil Ilhan
     1	Adam Saponara
I really want to see github.com/morrisonlevi/Ardent get in as php\Collection
 
Aside: I wish we finally got around to shipping PHP code in extensions.
 
@salathe Would also make contributions easier. edit.php.net sucks.
 
@HassanAlthaf yes
 
@kelunik huh? how does SVN vs Git affect that?
 
Cool to see b-trees in that collection
 
4:12 PM
@salathe At afup Francois mentioned that he has something working for that
 
@kelunik I don't know. I once tried to do a build locally, and now I only ever use edit.php.net
 
And will send a mail to internals sometime soon
 
@NikiC yeah there's a (wip?) PECL ext for it
 
@salathe Because simply editing something on GitHub and adding a PR is a lot easier than using edit.php.net.
 
Anonymous
true
 
4:13 PM
He also mentioned that it blocks on function autoloading if you want to defined free functions. (hint hint @ircmaxell)
 
@kelunik we could use GitHub today if we wanted to
 
@NikiC I know. I'm waiting on an implementation from someone (hint hint @JoeWatkins)
 
@kelunik I think edit.php.net is pretty fine. The main problem is docbook
Submitting a typo fix: Okay. Actually creating docs: Not really simple with docbook
 
@kelunik also, feel free to PR against my GitHub mirror if you really want to
 
@MarkBaker Which ones do you use?
 
4:17 PM
i.imgur.com/hvwqiad.png -- Haha, good job, GitHub
 
Stacks and Heaps for the most part... of used Queues a bit for playing around; plus my own implementation of Trie and QuadTree datastructures
 
@NikiC Well… the docbook rendering system is a bit simplistic and complex at the same time.
@MarkBaker Everyone I know just uses an array for a stack.
What do you use a heap for?
(Not playing around stuff)
 
@LeviMorrison I don't think he's talking about rendering the docs
 
I access a few external json/xml datasources that come back unordered... I've taken to parsing the data directly into objects on a heap with a callback for the sorting, and then I can iterate over the data using a foreach and its sorted for me
If you need the ability to peek at a stack, then using an array is more efficient than SPLStack
Example of that heap use would be unordered GPS location data, dumped on a heap with a sort that calculates distance from a fixed point
 
Interesting.
I think everyone I know would just wrap the array.
Also, do you ever get hit by the fact that array heap iteration is destructive?
 
4:23 PM
Yes, I even posted an issue on github about the destructiveness of SPLHeap - got closed on the grounds that "its meant to work that way"
I find it downright annoying..... while I appreciate that you can't re-order, that doesn't mean you won't wan to iterate over it multiple times.... espacally if you need to get min/max/median/etc as well as the full dataset
 
@HassanAlthaf was a bit of a bad timing given that it still says I'm a mod when I stepped down two days ago, but the interview was done before that. and it always feels a bit embarrasing when people think I am famous. I certainly don't feel like I am :)
 
Not github.... bugs.php.net
 
@MarkBaker I hate that, too. it should have a flag or separate class to control that
 
Of course you're famous Gordon, I know you
 
@MarkBaker Famouse maybe :D
But it was a nice opportunity to praise everyone I know. You room 11 guys are in it, too
 
4:28 PM
@Levi - but SPLStack/Queue are more memory efficient when pushing large volumes of data, and if you only need to peek at the top of a stack it's not too much of an overhead, it's peeking at the bottom of a large stack that's painful
 
@MarkBaker Isn't heap iteration pretty fundamentally destructive?
 
@MarkBaker peeking at the bottom should be a disallowed operation. And currently you can't peek at the top, you have to pop it then re-push it
 
Do you think it's worth mentioning on the annotations thread, that native annotations can be implemented right now in an extension?
 
how?
 
"@@" syntax and zend_process_ast hook
 
4:36 PM
how is @@ supported? because it's just a double-error-suppressed expression?
 
@ircmaxell - not if you extend the SPLQueue and add a method to offsetGet()
 
silence child of silence, parse out your annotation stuff, remove node from the tree
 
Season's greetings or seasons greetings
 
@MarkBaker huh?
 
@NikiC -the PHP implementation definitely is, but there's times when it would be useful to iterate over a heap multiple times
 
4:38 PM
@MarkBaker Imho that's just not a heap
If you want to iterate multiple times, what you're looking for is just creating an array and sorting it
 
@NikiC *cough* clone *cough*
 
My example ws if I want to get max/min/median values, and then get all the data in a second pass..... can't be done, I need to do it in a single pass
 
As an unrelated note, there is an O(n) median algorithm on unsorted arrays
 
I've not tested my SPL/array performance comparisons with PHP7 yet, I really will have to see how much it reduces the value of SPL datastructures for their memory benefits
@NikiC - is that new for PHP7?
Or simply that it can be done in userland code?
 
@MarkBaker No, just relating algorithm trivia. I was surprised there is such a thing
 
4:43 PM
@ircmaxell Peeking with an SPLStack without needing to pop/push
 
@MarkBaker "extend from queue" though is... huh?
 
Yes, it would be nicer if stack/queue provided a native peek() so that it wasn't necessary to extend
 
@MarkBaker Because it is designed to work that way ^^
@MarkBaker There is still some memory benefit, but it's not as big.
And arrays have typically been faster since 5.3.
@MarkBaker Not sure what workaround you used; did you end up cloneing it?
(Do they support clone?)
 
@LeviMorrison yeah heaps support clone, that's what I've done to iterate over them multiple times
 
If only we had copy on write structs or classes!
 
4:51 PM
Last performance tests I ran SPL FixedArray/Queue/Stack compared with array implementation was against 5.6.something and SPL was still faster, though the differences weren't as great as against 5.4 when I first ran them
 
:D
Oh oops; I meant 5.4 here.
 
I have a feeling that running the same tests against php7 would show a lot less benefit to SPL
 
Be sure to test actual uses and not just a benchmark for benchmark's sake.
 
I use parsing/evaluating complex Excel formulae from a large real-world spreadsheet as a benchmark for Stacks
 

« first day (1867 days earlier)      last day (3080 days later) »