« first day (1767 days earlier)      last day (3197 days later) » 

10:00 AM
render the template server side and send down raw html?
 
They are STILL two different code basis.
So you've gained nothing.
 
the application exists on two different code bases
 
Yes, think about that for a second.
 
as far as i know, it's not a stretch to say that every website exists on two different code bases
 
Halp :-)
0
Q: Sed inline replace sentence in text file AFTER a match is found

JimboI'm trying to replace the first instance of a sentence in a text file after a match is found. Please note, the ' quotes are included in the search. I'm searching for the first instance of: 'database' => 'localhost' I'm replacing the first instance with: 'database' => 'new_database' I want to on...

 
10:00 AM
the front end's is js, the back end's is php
 
Right, now stop talking and start actually thinking about what you're saying. What have you gained by writing all of this extra code in two different langauages?
What is the benefit?
You still can't reuse the templates in both places.
 
er, a lot? :p
why not? :s
 
@AaronHarding How does that template you showed me work in PHP?
What will it do?
{{ this.img.src }}
What will PHP do with that?
 
it gets compiled into a function, which you can send data into it .. and html comes out the other end?
 
@Sherif You can, that's exactly the Handlebars syntax.
 
ThW
10:03 AM
@Sherif Actually if done correctly, he can. The template acts as a partial template on the server side executed by an php implementation of his syntax and as a full template rending the json on the client side executed by a js implementation of the same syntax.
 
is your question a technical one, or are you critiquing my method?
 
@Sherif Man, if you're trying to s/argue/suggest templating engines with their own syntax like twig aren't useful, and fun to work with, don't bother :P
 
@Jimbo The beauty of that argument is I don't have to argue anything :)
The argument falls on its own head.
It has no legs to stand on.
 
@NikiC but kinda stupid to truncate an exception in the middle of a message
 
@AaronHarding I'm trying to get you to realize on your own that you are doing an incredible amount of work and aren't actually getting any significant benefits out of that work. What you could be doing instead is virtually no work using existing, proven, safe, reliable, free, useful, and more main-stream tools that get you the same exact results only better, faster, and with less headache.
Once you've managed to wrap your head around what I'm saying you will thank me for it and want to strangle whoever misled you to believe otherwise.
 
10:05 AM
@Sherif but then i will need to maintain two separate templates, one for each code base?
 
@AaronHarding Nope
 
why not?
 
Forget about tempaltes for a second.
 
how will you render client side and server side?
 
You're too focused on the problem that you can't even tell the problems you created for yourself apart form the actual real-world problems that you do have.
 
10:06 AM
@NikiC the final (truncated) line looks then like this: #7 /Users/Bob/amp-chat/vendor/amphp/mysql/lib/Connection.php(1554): A in /Users/Bob/amp-chat/src/Commands/Users/Get.php on line 27 … looks somehow weird to me.
 
okay
i'm listening
i'm still not sure if this is a technical critique or a critique on the method :c
 
ThW
@AaronHarding rendering server side (even the parts) and send out the generated output.
 
@ThW are you suggesting sending down raw html to the client to parse?
 
@AaronHarding Think about what PHP does. It generates dynamic HTML at it's very core, right? So that means you simply want to do this in your HTML pastebin.com/ZcnbEmVm
 
ThW
10:09 AM
@AaronHarding No, I am not, but I think that is what @Sherif is propagating
 
@AaronHarding Great, now that we've established that let's think about what you actually want to do in the client side for a second.
 
shall i tell you? or?
 
Please do.
 
@ThW okay
 
@Jimbo noob!
 
10:10 AM
well, i would want to be able to update the view of the client when data changes
 
@PeeHaa ballsack!
 
:P
@Jimbo Maybe this link will help you ask a proper question ;-)
muhaha
 
I thought my question was bloody good!
 
:D
 
@AaronHarding Define view
 
10:11 AM
erm, a representation of data?
 
