« first day (972 days earlier)      last day (3992 days later) » 

1:00 PM
@ircmaxell It's a gmail account.
 
@crypticツ considering that the creater of jsfiddle is willing to customize it for SO i doubt we'll see that
 
@Ahmad Google doesn't know this -> f-i-r-e-k-i-l-l-z-at-g-m-a-i-l-.-c-o-m
 
@dragon112 not how I meant it... Google knows it, as it will appear in search results
 
@Mr.Alien google.nl/…
They have a lot of results there
 
btw is it fine to have Kontoeröffnung online in URL? an O with two eyes?
 
1:02 PM
@ircmaxell Is the entire chat history indexed? Hmm might have to watch what I type then :p
 
@dragon112 yes it gets indexed haha :P
 
I don't think the chat gets indexed, it was the reason I typed the id normally
 
it's indexed
 
1:04 PM
@dragon112 Every message, ever typed. ever.
 
:(
booo
am flagging
 
@MadaraUchiha every everything ever typed ;]
 
OH NOES!! Time for a "Alu-hoedje"
 
@ircmaxell one day I pushed random keys to generate a random name for /tmp/ directory and it was already there
 
@zerkms huh?
 
1:05 PM
@CarrieKendall Yahoo GeoCities, services come and go. Lack of funds, time, etc can all contribute to a website being here one day and gone the next. It's even more common with individuals who run a service than with major corporations.
 
that wasn't random
ROTFLMAOSHTSCOMNAIWEDS is an actual acronym...
3
 
I don't know how they manage that monster, millions of page indexed daily
 
@ircmaxell I needed just a temporary directory and randomly pressed something on keyboard
 
How to implement parallel computing with two way communication between main process with children?
 
@ircmaxell Wait what... What does it stand for?
 
1:06 PM
and it repeated another set of "random" keys I did a day before
 
suddenly
 
@crypticツ not disagreeing on that point, just assuming that SO will take up his offer (because it would add a LOT of value)
 
@Mr.Alien obligatory protip to you and everyone mod flagging email addresses or other stuff they dont want to have in the chat: if you dont want it on the internet, dont post it on the internet!
 
@dragon112 Rolling On The Floor Laughing My A$$ Off So Hard That Soda Came Out My Nose, And I Wasn't Even Drinking Soda!!!
8
 
can anybody help me regarding express checkout of paypal
 
1:07 PM
@Gordon Yap
 
@ircmaxell LOL! In what situation would you use that acronym?
 
EPIC-LOL situations
 
@CarrieKendall SO may very well purchase it from him, if they think it's in the best interest of the site to prevent link rot. That would be wonderful if SO did and integrated it into the site.
 
It'd need to be REALLY REALLY REALLY funny...
 
like when you laugh so hard you can barely breathe
 
1:08 PM
It's been a while since I had one of those moments..
 
@dragon112 it's called being old
 
But I'm 24 =(
That's not old..
 
Can i use PCNTL for this?
 
sad but true it is old
 
@dragon112 yes it is
 
1:09 PM
Sh*t, when did that happen..?
 
@dragon112 last Friday, did you not get the memo?
 
@crypticツ yeah, it would :] i also think it would help new users in certain tags, but that also brings up the requests for having a testing tool for every language imaginable which brings a lot of overhead
 
I never really read memos... Guess I should start reading them
 
@crypticツ no, but this friday I got the meme
 
oh... it's friday, friday...
 
1:10 PM
@Gordon Damn you, I fell for it... AGAIN
 
53M views
 
@Gordon FUUUUUUU
 
@Gordon I got the meme today - zf :p
 
Rebecca Black- the only person to ever outdo Rick Astley
 
@CarrieKendall Not true: youtube.com/…
 
1:12 PM
@dragon112 A long time ago :)
 
@Jack Now that I know I'm old my back starts to hurt ouch :p
 
what's special with Rick Astley?
I see him a lot in my internetz
 
@dragon112 so true, atleast Astley doesn't sound like he has a lemon stuck up his nose.. AND that's with voice enhancement
 
cya later peeps
 
