« first day (725 days earlier)      last day (4205 days later) » 

1:00 PM
@tereško Uses by ExpressTrain to package and deploy, right? ;)
 
user50049
1:14 PM
@tereško I'll go for weep on rails
 
Rubbish on Rails
4
 
user50049
@Gordon Saving develops meters of walking every day since 2012
 
Hi all
I have query about fb graph api
@bongnavarro @Gordon @TimPost @Leigh
can you help me in FB Graph API ?? @bongnavarro @Gordon @TimPost @Leigh
 
@Vinay stop pinging us
 
user50049
@Vinay if you have a question, just ask it. There's no need to ping all of us to death
 
user50049
1:18 PM
@Vinay If someone can answer, they will.
 
ohh ok
so can you ?
 
And we have a new winner of the tiny avatar award!
 
Aaaand another tiny avatar
hah!
 
user50049
What is this 'Facebook' thing you speak of?
 
Coincidentally, a guy at work called his newborn daughter Ruby. Yes, I did suggest he called her Python to avoid her getting teased at school, but he didn't seem convinced.
 
1:21 PM
wtf? not even viper has ext/XSL installed?
 
I used javascript SDK for posting a message on FB User's wall. But i need to attach a link with message ? how ? @TimPost
 
user50049
You do realize this is the PHP room, yes? You might want to try the JS room?
 
i am too PHP developer dude
@TimPost
 
user50049
Right, dude, but your question is about the JS SDK.
 
@Leigh :D
 
1:23 PM
i know ... i just asked like me anyone else can have knowledge of FB Graph API @TimPost
GOT !!! @TimPost
???
 
@Vinay I know a guy who's familiar with your problem, but he's not here
He usually idles here
 
user50049
plonk
 
@SomeKittens thanks
 
@Tim is sooo obviously not a regular here, trying to help people, bless his heart.
 
@Leigh He should have called her Lisp <runs and hides>
 
1:25 PM
@DaveRandom that is an awesome pun
 
user50049
That's it! Plonk On Rails I'll be famous.
 
I have a friend with a lisp who was very curious about what we were doing in our AI class
"So what language do you guys use?"
fortunately he had a sense of humor about it
 
Should have just said Scheme
totally plausible :)
 
speaking of Lisp, did anyone have a look at github.com/lisphp/lisphp yet?
 
wow, igor gets about a bit :D
 
user1125394
1:29 PM
bury no liars
 
@Gordon wow, that looks interesting. What's the purpose?
 
user50049
A common LISP interpreter written in PHP? That's from the 'because-i-could' department?
 
@TimPost Same guy who maintains React, so yea, a lot of his stuff is "because I could" :)
 
user50049
@Leigh It's .. amazing .. just .. wow I wish I had that much time
 
@SomeKittens what @TimPost said :)
 
1:39 PM
Lisp is really easy to implement though. Similar to Brainfuck ^^
 
user50049
I will kick anyone who posts the XKCD to go with that music. You know who you are.
 
A basic lisp implementation is something like 30 lines
 
@TimPost which one?
 
user50049
I shall endeavor to replicate M4 in PHP
 
user50049
@Gordon Yes.
 
1:42 PM
@TimPost do you have a link?
 
user50049
@Gordon I was being sardonic. It's the "These are your father's parenthesis ..." one
 
@TimPost i was just trying to make you post the xkcd so you have to kick yourself
 
user50049
@Gordon This I know.
 
@TimPost I prefer this one though:
 
@TimPost damn, am I that easy to see through?
@NikiC I was wondering if there should be something like coffeescript for php
 
user50049
1:45 PM
@Gordon Nah. I used what you linked to make a time machine, so I have an unfair advantage.
 
@Gordon Why?
 
@NikiC because!
@TimPost oh, come one! FOUL!!
 
@Gordon And anyway, coffeescript sucks
The only sane thing that one could do on top of PHP is making it strictly typed and using that to remove quirks :P
 
Ugh, strict typing. I hate (at least Java's implementation of) it.
 
Dude, strict typing is awesome
 
user50049
1:53 PM
I have seen PHP put to interesting uses. I've seen it (mostly) replace sysvinit, halfway replace apt, some really weird FUSE attempts ultimately resulting in one that sort of works, but I did not ever imagine seeing a LISP interpreter being produced.
 
@TimPost Every language has a lisp interpreter ;)
 
user50049
@NikiC So it would seem. Wait, BF?
 
user50049
Or every non-esoteric language?
 
As I said, lisp is nearly as easy to implement as BF ;)
 
The only lisp interpreter I've ever written was in lisp, which kinda defeats the purpose.
 
