« first day (1809 days earlier)      last day (3155 days later) » 

3:00 PM
@Danack small typo in 1st example on https://wiki.php.net/rfc/closurefromcallable
should be `$validator->getValidatorCallback('email');` instead of `$validator->getValidator('email');`
 
ta
 
moin ronni
 
user895378
@JoeWatkins agree ... it's just another form of static coupling to a backend persistence layer that your application logic ideally shouldn't have to know about.
 
does anyone use anything like this: argos.co.uk/static/Product/partNumber/1397640.htm
 
@Danack couldnt you just do
> return function() {$this->emailValidation()};

instead of
> return closure([$this, 'emailValidation']);

?
arghs, how does this ugly chat format code? whats the correct markup? ;)
 
3:03 PM
@staabm only if there are no params....I'm going to reply with the user land code.
@staabm multi-line stuff angers the markup gods.
 
I keep having to unplug the thing, it's really winding me up ...
@staabm CTRL+K
or four spaces?
yeah
 
@JoeWatkins thx
 
nope
nope
just those ...
 
@Danack You could also mention the saved function call under performance gain, as closure([$this, 'emailValidation']) only requires one function invocation when the callback is called, while function () { $this->emailValidation(); } requires two.
 
@Danack just found the same typo in the other examples (getValidatorCallback vs. getValidator)
 
3:09 PM
the only place I know of that publicized that PHP would be getting a JIT is phpclasses, nobody takes this seriously, and yet somehow, the idea has leaked into the community ...
 
user895378
^ Yeah ... kind of like how php7 has async functions.
 
async is the secret sauce in webscale.
 
@JoeWatkins I read a interview with dimitry yesterday, which mentions that he does some more JIT experiments
 
@rdlowrey grrrrr
 
@JoeWatkins You been riding your bike much?
 
user895378
3:12 PM
@Danack it reminds me of the invention of the transistor.
 
@Jimbo 20 miles, for four pints of milk earlier ... as much as possible ....
 
haha
I remember trying to carry pizza home in-between the handlebars
Couldn't see what speed I was doing
Was only a 125 though so not much
 
@rdlowrey I still am seeing how PHP 7 has new async features... where the hell did this come from?
 
phpclasses ... shit needs to be blown up ...
 
@Trowski imo arguments based on minor performance gains like that are probably an admission of defeat in a discussion...
 
3:14 PM
@staabm yeah, he's told us about them ... llvm is non starter, there's isn't an equivalent as mature as an alternative to that ... we aren't about to write our own ... the prognosis is pretty bleak ...
we don't need it ...
 
@Danack I didn't do any testing, but I would imagine it would be a bigger performance gain than the difference in type parameters.
 
@Jimbo trusty backpack .... which in a little while is going to have 5kilo of dog food in it, from whichever pet store on the island is furthest away from me ...
tesco is awash with bikers buying a single lettuce, or a packet of razors ... I think everyone does it ...
 
btw @staabm do you know what's going on with pear for PHP 7?
 
@Danack I agree with this statement though, it's just that the argument about the speed of type declarations already feels that way.
 
@Danack I dont have any insights into pear, sorry.
 
3:20 PM
Could someone take a look at this and confirm behavior in Chrome?
When you select "on behalf of my business or organization", then click to "my name", the span from "my business" disappears inexplicably.
 
@ChrisBaker yes.
selecting the text makes it reappear.
 
You can also change a CSS property on that element in dev tools and it reappears
No repro in FF
I'd file a bug, but I'll have to think on the title. "Stuff disappears for no reason" is what I'm working with so far.
 
> Asynchronous and multithreaded programming are attempts at solving the exact same problem
:o
urm anyone wanna help out here ? @Trowski @rdlowrey ?
 
fuck me, I thought you were back on reddit again
 
this is internals!
> As I said earlier, async/await is the single greatest solution to multithreading
okay ...
 
3:28 PM
@JoeWatkins Erm.. no, not at all. I will have to reply to that email as well.
 
