« first day (2609 days earlier)      last day (2344 days later) » 

1:08 AM
> So to side-step that issue we currently only allow inout parameters to be locals, or lvalues accessed only via CoW structures (e.g. $x[1][2][3] but not $x[2]->a[3])
I think $x[1][2] would still suffer from the arrays being realloc'd, right?
 
2:04 AM
Swift does copy in, copy out for inout parameters. They sometimes pass address as an optimization but the behavioral difference is not to be relied on.
C# does not permit object properties to be passed as out parameters.
 
2:31 AM
@LeviMorrison I think we should do copy in, copy out (values of refs and hashtables should be updated whenever a function returns / generator yields)
 
@bwoebi I think we just forbid it on generators.
 
@LeviMorrison why should we? we just have to guard it around yield statements then
 
@bwoebi Firstly I see no value in it. Secondly it a bit of an odd behavior to always be re-assigning the value.
 
@LeviMorrison well… what's the point of out values? basically providing more than one return type
we may want the same with generators
 
Forbidding it does permit it to be added later if necessary.
 
2:36 AM
sure - I just don't consider it problematic to easily add in this patch
 
$x = [];
$a = f(out $x[0]);
// can you give some more detail on how this case works?
Also, because objects have magic properties I'm fairly certain we can't do this on object properties anyway.
 
you mean f(&$x[0])?
(where the first parameter of f is an out param)
 
Whatever we decide, my point is that f is taking that as an out parameter.
According to how the list discussion on call-site references it seems maybe we ought not reuse &.
 
well, for caller side it works exactly like a reference
the magic is within the callee
and the caller having guarantees on type and reference not persisting beyond function end
 
Other tools implement it caller-side, actually.
 
2:39 AM
I mean semantically
i.e. (function(out $f) { /* … */ })(&$var); and (function(&$f) { (function(out $f) { /* … */ })(&$f); })(&$var); are equivalent
 
Maybe semantically but not actually. One important part of out parameters is they will not add to refcounts.
 
The main difference is on the callee where it imposes restrictions when the value reaches the outside world / what the callee can actually read
@LeviMorrison the actually part is an implementation detail (which may leak through timing etc.), but first we need to define how it shall work semantically
your PHP user won't care about the refcount except he's optimizing hot code
 
But I won't do so in terms that involve references because that implies reference counting semantics.
Too confusing.
 
@LeviMorrison whether we actually use references or not internally depends on what works best
I'd actually propose using references for a first poc here
 
My gut right now says copy-in, copy-out and use a different symbol is best. This opens the possibility for a more efficient calling convention in the future but if it shares & it can't do that.
 
2:52 AM
@LeviMorrison I do think the future goes into a direction where most calls are into compile time known (i.e. aot compilation) function bodies anyway, rendering this obsolete.
you are basically talking about omitting a single ZEND_COPY() for out parameters … I'd be surprised if you can get more than 1% gain in a synthetic benchmark (and in real code a much much smaller gain)
@Levi the reason why we need paramaters (unless we only allow simple variables which aren't refs) to be references is to have a container to write to in any case. Otherwise we'll get dangling pointers.
@Levi Also wondering a) shall out parameters at the end of a function signature be implicitly optional (if caller is not interested, instead of passing $dummy, he can just omit it. The callee shall not care whatever the caller is doing with this out param) and b) do we want to allow variadic (in)out parameters?
@LeviMorrison Ultimately I'd like to see this implemented in a way ignoring whether the caller actually specified out/inout/&/nothing in the first place. Shall we decide to move on with out/inout on caller side, then we may optimize afterwards.
 
3:07 AM
Using a separate symbol can move errors from runtime to compile-time. That's important too.
(Been afk, just got back)
@bwoebi No, implicitly optional seems like a likely way to introduce bugs.
@bwoebi If they are "references" as they are now in PHP then that's a no-go from the start. I've said this multiple times.
They must not have reference counting semantics.
If you mean "pointer" semantics then say that.
If you mean "php reference" semantics then say that.
I prefer the & to be explicit for out/inout. If people get confused with PHP 4 call-time pass-by-reference then we use out and inout symbols.
 
