« first day (1820 days earlier)      last day (3113 days later) » 

LGL
12:00 AM
ALTER TABLE comments
   ADD CONSTRAINT `delete_child`
   FOREIGN KEY (`parent` )
   REFERENCES `comments` (`id` )
   ON DELETE CASCADE
Im I doing it right?
 
I'd have to ask my DBA friends to be sure, but if a copy of your DB accepts that, I'd test it out.
Also, 7 days seems kinda long... I've always been in environments with a 7 day full backup, nightly incremental, and hourly copies of the WAL... nightly and weekly copied off-site...
Well, actually, most environments I've been in just assumed that backups didn't matter... but the ones who did do backups had at least nightly incrementals...
 
LGL
I think I need to see user Analytic for that, I will hold on that
For now I just one to delete child comment if parent comment get deleted
 
ThW
a week sounds like a lot of data loss
 
that depends a lot on the website, really
 
LGL
I think it depend on users
how much active they are
 
12:07 AM
if your website has users, yes :)
 
LGL
lol its an App
 
☸ transience is the nature of all things, including bits ☸
 
ThW
not really, even on a slow business I would say that a week is a lot of time
 
12:21 AM
@ThW I was thinking about small businesses static websites/blogs
 
12:46 AM
A static website that needs a database?
 
hmm
PHP's types being enforced at runtime gives us more freedom
we could add ranged integers, for example
one thing that might be good would be an unsigned integer parameter type
 
@Andrea But then you're casting every value. Aren't the integer types all signed? And what happens with overflows and floats?
 
@Sherif you do have to check every value, yes
and yes, PHP's integer type is signed
 
There goes performance
 
well, we already check every value anyway
there would be an additional cost to doing a range check, but I don't know how large that would be
But yeah, a problem with something like uint is people might expect it to have the full 0 <= n <= 2**64-1 range, and it wouldn't
 
12:54 AM
Well it should if you do it right, but unfortunately PHP has no concept of signed vs. unsigned integers.
 
I'm not sure that's a bad thing
having both unsigned and signed makes things complicated
 
Meh, GMP all teh things
 
which is why Java only has signed
@Sherif that was what I wanted to do
 
Yea, who cares about performance anyway.
 
it doesn't hurt it, actually
PHP already does overflow checks on all integer operations
replace float promotion with bigint promotion and you've not lost anything performance-wise
though older code that expects float promotion might run a bit slower and produce more accurate answers
 
1:01 AM
I thought bitint was being fairly well-received when it was on the table... aside from lester going off on tangents about sql types
or am i misremembering?
 
it was mostly positive from what I remember
 
@Andrea A gmp int is not really an int at all. Much higher cost in calculations.
 
it's an integer, but by virtue of it being arbitrary-length, operations on it are indeed slower
 
Not to mention it's not an integer, but an object and has function overhead.
 
GMP, the extension, uses an object
an implementation in core (like mine) wouldn't necessarily
 
1:08 AM
Doesn't matter how you implement it. If you want arbitrary precision you're going to be storing numbers as text instead of fixed sized integers.
That's fine if you really need arbitrary precision math, but you're trading against time no matter how you slice it.
 
@Sherif text? who uses bcmath seriously
any decent implementation will use machine words
possibly partial machine words
 
Of course, how else do you arbitrarily size an integer?
Yes, but how do you get there. You still need the input to come from somewhere.
 
@Sherif the same way you support a 32-bit integer on a 16-bit processor
 
Wrong. 32-bits is not arbitrary.
 
the algorithm is the same
 
1:11 AM
You have no idea what the size of the enumeration is at the time you're storing it.
 
instead of dealing with 2 words you're dealing with N words
 
No it's not. 32-bits has a width. Meaning it can overflow.
A GMP can't overflow. Well, at least not in theory.
 
yes, you handle overflow differently (call a function to reallocate, probably)
the algorithm is still basically the same
 
Yes, yes, you're thinking of what happens after you've stored it. I'm talking about how you get there.
You still have to translate the text into a words.
 
we do that for zend_long too
and it's not especially complicated
 
1:13 AM
Who said anything about complicated. I said it was a performance cost.
 
sure
parsing a string to an integer is a performance cost
 
So then what are you on about?
Right.
 
I don't know how much the cost differs for GMP versus int64 or something
I wouldn't think it's that much
I still don't understand your comment that "if you want arbitrary precision you're going to be storing numbers as text instead of fixed sized integers."
 
It does when the enumerations are large enough. Think about it. You're hitting memory more often, you can't rely on a single result register to store, you can't rely on CPU cache as often. It makes a difference ultimately. How much for your particular use case obviously varies.
 
