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

5:04 PM
posted on January 30, 2015 by kbironneau

/* by Bobby */

 
Guys,
Do you have some formatted text
which can be
formatted
 
@AlmaDo Look up JMS Serializer
 
@AlmaDo what @MarcelBurkhard said. Then implement it, realize how slow it is. Start cursing. Ask new question but get stuck with JMS eventually ;)
 
:D
BitBucket is free, can it also be combined with some free service for continuous integration like travis or smth?
Or is there even a service that has both?
 
5:11 PM
@FlorianMargaine interesting, and the hook would be JenkinsHook I suppose?
 
no idea, didn't play with webhooks. Google "webhooks jenkins" or something.
 
okok
thx anyway :)
 
@Gordon well, for me it's an attempt to have "generic" solution and reuse in all test stubs later
But I can partly avoid it. However, I want beautiful stubs helpers, so just use and don't give a damn of what's happening inside
 
hey, @AndreaFaulds your suggestion about the "from", turns out there is way to use it restricted to use blocks without the need to make it reserved! Actually it was dumb from my part to think it would be required to reserve it as a keyword.
 
@MarcelBurkhard Atlassian would prefer if you'd use Bamboo though
 
5:19 PM
@Gordon thats fine for me too if Bamboo is good
@Gordon I just knew Jenkins already (from my java time)
 
@MarcelBurkhard Bamboo is Atlassian's CI server. It's not free.
 
ah I see
 
So you use BitBucket and Jira and Bamboo and Crucible and Fish Eye, etc
it all integrates nicely
but it will cost a lot of money
 
@marcio Oh, right! T_STRING T_STRING isn't used anywhere.
But, this would cause future problems
 
what problems?
 
5:22 PM
@AndreaFaulds since when do we worry about future problems? Our parents didnt. Their grandparents didnt either. So screw it. Just do it!
 
But does that mean our grand parents cared?
 
@marcio you could only do this for one item of s- oh wait, hmm
 
@FlorianMargaine yes, for themselves.
 
okay, doable...
But it'd still be better to reserve the keyword
 
@Gordon yeah I don't really want to spend too much money on that as I'm just playing around a little, If I got used to it and adopt it at work I don't mind the cost
 
from use what?!
 
@AndreaFaulds press F5
 
Ah :)
 
NO NEED TO RESERVE THE WORD AT ALL, T_FROM would be just used on use declarations... and guess what...
use declarations are only allowed near "top_statement"
so no ambiguity... we could even have a class called "From" and it wouldn't matter.
 
having it be a token reserves it
 
5:28 PM
the part I like most is that it makes nesting impossible by design (if we remove the braces) :D
 
user895378
Anyone have an idea who I'd talk to about getting a webhook registered for php/php-src.git on github to create a realtime websocket application for activity on master? I see no good reason why I couldn't get a special dispensation for this as it has no affect on php.net servers at all -- it's github's problem. It's just a matter of pasting a URL in the github settings UI for the php-src/php github account :) /cc @Tyrael
 
@AndreaFaulds can't we have a local token?
 
@marcio lexing isn't local, it lacks context
 
@AndreaFaulds the context would be top_statement
 
lexing isn't local, it lacks context...
 
5:30 PM
hummmmm :/ thinking of a workaround
reserve from is a no no
 
@Gordon have you used gitlab?
 
@AndreaFaulds LOL
group_use_declaration:
	"from" namespace_name '{' use_declarations '}'
		{$$ = zend_ast_create(ZEND_AST_GROUP_USE, $2, $4); }
;
 
@MarcelBurkhard nope
 
@marcio lexing isn't local, that's using T_STRING...
 
ok, just trying to figure out if its going to be a pain in the ass to setup git/gitlab and travis/jenkins myself on my server
 
5:33 PM
@AndreaFaulds I know, it's a lol
 
last time I tried I stopped at git and went with subversion xD
I guess I'll just bite the bullet, probably worth it
 
@AndreaFaulds Assuming all goes well with other things I need to do today I should have a current patch for deprecating old-style constructors. The RFC has already been updated but I think it needs a bit of work. No matter what it's fairly close to being ready to vote on.
 
@LeviMorrison Neat.
 
@MarcelBurkhard jenkins with the php template is very easy to set up
 
@Gordon I'll try that now :)
 
5:40 PM
@MarcelBurkhard jenkins-php.org
 
yes... but first I need to setup my git server ^^
but thx :)
 
@AndreaFaulds where else would PHP need from (T_FROM) ?
 
