« first day (1776 days earlier)      last day (3169 days later) » 

@Sherif wow, that's kind of a hard joke to get
lol
 
@Sherif you've been at Froscon this year?
 
I'm everywhere
 
yet nowhere
as Morpheus would say
 
@tereško I got a clone of my server, Now I have two server :-)
 
7:03 PM
@Sherif did you see @Ocramius talk at froscon? He said he went, but just to speak and left, lol
 
@Sajad well, you can destroy one of them, by trying to tinker with it .. now you have a backup
:25359502 for that you would need to store the VM files
 
where they are ?
C drive ?
 
C:/users/<somthing>/VirtualBox VMs
 
ow ! got it ...
tnx
@tereško your personality is interesting, sometimes when I chat with you I laugh :-) , I don't know why !
 
that's when I am not extremely frustrated or about to explode
 
7:13 PM
one short question, why some files has . in the its back ?
like .ssh
 
files and directories starting with '.' are considered hidden in linux, and generally won't appear unless you specify an 'all' flag on the list command
 
ah ! tnx
 
7:26 PM
if you use opensource software, you will also see "dot files" on windows
for example git and svn uses them
 
I wasn't joking when I asked if there was a NATO Phonetic Alphabet library for PHP :3
2
It's my newest, and most useless, PHP package
Well, I mean, it might be useful in some extremely obscure contexts. Phone customer service, perhaps?
 
@Andrea And it's licensed user GPL/LGPL. WTF?
 
@NikiC No, LGPLv3
 
No MIT, yes. :-(
 
Abe
@Andrea lol
 
7:31 PM
@NikiC The LGPLv3 is implemented as additional permissions to go with the GPLv3. Thus, you must include both license texts.
 
How about using a real open source license instead?
 
I believe in copyleft. I know many people don't, and that's fine. They can give Oracle an unlimited license if they want.
 
Oracle doesn't give a damn
 
It's the principle of it
 
Oracle is a lawyer company which also happens to have a small programmer department
So LGPL is perfect for them
On the other hand, anybody who does not have access to a legal teams can generally not use G licensed software
 
7:35 PM
The LGPL isn't onerous, unless you consider contributing back to what you took from to be bad
@NikiC this is nonsense
It was nonsense twenty years ago, and still is today
 
popcorn
 
(More to the point, though, I don't really care if no big company uses it. That's not the main reason I write things like this.)
 
There is no native date formatting in JS.
 
@Andrea It's not just contributing back to what you took from
 
@DanLugg yep. Or string formatting. Number formatting.
 
7:37 PM
It's everything that has touched it
 
@Andrea It's not about big companies using it. I can't use it.
 
@NikiC Okay. Why not?
 
@Andrea Those I knew, I don't know why I'm surprised.
string.prototype.allTheThings
and now Date.prototype.fuckYouVeryMuchCrockford
 
@DanLugg it's normally not too much of a problem, but
ugh
 
^^
Exactly.
 
7:39 PM
try formatting decimals in JS, natively
try... formatting a clock properly
 
Like, dafuq, there isn't even printf, or some reasonable stand-in.
print-fucking-f
 
just displaying "2:35 AM" and "7:05 PM" requires more effort than it really should
@DanLugg thus the decimals complaint
 
^^
 
heck, the date formatting could for forgiven if they just had printf
 
I am going to submit to copy-pasting internet js prototype patches
 
7:40 PM
then you could do printf(..., date.getBlah(), date.getBlahFoo());, but noooo
 
@Andrea Exactly
 
@Andrea Too complicated to figure out what you can and cannot do
I don't want to start thinking about what "linking" means in the context of PHP libraries
And what I need to do if I have to patch the library
 
^ yeah, that, totally.
 
Maybe one could convince a browser group to integrate it so we get 30 completely different implementations of JS printf, one for each of them.
 
And I don't feel like reading some 100 page legal comment on the correct application of gpl and lgpl in different situations
 
ncf
7:45 PM
For anyone that does authentication using email/password, and uses sessions to persist a user's "authenticated" session. Have some questions for you
 
@DanLugg npmjs.com/package/printf require all the things.
 
Abe
guys, there was the intent to add abstract private functions to traits somewhere but i can't find it. was it a rfc?
 
@Andrea As a practical example, think about PHP and bignums.
 
PHP, honest open-source project, not Oracle, and half of the bignum discussion is basically about how we can or can not use gmp due to its licensing
 
Abe
7:48 PM
@NikiC what makes gmp better than bcmath?
 
@Abe It's faster and our bindings are much better
and by faster I mean much, much faster
 
ncf
I'm wondering what you save in cookies and session variables when a user is authenticated. And how you know to "trust" when you check these variables. What I'm doing right now is saving the "userid" and a generated key (stored in the user table) in the current session. Then every time a page loads, getting the user id and key, querying for the user, checking against the results from the database, etc. On every request. Is there a more efficient way to do this, rather than query db every time.
 
Abe
does it have bigdecimal support now?
 
no
 
Abe
i've always used bcmath so far
 
7:49 PM
if you want decimals with gmp, you need to store gmp and position of the comma ^^
 
@NikiC they clarify this
@NikiC publish the source. same as any copyleft license.
 
Abe
ah, so gmp doesn't have bigdecimal at all?
i thought it just wasn't exposed within php
 
@NikiC Link dynamically and we don't have to do anything, IIRC. Link statically and we should provide object files if someone asks for them.
 
Abe
adding the comma by wrapping it in a class shouldn't be too hard though
 
@NikiC which is a shame, because doesn't GMP have bigdecimals?
Just not the PHP extension
 
7:51 PM
@Andrea GMP has rationals
 
Abe
will try to do, once i get the time, in august 2062
 
@NikiC ah yes, and bigfloats
 
@Andrea Yeah, like I want to spend time on that for minor changes
 
@NikiC you don't have to
you're only obliged to provide the source on demand
 
user895378
good working code is hard enough without licensing issues :(
 
7:54 PM
if licensing requirements bother you, you might as well make it public domain
Then people don't even have to acknowledge inclusion if they use it. They can download and never have to even think about legal stuff
 
@Andrea Not possible in most jurisdictions ;)
 
@NikiC That's why there's CC0
 
In any case, I've never encountered any licensing concerns with MIT / 3-clause BSD (as long as it's not modified -- see json fuckup)
 
