« first day (1567 days earlier)      last day (3377 days later) » 

2:00 PM
Another language I flirt with is clojure, but unfortunately it needs JVM to exist.
 
you mean clojure
 
yah ^
 
what's bad about the jvm?
 
(my english sucks, I learned to speak it before start writing it)
 
the java language is pretty bad, noone could argue that. But the JVM is a pretty good product
it's the best jit around afaik
 
2:02 PM
@FlorianMargaine it's sad not to be able to deploy a closure app without take the JVM together
 
that's why I liked Go so much
 
you don't anymore? :P
 
now I love it :)
 
I have an amount value saved in mysql as a DECIMAL(10,2). I have an api that accepts numbers in the format 12345.12. How do I do it the right way™?
 
2:06 PM
@spdionis ```DECIMAL(7,2)```
IIRC
 
@MarcelBurkhard it's not a big difference. The part I want to be careful in is sending the right amount to the external api.
i'm scared of just outputting the float variable in my xml template
 
@spdionis what should happen when you have a number higher than 99999.99 ?
 
news.php.net/php.internals/81428 <- poor people might be getting so many segfaults
 
@spdionis if you just want to "truncate" it you could do <?php echo min(99999.99, $value); ?>
 
@MarcelBurkhard it is more a matter of formatting i'm thinking about. Some currencies have different decimal places and separator than others.
 
2:12 PM
@spdionis is the php intl extension available? If yes look at the docs
 
@MarcelBurkhard It will be if i need it :). I was looking through that but I didn't notice NumberFormatter::formatCurrency before. Thank you :).
uh... looks like it's not what i need tho
 
@spdionis you'll probably need NumberFormatter::format, which does the same just without currency sign
 
@MarcelBurkhard it adds dots and every 3 digits...
 
@spdionis in the example its set to de_DE thats why, thats actually correct german notation
 
but I don't think that's what I need... docs don't say "Min amount €0.01. Max amount €999999999.99."
 
2:18 PM
I have a git repo locally which I have used to develop something. Now my client wants everything to his git repo. Is there an easy way to move everything from myrepo to the clients (empty) repo?
 
@spdionis maybe a simple number_format($value, 2, '.', ''); will suit your needs?
 
@PeeHaa Empty as in no commits?
 
Yes
Basically I want to push all the commits in my repo to another repo
 
Just add it as a remote and push straight to it.
 
Does that also push all old commits?
 
2:24 PM
@Rangad @marcio Maybe we should by Python-like and do from Foo use { Bar, Baz, Qux }; ?
 
@MarcelBurkhard I did sprintf('%0.2f', $amount);
I think it's the same. Maybe I was overthinking this.
 
Yes, it does. If you're going to be doing it more than once, you may want a bare repo to sync changes, just to prevent problems with dirty workdirs.
 
@AndreaFaulds looks beautiful :) but reserve the "from" keyword would cause a big fight
 
@marcio Yeah :/
That or just a required trailing slash. Hmm.
 
@AndreaFaulds are you trying alternatives because readability?
 
2:26 PM
@marcio Yes. I just think use Foo { Bar }; might be confusing, but who knows.
 
@AndreaFaulds I created a reddit thread (and killed it) and it didn't went well
some people got cunfused
 
@marcio For the RFC?
 
yes
 
Btw: currently reserved words list: github.com/php/php-langspec/blob/master/spec/…
(btw: unless it's about the scalar types thing, I don't see the point of switching to another room)
 
@JeremiahWinsley Excellent. I already have a bare repo (that's the repo I need to put all my commits in)
\o/
 
2:30 PM
NP
@AndreaFaulds well, there is time to try other syntaxes
 
@marcio Yeah
Unfortunately we don't seem to have anything like from or of reserved :(
 
this one just seemed to fit well for what PHP already has. I don't like to introduce new syntax elements for each little feature.
 
This is basically the PHP Internals room anyway.
10
Morning, PHP development room!
 
Morning puss
 
@LeviMorrison hey little cat
 
@LeviMorrison It's the room for: PHP Internals, the good parts :-)
 
Requestable should do it shouldn't it?
 
@LeviMorrison Morning.
 
@LeviMorrison but the nayers are not in the room
 
2:35 PM
@marcio Or at least a lot of them ^^
 
nice
 
I've probably told you guys before about how there was a "constructive" PHP internals room on Freenode. Guess what made it "constructive"?
 
@AndreaFaulds Nobody was there ?
2
 
@PeeHaa No, a bunch of people were there.
 
2:36 PM
lol
 
:D ^
 
:-)
 
@AndreaFaulds I like his answer tho
it was a js room?
 
