« first day (1251 days earlier)      last day (3923 days later) » 

12:00
@DaveRandom Nah man you can delete that I transferred to bitbucket a while back as I wanted to invite collaborators (which nobody bothered with, oh well), so it's in a bitbucket private repo atm :)
If it's interesting project I might want to contribute. If you want my contribution in the first place. :)
@Jimbo OK cool thanks, need to clean up some private repos as I have run out :-S
@Leri Torrent-backed media conversion and streaming service
@Jimbo Sounds interesting. How legal is that?
@Leri Completely. You host your own torrents, I'm just providing an awesome front-end
Is also websocket based for torrent data
12:05
If you don't mind I'll have a look when I get home. I am really interested.
@Leri Sure, what's your bitbucket acc?
^^^ I don't like that theme
@Jimbo None. That's why I'll have a look when I get home. :D
Then when I open source it write a theming thing for it ;)
@Leri Cool, just ping me then
Deal. ;)
12:32
Catchable fatal error sounds weird.
How do you handle them? from one thrown from an incorrect type passed to a method in particular.
@Fabien Is that in response to something? if not, afaik you can't catch fatals
Morning
morning @cspray
12:51
@Patrick It's a catchable fatal error though :-/
@Leri this wont work with a multidimensional array. — xcy7e 1 hour ago
Sounds like not my problem. ^
yeah I saw but was wondering what everyones opinions are regarding it.
@Fabien IMO the use of the error handler illustrated here makes PHP behave like it should have done in the first place (throw an invalid arg exception)
Makes sense
13:06
@DaveRandom a bit tricky
@AlmaDo ...because?
I just don't see failure to satisfy a type-hint as a fatal error, I see it as an exceptable situation
If you don't catch it, it will still be fatal, but with an exception the program flow is sane
@DaveRandom well, will need some efforts if we'll want different behavior for different functions/methods with invalid arguments type passed. Because error handler is global
but still is good, of course
ugh, better than exit with fatal :-)
@AlmaDo ...which is why you just convert it to an exception. The error handler contains no other logic for that exact reason, because the actual handler routine should be in the caller than caused the problem
@DaveRandom yes, thus - you'll need to throw different type of exceptions for different cases (if you really need that)
It could maybe do with a preg_match against the error string, not sure off hand if there are any other things which issue a recoverable fatal
13:10
yep
may be we should natively raise invalid argument exception instead of exiting with fatal error
@AlmaDo You can do it based on the error string, I think that contains everything you'd need. Obviously string matching isn't ideal, but I'm not sure how you'd do it any other way even if the engine did what it should do. You can't put custom logic in engine exceptions either
because.. it actually is invalid argument passed :p
@AlmaDo Precisely
The SPL exception tree is bullshit, but that particular one really is appropriate for that particular situation
why is it bullshit? I found it helpful - if used in proper cases
like this case
however, nothing is perfect (:
It's a complete half measure. For one thing, half of all errors caused anywhere are because an argument was invalid in some way, but a lot of the time these are runtime exceptions, not logic exceptions, because of use input. Because the core doesn't natively throw exceptions, nobody took the time to think about a core exception tree properly
In general these days I create my own tree based on Exception and ignore the SPL tree completely
13:16
the greatest bullshit then is that we have "errors" (i.e. notices/warnings/fatals) combined with exceptions. We may want only exceptions then or only errors..
Also wtf is a DomainException supposed to be for? The description is so fuzzy that it's meaningless
I'd like to have possibility to configurate PHP so it will raise an exception instead of any notice/warning or fatal (well, if that's recoverable fatal, not like parsing error)
@DaveRandom never used that
@AlmaDo I flip back an forth on this. Some things are fatal and unhandleable, and similarly some things are "oh, you shouldn't have done it that way" but I don't want the program flow to be interrupted because of it
lol, one of my most highly voted question is a veritable nonsense stream-of-conscious.
In those cases E_ERROR and E_NOTICE probably make sense
I'm not confident that E_WARNING has any value though, either it's a notice or it's an actual problem that should be exceptable or outright fatal
13:19
@DaveRandom if something is not recoverable then it's out of the question (because - we can't do anything with it). But if we'll change notices or warnings to exceptions - then it's ok, it's our choice. In Java they live with NullPointerException or OutOfBoundsException :p
@AlmaDo I would say that most E_WARNINGs and some E_ERRORs should be fatal, I'm fine with E_NOTICE staying there, although I'd also be fine with a way to say at runtime "if you hit a notice, throw a NoticeException"
$object->nonexistentMethod() what exception would this throw? If $object were null, arguable NRE, but we don't have that luxury. What about DereferenceFailureException
@DaveRandom yes. but my point isn't about "we should do that globally, in any configuration". Just having possibility to configure PHP such way seems useful for me
@DaveRandom Pff. I've got mine rigged such that notices tear down my OS and burn my toast (provided I happen to be making toast)
@DanLugg I have mine emailed to my boss, just so he knows how shit I am. He's under instruction to fire me if he gets more than 20 in a week.
13:23
@DanLugg YouHaveNoIdeaWhatAreYouDoingException, I guess
@DanLugg ThisIsNotTheObjectYouAreLookingForException
5
Oh shit, that's too good.
meh..
@AlmaDo Sorry, but I felt @DaveRandom's one in my wookie.
@DanLugg not sure I got you
13:25
lol, nevermind :-P
@DaveRandom That's... actually not a bad employee quality assurance test.
> Bill, I see you've been generating 23490 notices on average a week. I'm starting to feel you may be better off folding laundry.
evening guys and gals
hi, @tereško
@tereško Hello stranger
@tereško Howdty
13:28
hi @tereško
@tereško In what universe is evening? :)
I have been at work since 8 AM
it feels like it is evening already
first day of the year where it's >20 degrees and sunny and I am sitting in the office :*(
lol.. we have -5 today
13:30
what a fine weather today. windows wide open.
@Patrick I woke up to the first day of spring to shovel snow off my sidewalk
It's f* awesome for us Eurofags.
(I'm not technically in Europe, tho)
Except in the UK where it is, predictably, raining.
13:44
Good morning
@tereško morning
morning, @ircmaxell
user3303864
morning
@DaveRandom It's <insert season here>, of course it's raining!
I have a friend in near Berlin, he says it's 20 deg
bbq weather
bastard.
@tereško All settled in at the new job and happy though?
@webarto where's that?
@webarto nice!
14:12
@Fabien kinda .. not sure about the "happy"
@tereško but why since 8AM? too much work, I think
@webarto wow
incomming icecream.
what's going on?
14:41
Morning
I may have found a video that properly expresses my feelings toward PEAR sometimes: vimeo.com/6777863
3
@tereško How come? Lack of interesting work or people?
Afternoon =)
14:57
@Fabien more like having projects where my first thought is: "you have no idea what you actually sold, do you?!"
lol
Parallax is a big buzzword around here.
here it is not a buzzword ... it is a curse, uttered by girl who does the frontend programming
15:12
@hakre Ljubljana, Slovenia, nice little cheapish city :)
@webarto that sounds like a city that Russia could .. emm .. referend'ize
are there mamp users here?
@Duikboot damn, I read mmap() first…
L0L;p
well ... for me it looked like "nmap"
15:33
@webarto :)
@tereško They were first to leave SFRY, so they're not going back to that anymore :P
Country basically has Austria like standards, but salaries are 2-3 times less, which makes living very hard.
@Duikboot, I am currently using MAMP PRO in my work development environment.
@tereško How's the work?
@Matthew why are you not setting up a separate virtual machine for that which forwards ports to localhost?
@webarto complicated, chaotic, mismanaged
Blah, I imagine it would be the same worse for me if I tried to work for local company.
15:42
how's your symfony gig ?
I left after month, it was like slavery, theoretically you could earn 3500€ per month, but that would require 8 hours of work per day, which is in reality 16h. Manager would always "correct" your logged hours.
I don't think I will ever want to work anywhere where's "client" involved.
Are u using Boris @Matthew
@ircmaxell w... o... w...
15:46
When you install mysql server on ubuntu 12.04 you get a user debian-sys-maint that has full privileges and I noticed in the file /etc/mysql/debian.cnf the password for that user is stored in plain text. Could anyone explain why this is?
@David it's ubuntu
5.10 was storing root password in plain text file
@tereško Your centOS im guessing?
@David FreeBSD
Hmm this plain text not even hashed password is making me paranoid about what other stuff like this is in the OS
@David yay to debian!
@David hashing won't help. It's storing it so it can login to perform system tasks.
15:50
it should be using a socket
it could be encrypted, but that won't really help much, as it would still need to be decryptable by the system
@tereško that doesn't handle auth tho
true
@ircmaxell What that a sarcastic "yay to debian" or do you actually like it?
@David complete sarcasm ;-)
hi everyone
15:52
@ircmaxell I think Debian is great. Ubuntu, though...
Is this not extremely unsecure
@David what are the permissions on the file?
I get that it has to have the plain text to be able to login as the user
One sec
@LeviMorrison I loath their practices of forking projects to "make them debian like" and standardize things. because it winds up being its own beast of a maintainenance headache
root can read/write
@ircmaxell
15:55
@David so 0007?
somebody knows about a good (and customizable) CMS? I just need to create an admin panel for a "yoga studio" and give the options of create classes, schedules...
@ircmaxell Bond, James Bond, James Octal Bond.
@ircmaxell -rw-------
@David yeah, not an issue then
@David yeah, I meant 0600... whoops...
anybody?
16:00
@NJil hire a developer
Morning room 11! Any Smarty experts in the house by any chance? After setting up a new development environment none of the Smarty templates will compile. Throws an unspecific 'SmartyCompilerException' on the first occurrence of any bit of smarty syntax
@ircmaxell That's grand so thanks. I'm not an expert of the digits I only know the common ones off by heart
Oh hi @tereško !
Where have you been?
@tereško no need to, i want to work on a written script instead of starting from 0 by myself
@BenjaminGruenbaum mostly working & staying away from here
16:01
@tereško why staying away from here? Also, how's the new job been?
21 mins ago, by tereško
@webarto complicated, chaotic, mismanaged
some
@tereško So... not unlike most businesses?
16:07
That's better :)
At least the boss is not a jQuery hungry framework freak?
Why is E_ALL not simply ~0?
because PHP
@DanLugg Is -1 not simple enough?
Jay
Jay
How would you fetch ana rray of all table column names with PDO?
2's compliment -1 == ~0 so, whatever. My question is why isn't E_ALL == -1, otherwise, it ain't "all".
16:16
@DanLugg E_ALL is -1 as of PHP 5.4
Jay
Jay
@ComFreek thanks mate
@ComFreek Actually no, it isn't.
Morning @tereško. Welcome back.
Jay
Jay
How can I be able to post questions again?
@Jay Have you been banned from posting questions?
@DanLugg Well, my fault. E_ALL != -1, but they behave the same as of PHP 5.4 (at least when passed to error_reporting()).
16:20
@ComFreek Yea, but behaving the same isn't the same as being the same. If E_ALL is to be inclusive, and future friendly, I hardly see why it's worth having to update it for each version that includes a new reporting level.
@internals Can anyone shed light on this? ^^
@ComFreek Maybe because of: 3v4l.org/AXuoo ?
16:34
@Leri What's the logic behind doing so?
@DanLugg just because it has always been like that... github.com/php/php-src/blob/573b46022/Zend/zend_errors.h#L29
@Leri tnx
Never mind @Leri, I got it.
@DanLugg Because, by convention, you don't do that with bitmasks. Even if there's a convenience All The Things option, you only set the bits that are actually meaningful because it's generally defined using a set of this | that | theother, and tbh I prefer it that way, although I can't quite explain why.
@ComFreek This but this is for user error handlers. Could not find for internal errors.
16:38
Anyone else have trouble seeing the blue on black colour for directories using ssh? I literally have to stick my face in the screen at a high angle to see it
@David Does this help? I also found this article.
@ComFreek Yeah these might help thanks
Who the hell puts dark but at the same time it is like its bright blue cause it seems to blind me when I look at it on a black background
ok ... time to go home
@tereško drop by every once in a while
Also, new promises Q&A , gonna give some people time to answer first :) chat.stackoverflow.com/rooms/17/javascript
api().then(function(result){
     return api2();
}).then(function(result2){
    return api3();
}).then(function(result3){
   // ...
});
No pyramid :D
16:59
@salathe I suppose that's just as good (ahem) a reason as any.
@DaveRandom Why do I not want to catch-all "by convention" (I don't really care all that much, it just irked me and I wanna play devils' advocate now)
@BenjaminGruenbaum This might also be possible if the APIs don't depend on each other:

Promises.all([api(), api2(), api3()]).spread(function (a,b,c) { ... });
@DanLugg I asked on IRC and apparently at some point Rasmus gave a reason why -1 might not be a good idea, some edge case somewhere... but the person saying that couldn't remember any details. :P
I've nooooo idea what that edge case might be.
Well, a comment on the predefined constants page suggests, php.net/manual/en/errorfunc.constants.php#103504
> -1 is also semantically meaningless as a bit field, and only works in 2s-complement numeric representations. On a 1s-complement system -1 would not set E_ERROR. On a sign-magnitude system -1 would set nothing at all!
^^ That being said; -1 is unsafe, but ~0 is arguably safe.
^^ Supports PHP 4 ;-)
@ComFreek Yeah, but that's just a bonus :)
@DanLugg Mostly because of the way things like that are usually assigned (i.e. by a bitmask). And you might end up shooting yourself in the foot one day, suppose you end up with two options that are mutually exclusive at some point?
17:11
@DaveRandom I'd argue that the bitmask (those flags involved) have exceeded their responsibility; mutual exclusivity in a bitmask sounds like you need another parameter.
But I see your point :-)
@DanLugg Indeed, I'm actually struggling to think of a legitimate example where it would cause a problem. But I just generally don't like that idea of bits set in a bitmask that have no meaning, it feels wrong somehow
If you look at htmlspecialchars flags you have mutually exclusive bits (HTML variants etc), and I'm not sure how it could be expressed better...
^^ I see what you mean. But I favor the implicit "future-proofing" of ~0 over explicitly refining a "catch all".
@DanLugg Hence the reason I always ~0 at runtime instead of E_ALL
Although to be fair I only do that when deving/debugging anyway
Jay
Jay
guys lets say you have a jquery dialog box open. Inside that box you can click another link to open a new dialog box. But it opens the new dialog box inside the current dialog box. How can you get it to open over the old dialog box?
Well, looking at htmlspecialchars, the flags responsible for HTML versioning should just be incremental, no masking, as only one is valid. That'd be a parameter on it's own, called $version.
17:16
@DanLugg that function already has too many parameters
It has a lot of options, but solving that with bitmasks is just hiding the problem. If there is a consensus that it has "too many parameters", then perhaps it needs to be broken out into a different design.
There are certainly good reasons not to use absolute values when defining convenience masks of multiple bits, as you then have to remember to change that if/when you change the value/position of other bits. But "all bits" does (on the face of it) seem to be a special case where it doesn't matter
@DanLugg Well for a start, $double_encode should be binned and turned into a flag
^^ frankly, I'd rather see something in the vein of Encoder::__construct(Strategy $strategy)
$encoder = new Encoder(...); $encoder->encode('<p>Singing in the <em>rain</em></p>');
@DanLugg Sometimes I wonder why most of the people in here still use PHP, a lot of them seem to long for a proper OO language :-P
Ubiquity. That's my reasoning.
It's hard to sell a boat in the desert.
17:22
Not if you put wheels on it
Then you have Python with import wheels import landboat
I have no idea how that relates to this analogy though
Nor am I, but digression is fun.
Seriously though, I think I can say with certainty that I'd drop PHP down a well if suddenly the tides changed and <language-x> took over the web dev landscape. I mean took the fuck over.
So, unlikely.
They have mysql_query in the sample, lol.
@BenjaminGruenbaum I love it already...
17:29
@BenjaminGruenbaum Isn't mysql_query typically a bad idea?
Yes, yes it is.
PDO is better?
Is it because mysql_ functions don't have parameter binding, or that they're being deprecated, or is their another reason?
17:36
@echolocation, mysql_ functions are deprecated and will be removed in future versions of PHP. With mysql_ you have to escape all of the user input to prevent SQL injection. With mysqli_ or PDO_ you can use prepared statements which prevent SQL injection. :)
@echolocation, PDO and mysqli also allow you to set up a query and rerun it multiple times with different values.
`UPDATE users SET name=:name WHERE id=:id`
then you can rerun it over and over with different name and id values:
`$stmt->execute([':name' => $name, ':id' => $id]);`
@DanLugg lolwtf
What's wrong with :> for example?
*shrug*
Or ruby syntax?
17:41
What, just do | | { }?
I dunno, I'm alright with ==>, I just found the doc page funny.
@BenjaminGruenbaum lol, File A Documentation Bug -- "Whoever wrote this was high as fuck"
@Matthew You can also re run it over and over with bindValue()... just not bindParam()... it took me longer than I'd like to admit to figure out Param goes by reference so foreaching my way through an array with bindParam did not result favorably
So, what'dya think needs to occur for Hack to triumph? PHP5.X parity will reduce the need for dev shops to bother with PHP installs. Then, as long as shared hosting picks it up, the future might look clean and bright.
Hehe.
18:16
I'm not going to lie, I feel like I did when I was 11 and learned I was going to Disney World in a few months
@DanLugg there is a dedicated developer doing it
@auroraeosrose
Lover of C and PHP, OS agnostic programmer, writer, and mother
13k tweets, 2.5k followers, following 56 users
Neat sauce.
Alright, help me understand this. move_uploaded_file() DOESN'T need to be called for an uploaded image file before I can check and validate its dimensions via. getimagesize()?
@Jimbo I've created account. Nick is the same as on SO.
Hang on, think I got it this figured.
18:24
@Hamster correct
in fact, you can rename() the file as well. You don't need to call move_uploaded_file(). But it is good to, as there are prevention mechanisms built in to harden security (prevents certain types of attacks)
@ircmaxell Good to know.
yeah, it's a normal file at that point
Right. I'm using this to validate the mime type before I do that, too:
$finfo = new finfo( FILEINFO_MIME_TYPE );
$mime = $finfo->file( $input['tmp_name'] );
$ext = array_search( $mime,
array( 'jpg' => 'image/jpeg',
'png' => 'image/png',
'gif' => 'image/gif' ),
true
);
yeah, that's sane...
seemless integration with php ...
crap I gotta go out ... chat lata ...
18:39
cya
I created a db connection class to mySQL. The db the user of my web form connects to has a name and password. THough I only gave insert rights to that user name, how do I hide the username and password in my code?
Anyone?
18:55
good mornings
Good morrow
user924016
I wish this food would make itself =]
I need help setting up VS
I have installed PHP, MySQL and Apache
I'm getting "could not find driver" from PDOException though, where have I gone wrong and how do I fix it. All solutions I have found so far look too complex.
VS stands for?
@Leri Virtual Server
I'm very new to linux
19:02
@iroegbu Why didn't you install nginx while you are at it?
Anybody in here knows some AS2 magic?
0
Q: Play sound in Flash with offset

