« first day (3741 days earlier)      last day (1198 days later) » 

12:41 AM
@PeeHaa Live!
 
@IluTov Exactly (sorry for the delay... fell asleep), I suppose I could extend it to @<ClassUnions> to swallow only specific extensions, might look into this after I got the base thing working
(well if the parser rules allow it)
 
pffft, bloody antifa with their sleeping
Make Consciousness Great Again
 
I'm having a bit of a brain fart. Given that I have two arrays, the first array contains multiple values, one of which is the name of the second array. So, I have $array which contains a value song, and I have an array named $song, which contains multiple values. If I loop through $array, how should I check if one of the values = $song?
@DaveRandom I want to sleep only 17 minutes a night, plox
Without resulting in a migraine
 
by redesigning your code :-P
I mean idk if your code is giving you migraines
something to consider, but the task in hand...
 
Surprisingly no
What if redesign is not possible
 
12:50 AM
> one of the values = $song?
this no make-a sense
or maybe it does, but I suspect it's not what you mean
 
Actually... it's not really relevant, I need to think of a new hypothesis
 
you have an array of arrays
 
No
 
Argh
 
12:51 AM
lol
 
I'm going to try something different
 
keep it legal
I mean, morally legal
I don't mind pot smoking or responsible J-walking
jaywalking?
 
I'm trying to understand something in my project code better and I'm trying to transpose it into something else in 3v4l so I can more easily play with the code but transposing it correctly is proving challenging
 
idk, it makes no sense
"walking in the road like a bell end"
 
@DaveRandom this
 
12:54 AM
just don't be a cunt... look before you step into the road, don't do anything that will obviously shit up other road users, don't do anything that will probably get you killed... all of those rules fall under the umbrella of "don't be a cunt"
if you aren't certain that everyone can see everyone else, stay where you are/get out of the way as appropriate
doesn't seem difficult
@Tiffany I find that it can help to think about how it would translate to SQL, if you have multi-dimensional data
single sets are probably irrelevant how you do it as long as it is vaguely readable
 
1:15 AM
@Tiffany not this, right? 3v4l.org/f8LTB
 
this is like advanced rubber duck debugging, where we are not only providing a sounding board to clarify thoughts but also suggest code
I want the @hakre phpstorm extension
3
 
@DaveRandom Ping pong :D
 
so err I was abducted by aliens and... I just haven't put pants on for 2 days, sorry
 
Eh it's fine, I understand you
 
It's pretty hard to do with an anal probe too
3
 
1:19 AM
I have to go to liverpool in the morning though so I have to do stuff tomorrow
that should at least get me back into the habit of putting pants on
when I say "pants" I mean the UK definition btw
 
Ew
 
I have literally been either in bed or in my dressing gown
or for like 45 mins last night just in my boxers before I realised I should just put my dressing gown on
(I was a quite baked)
 
Man, there has to be a way to implode only parts of an array, where the keys match the values of another array, and the keys have nested arrays that need imploding
Oddly specific
 
not in one go, try exploding that sentence by comma and putting each resulting component in separate operations
 
me is also in the divide and conquer camp. filter, map, implode.
 
