« first day (2472 days earlier)      last day (2702 days later) » 

00:24
OK @bwoebi github.com/DaveRandom/process/tree/daverandom/windows feel free to have a heart attack/complain etc
n.b. static analysis tells me that's fine but I haven't actually tried to run any of it yet
(wip, obv)
00:36
@DaveRandom I suspect $process->getPid/Sdtin/out/err() prone to being used too early and sometime exploding under load because called before the Promise resolved
it probably should return some ProcessHandle object within the Promise returned by start() giving direct access to it, without any possible status errors
@bwoebi what should, sorry? Process#start()?
yes
That promise doesn't resolve until that data is available in the Process
@DaveRandom yes, it doesn't resolve until the pipes and the pid are available, right?
correct. Old code will need to add a yield
hence the requirement for a new major
00:39
@DaveRandom right … and I suspect that yield to being easily missed
also in new code
then process ist started, something else is yielded first and usually you can then immediately access the process pid etc.
(because processes are usually launched really fast, faster than most read promises in between or such are resolved)
// i.e. this may work always fine in dev:
$proc = new Process(…);
$proc->start(); // note no yield here…
yield writeProcessStartToRedis();
$stdin = $proc->getStdin();
// ...
Well if the Runner API was changed so that the Process creates the Handle and passes it in, then the PID of the wrapper process and the pipe resources could be made available immediately
actually the actual Resource*Stream objects could be made available immediately as well
but the PID would then change when the real child PID has been retrieved
uh … nah
Personally I think it's better to just say "don't forget to yield or you won't get the data"
I think Process#start() should just return Promise<ProcessHandle>, which forces the user to yield, by the API, inherently.
Well maybe it should just be a static ctor, I don't think there's any reason to create a Process and not start() it immediately
00:47
@DaveRandom that was my thought too.
Well I'm fine with that, and it solves that problem I think, or at least reduces the scope for forgetting it
Also, by the way, put the self::$processRunner = …; after the end of the class, instead of in ctor
that way this will be executed when the file gets loaded the first time
I dislike the leaky API but fine
@DaveRandom Feel free to hide it in a (function() { self::$processRunner = …; })->bindTo(null, Process::class)(); :-)
Oh good call
00:53
If you could do that improvement, that'd be awesome :-) I see nothing else to immediately note, will have another look then if you could apply that, thanks a lot!
No worries :-)
bedtime now, have a nice night ;-)
01:09
Is that really a thing o.o
china, probably :B
Released: doctrine/dbal 2.6.0 https://github.com/doctrine/dbal/releases/tag/v2.6.0 #PHP 7.1, immutable date types, postgres 9.4+, mysql 5.7.8+, json & more. #doctrine2
EFF YEAH!
01:38
@Ocramius seen the new one?
there's a new oldboy with murican actors. i was wondering if i should watch it
02:16
o/
 