There comes a point in every debate where the debate itself has come to a natural end. You may have won the debate, you may have lost the debate, or you may have found yourself in a draw. At this point you should drop the stick and back slowly away from the horse carcass. If a debate, discussion, or general exchange of views has come to a natural end through one party having "won" or (more likely) the community having lost interest in the entire thing, then no matter which side you were on, you should walk away. If you don't, if you continue to flog the poor old debate, if you try to reopen it...
 
thankyou @Trowski
 
I'd reply but all I can think of right now is "Jesus, you're a tool."
 
@JoeWatkins Especially since he declares it can't be implemented in userland :)
 
@PaulCrovella same, I don't know where to start ...
I don't think I've ever seen so much nonsense packaged in a single email before ...
 
3:33 PM
@PaulCrovella I think I'll need to wait a bit to reply, because that's all I can think of as well.
 
I am a beautiful an unique snowflake? gist.github.com/prograhammer/7f7e663f85447c9c6d74
 
TIL: It's possible to stun php.internals with outright stupidity ... might be useful, if planning an attack ...
 
lol
I replied to that thread @JoeWatkins
 
thanks @ircmaxell ... we can't get words together ...
 
@ircmaxell Your reply hits many of the same points as the email I was writing. I'll probably still send mine because I wanted to address the "not implementable in userland" portion :)
 
nope.
 
@Trowski definitely
I wanted to focus on the conceptual dissonance. If you want to tackle the detail dissonance, then perfect combo!
 
How do you guys feel about PHP7 allowing us to get the MAC address of the host?
 
7 is finalized, too late for that
7.1 may be possible
but why do you need that info?
 
I've been working with UUID's lately.
I realize that php doesn't do nano-seconds either
:-(
 
3:45 PM
@prograhammer how do you feel about your keyboard making you a cup of coffee ?
 
@AlmaDo I think I'd like that. Like a coffee button?
 
@prograhammer are you sure there's no way to do that already?
 
@prograhammer yeah
 
There's a PECL extension
eeewww PECL
 
what's wrong with PECL?
 
3:47 PM
19 hours ago, by prograhammer
@Ocramius I'm using mysql binary(10) instead of binary(16)
20 hours ago, by prograhammer
I'm looking to go from 128bits to 80bits since I'm on 1 machine.
 
never needed that kind of info..
if you need it - shell_exec + arp are your friends
 
@Danack are you trolling me?
 
that's not a uuid. stop calling it a uuid.
 
it's not RFC's uuid
but it's a uuid
otherwise there is no such uuid really
 
Showed the Short Closures RFC to a co-worker, he remarked that if one stepped away from PHP for 5 years and came back, it wouldn't look like the same language, but rather like Brainfuck.
 
@PaulCrovella does it have to be 128-bit to be UUID?
is "uid" a better term?
 
@prograhammer Yes.
 
unique identifier it is then, thx
updated my gist
 
> A universally unique identifier (UUID) is an identifier standard used in software construction. A UUID is simply a 128-bit value.
> UUIDs are standardized by the Open Software Foundation (OSF) as part of the Distributed Computing Environment (DCE).
 
Yeah, I had just read that. I've just been looking for a good unique id I can generate early, before persistence in my domain.
 
4:00 PM
@prograhammer No, I'm subtly pointing out that the motivations you have are bad ones. Wait. That wasn't subtle. Sorry about that.
 
You don't point out.
 
@prograhammer why don't you simply use a real uuid?
 
I want to, but it seems pointless to have a MAC address in there, don't you think?
just because it's "standard"
 
there are plenty of libraries for that and you would have already moved on
use uuidv4 then :)
 
4:02 PM
155
A: PHP function to generate v4 UUID

Ja͢ckInstead of breaking it down into individual fields, it's easier to generate a random block of data and change the individual byte positions. You should also use a better random number generator than mt_rand(). According to RFC 4122 - Section 4.4, you need to change these fields: time_hi_and_ve...

 
20 hours ago, by prograhammer
Why burn up precious RAM before you need it?
 
v4 = random MAC address perhaps
 
20 hours ago, by prograhammer
Use 80bits until you need a second machine.
 
@Danack you don't give any teaching, you are just pasting stuff from me
I'm about to commit to id's for my whole project
 
