« first day (1822 days earlier)      last day (3119 days later) » 

10:00 AM
im also a beginner and i use jquery
 
as for the post thingy.
 
user5020521
since I've been working on this for days and I'm really tired
 
Why a question mark as asked before.
 
@JoeWatkins there's no particularly good reason to limit constants to classes
 
user5020521
I don't know why
 
10:00 AM
I mean, by the same logic we could make constants global and available on any class
 
user5020521
I read to do so and I just tried
 
Where did you learn this?
 
user5020521
around on the internet
 
Show me where you read it.
Pff...
 
user5020521
I'm not able to show you my friend
 
10:01 AM
We have browser history... :-)
 
remove it and try again
 
user5020521
but I am able to show you all of the async request if you need it
 
@Andrea I'll try again .... what kind of constant is only constant for an object ? if it's constant, it doesn't seem to make sense that an instance of an object should need a different value to the class of the object ...
 
Doesn't it ring any bells if I keep asking about that question mark?
It should be.
 
10:02 AM
@JoeWatkins a constant is merely an unchanging value
 
I know :)
 
user5020521
before going jQuery I really would like to handle the pure javascript and about the question mark I really don't know why I put it there
 
they can exist in different domains
 
@Riccardo990 Why the question mark...
 
user5020521
10:03 AM
I thought that was a proper way to pass a parameter from js to php
 
user5020521
this is it
 
how would you assign it to an object rather than a class, and why wouldn't you assign it to the class ?
 
COM'ON IT STILL DOESN'T RING ANY BELLS? GAWD HELP US!
 
well, what if we don't know a value until an object's creation?
 
Remove the question mark and try it.
 
10:03 AM
consider the case of the immutable value object
 
@Riccardo990 You know that jQuery is an abstraction (makes things easier) than vanilla Javascript? It's not an extra step, it's probably a lower step.
 
that'd be a perfect use case for object constants
 
user5020521
ok I'll let you knwo
 
user5020521
just gimme the time to try it
 
@Riccardo990 How to google your issue: google.nl/search?q=xmlhttp.send+post&oq=xmlhttp.send
 
10:04 AM
jQuery isn't perfect for every case, but it does make things easier.
 
@Farkie indeed.
 
@Andrea meh ...
 
Enough Javascript in the PHP room, got an headache because of it :-)
 
user5020521
I removed the question mark
 
have you sent the content-type?
 
user5020521
10:06 AM
and now the error is on line 8
 
user5020521
not yet
 
do it - it's important
 
Gawd, I guess the error is uhm. Ye. No Idea.
 
user5020521
ok
 
There's some cooler (similar) and much smaller libraries than jQuery there people should look at. Chibi springs to mind
 
10:07 AM
if an objects instantiation is when the value is known, then by definition it is not constant ... or by any sensible definition ...
 
There ARE thousands of known, Tell us the error -.-
 
@Sajad I thought it was incredible how the US had gone from all white men to tons of asian men and women, then realised that wasn't a photo of the US :p
 
And for animations use GSAP
 
user5020521
xmlhttp.open("POST", url, true);
	xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlhttp.send("idRecord=");
 
lol
 
user5020521
10:08 AM
this is what I changed
 
you're not setting it to anything!
idRecord=3?
 
user5020521
wait
 
user5020521
if I need to delete a record after a confirm has asked the user whether he is sure what heìs doing
 
I think you need to hire somebody :P
 
user5020521
so I have a table and for each row where there are names lastnames and so on we have delete
 
10:09 AM
Please just remember we aren't your work slaves!
 
Yes you are! cracks whip
 
user5020521
I know
 
user5020521
just answering to your question
 
Think about what you're doing.
 
user5020521
and hey I haven't sent you a wall of code
 
10:10 AM
@Andrea sounds more like a use case for guarded properties - getter with no setter
 
@PaulCrovella why should it be a property, though?
 
user5020521
and I'm really tryinig not to put javascript code here in a php room
 
