« first day (3660 days earlier)      last day (1271 days later) » 
00:00 - 23:0023:00 - 00:00

12:03 AM
 
Jpv
@Danack oh, no no.. never use goto
 
Though fashion being what it is, you could also wrap the stuff that needs to be done, and do 'return doStuff();'
@Jpv ...goto is fine in PHP. It's only too much of a pain in languages where you need to manually free memory.
 
Jpv
yeah, im thinking to have an array with my exceptions, and just call the array with key instead of typing out every exception...
 
WAT?
...that sounds weird.
 
Why... would you have to type out every exception? What?
You'd have to type it anyway when it's thrown
If you used an array, how are you going to keep track of which exception is which?
 
Jpv
12:11 AM
correction.. the messages im outputing on my exceptions
 
That doesn't improve clarity
 
class FooException extends \Exception
{
   public static urlFetchTimeoutHappened(string $url)
   {
       return new self("A timeout happened when fetching the url [$url]");
   }
}
@Jpv I have a suspicion that might be better.
 
Jpv
ahhh .. extend Exception, ahhh and I can simply input an error id
 
well, maybe an id, but better just to give the details in the string and a specific type of exception for each type of exceptional problem.
 
 
2 hours later…
Wes
2:01 AM
back to amphp stuff again and jesus christ i hate use() so much
someone is trying to implement multiline fn(), but that's pointless without lexical scope
can we haz this pls @NikiC you were ok with the idea iirc

var $foo = new Foo();
fn () => {
    $foo->doSomething();
}
 
 
2 hours later…
4:07 AM
Yeah, the call(function () use (…) { … }); boilerplate sucks so much. I can't wait to be done with it.
 