1:55 PM
Baba and Mihai are strong contenders for Repwhore of the Month Award: stackoverflow.com/questions/12820917/…
 
@SomeKittens I know that one. It's called eval, right? :P
 
@Leigh On the subject of people with unfortunate names, check this guy out
 
@NikiC There were a few tweaks, but that was pretty much it. The fun part was rewriting it so that it used infix notation to completely defeat the purpose of lisp.
 
@TimPost I found a dupe for it
 
@SomeKittens You should have called it Lifp
 
user50049
1:59 PM
@Gordon That doesn't really help the OP realize why his question wasn't .. good.
 
user50049
You are welcome to link to the dup in comments, but that is just way too localized.
 
@TimPost are we allowed to tag questions with ? :D
 
user50049
@Gordon No.
 
@TimPost How about ?
 
user50049
@DaveRandom No.
 
user50049
2:02 PM
But I am considering
 
how about ?
 
user50049
my code is a bird, your down votes are irrelevant
 
user50049
Oh wait, there was none.
 
@Gordon I prefer layer 0, where you just use paper
 
@DaveRandom ooooh, old school
@TimPost is it considered rude to tell people to stop answering dupes?
 
user50049
2:07 PM
@Gordon I can't give a blanket answer to that. Some dupes are more interesting than the stuff they dupe
 
user50049
A little duplication is o.k. and we do have a system in place where new users need at least ~100 rep to be able to do most things users want to do.
 
user379888
Hi all.
 
user379888
I am to give my final year project idea to my university. I am looking to do something inside cloud. Any ideas?
 
user50049
What got me hooked on SO was not the rep game, it was more like .. 'I wonder what THAT feature looks like!'
 
user379888
I have the options of reverse engineering dropbox, a recipe sharing system and a shared IDE on my list.
 
user50049
@StartupCrazy The dropbox option is most interesting, as you would be exposed to a lot of stuff.
 
Shared IDE is probably a bad idea
 
user50049
For instance, a 'nice' breadth first walk of a file system is not easy to do.
 
user50049
And you have to do that every time you start.
 
user50049
2:14 PM
Then you have Windows, Linux and Mac to contend with when it comes to watching for changes.
 
user50049
And then you have versioning. So it would definitely be a learning experience.
 
user50049
@StartupCrazy How much time do you have to get it done?
 
@StartupCrazy the sanest choice would be the recipe sharing system imo
 
@Gordon There's already one. It's called Pintrest
 
@SomeKittens funny. I always though Pinterest was a virtual toilet wall
 
user50049
2:31 PM
@Gordon If you're a biologist, toilets are a great source for recipes.
 
user379888
@TimPost: Thanks.
 
@Gordon Hmm, I want to split a string up, now what might I call a function that did that if I was designing a language...
 
user379888
@TimPost: I have a year. I am afraid I would not be able to give all my time to it as I freelance too.
 
user50049
@StartupCrazy Just don't get too far out of what you know if the time constraints won't land in your favor. Yeah, go with the recipe thing
 
user379888
@Gordon: Thanks
 
2:33 PM
@DaveRandom anything but str_split because that would be too obvious
 
@Gordon Yeh, str_split is just not pregy enough.
 
user50049
@Gordon We need a str_please(int $mode ... ...) for such occasions.
 
I prefer magic( variable number of arguments )
 
user50049
Even in PHP, of all things, people get caught up with strings. It doesn't get much easier than PHP when it comes to strings.
 
@TimPost Don't forget to call str_thankyou() afterwards or it won't work the next time you call it.
 
2:37 PM
@TimPost you got a point there. we should rename it to simple_str_split
 
user50049
@DaveRandom Garbage collection does that, no need.
 
user50049
But you can do it if you want.
 
str_them_up()
 
explode($children)
 
2:53 PM
@Gordon Lets delete that.
 
@NikiC yes, lets delete everything
SO GAMES - DELETE EVERYTHING
 
 
@Leigh let's delete that too
 
Sorry, need you to give me 5k worth of bounty before I can assist ;)
 
@Leigh cant spare that atm
 
3:04 PM
@Gordon I'm going to watch your rep so I can give you the 100K upvote.
Only needs one more
 
simplexml is such a piece of garbage when it comes to xpath support
@DaveRandom will probably take two more weeks
 
@Gordon I have recently come to the conclusion that SimpleXML is a piece of garbage full stop. There's just too much it cannot do. If your data is simple enough for SimpleXML to cope with, use JSON.
 
is stackoverflow.com/a/12822317/208809 really the only options to get at the innerText of a SimpleXml element?
 
Anyone know a nice dupe for implementing Countable? (ref: stackoverflow.com/questions/8510061/…)
 
