« first day (3390 days earlier)      last day (1776 days later) » 

01:40
@Sherif I know someone who still uses Model M keyboards, he spent a couple hundred or so for it.
I can't remember, but I think it was an original Model M, but the person selling it changed the cord to use USB
part of why it was so expensive
good lord, that used to be 4700 USD in '96...
and Apple products havent got much cheaper since :P
My first family computer was a 300 Mhz Pentium II
A Compaq
Sheesh... you guys were already in the hundreds of megahertz
I had a 33Mhz processor with a Turbo button
me feels old :(
Well that was the first PC. I remember comodore 64 and amiga days
@Tiffany Which is $~7700 now. That PC I had was almost 3x cheaper with so-so config approx $1700.
If it wasn't Apple IIe it didn't make sense
Let's tell the truth
01:54
It only cost me £3000 to build a very high end PC recently
Prices have certainly come down
(unless you buy apple)
Add one more zero to that price tag for Apple
12 cores for under £500 is nuts.
Yay AMD
Dude, I just ordered a fully souped up Mbp for ~$9K on apple.com
That's INSANE
Apple has gone beyond a luxury brand. It's simply shooting for only the supper rich.
They charge $500 for an SSD upgrade FFS!
That's like twice what the drive is actually worth
Anything that would require me to take my device to something called the "genius bar" to recover can get fucked IMHO. I ain't got time for that.
@Sherif How did you do that (is that in US or somewhere else)? I can't check more then 61 hundreds on website configurator.
02:03
@Tpojka I added a monitor and the graphics extension
Comes to like $8891 with tax
Oh, then... :)
 
