« first day (1773 days earlier)      last day (3169 days later) » 

12:39 AM
are you familiar with webscalesql ?
 
Event sourcing is a PITA without static state.
Fucking serialization.
 
1:01 AM
@DanLugg Is it? I thought the entire point of event sourcing was to have an "append only" modal.
 
Yea, but state sync without static requires too much rebuild
Unless you have a constantly updated materialized view
I dunno, it's just a tricky solution to get right. It's awesomesauce for what I'm working on, just tricky.
 
@DanLugg Right, the key to efficiency there is to only have to calculate the delta rather than trying to rebuild state.
It's much like when you do aggregation on write as opposed to aggregation on read.
Unfortunately far too many people have become comfortable in the notion of using their database to "rebuild the whole world back up" with every query, which just never scales.
 
1:26 AM
It'd just be nice if PHP could natively persist static, without extensions or fs.
Just to keep the domain in memory .
 
Why would that be nice?
 
But in drunk and rambling about something I encountered earlier.
Perf
 
There are plenty of other ways to persist data outside of PHP
Ahh, ok. Just drunk ramblings then :)
 
I've done a lot of C#.NET with IIS. The static state persistence there is wicked; so long as you lock accordingly.
 
@DanLugg If you look at it from a functional perspective it's not actually about persisting state at all :)
 
1:34 AM
Event sourcing?
 
It's about removing state from the equation altogether
Yea, I mean event sourcing isn't something new.
 
Agreed, but practically you need to manage snapshots and write concurrency
 
This is pretty much how you look at problems like that of dynamic programming for example.
 
Especially when you use an RDBMS for the event stream
 
@DanLugg Well, you don't need to. There are much more efficient ways of calculating a delta without looking at the entire picture.
I mean get why stuff like this seems so much more natural to the Haskell guys now. I used to think these concepts were ridiculously difficult to implement.
Then I learned why we hold on to state so tightly in non-functional languages and realized how confusing that gets.
 
1:52 AM
True, maybe I just have the wrong perspective. I haven't worked with functional programming enough to be proficient with it, or it's concepts
Needless to say, however, the whole prospect of events sourcing is fucking amazing. I really do like the free audit trail, it fits perfectly with what I'm working on currently
And yeah, totally not a new idea, I've done transaction histories in the past, but working with it in the fashion as dictated by a lot of academic documentation is really neat
 
2:12 AM
I'm getting PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 12288 bytes) in Unknown on line 0 which is fine, duh out of memory, but testing this code using PHP build-in server and that error is causing it to not just error, but crash entirely. Is this normal behavior?
 
@crypticツ Of course. If the VM can't allocate memory it can't continue.
 
but why is the build-in server crashing? I understand ending script execution.
 
What do you mean by crashing exactly?
It's a fatal error. i.e. fatal
 
the PHP build-in server instance ends and I have to restart it again.
 
What happens to any PHP script when it encounters a Fatal error?
 
2:15 AM
it errors, but the server still is up.
 
Yes, but what is the server in this case?
;)
 
I encounter fatal errors all the time, but they never crash the server.
 
I get that, but what is the server in this case?
 
The PHP executable.
 
Exactly.
A fatal error causes the PHP binary to bail.
Since it is the PHP binary that's running the server in this particular case that means the server process also bails.
PHP still bails when you're using mod_php or PHP-FPM, it just so happens that the process running your web server in those instances is not the PHP process itself. So the web server can stay up, but the PHP binary is still going to bail.
 
2:18 AM
so this only applies to fatal errors that are memory exhausted?
 
No, it applies to pretty much any fatal error.
That's why it's called fatal
 
but I can produce fatal errors and it does not end the server
 
The built-in server you mean?
 
yesa
 
It likely just does a RSHUTDOWN, RINIT
Which version of PHP are you using?
 
2:21 AM
7.0.0beta3
 
hi guys
 
@crypticツ I just tested in 7.0.0 from master and an OOM doesn't crash the built-in server.
 
refesh the script twice. The first load does not crash, but second load does.
 
