« first day (1893 days earlier)      last day (3279 days later) » 

00:00
@ITProGuy What is this meant to be:
`date` = :`date`
hint param names get replaced before being sent to the actual database.
it has to be a date field
Try just:
/* mark down hates me*/      `date` = :date
maybe if I change the variable name could work?
ok
I'll tell you now
but
if I write date without the ``, sublime marks the code as a reserved word
you know, date
like a function
anyway, I'm gonna try
@Danack wow.. it worked, can you explain me why please?
The statement gets 'prepared' into an SQL statement long before it gets executed. The reserved words like date only come into effect when the statements are being executed. And the replacement is based off the simple colon + param name.
But I thought Sublime was omniscient :^)
00:05
So although Sublime thinks it's a reserved name, it's not in this case, because :date is going to be replaced before it is used.
However.....I strongly recommend avoiding using any reserved names for any columns, tables or schemas. The annoyance of being bitten by it, far outweighs the cost of just not using those names.
oh...
I see
I was giving all my confidence to sublime... :^)
thanks guys, very illustrative :-)
@NikiC So if I am understanding correctly, Icicle should make it possible to run two tasks in parallel instead of running them one after another, in sequence
I mean, lets say I import data from two APIs, normally I would import data from one API and then process it in some way, then do the same for the other. But with this library I could process them both at the same time without waiting for the blocking network request of the first to complete?
@NikiC Typo in the article: // advance to the second yield (and dump its value). Thus we loose the first yielded value!
loose -> lose
I also don't understand that part of the article
The point you're trying to make is that send() makes an implicit rewind() call, but according to the statement made a few paragraphs earlier, so does current(), which is what you're replacing the send() with.
abr
abr
00:27
anyone can guide me some light on laravel experience?
@QuolonelQuestions Yes, both both do a rewind, but send also advances the generator by itself, while current doesn't
Oh, OK. Not sure if that was clear in the article or I just missed something
@QuolonelQuestions Yes, basically. You can start working as soon as you receive one response (or maybe even a partial response), while the other API call is still in flight. The special part of it is that you can do that, while still writing code that looks synchronous. Basically normal code with a few yields scattered in it. So no callbacks in callbacks in callbacks or similar.
Isn't React a more popular and mature version of the same thing as Icicle?
I don't think React is coroutine based
The main alternative to icicle I know is amp
Which, among other things, has this gem: github.com/amphp/aerys
Which is a HTTP 1.1 / 2.0 / WebSocket server written in PHP
With badass performance. I remember something about 80k requests per second, but I don't remember the specs this is on
00:47
It's like nodejs in PHP
yep
Full disclosure: I actually just finished writing a generic data importer for the company I work for and I'm quite happy with how it turned out, except that it just loads full data sets into memory, which doesn't scale
I'm looking at ways of chunking it so it can be streamed using generators
And it would also be useful to have a task runner front-end to run multiple jobs concurrently
So I'm now wondering about creative applications for coroutines in this architecture
Unfortunately your article is starting to become hard to follow once we're getting deep into the thick of the syscall examples
I'll have to pick it up again tomorrow :^)
Thanks for the chat, I learned a lot
From one of my idols, no less
@NikiC I had 100k with the iMac from early last year two months ago. (with the better configurations…)
with routing, subtract about 7k requests.
@QuolonelQuestions @NikiC is our all idol, we just don't say it loud ;-P
01:05
2
Q: How to prevent of re-replacing by second regex?

stackI have two regex(s) on the way of my input, these: // replace a URL with a link which is like this pattern: [LinkName](LinkAddress) $str= preg_replace("/\[([^][]*)]\(([^()]*)\)/", "<a href='$2' target='_blank'>$1</a>", $str); // replace a regular URL with a link $str = preg_replace("/(\b(?:(?:h...

1
Q: Sending Json Objects to Laravel via Post

abrI'm currently having some dificulty understanding how the framework works, as in sending data from as3. Currently I have this code on Laravel: Route::get('HelloWorld',function(){return "Hello World";}); //Method returns a Hello World - works Route::post('Register/{nome?}' ,'AccountController@Re...

