« first day (3416 days earlier)      last day (1515 days later) » 

8:02 AM
Gecko/Firefox Session Mutation Bug ・ Session related ・ #79295
 
 
1 hour later…
9:23 AM
Good morning :-)
 
10:04 AM
I still haven't figured out half the stuff in TS.. but drool @

EventDispatcher.Singluar<EventDispatcher.SingleEventCallback<any>> = new EventDispatcher.Singluar<EventDispatcher.SingleEventCallback<any>>('on_item');
 
11:01 AM
@MarkR what's it do?
Also, morning
 
Morning, and it's generics in Typescript.
 
That much I could guess, but what's the line of code do?
Wonder if learning Typescript will help my job search... hmm...
 
Defines a property that is a typed collection of callbacks with a callback signature of (e: Event, value: T) => void
 
Yup, I need caffeine. I can sorta wrap my brain around what that means, but not awake enough
 
in PHP it would be the equivilent of:

interface<T> Callback {
   public function __invoke(Event $e, T $value);
}

class CallbackCollection<T> {
   private array<Callback<T>> $callbacks = [];
}
 
11:11 AM
ZipArchive::open with ZipArchive::CREATE flag fail when in the Mac OS TMPDIR ・ Zip Related ・ #79296
 
11:26 AM
@MarkR you should avoid using any. But yeah, TS is awesome, I saw an article where fizzbuzz was implemented only with types, without runtime code.
 
In this case I'm using it to represent a JSON payload that cannot be known at compile time. Do you have any tips on alternatives?
 
Hmm... a lot of times the type could be inferred automatically when it's used. But forcing any the compiler wont do that.
How come the payload is not known?
 
It will be coming from the server and is entirely dependent on context that's only known in submodules
Once it gets to those submodules it can get unpacked and put into structured data
 
Oh I see. And I suppose you have just one instance of the dispatcher outside of the module
 
In this case it's a top level dispatcher whose job is to send events from the communications layer to the individual modules that subscribe to it, they then decode what they want (as they do know the schema) and then fire off their own events
 
11:40 AM
Anyway, let's hope php 8 will get generics and array of types :D I wouldnt mind if we would get literal types and keyof :))
 
I desperately hope so, would be a game changer, although it's a lot of weight on Nikic's shoulders.
 
Yeah I know... M$ spent a butload of money into ts.
What's your opinion of TS so far, btw? I assume it's positive :D
 
Can tell. On the downside, if my tests go well, I have about 700 files I need to convert to it :|
I like what the language provides a lot, I'm a lot less fond of the modules system.
Not being able to split things up as easily into multiple files is a bit of a drag <he says exceeding line 1000 a few minutes ago>
and I suspect I'm going to be in for a world of hurt when the cycling dependencies kick in... which is almost everything I do
 
I think that's the linter.
I've started playing with TS for a few years now, but only recently (4-5 months) started working full time with it. What I noticed is that I'm not as disciplined as I'm with PHP.
E.
For example I don't always add explicit return types because the inference engine automatically adds it. The same with properties that have a default value. Oh, and webstorm it's annoying with their language autocompletes.
 
11:55 AM
My existing JS is very class-based but having to support IE11 I was limited in what I could do in terms of the new feature set. I started tying typescript when PHPStorm decided it no longer wanted to properly follow docblocks
So I thought I'd give something a lot more explicit a try, although I'm worried I'll have to go all-in as I've not yet worked out how plain old javascript can reference typescript modules
 
Oh that sucks...
Going all-in would be a nightmare, imho. Who knows what subtle bugs you introduce...
 
Yarp. Then again, regression is my middle name.
 
@MarkR do you have Madara added on discord? He may know of a solution
 
Nope, I only have you and Goerge
 
Solution and/or alternative
 
12:07 PM
Have a look at checkJs and project references, maybe it would be helpful. Maybe you could leave the existing code as it is by having less strict typing checks in the old code
 