Try testing a bare OOM with a script that only does <?php str_repeat("\0", 1024*1024*1024*); or something
@crypticツ Ahhh, then it's definitely not the OOM that crashes the server.
Has to be something else.
What do you see in the terminal when it crashes?
Does it say Segmentation fault or anything like that?
 
no, just the error with line number with memory error for first load, and then error for memory only for second load.
 
2:27 AM
What do you mean "error for memory only for second load"? Paste the exact output somewhere.
There are two kinds of OOM errors. One is that PHP can't exceed the defined memory_limit and another is that PHP was unable to allocate memory because there was no physical memory left. They have different side effects.
 
That's with two page loads, the second load ends the process.
 
@crypticツ Try running a script with just this one line in it and tell me if it reproduces the same error ` <?php str_repeat("\0", 1024*1024*1024);`
 
doesn't crash
but otherwise same memory error
 
It looks to me like the problem is in something your code is doing in the request shutdown phase which is causing PHP to bail.
The hint is the line 0 part.
Do you have any register_shutdown_functions?
Or are you using output buffer handlers?
 
I think I may have caused some sort of recursion with my classes and __construct through extending? Is that possible by accident to do? I don't have any shutdown functions or output handlers.
 
2:38 AM
someone is trying hard to troll internals
 
@crypticツ It's possible, but unlikely to produce that same error. It shouldn't say in Unkown on line 0 in the case of recursion. But it's possible that that recursion is somehow manifesting an OOM bug somewhere.
Hard to say without looking at more code.
The fact that PHP is crashing tells me that something went horribly wrong in the shutdown stage of the request.
 
Well I got a lot of refactoring to do so the error may dissapear. Anyway to get a more detailed error output? Stack trace or something?
 
Try running the built-in server with -ddisplay_errors=1 -derror_level=-1
Also turn on startup errors
You might be able to glean some more information
@crypticツ Sure you can run a stack trace, but you'll have to build PHP with debug symbols. You could also try phpdbg
phpdb could be a much more helpful route in this case than a stack trace
As you'll have to dig through the stack trace manually, but with phpdbg you might be able to step through code and pinpoint the exact cause of the memory error.
In any case here's links for how to do both: php.net/manual/en/function.debug-backtrace.php phpdbg.com/docs
 
same output with those flags and startup errors enabled. I'll have to wait until I compile rc1 to compile phpdbg and try. Thanks for the help.
 
good morning
 
2:53 AM
o/
 
3:12 AM
Damn, registering a trademark is a little trickier than it looks.
 
Abe
3:26 AM
morning
 
Morning
 
Abe
last day of vacation pls someone stab me in the back
 
With pleasure...haha..
 
Abe
:p
 
Interesting fact. PHP is a registered trade mark of the National Real Estate Investors Association.
 
3:48 AM
@Sherif In what category? You can have similar trademarks in differing categories.
Their trademark probably has nothing to do with computers.
 
@Trowski Realestate obviously.
 
Hello
GM
 
@Sherif Well, sometimes it isn't so obvious. They may have registered it in many categories.
 
Apparently PHP is a registered trademark for about 16 different companies and individuals in the US alone.
 
I need bit of help
 
3:49 AM
Strangely enough only one of them has anything to do with computers.
 
@Sherif I suppose that one is owned by Zend?
 
Nope
I didn't find any registered trademarks for PHP filed by Zend with the USPTO
 
Abe
@AK_56 don't ask to ask
 
<?php

$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="testmra"; // Database name
// Connect to server and select databse.
$conn=mysqli_connect($host,$username,$password) or die("cannot connect");
mysqli_select_db($conn,$db_name);
$result = mysqli_query($conn,"SELECT name,COUNT(status_id) AS Count from bookingdetails WHERE YEAR(date) = YEAR(CURDATE()) AND MONTH(date) = MONTH(CURDATE()) AND status_id='2' GROUP BY name");
echo "<table border='1' style='border:black;'>
I have this query where it shows the details of db of ppl who have bookings for current month
Now on click of any name i am redirecting to another page where complete details of dat particular person should be shown
Here is the code for data
<?php

