« first day (2767 days earlier)      last day (2195 days later) » 
00:00 - 14:0014:00 - 00:00

12:28 AM
@Tiffany What do you care about? What concerns do you have?
 
@LeviMorrison how's the weather?
 
@Tiffany We actually have four seasons. What region are you living in now?
 
Illinois
I guess how cold does it get in the winter? Hot summers don't bother me that much.
 
Fairly similar but more extreme.
 
we get all four seasons as well
sounds like here
 
12:36 AM
Our mountain ranges tend to lock in cold/hot spells longer than the plains.
I think we get less rain on average. Very dry.
 
yeah, vaguely remember that when I lived in Palmdale, CA as a child
lived behind a mountain range, so it was a desert
do you get allergies?
I guess the humidity isn't as bad during the summer?
 
Yes, the summer is very dry.
 
which is good and bad -- good because it doesn't feel like walking through sweaty soup, but bad because higher chance of drought
 
I mean, it's literally a desert. Drought is status quo.
 
yeah
 
12:39 AM
It's only pretty because of human cultivation.
 
~9-10 hour drive to CA
 
Public transportation is improving in the area but I'm not sure what level of transportation you would want or be accustomed to.
 
so about a day's drive to go to the beach, that's not bad
I have a car, and I'm accustomed to driving in snow/ice
 
@Tiffany I mean, I'd consider that undoable ^_^
 
how so?
 
12:42 AM
10 hours each way? To see the beach?
 
nah, I'd make a trip of it
like a four day weekend or week vacation or something
compared to driving from IL, which would take at minimum two days of driving, but up to four
 
Our weather will be similar to Illinois but more volatile; look at this climate map for instance: virginiaplaces.org/climate/index.html.
All the same temperatures but the mountains make mini-climates and such and block rain.
 
yeah
that's one thing I do like about here, I enjoy the rain
but not weeklong rain spells
 
I have allergies but they've gotten less severe as I've aged so I'm not sure what to say about that.
 
huh, kind of the opposite for me
but this area can have high pollen count
cost of living?
do you know approximately what it would cost for a one bedroom apartment with cats?
in an area that I don't have to wish I have a gun under my bed
 
1:01 AM
@Tiffany Low compared to CA, NYC, OR, etc. Not sure about Illinois.
1 bedroom with pets... maybe $800-$1200 depending on exact location and quality.
 
my rent is 375 right now
so, I should expect to pay at least double
quality of my apartment, it's not new, but it's not a bad apartment either. It's an older house converted into apartments.
central air, washer/dryer hookups. My only complaints are that the bathroom's small and the hot water in the shower doesn't last long enough.
 
You can probably find a room somewhere at that price but I wouldn't expect it - you'd be renting a room from a person and not really an apartment.
 
I've kind of gotten used to living alone, and having a whole apartment to myself... lol
shrug, if I have to room with people, I guess that's what I'll have to do, but my long-term goal would be to live on my own again
I guess I'll try applying for that job as well, company seems like a good one
thanks for infos @LeviMorrison
 
1:17 AM
There seems to be a strong anti-pet culture for rentals in Utah, which definitely increases the cost.
 
1:30 AM
udbg> c
int(8)
> hit breakpoint in test() on line 2
int(5)
udbg> c
int(10)
> hit breakpoint in test() on line 2
int(6)
udbg> c
int(12)
> hit breakpoint in test() on line 2
int(7)
udbg> c
int(14)
> hit breakpoint in test() on line 2
int(8)
udbg> c
int(16)
> hit breakpoint in test() on line 2
int(9)
udbg> c
int(18)
> hit breakpoint on return from test()
string(2) "hi"
string(2) "hi"
evening ...
function interactive() {
	printf("udbg> ");
	while ($line = fgets(STDIN)) {
		switch (trim($line)) {
			case "c":
			case "continue":
				return;

		}
	}
}
there is something appealing about that ...
 
 
2 hours later…
Wes
3:21 AM
morning kids
 
