« first day (1786 days earlier)      last day (3155 days later) » 

12:00 AM
I'm trying to validate a given unique code by checking if it exist in any of the two tables ( two tables for codes generated by admins or users) - if I do the same query on db it brings out 5-6 rows but on the validation it falls to the else part of num_rows - pastebin.com/ht9MT5P9
 
Anonymous
Praying @Ocramius isn't asleep :D
 
Quick help. I think. Not sure what I'm missing.
 
@samayo what?
@samayo poke me during a work day if you need any help, currently in "don't give a damn mode"
 
Anonymous
@Ocramius oh, ok.
 
Anonymous
I thought if you were sleep, the ping would not bother you :)
 
12:13 AM
@Ekin sounds like bad database design... wish I could help but busy on my own project
 
@taco It's okay, sure. Yeah it is pretty problematic.
 
should've probably created a users table and admin table with user_id key
 
It's like - I have two tables unique_code (key unique_code) & unique_code_admin (key row id)
cause admin can add in many codes but users have only one
and each code has a status property
 
12:40 AM
@Ekin ^ Database Normalization makes your life easier. There should probably be one unique_code table
Anyhow, I know you have a problem to solve. Just sayin'.
 
Thanks, you're probably right. Alright I'll dig in
 
12:53 AM
Ha, that made so much sense. Thanks again @taco you really solved my problem :)
Good luck with your project
 
@Ekin Thanks. I'm doing a bit of learning myself right now
 
1:34 AM
0
A: php encrypt and decrypt number string with key

Scott ArciszewskiThe upcoming version 2.0.0 of defuse/php-encryption is going to, by default, encode its output as hexadecimal characters. <?php use Defuse\Crypto\Crypto; $key = Crypto::createNewRandomKey(); $encrypted = Crypto::encrypt('123456', $key); // hex encoded $raw_bytes = Crypto::encrypt('123456', $ke...

can you tell I'm not a fan of hashids? :)
 
1:46 AM
morninng
 
mornin'
 
everybodies asleep huh
hi @taco
I don't think we've met
 
2:09 AM
@ScottArciszewski what's a hashid?
 
2:26 AM
> Hashids is a small open-source library that generates short, unique, non-sequential ids from numbers. It converts numbers like 347 into strings like “yr8”, or array of numbers like [27, 986] into “3kTMd”.
 
good morning
 
Do not encode sensitive data. This includes sensitive integers, like numeric passwords or PIN numbers. This is not a true encryption algorithm. There are people that dedicate their lives to cryptography and there are plenty of more appropriate algorithms: bcrypt, md5, aes, sha1, blowfish. Here's a full list.
from their FAQ
 
2:56 AM
@andho I mostly lurk. Only @Danack seems to talk to me
 
:(
 
$event_access = unserialize($event_access);
$brief_event_ids = array_push($brief_event_ids, $event_access);
$var_dump($brief_event_ids);

var_dump gives int(1) here, what am I doing wrong?
 
Drop the assignment of array_push
 
@Ekin using the unserialize function.
Also, yes, a lot of the array functions operate directly on arrays without needing to be assigned.
 
3:02 AM
I'd use base64 e/d but they don't want me to
oh okay
 
@Ekin if it's just data, json_encode/decode is fine. If it's objects.....you're doing it wrong and need to reduce it to just data.
 
@Ekin array_push acts on the array and returns a the number of elements in the array
 
Its an array of event ids - same is done for position ids for an event. But they are using serialize/unserialize for these elsewhere hence I 'have' to follow their 'rules' of doing things to not break the results.
Alright, worked thanks :)
 
@Ekin If they are using the serialize/unserialize tactic to store information in the database you are going to run into some hefty performance issues especially if those values are participating in any join of filter operations
 
Whoa. Déjà vu.
A déjà vu is usually a glitch in the Matrix. It happens when they change something.
 
3:14 AM
I'm assuming this concern was already addressed :)
 
