« first day (2259 days earlier)   

12:01 AM
We at least warn in common cases now (instead of E_STRICT)
 
@LeviMorrison Googled it, could not find it.
@LeviMorrison Well, on these I agree that tehy warn/error
 
Your example also warns/is strict.
 
My example doesn't warn
@Levi note that in my example I just remove the arg
 
I just copied it to 3v4l and reformatted: 3v4l.org/niLjI
/afk for a bit
 
oh, php -r … it's using 5.5 (not master)
@LeviMorrison why does that one even warn/error?
I mean, it's not a LSP violation as per PHP standards?
 
12:19 AM
IMO it should be.
I want to unify internal and userland functions and passing too many is a mistake.
(side with internals, not userland)
 
@LeviMorrison I strongly disagree
More often than a too-many-args helped, I had to wrap the callable in a dummy Closure because it was an internal function
 
strlen($a, $b) <- what's that supposed to even mean?
 
this, nothing
 
It's an error, clearly, and passing it to a higher order function which will call it with 2 parameters is no different.
 
$cb = "strlen";
$cb($a, $b); // I pass my callable two args. Caller decides it just needs to return length of first arg and passes strlen
I am okay with warning on direct calls, but disagree with warning on dynamic calls
I'm pretty sure you'll break so many callbacks then, if you'd enforce it.
 
12:28 AM
Yes. That is the whole point.
 
huh?
Why … would you want that.
 
You think most of the time people do this intentionally?
 
Yes.
 
Strongly disagree there.
 
Because they do not care about these args.
 
12:29 AM
Not caring about args is how you have errors.
It shoudl be explicit, 100%.
 
I explicitly do not care about that arg by omitting it
 
The code is no different in that case than doing it accidentally, which is my point.
If you do not care the code should explicitly reflect it, not implicitly just ignore it.
 
3 mins ago, by bwoebi
I am okay with warning on direct calls, but disagree with warning on dynamic calls
 