that's only done in PHP because we have no better alternative
 
user5020521
but to get back to your statement I must set idRecord to something
 
user5020521
@Farkie you got straight to the point man
 
10:12 AM
:)
 
user5020521
if I need to delete a record only when the user click on that record
 
@Andrea because it's a property of the object... how do the literal definitions of those words not apply?
 
you need a confirm dialog, wrapped in an AJAX call
 
user5020521
so I might to set idRecord to id since in the async table the info are fetched from a select *
 
user5020521
and I my db table I have id for each column
 
10:13 AM
@PaulCrovella it's also constant
 
@Riccardo990 yes - but I think you need to learn more Javascript before you do this
 
user5020521
the confirm dialog is already wrapped in a ajax call and the ajax call has a callback function
 
ugh, I wonder how I can clean up the mess that is $foo->bar versus $foo::$bar
I hate that
 
user5020521
@Farkie the hell you're right but what better learning than attempts?
 
one solution would be to make const sugar for public static final
 
10:14 AM
@Riccardo990 xmlhttp.send("idRecord=" + idRecord);
 
and add a final modifier
 
user5020521
@Farkie I try to make a statement
 
C'mon, we'll go to private chat. This is the PHP room.
 
user5020521
@Farkie I'm like sh**** here
 
user5020521
i don't have the privilege to create a chatroom
 
10:15 AM
I just did
 
user5020521
so just invite me to yours
 
@Andrea Just because it's immutable doesn't make it constant. The value isn't a fixed thing, it's determined at runtime.
 
@PaulCrovella so? we can define constants at runtime
PHP has this weird idea that only mathematics-style constants need to be immutable
class List<T>
{
    public final T $head;
    public final ?List<T> $tail;
    public function __construct(T $head, ?List<T> $tail) {
        $this->head = $head;
        $this->tail = $tail;
    }
}
I can dream ;_;
 
morning
 
10:20 AM
moin
 
@Andrea Define them as a fixed value, yes - not determine their values from whatever variable data is floating about.
 
@PaulCrovella that's not true
if (IFeelLikeIt()) {
    define('PI', (int)file_get_contents('https://www.random.org/integers/?num=1&min=1&max=6&col=1&base=10&format=plain&rnd=new'));
}
 
@kelunik Any update on the web socket stuff ;)
 
@Andrea ah, yeah, I forgot define lets you do stupid shit like that
 
want an "accurate" pi define? https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt

xD
 
10:25 AM
@PaulCrovella not necessarily bad
programmatically defining things if you can is a good idea
For example, don't manually type out the numbers between 0 and 63 for some enum. You'll screw up some day.
@MikeM. that also works, but we only need the first few digits :p
(unless we're using bcmath 😉)
 
I've never had to manually type out the numbers between 0 and 63 for some enum
and I'm having a hard time remembering any enum I've dealt with that big that wasn't already a bad idea for other reasons
 
@Andrea :-)
 
@PaulCrovella even if it was just 10 elements, you should probably still do it programmatically
 
Okay, I'll range my months. That's still a far cry from considering a value object constant, as opposed to just unchanging for its lifetime. My bank balance cannot remotely be described as constant.
 
10:42 AM
few things are constant
constants exist in the natural world, but that's an exception
 
jeebus it's almost 4
 
@Andrea There's also plenty out there we define as having a fixed values, various RFCs and ISO standards and whatnot. Sure they may be superseded later, but it's not like I have to figure out on the fly if today its ISO 8601:1988 or ISO 8601:2000
 
I still don't think there's some fundamental difference between an immutable property and a class constant
it's an immutable value over a different duration
 
@Andrea immutable property on an instance or on the class?
 
@MadaraUchiha either
 
10:55 AM
@Andrea so are variables then
 
@PaulCrovella immutable ones
 
even mutable ones
 
