« first day (1939 days earlier)      last day (3002 days later) » 
00:00 - 11:0011:00 - 00:00

12:29 AM
hey @Andrea, do you mind if I ask how did you first get into programming? I mean what made you so interested?
you @PeeHaa?
 
@Ekin a book on programming 8-bit microcomputers from a second-hand book store
 
interesting
mine was when mom showed me the selectron tube
and those cobol punch cards
 
1:01 AM
How can i annul code that is receved in form ? for exemple the javascript to avoid it happen adota-me.tk/anuncio.php?id_anuncio=1454718138
 
1:32 AM
@Gordon it is right-hand assigned to left-hand, as before. The difference is that now keys are specified. It's like destructuring in other languages.
@bwoebi :3
@Gordon it would be improved if it had the [] syntax, though
@AmadeuAntunes you want to prevent cross-site scripting (XSS)? htmlspecialchars is your friend. Always use it when outputting text in HTML, unless you know it is already valid HTML
@AmadeuAntunes this doesn't just prevent people adding JS, but also means that < and > show up properly :)
 
@Andrea i used echo htmlspecialchars_decode($var); and js style works
*still
 
@AmadeuAntunes no no no, use htmlspecialchars, not _decode
you want to encode plain text into escaped HTML, not the reverse
 
1:50 AM
@Andrea so should i use it in input ?
 
2:03 AM
thanks sorry xD my fault
 
2:22 AM
@AmadeuAntunes use htmlspecialchars when you output plain text in HTML
 
yap i noticied that xD i just used wrong function
 
it replaces characters that HTML treats specially with entities, e.g. < becomes &lt; which will show up as a < rather than being treated as a tag
okay :)
don't store htmlspecialchars escaped text in your database or whereëver though
@Sara increasingly convinced PHP needs XHP built-in
also possibly something like LINQ
 
2:41 AM
@Andrea I was convinced from day one. :)
You've heard my "high on drugs, oh look there's an XSS in Japanese" search story, right?
 
IIRC that is the story :p
 
It's the part I tell in public and recorded mediums
 
heh
 
@Andrea FWIW, HHVM tried out something like LINQ, but we killed it github.com/facebook/hhvm/commit/…
Okay... I killed it.
 
@Sara :(
my thinking is basically that having first-class SQL and X/HTML means we make SQLi and XSS difficult, and normal SQL and X/HTML use easier
 
2:48 AM
Yeah, I'm down with it in principle
 
Though I do wonder if you'd really need special syntax for it
 
Prepared statements should be solving that problem, tbqh
 
you can still do SQLi in a prepared statement, but yes
much like you can still do XSS with templates
 
But then people read some tutorial on geocities from 1992 and think it's gospel
 
because prepared statements and templating engines are basically a hack
prepared statements = mysql_real_escape_string all the things for you
templating engines = htmlspecialchars all the things for you
 
2:51 AM
Basically, yeah
 
they don't necessarily actually understand SQL or X/HTML
so you can break both of them
$table = $db->table('foo');
$query = $db->select()->from($table)->where(function ($row) use ($id) { return $row->bar == $id; });
...I bet I can already do this with Doctrine or something
 
Implementing your where clause in the client seems.... less efficient
 
Oh, the check wouldn't be done on the client :D
The closure's AST would be validated and transformed into SQL :3
 
hah, that's not ambitious at all, is it :p
 
it's not difficult to do, it's just difficult to do non-annoyingly
 
2:59 AM
you mean without sql's already leaky abstraction seeping through, or dealing with what happens when your closure has side-effects?
 
@PaulCrovella I mean the PHP subset not being annoyingly restrictive
$query = $db->select()->from("foo")->where(function () use ($id) { return $this->bar == $id; });
if there isn't a library like this then I need to write one
$statement = $db->insertInto("foo", ["bar", "qux"])->values([1, 2]);
 
So like: The closure must be logical operators and comparisons only? Otherwise exception town?
 
$statement = $db->deleteFrom("foo")->where(function () { return $this->bar > 2; });
 
Yeah, that's not too terrible
 
@Sara yeah
side-effect free, only basic operations
something akin to the rules for constant expressions
 
3:04 AM
yeah
 
@Sara this would be nicer with Hack's ==> :)
 
i was thinking that, but didn't want to be annoying about it :)
 
hehe
$query = $db->select()->from("foo")->where(() ==> $this->bar == $id);
I wonder. Can LINQ do this? I'm not sure.
 
hrmmm, PHP doesn't currently save the ast though, how will you retrieve it from the clause parameter?
 
@Sara nikic/php-parser? :p
 
3:08 AM
That only works if you have the source as a string
I mean in your implementation of: public function where(callback $clause) { ... }
$clause is a closure object, you can't get back to the AST at that point
and feh... sgolemon/astkit is way better
:p
 
I'm not getting back to the AST, I'm creating another :p
anyway, I'm apparently a "truly evil person"
 
I must be missing something that.
*then
You said you were going to translate the PHP closure into SQL, didn't you?
 
@Andrea heh
Anyway, I wrote a Bytecode to PHP transpiler ages back. Could prolly dust that off to regenerate an simplified AST from any arbitrary callback.
 
@Sara :)
I was likewise thinking I could just look at the opcodes
anyway, it's late, imma sleep, goodnight
 