That's not explicit.
strlen($a, $b) shoudl have the same semantics as ('strlen)($a,$b) or $unique_var_1 = 'strlen'; $unique_var_1($a, $b).
 
@LeviMorrison In that case I prefer no warnings/errors at all
 
12:32 AM
There's nothing about a function boundary that changes any of that, especially because if you implement the semantics you are talking about then in-lining will be broken for them.
And inlining is critical for future performance improvements.
 
because the benefit in the dynamic case is vastly superior to rarely catching accidentally too many passed arguments.
@LeviMorrison how does that affect inlining?
 
After inlining it is equivalent to the last case.
 
oh, you mean constant variable value propagation?
 
No, I mean inlining.
The cases above are about constant propagation, yes.
But once you inline it is equivalent to the variable assignment and then calling it.
 
Yeah, in that case we should remove the too-many-args from internals
 
12:36 AM
I don't know why you'd want PHP to be any sloppier than it already is.
 
Because it's worth the dynamics we gain?
 
Masking errors? No way.
We have enough of that already with type juggling.
 
We mask 10% errors for 90% more potential … sounds like a benefit
 
@sliver :D no worries, take your time. I am doing my part for the research anyways
 
@Levi I think we two won't agree on this…
 
1:07 AM
Hey all, First time on here this evening. Hope everyone is well. Just wondering if anyone is clued up on the Walker Classes? I have been following a YouTube tutorial and as soon as I get to the stage, as outlined in the link, my drop down menus disappear: gist.github.com/wanttolearnnow/968ec6c3ab72ae9471daaf76fd010257
 
 
2 hours later…
2:55 AM
@bwoebi Can you see any opposition to truly nested multiline comments?
 
Hello guys... I have been trying to figure out why this deserialization fails:
ini_set('session.serialize_handler', 'php_binary');
session_start();
$sess = "\x1xi:1;\x2y";
session_decode($sess);
No one seems to know why.
 
It's annoying ^_^
 
It returns "session_decode(): Failed to decode session object. Session has been destroyed"
 
3:32 AM
No, here it is https://github.com/marlocorridor/tracker and i followed https://getcomposer.org/doc/05-repositories.md#vcs and installed the "fix" successfully. but another error occured.
I'm puzzled because, using the old version, and changing the code on the library manually, an error would not occur.
 
4:00 AM
Morning \o/
 
 
1 hour later…
5:18 AM
Morning
!!rebecca
 
@Linus Happy Prebeccaday!
 
6:04 AM
hi all, we have lot of pdf plugins as mentioned here , but is there any other easy way to download php page as in pdf format ? because i am really facing lot of difficulties when i am trying with tcpdf......
can we use something like PhantomJS. ?
 
Wes
morning
 
6:52 AM
@abcd you need to use FPDF Library at all
 
how can you pass an array through an html form checklist. I am trying <input type = 'checkbox' name = 'array[]' value = '$value'>... but I keep getting the err of I have an undefined index and its not showing up in the URL
 
moin
 
@TravisHallet name='yourcheckboxname[]' , try to readjust it
 
@FélixGagnon-Grenier Hi there!
 
7:03 AM
oh hi!
 
@TetrixUser I'm getting this in the url do you know why?
services%5B%5D=Basic+Service&services%5B%5D=Shrub+Trimming
instead of services[]
 
@FélixGagnon-Grenier I didn't see you. I just want to say hi. Actually, I wanted to ask you about my little issue with session_decode, but I think it is bit late here.
 
@TetrixUser thanks , that is pdf plugin , i need to install through composer and i need to try right ? is there any other option other than using pdf plugin ?
@Patrick thanks , that is pdf plugin , i need to install through composer and i need to try right ? is there any other option other than using pdf plugin ?
 
@RobertSmith same here. I am literally in bed. talk laters!
 
@FélixGagnon-Grenier Me too. Maybe tomorrow. Bye!
 
7:09 AM
@abcd you are repeating yourself... and are you not already using composer?
 
@Patrick no, i didt know proper procedure to install .... please guide me.....
 
really nead help here on something that I think is simple please
and thank you
lol
 
@abcd rtfm
 
well I have a form with a method get. and I'm trying to pass multiple checkboxes under the same name. my code that makes the check boxes is <input type = 'checkbox' name = 'services[]' value = '$service'> and the URL for my checkbox array var is coming out to this services%5B%5D=Basic+Service&services%5B%5D=Shrub+Trimming
 
7:49 AM
@bwoebi What's the difference between $callback($arg) and call_user_func($callback, $arg) again?
 
8:08 AM
is $callback a function in a variable? @kelunik
 
@TravisHallet Might also be an array.
 
Morngin
 
\o
 
o/ mornin
 
mooorning!
the final day for me this year \o/
 
8:20 AM
'nin
 
@Naruto Oooooh just shut up
:P
 
huehuehue, from tomorrow, you can find me in London ^^
 
@TravisHallet So any valid callable.
 
@kelunik wouldn't an array be like array[arg];
 
8:36 AM
@kelunik oh I see
@kelunik so $callback($arg) would just be the value in the array and call_user_function ($callback, $arg) would be your call to the function
 
@TravisHallet Both call the function, but I think there were subtle differences.
 
8:52 AM
hmm
 
9:07 AM
\o moin
 
morning
 
@Leigh sigh
Mornin
 
aloha
 
Half day here, then I get to be ill in peace over the holidays
 
Got something fun?
We've had gastroenteritis at our flat \o/
 
9:17 AM
Eek, think we've just got the bog standard cold
 
moin
 
dead throat, dry coughs, light hurts the eyes, etc.
 
@Sean I have a 5yo with chicken pox \o/
 
morning
 
@Sean so typical to be ill when you finally have holidays :P
 
9:42 AM
@DaveRandom Eek! The silver lining is that at least they have it now rather than later on in life ^^
@Naruto Happened last year too, right over xmas and birthday, was not fun :<
 
@Sean getting your vitamin d? I I get much less sick since taking vitamin d during the winter (and mood improved too)
 
@DaveRandom Any crones declared a pox on your family lately?
 
@Sean indeed
 
@Patrick Isn't D from sunlight?
Tried going outside?
 
@Leigh Only the usual witches and hags, not seen any crones in the last few weeks
 
9:49 AM
@Leigh impossible to get enough during the winter in switzerland, even if you spend the whole day outside (which I definitely don't)
And I'm usually covered up... If you go sunbathing when it is -5, much respect :D
 
I like the cold
 
10:05 AM
@Leigh go to serbia ... it's the most spiteful kind of cold I've ever felt ... pretty place, but horribly cold ...
 
Did you have a good time?
 
soon as you step outside it feels like being stabbed all over, especially when night time ...
yes, very ... will be going again, but in summer next time ...
 
:)
Did you take the kids?
 
no, unfortunately couldn't
 
aw, sucks, kids deserve spiteful cold, builds character ;)
I mean... they deserve to see beautiful places ...
 
10:07 AM
hehe
 
@tereško Have you read the latest legendary moonlight sculptor?
 
!!wotd
 
plonk: inferior or cheap wine.
 
@MadaraUchiha I think I have
 
@tereško With sword noob 1-5 :P
 
10:12 AM
yes
:D
 
That cracked me up while at work, lol
 
it was slightly hilarious
 
@Jimbo Sorry I couldn't find that page.
 
!!urban plonker
 
10:25 AM
[ plonker ] dope, idiot, moron, wally, pillock, dunderhead, dimwit
 
who fancies themselves a bit of a unicode expert ?
 
Anyone who uses Doctrine's inheritance stuff -- I have yet to find something that doesn't massively violate LSP when using it. Seeing as I'll have to be checking, in-code, whether it's of this type or the other, and if I don't do that then I might as well just put them in the same DB table.
 
hello i need help
 
@JoeWatkins just a teency wheency bit
 
I'm gonna do a podcast, there's going to be unicode questions, mind checking my explanations ?
 
10:31 AM
@JoeWatkins Ooh can we have a shoutout to room 11? Can I call in?
 
haha, I think you can't call in ...
 
@JoeWatkins sure, share it with everyone here, I think Bob and Nikita will want to look at it
 
it's in an hour
 
