« first day (1071 days earlier)      last day (3893 days later) » 

Anonymous
4:00 PM
@Ocramius thanks so much. Yes, review is what I am asking. But, I am fixing the read.me now.
 
Anonymous
It should be done in some minutes
 
@Simon_eQ cool =)
it's just that reviewing code without a diff view that lets me comment is kinda hard :)
 
Anonymous
:)
 
> phpunit/phpunit-mock-objects suggests installing ext-soap (*)
Bitch please. Not on my system you don't
:D
 
lol
why would mock objects need ext-soap? O_o
 
4:06 PM
@Ocramius Probably so you can mock webservices from a WSDL
I think you can do that out of the box with PHPUnit's mocks
 
@cspray sounds like too wide for such a lib :X
oh, which brings me to mind... is there actually any way to retrieve the default params in a php internal class method?
reflection just fails :\
 
@Ocramius no
 
grmbl
 
internal functions don't have a concept of default values ;)
 
yeah...
guess the other solution is to extend ReflectionMethod and use a fallback map
 
4:12 PM
@Ocramius If you want default values the sqlite docs dbs will help you
 
hrmm
sick ideas coming up
 
@Ocramius (like getting defaults from .c files…?) because it's always type param = default; ……… zend_parse_parameters(…, param, ...)
 
something like that
I'm surely not gonna do it by hand :)
and now for something completely different: is there an ultrabook better than the lenovo x1 carbon? Gotta buy one now...
s/now/within today
 
Question:
How does it help to cryptographically sign tags in Git?
(Also hi :D)
 
@MadaraUchiha well, you can simply verify a commit against a given public key
 
4:21 PM
@Ocramius What do you mean by "verify a commit"?
 
@MadaraUchiha was it you that did the commit? Or 3v1lH4xx0r?
you know you can impersonate whoever you want while committing, right?
 
@Ocramius Okay...
That means I don't trust my team, the ones with commit access that is
Because commit access is already supposedly protected by SSH
 
@MadaraUchiha I personally don't sign all commits, especially because I don't have my private key always with me, but I wait until I'm on my personal PC until I tag
I always sign tags
@MadaraUchiha git is a DVCS. The concept of "protected by ssh" doesn't stand
 
@MadaraUchiha Or you don't trust Packagist/whichever repo you're using with composer. Which is sensible given the behaviour of 'replaces'.
 
how do you tell if a clone was faked by someone?
 
4:25 PM
@Ocramius How was someone able to push back to the original if he doesn't have commit access?
 
@MadaraUchiha he doesn't need to push back the original
it could just have poisoned a fork somewhere
 
@Ocramius In which case, why do I care?
 
or a cache
 
@MadaraUchiha you care, because when the legal dept. of a big company assumes you introduced malware in their infrastructure, then you can demonstrate if it was or wasn't you
same goes the other side. Users may want to be safe and verify that you were the author, because they trust you
 
4:27 PM
@Ocramius I can present them with my own, official repo, and show them that past point A, I don't have the commits they have.
 
trusting the system from where the code comes is non-sufficient
@MadaraUchiha that doesn't really demonstrate anything. I could simply rewrite the entire history of all my repository at any time
 
@Ocramius Also, say I signed, how can anyone verify that it's actually my signature, and not someone else's?
 
@MadaraUchiha because you give them your public key
 
Do they negotiate an RSA key with me?
 
and only you are capable of signing off anything because you have the private key for that public one
 
4:28 PM
(I really need to learn more about crypto) :X
 
you just send them the public key or store it in a keyring
 
@Ocramius What prevents 3v1lH4xx0r from getting my public key and giving it off to people?
 
@MadaraUchiha that's prevented by you not having your private key laying around
I git tag only from a PC that I turn on only for tagging :P
 
@MadaraUchiha it doesn't matter who has your public key
 
@MadaraUchiha Signing happens with your private key, verification with the public key
 
4:30 PM
otherwise that private key is nowhere else to find
 
in fact, the more people have it, the better, since they can all agree that it is in fact the same key
 
@NikiC What do I expect to see from the verification?
 
@MadaraUchiha I think it's git tag -v tag-name
 
asymmetric encryption is awesome, but kind of confusing
 
@MadaraUchiha ^
 