$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="testmra"; // Database name
// Connect to server and select databse.
$conn=mysqli_connect($host,$username,$password) or die("cannot connect");
mysqli_select_db($conn,$db_name);
$name=(varchar) $_GET['name'];
$result = mysqli_query($conn,"SELECT room,name,purpose,attendee,date,starttime,endtime from bookingdetails WHERE YEAR(date) = YEAR(CURDATE()) AND MONTH(date) = MONTH(CURDATE()) AND status_id='2' AND name='$name'");
I am getting error on line 17
Parse error: syntax error, unexpected '$_GET' (T_VARIABLE)
 
I suppose no one really trades with the mark PHP, but that kind of leaves the dubiousness of "it's literally up for grabs". I mean I could register PHP is a word and design mark right now and take over php.net. Of course, I won't, but if I can anyone can.
 
Abe
3:53 AM
why doesn't anyone know the existence of nopaste services?
 
@Sherif That's not true, PHP could dispute such an attempt very easily.
 
@Trowski How? Who would dispute what exactly? PHP is neither a business nor anyone involved in the project trading with that mark.
I mean you could state that you don't impede on the trademark because you aren't competing with it, but that's a totally different legal battle that can still be won in court.
 
The PHP Group would dispute it. Not exactly sure if that's a legal entity, but showing prior usage wouldn't exactly be challenging :-D
 
Prior usage has nothing to do with it.
That's not how trademarks work.
 
Actually that's entirely how trademarks work.
 
3:56 AM
Anyway, I'm pretty sure if no one has done it by now it's because no one really cares, but it would be a sad scenario.
@Trowski No trademarks have to be registered in order to obtain federal protection. Using the trademark only proves common law.
Which is limited by geographic region.
It's not a patent. It's a trademark.
Patents are more about "I thought of it first" than "I registered first". Trademarks don't really work that way.
 
can i have a suggestions for you guys
 
Trademarks are about "I used it first."
 
$limits = array_unique(array($this->config->get('config_product_limit'), 25, 50, 75, 100));
how to insert show all after 100?
 
@Trowski No see that's where people make that mistake. From a legal perspective if you didn't register the trademark with the USPTO you don't get to reap the benefits of federal protection of the trademark. Meaning that you are only subject to common law because of your use of the mark. Which means you could be limited to using it only in specific geographic regions and could be forced to give up use of the mark in other regions.
Using it is not the same thing as registering it.
 
4:02 AM
Now in the event that two people both registered their trademark at the same time.... then you do have to prove who used it first.
@Trowski Yes, now did you actually read that?
> a legal presumption of the registrant's ownership of the mark and the registrant's exclusive right to use the mark nationwide on or in connection with the goods and/or services listed in the registration;
 
It sounds like you're just learning about trademarks. I'd read more about it before setting about arguing what a trademark is.
 
@Trowski No need to get cocky. Did you read the link you gave me? Or did you feel the mere pasting of a link sufficed to support your argument?
 
Yes, I read it.
You don't necessarily have to register a mark to prevent someone from using something you can show has prior usage (though it's a damn good idea to register it).
 
Excellent. So did you read the part where it says that by registering the trademark you gain the advantage of legal ownership of the mark and exclusive rights, which you wouldn't otherwise have without registering it?
 
That's not what it says.
 
4:06 AM
Really? What does it say?
 
It says a legal presumption of ownership.
 
And how's that different from what I said?
> the ability to bring an action concerning the mark in federal court
Where does it state that you have that same legal ability without registeration?
Your argument is that you have the same legal rights with or without registration. Unfortunately the link you provide disproves that argument.
No one said you have to register a trademark in order to use a trademark, but you aren't subject to the same legal rights when you don't.
Get it?
 
No, that's not what I said.
You asserted that you have to register it to have any legal rights.
I'm just saying that you do have some legal rights even without registration.
 