Question title is a bit shit
 
@DaveRandom What if you're dealing with an API that only returns XML?
 
@SomeKittens edit it
 
@Gordon No, you can also cast it as a string
 
@SomeKittens DOM every time. I don't care that it is more complicated, it's more predictable.
 
3:13 PM
@SomeKittens no, you cant. that will give an empty string
 
@SomeKittens Doesn't work for anything below the element you cast, just been trying.
 
in his case: echo (string) $xml->note->body; would work
 
@Gordon done, should be more review friendly now ;) (since they only check the title of the linked duplicate - mostly)
 
@NikiC It's part-serious, part-sarcastic.
 
@LeviMorrison Definitely a benefit to having people veto stuff
 
3:18 PM
@SomeKittens nope. see codepad.org/0yHoDgmP. Also, the string cast will happen implicitly when you use echo
 
@Leigh I am 100% for properties and get / set functions. I am 80% against the particular proposal.
Some people say that ugly syntax is cosmetic only.
I will disagree.
 
I've voiced my opinions too
 
I think the way Dart handles properties is also the way PHP should.
 
@Gordon If there is a better way I can't find it. I think dom_import_simplexml($element)->nodeValue is as clean as you're going to get.
 
@DaveRandom if simplexml wasnt so crappy with XPath I could do ->xpath('/note/body/text()) but no, it cant handle that
 
3:21 PM
Also, we shouldn't need to include an unset method for properties.
 
@LeviMorrison With a "?", that's very ruby, so no, that's not nice
 
@Leigh lol, no, that's saying that a return type is optional.
 
@Gordon That's weird. I've used string/int casts for SimpleXML throughout my project and it's all worked fine. (I thought that's how echo worked, wasn't sure)
 
Right phew
 
We also don't need to write an isset for the value.
The property will always exist.
In essence then, it's whether or not the value is null.
That can be accomplished via get.
 
3:24 PM
@Gordon DOM all the way. So many times I started writing in SimpleXML and then realised I couldn't do something and switched to DOM. I don't even bother any more.
 
@LeviMorrison This is one of the major disparities in my understanding and what is being proposed, apparently, it's not even a property.
It's just an alias name for the setter/getter. You still need to define a property
 
It's probably a moot point, as I'll switch to DOM since it seems like the superior class.
 
@SomeKittens Besides, learning DOM better will come in handy if you do JavaScript development.
@Leigh The syntax is awful. If it had a bit of sludge to it I'd be okay, but it is truly awful in my opinion.
 
@LeviMorrison I can see the benefit in isset, if you want to return a value from the getter, based on a composite of several properties, and not all of them are present
 
@Leigh Think about it, though: what happens if you call get when it is in that state?
 
3:27 PM
@Gordon Actually this is sort of viable. Not nice though.
@Gordon Sorry wrong link codepad.org/MtQQVBP3
 
@LeviMorrison But isn't that the point of isset, to determine if the state is correct? There's also no facility to avoid duplication. What if you have 20 fields and you want to apply the same sanitation logic to all of them via a setter.
 
@Leigh isset means the variable exists and is not null. That is all.
It is not more nor less and it sincerely bothers me when people use it for more or less.
 
@DaveRandom but why does codepad.org/SEb5a0aJ not work?
 
Of course, but in the getter you would probably check isset and return null if not anyway.
 
@Gordon Because body has no non-text-node children. That's expected XPath behaviour isn't it?
 
3:31 PM
@DaveRandom ah! right. implode(' ', $x->xpath('/note/body//node()')) then
 
Bah, lets just go and write our own language. PHP-like enough to keep it fun to work with, but sensible enough to be predictable
 
@Leigh . . . no, please don't do that.
@Leigh I believe it's called Dart.
 
No it's not
 
I'm not just saying that, either.
Dart looks like it will be a phenomenal language AND platform.
Of course, it's very young.
Many promising projects never gained traction.
Other promising projects get derailed and lose their promise.
 
@Gordon I don't even have an explanation for this: codepad.org/NFYQqozF
 
3:32 PM
@DaveRandom but that will give false results when there is more than level of children codepad.org/VlEUlkb4
 
lol
 
@LeviMorrison It's hosted on google code ffs
 
ima leave it at the two solutions I suggested
 
@LeviMorrison Uhm, do you have that in human-readable form too (as in non-spec)?
 
3:35 PM
@NikiC I don't, but I could write up an example somewhere.
 
@Gordon dom_import_simplexml($element)->nodeValue is the only thing I've seen that I would be confident in using.
Horrible as it is
 
@DaveRandom horrible indeed :)
 