1:28 AM
If you want to learn how to collection, use linq for things
(in C#)
 
Wes
@PeeHaa it looks neat :B
 
 
2 hours later…
3:27 AM
I think I have my code ready for a PR... basically just needed an extra day. I also wrote some pretty terrible code today. >.< Like maybe half of the code I'm proud of, the other half I want to throw in the garbage.
 
 
3 hours later…
6:15 AM
morns
 
 
2 hours later…
8:28 AM
@Tiffany garbage code is fine. just so long as it's not tire fire in a dumpster code.
the discussions being had by people who are clearly not experienced in software development, about the issues around Parler are both sad and funny at the same time.
 
9:08 AM
@Stephen context, please.
 
this is a direct quote, from someone who generally has a considered view on political matters:
> I think that it would be difficult to run a website without Twilio and Okta.
 
lol
 
it's like a everyman version of the cool kids "just include a library for <everything>" approach thats become so common
I mean it's not just that guy. It's laughable how many places you see (apparently) technically minded people saying "dealing with user passwords is too hard, just outsource it to Google/Facebook/Twitter".
I realise there are gotchas, and plenty of places have been bitten by "if I do md5(md5()) that means it's twice as secure right" stupidity, but I find it hard to believe that things like hashing a password are the "hard" things for any modern website.
 
mornings
 
9:40 AM
\o
@Stephen You are right, the only advantage is that the user won't have to fill in their profile every time they create a new account on some site, and they don't need to remember a bunch of passwords. It is only convenience, the argument for security is BS, any competent person can create a decent auth system.
 
@mega6382 conversely, if your site asks me to login with google, Facebook, or twitter accounts, I won't be using your site
unless your site actually integrates with the 3rd party you're referencing, I don't believe the advantages outweigh the disadvantages
 
Larry, some "PHP" alternatives to tryX: hopeX, prayForX, keepFingersCrossedForX, doXButIfItDoesntWorkReturnFalseWithAnOutOfBandErrorMessage
 
and seriously, who in 2021 is using a browser that doesn't prompt to (a) generate a secure random password, and (b) save it for them?
 
/raises hand. Keypass all the way. Less chance of the entire PW file being compromised if the browser does.
 
Yeah, I often try to avoid creating an account altogether. Also, almost every decent site offers 2fa, either via sms/email or auth apps.
 
9:50 AM
2fa per auth apps have their own problem thought
 
@MarkR are you saying your browser has no built in password manager, AND you have no browser extension/plugin for Keypass?
 
@Stephen It has a built in PW manager, I just don't use it. I like my passwords firmly outside of active memory
 
@MarkR right thats your prerogative, my point was that "I have to remember lots of passwords" is not a practical problem for people using any mainstream browser, unless they choose to make it a problem
@mega6382 a client of mine operates a store for downloadable content. customers can, and regularly do buy content without logging in. they do have accounts, but due to an integration with another site, they can download their content from somewhere else too
so there are people who bought stuff this month, but haven't logged in to the site in 18+ months
 
10:45 AM
@Stephen I remember that there used to be software for windows that could extract passwords from browsers. In macOS I believe that the browsers use system's keychain to store passwords, so it might be more secure, but not sure.
 
10:58 AM
@mega6382 Safari uses the keychain. I think Chrome used to but doesn't now, afaik. I guess I'm making the mistake of assuming that people are using browsers that aren't shit.
 
with Rector anyone know how to remove a node?
 
@Stephen Chrome is most popular in the wild, so most of the people will most likely be using that. So, a separate password manager makes sense.
 
@mega6382 I thought chrome had a not-terrible password manager built in?
I mean I dont use it so I dont know
 
11:16 AM
I don't know about the latest version, but back in 2016/17 you could extract passwords from any browser in windows i.e. firefox, chrome IE etc. I don't remember the name of the software, but there were many like it.
 
11:28 AM
@mega6382 is that because people weren't setting a master password? I thought Windows had a central password store similar to Keychain, tied to the login password?
 
11:44 AM
@Stephen I am not sure, but I do remember that it worked even with having login password set. But I believe that it was because if you are logged in then there is no encryption on that storage. So, a usb attack(like that software used to do) would work.
 
12:27 PM
@DaveRandom fun-fact the concept of 'jaywalking' laws were invented by the car industry: bbc.co.uk/news/magazine-26073797 which is not as bad as how the US car industry also 'helped' design the road system: youtube.com/watch?v=odF4GSX1y3c
 
@Stephen I have a method that prepares a query string to then use as a curl request to an API and the method is just doing too much because I'm accounting for things like formatting the date correctly for the API to recognize
I don't have any idea how I'm going to break that thing apart into something simpler
The curl request part is in another method, I wasn't clear about that. The method that prepares the query string is basically handling and formatting data for the query string, but I did several things that I'm not pleased about.
 
1:07 PM
@Tiffany yes. But I don't know anything about that beyond what's written in the press release. But it's probably good for marketing.
 
1:18 PM
 
freaky
 
that
 
@Tpojka I guess same as youtube.com/watch?v=-6e2c0v4sBM
 
@Tpojka if you look at one and say the other one in your head, you'll hear the one in your head
 
@Tpojka there is an explanation in youtube.com/watch?v=zup0WPg8cds at about 10 minutes in
 
1:47 PM
McGurk effect. Interesting to know.
 
2:40 PM
I just passed by my next door flat neighbour who is i) going for a covid test ii) not wearing a mask. \o/
 
