« first day (2591 days earlier)      last day (2356 days later) » 
00:00 - 12:0012:00 - 00:00

12:04 PM
evenings o/
 
12:39 PM
@Wes \o/ I think I might finally have time after next weekend to do random stuff again
Have been kinda tied up in either work or leisure the last weeks
 
Wes
that wasn't really good news though :B i have developed about some doubts... it's not complete trash but well :B
testing is hard
i am so pissed off when i write tons of tests which i think cover code properly... and then i realize that i have missing tests (and bugs) for an awful lot of logic
 
Wes
1:13 PM
unrelated, @PeeHaa any idea about how i should implement this? github.com/Netmosfera/Atom/issues/6
 
1:46 PM
@Wes is there any actual code for that?
 
Wes
yes. but it's shit atm :B
 
I know what to do about that problem but I'm finding it hard to explain
any chance I can see the code?
 
Wes
well, there's not much of it. it's just a foreach
 
How is the underlying data stored within a collection? In an array?
basically, is the underlying data store a reference type, is my question?
 
Wes
solution must work regardless of that. in the specific i have collections made up out of splfixedarray, array, and binary trees, record based
and also linked lists
by the default the behavior is, you cannot modify a collection while iterating over it
 
1:49 PM
Hi All!
Evening...
 
Wes
but i want that to work. it would be really bad if it didn't
what's a reference type? you mean copy on write?
 
@Wes well I disagree tbh, it doesn't make sense to modify a collection during iteration
afaik nothing in .net lets you do that
you have to create a copy if you want to do that
 
Wes
:B isn't what i just said? :B
 
oh right I misunderstood what you meant
 
Wes
foreach($list as $val){
$list->append($val); // throws concurrent access error
}
but, i want $list->concat($list) to work
 
1:52 PM
@Wes hang on is this an extension or userland?
It's really weird having issues on a repo with no code in it...
Like, I have no real frame of reference to know how you would implement a thing without looking at the implementation :-P
 
Wes
i am using that for noting things rather than using mantis bt
it is php userland though. but it must be polymorphically valid, i mean... i don't want to workaround some code just to realize that i cannot do the same for some other data structure... get what i mean?
also i'm looking for a simple design with not much overhead
i thought to do it with observers, copy on write, but ew... so much code
i have found a solution though... but i am curious about what was your proposal now :B
 
@Wes What you need to do is to get a unique identifier for the underlying data set. So you get need something like Collection#getDataSetId() and wrapper classes just forward the call on to the inner collection. If every underlying data set is an object (you can probably just replace arrays with ArrayObject to accomplish this) you can use spl_object_hash(). If everything has a common base class, there's another, somewhat dirtier but a lot more efficient, trick you could do
if you have a common base class, you can have a protected property like $underlyingDataSet, and set that to the underlying data set on construct. For bottom level collection types it would be a the inner ArrayObject/SplFixedArray/whatever. For wrapper types it would be $inner->underlyingDataSet.
Then you can just do if ($this->underlyingDataSet === $other->underlyingDataSet)
That would be the best way if you have a common base class, because then the cost is just a single property assignment in the constructor and the check is effectively just a ptr comparison
 
Wes
@DaveRandom lol, same solution i've found :D
arrays are not a problem
problem is between two variables that are the same, and their wrappers, etc
i mean, i'm not using pass-by-ref on the array, so no problem with that
does that have a precedent in other languages, like c#?
 
2:11 PM
@Wes The point is that you want every underlying data set to be effectively by ref
Because you need to identify whether they are the same object
Because if (and only if) they are the same object and you are about to do an operation that requires both read and write, you need to copy it first
you want the id of the underlying data set (the PHP built-in one), and the only possibility to do that in a uniform way is with objects
 
Wes
yes but arrays if they are used are encapsulated into an object
 
at least the only efficient way that I can think of
 
Wes
in that case the "id" would be the wrapping object (the one that has private $array)
 
ah OK so you do $this->underlyingDataSet = $this?
(effectively)
 