PeeHaaI am trying to start a soundclip with some offset, but for some reason it always starts at the beginning. var my_sound:Sound = new Sound(); my_sound.onLoad = function(success:Boolean) { if (success) { my_sound.start(4); } }; var request:URLRequest = new URLRequest("sound.wav"); ...

@PeeHaa Do you still expect people to have Flash installed in 2014?!
so, I'll have 2 webservers... That won't make pdo work
So... have you guys seen Hack?
@bwoebi Actually most people do :)
19:06
Ban that HACK HYPE finally from this room! :-(
Pfft, I don't think it is hype at all.
I think it is ridiculous that facebook didn't contribute to php 6
If they wanted to make PHP better, there is a mechanism for that
user924016
19:07
lol
PHP6 isn't even a thing yet. There is nothing to contribute to.
@Chris well, then what?
THIS is hack
user924016
Looks good
@Gordon Your language is funny.
19:08
@Gordon lecker Hackfleisch :-)
so yeah, I think hack is yummy language
@Chris That is?
Participate in the RFC process, join the mailing list, participate in the community of people already working on PHP
I don't see what purpose it serves to fragment a language like that
Plus, they show examples using mysql_ functions.... gah!
There's no point. Any major changes to the language would hit the unstoppable wall of "BUT OUR PRECIOUS BACKWARDS COMPAT" and then there would be much wailing and gnashing of teeth...
user895378
BC is PHP's single best feature. Eliminate that and PHP dies. End of story.
19:10
Therefore any changes have to be BC friendly, otherwise there's no hope. Thus, Hack.
It's good that they're doing a parallel competition thing.
@Leri Cool, I sent you a bitbucket invite
I see it as creating an Internet Explorer vs. Everyone else kind of situation. I just don't know which party in this relationship winds up being IE...
Hack will never reach the critical mass needed for market acceptance.
I hope Hack will never get popular… just some niche language syntax fork with a new interpreter/jit only facebook really uses…
HHVM is not viable on shared hosting, which is where PHP gained market dominance.
19:13
its so funny to read your messages when you substitute hack with the german hack
@Gordon Ha, I agree!
@Jimbo Great. I am browsing the code.
@bwoebi Only facebook really uses... for now :-)
@Gordon But it gets funnier when you replace it with the imperative of hacken :-D
@rdlowrey I always thought it'd be a bug, not a feature :-(
@bwoebi A PHP that isn't BC-safe will never be adopted by the market.
19:17
@Chris I wouldn't call it "fragmenting" the language; it's a new language, with many similar traits to a rusty old language.
@Charles that was meant ironically…
Ah :p
just to show that BC sucks but is necessary…
I don't think it is a new language at all, it is a fork. It doesn't really affect me, but it frustrated me to see a company throwing so much time and effort into their creepy subset language, then promoting it like something we all need to switch to.
Instead of investing some of that effort in the existing PHP development process.
user895378
Yeah, the announcement of an "open source version of hack" is unsettling.
user895378
19:20
That should raise red flags.
*shrug* Haters gonna hate, hackers gonna hack.
Then again, watching the HTML5 list and Mozilla's role there hasn't been incredibly encouraging
user895378
If you're releasing an "open source version" of something then it's not open source.
@Leri Don't expect much yet, there is much refactoring to be done :-)
@Jimbo I have pretty custom build of php. So what's suggested environment?
19:24
@Leri PHP 5.4, Apache latest, mysql latest. Transmission-daemon for torrents
i know there's instructions to create the db tables but you can tell doctrine to create them for you once you have mysql config set up
@Jimbo Hmm, I might install those on windows, so I won't mess my linux environment.
@Leri Can you VM it? Haven't tested on windows :P
how do I fix ^^
19:40
@Jimbo I have dual boot. So I can test it on windows and fix platform related bugs (if any).
configure with --with-pdo flag.
@iroegbu How did you install PHP?
followed instructions on php.net for debian
Quick question: which headshot do you prefer? lanyrd.com/profile/ircmaxell/bio
@Danack apt-get install php5-common libapache2-mod-php5 php5-cli
@iroegbu You probably also need to install php5-mysql and pdo-mysql, though I don't use apt, so am unsure of the exact package.
19:49
hmm... (pdf)
^^ Anything in there that's worrisome? I'm reading through.
Same as Apache's
okay, thanks
showing value as `mysql` now
user895378
@ircmaxell I feel like lower Anthony looks more knowledgeable on technical subjects. And in a semi-related note: Cool Story Bro.
@rdlowrey I may switch to using it
user895378
Well it gets my +1 for whatever that's worth (hint: not much).
yeah... need to think on that
19:57
lower one all the way
user924016
@ircmaxell lower.. =]
@ircmaxell up to what extend is Google Maps routing programmable through the API? Or, to be more specific, can I put my own criteria for the routing to vertices? Also, how do I get a Developer Advocate to consult my company?

« first day (1251 days earlier)      last day (3923 days later) »