1 hour later…
03:22
Different serialization for classes – #74975
04:13
good morning room
@WesStark I didn't even dare. The original Oldboy movie is amazing, and is NOT in need of a remake
oh i don't care. if it's good it's good :B muricans can do good productions... maybe i'll watch it
@WesStark some say muricans can do good pizza
I prefer staying in a corner, in the darkness, cold-sweating, talking to myself and doing drugs
04:20
some can. italian descendants :B
@Ocramius out of curiosity, why drop hhvm? lack of interest?
@PaulCrovella lack of interest and way too many inconsistencies to deal with
@PaulCrovella have you seen our travis build matrix?
this is the 2.5 branch (oldstable): travis-ci.org/doctrine/dbal/builds/256450270
this is the 2.6 branch (current stable): travis-ci.org/doctrine/dbal/builds/256491901
oh, and all of HHVM has been failing for over a year anyway
PHP: 5.3, well fuck that
04:23
Yeh, well, last stable branch was created 2 years ago :)
but anyway, we got enough permutations, and this thing is missing oci8, odbc, sqlsrv, pdo_sqlsrv, azure sql, db2, ibmi db2, sql anywhere
yeah, for a brief while I threw hhvm on for some things, then realized I didn't care when it failed so dropped it
Yeah, as much as we like it (doctrine is almost twice as fast on HHVM compared to PHP 7), it is not worth the amount of work
synthetic benchmarks btw
benchmarks have to be synthetic or you're probably not measuring what you're trying to measure
Yes, it's just that nobody should deal with a 10k entities UoW ;-)
oh, and muricans can do good pizza, we just produce a lot more crap pizza.. kinda like we do good beer
04:32
@PaulCrovella I'm fairly sure that italians can also do good hot dogs if forced to :D
they'd have to learn to make chili first
That we know - go to Calabria and you can find every sort of ridiculously spicy stuff
We just don't have the "dangerous" ones, like Bhut Jolokia
you do spicy when would otherwise taste bland
none of our food tastes bland, so :B
spicy food is rare even in calabria (source: my mother is from calabria)
@WesStark yeah, but damn I could eat soppressata all day
ahahah
04:38
disclaimer: just finished an entire soppressa this week
@Ocramius I mean the dish, chili
Yeah, we call it ragu' alla Bolognese :-P
j/k
how long was it @Ocramius my mother sometimes sent me packages from "terronia" full of insaccati
@WesStark can I exchange elephpants for terronia shipments?
lol
i've said her once that i miss the salsiccia and that here sucks
04:40
@Ocramius I would love to see that at a southern cook-off, to see the looks on their faces
so she sent me like 20kg of it
:B
it lasted an entire winter
@WesStark that's italian as fuck
HOLY CRAP 20kg
WANT
Oh well, doing melanzane alla Parmigiana tomorrow
I'll have my share of corrupted nation with awesome cuisine
dry peppers fried. ever ate them?
ya
omg drooling
Brb, hunting the neighbors for food
04:43
lol. so yeah she sent me those too. can't find anything good here. they are all germans
salami is ok, cheese
@WesStark look for the Italian shops that close after 9PM because "they close whenever they wanna close"
but like if you want a mozzarella you eat shit
@PaulCrovella ever watched "the sopranos" ?
please tell me you did.
I did, yes
remember tony's mother?
Yeah, but good mozzarella is rare even in northern Italy. You usually need to go grab the guy from Apulia that does a weekly trip back/forth
04:45
that's exactly like my mother
totally spot on
mozzarella = campania
Nay, they grow it on trash
as per tradition
i'm pretty sure puglia does good mozzarella too, but mozzarella from campania is great
campania != napoli
Yes yes, but it's still traditions
napoli is a different world
nah don't say that. it's not true
it's just napoli hinterland that is shit
You are asking the biased guy :P
I've been to sorrento, caserta & co btw - same impression, as well as from friends that moved out from the region :-\
04:49
i lived near salerno for years... salerno in particular is like the cleanest city of south italy
it's like switzerland :B
"expensive"?
:P
no :B clean as switzerland :B but not as expensive
i miss pizza from salerno
mornings o/
05:08
posted on July 23, 2017

New Cyanide and Happiness Comic

