« first day (1948 days earlier)      last day (3225 days later) » 

16:05
I'm unemployed and have many times to do something. What do you think I should do?
@LeviMorrison will it be possible to access an enum like: $field = 'Friday'; DayOfWeek::{$field}; ? For constants we have constant("DayOfWeek::{$field}")...
i´m having a problem with sending email (with mailer.php) and also inserting in database, maybe someone could give me some help....i have everything set up on my mailer.php and it actually sends the email as expected...but now, i need to put some code to also insert in the database...so for start, i´m using pdo: $pdo = new PDO("mysql:host=localhost;dbname=thedatabase", "use", "mypass");
the simple fact of putting this in my mailer.php file, it throws me an error
at first it looks like a small gap on your RFC :/ but it's also a not unusual PHP technical debt inherited from weird class constant access.
@user3002233 start by watching some lectures. "Unemployed" is when developers actually learn.
@tereško I've learned many things in the past 2 years and I haven't earn a penny from them. (I'm very good at my job. But it seems like the world doesn't need me.)
16:18
in that case there is nothing I can help you with
nothing?
user924016
Mornings
Nobody wants to have a cool website. Everyone wants to have a website that can be built with Wordpress.
That's not my job. I mean, shit man.
you just don't hang around the cool people :)
idk man. i don't know. It's like I'm drunk. But I'm not.
16:25
@Ronni
@user3002233 If you're not pushing Wordpress then you're the most sober person in the room
@marcio constant("DayOfWeek::$field") should work, yes.
16:48
apparently the new york times has noticed the riot in Hong Kong from last week... :O
@Andrew is it still going on? Or is the NYT again woefully out of date?
@tereško nah, its done. Im just surprise they noticed it
17:07
@ircmaxell You may find this entertaining:
So I just went to the company that wants to employ me to discsuss the bad bits of the contract they want me to sign. Pretty much the first thing the managing director of the company says, before I've even sat down is "I'm not going to change the contract, I'm just going to explain why it's fine and you should sign it". Top-tip - if you ever want to make a negotiation go to shit, saying that you're refusing to negotiate is a great way to do it.
I managed to mostly keep my temper (not entirely) and we went through all the bits that are bad for me, and he kept trying to say "Oh those are industry standard, no one has any problem with them" and I managed to not call him a liar to his face. Eventually he kind of almost agreed that some of them might be one-sided.
We then went through why the contract doen't actually protect the company from jack shit, as it's far writen far too broadly and uses the wrong language to describe things, which means that if it was ever challenged in court it would be ruled void. It's at that point that he though maybe we could work together to re-write it and make it acceptable for everyone in the company.
morning
user924016
o/
17:22
@Danack Speaking from experience, if the contract isn't written by a lawyer so it complies with, you know, the law, judges will generally disregard it. I had a former boss who chose to write all his "contracts" himself (which was detrimental to himself and the company as nothing was enforceable)
sometimes I get a feeling, that only thing protection companies from developers doing something really bad to them, is that overwhelming majority of said developers actually have pretty high ethical standards
@Machavity yeah......that's my understanding as well. If it wasn't for the bit that said:
> In the event there is any action between or involving the parties relating in any way to this Agreement, Employee shall be liable to Employer for Employer's attorneys' fees and costs incurred in connection with such action if Employer prevails on any issue.
I would probably sign it and then to tell them 'good luck' if they ever tried to enforce it.
@Danack at this point I would have just left the building
That means they could sue the company that I go to work for after them, and if that company lost or refused to fight the legal case, I would be liable for all of the fees.
@tereško I'm trying to work on controlling my temper. I was very tempted to.
Actually, that line means that if you sue them and they win they can get their legal fees from you
17:27
TBH, that condition actually sounds highly illegal
@Machavity I don't believe it does. It doesn't specify who starts the proceeding, or who it would be between.
@Danack Ah, yeah, doesn't matter who starts it
@tereško It should be, it's probably not. You are allowed to sign away stupid number of rights and legal protections, so long as there is some 'consideration' in return, which in this case would be the offer of a job.
aka, check your contract kids.
@tereško Honestly, a loser pays system is a good way to reduce frivolous lawsuits
depending on what else the "Agreement" contains, it can even be interpreted as you being required to pay the legal costs, if your employer gets sued by 3rd party regarding project that you were involved in
17:29
If they said you owed them legals fees, win or lose, that's when I would walk
@Machavity it also protects less wealthy people from being "bullied" by corporations, organization or wealthy individuals
@Machavity it's not specified. At least not in that fragment.
@tereško yes. Or if another company sues the company that was offering the job.
it's not employment, it's servitude
@tereško how's your job hunting going?
I am really bad at sending CV .. I always find something more interesting to do right that moment
17:41
I'm so confused right now. I fear I have a gremlin in my PHP :P
hmm, there is no native function to split an array into two parts at a certain offset that returns both parts?
A function can't modify the text before it, right?
I have a line like echo 'https://' . SomeClass::makeUrl('/login') and it outputs //login
if I echo out the string statically, it works. It's literally just that method
@Sean yes* (*usually)
$a2 = array_splice($a1, (count($a1) / 2));
@Gordon ? ^^
@Sean in your particular case, it would be quite difficult for makeUrl to modify the output of https://. Probably there is something else that's weird, that we're not seeing due to lack of context.
17:46
@FélixGagnon-Grenier nope, I am looking for list($left, $right) = array_offset_split($input, 5);. I'd have to slice twice to get that
@jbafford OH. Yes I think it's entirely context specific.
I think it's the browsersync proxy I'm running on
Yeah, cheers
@Gordon hmmm... $right = array_splice($left, 5); would do the same thing (just being pedantic. obviously array_offset_split seems made exactly for that)
@FélixGagnon-Grenier oh, you're right. I wasn't aware that splice returns the replacements. I thought it return $left minus the replacements. thanks.
but it works by ref. great. exactly what I was looking for.
:) in fact you made me doubt myself, but seems it does just the trick
yeah, I didnt pay attention to the signature
@tereško array_chunk would not do what I want because it will partition, e.g equal number of chunks wheras I want exactly two with the first being a fixed set and the second being arbitrary
but thanks
18:16
posted on February 15, 2016 by nlecointre

