« first day (640 days earlier)      last day (4301 days later) » 

8:00 PM
@LeviMorrison some of the odd rules around expressions for one
 
PS: I love polymorphic inline caching :D
 
lol
 
So are we talking about fully compiled PHP then? Pre-compiled or compiled to a cache at runtime?
 
neither
 
@GordonM Well, at the moment we are just talking about the current parser/engine and how it could be improved.
@ircmaxell In your estimation, how badly would it break BC to fix it?
 
8:02 PM
I'm sure Jeff Atwood would have a suggestion or two on that front. Probably involving capping it like old yeller :(
 
@LeviMorrison I'm actually looking into that now
 
@GordonM Who gives a rat's ass what Jeff Attwood thinks about PHP?
 
His twitterati?
 
Never gona be a hero in your home town, my parrents still say what i do isn't a real job and i should basically quit freelancing for a McHamburger job inorder to have something to fall back on. according to them programing and making food are so easy you can do them both without having one dominate the schedule making the other pointless
yay
 
@ert3 I don't even know where to start
 
8:07 PM
@ert3 Just...wow
 
it just makes me feel better to write it down even if it gets pulled
 
@ert3 Get your parents to develop a CMS. See how easy they think it still is after that :)
 
Or, being 23 just tell them they're crazy and live your own life. I wouldn't listen to anybody about my career, even my parents, if they honestly compared entry-level food service to computer programming.
 
@GordonM Better yet, show your parents the convo between ircmaxell, Levi Morrison, and NikiC discussing PHP internals.. get their take on the subject
 
oh im making one for my mom right now, about 20k lines in day one pretty decent progress dad pops in, you can't have that done by friday, im like watch me bitch, he is like no no we wont be done by then
@CharlesSprayberry oh man second i save up im moving out and startng out on my own lord knows i should have done over a year ago
 
8:10 PM
At the end of the day, they're not the ones that have to do your job. You're the one that has to do your job, and it doesn't matter if they don't like it because what's important is that you like it. You can't ever be good at a job you don't like.
 
@GordonM I think you can :D
 
thanks guys upvote for the confidence booster
no upvote for NikiC
 
@ert3 Excellent - my work is done here
 
@NikiC So, the parser directly calls zend_do_* as it parses things, right?
 
@LeviMorrison right
 
8:13 PM
@tereško stackoverflow.com/questions/11530112/… code-generation in progress :) - props to OP for using challenge terms like fastest
 
What do these zend_do_* things do?
 
@GordonM Eh, I was good at making pizza. Never did like it though :)
 
@LeviMorrison emit opcodes
 
So another reason we should have an AST is that the ZEND engine is no longer tied to the lexer/parser.
I think that's a good thing, personally.
 
I think I need to delete a few questions you've answered @MikeB :P
 
I haven't done that in a long time already
 
@CharlesSprayberry You could have been better at it if you loved it. Imagine all the attention and love you could put into a stuffed crush meat lover with extra bacon. Taking the time to get the finest flour to make light fluffy dough, growing tomatoes and herbs to make the sauce fresh from, only using the finest gourmet mozzarella...
 
@NikiC haha I've tried to stay under the radar
 
@GordonM Too long.
 
man, BNF is a pita to wrtite
 
8:16 PM
Exactly!
Had you liked making pizza better you could have been better at it ;)
 
Anything else that could be added to this?
0
A: Is PHP/MySql the best way to save user cart data?

NealYes. You can use many many different options. .NET, C#, NodeJS, Python, PHP, HTML....

:-P
 
HTML does not fit
 
@MikeB We could probably kill stackoverflow.com/questions/11317930/…, but you don't have rep there :/
 
@GordonM Perhaps if the only purpose for creating the pizza was the act of pizza creation. However, in most food service industries the purpose is not necessarily the act of the food preparation but the profit derived from that food. In your example there would be no profit :)
Much as in the programming industry. The purpose is not necessarily to write code but to solve business problems.
 
There would be if you charged 200 bucks a pizza and sold it in a Michelin star restaurant :)
 
