« first day (2439 days earlier)      last day (2516 days later) » 

user1804599
12:01 AM
@NikiC Does the garbage collector reclaim tombstones?
 
@rightfold what's a tombstone?
 
user1804599
The memory used by a deleted array element.
 
user1804599
They are skipped during array iteration.
 
user1804599
Without this mechanism, deleting an array element would be a linear-time operation.
 
12:23 AM
@rightfold php doesn't allocate memory for arrays per element. The arrays are allocated in larger chunks
!!lxr 4095
 
@Danack Nothing went wrong but I couldn't find a suitable definition
 
user1804599
@Danack Yes, which is why you need to either mark deleted elements or shift all following elements up upon deletion of an element.
 
user1804599
With a linked list you would not need to do this.
 
@rightfold "need" ?
Why would I "need" to do that?
 
user1804599
12:30 AM
How else would you implement element deletion?
 
user1804599
@Ekin thanks!
 
@rightfold there are two separate bits. Freeing the variable that is stored in the 'array' if it's needed, and making the hashtable not point to that variable anymore.
 
PHP 'arrays' really aren't arrays.
 
user1804599
Arrays don't point to variables.
 
user1804599
12:37 AM
They store values. Some values require additional cleanup.
 
"Arrays don't point to variables." That's right. They have references to variables. "They store values." - not really.
 
user1804599
When deleting an array element, the values is cleaned up and the element is marked as unused.
 
4 mins ago, by Danack
PHP 'arrays' really aren't arrays.
 
user1804599
That's false. "Have reference to" and "point to" are the same thing. Variables and arrays are orthogonal.
 
user1804599
A variable is a named storage location.
 
12:39 AM
> "Have reference to" and "point to" are the same thing.
Not in the C implementation...
A pointer means it's pointing at the memory. A reference in C means that it knows the zval exists, but the 'array' doesn't store the zval inside itself.
 
user1804599
It actually does.
 
> If an element is deleted from a hashtable, we obviously don’t want to move all elements in arData that occur after the deleted element in order to have a continuous array again. Instead we simply mark the deleted value with an IS_UNDEF zval type.
 
user1804599
Buckets directly store zvals
 
user1804599
They don't have an additional pointer to it
 
$a = 1;
$b = [];
$b[] = &$a;
 
user1804599
12:41 AM
And buckets are stored one after another, as a C array
 
Does $b suddenly need to allocate memory to store the variable?
 
user1804599
On the third line, a new bucket is added to $b that stores a zval that represents a reference to the value in $a.
 
> a new bucket is added
What makes you say that?
 
user1804599
Whether that requires an allocation or not depends on the capacity of the array. If the capacity is sufficient, this adding will just be an increment operation. Otherwise, it'll need to allocate more memory first.
 
> depends on the capacity of the array
THEY'RE NOT FUCKING ARRAYS.
they're hashtables.
 
user1804599
12:46 AM
PHP calls them arrays and so will I.
 
I'm going to call them John.
 
user1804599
Frankly, as a matter of fact, I will call what PHP calls types types, even though they aren't.
 
John doesn't allocate new buckets when you ask him to remember something.
 
user1804599
Frankly, as a matter of fact, some PHP arrays are in fact stored as C arrays, when they have only incrementing integer keys starting at 0.
 
user1804599
Anyway, Ekin got me the answer (thanks ❤️), and it's almost 3 AM, so I'm gonna sleep :3
 
12:49 AM
btw congratulations on reading and comprehending both of those articles so quickly.
 
user1804599
I was already aware of much of it. I wanted to know a specific thing.
 
Is there a phpstorm plugin for making .markdown syntax highlighting not... white... anymore...?
Actually nevermind... I should just sleep. 4 am... nn
 
1:58 AM
any idea why chmod -vR 600 ~/.ssh would fail on vagrant? Doing this on windows:
vagrant@dev:~/.ssh$ sudo chmod -vR 600 ~/.ssh
mode of ‘/home/vagrant/.ssh’ changed from 0777 (rwxrwxrwx) to 0600 (rw-------)
mode of ‘/home/vagrant/.ssh/id_rsa’ changed from 0777 (rwxrwxrwx) to 0600 (rw-------)
mode of ‘/home/vagrant/.ssh/id_rsa.pub’ changed from 0777 (rwxrwxrwx) to 0600 (rw-------)
mode of ‘/home/vagrant/.ssh/known_hosts’ changed from 0777 (rwxrwxrwx) to 0600 (rw-------)
vagrant@dev:~/.ssh$ chmod -vR 600 ~/.ssh
 
 
3 hours later…
4:52 AM
 
