« first day (2747 days earlier)      last day (2200 days later) » 

Wes
12:02 AM
attack in canada?
will this shit ever end
 
12:43 AM
No
Unfortunately.
 
 
2 hours later…
3:02 AM
What's the secret for job searching...
 
3:23 AM
(rhetorical question, mainly grumbling to myself)
 
 
2 hours later…
5:01 AM
mornin
 
5:42 AM
o/
 
 
1 hour later…
6:56 AM
mornin
 
Is it a right understanding? "you should define a class as final, if that class will not be extended by any child"
 
@Shafizadeh No, it's the other way around
If a class is final, it cannot be extended
"if you define a class as final, that class cannot be extended by any child"
As for "should", you should generally not make classes final
There are cases when it's an acceptable solution, but generally speaking, don't.
 
7:12 AM
Ah I see, good explanation. thank you.
 
@JoeWatkins You are so helpful for me in C programming and IMO you're the only one who can say my idea is so weird that I have to leave it, but if you'll have a minute please look at my gist and share your comment gist.github.com/brzuchal/935b0ff217dc8f32afbb9d6657e4c305
 
7:32 AM
moin
 
o/
 
\o
 
Happy Tuesday \o
 
o/
 
@MadaraUchiha mathias would disagree /cc @Shafizadeh
 
7:42 AM
I also would disagree
 
If you're the framework, it makes sense
If you provide classes like String and HashMap it makes sense
 
Wow that toskan dude was a prick.
 
Not so for pretty much anything else in my opinion.
 
your opinion is wrong!!!!11one
 
7:45 AM
seriously though, my opinion (which is the correct opinion) is that anything that crosses an API boundary should be final
unless the explicit purpose of it is to provide a base class for something (i.e. it is abstract)
composition > inheritance
 
morns
 
@DaveRandom Define "anything that crosses an API boundary"
 
@brzuchal since the only time to get this passed is a major version (8), you can get away with not wasting energy on making the old resource api compliant
just remove it, if that's what you're doing ... don't leave crusty bits of it lying around to annoy everyone for the next 15 years ...
 
@MadaraUchiha anything that is instantiated by a consumer of a library, or used as an argument or return type of a method of things which fall into that category
 
@DaveRandom I dont have a strong opinion on this. On the one hand I prefer private things by default so final by default would be logical on the same grounds. On the other hand, final always feels like a technical restriction that doesnt really gives me much benefit. If I dont extend, I dont extend, so why add final? and it makes testing a bit harder. /cc @MadaraUchiha
 
7:47 AM
that's what I would do, just remove the resource layer, completely ...
 
o/
 
@Gordon To me it indicates "this class may be instantiated by processes outside your control, so you cannot create a drop-in replacement by extending it"
The cases where you cause someone a problem by making something final are the cases where you should have exposed an interface
imho
 
HELLO YAML BOY
 
HELLO GERMAN ASS CACTUS
 
7:51 AM
I think you should rename yourself to Yamlbo
 
@DaveRandom Tests?
 
@Gordon You've gone to the dark side with XML?
And Doctrine? pukes
 
@MadaraUchiha the only reason you need to extend stuff for tests is to create mocks, a problem which is solved with an interface
 
@Jimbo xml was never the dark side. it was and always will be the light.
 
XML was always for computer - to - computer communication. Trying to read it as a human is like dangling your balls in a bear trap
 
7:53 AM
As for puking on doctrine… could be worse… could be Eloquent
 
Yeah, people just misunderstand XML, they look at its immense power and confuse its light for darkness.
:P
 
@Jimbo whats wrong with dangling your balls in a bear trap? you're not man enough for it?
as for readability: our agent configuration file is in yaml. we got several "bug" reports where people claimed sth doesnt work and it turned out they removed indentation from the config.
 
dangling balls ...
 
significant whitespace is just asking for godwins law to be invoked
 
I won't claim XML is the holy grail in terms of readability, but I can slap a Schema file on a XML config and get autocompletion, autodocs and verifcation on it. XML has a very mature ecosysem arond it.
 
7:57 AM
@JoeWatkins Could you share a little bit more about crusty bits and that thing, I know this can be accepted only in a major version the PHP 8 version is what I'm trying to target it
 
audio is absolutely required for that video
 
@JoeWatkins I don't have a plenty of time that's why I want to start now to find as much time as it's needed for this change
 