Wes
:( you mean with await/async/fiber, or lexical scope?
 
Wes
4:24 AM
i mean are there any ways to solve that apart lexical scope?
 
 
2 hours later…
6:06 AM
Tanmjw ・ *General Issues ・ #80273
 
6:35 AM
Simple addition and subtraction, but the result is messy. ・ Math related ・ #80274
 
Wes
6:46 AM
still bad at naming int $solveMaxCallsPerProcessBeforeMovingToAnotherProcess
 
int $m
 
Wes
the java way
dunno if it's for everybody, but i have the impression that java programmers use one letter variable names a lot :P probably because they have extra long type declarations
 
7:02 AM
for golang as well. Especially for local variables I use single-letters everywhere
 
Wes
local variables are acceptable :P but depends on the complexity of the function
 
7:26 AM
@Wes Someone recently brought this up on the mailing list
The reception was surprisingly negative
 
Wes
does it really surprise you? every time i ever mentioned it people are like, you stupid idiot, put variables in an array and just use($array) because that's clearly the correct way to do it @NikiC
 
@Wes Oh really? I haven't heard that particular excuse yet
 
Wes
i always get blanket statements like "if you use() more than 3 variables you are doing something wrong"
that's a classic, did you hear that one? :D
if i were doing it, i would avoid declaration of variables in the global scope. so like
<?php
var $foo = 123; // error

function baz(){ // named or closure
    var $qux; // ok
}
and i would prevent scope to be accessed to other files.

function bar(){
    var $foo = 123;
    return function(){
        require(__DIR__ . "/file.php"); // this file can't see $foo
    };
}
 
morns
yo @Wes I think you should make a t-shirt design for R11's 10th birthday!
 
Wes
sharing the lexical scope between multiple files seems a great way to make a mess out of the feature, so i'd rather not have it
also probably makes people worrying about that kind of issue content
@mega6382 it's like the universe is telling me quit your job do t-shirts
actually had requests to design face masks
 
7:47 AM
lol
 
 
2 hours later…
9:25 AM
@Girgias Would you like to talk about the Octal thing for the podcast?
 
@Derick you sound like one of those Jehovah Witnesses knocking on doors "would you like to talk about our Lord and Savior Jesus?"
3
 
opcache.jit crashes with some values ・ JIT ・ #80275
 
@FlorianMargaine :-þ
 
 
1 hour later…
10:34 AM
Happy Friday
 
it's not sunny today
 
@Derick Sure! Don't know how much content there is actually to talk about tho
 
10:51 AM
as a devops question, the document-root of my website currently is located here: /var/www/html/mywebsite/public (which contains an index.php file)
that's what all do .. I want to know, is that secure enough? isn't there any practice which increases the security of that?
 
11:09 AM
it's fine as long as the permissions are good the path doesn't really matter
 
ah ok thx
 
@Sjon shouldn't the front controller be in a separate folder as the rest of the code?
 
@Tiffany I agree - my application is always outside of the docroot but I still have a smalll dispatcher in my public/index.php. I assumed @Shafizadeh does that too?
it kind of depends now you configure your webserver ofcourse
 
you mean like this?

- /var/www/html/public -- frontend
- /var/www/html/mywebsite -- contains an index.php for the backend
 
11:25 AM
I always use /srv/http/example.com as a base, but /var/www/html works fine for a single website. Under that I have a public_html which is the docroot and contains an index.php. All the other PHP files are in another folder, eg library or the name of the app
for example wordpress would be deployed under /srv/http/domain.com/wordpress/ with /srv/http/domain.com/public_html containing the index.php and all static content
 
12:08 PM
@Girgias Enough, I'll make you explain how octal works too ;-)
@Girgias When would work? The 2nd at 14:00 ?
 
@Derick did you mean 016:00?
 
I see .. thanks for your explanations
 
@Derick That should work, unless Imperial decided to slap a metting out of nowhere onto that timeslot
 
1:05 PM
Morning
 
1:53 PM
Please take a look at the comment on this method:
/**
 * Get a JWT via given credentials.
 *
 * @return \Illuminate\Http\JsonResponse
 */
public function login()
{
that method actually gets given credentials and gives a valid jwt token for the user
so, why the comment says "Get a JWT" ?
 
Comments are hard.
 
yea :-) .. you know, "JWT" is not even a getable thing .. it's an issuable thing
 
That comment is not needed at all :D
But the function sucks.
 
2:25 PM
@Girgias Cool, I'll shoot you an email then
 
(PATTERN_ORDER) Dupl named groups (?J) prefer last alternative even not matched ・ PCRE related ・ #80276
 
2:38 PM
parse_url & parse_str problems with values with percentage ・ *General Issues ・ #80277
 
2:53 PM
I'm reading the grumpy programmers guide to testing PHP applications.
 
3:04 PM
Well hellow friday room 11
 
greetings. i have a question to chat: are php opcodes rechecked between compilation and execution?
 
@clockw0rk What do you mean by "rechecked"?
 
3:22 PM
what I mean is: after the caching takes places, the opcodes are stored somewhere, right? when somebody connects, will they just get loaded, like f.e. in the java vm? so, if i was about to fiddle around with the opcodes, would they just get fired out?
 
In my experience, if you fiddle with opcodes you get segmentation faults :)
If you are going to fiddle with them, use the Zend APIs (don't fiddle with them on the file system).
 
i had so many segmentation faults in my life, i'm not afraid anymore :P also i have some experiance in byte-patching, I just wanted to know whether somebody has any sources or experiance they might want to share . thank you kindly
zendapi is a good hint for starters btw., thanks
 
@clockw0rk once compiled opcodes are not manipulated (unless you use opcache, then right before being loaded into shared mem) … but you may have to un-mprotect() them if you really want to. Also be aware of them being in shared memory with opcache
 
that's a solid hint here, thank you. will play around with this at weekend. I have to go now since our company won't allow me in the building after everybody is gone Lolz. Will report back if i find out something cool. thank you guys!
 
cmb
3:49 PM
@clockw0rk consider to override zend_compile_file and zend_compile_string instead, and to manipulate the op_arrays returned by the formerly registered handlers.
 
4:03 PM
I have a question about setting breakpoints on forked PHP processes. I know XDebug supports this feature (bugs.xdebug.org/view.php?id=938). I'm using PHPStorm and my breakpoints inside the child process does not get hit (Only works in parent process), I did search on PHPStorm forums and other places, did not find a working solution. Do you have any hints on how to identify the root cause of this issue?
 
4:19 PM
RE (?:[\d\D])* and (?:[\s\S])* not working in UTF-8 mode (u) ・ PCRE related ・ #80278
 
What tools do your companies for your QA testing department
 
5:15 PM
@GabrielCaruso You want RC3, or you want me to do it?
 
5:26 PM
user image
11
#dreamteam
 
@FlorianMargaine They wouldn't ask that; different religion. =P
 
Anyone here good with CSS
 
@DaveRandom Nice photo!
 
I know wrong chat but HTML chat is shot
 
@bigchungus None of us.
 
5:28 PM
@DaveRandom \o/
 
Figured
 
We all hates it!
 
What conference was that Dave
 
6:00 PM
@SalOrozco Probably the pub
 
@SalOrozco they prefer to be called 'QA programmers' rather than 'tools'.
@StatikStasis there was a walking tour of Bristol, which may or may not have stopped at a pub.
 
@clockw0rk or maybe look at using preprocess.io/# or similar....as being able to debug problems is a useful thing to be able to do.
 
6:23 PM
@Danack Testers one might say.
 
@DejanMarjanović There's (allegedly) a slight benefit in calling them qa programmers. If you call them testers, then sometimes they think they are only there to test the code to find problems, and then don't get involved in suggesting ways of preventing problems.
 
Okay, okay. I prefer to have software engineers with the focus on testing.
 
@Derick bip bop mail received :D
 
6:50 PM
@DaveRandom @Danack no masks? For shame
:P
 
@Tiffany You mean that is his actual face?
 
.....I've gotten used to how it looks, so other people can too.
 
@PeeHaa yeah, not enough beard
 
Not sure how bad pandemic is there currently so mask may not be necessary
 
Kind of hard to wear a mask while drinking, but yes wore masks when going to the loo in the bar.
 
6:53 PM
Granted, everyone is dealing with a global pandemic, so probably safe to wear one regardless of how well it is. It's an easy precaution.
 
yes, but if I've sat next to someone for an hour while having a pint, not much point to put one on when walking them to the carpark.
 
Fair enough
 
Can't wait to burn all the masks :D
 
^
 
Better get tested :P
 
7:20 PM
Save them in case covid 1.2 comes out
 
No one here actually wears them unless inside.
 
7:59 PM
Can I safely assume that DateTime::format will never return false unless I silence it?
 
@Dharman According to the manual it always returns string (note the return type). Unrecognized characters are printed as-is (see just below the format character table)
 
I don't trust the manual.
 
Check the source?
 
It says it can return false, but I can't imagine when it would happen
 
How can I use the value of a variable as part of the name of a constant?

https://3v4l.org/dCkU7
 
8:06 PM
@Dharman What says that DateTime::format() can return false? Also, you can perform a quick test to confirm: 3v4l.org/8CnVP
 
@MartinAJ constant()
 
thanks it worked only in PHP 7.x with along a warning 3v4l.org/r8ec2
 
@Dharman The manual should be trustworthy, particularly basic stuff like return types (I can't recall situations where I've found it not to be, altho I don't doubt it may happen occasionally). If you find any errors in the manual report it via the link at the top of the page.
 
@MartinAJ Yes
Check your code
You are missing quotes..
 
wait
 
8:10 PM
No
 
I am too tired to go through the source code for DateTime::format, so I am going to assume that the manual is wrong and it can never return false.
 
\o/
 
Oh, I se, the Return values description section says "or FALSE on failure". Yeah, I'm guessing that's wrong. I'd wager the signature is correct and it only returns string
 
can I ask something similar? @PeeHaa
 
8:27 PM
Just ask the question
> Don't ask to ask, just ask
 
DateTime::format / date_format: Mismatch between signature and "return values" ・ Documentation problem ・ #80279
 
@Tiffany ok sorry I did here
 
@Dharman FYI I filed an issue to get someone to double-check and update the manual ^
 
Thanks
 
@MartinAJ where is $this->os coming from?
I suspect if you var_dump $this->os from inside that method, you'll get something you're not expecting
 
8:32 PM
its a helper @Tiffany. That's not a issue and works fine when I run dd($this->os)
 
Or use a debugger like a sane person
 
aha ok could you please introduce a debugger?
 
@SalOrozco it'll be a new form factor probably, I don't think viruses follow semver
home alive, btw everyone :-P
 
/me recalls some extension that only fills (or filled) certain properties when it is var_dump'd - might have been Soap or DateTime related
 
Need to get back to work
@DaveRandom need to make sure tests capture mutants
 
8:49 PM
@AllenJB That was DateTime
 
it is intentionally undocumented though, because the relevant properties exist only for the purpose of debug dumps
 
Pretty sure it is even fixed by now?
 
iirc it's something to do with making a relative from an absolute for print purposes, or possibly vice versa
@PeeHaa maybe, but it was never "broken" as such, just a bit surprising I guess
 
It borken bru
 
it was by design, just arguably a weird design :-P
 
8:53 PM
:P
 
ugh I have left my fags in the car and it's 3 flights of stairs away
 
You know you are going to get them anyway
Might as well get it over with
 
not until I have made myself uncomfortable and complained about it a bit first
wtf do you think this is
 
:D
 
yesssss found one on my desk
oh ye of little faith
 
8:56 PM
One of those old dry and crunchy ones? :P
 
yeh but it's for a mix anyway
powdery-er the better for these purposes :-P
 
:-)
 
cmb
9:16 PM
@AllenJB and you lost: <https://3v4l.org/2jto0> :)
 
cmb
9:34 PM
oops!
 
You can get real fancy with it if you want
 
`Cool
Thanks!`
 
lol
 
well bummer
 
u
suk
 
cmb
9:36 PM
Cool
Thanks!
 
[Cool](Thanks)
So gut
 
also that, yes :-P
basically newline screw everything
 
Much fancy
wow
;-)
 