No, just a very similar one where @Ekin 's colleagues were doing fruity things in the name of performance.....which would turn out to be very bad for performance.
The fact that the data access layer doesn't do the serialize/deserialize is also:
 
I blame wordpress for this particular problem... the whole Idea of serialize all the things.
 
Yeah, both the database and codebase suck at the moment. I'll make a big facepalm when one of them says anything good about this work
 
I think we've all been there
 
mornings
 
3:21 AM
Morning
 
I've even once said, "who wrote this shitty code? Oh wait, I did a year ago."
 
morning
 
Personally I have fallen victim to doing clever things like that and had to deal with the fallout.
 
@taco Haha, well I say that so much for my own codes from last year as well.
It's quite amazing how fast one learns by doing actually. If it weren't the last 5-6 projects I've done I would be the worst developer ever I guess.
 
Generally speaking if your solution involves storing serialized data in the database your solution is not correct. Just do not do that.
I consider it like eval or goto almost. It is just best to go into it as this should never be done it causes too much pain
Every professional PHP system I've worked on has had this problem
 
3:27 AM
nothing inherently evil with goto..
 
@Orangepill but it is something that you tell people to inherently avoid
Replace goto with storing serialized data in the database imo
 
yeah... especially begininers
 
Yep
I would say even seniors. Sometimes they/we can get too cocky for our own good.
If the data is relational store it the way it should be.
 
3:40 AM
amen
 
Linking again, as it's a gottamn awesome piece of editing:
 
straw poll... who here is scared that Disney is going to completely fuck up the Star Wars franchise?
 
Well, they're hiring young directors, so that's worrisome
JJ Abrams should do great imo, though
rebooting brb
 
+1, I think they'll burn it's soul
 
If the prequel's didn't do enough of that already.
 
4:16 AM
hi
 
good morning
In addition to being a comic genius Douglas Adams was a visionary
 
4:39 AM
yo
 
@ircmaxell yo.... you state side yet?
 
nope
 
new zealand still?
 
yup
 
cool ... sight seeing or working?
 
4:46 AM
vacationing
 
awesome.
 
5:10 AM
moin
 
morning
 
this seemed really unlikely a year ago ... github.com/xdebug/xdebug/commits/master
 
5:32 AM
I think OSS made me a nicer person ... eventually ...
 
GM, need some guidance with exporting magento. Can anyone help?
 
mornings
 
6:04 AM
morning
 
it's 3am here, how jealous I am for all this mornin'
 
@Tyrael ping ?
 
bye all, have a great sunday
 
6:24 AM
@JoeWatkins that's awesome!
@JoeWatkins do you mind if I mention that in some context during my PHPWORLD keynote?
 
@ircmaxell nope, that's fine ...
 
:-)
Need to write that talk... That is going to be tough...
 
is pretty cool, I dunno if it's age, or my beard ... but I find myself being a nicer person, and not really caring about stuff that used to really annoy me ...
some of it is certainly exposure to you, actually ... you helped adjust my attitudes a while ago, sometimes with actual direction "don't respond to that", "respond like this to that", but also with distraction because we had more important stuff to do than argue with strangers on the internet, but I learned what was appropriate or productive pretty quickly I think ... from you ...
 
:-)
 
thnx :)
 
6:34 AM
I am so happy to hear that. Mostly that you feel good, but also that I may have helped in some way.
Makes all of it worth while.
 
ohai @assertchris
 
Hey there @assertchris! Glad to see you here!
 
:)
I have a security-related question
and I wonder if you's have some time to discuss
 
Dinner is just being set down, be back in like 10-15
 
6:36 AM
cool
so I'm experimenting with icicleio/http and apache
icicleio/http is a simple server implementing, wrapped around an event loop
 
@Trowski @ScottArciszewski p p p ping ... I'm not even sorry for the multi ping ... ^^
 
and there's currently no abstraction for handling sessions
so I was thinking about how to handle that, and if it would be a horrible idea to implement simple session management via Set-Cookie headers (for sending session ID)
 
I fear, I will be of no actual use here, but I pinged some people that should be ... and anthony will be back soon ...
 