that's un be fucking lievable ...
 
@Gordon Also you can use XSL to make them more readable(in browsers atleast)
 
for a long time I assumed it was from some sort of comedy sketch show
 
7:59 AM
@brzuchal from the start of the document, you talk about declare ZEND_ACC_RESOURCE, and having a zend_resource type, and making all the resource functions work ...
 
grok Slang. to understand thoroughly and intuitively.
 
!!dad
 
forget that, drop the whole layer and just change everything into objects
 
What's the best thing about Switzerland? I don't know, but the flag is a big plus.
 
@DaveRandom The last sentence rofl
 
8:01 AM
@JoeWatkins Ok, I see, but the way to change it into objects is something like I wanted to do with autoloader I mean a struct which holds zend_object and a *void pointer, yes?
 
you want to just go into every extension that uses resources right now and tear them out, when all extensions are resource free, go into main/ and do streams, and when resources aren't used anymore, just delete the layer ...
 
I am a huge +1 for this ^
 
yes, they'll be objects with that structure, but they won't be resources anymore ... you don't need it to behave like a resource with __toString, clone and all that stuff, it might actually be that some resources have a useful string representation, or are easy to clone (dup for example) ...
 
I see
 
@JoeWatkins the big thing there is (int)$streamResource
that is very useful, and very widely used
interface Stream { function getId():int; }
 
8:04 AM
fd*
 
but the (int) cast should preferably still work
 
or maybe 8 is a good time to allow internal objects to cast to any type, casting is a bit of a mess for internal objects right now ...
lxr
I would show you ...
 
ffs
 
@DaveRandom I like that idea, if someone will introduce casting fo rother types the it can be changed
 
anyway, in general what you want to work on is each individual resource type behaving as close to the same as it did before, like with the int casting, but you don't need to care about a pseudo resource layer that wraps objects ...
 
8:07 AM
Hi guys
 
@JoeWatkins alive again
 
whats wrong in this below sql query :
select top 10 * from (Select [Id] As [LinkedColumn],[Amount] As [AmountDump] From HR.Product)
I am getting this error :
Incorrect syntax near ')'.
 
sudo kill -9 `pidof java`
sudo kill -9 `pidof git`
sudo systemctl restart tomcat
for reference
that "fixes" it
I will try to actually fix it today
 
I need also to ask you guys @JoeWatkins and @DaveRandom would you be able to support me in this in areas like discussion, writing RFC and by reviewing a patch for it?
 
@brzuchal what's important with this, imho, is coming up with a complete and cohesive action plan before you go anywhere near internals with it
 
8:10 AM
actually you can just set the cast_object handler on stream objects and retain the same behaviour ...
 
this is a project that I fully support, but it's rather like untying the gordian knot
 
@JoeWatkins I didn't know there is something like that
 
I'll do whatever you ask ...
 
and yes I'm happy to offer my $0.02, but that really is about as much as it is worth
 
@brzuchal btw what kind of extension are you trying to make?
 
8:12 AM
@mega6382 It's not an extension, I plan to get rid of resource types
 
@Learning-Overthinker-Confused T-SQL?
 
that's a pretty crappy error message, I think the problem is that you haven't given your subquery an alias name
 
@DaveRandom but it's worth of doing this, yes?
I mean doing this change
 
@DaveRandom Oh yes.Good catch :)
 
8:13 AM
SELECT TOP 10 *
FROM (
  SELECT [Id] As [LinkedColumn], [Amount] As [AmountDump]
  FROM HR.Product
) i
@Learning-Overthinker-Confused however, what you probably want is a row enumerator over a window function
since you cannot specify the ordering
(assuming that subquery is more complex in real life)
as it is you may as well just write
 
Actually this table contains 12 millions of records so does this means still database engine will load 12 millions records and from that it will select top 10?
 
SELECT TOP 10
  [Id] As [LinkedColumn],
  [Amount] As [AmountDump]
FROM HR.Product
at the moment that does the same thing
@Learning-Overthinker-Confused no
Jet does retarded things like that, SQL Server is much more intelligent
 
Actually i have 1 page where user will write sql query and wiill see preview of sql query output
so i will just display top 10 records as preview
 
@brzuchal I'm on board with it in theory
 
hence i will append outer query from server side
 
8:17 AM
@JoeWatkins @DaveRandom is something like get_resources() which returns all active resources a thing which might be needed in some cases or I can get rid of it also?
 