4:32 PM
my favourite explanation is the "send a padlock" analogy, but that's not so intuitive for signing
 
@IMSoP I honestly never understood trust rings/keyrings/etc... but as long as I have the private key I still keep the kinfe from the right side :D
indeed... fails on a server of mine
 
How do you encrypt with one (private) key, but decrypt with the other (public)?
 
@MadaraUchiha it's not about ENCRYPTING. It's about signing
 
@MadaraUchiha using some very complicated maths
or math, if you're american ;)
 
@IMSoP I suppose that machine has no configured keyrings, right?
 
4:35 PM
@Ocramius How are they different? :P
I really really need to invest time in learning crypto
 
@MadaraUchiha it's just a hash of the current tag/commit
@MadaraUchiha there's a good talk by joshua... lemme dig it out
 
But again, how do you sign with one key and verify with another?
 
@MadaraUchiha again, using complicated maths
 
@IMSoP Is there an example or a (hopefully simplified) article about it?
I mean, I really like the RSA article on wikipedia, for example
It really explained it well
 
4:37 PM
@MadaraUchiha check that deck
 
@Ocramius Will do
Is this worth committing to? ^
 
@MadaraUchiha That does not cover DSA ;)
 
why scrolltotop lags in IE?
 
DSA is in crypto II
 
@Mr.Alien Because IE
 
4:38 PM
@NikiC That wasn't the question though :P
 
user895378
The only thing I have left to do get automagically secure-by-default encrypted streams working is to decide on php.ini settings. Anybody see issues with openssl.cafile and openssl.capath ???
 
crypto I only does basic asymmetric crypto a la DH and RSA
 
I don't even get perfect solution to fix that
 
@Ocramius Is there the actual talk somewhere? Or only the slides?
 
@Mr.Alien Your user installs another browser ;)
 
4:39 PM
@MadaraUchiha couldn't find it
 
1 min ago, by Madara Uchiha
Is this worth committing to? ^
 
@cspray outsourced project
 
@MadaraUchiha anyway, please certify that it is you that is tagging a repo. So please sign those tags if you do :)
if nobody has a better suggestion than the lenovo carbon x1 I'm just gonna press "buy"
 
@Mr.Alien /shrug, there are a lot of things that go into that. Depends on what IE version? Depends on how the browser renders the page during scrollTop; if the page is complex and being rendered by the browser constantly while scrolling it is going to be slow
 
@Ocramius Wha?
 
4:40 PM
A "perfect" solution that actually works for IE would be to not rely on JS scrolling for them and use anchor jumps
 
Anonymous
@Ocramius I made the "intro" easier on the brain :)
 
@MadaraUchiha yes
 
@MadaraUchiha sign your commits!
 
@NikiC Alright
@Ocramius All of them? I just need to learn how :D
 
@cspray its pretty simple, the thing is I am making responsive, so using fixed position is not preferable, so am using absolute, and tweaking up top property using scrolltotop, and its ie10, but research seems like it lags anyways stackoverflow.com/questions/4368229/…
 
4:42 PM
also, I will admit to never signing tags :P
 
@MadaraUchiha just add a -s flag when committing or tagging
@NikiC it's really too easy to do to avoid it :)
at least once you have that frikken key :D
 
@Ocramius How do I make a key?
 
lemme find a tutorial :)
 
@Ocramius you have to make sure that you're signing with the right key ^^ and you have to publish the public key somewhere
 
@NikiC yeah, I only have one, heh
 
4:44 PM
@Mr.Alien Seems like the answer is pretty good and says the same thing I did: "Don't use jQuery.scrollTop() in IE"
 
@cspray any alternates/equivalents?
 
as far as it concerns the keyrings, I have thrown it around somewhere, must check where
weirdly, most keyrings are offline :\
 
@Mr.Alien ...the answer to the question you just linked.
 
well am jquery noob, I can tweak, I can write basics but not indepth
 
@Ocramius just read that speakerdeck; good explanation indeed
 
4:46 PM
@MadaraUchiha fedoraproject.org/wiki/Creating_GPG_Keys and openpgpblog.tumblr.com/post/288011255/… . once that is setup, you just need to add a -s flag while committing/tagging, and that's it.
 