I can't immediately think of a use
Also, our keywords are all case-insensitive
so that needs to be "from" | "From" | "fRom" | "frOm" | "froM" | "FROM" | "FROm" | "FRoM" | "FrOM" | "fROM" | "FRom" | "fROm" | "frOM" | "FroM" | "FrOm" | "fRoM"
 
yea, it's a no no
 
inconsistency is bad
 
5:45 PM
I can't think of any alternative for from
 
I like the approach with parentheses
you could still remove the nesting part from the rfc, couldnt you? :P
 
You could combine parentheses and from
 
@MarcelBurkhard you meant braces?
@AndreaFaulds ? curious
 
@marcio from Foo use { Bar, Baz, Qux };
 
@marcio Its the same I think, I'm not native english
 
5:47 PM
looks nicer
 
from costs more though
 
@AndreaFaulds if we have from there is no need for the braces
 
which I'm not sure if its a bad thing or a good thing
 
@marcio No, there is. The point of from is to make what it does more obvious
maybe not, but I think the braces don't hurt, idk :/
 
which is probably not going to be enough justification for braces
 
5:50 PM
what are IN parameters in mysql ??
 
from cases in binary order: "from" | "froM" | "frOm" | "frOM" | "fRom" | "fRoM" | "fROm" | "fROM" | "From" | "FroM" | "FrOm" | "FrOM" | "FRom" | "FRoM" | "FROm" | "FROM"
 
point is we already have the "use Foo, Bar, Baz" syntax, if we go for *from* + {} it's two additions to the syntax:

- from token
- "block list" { A , B }
 
Ah, fair point
There's an ambiguity, though
 
so It's either
from Foo use Bar, BarBar;
or
use Foo {Bar, BarBar};
 
Will people interpret from Foo use Bar, Baz as use Foo\Bar, Baz; or as use Foo\Bar, Foo\Baz; ?
The braces resolve this ambiguity
from Foo use { Bar, Baz }; is unambiguous
 
5:52 PM
nothing to say against that
:)
 
the point to keep the braces is that PHP is a language that use braces duh
 
but someone already made the mess with "use Foo, Bar, Baz;" <- congrats!
 
@AndreaFaulds the latter (use Foo\Bar, Foo\Baz;), I don't see it as ambiguous at all. from has already set the stage.
 
THAT ^ is what I wish most people understand
 
5:55 PM
I think we all agree on that, should ask others though
 
<?php // syntax choices:
use Foo {
    Bar,
    Baz
};
use Foo\{
    Bar,
    Baz
};
from Foo use
    Bar,
    Baz;
from Foo use {
    Bar,
    Baz
};
 
@rdlowrey we already have such a hook
 
@AndreaFaulds OMG I like everything :(
 
user895378
@Tyrael Where can I access that?
 
that is what we use for sending the pull request mails to the php-pulls list
what do you want to do with it?
 
5:57 PM
It looks a lot better in a column when it has braces ;)
 
@AndreaFaulds but remember we can't get attached to from, it has to be other word.
 
(did not catch up with the chat backlog yet)
 
whenever I have to generate getters and setters for our entities a little piece of me dies.
 
@marcio It doesn't have to be...
 
NOW question: does the from syntax allow nesting? ;D
 
5:57 PM
@MarcelBurkhard no, and I'm glad it doesn't
 
@MarcelBurkhard the braces allow it:
 
as in
from Foo use {
from Bar use {
Bar
}
}
 
@rdlowrey oooooooooooooh :|
 
from Foo use {
    from Bar use { Shiit },
    Baz
};
 
5:58 PM
how to highlight code here
 
that makes no sense
@MarcelBurkhard can't
 
@AndreaFaulds sry meant indent not highlight
 
So should I strip it or leave it up to the user? @rdlowrey cc @PaulCrovella
 
user895378
@Tyrael I'm asking if I can add another webhook so that github will post the notification to a server I control. This will let me work on a real-time websocket application that pushes out these updates in browser.
 
@MarcelBurkhard use the fixed font button
 
5:59 PM
@AndreaFaulds I'm prefer option #3, but I'll take 1 or 2. The 4th seems superfluous.
@PeeHaa strip it
 
kk
 
@marcio I have no buttons, just send and upload...
 
@MarcelBurkhard nah, deal with it ;) I have 3 buttons
 
I wouldn't like option 3 to allow newlines in between though...
 
Java is a babe
 
user895378
6:00 PM
@Tyrael It's not something I've actually created yet, I more want to know that if I start working on something like this will I actually be allowed to add a webhook URL pointing to my server in the github settings to make it work :)
 