Wes
i will do function getDataID(){ return spl_object_hash($this); }
then if($a->getDataID() === $this->getDataID()){ /* copy */ }
 
2:16 PM
OK so then doesn't that solve that issue?
 
Wes
yes?
 
good?
 
Wes
yes :B
what were you referring to?
i'll probably have it more abstracted, like
$other->usesSameStorageAs($this)
in case it's not just one data id. for example ordered maps use two arrays, one for the hash table, one for the order of keys, in that case the check would be done on both the collections
anyway thanks for the help :P
i will have code eventually. i've been contemplating this library for years now
i've figured there is no perfect way to make it. it's basically a mess and there's going to be dirty hacks like this all over the place
 
@Wes An issue is that you will need to have a separate implementation for any aggregate wrapper types, so that you iterate over it's underlying collections individually
and recursively
since an aggregate type doesn't have a single data store identifier
oh you said that
:-P
sorry I am only half paying attention
 
Wes
yes, there might be several "ids" involved
 
2:26 PM
btw you know php-ds is a thing? :-P
 
Wes
i do. if you look at it carefully you will notice that it's not that good, especially the api design
 
Improving the api design would probably be a lot less work than re-writing it from scratch?
 
Wes
2:42 PM
@DaveRandom check tuider
 
tinder?
 
oh lordy - j-php.net
4
 
@Danack That could be useful for me though
> Before we start, you need to download and install the Gradle distributive.
ugh
 
is gradle something like maven?
 
yeah
 
2:52 PM
so, does it have some sort of advantage over maven, or just a rebranding sort of thing?
 
Well, for a start, it's not maven, so that's one advantage.
 
@Danack :P
 
Hi can I ask some help my recording is save in this directory /var/spool/asterisk/monitor ,now I want to get that audio file and transfer it to my other server.I don't know how to transfer that audio file ...thank you in advance.
I mean not prawn in security..because what I did I created a script in that server when I called that it will copy the audio file to this /www/myrpoject but this directory is not safe because anyone can access it.
after i copied that, I have another script to copy to my other server. it works fine but my idea is not good because it will cause secruity issue
 
@jemz scp, rsync, http, ftp, there are plenty of ways
 
3:09 PM
@MadaraUchiha, I want to this in my script...how to apply scp in my php script ?
can I execuste ssh using php code ?
I think I will use rsync in node.js...thank you for the idea.
 
@MadaraUchiha pretty nice :B
 
mmm, so ... in JS does PHP equivalent of list()?
I remember reading about it somewhere, but I forgot
 
@SaitamaSama It's called destructuring, and yes, JS does it.
 
ahh. yeah, destructing
 
3:33 PM
Also the opposite
 
constructing? :B
 
const arr1 = [1,2,3];
const arr2 = [4,5,6];

const result = [...arr1, ...arr2, 7, 8, 9];
// result = [1, 2, 3, 4, 5, 6, 7, 8, 9]
 
mmm, seems like a handy language construct
is this ES2016?
 
what is mean dotted in "...arr1" ?
 
Wes
youtube autoplay brought me here youtube.com/watch?v=5pwX7_b4uXM
 
3:39 PM
@Wes what the actual ...
I'd rather watch GoT than that
 
Wes
i watched pingu when i was a kid :B
that thing is 30 years old at least
@Patrick i read like a couple of pages... sorry :B
need to put it on the tablet or i will never read it. i hate reading at my computer
 
@samayo good, have you also worked with Laravel framework?
 
Anonymous
not a lot
 
@samayo have you uploaded a laravel project on centos server?
 
@MadaraUchiha lol
awesome
 
Anonymous
3:46 PM
yes
 
https://codepen.io/MadaraUchiha/pen/OOzBrG
 
@jemz Spread arr1 into the parent array.
 
Wes
@SaitamaSama destructuring, not destructing :B
 
@samayo good, I did it on the ubuntu server, and as you know, I have to run two commands after uploading a laravel project on the server:
sudo chmod -R 777 project_directory/storage
sudo chown www-data project_directory
 
Anonymous
3:48 PM
 
Now I want to know, what are the equvailent commands in centos?
 