3:29 AM
Is it correct that zend_object has to be last in a custom object struct in PHP 7?
 
4:04 AM
Some one know why my hr dont appear in my page ? adota-me.tk/anuncio.php?id_anuncio=1454694186
I used always the same footer but now its seems diferente, the <hr> desapeared and i don't know why
 
@rtheunissen yes
 
@JoeWatkins my vector wasn't doing that.
@JoeWatkins Morning to you too
 
morning
 
does the vector use properties ?
 
4:11 AM
Nope.
Only the 'pair' types do.
The two of them.
 
you can get away with it
look @ zend_closure, it breaks the rules .... because it doesn't use properties it doesn't need to care about the relative address of zend_object, so it declares it as first member, that means you can cast zend_closure* to zend_object* directly ....
the memory for inline properties table is after the zend_object*, so if closures used properties, the other members of the struct would be written over when those inline properties are initialized
 
I remember running into that (its in the issues somewhere)
^ ahh makes sense.
Because we're backtracking using XtOffset, starting at the zend_object
Should I stick to &vector->std or should I cast? Doubt it would make much of a difference..
 
it's final, right ?
 
Might leave it for consistency and potentially using properties later on
Yup
 
you could cast, like closures it shows you are intentionally using zend objects that way
 
4:18 AM
I think I still need to disallow property access
 
yeah dynamic properties will be creatable ...
 
I was also wondering if I needed to handle gc at all?
I'm not allocating memory for properties though
I'd rather just raise and say sorry can't set properties
 
yeah throw when it's attempted
you probably do need to handle gc
 
got any tests where cyclic refs are being used ?
$a = new A();
$a->push($a);
 
4:21 AM
Not at the moment, no.
Basics first.
 
or where $a is a member of $b and $a->push($b) ... that sorta thing ...
gc is not tricky really, you'll know when you have a test that fails because of gc
 
I haven't tried to fuck with them too much tbh
Oh?
 
yeah it'll just leak lots
 
I'm seeing 0 memory leaks across all 3k tests
But I also see gc related stuff in SPL ds
 
yeah, but you're not testing cyclic references yet ...
 
4:23 AM
Ah okay
 
your root buffer is just a zval*, right ?
 
Yup.
For vector and deque anyway
The table is a bucket*
 
if you look at the gc handler, it might be sometimes as simple as set *table = root->buffer; *size = root->size; and return NULL ...
you probably figured that out already ...
 
Haven't touched that handler yet.
 
I'm so tired, 4am is a stupid time to get out of bed ...
 
4:31 AM
Whyyyy go back into the void from whence you came
I'm burnt out af but making progress.
 
I can never go back to sleep once awake, it just doesn't work ...
 
When I was a kid I'd put my pillows on the other side, made it feel like a different room entirely, back to sleep in no time.
Almost 6pm here.. nap time soon
 
the dogs have stolen my half of the bed anyway, and if go and move them, they're gonna think we're going out ...
I'll just fall asleep on my desk mid afternoon, like normal :D
 
Someone send some emergency coffee around that time pls
Anyway, failing tests for circular push :p
It's pushing the values of the instance... as well as the instance. o_O
 
break out the debugger and get_gc handler and fix it !!
 
4:46 AM
I should take a break before I get started..
Coffee and apple I think. Will read and fix when I get back.
@JoeWatkins could I potentially get your help re: PECL at some stage?
Oh wait I'm an idiot, test passes.
 
ofc
 
How can i save the "spaces" and "enters" in text of formation adota-me.tk/anuncio.php?id_anuncio=1454734403
 
@AmadeuAntunes all I see is a kitteh
 
4:58 AM
they really pass ?
 
there is a text there
 
Yup they pass.
Feel free to try break them.
 
but without formation
But how can i detect that is need save a <br> or something else
 
You have to turn your text into HTML
That's all just one <p> tag
 
this text was created by a form
 
