« first day (2778 days earlier)      last day (2173 days later) » 

12:16 AM
@Wes Nothing unless your coworkers sick and write queries in a template.
 
Wes
lol
 
 
1 hour later…
1:22 AM
Just brain-froze on a sorting algo question in an interview. Was trying to think of the last time I cared about sort perf in real life. In games, we usually have two cases: A) 5 things. Whatever. Bubblesort. Who cares. B) 5bn things. You cannot sort this and make framerate.
 
 
3 hours later…
3:52 AM
Hi.

I have issue one issue payment gateway.

https://stackoverflow.com/questions/50521190/woocommerce-subscription-with-braintree-powered-by-paypal-recurring-billing
 
4:03 AM
Trying to understand class inheritence/discriminators in SF4. If I have media_table, and want photo_table and pdf_table all to use media_table, should it be class photo extends media?
 
wiki.php.net: cannot register – #76375
 
4:34 AM
0
Q: How do you save SF4 entity ID with the entity name then retrieve using different entities. Use discriminatormap?

DariusTrying to have 2 different entities share 1 table. I have 3 tables/classes. Example: Media - id, filepath, filename, entity_id, entity_type Photo - id, title PDF - id, title, description I expect entity_type to say whether it was inserted via Photo entity or Media entity. Since I can have ID ...

 
5:05 AM
moin
 
mornin Joe
 