if session id is the only thing being sent to the client, is that a huge security risk?
@JoeWatkins thanks
 
That's not a horrible idea, that's normal
 
6:39 AM
@ircmaxell ok, thanks
 
yeah that's what we do now
 
i assume it would be better if the whole thing was over SSL
 
that's always better
 
Of course
 
ok, I'll say as much
thanks for the clarification! :)
 
6:40 AM
 
looks gooood
 
yum
 
yum
 
it does ...
 
One of the best lamb shanks I have ever had...
 
6:49 AM
Is any php query that returns json array is restful api?
 
I see a ping
what's up?
 
7:06 AM
@ScottArciszewski @assertchris had a security related question about session handling in the absence of native php session support.... think it's sorted
 
I hate this... I haven't written a resume in 15 years and now I have to
 
Hmmm, debating. Do I want to photograph the night sky while I am here (and it is clear), or do I want to sit here and drink...
 
Hopefully the rest of your vacation is filled with decisions like that.
 
7:17 AM
Yup, #firstworldproblems
 
How do you describe your job for a resume when your job is "the guy that computers"
 
By saying what your responsibilities were, and what value you brought to the team and the company.
@Orangepill when you get a draft, let me know. I will review it for you...
 
@ircmaxell will do ....
I would really value your input
I have a title ... just not a job description or set of responsibilities...which is one of the reason's I want to seek employment elsewhere.
 
You still do something, don't you?
 
yeah... I still do everything :)
 
7:25 AM
Then say that!
 
I think I will focus on the subset of everything that I enjoy and feel I'm good at
 
@Orangepill write down what value you brought to the company. Any new technology you introduced.
 
I just need to whittle it down....it's going to be a 15 year long list which would just read as a laundry list to a prospective employer.
Responsibilities: see appendix A
 
8:02 AM
Should I name drop clients in the resume or should I save that for the interview.
 
8:24 AM
am I ... making sense ??
0
A: PHP pthreads - shared objects

Joe WatkinsThreaded objects are already thread safe, that is to say that, any time you read, write, check for the existence of, or delete (unset) a member, the operation is atomic - no other context can perform any of the aforementioned operations while the first operation takes place. The same is true for ...

 
Abe
8:48 AM
 
@Abe cool
 
@Abe lol
 
Abe
9:09 AM
my guess is that she thought she would have been hit. so she tried to jump out of the car before that. but, why did she slam on the brakes in the first place?
maybe she brake because of a bee or something?
 
 
1 hour later…
10:21 AM
Is building php with readline really costly? I have a VM with 1.5gigs RAM, and building without readline succeeds, but with readline, make says "virtual memory exhausted: Cannot allocate memory" and exits.
 
Abe
probably your code prevents the lines strings to be garbage collected
like, you are collecting them in an array
 
I didn't write any code. Just building php from source.
hah, compiled after rebooting
btw, any good resource to learn about the different compile flags and what are the defaults etc?
until now my reference was just this github.com/krakjoe/explain/blob/master/travis/ci.sh lol
 
10:39 AM
./configure --help
 
@AwalGarg did you add swap to the vm?
 
nope. It doesn't have enough space to contribute to swap :(
@JoeWatkins awesome, Thanks!
 
not even a 1GB space?
 
I guess, I can allocate 1gig, yeah. Will do that next time I compile.
 
It is always nice with a bit of a fallback
 
10:46 AM
sure, thanks for the tip!
 
11:20 AM
 
11:44 AM
monri8ng
 
+1
@tereško checked out "Fallout Shelter" on your mobile?
 
yes, I wasn't impressed
 
It's a little slow during the waiting periods. Aside from that it's enjoyable for an intro to that style of game I think.
 
could be because other games on my phone are XCom and Shadowrun
 
Thanks for reminding me of Fallout shelter.. wasnt out on android last I checked.. is now..
 
11:56 AM
1 month and a week till Fallout 4.
You started your job search yet @tereško?
 