3
05:53
should you load css files asynchronously
@SalOrozco no, since without them the entire page looks like garbage
From google insights "Eliminate render-blocking JavaScript and CSS in above-the-fold content"
That basically means "keep it minimal" :P
Just the rules you need for that page
Bootstrap CSS files are massive.
06:08
morning guys
@SalOrozco you can usually remove all the unused definitions with something like webpack, if your HTML assets are static
@Ocramius SASS?
06:35
@SalOrozco easy: don't use bootstrap :P
Your own CSS Library.
use Material-Components!
I added a Database layer in that no framework tutorial. Now I'm trying to handle data on form submit. Do I create a method controller that handles form data validation? Before passing it over to the database layer?
06:50
@SalOrozco always validate before using something - you need to treat any outer layer data as if it was radioactive :)
Yeah, I have a data validation class. Just not really sure how to implement it.
@SalOrozco just make sure to stop everything on invalid data
short-circuit it to sending a response before you execute any DB/Business logic
basically if (! $theValidator->isValid($submittedData)) { return $this->sendFailureResponse(); }
@Ocramius i have to do it in that same controller right.
Create another method to handle the data validation?
senseiiiiiiiii!!!!!
whats up people!
@SalOrozco in the same method, you add that conditional
then yes, you implement stuff like sendFailureResponse
07:00
@Ocramius in the view method?
@SalOrozco the view would be the last thing to run
@SalOrozco maybe make a gist with what you have
@ocramius good idea
Cant just paste on here right
@SalOrozco no
Please read the guidelines on the right ->
yeah i see it
alright
So in this code, I'm all over the place. Getting parameters from the form, validating the data, and also pulling data from the database.
07:16
@SalOrozco you don't receive any data yet here, no?
can you stub out the pseudo-code for what you want it to do, and update the gist?
What do you mean?
Where would you get data to be validated?
ah, nvm
You mean the validate class?
no, just misread it. Anyway, the code should be something like if ( ! $this->FrontFormValidator->nameValidate($data1['name'])) { // return response with a failure
Yeah there you go
07:19
you are currently just accepting the value. What happens if it is not valid?
If not valid it returns a message to the form
I'll show you the validator
ah, you are making the validator return a response? That's a bit messed up
@SalOrozco that makes it kinda hard for the consumer to understand whether an error happened or not
The idea is good, but you should probably return something clearer, such as new Success($validData) or new Failure($errorMessages)
i get it
07:26
Then the consumer just does if ($result->isValid()) { do something } else { kill everything }
but the direction is OK
So in the View Method how I'm validating one field is ok? What about when I have more fields to validate. Could get kind of messy no?
Usually, validators validate a set of fields/values
because sometimes, value validity depends on other submitted information. For example, you can only have 3 out of 4 checked checkboxes, but at least 2 are required
How do I copy the latest room transcript to review for future reference?
@SalOrozco just pick the absolute link to a message
ha very cool
This chat room is dope
07:34
@SalOrozco no, we're just trolls that give bad advice and make it look like good advice
And @PeeHaa and @DaveRandom are the worst
lmao
PHP my first language. Learn the bad stuff first. Procedural. Now just trying to learn the OO way.
Plot twist: it's equally bad
well, ok, less bad
@Ocramius you actually have a sense of humor man. Some programmer are too uptight. Mentioning no names.
07:39
I see that you still need to learn the basics:
@SalOrozco you can also click on the room dropdown at the top-right to select a range of messages to save/bookmark
This room open source?
@SalOrozco no, it's hosted and developed by stackoverflow
but it's public, and everything we say makes us more guilty day by day
ahh lol
I like a lot of the features in this chat.
I Have a social app that I abandoned a long time ago. I was playing on implementing some kind of chat.
08:13
o/
Happy Birthday @Ekin :)
18
09:17
happy b'day @Ekin!
I knew it was worth the time to whip up the Saitama Detector 5001
:P
09:56
My condolences regarding you getting older, @Ekin
@Ekin drinks on you :P
... that reminds me - I need to go buy some beer for shashlik this aftrnoon
10:24
Hello all
moin
@DaveRandom ping
@kelunik pong
I've only got about 2 mins
I'm fine with tagging v0.3 then. It returns concrete classes, because unreference and close.
10:41
morning
was on 20th @Fab :)
but thanks @_all
cheers
ah you've updated it, nice, looking.
@kelunik to return a Promise
10:46
@bwoebi But why a static method?
why not? it's a static ctor
Just use the current API and return a promise from start()?
The ctor doesn't start anything.
yes, but why shouldn't it?
hookers and cocaine
I'd like to keep the current API except for start returning a promise.
10:48
@kelunik I think, if we anyway need to break the API, we can just as well improve it.
@bwoebi I don't see that as an improvement.
also, that API break is then forcing users to fixup up their code.
with just having it return a promise, your code may or may not explode it you forget to yield it.
@bwoebi Yay. Better break it more so people have to do more.
user924016
mornings
@kelunik It doesn't break more.
10:49
@bwoebi Sure, it requires more changes.
not really
I really don't like static ctors.
@kelunik A ctor is inherently static. A named ctor is just another way to write it and allows arbitrary return values.
I only see benefits here.
@bwoebi Yes, but I don't see any reason to have a custom return value there.
@kelunik well. A Promise.
11:18
13 hours ago, by Ocramius
@PeeHaa not noticeable
mornigns
user924016
THanks @PeeHaa @Ocramius
12:07
morning all
user924016
\o
ThW
ThW
Morning
o/
Anonymous
12:35
!!wotd
polemic: a controversial argument, as one against some opinion, doctrine, etc.
12:47
@Jeeves I'm fairly sure that everyone in here is against doctrine
@Ocramius No, you are a machine.
@Jeeves shut up
@Ocramius The sky. Shot for bad joke.
13:30
:-p
how do functions break up? they stop calling each other!.
14:04
@DaveRandom No, let's not do that if we can at all avoid it. /cc @bwoebi
@Trowski well, we need to break something. Otherwise we get some suboptimal solution.
and AFAIK amp/process is not having many dependents yet
I'd much rather break the return value of the getStd*() functions then.
I don't like creating ugly APIs for having users change a little bit less
parallel assumes contexts start synchronously, so that will require a bit of a rewrite too if Process::start is async.
14:21
@Ekin Belated then. Better late than never. :)
@DaveRandom I'd also like to keep the current API and just have start return a promise, not be a static constructor.
I can work with it being a static constructor returning a promise, just will require more refactoring of parallel then.
Which… I guess isn't a big deal if you actually have processes working on Windows. Looking at parallel I could probably make all the changes in only a couple hours.
The main problem is that constructors use Process::start, so that will require a lot of refactoring to make work. (Actually they're using Context::start, but Process is a one of the contexts.)
14:45
@kelunik How's this look for a sticker? imgur.com/a/EqVcL
That was what they came back with, I could probably also request a circle instead.
@Fabor :-) cheers
@Ocramius fine :p make them double
can't we have elephant also there?
maybe @WesStark wants to design one? :P
now I want an elephant with suit+tie for the cover :*(
btw when book will be out? Waiting eagerly.. :)
15:35
Maybe 2-3 months
I might have to delay it a little more so that I can write a couple blogposts before launch
15:51
@PeeHaa o/
@PeeHaa i need to talk with you
Go for it :)
can we have private chat?
16:06
I dont need much
$600 per month
if you know someone wants to start new project or looking for developer to maintain his site
Not her site? Sexist!
@MadaraUchiha Can you delete those three ^^ please
Ask Jeeves
@NeelIon you cannot have private chats on Stack Overflow. All channels are public unless a mod turns them into a private channel. And they don't do that for regular users. Only for moderation.
@JoeWatkins can I haz uopz on 7.1 and 7.2 please? <3
16:23
gooooood morning elevenam
@Linus i'll find you
@WesStark o/
@PeeHaa what are you using uopz for?
@Trowski awesome.
@WesStark probably for something wrong
@WesStark I'm writing an async wrapper for the password_* functions which I need to test
uopz worked on 7.1 tho... mostly
16:25
see. I told ya
dunno what that means. but i have a dll that works here :B
@WesStark me neither :P I just see it no worky
:D
@PeeHaa all errors are about the TSRM
Thread safety release manager? :P
That's gotta be joe
16:33
:B
@WesStark . . . :P
seriously @Patrick i might do something
@PeeHaa seen the halo?
it's over
@WesStark nope
next season cars will have halo. it's mandatory
Some driver said it doesn't obstruct vision... I doubt that though
16:48
yeah I have seen the images :P Didn't realize it would become a thing :D
nobody wanted it. some even said it's dangerous
next: 3 wheel cars. just because
hehehehe
I think Daniel Ricciardo wants it...
only rosberg wanted it
Good thing he has resigned
17:33
what word could i use for "double" (as in test double) since i cannot use "double" in phpstorm? makes it think it's a float
surrogate pfff
17:59
@WesStark :)
18:11
Me watching boss baby :p
7 hours TO GOT OMGOMGOMGOMGOMGOMGOMG
happy birthday @Ekin \o/
Thanks @Wes :-)
Mornin' everyone
hey happy birthday Ekin :)
Thanks @Linus
18:22
I think i just got a new fan lol
0
Q: Reset the session variable when the user leaves a specific page (Except refresh)

