« first day (1413 days earlier)      last day (3538 days later) » 

1:00 AM
perl?
 
@cspray Some (rather prominent) things haven't changed, unfortunately.
 
Fortran?
 
Visual Basic 6
 
@DanLugg Now you're trolling
 
1:00 AM
COBOL
 
RPG
 
@cspray I don't think Fortran changed that much
I mean I don't follow newest Fortran trends but I don't think it's very different from what it was 10 years ago
 
The point being that for a high level language that has changed a lot in that time frame you should look at how it is today
Not how it was way back when
 
Ada <3
 
@NikiC Okay, this is what I have now ... it fails two of the torture tests, but from what I could tell that's legit :)
 
1:02 AM
Alright, I'm probably in the ballmer spike, so I'm gonna see how I fare
Check ya'll later.
 
@cspray Well, and today PHP still offers me the echo-into-response model as default, still has broken and inconsistent naming, terrible documentation, is still slow as hell, and error handling is as bad as it was
 
Fuck off.
 
@BartekBanachewicz Those are at least real arguments.
 
I don't mind PHP hate I just dislike it when people come in and say "I used PHP 7 years ago it was awful"
 
1:03 AM
@bartek slow as hell, in respect to what?
 
Terrible documentation? What are you comparing that against?
 
@cspray PHP "7" ;-)
 
@DanLugg Fetch me a beer, will ya, and a leg, too.
 
@DanLugg Dammit
 
And if you call php's documentation terrible, I would hate to see what you consider good documentation...
 
1:04 AM
@Ja͢ck If something isn't perfect it's absolutely terrible and simply will not do.
 
@ircmaxell That's a trick question because I know what you're working on :P
 
@webarto I can give you a beer, but my legs are off limits until I go to the store.
 
What am I working on?
 
real php compiler.
 
@derp probably ...
 
1:05 AM
And where did you hear that?
 
Google told us
 
little birds tell me things all the time :)
 
He heard it in opposite way of vagina.
 
Eih
 
Hey, UString class question
 
1:06 AM
you might have also accidentaly mentioned that in the js room
 
Would making ->split default to splitting on whitespace be good?
 
anyway it was a nice talk but I realy have to go to sleep
 
That's handy in some cases
 
@AndreaFaulds Yes.
And can the API accept an array instead of a mask string?
 
i.e. " 1 \n 3 2 \t\r\n 5"->split() => ["1", "3", "2", "5"]
@DanLugg wat
Oh, an array of separators?
 
1:07 AM
^^
 
@AndreaFaulds why not act as str_split unless separator given?
 
Then you may get further with tokeniser :)
 
hi everyone
 
@webarto No, that's what I'd want ->split("") to do
Almost, anyway
 
i need help in organizing my data
 
1:08 AM
Actually, ignore that I just said that "" should do that, it shouldn't
 
if any one can help
 
@Ja͢ck Tokeniser is overkill for some applications
 
@AndreaFaulds splitting on empty delimiter is somewhat of an oddity.
 
@AndreaFaulds Then I wouldn't make default at all.
 
@AndreaFaulds strtok() is overkill? lol
 
1:09 AM
@AndreaFaulds Should split on nothing, no?
 
@Ja͢ck Oh, that's what you mean. I hate strtok(), it's evil
 
@DanLugg Same as str_split, I guess.
 
"foo"->split("") // ["foo"]
Eh... I suppose, I'd think it'd be more like explode()
 
@AndreaFaulds what's evil about it?
 
@DanLugg "abc"->split("") should be ["", "a", "b", "c", ""] imo
 
1:10 AM
@Ja͢ck global state (if it works the same as in C)
 
@Ja͢ck Global state, horrible to use
I'd like an iterator version
 
@BartekBanachewicz Okay, I meant to implement it with strtok_r() obviously.
 
Also one that doesn't skip blank parts
 
Unfortunately, strtok() on php itself is still evil.
 
I basically want an iterated ->split
 
1:11 AM
More inconsistency, yay!
 
xsplit?
 
ugh
 
Nah, just make split a generator, not like BC with pre-5.5 needs to be preserved
 
@DanLugg Then you can't use it as an array without first converting it. Bad.
 
Ugh. Which is why we need array === Traversable.
 