morning!!! o/
 
\o
 
5:04 AM
!!dad
 
What did the donkey say? http://chat.stackoverflow.com/transcript/message/31303392#31303392
 
5:19 AM
posted on June 20, 2017

New Cyanide and Happiness Comic

 
5:29 AM
Hi!
Is there any body can help me to find out Yii framework error on local host
 
nothing much to help here
 
I host my live site to localhost from config.php i changed database connection but an error show
 
if your problem is way complicated then you cant find answers here thats what i encounter only small problems
 
@MaryDaisySanchez
 
@Momin google the error and then fix it
 
5:33 AM
I am new for this Yii framework
 
@Trowski tests run fine
 
@kelunik UvDriverTest::testScandir fails for me locally with Amp\File\FilesystemException: Failed reading contents from /var/folders/sz/l201ypfs4cvgvp7tbd0v83ch0000gn/T/amphp_file_fixture/Amp.File.Tes‌​t.Fixture5948b435578f1
 
@Momin I have never done any Yii development but the error message is pretty straightforward to me; especially in combination with the source code. Yii wants to write some runtime files, but the path you gave it for storage is not valid, meaning the path doesnt exist or is not writable or whatever else can make it invalid. So make the path valid.
 
@kelunik HandleTest::testWrite passes with the first yield to write, but only with ParallelDriver using the last commit I pushed.
 
@kelunik yes, it looks nicer to me with the somewhat rounded ear. But I am wondering whether it should connect to the trunk or whether there should be a solid blue in a darker shade filling the back. You know, the body of the elephpant.
 
5:43 AM
Probably old UV?
Passes with and without "amphp/parallel": "^0.1@dev" for me.
 
@kelunik Did you modify the test?
@kelunik Maybe, I haven't updated it in about a month.
 
No, do I have to remove the yield?
@bwoebi fixed the scandir some days ago.
 
Second parameter to getenv since when? – #74785
 
@kelunik Yes.
@kelunik Ah, ok, then I just have to update.
 
!!changelog bwoebi/php-uv
 
5:51 AM
[ php-uv ] [ e4cb65e ] wtf, uv_fs_scandir()??? - Prevent walking the loop after dtor - Committed by: Bob Weinand on 17.06.2017 17:34
 
^ That's the commit, yes.
Ok, still getting that:
PHP Warning:  uv_fs_stat(): passed UVLoop handle is already closed in /home/kelunik/GitHub/amphp/file/lib/UvDriver.php on line 132
But only if I don't yield the first write in testWrite.
 
@kelunik Yeah, I removed the call to close in the destructor because I kept getting that sort of warning from uv_fs_close(). Planned on mentioning it to @bwoebi tomorrow.
 
The counter approach I used previously fixed that.
 
I'm guessing I'll want to restore the call to close.
@kelunik Ah, I see. I rebased what I wrote because I missed those commits since the branch was renamed.
Otherwise I probably would have kept that. I can easily restore it.
 
If concurrent ops are no longer allowed, then we don't really need it anymore.
Let me fix it.
 
6:00 AM
I might need a guard on close then… will look at it in the morning.
@kelunik Ok, great. I'm heading to bed. Please have a look at what I wrote and fix up anything you have time for.
 
Hm.. I'll just restore the previous approach, it's the easiest.
 
@kelunik You could also do something like what I did with EioPoll.
Separate object just made it easier in that case. Might not there… too tired to reason about code anymore, I'm off to bed, night.
 
Night. o/
 
 
2 hours later…
Wes
7:40 AM
has anybody seen kelunik????????????????????!!!!!!!!!!!!!!!!!!!111111
 
I believe the kelunik is just a figment of your imagination.
How is the logo going Wes?
Oh. And happy birthday+2!
 
morning
 
Good morning
 
Wes
@DamienOvereem deleted everything
so that nobody can convince me to continue
 
Cold Turkey aye
 
7:47 AM
And who's b-day is it?
Oh, it's Wes, grats bud!
 
Wes
thanks, got 3 years older in 3 days :B
6
someone should unpin that
 
xD Well, time flies when you're having fun 'eh?
 