Too late. Tweet is already out
:)
 
Anonymous
it's the same @Shafizadeh
 
@Wes -_-
btw, @MadaraUchiha we miss your presence at Maid Café :-;
 
Anonymous
Also @Shafizadeh never give full write access (777) permission to nearly anything in your project, let alone with recursive
 
3:51 PM
@samayo I hardly think so, because www-data is the name of apache user on the ubuntu. Apparently it's called centos in centos server
 
Wes
@SaitamaSama i wasn't joking
 
I got you...
That was actually a reaction I had on my face due to the reason of the typo being so bad
 
Anonymous
@Shafizadeh No, it's not centos. Try it first
 
evening, bitches
 
Yo biatch o/
 
3:58 PM
hola \o
 
@SaitamaSama I saw you pinged me
 
@Shafizadeh www-data might be an invalid user, something to do with chown ...
it's a wild guess, based on a crazy kind of intuition that only the craziest of crazies have ...
 
:-)
 
Anonymous
try nginx:nginx
 
4:02 PM
more wild guessing, I like ...
 
@samayo what's that for?
 
Can someone take a look at my quistion here pls: stackoverflow.com/questions/47345320/…
 
Anonymous
@Shafizadeh are you using nginx server?
 
Anonymous
@JoeWatkins I know what I am talking about
 
@samayo I don't know
how can I be sure I'm using either apache or nginx?
 
4:03 PM
^ how could you ?
 
Wes
\o
 
Anonymous
Unbelievable! You don't know what is installed in your VPS @Shafizadeh?
 
@samayo it doesn't matter, because you know what you're talking about ... so you can just keep talking until the problem goes away ...
 
Morning.
 
4:05 PM
yo levi
 
Anonymous
@Shafizadeh yum list installed | grep nginx
 
@samayo I bought a configured server .. everything is installed on it
@samayo lemme run it
@samayo no result (nothing found)
 
Anonymous
Or systemctl status nginx.service
 
Anonymous
So, you don't have nginx installed.
 
Anonymous
4:08 PM
How about yum list installed | grep apache
 
@samayo it has some result
 
Anonymous
sudo service apache start
 
so?
wait
> apache: unrecognized service
 
apache2
 
Anonymous
Yeah, probably ^
 
Anonymous
4:12 PM
you need to share the ... grep apache
 
still unrecognized
ok
 
EA Apache. It's in the game
 
You mean the normal apache isn't installed on my server?
 
Anonymous
Those must be the eple repositories. @Shafizadeh at this point I would suggest you install a server. Try nginx it's easier
 
Anonymous
4:19 PM
Before everything though, update centos using $ yum update -y
 
@JoeWatkins I'm going to be with my familly for several hours. In roughly how many hours do you go to sleep?
 
Can someone take a look at my question here pls: stackoverflow.com/questions/47345320/…
 
@samayo updated
 
Anonymous
Do you want to install nginx or apache?
 
apache
 
thx
I will try it
just one thing
what's EA apache?
 
just a meme
 
kidding aside ..
 
Anonymous
Easy apache
 
wha's easy apache?
can a project be run using by it? (without having regular apache installed on the server)
 
Anonymous
4:32 PM
I dont touch server gui's
 
Evenin
 
Anonymous
If you have complete access over your machine I suggest to go without it
 
without what?
Sorry I don't know English very well
 
Anonymous
Without a control panel
 