8:20 PM
@GordonM :P
 
:)
 
class name = alphabetic character, {alpha numeric character | "_"};
class definition = ["abstract" | "final"], "class", class name, ["implements", class name, [{",", class name}]], "{", { method declaration | property declaration }, "}";
 
hi guys :-)
 
hi you
 
what implementation sharing mechanisms do you know? classes, prototypes, families, anything else?
@NikiC U2 :-)
 
8:28 PM
I have a minor problem with my code... Can I ask it here?
 
sure, you can
 
Thanks. I have three php files (header, middle, footer). In my header I have a menu and a slide show, I wrote a simple javascript code for my slide show, the function calls itself every few seconds, however it's not working.
Is there anything wrong with doing this:
<? include('header.php');
doSomething(); ?>

<? include('services_content.php'); ?>

<? include('footer.php'); ?>
In my header:

<script language="JavaScript">
function doSomething()
{
$('img').fadeOut('slow',function()
{
$(this).attr('src','./images/welcome/2.jpg').fadeIn('slow');
});
setTimeout('doSomething()',1000);
}
</script>
 
identifier = alphabetic character, {alpha numeric character | "_"};

variable = "$", identifier;

arg = [identifier], variable, "=", static expression;

arg list = [arg, {",", arg}];

function definition = "function", ["&"], identifier, "(", arg list, ")", "{", code, "}";

class definition = ["abstract" | "final"], "class", identifier, ["implements", identifier, [{",", identifier}]], "{", { method declaration | property declaration }, "}";

start = "<?php";
end = "?>" | EOF;

program = {-start, [start, code, end]}
 
@RoronoaZoro please use fixed font
 
/me gives up
 
8:32 PM
@pe
@PeeHaa: how to do that?
 
@RoronoaZoro select text and ctrl+k or click the button
 
@RoronoaZoro so.... header.php? :-) try to move that javascript to footer.php, if it helps, your image is not available in DOM in the time of js evaluation - so you'll need to wrap your code to $(function(){...});
just a guess
 
@ircmaxell What were you trying to write, exactly?
 
@RoronoaZoro of course, you'll need to move that call to footer too...
 
@PeeHaa Just saw that Reddit link of yours.... wow.
 
8:34 PM
@GordonM which one?
 
@ircmaxell cheers, hows it going?
 
The one about the alleged PHP framework
 
@KamilTomšík: Ok, let me try. My img tag is in the header.php though. Is that fine
 
VoodooPHP
 
@LeviMorrison BNF php's grammar
 
8:35 PM
@RoronoaZoro if that img is before script, it should be okay (if jquery is already available too)
 
@KamilTomšík pretty good, and yourself?
 
@KamilTomšík: my script is in the <head> tag so it's before my <img> tag...
 
@ircmaxell pretty bad :-D having tooth issues, hard to fix
@RoronoaZoro important thing is, when it is called - before img or after img?
@RoronoaZoro you know what? if you can upload your code to jsbin.com, more people will be willing to help
 
:-(
 
Maybe I should use reddit for pimping Reefknot at some point. But not until it's far more complete than it is currently.
 
8:38 PM
I'm learning the bison grammar format. What does this mean:
%token T_INCLUDE "include (T_INCLUDE)"
 
@KamilTomšík: Ok, let me try uploading my code there
 
@ircmaxell 3 days ago I thought I'll die :-)
 
It doesn't match the example I'm looking at, namely, what is the string that follows T_INCLUDE?
 
@ircmaxell 2 days ago, I hoped in that...
 
:-(
 
8:39 PM
hopefully today it got much better
 
@LeviMorrison it matches the include token... that's found by the lexer
 
@KamilTomšík: I've never used jsbin.com before. What do I do after I paste my code there?
 
@RoronoaZoro just copy your url here
@ircmaxell anyway, work was pretty interesting last few months
 
@LeviMorrison It's just a token declaration
The "include (T_INCLUDE)" is what will be displayed in the err msg
 
@ircmaxell implementing micro-appserver inside of real appserver :-)
 
8:41 PM
Token was my favourite South park character.
 
@GordonM pff
Cartman is the best
 
@KamilTomšík: The url is: jsbin.com/#source !
 
When I grow up, I want to be like Cartman :P
 
@RoronoaZoro ok, you got me, try clicking Save first, then copy url :-)
@NikiC cartman is like, 8 years old? you've already missed that, I think
 