sure
I think it's worth considering that the choice is between slow computation with large numbers and no computation at all, though
the performance of bigints basically doesn't matter for that reason
 
1:23 AM
@Andrea Because the way GMP stores the number it's basically an array of limbs. It's no longer a single memory hit. You now have multiple levels of indirection making you hit memory more than once per operation per limb. That's a significantly higher cost. Maybe using "text" was unclear here. I mean to say you aren't taking direct advantage of some x86 optimizations your compiler might optimize away for you right away.
But that's really low-level what I'm taking about here.
Probably a bit moot for PHP.
 
@Sherif I understand that
 
Morning's
 
morning
 
Of course that's all integers too. When you get to floating point you have even more complications with the mantissa.
heh
Numbers are fun
 
1:37 AM
Holy crap! I found a tarball on this harddrive with a creation timestamp in Dec 2006. This is code I don't even remember writing.
wow, now I remember why I might have saved this.
This was my ancient attempt at creating my own facebook back when I was still learning PHP.
heh
hey, not half bad. This thing had an instant messenger and everything :D
Not bad at all for something I wrote in the age of IE6 ^^
 
 
2 hours later…
4:26 AM
moin
 
moin Joe
 
first commits just past four in the morning again ... stupid circadian rhythm ...
 
moin
 
moin @Stricted
 
@JoeWatkins you want drop bc support for apc ?
 
4:36 AM
I want to, but chickened out
if we don't drop it now, we never can ... if we drop it now, we can fix all the weird stuff ... but I'll get shouted at ...
 
mhm
i think its time to remove the old creepy stuff and look forward
if you ever have to think about the bc you can never do something new
 
the most appealing thing isn't dropping the API BC ... it actually dropping the configuration options so that I can extend the API ... because none of it makes sense ...
maybe it would be better just to do a new extension with a nice api ..
I don't like to be shouted at ... the whole point of apcu was to retain bc, in some sense its pointless without it ... that will be pointed out over and over for years and years if I drop it ...
 
mhm
thats a dilemma
 
yeah, I mean a million billion things rely on apc still, none of that stuff can use 7 properly if apcu isn't available ... I'd really be annoying a lot of people ...
 
aaaah my windows freeze -.-
ok still working ^^
 
5:02 AM
@JoeWatkins The only real appealing feature of apcu is the userland cache, right?
So why not just start over? Create a new API with user cache just for PHP 7. Forget the APC code and just take the lessons learned into a new extension. Nothing about the opcache code in APC is necessary now anyway.
 
yeah that's all apcu is ...
new ext is probably the thing to do, yeah
apcu is already ready for seven, so, I'm going to have little choice but to maintain it now ....
I can put a new ext out there, but apcu already exists, I can't really remove support for it ... or can I ?
this is kinda awkward
@Sara I thought you said runkit was maintained and being developed for 7 ?
or is the fork what you were referring too ?
I think that was the guy that made a PR for a runkit fix ... I never connect the dots
 
5:44 AM
I'm using PostgreSQL,
And it has created a user on OS X.
Anyone knows why?
 
Yea @JoeWatkins, but we know every RFC fails at vote anyway :-P
 
Abe
6:48 AM
god windows 10 is awful lol
 
7:01 AM
what do you like about PostgreSQL? Why not use mySQL?
 
@HassanAlthaf if there would be a security issue an attacker would only take over that account with way less permissions to ruin your system
 
Anonymous
@Abe really? I was looking forward to it
 
Morning. o/
 
Abe
@samayo if a turd could poop that would look like win10
 
Say I parse a string to obtain a number from it; Is there any way to convert the string to an int (without type casting), but ONLY if the "value" wouldn't change? As in, convert (string) "12345" to (int) 12345?
 
7:08 AM
@Abe is classic shell working on it?
 
Abe
@PaulCrovella prompt?
 
try using intval Darth
 
I thought of that, but if my $var isn't a complete int (i.e. "234jdk35"), then it'll just grab 234 from that. I only want to convert to int if it's completely a number. var_dump() just shows everything as a string because I obtained it from explode()
 
@MarcelBurkhard I see, but since it is a personal computer, is it still prone to attacks?
 
@Porlune I'm not sure if I'm just fussy, but I'd like the var types to accurately reflect what they'll be used for.
 
7:14 AM
then use is_numeric first
 
And I use PostgreSQL for Java, not PHP
For PHP, I use SQLite.
 
@Abe classicshell.net ... says it's officially supported, but that just hit a month ago. Anyway, you might give it a try for less poopy poop
 