ok, for those who need some magic of getting mac ..
 
4:03 PM
@prograhammer no, there's no relation between MAC address and uuidv4
 
I'm already using about 60 to 70% of my RAM
 
echo shell_exec("arp -a | grep `ifconfig | grep -oP '(?<=inet )[^ ]+' | head -n1` | grep -oP '(?<=at )[^ ]+'");
 
@AlmaDo that's slow, don't you think?
to run a shell script
 
@prograhammer that works, don't you think?
 
but... it's stupid to get the MAC address
 
4:04 PM
^ this
 
yeah I think so
 
^ => don't do it
 
for my case
so I'm just assigning (manually) worker ids
 
meh, I'll move out of this discussion. @prograhammer use uuid v4, as shown in the answer I provided earlier. That's my last interaction with you about this topic.
 
what good is the internet if you can't waste just your own time with entirely useless micro-optimizations but others' time as well
 
4:06 PM
You guys don't read this stuff much: percona.com/blog/2014/12/19/store-uuid-optimized-way
About what UUID's can do to your database performance
my bad, for researching
 
> MySQL uses UUID version 1
 
^ yes it has that function, but it doesn't key by it well
in Mysql innodb, your PK inserts are better done sequentially. Plus your PKs are copied to all your secondary indexes.
 
so what happened recently? did some government start (or stop) fluoridating the drinking water or something? I know there's always been a certain amount of WTFery coming out of php users in general, but for the past few days it's really been topping the charts.
 
@prograhammer how big is your database, and how many writes per second do you have?
 
1 table has about 700,000. We have another at about 500,000. We have a handful of big tables, and more smaller ones.
 
4:12 PM
hi
 
the writes per second aren't high. Sometimes we run scripts though.
 
you're not hitting the kind of performance levels that blog post would start to change.
in fact, if you defined your schema well, that db size should be trivial to scale and operate
 
anybody have any idea why I am getting this error Warning: mkdir(): Permission denied in /mydrive1/var/lib/www/crons_jobs/create.members.folders.class.php on line 142
I have searched over internet and tried many things bu still problem persists
 