:P
 
8:43 PM
@NikiC how old are you? :-D
 
i need to get pro with javascript, make my code major sexy
 
@KamilTomšík: Thanks :). Here: jsbin.com/imicif/3/edit
 
seriously, you're not 7, are you?
 
@KamilTomšík no, 17 ^^
 
to old, dont want pics
 
user557846
8:44 PM
does the php grabage collector clean the system defined temp dir ?
 
actually I'm semi interested in that if any knows if it doesn't
 
@NikiC pretty talented for being just 17, hats off :-)
@ert3 javascript is not easy to master, takes some time
 
@KamilTomšík: Wow. What was the problem?
@KamilTomšík: I'm trying to figure out...
 
@RoronoaZoro dunno, just fixed it (daily routine, I'm also a little drunk so I dont remember, really)
@RoronoaZoro included jquery, finished markup, added jquery ready
 
@KamilTomšík im looking to be a jack of all trades master of none, im already pretty bitchin at php asp and C++, true mastery i think is for the guys who build tools, I just want to use those tools to eventually make a game I can be proud of
 
8:49 PM
@KamilTomšík: lol. Thank you for the help
 
@ert3 master meta-programming, when you can generate/weave code on the fly, language limitations will just disappear
@RoronoaZoro np
 
@KamilTomšík Growls I am the meta
 
9:03 PM
would one say its unethical to encourage the install of a "video codec" that is infact spyware, I know as engineers the only real ethical code is to not make a blow up the world button but still this just rubs me the wrong way when i see it.
 
It's very unethical
You're basically lying to get the user to install something they would never agree to install otherwise.
 
I understand that some times you have to just make some money, but if i saw this on a resume i would certainly turn my nose up at the sight of it
then again I have the belief that as programers our work isn't just for immediate cash but also a sort of public duty, as scientists can do as they please to try and make the world better, but only we can build the tools they can use to administer the cure
oh yes yes it does smell good this far up my own rear
 
GG.
hi everyboy
d*
 
GG
 
GG.
i seach information about how implements a checkout on my site, i type "checkout" and "creditcard" on stackoverflow search and i find nothing
any idea of keywords ?
 
9:10 PM
"shopping cart"?
 
user557846
ecommerce php
 
GG.
thanks for help
"ecommerce symfony" gives me answers
 
user557846
what are you selling?
 
@NikiC @ircmaxell I wonder how long it would take you guys to create a new PHP engine if we could get you paid for it.
 
GG.
actually i'm selling nothing, i want to make a site with fundraises like kickstarter.com
so im not sure i need a full solution like magento
 
9:21 PM
Hi :)
 
GG.
hi semsem
 
yesss , 200 reached
 
@LeviMorrison a long time
 
user557846
i thought of doing a local version of that, but to may issues with tax\law etc
 
@GG. , if you want to make a site like KickStarter, you need to be able to write it without relaying on shitty 3rd party products
 
GG.
9:25 PM
ok i'm ready to write it, but i search information about this process
i search something about that on stackoverflow
or programers.stackexchange
 
@ircmaxell If we had a basic prototype, I bet we could get some money on kickstarter . . .
 
"basic prototype" would still take a long time :P
 
I'm unsure.
Depends on what is included in the prototype.
 
@LeviMorrison Who are "you guys"?
 
@NikiC You and @ircmaxell. I wouldn't trust my skills to the task, but I could help with QA and such . . .
 
9:34 PM
@LeviMorrison mascot?
 
I don't think it needs a new engine...
the parser, perhaps. But any more than that, and we're not rewriting the engine, but the language...
we may be able to get away with the wiring between the parser and the executor as well, but not the executor itself
because once we do that, we're rewriting the entire zend package, and at that point, we'd have to rewrite all of the extensions in core. and at that point, we'd be better off clean-rooming the entire language from scratch
 