I was about to respond to your "it's not encryption, just hashing" with "yeah, but it's encypting the hash" then lost my nerver; your link backs me up :)
as for key rings, they're just a list of keys you know about
other people's public keys which you've associated some meaning to - e.g. that they match some real-life entity
 
@IMSoP yeah, I just know the 10000000Km-away theory, and honestly don't even care about the details
what matters to me is the concept
@IMSoP yep, but it doesn't look like there's any default or authoritative ones
 
@Ocramius "authoritative" is a tricky concept for cryptographers
 
haha, yeah :)
 
for any public key that's useful, somebody has the private key
whether you consider that person "authoritative" for a particular purpose is ultimately up to you
the certificates used by SSL, for instance, are signed by a bunch of corporations who convince the makers of browsers and OSes to trust them
occasionally one of them makes a cock-up and the browsers have to send out updates telling all our computers not to trust them any more
 
4:52 PM
"occasionally" haha
you mean like every second day, there just isn't anything we can do about it
 
yes, but it still looks like freshly installed boxes (ubuntu in this case) don't have any referenced keyrings...
 
@Ocramius reference key rings for what
whose keys are you expecting to find in there that aren't?
 
well, either I give you my public key or I just tell you "it's in that keyring"
I'm talking about me distributing software
 
@Ocramius but why would Ubuntu know to trust you?
 
it wouldn't, but afaik I get trusted/distrusted in the keyring itself
 
4:55 PM
@Ocramius unless I have your public key, i can't verify or decrypt anything with it
so someone has to distribute that exact key, not just your name
 
maybe you're misunderstanding me :)
 
@Ocramius yep, it went to look for a matching public key in its keyring; because there wasn't one there yet, it initialised it before proceeding; it then looked in that keyring, and couldn't find what it was looking for, because it was empty
 
yes, and I was wondering why the keyring list is empty by default :)
 
<?php if ( ! isset($keyring) ) { $keyring = array(); } if ( array_key_exists($keyring, $some_key_id) ) { ... }
@Ocramius because what would it have in it?
 
keyring.debian.org or such?
 
4:59 PM
but then somebody's got to be trusted to maintain that
 
I see
makes sense
 
if it's a small list, it won't be much more use than an empty one; if it's a long list, it becomes a security risk, because a rogue key in there will appear to be trusted
(i'm no expert on this by the way, so you may find you ask someone who knows better and get a better answer)
> To date, no fully satisfactory solution to this "public key authentication problem" has been found.
 
meh :D
 
I have an unanswered PHP flow/concept question for an app im trying to make if anybody with more experience than I (not hard) has a minute to take pity on this morning's frustrations
 
user895378
@red6 just throw out your question -- if anyone can and wants to help they will :)
 
@IMSoP Lol, I get it. I asked it that way because the question has already been posted in a bit of length and description
 
@red6 then link us the question
 
0
Q: Creating Scheduler App - process and concept questions

red6If there are other times this has been asked or answered, I apologize - I think my searches keep getting lost in people who are trying to schedule PHP tasks on a server so I'm not finding what I am looking for. So as my first self-built app (not a guided or instructed one) I am trying to build a...

All of the vanilla CRUD stuff for the different variables is done, but the crux of it is getting it to do its primary function(s), AKA, scheduling with a few criteria
 
does version difference of php 5.4.16 and 5.3.8 makes any difference?
 
@user2500861 Uhh...yea
 
5:19 PM
I am trying to fetch data from table and giving it to json string. Will it effect in this situation? on mylocal host where it's 5.4.16; works fine. While on ec2 with 5.3.8 gives wrong result
:11931822
 
@user2500861 define "wrong result"
 
@user2500861 also define "this situation" - by "fetch data from table" you presumably mean some SQL code? by "giving it to json string" you mean json_serialize?
 
@red6 I'm actually really interested in what people would come up there as well
 
I mean
`$result = $mysqli->query('SELECT * FROM view_name');
foreach($result as $r) {
$temp = array();
$temp[] = array('v' => (string) $r['ind_type']);
$temp[] = array('v' => (int) $r['Index_val']);
$rows[] = array('c' => $temp);
} `
 
5:22 PM
@madarauc
 
In the case you don't get a decent answer in two days, come back here and I'll offer a bounty on it to attract high quality answers.
 
oops
 
@red6 Use the Tab luke!
 
