« first day (895 days earlier)      last day (4063 days later) » 

9:00 PM
@ircmaxell bcpow() and bcpowmod() are insanely fast
 
@dyelawn But on a moar serious note what was your question about? Was it that closure thing?
 
@PeeHaa yes
 
@kaᵠ again,
 
@ircmaxell 0 questions tagged :P
 
9:03 PM
guys
i need a name
 
@dyelawn In that case I will not have a satisfying answer for you I'm afraid. It's like somebody saying how many people eat strawberries? I don't like them in my life
What should one answer to that?
 
@tereško raymond
 
@tereško Vegeta
 
@tereško 42
 
i need a word that describes something that takse the URL and matches it against aliases .. though , this experiment in psychology seems fun too
 
9:04 PM
@tereško bad-guy-(c)
 
@tereško tereško
 
@kaᵠ Hah, sounds like BS :) Maybe you don't need it at PHP scripting level, but look at the opcodes, I'm sure there will be BW_XOR somewhere.
 
URLAliasMatcher
 
@PeeHaa i was trying to phrase facetiously, bc i always get eaten alive for conceptual questions in here; which wouldn't bother me, so long as it came with a good answer and increased knowledge
 
actually no , its not the URL , its th already computed request
 
9:05 PM
@kaᵠ ಠ_ಠ
 
flip it! ^
 
for example /foo/landing should be executing same page as /site/main
i want to remove the possible duplication of code by having known aliases for the computed route
 
@PeeHaa Oh, funny :P
 
echo ^ Peehaa; # ɐɐHǝǝԀ
3
 
9:08 PM
currently the list of names that a came up with on a buss :
Gateway
Mask
Transformer
Prism
Filter
Spindle
Nexus
Crossroad
Confluence
Translator
Intersection
they all suck
 
@webarto :))
 
Why not Router?
 
@Alexander because Router is already used
 
to try and restate more clearly (and with the preface that i'm likely to be convinced otherwise, given a decent response): closures are relatively new to php. while the benefits of other changes like namespaces and short array syntax are pretty clear to me, i'm having trouble understanding how closures benefit an author of php code.
 
9:09 PM
and working with aliases would be a separate responsibility
 
@ircmaxell Awesome.
 
@ircmaxell RIP eduard khil
 
yup...
 
@teresko guiser
@teresko or Eponymer
 
@tereško Alias ? ReRouter, Channeler, WaterWall, DirtWall, MudWall, LinkWall, Picker, Dummy...
 
9:19 PM
@tereško In that case Filter suits it fine. Problem is, I don't see it as part of bussiness but in the presentation tier :(
 
it's part of neither tier , it's something that would be used in the bootstrap stage
 
I am freaking rusty with design patterns
 
that's it @Alexander... Presenter
 
Eponymer is awesome
 
@tereško If the only thing it does it match aliases what about just a resolver of some kind?
 
9:22 PM
hmm
 
why not a Revolver
 
just use Shmeh
 
@tereško I don't know what you put in your bootstrap stage. But I wouldn't call it as such if it alters a request :(
 
/me mutters something about CakePHP’s 1.2 pagination documentation being full of shit
s/pagination documentation//
 
s/cake/turd
 
9:25 PM
@Gordon CakePHP 1.2...it is.
Better off writing your own.
 
cakephp is quite essential ... it give you a way to comfort yourself, when you look at the code that you have written and find it lacking .. at least it is not cakephp
 
@Pheagey doesnt matter which version :)
 
Ive not messed w/ 2.x so I cant say personally.
 
@tereško Actually that has been my motto for some time
 
although fun of bashing aside. I have written an application with cake which is still in production today. lots of legacy but it works.
 
9:27 PM
@PeeHaa , i could actually with that name actually ( or a synonym of it )
 
O yea, Cakes ao decent enough framework. Some parts are just lagging behind more than others.
 
Glad I could push you in the possible right direction :)
 
anyway. im off to bed. night all
 
later o great and fearless leader
 
lol
 
9:38 PM
@dyelawn Closures are useful with APIs that accept callbacks
 
@NikiC hm, i had not thought of that, that does seem like a valid use case. thanks!
 
E.g. if you are using preg_replace_callback they allow you to define the callback inline as a closure, rather than having a extra function somewhere else
same applies to array_map, array_filter etc
 
@NikiC True, but very few things in PHP require callback, it's not an event based language
 
@MadaraUchiha passing functions as arguments has no direct relation to event-driven programming at all.
 
@igorw No, but it has fewer practical uses without it.
 
9:46 PM
"Callback" in PHP is usually synonymous to "callable", it is not necessarily (or rather, not usually) meant as an event-callback.
 
@MadaraUchiha tnx madara for finding all those tags which shouldn't exist in the first place :P
 