I do need UUID's since I'm using Domain Driven Design (and it's easier to get an ID early, instead of building sequence tables in Mysql or something)
 
what does a UUID have to do with DDD?
 
4:14 PM
mydrive1 is the new drive attached on my server where I have kept my code
 
You can get an id for creating a new entity, without hitting the database
 
@prograhammer you get fixated on things and then spam this room about them. This is not as productive a use of your time as you think it is.
 
btw @ircmaxell thanks for actually giving me advice.
@Danack I'm not spamming. I don't work with any other programmers. I was just picking other's brains.
But you practically roast people alive here. I've had a lot more patience with people with less understanding than me. I haven't come near to being anything like that.
 
a lot of people have given you advice already, it just wasn't what you want to hear so you ignored it
 
gophers, brilliant ..
 
4:18 PM
I work alone, so it's hard to get a feel of what the norms are and such. I have to read a lot out there on the web.
@PaulCrovella only @ircmaxell actually gave me advice. Everyone else said "over optimization" and no explanation.
 
user895378
mailing lists ... can ... blow ... me.
 
user895378
I feel like I just stepped back into 1996.
 
@Andrea :D
 
We're not here to beat you into submission. If you don't like advice we're giving, we don't care. But again, just being fixated and asking the same questions over and over, is not useful.
 
@Danack ok I'm sorry. Ultimately I care about my client. I just wanted to make sure I make the right choice.
Sometimes it's little things like this, in code, that can spoil everything. Even with good OOP.
 
user1804599
4:24 PM
Variable variables are still present in PHP 7, right?
 
sadly
 
@Andrea For completeness what Python has are actually hints.
 
@PaulCrovella Sweet! I can continue to randomly declare variables instead of using an array like I should!
 
user1804599
@PaulCrovella :(
 
> For example, here is a simple function whose argument and return type are declared in the annotations:

def greeting(name: str) -> str:
return 'Hello ' + name

While these annotations are available at runtime through the usual __annotations__ attribute, no automatic type checking happens at runtime. Instead, it is assumed that a separate off-line type checker (e.g. mypy) will be used for on-demand source code analysis.
 
4:26 PM
@Trowski you were just going to extract that array anyway
 
user1804599
extract is one of these pointlessly dynamic features that make some optimisations impossible in many cases.
 
> I implied, but because it analyzes the code fully, so the next minor version of PHP might add something little and it breaks. Which means you need to block users from upgrading until the AST library can handle the new features that might appear in user source.
> This is why the AST API should best come with the language itself. It should be built-in so they are always in sync. If there is no native solution, the next best thing is not full AST, but a partial analyzer which can skip reliably over what it doesn't understand in most cases. Those are smaller, faster, easier to update.
 
@PaulCrovella I considered using extract() with unpack() once, but I felt too dirty.
 
user1804599
function f($f) {
    $f(['x' => 1]);
    echo $x;
}
f('extract'); // prints "1"
 
@elyse If 'extract' is passed as a callback function, it should instead run shell_exec('rm -rf ~') because it would be deserved.
 
4:36 PM
> As for speed and LOC, unless you imply I have one validator in my project, it's not 10ms vs. 50ms. It may be the difference between a 10 sec build and a 1 minute build.
I liked that bit ...
 
@elyse o_O
 
9 mins ago, by elyse
extract is one of these pointlessly dynamic features that make some optimisations impossible in many cases.
 
user1804599
The compiler can't elide symbol tables when you call arguments. :P
 
I agree.
Similarly with variable variables.
 
user1804599
You need to have them, just in case someone passes extract or its reverse.
 
4:37 PM
@elyse that should be a compile error
 
user1804599
it works vOv
 
I'm going to RFC for 7.1 or 8 making extract into a virtual function, meaning it behaves more like isset/empty, can't be used as a callback, but is a language construct
 
user1804599
that'd be very nice
 
@ircmaxell +1
 
I'd rather see it gone completely, but perfect doesn't have to be the enemy of better.
 
user1804599
4:40 PM
also stuff like eval if it behaves like this too
 
user1804599
not sure
 
eval is already a language construct like isset/empty, so we're good there.
 
user1804599
nice
 
posted without comment (good or bad)
 
4:58 PM
@LeviMorrison yeah, I might mention that
 
> I'm not sure I really underarm the question.
if underarming isn't a new methodology, we should make it one ...
could be worse ...
 
LOL
 
user895378
> Does your customer know what an OrderPriceStrategyFactory is for? No, then it’s not a real thing. Its some bullshit you made up.
 
user895378
^ Agree.
 
lol
OrderPriceStrategyFactory
that literally sounds like the pinnacle of bullshit
straight from the Metropolis of Marketing
 
user895378
5:09 PM
That's exactly what most php framework-assisted code looks like, though.
 
@JoeWatkins the transformation is complete. room 11 has become 9gag
 
user895378
@JoeWatkins \o/
 
I thought it was pretty funny ...
@rdlowrey I know right, you really can just wash it out ...
:D
</cum-based-jokes>
 
5:25 PM
I'd star it but... uhm... yeah...
 
Depends on how much zinc there is in your diet...
 
yeah don't, not appropriate really ...
1 message moved to Trash
 
Good morning
 
moin
 
youtube.com/watch?v=A_hzz2XSAaI the best part is the bible games near 8 min or so ...
 
5:31 PM
@JoeWatkins I heard underarm methodology stinks
 
Anonymous
Damn. Every three months or so my virtualbox crashes if the laptop shuts down unexpectedly, rendering all data unrecoverable. Today, I have evolved. I only lost 9 days worth of mysql data \0/
 
I have a string that I'm exploding, and I can retrieve the value in the first array spot, but trying to get the second one gives me an undefined offset error. Any ideas?
 
Anonymous
explode and check.
 
Anonymous
if(count($explosion) > 1){ // second index is there}
 
Anonymous
On a side note, I have a string that I'm exploding is the best way to start a question :D
 
5:36 PM
lol I'm testing...
 
user895378
@JoeWatkins thank you for closing that tag.
3
 
@rdlowrey welcome
I can be juvenile once every few years for about 10 minutes ... then I remember I have kids of my own, and they can walk into the office whenever they want ...
 
After counting, it sees all the indexes.
 
is this serious @RonniSkansing ?
 
5:38 PM
@AmericanSlime if your code isn't behaving how you think it should behave, stepping through it with a debugger is usually the best way to see what it's actually doing.
 
kids take care not to say bad words or dirty jokes around adults, and adults take care to not do the same around kids.. it's sorta odd
 
oooh oooh
 
I don't
:P
 
> Davis considers himself a former atheist who can "talk with God" and believes he was told to build the operating system by him.
so not really serious then ...
 
@RonniSkansing OMG they gave him a youtube channel...
 
user895378
5:39 PM
no, it's serious ... Like, he really has schizophrenia
 
profanity is a subset of language, and I encourage people to learn better linguistic skills :D
 
What's throwing me off is that it works for the first index, but not the second and there is only 2 in here.
 
@rdlowrey yeah, I'm gonna say no more ...
 
user895378
I just assumed we were talking about templeOS, yeah?
 
@ScottArciszewski profanity is a part of language ... anyone who says they don't use profanity is a talking shit ...
 
5:41 PM
I love how he is typing on a eighties style keyboard that does
 
Anonymous
@AmericanSlime Just check string has more than a string
 
CLICK CLICK CLACK CLACK
 
@rdlowrey insert joke about SPL here
 
@rdlowrey yeah, we are ... a lot of the stuff he's saying is nonsense, but that's hardly a surprise ...
 
I am considering booting it up right now and playing those bible games
 
5:42 PM
where did you here about this ?
 
user895378
@JoeWatkins yeah, like I'm pretty sure he actually is certifiably insane. So like 70% of the stuff he says is just completely bananas.
 
user895378
And the other 30% he's really smart because it's like legit multiple personality
 
Guy from work posted it on facebook
god damn it is strange
lol
 
posted on September 29, 2015 by nlecointre

/* by daffodilistic */

 
sidenote, do any of you do bug bounties? ala hackerone, bugcrowd?
 
5:46 PM
I feel dead sorry for him ...
might be patronising, but can't help it ...
 
It's better than mocking him for being sick.
 
"Yeah, I killed a CIA nigger with my car in 1999. Score one for the good guys." - The TempleOS guy :\
 
what's a good debugger cause this simple problem is becoming a major issue
 
Anonymous
@AmericanSlime In your case, it should be common sense.
 
5:49 PM
I know it's something simple, but I must be overthinking.
 
@PaulCrovella I'm not suggesting we mock someone because they are sick ... but we shouldn't hold back either, that genuinely would be patronising "I can understand the answers, but I know you can't and so won't treat you the same as every programmer I have ever met"
if someone is wrong, the decent thing to do is say they are wrong, no matter what ...
 
it's the pointing and laughing at how weird that crazy guy is that I take issue with - it's no different than laughing at someone in a wheelchair for not being able to walk
 
a person in a wheelchair is not going about saying everyone who walks is crazy, and a bunch of other nonsense though are they ...
 
@AmericanSlime the code seems fine, see eval.in/441782 can only conclude that $row['USER_7'] does not contain what you promised =]
 
if they did, you would correct them wouldn't you ?
 
Ronni, I'm looking at the database right now and that's exactly what it shows. Retrieving the value in $info[1] causes an error, but I can get [0] just fine.
Also, thank you for sharaing this eval tool...will mark it down.
 
@PaulCrovella He was instructed by god to write a OS and so he did. That he was/is mentally is not really the point, ofc someone writting gods OS is batshit
 
@JoeWatkins what does that have to do with anything I've said?
 
Anonymous
I don't think anyone is laughing at his disability. Taking an occasional lame jibe at Christians is the new fad of the 21st century. That's just about it.
 
it kinda seems like you're saying we're pointing at laughing because he's sick ...
 
6:03 PM
He might have been in perfect mental health while writting it who knows
 
moin @Jimbo
 
@AmericanSlime but did you output the content of the variable straight after getting it from the database? like var_dump($allTheThings); die;
 
How I showed on the codeshare is exactly how I'm doing it.
 
so did you var_dump($row['USER_7']); die; ?
 
6:10 PM
No, I didn't do that, but when I do I can both values in the array, for every entry.
*see
 
Do it
=] and put the output in a pastie of sorts
 
string 'MR : 2SME ' (length=70)
Shit ton of whitespace after the 2SME
Maybe I need a delimiter at the end?
 
nope the code works fine as the eval code displayed
 
guys im using this to pick date code.runnable.com/UdTuotHbZoQNAABq/… the input will look like this 09/02/2015 .... how to know the name of the day stored in "datepicker", kinda like DAYNAME in mysql
 
Yeah I saw that...which is odd. Maybe all this white space is interfering, let me try to trim it.
 
6:14 PM
/me is out, lata
 
later
 
Yup, all that whitespace was messing it up. Thank you for the help. Will now look to var_dump for future troubleshooting. Thanks a lot!!
 
in a bit
 
Actually that wasn't it, was empty values being returned from the database...causing errors, man I'm stupid, but thank you anyways!
 
> Hopefully, Dmitry Stogov and others, will make another surprise: PHP-Next-Async? :)
 