Or MySQL
 
@Porlune Thanks! You're a savior! <3
 
You're welcome :D
 
Abe
7:31 AM
@PaulCrovella explorer is the least of the problems
 
@HassanAlthaf I guess not, your postgresql instance is probably not reachable from the outside
 
@Abe I've used it for the start menu pretty much since leaving win 2000. What is the big issue with 10?
 
@MarcelBurkhard So therefore, the user account precaution is unnecessary in that case, I believe?
 
Abe
@PaulCrovella everything looks so visually and functionally spamming, the opposite of what should be for actual productivity
the only thing i'm enjoying so far is the possibility to create desktops (i know, linux had it for years -__-)
the taskbar is even more idiotic than vista+
still forced to use 7+ taskbar tweaker
and clearly they randomized the control panel again lol
 
7:55 AM
windows 10 bashing thread?
oh lol @PeeHaa. Just got the "kicking the front seat" part
 
8:23 AM
mornin
 
#define CED (EG(current_execute_data))
#define CEF (CED)->func
#define CEO (CED)->opline
#define LEO ((CEO)-1)
#define CEC (CEF)->op_array.opcodes
#define CEE ((LEO)->opcode == ZEND_CAST && (LEO)->extended_value == IS_ARRAY)
		if (!(CED && CEF->type == ZEND_USER_FUNCTION && CEO) ||
			!(CEO > CEC) ||
			!(CEE)) {
			/* ... */
		}
#undef CED
#undef CEF
#undef CEO
#undef LEO
#undef CEC
#undef CEE
 
I fear speaking of that movie now @tereško. I feel pretty much anything/anyway I could say something will either be formatted by what I think I understood or perceived as complete paranoia. asshole.
 
@tereško I think you're up early today (up = woke up) ..., so why?! have a new interview?
 
8:38 AM
nope, just woke up
 
ah ok
 
@FélixGagnon-Grenier which movie :)
 
the one samayo threatened to flag, about cults and stuff^^
 
anybody know, stakoverflow stores all questions and all answers in one table, or two separated tables in database?
 
8:40 AM
those are posts
 
@JoeWatkins u_U
 
@tereško I can not see this link, for me, it is some empty textfield for asking new question ...
 
that's what you are supposed to see
but not for asking question, rather a query
 
@FélixGagnon-Grenier oh really...! ah, so exchange is related with stackoverflow?
 
8:42 AM
@JoeWatkins also, the name for execute_data is ex, not CED ^^
 
@tereško tnx
 
hmmmm... yes. they are @Sajad :p
 
ok
 
@bwoebi that's the name for the local symbol execute_data ...
 
If I were you, some stranger named Felix would suggest me to google stuff to understand the link between stack exchange and stack overflow, and I would definitely do it
 
8:45 AM
@JoeWatkins use a static inline function if you need that :o
 
yeah it won't stay like that ... probably make use of the same kind of thing again ...
 
8:57 AM
this title is clear ?
what is the storage system of stackoverflow (for questions and answers)
 
467
Q: Which tools and technologies are used to build the Stack Exchange Network?

aleembWhat tools and technologies are used to build the Stack Exchange Network? See also: Which tools and technologies are used to build Data Explorer? Return to FAQ index

 
@PaulCrovella thanks, but I saw it before. my question is different thing now ... do you know, stackoverflow havef one table for all questions and answers or two separated tables ?
 
9
Q: Stack Overflow database model

BobbusI'm currently involved in a project to design and implement an in-house question-and-answer community for our university. We've explored some open source frameworks such as OSQA, but we are also considering designing the community from scratch. Thus, what is the database structure of Stack Over...

 
@PaulCrovella thanks pal ;-)
that's weird. why I have not knew stackexchange so far ...
can anybody please tell me this part mean: "there is two separated tables for questions and answers" or not?
 
9:16 AM
Morning
 
@PeeHaa morning
 
Abe
yo o/
@samayo anyway, i don't find a blog is a project interesting enough for me. not unless it's a fully featured quality product. but that's not easy to make
 
Anonymous
uses prism.js for syntax hightlighting (over 50 languages)
Font-awesome and bootstrap for easier front-end customization
Disqus for commenting. (optional vanilla php comment feature)
Multipe user accounts for authoring blogs
Fetch/order blogs by unique tags, dates and authors
editable blogs by visitors, edits then are sent as PR to your github account.
log in with github/twitter to comment.
easily embed gists and tweets into your blog post
 
Anonymous
@Abe those are the features that will be implemented for now.
 
Anonymous
the project is started, we are just experimenting and running benchmarks about which templating option suits the project. Twig, Plates or php.
 