\o/
I live in Utah, which is among the highest US states for infection rate, which is insane because we aren't even close to the most populous.
Fortunately both my case and my spouse's weren't severe. High fever, chills, the usual, but not severe enough to go to the hospital. I was worried, because I'm overweight and had breathing trouble as a kid, putting me at higher risk of it being serious.
 
@Tiffany are you building a JSON string by hand (i.e. '{' . 'someVar:' '"' . $someVar . '"' . '}' type stuff? Or, even better, building a string of pipe (yes, |) delimited values to send via an API, and then just relying on "magic" to remember the order and type of each parameter when its at the other end?
my point is, you have some degree of separation of concerns, both currently and as future improvements, don't beat yourself up too much.
and no those two examples aren't silly made up things. I've seen both in real world production applications.
 
2:57 PM
@Stephen D:
 
3:28 PM
Morning
 
o/
 
3:45 PM
o/
 
\o
@LeviMorrison I'm going to go ahead and assume the vast majority of those infections are in SLC. Having been to most parts of Utah, that's pretty much the only place with any people in it.
 
@Sara Sadly, it's not quite true. Utah Valley has 2 universities, and infection rates are high there too.
Have you ever been to Cache Valley (Logan), by chance? That's where I just moved to.
 
North border is one of the areas I've not been through, no.
Used to spend a ton of time in the southern areas hiking/canyoneering.
And of course been across the rockies by 70 and 80, lots of stops in the little towns along the way...
I literally circled your part of UT once. East from SF, across SLC into Wyoming, then up to Montana, back west into Idaho, south almost to Boise before cutting west at the WA/OR border with ID and through to Portland.
With a few dips out of the way on that track to hit Yellowstone and Glacier.
checks maps Okay, I didn't get nearly down to Boise...
 
4:21 PM
XMLRPC 1.0RC1 checksum error ・ XMLRPC-EPI related ・ #80618
 
@LeviMorrison Glad to see you guys made it through. May you be blessed with good health!
 
1 message moved to Trash can
 
lol
I was just about to engage :p
 
That's why I moved it :) Some people should just be ignored the hard way
 
true dat :D
 
4:31 PM
@mega6382 me too lol
Anyone familiar with Rector here?
 
Doubt it, but you should ask the question still.
 
anyone know how to make a static method call, non-static?
 
@KerrialBeckettNewham remove the static word from the method definition?
 
@Danack I meant programmatically, inside a rector rule. it's for automated refactoring.
 
why do you want to do it at all, let alone programmatically?
 
4:45 PM
@Danack because I'm migrating a project from Phalcon to Symfony.
 
So? You only need to change a method to be non-static when you refer to $this inside the method.
 
@Danack No, I just need to change the method call to a non-static call and then rename the method call. Essentially, converting Phalcon static calls into the Symfony equivalent.
 
@KerrialBeckettNewham that statement doesn't make much sense by itself: 3v4l.org/GNkO6
 
@Danack I don't care about the actual static method, that's some core Phalcon shit, I'm just converting the static calls into non-static. So it does make sense. :)
 
9 mins ago, by Danack
why do you want to do it at all, let alone programmatically?
oh, do you mean where it's called?
 
4:54 PM
@Danack yes
 
Well, you'd have to an a variable of that type in the right place......not sure that could be automated easily.
 
@Danack well you could go from myClass::method(); to (new myClass)->method();
 
@Danack Shouldn't be too tricky, there are a few thousand use cases so easier to write a rector rule to convert all of them, example use case: User::findFirst($id); to $this->billableGroupsRepository->find($id);
 
@Sara IIRC, you work for Platform.sh or something like that?
What do you do there?
 
5:19 PM
Sara works for MongoDB
@LeviMorrison Got my email btw?
 
New String Operators ・ Unknown/Other Function ・ #80619
 
WATLOL
 
user image
7
 
@LeviMorrison There are a few other here who work at platform.sh
 
@Derick I don't see it; what's the subject line?
 
5:33 PM
@Jeeves lol
 
@Danack Can I reply with that?
 
best not....say it needs an RFC...
 
Too much effort :P
 
you should, but don't use the official email
 
@mega6382 inb4 salty response
 
5:54 PM
@mega6382 Hi!
 
yo
 
 
1 hour later…
7:00 PM
@LeviMorrison I worked for PSH for a couple months, but ended up not staying there.
 
@Sara Ah. What are you doing now?
 
flipping off the system while smoking a fatty?
 
Wes
fellas
 
7:20 PM
As Derick mentioned, I work at MongoDB. I'm on the Server-Security team doing C++17 by day and flipping off the system while smoking a fatty by night.

((This statement does not reflect employer or their values))
Point in fact, I haven't been high in a surprisingly long time given that it's legal in Illinois now.
 
Good afternoon everyone. I'm trying to add a new array to an existing one. New arrays will always be added.
$historico = '[{"data_substituicao":"2021-01-12 16:01:53","devolucao":{"placa":"PZL0432","marcamodelo":"Ford - Ecosport","odometro":"35.000","grupo":"B","acao":"D","obs":"Teste"},"substituto":{"paca":"PZT6057","marcamodelo":"Chevrolet Celta","odometro":"6.000","grupo":"C"}}]';

$novoDados = '[{"data_substituicao":"2021-01-12 16:01:53","devolucao":{"placa":"PZL0432","marcamodelo":"Ford - Ecosport","odometro":"35.000","grupo":"B","acao":"D","obs":"Teste"},"substituto":{"paca":"PZT6057","marcamodelo":"Chevrolet Celta","odometro":"6.000","grupo":"C"}}]';
 
@Tiago That's not an array
It's a JSON string
A handwritten one at that
 
@PeeHaa Sorry, I missed the term.
I am using a translator.
$historico = json_decode($historico, TRUE);
$novoDados = json_decode($novoDados,TRUE);
array_push($historico,$novoDados );
;)
 