hello
 
 
1 hour later…
4:23 AM
Probable race condition/overflow in PHP crashes Apache – #76338
 
5:13 AM
segfault during shutdown – #76339
 
mornin room
 
5:58 AM
Gettext not working with 64 bit, library loaded successfully. – #76340
 
6:36 AM
We'll publish critical vulnerabilities in PGP/GPG and S/MIME email encryption on 2018-05-15 07:00 UTC. They might reveal the plaintext of encrypted emails, including encrypted emails sent in the past. #efail 1/4
 
6:58 AM
moin
 
moin
 
Wes
7:19 AM
 
7:48 AM
Morning 11
@PaulCrovella ouch
Serverless is very brain melting. Fun, but brain melting
 
Any help before I get downvoted? :) stackoverflow.com/questions/50325538/…
 
lollapalooza Slang. an extraordinary or unusual thing, person, or event; an exceptional example or instance.
 
also a festival brand
 
8:41 AM
posted on May 13, 2018

New Cyanide and Happiness Comic

 
moin
 
morns
 
8:56 AM
moins
 
o/
 
\o
 
o/
 
Wes
o/
 
9:02 AM
\o
 
@pmmaga 🖕
 
@DaveRandom We got so far
 
edits are instafail
 
o/
 
<throws toys out of pram>
 
9:04 AM
hahaha.. Wes got it a second sooner :P
 
no excuses. perfection or gtfo
 
I shall not fail again
 
I'm watching you
 
🖕o
 
I didn't even get a chance.
 
9:17 AM
@DaveRandom And I'm watching you. I heard you still have to put some mail into a mailbox. :P
 
I'm sure I, uh, yes, well, I mean, uh, hey, what the hell is that up there?!?
<smokebomb>
 
9:31 AM
o/
 
\o
 
o/
 
\o
 
o/
 
9:40 AM
xD
 
@J.Ende DRY
 
@PaulCrovella kick mute
 
if you want to support cheating, that's on you
 
You could have removed my first o/
and continued
:thinking:
 
o/
 
9:50 AM
\o
 
class BreakPoint extends \Inspector\BreakPoint {

	public function hit(\Inspector\Frame $frame) {
		printf("%s %s #%d\n",
			$this->getOpcode(),
			$frame->getScope()->getName(),
			$frame->getOpline()->getLine());

		if ($next = $frame->getOpline()->getNext()) {
			new self($next);
		}
	}
}
happy monday folks ...
oh ...
int(95)
ZEND_PRE_INC test #9
ZEND_IS_SMALLER test #9
ZEND_JMPNZ test #9
ZEND_INIT_FCALL test #10
ZEND_SEND_VAR test #10
ZEND_DO_ICALL test #10
int(96)
ZEND_PRE_INC test #9
ZEND_IS_SMALLER test #9
ZEND_JMPNZ test #9
ZEND_INIT_FCALL test #10
ZEND_SEND_VAR test #10
ZEND_DO_ICALL test #10
int(97)
ZEND_PRE_INC test #9
ZEND_IS_SMALLER test #9
ZEND_JMPNZ test #9
ZEND_INIT_FCALL test #10
ZEND_SEND_VAR test #10
ZEND_DO_ICALL test #10
int(98)
ZEND_PRE_INC test #9
ZEND_IS_SMALLER test #9
ZEND_JMPNZ test #9
and so on ...
 
@JoeWatkins sounds like a great idea for conditional breakpoints
 
I gave up on the idea of integrating with phpdbg ...
 
why?
 
9:53 AM
it has to do things that mean we need to override the vm loop - pending bps, wp ... so there's nothing really to gain ...
the point of doing it this was is avoiding the lookups and avoiding implementing a vm loop ... but we can't do either of those things in phpdbg ...
 
@JoeWatkins we can make the vm loop code much faster though
 
@JoeWatkins nice work you've got there :+1:
Would it be usefull to modify opcodes pragmatically in some cases?
 
it doesn't do that ... "inspector" ... read only, except in the case of break points ...
modifying opcodes is not an easy thing to do ...
 