EleyoxFirst of all, sorry if this is a duplicate, I've searched and so far I found nothing. So, when the user goes to "fightzone1.php", it launches a random fight. $query=$db->prepare('SELECT * FROM monsters ORDER BY RAND() LIMIT 1'); The monster's maximum health is in the database. But, his actual...

19:12
@PatrickSimard s/fan/vampire
nite all
night ;-)
its too quite in here lol
19:26
YOU WERE SAYING SOMETHING?
lol better now.
Oh happy birthday Ekin! There are a lot of birthdays around this time it seems
yup lol my birthday is next week hehe
haapy bday Ekin ;-)
What day is your's? Mine is this wednesday :P
29 of july lol (next saterday)
I think I will be 31 or 32 ... not sure ... hmm I should look into that haha
You are 31 years old...

or 383 months old
or 1,668 weeks old
or 11,682 days old
or 280,383 hours old
or 16,823,013 minutes old
or 1,009,380,827 seconds old

and your next birthday celebration is in:
5 days 8 hrs 26 mins 14 secs.
looks like I will be 32
lol
mathcats.com/explore/age/calculator.html this website is in serious need of a front end devlopper lol it really sux haha
19:42
@kelunik @Trowski @bwoebi I'm going to leave it as it is for now, changing that API is not a lot of work, can discuss when it's ready to PR (i.e. when I have actually executed a single line of the code I have written...)
It might be possible to have it both ways, since it's possible to call static methods as instance methods without errors
@tereško like, less than zero effort
well ... he had to copy-paste
and, yes, it's a "he" :D
I am at least 99.9% sure
i mean, he (seems to be) didn't even remove "click here"
or provide the diagram. or attempt to make it look like a question
well ... some people say that males have a lot wider bell curve in IQ (as in you get more geniuses and more utter morons) ... this guy must have got the short stick
then again, he was able to find this site
19:56
That guy really puts the "bell" in bell curve
:D
hmm ... that gives me a new perspective on "bellend"
there is a road about half a mile from my house named "bell end". makes me smirk every time I drive past it.

« first day (2472 days earlier)      last day (2702 days later) »