@Shafizadeh install apache2 or nginx
should be quick (=
 
4:42 PM
Can someone take a look at my question here pls: stackoverflow.com/questions/47345320/…
 
please don't spam your question
If somebody is here and wants to help they will
 
@LeviMorrison have you seen github.com/phpstan/phpstan/pull/606 and have any thoughts on their syntax choices?
 
4:56 PM
@LeviMorrison it's been a long day, maybe only 4 ... will be up early though, not as early as today ... I pulled in changes but haven't had a chance to properly review yet ...
 
5:14 PM
lol
 
5:38 PM
@Danack I'd prefer we don't do Type[]. I think [Type] and array<Type> are better.
And I think maybe always put value type first: array<ValueType, KeyType>.
 
6:39 PM
@LeviMorrison I guess we have to change integer-like keys then to be no longer be casted to integers.
 
@tereško Even if it's PG-13, her 8yo still can't watch it...
 
remember the people who petitioned to remove GTA5 from some stores in Australia?
these are not the sharpest tools in the box
 
 
2 hours later…
8:52 PM
what up ladies and gents, I'm developing with amazon api, was wondering after my initial (tag=praise0ab-20) is sent, does amazon store that in a session variable?
 
9:18 PM
@Wes :*(
 
9:47 PM
@PeteDawg No.
 
10:32 PM
oh yea, so how would I get it so it makes sure they are keeping my tag on whatever they purchase?
 
11:22 PM
@Trowski another question is the API for pushing individual connections back into the Pool; see github.com/amphp/mysql/issues/48
I'm not sure whether that's redundant with transaction support or not.
 
@bwoebi You shouldn't have to do it manually.
 
@kelunik it depends on what you're doing. If you change a session variable and then change it back…
@Trowski why are you preventing simultaneous connection creation?
If all connections are in use and a bunch of connections are needed now, why do you force connection establishing to be sequential?
 
@bwoebi That really should be changed to just stop once the number of pending + active = max.
 
At what point do you start giving attitude to a client...?
When they ask for updates when you emailed them twice in past two days with exactly what's been done? And they ask without checking emails ALL the time? yet request you email them updates.
 
@Trowski yep
 
11:31 PM
@bwoebi Users never push connections back into the pool, it's done automatically.
 
@Trowski I'm talking about use cases where it's extracted for reasons unrelated to transactions
 
Such as?
A individual connection can't be extracted from the pool.
Essentially a pool should be considered the same as a single connection. The fact that it is multiple is really just an implementation detail.
 
@Trowski setting a session variable for specialized operations
 
@bwoebi Then I'd open a new connection especially for that purpose.
 
@Trowski yes, or, for simplicity and speed, just give me a ready connection from pool which already knows my credentials and everything (if not open yet)
I don't want to also pass around a ConnectionConfig, but just the Pool. Makes everything simple.
 
11:37 PM
@bwoebi A method could be added to totally extract a connection from the pool, which then could not be put back.
 
@Trowski at least that should be supported, yes.
 
@bwoebi ConnectionConfig probably should be moved to be an internal class anyhow, so I agree.
 
As for not putting it back … don't know. We may say it's the users responsibility to ensure internal consistency at that point.
Anyway, most users shouldn't export connections either way
It's an API for specialized use cases if users do need these.
 
@bwoebi Let's keep the pool separate.
 
nah
As Aaron said, at least extracting is absolutely no problem at all.
 
11:43 PM
yes, but there's no reason to offer that.
 
there is, if you have state on a connection unrelated to transactions.
I'm absolutely not saying it would be a common use case, but it is useful in certain scenarios
And there's no cost of supporting that
@kelunik keep in mind that we're offering a low level API, with a few higher level APIs providing simple connection pooling, but should still allow all the low level API access if needed.
Just like the socket API, it's fine for nearly every use case, but sometimes you still need to go ahead and extract the resource
I am expecting people to pass around the high level APIs like Pool, Socket etc. and specific parts of code may need to break the abstraction and reach into the lower level. That part however should be encapsulated within the specific endpoint logic the high level objects are passed in.
You do not want to occasionally pass in Connection objects or such things because the endpoint logic requires it in that case. You want to have generic high level objects you pass around and then you're done where you're wiring your application parts together.
@Trowski Regarding Statements: this is not really optimal in combination with Pools. You are executing an operation on a Connection without having the Pool informed at all that the Connection is currently busy. This may cause unrelated queries being stalled quite a bit (if they are assigned to the currently apparently ready connection). On top of that, if there are multiple prepared statements on a given connection and they happen to be executed simultaneously, that's also stacking.
 
00:00 - 12:0012:00 - 00:00

« first day (2591 days earlier)      last day (2356 days later) »