Nah I think it's weird
Yes, I've noticed it's read only that's why it's called inspector
 
modifying a currently executing program doesn't sound like a good idea...
 
9:58 AM
Isn't there a feature in Java which can modify code before compilation?
 
if you do build that, call it ext/skynet
 
it's acceptable in the case of debugging, but it's not actually possible to reallocate op arrays at runtime ...
 
@DaveRandom that would be a NN which self-modifies
 
@brzuchal In newer versions, I think, yes.
 
runtime/compilation time - I know the difference, just thinking loud
 
10:00 AM
@bwoebi the Ruby brigade would just love it if PHP brings about the end of days, we'd never hear the end of it
primarily because the end of it would be drowned out by the sound of the world ending
 
somebody had to do it
 
yeh but I was betting more on a missing null byte or something
cloudflare accidentally leaking the nuclear launch codes directly onto 4chan
something like that
 
where did people get the idea that fpm is the holy grail of PHP performance? I still don't know what's the base for that argument
 
Some time ago I was inspired with Lombok for Java which generates boilerplate on build time, and also integrate with editors so I've created then a Plumbok which is inspired and works by hijacking autoload and generates additional boilerplate based on information from Doctrine Annotations. I was very surprised when after 2yrs I've noticed a PR for an update because some guys are using it :D
That's why my question was about modifying
 
Jan 23 '16 at 6:54, by Paul Crovella
well, 502 Bad Gateway errors are usually pretty quick
 
10:05 AM
:D
@brzuchal Not really modify in this case but you can emit your own :)
 
mornin
 
\o
 
o/
 
@pmmaga notice, but generating class methods I think it's not the same AFAIK it's not an opcode but I might be wrong
 
@brzuchal aye, for that maybe uopz would do it
 
10:15 AM
or you could just write sane code
#justsayin
 
NEVER
 
rebooting, catch y'all in a day or two
 
@DaveRandom ha, surely you jest. :P
 
> test xxxx fails on i586 archtecture
 
did PHP 5 even support 586?
 
10:43 AM
public static function validateAndInstantiate($namedRules, $classname)
    {
        $params = self::validate($namedRules);
        $reflection_class = new \ReflectionClass($classname);
        return $reflection_class->newInstanceArgs($params);
    }
@Wes (or anyone) - is it possible to tell phpstorm + phpstan that the return type will always be of type '$classname' ?
 
Wes
nope #generics
 
@Danack Yes.
 
Wes
how?
 
github.com/rdlowrey/auryn/blob/…, but you have to lookup the correct syntax for multiple arguments yourself.
@Danack Not sure whether you can tell phpstan.
 
Wes
ah nice. where's the documentation for that?
 
10:48 AM
!!? phpstorm meta types
 