01:37
@NikiC I'm wondering… When we know at ct what the function is, why do we still always set the result_type to IS_VAR and not to IS_TMP_VAR in case the function actually returns a reference? Couldn't that save us from a number of checks (specialized VARs being in general more expensive than TMPs), or is there something else behind that?
(talking about the DO_I/U/FCALL opcode)
02:20
/me squeezes another 1.5% from Zend/bench.php (an optimization based on the vm_stack_restructuring branch) … removing all the ZEND_SEND_VAL_SPEC_TMP_TMP_HANDLER's
there are some bugs left (will fix tomorrow) … I think I'm going to have real arguments for Dmitry continuing to review it ;-D
 
1 hour later…
03:38
@NikiC At least you did the technical work...
04:23
good-morning...
05:17
moin
05:28
so the island has a marketplace website, called wightbay.com
trying to find a dog for my kids for xmas
that whole page is scams, and most of the other pages are too ... they are forwarding "privacy numbers" to premium rate services
the misses fell for it, several times, before she came and asked me to look at it ... wonder if I can do anything about the huge phone bill coming my way ...
that's bad.. so what you will be doing now??
I'm not sure what I can do
I tweeted at them and asked them to do something about it ... but I've tweeted at them before and been ignored ...
I'd fix it myself if they asked me, wightbay is a great idea, the cost of travelling to the mainland makes it a valuable resource for everyone on the island, absolutely everyone knows it's name on the island ... it's very nearly unusable at the moment ...
you put an advert up and 5 seconds later a bot will email you telling you they would like to buy your item with paypal and have you send it by air to india or something ... you can't do something about every form of abuse, but premium rate phone numbers are easily detectable, and at some point were input from the client ...
05:58
does adding "Premium rate call bar" help??
no because you call a "privacy number", which looks like a mobile number, and they forward the call to a number entered by the person who created the ad ...
I'm not even sure who picks up the bill for that, it might not be me actually ...
06:13
Morning @JoeWatkins
moin rudi
I'm creating N number of objects, and adding them all to an array (internally of course). That means I'm allocating each of them separately, using ecalloc(1, sizeof(...)). Would it be possible to allocate them all in one go? If I know that I'll need N of them.
I tried just changing the 1 to N and ++'ing the pointer, but that created a leak because I never free'd it. But if I just allocate the one, I think the engine frees it?
no, the engine doesn't free it ...
ecalloc(n, sizeof(...)) is correct, but you need to free the original address alloc'd ...
Surely the engine does though? Because I'm not freeing the ecalloc(1) that I'm currently doing for any of my objects. (I think?)
Hold on let me check.
that's only in the case of objects in the store
06:21
Oooo that makes sense. So let's say... *p = calloc(n, sizeof(...)), could I then say *q = p, iterate until ++q == p + n, then free p?
yes
q = p
Of course. :) Type *q = p;
yeah
afk, walking dogs
Good Morning. Please How to use echo with mysqli_stmt_fetch. For example if i have while( $rs = mysqli_stmt_fetch($stmt))
{

printf("%s %s\n", $col1, $col2);

}

and i would like to show $id with an echo instead of printf with mysqli_fetch_assoc i would have done something like $id=$rs['id']; echo $id.