7:42 PM
@PeeHaa you can charge more if it's bespoke encoded.
 
Let me check how "bespoke" looks like on invoices
Perfect!
 
@PeeHaa less expensive than "artisanal"
programmer hours: 50 @ $75/ea
bespoke artisanal programmer hours: 0.5 @ $1000000/ea
 
How's that compare to senior?
 
it's not about the programmer, it's about what they are doing
senior developer hours: 50 @ $75/ea
señor developer hours: 0.5 @ $1000000/ea
 
What's ea?
 
7:56 PM
each
 
lol that was easier than expected :D
 
not that common but "standard" english I think? i.e. not particularly localised
 
TIL
 
@DaveRandom I think 'unit' might be more common elsewhere.
or at least alternative.
 
til that trying to install phones in a homeless refuge is a job that requires you to endure 8 hours of verbal abuse from mentally ill people... I'm not sure why this was not obvious to me before I started, in retrospect
tbf loads of the people there were really sound as well
 
7:59 PM
Just give them mobile device. You're welcome.
 
I am just going to suggest that you think through the logistics of that again :-P
if anything they need chaining to stuff
the phones, not the people :-P
 
Disclaimer: all business recommendations/advices are provided on top of I-don't-bother-real-requirements. :D
 
well, just to state what I hope is the bleeding obvious, if you make them in any way not screwed to stuff they will be immediately stolen :-P
well, in the really hairy bit anyway, the lower 2 floors are essentially where they put people who should probably be in a secure hospital
but the 4 floors above that are just full of normal people who happen to be homeless
but those bottom 2 floors... it had better be nailed down or it will not be there/intact for long
 
Maybe it is somewhere calculated that there is less harm if someone runs away from ground floor than from 6th one.
 
oh the bottom floor is still not ground, the ground floor is an office
it's an old (or actually quite new) student accommodation building, to give you an idea of the layout and the general vibe :-P
cheap and nasty
 
8:10 PM
Getting top floor sounds like Double Dragon.
 
the top floor was for some reason disproportionately scottish women
(I was in liverpool, nowhere near scotland)
 
@DaveRandom Double Dragon. qed
 
I don't remember many of the characters in that offering me a cup of tea tbh
 
Conditionally said (can it be said that way?) there is some woman on end.
 
not 100% certain what you mean there tbh
it grammatically correct but it's ambiguous
sorry I always get complaints for using too many double negatives :-P
 
8:16 PM
I mean not necessarily it needs to be Scottish woman. :D
 
@DaveRandom Stop being so double negative!
 
I don't do what I don't want!
 
Ain't nobody got no time fo dat
 
8:43 PM
@Tpojka ohh I see, yeh "conditionally" is not the right word, I think "not necessarily" or "optionally" are the best we got for that really
 
