« first day (1392 days earlier)      last day (3782 days later) » 

09:02
Hi everybody, i have an doubt.. In my pc, can't able to install aptana studio 3.0, may i know why?
@user3890317 Have you tried turning it on?
yes, after completing download, when i click .exe file, it will nothing happen..
@Jimbo Is an expert with those sorts of problems.
seriously rails?? this is a how to manual for learning english, singular plural adverb and what not
@user3890317 Ahh, you have to install jQuery first
09:08
yay, first time I see
Fatal error: Cannot create references to/from string offsets nor overloaded objects
monrings
Morning Dave
hi, @DaveRandom
@DaveRandom hey
How to install jquery.? and in my laptop installed aptana easily..
4
09:10
Soooo tempted to star that ^
@user3890317 jQuery is javascript, you don't "install" it
@DaveRandom free your mind
Legally
I don't how to install javascript. please help me.
16
@user3890317 Hold on... vanilla-js.com
this is much better to star!!
that made my day..
09:14
@Jimbo: In that link, there is download button, how to install ?
Let's not let it drag too long.
@user3890317 Javascript is part of the browser, it also does not need to be installed. PHP is for scripting things on the server, and Javascript is for scripting things in the browser.
@DaveRandom Oh you are far too sensible for a friday
@DaveRandom cough node
:D
09:15
@user3890317 People are kidding. No one here uses Aptana so we're unsure how to advise you. Try asking on an Aptana based forum.
I knew someone would do that. Let's not complicate things.
@user3890317 Kidding = Joking :-)
How you are all feel when see my comments?
@FlorianMargaine Why would you use node for a project aside from long-polling and SPA?
@Fabien I've used it for some mobile app it was horrifuckingble
09:16
Why did you?
@Fabien why would you use php for a project?
It's all I know. Bam. Perfect answer.
... to display your ignorance? :P
lol. I plan on learning more languages but in reality that is why I use PHP. I know it best.
09:17
So @Fabien any news on that CMS thing we have going? Any verdict?
@SecondRikudo Part of me wouldn't mind doing an extremely simple json configurable CMS. So I don't think it's dead but we can FOSS right away.
@FlorianMargaine I'm just trying to get a grasp on node and what it perhaps shouldn't be used for.
@FlorianMargaine Over node? How about because I/O is a minuscule part of a web application, and while node (and generally sane async programming) makes I/O easier it makes many other elements a lot more challenging, because you now have to think about the performance of the server as a whole instead of the current request? Oh and also string manipulation (which is all web dev really is) get's very confusing when things don't happen in the order in which you wrote them
@DaveRandom I'm trying to get pcntl by compiling php myself, but when I do make, I get:
> 'HASH_KEY_NON_EXISTENT' undeclared (first use in this function)
Google doesn't help, I got the stuff from git://git.debian.org/pkg-php/php.git
Any ideas?
@Fabien you can use it for anything, really
Don't get me wrong, I quite like JS and I quite like working with node, but it sucks for writing "web applications", it's much better for creating the supporting architecture, stuff that needs to do very small insular tasks and handle a lot of concurrent I/O (databases etc)
@Jimbo moment
which function?
btw @Jimbo what do you actually need pcntl for?
It's quite possible you'd be better with multiplexing proc_open handles
09:24
@DaveRandom Work project involves pcntl and so I need it to mirror what we have on our sandbox
It's not through personal choice ;-)
@DaveRandom I'm with you on this one (except the strings manipulation thing), you have to think about more stuff. I like it though, and I've found that working in a saner language is more relaxing.
@FlorianMargaine I bet but right tool for the right job. Or at least an adequate one. I couldn't imagine node being used to build a website, not practically. Sure capable but not practical. Then again my JS isn't great and I know less about node. Hence the ask :p
shared process space gets very confusing very quickly in PHP
In function 'zif_pcntl_exec':
pcntl.c:798:10: error: 'HASH_KEY_NON_EXISTENT' undeclared (first use in this function)
@FlorianMargaine I'm not sure I'd go as far as saner, more just differently crazy
But yeh, it's much better suited to the async paradigm than PHP is
Just proper closures is a big win
09:26
@Fabien pastie.margaine.com is a node site
@Jimbo PHP version and which pcntl source did you get?
@Fabien that said, I'd say you should learn it. It's different than php, but it's one of the easiest "something else" you'll find out there.
@FlorianMargaine I mean multi page site more than SPA. I can see the benefits of node in a SPA.
@Fabien the site isn't really an SPA
@DaveRandom Ermm.... whatever one that git repo points to :-D
@Jimbo which git repo sorry?
git://git.debian.org/pkg-php/php.git
@DaveRandom anyway, I'm not really a proponent (?) of node so you won't see me fanboying
jesus right, fuck that
sorry about that
09:28
@FlorianMargaine It's on the 'to learn' list. But being a real programmer sits above it atm. By that I mean principles which will in turn help me with learning/building other things.
what PHP version are you running?
Haha
I'm running 5.4.9
@Fabien learn other platforms/languages. That's what makes you a real programmer.
Architecture is a particular weak point for me.
@FlorianMargaine Like I say, I certainly don't hate it, I just think the world has gone a bit mental thinking it does All The Things, which it does, but it does some of them badly
It does some of them very well though
09:30
@salathe I'm sure ...
@Fabien that just comes with learning other platforms/languages. You learn how they do, you learn what works well in what situation, etc. And you just get better at architecture.
@FlorianMargaine Any languages/platforms with that emphasis in particular?
nope, none. Architecture is a buzzword to say: "I know how to separate my concerns"
@Jimbo OK well I suggest you throw away that clone you have of the debian repo, git clone [email protected]:/php/php-src.git && cd php-src && git checkout php-5.4.9
I'm sure because the alternative "no, lets not make php measurable better in every way" would be a stupid response to the question being asked ... we're not releasing it tomorrow, or on its own, but the longer we spend working on master the longer it will take to come about ... three or four people cannot do it on their own ...
09:32
then you can go into ext/pcntl and compile against the correct codebase
SoC still requires structure though. A thread to suitably link them together.
@DaveRandom Unfortunately I don't have access rights to grab that from git
@Jimbo it's public, you caan pull, you just can't push
Oh wait
SSH
;-)
Not everyone has @php.net ;-) hint
@Fabien learn C (for memory management and contributing to PHP), Haskell (for functional), Prolog (because it's really fun), and Lisp (for its enlightenment)
09:34
use https://github.com/php/php-src.git instead then
don't spend too much time on prolog, but it's fun to know it exists.
@FlorianMargaine C is actually pretty much top of my list.
@Jimbo It's not about that, anyone can clone that repo
You just don't have the SSH key for that server registered on github
(I presume)
What is the point "learn a language"? When will you be able to say "I know this language" ?
09:35
@Fabien that one is pretty good :)
@DaveRandom Nope
I never heard anyone tell anyone else to learn lisp for any reason at all ... +100 internet points for excellent reasoning, but ... really ?
@AlmaDo For me I want to learn C to contribute to PHP.
@Jimbo just substitute the git@ url with the https url and it will work
@JoeWatkins honestly, lisp is a great language to learn about compilations and runtime stages
and AST.
09:37
I don't go for this learn X languages either ... pretty much any language out there, give me a couple of days and I'll be writing semi useful stuff in it ... I dunno how it got to be like that, so dunno where to tell people to start ... but I guess keep reading till you feel you can do more or less the same thing ...
@Fabien well.. I had same things in mind, but really I thought and came to the conclusion that I need to realize what's the thing that I want to implement (so will they be useful or not). Unfortunately.. I have no good ideas :\
then choose the worst ones for favourites lol
Because you're a machine @JoeWatkins.
@JoeWatkins :D
well, at least you're not contributing to APL.
I imagine you see the world like Neo does.
09:39
or Malbolge.
@Jimbo in theory, this should do it
@Fabien try to debug something with phpdbg (or, much better, C program with gdb if you know what it is) - and you'll see the world as Neo does(at least, on the screen)
@AlmaDo or... write assembler
shivers
@DaveRandom It compiled :D danke
@Jimbo OK so in theory all you need to do now is enable it in php.ini and you're good to go
09:44
hehe, on a serious note though, choose to read generally applicable stuff, and try to apply it where you are comfortable, have most fun or whatever ... if the choice is between "MySQL and PHP" and "Database Design and Programming" read the latter, the former is only applicable today or for as long as you are having fun :)
although you won't really be choosing ... having been told to do it, you will really just be following instructions ... very matrix-esque, I think you'll agree ...
@DaveRandom Win! 26 -> 27 beers
It'd be nice to finish something I don't hate in PHP before I move towards C though.
no such thing as finished ...
or more precisely the kinds of things that are worth writing are never really finished ...
/s/finished/moved in to production
unless you die
ah right :)
don't move towards it ... expand your mind man ... or horizon, or whatever ...
09:56
Well, baby steps :) PHP dignity first.
the only really good use I have for C is PHP, it's one of my all time favourite languages and I don't have to defend that statement ... nearly everything I do with it is PHP-centric ...
@Jimbo do you have ext/posix? If not you should install it, there's a lot of crossover
@JoeWatkins BTW to install something additional like pdo-postgres drivers through multi it's a recompile right? Or a source change and yum?
@Fabien If your php came from yum, you should be able to do yum install php-pdo-pgsql I would have thought
09:59
Nah. It's Joe's multi.
@Fabien yeah, you need to setup php.defaults with that stuff ... the idea is that you use multi on throw away environments like virtual machines or testing environments, you write a hook to apply your php.defaults patch and [or] download additional hooks and then ./php.multi and you get all your versions ready to run, configured how you require ...
Fair enough. As I have been doing then.
yeah it's quite a long process until php.defaults and hooks are in place ... then easy ... even cron can build php at that point ... if you like that sorta thing ...
One day. multi + docker would make a good combination for PHP bug testing suite.
Oh @Jimbo did you say you would write some phpt tests for me or did I imagine that?
10:02
@DaveRandom I did, but I need to know all about it ;)
@Jimbo OK well give me a shout when you have a minute to try and get set up with it
@DaveRandom After lunch should be good, I'll ping you
kk no worries, I have a meeting at ~2 though
@JoeWatkins iirc @rdlowrey kicked it around a bit in Aerys. I imagine we'll look at it for 7 as part of the new streams API that will hopefully happen (contributions welcome)
'mornin
@DaveRandom E_WRONG_LANGUAGE
also E_INCLUDE_UNIT_TESTS_FOR_THIS_AND_IMPLEMENTORS
10:16
@JoeWatkins It's an API prototype
looks tidy tho ... will watch ... and convert, and get involved with the patching bit ... but for the moment, just watch ;)
got it yeah ...
I'm E_NCOURAGING
Was thinking that once an API has been reasonably well agreed I'd look at implementing it as an extension
best foot forward, rfc and see if it gets rejected, php7 can break shit ... there won't be another opportunity in 5-10 years ...
I'll do the internals stuff if you don't want too
@JoeWatkins I presume it's reasonably easily possible for an extension to replace function implementations? Would be looking to replace fopen() and friends so that stream resources no longer exist, the functions still do what they always did but work with the stream objects
the rest can be reused for said extension if rejected
it is not ... needs baking in ...
10:19
@JoeWatkins Would like to, probably not capable of doing a complete impl
@JoeWatkins I'm sorry to correct you, but it's pronounced PHP "7".
at least today it does ...
good mornings
Also, morning!
I am, I'll do it ... you do the streamy stuff, I'll do the rest for internals ... then rfc that, if it gets accepted we made a massive improvement, else, got a cool extension for streams and sockets that doesn't suck ...
10:20
@JoeWatkins The idea is to make it a graceful as possible, ideal goal would be not to break anything but just provide a sane API and soft-deprecate the old one
@DanLugg again,
user@host:~$ php -r "var_dump(`5+1`);"
int(7)
(:
With a view to hard deprecation in ~7.2 and removal in 8
mornings new peepz :)
there is talk of removing resources, I say break shit, write the best api you can, and expose it in the most sensible way ... don't spend the next 5 years explaining your reasons for backward compatibility with an old version that nobody will care about by then ...
fopen can return an object, no problem with that, you can have procedural api for objects like mysqli and company do ...
@Fabien At about 1:30ish, the arpeggio'd version is awesome.
@JoeWatkins Oh yeh, the API will be designed to be as good as possible, then and only then will we look at trying to make the old functions play nice with it
10:23
well that won't be a problem from internals ... it's not actually a problem from an extension but a horrible thing to do, so not keen ... but from internals we can just replace everything ...
@DanLugg Yeah. I have a friend who is pretty talented at piano. It's always fun when we come across a public one and he plays.
(no supported api to replace fopen for example, but that doesn't mean can't be done, uopz/runkit do it)
@Fabien That's awesome; I wish I could play.
Anyone worked with the paypal api? Is it hard to try it and to do 'fake' payments in development?
10:25
@JoeWatkins Well I was thinking like an mbstring-style thing, where you have an insular API which can be use on it's own, but you can also optionally replace the string funcs. Bare in mind also that the extension will only be there as a prototyping-type thing to make it work in 5.[67], basically to make sure that it's conceptually sound
I realise it's a horrible thing to do and I wouldn't suggest anyone use any of this in production until it's either baked into the core or is a stable extension for 7
I've always been partial to Moonlight Sonata.
@JoeWatkins Yeh that's what I was thinking, actually replace the handlers in the symbol table
awesome
(again, prototyping only)
@Duikboot They have a sandbox iirc /cc @Jimbo
would be okay for prototype, but we want to write a proper patch alongside for an rfc ... when there's an extension I'll provide the tools to hack internals from there, but we should prepare proper patches alongside ...
10:29
@Duikboot I used it last year - the documentation is shocking, it's all over the place, and I never got to fake payments ;-) But I might have an IPN script somewhere that might be useful?
how to de-reference index offset with variable variable?
@JoeWatkins Indeed, although tbh I'm not entirely sure I like the current situation where the stream functions are in main anyway. The internal streams API should be in main but the userland functions should probably be extracted to an ext/streams
$string = "foo";
$a = "string";
$b = $$a[0];