@CarrieKendall I guess that's true.. Rick Astley still has more views tho..
Bye bye!
 
1:14 PM
@CarrieKendall What does that sound like?
 
So... what about parallel processing in PHP?
 
1:15 PM
@Gordon i hate you.
 
@Gordon Rebecca Blacked! >.<
 
@Gordon Dear mother of god...
 
@Gordon You won't know when. You won't know where. But one day, I will get you back for that
 
the really funny thing about it is that it's blocked by GEMA and I don't even know what it sounds and look like :D
 
@dragon112 that video is 4 years old.. rebecca black will pass that view count soon
 
1:18 PM
I suppose :)
 
She's got the insanity streak.
 
@CarrieKendall flag
 
I looked at chat at the wrong time :-\
 
@CarrieKendall She reminds me of the 'Overly attached psycho girlfriend' meme
 
1:21 PM
but look at the light in her eyes, nevermind its red >;]
 
@dragon112 true that
 
The one that says "Google Maps says it only takes 15 minutes to come back from work, you took 17 minutes ... WHO IS SHE?!"
 
Yes.
That woman looks scary(ly much like my girlfriend) >.<
Wait, this is indexed isn't it?
 
user652649
@CarrieKendall
 
user652649
1:25 PM
11 secs ago, by Wes
@CarrieKendall
 
9 mins ago, by dragon112
@Gordon Dear mother of god...
 
user895378
@sectus what about it?
 
@rdlowrey I'm sure he meant serial processing in PHP ... easy mistake to make ;-)
 
@Gordon shouldn't typo questions be deleted as well? why just closed (referring to meta.stackoverflow.com/questions/167342/…)
 
@Jack , now, paralleling processing to computing pi number be Monte-Carlo method.
it test task... i need only direction for paralleling...
I think that i can use PCNTL for it.
 
1:31 PM
Hmm, how would one calculate PI using parallel computing ...
 
user895378
Meh, pthreads would be much easier for something like that than PCNTL.
 
@Jack , it's easy, something like this: math.fullerton.edu/mathews/n2003/montecarlopimod.html
 
@CarrieKendall I am all for deleting them but there is no common consensus about deletion. a lot of those will likely get autodeleted after some time.
 
@rdlowrey , one of requirements of test task is in using processes
 
@Gordon Really? I see typo-questions with upvoted answers all the time
 
1:34 PM
@sectus why not take something like gearman?
 
@Gordon just curious if i should be the ones i come across
 
@zerkms , can i use two way comunication with gearman processes?
 
@CarrieKendall i leave that to your discretion
@NikiC yes, I didn't say "all of them"
 
@sectus there are 2 queues: request and response
 
@Gordon Sure. I was wondering about the "a lot" part ^^
 
1:36 PM
@zerkms , two way communication is part of requirments... : )
 
user895378
@sectus If you need two-way communication between processes (like an actor model) you're going to have a difficult time with PCNTL.
 
@sectus what is the original task?
 
user895378
To simulate something like that in PHP you probably need to employ shared memory and develop your own lightweight messaging protocol so the different processes can talk to one another.
 
user895378
Or you could, you know, use pthreads which already does that kind of heavy lifting for you :)
 
@zerkms , calculate pi number using parallel calculation in php with two communication with children processes... : )
 
1:37 PM
@NikiC you can still cast delv-votes on questions with answers though, right?
 
using mont-carlo
 
@CarrieKendall sure. this is about the auto-deletion ;)
 
Believe it or not, I've only recently started looking into the data mapper pattern ... if I get it right, the Gateway is a dependency of the Mapper, correct?
 
user895378
@Jack I think so, but @tereško would probably be the best person to ask on that subject.
 
1:41 PM
@rdlowrey or use sockets, or even something like zeromq for the communication.
 
watta
@Jack no , gateway and data mapper have "common ancestor". Those are different patterns structures that perform same task for domain model (folwers term ... i think in this context it was meant as domain object an not the whole business layer)
 
@NikiC: when you get a few, can you review: github.com/ircmaxell/php-src/compare/… ?
 
@tereško What's the ancestor?
 
@ircmaxell is this what I think it is?
 