1:12 AM
Sadly, PHP is not Haskell, so lists and generators are different.
@DanLugg But in this case ArrayAccess is what you want and a generator can't ever provide that
 
This is the problem with PHP (for you @BartekBanachewicz) -- you suggest a feature, and it doesn't work quite how you like, so you say "gee, well why don't we do that thing that doesn't work right differently?" and the cascade begins.
 
@DanLugg ? strtok does suck though
 
@AndreaFaulds perhaps a preg_split() =D
 
someone said haskell
 
@BartekBanachewicz Yes, yes I did
 
1:14 AM
@AndreaFaulds No, I was referring to the array !instanceof Traversable problem.
 
@DanLugg uh oh
 
@AndreaFaulds Unfortunately, there's not much we can do about strtok right now ... unless you would consider .. ahem .. resources
 
@Ja͢ck ...?
 
well , i have a category table , and in same table i have sub categories with the parent Id , now i have an issue here , i have a category named , fruits and the i have a category named weigh , then all fruits that will be listed in menu will have a weight as a subcategory and if i want the weight of apples , i have no clue how to ask for the weight of apples and then the one of oranges , since all top categories of fruits will have a subcategory weight
 
1:14 AM
Oh wow, that sure is lonely
 
in Haskell, yesterday, by Cat Plus Plus
Butts
 
@AndreaFaulds strtok($str, $token, &$lasts)
 
hope it's clear
 
@Ja͢ck Still a horrible API. What I want is this: foreach (xexplode("f,o,o", ",") as $part) { ... }, couldn't be simpler.
 
@AndreaFaulds we talked there about a month ago, then there was a time I didn't really have time for hobby stuff. Now I came back to it and I'm sucked in again, so I frequent the room more often.
 
1:17 AM
the main idea is that the top categories has 3 recurring subcategories
 
@AndreaFaulds I read that as sexplode (zexplode, actually, but y'know)
 
@AndreaFaulds So that's what .. like explode() but trims the spaces around the delimiter?
@DanLugg $explode
 
@Ja͢ck No, it's explode but as an iterator
 
wat
 
I honestly believe the array/iterator disparity needs to end.
 
1:18 AM
@DanLugg Impossible.
 
@AndreaFaulds is your split() basically python's?
 
Not if $array instanceof Traversable // true
 
You guys are over complicating things. If you excuse me, I'm going to get drunk and sleep to forget this madness.
 
@derp UString::split === explode or Python's split
 
@webarto lol, I'm getting drunk to engage in this madness.
 
1:19 AM
@DanLugg There'd still be a disparity, iterators cannot be indexed
Again, Haskell :P
 
neato
 
@AndreaFaulds All arrays are iterators, but not all iterators are arrays.
Oh, right. Okay, $array instanceof Traversable|ArrayAccess|Countable
 
anyway thnkyou
thank you
 
I'm okay with ArrayIterator for now heh
 
@Ja͢ck Basically, I want an explode() iterator because of a serious server-killing performance issue which forced me to switch to strtok, which has a shitty API and ignores blank items
 
1:20 AM
but certain operations would be nicer if they supported Iterators
 
@Ja͢ck s/certain/everything twice/
array_map($iterator, $f) should be valid.
 
Yes ^ that
But, e.g. array_diff() on iterator is still bogus.
 
How so?
 
It just is.
 
Why?
 
1:22 AM
Because iterator != collection
 
Mapping, filtering, ... those kind of operations should be opened up for iterators too
 
Okay, so we need Collection extends Iterator, ArrayAccess, Countable and $array instanceof Collection
And then, array_map(callable $f, Collection $c...)
 
Unfortunately, array_map() would have the consequence of having its output be an array instead of another Iterator :)
 
IMO arrays should be IteratorAggregate not Iterator, I hate that position is part of an array, they shouldn't be stateful
@Ja͢ck Make iterator_map;)
 
1:24 AM
Ugh.
 
haha
Having position inside an array is what makes foreach fast.
 
Implementation detail -- userland shouldn't see that.
 
Despite the funky issues that come with such a thing
@DanLugg But they do.
 
function iterator_map(\Iterator $iterator, callable $callback) {
    foreach ($iterator as $key => $value) {
        yield $callback($value, $key);
    }
}
 
@Ja͢ck s/do/shouldn't/
 
