« first day (1332 days earlier)      last day (3842 days later) » 

00:10
quick question

Can I include anything in my MySQL query to make sure this one integer doesn't go over ten? Or set a maximum value for a key? I know I can set a maximum length..
@PeeHaa I'm glad you liked it :-)
@ircmaxell :)
mandelbrot(1000) (Run 1):
JIT: 0.57575488090515 Seconds
PHP: 3.0945909023285 Seconds
Qb: 0.39555287361145 Seconds
HHVM: 0.73659896850586 Seconds
so no longer the fastest, but still pretty dam fast
mandelbrot(2000) (Run 1):
int(1)
PHP: 13.006353855133 Seconds
HHVM: 2.9375720024109 Seconds
JIT: 2.3399691581726 Seconds
Qb: 1.6809599399567 Seconds
Those times are pretty amazing indeedd
Fibo is my favorite
fibo(40) (Run 1):
Qb: 76.56302189827 Seconds
PHP: 49.117811918259 Seconds
HHVM: 1.8852560520172 Seconds
JIT: 1.0475509166718 Seconds
00:26
awesome
note that the recursive fibo(40) takes 0.937 seconds on my machine in C (and 0.370 seconds when compiled with -O3)
 
3 hours later…
03:26
exit(); // night folks
 
2 hours later…
05:41
morning tumbleweeds!
06:19
hello, anyone have experience with "OPENFIRE" chat server ????
06:30
@Mark have you tried asking on the main site?
no
i dont have code to show on main site
i only have openfire admin panel
this is the issue that
my jabber ID are coming blank and my php script not moving ahead
06:52
@Mark i dont know how people will be able to help you without more info.. can't you make the problem more specific?
there are bunch of questions you can check to see how you could create your own..
but on main site they put minus rating on questions which dont have code...
@Mark Oh, so you do have a PHP script, you do have code...
no....my php script and all things working fine.....
openfire is ready to use tool on web...
07:07
morningz
two days back that was working fine..
now what happen is Jabber Id is not showin as i shown in image...
postimg.org/image/dv007ejuh
I'm getting a permission denied error when I try to create a database using phpmyadmin
On my server
everyone should now be prepared for all software to be called Eugene for the foreseeable future ...
Can some one tell me why I'm geting a permission denied error when I try to create a new database
using SQL
@Mark well ... we cannot help you either. E_DOESNT_WORK is not a know PHP error code.
and , one cannot debug a screenshot
07:25
should i send you log file ?
log is in java
@Mark then why the fuck are you asking HERE !? This is a PHP chat room.
good mornings
I want to send about 50 images to be displayed on a page.
I heard that you can do something with keep-alive, anyone knows something about it?
07:41
Morning
morning
morning
Hmm for some reason my head of dev is asking everyones opinion on Swift. :-/
07:47
hmm ... lets see if I can distill my opinion.
I think it goes something like this: I couldn't care less
@Fabien if you don't have one, I'll lend you mine ... "pointless" ...
@ircmaxell :(
@bwoebi wd
@NikiC there may be room for improvement still ...
qb is actually pretty complicated, hadn't looked at it until yesterday ...
@JoeWatkins pushed.
yeah saw
:)
07:56
@JoeWatkins heh. Also, iOs only which seems great for Apple.
travis doesn't segfault anymore
but it wasn't a ZTS issue but a readline/libedit one. The one thing appends the \n, the other doesn't...
@bwoebi me neither, I already tested ...
Its been like 10 minutes
by adding NUL-bytes checks it works now
im stuggling with such a silly issue
07:57
awesomesauce
i cant replace html tags from a string -.-
-2
Q: php replace html from file

meWantToLearnI have a file which has the following html template.php <hr style="color: #d9d9d9; height: 1px; background: #d9d9d9; border: none;"> <p>{DATA}</p> PHP code $htmlBD = file_get_contents('template.php'); $htmlBD = str_replace('{DATA}','List',$htmlBD ); // this works it replaces data ...