@MadaraUchiha Darn-fangled new interfacy thingamajigger - where's the crank?
 
@IMSoP are you in listening mode?
 
5:24 PM
@red6 New interface? You're only a member for 6 months :X
 
@MadaraUchiha 'New' because I never used chat until now.
 
@red6 Ah :D
 
@user2500861 OK, so what is the difference you are seeing between your two versions of PHP?
 
@MadaraUchiha I'm all about tutorials, previously answered questions, etc. I often or almost always find the issue I am looking for and don't need to post anything. I suppose when your head is filled with newbie questions, they've been asked a million times.
 
@red6 One in a million, sadly :)
 
5:26 PM
@IMSoP in latest version I get correct json string {"cols":[{"label":"pcount","type":"string"},{"label":"ncount","type":"number"}]‌​,"rows":[{"c":[{"v":"pcount"},{"v":179}]},{"c":[{"v":"ncount"},{"v":237}]}]}
while on 5.3.8 it give wrong {"cols":[{"label":"pcount","type":"string"},{"label":"ncount","type":"number"}]‌​,"rows":[{"c":[{"v":""},{"v":0}]},{"c":[{"v":""},{"v":0}]},{"c":[{"v":""},{"v":0}‌​]},{"c":[{"v":""},{"v":0}]},{"c":[{"v":""},{"v":0}]}]}
tables has only two rows
 
hi guys what's up? :)
 
@user2500861 code?
 
does it due to version difference?
 
only a confirm from you...PHP doesn't supporto multiple dispatch (i.e. multi methods) right?
 
5:29 PM
@user2500861 could you post a var_export of the array before you use json_encode on it?
Actually, try var_export on both versions, and see if you get differences.
 
guys?
:(
 
@MadaraUchiha I really apologize, but I could not under stand what you mean by this, how?
 
Gratz @NikiC, looks like variadics is a mega success
 
sorry for bumping guys but...PHP doesn't support multiple dispatch (i.e. multi methods) right?
 
@user2500861 run var_export($table) right before the json_encode and paste the results here.
@gr4devel you mean, multiple threads?
 
5:31 PM
@MadaraUchiha nope buddy I mean -> en.wikipedia.org/wiki/Multiple_dispatch
I'm only asking for a confirmation
:)
 
Ah, no.
Method dispatching, AFAIK is compile time
But I may be proven wrong by the experts here
 
That's also what was in my mind :)
but, as said, I preferred to ask some experts :)
btw thanks Madara :D
 
@user2500861 Edit, remove the ping, and press CTRL+K
Paste code only, then CTRL+K
 
@gr4devel PHP doesn't even have single dispatch...
 
:11931968 ok

  'rows' =>
  array (
    0 =>
    array (
      'c' =>
      array (
        0 =>
        array (
          'v' => 'pcount',
        ),
        1 =>
        array (
          'v' => 0,
        ),
      ),
    ),
    1 =>
    array (
      'c' =>
      array (
        0 =>
        array (
          'v' => 'ncount',
        ),
        1 =>
        array (
          'v' => 0,
        ),
      ),
    ),
  ),
){"cols":[{"label":"pcount","type":"string"},{"label":"ncount","type":"number"}],"rows":[{"c":[{"v":"pcount"},{"v":0}]},{"c":[{"v":"ncount"},{"v":0}]}]}
 
5:36 PM
@user2500861 code ONLY -_-, nevermind :X
Also, that's not all the code.
 
@NikiC you're exactly the expert I was looking for! :D thanks buddy for your support and confirmation :)
 