(which PHP doesn't have for now)
@PaulCrovella no, mutable values, er, mutate
 
Immutable properties over instances are by definition different than immutable properties over classes (which are equivalent to constants)
 
they just happen to be fixed until you change them - different duration
 
10:55 AM
that's not the same
 
By sheer power of not being singletons..
 
an immutable value is unchanging for its entire lifetime
a mutable value changes
 
@PaulCrovella The point of immutables is that it never changes, until it dies.
Often even enforced in some way.
 
anyway, gtg, ttyl etc.
 
@Andrea "its entire lifetime" being just the difference in duration
 
10:59 AM
@PaulCrovella No
There are big advantages if you can ensure that an object never mutates throughout its lifetime
 
@MadaraUchiha I'm well aware. We were discussing the difference between constants and an immutable properties, I likened them to mutable properties to make a point about the semantic meaning.
If there's no difference between what's considered constant vs simply immutable because the only difference is the duration of the value, then there's no difference from the mutable as well.
 
@PaulCrovella Well, in PHP, some constants are compile time constants, and some are runtime constants
runtime constants are more akin to immutable variables than compile time constants.
In JavaScript for example, there's the const keyword for defining a constant variable (an immutable variable), so in JavaScript there really isn't a difference
 
what a scary example ... he could have used any function to illustrate the bug ...
 
11:15 AM
I presume he needs it for testing, but why he would be calling the function before replacing there is beyond me
 
I don't think it's reasonably fixable ...
 
uopz_restore just useless on windows then?
 
@Patrick Check your no framework tutorial thing on github, definitely needs ACL / security to become super-popular ;)
 
anybody know what is "OR" ? in this context:
You could try something like this to reduce the ORs
it is about database (specially fulltext)
 
not sure ... I hate windows, with a passion ... now I'm going to have to look at windows stuff ...
 
11:20 AM
Chris is usually the windows guy no?
 
yeah, I dunno if he's ever looked at uopz though ...
where is chris ?
 
@Sajad presumably there's a query with a large number of logical OR operators, and they're suggesting something to simplify it
 
@PaulCrovella ah, yeah I think it is correct
tnx
 
@Sajad lemme guess. It is about WHERE IN (...) syntax
 
11:25 AM
@tereško ah, right!
 
@MadaraUchiha 7 should ask 6 to translate for him
 
@MadaraUchiha what? do you mean PHP7 is slow ?
 
 ������ �� ���� ��
3
 
this thing has become the most useful part of my phone
 
Abe
@Sajad it means that php doesn't have core unicode strings support yet
 
11:28 AM
 
@Sajad ���� �� ��� ����?
 
@Abe I got it, tnx
 
Abe
@Sajad he is joking
 
@MadaraUchiha still I can not read it
 
 �� �� ��� ����...
 
11:29 AM
@Sajad neither can php 7
 
Abe
@MadaraUchiha ��a��e� �� ����� e����?
 
Interestingly, chat treats some of these as quotes, but not all
 
@Abe yes I know it is a joke, but actually it is not funny in my opinion (however I can not understand it)
 
Abe
@MadaraUchiha #MD
 
not all jokes have to be funny
 
11:30 AM
@tereško Unless I tell them. Then you laugh. Or else.
 
@tereško seems nice device !
 
@tereško I already get phantom pocket vibrations, adding phantom wrist ones may be too much for me.
 
@MadaraUchiha :-)
 
@Sjon Oh wow. Well played.
 
@PaulCrovella not if your phone is in your bag or in another room
 
11:32 AM
what do you guys do when you need to use re-captcha at multiple places in one page? clone existing one?
 
Abe
@MadaraUchiha you don't have that in the ES6 room eh
 
@tereško If my phone is in my bag or another room then I don't care enough about phone calls or texts to need that.
 
@NullPoiиteя I pick a stick and go to have a serious talk with the desiger
 
@Abe Oh, don't get me wrong
 
Abe
@NullPoiиteя i make it appear only when a form is about to be submitted. so yeah the same instance gets moved from form to form
 