@rdlowrey Yea, I hate dealing with licensing issues.
 
Do you use traits? No, you don't.
 
7:57 PM
My philosophy for OSS license has always been "MIT or go home"
 
user895378
same
 
@cspray Yeah, that's me
 
@cspray Most sane people do that
 
Sorry, but that won't cut it with businesses...
 
?
 
7:58 PM
If it's not MIT, BSD, Apache, it's off-limits
 
They'd prefer Apache, which grants a patent license
 
They will still use MIT and not so much GPL
And if they do they will tell anybody and get caught everntually
 
The main problem is that permissive licenses do not encourage the availability of open source software. They don't help user freedom.
 
It's thrue that GPL is user oriented and MIT developer oriented
But aren't we all developers in here?
 
Is there any way in user land that I can tell if a Closure has use'd something?
 
8:03 PM
@PeeHaa developers are always also users :p
 
@Andrea Mainly important if bigco releases open-source
 
@NikiC True
 
@Andrea Let me just say this: on more than 1 occasion I had refrained from using (and possibly contributing because of this) a GPL licensed project because of the license. I have never had any issue with MIT licensed projects
 
@PeeHaa Okay. Why did you refrain from using them?
 
ncf
not to be a bother, but if anyone that has joined wants to talk about user authentication... please refer to my question messages above
 
8:07 PM
Because of possible issue when distributing it
 
@PeeHaa .. but I have had issues with Acolytes of the great GPL.
 
did you know there is a skype web client?
awesome :)
 
Abe
@Trowski +1 would have. something like new ClosureReflection($closure)->getUses()
 
@MarcelBurkhard you are about a month late. Also, it actually sucks.
 
@Trowski Why do you need this?
 
8:08 PM
@tereško yeah but still better than actually installing skype
 
user895378
sounds like a serialization no-no ;)
 
@MarcelBurkhard based on what?
 
@tereško based on having the least skype while still being reachable
 
@Andrea Only because pthreads doesn't seem to support Closures that have used things. Maybe that's something that could be fixed? /cc @JoeWatkins
 
8:10 PM
1 min ago, by Marcel Burkhard
@tereško yeah but still better than actually installing skype
 
@rdlowrey Definitely not serializing closures :-D
 
would installing it make it easier to be reached?
 
@tereško nope?
 
@Trowski Huh, interesting
@Trowski in JS you can actually do that :3
 