what do you think it is?
 
1:44 PM
tail call elimination
 
@Jack "common ancestor" .. as in phylogeny
 
user895378
@igorw True. Of course in PHP those options are really different from processes in name only. With sockets or ZMQ you still have to develop your own protocol for multiplexing the communication. In all three cases you're just doing stream IO.
 
@igorw other way around
 
both structures are result of same concept: separation of domain and storage logic
 
@tereško Ehm .. okay, so what do you make of this tutorial then? :)
 
1:46 PM
right now, it's recursive depth-first. I am making it a non-recursive loop...
basically so deep array structures don't cause stack overflows
 
ah, this is for GC
 
user895378
I spent a lot of time fighting with level-triggered ZMQ frustration. Then when I realized I could do the same things much faster manually with libevent + sockets I kicked ZMQ to the curb for good.
 
yeah
 
@ircmaxell Is there a bug report on that?
 
@Jack "clusterfuckus vulgaris" of terminology
 
1:48 PM
@Jack no, it's not technically a bug yet
 
lol
@ircmaxell But you would need to make it one to test it? :)
 
@ircmaxell the bug was a deep recursion in the garbage collection process, leading to stackoverflow for deeply nested structures?
 
@tereško Okay, so where can I find a better guide then?
 
ah, saw it now :)
 
also , @Jack , when applying Java patterns to PHP, you always have to remember that they do not have simple "php array" analog. Which, for example, is why there appear value objects (or derivations of them) where in php you would just us an array.
 
1:50 PM
@igorw exactly
 
@tereško You mean the recordset?
 
that would could be one of the cases , yes
 
@rdlowrey that's because you're trying to make zmq strictly non-blocking which defeats half of the point of zmq. yes, level-triggered events are tricky. but you only have that problem if you bring your own event loop.
@rdlowrey zmq ships with a convenience poller, i.e. its own loop that handles that stuff in a semi-blocking way.
 
@Jack Recordset != ValueObject (Java) != ValueObject (DDD) != Array
 
@Gordon , when applying a pattern to php you might replace a recordset with an array
 
1:53 PM
Ah okay, except for the next() call :)
 
they are NOT the same, but they can be used to solve the same problem
 
@tereško that yes
 
I.e. multiple records return value.
 
user895378
@igorw Yeah, but the poller it ships with sucks because it uses the (non-performant) system select(). epoll()/kqueue() will blow it out of the water if you need any significant number of simultaneous connections. So if you're looking to maximize performance you have no choice but to bring in a better loop.
 
@ircmaxell That aint tail recursion anymore though, right?
 
1:55 PM
@rdlowrey it uses poll, epoll and kqueue if they are available.
 
user895378
@igorw How new is that (link?)? Because it didn't use to be that way for sockets.
 
@tereško Okay, so let's say I eliminate the RecordSet ... the way they're using TableGateway and Mapper, is that wrong then?
 
@Jack the "TableGateway" looks awfully like PDO API
 
user895378
> ZeroMQ uses advanced polling mechanisms like kqueue/epoll/etc for internal poller implementation (for io threads) only.
 
user895378
As far as I know you're stuck with select() when polling remote sockets.
 
@tereško Fair enough, but you could write an interface for it that could use PDO in the back ... but it could also be switched with a mock version of it.
 
♪♫ Faraday, Faraday, gotta get in a cage so I won't get fried, ey ♪♫
 