How to do the same thing with mysqli_stmt_fetch ?
06:46
@JoeWatkins I'm not sure where I should be freeing p? Could send you some code if you like.
07:00
code is good
If I allocate them one at a time there are no memory leaks or faults.
And I'm not freeing anything myself. But trying to calloc them all at once creates a leak.
void ctable_to_array(CTable *table, zval *array)
{
    if (table->size == 0) {
        array_init(array);
    } else {
        CBucket *it, *end;

        sort_table(table);

        it = table->buckets;
        end = it + table->size;

        array_init_size(array, table->size);

        for (; it < end; it++) {
			zval obj;

            object_init_ex(&obj, counted_pair_ce);

            /* copy value */

            add_next_index_zval(array, &obj);
        }
    }
}
should look more like that ...
a/b, p/q ... avoid that, have it make sense by using words, you're saving nothing by using a/b, i/f/q/p/j ...
afk, taking misses to work ...
07:16
Thanks :)
@JoeWatkins that's effectively what I had before. I was wondering if I would avoid object_init_ex, and allocate them all at once. object_init_ex just calls create_object anyway.
That's why I was inlining the creation of the object, except for the ecalloc(1, sizeof(...)) part.
07:32
@tereško how..?
@AnmolRaghuvanshiVersion1.0 answered, actually, all the info is available on SE already
yeah @SergeyTelshevsky :) and those links are great
and did you mean on SO what's SE??
07:54
@AnmolRaghuvanshiVersion1.0 StackExchange network
thnks SergeyTelshevsky.. :)
@rtheunissen you can't free memory and then return it to userland though ...
hello i have make local connection with mysql and it is working f9
but when i am doing it in server
then i am getting access denied error
i have given all correct credentials
kindly check
@rtheunissen it feels like premature optimization to me ... also, remember that optimal C and optimal Zend are very different things
if there is some actual problem you are trying to solve, maybe there is another way ?
I'm just trying to avoid N allocations where I might be able to get away with a single one.
Premature optimisation, sure, but it seemed reasonable enough to attempt it. I'm guessing it's because you can free each allocation for each destruction, but you can't partially free the bulk allocation. You'd have to free nothing, or all of them. Fully understand that you can't free where my code currently attempts to -- makes no sense.
08:07
Morning pretties
omin
minimizing allocations isn't necessarily a premature optimization, depending on application ...
but, realizing that minimal Zend and minimal C are different and you should aim for the former if you want everything to make sense in userland, is important, I think ...
i am getting access denied while connecting to mysql db
anybody knows this kindly help
08:29
meurning guys!
@PeeHaa yesterday I've been going through your code, it's pretty fascinating to see how different you work compared to me tbh, but it's nice to get an inside from soomeone else for once :)
Mornings
@Naruto :-)
mohaaa
08:46
Damn I've had it for this year. 2 more days and I will tell everybody to wait till next year
3
@PeeHaa What up, P-Hords
good mornings :)
Yo chris cross
@hakre
in da hood
I recently joined a reggae band playing the triangle. I just sit at the back and ting.
08:48
hehehehe
@DaveRandom this?
That is truly excellent
09:06
Morning 11-ers!
MOrning sean
posted on December 22, 2015 by nlecointre

/* by asram */