/* by The coding love */

My site's .htaccess is working perfect for cleaning the urls in my site, but is generating a server error 500 when i click on the facebook share link. is there a way around it. these are the contents of the .htaccess:
RewriteEngine on
RewriteRule ^home/?$ index.php [NC,L]
RewriteRule ^news/?$ news.php [NC,L]
RewriteRule ^news/([0-9a-zA-Z]+)/?$ news.php?id=$1 [NC,L,QSA]
And the details of the error generating when clicking in the fb share link are: The website encountered an error while retrieving https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Flocalhost%2Fexperiment‌​‌​%2Fprefinalkoh%2Fnews%3Fid%3D6. It may be down for maintenance or configured incorrectly.
facebook cannot see your localhost
but the error isn't generated when the .htaccess is blank
it just shows the regular fb share link interface as usual and 'localhost'
when the .htaccess contains the above code, it generates server error 500
o/
18:22
@bwoebi ah thank you :)
@AgniScribe there is another question: why exactly are you sharing a "news?id=3" link
@teresko - because I want that article to be shared? :|
why are not sharing "news/3" link ?
(in fact all news articles will have the facebook share link on them)
meyerweb.com/eric/tools/dencoder ... feed it "https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Flocalhost%2Fexperime‌​nt‌​‌​%2Fprefinalkoh%2Fnews%3Fid%3D6" and hit decode
18:25
o like that - yes - i will be doing that eventually, but for now - wanted to know why this error is coming up
what happens when you open http://localhost/experiment‌​‌​/prefinalkoh/news?id=6 ?
the page appears
@bwoebi It's weird that it's accessed as a constant, it might give the impression of exposing internal details of the implementation, but we certainly don't want enum("DayOFWeek::{$field}"). So, +1.
@AgniScribe it shouldnt
because it's not matching any of those rules
well it is - the id is alphanumeric - why shouldn't it (btw, it is appearing)
@teresko - can give a screenshot for evidence
18:30
don't care
@Ekin so , how was SEL?
@teresko - wow
@tereško it's indeed a good one, still haven't finished yet
after this the next one is gonna be cowboy bebop
bebop has a slow start (like first 4-5 episodes) so be warned
alrite
18:42
alritey
@tereško how was your day?
woohoo
^ ?
Was just wondering, should a chat of this nature be not in a php room
what nature
18:44
Someone a good tool to create 'offers' for clients? To generate them
non-php
@Agni hang around for more than 15 minutes and you will find out.
we
@Felix not really weeping over an unanswered question, but by the initiation of a casual non-subject chat
wat? as I said, hang around a bit more, and you'll understand what is on-topic or not.
@Felix you removed a line to which I could say, what i was asking was better related to the subject of this room than a film
18:48
was the film about cats ?
anyways, the overlords rule - njoy
cats piddle!
I don't know why I just imagined someone saying thou canst not speak of cats here
it would have to be imagined ... nobody would ever utter such nonsense
18:52
indeed
"thou canst not speak" in turn reminded me of shadow of the colossus, that old game.
thou can speak of your delusions - that reminds me that new game
yindeed
moin
hows the rfc stuff going @PaulCrovella ?
also, did you finish your internals suit ?
19:08
reminds me of dorethy
@JoeWatkins I forked your repo and read the conversion here, but haven't had a chance to touch anything. I sorta want to wait until the negative string offset conversation wraps up anyway, so as to not cross wires.
@PaulCrovella probably a good call ... someone else might be waiting in the wings though ...
If you would start a project now and had to choose: doctrine or propel2 ?
is there a 3rd option ... perhaps peeling my own face is an option ?
If I get to it soon I'll put it out there when it's ready, but it's not a priority atm
19:10
not a fan of ORM's ...
hell, i haven't built php in years, so just getting that going is gonna take a minute
Just dipping my toes in them. Haven't had the pleasure.
@PaulCrovella no pressure, it's your thing ... here if you need us ;)
it's appreciated. thank you :)
yw
@DamienOvereem get yourself a good one of these, just in case ...
19:12
is it that bad?:)
@DamienOvereem if I had to use an orm it'd be doctrine... because if I had to build a generic orm it's what I'd strive to accomplish
it's very clever thing ...
I once had a runin with it while playing with symphony.. the annotation stuff scared the shit out of me. But somehow it seems less frightening now.
Still feels weird to use docblocks for functional data
yeah, i'm not a fan of the annotation stuff either, but fortunately they're not required
yeh i know. yml/xml is supported too
19:17
dude, I have to go and do adult stuff ...
get a job ? ;p
@JoeWatkins totes lamezors
@PaulCrovella use XML mappings plz. kthxbai
@DamienOvereem I have one of those ..
19:18
No, he's a porn star by day
replace it regularly. Makes you feel more like a unresponsible kid:)
I meant right now, I gotta go and give people lifts and whatever ...
@Ekin well, it began at 3PM, so the short answer is: "I missed most of it"
@Ocramius If I did I'd generate them with php anyway... but why?
Because you have XSD validation, auto-completion and because they are efficient
19:20
/me goes back to writing documentation
fair enough
I'm sure you will have a great time teresko:)
@Danack that looks good for you! Nicely done
posted on February 15, 2016 by nlecointre