5:00 AM
You could take a look at markdown, or replace all "\n" with "<br>" etc
 
yes i should do it but at this case was the user that file a form and me export that info from data base and make it show at that page
 
So parse the string, I guess.
 
Wes
mornings
 
there is any php function to detect the breaks ?
 
Not that I know of. I think str_replace is easy enough.
str_replace("\n", "<br>"); would be a good start.
 
5:03 AM
so i will need to tell to user to put an \n when he want to break line?
 
Nooo you do that.
Before you echo it.
 
Morning @AnmolRaghuvanshiVersion1.0
 
didnt work
echo (htmlspecialchars($row["user_text_desc"]). str_replace("\n", "<br>"));
 
'nin
 
5:14 AM
The textarea get the text then i save that text. The problem is that when I make line breaks in it, they won't display into php page. How can I do this?
 
/me awaits stupid response
 
@AmadeuAntunes you have to start using the docs if you want to make any progress at all
Google "PHP str_replace"
 
i was trying use nl2br
 
Did it not work?
@JoeWatkins +1
 
well yes and no, i did htmlspecialchars(nl2br($row["descricao"])) used htmlspecialchars to make people that put js and html codes tharer dont cause unformatation but it dont let the nl2br run well
 
5:26 AM
I think it's possible that your text doesn't actually have any \n.
 
nl2br on the outside.
 
yes but it also have the htmlspecialchars
 
I have to admit I'm not very good with the HTML stuff
But I suspect it won't make a difference.
 
if i take htmlspecialchars out it works
ok i find nl2br(htmlspecialchars($row["descricao"]))
Thats works
 
5:31 AM
> nl2br on the outside
 
Thanks :)
 
yes on the out side
I'm doing a website to adopt animals :$
 
Good morning all
 
indeed
 
5:43 AM
i have a vps from godday and i want to install ffmpeg by myself
Q.1.:- can i do it or not ?
Q.2.:- if i can how to do it i dont have knowledge of running commands
Q.3. :- is there any exe file which i can download in upload via ftp and make it work with my needs
 
hire someone
or learn ...
 
Can you give me a link to learn
i dont want to hire someone as i am a developer
 
learning to do stuff for yourself is the first thing you will need to learn ...
 
this is my first time on such things....
If you can guide me i will be very grateful to you
 
okay but finding this kind of information is really basic stuff, I wouldn't be helping you to give you a link ... and of course, I don't have one anyway ...
and obviously not going to do your work for you ...
 
5:47 AM
@JoeWatkins Hahaha okk i will search it
what about Q,3:- is there any exe file which i can download in upload via ftp and make it work with my needs
is there any exe file which i can download and upload via ftp and make it work with my needs
 
try not to repeat yourself, it makes you look a little crazy ...
 
Okk will remember that
 
Wes
what a bad idea buying a branded phone. there is so much spam in it
there's also a home screen widget showing banners, which you can't uninstall. it's a "system application" lol
 
which phone Wes??
 
Wes
i bought a random huawei whatever it is called that i will use it as mp3 player only
the phone is okay i guess, but the os is polluted with spam everywhere
 
6:01 AM
so, fix it ...
 
Wes
lol
need to flash the rom but never did before
 
it'll be fine ... be brave ...
what is it ?
I have some of them laying round the house ... kid has one ...
 
newer than the ones we got ...
found a rom ?
look on goo I would ...
the first thing you should find out how to do, is make a full backup :)
 
Wes
6:20 AM
full backup of what?
it's new
you mean the branded rom? i don't care of the warannty as if it breaks i will throw it at their windows
:P
 
6:38 AM
mornin
 
morning sensei tereško
 
Hello all
i want to access .net soap service in php
any one help me regarding this
@tereško @Wes
 
moin
 
Wes
@Prabhakar can you not ping people randomly
@Prabhakar thanks
 
@Wes oh, if you get to smash it, then do whatever ... but yeah, the whole rom ... bricked phones are really frustrating, and it happens so easily ...
 
Wes
6:47 AM
@Prabhakar much appreciated
 
hehe, deserved that I guess ...
 
Wes
:P
 
I've never thought of doing that ...
might be too subtle ... "don't do that" works well ...
 
Wes
i can't even install the driver for the ssd
says this driver is not intended for this version of windows
 
/me points and laughs at the windows user
 
Wes
6:50 AM
i deserve that
 
you know how you hear really mature programmers say "I don't like to bash other programmers favourite languages or operating systems" ... usually before proceeding to bash other programmers languages or operating systems ...
 
Wes
but i'm working on it. currently learning inkscape and gimp (ps and ai are the only software that keep me bound to win)
 