and god help you if you want to put a backtick into inline code
but tbf this thing was basically thrown together by @balpha in like 3 months 10 years ago (see pins :-P) and hasn't been touched since, all things considered it's not bad
 
cmb
foo ` bar
 
9:39 PM
Even with all its stupidities. This chat is still better much better than all those things that try to get clever and do the editablecontent takeover thing
 
@cmb there is an anwinnable game of backslash tennis you can get into with certain things
`like I'm pretty sure you couldn't do this inline`
also ending code fragments with backslashes can be hard sometimes
it's all done with some hideous regexes, so (ironically) it's not all that regular, it's not intuitive what the rules are
 
cmb
inline: `like I'm pretty sure you couldn't do this inline`
 
cmb
okay, actually I don't want to go to fancy with markdown
<3
 
teams and whatsapp drive me up the wall with automagically converting text emoji to stupid pictures
teams can absolutely go fuck itself off a cliff forever
 
cmb
9:42 PM
Teams makes me crazy because it insert formatting by default when pasting.
 
but I wish whatsapp would make it optional (the desktop one I mean)
 
Slack is also a terrible offender
 
@cmb formatting is, incredibly, quite low down on my list of simple usability issues with Teams
I cannot believe the extent to which the world is putting up with the shit
5 mins ago, by DaveRandom
but tbf this thing was basically thrown together by @balpha in like 3 months 10 years ago (see pins :-P) and hasn't been touched since, all things considered it's not bad
^ this chat platform is a better productivity tool than Teams
I absolutely honestly mean that
at least it is predictable in its behaviour
Teams notifies me of what it feels like, when it feels like
sometimes I am sitting at my PC, with my phone plugged into my PC and connected to a WiFi AP that is about 4ft away, and a call is ringing on my PC and not on my phone or vice versa
 
Rocket chat has a /shrug command that does ¯\_(ツ)_/¯ but it's not escaped correctly, so the arm is missing
It becomes ¯_(ツ)_/¯
Going to submit a PR this weekend since it's open source. And maybe fix my doc-en repo :X
 
oh also I have yet to find a way to xfer an active call between devices without posting a message in the chat for that call
and that is a hack that I found like page 50 of google after hours of searching
to me that is a fucking basic requirement of anything which purports the things that teams purports
also the way it keeps everything in one window by default, and sometimes non-optionally, drives me crazy
 
9:50 PM
The one thing I really like about SO chat is edit history... and I wish more chat apps did something similar so sysadmins would actually enable edit -_-
Otherwise it's disabled for "auditing reasons"
 
I am going to shut up because I honestly could fill a whole 1080p screen height of bitching about teams
 
Lol
I guess weekend starts now
scooch from one desk to the other in my chair
 
y u no onebox??
I bet it's that fucking underscore. I hate that thing.
 
They killed twotter oneboxes
 
oh huh why?
 
9:58 PM
It had security implications
 
I guess you could probably use prefetch to collect user agent info?
or exploit 0-days in browsers I suppose actually
 
Not sure about the details, but it was on meta at some point in time
 
but no more so than visiting the content on twitter
eh, whatevs
 
@DaveRandom The video in audio is great for me, but that's about it. I can't even find the people I want to type to :)
 
@DejanMarjanović there's another thing... Teams simply does not work properly in Citrix or RDS
and before anyone gives me any bullshit about it being complicated to make that work, zoom does it just fucking fine
 
10:04 PM
I would just quit if I had to use that :)))
 
I am so, like, irrationally pissed off about how shit teams is, like it makes me physically angry
@DejanMarjanović I have pretty much refused
 
For me Slack was quite pricey, and it was shit with calls.
 
yeh but slack is a chat platform, and it's the best chat platform (imo)
I don't know what this obsession is with shoving everything into one app
as long as all the data is shared (contacts etc) I don't mind having more than one thing for different tasks
 
Sure, but then it costs way more etc.
 
also people talk about calls... just use a fucking SIP service
it's not like anyone ever has their video turned on
I occasionally leave mine on intentionally to make other people on the call feel uncomfortable because they don't have theirs on
 
10:09 PM
For me it's either everyone on or everyone off :) I mean meetings I care about.
 
which is actually quite out of character for me, I don't generally troll to that extent, but I just find the whole concept of business video calls so utterly ridiculous
@DejanMarjanović exactly, and most people elect for "off", so you can really screw with people by being the only person who has it on
maybe just put like a ziggy stardust outfit on and see if anyone says anything
 
I guarantee you that english people won't say anything
not people who are pretending they are professionals, anyway
 
I think I've been in one video call my entire month of employment.
Several voice calls on zoom
 
that is... insane
why the shit would you use zoom for voice, the whole point of that platform is that they have the best UI for video
 
10:15 PM
Here is my OnlyFans setup, I care how my stupid face looks.
I think if you don't know someone it's polite to turn on the video.
 
That is how you make voice calls ^ :-P
cannot be doing softphones of any description
 
But then I have to move all the stuff I have in front of my phone
Lol
 
@DaveRandom With a filthy as fuck tcp/ ip phone?
:P
 
no, with a well-loved and decidedly EOL SIP phone
I have had this thing for over a decade
and I have used it actively for over a decade
 
I actually had been using my office phone to call in to the zoom meeting for awhile but I got sick of it and started using my headphones + webcam mic for computer audio.
 
10:19 PM
and I love it
 
I will say, occasionally screensharing is used in zoom
 
it doesn't support TLS 1.1
which has become problematic, of late :-P
I have a Polycom VVX411 knocking about somewhere that I have been meaning to start using for like 2 years or sth, but this has all my speed dials in and shit and I haven't sat down and read the manual for the modern(ish) polycom
 
YIL that nmap doesn't support 1.3
 
@DaveRandom Dork
 
I know I will prefer it when I get round to it but it requires like 3 hours
@DejanMarjanović afaik nmap supports whatever the stack it's running on supports?
like if you run it on securechannel on windows it uses the windows cert store but if you run it on openssl it doesn't
 
10:23 PM
I tried with curl and it say LibreSSL not built with 1.3 support which makes sense.
 
I can't really comment as nmap has only ever been a tool I use, never looked at teh codez but maybe they just haven't built their text resources and shit for it yet?
also afaik 1.3 still isn't an actual ratified standard yet anyway? maybe that changed by now
but if not maybe they are just waiting for a standard to implement :-P
 
I disabled 1.0 and 1.1 just recently and 1.2 was the only one supported, I said hey why don't we have 1.3 and then people told me we have 1.3 and I suck.
 
I believe whatever ssllabs tells me :-P
 
Yeah, yeah. Checked there, but I wanted to "automate" the check. Definitely possible with other things/tools.
I like the subtle shot of AK on computer desk. You like too @DaveRandom?
 
lol not exactly anonymised either :-P
 
10:35 PM
Hey stop rubbing in people's faces you have an office and a desk and telephone @DaveRandom :D
 
I spent 6 hours diving today. it's not all tea and biscuits.
tally ho, wot wot
 
it's not all tea and biscuits Like this +1
 
I want tea and biscuits
 
Locally adapted version would probably it's not all Bier and Wurst.
 
Coffee and donuts for US version?
 
10:42 PM
I prefer the german version :-P
although also tbf US culture is basically just All The Cultures
how ironic they seem to have taken such a dislike to outsiders :-P
"We need to preserver out way of life" lol mate your way of life didn't even exist when you were born
 
Schlenkerla Smokebeer - THE original smoked beer.
From the UNESCO world heritage city Bamberg, which is the beer capital of Franconia (Bavaria, Germany), the region with the highest brewery density world wide.
I am not saying most of breweries in Germany are older than USA but they are :D
 
> the region with the highest brewery density world wide
depends how you define "brewery", but I wonder if lockdown may have altered that
also the number of "craft ale breweries" popping up these days I wonder if that is still true
 
People buy locally especially now, even if it's more expensive than supermarket.
 
obv it is the place the largest, longest brewing history that produces some amazing beers, I'm not having a pop at Bavaria ftr :-P
 
This is Franconia, we don't like to be called Bavarians, thank you :D
 
10:48 PM
:brofist:
 
Those are peasants from the South.
Germany is the best socialist-communist country.
 
one of the things that is notable about peasants is that they are good at getting absolutely shitfaced though, tbf
 
How very dare you.
 
youtube.com/watch?v=qkMQyAEpyuk I wear these when I want to embark on such an adventure.
> Might have something to do with the UK having more of a history of "home brew", whereas I doubt that Germany has such a culture. Why would they? IIRC, there's villages in Franken with a population to brewery ratio of 500 to 1 or less, and doing a damn good job of it!
Not a lot of craft breweries, they're just breweries @DaveRandom, there's this "law" from 1516 about ingredients.
 
indeed, and said law does seem to have an impact on hangovers, in my experience
in that rheinheitsgebot (if I spelled that right it's insane) seems to prevent really bad hangovers, you can get absolutely bollocksed on german beer and still be mostly OK the next day
but I do like a pint that tastes of flowers sometimes
 
10:55 PM
Indeed, indeed. I am a fan of smoked one, it's like liquid bacon.
Not in the summer of course.
 
ugh, Beavertown Lupuloid is evil, it's really expensive, it's 6.7%, and it's really obscenely drinkable
there are a few things like that floating about at the moment, the beer equivalent of cocktails which go down like soft drinks but are incredibly expensive and get you really pissed really fast
 
A bit pricey I must say, but we're not pedestrians.
 
lockdown has been beneficial ini many ways because it has stopped me trying new beers from all the stupid craft ale bottle shops
I am so fucking middle class it is untrue
 
00:00 - 23:0023:00 - 00:00

« first day (3660 days earlier)      last day (1271 days later) »