« first day (2896 days earlier)      last day (2049 days later) » 

12:20 AM
@bwoebi IMHO Having them all as nullable would be more clear. I also mentioned this before and I mostly agree with him. The difference is only what you expect from those properties, in one case it may be admittedly null so you have to check, in the other case you may not check and blame it on someone else if you ever get an uninitialized prop. But in my head it is only about that expectation as there isn't (and I don't see how there could be) a way to enforce it
So here we try to be helpful in providing 2 different ways to express that expectation, but there is no real difference in how you deal with them from an (perhaps extremely) defensive perspective
 
> Having them all as nullable would be more clear.
But way less useful....right?
 
@Danack If you don't want to trust the class constructor you have to try catch instead of !is_null
 
function foo() : int { return "foobar"; }
I don't trust that function.....but it gives a useful error when run. And then I need to fix the code.
 
@Danack the constructor won't error though, you only get the surprise on read
 
But with the same result - it reports that there is something wrong with the code, and that needs someone to go and edit the code.
Also, ReflectionClass::newInstanceWithoutConstructor says hello.
 
12:33 AM
@Danack yeah, but the same can be said about the prop if it were nullable
@Danack yup, and that's why even throwing on construct wouldn't be enough
also unsetting
 
@pmmaga sorry I don't get that. If I don't want null to be a valid thing for the property, making it nullable introduces stuff I wouldn't want....
 
@Danack but what is the practical difference of null vs uninitialized?
it may also be something that you don't want
 
if the property type says nullable is allowed, it means that null can be set for that property, so I'll need to pull null checks in places. If reading an unitialized value gives an error, I don't need to check if it's been initialized or not, as the engine takes care of that for me....right?
 
@Danack and for instance, I think you could apply the same thinking to interfaces. Imagine that implements doesn't actually check the class and you would only get the error when you try to a call method declared on the interface that isn't present on the class
@Danack yeah, indeed, with nullable you are explicitly saying that null is an option and you expect it
in the other case you are saying that you don't expect it to be uninitialized... but it may be
it is definitely helpful to get the error in that case
 
I agree with that, but where you are depends on where you have been. It's possible to check the implementation implements the interface in the same way. It's not possible to force an object to be initialized in the same way, just because PHP is PHP and doesn't have clearly defined initialization steps for objects.
Also, ircmaxell had an RFC for doing that I think - allowing interface checks at runtime.
> you are saying that you don't expect it to be uninitialized.....
And that if it ever happens, something has gone seriously wrong, and I want the program to shoot itself in the head.
 
12:42 AM
I know, and I agree with that behavior
 
to some extent.. I also don't know what would be a plausible solution to definitely guaranteed types
 
what's that phrase, linking does not imply endorsement ;-)
 
hehe, I actually have something pretty similar to it that I may put up to discussion some time :P
 
Feb 1 '16 at 14:06, by Danack
> There’s a well known joke about a tourist in Ireland who asks one of the locals for directions to Dublin. The Irishman replies: ‘Well sir, if I were you, I wouldn’t start from here’.
 
12:44 AM
:D
 
and on that bombshell, nn.
 
o/
 
1:24 AM
Good morning.
 
2:01 AM
@pmmaga The point is: you ought to not check because it is guaranteed an upstream bug if this error occurs. You MUST not pass a class with uninitialized public properties to unknown contexts.
 
Hi
Quick poll: Has anyone seen a config in which /page-2 with autocomplete to /page-2.php?
 
@pmmaga If we'd enforce a no-unitinialized properties policy after initialization, we're essentially just moving the blow-up to an earlier point in time. It doesn't help anything though - it still is an upstream bug, which isn't really harder to track down than an unexpected null.
Except obviously, these properties are now necessarily nullable and static analysis can't really tell whether it's now intentionally null or not. With the current RFC however static analysis can determine whether something was assigned at all until the first access and directly tell you that in your IDE "no way this has been possibly initialized BUUUG!"
 
2:26 AM
Hello community. First time here. Just have a quick question, is there a native PHP function documented in php.net that throws an exception? I am trying to find an example of one, or determine if it is only written "throw" statements that ever throw an exception.
 