I'm not even gonna pretend, your OS sucks, so does your language ...
 
Wes
lol
 
@Wes oh
really?
 
6:52 AM
oh well. another user for the ignore-list
 
$query=mysql_query("select * from price where product='$product'");
$row=mysql_fetch_array($query);
$row['id']; how to get only 5th row id value . I want only 5th row id value ..
 
someone know if this generator works ? generateit.net/mod-rewrite/index.php
 
7:10 AM
it probably doesn't
and you really shouldn't try do dump routing code on the webserver
it's much easier to do it on the PHP side
 
@tereško Don't i need use an .htpacess file just php?
 
well, you use .htaccess to for forward all the request,s but that's all
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
 
and need be the index.php to do it or can be like /script.php
 
it can be anything, but if you do it right, that will will contain only one line
<?php
    require __DIR__ . '/../bootstrap.php';
you shouldn't be keeping your PHP code in the DOCUMENT_ROOT
because, if php extension fails (which happens more often than you would like to) all of your source in DocRoot become viewable
 
morning
@JoeWatkins actually, I'd guess, the handful of people working on core will be able to determine whether it's realizable or not also without implementation usually.
 
7:31 AM
okay then, let's discuss generics ...
the majority of the discussion is about the suitability of the implementation
 
@JoeWatkins Well, if we delay type checking until the ultimate moment, no problem
if we want to check at binding time, we'll have more problems
at least if the Generics should be not just invariant
 
you see what I mean though, take any subject ... the discussion that really matters is about the suitability of the implementation ... we could discuss anything until the end of time ... time is too precious for that ...
 
hence, we can discuss it, we just need a very detailed RFC on it.
The issue is just that most RFC writers can't quite do themselves the connection between their features and the consequences and possibilities of implementation.
 
I can't always make out language, code I can understand ... I can't always see problems in the idea until it's in front of me, even then I'll miss problems sometimes but I have a much better chance if there is code ...
 
If e.g. Nikita were to write that RFC, I'd happily discuss it
If it were (for example) Danack (or anyone else with not that much core experience), I'd rather doubt we can start off quickly.
 
7:39 AM
code by committee doesn't make sense to me, we don't have resources for whole groups of us to decide in every minor detail what every line of code should look like before it exists, it doesn't make sense to do that when you have such a limited number of hours
 
@JoeWatkins Yeah, not talking about this.
But detailed enough to see all the main problems
There are some things which just are better written down before implemented because writing it down is so much easier than implementing.
 
line by line is exaggerated ... in a day, one person has maybe 16 hours, they can spend that on writing their implementation, to make the same kind of progress as a group with only discussion, it might take a similar amount of time, but the 16 hours would come from the collective, which is much more restricted and much more valuable ...
writing detailed RFC's I'm all for ...
but trying to design them through internals, trying to design implementations through internals, doesn't make sense ... one of us, or small groups of us can do those things in a matter of hours or days ...
 
@JoeWatkins oh, nah. I didn't talk about doing it through internals. Internals is just for discussing the sugar and the general acceptance
 
yeah but most importantly the implication and detail of the implementation ...
these are the parts of the discussion I find most valuable anyway ...
 
right, but these discussions are usually all initiated by a same handful of people.
 
7:47 AM
yep, those are the people I listen out for ...
if you read every message from everyone it would drive you crazy, what I don't read that is important I hear about in here ...
 
@JoeWatkins A while ago there were just three people mailing patches between each other (for review) … Dmitry, Nikita and Xinchen. Today I'm also mailed these … but see … It's just four people.
 
the initial question was could we vote on rfcs without an implementation, there's total apathy at the moment about RFC's without implementation, but say someone pushed on and put one to the vote anyway ... what kind of discussion would follow and how much time would it take ?
it just doesn't make much sense ... but I can be wrong ... probably am ...
@bwoebi I used to get included in those kinds of mails, too busy to respond most of the time, guess I dropped off the list ...
 
@JoeWatkins I think we really could vote on RFCs without implementation and then give a small handful of people to veto (together) later based on the implementation.
Or - in case issues emerge during impl, one can do a revote at the end.
But I guess it'd lower the barrier to push changes in case we could vote first for general acceptance.
 
it's not an unreasonable workflow, but I think it would take up more time ...
 
Also I felt like I'm much more resistant against suggestions after the patch than before … (attached to a patch, lazy to change, whatever)
@JoeWatkins might be, but it'd also save much time in case the RFC isn't liked.
 