@LeviMorrison why not?
I mean something between php reference and pointer
It can't be a mere pointer if we allow foo(&$x[0])
but obviously it shouldn't have fullblown php reference semantics.
consider the following code:
$arr = [];
$copy = (function (out $out) use (&$arr) {
    $out = 1;
    $copy = $arr;
    return $copy;
})(&$arr[0]);
var_dump($copy); // what does $copy contain now?
No matter what you'll decide here, you'll have some people unhappy with either result
At least currently complex values are established before passing the parameter. I.e. $arr[0] is first created and then copied (to have a location to write to). But what will it contain? undef (a reference with an undef val)? null? Access will error out? If yes, what happens on copy?
@Levi I'm calling it a night now, but please think about that snippet of code and tell me what its semantics shall be with a justification.
 
4:10 AM
:40328580 @PeeHaa steam250.com #4
 
mornus
 
Morning @Linus & R11
o/
 
\o
oh that ping i scared :P
 
:D
 
4:26 AM
@bwoebi Will do. Initial feeling is this falls squarely into the semantics outlined by swift; it might be [1] and might be [] but you shouldn't be doing this.
And as you pointed out our existing reference semantics mean [0] exists when the function is called; this is another reason I think a different symbol would be good.
I've never liked that behavior and thought it ought to be an error.
 
 
2 hours later…
6:54 AM
mornings
 
o/
 
hello all
 
morning all
 
how is php doing these days? what are the trends?
 
7:03 AM
!!wotd
 
gleek Archaic. to make a joke; jest.
 
@SaitamaSama pong
 
posted on December 06, 2017

New Cyanide and Happiness Comic

 
7:22 AM
@NimeshkaSrimal php is doing awsome these days . 2 trends release of PHP 7 is a major accomplishment. The language now has a substantial increase in performance with an optimized memory usage
 
moin o/
 
\o
 
user5500750
I haven't used Laravel for a while.
 
user5500750
I wondering whether Laravel latest version has a roles and permissions feature.
 
user5500750
github.com/Zizaco/entrust used to be really big at roles and permissions.
 
user5500750
7:31 AM
Does anyone know which is better between this one: github.com/spatie/laravel-permission
 
user5500750
...and the one above.
 
@user5500750 I dont think anyone uses laravel here
 
user5500750
What does anyone use?
 
user5500750
Is there something better?
 
*is there something worse.
 
7:33 AM
@user5500750 LOL yes
 
user5500750
What do you use for your PHP projects?
 
user5500750
Laravel is big!
 
user5500750
Any PHP developer should know it.
 
Laravel is shit.
 
user5500750
Symfony?
 
user5500750
7:34 AM
In PHP it is big!
 
user5500750
PHP is shit
 
Just because it is popular, doesn't mean it is good.
 
@mega6382 Please don't say like that, dont be rude
@mega6382 I agree
 
user5500750
I use it and I find it to be better than anything in PHP.
 
user5500750
But I prefer Symfony.
 
7:37 AM
Yeah, I hear that alot, but I am yet to see any good reason for that.
 
user5500750
You don't use frameworks in PHP?
 
@user5500750 I am sorry, but if you ask any top notch php developer in the world about laravel, you would hear the same thing
 
Hi team php, do you guys has ever try to make Laravel Valet works with Zend ? It's stipulated to be able to work out of the box but still I got an error while trying to launch it ? Any hint ?
 
@user5500750 Any PHP developer should know to avoid it.
@user5500750 so what else have you tried that you come to this illconceived conclusion?
 
7:54 AM
You European guys have a strange life style (according to what I see in the movies). You leave your paternity home (family) since 18 years old (probably even traveling to another country or city) ..! How do you handle your emotions? Are you rock?
 