var_dump($b);//Notice: Undefined variable: s
redundant word is redundant
I just would like to learn how the pay pall api works. I would like to write some code in laravel with paypal payments. :)
I was also reading a job offer where they ask for: PHP/Laravel/MySQL/Redis on AWS
10:30
@AlmaDo What were you expecting to happen?
What does that mean specifically on AWS? (amazon webservices) but what is that about?
That's the expected result for me
also, the undefd var error is at the assignment of $b, not the var_dump
@DaveRandom expected is: $a pointing to "string", so $$a if our $string and $$a[0] should be "f"
It'd need to be $($a)[0] or possibly even ($$a)[0]
^ that
10:31
$b = ${$a}[0];
@AlmaDo No, it'd be "f"
that did it
oh
@AlmaDo yes this
Also @AlmaDo don't do that :-P
use an array
I'm trying to do nasty thing
Dammit, I have an idea for creating a new web app. Should be cool to be working on it with more then 1 person. :) It's something that doesn't yet exists but will be pretty handy I guess.
10:33
@AlmaDo evidently
I was disappointed that PHP does not allow me to do
$string = "foo";
$string[0] = &$string[1];
What on earth would you expect that to do?
Also, a string is (effectively) a char[], not a zval[]
like 0-indexed char is now "o" and a reference to 1-indexed, so..
...use an array
no, it's Friday and I want to torture PHP
using array have no style ..
10:35
It also, y'know, works...
who cares?
I'm not going to lie; I'm pretty sure all I want is an optionally typed C# with dollar sign variable sigils.
btw, I wasn't able to create even "to" reference, like:
$string = "foo";
$z = &$string[1];
No, you can't
10:36
first is understandable, but why this?
because not zval?
String index derefs don't point to persistent zvals, they create zvals on the fly
Just think about how a string is represented underneath
It's a zval containing a pointer to a char array
$string = str_split("foo");
$z = &$string[1];
$z = 'b';
$string = implode($string);
It's not a pointer to a zval array
@DaveRandom yes, I might go to lxr, research, find all the things.. but where's fun?
(because that would be stupid)
10:39
$string = str_split("foo");
$z = &$string[1];
$z = 'b';
$string = implode($string);
$z = 'a';
var_dump($string, $z);
@DanLugg no, because this will fail:
(so $z lost it's relation with $string)
and - yes, since now I know that string holds just char array, not zval.. all is ruined. @DaveRandom just spoiled all the fun :\
@AlmaDo You really want strings to require all the memory implied by lxr.php.net/xref/PHP_5_6/Zend/zend.h#zvalue_value L322-340 per character?
That's what arrays are for...
@DaveRandom Yes.
Memory is cheap mo-fo.
@DaveRandom well, I can't do $array1.$array2
:p
@AlmaDo Although, you should. We should have union and concatenation!
@AlmaDo That is interesting
That totally could work
10:44
I'd support it.
Me too
@JoeWatkins @JoeWatkins @JoeWatkins
@DaveRandom ridiculous - we already have $array1 + $array2. so what should concat do ?
would behave as array_merge(array_values($array1), array_values($array1))
10:45
why?
Because that's what you implicitly asked it to do
Because the alternative is "array_merge(array_values($array1), array_values($array1))"
don't try to blame me :D
I was just playing with references (until got the kick that it's not zval-s at all)
No, but syntactically, using . for array concatenation would be tits.
ok, ok. you can not do $array++
10:46
No, that wouldn't make sense though.
The fact that you can do it with strings is not a good thing anyway IMO
so invent what should that mean (with strings we can do that)
It should be an error because it's stupid
why then we do not have error for strings? (for strings it's also stupid)
don't != shouldn't
(imo, ymmv)
10:48
@DaveRandom Should . ignore keys, if it were an operator? What about ['a'=>1] . ['b'=>2]? I wouldn't expect [1, 2], it should maintain non-integer key association.
@DanLugg just 2-arg array_merge() shorthand then
Yea, that's what I'm thinking.
I bet that's dead simple to implement you know
3v4l.org/Kushp <-- Yea, much more in line with my expectations.
right (I bet even I can do that, lol)
10:50
I bet I could do it. (though, I'm going to bet against myself)
hehe
Just needs a little extra logic and new handler here
I was about to create $array1 - $array2 but got stuck with all those dependencies
The dot (.) operator used for array concatenation, a 'la array_merge
9
^^ Star? Awesome possum.
@AlmaDo That's much harder to implement than merging.
10:53
@Leri we have array_diff(), so ..
@AlmaDo But - is implemented in operators that have no knowledge about arrays, to use array_diff you need: 1. include array.h. 2. copy array_diff implementation
Both are awful things to do
@DanLugg What if something exists that for all intents and purposes could be an array (implements \Iterator or whatever), but has an __toString() method?
While merging is just HashTable merging.
@DanLugg so presumably you would go strict with types here, in that it only works when both operands are an array? And if that's not the case, use the same logic as now (cast both operands to string)
@Jimbo It's not an array.
@DaveRandom Pretty much, $array . $iterator == error.
@JoeWatkins far more common case, wanky behaviour: 3v4l.org/cmS6G
Dafuq? When was it changed? ^^ Yea, that was the issue; must be because non-0'd, non-sequential in @JoeWatkins's
I think behaviour makes sense ...
@JoeWatkins It does, in some cases, but concat is a much more common case in my experience
it doesn't when you're manipulating strings, but what a strange thing to do, have a string represented as an array I mean ...
10:59
@JoeWatkins + is only ever really of use (IMO, use-case experience) with name => value pseudo-structs.
when we are merging config or whatever, we usually expect that kind of behaviour ...
Put it this way: I use array_merge all the time, I have used array addition like 3 times ever
@JoeWatkins Right, and that should be retained with .

« first day (1392 days earlier)      last day (3782 days later) »