*crickets*
 
wait
I just got it
and I'm french
oh god
I thought it was mindless bashing, sorry @AndreaFaulds :(
 
2:39 PM
*crickets*
 
(removed)
 
@FlorianMargaine ?
It probably is just "mindless bashing"
 
@AndreaFaulds "pierre" means "stone" in french
 
@FlorianMargaine Oh.
 
"constructive" and "stone" is actually a pun...
 
2:40 PM
Huh
 
that's kinda reaching
 
That wasn't intentional
 
and I thought my English was an issue :popcorn:
 
2:41 PM
"thought"
@marcio you'll probably want some of us to review your communications with internals?
I mean, the english part
although... that's not really an issue
 
that would be helpful, @Danack reviews the RFCs for me
 
many people on internals are not so good with english.
 
so...
@AndreaFaulds is thinking of other syntax
 
ignore her
:P
 
:D ^
maybe we should wait before put into discussion and let the RFC settle down for a while?
 
2:44 PM
why :(
 
j/k. But I like the original proposal though, maintaining php syntax.
it seems natural
although it seems like a pita for IDEs
 
IDEs deal with much, much worse
 
hello everyone, i don´t know if this is the correct room to ask this but, i´m having trouble understanding how to retrieve a BLOB file...the thing is, i have a imput type file where the user chooses a image and then it appears in a div below...the file is being posted( don´t know if it is in the correct way) and in my phpadim, it appears BLOB -34B...now i want to get this file and i´ve been searching a lot but with no luck, can anyone point me to a good tutorial?
 
What RFC are we talking about?
 
@PaulCrovella I need an example for that
 
2:45 PM
@PaulCrovella well, yeah, there's xdebug. But we're talking about sane things there.
 
greetings from abroad
 
@FlorianMargaine only until the vendors update them
 
I have to admit it does not seem really readable in my eyes.
 
@marcio Another side note, you could add scala to your list of reference languages. Having 3 looks better than two ;)
 
2:48 PM
I would much more love to see an overall better way to import a package of multiple namespaced classes thought.
 
i did a console log, and the file appears in a C:\fakepath
 
Is there some (sane) way to force clone internal objects of an instance on cloning?
 
@Rangad annotated
 
@marcio PT ?
or BR ?
 
BR
 
2:50 PM
:) portugues aqui!
 
;)
 
por acaso pode-me ajudar?
 
@Japa speak english here, or open a private room ;)
 
Isn't there some script that is generated when you do make test in php-src that reruns the failed tests only?
 
@LeviMorrison only the test summary AFAIK
 
2:57 PM
@LeviMorrison lol, would you want good tooling in php-src?
come on
:P
 
posted on January 30, 2015 by kbironneau

/* by Przemo */

3
 
@hakre sorry, missed your message. Well if you have any suggestion for the syntax maybe I could take it into consideration.
 
Well if I could import a whole subpath of namespaced class families that would be useful.
 
we discussed this before, it's not possible... PHP can't import from wildcards because of the autoloading thing
 
@AndreaFaulds What were you doing to get non-fatal, compile-time errors in test suites?
 
3:07 PM
@LeviMorrison I forgot... look in the php 4 constructors pull request, one sec.
 
I imagine we may remove that one day and we'll have to do this routine again ^^
 
@LeviMorrison At least it clarifies that it's only there for that reason ^^
 
By the way, I'll probably collapse your commits I yanked from your PR into one. I hate clutter in PRs, but this way you keep ownership
 
Fair enough :)
I don't mind
I frequently play with git's rebasing abilities
 
Okay, this test shows exactly why we are removing the named constructor in favor of __construct: Zend/tests/get_class_methods_002.phpt
 
3:17 PM
I like attributing patches correctly
 
I'll probably use this (or something like it) in the RFC as a specific example.
Should I refer to PHP 4 constructors as named constructors instead?
I think I like that better. For those not familiar with what they are it gives a better description.
 
@LeviMorrison no, I don't think that I'd immediately get what you mean with named ctors...
 
My initial reaction to that: I think you're dumb ^^
But you are right actually because there is a "named constructor" idiom that is not what this is.
 
Also… __construct is also a name for the ctor… If there were now a function () {} without name allowed in the class body, that would be an unnamed ctor…
 
...and now we've all visited that c++ faq page
 
3:26 PM
@LeviMorrison didn't know about that …
 
Here's what I'm generating right now:
zend_error(E_DEPRECATED, "PHP 4 constructors will be normal methods and not constructors in a future version of PHP; %s has a deprecated constructor", ce->name->val);
 
Ok, How to clone object together with all entire stuff?
 