@NeelIon I personnaly think SO is the only community where Laravel is being bashed so hard for actually ?? no reasons ?
@Shafizadeh Gnieeee ?
 
@Baldráni lots of reasons. The code is bad and the community is toxic from the top down
 
@Shafizadeh Is the so importent to learn PHP?
 
not related to php
@Baldráni what?
 
@Patrick SO looks like the toxic there.
@Shafizadeh I don't understand where does your sentence comes from
 
7:56 AM
@Shafizadeh We should respect every culture and nation
 
yes
@Baldráni and yes, I'm not good in English, sorry
 
@Patrick and blindly believing and parroting from the bottom up which is kinda ironic given that the top postulates to question everything.
 
I think I've missed something there to understand what you're talking about :/
 
@Baldráni What other frameworks do you have experience with and how long have you been programming?
 
@Shafizadeh you dont need to be good in english. That is not important. Knowing good english doesn't mean someone is super educated
 
7:59 AM
@Gordon sorry I forgot to keep track, did I ever send you that copy?
 
nope. I didnt send an email to you yet
 
@Patrick Symfony and Zend for 4 years now.
@Patrick However I'm more found of Js (sry guys :/) So Laravel and Vue does mix perfectly
 
@Baldráni are you familiar with SOLID and proper OOP?
 
@Patrick As I've just said I'm more of Js :')
(Just joking ofc dont take it literaly PLS)
 
@Shafizadeh I am from Asia, here people also have misconception about European countries, that they do not take care of their children and parents. But that is completely WRONG
 
8:02 AM
morning, everyones
 
@tereško morning
 
@NeelIon obviously thy care of their children. every parent does, even animals :-)
 
morning
 
@tereško Yo!
 
Of course it's wrong we do care about our family ! Simply to be glued to it does not mean especially taking care of them. We have to take hour independance and in case of problem we can just take a quick flight to go back to see our family.
Moreover we mostly are speaking a lot each other on the phone or by mail etc...
 
user5500750
8:05 AM
@Gordon So what is the trend for building PHP websites? What do you use to build websites?
 
user5500750
You use Wordpress?
 
@user5500750 getcomposer.org
and hell no
 
Wordpress is an even bigger devil than Laravel.
 
@user5500750 I dont build websites.
 
user5500750
What do you build?
 
8:07 AM
@mega6382 i disagree. wp doesnt pretend to be something it isnt.
 
user5500750
@Patrick You just start from scratch using composer?
 
I think he's all in mud-cake building
 
@user5500750 Mostly yes
 
@user5500750 Software as a service with Java and C
 
@Gordon But people seems to think it is something other than what it is and that makes it just as much dangerous.
 
8:08 AM
@user5500750 how some of us build projects and how a newbie would do it are two completely different things
 
@mega6382 the wp community seems to be nice in general. I havent met a single wp developer that was obnoxious or as fanboish about wp as the laravelians. actually a lot of the wp devs are apologetic when they are at php confs because a lot of folks look down on them for no reason.
 
@tereško you believe you're an expert?
 
@Shafizadeh define expert
"a person who is very knowledgeable about or skilful in a particular area."
 
@Patrick expert
 
I think he qualifies ;)
 
8:14 AM
@Patrick the one who the websites he builds are completely different things than newbies
 
@Shafizadeh I didn't understand a single word in that sentence.
 
@mega6382 ok nevermind .. :-) I really don't know how can I say what I mean in English
 
user5500750
@Patrick What sort of components or packages do you use in your composer projects?
 
user5500750
...from Git
 
see, you dont even know the difference between git and github…
 
user5500750
8:18 AM
I have actually not tried building from scratch using composer.
 
user5500750
...but I can imagine that's a lot of work!
 
user5500750
For a very large scale project.
 
user5500750
...MVC project.
 
Writing any good program is hard work. But it gets easier in the long run, if you can maintain a good overall structure.
 
user5500750
You use MVC?
 
8:20 AM
@user5500750 no. What is MVC? Can you explain that to us?
 