@JoeWatkins Just answer every question alternately with "everything is awful" and "everything is broken", those are known correct explanations of everything about the internet.
 
1) Difference between charset and encoding: charset is the range or set of characters that are supported. Encoding defines how chars are stored in memory (their internal numeric representation)
2) What is unicode? unicode assigns unique numbers for all characters that do not change with lang/platform/os
 
10:34 AM
@Jimbo Doctrine's inheritance does put your entities in the same table
 
3) Difference between utf-8 and iso8559-1: UTF-8 is multibyte encoding - can accommodate characters that do not fit into the single byte that iso8559-1 can represent.
 
8859-1
 
yes
 
@nikita2206 It doesn't, it puts it into separate ones? That's the point, otherwise might as well just do single table inheritance myself with a load of nulls
 
@JoeWatkins A character set is a range or set of characters and a map of those characters to code points. An encoding is the binary format for representing those code points for storage or transmission. A code point is simply an integer than represents the point in the character set where a character resides.
 
10:36 AM
@JoeWatkins Wasn't sure whether I had to say it considering you typo-ed twice :)
 
was lazy copy, it's latin-1 in my head
 
:)
 
@JoeWatkins "Encoding defines how chars are stored in memory" - that is probably the most interesting thing about the relation between Unicode charset and UTF-8, would elaborate about it in the video? Specifically how UTF-8 encodes codepoints and still maintains compatibility with ASCII
 
@JoeWatkins Unicode assigns characters from the UCS to code points, creating a standard mapping that does not change...
 
@JoeWatkins ma̛̗͍̞y̙̳b̫̲̭̫̣̜͟e̼̪͇͍͕ ͇̩̭͖͇a͕̕d̜d͇̫̪ͅ ̣͉̲a͔̱̤͟n̵ ̲̳̞̞̲e̮̙̬̗̼͠x͈͚̝͟a̹̝̭͢m̮͚͎̯̬͙͚p̯l̳͔͚̫̙̫͜e̲̬̜̥̰͘ͅ?͝
 
10:39 AM
@nikita2206 it just leaves the first 127 chars as they are, single bytes, right ?
or is it 255, or 256, or 128 ...
I fucking hate talking about this stuff
 
@Jimbo yeah, I was not very specific, it depends on what type of inheritance you use
 
@JoeWatkins Things start to get muddy here. iso-8859 is a set of single byte encodings that represent different code point maps from a larger character set.
 
hi
can anyone help me out validating this
 
@JoeWatkins It's the lower 128, i.e. the ASCII table
 
@AbdulWaheed That looks an awfully lot like javascript :P
 
10:41 AM
When the highest order bit of the first byte is set, it indicates that it is a multi-byte character
 
in JavaScript, 3 mins ago, by Madara Uchiha
@AbdulWaheed Have you tried searching for something like "checkbox at least one checked"?
in JavaScript, 3 mins ago, by Madara Uchiha
There are dozens of solutions out there already.
 
can u suggest link
 
@DaveRandom I didn't know that ...
 
i have tried alot
 
There is then a couple of bits which define how many bytes, and a bit reservoir for some data bits
 
10:41 AM
@AbdulWaheed link
 
literally any of you would be better at this than me ...
I'd like to take you with me ...
 
@DaveRandom Huh?
How does that work with the dozens of 256 character charsets?
 
@MadaraUchiha Specifically talking about UTF-8
 
@JoeWatkins Here's a thing that will help you a lot, and you can probably do it in less than an hour - write an encode/decode routine for UTF-8 chars to codepoints
I have one somewhere on SO actually, moment let me fiind it
 
10:43 AM
I now have 45 minutes
 
@JoeWatkins wikipedia explanation about it is very very good en.wikipedia.org/wiki/UTF-8#Description
 
do any of you have time to come do the podcast with me, if I can arrange it ?
 
Not me, sorry, am at work and don't have the equipment or time :-(
However if you get asked anything you can't answer you could try stalling for time and relaying the question here
 
Same here, sorry Joe
 
10:48 AM
worth a shot ...
can someone do a succint explanation of what a unit is and what a code point is, that doesn't require complex lanugage (it's a beginners/for-everyone kind of podcast)
it's pretty difficult
when you can use tables and diagrams it's easy to understand ... maybe this would be better as a screencast ...
 
@Jimbo so how the LSP is violated here? By if ($entity instanceof B) kind of checking? Usually you don't need to have a check like this, unless it's a code that routes to the other piece of code that is more entity-specific...
 
OK so here are my definitions of various terms:
- A *character set* is a slightly abstract concept - it's just a set of characters, things with names, such as letters or numbers or punctuation or accents. This is what the UCS is.
- A *character map* is a basically an array. It maps array indices ("code points") to characters in the character set. It does not necessarily contain every character in the set. This is what Unicode is.
- A *code point* is an integer, representing one of the array indices of a character map.
In Unicode there is a clear distinction between these 4 things, in other formats the encoding is directly tied to the character map (ISO-8859-X).
 
hi
 
However there is still a separation between the character map and the character set in ISO-8859, which is why there are variants (ISO-8859-1, ISO-8859-2 etc)
 

« first day (2259 days earlier)