1 hour later…
03:11
Only 431 more Karma to go :/
03:30
macbooks have always been for people with more money than sense
04:17
I suppose I have more money than sense :/
I have to admit, they do last forever
no laptop lasts forever, it ends up in the bin in a single piece
I do have a 2010 Mbp that still works fine.
Can't say I've ever had a PC laptop that lasted that long
The quality and longevity more than justifies the price tag.
you just admitted the price was insane ... either it's insane or it's reasonable, but don't complain about it being insane and then try to wear the apple badge with pride ... either you're insane or not ...
oh, it's insane alright
I just admire the fact that they last so long :)
And they keep getting more expensive for some reason.
04:25
nothing justifies the price tag though, absolutely nothing, and you just said that ... and now you want to find justifications for it ... there aren't any, you're silly for having paid so much more money than the machine is worth by your own admission ...
Who said I'm trying to justify it? I just said it was insane.
> I have to admit, they do last forever
> I do have a 2010 Mbp that still works fine.
> Can't say I've ever had a PC laptop that lasted that long
I can both find the price outrageous and admire how long the laptop lasts. Those aren't mutually exclusive things.
@Sherif After scrolling up… a regular macbook is one thing, but there is a limit to sanity, and $8891 is well past that limit.
and then aaron said crazy stuff, actually said it was justified ...
04:27
What does that have to do with me?
you were talking in the same way "well it costs a lot but it lasts longer than anything I ever owned" ...
Remove the but
that sounds like you trying to say it's reasonable to pay the premium
No, it doesn't. Because I never said those things were exclusive.
You're trying to make it sound like I did by conjoining them in a single sentence.
The $2-3k macbooks are definitely worth it IMO.
04:28
that's how it sounded to me
but you end up throwing it in the bin ? how you could throw away 2k ?
we must have very different lives
I've never just thrown one in the bin.
but you will, eventually, all laptops end up in the bin
@JoeWatkins Because you continue to draw the false assertion that I find those two things mutually exclusive. They aren't. I can both appreciate a $200K Ferrari and find its price outrageous. How is that so hard to grasp?
generally laptops are a huge waste of money, but at least a normally priced one lasts a few years and is convenient, and if you neeeed a laptop then there's no replacement for that ... but paying premium prices for middle of the road hardware - which is what macs are - makes no sense, especially if you're going to buy a laptop one and have to throw it away eventually ...
@JoeWatkins I usually sell them. I have a 2014 Macbook pro. Quickly looking on eBay, the seem to go for around $600 yet.
If memory serves, I spent about $2200 on it.
04:33
okay but you see the point, eventually someone will throw that thing in the bin, maybe with more ram and a bigger disk in it, but exactly as it was bought ...
that's too painful to think about when the price tag is in the thousands
So $2200 - 600 = $1600/5 years = ~$300 a year. Yeah, that's worth it.
@JoeWatkins You could apply that argument to almost any piece of tech.
but not when you compare it to reasonably priced hardware made by a reasonable manufacturer ...
So I shouldn't have bough my TV for $1000, because someday I will throw it in the bin.
@JoeWatkins I bought a lot of PC laptops in the $500-$800 range and recall every single one of them crapping out on me in less than 1 year. I bought a ~$2K Mbp in 2010 that still works 10 years later.
Can't say I agree with you there.
Apples to oranges.
I do apply that to every piece of tech
04:36
I have to agree with Joe.
there aren't any 1k television sets in my house ...
I never liked how expensive Mac laptops were.
We live in different worlds.
Your logic is clearly unsound.
oh there's a 60 inch uhd tv, but it was cheap
not made by samsung or whatever, I don't even know who made it ...
04:37
If you're wiling to pay $500 for a laptop you'll have to replace on average once a year instead of paying $2K for a laptop you'll have to replace on average once every 6 years, mathematically you are losing money, not saving.
Oh there is that one thing about Mac Laptopcs.
well my daughter has had the same laptop for 5 years now ... the mousepad is looking worn, but otherwise it's still fine
You could not repair them your self. Up until last year. If anything happened. You basically had to buy a new one.
we've upgraded the ram and disk in that time, and it's not the fastest machine ... but it's not at all my experience that they last a year
I doubt your daughter uses that laptop the same way someone who works on it for a living does
04:39
Ppl woring at the Apple store would discourage you from trying to fix it. For greater profit for them.
My laptops practically run 24/7
Is been well documented on the net.
no she's much rougher with it, have you ever seen a 15 year old play on a laptop ?
Rough in what way? What tends to blow laptops up is CPU usage, not necessarily physical damage.
That applies universally to all laptops
Laptops are smaller, more compartmentalized, and thus CPU heat tends to break down their components more quickly.
04:43
she's physically rough with it, playing games that require the keyboard to be smashed, and she's a child and looses games and literally smashes the keyboard (hopefully less now), but besides that it sits on her bed and cannot cool properly, it's usually about 4 million degrees centigrade, it's never ever turned off ... trust me, it's abused more than anyone abuses their work machine ...
@JoeWatkins Constant overheating is a sign of permanent damage. When a laptop reaches the point that it's always overheating and the battery rarely holds a charge that's what I consider a blown-out laptop. Time to get a new one.
I have to use this laptop to make a living. I can't afford for it to be damaged or to slow me down.
Now, there are a few PC brands out there that make decent laptops. Some might even last as long as Mbp on average, but they are pretty expensive on their own.
oh to be fair the battery is fine but we have actually replaced that once, it must have been more than two years ago
@JoeWatkins Yea, replacing a component is definitely proof it was damaged.
:)
I've used it to work, it's fine ...
If you say so
04:49
when you put it on a desk the fans are normal, but they have to work hard on her bed where there's no circulation ...
she has a desk ...
doesn't use it ... she also has a thing it's meant to sit on with fans on, doesn't use that either ...
@JoeWatkins You bought a cooling accessory for her laptop?
yeah, for the bed problem
it's not just that she has it on her bed, it's usually on top of a blanket so the vents at the side are partially blocked and it's really loud ... but she won't use the thing, it uses one of the usb ports ...
I guess if she's playing games on it, but I definitely rolled my eyes at the thought of needing such a thing.
if she would just put it on anything other than a blanket ... I didn't just buy the cooling thing, I bought her a sound system for it (she plays musical games a lot) and set it up on her desk thinking she'd have to move ... she just moved the sound system to the bed ...
lol, kids… what ya gonna do, can't live with 'em, can't sell 'em…
04:58
oh my tv was more than 1k in dollars
only just
but but, stuff that sells in the usa for 1k in usd, tends to have the same price tag in uk (1k gbp) and eu (1k eur)
regardless of exchange rate ...
your 1k usd samsung sets are 1k eur here in other words ... we don't do that ...
you can get them for half that price and we did, and it's made by "TD systems" ... so "nobody" ...
One thing to remember when comparing USD to EUR prices is that US prices usually don't include sales tax, while EU prices include VAT, etc.
So we typically actually pay 6-10% more than the price you're seeing.
that's your vat rate bracket ?
Where I live the sales tax rate is 7.625%
18% here
That's ridiculous.
05:05
yeah, and this is the best rate I've ever had (in spain) .... in the uk it's 20%
But that $1k TV actually cost me $1076.25 at the register.
what's really painful is thinking about buying something like a new car ... and having to work for several years extra just to pay stupid tax ...
on a new tv, the tax man gets a couple of hours of my life ... but on a new car ... I'm his bitch basically ...
Hey fellas, got a quick php question. In Java you can reduce the visibility of public properties to private in the inherited class but why can't you do that in php. Thanks
 