11:33 AM
I hate that joke more than you.
But that specific instance was really well played.
 
@tereško page have ~10 forms where i need to use re-captcha so not designers fault :)
 
 
@NullPoiиteя You have 10 forms on one page?
 
Abe
recaptcha is stupid. you can only use one for each page, so yeah you need to move it around
 
@Abe recaptcha isn't stupid
 
11:35 AM
@MadaraUchiha yupp is it bad? :D
 
Having 10 forms on one page is stupid.
@NullPoiиteя What's the usecase?
 
Abe
10 forms is not excessively strange, but 10 forms that require a captcha is
 
@Abe Kinda is
I can't remember the last site I've visited that had 10 forms in it
 
Abe
search form, fast create account form, pagination header, pagination footer, subscribe to newsletter, you can get to 10 forms easily imho. clearly, more than 5 is bloated
or "add to cart" form for each product in the listing. 20 products, 20 forms
web 1.0-ish though
 
@MadaraUchiha its b2b application, it have CURD for teams, companies, places and Uploader, aws s3 file manager, getorgchart chart (CURD) ... technically i forced to write code of 5 page in single page ... even it have html of 3k lines :D
 
11:39 AM
@NullPoiиteя Heard of SPAs?
 
yes why?
 
For starters, just because it's a web application doesn't mean it has to all be one the same page.
Secondly, a single-page application doesn't mean "Take code from 5 different pages and mash it onto a single page"
That's not how it works
 
Morning
 
i know it even i suggest the proper way to tl he didnt listen to me now i dont care i will get things working may be he wont get them as proficient as i can make it.
 
11:45 AM
Good Evening Guys How to resolve this issue in moodle...Can not read file, either file does not exist or there are permission problems
 
@user12688 i think file doesnt exist
why not just check with file_exists ?
 
@NullPoiиteя i'm really struck with the moodle data ..i place in the e folder my files are in e->htdocs->projects->rootdirectory...I dont know why its coming like that...I can view my index page in that its showing the error message
 
what error message?
 
@NullPoiиteя files are there
@NullPoiиteя Can not read file, either file does not exist or there are permission problems
 
and ffs stop using wamp, install Linux server in virtual machine and use it
sorry now i can not really read mind
 
12:05 PM
@AnmolRaghuvanshi you mean
> this is not working.
my favourite ....
 
@MadaraUchiha pong
 
@rlemon See image directly under ping
 
what about it
 
Colors are too dark
Or too low contrast
 
so fix highlight.js
 
12:11 PM
@JoeWatkins yeah thnks :)
 
@rlemon Another thing I've noticed is that if you I try to expand a truncated code block, It loses its colors
Is that a regression or something that was just never addressed?
 
addressed, never fixed
I just need to re-parse the node once expanded.
 
I think that user does not really understand the point of SO
 
user5020521
@MadaraUchiha why have I been kicked again?
 
user5020521
what the hell did I do now?
 
12:19 PM
@Riccardo990 Wasn't me this time
So... dunno
 
@bwoebi ping
Spritz in IRC:
> I have a phpdbg test failing since a few days revive.beccati.com/bamboo/browse/PHP-SRC5-TESTS-25/test/case/… on both master and PPH-7.0 - but I can't see any change to phpdbg
 
user5020521
@MadaraUchiha could you please create a private room and invite me there?
 
> Brain: re.+\.b.+ REBECCA BLACK DETECTED DON'T CLICK
 
E_WRONG_DAY
 
@JoeWatkins You never know....
 
12:21 PM
false alert :D
 
also, we chose really early this morning to switch to venus time, so Friday isn't actually for another few years yet ...
 
So, it's gonna be Monday for a really long time?
 
yeah, but not for years ... we can just switch back to earth time ...
cheating is fine, we already started cheating ...
 
I have a fulltext index on my table, so if I edited a record in my table, do I need to remove that fulltext index and re-create it ? (for including updated data)
 
no
 