@MarcelBurkhard I have begin suspecting, that you are one of those "developers", who act all knowing, but are actually clueless.
 
8:13 PM
@tereško I'm mostly clueless but I don't think I act all-knowing?
 
@JoeWatkins Here's a repo script: gist.github.com/trowski/0075b78c75f816ad970b
 
@tereško I'd appreciate if you could elaborate why you came to this conclusion so that It gets constructive criticism...
 
hmm.. if I have a cache->has($key) and cache->get($key) would it make it sense that get($key) throws an exception if the data at $key is not found. I was thinking in a case of first checking if the cache has some data, if it does, get it.. but in that fraction of time, the cache might have been deleted, hence the exception
?
 
8:29 PM
@PeeHaa still around?
 
user895378
@RonniSkansing sounds sensible to me
 
Abe
@RonniSkansing what kind of cache is it? an exception is still something that must be solved... have you considered locking mechanisms or something?
 
@Abe could be redis, file etc
Like, what if someone busts the cache
lately doing work, I have seen alot of should-have-been atomic operations go wrong
 
Abe
has() is pretty much an useless check if data can disappear at any time, is it?
 
8:33 PM
I do not think so, it just tells me if the data is available at the moment I call it, if I call get afterwards its reasonable to think I will retrieve it, if not, I can handle the exception of the missing cache, by for example building the cache
 
@RonniSkansing When do you need to check if something's in cache and yet not immediately retrieve it?
 
@Andrea like $foo = $cache->get($id) ?: $service->get() ?
It because I would like to know if something is cached before I retrieve all of the content
 
Abe
$r = $cache->ensureLoad($key) // checks if key exists, loads the data in memory or throws an exception
$r->getData(); // gets the data
 
@Patrick yeah
 
but then you might cache invalid data @Abe
 
Abe
8:37 PM
@RonniSkansing you mean data that might be changed meanwhile?
 
Abe
well it's not that get() is any safer
you can be sure of that only by implementing a locking mechanism
 
@PeeHaa I'm flying tomorrow morning. If you want to meet up for a beer or something, we'll need a way to get in touch
 
@RonniSkansing $cache->get($key, $fnToInitializeCache)?
Assuming you actually want to populate the cache on miss
 
Yea, that is not certain
 
8:41 PM
But generally speaking has is a bad idea
Better do something like null !== $value = $cache->get($key) otherwise you'll end up with a race condition
and if that's how the api is supposed to be used, then throwing an exception will be rather inconvenient
 
/me has($key)
 
Abe
:P
 
Yea ok, I can see the has is abit useless
 
hmm
If you had a cache, wouldn't isset($cache[$foo]) ? $cache[$foo] : NULL retrieve the cache entry TWICE, if you're being semantically correct?
(THIS IS WHY PEOPLE HATE PHP)
 
@Patrick Join the room and I will make you room owner so you can see my deleted text (phone number)
 
8:49 PM
:-)
@Andrea no, this is why people hate idiotic API design
 
@ircmaxell for a cache this is a bad choice, yes
 
@Andrea $cache[$foo] ?? null. :-)
 
@kelunik :)
(praise be to @NikiC)
 
thanks for the advice yall
going to chill out now, have endless refactor to do
later
 
I have a really fucky question :
why the output of these are different ?
while($end = mysql_fetch_assoc($sth)){}
while($end = $sth->fetch()){}
query is identical!
 
9:00 PM
THIS IS WHY TRAITS ARE A NIGHTMARE
 
@Sajad why are you using mysql_*?
 
@iroegbu second line is pdo
I'm migrating to pdo
 