@Gordon Why do you torment us even more =(
 
he can't get the song out of his head so he punishes us
 
1:59 PM
@Jack at least one person who got the pun … ch
 
@NikiC No, technically not
because it's not purely tail recursion anyway
 
Ok, for clarity:
Since any hashing algorithm will inevitably produce the same output for multiple unique inputs (when the input size is wider than that of the output) the talk of collisions and broken algorithms refers to producing identical hashes for inputs of width equal to or less than the output width of the algorithm.
Correct ^^ ?
 
@Gordon Wow, bad pun :p
 
I'll rename those macros to something more appropriate (something like "INLINE_RECURSE()" or whatever
 
which bring us back to fact that that PDO has no interface that can be implemented
 
2:00 PM
@Bracketworks no
 
@Bracketworks Yes, correct.
 
@tereško Doesn't really have to be does it?
 
Ohh boy.
 
well .. you make a thin wrapper
 
Talking about collisions with respect to broken algorithms means that either 1. you can generate arbitrary collisions (meaning, that there are known inputs that collide) or 2. You can, given one hash output, generate an arbitrary input that will collide with said output
 
2:01 PM
@dragon112 pffff
 
All hashing algorithms, no matter how strong, have collisions. The key is that they are 1. unknown, 2. not predictable and 3. Not generatable...
 
@Gordon I have to admit, It did make me giggle a little.
 
@tereško Let me jot something down in php so we have something concrete to talk about.
 
or you end up mixing styles of API withing that same class: one parameter is requested to have a specific interface , another (which would be PDO) is requested with no interface at all , @Jack
 
Put it this way: SHA-256 and SHA-512 both have no known collisions. Meaning for every known input that has been tried, a unique output has resulted
 
2:03 PM
@ircmaxell I guess perhaps was only perhaps? ;-)
 
@bwoebi it went far quicker than I was expecting
compiling 2 builds now to benchmark them
 
even finding collisions for md5 is not such an easy task
 
well
 
@ircmaxell how quick? ah you are compiling now...
 
finding collisions, yeah
generating them is easy though
19
Q: Create your own MD5 collisions

russauI'm doing a presentation on MD5 collisions and I'd like to give people any idea how likely a collision is. It would be good to have two blocks of text which hash to the same thing, and explain how many combinations of [a-zA-Z ] were needed before I hit a collision. The obvious answer is hash ev...

 
2:05 PM
it takes time and resource .. i'm talking in context of other methods for cracking a password
 
@ircmaxell In github.com/ircmaxell/php-src/compare/… I don't think the branching is necessary. realloc should behave as an alloc if you pass it a null ptr
 
fair enough
@NikiC Orly? awesome
yes it will. Making the change now!
thanks!
 
@rdlowrey you are right. it does use poll which is a bit better than select, but not much. I assume you read the whole discussion?
I'd be curious to see the actual impact.
 
@ircmaxell at least the standard C realloc works this way
 
it might be a nice idea to check your own password for collisions in days when everyone used a single-pass md5 .. but these days even bad hashes will have some salt and two algorithms
and that is assuming that code was written by newbie ... or one of my coworkers
 
2:08 PM
i am just going to start including meta.stackoverflow.com/questions/2950/… in my edit comment when removing salutations, thanks, etc.. -.-
 
@bwoebi yeah, pretty straight forward
 
@ircmaxell Anyway, the main consideration here will be showing that the changes do not regress performance
 
Sorry, I got called away from my desk and 'd right after starting that discussion.
 