@JoeWatkins can I push to php-src? :-)
done any testing ??
If you elaborate Joe, i'll add it to my response :P
@JoeWatkins little bit… but tests also pass… so I suppose it should work
07:59
@bwoebi okay, do it ..
(I tested a little too, we need to improve tests)
@JoeWatkins feel free to, I'm bad at creating random tests^^
@Fabien as a programmer, me entire opinion is genuinely "pointless" ... if my manager asked me to consider switching to something that has existed for 5 minutes, I'd think he needs his head checking. As a manager you should only look to change your stack if there is something holding you back about the current one, I do not see what problems swifts solves that are not already solved in 10 other languages that have existed for a long time and are mature enough to rely on ...
lastly, I hate closed source things ... nobody gets anything out of that ...
you can't really put that ... because it'll sound like you're telling him how to do his job ... but it's a questionable decision to ask your opinion of something that has existed for 5 minutes as if the feedback he gets will be enough to make an informed decision, it certainly is not ...
@JoeWatkins Makes sense. I had expressed my concerns over it being too new a language.
@JoeWatkins Phraseology is one of my specialities :)
it's not mine ... a spade is a spade :D
an international clock widget under the starred list would be nice ...
@JoeWatkins merged into php-src/master
08:08
cool
@JoeWatkins Could probably build an extension for that.
@bwoebi yeah, all good ...
monring
Mornin Dave
08:10
I wanted to say that ... thought it'd be dv'd to death ...
morning @DaveRandom
good mornings I hope the coffee is fine :)
@JoeWatkins could you look into why the make test-phpdbg showed Pass yesterday while all tests segfaulted…
yeah I will (and look at doing more tests in general) but it'll be a few days, maybe next weekend, before I get to it ...
@Tudor I don't think you really know what you are talking about, so I'm happy to ignore you. — Joe Watkins Jun 6 at 6:18
@JoeWatkins I'm talking about soa, messaging between components as a means of parallel programming. How you deal with the memory space of each component is just a detail (thread, process, cluster node, web server). — Tudor 12 mins ago
is he trying to sound smart ?
08:26
I think so ...
Probably just trying not to come across as dumb.
it didn't work ...
@DaveRandom sounds fun ...
I wonder ...
@JoeWatkins Somehow I knew your first though would be "hmmm, maybe we could do that in PHP..." :-P
08:34
> At an early stage of the initiative, we are getting excellent speedups of close to 400% using float32x4 and int32x4 SIMD operations
seems worth some research tho right ?
I'll watch ... (let them do it hehe)
It's interesting, but I have mixed feelings about all this. JS seems to be touted as the One True Way for UI development at the moment and that makes me a bit sad.
11
A: Throw a null-pointer exception