Cute language. Hehe
Someone tell me what to code in Java? :)
 
@HassanAlthaf web or desktop?
 
>
Uh, desktop.
 
@HassanAlthaf how about a sudoku game, or a P2P chess (both been done before though)
 
@HassanAlthaf go make a minecraft mod
 
6:02 PM
anyway, I gotta be going, bye!
 
cu @AndreaFaulds
 
Omg
Im not a pro
im a noob
 
user895378
@Tyrael The alternative is polling an rss feed of updates (which is horribly inefficient when I could just ask github to notify my server when updates arrive with a simple webhook).
 
@HassanAlthaf 2D games aren't that hard, P2P is probably..
 
uh, I know but
I need to go step by step
Agree?
 
6:03 PM
yeah right
@HassanAlthaf make a calculator?
 
Give me a beginner level idea? XD
Omg not again lmao
 
that's easy :P
 
I did one in C#
 
alright
 
@rdlowrey I see.
 
6:04 PM
@HassanAlthaf a simple Paint?
 
lol hmm
 
@HassanAlthaf as In choosing betwen red blue yellow and green and drawing lines
idk out of ideas ;D
 
I'll check out others source cods
*does
*codes
And see what libraries, etc they use.
 
Oh, thats pretty advanced.
 
6:06 PM
@rdlowrey is developer.github.com/v3/repos/hooks/#pubsubhubbub what you're looking for?
 
personally I don't see much problem with that, maybe if everybody wants to do that
 
user895378
@PaulCrovella yes, that's what I'm talking about but I'd have to be able to tell github to actually send it to my server URI.
 
@PaulCrovella thats nice
 
Thanks a lot @MarcelBurkhard I am definitely doing a Paint once I finish some Java programs. :)
 
6:09 PM
@rdlowrey That's exactly what we're looking for, thanks @PaulCrovella
 
@HassanAlthaf you're welcome. Btw I skimmed through your accounting project and It looks a lot better than what I've done at that age, so I think your future is bright. :D
 
Thanks bro @MarcelBurkhard I hope my future is bright.
 
@rdlowrey code.google.com/p/pubsubhubbub you ping github, you get the hub for the resource, where you can subscribe and get instant notification about the changes you wanna get notified
 
I will definitely migrate.
Salaries at my country are extremely low.
 
user895378
@Tyrael oh, so I don't even need access from the repo's settings for that then.
 
user895378
6:10 PM
Awesome.
 
@HassanAlthaf I'm from switzerland, I can't complain :P
 
it seems so
 
user895378
Thanks for that link @PaulCrovella ... awesome. And thanks for entertaining my question @Tyrael.
 
Haha, average wages for a programmer here is $1135 USD
per month.
 
you poke github initially, then it pokes you back when there are event you subscribed to
 
6:11 PM
I don't think it's enough tbh considering the work load.
It's either gonna be UK or US.
 
@HassanAlthaf average here at my age (20) is ~6100
 
makes sense that they already provide something for this specific usecase
 
that is Salary per Month * 13 / 12
 
user895378
yup. I just had trouble finding it after a cursory googling.
 
@MarcelBurkhard 6100 USD?
thats freaking too good!
 
user895378
6:13 PM
That's great. Good job, github.
 
If I can get a job like that
 
it is possible
but If you don't speak german well its hard to get a job here, unless you are very good which you might wind up being by the time your 18
 
Nah, not in my country. hehe
 
yeah thats not what I meant
 
lmao,
 
6:14 PM
@MarcelBurkhard Bi-weekly ~$2815?
 
When I'm 18, I would be in College
 
@DanLugg what the heck is bi-weekly?
 
lol, paid every two weeks?
 
Wages per 2 weeks @MarcelBurkhard
 
nah we get paid monthly
25th of each month actually
 
6:15 PM
Come on, be like a computer pro
'bi' means two, weekly means every 7 days. Therefore, bi x weekly = 14 days
 
I'm not getting paid enough money at the moment... but I don't need comparative figures to know that.
 
I know what bi means but It never occured to me that someone would get paied this often
 
the term bi-weekly is ambiguous ... it can be twice a week, or once every two weeks ...
 
@MarcelBurkhard Yea, every second Friday is fairly normal in North America
 
evening all
 
user895378
6:16 PM
@JoeWatkins evenin'
 
Ahoy @JoeWatkins
 
night guys, its almost 12am
o/
 
@DanLugg you know my appartment is 2620/month too so its higher prices in switzerland in general, not just the salary
gn8 @HassanAlthaf
 
so one of my kids is doing some algebra in school and is given this:
 