1 hour later…
06:35
@user31782 WAT? I think you mean the inverse. You can loosen the visibility, surely, in the subtype not tighten it.
You can do the same in PHP.
Going in the opposite direction is not possible.
hmmm, I guess you can do that in Java.
weird
Why would reducing visibility be practical?
@Sherif I mean re declaring public properties of class as private in the inheriting class. I have asked it as a proper question softwareengineering.stackexchange.com/questions/404322/…
06:50
@user31782 Yeah, you can't do that in PHP. You can only widen the visibility in the inheriting class. I had no idea that was even possible in Java.
Why I wanna do is basically. I want some grandchild classes which don't have any properties from their grandfather
@user31782 Well, the good news is private properties don't inherit when you redeclare them in the child class.
Even in php what is the reasoning for such a language design?
Yes. But I have for some reason a couple of public properties in Father class
@user31782 If you don't wish to inherit them from the parent redeclare them in the child.
@user31782 3v4l.org/dsshE
But then they'll have to be redeclared as public again
06:53
Yes, they would.
But that's fine. In PHP objects don't actually have to declare public properties
They're available defacto
$obj->foo = "bar"; // doesn't even require a decleration
If you want them removed entirely you shouldn't be extending the class at all.
I actually needed $obj->foo to throw error
@user31782 Well, that's a different issue. Can you explain to me why you want such behavior?
It's possible. I'd just like to know why so I can give you a good way of implementing it.
Just a semantic thing. To avoid confusion in code
@user31782 The only way to prevent public properties from being assigned like that in PHP is to implement __set magic that does it.
But you're gonna have a bad time :(
It's more of a conceptual question at the moment. I was stuffing around with abstract classes and just saw in the php.net manual page on abstract classes.
I first thought this is a thing only with abstract classes, but they didn't specify this also applies to normal classes
06:59
@user31782 3v4l.org/ivnYo
Nah, that's too much. Magic methods, IMHO only obfuscate things more.
@Trowski why is a high vat ridiculous? It just means more money for the state to transfer to other goals
It's gonna excetue __set on any undeclared/private property access
@user31782 Yes, that's how set works. Again, that is the only way to achieve what you want in PHP.
You have to remember PHP neither supports nor requires variable declaration in the first place. So by default all variable/property assignment is assumed to be legal unless explicitly made illegal.
If you understand this part you understand why $obj->foo = 'bar' is not actually confusing at all.
But if you come from a language like Java, then yes perhaps it is a bit confusing.
I come from javascript actually
07:06
Then it should be even less confusing.
At least PHP doesn't default to globals.
Have never been a fan of oop. First time, I've started learning proper oop
Welcome to complexity
I am an anti oop programmer originally since I was taught oop at school :-p
I loved the revealing modular pattern in js
Just limited oop for encapsulation and all functional programming inside the modules. Best approach
Anything I can do in a functional paradigm I can still do in an object oriented one. You just have to shift your thinking a little. Still the same brain under the hood.
I've started to see the idea of oop actually. Like the DOM, I think inside the brpwser they'd have classes named, html, div, p... which gives us the whole dom api
It hit me from the iterator interface in php. Apparently they execute for-each loop through that interface.
Why how'd that little guy get up there
Throwing those accusatory looks :(
In OO-oriented languages you typically need OO on the outside to get to the functional on the inside (and yes that's intentionally "OO-oriented")
@NikiC am I invited to that internals meeting or does my single commit to php-src not count?
08:20
yo phomies
cmb
cmb
08:31
\o
08:46
There's an internals meeting?
It's called mother's union
where they argue about the colour of grass
@Jimbo that's no laughing matter. the intuit have more than 68 words for the different shades of green
some mean brown though
@Gordon Well, I guess I'm gonna start committing to README more often
:p
hmmm, now I'm actually curious when the last time I committed to php-src was
I know it's been a while
@Gordon *not invited to party* :'(
> Author: Sherif Ramadan <[email protected]>
Date: Wed Oct 30 09:36:19 2013 -0400

Merge branch 'pull-request/287'

Add ability to use array keys with array_filter().
This adds a third (optional) argument to array_filter() that will determine
what gets passed to the callback, the array key, value or both.
The third argument can be one of two constants: ARRAY_FILTER_USE_BOTH or,
ARRAY_FILTER_USE_KEY.
hmmm
7 years... not bad
09:00
moin
I guess I don't qualify as "regular" huh
you need more fibre
or maybe just less time at work
oooh, look at this nasty commit
> commit 4968fa644b0849321e1761e52b8db15dd46f9b75
Author: [email protected] <googleguy@googleguy-virtualbox.(none)>
How'd that make into php-src
yikes
Today is "curmudgeonly", as requested by @StatikStasis
Interesting. It sounds like it should be an adverb, yet it's an adjective.
"He's a curmudgeonly bastard." doesn't sound right
09:09
"He bastards curmudgeonly"
See now that sounds like it should make sense.
09:21
Hey look at that Alphabet became $1 Trillion company this week
And here I was thinking amazon was gonna beat them to it
So now we got what MS, Apple, and Alphabet. 3 Trillion dollar companies in tech (amazon falling slightly behind by ~70 billion). Facebook needs to be removed from the FAAMG. But then we gotta call it GAMA. Sounds nicer.
Hi i am new to php
can someone help me with this post? as i am trying to use array_rand to randomised the array rather than using shuffle
0
Q: PHP Quiz Array to be displayed randomly

ShaneI am currently using the code found on PHP quiz with on screen results which is grade.php: <?php $Questions = array( 1 => array( 'Question' => '1. CSS stands for', 'Answers' => array( 'A' => 'Computer Styled Sections', 'B' => 'Cascading Style Sheets'...

09:40
@Gordon Nobody has gotten a formal invitation yet - they just reached out to some to check whether there's general interest
@Sherif no no. This is MAGA ... you know the companies making america great again :-P
@bwoebi oh dear lord
haha
I specifically avoided MAGA
Technically though that is the descending sort order by market cap
How ironic is that?
@hellopanda that's not a good way to do it. array_rand() returns a single random key from the array, it could quite easily return the same key 10 times in a row
why do you not want to use shuffle?
Anyone ever had an issue with broken session encoding? For example, s:7:"£"; should actually be s:2:"£"; I'm storing sessions in Redis if that helps?
09:51
You 100% certain that there aren't some invisible characters in there?
get a hex dump
also it may be that something has read it in text mode at some point and mangled it
(similar to the old problem of transferring binary files via FTP in text mode)
Nothing else reads the session store other than PHP's session handler
@bwoebi Well, anyone who has been reached out to should consider themselves formally invited ;)
Guys I need your help. I have a question: "Is it true that log2n = O(n^2)?". What knowledge do I need to have to answer this, without someone telling me the answer?? I went away and learned exponents, logarithms etc, so I understand log2n=X is the same as 2^X=N, but that doesn't help me with this question.
@NikiC True
@BenFortune generally I would say "no", PHP serialize() is a very well tested code path and I'd be very surprised if there was a bug in it, it seems highly likely this is down to something external to PHP
09:54
@Jimbo ... wat
@DaveRandom Just remembered we're using igbinary too with session.serialize_handler=igbinary
It could be redis related but that's where my ability to make useful observations stops
@Jimbo That's so wrong
@BenFortune ah well that makes it more interesting
Are you trying to understand Big O?
09:55
and again puts it outside the realm of stuff I can talk about confidently
see if you can find any sort of pattern, is all I can suggest
@Jimbo The answer depends on which O() we're talking
like is it always $correctLength + n, is it specific chars that do it
Fair enough, the pattern seems to be that session_serialize is calculating the wrong lengths for multibyte characters
If we're programmers, then that is patently wrong. O(log 2n) = O(log n)
09:56
@Sherif Yes, to a good level.
and have a look at hex dumps, see if there are any extraneous null bytes leaking in or something
I need to understand what logic I can go through, and apply to other questions like that, in order to be able to answer confidently
If we're mathematicians, then it's true, because log n is asymptotically upper bounded by n^2
@Jimbo You know who has a really good thing on that: Gayle Mcdowell google her videos
@BenFortune I wonder if it's always calculating 4 bytes (assuming UTF32) or something
09:56
@NikiC Okay so I need to understand "upper and lower bounds"?
also bear in mind that in general PHP is not encoding aware
so it may be bad input data in one way or another
@NikiC though if you are mathematician you don't really use = but rather is included in
(i.e. it's not necessarily computing anything regarding multibyte chars, all it sees is a byte array)
hmm, that's my £
that looks like UTF-8
09:59
Page encoding is UTF8
Which probably makes sense, would that actually affect the session store though?
it could be that there are some zwnj or zws or even nbsp or something in there that is being stripped at some point
but honestly I got no concrete ideas
@Jimbo and @bwoebi might know relevant stuff about redis?
Yeah, we've had a bug for a few months where people are randomly losing sessions and I've only recently managed to pinpoint it down to this
for a start, is redis text-based or just binary?
i.e. is it encoding aware?
10:01
especially since the error messages for session_decode are crap
I think it's binary, one sec
It can be either, that doesn't help 😃
standard :-P
I would say start by checking that the whole infrastructure is UTF-8 all the way through
@DaveRandom binary safe
(or binary)
make sure nothing is getting randomly interpreted as ISO-8859 at some point
or UTF-16 if you have any windowsy things
I actually think we have a couple legacy files in 8859
but PHP clearly thinks the input string was 7 bytes at the point of encoding with serialize()
check for leaky BOM as well
10:04
@DaveRandom as i only want to display 10 out of 20 questions
@DaveRandom boms are not 5 bytes (but 3)
@hellopanda shuffle() and then array_slice()
@bwoebi no but maybe an nbsp or sth
or even just whitespace being trimmed somewhere
or just some nulls
clearly there are some extra bytes being stripped at some point
but encounter errors as i do not know how to manipulate the code
are you able to help? @DaveRandom
10:06
the problem with array_rand() is that it will repeat results
and 10 out of 20 you are very likely to get a repetition
Error is this Undefined index: Questions at line 77
understand, hence i tried using shuffle and slice
managed to shuffle but once reache array sliced i encounter the array
@hellopanda your array key is Question not Questions
@DaveRandom do you mind spending some time looking at my code? i have posted in the stackoverflow question stackoverflow.com/questions/59928432/…
> 'Question' => '1. CSS stands for',
> <h3><?php echo $Value['Questions']; ?></h3>
'Question' != 'Questions'
sorry which part do you mean?
are you referring to the if statement?
10:11
There are 2 hard problems in Computer Science: Naming things, cache invalidation, and off by one errors.
sorry i dont get it... :(
that's what she said
@DaveRandom AHHHH understand!
you genius
@Sherif thank you too
what about me, I'm also here ...
Yea, why would you leave Joe out?
That's just rude.
10:16
Thank you everyone in the room!
@JoeWatkins hey you!
hey bob
Found this on main earlier, which fixes all the broken sessions I've run through it.
preg_replace_callback(
    '/s:\d+:"(.*?)";/s',
    function ($m) {
        return 's:' . strlen($m[1]) . ":\"{$m[1]}\";";
    },
    $session
);
right in the feels
@BenFortune s:3"\" " BOOM
I just brokeded your regex
10:22
./index.php: text/x-php; charset=us-ascii hmmmmmmmmm
today is happening much slower than I'd like
indeed
10:44
anyone tried using ordered list in php tgt with foreach looop?
i tried using it but the ordered list always starts from 1 again
any advice?
What do you guys think of the repository pattern?
I've never found a clean implementation that deals well with relationships
One of the benefits of the pattern is reduction of query re-use
but on the other hand it strives to be independent from a framework/ORM
so if I'm for example using laravel I could supply the repository with a base query to constraint the results to a relationship: e.g.: $ordersRepository->index($client->orders());
but this couples the repository to the Laravel Eloquent ORM

« first day (3390 days earlier)      last day (1776 days later) »