/* by Coconop */

@Trowski finally is currently only executed at root node of yield from … yea … needs a fix
guess I should run the finally-finalization at every level… from top to bottom, where it's the last reference
hmm, no … weird
… hm
19:42
@Gordon yeah, it's a bad example
@ircmaxell one downside is that I'm really not sure I want to work for a company where the MD/ceo is that bad at negotiating. Particularly seeing as I'd be reporting to them.
19:58
@Danack he's willing to work with you on it, may as well see how that goes.. it's more than you can expect from a lot of places
Only as a last resort with the alternative being me refusing the offer. If he "goes to the mat" on a negotiation where I'm in a decent position to negotiate, what's it going to be like when working there...
But yeah....I'll help them redraft their contract....and then see where we are.
@Danack do they pay you for the time you take to fix their contract? :|
@bwoebi I'm also getting a "cannot yield from finally in a force closed generator" and it calls out a yield statement that is not in a finally block. I haven't been able to reproduce it in a simple case (haven't tried terribly hard however).
@Ocramius Not yet. The guy did make a joke about that they ought to pay me for it.
have an invoice ready to fill in the numbers and hand him at the end
20:04
@Trowski same bug, it tries to continue a yield from'ed Generator in finally-mode
@Danack that's definitely true
Oh this is epic
definitely epic
20:27
@marcio Sadly you'll have the same tools as constants.
The separate symbol tables really bite us here :/
20:40
Hello everyone :)
Hello. This room sometimes grows quiet.
Ah oh ok :"/
shht
@Danack how does she not have a higher quality version of that video
20:55
it's from '95 or something afaik
@PaulCrovella I think that's the album version of the song, with a potato version of the video. Wouldn't be surprised if the rights are owned by different entities, and the company that owns the video is more enthusiastic at take down notices.
makes me sad, her channel deserves so much better
@PaulCrovella This is Bjork we're talking about. She sometimes sings gibberish (not quite Friday but close enough I guess)
@Machavity goo goo g' joob
21:25
Hm ... I have a boolean that takes four values
as in ""true and false are just social constructs""
?
More as in true, false and file-not-found ^^
and the fourth: off-by-one-error
21:39
NNTP hasn't changed much in 21 years :)
How to steal a GPG key from the next room: http://eprint.iacr.org/2016/129 By Eran Tromer (https://z.cash/team.html#scientists) et al. https://t.co/x9C1aTVsmF
@Trowski fixed :-)
@bwoebi It would be good to account for the case where dtor_storage is not run
@NikiC ... when is it not run? (except bailout?)
@tereško that's old and fixed, iirc?
21:49
@bwoebi No simple cases. I'm just uncomfortable with freeing something in dtor_storage that does not also get freed if its not called
> Date: received 12 Feb 2016
Internet old?
@bwoebi Actually, you're right, it shouldn't be an issue
:-)
Generators leak on unclean shutdown anyway
yep
21:51
Pretty soon all generator bugs will be fixed :D
Someone still needs to reply - news.php.net/php.internals/91227 and I did it last time.....it didn't seem to get through.
@Danack Your mail didn't get through, or the message it contained?
@Danack she just meant that the software was still working
@tereško this one is pretty interesting eprint.iacr.org/2013/857.pdf
@NikiC The technology is all working.....the problem is with the organic end user.
21:55
side-channel attack as whole are fairly interesting vector
"The attack can extract full 4096-bit RSA decryption keys from laptop computers (of various models), within an hour, using the sound generated by the computer during the decryption of some chosen ciphertexts."
indeed
@Danack Ah, so all is as one expects...
I feel bad for the guy. He obviously cares.....but .... urgh.
I'm curious to see the vote.
@NikiC you think so…? =P
@Danack actually his idea isn't that bad … I've commented on the PR, but most things looks fine this time.
I'm just not sure what he tries to tell me here: github.com/php/php-src/pull/1734/files#r52852747
22:08
Hey
Hey , how you're doing
normally with the lower body
@FélixGagnon-Grenier and very well with the upper?
Guys i need a help with some sort of a stupid PHP Line of code
shell_exec("cd /Volumes/Other/scripts;for f in *.xxx; do short={f%.xxx}; mv $f $short.js; done");