9:35 AM
@tereško oh, there is "database schema" in the left side of this link, it is what I want, right?
 
keep in mind that it is not the entire schema
 
ah
 
but yes, on the left side you can see all the publicly available DB structure and write queries to get data out of it
 
oh dear lord ... I can write a "drop" query. why send query is available ?
 
Abe
@samayo lol. that makes me smile a bit. in a non offensive way, clearly. i would start with implementing basic stuff properly. authentication, user management and permissions, proper tree/folder-like taxonomy and tag taxonomy and most importantly natively early designed localization capabilities
 
Anonymous
9:38 AM
@Abe ehh, those were the end-user features.
 
Anonymous
alright, you are kicked out of the project :)
 
Abe
ead @samayo :P
you don't know what ead means in this room right xD
 
@Abe you understand wireless networking?
 
Abe
@PeeHaa i understand nothing
and that's not even a joke
 
9:39 AM
I'm wondering whether I can adhoc connect multiple devices to eachother or whether I need an AP. @anybody
 
Abe
i only know you can with ethernet, probably
don't know about wireless
 
Meh it's ok. I also still first need to find out what distro I should use anyway
 
Abe
@samayo also, who is participating to this
 
@PeeHaa You're going to want an ap. Even if you've got hardware that supports multiple adhoc connections I doubt you want to deal with the wonkiness of that network.
 
@PaulCrovella :( That's too bad
 
Anonymous
9:46 AM
@Abe we are a group github.com/phparsenal
 
@PeeHaa wth are you trying to do anyway?
 
Anonymous
we are also using kanboard.net
 
Abe
phparse-nal
 
@PaulCrovella Hoping to be able to connect multiple rpi's without external hardware
 
Abe
anyway good luck @samayo :P
 
9:48 AM
@Abe arse anal?
 
Abe
lol
 
Anonymous
lol, never thought of it like that.
 
:P
 
@PeeHaa this context seems rudeness
 
Alternatively would it be possible to use a rpi as an AP or is the issue that wireless dongles just cannot handle it? @PaulCrovella
@Sajad neh
 
9:50 AM
ah ok, sorry I don't know english very well
 
Alternatively part II: is there any other way to create a network of rpi's with 1 rpi also having access to the real user network? @PaulCrovella
 
@PeeHaa you can set up a rpi as an ap, no problem there
the intertubes should be able to help with that
netflix's new android app update wants access to my microphone... 'da hell
 
That's just to improve the "user experience" :P
They just think all their users like to be raped in the arse
 
to be fair netflix probably already knows more about its viewers than any person would willing share with another - based solely on their viewing habits
 
hmm no droid builds
weak
 
10:00 AM
i run kodi on my htpc - no netflix support with it
 
If you run kodi you don't need netflix imo
 
"need" is a strong word for either of them, but I like the options given by having both
 
10:16 AM
@PaulCrovella need/want same thing :)
 
> I want to run more than 800+ php script in background simultaneously on linux.
 
Don't we all? :P
 
know of a board that supports that many sockets?
 
@PaulCrovella I always think. If you are willing to spend the money on it everything is possible :P
 
Anonymous
> Each php script will execute forever it means it will not stop once it has started
 
Anonymous
10:30 AM
hmm...
 
heat-death of the universe be damned
 
monring
 
I just realized that the inverse of "mornhaa" is "peeing"
 
lol that is just special
 
10:39 AM
moin
 
Mogguh joe
 
moin joe
 
I can't believe someone said he should do it ...
 
I was hoping to see a pcpartpicker link with a fuckton of xeons in it
 
morning
 
10:45 AM
moin
 
@kelunik mogguh
 
@JoeWatkins Had to switch Task from Threaded to Volatile then all tests instantly passed, but I think I have to review the rest there. :-)
 
you want to try and refactor to use threaded if you can ... volatile objects are slow ...
 
no windows build for 3.0.8?
 
10:51 AM
A client just signed a contract for a license to use my data aggregator project! \o/
Only small problem: the project doesn't exist yet :P
 
does the money exist yet?
 
Yes it does
Well it will soon
 
well shit, sounds like a 1.0 release is just about ready then
 
:D
 
@PaulCrovella yeah, I used a function not in RC4 and RC5 not tagged yet ... there is a build on the issues list somewhere from Jan-E
 
11:22 AM
ah, k
 
11:42 AM
@bwoebi So I want to commit gist.github.com/nikic/d6283a77e6e4354a3254 directly. It only moves the existing checks into a function and normalizes the return value to NULL. Doesn't touch fake closures. Do you think that's okay?
 