Search for "phpstorm meta types -site:w3schools.com" (https://www.google.com/search?q=phpstorm+meta+types+-site%3Aw3schools.com&lr=lang_en)
• PhpStorm Advanced Metadata - PhpStorm - Confluenc… - Spring naar More dynamic return type possibilities - //below is the example of couple more meta exp… (https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Advanced+Metadata)
• How to set a type for a variable – IDEs Support (… - 30 mei 2017 - I develop Yii2 plugin (PHP) and want to set variables' types for special … Just creat… (https://intellij-support.jetbrains.com/hc/en-us/community/posts/1
 
ta
 
Wes
that's cool
 
@pmmaga Yes, it might works, but because this is not in core the library would depend on a extension
@kelunik Is this something I may use to tell PHPStorm that some class has got additional methods which are generated on runtime?
 
@brzuchal you probably can, but you can just do that with plain annotations on the class.
The fact I know this should not be read as an endorsement.
 
10:58 AM
Yes, I'm doing it right now github.com/plumbok/… but was wondering if there is another way to do not override original files
 
hello
I got a requirement
Is there an option to create and access user defined php global variable
 
@naveenchary why do you think you want to do that?
 
My requirement is bit simple
There should be some variable say x decalared on server.
It should return an incremented value for every request
when it reaches a certain limit say 1000 it should reset to 1 again. and start he same process
 
So the requirement is to have an incrementing counter that is shared amongst all users.
 
yes
something like that
I want to use this in an API
so very user who hit my API will get an incremented value
 
11:04 AM
You'll want to use something like redis or memcache to store the value.
 
but that may take time
 
And it could rain in Chicago.
 
any alternative
 
Pen and paper?
@kelunik apparently it's still hard coded to only look at the first parameter for the returned type.
 
Can anyone help?
 
11:15 AM
morning
 
I thought of maintaining a super global variable on server side which will increment on every hit request and provide a unique increment value
 
is this incrementer to be unique per user?
 
are you not worried about CSRF?
 
@naveenchary then how do you suppose you'll track the user?
 
11:18 AM
Every user will authenticate themselves
before hitting my API
 
but what keeps a user from accessing another user's information from your API?
 
Sounds slow, is there any alternative?
 
will maintain them at my end
 
@naveenchary You can probably use a table in DB for that.
 
my only concern is how do I keep track of the user hit and provide an incremented value
It will slow down the process
 
11:20 AM
how do you know?
 
I may get around 1000 request per sec
 
isn't redis set up around to handle that?
 
should be able to provide 1000 incremented numbers within a sec
 
@naveenchary try using shared memory block then and on every get of that int set updated value
 
can you please be more clear
 
11:21 AM
I mean you can read and set values using shm_*
And they are all shared across all php processes
 
I am not aware of that
 
reminds me, I need to finish reading Top 10 OWASP
 
@naveenchary start here
 
@Tiffany I have already read and forgotten those. :D
 
@mega6382 :O
well, if SiteLock contacts me back, I'll need to know this stuff
it's also taught me just how vulnerable the code base at work is
I need to encrypt at least one database
but I need to figure out how to go about that
 
11:25 AM
@Tiffany About what?
 
top 10 owasp specifically
 
Did you apply for a job there?
 
yes
 
being able to recite a list does not seem like a useful skill...
 
Dereleased used to work there, gave me some suggestions on how to get a job there. It's my first choice if they contact me back.
@DaveRandom have you looked at document?
it's not just a list
 
11:27 AM
sorry to interrupt you
How can this shm help me
 
Anyway, @Tiffany how is your php compilation going? did you succeed?
 
@mega6382 haven't set up a local VM yet
 
@Tiffany what I mean is it seems like a slightly crappy requirement for something to "know" when interviewing candidates
understanding of security and defensive coding is more experiential (imo)
 
I have a couple projects I'll be working on. A friend has an idea for a web application for D&D and seems like a good idea, he contacted me first in terms of creating it, so I'll be using my VPS to get a prototype working.
@DaveRandom it's a junior position, I think at least having knowledge of what's possible is good...for now
but if I want to move up, I'll need to have a more thorough understanding of it
 
@naveenchary I personally think a better question is why you need this, i.e. what you are hoping to accomplish by having this thing
it seems like a strange requirement
 
11:30 AM
@Alesana are you still looking for freelance design work?
 
As per my requirement. I need to have a unique incremented value for every server request.
Seems a bit strange.. Thats the reason I am here...
:)
 
that sounds like an auto-increment foreign key
 
@naveenchary yes. why?
what does having that actually accomplish?
 
@naveenchary Do you want a value to be incremented on every request? or every request per user?
 
in terms of the real world problem the application is solving
 
11:32 AM
every request
 
28 mins ago, by Danack
So the requirement is to have an incrementing counter that is shared amongst all users.
27 mins ago, by Danack
You'll want to use something like redis or memcache to store the value.
 
X to the mummy loving Y
 
Apparently this is not an acceptable answer.
For reasons.
 
@Danack Atomic increment on Redis absolutely fine, atomic reset less easy
 
@naveenchary Create a txt file, put 0 in it. On every request open the file add 1 to its value and then close the file, ALL DONE. :)
 