Abe
@ircmaxell i like that :P (p.s. i'm WesNetmo)
 
@ircmaxell Because it calls the private method?
 
TypeError: Argument 1 passed to Aerys\Session::Aerys\{closure}() must be of the type array, object given ← That's not how that the FQN should be printed, right? /cc @bwoebi
 
9:02 PM
@Sajad oh... now I see
 
@ircmaxell What's wrong with it?
 
@ircmaxell that's fairly rudimentary...
 
Abe
additional discussion is here github.com/php/php-src/pull/682
 
$result = $sth->fetchAll(PDO::FETCH_ASSOC);
@Sajad then loop through $result, do check that $result contains stuff before looping
 
@iroegbu that's good, but I want to use fetch(), fetchAll need to some more memory
please take a look here
 
9:07 PM
@Andrea private is not private.
 
@Sajad actually you can do foreach ($pdoStatement as $row) { ...
 
@ircmaxell It is private. Traits are compiler-assisted copy-and-paste. They let you share code between classes, which includes private methods.
 
@tereško foreach() is for fetchAll()
 
I dare say traits would be less useful if you couldn't share private methods
 
@Sajad no
 
9:08 PM
@Andrea yes, which means private should be off limits
on both sides
 
@tereško wait I check
 
@ircmaxell not at all
traits would be useful if I need to reuse some private utility method in a bunch of classes
 
@ircmaxell have you found a good example for actually using traits?
I tend to treat traits same way as eval and goto
 
@kelunik thought that bug were fixed…!?
 
@ircmaxell As @Andrea said, they're really just assisted copy&paste and thus it is private.
@bwoebi When? /me pulls master
 
9:13 PM
@Andrea uh huh
 
@kelunik every time I think about this, I get a feeling that someone just wanted to make the writing of shitty code that little bit easier
 
@kelunik a month ago or two.
 
@tereško I have found areas that make sense in the realm of not having to refactor significantly
 
@bwoebi Then it's not fixed: PHP 7.0.0-dev (cli) (built: Aug 26 2015 07:15:43)
 
hmm
can traits be used to emulate C++-style friending?
can you have something the trait can access in other classes if it came from the same trait?
 
9:15 PM
@tereško Same impression here.
 
@kelunik then I need to revisit that
 
Abe
@Andrea afaik no
 
@Abe unsurprising, but alas
 
what is the difference between font-size and font-size-adjustance
sorry wrong place to ask i just forget
 
9:24 PM
@kelunik git.php.net/… okay that just was for static methods… need to strip namespace for non-static too then.
 
Abe
@kelunik sometimes they are useful. as everything, if you don't abuse them
 
@Abe Sure, just as goto is useful in some cases.
 
9:39 PM
@kelunik Should be Aerys\Session::{closure}(), right?
 
@bwoebi If the namespace is Aerys\Session, shouldn't it be Aerys\Session\{closure}?
 
@Trowski no, that's the class
namespace is Aerys\
Aerys\Session::Aerys\{closure}() is current function name of the closure
 
Abe
in php7 there is no way to use the string returned by a function as a class name to use with the new operator, right?
new (foo())();
tried several combinations but none seems to be working
 
ehm, this should do that?
 
@bwoebi Well that definitely seems wrong. Aerys\Session::{closure} or Aerys\{closure} would be better.
 
9:45 PM
oh, well… parse error
 
Abe
function foo(){ return "ArrayObject"; }
$ao = new (foo())();
 
@Trowski yeah, that's what I meant ;-)
@Abe currently only static, a name or a variable
 
Abe
okay
 
Does anyone have a good article/breakdown on the php7 asynchronous programming features?
 
@Abe because… new foo(); … is that now doing a fcall to foo() or not?
because parens on a new expression are optional…
 
Abe
9:49 PM
new (foo()) perhaps?
 
@Abe new (foo())(); … yeah?
 
@prograhammer Yeah, I'll write the whole article here for you: There are none.
 
is that doing a fcall on the return value of foo()? or using it as class name?
 
@bwoebi @Abe It would be new {foo()}()
 
Abe
@bwoebi ahh gotcha
 
9:51 PM
@Trowski seriously? What happened?
 
@NikiC sure, but it'd be confusing.
 
@prograhammer Well, that statement wasn't entirely true... Generators gained yield from and return values, but that pretty much is it.
 
@bwoebi i mean, that's the syntax we'd use if we'd support it
 
@NikiC totally agree on that. I'm just saying why I think it isn't and maybe shouldn't be supported at all.
 
@Trowski And most importantly, yield can be used without parens. That's totally an async feature :P
 
Abe
9:53 PM
@bwoebi i would make () non optional on new :P
PHP8!
 
@Abe nah, E_BC_BREAK
 
@NikiC How could I forget that! Honestly that is one of the best parts.
 
@NikiC totally true!
 
I love being able to write return yield from $coroutine(); :-D
 
I really wish I could run that full testsuite in under one minute (--disable-nearly-all)
 
Abe
9:59 PM
going to bed, gn all!
 

« first day (1776 days earlier)      last day (3169 days later) »