"all entire stuff"? please be more specific ;) What's wrong with $b = clone $a; ?
 
@LeviMorrison I'd write it as Methods with the same name as their class will not be constructors in a future version of PHP; just normal methods. %s has a deprecated constructor.
 
@Rangad if deep inside $a you have properties, which are objects, they won't be cloned
 
3:29 PM
Then implement __clone and do that yourself.
 
Naive approach:
public static function cloneArrayContainer(array $data)
    {
        $result = [];
        foreach ($data as $key => $value) {
            if (is_object($value)) {
                $result[$key] = self::cloneObjectContainer($value);
            } else if (is_array($value)) {
                $result[$key] = self::cloneArrayContainer($value);
            } else {
                $result[$key] = $value;
            }
        }
        return $result;
    }

    public static function cloneObjectContainer($object)
^ failed because of circular references
 
> Methods with the same name as their class will not be constructors in a future version of PHP; %s has a deprecated constructor in %s on line %d
(Although honestly I think the line number is incorrect because of the way I do the check)
 
I may try serialize + unserialize, but ... if there are callbacks inside it will explode
 
I really wish it weren't h1 - h6, but instead h with a level attribute, such that <h2> would be <h level="2">, thus the styling mechanics would be h[level="2"] { }
 
@DanLugg I actually like the proposed-now-defunct XHTML 2 way of doing it.
 
3:32 PM
@LeviMorrison That being?
 
Sorry to disturb your discussion, but: Immature Coding Communities in a nutshell
 
You have <h> inside of things like <article> and <section>. That's it.
If you want a sub-heading you have to nest the content.
 
Ah, via <section> etc.
So it's implicit.
Yea, I like that too.
 
@LeviMorrison you should not omit the first part of the string
 
HTML 5 actually has that semantic still, you just do the headers yourself.
 
3:33 PM
^^
 
%s has a deprecated constructor in %s on line %d
^ meant this first %s
 
I fucking hate HTML5 tbh.
 
@marcio it should only import the namespace aliases, not the classes. namespace alias importing is unrelated to autoloading I think.
 
The moment when you ask for a screenshot and get a photo of the screen...
 
<img src=foo.jpg> -- HTML5, go fuck yourself.
 
3:35 PM
I much prefer the xml syntax
 
@LeviMorrison I think it's h1 all the things, following the nested element strategy; so you'd have article > h1 + section > h1 + section > h1 whereby the h1s there would be h1, h2, and h3 respectively in the docmap
@PaulCrovella Likewise; strict = easy
Multiple ways of doing things almost always equates to multiple vectors for failure confusion cluster-fuckery IMO.
Quote your attributes, close your tags, stop being an HTML-ipster douche.
2
 
@hakre we don't have the concept of aliasing a fragment of a namespace... that would be kinda hard to pass.
 
I'd be more comfortable with multiple ways of doing it if none of those ways were fucking terrible.
 
user895378
morning
 
@DanLugg hey, it's html, not xml!
 
3:39 PM
@FlorianMargaine XHTML is the rightful king of this land.
 
@DanLugg there are minifiers to strip quotes so, put the quotes back
 
user895378
@Danack I haven't encountered this personally but I don't think it's because of gcrypt/mcrypt. From a cursory browsing of some libcurl source it looks like it can't determine whether it needs to use openssl or gnutls because it couldn't find the header file it needs for the appropriate library.
 
@marcio Okay, but my point is that the quotes should be required syntax.
Thus, the minifiers would just be producing invalid code.
 
@DanLugg non quoted IS allowed and minifiers are not creating invalid code
 
... non-quotes shouldn't be allowed. The world is fucked, I'm describing an optimal, less-fucked world.
 
3:42 PM
we just don't need to write HTML like a minifier :)
 
Fair, but because it's valid it's a problem. Because if it's valid, some asshole is going to write it that way.
 
but but think about network
 
Yeano.
 
<p> Lorem impsum dolor...
<ul>
    <li> foo
    <li> bar
 
Caches + it's 2015.
 
3:44 PM
I use XHTML serialization of HTML 5.
 
^^
 
once I saw Paul Irish saying we don't need to close <p> tags
 
Yea, Paul Irish says a lot of stupid things.
 
but but Google
 
And?
 
3:46 PM
I feel like if omitting the closing tags gives you a sizeable increase in performance you are doing something right (\o/ for decent amount of content) or something very, very wrong.
2
The fact that Google pushed for optional closing tags is a clear sign of conflict of interest.
They care only about speed, and basically not much else.
They can afford to spend a lot of man-hours for the harder-to-parse result.
 
and yet they transfer 2GB of generated javascript for each gmail request, go figure
 