6
Saw -8, then deleted. lol
@Naruto If you are bored this christmas holiday you may help me clicking on everything in feedr once it's finished. :-) cc'ing @FlorianMargaine because he tends to find bugs and tell me I'm an idiot when needed
09:19
@PeeHaa you're an idiot
:-)
@PeeHaa sure, feel free to mail me then ;)
Sure thing
@DaveRandom you must be good at systemd services, right?
09:19
@FlorianMargaine Almost obligatory.
@FlorianMargaine Like most things, I mostly keep Googling/pushing random buttons until it works close enough to what I wanted :-P
Feedr looks nice, by the way :P
Although most of my boxes are CentOS 6.x so I've not had a lot of contact with it
@Sean Thanks. I just hope I don't get distracted and implement everything I want the coming days
@DaveRandom :(
09:23
What are you trying to do @FlorianMargaine?
oh well
I'll rubber duck ya
I have a bar.service, wantedBy myglobal.target
yet it's not run: pastebin.com/Ya34F3mH
I also had to dick around with it @FlorianMargaine
/me hates change
another service it requires on (baz.service) is correctly started
if I run /usr/sbin/bar manually, it works fine
What happens if you start it manually?
@PeeHaa works fine
09:26
Did someone say link testing?
setInterval(function() {
    var clickable = document.querySelectorAll('a, button');
    clickable[Math.round(Math.random() * clickable.length - 1)].click();
 }, 5000);
:P
systemctl start bar.service and everything is running smoothly
ofc... :(
I don't get it
it works just fine for the other services using WantedBy=myglobal.target
My gut is that the service startup borks for some reason when it's started automagically because something it depends on doesn't exist yet, but it does by the time you start it manually
i.e. your service unit is missing a dependency definition of some variety
09:30
Shouldn't that log something at least?
but obviously I have no evidence for that, just seems unlikely that systemd isn't even trying to start something you appear to have defined correctly
@DaveRandom I'd have a log if something failed at startup
morning, is (chdir(DIR);) just per the current page? Or is it persistant?
Is there some kind of verbose logging you can turn on to check whether it tries to start it at all?
this is what I get for baz ftr: pastebin.com/3sv1zDWB
09:33
@SuperUberDuper s/page/request?
I only want it to change root when the user goes to a specific page, overriding php.ini
all other pages as default
php.ini?
It changes the current working dir
whatever the server root is
It doesn't do any of that
E_XY, me thinks
09:35
Totally XY
@SuperUberDuper why does the current working directory matter for you? What are you actually trying to accomplish?
For the record: the current working directory shouldn't ever matter in a web environment because you should always use absolute paths
Just discovered that functions as default function arguments are valid in HHVM, pretty useful if the same applied to PHP, but defaults for function arguments must be constants - 3v4l.org/Z9QRC
:(
If you want to use a different php.ini for a specific page of your site, that needs to be configured at the web server level, by the time you PHP script is executing it's too late
In which case use fpm which is great and does all the things
09:38
(most of the time, sometimes it does some of the the things before exploding horribly in your face and maiming you)
1 message moved to bin
My statements are absolute :P
Sorry. RO powertrip :P
Oh yeh? well, watch this...
1 message moved from bin
hehe
muahahahahaaaa
09:41
I totally forgot you can move back for some reason :P
Over 5 years since I had a blood clot and they still won't let me donate. An actual hematologist said donating was absolutely fine, but Jimmy McMedic seems to think I am "high Risk"
@Fabor Your blood sucks and you should feel bad
No, he sucks blood, there's a subtle but terrifying difference
Although possibly it's not the clod, but the fact that they are still scared of gay men
09:43
@DaveRandom "terrifying"? Not so ;-)
It's just annoying because if they actually looked at my medical history it would show I am fine but they hear "Blood clot" and red flags start flying everywhere :-/
@DaveRandom I want to hold a POC in there that is a SPA
Any more incomprehensible TLAs?
@Fabor Yeah I somewhat get why they are a bit hesitant, but on the other hand blood is actually needed (depending on your blood type)
piece of shit?
Hmm. If I'm providing an interface to an external library which throws it's own exceptions, should I be mimicking those exceptions as part of my interface?
09:46
I cannot believe that the Krusty the Clown "Tonight I'm going to suck... <long pause> your blood" clip is not on YouTube
He's offering you his deepest contrafibularities.
@SuperUberDuper I have no idea what this means
we have an internal php dev server for sharing
@PeeHaa this
(As opposed to handling the exceptions in the interface as part of it's flow or just allowing the exceptions to pass straight though and having use statements across files which use the interface)
09:49
An interface doesn't throw anything
Well, I say interface loosely
Not an actual interface, but a middle-man class
@SuperUberDuper So it sounds like you want to deploy a new application to it? Or just a single new page in an existing one? If the former you need a whole new virtual host container, if the latter then you need to configure the web server to load a different php.ini (or set some options) for that specific page, precisely how you do this depends on the server set up.
You can't load a different php,ini file from within a PHP script though, because by the time you code is executed the ini file is already loaded and the options are already defined. Pretty obviously, it would be a huge security risk to let scripts redefine their ini file.
Imo the same rules apply here as it does anywhere else. If you can actually handle the exception catch them. Otherwise let it bubble up
Alternatively wrap it in your ownn exceptions and let it bubble up
@DaveRandom I just want to embed a SPA into some page that was developed locally with relative urls. this page and all the assets will be contained in the same folder
@bwoebi It can be done, but it requires a bit of additional work in two areas:
a) VAR has special handling for maybe-reference argument passing. SEND_NO_REF accepts VARs if they are references or objects. We'd have to extend this to work with TMPs from selected opcodes
Actually b) might not apply. I was thinking about EXT_UNUSED, but that probably works fine with TMP as well
So mainly a) I think. I.e. not very hard to do, but not as simple as changing VAR to TMP and be done
10:05
@SuperUberDuper What's "SPA"? Single page application?
And what do you mean by "embed"? With include in a PHP script?
And does this SPA need a different php.ini (and if so why?)
@DaveRandom @PeeHaa so, I needed After=myglobal.target
So simple...
wtf, that doesn't seem like it makes sense to me, isn't it part of myglobal.target?
@PeeHaa Said nobody about systemd ever
10:12
Morning
Shameless advertising:
7
Q: 32C3 CTF - starts 27 dec 2015 and lasts 48h