@DarrenFelton wdym?
 
 
1 hour later…
3:35 AM
@tereško Nice! I've wanted to setup my own storage server for a while where I could dump or grab files, books, music, etc.
@Fabor LOL!
 
Mornings
 
@tereško This made me laugh. You've been much more patient as of late.
Night all
 
 
1 hour later…
4:55 AM
o/
 
Wes
morndigj
 
morning @Wes
 
5:18 AM
Hey
1
Q: Send POST Request & Get JSON Response in PHP?

user3467240I'm trying to send a POST request via PHP from AJAX. I checked the API with Postman. It is working fine. But it is not getting executed in PHP. It is not showing up in Network Tab also. I saw a lot of samples for making a POST Request in Stack Overflow & tried it. But I can't figure out where I...

Can anyone help me with this Issue ? I have been stuck on it for 2 days :(
 
5:48 AM
$get_merged_values = array_merge($data['res'],$data['check_res']);
when i print this
print_r($get_merged_values);
it displays the following.

Array ( [0] => Array ( [menu_code] => 2 [menu_name] => Plant [menu_order_no] => 1 )
[1] => Array ( [menu_code] => 3 [menu_name] => Line [menu_order_no] => 2 )
)
But i need to get the values of menu_code and menu_name using $get_merged_values['menu_code'] and
$get_merged_values['menu_name'] respectively, instead of using $get_merged_values[0][menu_code],
$get_merged_values[0][menu_name].
 
 
1 hour later…
7:10 AM
@pmmaga I'm still having a really hard time understanding this.
The part that's really important for me and that it seems to be very hard to get across is that writing catch (Error) is something that should not even be in your possibility space.
It's very hard to take these discussions seriously if people write stuff like "Oh I will have to wrap every property read in try/catch", even though nobody wraps their method calls in try/catch to handle possible TypeErrors.
 
@user3467240 the answer is "just use Guzzle, instead of this native fuckery"
 
It's quite ironic how a web-oriented language has such shitty interfaces for making HTTP requests...
 
7:27 AM
that it is :(
 
7:48 AM
265
Q: Array state will be cached in iOS 12 Safari. Is it a bug or feature?

abelyaoToday I found some problem of Array's value state in the newly released iOS 12 Safari, for example, code like this: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <title>i...

Right, it's official. Safari is the new IE.
 
morns
 
dandle to move (a baby, child, etc.) lightly up and down, as on one's knee or in one's arms.
 
8:12 AM
@GabrielCaruso Why would destructuring syntax have built-in support for type casts?
[$x, $y] = [1, 2]; is $x = 1; $y = 2;. [(int) $x, (float) $y] = ['123', '456']; being $x = (int) '123'; $y = (float) '456'; looks kinda inverted to me.
After all it does not assign to (int) $x. It assigns to $x and applies a type-cast on the other side
 
8:28 AM
@NikiC It is kind of inverted if you think of it this way. However you may also think of it as "assign to $x as if it were declared integer"
 
@bwoebi That would make some sense to me if it were actually declared integer. I.e. typed variables and [int $x] =
Or even not typed variables, just typed array structs
Eh it's getting all mixed up ^^
 
Yeah, that's what I'm referring to
@NikiC so do you have any comment on reviving short closures with =>?
 
heh
you mean apart from the usual ones?
 
Hm?
 
You know, that endless discussion about by-value binding or by-whatever binding
 
8:32 AM
Not sure what you mean with usual ones
Ah well
 
And what about the grammar issues? Which approach would this take?
Scan-ahead in the lexer?
 
Wanted to attempt a pure bison solution
Scan ahead in lexer won't really work with => - if it were an extra token, yes.
I probably have to implement expr => expr in expr rule and change the ast kind in array and yield rules then
@NikiC or do you have a better suggestion?
All other attempt should result in r/r conflicts
because simply specifying a precedence does only work if both expressions are grouped under the same rule - and I doubt we want to duplicate the expr rule there...
 
8:49 AM
@bwoebi I remember trying something like that and running into issues
But I did not try very hard
There's a bit of a mess in that area, partly my fault. When I dropped the parenthesis requirement for yield in php 7 I did something weird with the precedence of =>
 
I see, yield $a => $b takes precedence over []
 
@bwoebi yeah that
Which is really not nice
Especially once yield is going to take precedence over [] but lambdas are not
 
Should have been the opposite
well, maybe. hm.
I'm going to try soon
 
@bwoebi Hm, maybe it would actually work in our favor here
 
I came to the same realization just now
 
9:00 AM
As it makes it so that $a => $b is never split
 
yep
 
@bwoebi reduce-reduce conflicts?
 
@Ekin yes
 
alright
 
@tereško seriously, except for viewing diffs/history and three way merges, the command line is superior to every GUI I've seen … GUIs attempting to implement rebases, commits, messing with staging … ugh
 
@bwoebi you clearly haven't tried magit
 
@FlorianMargaine ... this is emacs and thus text based ... that doesn't count
 
you underestimate how much "text based" can do
especially in emacs
 
9:25 AM
I meant real GUIs with fanciness
@FlorianMargaine oh, I know. But at that point I can just as well use the git cmd directly
 
@bwoebi no, really
 
@bwoebi the CLI for committing specific chunks is a terrifying experience
and that's my primary workflow
 
@tereško uh, really? git commit -p [optional small filelist]
 
@bwoebi he meant chunks, not files
 
I found that quite easy
 
9:28 AM
i.e. git add -p
 
@FlorianMargaine yes, I specified -p
 
ah
uh, the experience with that is pretty terrible really
 
umm, why?
 
try staging a single line in a middle of a paragraph
 
Yeah, for me -p is usually too much bother to be worth it
 
9:29 AM
@FlorianMargaine which, for me, is like never the case
 
git commit -a -m WIP FTW :P
 
magit and other GUIs let you just select a line and stage it
 
@NikiC -am, not -a -m :-P
 
@bwoebi But then you confuse it with --am :P
 
you're not really wasting unnecessary keystrokes on the cmd? :-P
@NikiC Is that a shortcut for --amend?
 
9:31 AM
@bwoebi yeah
 
The man page doesn't tell me about that abbreviation, meh
@FlorianMargaine at least my experience is that when two unrelated things change a same block of code, it usually has also some linewise overlap
 
@bwoebi all I can say is that git add -p is terrible in my experience, and GUIs are great for that
I always end up going back to magit even if I use another editor than emacs
 
re
git gui is great for that
 
Would it make sense to propose importing/aliasing of class static functions/consts?
use static function Example\Foo::bar as baz;
use static const Example\Foo::FOO as FOO_FOO;

baz(FOO_FOO);
 
@brzuchal At least it does not seem entirely unreasonable
 
9:44 AM
There is a caveat to that
 
Static methods might have some tricky issues relating to scope inheritance
 
A static function can access protected and private members of objects of the same class
class Foo {
  private $shh;
  public static function bar() {
    $x = new Foo();
    $x->shh = 'hello'; // no problem
  }
}
Although I don't think it's a very common use-case.
 
Sure you can always write bad code, but this is only aliasing/importing at compile-time
If there are reasons to do that I'll try some experiments and prepare a RFC proposal
 
@MadaraUchiha It is common for operations on two objects instances of the class which do either modify both or none
and obviously, classes with private constructors as you outlined
 
class A {
    public function foo() { $this->x = 123; }
}
use static function A::foo;
class B extends A {
    public function bar() {
        foo(); // Looks like a normal function. In reality it calls A::foo() which will inherit $this and allow it's modification
    }
}
@brzuchal ^-- This is one of the cases I'd be concerned about
I.e. "static" calls which are really scoped instance calls
 
9:49 AM
@NikiC but this is on object method, I meant to alias only static methods / class methods
 
@brzuchal You don't know whether it is a static method or not at compile time
 
AFAIK if you try invoking non-static call in static context you'll get an error, right?
@NikiC yes, that's right, but do you also at compile-time look for aliased/imported functions or consts if they really exists?
 
@brzuchal You can call an instance method using static call notation if it has a compatible scope. In this case it's equivalent to an instance call, but allows explicitly specifying what class you want to call the method on
 
@NikiC The other day I've thought a bit about generic extension methods. Syntax is up for debate, but something like $foo->\baz() - calls the function baz extends Foo () { var_dump($this); }. This could at that point be trivially extended to also include operations on non-object types.
 
@brzuchal No
@bwoebi That looks ... ugly?
 
9:52 AM
It is, hence syntax up for debate :-P
But I came to the conclusion that in PHP we like to explicitly specify the invoked method
otherwise autoloading & Co won't ever work
 
@bwoebi this looks like $foo->{\baz()} - ugly for me also
 
Syntax suggestions are welcome
 
@bwoebi I'm off the topic and dunno what is the thing about, could you elaborate a bit?
 
@bwoebi What would the use-case be?
Extension methods sounds pretty horrible to me
It smells of JavaScript and Ruby
 
@NikiC c# has them too :-P
 
9:56 AM
C# has them in a somewhat more reasonable way at least
 
@NikiC lightweight decoration essentially without having to wrap everything in a custom instance
 
@bwoebi Wouldn't that be better solved by making decoration lightweight?
As in not making decoration wrappers to require unreasonable amounts of boilerplate
 
Wes
@MadaraUchiha sigh
 
@NikiC umm, you still have to wrap the instances of Foo into new FooDecorator($foo) everywhere you are returned a Foo.
 
o/
 
9:59 AM
@bwoebi Yes
 
@NikiC My main point is that you have to explicitly specify the function which is called, so no $foo->bar() and it calls some somewhere registered "bar" function which is hard to track down then
 
@NikiC I had to read and try an example. Yes, you're right, but in reality we do not change any behaviour providing an aliased call, right?
 
but at the calling point in code it must be very obvious that it is an extension method call and what method is called there
Otherwise I'd fully agree with you that it's smelling like js/ruby
 
@brzuchal You don't change any behavior, but you allow things that look like normal function calls to do things they usually couldn't.
Generally if you have a call foo() you can be pretty sure it's not doing anything to your $this
@bwoebi I'm not convinced this is sufficiently useful to warrant both the complexity and the potential abuse it will bring
It seems like a pretty niche feature
And you better not tell Marco about this, otherwise he might actually track down where you live and smother you in your sleep...
 
@NikiC Well, it could replace most trivial decorators - and I these are not that rare - and I think there would be more decoration if it were as trivial as an extension method
 
10:06 AM
@NikiC I understand, so you would advise against it?
 
@NikiC I don't think @Ocramius will be horrified at that...
 
@NikiC albeit A::foo() is not declared static, so this example would (should) give error first.
 
Because the necessity of spamming instantiations of decorators for every instance of something is worse to me
 
@brzuchal I'm not sure. It will make it harder to sell the feature, but it's not necessarily a deal breaker. And of course there's the extra factor that function autoloading would probably be the better solution to the core problem.
 
@bwoebi so this is something like attaching a trait at object lifetime in short, right?
 
10:11 AM
@brzuchal not quite, it won't have state and only protected access
 
@hakre Maybe it should, but it would not ^^
 
@NikiC what about importing/aliasing class constants in a similar way?
 
@brzuchal Sounds reasonable
At least I don't see any obvious issues there
 
cool, thx
 
PDO_OCI getColumnMeta() not implemented – #76908
 
10:21 AM
@bwoebi Exactly, and that possibility in itself is valuable enough to justify having it as proposed. I'm mostly playing devil's advocate here, but I also understand their reasoning of it's not guaranteed so we still need to check t. And this touches the point of @NikiC as well, yes it is an upstream bug and yes, you shouldn't have to care. But... If you are a bit paranoid and you want to be 100% sure you have to check, and yes, it's the same as with type errors
However, unlike what they are saying, I don't see this as an error that we may come to regret further down the road
 
Why data is not passing to server file: $.ajax({
type: "POST",
url: 'pages/alta_usuari_server.php',
data: {
bracalet: bracalet,
tag: tag
},

success: function(data) {
console.log(tag);
console.log(result);
alert(result);
$("#message").html(data);
alert('data has been storeds to database');
}
});
 
if we ever have a way to enforce it, we could still do it
 
@pmmaga Btw, I'm totally sympathetic to having early errors rather than late ones. I just don't see a way how we can reconcile this with the other requirements that we have (to support uninitialized props for lazy initialization etc).
The suggestion to only allow nullable types for now would imho be a disaster, because the resulting effect is not going to be "I'm not going to type this property for now, because non-nullable types are not supported", it's going to be "I'll give this a nullable type even though it isn't, because that's better than no type at all"
 
yeah, it's a balance between being as strict as possible to offer guarantees vs allowing uncertainty for those kind of uses
 
exactly that
 
10:27 AM
If someone actually had a detailed proposal of how to incorporate initialization checks while still satisfying our other requirements, that would be great and that would be something we could discuss
 
@NikiC yeah, very true
 
@NikiC there is a way to call function foo inside a class scope bind to a different scope without using reflection also, it's pretty ugly but possible
class A {
    protected $x = 99;
    public function foo() { $this->x = 123; }
}
function foo() {
    $that = debug_backtrace(true)[1]['object'];
    return Closure::bind(Closure::fromCallable([$that, 'foo']), $that, A::class)();
}
class B extends A {
    protected $x = 100;
    public function bar() {
        // A::foo(); // Looks like a normal function. In reality it calls A::foo() which will inherit $this and allow it's modification
        foo();
        var_dump($this->x);
    }
}
gives 123
 
hi everybody
 
@brzuchal heh
 
most probably a stupid question, but is there any harm in using Doctrine's ArrayCollection and the likes outside of a Doctrine context, e.g. simply to replace arrays in code here and there?
 
10:32 AM
so
does anyone else have a setup, where your workstation has a mounted filesystem for a remote "development server"?
I am wondering, what system are you using for mounting? nfs? sshfs? something else?
 
@tereško I had a few colleagues doing that for a while but they ended up reverting to doing it locally as the performance hit was pretty big (especially when the IDE starts indexing and such) YMMV, but I think good old sync on phpstorm ends up being a better solution
 
@tereško if you really need this choose nfs, because sshfs sucks on this field it's too slow
 
10:52 AM
Can someone give an idea for currency conversion in ecommerce site?
i'm thinking the best way for this.
Calculation thru third party API or local db lookup.
 
@bwoebi why not using similar syntax as C# to extension methods?
namespace Example {
    class MyExtension {
        public static function multiplyBy(this int $value, int $multiplier): int {
            return $value * $multiplier;
        }
    }
}
namespace {
    use extension MyExtension;

    (123)->multiplyBy(2); // 246
}
and additional use extension as C# also use using for this
 
Dunno, I've been repeatedly annoyed at not being able to distinguish what's extension method and what not.
@NikiC github.com/bwoebi/php-src/tree/short_closures_arrow is a port of the old implementation to current master (quite some things changed, it's like a 50% rewrite of the C code) … I'm now looking at the syntax
 
11:16 AM
@brzuchal that's what I am experiencing :(
@pmmaga well, we had a working solution with NFS, but now the admin are migrating the setup to SSHFS and I am experiencing a minor nightmare (let's call it eveningishmare)
 
I feel lucky as I no longer need that but remember it was working like charm and nfs was the only reasonable option
 
I will probably need to start looking at docker :(
 
11:39 AM
@tereško just don't put IO sensitive stuff on it?
 
@bwoebi are you doing to implement type annotation and default value support there?
 
@FlorianMargaine you mean like .git
 
for example.
 
@NikiC the current implementation does not
we may though
 
11:57 AM
@tereško I also use NFS but if all else fails - syncthing works pretty decent, has inotify support and syncs pretty fast
 
12:14 PM
^ that is an option I have been looking at
 
Buenos Dias, Muchachos!
 
\o
 
Buenos dias
 
12:33 PM
@tereško there?
 
@Shafizadeh yes
 
hi every1
does anyone know how to block the empty newline fputcsv adds ? or remove it?
 
@tereško Ok, I've seen your changes .. I see what you've done. thank you .. just there is a not-important typo here in a comment which is understandable
 
heh
@Shafizadeh fixed
 
@PetruLebada If you use SplFileObject there are some flags you can set to handle empty lines in CSVs.
 
12:42 PM
ow very good :-)
 
Any good duplicate candidates for post-redirect-get? stackoverflow.com/questions/52419827/contact-form-go-to-page
 
just one question, I'm not good in git, what's this? are you using another branch?
 
btw, @Shafizadeh, when will you have some time to work on that project?
 
yes, that is another branch
 
12:43 PM
@tereško I'm working on it
 
@MadaraUchiha, nah i'm not using it, i have to fix a bug on script, realquick, but i've found this solution which seems to work: stackoverflow.com/questions/8354384/…
 
@Shafizadeh the reason why I am asking is: you really need to fix the DOCUMENT_ROOT situation in that project
 
I will push a new commit in 1 hour, it contains lots of changes
@tereško what do you mean exactly? currently the DOCUMENT_ROOTis inside /myweb directory ..
 
@Shafizadeh and that same directory contains majority of the source code
 
@PetruLebada that sounds a bit fragile. If you don't want to add a line break, maybe just use fwrite instead of a function designed to write lines
 
12:46 PM
@tereško yes, but php is installed on the server, nothing bad will happened
 
^ famous last words
 
@pmmaga i want a line break, the problem is with the last newline at the end of the file, since fputcsv can't detect that, and my script simply creates a new file for each chunk and then merges them, the result is a big file wit ha lot of lines and after each chunk, an empty line
 
@tereško hahaha ..
also one question else, I've received an email "pull request" from you .. what should I do?
 
@pmmaga and why is it fragile? those 2 lines seems to just cut the last line which in my case is the exact line i want to get rid of
 
@PetruLebada trim the contents before merging then?
 
12:48 PM
Will it be sent automatically or I have to do something specific? @tereško
 
@pmmaga trimming? how?
 
@Shafizadeh so, you actually do not know how git is supposed to be used :D
lemme try to explain in 3 (probably) sentences
 
yes explain it please .. thx :-)
 
@pmmaga i dont think i can do that in my case, since i fopen foreach(){ fputcsv } fclose then merge every file for each chunk, i ll have to refactor a bit and that will take time and since i cant think of any risk using those 2 lines ...
 
12:56 PM
o/
 
so .. you have a problem or a task that has to be made .. what now:

- you create a new branch (from the latest state of the primary development branch, in your case - master) named to describe the intention
- code gets written into that branch, commit get made, sometime even branch gets pushed to shared the repository server (none of that affects the master branch)
- when the task is done, you create a merge request and assign it to someone else for code-review (there is UI for that, usually)
- when the review is done (and all the suggested changes added), that branch gets accepted in the
this way, while you work on a task, the commit from other on your team do not affect you
everyone crates a separate branch, works in that and then integrates it back into the main branch
and, when you create a merge request, the software automatically checks for merge conflicts
 
I see .. neat
 
in case of bitbucket, you do it by pressing the blue "merge" button
 
Anyone got a typed properties build + MySQL quickly test something for me? See if doing a fetch(\PDO::FETCH_CLASS, whatever::class) correctly casts the strings returned by PDO the declared property type
 
@Shafizadeh basically, you (and all your coworkers) should read git-scm.com/book/en/v2/Git-Branching-Branching-Workflows
(what I explained was feature-branch workflow)
 
1:03 PM
@PetruLebada I'm overzealous, but those lines remove the last byte of your file. If you use a different encoding or have an whitespace after the new line or something like that, it won't work anymore
 
@tereško ah .. I will share that link with my teammates
 
@Shafizadeh sorry .. changed the link
 
just did you merge your changes with the branch master ?
@tereško ah ok
 
@Shafizadeh I did not
that what the "merge requests" are for
it's up to you
 
dat?
 
1:06 PM
should be
though, I was using the "merge request" UI (there is a menu item for that in the sidebar)
 
ok .. what's the different between "merge request" and "pull request" ?
 
same thing
bitbucket just calls it merge request
 
^ that
 
ah ok
 
gitlab calls it merge request, github and bitbucket are just wrong :x
 
1:09 PM
when you click on that, you get an interface for code-review
 
also there is no "merge" button when I'm opening it from sidebar
 
@pmmaga Yeah, "pull request" would always confuse me in the beginning. Merge request is way more informative in that sense
 
also, I have the dubious honor of being the first on the make a merge request in that project
 
@tereško oh wow .. there is also a description from you .. great
also, how can I translate the message of the exception you're written? Should I pull your branch on my local ?
and then push a new commit on your branch?
 
@tereško Yeah, people think that just making commits is what source control is all about
 
1:15 PM
ok thx
 
I love these episodes. Another good one! youtube.com/watch?v=ZXyWwirLfcg
 
@Shafizadeh when you scroll down to the file in that UI, you will see three buttons: "Side-by-side diff", "View file" and "Comment". And then there will be a triple-dot button. When you clock on that, you will see a dropdown with "edit" item in it.
 
Recommend the other ones if you enjoy.
 
once you edit the parts that you want, you click save and the UI will ask for you to provide a "commit message"
when you do, the "merge request" will be amended with your additional changes (without affecting the master branch)
 
@StatikStasis If you like webseries, i really recommend after hours
 
1:20 PM
I'll check it out.
 
@Shafizadeh at that point you probably should use the Bitbucket UI to add a comment regarding the translations, that you provided (for purpose of keeping-track of what happened) and decide whether to merge the changes in master or decline
 
https://3v4l.org/ZHfX6

http://rs1373.pbsrc.com/albums/ag382/WedgeP/Gifs/My%20Reaction%20Gifs/its_a_trap_star_wars_zps55397470.gif~c200
 
@StatikStasis If you like webseries, i really recommend after hours
 
@GabrielCaruso fuck HHVM, it's dead and nobody cared to even visit the funeral
 
@tereško can you see the translation?
 
1:22 PM
@tereško My point was about the "useless statments", like {}
 
@GabrielCaruso everything else just seems unnecessary 3v4l.org/ugGsj
 
@Shafizadeh yes, and they also showed up in bitbucket.org/ShafizadehSajad/ltk_share/pull-requests/1/… (and I got an email about it)
 
@tereško yeah .. I did it as a new commit .. I like git :-)
 
@mega6382 Yeap, that's the point. Yesterday we found something like that in our codebase
 
@GabrielCaruso that is not a statement but a block like so 3v4l.org/iQMAM
 
1:23 PM
 
Then I was talking with Ondre from PHPStan if we can have a Rule to detect that and I come up with all this statments
 
@GabrielCaruso {} is just block-definition. Having an empty block is perfectly fine
 
@tereško But having it without context isn't useless? Talking about static analyzes, of course
 
it no more useless than <?php 1; ?>
 
@GabrielCaruso Yes, I suppose thats true, it is kind of useless to have an empty block, and if a tool like phpstan can detect it, it would be great.
the {} block and everything else that you mentioned.
@GabrielCaruso also, it should detect an empty statement(only semi-colon) 3v4l.org/B7tmH
 
1:28 PM
@mega6382 Interesting, one more :)
I let you guys know if we can come up with a Rule in PHPStan for that
 
you are making a dead-code detector?
 
@GabrielCaruso great :)
 
btw, one of those is not like the others. $a = [1, 2, 3]; :P
 
@tereško I use PHPStan (github.com/phpstan/phpstan), and there's no rule to detecting those
@pmmaga Isolationg: 3v4l.org/FZHlU
 
@GabrielCaruso ahh.. [1, 2, 3][1]; :P
 
1:32 PM
@tereško can b e useful, would help remove garbage from code(given that code itself isn't garbage :P)
 
@GabrielCaruso not if $a is an object implementing ArrayAccess and some fucktard decided to change the object's state, when element is being accessed
@mega6382 I usually do that with code coverage in "integration tests"
 
@tereško Gonna write some tests to predicted that scenario, thanks
 
1:49 PM
@tereško What desktop environment you using?
 
@Allenph plasma (because I am too lazy to set up liri)
 

« first day (2896 days earlier)      last day (2049 days later) »