primoPHP This one has bitten me a few times. <?php class Foo { private $bar; function init() { $this->bar = new Bar(); } function foo() { $this->bar->display_greeting(); // Line 11 } } class Bar { function display_greeting() { echo "Hello, World!"; } } $foo_instance ...

Damn, I'm bad… I had to look at the reason first :-( (@NikiC yeah, we need to kill these in PHP 6… Or at least deprecate them)
@JoeWatkins Absolutely, the concept is really neat, although it probably has limited usefulness in the average PHP application
echo "Thank you for subscribing, $firstName";
@DaveRandom Becoming more than just UI too.
08:38
@bwoebi I had to look as well...
This is returning Thank you for Subcribing but not the first name
Definitely need to kill those
Please help me
@NikiC okay, now I don't feel so bad ^^
somebody can crawl down and spend the last missing close vote? stackoverflow.com/q/24111585/367456
08:40
@bwoebi I also certainly have spent a non-trivial amount of time debugging "that can't possibly happen" bugs because of that :(
@DaveRandom we are dinosaurs ... the next generation will all wear skinny jeans and identify as "app developers", this is where the money is being spent ...
@NikiC a debug_print_backtrace() often helps ;-)
@JoeWatkins Those skinny jeans have a high chance of killing their reproduction chances though.
@bwoebi Particularly often run into this issue when doing some quick test of behavior
but yeah… we really need errors to be exceptions here…
08:43
where I just do class A { function a() { ... } }
@NikiC agree. But you also can just use a() as constructor intentionally and then start with b as method…
and because I'm already testing some edge-case behavior, I end up thinking that PHP just behaves totally crazily ^^
@DaveRandom this is far more useful than it sounds on the face of it ...
@JoeWatkins I would venture that if you are doing these kind of operations, PHP is the wrong language to do it with. That said, I suppose if PHP did support such funky low-level stuff then that would be less true...
@JoeWatkins I don't have too much of a problem with that (if the want to look like penises then that's their call :-P) but JS is so wrong in so many ways.
I'm really torn here, because I actually like Javascript, but I wouldn't wish it on anyone else...
well, assume that it can be used in ways other than it's intended purpose, assume that to write a test that shows it's maximum gain, such as the ones shown, you would have to be doing just vector ops, but if I can instruct a processor to make four comparisons in parralel then that can be used for other things, imagine this code
<?php
if ($a) {
	$c = new Something();
}

if ($b) {
	$d->doSomething();
}

?>
08:49
@JoeWatkins did you ever look at bugs.php.net/bug.php?id=67188 ?
in some circumstances, I can perform the comparisons for that branching at once, ahead of time ...
that will make a difference ...
@bwoebi I didn't, terry kinda disappeared ...
Sup guys, remember that Sever Arbiter I was talking about? With Rule objects? Is it okay for me to DI a service into that Rule so it can get the information it needs? One of the rules is "Number of downloads on a server" - can I inject an SSH service into there so the rule can SSH into the server to 'get' that number of downloads?
@JoeWatkins what does that have to do with him?
he done all that stuff
@JoeWatkins yeah, and now? are you going to apply that blindly?
08:53
no
leave it broken?
do you have a solaris vm ?
I don't ...
nope, I don't
no, it'll have to be tested, when I've the time ...
or you could do it ...
when you have the time ...
(And on my current machine I have no VM software at all currently)
08:54
@JoeWatkins I'm imagining that would require a JIT in order to actually gain anything, otherwise the overhead of figuring out which ops can be performed in parallel would kill the gains? (starting to get out of my zone of actually knowing what I'm talking about)
we can't just merge, gotta test it ...
@DaveRandom well ...
user924016
Mornings
@RonniSkansing morning
@DaveRandom not require
well maybe ... it's hard to imagine ...
there wouldn't necessarily be a measurable overhead in the first place
because the figuring out could also be done in parallel ...
that's my final answer ...
clever concurrency ... we are such clever monkeys ...
@JoeWatkins I meant that presumably you would need known types in order to gain the efficiency, which would (as I understand it) require things that a) the compiler can't currently do and b) a JIT would make easier, although like I say I'm really out of my zone of actually knowing what I'm talking about
09:12
a non-jit compiler can infer almost as much about types as a jit one, but it's not useful to do so, so we don't ... if you could make those inferences in parallel, and the subsequent comparisons you determine are required parallel, you will drown out the overhead of the "extra" work ... in a non-jit compiler, we'd have to call it "extra" work, in a jit you're doing some of that work anyway ... in either scenario you will see gains, the maths of it says you will, I'm pretty sure ...
I can easily be wrong, happens all the time ...
what I describe is hugely complicated, but it's no less complicated for a jit or non-jit, I think either is doable, I'd rather attempt in the context of a jit, but you asked the question so I attempted an answer .. it could be wrong ...
@JoeWatkins No, you're never wrong. That statement is wrong. Wait...
hehe
my power just went out
chat remembered what I was typing ... +40 internet points for whoever made that decision ...
obviously if you want to see the sorts of results that the article there shows, you're going to have to be doing mostly what it is intended for ... but that's not really my thing, I think there are definitely other ways it can be put to use ... in a system prepared for it ... able to change for it ... php isn't that ... so pipe dreams mostly ...
that's what I was typing ...
09:22
@JoeWatkins balpha has enough internet points already
@DaveRandom this is like the liar paradox
@JoeWatkins No I want it now, I want to write a bitcoin miner in PHP!!!!!!1111oneeleven
@iroegbu yeah philosophers like that kind of thing ... the sentence is actually non-sense ...
user924016
09:37
is this a workday for you guys?
nop
@RonniSkansing I think it depends where you work
user924016
=]
Oh it's been a while since I really chatted here...
@JoeWatkins yeah, it just revolves around itself
user924016
09:42
So what's up?
Busy with school...
I'm working to link a prestashop site with a phonegap app...
^ that's also for school. I'm being exploited sighs
user924016
=] I never used phonegap, how is it to work with? (always heard, never use phonegap)
I wish I was that "exploited" back in school
user924016
lol
@HamZa what kind of school?
09:50
It's cool. It was a bit of a hassle to setup the environment but once it's all setup you can pretty much rock an app in no time. Of course it depends on the use-case. Anyways, the only thing I'm concerned about it is:
- It's slower than native: sometimes it bugs/lags
- security: I've got the idea that it's easy to reverse-engineer, but I'm not sure. It's just speculation...
@NikiC "Amsterdam University of Applied Sciences", it's not really an university. It's something hybrid: ~50% theory / ~50% practice
user924016
oh cool.. I always been a bit suspicious to something that emulates and builds all =]
@RonniSkansing same here...
kivy seems interesting (python).
@NikiC In what school are you right now?
user924016
Always feel like coding some JS and canvas when I see stuff like that..
user924016
(games)
If, after asking a question, I realise it should be on serverfault not SO, should I flag my own question for it to be moved or just delete and re-ask on serverfault?
10:02
Morning
lol
Morning Leri
:D
morning
Morning Alma
hey, @Fabien What's going on?
I see it was hell of a battle around HHVM here
10:04
Fairly standard discussion.
@Leri I have an idea how to add triggers testing functionality. I think that will be really useful
@AlmaDo Yes, especially it would be awesome to check if trigger was actually called, when it's supposed to
How are you going to do that?
@Leri long story. But I have to implement DDL checks for procedures first (that would be difficult, but I know how to do that)
with that, however, API for management of tests would be needed
@AlmaDo Nice. Also API should be as simple and intuitive as possible. We all know developers are kinda lazy writing tests unless it's really plain and simple.
@Leri yes. In fact, I want to do it with maximum 1-2 parameters per call
10:13
btw, I liked angularjs, however, I did not like the suggested way of unit-testing. It creates really needless dependency on nodejs...
However, there is one thing that is impossible to test :( I.e. if procedure throws a row set(s)
@AlmaDo What does throws a row set mean?
@Leri when you're doing "SELECT" in procedure (i.e. "SELECT" into outdise). MySQL will generate result set for that and send it to client immedeately. The worst thing is - that nothing prevents from doing that as many times as you wish. And each time will produce independent row set. Thus, "result" of such procedure will be multiple row sets
I can't imagine use-case, when multiple row sets are really justified, but, since such possibility exists, I can do nothing to test it.
You can't handle everything and that's pretty normal. :)
Yes. For me, it's kind of a way to shot yourself :D
But DDL-s and DML without SELECT's are ok to test (and they will be added to functionality)
I'm not sure, but may be I'll add even GRANT-s checks
10:22
You're going to end-up userland unit-test of mysql. :D
Well, I'm not sure about stored procedures or functions (they have use-cases for banks, as you've said, but that's not very common case) - but triggers are definitly good thing to test
I need 1 billion USD, but nobody gives me. :( Now to be constructive: what have you tried besides posting question on SO and how that fails? — Leri 10 secs ago
@AlmaDo Not only for banks, I also often use them to encapsulate some big queries that can be used in several places.
@Leri that has little sense in terms of "logic". If you do that, then it's enough for you to test your query
10:28
@AlmaDo No, it isn't. For example, I want to get coupons for product but for admin panel I want them all, for client I want just valid/active coupons. I create stored procedure and I pass additional parameter to handle filtering options. I need test for that proc.
1
Q: Is it possible to get empty array value via $_GET?

sectusIs it possible to get empty array(array with 0 items) value via $_GET? Is it possible with direct value setting? count($_GET['param'])==0

@Leri then your procedure isn't just a "wrapper", it has logic (:
Anyone familiar with rdlowrey/Alert
@AlmaDo Yes, it has. Maybe little bit of business logic but not that much.
@Jimbo lol and morning
monring
10:30
What is the best php learning book ever?
Head First PHP and MySQL
@Ufoguy Experience.
And the manual.
@Jimbo a tiny bit… what's your question?
@Ufoguy php.net however, I highly recommend to have some prior experience in general programming (including both procedural and OOP)
10:33
@bwoebi I want to know if it's a good tool for making blocking calls like I/O, DB calls or SSH calls - all of these take time - does this block the main process?
@HamZa where is it possible to test GET query (sandbox) ?
@AlmaDo huh? var_dump()?
@Jimbo You need to have a (socket) stream here. If you manage somehow to use libuv with streams for I/O, no problem. For the db and ssh, you need always the underlying stream socket.
@HamZa I just have no local web-server currently
@Jimbo if you don't have the underlying socket, you need to open the stream and implement the protocol yourself…
10:38
@bwoebi Hmm, might consider React's stuff then. There's a promise implementation (I'm guessing this is what I might need)
@Jimbo no, it isn't. You have the same limitation with react here.
no DOS please :P
@bwoebi Okay.. how about ZeroMQ.. add the thing to a queue, a worker takes the job, does it then returns the data to the event loop
That'd work right :D
@Jimbo yeah, you just need to implement the protocol behind it…
(React has done it for you, that's the only difference: github.com/reactphp/zmq/tree/master/src/React/ZMQ)
10:44
@bwoebi I'm using Ratchet for websockets, so I think I can just tag on the zero mq stuff
@Jimbo What are you actually doing?
@Jimbo yeah, ratchet is based on react…
@DaveRandom Well a websocket connection exists for someone whose getting their torrent data. Event loop gets this data and 'pushes' it to the client. Imagine for some reason there's a long period of time during the RPC request for that torrent data because the box has gone down or something. That means it's blocking - and everyone else who is connected is going to have to wait as well
So, shove it in a queue and forget about it. Then the queue can handle the stuff that takes a while, and pass it back into the loop eventually to be pushed to the client. Async
Also, I'm using mysql :-)
10:49
hey guys if i have a form and on submit via jquery/ajax how can i pass data foreach variable in post php
@Jimbo Is it too late to change? Migration should be fairly painless...
user924016
@ThinkkSo Give us a shot at what you think is a way to do that
@DaveRandom I don't want to change db technologies for this, I'm not actually talking about db queries atm - that's just maybe an additional
data: {}
specifiy the input names?
user924016
Sounds pretty good
user924016
10:51
So what goes wrong?
user924016
Have you read the docs?
@Jimbo Oh wait sorry I misunderstood. How are you making the RPC calls at the moment then?
@DaveRandom HTTP with Artax
@RonniSkansing so for example if input has name of texthere that will go in $_POST['texthere']?
10:52
@AlmaDo It doesn't create an empty array... count($_GET['a']) is 1...
user924016
@ThinkkSo close..
user924016
Check the docs, for example api.jquery.com/jquery.post
@Jimbo So... where's the problem then? Isn't that already non-blocking?
user924016
look at the second arg (data), it takes a plain object or a string
As far as my knowledge goes, it's impossible?
10:53
@DaveRandom How's it non-blocking? If the RPC request takes it's time, I can get a SocketTimeout exception... after waiting for 20 seconds example
user924016
So you have to feed the data there
@Jimbo So you are using Artax in blocking mode?
@RonniSkansing im using ajax instead of load lol but yeah so pretty much what i specified?
user924016
@HamZa oh, got that. Then in comments it's already proposed. ?a=[]
10:56
@Jimbo You need to pick an event loop architecture an stick to it. Trying to mix different loops up together won't end well - you are using ratchet, so use the React HTTP client., and it's already automagically non-blocking
user924016
@ThinkkSo does it make sense?
Unless there's an Artax-React bridge, I'm not sure /cc @rdlowrey
@AlmaDo that's a string?
@HamZa cyber.servehttp.com/printr.php?a=[] I see array. What does first and second output mean ?
sorta. so i specify the name : withdatahere,
andso : on
user924016
10:58
You have to take the data and either url encode it (pass the data as a string) or make a object
user924016
with the data and pass that
@AlmaDo first one is a print_r and the second one is a var_dump
ok let me try it out be back if i run into a problem
lol thanks btw
user924016
14
Q: jQuery - Getting form values for ajax POST

user547794I am trying to post form values via AJAX to a php file. How do I collect my form values to send inside of the "data" parameter? $.ajax({ type: "POST", data: "submit=1&username="+username+"&email="+email+"&password="+password+"&passconf="+passconf, url: "http://rt.ja.com/...

@HamZa oh, then it's a string
user924016
10:59
Take a look at that, I am sure it is just what you need
user924016
and np, might be better to ask in the js room next time =]

« first day (1332 days earlier)      last day (3842 days later) »