I definitely think we need to separate the engine from the parser.
 
it is separate now. that's what zend_compile.c does...
 
I guess my understanding is flawed.
What would you say the engine is?
Maybe my understanding is correct but terminology is off.
 
IMHO, the engine is the exeuctor in zend_execute.h
the VM
 
9:45 PM
And the engine uses opcodes as its input, yes?
 
yes
but the parser only outputs dumb opcodes. The compiler then fills out and prepares the opcodes for execution (but allocating variables, initializing function and class structures, etc)
 
Is there a good article on PHP opcodes?
 
and it determines if the opcodes are valid (using expressions in writable contexts for example)
 
Okay, I think we need to create an AST, and then run the AST through an opcode generator.
I think my terminology is all correct there.
 
why? what would that buy us?
 
9:55 PM
@ircmaxell Simpler implementation, mainly
 
Anyone from canada? or close in the US (close as in not Texas :P or similar)
 
Though actually, given that the whole thing is written in C... I don't actually know how pleasant it would be to work with an AST ^^
 
@rlemon I'm 5 hours from the border...
@NikiC what would be simplified?
 
@rlemon I would say I'm fairly close to Canada
At least a lot closer than Texas ;)
 
I need recommendations for a host. fast, reliable, (fairly) cheap, and offering LOTS of space for files (and sql support, any kind will do)
 
9:56 PM
@ircmaxell Many things
;)
 
@rlemon Ah, that I'm not so sure about. I don't even have my own host atm
 
One benefit an AST would give is that the opcode generator can look at more parts of the AST than the parser can. Currently (I think) it can only look one token in advance.
 
My last host was cheap, unlimited, but SLOW and the customer support was like talking to a mirror that had a cheap footnote on the bottom in lipstick reading "all is fine on our end, contact your ISP"
 
@NikiC such as?
 
@rlemon Was that HostGator?
 
9:58 PM
@LeviMorrison the compiler can look at more than one token at a time (in fact, it is a multi-pass compiler)
 
nay, iPage
 
@ircmaxell I was under the impression it was a single-pass process.
 
@ircmaxell huh? multi-pass compiler? I don't think so
 
i send them 3rd party reports of 30 second delays to serve the files and they say it's my end.
 
@NikiC zend_compile.c is multi-pass
 
9:59 PM
@ircmaxell what do you mean by "multi-pass" then?
 
"multi-pass" makes me think of Fifth Element
 
^ good movie
 
@ircmaxell Just from personal experience: If it would be AST based I could easily implement generators without that odd * modifier. Without an AST I can't easily do that
 
10:00 PM
hot chick
 
@NikiC How does that make a difference?
 
@ircmaxell I need to insert an opcode at the start of the function if it is a generator and none if it isn't
but I don't know whether it is one until the first yield is encountered
So I basically can either insert a NOP at the start for every non-generator (overhead....) or completely realloc the op array (overhead...)
 
so no one on a good host, basically i'll be hosting a crap tonne of images on it (not porn) and I need to make sure i'm constantly serving them fast, and i'm not paying out my arse for storing them. Amazon and Google drive for instance charge WAY too much for storage (as a cloud solution. I am just using these as price examples)
 
But in any case, this is the kind of complication that starts to influence design descisions
You start doing things because it's easier to implement
Not because it is more elegant design wise
I think many things in PHP were created that way
 
@NikiC sure you can, just add a compiler to check for that, and insert an op element if so...
Ahhhhhhh, I see what you're getting at
 
10:02 PM
@ircmaxell how do you insert an op element? :P
 
well, one other question: why does it need a separate opcode?
or what opcode are you inserting?
 
(also don't forget that inserting an opcode at the start isn't as easy as just reallocating the whole op array. you also have to adjust jump labels, frees, etc)
@ircmaxell an opcode for suspending and returning the generator
 
hmm, I smell some hardcore generator implementation thoughts here.
 