HamZa32C3 CTF will begin on 27 December 2015 20:00 UTC and ends on 29 december 2015 20:00 UTC. It's been a while since we participated. Let's play again as team Sec.SE. As usual, the team communicates through the CTF team chatroom.

Shameless blind upvote for great justice
@DaveRandom same for me
@PeeHaa hehe, sup? Any projects?
@HamZa what's that?
Good morning @NikiC :^)
10:17
@FlorianMargaine Capture The Flag online security competition. A few years back (2y?) we played as a team. There's one that starts 27 dec, trying to revive the team.
it's a Jeopardy-style CTF btw
@DaveRandom embed as in, I have the server here (which I don't care for the php infrustructure) but want to use it for corporate hosting for a POC SPA
@HamZa I am rewriting feedr: betafeedr.pieterhordijk.com (static site WIP)
@SuperUberDuper Right, so you just want to serve it from that server as if it were a completely separate application, nothing to do with anything that's already on the server?
@PeeHaa nice!
@DaveRandom exactly)
10:26
thanks
Hi 11
i have created calculate shipping plugin for woocommerce docs.woothemes.com/document/shipping-method-api
how can i calculate dynamically ?
@SuperUberDuper OK so what you want really is a new virtual host container on the web server, and in order to help with that you'll have to tell use what OS/web server software it's running. And if you don't have admin access to the server then you either need to get the administrator to set it up for you or use a different server (it might be simpler to just set up a local web server on your dev machine in that case)
bbiab RL
ubuntu server
thx btw
@PeeHaa nice template, I shall star it
@Andrea Your talk was awesome :-)
@PeeHaa
                                    <button type="submit" class="btn btn-default btn-flat">Sign out</button>
why not input?
@SuperUberDuper What web server? (Apache, nginx, etc)
Line link?
And do you have root/sudoers access?
Or file/linenumer
10:36
@NikiC uh, do we have extra handling for objects? Thought the only point were about refs? At least judging from impl in vm_def? We after all just would have to guarantee that we're not returned a ref in a TMP, that's all?
from html source
k. What page + button?
there's only one page right now, no?
<li class="user-footer">
    <div class="pull-right">
        <form action="/logout" method="post">
            <input type="hidden" name="csrfToken" value="EbtvW04cEp21p55FpK13VQXpQGmOr6l0D9UlUJF6iFc=">
            <button type="submit" class="btn btn-default btn-flat">Sign out</button>
        </form>
    </div>