I have front end running at localhost:8080 and api resides at some other port. I am using laravel to generate verification email url using the below code. When the user clicks verification link from their inbox it redirects to my laravel url but I want it should use front end url (I mean mail should open localhost:8080 and not laravel url). I am not sure if this is possible or not or I am doing it wrong
return URL::temporarySignedRoute(
'verificationapi.verify',
Carbon::now()->addMinutes(60),
[
'id' => $notifiable->getKey(),
'hash' => sha1($notifiable->getEmailForVerification()),
]
);
I know URL:: set the base url
This is the URL generating using the above code
http://192.168.43.185:8000/api/email/verify/1?expires=1582373916&hash=6897acb8e91c0b156567d4196b4ebf23252774a5&signature=90988dd9b71572b5380610aee7754101c9edfec82a49f58d1d6f1d7b98ff5e15
What I want
http://localhost:8080/api/email/verify/1?expires=1582373916&hash=6897acb8e91c0b156567d4196b4ebf23252774a5&signature=90988dd9b71572b5380610aee7754101c9edfec82a49f58d1d6f1d7b98ff5e15
In short user must be redirect to frontend routes and not laravel routes.
 
 
2 hours later…
2:00 PM
Remove SDO sections from official php documentation ・ *XML functions ・ #79297
 
 
4 hours later…
6:26 PM
That feeling when a code sample you submit has a bug... because of a library you used having a bug :-(
 
7:02 PM
probably similar to thinking of a better answer to a question on an application, but an hour after submitting the application
 
personal experience just there Tiffany?
 
yes :(
 
good to know we're not alone
 
daw
That happens to everyone
 
> Anything else we should know about you?
> I am passionate about learning new things, not just limited to the area of programming. Wikipedia can be an endless time sink if I'm unprepared to escape its grasp.
 
7:14 PM
What would you put now?
 
I should've answered that most of what I know about PHP and programming, I've learned outside of a professional work environment, and school
most of it's been self-taught, or learned from r11 :D
 
what is r11?
 
You're in it
 
this room
 
ah :)
 
7:18 PM
look at your address bar, you'll notice an 11 :P
 
yeah, it must be the timezone i'm in... here it's 8PM on saturdays eve..
 
nothing to do with time... unless I missed something...
 
owh well ... I'm completely transparent to you guys.. It's just plain old me, staring at the IDE, wondering why I'm staring at it :)
so what do you do outside work to learn php ?
 
Nowadays, I prefer to stay away from PHP outside work, usually ^^
 
pick up personal projects, e.g. chatbot, adapt example code from a book on design patterns from Java into PHP
TL;DR just work on stuff
 
7:22 PM
reddit.com/r/PHP/comments/f7q8wf/… I hear there's a video series on how to start learning PHP from the ground up
 
too bad, that vid is not showing in my country.
 
woops
 
i've worked my way through with php since version 4...
that is a hard way :)
started with a simple e-learning tool for studio (audio) work
 
I started using it... I think 16 or 17 years ago
Whatever version that was
 
7:26 PM
version 4
ish
 
I remember classes weren't quite out
 
Dec 11 '19 at 21:42, by Tiffany
I learned HTML/CSS in high school because I hated (and still hate) powerpoint. I built websites on geocities for high school projects
that got me a job as work study under the web administrator at a community college, shortly after I was introduced to classic ASP
 
your archive is impressive
 
didn't start using PHP until about 5.3 ish, but I knew what it was well before that
 
I started off with ASP for web development for a school project, it got me banned from the school computer network :|
 
7:28 PM
hahaha
 
like asp ? :)
 
what did you do?!
 
My A level practical project was to write a web based interface for managing student records... it was way above what they expected people to do (they only taught I.T whereas I was already churning through a hundred thousand lines of VB6)
 
got caught with something? :)
cool
 
Anyway... as part of my research I went trawling over the school network for the existing record of attainment... and found it, turns out it was a MS access file protected by nothing more than a read password... which ASP completely ignores
I take a look inside it, use it to analyse what kind of data I'd need... documented how I did it, showed it to my I.T. teacher (who made it) to ask some Qs, and all hell broke loose.
 
7:32 PM
at least now you know what not to say to your teacher... haha
 