6:18 PM
@AmericanSlime no problem. btw I do not think that would be just whitespace doing that.
It would be nice to get a hex of the string, and understand what exactly would be doing that
 
Actually, I don't know what's causing the problem...I'm guessing now. I shall investigate.
 
@rdlowrey tiny note: a disadvantage of Hacks Await/async is actually that you have to resolve an Awaitable at every single level (instead of just passing the async though via like yield from)
@Trowski just maybe misinterpretation of the helpful features of yield from/Generator returns/ReflectionGenerator making cooperative multitasking actually a tiny bit easier...
 
@bwoebi I'm guessing this is how it started and then grew into "PHP 7 has async support!"
 
@Trowski yea…
@ircmaxell yeah, great idea, as it actually directly modifies its calling environment...
 
user895378
@bwoebi boo, didn't realize that.
 
6:28 PM
@rdlowrey yeah, it's totally not better than our yield ;-)
 
user895378
yield from (or equivalent) makes this stuff much easier to work with
 
right.
 
@bwoebi Creating and resolving an Awaitable is probably similar in terms of execution time to creating a generator execution context and throwing/returning from the generator.
Not that yield from isn't awesome though :)
 
just got back from my first in-person interview during the job hunt
think I nailed it ... but it wasn't with any techs
 
6:46 PM
\o/
 