@Sara Sounds pretty cool. I did some C++ recently. Started at C++17, then lowered to 14, then realized I had to go down to C++11...
I wish all of CentOS would just go away. Use newer compilers, people!
(Software Collections didn't help this specific issue because the newer versions use the old string ABI, and have to support 1 other OS that is still on GCC 4 as well)
 
@Danack Yes, I heard. Still years away from the death of CentOS 7, though...
 
9:23 PM
@Derick Found it, thanks!
 
Anyone with Windows here having a few minutes?
 
cmb
yep
 
php -r '$stream = \stream_socket_client("1.1.1.1:80", $errno, $errstr, 0, STREAM_CLIENT_CONNECT | STREAM_CLIENT_ASYNC_CONNECT); var_dump(stream_socket_get_name($stream, true));'
php -r '$stream = \stream_socket_client("127.0.0.1:1", $errno, $errstr, 0, STREAM_CLIENT_CONNECT | STREAM_CLIENT_ASYNC_CONNECT); var_dump(stream_socket_get_name($stream, true));'
Could you run these two and report the results?
 
cmb
string(10) "1.1.1.1:80"
string(11) "127.0.0.1:1"
(note that I had to swap ' and " because the former is not known to cmd.exe)
 
So Windows really seems to always return the remote connect address, even if not connected yet. :-(
Thanks!
 
10:03 PM
@kelunik What does nix return?
 
@LeviMorrison The reality is that C++11 already has some great shit in it. The extras you get from C++14/17 are (mostly) things you can backfill. constexpr-if being the one exception. You have to do some gyrations to backfill that and it never looks good.
I'm looking forward to C++20's modules.
 
Ha, C++20 has a feature I learned about because I actually needed it: heterogeneous lookup on unordered_set.
 
@PeeHaa false as long as it's not connected.
@cmb @PeeHaa Context is this: github.com/amphp/amp/pull/341
 
Does it return the same after connection?
That's one ugly PR :D
On behalf of both bill and gates I am sorry :P
 
**Looks that up.... http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0919r1.html
Ah, nice.
 
10:11 PM
@PeeHaa I'll squash it anyway :D
@PeeHaa Linux or Windows?
 
Linux
As in does it eventually return the same as on windows
 
yes, returns the same if connected, returns the same if connection refused, but I wanted to use it to check if the connection is still pending, which doesn't seem possible
 
@LeviMorrison Oh, I wasn't aware that people actually use STL map/set structures
 
Basically replacing this check we took over from reactphp/event-loop: github.com/amphp/amp/pull/341/commits/…
 
@NikiC They do, because they have good generic performance.
Of course, people can (and often do) better when they care enough.
 
10:15 PM
After reading docs.microsoft.com/en-us/windows/win32/winsock/…, we're at a point where it seems it's not worth supporting OOB (which we already don't), so we just unconditionally pass write watchers as except watchers.
 
Heterogenous lookup is a feature I don't recall seeing on any generic set before, though. I looked around and didn't find any, at least.
 
If OOB data is received, triggering a write watcher additionally doesn't seem to be an issue.
@NikiC Speaking of that, I think proper map / set / list data structures would be better than supporting object as array keys.
 
std::unordered_map<std::string, int> map = /* ... */;
auto it1 = map.find("abc");
auto it2 = map.find("def"sv); // in C++17, a std::string will be temporarily constructed to do this lookup
That's what heterogeneous lookup fixes, basically.
 
10:31 PM
@kelunik Unless they have integration on the same level as arrays (by-value and literals), I don't think so
@LeviMorrison Eh, I wouldn't call a required allocation per element good generic performance
 
@NikiC That depends partly on your allocator.
 
Non-invalidating references are a pretty terrible default performance tradeoff
 
@NikiC One of the use cases of sets is to uniquely hold objects. You don't want them invalidated in this case.
If you don't need it, then yeah, it's a perf hit you won't like.
 
Sure, you sometimes need it, but in my experience in the vast majority (we're talking 95% at a minimum here) of cases you don't
 
I've needed it in 100% of the uses of a set I can think of recently.
Map... not as much, though not sure of the number.
@NikiC What do you use sets for that don't need this requirement? Holding integers and other primitive types?
 
10:38 PM
@LeviMorrison Yes, integers and pointers are definitely the most common case
 
cmb
10:48 PM
@kelunik yes, seems so. Likely a glitch in the getpeername() implementation.
 

« first day (3741 days earlier)      last day (1198 days later) »