So will this outer query works in all case even if sql query is complex?
 
@Learning-Overthinker-Confused I think so, but tbh I'd probably just run the raw query, only fetch the first 10 results and then cancel it
I assume you are taking some measures to ensure that the user cannot do anything they shouldn't?
 
but how would you just fetch the top 10 result considering user doenst write top 10 clause
 
i.e. ensure that the db user only has read access, and only to the appropriate objects
 
Probably user will run sql query against their database only so if they try to do something stupid then ultimately it their loss only
Hehe :)
 
8:20 AM
@Learning-Overthinker-Confused for ($i = 0; $i < 10 && $row = $stmt->fetch(); $i++) is one approach
 
Anonymous
morning
 
Actually i am .net guy
 
\o
 
So i dont understand what you have written
part from loop :)
 
@Learning-Overthinker-Confused then why are you here?
 
8:21 AM
@Learning-Overthinker-Confused C#?
 
You might find better support in C# room, or .NET, or sql room.
 
@mega6382 Because i was having problem related to sql query and every body have worked on sql
All right sir
No problem
 
So, you just picked this room randomly?
 
Thanks for the help :)
 
8:24 AM
@Learning-Overthinker-Confused using (var reader = cmd.ExecuteReader()) for (var i = 0; i < 10 && reader.Read(); i++) {}
 

ASP.NET MVC

Merged into C# chat on 4/19/21. Post messages there please as ...
 
Sorry, complete forgot how the raw sql reader API works :-/
 
9:06 AM
> short array syntax is allowed in php 5.4 only
what
saw that in phpstorm before selecting project php -v
also mornings
 
yeh it didn't exist before then
 
but I had php 7 selected
also 'php 5.4 only'
 
at the project level or as the default?
 
default
 
if there is already a .idea directory then the default won't be used (there will already be a project-level value)
 
9:09 AM
right okay
 
@PaulCrovella relevant
 
can someone un not-a-bug this? bugs.php.net/bug.php?id=64992 the reasoning given is kinda bullshit
 
Wes
9:27 AM
morn
 
\o
 
o/
I have something that looks like this - L5 prints 'Caught c, exiting...' if I do sigint :p why
'Caught d, exiting...' if I sigterm
I don't get it
 
@Ekin what's the 3rd argument for?
 
@Ekin they will be the watcher IDs
 
9:39 AM
c and d? :P
really?
 
I think so
 
oh the previous ones are a and b
lol, didn't see this coming
 
I think amp generates them by $initial = 'a';
and then just ++
 
I don't think the callback is taking arguments, yeah
dunno where to check that because onSignal is just creating the watcher
public function onSignal(int $signo, callable $callback, $data = null): string {
    $watcher = new Watcher;
    $watcher->type = Watcher::SIGNAL;
    $watcher->id = $this->nextId++;
    $watcher->callback = $callback;
    $watcher->value = $signo;
    $watcher->data = $data;
    $this->watchers[$watcher->id] = $watcher;
    $this->enableQueue[$watcher->id] = $watcher;
    return $watcher->id;
}
so you'd have to check where the loop is running
 
alright
thanks
 
9:51 AM
@JoeWatkins is this a thing which is designed to cast objects into other types? Like a solution for casting a stream object into (int)? typedef int (*zend_object_cast_t)(zval *readobj, zval *retval, int type); - Also I'm not as much familiar with C but I'm guessing that it something like a delegate and I understand it like a function declaration which is needed to be the same as implementing one which I can replace, yes?
 
10:01 AM
crazy idea: can php 8 drop 32-bit support?
 
@PaulCrovella Then what would xampp do? They are still to release a version with 64bit support. :P
 
they can do what they should do anyway - go fuck themselves
 
@PaulCrovella You mean in terms of platform support, or integer size? (compilers are pretty happy emulating 64 bit integer ops on 32 bit platforms)
Because making it consistent everywhere ++
 
If i have a app that requires sing-in with a app [integration] and get user data + token from it. would i be better to have two tables, [users, integrations -> (id, token, ...., uid)] or just have integrations with [name, email, token, password.] ?
 
@Leigh whatever lets me not have to deal with considering 32 bit ints is fine.. hell, reviving bigint would be ideal
 
10:10 AM
No, it would not
 
No, I would still totally be against auto-promoting ints
I rely on the predictable behaviour of integers in some of my code
 