yeah, about a week ago ... gonna see what I can fund this month
 
Fingers crossed for something a little more suited to your talents & patience level.
 
@RonniSkansing I am at 115 inhabitants now
 
=]
<3 fallout
 
@Fabor those both are somewhat questionable
 
12:04 PM
@Gordon at 47 myself.
 
not breeding anymore though
 
Seems a little creepy to have one high charisma guy impregnating all the vault women though.
Exploring seems to slow too. Sent out a bunch of high luck people.
 
@Fabor you gotta be careful since the game doesnt allow incest, so if you have one guy impregnate all the women you wont be able to get more children later
 
Yeah, can switch him up eventually. Got a few high charisma people.
 
WTF that sounds like one strange game :P
 
12:06 PM
@PeeHaa sounds quite aligned with most common jurisdiction, doesnt it?
 
4 mins ago, by Gordon
@RonniSkansing I am at 115 inhabitants now
2 mins ago, by Fabor
Seems a little creepy to have one high charisma guy impregnating all the vault women though.
 
3 more pregnant, should give me 50 for a game room soon.
 
Not entirely sure :P
 
@PeeHaa it takes too long to get lure them to the vault by radio ;)
so it's one happy orgy in the vault
 
lol
 
12:09 PM
Yeah, radio room is balls.
 
I built one room of each. I am currently training all my people to have 10 in everything. that will likely take four weeks
not sure I am not bored before
 
Damn yeah, that'd take forever.
I have to admit, I bought some vault packs so I got some high level shtuff too.
 
I bought one 40 pack since it was 60% off
but it feels like wasted money now lol
 
lol. Yeah they're still largely at discount till tomorrow. 75% off.
It's a bargain! At least that's what I tell myself.
 
you dont really need them imo. most of my rooms are run by mediocre people and I got more than enough resources and even deathclaws wont get past room 4
and there is nothing more to the game. got all the rooms. got good guns. enough resources. thats why I keep the population at 115. dont wanna expand to the bottom
 
12:14 PM
Not had a deathclaw yet. Only raiders and roaches. But I have some empty rooms I need to sell when I get more caps.
They need to add more to the game, like turrets and such.
 
I'm owning on that game :P
Although looks like you got plenty, I got 80 dwellers so far, refactoring all the upper levels to SPECIAL rooms so each dweller has to 100% each one to get through to the workplace
Still haven't gotten better than a weapon with 18 damage though
 
Buy vault packs :P 75% off the 40 pack :P
I got 2 Guided Fat Mans. 22-26 damage
 
Whaaaat
 
As well as a few other golden weapons.
 
Could I use I restless php web service to parse MySQL database with devices?
Could I use I restless php web service to parse MySQL database with devices?
 
12:32 PM
> "Parse" - Analyze into its parts and describe their syntactic roles.
 
talking to tiny people is considered harmful
 
12:51 PM
> Part of a programmer's job is to educate bosses and coworkers about the software-development process, including the importance of adequate preparation before programming begins.
 
morning
 
Nice, you can tell that's from a tutorial start :P Deathclaws en route :P
 
I got rid of the first elevator when I could, had to kill first two dwellers I think, can't remember it was a while back.
They make the 3rd room and then die
 
1:08 PM
@bwoebi So Hack's not saying "don't use it", so much as "It's no big deal if you don't, and here's some problems it'd avoid." With "problems" referring to potential future divergence.
(From Sara)
 
@NikiC so, it's fine as-is now?
 
What's fine as is?
 
that we use ~>?
@NikiC do you know whether Hack is using a glr parser? Some constructs look like they're unlikely to be determined with a regular LALR(1) parser…
 
Hack is fine with us using ~>, but doesn't recommend against using ==> either. I'm not fine with ~> :P
@bwoebi HHVM uses LALR
Hack is hand-written I think
Or maybe using some kind of combinator lib, I never looked
 
@NikiC no, the parser looks like bison to me
 
1:13 PM
@bwoebi The ocaml parser?
HHVM does some more lexer magic than we tho ;)
 