This doesn't work , PHP thinks that $f and $short are php values
22:12
yep, it seems like a stupid line of code
yea i know :D
@moawaya either use single quotes or escape the dollar signs with backslashes
@moawaya then use single-quotes
single quotes before the $ sign ?
no, in place of double quotes
22:14
oh okay i'll try it
Damn it , it worked i spent the whole day figuring it out i tried adding backslashes it didn't work but the single Quote works , you guys are extremely helpful. Thanks
@PaulCrovella Thanks a lot i didn't recognize there was a different between single & double Quotes .
*difference
@moawaya yeah, it's one of those ūber advanced thing one can only learn by reading one of "php for beginners" books
@Danack some weeks ago I bothered you with how to name the action of running stuff in sequence, as in Tier. The other day some guy spoke the word piping. I was somewhat charmed.
22:35
@FélixGagnon-Grenier piping is usually done in a 'dumb' way i.e. the text output of one program is piped to another without any extra information. In Tier at least the communication between the bits has a tiny bit more information as it's communicating what needs to be run next, rather than just the raw results.
@tereško I only know scrutinizer-ci and SonarQube for that, sry
@Ocramius yeah well , scrutinizer is practically giving me 10 (if I would bother to make few unit test's have shorter setup)
I don't trust tools that tell me that everything is close to perfect
So far, scrutinizer is really the most violent there is out there for PHP. I'd use a more violent one, if there was one
you can use PHPStorm's inspection + PHPStorm EA Inspections
that one is quite aggressive too
also, scrutinizer doesn't value the found issues as part of the score
I'm picturing a mean-drunk version of scrutinizer that see a tab and punches you in the face outta nowhere
I could need that sometimes
22:49
you could sick it on your co-workers
@tereško you'll love what I'm building, assuming someone in your company would pay for it :P
doubtful .. unless it's some elaborate multistage bong
lol
@tereško that is a nice business model tho
yeah, you could focus on the replaceable bits .. look iRobot does with roombas
23:01
anything replaceable would just end up carved out of an apple or some shit... you can't fight stoner engineering
Hmm... anyone ever got json schema working on postgresql?
user2620028
23:34
Can i bounce a stupid php question off of anybody in particular?
user2620028
what in the...... previous conversation is interesting....
Never ask whether you can ask a question.
@HatterisMad just ask. Don't try and get people to commit to answering before you've asked.
user2620028
Was more of a probe to see if anyone was in the room, the rare moments that i post in here it is desolate
that's even worse
user2620028
23:38
Better than wasting my time writing a well thought out question for it to fall on a dead room
Apr 28 '15 at 14:44, by Danack
@Elevant You should write your question before trying to get someone to agree to help you. If you write it in notepad, and then copy + paste it in here, even if no-one can help you now, you will have the question written down and you will be able to re-use it elsewhere aka http://sol.gfxile.net/dontask.html
user2620028
Yeah..... thats a load of crap
Welcome to the internet
:-P
any more when someone asks to ask a question I assume that was the most interesting question they had
Well .. this is new. I managed to add to ignore list even before question about php was asked.
23:43
no point in pressing for the followup
Yeah...thinking enough about a question so that you can write it down is obviously way too high of a burden to do before asking other people to give you free help.
2
@Danack sometimes the describing the problem is actually harder than its solution though…
user2620028
No point in coming back to this chatroom
@Shafizadeh in various countries there is the superstition, that witches fall asleep at dawn. Since what we all do seems like magic to majority of human population, it's oddly fitting.
3
@Danack if you keep going he may even write an entire blogpost on why people are unhelpful because no questions are being asked
23:45
@Ocramius more like a tweet. Writing entire blog/thumblr post might require too much effort.
should I use $_POST or $this->input->post() in model or in controller in codeigniter?
you should use $this->input->post() in the "controller-named-thing"
@Ocramius apropos of nothing, do you have any good phrases to use when someone is refusing to negotiate, that say "This conversation is going to be pointless if you're going to behave crazy" without calling them names?
I need to have some stock phrases to be able to use.......because my current pattern of just getting angry is less productive than it could be.
I'm really not good at that stuff, tbh
you are much more polite person than I am :P
You have never seen my Incredible Hulk impression.
23:59
heh

« first day (1948 days earlier)      last day (3225 days later) »