12:27 PM
@MadaraUchiha lamest Rebecca ever
 
index gets updated automatically each time you add or edit an entry
 
ok tnx :-)
 
this is one of reasons why indexing every column is stupid: indexing takes time
 
indexing every column also sounds funny :D
 
@tereško I see (because I asked exactly this question [can I index all column] already)
@tereško just one thing, do you mean of "automatically" is something in the mysql? or should I use TRIGGER for updating that automatically ?
@NullPoiиteя yes it is (I get that now)
 
12:30 PM
I mean, that is how indexes work already
 
alright. tnx again
 
Is there any reason to explicitly pass an object by reference?
 
@SergeyTelshevsky Not really, not with objects.
At least AFAICR
 
what is "reference" in this? $obj = new classname();
 
Anonymous
how the variable holds information about the object.
 
12:36 PM
well, what is pass an object by reference?
 
@Sajad function some_func(&$reference) {
 
ah !! tnx :-)
 
@SergeyTelshevsky only if your intention is to cause memory leak on 5.0+ (it was necessary in php4)
 
Anonymous
It is some advanced stuff. Don't worry about it for now
 
@samayo I'm profesional now !!! :@
 
12:37 PM
That's strange: 3v4l.org/ZO3G1
but on 5.3:

$ php -r '$x=new stdClass;$x->prop = "foo";$y = &$x; $x = null; var_dump($y);'
NULL
$ php -r '$x=new stdClass;$x->prop = "foo";$y = $x; $x = null; var_dump($y);'
object(stdClass)#2 (1) {
["prop"]=>
string(3) "foo"
}
 
Anonymous
@Sajad really? Ok, so what does the \ mean in \str_replace()
 
@SergeyTelshevsky 3v4l.org/nOvkC
 
@samayo Namespace
 
@SergeyTelshevsky you managed to get tricked by references in two lines
 
12:39 PM
@Sajad afaiu you need to check how memory management and pointer in c works ...
 
@samayo Escape of Quotes
 
user5020521
@MadaraUchiha did I annoy you?
 
user5020521
I was just kidding you
 
@Riccardo990 when someone ignores you, it works on all the rooms
 
@tereško don't understand... :)
 
12:40 PM
just letting you know...
 
@NullPoiиteя ah, I thought php support pointer
 
Also, don't bother someone in a different room about a kick.
 
@SergeyTelshevsky I just changed the order of lines in your example
 
user5020521
@FlorianMargaine just ignore me you too
 
user5020521
above all after what you told me before
 
12:41 PM
yes, but I've copy pasted them from cli, one after another, why is there a difference? because of copy-on-write?
 
user5020521
thank you
 
more like "because references fuck with copy-on-write"
 
@Sajad never used pointer with php never found need ... though i have used pointer in C, and yes php is built using c :)
 
@NullPoiиteя ok tnx :)
 
@NullPoiиteя php does not have pointers :P
 
12:43 PM
@tereško what is the point of this sentence ?
 
In computer science, a pointer is a programming language object, whose value refers to (or "points to") another value stored elsewhere in the computer memory using its address. A pointer references a location in memory, and obtaining the value stored at that location is known as dereferencing the pointer. As an analogy, a page number in a book's index could be considered a pointer to the corresponding page; dereferencing such a pointer would be done by flipping to the page with the given page number. Pointers to data significantly improve performance for repetitive operations such as traversing...
 
Abe
@Sajad pointed pointers pointing to points
 
@tereško that is why i havent used it :D
 
In computer science, a reference is a value that enables a program to indirectly access a particular datum, such as a variable or a record, in the computer's memory or in some other storage device. The reference is said to refer to the datum, and accessing the datum is called dereferencing the reference. A reference is distinct from the data itself. Typically, for references to data stored in memory on a given system, a reference is implemented as the physical address of where the data is stored in memory or in the storage device. For this reason, a reference is often erroneously confused with...
 