Eih, I mean ml-yacc
not bison^^
 
k
ok, didn't know that
 
and that things looks not like something I could make sense of to me :-/
 
@bwoebi I really don't think we need to bother supporting default values
Default values don't make sense on closures
 
they do… but I agree, rarely.
 
1:24 PM
@bwoebi When do they make sense?
 
@NikiC When a closure needs e.g. an options array
then different endpoints may or may not pass any options
 
@bwoebi But why would that be a closure?
Maybe I just have a narrow view of what closures are supposed to be used for...
 
@NikiC it wouldn't, you always can use a named function too here.
but yes, doesn't make a lot of sense for the short form. (As it's a rather rare case)
@NikiC try grep --include \*.php -rE 'function ?\([^)]+=[^)]+\)' / (or a more specific path) … I'm sure you see it often enough in your vendor dirs…
@NikiC a good example are also Closures being returned to caller. They tend to sometimes have default arguments.
 
DNC
2:09 PM
Who thinks he is good with PHP and has the mind of an Entrepeneur?
 
@DNC everyone using laravel
 
"has the mind of an Entrepeneur?" - I-want-someone-to-work-for-free like typing detected.
 
DNC
@Danack go get some rest, you have to work 9-5 tomorrow for your boss
@Gordon Do you use Skype?
 
@DNC Ha! That's where you're wrong - I'm unemployed!
 
@Danack I'm sure he's got an amazing idea that just need developed and would be willing to offer equity in exchange.
and anyone would be crazy to turn it down
 
2:15 PM
how to post data by POST method on clicking a button? (data are not coming from form)
 
Either crazy or just lacking the chuzpah to seize this amazing once in a lifetime opportunity.
 
DNC
@PaulCrovella small minds talk nonsense, thanks for proving that. It is already developed, just need a small script
 
@ShubhamNishad You'd need to use JavaScript and put a callback in the onclick method of the button. To start with, I'd suggest using the JQuery library - searching for "jquery post data on click" should find reasonable tutorials.
@DNC If it only needs a small script, why don't you just hire a dev to do it?
 
@Danack Don't let your dreams be dreams.
 
@PaulCrovella you want I should monetise them?
 
DNC
2:18 PM
@Danack that is what I am trying to do here you pancake
 
@Danack, does it send data with ajax or I'll move to a new page (like in tradition form submission)
 
@ShubhamNishad it allows you to do ajax stuff, so it can be either - whichever you want.
 
OMFG just stumbled on youtube.com/watch?v=AE4zF36dPxE again. That shit is just so good
2
 
@DNC Actually, no you're not. If you want to hire a dev, then what you would say is "I want to hire a dev to write this code" with a description of the code needed. Instead what you did is ask if anybody here "has the mind of an Entrepeneur" - which almost 100% of the time means, "I have this idea, that I have no idea how to implement, does someone want to do it for free?".
 
@DNC only when I have to
 
2:22 PM
@DNC And probably has to work a tonne less, with much less effort and stress, for a good amount of money
 
@Danack, okay I know how to submit using ajax. But I don't know how do I disable/halt webpage so that user cannot do any change or click anywhere while submission is in progress. I have seen some other pages where they grey out the page and show a spinner for it. I know how can I display a spinner (by changing display none to display block for an image) but don't know how to disable a page.
 
@ShubhamNishad you ought to practice your google-fu. Searching for "jquery prevent submit button click" gives a large number of results. At least one of the top five is likely to contain the info about what you want to do.
International.
 
@Danack, I know that. All I need to do is return false or preventDefault(). I mean for whole web page, not for a button
 
@PeeHaa oh is it white guy rap day? In that case: MC Frontalot ftw: youtube.com/watch?v=j0JxrDTJHIc youtube.com/watch?v=NNkp95oINYQ
@ShubhamNishad I don't know how to do that. If I wanted to find out I would search for "jquery prevent all clicks"
 