@MadaraUchiha That doesn't really mean much. Async continuations are one possible use case for callbacks. One of many. As @NikiC mentioned, you can use it for filtering and mapping over collections, you can use it for function composition. You can use it as a substitute for factory and command patterns. Or really any piece of code where you want to delegate some responsibility to the caller without introducing an interface.
just because it's not that common in PHP and the language sometimes gets in the way, doesn't mean it can't or shouldn't be done.
 
9:54 PM
Hello All
@DaveRandom why do think this is duplicate : stackoverflow.com/questions/12891689/…
@PeeHaa how are you doing ?
 
@Baba fiiiiine. At last it's teh weekend
How is @Baba doing today?
 
@PeeHaa yeah .. holiday till Tuesday
 
@MadaraUchiha so that user script is full of some pretty ugly code and frankly there's not way I'm letting any of my carefully crafted beautiful code anywhere near it :-P however this is a glaringly obvious way to hook some things that I totally missed. Although there is still an issue with what specifically we are doing with the linkifier, because the lookups have to be asynchronous.
 
@Baba yep :)
 
@PeeHaa i know am really going to get wasted
 
9:57 PM
@DaveRandom Mmhm, did you salvage anything useful from there though?
 
@MadaraUchiha Oh yes, mostly just a reminder that $(el).bindAs() exists
 
The hell is that?
 
@Baba idk, I guess I didn't read the dupe properly. That question is a dupe (I assume, I'm sure I've seen basically the same question before), but the question it's closed against isn't really suitable
@MadaraUchiha "exists" is the wrong word actually, "can be done" is more accurate
 
@DaveRandom Ok ...
 
jQ lets you manipulate the order of event handlers, which browsers don't natively give you
So you can define extensions that let you define a callback to be executed at the beginning of the queue. I've seen it done before, never had a use case before now though
 
10:04 PM
why would you care about the order of event handlers ?
 
When you are injecting overlay code into an existing site with a userscript/browser extension
 
hmm ..
 
@igorw i was hoping the discussion of closures might draw you in, as i've begun looking at silex as a rapid prototyping tool for applications.
@peehaa now that i've had the requisite amount of alcohol (2 beers) to be unafraid of you people and your only-contextually-apt-by-the-longest-of-tangents video clips from an outdated television show, i'm ready to address the analogy of closures in my statement as strawberries in yours.
it's more like me saying how many people eat strawberries? i don't like them in my deep dish pizza. i understand strawberries, and i find them useful in certain places. just not deep dish pizza.
 
10:13 PM
That doesn't apply to closures in PHP though. Closures are useful PHP, regardless of taste. Strawberries are only useful in a deep dish pizza if you consider pizza to be a dessert.
 
my point being, that in my (admittedly limited) practical experience, i've used php as kind of a "rulemaker" and javascript as kind of a "rule-abider". i like being able to review source quickly as Class->has properties standing for these things->has functions which accomplish these tasks
@DaveRandom oh i'm sure they are; niki c's use case was one i had not thought of. and bc i do a substantial amount of api work, probably one i would use
 
It's Good Friday, Friday, gotta die on Good Friday. Gettin' ready for the Crucifixion. Gotta make my mind up: which cross should I take?
f* awesome :D
 
and i'm looking at integrating websockets in a product right now; that's going to throw my understanding of responsibilities all out of wack. closures just seemed like a really big change to the complexion of php.
 
@Baba That´s what days like these are for. Getting wasted on working on personal projects
 
@dyelawn That's because you write PHP in a certain way. Event-driven stuff is powered by callbacks, closures can be useful for that. Although admittedly I usually find myself passing array($obj, 'method') in the end. But that's not to say they aren't useful - I very rarely pass anything other than a closure to preg_replace_callback() for example
 
10:19 PM
@PeeHaa far from that ... PS3 + Beer
 
@dyelawn See in all the websocket work we have done, there are very few closures, it generally makes more sense to call a method of an existing object because usually you are reporting some data back to an object or making it do something when something happens
 
@DaveRandom sorry, that was a non-sequitur; i just meant to relate how closures confused my understanding of responsibilities
and you've talked about this with me before; how a language shouldn't be limited to a role
 
@DaveRandom Well of course you don't want to closure ALL the things, but if you're not going to reuse it anywhere else, then it's cool.
 
the only reason there is so much callback abuse in event-driven programming is because those languages fail to provide decent abstractions and language constructs to deal with the underlying async nature of execution.
 
@dyelawn To a degree. Obviously you wouldn't use PHP to write GUI apps. Certainly not with any of the current approaches anyway. The PHP-GTK stuff seems to have stalled.
@igorw true
 
10:26 PM
in JavaScript, Mar 13 at 1:40, by rlemon
(Random Fact, when rlemon was 13 he pooped on a slide. he isn't proud of it, but he felt it was time to confess. I'm sorry slide.)
 
@PeeHaa lolwut
 
Can anyone recommend a good sunglasses with polarization?
 