I'd rather do this instead
ragesquid.. hah! ;p
 
mornin
 
Wes
7:51 AM
@DamienOvereem fu
 
You are welcome @wes
So anyway. Does anyone know of a good resource on the latest PHPUnit which teaches how to do unit testing properly?
Goal: toss it to new coders in my company to safe time.
 
Wes
try on feverr
 
fiverr ;p
 
Wes
whatever
 
Don't be salty!
I had good intentions when I proposed that you know. It was clear you were getting frustrated.
 
7:56 AM
@DamienOvereem my suggestion: first start testing, then worry about doing it properly
 
Yeh. That is exactly where we started and in all honesty we are still trying to figure out how to improve. We just split up part of our legacy code to symfony3, and it is the intention to develop all new code in symfony3 with reasonable code coverage.
 
@DamienOvereem short answer: no
 
It is however my intention that all developers atleast follow the same method/pattern when writing their unit tests. So a basic guideline would be welcome.
@tereško That is both unfortunate aswell as expected. I spent quite some time searching and it seems to boil down to hundreds of oppinions instead of some good default.
Wes is dominating the starred list ;p
 
mornin
 
ako
8:11 AM
Hi there
can anyone help me with this issue relating to Deployer?
tahnks
 
this chat room does not give a fuck about laravel, try here: larachat.co
thanks
 
ako
@tereško I think my issue is not related to Laravel
 
morning :D
 
yo @Valentincognito
 
8:14 AM
o/
 
mornin
 
Anonymous
@tereško a knee jerk reaction every time you see the word 'laravel' is stupid.
 
@ako You've put an issue 5m ago and even didn't wait for response from maintainers, what's wrong with you!?
 
@JayIsTooCommon ... or could it be, that I am just trying to direct him to a different online community
you seem to be overreacting a bit lately, whenever laravel comes up
 
Anonymous
You're the one who overreacted, not me.
 
Anonymous
8:20 AM
You see the word Laravel and rush to jump on the 'fuck off' bandwagon
 
moin
 
Anonymous
yo new
 
o/
 
\o
 
ako
@brzuchal I want users form here to see my question , maybe they have some responses too
 
8:22 AM
o/
 
err: 503
 
8:38 AM
@DamienOvereem basic guideline: only test the public api and avoid mockfests. also a test tests one thing, not many. Also xunitpatterns.com
 
explain
the fowler article doesnt contradict what I just said if that's why you posted it
 
Wes
well, for some full-metal-mocks work just fine
 
I didnt say dont use mocks
I said avoid mockfests, because if you find yourself mocking like crazy chances are your code sucks and needs refactoring
 
Wes
if you want to run tests in actual isolation you need to mock everything
 
8:43 AM
define: mockfest?
 
Wes
not saying that i agree, just that people do that
 
@Wes yes, but if that requires you to mock and inject the mock into another mock just to mock another mock or need to stub out lots of methods to make that test work, then you get a mockfest /cc @tereško
 
@Gordon sounds like what you need to do, when you need to mock a factory
 
Hello world
 
@Wes also, you dont need to mock everything. for instance Value Objects dont need mocking. Just use the VO
 
Wes
8:47 AM
you don't inject mock into mocks if you follow the law of demeter @Gordon
 
@Wes which proves my point that when you find yourself doing that chances are your code sucks
 
Wes
oh yeah
 
what is the use of CURLOPT_USERAGENT?
 
@rightfold Yes
When the array becomes full and the fraction of tombstones exceeds a certain value, the array is compacted
And no
If you just remove from the array, it will not actually shrink
We should really fix that sometime :D
 
I try to backup msql db get but I get You have an error in your SQL syntax; check the manual that corresponds to your MySQL server mysqldump -u root -h localhost --no-data -p mydbname >mydbname.sql
 
9:07 AM
Morning all
 
Anonymous
yo piper
 
Hey jayman
 
Thx for input @Gordon
 
Wes
i need to know which symbols i could use for the amp logo. like, would this work for the event loop (whatever that is)
 
Isn't the logo already done? The one on the site bow?
Now*
 
Wes
9:10 AM
i hate imgur
not as much as i hate @JayIsTooCommon tho
 
:p
 
Anonymous
@Wes secretly you love me
 
Brb making coffee
 
Anonymous
@PeeHaa touchy subject..
 
Anonymous
cd ..
 
Wes
9:12 AM
so would that work in the amp logo?
 