11:54 AM
@NikiC is the behavior the same? well… then, why not?
 
@bwoebi The return value changes to NULL ^^
But as far as I understood that part is uncontroversial?
 
@NikiC no, I mean binding behavior
@NikiC yes. If unsure, just ask Dmitry, but I'm fine
Also allows cleaning up the actual PR… so, why not? :-)
 
@bwoebi Done. PR is very simple now: github.com/php/php-src/pull/1560/…
 
12:35 PM
@bwoebi BAH
@bwoebi Turns out the return value normalization fixes another segfault: 3v4l.org/tpK16
In the error case, it previously just bound a null $this ... great
 
what happens if I change all columns to 'indexed' ? (all of them)
 
You would end up with a big index
 
actually I need to just some of them as "indexed"
@PeeHaa what is your mean of "end up" ?
 
Google it
 
there is not any proper translation
 
12:39 PM
And didn't say google translate
 
ok
 
Please stop trying to optimise
 
hello
who can help me in regex ?
^profile\/(.*)\/?$
 
@tereško I'm not try to optimize
 
this is my code
but does not work
:(
 
12:41 PM
"but does not work" is not a problem description
 
$1 returns nabi/
test
 
Well depending in the input string I could see it do that
 
@PeeHaa well, I figured out "end up" means "finished", so this sentence has not any correct mean: "You would end up with a big index"
 
Looks like it working just fine @Nabi
 
12:43 PM
\o
 
regex101.com @tereško
 
Why did you give me that link?
If you keep hitting the wall, you will end up with a bloody hand, @Sajad
 
you touched him last, he's yours now
it's like licking a cupcake
 
@tereško tnx. I go it
@PeeHaa I got it
so "a big index" is a bad thing?
 
Not if you don't care about disk space, insert performance, update performance, delete performance
And good luck rebuilding it when restoring a database
 
12:50 PM
@PeeHaa oh, so why you said "not"? according to your comment, I think it is really a bad thing
 
In general it is
 
ok, so should I index that columns that are in the where and order by of my query ?
 
But instead of taking my word for it use the goddamn google and research it yourself
 
you are right, ok
however, I did it already, but unfortunately I'm obsession a bit
 
12:53 PM
anyway ok thanks
 
@PaulCrovella That gives back so many SO clones :P
 
if google was worth its salt the top link would be when you got possessed by the devil
 
@PaulCrovella Wouldn't that be the last link at the bottom where there are flames and shit like that?
brb food
 
@bwoebi got a ping in amp-chat but can't see any message. ^^
 
1:27 PM
@kelunik nice ^^
 
hello fnds, i have an issue with my magento one page checkout
We are currently using your one page checkout. Problem is when we place order using 2checkout payment method it not redirect to gateway site it just redirected to me "www.mydomain.com/tco/redirect/". But when I deactivate your one page checkout and activate magento default opc its working fine.
 
@bwoebi did you send anything?
 
@NikiC yeah, I know. That's what I meant with crippled Closure binding
 
\o/ 1k msgs
 
1:32 PM
> Can we also add a few cases where the second parameter to bindTo is omitted to the test in PR?
 
@bwoebi I kinda expected it to just leave the old binding instead of replacing it with null...
 
(you expected PHP to be sane? :-P)
 
@bwoebi We already have tests where the second parameter matches the existing scope so that seems redundant
 
@NikiC Ah, well, then it's fine…
wasn't sure what default was…
 
So, now that the closure crap is done with, can go back to doing something productive...
I seem to have lost my array benchmark suite in some old VM :(
 
1:39 PM
Also thanks for the internals mail :-)
 
Do you know some great PHP benchmarking tool that a) does multiple runs and does something reasonable with the samples and b) has some easy way to compare results between different PHP versions?
s/PHP versions/PHP builds
I feel that the method of running a script ten times, and remember roughly how a column of numbers looks like is not the most reliable method :D
 
@NikiC Closure crap :-)
@NikiC I usually run something 3-10 times and take the best number or all these runs and compare it…
But well, in case where you have multiple things affected, it's harder…
 
@bwoebi best number is usually an outlier for me
 
ye olde "fuck it, to a power of ten"
 
@NikiC mhm… not for me… when best number is very off, there's something wrong.
Also: never do precise benchmarks in a VM
 
1:45 PM
@bwoebi heh. I always benchmark in a VM :D
 
right… in that case best number might be sometimes off
no problem with benchmarking in a VM, it's just harder to measure small differences precisely.
and using best number doesn't work then
 

« first day (1820 days earlier)      last day (3113 days later) »