Not any legal rights. I specifically stated that you are only subject to common law ;)
3 mins ago, by Trowski
You don't necessarily have to register a mark to prevent someone from using something you can show has prior usage (though it's a damn good idea to register it).
 
But I sure as hell would register anything I intended to use.
 
4:09 AM
You, on the other hand, explicitly stated that you don't have to register a mark to prevent someone from using it.
 
You don't necessarily have to register it if you can show that you've been using the mark.
 
@Trowski You're not getting the point. Without registration you have very limited rights.
Mostly only those afforded to you by common law.
Now, if you're only using this trademark say in a local shop or something that's usually OK.
But they have the upper hand when they register the trademark. The fact that you used it first means nothing in federal court.
Showing someone that I've used the domain name themicrosoft.com, for example, prior to Microsoft being a registered trademark doesn't mean I can prevent microsoft from making me give up that domain name because they have grounds that infringes on their trademark.
Does that make sense?
As long as they can prove I infringed on a registered trademark they have the upper hand in court.
And yes, there are companies that do that all the time. They make you forefit a domain name that you owned free and clear because it infringes on a registered trademark.
 
Visit nissan.com.
It's not always so cut-and-dry.
I understand how trademarks work, and agree with everything immediately above.
Coming back to the main point, I doubt they would grant a trademark for PHP because it's clearly been used in a broad market.
Or if the trademark was issued, the PHP Group would have grounds to dispute it. That was my point.
 
What grounds would those be? The PHP group is just a bunch of random people that work on PHP. They aren't trading with that mark.
So there are no legal grounds whatsoever here. Regardless of registration with the USPTO it's not even subject to common law.
 
They are trading with that mark though.
 
4:18 AM
Oh yea? How's that?
We don't sell anything on php.net
Where is the trade?
 
By publishing PHP for the last 20 years... not sure why I even have to explain that...
 
Does anyone know the typical approach people are taking to protect (DDD) aggregate classes from access outside of the aggregate root? It seems there is no "friend" equivalent in PHP?
 
Trade doesn't necessarily imply money.
 
I think I can safely conclude that this conversation will in no way be constructive from here on out.
 
You can register a mark for something you give away for free.
 
Abe
4:23 AM
@prograhammer you make it public, or use reflection :(
would love to have package-protected in php
 
yeah seems like package protected would be needed for aggregates
 
@Sherif Yeah... I'd really rather not argue.
 
I suppose I can include in the doc blocks, assuming they will be read
 
Especially when it's something I'm not an expert on, but I have registered several marks.
 
@Abe , what about naming/directory structure techniques to help? Do people use a folder with a name suffix of "Aggregate" (ie. CustomerAggregate/) so that everyone knows not to access those entities outside the aggregate root?
And name the root "CustomerAR" or something like that?
 
Abe
4:28 AM
i've used:
namespace A\B\CustomerAggregate;
class Customer{}
that would be good if php would implement package-protected at some point
but actually i believe you can design everything without the need of package-protected methods
 
@Trowski I can see why. I honestly have nothing against the idea of argument itself. I think it leads to healthy discussion. Where I usually bow out is when I realize the other person either doesn't know how to make a strong argument or isn't interested in the benefits of the argument - just the outcome. Suggested reading web.clark.edu/martpe/writing_strong_argument_papers.htm Honestly, this is not criticism. It's encouragement.
 
Abe
or just have them public and document that they shouldn't be used from outside the aggregate
 
@Sherif And in this case its because I mostly agree with you anyway and don't see the benefit.
 
@Abe So you name the folder but don't suffix any file (because it should be sort of implied what the aggregate root is there). But could you elaborate a bit more on what you mean by designing in such a way you don't need package-protected methods? I mean, I suppose there are crazy techniques like (_get, _set and checking the backtrace) or using some sort of double-dispatch?
 
Abe
what particular problem are you trying to solve?
 
4:34 AM
Hi.
 
@Trowski Well, since the point of a strong argument is to get others to understand and accept your position, regardless of whether or not you agree with it, I'd say the benefits to a good argument are more about understanding than agreeing :)
 
Abe
and no, i don't use __get __set and similar hackish stuff
 
I can actually disagree with my own argument, but that's OK as long as I understand why it's a good argument.
 
@Abe oh you are meaning the modeling? Like probably I can reduce the aggregate to a single entity and move other entities out?
 
@Sherif Very true :-)
 