okay.. then back to dumping 32-bit ints
 
My composer files have had php-64bit in the require for some time
Even if I don't care about the int sizes :p
 
@FlorianMargaine shouldn't return type be int? (didn't follow everything, but I was thought an id is supposed to be intger :P )
 
10:19 AM
hi everyone
 
o/
 
\o
 
something about symfony. If I want to render a form on pretty much every view I got, is this still the way to go?
or is there a different recommended way?
 
@Naruto an id is just "something to identify"
 
10:21 AM
Has anyone (cough @DaveRandom) seen a mysql connection in PHP just 'hang' and never return execution to PHP?
e.g. we have this code:
        $db->beginTransaction();
        echo "After transaction start\n";

        $sql = "SELECT * FROM feeds WHERE process = 0 order by nextcheck LIMIT 1 FOR UPDATE";
        $result = $db->query($sql);

        echo "Step a";
 
it can be an integer, a string, a fish, whatever you like, as long as you can identify the person/object with it
 
@Danack no, but I would assume that it is because it cannot get an exclusive lock on the table
I have never used FOR UPDATE
 
ye I know it can be anything, but that's what they used to teach us at school, id = integern nobody knows why, but they just did
 
Which is running in a cron job. We see 'After transaction start' but not the next line of echo.
 
I don't know if beginTransaction() actually does anything on the server
My assumption would be that there is a deadlock caused by the locking read
 
10:25 AM
@DaveRandom I would have expected that to wait for the max transaction time (or some other time limit) then report an error.
And yeah - showing deadlocks is the next thing I'll do once I've got access to that sql instance directly.
 
@Naruto integers serialize easier than fish
 
@Danack Is there a way to set the priority?
 
priority?
 
There's a HIGH_PRIORITY, but I don't know if it would help you.
 
I would assume that there is an uncommitted transaction with a shared lock hanging around
but I don't really know because mysql
 
Wes
10:29 AM
if it's locked it should error after some time
 
A cursory google points me at innodb_lock_wait_timeout
which apparently defaults to 50s
 
@PaulCrovella depends on the fish?
 
> Maximum Value 1073741824
> *futurama_sad_dog_episode_ending_music.mp4*
 
Wes
lol
yeah that's useful
 
!!> echo 1073741824 / 86400
 
what a weird number
 
Wes
clearly it was typed by punching the keyboard
like z-index:2374293073
 
34 and a bit years
 
0x40000000
 
it's the number of bytes in a gb
 
10:32 AM
that doesn't make it any clearer in terms of why it was chosen
 
Wes
lol
 
2 stoned engineers debating how long the max wait should be, one said a gig and they went with it
seems clear to me
 
Wes
lol
 
(yes I know this is a completely pointless exercise, I have already told the person who asked for it) does anyone have a preferred IP geoloc service?
 
darts and a map
 
10:37 AM
I showed my boss the fact that most services get my home IP wrong by two entire countries, he said do it anyway
 
@DaveRandom maxmind....
it has a varnish plugin.
 
@Danack it's conny francis
and that is still one of the most heartbreaking scenes ever
 
@Danack ty
 
Wes
has anybody tried navigator.geolocation?
that should be accurate, but requires user perm
 
Most people won't allow that
Also morngins
 
Wes
10:52 AM
\o
 
I've only ever allowed it where it made sense for what I wanted to do - e.g. on mobile, looking for the nearest ATM.. prompt me any other time and you can fuck right off
 
Wes
thats reasonable :B
 
^ :P
 
hey
 
yo
 
11:06 AM
@brzuchal burn it with fire
 
And bury
 
@brzuchal it's part of zend_object_handlers struct
 
And it's something like a declaration to fill when assigning new handler yes?
I mean the thing which I'm gonna assign must match that declaration, yes?
 
when creating a new object, you assign a set of handlers, typically the handlers are setup at MINIT ..
!!lxr zend_object_handlers
!!lxr std_object_handlers
you typically copy the standard ones, then override the ones where you want to change behaviour, in this case cast_object, and the function you override it with must have that signature zend_object_cast_t or whatever it was called
 