Despite gzip, I'm actually surprised there hasn't been a transport binary serialization for HTML yet; that the DOM be built on the server and then compressed and sent as a binary stream.
 
user895378
@marcio lol
 
allow implicit closing of HTML tags, they say
inline JS and CSS, they say
 
kill XHTML2, they say
 
3:51 PM
@marcio well, <style scoped></style> is pretty cool
2
 
@FlorianMargaine <style scoped="scoped"></style> is cooler though.
 
@FlorianMargaine speaking about HTML|JS|CSS nice things... have you huys heard of Vivaldi Browser? vivaldi.com
 
I do find inbox.google pretty slow.
 
it's all made on top of the hip stack by the ex opera developers who got pissed of old opera was thrown away
 
> Yep, we are working on mail.
that kills it for me
 
3:57 PM
I loved opera, it had a IRC client, email client, RSS reader, torrent client, stacked tabs, notes and used less RAM than a single tab of Chrome
hope this one gets as good
 
I hated when they added the mail client. Just bloat. Be a browser, do one thing well.
 
@PaulCrovella they used to make all the things well until the engine become obsolete and they had no resources to compete with Chrome
 
So dracony is arguing on reddit that none of PHP's advantages exist
what
is he just a troll
 
user895378
@AndreaFaulds My opinion of him is he knows just enough to be dangerous.
 
@rdlowrey D:
 