ugh I have a talk to finish
 
you have like a week don't you.
 
no
I have tonight to finish the slides.
and three days to practice
 
7:18 PM
@Trowski Awaitables are generator execution contexts though, still.
they halt execution and continue somewhen else
 
guy doesn't know when or how to shut up ...
 
hello I need help. I am integrating paypal into my site. I am stuck into one problem which is that client is something selling in a price of 199$. this is a deal price. total quantities are two. meaning you will get two products in $199. the problem is on paypal when I write the quantity variable it multiplies the quantity with 199 price. I thought I shouldn't show the quantity on paypal, is it possible ? or are there are any other solution to this problem ?
 
7:40 PM
@hellosheikh Pretty sure you would need to change the description, i.e. "double-pack of foo". Paypal says the total price is going to be unit price * quantity.
 
@Danack so you are saying I have to write the original price of one quantity on paypal right ?
 
I think so.
 
Anonymous
@JoeWatkins If you have an app like Silex, that uses "tons" of closures, won't serializing it somehow optimize the memory of the app
 
7:56 PM
Wait @Danack … why should closure() return the same object for a same value? Well… exactly that also is why I think new Closure() is much better.
 
@bwoebi It doesn't have to, but it could be done as an optimisation.
 
I'm sure it'd be actually a de-optimization as you'd need a hashtable then to maintain it, for every single closure.
@Danack Also, no, because static contexts.
Static context of two different Closures won't be shared…
but when you make them same…
 

« first day (1809 days earlier)      last day (3155 days later) »