1:25 AM
Right
 
@Ja͢ck That's not true, it's not slower to use an external HashPosition AFAIK/reasonably believe (am I wrong?)
 
HashPosition is fast, but is that what foreach uses?
 
@Ja͢ck No, foreach uses the internal array pointer I think, which is bad
 
Right, because ... where else would foreach keep that information? Inside opcodes? heh
 
@Ja͢ck Zend VM state. We already store info hidden from userland about function execution...
 
1:27 AM
Alrighty, smoke and then hopefully work
 
well, that would be something then ... I think @LeviMorrison was also suggesting to get rid of the internal pointer before.
 
Yeah, as has @NikiC
 
ok I was wrong.
andreas-air:php-src ajf$ php -r '$a = [1,2,3,4]; foreach ($a as $b) { foreach ($a as $c) { var_dump ($c); }}'
int(1)
int(2)
int(3)
int(4)
int(1)
int(2)
int(3)
int(4)
int(1)
int(2)
int(3)
int(4)
int(1)
int(2)
int(3)
int(4)
 
@Ja͢ck meh, I still think it's better to make it entirely unrestricted
 
I guess foreach doesn't set the array pointer?
 
1:29 AM
@NikiC I did that .. but it broke more test cases heh
 
andreas-air:php-src ajf$ php -r '$a = [1,2,3,4]; foreach ($a as $b) { foreach ($a as $c) { var_dump (key($a)); }}'
int(1)
int(1)
int(1)
int(1)
int(1)
int(1)
int(1)
int(1)
int(1)
int(1)
int(1)
int(1)
int(1)
int(1)
int(1)
int(1)
Yep.
 
^^ Totally legit
 
@Ja͢ck sure
probably gonna need an rfc :D
bc break and stuff
 
Oh woah, woah, hold up guys.
 
@NikiC Yeah, of course :)
 
1:30 AM
@Ja͢ck I'd be in favour of getting rid of the array pointer, it's stupid. If people really need to manually iterate over arrays, we could add some sort of userland API for i- oh wait, ArrayIterator :D
 
but I do think that the limitation is stupid and shouldn't be there
 
You guys are having a conversation about arrays, traversables and functions that should work on both of them and you didn't invite me until we hit the Internal Array Pointer?
I'm seriously offended! :D
 
679
A: How 'foreach' actually works