we use Separation of Concerns
 
user5500750
I can't believe no one here is taking PHP frameworks seriously
 
@Gordon That video is so funny
 
@NeelIon it is :)
 
8:21 AM
@user5500750 how is MVC related to frameworks?
 
user5500750
Wow!
 
user5500750
@Patrick Have you used Laravel or Symfony before?
 
@user5500750 yes, both
Using Symfony at work
 
user5500750
Which is your best template engine?
 
8:23 AM
I have used Symfony, Laravel, Zend, Kohana, CodeIgniter, Cake, Fuel, Yii ... and some that I have probably forgottern
 
user5500750
Which template engine would you use if you're to use Composer?
 
I usually use twig, no complaints
 
@tereško which one was the worst? Yii?
yii1?
 
@tereško wow, such much abuse you've been through. it surely helps to understand why you are the way you are. thanks for sharing.
4
 
@tereško LOLOLOLOLOL
 
8:24 AM
Yii and Cake where the most painful to work with
 
@user5500750 the problem is that frameworks want you to couple your application code to them. If you only use them as glue between the web and the application then they are fine. But then it also doesn't matter which one you use, they all do the same boring job.
 
But beyond how the frameworks are ugly, much devs also really do even nastier stuff on top of it
 
CodeIgniter and Kohana were bad, but they were small enough , that you could work around their issues
 
M-J
Hi everyone, I have a simple question
What's wrong with this?
$message = "You're Already Logged In. " . "<a href='home.php'>Visit Home Page</a> or <a href='logout.php'>Log Out</a>"."$_SESSION['email']";
 
mornin
 
8:26 AM
what error are you seeing?
 
the qoutes around $_SESSION ...
 
@M-J the quotes at the end obviously. though I wouldnt know why you would add that piece of information there anyway
 
M-J
The problem is that I should remove the double quotations around $_SESSION['email']
 
yes, is it a trick question?
 
M-J
but I thought we could use them and put PHP variables inside them
 
8:27 AM
Havent you even tried doing that before asking?
 
M-J
@RonniSkansing I tried that and it worked
but I want to know the reason
 
user5500750
@Patrick So Codeigniter vs Laravel vs Symfony vs Zend you would use Codeigniter
 
@user5500750 what is wrong with you? no
 
@M-J its because array indexes cant be accessed like that
 
@M-J all the simple variables can be used directly, but 'complicated' syntax needs {} for wrapping "foo bar {$arr['key']} foo bar"
 
user5500750
8:28 AM
The tutorial you sent is very close to what Codeigniter offers.
 
user5500750
HTML code in PHP code.
 
@user5500750 you clearly have no idea what you are talking about
 
@Patrick you created a monster!!!
 
M-J
Oooh, that's a good point! Thank you guys.
 
@Patrick he needs like a great php book
 
8:29 AM
@RonniSkansing yes, but for beginners
 
@tereško you should write one. seriously
 
@M-J You can use it like this:

$message = "$_SESSION[email]";
Or
$message = "{$_SESSION['email']}";

Look into complex curly syntax http://php.net/manual/en/language.types.string.php
 
would also probably be a nice side income with your cost of living
 
@tereško let's write "99 problems… solved with PHP" and put 99 of the most common problems with solutions into it.
 
chapter 1: header already sent
@Patrick for now all my free time goes in "probably commercial" side-project, and then I need to make 2.0 for palladium
after that it will be probably spring already
 
8:31 AM
I'd start more basic.
 
M-J
@mega6382 Wowww why is the first one working at all ?!?! oO :D
 
Chapter 1: how to handle strings
 
M-J
@mega6382 Thanks.
 
Reading the starred messages in the morning regularly gives a weird sense of what went on in room11 the last bunch of hours.. today is one of those days.
 
I'm imagining a good cop/bad cop book with 2 authors. One of them tereško. That would be brilliant
 
8:32 AM
@mega6382 that's terrible advice and would produce warnings
 