Is intval($str, 8) equivalent to octdec($str) ? Where $str is a string that matches `/[0-7]+/'
 
5:48 AM
@bwoebi I got this far ...
<?php
use Inspector\InspectorFunction;
use Inspector\InspectorBreakPoint;
use Inspector\InspectorFrame;

$inspector = new class("add") extends InspectorFunction {
	public function onResolve() {
		echo "Resolve ...\n";
		$this->hook = new class($this->getEntryInstruction()) extends InspectorBreakPoint {
			public function hit(InspectorFrame $frame) {
				var_dump($frame);
			}
		};
	}

	private $hook;
};

include "add.inc"; # defines add(int, int)

add(1,2);

InspectorFunction::purge(); # deletes add(int, int)
Resolve ...
object(Inspector\InspectorFrame)#4 (0) {
}
Resolve ...
object(Inspector\InspectorFrame)#2 (0) {
}
oh for fuck sake, I really hate opcache ... it's messing with this solution too ...
 
@JoeWatkins How?
 
I don't know yet, I just observed it for the first time ...
 
@JoeWatkins Got any code in a branch?
 
it doesn't hit the bp after second resolve
no, it's all a mess, I'll upload sometime today though in some state ...
 
that's why branch not master :-D
 
6:01 AM
@JennaSloan I think so
 
6:12 AM
Is it better to have a regex with flags like '/(?i)stuff/' or '/stuff/i' or '/(?i)stuff/i' ?
 
6:23 AM
I'm going to say the second one is the best because if the regex is recursive, it won't have to re-evaluate the flag modifier thing
 
6:41 AM
@JennaSloan It doesn't matter - just don't use 3. Actually PHP programmers are used to flags at the end and possibly don't know the (?modifier) syntax
 
Alrighty
 
If I have a class, "class Media{ }" and it has method getContent , and I have "class Blog extends Media", and I get a method getContent, will Blog's getContent override media's getContent?
or exception occurs?
The real situation is, I have Blogs and PeerReviewedBlogs, all same fields, but I need to have PeerReviewedBlogs to remain if regular Blog/Source Blog is deleted. So not sure if I should extend class, or just create a completely separate Entity with no extensions, with all the same columns in table.
 
7:39 AM
morns
 
o/
 
\o
@bwoebi what is (?modifier) syntax for? it looks similar to lookahead
 
7:55 AM
Got it looks like a nice source of regex syntax :)
 
o/
 
\o
 
pasquinade a satire or lampoon, especially one posted in a public place.
 
sad friday o/
 
8:11 AM
wow, I know its a bit old but still wow.
 
moirnin
 
\o
 
8:47 AM
lo all
are there any symfony guru's here ?
 
aaaaand youtube app has become even worse: the "home" screen is not full of list-videos even thought I actively have been hiding them
 
@Danack they will contact you I forwarded your email.
 
Guys, JAVA developers have something named "break point". It stops compiling and shows the result until there. Is there something similar in PHP?
 
yes, using xdebug or phpdbg (and there should also be integration for those tools in PhpStorm and other major editors/IDEs)
 
9:03 AM
Anyone know what is going wrong when I Doctrine Querybuilder creates SQL with the path of the entity (path\to\entity) in it (leading to an invalid SQL QueryException)?
It is a Symfony 3 Project.
 
morning
 
@tereško ah I see. thx
 
9:17 AM
mornin
 
Morning
I have an issue changing an old project from savant 2 template engine to plates template engine
https://stackoverflow.com/questions/50525662/changing-the-template-engine-of-a-project-from-savant2-to-plates

I have been changing online, but it seem there is no material that covers that
 
tobias iam using symfony 3 but i never got any problems with doctrine what kinda doctrine query did u build ?
 
moin
 
Morning.
Does anyone have a guide on how to unfuck text from databases where the text has been mangled by naïve conversion from utf8 to latin1 and other stupid errors.
 
9:32 AM
The short answer is "no". The long answer is "lol, no".
basically you are most likely fucked
you can maybe undo one incorrect conversion mostly if you know exactly what happened
 
Morngins
Came for the penis stayed for the chat
 
Well I'm here so you can have both and chat with the penis today
 
@Tiffany was that me? Think it was @JoeWatkins
Although could be both of us :P
 
E_MISSING_CONTEXT
 
21 hours ago, by Tiffany
lol, reminds me of when @PeeHaa pasted an ascii penis, it was flagged and removed, then he had a temp ban for 30 minutes
I mean penises are more your thing I guess :P
 
9:36 AM
I think it was me
but joe made it
 
oh lol
I should have known you were involved
 
yeah, they definitely are...
 
@silver I don't think it is the fault of the query: paste.gnome.org/p06xwrzcz But perhaps more a mismatch between the Symfony config and Doctrine.
 
I sent it privately though ...
 
Those are the best :P
 
9:37 AM
Are you not still a fan of React ? @tereško
 
if you mean the JS framework, then yes - I think it's a shit idea
 
I think I'm just going to spend the day thinking ... all the code I write at the moment is broken in some way, more thoughts should do it ...
 
Sometimes I really don't understand you. In Iran, React developer will be hire with the biggest salary. Any I myself love React. It hast component for everything. You will make a component for your layout, containers, boxes, buttons, etc ..! It causes a good integration (UI Kit) in the whole project interface @tereško
 
@JoeWatkins please push it, one pair of eyes more could help ;-)
 
Has anyone seen a PCRE regex which matches PCRE regex?
 
9:41 AM
@JoeWatkins Don't listen to bob.Just keep overthinking it
@brzuchal I tried to come up with it once, but didn't find a good one
 
@bwoebi fine things-and-stuff-for-fridays
 
If you do please gimme
 
Ok
 
@brzuchal that would be... a very bad idea. I will say with a fair amount of confidence that regex is sufficiently complex that it cannot be described with regex
 
@brzuchal I have heard about something like that, I believe I saw one on SO somewhere.
 
9:42 AM
especially if you want to allow the x modifier
 
it's bad, I can see that ... I tried to improve it (the part where we scan for new things to resolve, and it broke everything, this time with opcache disabled) ...
 
@DaveRandom with regex, no, but PCRE should be able to handle it
 
Here's my attempt: .+
 
haha
 
seriously though, why would you want to do that @brzuchal?
 
9:44 AM
@DaveRandom by the way - conditional patterns are really fun
 
@DaveRandom I want to get regular expressions from text
 
@brzuchal you do know that there will be many false positives
 
nice challenge
 
foo is technically a valid regex
 
@DaveRandom yeah....that's what I was suspecting. There is a funny story to be told in a pub about a large amount of money being paid for a platform without any technical due diligence being done.
 
9:45 AM
every word in this sentence is a valid regex on it's own, and the sentence as a whole also is, or any chunk of it
 
@brzuchal what does that mean? Can you give an example?
 
@DaveRandom a bit less if you require delimiters
 
@bwoebi yes, maybe if I stick to something looking like /(?<regex>...)/(?<flags>[a-z]+)
 
but still
@brzuchal nobody sane uses / as delimiter :-P
 
@bwoebi (true, but people do have this annoying habit of using parentheses in a non regex context)
 
9:46 AM
@bwoebi I am always using / why not?
 
I usually use #, ~ or ( ... )
 
I'm weird enough :)
 
To avoid having to escape literal /'s
They happen to be frequently enough in regexes
 
@bwoebi I love escaping :)
 
Regex escaping when using slashes as delimiters is the worst
 
9:48 AM
@DaveRandom yeah ;-)
 
Especially in php
 
That makes me feel like I am the only one who can decifer more advanced regexps :)
 
@brzuchal adv?
 
It's not advanced It\\\\\\\\\\\s unreadable
 
stackoverflow.com/questions/172303/… this question has a recursive regex for it
 
9:48 AM
ah
 
:D
 
@Ekin this is for simple regexes, not PCRE :-P
@brzuchal stackoverflow.com/a/39553373/2153758 have fun, without reading the explanation :-P
 
@bwoebi wow, thx
 
:P I remember you working on that addition one
 
@bwoebi give him something with a skip/fail in :-P
 
9:59 AM
@DaveRandom it contains some (*PRUNE) and (*F)
 
I never liked prunes
 
Wes
morn
 
o/
 
Wesmon o/
 
Cool, today I've learned Lookbehind and Non-capturing group, I new only how to use Lookahead :)
 
10:12 AM
fucking GDPRseholes are making email totally unusable
basically the only thing it seems have achieved so far is generating a shitload of spam
epic own goal
 
@DaveRandom maybe .... you've signed up to too many sites
@DaveRandom And you should review your mails to check what accounts you can dispose of now.
 
Wes
i always use disposable emails now
still i got about 40 ish gdpr emails. so annoying
 
10:30 AM
I'm going to send an email asking how one company acquired my email address, and why they are retaining it. I'm reasonably certain the last time I interacted with that company, the year didn't start with a 2.
 
Has any one engaged with endicia?
 
@tobias47n9e yeah your right theres nothing strange with your query
@tobias47n9e tought it might be something u defined in the query that would result in a path like that... but all looks normal
 
@silver Mysterious ... Those are the ways of Doctrine
 
yeah sometimes you have to realy search hard to find what is wrong when u get a symfony error...
iam reasonably new at it too :D
so i have no idea how to help u with that
 
@JoeWatkins what do you think about including weak maps in the initial weak ref proposal?
 
10:41 AM
@tobias47n9e can i ask u if u have any experience with mutli tenant in symfony ?
 
silver: Not really. But is that something you really need to do? Isn't keeping databases seperate a lot safer?
 
@tobias47n9e was wondering what the best design aprouch is... from the symfony oo presepctive i would say add user/group/compnay entity to every entity that is linked to the specific user/group/company... but looks like overhead compared to just adding id's to every entity...
i want my apps to be a bit more free for everyone to register and go play with... so everyone in 1 database
 
@silver Sounds like something which works in easy cases, but might blow out of proportions as soon as one person needs customization
 
i work at a company that maintains the blow out of proportion kinda apps :D
sometimes i question what i am doing at this company... :D
 
I think assigning data to a person or a group is pretty standard
@silver We all sometimes wonder why we don't run away from our companies :)
 
10:49 AM
yeah question is do i assign the entity or the id :D
iam very new to symfony but i like the aprouch... its what i learned at skool and it looks good but applying it is harder then i tought.
 
@silver The enitity should be fine. Doctrine will use the IDs when creating queries
 
yeah true
 
@silver And by god learn Django and Rocket (Rust) and hopefully you will not have to work on Symfony all your life :D
 
ow i work with symfony at home...
at the company i work at we use delphi : D
i will check out django and rocket :D
are they much beter languages ?
 
After using Rocket I can't touch Symfony at home anymore. But at work I am in a similar position. Repairing old PHP code :/
 
10:54 AM
why are u doing symfony ? :D
 
Rust is definitly the best language to learn and Rocket is an awesome framework.
Symfony also at work :sigh:
 
i dont know any python tho :D
ive seen some apps with it and the framework i saw looked kinda nice but very complex
 
Wes
@Danack i hoped that after years of inactivity they would stop sending me spam. but they never do
 
11:10 AM
hence gdpr
 
Does anyone knows how to show incomplete (request in progress) ajax output data
 
wireshark ?
 
i mean in the ajax function
i have a function which runs for 10 minutes and outputs every 2 minutes
i want to display the output as produced and outputted via normal http request
 
em... iam a bit old so many this has changed... but php can not run 10 min on a webserver wihtout changeing the timeouts...
your javascript runs 10 min maybe ?
 
@FaizRasool this is not a good way to do this
 
11:17 AM
@sliver the process is already running for 10 minutes thats not a challenge
 
you shouldn't tie up worker processes like that
start it as a background process and poll it for updates
 
the challenge is to show output as it is produced
 
use websockets
 
i know - 10 minute is a arbitrary number
 
the point is more that it's an extremely bad architecture for scaling
 
11:18 AM
without socket - i want to display incomplete http request data in ajax function
 
well thankfully I don't think there's any way to do that
which is good because it would be a terrible way to build an application
you can use long polling
 
well i know what u mean... but i always try to avoid what u do in php :D
 
@sliver php is fine, just don't block worker processes up like that
 
i can also understand that some process take time...
 
@DaveRandom - let me tell you the use case here - we are making a database query to million of rows to show min and maximum from the table - we have 2 different queries to get min and max - there is no reason request should wait to for max or min to finish and the output is already achieved in http request
 
11:20 AM
run it in the background
getting the min/max of a million rows should be <1sec
if it isn't, you need to sort your indexes out
 
but let say due to parameters its not the case
 
OK, then use websockets
 
so what are you saying to me - ajax will not allow me to do so
 
long polling and sse are the old approach, they have been replaced because they were terrible for scalability
 
while i have already achieve this behaviour in the browser
 
11:22 AM
they block up server resources with processes that aren't even doing anything
 
long pooling is different - this is different use case
 
sure you can make it "work" in dev so it looks great, but then you put it live and people start using and suddenly your server grinds to a halt
 
What do you guys use to save data offline for desktop apps?
Database? Files?
 
because you tied up all your worker processes with I/O blocked waits and now there are no workers left to process new requests
 
yes the browser accpets this... so it should be posible but i only achived waht u want by creating a webserver in bash script....
 
websockets are the new way of doing this kinda stuff...
 
if you insist on doing it the bad old way, developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/…
but seriously, don't do that
you will come to regret it
@2dsharp ...desktop apps written in PHP?
 
@sliver @DaveRandom try this code here - you will get i mean phptester.net
<?php

ob_implicit_flush(true);
ob_start();

foreach (range(1, 10) as $i) {
echo "test {$i}<Br/>";
ob_end_flush();
#ob_flush();
flush();
ob_start();
sleep(2);
}
try this code - this all i wanted to do - you guys are making this more complicated than it should be
 
yes I understand what you mean, the problem is that it's a bad way to do it
 
@DaveRandom Any app, if you fancy PHP on the desktop, sure.
What would be a general approach?
 
11:27 AM
That sleep() call is going to harm your server
 
this is to simulate @DaveRandom
processing time
 
yes, but you shouldn't be using web server processes for processing long running things
 
i am not doing sleep - i just want to show in complete http request
 
because while you are doing that the process can't handle other HTTP requests
which means your server will stop responding to new requests
 
@DaveRandom we have multiple server behind load balancer
@DaveRandom we are not much worried about that - at this point at least
 
11:29 AM
this will send a http response and will never close the connection and keep adding data.... it works for browsers because its basic http protocol...
 
that is because you haven't thought about it
seriosuly, use websockets
regardless, I have given you links for both approaches
 
I know how this works becasue i made a chat program this way... but trust me its a bad way to go...
 
but seriously do not come crying in here when you find it doesn't work how you think it will
 
lets say that we want to implement it your way... what are the problems u face ?
 
@2dsharp depends on the app, and crucially whether the data needs to be shared. When I do winforms apps I tend to use the built-in "settings" thingy which just uses an XML doc stored locally by default
 
11:32 AM
@DaveRandom How about a game where you need to store player information and scores frequently? Wouldn't databases be a better fit in those cases?
 
@sliver its 2 mysql query and always will be to get min and max - i just don't want person to wait for it
@sliver there is no regret
unless i separate the query into multiple end points
 
okay but php is still request and response.... u need to request the part u want to show....
if i ask the server to respond to me ever 2 min then what i will fetch from php will be still 1 response
it will grow ever 2 min... but its 1 response
 
@2dsharp very much not my area, but I would probably either use XML/JSON/whatever files if it's just a simple data structure, or bundle sqlite if I needed a queryable store
I'm sure there are other options
since you are talking about game related stuff, you would probably do better to ask the C++ guys
they will have a much better idea of what's available and what people actually use for that sort of thing
 
this might not be a problem of php but a problem that your javascript ajax has no idea what is going on...
 
I'm going to post this one more time, maybe one of you will read it this time developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/…
</patience>
 
11:36 AM
maybe insert a http header in each response u give that way it looks like your site refreshes ever time. but i there will be no request.... so who will receive the response ?
yes i agree the link looks good. i dont know how that works but it talks about events and thats the same aprouch as websockets... you process events...
 
@DaveRandom Yeah, I was asking developers in general what they prefer. Thanks for your inputs!
 
@DaveRandom very useful
 
@Sjon is your bank account info still the same?
 
@PeeHaa yes it is!
 
\o/ will get you some drinks this weekend <3
 
11:46 AM
Thanks man!
 
The only request I have is that you actually spend it on whiskey and not 3v4l
:P
 
@2dsharp The short answer is "it highly depends on the application and the type of data being stored and how you need to work with it and whether it needs to be stored securely" :-P
 
@PeeHaa That won't be a problem :D
 
:D
 
@PeeHaa The only problem will be deciding which one to pick whiskybase.com/profile/sjon0/lists/collection
 
11:49 AM
Gawd
So much good stuff so little time
 
yep. It's tough :P
 
I was about to complain about the missing singleton
But it's at the bottom :)
 
@PeeHaa is he allowed to spend it on whisky as well?
 
Yeah
Might be even better
:)
 
heyo!
 
11:51 AM
whisky is the Scottish version right?
@StatikStasis yo
 
@PeeHaa yeah, +e is american
 
aye
k
Don't do that one. Do the proper one
:P
 
Just found a REALLY interesting article on this day in history bit.ly/1gD53xE?x
 
I clicked it, but internet is slow so I closed it once I realized it's friday today and you send a link in chat
 
=D
I did not realize Google URL shortener was going away until a moment ago.
 
11:55 AM
@StatikStasis Such a noob move :P
 
That means you clicked it @mega6382 =P
 
No, I read @PeeHaa's message. :P
 
=/
I don't want to do any work today. I just want to sit in my office and read.
 
@StatikStasis I don't want to work either today, but I don't to read too. I just want to sleep in my office. :)
 
@tereško I just saw the funniest comment of yours last night. Let me find what it was...
Here it is - your comments to the question stackoverflow.com/questions/8369078/…
 

« first day (2778 days earlier)      last day (2173 days later) »