@NikiC Well, it may actually improve CPU performance in a lot of cases (due to reduced function calls
 
Could anyone please explain to me the possible purpose of the following JavaScript?
 
2:10 PM
@ircmaxell it might :) need to show it ^^
 
            miniLink = /(^|\s)(\[([^\]]+)\]\((?:(?:https?|ftp):\/\/[^)\s]+?)(?:\s(?:"|&quot;)(?:[^"]+?)(?:"|&quot;))?\))/g,
            miniCode = /(^|\W)(`(?:.+?)`)(?=\W|$)/g,

    .....

                comment = textarea.value.replace(miniLink, "$1##").replace(miniCode, "$1##");
 
@MadaraUchiha You probably should be asking this in the javascript chat room
 
@NikiC But yes, I am building 2 exact same builds now to show it or not
 
user895378
@igorw Yeah. I mean it's totally fine for 99% of the use cases. I just didn't want to have to adjust things I needed thousands of concurrent connections (like for serving a websocket app or something). And almost invariably I want to track more than just the ZMQ streams in the event loop, so my use cases are more suited to manually using libevent.
 
user895378
I know what I want to do with the sockets manually and ZMQ's abstractions eventually just got in the way of that and slowed me down instead of making my life easier.
 
2:11 PM
@JohnConde Already have, they have no idea.
 
@ircmaxell github.com/ircmaxell/php-src/compare/… => What's this and what happens to the efree in this case?
 
@NikiC very good point
 
@tereško pastebin.com/Ni1JAMZf - that's my draft version.
 
why is your mapper creating instances ?
 
ehm, because it's a mapper, i dunno ...
 
2:14 PM
 
so what should be creating the instances in your opinion?
 
"not mapper"
 
so what should the mapper do?
 
@ircmaxell Ok, so just for further clarity, for a set of all possible inputs of width <= the algorithm's output width, is there any certainty for a given algorithm that there would be no collisions for that set?
 
@Jack exchange the information between storage and instance
 
2:16 PM
@tereško and what creates the instance to exchange data into?
 
@NikiC: running core bench: gist.github.com/ircmaxell/5782139
@Bracketworks no.
There are collisions that are theoretically possible. It's a statistical chance of getting them is all we know about... And it's quite low (and we've never even found one, for all tried inputs)
@NikiC: that's the best results from 5 runs on each (the best on each side)
 
@ircmaxell Gotcha, so basically regardless of the input space (whether less than or greater than the output space) all bets are off.
 
@NikiC: wait, those are invalid
 
@Jack factories and builders .. this is how i handles it
 
2:21 PM
@tereško Okay, I can imagine the factory ... that would get thrown into the mapper's constructor too I assume?
 
why would you want to inject a factory in the mapper ?
what if you have two mappers one-after-another applying data to the same object ?
 
@tereško reading that first; a bit unclear about the two mappers scenario, but I'll get back on that.
 
@Gordon that "a map" element looks a lot like repository or some cache
 
@tereško it's an IdentityMap obviously
It's not a Repository because it doesn't allow you to query by criteria
 
depends on how complex repository you are willing to implement
 
2:26 PM
@Gordon Why is the first call to "a map" returning "null"?
 
but yeah they all are basically doing the same thing: holding data, in case if you do not need to get it all the way from database
@Jack because element with that ID has not been mapped yet
 
the diagram is the example from POEAA
 
i know =P
 
@tereško I guess that's Fowler logic then ... it didn't make sense to me lol
It does now.
 
@NikiC: here's the updated correct benchmark: gist.github.com/ircmaxell/5782139
 
2:28 PM
@ircmaxell k. i'd also run the micro_bench
 
@tereško Main reason to use IdentityMap is that you might be querying the same object twice in the request into memory and then you dont want a second one but the same one. Might not happen in PHP but certainly can happen when you have application servers
 
Ludique is the best :)
 
and maybe try out something that is particularly hard on the gc
I'm not even sure GC kicks in on any of those benchmarks ^^
 
running on it
 
0
A: How to get user image with Twitter API 1.1?

JimboThe user's profile image Okay, so you want a user's profile image. You're going to need to take a look at the twitter REST API 1.1 docs. This is a list of all the different requests you can make to their API (don't worry, I'll get to how you actually do this later on). There are multiple ways t...

 
2:33 PM
@Gordon it actually can happen in PHP. For example: viewing your own profile. Depending on how your app is structured, you might already have some (or maybe all) of user data loaded
 
@ircmaxell just seeing this:

mandel 0.286 0.229
mandel2 0.296 0.343

why is there a so big time diff in both?
 
@tereško yeah. not saying it cannot. i'd just say it will not happen too often due to the request only lifetime.
 
granted
 
@NikiC If not, there would be nowhere time differences bigger than 5 ms...
 
2:37 PM
@bwoebi I am not sure...
 
@tereško In your answer, the mapper basically gets its search conditions from the given user object right? so inside, you would have an if-else chain that tests several properties before giving up?
 
not really
in real-world situation there are only one or two conditions which you use the retrieve elements values by
 
yeah okay, I may have exaggerated on the "chain" bit :)
 
@ircmaxell btw. which is the PHP for those benchmarks?
 
so basically the way they're doing it in said tutorial is just crap? :)
 