Turned out they didn't appreciate some 16 year old "hacking their databases".
 
rofl
and nowadays you'll get a bug bounty
 
Only reason I ever got back on was because my business studies teacher was the headmistress and she was getting annoyed I couldn't get online to do my class work
(theoretically)
 
what is record of attainment? a gradebook?
 
Yeah, but it also contained all student contact details
 
7:35 PM
ouuuch
 
MS did improve their products since then ...
 
I think you can now actually encrypt them for read access
 
still, i'd rather do open source than asp
 
The first "programming" I got introduced to was when my dad had some old ZX Spectrum and MSX Basic computers that I got to play with as a kid.
 
I did a very little amount on the amiga, then it really got going when I found out how to illegally download a copy of VB6
 
7:38 PM
my first foray with programming was a Mac Programming for Dummies book when I was ten, it taught C
 
you're all lucky.. my library only had books about fortran and other obsolete stuff.
 
also messed with BASIC a bit, then wrote programs on my TI calculator for math class so I wouldn't have to memorize formulae, only one teacher let me use it though :(
 
i too had an MSX with basic, but my first basic was GW-BASIC! :)
 
I remember GW-BASIC too!
And qbasic (Quick Basic) :-)
 
yeah! qb4.5!
 
7:40 PM
I've spent 13 hours today writing my work project in TypeScript... and I've not even successfully ran a single file yet
 
then I made a basic program that couldn't compile because qb4.5 ran out of memory... even though it ran in qb4.5 itself.. then I made my own libraries in assembly...
tried borland pascal, c, delphi, never java.. and i love PHP because it just runs everywhere
isn't typescript a MS variant of JavaScript ?
 
Yup
22 files down... 440 to go
 
poor you :)
 
That I'm not even getting paid for weekend work makes it even worse, but I'm mainly doing it to make my own life easier
 
7:45 PM
as long as your partner and kids are happy...
 
Fun recent debugging stories: I spent ages debugging why a ->reduce() on a Laravel collection wasn't working, until I found out I forgot to add the results of the carried variable to it. Then I figured out I was wrong to use ->reduce() anyway and should have used ->sum().
 
If I had either, or even the prospect of either, I'd not be working right now :P
 
partner, children, cat
 
Well she is off sleeping somewhere
 
mine are sleeping on my bed
 
7:47 PM
the kids went to bed at 7PM, wife is reading..
but same here, I'm working now to save time later on
at least i was working until you guys came along :)
 
I wish me working more now saved me time later, I'm a one man team in charge of a huge project that could very well have 10 people on it. I don't think i've done less than a 12 hour workday in 2 months
 
what kind of project
 
I'm lead programmer for an enterprise learning platform.
and by lead, I mean only
 
LMS?
 
then you must be the software architect as well
 
7:50 PM
I am.
I wear many hats
 
for which sector(s) ?
 
Everything from creating training videos, research, coding, infrastructure, kubernetes etc
all sectors, but mainly finance and medical.
 
sounds similar to what I used to do, except my programming was shit
 
It's a challenging job, and the pay is decent enough, not great for the amount of hours, but decent for where I live... I just don't have enough hours in the day, and certainly don't have enough hours to do what I already need to do, and train someone else
 
I only have a single project for one company... makes life easier. Since I'm doing most of the work for free, they allow me some handy privileges
and what do you do now Tiffany ?
 
7:56 PM
@Code4R7 job hunting
 
seriously? I thought you were the hunted one...
 
I wish
 
Sometimes when I google for job openings there are plenty over here.. must be the same in Germany ?
 
my primary problem is I do not interview well, and it is something I'm working on
I can converse easily over text, but through voice, I'm awkward
hurray autism
 
is that an official medical diagnose ?
 
8:00 PM
yes
I received testing by a neuropsych late 2018
I was formally diagnosed with ADHD and autism, and a couple comorbid conditions
 
then your next employer will have a smart, dedicated and hard working employee at a lesser expense...
 
That would be illegal
 
granted, I'm on the mild end of the spectrum, but I still qualify
 
what would be illegal ?
 