7:55 AM
each case to it's own, but of the kind that were being discussed, really big ones ...
omg, imagine what would have happened if ng had been designed in the open ... I mean I complained about it, but whatever, it happened and very quickly, I'll take it ...
you don't need to imagine ... you can just read some articles from way back ...
 
@JoeWatkins ehm, ng wasn't a language change, rather a perf change … you can't compare that.
 
maybe ... but it's closest reference I can remember to complex patch ..
some minor language change, that can be discussed reasonably, maybe even voted on without an impl, but stuff like async/await, not really, I don't think ...
 
@JoeWatkins stuff like async/await can, I think. But only if it's from someone with much core experience and who knows the possibilities.
 
I'm not so sure, having to vote on changes to something already voted in because there was no implementation seems like a disaster to me ...
 
When I do perf changes, I just ping Dmitry first … "I think ASSIGN_OBJ is wasting a lot of time with get_zval_ptr_r() … What do you think about specializing OP_DATA?" and when he then says he needs a PoC first, I do it.
They also typically don't need a RFC either
 
8:02 AM
that kind of stuff, only a few people are really able to be authoritative on, deciding to do that stuff in little groups, with or without patches, or rfcs totally makes sense ...
 
totally reasonable to do a patch there.
 
even though we'll be hated for saying that ... whatever, do I need Lescters opinion on that !?
with stuff like generics, new streams, async/await ... I need a patch before I can take it seriously, maybe that's wrong, but it seems to be what the collective does too ...
 
but for bigger RFCs requiring much work (on the measure of more than fifty hours of work), I'd really like to know peoples opinions on it (whether it may have success at all) and whether there are things needing change which have big effects on implementation.
 
but the keyword is change ...
you already have the impl by that stage ...
 
change in the RFC I mean
 
8:07 AM
I don't think internals the most productive way to do that ... and I think history proves it ...
in here, or in any small group of people that are valuable to the discussion is a much better way of progressing at that stage
 
likewise you'd implement async/await in a completely other way if you need to ensure safety because we want to allow user defined reactors (just an example)
This room is fine for discussions, but it's not voicing whether there will be general acceptance.
 
and that's the main difference, you think you are able to gauge that without a patch, I don't ... and it's matter of fact that it doesn't happen, but even if we were to officially change process so that features could be voted on before implementations were available, I don't think the initial vote would mean much in the cases we're talking about - generics async etc - because we would have to revisit the discussion and waste huge amounts of time ...
when it's found that the implementation has certain implications that I don't think any or all of us are smart enough to anticipate ...
as always, probably am and happy to be proven wrong ...
 
possibly.
@JoeWatkins s/probably/possibly/. I don't know either. It'd be an experiment here we need to see how well it goes.
 
8:31 AM
please help me with inserting queries in two tables in one function with last insert id
 
@treblaluch What have you tried?
 
@treblaluch you will have to actually ask a question
 
so. close. to. 10k ...
 
@JoeWatkins after you get something like 10k+200, do some cleanup of older shit-answers
well ... that is - if you have any of those
 
I already done the real popular ones with updates for 7 and whatever ... will work my way down list ...
 
8:46 AM
/me should think about updating some of his answers too
 
@Ekin shouldn't you be unconscious already :P
also, mornin'
 
yeah I nearly am, just..one more abduction site...aaand it's 6am
also I've been working with people from Australia lately therefore my 5pm is their 7am so.. I end up like this everyday
 
9:23 AM
yeah, that can be tricky
 
is it too cold up there now?
 
not really
this morning air already smelled like spring
 
that's nice
 
9:51 AM
@tereško winter will come … (back)
 
Wes
10:08 AM
internet's dead jim, internet's dead
happens every weekend -__- cant load anything
 
@bwoebi I really hope you are really wrong
 
@tereško … in at most 11 months :-D
 
Hello. Do you guys know how to calculate degrees? For example 2° - 7°. Is the function deg2rad right for this?
 
Wes
rad is just a different unit
what do you mean with "calculate degrees"?
..
 
Buttock Angle of a boat
is 2° - 7°
 
Wes
10:16 AM
:|
!!> echo (2 - 7) % 360 + 360;
 
Wes
...you mean this?
 
not sure, I'm gonna play with it a bit
 
10:32 AM
hey, I got a question
how big would be the practical difference between i3 and i5 in a laptop?
 
10:53 AM
@tereško direct tradeoff of price+power consumption vs performance.. on the perf front an i3 isn't likely to annoy you when it comes to laptopish tasks, while the reduced power use will extend battery time
if the laptop is gonna be more of a desktop replacement, then the i5 would be in order
 
00:00 - 11:0011:00 - 00:00

« first day (1939 days earlier)      last day (3002 days later) »