@NikiC Also, I disagree with static get and set methods.
I would advocate not using that portion of the Dart spec anyway.
 
Well I started looking down the language tour, I already don't like it
 
@Leigh I will be using the optional typing in many, many places.
 
I honestly don't have many complaints with Dart yet. The only big thing is performance, which they haven't targeted heavily yet.
They're still working on a milestone1 release which is full implementation of the language spec.
 
I think I'm just going to get a barebones fcgi interface, and write all my apps in pascal.
because, i'm bored of all these half-assed languages
 
lol
I'm not familiar with pascal yet.
 
Delphi was the first language I used on a PC
 
@Leigh What happened to the Face-Keyboard-Assembler plan?
 
3:46 PM
@DaveRandom I outsourced it.
 
The more I learn C the more I think cgi should be used more.
C can be a really wonderful language.
 
user1125394
but not so much user-friendly
 
@cyril ...and PHP is?
 
Or even C++ if you avoid using classes. You may be thinking wtf? Don't use objects in C++? Wasn't that the POINT of C++? Well, originally, yes. However, C++ now has templates and some syntactic sugar that C does not have.
 
user1125394
@DaveRandom more with all the array_*
 
3:48 PM
@cyril . . . I loathe the array_* family.
 
@cyril No, that's just laziness friendly. User friendly would be a little consistency.
 
user1125394
right you can maybe make a lib with C with all those functions
 
Wow, the 2nd language I ever used had it's sources released :D clickteam.co.uk/downloadcenter.php?i=58
 
@LeviMorrison Why though would you not want to use classes?
 
@cyril Yeh you could, or you could learn how to do things properly. PHP arrays are kind of good at the aim of one-solution-fits-all-vector-types data stores, but they are insanely inefficient in a number of ways.
 
user1125394
3:50 PM
if you wrap C in a multifunctionnal language then it's ok, wait it's ruby
 
@cyril Also there already is a lib, written in C, with all those functions. It's called PHP.
 
@LeviMorrison Still waiting for the Dart example :)
 
user1125394
ok
 
@LeviMorrison What does everyone have against C++? I've never understood it. Is it just a bunch of puritans or are there some solid reasons? / cc @NikiC
 
@DaveRandom Most people who have something against C++ are people who can't program, I think.
 
3:59 PM
@NikiC I have discovered that most of my web programming does not truly benefit from OOP.
OOP code can take longer to write and maintain.
 
If you have a reasonable level of understanding for the language you will probably hate C++ in the same way that we hate PHP ;)
And if you don't have a reasonable level of understanding then you will hate C++ the same way other people hate PHP ;)
The languages are so similar :D
 
C is much simpler than C++.
 
@NikiC lol
It does seem to get hated on a lot. I don't really know enough about either to comment, it's been on my list of things to do for a very long time.
 
That does mean you have to write more complex code on occasion.
 
user1125394
but if you start to teach C to 15'years old, they will hate it, if you teach them ruby, more chance to work I think
 
4:03 PM
Crappy file structure. Just read that you can add ini_set('session.gc_maxlifetime', '28800'); to .htaccess instead of before each session_start. Is this a good option or should I just paste it everywhere (or create a session function).
 
@cyril Ask @NikiC about that . . .
 
@cyril The same is true of Latin vs English. But when you start looking at more western European languages, Latin is far more useful. That's why C/++ is on my list of things to do.
 
> Probably Gordon :). He's strong against duplication, hence I deleted my answer. @Gavin, agreed. – Jason McCreary 2 mins ago
damn, my cover blew :D
 
user1125394
I've been taught progralmming with Java, (bad I think, because python or ruby covers the OO, with more simplicity)
 
@cyril I've always had a soft spot for Java, mainly because it's the thing that finally hammered home that loose typing is not necessarily a good thing.
 
4:09 PM
@cyril There isn't anything wrong about learning programming with Java. Learning programming from any one language is a mistake. Each language has advantages and disadvantages and a good programmer needs to understand that.
The reason I don't use Java is because many problems are more easily solved with a functional or procedural style than they are with OOP.
And OO code is not necessarily easier to maintain and modify, either.
Bad OO code is worse than bad procedural in my opinion.
 
I really wish I had 10k rep to help with those delv-pls.
 
user1125394
@DaveRandom sry but I don't understadnd what you mean after finally*
 
@LeviMorrison you need 20 to insta-delv ;)
 
@Gordon But only 10k to vote for deletion, yes?
 
4:13 PM
@cyril Sorry, "hammered home" basically means "taught me". I forget that not everyone here is English sometimes.
 
@LeviMorrison not sure. last time i checked you had to wait for 2 days before you could cast the vote. with 20k you can vote immediately.
 