[ /Zend/zend_types.h#79 ] typedef struct _zend_object_handlers zend_object_handlers;
 
11:12 AM
@Jeeves you're slow, you should punish yourself ... possibly by beating yourself with your own trunk, and I want video evidence ...
 
that poor lxr is struggling so hard lately
 
!!blame @DaveRandom
 
@PaulCrovella ^
:P
 
@JoeWatkins Totally failed to get a valid results page
 
11:14 AM
what's going on chris ?
 
@JoeWatkins Thx
 
Last time indexes were borken iirc
 
@JoeWatkins he's busy making rule34 jeeves for you
 
Anonymous
+ @Jeeves thinks you're a prick @JoeWatkins
 
Anonymous
literally, years of abuse. And you expect him to help you
 
11:15 AM
I'll abuse you ... right in your gobby mouth ...
 
Anonymous
Sep 23 '16 at 8:33, by Joe Watkins
/me throws a sheep at @Jeeves
 
Anonymous
2016 Joe.
 
You don't need to feel sorry for it, it's a program after all ... if we have to start worrying about the emotional state of our programming, I'm fucking out ...
 
Anonymous
@Jeeves Ignore him, he doesn't mean it <3
 
I am sure some sort of SJW joke applies here. :P
 
11:18 AM
SJW sounds like a Java thing, not interested ...
 
@JoeWatkins have you seen westworld?
 
Anyway @Jeeves, you suck
 
Anonymous
@PaulCrovella no spoilers please
 
I haven't, keeps coming up on netflix, should I watch it ?
wait wait, is it frightening ? it's got hopkins in it ?
 
it's good. not great, but totally watchable.
 
11:20 AM
it sounds like it might get quite dark, does it?
 
Is it like black mirror or someshit?
 
Anonymous
@JoeWatkins yeah
 
Anonymous
not so much scary though
 
it's kinda dark
@mega6382 it's like a decent episode of black mirror, but done as a full series
 
@JayIsTooCommon Of course its scary. I hear they use ReactJS twitter.com/WesNetmo/status/988449173438652422 nothing scarier than that
:P
 
11:22 AM
I tend not to watch scary things ... because I'm a massive wimp ...
 
Anonymous
heh, @Wes nerd
 
@JoeWatkins like top while some Java-based IDE is running
 
shudders
 
Wes
:B
 
The <angle brackets> for the script tags are just amazing in that image. :P
 
11:30 AM
[daverandom@lxr ~]$ sudo fix-lxr
many of you people have access to the box, I can't really make it any easier than that...
 
could make a jeeves plugin
 
Or a cron to run it every hour or so.
 
could make it autohealing
 
Wes
cc @kelunik
 
11:37 AM
@Wes yes
 
Wes
great, ty
 
Wes
this guy is convinced i have no idea how traits work :B
inheriting documentation is different though
what i can also do is make both Y and X available in such cases
 
:B
 
Wes
which i already do. for example
class A{ /** X */ function x(){} }
interface B{ /** Y */ function x(); }
class C extends A implements B{ function x(){} } // summary is both X and Y
turns out i did a lot of stuff wrong... also now i'm trying to support traits as well... which complicate it quite a bit
though i've added /** @implements */trait X{} so that i can inherit documentation from traits
 
11:48 AM
Hi humans, animals and other creatures in this chat.
 
@Wes Also, check pastebin.com/aAp1aAKi
 
Wes
I am a panda, Leigh is an ape, @FélixGagnon-Grenier is canadian
6
 
Anonymous
:>
 
@Danack how should I find a job recruiter? just start googling? is there a criteria I should be looking for?
 
@Wes a moose
 
11:54 AM
@Wes Its not that, I am just trying to help. You probably know more about traits than I do. :P
 
I'm a talking stuffed dog
 
that's a dog?
 
no she means irl
 
yup
lol
and I have cats too
 
And I am a Robot Master
 
Wes
11:56 AM
@mega6382 traits are not quite at the same level of parent class and interfaces
 
Wes
they stand in between super types and the class being written, imo
although, that's not necessarily true for documentation
 
the author for php the right way gave a decent argument for using traits in his other book Modern PHP
he said that he was on the one side of the fence where he thought they were useless, until he found a use for them
 
Anonymous
o.O
 
lxr is completely offline while the indexes are rebuilt from scratch
 
Anonymous
11:58 AM
sounds like he tried to sound philosophical but failed
 
@DaveRandom Same problem as last week?
 
Anonymous
I miss cleverbot
 
yes, but I never actually managed to do the rebuild until now
 

« first day (2747 days earlier)      last day (2200 days later) »