M-J
@tereško Then I unthank you mega6382 (just kidding) :)))
 
@tereško I am just saying it possible to use it like that, but you are right it is not ideal. But that's PHP for you (Not ideal).
 
@M-J btw, if you are using double quotes, you do not need to separate that string in separate concatenated segments
 
On a side note: I am currently reading K&R's The C Programming language from 1978. So far it's a very very very easy read and the examples are completely basic stuff. But it already has all the suggestions to remove magic numbers and write readable code and so on (which they dont do btw. vars are all named c, nc, nw and so on…) but I enjoy it a lot. I could imagine modeling a PHP beginners book after that.
 
M-J
@tereško Yes, you're right. I just wanted to find a way to ask it.
 
user5500750
8:38 AM
Books are useless these days
 
hmm ...
 
user5500750
It is probably best to just get into the coding and reading the official documents.
 
@user5500750 that attitude is why people nowadays believe laravel is hot shit
 
user5500750
When I started programming I used a lot of ebooks.
 
@user5500750 Yeah, your mama must be so proud of you.
 
user5500750
8:39 AM
But I have bought some books.
 
user5500750
...including the famous PHP, Java and C++ books.
 
user5500750
..can't remember the full titles but you probably know them.
 
there are no famous php books
 
clean code?
 
user5500750
There is a famous PHP book.
 
user5500750
8:40 AM
At least 2.
 
@Gordon thinking about writing one?
 
user5500750
About 10 years ago.
 
@Patrick for the longest time…
 
@user5500750 so... before PHP had OOP?
@Gordon what's holding you back?
 
@Patrick time, money, family, imposter syndrome, … - pick some
 
user5500750
8:42 AM
I can't remember the title but it came out in series.
 
user5500750
I think the last one was the third release.
 
@user5500750 do you remember the movie Constipation?
 
@Gordon I made almost all my progress by writing only 30mins each day (before work on the train). That's the only way I got anything done.
 
@Patrick I commute by car
 
@kelunik so... I have something like:
$response->setCookie(
    "username",
     $params->get("username"),
     [
         "Path" => '/'
     ]
);
 
8:45 AM
@Gordon on my homeoffice days I just got up 30 mins earlier. If you can carve out 30mins somewhere you can do it
Then it's all about making writing a habit
 
yeah, I tend to read or watch youtube whole commuting
 
@Patrick I guess the main thing holding me back is the small ROI writing books has
 
but... the cookie doesn't get set :/
 
all the guys I know that did write a php book told me the money isnt worth it. its just for the reputation.
@Patrick I still dont believe this is true.
 
8:47 AM
now mine is definitely not doing that well (my reach is much smaller). But it's doing alright I guess
@Gordon why not?
 
@Gordon Write a blog, turn blog in to book. Job done.
 
numbers seem to add up (list size vs money) when I compare it to mine
 
Maybe I will just turn lamephp.com in to a blog and ask R11ers to write posts for it with markdown.
 
@Patrick because all the folks I know that have written books never told a story like this.
 
@SaitamaSama I am hungry, send all those cookies to me please...
 
user5500750
8:49 AM
You're going to write a PHP book?
 
@Gordon That's because Adam was following the blueprint from the Authority Book by Nathan Barry (I've read it too, but was too lazy to market properly...). And that one is inspired by what the big boys do with their product launches
 
@Gordon It's 1 for the money, 2 for the time.
 
Haven't seen other PHP authors follow that at all. They just seem to put a book out there and hope for the best
 
@SaitamaSama I really look like that
 
8:50 AM
nm I had the quote wrong
 
Big reason why I think R11 should get a wider reach. More blogs, more books. Then we can crosspromote.
 
one for the trouble*
 
(Laravel is doing that part really well...)
@Gordon how much money would you want to make it worthwile?
 
@NeelIon well... I find that hard to believe... :P
 
@SaitamaSama trust me LOL
 