Sorry, reading the docs fail, ignore me
 
@LeviMorrison Haha, don't tell me about easy problem solutions with functional :D
That's a good joke
 
@NikiC Have you ever chained a bunch of *nix commands together? That's functional programming at its best.
 
stackoverflow.com/questions/12823986/… - looks like a probable NARQ but at the same it is a clear and concise question, not sure what to make of it
 
4:26 PM
@LeviMorrison Good, cause I don't like chaining *nix commands :P
 
user1125394
sry but there is no persistent local storage on chromeOS?
 
user1125394
if you don't want to put on cloud
 
user1125394
there should be something like file:///home/stuff
 
@DaveRandom yes, please do not delete this gem :)
 
4:39 PM
@hakre I kind of feel a bit sorry for the guy, I mean he's obviously read "always use prepared statements" somewhere, and then gone and read up on how to use them, only he did it in the MySQL manual and not the PHP manual. He's taken a great idea and made it as bad as humanly possible.
 
@DaveRandom well, is that right? I'd say, better luck next try. Also you do not need to post such a large query to visualize the problem.
 
@Gordon because it is RTFM. Also I'd be surprised it it's not a dupe, looking now.
 
@DaveRandom I think I know what he's after. I posted an answer just in case I'm right :)
 
@vascowhite Right that does make sense. If he had put your last sentence in the question I would have upvoted it (assuming you are right)
 
4:51 PM
Yes, assuming :)
 
5:13 PM
@NikiC It certainly has it's place in programming.
It's place is certainly not web programming.
 
5:29 PM
@LeviMorrison Yes, functional has it's place in programming that is close to math ;)
 
user1125394
functional only -> spaguetti
 
@cyril I will ignore your biased comment.
@NikiC The hardest part about functional programming: how do you deal with errors?
 
user1125394
:)) sry
 
@LeviMorrison There are so many hard parts about functional programming ;)
At least with the hard-liner Haskell style FP
 
I actually don't like Haskell syntax
 
5:34 PM
Hey quick question for you all:

Is there any difference between:

(int)$myVar
and
(integer)$myVar
 
But yeah, error handling in a functional context is often complicated
@chantheman No, they are identical.
 
Thanks man
That's what I thought
 
@chantheman the number of characters differs, but apart from, it's doing the same both.
 
In Java, the 'int' type is a primitive , whereas the 'Integer' type is an object.

The differences between objects and primitives are somewhat beyond the scope of this question, but to summarize:

Objects provide facilities for polymorphism, are passed by reference (or more accurately have references passed by value), and are allocated from the heap. Conversely, primitives are immutable types that are passed by value and are often allocated from the stack.
 
Hi @MartinClavell, welcome to the PHP chat ;)
 
5:37 PM
@hakre yep, you are right... too many tabs, sorry :P
 
@MartinClavell it happens to the best of us all.
 
user1125394
@MartinClavell thx anyway
 
Thanks tho
I remembered that from Java and actually that is why I asked the question
I was wondering if it was doing anything funky under the sheets
 
user1125394
that's the unecessary complicated parts of Java
 
Well whats complicated is PHP made two castings that do the same thing ;)
 
5:42 PM
Protip: use Scala instead of Java and then it just figures out which type you really need.
 
actually another two if you count (bool) and (boolean)
 
I'm looking for some additional in-depth help with CakePHP. Anyone know any great resources? I'm thinking conferences, meet-ups, etc.
 
@blackairplane How about this: it sucks
 
Haha. Not sure how helpful that is. I prefer CodeIgniter, but have no choice with the current batch of applications I'm working on.
 
@blackairplane No problem I also have a CI quote: It also sucks :D
 
5:52 PM
@NikiC Oh, about that example.
I forgot about it.
I somehow missed your ping earlier.
 
user895378
Hmm ... github isn't responding to my http requests. Just me or everyone?
 
@rdlowrey Same issue.
 
user895378
k thx
 
down for me
 
class Object {
    var methods;
    var properties;
    var implements;
    var extends;
}
^ all of those have automatic public get and set functions that are of variable type.
 
Thanks @Pe
Thanks PeeHaa. Any other suggestions, folks?
 
interface Object {
    var methods;
    var properties;
    var implements;
    var extends;
}
 
@rdlowrey it's alive again
 
user895378
@PeeHaa Woot, same here. Thanks for the heads up.
 
5:59 PM
^ Somewhat cryptic out-dated Dart syntax for demanding get and set methods for methods, properties, implements, extends.
Could also be expressed by:
 

« first day (725 days earlier)      last day (4205 days later) »