@MarcelBurkhard Surely, but with some creative life planning you can make out like a bandit I'm sure.
 
6:17 PM
@JoeWatkins twice a week would be semi-weekly. (Semi-monthly is another common pay period in the states.)
 
a b c + a b c + a b c = b b b
this is completely wrong, right ?
 
I worked briefly in NYC, apartment was 2700 USD, but salary was 75k-ish so it all worked out.
 
back to git server installing...
 
Folks I worked with though (and I'm sure some New Yorkers here can attest) who managed to get far cheaper dwellings; on the order of 1200-1500, so with those wages you see a lot more stay in the bank.
Or, for that matter, commute and stay the fuck outta the city
 
6:19 PM
yeah
I live with my girlfriend so I only have to pay half the rent, which helps a lot too you can imagine ;D
 
@JoeWatkins It will work if, e.g. a = 1/3, b = 1, c = 1.
 
yeah but it shows some misunderstanding doesn't it ?? or is this a valid teaching method ?
 
What's the question that's asked?
 
the answer the teacher wanted was a = 1, b = 4, c = 8, which is just so wrong it seems to me ... does the teacher not get it or do I misunderstand something ?
 
I wouldn't want to commute more than I need to (and I don't have to because switzerland ain't that densely populated) because time is worth more than money
@JoeWatkins 32 + 32 + 32 = 64, seems not so legit
 
6:23 PM
4^3 = 16 * 4 = 64 != 3 * 32. It would be right if it was a b c + a b c = b b b.
 
she is 10
:)
 
lol
 
you could just set b to 0 and you're good
 
Ok, I think children start using variables in math in 5th grade here in Germany, so they'll be 10 or 11.
 
well they already started using scratch in another lesson with another teacher ...
 
6:26 PM
@MarcelBurkhard Likewise, though I am also paying for a house I don't live in, and commuting way too far.
 
@DanLugg divorced?
 
So, wage - gas + rent + mortgage + highway tolls = NAN
@MarcelBurkhard Not quite; wasn't quite married, but yea.
 
it doesn't look right to me, if it's a teaching method it's real strange and contrary to what is being taught in other lessons, and common sense ...
</rant>
 
just to clarify: wage - (gas + rent + mortgage + highway tolls) = NAN
@DanLugg but yeah I feel ya
 
lol </pedant>
 
6:27 PM
:D
 
With 1, 4 and 8 it will totally not work.
 
@DanLugg sry Joe put me into math mode
 
@kelunik not if you take it to be actual algebra, but it doesn't seem to be that ...
 
$gas + $rent + $mortgage + $tolls + $alcohol === INF
 
that's why I don't drink (actually It ain't the reason ;D )
 
6:30 PM
However...
$happiness->buy();
Fatal error: Call to undefined method Happiness::buy() ...
 
protected function consume()
{
$this->increaseHappiness();
}
 
$jetski->buy(); // this totally works though
 
^^
 
or this one: $r1->driveAroundOnASunnySunday();
be aware though
/**
*
* @throws DiedInAnAccidentException
*/
 
$dan->payTooMuchMoney(); // Uncaught exception 'NoFucksGivenException' with message 'It'll all be over soon'
 
6:34 PM
I need a good place to use an exception called MommaFromTheTrain
2
 
user895378
@PaulCrovella insta-star.
 
@PaulCrovella Your wit brightens this room, sir.
 
user895378
@PaulCrovella Also a quality reference. @PaulCrovella is on fire today.
 
Dissect the frog; what's the reference?
 
I was totally wrong, I get it ...
 
@MarcelBurkhard :D
 
@DanLugg I missed the $this-> in pay salary before exWife sry
 
$this->balance += max(0,$sum); // should be min
 
user895378
@DanLugg Dane Cook: "Money doesn't buy happiness ... but it buys a jetski. Have you ever seen someone frown on a jetski?"
 
6:44 PM
@rdlowrey Ah. Never a fan of Dane Cook, but got it.
 
user895378
I've only ever seen the one special where he did that bit.
 
"Money cant buy you happiness but it can buy you a supermodel. have you ever seen anyone frown while riding a supermodel?"
sudo: cd: command not found
 
Hmm, does anyone here have experience with vagrant? I downloaded a Vagrantfile from puphpet, but it doesn't seem to install php and such by default, even though I asked it to install lamp-server^ and vim. Neither are installed :(
 
not all at the same time please
 
6:59 PM
What can be used as safe object identifier? spl_object_hash() fails
i.e. collides (but that's expected, it was never claimed to be unique)
 

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