@AaronHarding So what you mean to say is template. Not view.
 
@Jimbo if sed's regex engine isn't enough, don't forget you can use perl -ne -i
 
Oh wait after occurence
 
Yes, after
Should I bold after as well?
 
10:13 AM
:P
 
:P
 
sure, but a view could be one template
eh, that's just semantics
carry on with your explanation
 
Because your problem isn't really updating the view, is it. If it were it would be as simple as making an ajax call back to the very PHP that generated that view in the first place and updating the DOM.
Nope, a view is not a template.
A template is a template and a view is a view.
 
okay, go on..
 
They are actually distinct concepts.
 
10:13 AM
@Jimbo but you basically need what you have + REPLACE_AFTER_THIS[\s\S]+ or something similar before your string to replace
 
@FlorianMargaine Exactly. I'm so close. Why on earth does that guy need sample inputs and outputs? The bullet points show what I want?
 
So really your problem, and I'm making an educated guess based on everything you've said and showed so far, is that you are making very poor assumptions about what your javascript has changed and what your PHP is trying to generate that you don't wish for them to get out of sync.
That's the real problem you're trying to solve, isn't it?
But what's worse is that your solution still bares this very same problem.
 
i guess keeping the client up to date
okay, which is?
 
You still have to maintain the synchronousity of the two tempalting engines... Actually fuck that. You actually have to build, test, and the maintain them and then hop like hell they are in sync.
That's an even worse outcome.
Now let's think about the actual solution again. Because believe me ... people much more clever than you and I have had this same problem and they have come up with better solutions.
 
i'm not sure if see a huge problem in that though. the model does all the calculations, and templates can really just be if/else/evaluations
 
10:17 AM
PHP being the first in your case and ReactJS being the second.
 
haha okay
 
Rasmus tried to solve your templating problem by handing you PHP.
 
yes, this is what i'm interested in
 
Facebook tried to solve your js sync problem by handing you flux
So actually... you don't have to write a single line of code OR keep templates in sync.
You just have to write PHP :)
and you're done
 
@Sherif rasmus just made form handling possible everything else are lucky mistakes
 
10:19 AM
so what type of data is being sent down to the client?
 
@PeeHaa There are no lucky mistakes. Only happy accidents.
 
:)
 
@AaronHarding The same type of data your PHP is sending to the client now :)
 
well, sometimes that's json
 
Nope
 
10:20 AM
a json representation of the new comments or the updated comments
 
Your PHP sends HTML to the client
 
raw html tho
 
You continue to send HTML to the client
@AaronHarding Yup
 
that's what i don't agree with :|
 
You don't get to agree or disagree.
You just get to stand on the shoulders of geniuses and call yourself tall.
Welcome to open source!
 
10:21 AM
@Sherif Dude, quit it
Of course he gets to agree or disagree
 
Stop inventing new problems to solve. Start solving problems you never wanted.
 
I've been watching your comments and you're starting to be an ass - that's not the spirit of OSS
> is that you are making very poor assumptions
Don't make it personal
 
I make nothing personal :)
 
Yes you do, that comment made it personal
And it riled me up a bit, quit it
 
@Sherif eh, perhaps i do
@Sherif fair enough, thanks for the explanation
 
10:22 AM
@Jimbo Well, perhaps you are riled up because you are looking for a reason to get riled up ;)
@AaronHarding No problem
 
@Sherif Nope, just don't go telling people they don't get to agree or disagree, and they are making poor assumptions
 
The point isn't to work harder, but to work smarter. Of course the choice is yours. I'm saying there's no need to argue with what already works. You either choose to use it or you choose to leave it.
heh
You really are looking for a fight I see.
 
Nope, just don't be rude.
 
K... I will be the bigger man and not give you one.
 
@Fabor If it's only your phone theny it might be the router, the one issue with those older Drayteks is that the WiFi can be a bit crappy. tbh I'd always recommend a separate dedicated AP if you don't mind splashing out for one (about £40-50 is a good price to pay, you don't need a mega expensive one but the really cheap ones can be a bit shitty as well). If you had decent WiFi off your old box you could repurpose that as an AP.
 