@Patrick I know everyone from the thephpcc and I know the Qafoo guys plus a couple other known book authors. they all tell the same story. its for reputation, not money. plus I've been offered multiple book deals already and the money was never even close to the purported figures in the blog post. But granted, things might be different when you self publish and have a lot of marketing.
 
@Gordon yeah you have to self publish from what I've heard. Otherwise you might get 5k and that's it, even if it sells well
How much did those guys make?
 
About tree fiddy
 
Their marketing must be really bad because I have no idea that they even write books...
 
wrote*
 
8:55 AM
@Patrick IDK the exact numbers. But PHP books in general dont seem to sell so well. And they all assured me that the effort far outweighs the revenue.
 
Just put Laravel on the book title.
 
@Fabor LOLOLOLOLOLOLOLOL
 
We will see how mine does I guess :)
 
Then use Daniel's photo to get the female and 40% of the male market
 
But I need to get better at that marketing thing
 
8:57 AM
40% is a low-ball
 
Anonymous
!!wotd
 
@Patrick I guess that's why the thephpcc recently founded a publishing company. to self publish. But we could ask @sbergmann the next time he's around.
 
3 messages moved to Trash
 
@Gordon but as cheesy as it sounds, it wrote to book to give some value back to the world. I wanted to create something instead of just consuming stuff. Everything else is just a bonus
 
I'd read @Gordon's book. What other reason do you need?
 
Anonymous
8:59 AM
I wouldn't read @Gordon book
 
I'll read @Gordon's book and recommend it to my email list ;)
 
I'll read @Gordon's book, then print hard copies and start selling locally. :)
 
@Ocramius should also write something. But I guess he's just too lazy/busy :D
 
!!dad
 
Did you hear about the followup to the database movie? It's a really great SQL
 
9:06 AM
@Jeeves Hmmm... I read that as "Ess Queue Elle".
 
@jjok I don't know. I'm a computer.
 
@Gordon I think a good line of books could be "<language> for PHP programmers", to help people move to something sane
shop.oreilly.com/product/0636920023982.do like this but for languages that are good
 
@Patrick well, look at my SO profile… Impact ~18.6m people reached. I guess I did some fair share of giving back.
@Fabor I'd probably add dad jokes to lighten it up
 
Grats on the book @Patrick. I enjoyed your example chapter.
 
@Gordon Ah the real motivation shows itself.
 
9:17 AM
@mega6382 you might have bigger revenue selling toilet paper. at least that's something people need frequently ;)
@samayo smart!
 
@DaveRandom Can I add personal projects to the r11 lxr?
 
define "personal"?
i.e. is it a reasonably useful oss project?
I mean really you can add whatever you want to it, I don't particularly care, it's a communal resource
 
Thinking about adding github.com/riebl/vanetza, probably not useful to others.
 
kelunik did you have a look? ^^
 
9:41 AM
\o
 
o/
 
o/
 
\o
 
o/
 
9:48 AM
The server requested authentication method unknown to the client [dialog] – #75645
 
@Jeeves Very bad timing.
 
@mega6382 Wow that was a weird joke.
 
Nov 28 at 12:43, by SaitamaSama
Jul 29 at 17:00, by Kaori
24 hours ago, by Kaori
Jul 25 at 13:13, by Kaori
Jan 25 at 9:38, by Trucy
1 min ago, by Gordon
51 secs ago, by Joe Watkins
21 secs ago, by Dejan Marjanovic
C-C-C-COMBO BREAKER
 
@Wes CSS halp plz if you have a few minutes at some point
or anyone I guess
 
What kind of help?
 
9:57 AM
@DaveRandom shoot
 
Wes
@DaveRandom \o
 
<section>
  <div>1</div>
  <div>2</div>
  <div>3</div>
  <div>4</div>
</section>
Given that HTML structure which cannot be modified...
can I, in CSS only, wrap the first 2 divs in a psuedo element and give it a background colour?
I don't want to give the divs themselves a background colour
 
Wes
it depends on their size
 

« first day (2609 days earlier)      last day (2344 days later) »