Abe
4:35 AM
@prograhammer i'm not following you :P do you have a concrete example of a package protected method?
 
@Abe I don't have a specific example yet, I'm starting a big refactor of a project and the domain is complex. So I just wanted to be aware of all the options that most people in DDD have encountered.
 
For example, I don't necessarily agree with the argument that someone could play a malicious role with trademark law here that would be detrimental to PHP, but hey it's still a valid argument and I now understand why.
 
I can give you an example in my head...
Like Order and Order Lines. Say Order is the AR and order lines is an entity (not VO) inside the aggregate.
 
Abe
and why do you think you are going to need friends for that? i mean, just have them public. technically all stuff is potentially private to something else
you are going to use that stuff through other layers anyway
 
I see, like every new dev should know the DDD approach is being used. There's nothing to stop a dev from calling random behavior whenever they want.
 
Abe
4:40 AM
yes
 
The point is you can be defensive when you can, but there are limits and you just have to preempt the devs to know what architectural approach is going on.
thanks @Abe
 
Abe
yw :P
 
Is there any speed difference between tmpfile(), tempnam() or writing a file customly with fopen() fwrite() fclose() unlink()?
 
@MikeM. sure, tmpfile and tempnam have blocking operations, but hardly something you should be concerned with.
 
Hmmm.
So it's not really speed sensitivie differences?
 
4:45 AM
No, the real difference is that they do different thigns.
 
There is no build in technique to parse PHP in html files as usable php right?
like index.html = <?php echo('test') ?> and index.html shows that.
You might be wondering why not doing .php instead, but it's more like a templating system question then really a html/php question.
 
PHP doesn't care about file extensions.
Your webserver mgiht, though.
 
Ye, that's why I want to build a custom templating system.
I was thinking of creating a temp file as php, running the HTML script in it. make a curl request, get the content which the php file echos and close + remove the file.
 
I just threw up in my mouth a little.
 
so if my template says <?php if(blabla == 1){echo 'test'} ?> it will be commented out in the html file.
 
4:50 AM
@Sherif You too?
 
@Trowski Yea, I need a ticttac now
 
so if I request that page, it will also be shown commented out.
But I think, saving a temp php file and making a request from there, it will be ran as PHP when obtaining the results.
Or am I thinking wrongly.?
 
So wrong on so many different levels.
 
Care to elaborate, other than the server load.
I know that mybb (forum software) has a mod by someone made which also allows to use some sort of PHP in their templating system.
 
They allow them to put PHP in their PHP?
How crazy.
 
4:53 AM
No.
PHP in their templating system.
 
Right, that's what I said.
 
A.K.A
ACP => Templates => edit template => save to DB
Page => Obtain template from db => output content
 
What do you think PHP is?
 
And directly outputting it don't accept PHP to be ran.
As again, it shows as commented out text.
Sherif, I don't think you get the context what I am talking about.
 
Believe me. I get what you're talking about more than you do, but take a beat and try to answer my question first.
 
4:56 AM
About what I think PHP is?, PHP is a server sided language.
That's what it is.
it interacts between the client and server
hence the name server sided.
 
@MikeM. So you'r thinking of having a PHP script that just grabs a template from a database, fills in some values and outputs that?
 
Sure, it's a programming language. But it has a distinct characteristic that makes it embed-able in HTML.
That's essentially what a templating engine is.
 
@Trowski No jeez -.-
@Trowski It's just how my example was build out of .
 
You can have a template that PHP can fill in values without being run as PHP, if that's what you're trying to get at.
 
$a = "<?php echo('test'); ?>";
die($a);
would be shown as green comment on the main php page.
because it's not actually ran as php.
 

« first day (1773 days earlier)      last day (3169 days later) »