@Abe I got it !!! interesting, your sentence is made of just one word: point ;)
 
Abe
12:45 PM
@NullPoiиteя your avatar gives me creeps
 
Anonymous
pointers and references are the same
 
@Sajad try this nptel.ac.in/courses.php they speak extremely slow you can translate them easily ... and they are really awesome
 
Anonymous
keep going
 
Abe
no
 
12:47 PM
@NullPoiиteя what is this website?
 
@SergeyTelshevsky why these are same
 
@NullPoiиteя which ones?
 
@samayo no
pointers and references are actually opposite operations
 
@Sajad video tutorials just click on Computer Science and Engineering and check tutorial for database and data structure
 
@NullPoiиteя aha, I will check it, tnx
 
12:54 PM
agreed, &a = address of a; *a = value stored at address of a
 
1:11 PM
Hello, is it possible to sort an array by keys twice? e.g sort them first after the key $percent to get them in order from 100 to 0 and sort all having the same number after $name
 
what is equivalent of this:
MATCH (col) AGAINST ('$q*')
when there is ? insteasd of $q
?
 
Guys any suggestion based on moodle
I'm really getting f**ck off.......
 
Abe
@Sajad what?
 
@JoeWatkins right… I realized a few days ago that the phpdbg tests weren't run at all in the generic make test: git.php.net/…
Which tests are failing?
Ah, watch_001.phpt. Well, works for me locally…?
@JoeWatkins can you reproduce any failure?
 
@Abe when I use PDO, then I don't know the correct syntax for using IN BOOLEAN MODE
 
1:25 PM
@bwoebi I can't, try and get mo feedback
 
heh this optimization 3v4l.org/YbKKf :)
 
:-D
 
was it just an oversight or really intentional? 3v4l.org/YiiIE
 
@marcio what should be an oversight there?
 
@bwoebi on the first example, not the second.
 
1:34 PM
@marcio well, we're just skipping a ctor fcall if there's no ctor
and skipping a fcall opcode wise is easiest with just jumping over all the args too
 
it looks a little bit more strange in this case 3v4l.org/7F3rS
At least I was expecting to have the side effect, even if there is no userland construct.
 
Abe
a very stupid thing about http is that the hash fragment is invisible to the request /scheduler/1444657064#ts1444657064 <- would avoid this redundancy
 
I'm fairly convinced that __construct is a language design anti pattern anyway. Hope new languages won't repeat this class model where instantiation is 'special'.
 
@marcio Hello, Rust.
 
@bwoebi I always had this strange belief that there is always an upper construct :)
 
1:43 PM
@Abe if the fragment was sent with the http request you'd expect a new request to come in when navigating around the page
 
@marcio you're not forced to use a ctor in you class?
 
Abe
@PaulCrovella i'm just saying it should be visible, not that behavior should change
 
it's not invisible, it's not sent at all
 
@LeviMorrison hey, I was expecting your short function proposal to be bolder and include named short functions. Will you propose some parts of the future scope immediately if the RFC passes?
 
@marcio Maybe.
I'm still debating stuff.
Doing () => expr like JavaScript has certain advantages, as long as conflicts can be worked out.
 
1:48 PM
I'm going to vote yes. I also changed my mind about 'fn', it's not really necessary.
 
Abe
@PaulCrovella are you saying it's impossible to have that? :P
 
Not impossible, PeeHaa's request thingy used to send it (which messed with the minds of some sites) - just unwanted: if it's something you send you can't use in-page hash links to navigate around without sending more requests, which would suck.
 
@bwoebi it's just the design that bothers me. Anyway, why can't we always have an upper __construct and get rid of the inconsistency 3v4l.org/Ympgi ?
 
@marcio we could, by just fetching the args and freeing these if unused before the zend_new, but BC ^^
 
Abe
@PaulCrovella well, not necessarily it must be sent in the path. could be, idk, Hash: #ts817283782
 

« first day (1822 days earlier)      last day (3119 days later) »