10:25 AM
Like that black ASUS one I had?
 
Just set its LAN IP to something that won't conflict with DHCP, disable DHCP and that should be all you'd need
@Fabor Yeh, it's worth a try since it wouldn't cost you anything
 
so, you would write your templates in php, and render them on the server, then send them back to the client?
 
"knowing is useless without understanding and empathy" - Richard Feynman
 
i dunno, man, you are pretty sarcastic
not detecting much empathy :c
 
I'm the least sarcastic person in here :)
 
10:27 AM
lmao
you know these chat messages are archived? ;)
 
@Sherif ...he said, sarcastically :-P
 
You think just because you can't understand something that it is any less trenchant than what you do understand? I posit that you take seriously now can be viewed as more derisive than what you don't.
You need not like me to find what I'm saying useful, but you can't argue that you're here because you have satisfied the utility that is missing from your current situation.
I'm just offering you a different way of getting there.
 
are you talking to dave or myself?
because i have no complaints?
 
You needn't complain. I'm just clarifying.
I empathize with you because I have been in your shoes before.
Which causes to me want to understand your problem even more than you do. Which is what forces me to explore competing ideas and alternative solutions so that I can prepared to help people in similar situations more thoroughly.
That's not sarcasm. That's passion.
 
DNC
10:36 AM
@Sherif How come Instagram can load it's images so fast? I made a tableview with 400x400 images and it is loading slower than instagram(insta has 640x640)
 
sure, that's not sarcasm, and yeah that is empathy now that you've explained it
 
@DNC I don't know... I'd imagine it has something to do with their enormous computing and human resources?
 
it was hard to detect, which is what i was saying ^^
 
DNC
@Sherif Are you familiar with LAMP systems?
 
Sure, anything is hard to detect in a text-based medium.
That's what I keep telling people :)
Chillax. No one is out to get anyone. We're all just humans trying to do our thing.
@DNC You mean Linux?
Or the thing on my nightstand?
 
DNC
10:39 AM
1st one..
 
i don't know, i don't want to carry on this point anyway. perhaps in another channel.
 
@DNC Sure
Who isn't?
It only runs about half the world's computers.
 
DNC
Are LAMP systems supposed to be faster than a Hosting MySQL from hostgator?
 
Things are as fast as you make them.
 
@DNC I recommend learning what "LAMP" stands for
 
10:40 AM
Could we get this question reopened? The dupe linked doesn't answer it, for reasons both in the post and in comments.
 
DNC
Linux Apache MySQL PHP
 
OK, so you are asking is Linux Apache MySQL and PHP are faster than MySQL from hostgator?
 
let me set something straight then: hostgator hosts LAMP systems.
 
Think about it.
 
DNC
Ok let me rephrase that: If I built my own server at home, will it be faster than if I host it from hostgator?
 
10:41 AM
hm...
so.
I've gone through all of internet. Is there something else to read?
 
@DNC Only if you build it faster than the equivalent server you'd be using from hostgator
@FlorianMargaine There's always the dark corners of ToR?
You could read the 1s and 0s as they fly by
 
DNC
@Sherif So this means Instagram has built itself some very fast servers?
 
@Sherif been there, done that, not fun
 
@DNC I don't know that they have. They could have also bought very fast servers as well.
When did I become a rubber duck, btw?
 
You've always been a rubber duck, @Sherif
 
10:47 AM
@Ocramius I had your defensive prog slides open on my screen an I left a slide that said "make state private" on while I went away from my desk, and the guy behind me though I was making some kind of political statement :-P
 
lol
tell him that it doesn't work: the USA are a perfect example of why :P
 
@salathe That explains so much
 