you could make it a flag on the funciton entry, and handle that in the executor... no?
 
@ircmaxell good joke :D
 
10:05 PM
Not kidding
 
don't forget that a function can be entered either via zend_execute (if an ext overloads it) or via the ZEND_VM_ENTER pseudo-macro
That pseudo-macro has obviously different implementations depending on VM kind
for a CALL vm everything is easy
for GOTO and SWITCH VMs it's not as trivial
you would have to handle it everywhere
and obviously you couldn't insert any stuff before the generator creation ;9
E.g. for list comprehensions you'd want to insert an opcode for inheriting the parent symtable
etc, etc, etc
Sure, you can solve all that
But it makes it very hard
Thus impacting design descisions
 
@NikiC: If you have to soemthing on github for beta-testing, let me know.
I think those generators will be something even me compiling PHP then ^^
 
@NikiC thinking more along the lines of : lxr.php.net/xref/PHP_TRUNK/Zend/…
 
And there are other cases where the current system makes it completely impossible. E.g. you couldn't implement python style [x*x* for x in range(10)] list comprehensions (where x*x is at the beginning)
@ircmaxell That's not the only entry point into functions :D
 
@NikiC because of the parser...
 
10:09 PM
They can also be called via zend_call_function (or something like that)
@ircmaxell Yes, because the parser doesn't build an AST
and that's what we were talking about :D
Without an AST you'd need an infinite-lookahead parser in that situation ;) With AST you need nothing. You can live with LALR
And to give you more examples
 
Just to be clear, I'm not trying to say we shouldn't, or argue we shouldn't. I'm playing devils advocate to try to get real reasons and judge the amount of justification we have...
 
@ircmaxell I gave you a few ^^
Another example is list()
I'd argue that it only exists because we don't have an AST
 
@NikiC in what sense?
what would be the other construct?
 
@NikiC I would also like to know why you would say that.
 
It would be have been much better if you could write [$foo, $bar] = func();, (or same with array()). But this is not possible without an AST because there is ambiguity without infinite-lookahead
 
10:12 PM
[$foo, $bar] = [1, 2]?
 
@ircmaxell yes
 
well, you sold me
 
list() happens to be taking up a reserved word that I would love to use . . .
Keywords array and list are taken. So when you want an array 'object', what on earth do you call it?
 
I'm out, later
@LeviMorrison ArrayObject
 
@ircmaxell Which already exists and seems very poorly designed, by the way.
 
10:20 PM
So we've come to the conclusion that an AST is a good thing ^^
Not that it helps us in any case :D
 
if only all programmers knew how to debug...
 
10:35 PM
And here's the fruits of tonight's labours, for anyone who's interested: github.com/gordiansolutions/rubberband
 
@GordonM I don't see an online demo
 
@GordonM Looking good, but @NikiC has a point - demo or bust!
 
@NikiC Don't think you can view html files on github directly. Just download it or fork it or whatever and you should be able to view it then.
 
@GordonM So, uh, your readme has hard line breaks. Looks awful.
 
If that's not ok then I'll have to figure out how to put a proper demo page up tomorrow. Tonight, my brain is just full of decimal points.
 
10:40 PM
yeah and I'm not even sure you can copyright decimal points. but that's another story. thanks for sharing and checkout github pages for the demo tomorrow.
I'm off, too
gn8 everybody.
 
github pages. Right. Will try and remember that.
 
user895378
@GordonM You can forego gh-pages in the short term and just add the .md extension to the end of your README file and format it with markdown ... that alone will make it much more user-friendly.
 
anyway, bed beckons. Night!
 
user895378
@GordonM later
 
11:04 PM
I am using Sublime Text 2 with color scheme sunbirst. My eyes get tired really fast, tried to switch between default color schemes - didn't help. What color scheme do you use?
 
google night folks
 
user895378
later
 
11:20 PM
@hookman I use blackboard for ST2, but I'm a dark theme lover
 
@orourkek Unfortunately, I can't find one for Sublime text 2 :(
 
11:56 PM
Word
 

« first day (640 days earlier)      last day (4301 days later) »