@user2500861 paste the code as is, it should start with array(
And ONLY THE CODE without replying, without "ok"
 
Though you can do abominations:
$operation = 'add';
$foo->${operation}(2, 2); //Calls $foo->add(2, 2);
 
:11931993
array (
  'cols' =>
  array (
    0 =>
    array (
      'label' => 'pcount',
      'type' => 'string',
    ),
    1 =>
    array (
      'label' => 'ncount',
      'type' => 'number',
    ),
  ),
  'rows' =>
  array (
    0 =>
    array (
      'c' =>
      array (
        0 =>
        array (
          'v' => 'pcount',
        ),
        1 =>
        array (
          'v' => 0,
        ),
      ),
    ),
    1 =>
    array (
      'c' =>
      array (
        0 =>
        array (
          'v' => 'ncount',
 
amagad.
 
5:39 PM
@Danack oh yeah man you're right but how that does relate with multiple dispatch? :/
 
is "multiple dispatch" the same as "function overloading"? I came upon the term recently and struggled to understand it
 
nope @IMSoP
 
@IMSoP in first approximation, yes
 
ops
 
@gr4devel You'd have to figure out the correct function to call yourself based on the types so based off the example at en.wikipedia.org/wiki/Multiple_dispatch#Common_Lisp
 
5:42 PM
@Danack ok but in your example the problem resides in the method's name and not in its formals
 
$class1 = get_class($x); $class2 = get_class($y);
$function = 'collide_'.$class1.'_with_'.$class2;
//$function now equals 'collide_asteroid_with_spaceship';
$foo->${function}($x, $y);
 
Am I missing somthing...
 
btw I don't recommend actually doing that...
 
oooooh...that's really black magic!
 
@NikiC and in the second approximation? ;)
 
5:43 PM
@NikiC I'm also curious like @IMSoP
:)
 
@gr4devel "WHAT HAVE I CREATED!1!"
 
@Danack I'll never do that :D
XD
 
@user2500861 The problem is probably in your server configuration.
 
I don't get how the CLOS "multiple dispatch" is different from, say, PostgreSQL's function overloading
 
3v4l.org/pVfL0 - Same from 5.2 to 5.5
 
5:44 PM
@Danack yeah, I'm using that from time to time ^^
 
@gr4devel meh, never is a long time - there probably are cases where it could be cleaner than any other solution in PHP.
 
or am I using the term "function overloading" wrong maybe?
 
@NikiC Yes Nikix - I know github.com/nikic/PHP-Parser
 
Either that or your data is not what you think it is
 
@MadaraUchiha on localhost?
 
5:44 PM
I tried debugging some stuff in there - was not a pleasant experience ;)
 
@user2500861 With wherever you have problems
 
PHP-Parser...GOD BLESS PHP-Parser! :)
 
@MadaraUchiha I am confused. Whether it is due to server configuration or php version?
 
@user2500861 It's not because of PHP version.
 
@Danack it wasn't?
 
5:47 PM
@MadaraUchiha :11932063 so reinstalling php sudo yum install -y php54 where the problem occurs will do?
 
@user2500861 Possible.
 
@NikiC Stepping through some of the bits where stuff was called by variable got a little bit confusing...
 
But don't reinstall just yet
 
@IMSoP here what is in my mind: you can achieve function overloading with multiple dispatch BUT multiple dispatch is something more that function overloading
please to everyone if I'm wrong...KICK MY ASS!
 
@MadaraUchiha why?
 
5:48 PM
@Danack hm might be. I don't usually use a debugger
 
printf all the things?
 
@IMSoP Wow, comprehensive. I have some things to think about. Methinks I may have bitten off a large piece for a first effort without training wheels (and yeah, mixed metaphors).
 
@red6 start with the basics, and don't worry too much about the complicated bits
 
Anonymous
@MadaraUchiha I applied your feedback
 
5:51 PM
if you start with entity definitions which are consistent and normalised, adding more complex relationships and processing later shouldn't be too hard
 
@Simon_eQ Great, it's a start :)
 
Anonymous
Yup. That is the plan
 
@gr4devel Aha! So if PHP did have anything akin to function overloading, it would actually have to be multiple despatch, because there is no compile-time type information
 
@IMSoP I think it's a correct point of view :)
to all PLEASE CORRECT US (me and @IMSoP) IF WE ARE WRONG! :)
 
I installed php sudo yum install php54, successfully and php -v gives '5.4.19'. But when i cheched using phpinfo() it gives 5.3.8
any suggestion?
 
6:01 PM
@gr4devel found this paper in a wikipedia footnote: open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2216.pdf
 
@user2500861 What server?
 
@IMSoP wow...Prof. Stroustrup!
 
@cspray I just played with php, apologize. But how to check server>?
 
What server are you running?
 
user895378
@user2500861 what happens if you run the phpinfo() script with sudo?
 
6:03 PM
> ISO C++ supports compile-time (static) function overloading and
runtime (dynamic) dispatch on a single argument.
> We define open-meth
ods
to generalize both
 
@rdlowrey I check it in .php file
 
@IMSoP yep buddy C++ support them! I remember it!
 
so backs up the argument that "multiple despatch" is like function overloading "and then some", rather than a disjoint concept
 
sorry I don't get your last sentence :/
 
user895378
package managers only make life more complicated in terms of installing php IMO ... compile it yourself FTW.
 
6:05 PM
and this pretty much confirms that compile-time / run-time is the big distinction
> The ideal is to give the same result as static resolution would have given had we known all types at compile time.
 
yeah I agree with that :)
 