2:30 PM
@Danack, no problem. I am thinking about giving a grey background color to body and maybe I can register a click listener for body and return false for it. I am going to give it a try. maybe it will totally disable a webpage, hopefully it will also disable page scroll and right click.
 
@ShubhamNishad you could take an alternative approach, and forget preventing users from being able to click anywhere. It would be a much better user experience if users were able to resume whatever they were doing no matter what they did in the meantime. I'm not sure exactly what it is your users are submitting that take more than 100ms to process - but it would be better if they can see a list of
things 'still being processed' or a list of 'things that have been processed and are now available for further use.
 
@Danack, They will be submitting an online test. So once they click on the submit button the test will be over and so it's a not good idea to let them change anything at all after the test is over.
 
Ok, but you could just display "processing results" if they refreshed the page.
Apr 20 at 14:49, by Danack
I don't think there are really any valid use cases where a http request should take more than 1 second to generate a response.
@PeeHaa youtube.com/watch?v=6t28COxEp2k youtube.com/watch?v=NSflRlHPay4 a slightly posher white guy rapping.
 
I'll need to collect their answers for about 200 question and then send it to server where it will be stored in the database. If the ajax request failed then I need to retry again. So it may take time.
And also, con users (to get more marks in test) may disable their internet connection so that the can submission fail and they get more time then allowed to answer their question. I know javascript is not 'unbreakable' but still by disabling page it will prevent many such students who wanna cheat in test
 
@ShubhamNishad Yeah.....that's the wrong pattern for that. You should collect the answers, send them to your server once in a way that is very quick and guaranteed to work (e.g. storing the values in a temporary file.) and then have a background task that does the slower processing of parsing the file and putting the values into the database.
Also, you should be submitting each answer when it's entered....not saving them all till the end...
 
2:43 PM
@Danack lol
 
@Danack, i am doing that. I submit answer to the server as soon as they answer it. But I am considering situation where some of ajax request failed during to connection issue, so my plan is to resubmit everything at the end.
 
@ShubhamNishad You're obviously free to implement it however you want......but if I was paying your wages, I would say that that sounds like a waste of time. Both yours as the developer, because it's not a real requirement, and possible a waste of the users time, e.g. if the network connection fails 5 questions into a test, but then the test allows me to answer another 195 questions before saying that the server can't be reached would be incredibly frustrating.
> It would be a much better user experience if users were able to resume whatever they were doing no matter what they did in the meantime.
Why not just allow the test to be 'blocked' if the server is unreachable, but then allow users to resume the test?
With a note about the time gap.
 
@Danack, that sounds like a nice idea
 
Are mysql_* functions being removed in PHP7?
 
3:16 PM
/me pokes head in
 
When a file contains a namespace declaration, and a function and the function call, why does the function call need the namespace? (It's all in the same file). Example (if needed) stackoverflow.com/q/5583777/2632129
 
Because that's how it works?
 
@Fabor I already know that :P I was wanting to know "why" technically so I understand what PHP is doing. i.e. "It's because of runtime vs compile time"
 
@HassanAlthaf they're gone in PHP 7.
 
@James what are you talking about? autoloader isn't being called there
 
3:30 PM
@PaulCrovella It's in the same file at the end of the code:
namespace designblob;
function autoloader($class){
        include "wrappers/databaseWrapper.php";
}
spl_autoload_register('autoloader');
 
@James the function call isn't in the file with the namespace declaration.....when you're passing it as a callback to something else, the call happens in a different file.
 
@Danack Ah of course. Makes sense thanks.
It's obvious to people who know namespaces/SPL etc, but am just learning them (@PaulCrovella) :)
 
knowing what a function call looks like has nothing to do with understanding namespaces or SPL
 
some users in my website plays with vote[up|down] arrows. sometimes they press them more than 20 times. how can I limit them ?
 
@PaulCrovella yes I was ultimately asking about "how does SPL function call work" but I did not know that until I knew that.
 
3:57 PM
switching to using SeaMonkey's newsgroups to read internals means I tend to forget to read them
heh
 

« first day (1786 days earlier)      last day (3155 days later) »