@JayIsTooCommon :D
 
from where I can execute this command mysqldump
 
Wes
@PeeHaa fu
 
@Wes what? :p
What happened?
 
Wes
i ragequit
> ragesquid
everybody is happy now
 
9:18 AM
Lol ragesquid
Wasn't everbody happy with the latest one?
The amp people were?
 
Wes
it was told me to hire a designer
i know i suck but i didn't know i sucked that much
 
...
 
Wes
i am offended, in italian. with lots of drama
 
I'm not going to complain. I can use several of the old logos :D
At least keep the soure files around for me
 
Wes
webarto did one in 2 minutes and everybody liked it immediately
i've lost all my italian manliness
 
9:26 AM
Hehe
 
Wes
 
That looks familiair
Some database engine logo or something?
 
^ postgres also loves elephants
 
Yeap
But it's not postgres is it?
 
@Wes awesome elephant
 
9:33 AM
 
What is that?
 
@PeeHaa seriously? are you THAT old? :D
 
Is that pokemon?
Helpme :p
 
Wes
@Patrick i am also that old
what the hell is that
 
!!? porygon
 
9:35 AM
Search for "porygon" (https://www.google.com/search?q=porygon&lr=lang_en)
• Porygon (Pokémon) - Bulbapedia, the community-dri… - Porygon is a Pokémon made completely out of programming code. It has a pink polyhedral body with a… (https://bulbapedia.bulbagarden.net/wiki/Porygon_(Pok%C3%A9mon))
• Porygon Pokédex: stats, moves, evolution & locati… - Pokédex entry for #137 Porygon containing stats, moves learned, evolution chain, location and more! (https://pokemondb.net/pokedex/porygon)
• Porygon - #137 - Serebii.net Pokédex - Omega Ruby, Porygon is capable of reverting itself entirely back to
 
Wes
...
do you think we are saitama?
:B
 
That :-)
 
Wes
@PeeHaa HELP
 
I am also that old, I don't have an idea what it is
It looks like crawler duck
 
@Wes ?
 
Wes
9:39 AM
i'm looking for symbols i could use in the amp logo
 
Btw patrick I am the generation before that. We had cartoon network and samurai pizza cats
 
Wes
 
Wes
like this
do you have any idea?
 
@Wes i think it should be a continues cirlce. Only broken up once instead of twice
 
Wes
9:42 AM
ok. something else? like, branches of a tree would work?
 
two arrows in different directions like this appneta.com/blog/wp-content/uploads/2015/10/async3-01.png
 
1 sec. Gonna take my laptop out
 
Anonymous
@Wes wow, that's amazing!
 
Wes
@JayIsTooCommon fu
 
Anonymous
<3
 
9:48 AM
Branches of a tree might work, but I think a loop is clearer
 
riiiite
Forgot about that one
 
Wes
wasn't it awesome
 
@Wes :-P
 
Another one I want to steal if it's not going to be used :P
 
Anonymous
9:51 AM
is that a squid on the left?
 
Wes
@PeeHaa fu pay me
 
@Wes derivative work bro :P
 
@Wes Stop it. :P
 
Wes
@JayIsTooCommon one day you will regret this
 
Anonymous
When I eventually meet you, i'll give you a hug, promise.
 
9:53 AM
@NikiC not sure whether we really need to fix that … it's more a theoretical issue ultimately. Either arrays will be permanent and grow and shrink and grow again or they will be sometime soon destroyed…
 
Wes
i will cross the channel tunnel with 100kg of rotten squids
 
hehehe
Does anybody have a comprehensive list of valid URLs I can use to test against?
I want to test some URL libraries
Found something I think mathiasbynens.be/demo/url-regex
 
Anonymous
@Wes as an example, me and @NikiC hugged for at least 5 minutes
 
instead of ruining @Wes mental health with moar logo iterations, we should just use the last elephpant squid logo and rename AMP to PHPulpo
 
Any twitter api expert here?
 
9:59 AM
@PeeHaa that's the one I wanted to use as a basis for a blogpost about how a URL is not a URL in most people's minds
 
@GovindKumar Not an expert, but I know a bit
 
@JayIsTooCommon I don't believe you.
 
@PeeHaa
 
Anonymous
@pee
 
poo
 
Anonymous
9:59 AM
@bwoebi don't be jealous
 

« first day (2439 days earlier)      last day (2516 days later) »