@webarto, bought some from tesco today, £7, better than my father in laws £120 pair
 
@Ocramius Hah, I'd rather go for Google Glass in that case :P
@bizzehdee Well that's the problem, lots of them are s* and they are expensive.
 
10:28 PM
that's just lcd, but is still polarized :D
 
Let's all go to Tesco, where @bizzehdee buys his best clothes, da da da dah, da da da dah, he thinks they're really nifty, 'cod they're only £1.50, da da da dah, da da da dah
 
@DaveRandom, dont buy clothes from tesco, just picked up the sunglasses as they were next to the electronics desk when i was picking up a pack of dvd-r
 
Meh, had an opportunity to pull out a primary school classic and I took it.
 
@DaveRandom I buy everything at Tesco like local store, only thing is that I'm fat and I can't find good clothes (odd sizes). They import from Germany, coat costs 50€ and price tag is 250€.
 
In PHP, when you invoke the parent constructor from a sub-class, do you have to invoke it as the very first line in the sub-class constructor (similar to how it's done in Java)? Or can you include some code before invoking the parent class constructor?
 
10:32 PM
@DaveRandom It's maybe stolen fell of a truck :P
Related.
 
@ElliotB. The order doesn't matter. It's whatever makes sense to your logic
 
the reason i felt that nikic's api use case was so valid, was that at any point, an api developer might release a new version that alters the methods you're using, or maybe even kill a perfectly good api all together. so there's no purpose in spending time with architectural considerations
 
In Java you'd get an error if you executed code in the subclass constructor before invoking the parent constructor. No error in PHP I take it?
 
@ElliotB. no
 
sweeeet
 
10:36 PM
echo @Peehaa^"1\x4\r\r\x041"; // <- actually works
@webarto ^
 
but when closures are included as something of a generated attribute or property, that's confusing to me, and moves more to an adoption of some syntactic sugar to draw in the code now, define later jquery proselyte
 
@kaᵠ echo 'PeeHaa' ^ ' '; :P
 
now, time to g out
bye .*
 
HAH
F* CHALLENGE
$pee = 'PeeHaz';
echo ++$pee;
Can you write @PeeHaa?
 
10:48 PM
@ElliotB. i usually call the parent constructor first, so that the child can "override" or "expand" the parent when necessary
 
Does this page look wrong to anyone else? stackoverflow.com/questions/tagged/…
The questions at the bottom have single-digit votes
 
Hm, this seems that it's not sorted in any way :S
 
@Baba I think the existing answer is quite decent :)
 
@igorw two questions, then i'll stop pinging you: 1) jekyll seems a lot like silex; any inspiration or influence there? 2) would silex be the "right" tool to add a new, reactive feature set that is dependent on web sockets to an existing app?
 
hi @all, I'm looking for a search term: in Google+ we insert a link and it does grab an excerpt and an image from the link. What should I search for in SO?
To do this kind of info grabbing.
PHP, I develop in WordPress
 
11:00 PM
2
Q: Sorting questions by vote is incorrect

Mike BLooking at http://stackoverflow.com/questions/tagged/php?page=1&sort=votes&pagesize=50 It starts off sensible but the last few questions have single digits vote, the last one being 0. The first item on page 2 has 142 votes. Votes drop off suddenly: Note sure if this is tag-specific. ...

 
@dyelawn silex is a "micro-framework", jekyll is a static site generator.
I once built a jekyll clone with silex and wget. silex operates at a lower level, it's a library that you can use as a building block.
 
thank you. the rudimentary examples in the introductory documentation of each look similar to the other's
 
@dyelawn jekyll is a tool. you give it files, it does stuff for you and gives you a pretty website. silex, you need to build your own site on top of.
 
@igorw Silex is cool. Kudos.
 
@igorw how about my use case? i've got a product running on symfony, but want to move more interactive stuff to websockets (product is an adaptive teaching engine, websocket usage will be quiz/test taking). i'd like to separate this new feature entirely to avoid breaking my current product. is silex the right tool for v0.0.1?
 
@PeeHaa meta.stackoverflow.com/a/156335/172217, if you're interested.
 
or should i just use ratchet all by itself
 
Don't kill me. But why have I picked up somewhere that PHP is dead ?
 
11:26 PM
@OliverSchöning this might give you some insights of "X is dead" subject: youtube.com/watch?v=g7tvI6JCXD0
 
@OliverSchöning you have been in a C, Java, or ruby chat?
 
@webarto you say that like it's something special. I'm flattered though.
 
Nah. Read it at some point I guess. I am a big fan of JavaScript though. @dyelawn
 
that would also explain
 
@dyelawn if your question is "is silex a good tool for prototyping" I would say definitely.
 
11:27 PM
that was the one i asked a while back :)
 
the web-sockets part is going to be mostly decoupled from silex anyways, since it needs to run on a separate web stack running in parallel.
 

« first day (895 days earlier)      last day (4063 days later) »