Discriminating against someone on a payscale on account of autism
 
8:03 PM
on account of any disability
could be blind
 
/me has that sinking feeling of having used splice instead of slice
 
I don't know about yours, but the society that I'm in is discriminating.. I don't think that it can be otherwise. For starters, they discriminate on intelligence.
 
@Tiffany you are based in germany? or did i misread a message?
 
I just realised it's 8pm... if I hurry I can go to tesco and buy chocolate to keep me going another 6 hours O_O
 
@beberlei I'm in the US
 
8:07 PM
And in our country, being a programmer is what they call a 'free' profession: anybody can claim to be one, so wages vary...
 
that's crazy
 
so it is.
 
That's the same in most places, programmer is regulated almost nowhere
 
yeah, but put someone in a coding interview and it will be apparent pretty quick if someone is BSing or actually knows what they're doing
 
go get that cholocate! and be back soon :-)
 
8:09 PM
granted, someone could just cram for a coding interview, but that's not foolproof
 
I have a bachelors of engineering so I call myself a Software Engineer, but it didn't seem worth it to write the project file to become a Charted Engineer
even though my degree was accredited by the BCS
 
while it's not really fair, the best paid job i ever got was through a connection in my personal network
 
"it's who you know, not what you know"
 
and as a result, i worked some years for the devil. now i'm trying to make it up to the lord. as a figure of speech, really :)
 
Unless you're going to blackmail someone for a job, then it's what you know about who you know :P ... afk
 
8:14 PM
at least, you need to know who is doing it with whom, and why.
and realise that things are urgent || important, never both
I was never accredited for programming... I just started when I was 11..
29 years ago...
say, did anybody give FFI a try already?
 
a few people have here, there's a dude building a tool, trying to remember exactly what it does
Dec 5 '19 at 6:07, by lisachenko
@Tiffany morning! My main target is to finish lisachenko/z-engine library and make it awesome, to provide new features for PHP developers and even allow them to write their own extensions. Beside that it’s new knowledge, experience and fun for me )
 
cool, thanks for digging that up
 
8:34 PM
@Tiffany Not just disabilities. Gender, religion or life philosophy, desire to have children, race, sexual orientation, gender identity, nationality, political orientation -- all grounds here that can't be discriminated upon. But it still happens.
And then unfortunately you have to prove it.
 
@MetaBergman yeah, I know, I was being lazy in not including them
 
I'd like to think autism not to be a disability, but a different way of thinking.
 
and I'm fortunate that I have the formal diagnosis
@Code4R7 it is, but there are some disabilities tied to it, like learning
 
Some IT-people with autism that I personally know are really good at what they do, reliable, and deliver on time.
 
granted, for me, my learning "disability" is that I learn really well via relation, but I'm almost shit at any other form of learning, especially lectures
 
8:38 PM
lectures are the worst way of learning for almost everybody. I heard some research saying that only 10% of what is said is actually remembered...
 
tell me to do something verbally, and it can take me a minute to figure out what you mean, if I'm unclear on any wording
part of it is taking the time to process what is being said, understand the words, and then the context, ... it takes me time :P
plus if I mishear any words... that makes it even harder
but I'm used to asking people to repeat themselves if I'm unclear on anything, or I will follow-up with a question to resolve any confusion on my part
 
at least you think about what is being said
not many people do the same :)
 
They didn't have any chocolate cakes I wanted... so I bought a giant bag of mini eggs instead... meant for an entire easter hunt :|
 
hahaha
 
8:42 PM
haha easter! when will that be ?! :)
some months from now!
 
they sell easter stuff early...
 
They start selling those really early here.
 
I don't know... but I don't expect the 10 mini bags within it to last the weekend, nevermind till easter
 
Like, I bought those quite some time ago.
Hahaha.
 
valentine's day stuff went on clearance on February 15th, and the same day easter stuff was going out
 
8:43 PM
I think they started selling easter stuff here before valantines day even.
 
you're in the US too @MetaBergman ?
 
I am in The Netherlands.
 
me too
We had oliebollen until Valentine's Day
one needs to vary on chocolate :)
 