11:33 AM
Probably better sticking with atomic increment and doing modulus on it
 
you don't need to reset, you just need a sufficiently large storage and % ^ that
 
:P
 
on the subject of redis, I want to make sure I understand it correctly, to put it in simple terms, is redis a form of a database (but not a typical RDBMS), that is faster to use?
 
or & 0x3ff
but still
 
As I said... There will be 1000 request per sec
Does`nt the file open and write slowdown the process
 
11:35 AM
@Tiffany In the simplest sense, it's a key value store (like memcache), but has some advanced features too for high throughput caching
 
okay, so read more into what memcache is then
 
@naveenchary yes, you said, which a) I doubt and b) indicates that there is most likely a better way to solve the real world problem you are trying to solve
!!xy
 
1297
Q: What is the XY problem?

GnomeWhat is the XY problem? When asking questions, how do I recognize when I'm falling into it? How do I avoid it? Return to FAQ index

 
@Leigh thanks
 
maybe UUIDs would be better, I don't know, depends what the actual, real world problem is
assigning a small repeating id has very few use cases
there are some, but not many
 
11:36 AM
@DaveRandom I think he just wants to know how many requests have been sent to his server. But I am not sure.
 
well that wouldn't need to wrap
and can be determined from the web server log
tbh you could probably do it with that nginx/lua thingywotsit in a reasonable performant way, but I wouldn't
 
There is nothing to do with the number of request count sent to the server. I just want to provide an increment value for each server request.
 
yes... why?
 
For each and every request. Not by user wise.
 
@DaveRandom I mean, if you're expecting 1k req/s you're probably not using a single web server anymore, even if not for load balancing, for redundancy
 
11:40 AM
just answer Why? then we might be able to help you better.
 
the reason I'm asking is not to be annoying, it's because you are trying to do something difficult and slow and there's probably and easier and faster way to accomplish the same overall effect
the being annoying part is just a side benefit
 
Not sure....
 
is it something your client wants to know, or something?
 
@Leigh that too
 
thats the requirement
I need to accomplish
 
11:43 AM
requirement from who/what?
 
generate a unique number for every server request...
 
@naveenchary and then do what with it?
 
that doesn't answer the question I asked
 
What do you plan to do with the incremented number?
Do you just wanna store it? Or will it be used in the request somehow?
 
use in request
 
11:45 AM
@naveenchary as what? Will you be sending it in the response?
 
something like that I suppose
 
@naveenchary So, is the main requirement for it to be unique or incremented?
 
incremented
 
what if it was incremented by a random amount over a finite field?
 
what if you were incremented by a random amount over a finite field?
 
11:52 AM
I'd make a mess
 
yeh but it would be a finite mess
seriously though, my best suggestion given that we're not allowed to know anything about the problem domain is nginx+lua and putting it in an env var or a request header
 
package main

import (
    "fmt"
    "net/http"
)

var requestNumber int64 = 0;

func handler(w http.ResponseWriter, r *http.Request) {
    requestNumber++
    fmt.Fprintf(w, "%d", requestNumber % 1000)
}

func main() {
    http.HandleFunc("/", handler)
    http.ListenAndServe(":8080", nil)
}
there you go, job done
 
@Leigh I was thinking the same thing, but in python or nodejs. :)
 
PHP's shared-nothing architecture makes stuff like this very hard and sloooooooow but that doesn't generally matter because generally you don't need to do things like that
 
Could use aerys
 
11:57 AM
@Leigh something with a proper int type that wraps instead of overflowing to double would be better though
 
ehh, worry about it when you get > 2**63 requests
 
@Leigh Why is atomic reset an issue?
 
Wes
they gave me some dry chili pepper to add to dishes randomly. i've been warned it's very hot. i was like pffff. now my ears are emitting steam. what about your day?
 
@kelunik 2 clients calling INCR together, one gets 1000, the other gets 1001 - the one getting 1000 will try and reset the counter to 0 but it's too late by the time it knows it needs to reset it
 
Wes
also my mother taught me that food must not be wasted, so i ate it all despite i was dying already after the first bite. not feeling well
 
12:01 PM
@Wes Hopefully, you've learned your lesson. :P
 
Wes
i doubt that :B
 
@Wes I had the same experience lately with chili paste. Did exactly 50g as suggested. The wife couldn't eat it at all. I did because no waste. Had a stomach ache the entire next day.
 
@kelunik you could probably do it with EVAL and check the value with an embedded lua script though, seems Redis guarantees atomicity of scripts
 
And anyway, @Wes unless you feel like you are sucking on lava and your nose is flowing like a river. You haven't had anything properly spicy yet. . :D
 
@Leigh If you implement it as roundtrip, yes, but lua scripting solves that.
@Leigh Yes, it does.
 
12:05 PM
@mega6382 it's not hot if you don't get hiccups
 
@Gordon I wouldn't know about that, cause I get hiccups all the time even for no reason.
 
thanks for your help
 
Wes
@Gordon yep, and almost vomiting
on the label it says 55000 SUH
seems like it's not but not very
it's surely hot enough for me :B
it's actually for flavor, not for hotness, it's a mix of dried spices
 
@Wes thats cause you are Italien :P
 
12:16 PM
guys, is there a way to stop PHPunit from generating coverage reports, when tests contained an error?
 
Wes
you can make it stop right after it finds an error @tereško but what i usually do is running tests without coverage, and only if everything worked i do generate the coverage
 
yeah, that's what I will have to do too :(
 
12:34 PM
you could have it delete the coverage file if it's a non-zero exit code?
phpunit <args> || rm coverage.clover
or && mv coverage.tmp coverage.clover
 
naah, I just specified smaller whitelist
 
1:11 PM
@DaveRandom And for 32 bit, there still is exact precision for doubles up to 52 bits … still enough for a whole life.
 
@bwoebi well the entire task seems to be under-thought and over-engineered, may as well keep up the methodology
 
1:24 PM
hi all need help $requestperfrom = $request->except(['_token','form_job_key'])
return array:2 [▼
"company_name" => "gaditek changlog3"
"req_skills" => array:2 [▶]
]
when i try to update these field into db
 
@Leigh ? Lua that shit.
 
array to string conversion issue
array:2 [▼
"company_name" => "gaditek changlog3"
"req_skills" => array:2 [▼
0 => "asd"
1 => "changleog3"
]
]
 
@Noni That looks awefully lot like laravel.
Is that laravel?
 
yes
sorry i dont update this
yes its laravel
5.5
 
my condolences
 
1:27 PM
$job = $jobModel->where('id', $id)->first();
$job = $job->$requestperfrom;
$job->save();
then give error Array to string conversion
 
what do you think this line does: $job = $job->$requestperfrom; ?
... people should learn the language, before starting to use a framework
 
lolz my bad
$job = $job->update($requestperfrom);
?
Array to string conversion (SQL: update job set company_name = gaditek changlog3, req_skills = asd, updated_at = 2018-05-14 13:31:18 where id = 89)
 
Because you can't insert an array into a column directly.
If I'm seeing that right, req_skills is an array, how do you want that stored?
 
@Noni I am not sure, but I believe the problem is with, req_skills which is an array but should be a string, because you are trying to store it in DB. So, I guess you'll have to convert it to a string or something.
 
@MrDanack @Ocramius This sounds really interesting - you can definitely write PHP classes today that implement PHPStan extension interfaces and interpret this file. Check out PHPStan README to see the list of extension points.
If anyone is looking for a small useful open source project to do, ^^ that would be really useful.
2
 
1:43 PM
What kind of stuff would you want shown in stan from that metadata?
Oh is this for type checking and such?
 
yeah.
A lot of people use the phpstorm metadata already. So instead of making everyone encode that info twice, have phpstan just scan for those files.
s/a lot of people/me, and that's what I care about most/
 
00:00 - 14:0014:00 - 00:00

« first day (2767 days earlier)      last day (2195 days later) »