« first day (2188 days earlier)      last day (2982 days later) » 

15:00
@PeeHaa How do I make a variable be a "proper const"?
@salathe Thanks for trolling.
@Tiffany in general, you just don't use php variables across each php file … you assemble the variables you need in a small object or array (depending on whether you need more logic/mutable state) and pass that around
And only what you need
alright
I wanted to write this as an extension to the code base, which is how it should have been done. I got stuck in trying to write a validate function though >.<
@bwoebi I'm not! It was a light-hearted jibe, obviously a poor one if you're going to respond like that, to point out the mistake in his advice. Sorry for saying anything. Now I remember why I don't visit this place often.
@salathe I guessed it was obvious that he was trying to paraphrase (in an intentionally not perfectly correct way); sorry if I offended you ;o)
@salathe class Proper extends Pinky {}
15:05
@salathe by using const? :P
What is the mistake here?
E_SARCASM_FAIL
@bwoebi We both know you're not sorry, even if you put a smiley face there.
@bwoebi is such a heartless asshole
@salathe lol, I really am though…
hmmm
15:06
@PeeHaa just to you. Not to Peter.
But I'm a kinda Peter too
so... have set_amount_of_agencies, get_amount_of_agencies functions?
@PeeHaa You can't have a variable that is a const, by definition.
@PeeHaa no, you have an i.
hello again, I've translated my prior question here, to a real question : stackoverflow.com/questions/40001828/…
thanks
15:07
@salathe That's the point. It is now
@salathe Also you can if you do js :P
and then call the getter for when I need the variable?
@salathe to be pedantic, const only means constant. The variables value is indeed constant - i.e. never mutated.
const foo = []; foo.push('yolo your point is moot');
@PeeHaa A PeterHaa?
Close
15:09
It's not a variable in PHP, there is no $. I'm not trying to argue, be pedantic, or "win" some sort of silly game here.
If that's really the case you are playing it wrong :P
Guys, I want to replace a die; with an exception. Is this 100% safe? I'm about to put myself on the line for this.
@PeeHaa hahah :-D
It's in a library that has no tests whatsoever.
@TomasZubiri Don't put yourself on the line, for an exception.
15:11
lol
@TomasZubiri die() will always terminate script execution. An exception won't if something catches it.
@TomasZubiri If you're not catching it you'll be sorry. E_FATAL is worse than die()
Even though you are saying you need session to move stuff from page to page that's not the case in index.php right? @Tiffany
@Machavity Thanks. Didn't know that.
@PeeHaa correct
15:12
Is there a workaround to recover from a die in code you can't modify?
@TomasZubiri Yes
Punching the vendor
Thank you.
He went on a trip for 2 months and doesn't let anyone commit to his library
@PeeHaa I put a lot of stuff in the session global because I was going to be repeating it on the _formdata.html.php file, and didn't want to type it a second time.
So you can just include that part?
15:14
kk
XSS @Tiffany
@PeeHaa I was worried about that. alright.
@Tiffany Basically every thing that you are going to output from PHP that is not hardcoded should be treated as tainted
Is the borrowers_rights list always the same on every page?
mmmm, if I surround it in htmlspecialchars(), it'll be fine?
yes
@Tiffany Yes
What PHP version was this?
You might need to throw in the encoding if it is < 5.4?
@Tiffany Why not create a include for it instead of having to use the session stuff?
@PeeHaa didn't think about it when I was writing it. I actually completely forgot about the include function until halfway through the project >.>
15:24
@Tiffany yes but the default encoding has changed
@Tiffany :)
@PeeHaa changed in 5.4?
Yes
And 5.6 again from the looks of it
Yay global state \o/
Basically, always specify the encoding
I see now
@DaveRandom i could guess who made that change...
15:27
Was it me? I bet it was me.
I bet it's the same person who tries to make sessions worse every release
hmmmm default_charset is set to iso whatever on dev box
I would recommend entirely not caring about what it is set to
Yeah. Set the encoding to whatever it is you are using
@DaveRandom Why not?
oh the ini you mean
and commented out on the production box
15:30
Specify encoding explicitly in code
alright
Seriously why the fuck was that changed
I didn't even know about it
Because there are not enough 0-days in the world
/me checks html library
oh good. I set it
So freaking stupid
Now I want to confirm who did it
15:33
Goddamnit
I should actually start voting on that crap from said person
@PeeHaa Gosh, you disappoint me continually. :P
I don't even care about trying to understand what he is trying to say
Just vote no
- Stas
@salathe :P
someone really set default_encoding to anything not UTF-8? :-(
PHP 5.3.17 was iso-8859-1
@bwoebi 191 characters ought to be enough for everybody
15:37
@PeeHaa Here, have a punch over standard TCP/IP…
Someday PHP6 will come out and lead us to the promised land of UTF-16. Oh, wait...
lol
lol
@PeeHaa I vote that we just standardise the maximum string length at 140 chars, that way no-one can ever write anything that's untweetable.
Not sure why ... but chat loads significantly faster (it loads) via VPN on mobile connections...
15:38
I would vote for that
@kelunik do you do tls chat or plain chat?
Not sure why ... but chat loads significantly faster (it loads) via VPN on mobile connections...
lol ^
@PeeHaa He indeed is on a bad internet connection.
15:40
@PeeHaa Everyone must use my new charset, WTF-12, which requires that every string be an even number of code points.
@bwoebi A bad connection and in a train at the same time...
@DaveRandom OCD much?
@PHPeeHaa Everyone must use my new charset, WTF-12, which requires that every string be an even number of code points.
@Jeeves Oh, the twitter name fetching works
Anonymous
15:41
That twitter name finder is so cool
@bwoebi A bad connection and in a train at the same time...
@kelunik Yes, thanks, I already got it once :-P
@Tiffany If you want to write an odd number, I will right-pad it with ? to make it look like you might be wrong.
@DaveRandom heh
I have it all the time. I already use the mobile version.
Every time I'm in a train I wish I had built a CLI interface for chat.
15:46
whenever I print something out, and if it doesn't have sensitive information, I keep it as scratch paper. I swear this pile increases exponentially. I'm not using the scratch paper fast enough.
@PeeHaa pong btw.
I saw your ping, just didn't have time to look into the transcript.
no worries. lemme think what I pinged about
I can tell you it was 6 hours ago.
@kelunik oh right. It was about the hacktoberfest thing. @Sean PRed against an issue. But another guy also PRed something to the same issue. I have pulled @Sean's thing but I want to get that other guy his tshirt too. Can I just pull that too and it will work?
I'm not sure. I think PRs don't even have to be merged, do they?
15:52
@kelunik No idea was hoping you would know. I will just ping to guy and make him work for his tshirt
I didn't have time yet to do PRs, will probably start tomorrow.
I have no idea who wrote this, but it's excellent. Maths <3 https://t.co/Uw3XkP7Xtm
Anonymous
Ignoring the shitty Cake stuff, any feedback OO wise? gist.github.com/JayPHP/25214ed9bd54601e51f3d93223d8975a
yo room
@JayIsTooCommon if nothing else, the curl stuff should be in it's own class/function.
Probably from the stuff in requestAndSetAuthToken, that is doing json_decode....that could be encapsulated away.
16:06
@JoeWatkins I did not know that applying makeup to code made it beautiful too … but in your case it seems to have worked :-D
16:24
:)
@kelunik all the tools are there in Jeeves for that one
could maybe try and separate all the chat consumer stuff into a separate lib /cc @PeeHaa
@DaveRandom totally. I'm a big fan of hiding stuff in packages anyway
@PeeHaa The ideal top level package is one file containing <?php App::start();
@PeeHaa Looking source code up in 96 different locations!
16:39
@bwoebi the point is that you don't have to
The complexicity is hidden in a dedicated package
@PeeHaa unless you do…
In which case you can look into the actual lib instead of having to check the entire monolithic application
unless the issue lies in the interaction of app&lib
Sure you will always have edge cases
Anonymous
@Danack is that not what I've done in the EbsServerRequest method?
16:48
Brb foodness
Is there a quick way in PHP to test the inbound browser's TLS version? I need to avoid using an outside API like howsmyssl
Quick, legacy man-bag. Burn it!
wow
Interestingly, ssh will prompt you to add keys, even when you send a key that isn't the type you told it you would send...
The authenticity of host '[127.0.0.1]:2222 ([127.0.0.1]:2222)' can't be established.
RSA key fingerprint is SHA256:511IH+Gb1n/HntOLJlAJ+SCUVz8mvnTOkzwi/VlnPlc.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '[127.0.0.1]:2222' (RSA) to the list of known hosts.
ssh_dispatch_run_fatal: Connection to 127.0.0.1 port 2222: key type does not match
16:50
@jbolanos What web server are you using?
Oracle cloud
The issue is that the SSL is dealt with by the web server, so PHP won't have that info unless the web server passes it in via a CGI var
build a webserver \o/
if you can figure out a way to tell the web server to do that, then at the PHP side it's simple
drat - So I'm going to have to use our own .net server to test for it.
16:51
but it depends on the web server
@jbolanos As I've no clue about anything even remotely related to anything made by Oracle, very probably
Wes
Wes
\o
I'm pretty sure I could figure out a way to make nginx do it, possibly Apache as well
It seems like the sort of thing that should be possible in any web server
the user comes to our site first so I guess I could pass a value to RightNow
...I have no idea what that is either :-P
Oracle recommends to use howsmyssl which slows the request and the creator says please don't do that.
haha - Oracle RightNow is Oracle's chat service
you know, those annoying popups 'talk to a chat agent now' or 'how can we help you'
16:55
wait wtf is Oracle cloud anyway? Seems to be a hosted RDBMS, not a web server?
> The Oracle Application Container Cloud service for building and scaling apps in my butt is adding PHP support
6
still funny
haha
@DaveRandom awesome
Is this s/the cloud/my butt?
the part of the code we touch is in PHP. They only just barely support it. But their billing department is right on top of stuff.
yup
@jbolanos then yeh I got nothing, other than opinions, none of them favourable or useful
@DaveRandom Is there a Safari ext for this?
16:57
@DaveRandom That's okay. For some reason they want us to stop accepting TLS 1.0 requests but their hinky way of helping us avoid that on their own servers is just hilarious
Morning.
@DaveRandom I'm scared to know what kind of interface it supports... And it's probably plug and play too...
@DaveRandom Yeah, I know. Just needs a CLI text UI to handle message edits in a sane way.
@jbolanos Wait, they want you do deal with that in a black-box hosted environment?
It's their server, they need to adjust their config...
This is validating my unfavourable/unhelpful opinions...
17:19
evenings
Wes
Wes
\o
o/
off-by-one's can sometimes have quite unexpected side-effects…
o/
17:36
a multithreaded gui application just ran in php ...
@DaveRandom These sound like good titles for Chuck Tingle novels
Had to Google for that one, wasn't disappointed:

http://www.chucktingle.com/uploads/5/3/7/3/53730093/1459919.jpg
2
17:54
Does anyone know about a good up do date source on writing Zend Extensions?
you specifically mean ze's ?
yep
in that case no
@JoeWatkins and if not that case, also no :P
the hooks that are provided, were actually broken for ages ...
well I done a few bits on normal php extensions ... some videos and stuff
17:59
and outdated? :P
Anonymous
18:16
@PeeHaa you around old sir?
!!rebecca
@Ekin Only 1 day, 5 hours and 41 minutes left until Rebeccaday, OMG!
Anonymous
Actually I think I just worked it out, erm how do I make this worth the ping
Anonymous
Ah @PeeHaa found any rusts alternatives yet :D?
18:22
heheh noope
git.php.net/… @JoeWatkins :-)
Anybody running xbmc/kodi/*elec?
@bwoebi excellent
@JoeWatkins It just got like significantly more complex than your initial patch … but now it also properly works with breakpoints and is retained for list command, can be properly used with coverage etc.
@JoeWatkins And it doesn't assume that the first five bytes are <?php :-P
@PeeHaa coverage issue now reached the top of my TODO list :-)
I thought you have been working on it non stop this entire time :P
@bwoebi It is a @bwoebi bug right and not a @Peehaa one?
18:37
@PeeHaa I haven't checked yet
I'll look at it after dinner perhaps
waddup 皆
@bwoebi I'm lazy ...
good job ...
am afk to get wife from work
@JoeWatkins No problem, I just want phpdbg to be a really good tool :-)
BTW did you see that debugger that records stuff / can work backwards?
Looked pretty cool, although not sure how useful
18:42
@PeeHaa yeah, it was very interesting … this thing called mozilla/rr…
Yeah that was it
Dan
Dan
Ahoy hoy!
ohai dan o/
Dan
Dan
Anyone know of a free database of common MIME types mapped to their likely file signature bytes?
iana has the official list iirc, but lots will not be on it
Dan
Dan
18:51
Yea, but I don't think it has the magic numbers...
Something like: {"image/bmp": "424D", ...}
@Dan What does php use?
!!lxr mime_content_type
[ /master/ext/fileinfo/fileinfo.c#614 ] PHP_FUNCTION(mime_content_type)
> magic = magic_open(MAGIC_MIME_TYPE);
!!giphy magic
1 message moved to Orphan GIFs
never really works, does it...
Nope
@Dan askubuntu.com/questions/105652/… is useful perhaps?
You will probably need libmagic to read it though :)
18:56
Hello
do you know some git cherry pick and merge conflict advanced excersizes?
It's a pretty awesome name for a lib though
I have trouble at work with cherry picking when need to merge conflicts, I often pick wrong parts of code.
@PeeHaa true
becuase I do not know which ones to pick
I kind of know but probably not well
18:59
it stayed long enough
@Gordon you know something about openelec by any chance?
Hey guys! I need to identify an uploaded object before the file ID is even assigned in the DB, so I'm going to use a random hash of some sort. What's the practice of generating a random hash to use it for identification later called? What should I call that column in the database? I was thinking hash, rand or nonce, but unsure if thats the widely accepted convention
sha1_file()?
That's a function to get a file's checksum, thanks, but it's a different case
I thought you wanted an identifier for files
19:10
Ultimately yes, but in my question I was asking what do I call it. What's the common name for it
I'm not going to call it "identifier for files" in the database, see? :)
Well either id or hash depending on what you are using
@TheSexiestManinJamaica Agreed. That would be a bit silly :)
@PeeHaa that's what comes to mind first, but I feel like there's a more specific name of that temporary one-time hash, so that's why I asked
because it's not going to be a proper hash actually, and id is an auto increment that'd be assigned later
What kind of uploaded objects are we talking about?
I don't think it would make any difference to be honest. It could be anything
Well i may not make a difference, but it may invalidate your point about it being a one time hash instead of a way to prevent duplication :)
19:18
guys take a look at this 3v4l.org/QSDC5
tried removing the starting (-) but not the end
Anonymous
@TheSexiestManinJamaica I'm thinking of visiting Jamaica to turn your username into a lie.
5
hahahaha
Wes
Wes
"The Sexiest Man in Jamaica"
any help
Wes
Wes
@ChrysUgwu echo preg_replace('/^[- ]*|[- ]*$/m', '$2', $str);
19:27
@Wes this where it originated from youtube.com/watch?v=jvtg0GsJAQw
Wes
Wes
$str = '-- Ba-r --';
//replace with 'B-ar'
i don't think you want this, or do you?
evenings all
jo wesman
yeah, a mistake
Wes
Wes
> at the begging and ending of string
i shouldn't make fun of other people's english :B
19:30
:D
good u knw, lel
Wes
Wes
web specs (html, dom) are black holes, you keep clicking links hoping to find answers but instead you reach the event horizon and die
but only after you turned into a spaghetto. mmmh spaghetto
TYL = spaghetto is singular of spaghetti. you are welcome
lol
italian trash talk
wanna see my spaghetto?
si, ma piano
Wes
Wes
what you are saying doesn't make sense :B
yeah, someone in that position would say forte, not piano
2
you are very welcome to ignore all this and proceed with your life :D
Wes
Wes
19:39
yeah did that already :B
@FélixGagnon-Grenier only a select few ppl will get your joke, i do believe
@Wes how about trying to replace (-) at the end alone like --Foo-- to --Foo?
Wes
Wes
19:54
/[set of characters]*$/

« first day (2188 days earlier)      last day (2982 days later) »