I changed my mind. Staying up working on TS another 6 hours is a terrible idea.
 
it is
for some quality time: youtube.com/watch?v=ByKuc7421c8
(don't take offense on the nude)
 
8:54 PM
It's blocked in the UK anyway, so my delicate sensibilities are protected
 
It's lipstick on your collar from dennis potter, you've probably seen it years ago
why on earth would UK heritage be blocked in the UK by YouTube? :)
anyway, i'm off too, have a nice evening
 
9:24 PM
It's Saturday night and @MarkR is playing with TS. Welcome to the club. :D Hopefully it's not work related
 
It's all work related :'(
I'm just hoping I can find a way to use typescript modules from plain ol javascript or im fucked
 
you can, we just import them in .js files, i assume you use webpack with the typescript compiler?
 
I've honestly not got that far yet :S I've not used webpack for it though, all the existing assets are served through a custom packager that does some additional stuff beyond just packing so I suspect i'll have to separate out the JS
 
why are you making it hard for yourself? :-D
 
Sounds like a special kind of hell...
 
9:32 PM
It was designed to handle pushing dynamically created files to remote filesystems
Life would be significantly easier if IE11 would just hurry up and die so I could use css vars
 
i don't understand, don't you just tell typescript to compile down to ie11 level?
2
Q: Typescript and promises in IE11

PrestonI'm working in Typescript (v2.4.2) using Webpack to compile. Everything compiles fine, but when I run my code in IE11, I get the following error: 'Promise' is undefined. Here's my tsconfig: { "compilerOptions": { "outDir": "./wwwroot/js", "sourceMap": true, "allowJs"...

the q is about something else, but it shows it works
 
I think we're talking 2 separate points, my first statement was hoping I could access typescript modules from plain old javascript
 
yes, so in a webpack project you define javascript modules, and they can import ts modules. its all compiled down to a single (default) or chunks of js files in es5
our entrypoint script in webpack is javascript, and we have a lot of js code still in tideways, but 30-40% of it are converted to typescript now, it all includes each other
 
Well that sounds promising.
 
if you want we can video chat monday and i show you how we wire it up in a screenshare
 
9:39 PM
That might be very helpful, thanks!
I've only been working in Typescript for about well... literally 1 day. The language seems easily portable from knowledge of other languages, the tooling, not so much
 
with modern javascript you have to put it all in webpack, it is a beast but once you tame it everything becomes niceish (the most nice level of javsacript relatively ;-))
 
What's it like for live editing, or does it need to be recompiled every time?
 
it's been a while but I remember using file watchers for doing that
 
you can put the compiler in watch mode and even configure webpack to hot reload in the browser
 
we currently use a file watcher command that recompiles the parts that changed, but there is also a webserver
so you hit f5 in the browser on your php page, and it loads the instant reocmpield code from localhost:80xx which serves the javascript
 
9:46 PM
docker support I assume?
 
i don't know, we use vagrant :-D probably yes?
 
I shalt take a look
 
are you on mac or linux?
 
Windows
 
that wasnt the answer i wa slooking for ;)
there is this answer here stackoverflow.com/questions/47318386/… - from 2017 but i wouldnt expect it to have changed too much
 
9:57 PM
Ta, when I get that far i'll see if I can run it through my front facing nginx proxy
 
10:28 PM
for production you would build it into a file then though, and serve statically
 
I realized I'm shit at writing commit messages
Especially late at night
 
git commit -am "Various fixes" && git push remote head
 
Ain't sure that works for php-src :')
 
It works for everything, it's the skeleton key of git messages.
 
10:42 PM
$numbers = Array
(
[265] => 25
[658] => 10
[288] => 20
[234] => 65
)

lets say we dont know the numbers in the brackets, how can I echo them ?
I tried this but it echo the value of the first number, instead of number itself (inside the brackets);

echo $numbers[1];
 
@user198989 $keys = array_keys($numbers); echo $keys[1];
 
Fast beberlei
 
@beberlei thanks a lot <3
 
@Girgias :)
 

« first day (3416 days earlier)      last day (1515 days later) »