</li>
(csrf token now invalid, in case someone cares)
10:38
Thanks. Yeah there is no reason for that not to be a proper input
tnx
Could you PR/open issue?
are you asking for effort?
from me?
hehe. Valid point... :)
I'll create the issue :)
if you want, I can fix the html and open a pr
I have to check that the CSS is fine tho
CSS will be fine. It's based on classes. PR away!
woo
let me finish my cig and I'll do that
10:42
kk
Hi
include('Net/SSH2.php');
$ssh = new Net_SSH2('mydomain.com');
if (!$ssh->login('xxxx', 'xxxx')) {
exit('Login Failed');
}else{
echo "connected";
}
echo $ssh->exec('pwd');
This code says "connected"
but no output for echo $ssh->exec('pwd');
what's the lib?
> but I got a written warning from the HR department after the Buckaroo debacle last year
What is the best way to handle/prevent:
> Notice: SoapClient::__doRequest(): send of 1052 bytes failed with errno=32 Broken pipe
@QuolonelQuestions best way is not to use soap ;)
@QuolonelQuestions Run away from SOAP is what I would suggest :P
10:45
Damn you @Gordon
Suppose a third-party provider supplies no other interface
Assume I am stuck with SOAP
what will be advantage of using input type in
<button type="submit" class="btn btn-default btn-flat">Sign out</button>
PeeHaa
@QuolonelQuestions Does an offer of my deepest sympathies help at all?
@AnmolRaghuvanshiVersion1.0 It feels more semantic
@PeeHaa I actually disagree. I would rather use a <button> unless it has both name="" and value=""
To me, an input is for sending a value, a button is for action-only things (like an "anonymous" for submit)
10:49
@Shijin linking me to the download page doesn't help.
@DaveRandom Hmmmm cc @FlorianMargaine
I'm frequently wrong about semantic HTML though
@DaveRandom when you send a form, you send a list of inputs
<button> is just a hack
and to send the form, you hit the input type=submit
10:51
@FlorianMargaine Precisely, and without a name="" that <input> is not included in the data
1 min ago, by DaveRandom
I'm frequently wrong about semantic HTML though
why?
37 secs ago, by Florian Margaine
and to send the form, you hit the input type=submit
I could have committed right away, actually
Thanks! I will leave it open for a day or so so I can ping the html/css people
He won't tell them about it, just ping them
I do enjoy annoying @Abe and not telling him why
@Shijin run var_dump($ssh->exec('pwd'));
10:53
Right, that's it, I've had enough of this shite, I'm going to buy some proper tea
Yorkshire tea? As endorsed by Tim Peake on the ISS?
@Shijin looking at the code, it can return false for plenty of reasons (instead of throwing an exception)
No, probably some loose-leaf Darjeeling
Yorkshire is decent for every-day bag tea though
brb 10 mins
@DaveRandom That fucktwat changed his name again
PeeHaa is this also matter of concern Public-Key-Pins: The site specified a header that could not be parsed successfully.
11:02
On my sites? That is a matter of concern
Let me inspect the headers
Odd. No idea what happened there @AnmolRaghuvanshiVersion1.0
I don't think I have changed the settings for over a year
let me show the screenshot
I don't see something strange I think
11:14
AFAICS this should be correct Public-Key-Pins:max-age=15768000;pin-sha256='MqRIBGp3ha+CsWQmLSUWjt8VNpPUZRZVJe‌​l089OJbQM=';pin-sha256='eFBvkQ4t//OSjQE3fiTZIo8tP/UEVw3jJ4kc+ZWBon4=';includeSubd‌​omains;
Will investigate later
Yay, work computers CPU fan died.
\o/ early beer time
aren't fans a little bit 19th century ?? do you have clockwork disks too ??
What'cha talking about, fans are still cool!
None the less I have to try to find a replacement...
11:22
problem solved, you don't even have to hold it ...
Anonymous
\o/ haven't touched a pc for 22 days
Wikipedia is still pushing its donation drive, that's a bit concerning
@Sean Isn't it the same crap every year?
"this week we're asking .... "
@PeeHaa Didn't really hit wiki last year so I don't know, but the "This week" has lasted for at least two weeks now.
What's the deal with forward_static_call_array / call_user_func_array not respecting use Foo as Bar?
11:30
Foo as Bar is compiler hint ...
TIL there is a function called forward_static_call_array
Going to go ahead and assume I have to refer to the full namespaced path in that regard
@PeeHaa At least he changed it to something I actually know
Transactions are the magic in the database sauce, with them you go fast, without them you do not ...
11:57
0
A: Links on New Line

Vinod VTAdd <br/> tag like, <div> <a href= https://google.com>Google</a><br/> <a href= https://google.com>Google</a><br/> <a href= https://google.com>Google</a> </div> Also see about line break tag


« first day (1893 days earlier)      last day (3279 days later) »