NikiCNote: This answer assumes that you have some basic knowledge about how zvals work in PHP, in particular you should know what a refcount is and what is_ref means. foreach works with all kinds of traversables, i.e. with arrays, with plain objects (where the accessible properties are traversed) and...

 
@NikiC I think the case of <<<EOD [...] EODA [...] EOD` should work properly though.
 
@Ja͢ck no, it shouldn't
 
1:32 AM
@LeviMorrison By the way, I thought of a new benefit of nullables: function (Thing? ...$foo)
 
you can specify the end string like literally yourself
choose one that doesn't conflict...
 
I suppose that's a fair argument.
 
Besides, how many HEREDOCS can you not name SQL, EOL or HEREDOC?
 
XML, HTML
JSON
YAML
hehe
 
1:33 AM
EOS, EOM
 
Use <<<'XML' but put JSON in it!
 
@NikiC Oh, I'd forgotten about that post. Thank you for reminding me how foreach is actually implemented, more complex than I remembered ^^
 
nah, put sgml in it
 
Seriously though, you guys talk about iterators and you invite me so late :'(
 
@LeviMorrison We sincerely apologise for that ... it will happen again, though, surely, as all things happen :)
 
1:34 AM
:D
 
Thoughts on naked catch and naked throw? as in catch { throw; }
 
alright, gotta head to the office soon ... we're doing the musical desks today
try ... catch my drift
 
@DanLugg wtf does that do
 
Nobody wants to catch naked things.
 
Equivalent to catch (\Exception $e) { throw $e; }
Use case, catch { /* cleanup that's not finally */ throw; }
 
1:37 AM
ah fuck, somebody messed up the documentation for ** =(
 
@NikiC Wouldn't the solution to the internal array pointer be to allow HashTables to track extant HashPositions?
 
Alternatively, I suppose it could be simply rethrow { /* cleanup that's not finally with implicit throw */ }
 
@AndreaFaulds yes
 
@NikiC Any good reason we shouldn't do that and scrap the internal array pointer?
 
1:38 AM
I've had an implementation of that for php 5.x
may be ported to ng
though it won't rid us of the iap
 
@NikiC Why wouldn't it?
 
unless we drop current/next etc, which I don't think we'll do
anyway night
 
@NikiC You could emulate the iap for them for BC by implementing it in reverse
 
Keeping IAP for current(), next() is not the end of the world.
 
@Ja͢ck True, but you don't need keep it for those functions anyway
 
1:41 AM
Not using it for foreach would be great though
@AndreaFaulds Wouldn't that complicate matters? And for what?
 
arrayPositions = map(<some hashtable> => <some position>)
next(array) {
    arrayPositions[array].next()
}
In pseudocode, that is what you could do to get rid of the iap altogether.
Has its own problems though ;)
 
Yeah, I wouldn't want to go down that rabbit hole just for 4 bytes saving :)
 
@Ja͢ck Yeah, it gets scarier when you consider how you handle dead arrays
 
:)
 
(Though I also have solved that :D)
 
1:44 AM
anyway, laters! cheerio~
 
night
 
2:38 AM
there's enough wrong with this that I'm not even sure what to flag it as stackoverflow.com/q/25560710/3942918
 
2:51 AM
@derp Just needs a bit of editing, the question is actually quite simple: "How do I use a different IP than my default one to make a network connection in PHP?"
 
3:05 AM
that's not really something you can control, because that's defined by your system's default route.
 
@Ja͢ck You sure? I'm pretty sure that's possible to control
Anyhow, fuck, it's 04:12. Goodnight.
 
Yeah, in your dreams ;p
 
3:41 AM
@DaveRandom Fortunately, I am on a safe side. Well, unless Russia invades Georgia.
Morning.
 
4:31 AM
@DaveRandom you are right, it's not safe in terms of word freedom here. Worse, they are about to control the internet. But good side - I'm moving to Berlin (October I hope). But thanks for asking :-)
 
http://pastebin.com/d8qrRnNk hi, this is my .emacs file, but whenever i do a M-x list-packages or
M-x package-refresh-contents it always shows Connection elp.gnu.something ... what is wrong in this file..
 
4:51 AM
Hello ... Anybody there??
 
 
1 hour later…
what is this madness ... github.com/trueinteractions/tint2
morningz all btw
 
6:32 AM
posted on August 29, 2014 by kbironneau

/* by Ernesto napoli1890 Minicone */

 
7:06 AM
Yo
I am trying to do a check on a pathname : I execute : wich gives me:
$path = current_path();
/photos/x123
/photos/y431
How can I do a check on photo's only?
if ( $path === '/photos/*' )... somethling like that
 
@JoeWatkins haha, build failed
 
7:22 AM
morningz @PeeHaa
 
hi i have problem in checking comparison of two strings that i have read from two files can anyone help me about it
@Duikboot you can use glob
 
@Duikboot strncmp()?
 
solved it
<?php if ( drupal_match_path($path,'incentive/*')): ?>
>> Waits fro the response 'auuww drupal'
 
when i read two equal strings from two files(both are in utf8) like msgid "" , length one of them becomes 9 and other one becomes 10 and it breaks comparison check
also i read strings using utf8_encode
but no luck
no one know about it ?
 
Morning
 
7:36 AM
good mornings
 
7:48 AM
Morning folks
 
morning
can someone explain to me, HOW exactly daily "status meetings", which take from 30min to an hour, improve the speed of development ?
 
8:03 AM
it can't, really.
 
well ... project managers in this company have begun using it
 
I found a way to make meetings shorter in my place of work.
we use an excelsheet... showing milestones and tasks... just shows percentage completion and comments for when target is missed.
sometimes, I just email the excelsheet to pm and line manager and we skip the meeting altogether.
 
^ why not use something like JIRA or redmine then? (I mean, tools which intended to solve such issues)
Good morning room
 
Work with dinosaurs... They like Excel, M$ Project, Outlook etc...
 
8:13 AM
@tereško daily 10-15 minutes status meetings are actually nice though
 
@FlorianMargaine I've always hated them. Especially because they where always first thing in the morning
 
mornings
 
jo chris
 
Morning. Are there any good PDO libraries/wrappers out there? For simple usage.
 
morning fab
@Fabien class PDOWrapper extends PDO {} your welcome
 
8:20 AM
lol I figured as much :)
 
@PeeHaa jesus fucking christ OP. That's why I just downvote and move on instead of telling OP his/her "questions" sucks
 
8:37 AM
Good moonings :)
 
posted on August 29, 2014 by kbironneau

/* by GoldenRaider */

 
class PDOWrapper extends PDO {
     private function __construct() {}

     private static $instance;

     public function getInstance() {
         if (static::$instance === null) static::$instance = new self();

         return static::$instance;
     }
}
@Fabien That is much better than @PeeHaa's version. ^
:-)
 
/me places @Leri on the hall of fame wall of shame
 
@AlmaDo :D :D Thanks.
 
@Leri -_-
 
8:43 AM
huh.. it's Friday, right? Unfortunately, for postmans its Friday too ):
 
@Leri are you intentionally hurting us ?
 
Off to my huge todo list. Later guys.
 
@BoltClock lolwut
 
internet makes me sad
 
8:44 AM
@BoltClock epic :-D
 
@tereško Yes. Well, flagged it, I hope someone will delete it. :-)
 
@DaveRandom I noticed I still had a local copy of WordPress 3.3 so I set it up and ran it for shits and giggles
It now correctly triggers a fatal error
But I never ran into this issue when I set up my blog two years ago (when it was the latest)
 
@Leri *punches @Leri in the face *
@BoltClock GET HIM!
 
class Test
{
   public function __construct()
   {
      self::$this->foo='bar';
   }
}

$obj = new Test;
var_dump($obj);
Never thought that's possible
 
@Leri you can always ask @BoltClock to do the needful
 
8:46 AM
@SecondRikudo Did you get invites with your registration?
 
=P
 
Idiots are so ingenious ..
 
@Fabien I haven't registered yet
Because I'm waiting for the shipping address (I only have 24 hours to buy once I calim the invite)
But I've heard that you don't get it instantly :(
 
@AlmaDo Why did you even try that?
 
3 mins ago, by BoltClock
https://core.trac.wordpress.org/changeset/19680 what
 
8:47 AM
@BoltClock Fixed in 5.4.22/5.5.6 apparently
 
@Leri not me. Wordpress guys ..
 
Oh, I am not surprised then. :-)
 
as well as
class TestParent
{
   public $foo = 'foo';
}

class Test extends TestParent
{
   public function __construct()
   {
      parent::$this->foo='bar';
   }
}

$obj = new Test;
var_dump($obj);
PHP ... is so .. PHP
@DaveRandom so not in 5.7 as I see
 
@DaveRandom Yep bugs.php.net/65911
 
@AlmaDo doesn't alter the scope though: 3v4l.org/22Zn2
 
8:50 AM
@SecondRikudo If US falls through you can send it here. Unsure on price difference though.
 
@DaveRandom for me it's "working"
$ php -v | grep built
PHP 5.7.0-dev (cli) (built: Jun  2 2014 16:38:55)
 
Yay, my extension reached 101 weekly users (I feel useful). :D
 
which extension?
 
@AlmaDo Note I changed the visibility on the prop in the parent class
 
8:53 AM
^ oh, I'm not chrome user..
@DaveRandom so, using it with shitty nasty way as ClassName::$this->prop is ok ? :-p
 
@AlmaDo I'd port it if I had some more free time...
 
hm, I like chrome when it comes to German sites :-p since I'm too lazy to setup translator to my FF
but since I'll learn German soon, I think that problem will disappear
 
I've heard German is hard to learn.
Not sure myself, because never tried to learn.
 
@AlmaDo No I just wondered if it actually did anything
 
@DaveRandom I'm hungry for free rep so I'mma post a question "Why the hell did self::$this work two years ago" and you can answer it and get free rep too mmk
 
8:56 AM
lol :-P
Ooh @BoltClock passed 250K, gratz
 
@DaveRandom Thanks :3
 
I think that's worth at least a few intarnet points
 
@BoltClock uh? example?
 
15 mins ago, by BoltClock
https://core.trac.wordpress.org/changeset/19680 what
Actually just scroll up
We were just talking about it
 

« first day (1413 days earlier)      last day (3538 days later) »