@gr4devel the paper is proposing adding multiple despatch (at run time) to C++ which currently has "function overloading" (like multiple despatch, but at compile time) and "single despatch" (object polymorphism at run time)
 
oh wait I remember that C++ does have multiple dispatch
...I remember wrong sorry @IMSoP
you're right
:)
I should leave now :(
btw thanks to everyone @IMSoP, @NikiC, @MadaraUchiha @Danack for your support and kindness :)
 
@gr4devel no, thank you for helping me find the answer to what "multiple despatch" is :)
i should go and make some dinner...
 
6:23 PM
anyone here have experience working with WooThemes Sensei?
 
Welp, about to leave for airport
 
Have a nice flight. First class?
 
nope
 
Fingers crossed for exit-row then.
At least the films are good on the long flights.
 
eugh, why do people have so many misconceptions about PHP's memory management?
 
6:31 PM
sleep should be good
 
27
A: Why does this simple php script leak memory?

Andrew Mooreunset() doesn't free the memory used by a variable. The memory is freed when the "garbage collector" (in quotes since PHP didn't have a real garbage collector before version 5.3.0, just a memory free routine which worked mostly on primitives) sees fit. Also, technically, you shouldn't need to ca...

28 upvotes, and the entire premise of the answer is wrong
 
well
it's not wrong
in this case it's not applicable
but in general the premise is correct, sort-of
anyway, shutting down and leaving. Later
 
Dramamine is a pretty easy way to fall asleep.
 
Anonymous
@IMSoP I got rid of typo for you
 
@Simon_eQ that ; is correct, if wacky
 
Anonymous
6:34 PM
WHAT!!
 
it's there for the empty first part of the 3-part for syntax
 
Anonymous
oh, my bad ..
 
Anonymous
first time to see it
 
for some reason, instead of for ($i=0; $i < $iters; $i++), he's used $i=0; for (;$i < $iters; $i++)
 
oh well ... was reading some news, which made me watch this fragment again: youtube.com/watch?v=DGscoaUWW2M
 
6:35 PM
Hey guys, I know this is php chat, but is there a way to Submit an Ajax call on keypress "enter" and not ahving <form> ?
I can't find facebook's <form> element around chatboxes.
 
lol
 
@Darius yes, you attach event to the input .. or let it bubble up to the document
 
@Darius Have you tried the JavaScript room?
@tereško Gamer's typo :D attach/attack :D
 
yeah
 
6:38 PM
thanks, attachevent is what i was looking for, i'll do research with that
couldn't come up with proper keywords for google
 
Anonymous
@tereško lmao on the video.
 
^this
 
@Darius you might benefit from this snippet
assuming you have more-then-basic skills in JS
 
yeah, i can handle JS deciphering
 
@Simon_eQ watch there series, it's quite awesome: imdb.com/title/tt0080306
 
Anonymous
6:42 PM
@tereško I think I will. I just hope John Cleese is in it.
 
Found the answer, thanks to teresko $("textarea").keydown(function(e){ this etc.. })
and I check inside if it's the enter key, and should be good to go
 
@NikiC @ircmaxell any anyone else who knows about zend ... pastebin.com/4a5SmUmd I'm trying anon classes again, cleaner patch this time I think but its failing and I don't see why ... any clues ??
 
Can somebody tell me how I can make parse_url fail (return false)?
 
6:57 PM
ah incorrect scheme will do
 
in general a malformed url I guess ... but it's not specific about why, it says there in the @todo
 
@JoeWatkins I had a hard time breaking it with all the URLs I tried
It's pretty good at guessing what you mean
unsupported:// breaks it though :)
 
yeah it is pretty forgiving, iirc it parses without http:// and all the gubbins ...
 

« first day (1071 days earlier)      last day (3893 days later) »