user895378
4:00 PM
(that opinion's developed over several months of observing behavior)
 
@marcio If they had stuck with just being a browser instead of adding all that crap (which wasn't done so well, imo), maybe the engine would still be going.
 
@rdlowrey that's a very frightening definition
 
user895378
Every developer goes through that stage though, right?
 
user895378
You get to a place where you think, "man I really know a lot about this programming thing. I might know everything there is to know."
3
 
@rdlowrey there's a difference between knowing enough to be dangerous, and being dangerous with what you know.
 
4:02 PM
that's profound, might be a Chinese saying ^
 
user895378
@PaulCrovella They go hand-in-hand a lot, though, don't they?
 
user895378
That was always my problem with reddit r/php ... to many "experts" and not enough real knowledge.
 
user895378
You never see people there discussing technical nuances. It's always architectural wankery and design bikeshedding and complaining because zomg php is so stupid and internals is so stupid why can't they be smart like my framework author?
 
reddit has the "lowest low bar" for every subject you find there
 
@rdlowrey well the second is a subset of the first, but I think the majority of people passing through the first stage don't actually go out and be dangerous twats about it. We just happen to see the ones that do, it's selection bias.
 
4:04 PM
PHP Fatal error: Cannot access empty property could really need a little wording improvement. But couldn't come up with a better one
 
how to put tags here?
 
user895378
@PaulCrovella Yeah, it takes a special breed of person to be both ignorant and arrogant enough to try to push said ignorance on other people.
 
[tag] no
 
[tag:name]
 
user895378
^that
 
4:06 PM
thanks :3
I feel dangerous now.
 
I'll try not to tag rebecca friday videos
 
Does anyone know, if there's already a way to receive notifications via HTTP requests for new commits to PHP master?
 
Actually, lemme fix that:
[tag:0.0.0.2]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

[tag:0.0.0.2]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - https://gpgtools.org

iF4EAREKAAYFAlTLrdkACgkQn2X7whLsLfiV0gEA4+0z6coZSiFOzJ6l13PMvWbI
GJdR1NxZLoCjoeWmAhEA/jUZxhruvx75QfkvIhZ7Jd8zf8yiLe1rvzs/oBu8Cn6V
=ETvy
-----END PGP SIGNATURE-----
betr.
 
4:16 PM
(not a Friday link, btw)
 
@marcio you call it hard to pass, I'd call it useful :)
 
user895378
@AndreaFaulds promise?
 
@kelunik Maybe you could watch php/php-src and use the github api to build a small client to parse the relevant data
 
@rdlowrey Ask him to promise...
 
user895378
4:20 PM
No, I only start reddit fights about things that actually matter.
 
@rdlowrey But that's no fun :(
 
@hakre sometimes useful == hard to pass, see the scalar type hints thing it's been discussed for years!
 
@AndreaFaulds please edit python out of that. he's free to go to any of the others, but don't inflict him on python :(
 
user895378
@Rangad I think he's looking for something that will push out updates instead of having to busy-wait and periodically scrape a feed.
 
4:22 PM
@Rangad Yes, but I would have to poll GitHub for that. What I actually want is help.github.com/articles/…, but I would need admin access for it.
 
Guys,
Is there any good GitHub deployers out there?
 
@rdlowrey Yes, but I wouldn't know a way without admin access to php-src, so I suggested the closest thing
 
Another way I thought about is just subscribing to the php-src commit mailing list.
 
@PeeHaa "only" 840? :D
 
Hah, here I thought setting up phpstorm on windows with vagrant running my php was easy
 
4:23 PM
@PaulCrovella The others don't deserve him either
 
user895378
@Rangad I'm not saying "bad answer," just trying to clarify the intent :)
 
@rdlowrey Same here ;)
 
@rdlowrey I think that's harmful thinking in any field, ultimately.
 
@rdlowrey You got @PeeHaa's message about that site?
 
Perhaps that's the definition of a good student of "all the things"; knowing that whenever you encounter yourself doing an ego-dance around your current understanding of a given topic, that you stop and realize you probably don't know anything.
 
user895378
4:25 PM
@Fabor I did, but what about it isn't working?
 
user895378
(or, rather, what am I supposed to notice there?)
 
@rdlowrey If you look at the <title> tag. It's different to the site when you actually browse it
Basically it's giving us different HTML. Artax gives us the one was see in the browser. Guzzle doesn't.
We've tried headers/proxy stuff with no joy. So we were curious why.
 
Maybe because of a custom user agent?
 
user895378
Well the only thing that site has to go on is the headers you're sending it. So it has to be something in the request headers that tips off the server that you aren't a real browser.
 
user895378
I was going to suggest the user agent header as well.
 
user895378
4:28 PM
You usually send a browser's user agent with your artax requests, right?
 
Yeah.
 
Maybe they included something for bots like Googlebot and others for SEO purposes.
 
Artax is fine though. Rc6 at least.
 
@Ocramius :P
 
user895378
See what happens if you don't set the custom user agent.
 
4:29 PM
@Fabor message? wat message?
 
Requestable one @PeeHaa
 
user895378
2 hours ago, by PeeHaa
@Fabor @rdlowrey https://requestable.pieterhordijk.com/WECuvc
 
@Fabor Ow I misread :P
 
@Fabor Easy one, you're sending that hash fragment, but user agents must not send it.
 
4:32 PM
hash fragment?
 
user895378
@PeeHaa Are you appending a Host: header when you make 1.1 requests? Because if not that's an invalid HTTP/1.1 message per the spec.
 
@Fabor Just remove that #57199-1 from your URI.
Title changes then, at least for me.
 
@kelunik huh... how about that.
 
user895378
Hahahahaha
 
Why does artax not do it?
tag @Patrick ^ you wanted answers
 
user895378
4:34 PM
artax doesn't send any URI fragments because you aren't supposed to -- servers don't know anything about fragments.
 
user895378
URI fragments are strictly a client-side thing.
 
Artax 376,794. Guzzle 0.
 
user895378
So artax strips them from URIs that you specify when it's making the request.
 
user895378
So the artax request would start out like this:
 
user895378
GET /download/157199/kevin_gates_/coco_freestyle/ HTTP/1.1
Host: stafaband.info
 
user895378
4:36 PM
The # is an invalid URI character and the server doesn't know what to do with it. It thinks you've made a request for a resource that doesn't exist.
 
@AlmaDo a quick search pulled up this github.com/myclabs/DeepCopy - may be of use
 
Cool cheers @rdlowrey and @kelunik.
 
user895378
Nice find @kelunik :)
 
user895378
Just another thing that artax automates so you as the user don't actually have to know anything about http.
 
Yes. Interesting to know though.
 
4:43 PM
hi
 
Closure serialization... if we AST and expose via API, possible? Feasible? Sane?
 
@rdlowrey nope I do not
How?
I don't see what the difference is
 
@PaulCrovella holy .. I hoped for some more or less easy way
 
@PeeHaa lack of #fragment identifier in the url. requestable shouldn't be sending them, ya noob
 
user895378
16 mins ago, by rdlowrey
The # is an invalid URI character and the server doesn't know what to do with it. It thinks you've made a request for a resource that doesn't exist.
 
user895378
4:53 PM
url fragments are strictly a client-side thing.
 
isn't the server supposed to ignore them though?
 
user895378
It's not required to. You've sent a malformed URI. The server can do whatever it wants at that point.
 
k
I feel so clever for learning makefiles gist.github.com/Ralt/cd241e91428ffbc43f89
 
@FlorianMargaine you are clever for learning makefiles. they're goddamn magic.
 
@DanLugg somebody already had that idea I believe: github.com/jeremeamia/super_closure
 
4:59 PM
@Rangad I meant in core; that's borky.
 

« first day (1567 days earlier)      last day (3377 days later) »