@Ocramius Honestly, I'm not sure what I prefer in that regard... incompetent civil servants or incompetent private companies, it's two sides of the same coin
If private doesn't work and public doesn't work, maybe we need some protected services
 
@DaveRandom incompetent civil servants can't be fired. Incompetent private companies go out of business eventually.
 
@Sherif Yeh but they're just replaced by the next in the long line of companies who are ready and waiting to fuck shit up in a different way. Also they often don't go out of business, consider g4s :-(
 
10:57 AM
@DaveRandom Think of it like a lottery. You're bound to hit the right number eventually. But if you keep playing the loser, what's the point?
Besides, private business are in it to make a profit. Governments are just in it.
 
Hi all, I want to access this api yii2-rest-githubjeka.c9.io/rest/web but it requires username and password combo. How to pass username and password in url? username:demo and Password:demo
 
@Sherif I'd say that's an argument in favour of letting governments do it, I mean it's not like I don't give them enough of my money already
 
github repo is over here github.com/githubjeka/angular-yii2
 
@DaveRandom No, they take your money.
It's definitely an argument that trying the same thing over and over again and expecting different results is a mark of insanity, however.
 
Anyone?
 
11:01 AM
@Sherif True, but I don't see that as a good argument in favour of me then being required to hand yet more it over to private companies for public services...
 
@DaveRandom Except that you're not required. You see the Free Rider problem tells us that in Economics, the poor guy has no more incentive to pay higher taxes than the rich guy, because they both get the same services regardless. The police protect you just like they do everyone else.
So what's the incentive to do better?
At least private companies have an incentive to turn a profit.
Efficiency, improvement, and quality matter a great deal to a private company with money on the line. Not so much to a government and a civil servant with job security.
 
The problem with that, though, is that they can still charge wtf they want because they are operating things that people need (and will pay for) regardless of what they cost. I'm not about to start walking 12 miles to work every day, so I'm forced to pay extortionate public transport fares (~£6.50/day).
 
But what you're referring to there is the one factor that doesn't change. You see in a world run by humans what doesn't change is greed and ambivalence. Though to level the playing field you put a governing power in charge of contracting the private company that supplies the need and suddenly the balance of power shifts in favor of success.
If you don't fulfill the contract within reason, we cut you off and give it to the next lowest bidder :)
It's not perfect, but I posit that it's still better than tipping the scales of power all in one direction.
 
@Sherif The "lowest bidder" part is the problem. It's passing the responsibility of paying for it on to the people who can least afford it.
 
@DaveRandom How do you figure?
 
11:16 AM
Because they are getting less money from the government, they then attempt to recoup the losses by charging the people who use the services - in general, the part of the population with the least fluid income, because the people who could afford it can also afford the premium private services
Or they drive to work because they are happy to pay for parking, or whatever
There's also an inherent culture of providing the minimum service to fulfill the contract in that model, basically the least they can get away with
Essentially, if my taxes are not going toward things I use, why the hell am I paying them?
 
That's possible, but not inherently true. There is also incentive to provide a more efficient and cost-effective service, because as a private business you don't want to lose out on a huge government contract. If you do poorly and it goes to someone else you still lost as a private business. You have less reasons to play the game by those rules.
Now think of the alternative. You let the government do it and fund it from taxes....
What's incentivizes the government to make anything more efficient and cost-effective?
Furthermore, what incentivizes you to pay more taxes for a better serivce if your utility of the service is the same as the guy that's not paying their taxes?
Now you look at the free market and you realize, the guy that wants a premium service and is willing to pay a premium price for it, is an excellent incentive for the private company running it to do a better job.
The guy that just wants the basic service, well he can still get that too but he can pay less.
In economics, the free rider problem occurs when those who benefit from resources, goods, or services do not pay for them, which results in an under-provision of those goods or services. The free rider problem is the question of how to limit free riding and its negative effects in these situations. The free rider problem may occur when property rights are not clearly defined and imposed. An opposite concept is that of a forced rider. The free rider problem is common among public goods. These are goods that have two characteristics: non-excludability — non-paying consumers cannot be prevented from...
 
Owing to the fact that I need to get on with some work, I think we'll just have to agree to diagree for now
 
I think what you disagree with is the politics. I'm just looking at it purely from an economic perspective. It does work. Of course, when you add politics on to that platter we have a whole new world of problems to deal with.
 
Is SoapClient documented at all? The documentation online is laughable, to put it nicely. is that really all the documentation?
 
@DougGale Pretty much. Because ... well ... who uses SOAP anymore?
 
11:28 AM
:( Not through any fault of my own.
 
@Sherif unfortunately, a client :(
 
Fire that client.
 
lol
 
You'll be doing them a favor.
 
good idea
 
11:29 AM
@Sherif I share @Jimbo's feeling about your discussion culture. It's one of the reasons why I avoid getting into discussions with you. I often perceive the way you get your arguments across as if you are trying to make the other person look dumb and yourself above them. Like you are the know-it-all. You are obviously free to ignore this feedback.
 
@DougGale Which part of the documentation are you not finding useful?
 
entire SoapClient class documentation
and all its methods
seriously, most of them are one sentence
 
@DougGale I get that, but what do you need clarifying specifically?
You have to start somewhere.
 
SoapClient::SoapClient. runs in WSDL or non-WSDL!!! yay!
how do you pass parameters
associative array right?
where does it say that
 
@DougGale Probably on the constructor documentation page, I'd imagine. php.net/manual/en/soapclient.soapclient.php
 
11:32 AM
it doesn't even say how to call a method
 
> public SoapClient::SoapClient ( mixed $wsdl [, array $options ] )
 
hint: not __call and not __soapCall either
 
@DougGale after creating $client, you can do $client->methodName($param);
 
that's how to connect and fetch wsdl and initialize...
how do you call a method
ok, where is that documented?
I want to read the docs on the $param argument
 
It's specified in the wsdl
 
11:33 AM
lol
no, the php part
wdsl doesn't say anything about SoapVar
where is SoapVar documented
 
ummm, the page I just pointed to?
 
you are kidding right?
A class representing a variable or object for use with SOAP services.
^^^ that is the entire documentation
 
It is?
Maybe you and I are reading from different documentation then.
 
Guys, is it permissible according to the StackOverflow rules to change your accounts?
 
@Sherif show me one word on how to use soapvar and where you use it
 
11:36 AM
@DougGale You do realize there is a Table of Contents with links to the individual method documentation on that page, right?
 
click those links
 
@HassanAlthaf you can have as many accounts as you want.
 
they are nothing either
one sentence
 
@Gordon Wow, really? :P
Then what is the point of question block on StackOverflow? LOL
 
@HassanAlthaf Unless you are using them to do sock puppet voting or circumvent a question ban.
 
11:36 AM
How do you count one sentence?
 
I see, what if you want to do so if you like feel ashamed of the nooby questions you asked in the past?
 
@HassanAlthaf if we catch you using an account to circumvent any of our policies, we will delete/block/merge the account and maybe hand out a suspension on your main account.
 
you don't really consider this to be documentation do you: type_name: The type name. node_name: The XML node name.
 
@Gordon My first account did have a question block, but I use this account to get rid of that ugly image it gives.
 
foo: the foo. bar: the bar. baz: the baz. number: pass a number
 
11:38 AM
But it had a decent reputation on CodeReview.
 
@DougGale Sure, it's not great documentation, but like it is documentation. Like I said, it's SOAP. Clearly no one cares enough to improve its documentation since not very many people use it.
 
I hope I didn't break any policies.
 
@Sherif that comment generated garbage isn't documentation, it is some crappy sweeping generalization comment slapped in the source and put into that garbage webpage with a tool
generated documentation is utter crap
 
@HassanAlthaf you can ask the SE team to disconnect your account from the noob questions.
 
At least it tells you what the classes and methods are arguments and what arguments they take. I've had to read far worse documentation in PHP before when I was working with ncurses. That thing didn't even tell you what arguments functions took in some places.
 
11:40 AM
they knew it was crap too, which is why that noob wiki is 90% of the content
 
@Gordon as in, I can remove that account, and put it in this account?
Oh!
 
Yea well, feel free to contribute your own time back to the community if you feel so compelled.
 
@DougGale what do you suggest?
 
@Gordon Awesome, I'll do so then. How do I do that?
 
Remember, someone gave up their time to provide you with their contributions. Calling it crap isn't going to make you look any more benevolent.
 
11:42 AM
@salathe a link to the php native source code (so you at least infer something), would help
 
@HassanAlthaf no. as in you compile a list of questions you want your name removed from, mail it to the SE team and then they likely will remove your name.
 
@HassanAlthaf mail team@stackexchange.com or use the form at stackoverflow.com/contact
 
Oh, will it also work for StackOverflow ones?
 
11:43 AM
:)
 
StackOverflow is what has got loads of it.
 
thanks
 
If you have a specific question, rather than a moan about the complete lack of documentation, do feel free to ask.
 
@HassanAlthaf you have to tell them precisely which posts you want disassociated from your account
 
Alright, awesome.
 
11:44 AM
@salathe I have a moan about the incomplete lack of documentation... who do I talk to :/
 
I'd give you a hug if I knew you in real life.
 
Fact is, no-one cares enough about SOAP to put much effort in there. If you do, then I'll invite you to contribute your own additions... I'll happily help you to do that.
@Sherif You're a rubber duck, talk to yourself. :)
 
This is my first account.
 
@HassanAlthaf you're welcome
 
@salathe What a clever idea! :D
@salathe Your wisdom pierces me like the stars in the night sky, you know that
 
11:46 AM
@Sherif I do sometimes have clever ideas :)
 
Yes, you have been known to
 
Well, @Gordon I think I will use a new account because it will require a lot of work from the team.
It's too many questions and answers.
In various sites.
 
@HassanAlthaf let me check with the other mods
 
morning guys!
 
Morning.
 
11:59 AM
@HassanAlthaf part of your qban problem is that you didnt edit the dv'ed questions. another part is that you deleted them. Deleted questions still count towards the qban. Undelete them and try to edit them first. If that doesn't help, contact the SE team.
Also when editing, start with the most recent ones first.
don't create a new account for now. It will look like you are trying to evade the qban. It will only get you into trouble.
 
posted on August 18, 2015 by kbironneau

/* by STC/HMD */

 
Morning
 
Anonymous
o/
 
@bwoebi It’s probably somewhere in the contribution guidelines that every functionality is required to have at least one quirky corner case.
yeah, PHP … ^^
 
@Gordon Eh, they can't be improved. They are too nooby. And a few months ago, I did try recovering deleted ones, but that didn't work.
 
@HassanAlthaf you'll never know unless you try. But given that you created a new account two days ago already, go with that account now.
 
Yeah, i have abandoned the old account.
 
12:41 PM
Hey I have really bad memory, but was php7 already branched out from master? As in can 7.1 features already be merged to master?
 
@nikita2206 IIRC it was going to be done when 5.4 was officially killed, not been following internals for a few wks though
wait, 5.3?
We have too many active branches :-(
 
When is PHP7 coming out officially?
How to enable errors in PHP? It gives me white screen.. ;(
Nvm solve.
d
 
@DaveRandom yeah I think 5.3 was or is going to be killed in a couple months and 5.4 should have gone to security only support
 
@nikita2206 That's it. Last I heard that was when 7 was going to be properly branched off.
I think @Tyrael is lurking somewhere, he'd be the man to ask
 
Ah yeah, we have a pretty versions page, I forgot!
It says 5.4 is going to be killed in 14th of Sep
 

« first day (1767 days earlier)      last day (3197 days later) »