@Jack well ... the while(rs.next()) { makes no sense .. it's like someone took the code that was meant for mapping a collection and applied it to single object
 
@ircmaxell @bwoebi Those micro benchmarks have pretty high variance
 
@NikiC: stressing the GC:
 
you need to average over many runs to get any signficant numbers
 
<?php
$counter = 0;
$a = array(&$a);
function fill (&$a, $i = 3, &$counter) {
    if ($counter++ > 200000) die();
    if (!$i--) return;
    foreach ($a as &$tmp) {
        $tmp = array($tmp, &$a);
        fill($tmp, $i, $counter);
    }
}
fill($a, 3, $counter);
 time sapi/cli/php test.php

real	0m0.528s
user	0m0.467s
sys	0m0.060s
^ that's the modified one
 time sapi/cli/php ../php-src/test.php

real	0m0.580s
user	0m0.539s
sys	0m0.040s
^ stock core
and those are best-case times
 
2:42 PM
@tereško well I meant in the sense that the mapper is creating the domain object :)
 
no , that part makes no sense
 
@ircmaxell and worst-case is?
 
Though, from what I gather off of @Gordon's page copy, it seems to suggest that the "PersonMapper" creates the "Person" as well.
 
you would either inject the object (preferably) or a factory/builder
 
@Jack just for the record. I think your pastebin.com/Ni1JAMZf is fine. The only thing to add would be the IdentityMap.
 
2:44 PM
Stock: 0.603 / 0.554 and Modified: 0.562 / 0.521
but when I say best-case I mean I ran it 5 to 10 times, and took the best result from each...
 
@Gordon Thanks. As I'm hanging out here more, I'm starting to get anxious whenever I start a new project or when I look back at an old one ... that somehow I'm doing "ugly" stuff lol
 
@Jack , for the record, i think that the only mistake there is the tight coupling to the class name .. rest seems acceptable
 
@ircmaxell ah okay… Are there then also situations where the modified one is significantly slower?
 
thought i still wouldn't call it "table gateway"
 
@bwoebi I don't know. Haven't run it yet...
I'm building a script to run more and run more times (and compute averages, etc)...
 
2:47 PM
@tereško You reckon that I could pass the potential UserFactory in the findById() method then?
 
no
 
so then how do I resolve the coupling?
in my example.
 
@tereško imo it doesnt matter whether he's using a factory to create the user or creating the user directly. By GRASP's Creator principle, creating the User in there is okay. Using a Factory would be okay, too. It's just a matter to decide what the Mapper should couple to. as far as I can see it's inward facing depedency, so that's okay to couple to the user
 
i'm just thinking that same mapper should be able to map some of the data of all descendants of same superclass
it provides you with neat API, when you need it, especially in long-running projects when you tend to try "lets write this and see what comes out"
@Jack the factory would be a mandatory dependency, thus, i would put it in the constructor
 
@tereško of course, in the style that you're using, whereby the conditions are given in the domain object itself, it's automatically decoupled :)
 
Rao
2:53 PM
Wordpress Question:How to get tag name from its id?
 
@Gordon looking up IdentityMap :)
 
identityMap is basically a runtime cache
 
@Gordon first hit lol
 
2:54 PM
ohhhhh, now I get the null return value from get(1) lol
 
@Jack another option would be to return a fresh object with that id in that case
 
I'm starting to recognize some of the stuff that Doctrine does :)
 
@Jack afaik Doctrine is heavily influenced by the patterns in POEAA
 
well ... i would store the data not the object
 
@Gordon You mean a clone?
@tereško wouldn't that be the concern of the gateway in my code? mapper saves object, gateway saves data.
 
2:58 PM
@Jack no, when find(1) does not return an object in the Mapper, you go the db and when that doesnt find the a record with id, you just create a new object with that id instead of returning null. might not be appropriate under any circumstance but you'll find when it's not.
 
@ircmaxell i had to watch x2
 
Some of the comments got way out of line there :/
 
hmm ... you actually might have a cached object there in the identity map
 
Oh yeah, that works too
 
... wha? jsPipe
 
2:59 PM
@igorw Smokin'?
 
as in : object was already created and now you are just storing the handler to it
 

« first day (972 days earlier)      last day (3992 days later) »