« first day (873 days earlier)      last day (4061 days later) » 

12:00 AM
@NightHawk if you check it, the two strings have same length: 3v4l.org/Ku3hN
it uses the bitwise AND to get the decoded string
 
True
 
@Ocramius So the constants are merely there to confuse, as long as they are the same in both sides of the string?
 
Basically, if you look at the gif file mentioned in the decoded string, you will find, after inflating it, yet more code.
 
@NightHawk yes, the constants are there to confuse only.
 
I suggest you take that decoded string, change the eval to echo, and then run it
 
12:04 AM
@CaptainPayalytic That I know and I've dealt with things like that before at that point, just the creation of the eval was new to me.
@Ocramius Where can I learn more about the bitwise and the decoding?
 
Basically, the bitwise AND between two strings is another string - codepad.org/7WWwn5Gm
 
@NightHawk bitwise operators are at php.net/manual/en/language.operators.php
 
In my life I would have done that in PHP, it is just horrible. But very offsetting actually
 
@Ocramius So in essence, it uses letters from both strings and places them in a predetermined order?
 
12:07 AM
@NightHawk kind-of
you can do a lot of crazy stuff with bitwise operators :)
 
@Ocramius What purpose to bitwise operators serve? Do people generally still use them (other than for malicious things)?
 
Obviously for bit-wise operations :)
(The hyphen is intended)
 
@NightHawk I personally don't recall using them in any of my projects, but you can build very small arrays stored in a single integer, double an integer N times (by shifting it), etc
 
@Alexander So they are used for performance and efficiency?
 
A bit array (also known as bitmap, bitset, bit string, or bit vector) is an array data structure that compactly stores bits. It can be used to implement a simple set data structure. A bit array is effective at exploiting bit-level parallelism in hardware to perform operations quickly. A typical bit array stores kw bits, where w is the number of bits in the unit of storage, such as a byte or word, and k is some nonnegative integer. If w does not divide the number of bits to be stored, some space is wasted due to internal fragmentation. Definition A bit array is a mapping from some domai...
 
12:10 AM
Need advise and tips on the integration of twitter!
 
@NightHawk I don't think this kind of stuff will help you for web development though
This may be too much for you now, but try reading the title of the examples: graphics.stanford.edu/~seander/bithacks.html
 
@Alexander Sure it does. From now on, I'm going to build all my web applications bit-wise.
3
 
yep, it's more for complex computations or micro optimizations (or, as shown here, to confuse the hell out of you)
 
Anyway, thank you all, this is more info than I had before I asked, so at least I have something to go by now :)
 
we still want the gist of the other thing!
don't think you can get away with that! :P
 
12:16 AM
yea
where does this thing go? what's it's purpose? ... etc
 
It was a test for the chatroom!
Enough for today. I call it a day.
See you everyone!
 
@Ocramius I would, but I'd first have to ensure that it doesn't have anything sensitive/revealing in there.
 
@Ocramius I don't know about that, I use bitwise operators in network-related programming all the time not because I'm doing something complex and not because I am micro-optimising, but because it's the way to do it.
 
@DaveRandom ah, right :) That part is obscure to me :)
 
byte shifting is usually harder to fuck up than string parsing.
 
12:31 AM
^^ that
Also it's a nice easy way to deal with sending numbers around in byte streams
Although it always bugs me a little that there is a degree of trust involved that the remote endpoint encoded the message correctly. I mean obviously there are checksums etc, but you can't be 100% certain that the other end was not written by a special kind of idiot who knows how to produce a valid checksum but not how to write the rest of the message.
 
12:52 AM
@NightHawk A nice example of bitwise operator use is the E_* constants, which are both parsed using bitwise operators in php itself, but on which you may also very well want to do bitwise operations yourself (when you want to combine two error levels)
 
1:03 AM
@0ɟɟouoɟıɹʇuınbɐɥs you ever finish your script?
 
@CCInc not yet
I'm still debugging why my MutationObserver code doesn't work on chat...
 
1:33 AM
@0ɟɟouoɟıɹʇuınbɐɥs Mutation observers are a pain in the arse and I now know them reasonably well, any chance I could have a look?
Oh yeh @Ocramius ^^ that's the other good common use for bitwise operators, flag fields. Great for passing a bunch of booleans around in a clean way.
 
@DaveRandom that's what I said above, but yeah =)
 
@DaveRandom Yeah, I just need to get a mutation observer on #chat... my test code works: jsfiddle.net/bWhh8/7
 
@Ocramius /me crawls back under my rock
 
@DaveRandom rofl
 
@0ɟɟouoɟıɹʇuınbɐɥs { childList: true, subtree: true }
(at least, that's what we do in cv-pls)
 
1:38 AM
@DaveRandom Thanks, that works!
Now for the issue of the elements being created/removed when a message is posted :P
 
Also note a few important things it took me a good long while figure out: When you post a message and it is updated when it is actually posted to the server, the entire .message node is removed and a completely new one is added to the DOM
lol
Also the same thing happens when a post is edited
 
That's annoying
 
oooh, a proposal from fig? :Q_
 
@0ɟɟouoɟıɹʇuınbɐɥs Which is why I wrote this nightmare for which I am truly sorry. I have tried to rewrite in a more comprehensible way a couple of times and very quickly find myself reaching for the alcohol. However, it does work around a few of the problems you will have quite nicely, by firing callbacks - it has nodeadded, noderemoved, and (crucially) nodereplaced events.
It also has an event you hook while it's comparing nodes to work out whether the new node is a replacement of the old, by default I think it just compares the ID attribute
I forget what we actually do when using it, let me check
Here's the magic
 
nay, no proposal:\ just PSR-4
 
1:45 AM
I promise I will rewrite that in a legible way at some point very soon
It's supposed to fall back to mutation events in browsers where observers are not implemented, but that doesn't seem to work right, it certainly doesn't work it Opera which is where I really want it to work
@Ocramius PSR-3 made lose confidence in the whole concept. It's just such a stupid thing. For a start it something only an idiot could get wrong, and yet they have still managed to get it wrong. I mean seriously, what is the point in have 8 methods with the same signature instead of just one method with a $level argument?
 
Yup, it's too complex :\
 
aarrgh people like this make me not want to answer questions. I need to make a rule not to answer questions for people who look like a smug tool in their profile pic =oP
 
@crypticツ wrong downvoted answer picked?!
 
user895378
From time to time I find it's important to slow your and before reaching the stage.
 
user895378
Otherwise I just get bitter and annoyed with the whole idea of Stack Overflow.
 
user895378
1:57 AM
And do this:
 
user895378
6 hours ago, by Pekka 웃
One ingredient for being happy on Stack Overflow is having a mild form of Alzheimer's. I have it and it's great. I simply forget altercations I have with people, even the really bad ones. The next day, I'll greet them nicely not because I'm so noble and forgiving, but simply because I forgot who it was again that I had the quarrel with
 
@Ocramius OP unaccepted my answer which solved his problem, but then posted his own answer using my solution fixing an unrelated issue (CSS) and then marking his answer at the accepted. I was like wTF, you still used my solution, but just fixed something completely unrelated.
 
@crypticツ seems legit, rofl
 
@Ocramius the thing is the part he fixed was not even part of the original code, sighs
@rdlowrey you're talking to a woman, we don't forget easily =oP We will bring up the slightest issue 10yrs later in an argument.
 
user895378
^ Truer words were never spoken.
 
2:04 AM
meh... they're large event stores
 
@rdlowrey I've already filed it away in the back of my mind
 
haha
nn all :)
 
I need to make a GM script that will auto-remove messages from chat about 2 secs before the time limit. @Lusitanian could use it for his chat removal protest.
 
user895378
$eventReactor->register('onInsult', function($someDude) use ($eventReactor) {
    $interval = 86400 * MAX_NEURON_CONNECTION_DAYS;
    $eventReactor->schedule($interval, function() {
        explodeRighteouslyAllOver($someDude);
        slashTires($someDude);
        stalkNewGirlfriend($someDude);
    }
});
$eventReactor->run();
 
user895378
2:14 AM
@Ocramius later
 
user895378
^ Is this the voice of experience? Maybe.
 
@rdlowrey I've stalked an ex's gf and exploded as well, never slashed a tired, but did deflate it. You basically take the cap off find a teeny tiny pebble put it in there and put cap on. It will push the pin and deflate it =oP
 
user895378
lol you sound like a seasoned veteran.
 
of course not >.<
 
user895378
Yeah me neither.
 
user895378
2:20 AM
Signs you've been writing too much PHP:
 
user895378
(1) You make PHPirate jokes like print_arrgh($var);
(2) You describe interpersonal relationships using PHP closure syntax
 
Yay I have plugin once again
 
user895378
@DaveRandom Hurray for long-running, complex experimental edits on branch: master!
 
user895378
2 hours ago, by NightHawk
@Alexander Sure it does. From now on, I'm going to build all my web applications bit-wise.
 
user895378
2:26 AM
^ This!
 
@PeeHaa The nightly build script is dirty and horrible but working. Just clone the build-tools repo into the same dir as you've cloned the site, drop the private keys into the root of the build-tools repo and run nightly.php and everything should automagically work, then just set up a cron job to run nightly.php at whatever interval you see fit. I suggest not less than an hour though, there's not a lot of point
@rdlowrey makes a good point as well - no more commits into the dev branch unless you know they will at least build
 
user895378
I've done that enough times at this point to know better (usually).
 
I was confused about master for a while, I reckoned that it was always there from the start :)
When I found out it's actually a branch I wondered ... then where would the commits go if I'm not on a branch? Is there an uber master? :)
 
user895378
There's a lot about git that confuses me. I pretty much know enough to do normal stuff in my workflow ... for everything else I run to google and/or SO with the quickness.
 
user895378
@Jack Detached head FTW!
 
2:32 AM
@crypticツ do it!!
 
user image
7
...and on that note, I'm going to bed
nighty night @all
 
user895378
later. Thanks for that little gem :)
 
@Jack git --everything-is-local --everything-is-a-branch
 
user895378
This chatroom makes me literally laugh out loud several times a day ... and that makes up for the stackoverflow.com tag which mostly only makes me curse.
 
This is just great:
$ yum install v8
$ v8
-bash: v8: command not found
=O
 
2:37 AM
v8?
 
user895378
why you need v8, jquery superior on all engines.
 
@kaᵠ Yeah, the next best thing after v12
 
(redacted)
 
user895378
rofl
 
$(penis).wrap('condom') works very well too.
4
@rdlowrey And let it run every night.
 
2:38 AM
@Jack is there a $.ensureDurability(); method on that object?
 
better call it for body.onStrip()

 
@rdlowrey did you finish websocket chat yet?
 
(removed)
 
or was @PeeHaa the one doing that
can't remember :(
 
user895378
I think he is. I've got a fully functional websocket adapter for my sweet http server working though ... just adding features right now.
 
2:41 AM
you guys have a script for (removed)-ing/(redacted)-ing so fast?
 
user895378
It's called left-click script.
 
user895378
@Lusitanian I can add you to the repo in the next few days if you'll actually try the thing out and give me some feedback.
 
@rdlowrey ah, you upgraded to leet private github? yeah i'll play with it and see if it works
will it set my dog on fire, though?
 
user895378
No, it works and everything not named websockets has been stable for multiple weeks at this point.
 
2:43 AM
nice
 
user895378
I did leave a backdoor in there to set cats on fire, but I think you're probably fine on that front.
 
user895378
Only if you don't disclose the existence of the zero-day exploit to the authorities.
 
I'll be sure not to let PETA know.
 
user895378
Sweet.
 
@crypticツ a question having SIMPLE somewhere in the body or worse in the title should rise a possible redflag for 'smugness'
 
2:45 AM
Ohhh, the v8 engine is run by typing d 8
 
user895378
naturally. Also, markdown the chat markdown parser is not very smart if you don't hit it over the head with whitespace.
 
aduhhhh
 

 
Why would I get this error Passed array specifies a non static method but no object (non-static method Namespace\Library\Autoloader::load() should not be called statically)' when returning return spl_autoload_register(array($this, 'load')); ?
 
@NickFury Is that really the exact error message? I've never seen that before tbh.
 
2:54 AM
Yup, Fatal error: Uncaught exception 'LogicException' with message 'Passed array specifies a non static method but no object (non-static method Namespace\Library\Autoloader::load() should not be called statically)'
$this is returning NULL which I'm assuming what's causing the problem
but I don't know why?
 
out of curiosity, why is your namespace called Namespace and your Library called Library? ;)
 
it's not
 
@Lusitanian Doesn't that make sense? lol
@NickFury Well, why is $this null ?
 
public function register(){
	return spl_autoload_register(array($this, 'load'));
}
 
Or perhaps, pastebin a bit of your code?
 
2:55 AM
@NickFury can we see some context?
 
ah
 
how are you calling that method?
 
This is probably a case for error_reporting(-1);
 
indeed it is
 
2:56 AM
yep
 
@0ɟɟouoɟıɹʇuınbɐɥs no jquery, you win :)
 
@Jack I have it enabled
 
@igorw pop in and say "yep" for no reason?!?!?
 
@NickFury Okay, so how are you calling register() itself?
 
3:00 AM
@Jack @Lusitanian pastebin.com/FfnktNH5
 
:8118812 well then.
 
yo
 
@NickFury so where's the method called from?
 
@Lusitanian I was actually confirming the error_reporting(-1);
 
@ircmaxell hola
@igorw ahhhh
 
3:02 AM
ahh bingo, thanks @Jack @Lusitanian
$autoload::register() to $autoload->register()
 
Booked my portland trip today
 
@ircmaxell you're fast. :)
 
hotels are going QUICK
 
which one you staying at?
 
Courtyard Portland Downtown/Convention Center
bonsaiden.github.com/JavaScript-Garden <-- I keep forgetting about this resource, and remembering it's shear awesomeness
 
3:19 AM
noted, I'll try and coordinate some flights/layovers with other europe peeps
I guess I should do that soon :)
off now, 'night
 
good night
 
user895378
3:57 AM
I wonder ... would it be impossible and/or stupid to fake function autoloading by allowing this in PHP:
 
user895378
class myFakeFunction { public static function __invoke() { echo 'hello'; } }
 
user895378
And having it attempt autoload if called and no function exists with the same name:
 
user895378
myFakeFunction();
 
user895378
I'm just tired of writing "stupid PHP classes" with one method that should be functions but the lack of function autoloading makes it a real PITA.
 
@rdlowrey how does it get automatically invoked?
myFakeFunction::someFunc() maybe
 
user895378
4:00 AM
No, that's why it specifies a static __invoke() method.
 
user895378
So you don't need an instance to make the class act like a callable.
 
user895378
I don't know if that would even be feasible under the hood but it's a thought.
 
user895378
The better alternative might just be to add a spl_function_autoload_register exactly like spl_autoload_register except for functions.
 
user895378
I'm still baffled that we don't have this yet.
 
what i'm saying is when you run myFakeFunction(); it will try to find a function. How will this static method be invoked automatically in that case?
 
user895378
4:02 AM
4 mins ago, by rdlowrey
And having it attempt autoload if called and no function exists with the same name:
 
user895378
The autoloading could only kick in if no function with that name existed.
 
user895378
But if you're going to do that I guess just registering autoloaders for functions that don't exist would make more sense.
 
@rdlowrey oh so you were suggesting changes in PHP itself
 
user895378
Yeah ...
 
user895378
Constructor dereferencing makes it slightly more bearable I guess in 5.4 because you can do:
 
user895378
4:04 AM
(new MyClass)->myMethod();
 
user895378
But that's still ugly when it should really be a function.
 
i was thinking more like, $myFuncDelegate->whateverFunction() will try to load the file lib/functions/whateverFunction.php and run the whateverFunction.
 
user895378
And MyClass::myMethod() works too, but again, I don't want to shoehorn a function into a class just because there's no other way to autoload it.
 
user895378
 
@rdlowrey in what I am suggesting, the actual functions are just functions. But you call them through a class. Are you suggesting the same?
 
user895378
4:09 AM
Yes, basically.
 
atleast this way, when PHP finally gets function autoloading, you can just remove the occurance of $myFuncDelegate-> leaving the whateverFunction() part intact
 
user895378
It's a good idea ... I guess I could avoid upsetting my IoC sensibilities with that strategy by asking for a callable with the requisite functionality as well.
 
functions don't allow mocking. question is, should they?
 
user895378
I don't know that functions should, but I want my interfaces to be as easy to test as possible. If I'm using a userland callable for something inside a class and it doesn't make sense as a method in that class I want to inject it to make it easy to replace at test time.
 
user895378
Native functions are a whole other matter, of course, as they don't need testing and their results can (hopefully) be relied upon to be correct.
 
4:24 AM
@rdlowrey replace "hopefully" with "occasionally"
 
user895378
Don't remind me. If I pretend that's not true then it's not true.
 
@rdlowrey the fact that this occasion arises rarely is proof that user-land callables within a class should not be a function.
it probably breaks SRP
 
user895378
I'm talking about mixing elements of functional programming in -- not OOP here.
 
user895378
And no, I disagree that injecting a callable necessarily breaks SRP.
 
user895378
4:28 AM
That would mean the callable typehint is a complete OO abomination, and I don't subscribe to that at all.
 
user895378
I would say that the fact that this occasion arises rarely only serves to demonstrate PHP's limits with regard to functions.
 
(and/or PHP users' limits with regards to functions)
 
user895378
And that ^
 
user895378
I have no doubt that we'll eventually have function autoloading at the very least as PHP has taken steps in recent releases to be more friendly to people who want elements of functional programming.
 
usual use case is where you pass callables around. otherwise, there is never a need to reference any concrete functions within a class
and i don't see how autoloading helps with that
 
user895378
It doesn't help to inject a callable, but it does help if you don't want to bastardize your architecture with a class when none is needed.
 
user895378
We have __invoke(), the callable typehint and lambda functions. PHP is moving in the right direction, at least.
 
user895378
I think @NikiC is right when he asks, Are PHP developers functophobic?
 
you sound like a preacher
 
user895378
And I think it's an artificial limitation placed on PHP devs because of current limitations in the language itself.
 
4:34 AM
just sayin......
@rdlowrey random question:
 
user895378
I just have gotten more and more frustrated with regard to "stupid classes" since reading @Eevee's post on the subject. In PHP you basically have no choice but to use them.
 
trying to determine appropriate way to handle implementation of that method
feels dirty to duplicate the code from retrieveAccessToken
but that is also a silly usecase for exceptions...i dunno, wrote it too quickly without thinking about it
 
user895378
Is retrieveAccessToken() just a simple getter for $this->token ?
 
user895378
I tend to agree with the comment, then, but if there's any chance that the method will be called multiple times for the same token I would cache the result and clear it when the applicability of the redis key changes.
 
4:38 AM
probably a good bet
for now i'm going to modify it per his suggestion out of general too-lazy-to-write-code-right-now syndrome
just because it's cleaner, but i definitely want to cache it in memory
 
user895378
I used to be okay with the exception handling method you employed, but that's a lot of unnecessary slowdown if you're worried about maximizing performance.
 
because multiple calls to redis can end up costly
 
user895378
exactly. you know what they say ...
 
user895378
> Cache rules everything around me.
 
user895378
I do something similar with custom Iterator streams where Iterator::current() and Iterator::key() pull from cached results if they've been stored and Iterator::next() resets the cached values to NULL so the next bit of data is pulled in on the next call to the other functions.
 
user895378
4:42 AM
Give me Iterators over c-style file streams any day. So nice. And they don't ever trigger errors.
 
user895378
Y U NO SPACE BETWEEN if( AND PARENS!??!!?!?
 
user895378
if() is not a function!
 
actually, i compiled PHP with the --everything-is-a-function flag
7
 
user895378
Ah, then nevermind.
 
user895378
4:45 AM
I guess by my logic isset ( and empty ( should have a space since they're actually language constructs and not functions :)
 
indeed
meh, it's a style choice
didn't /PSR-[0-9]/ decide where you're allowed to use spaces if you want to be cool, though?
 
user895378
<--- does this look like the face of someone who cares what /PSR-\d+/ says? What a good-looking dude.
 
user895378
There we go. Only 19 edits needed.
 
lol
 
user895378
That's a true story.
 
4:50 AM
oh my
 
user895378
I need to get rich so I can "pull a Drake" at the strip club.
 
ah yes, drake
the guy who's been a professional actor since age 7 who "started from the bottom"
 
user895378
I'm pretty sure 2Pac attended a $35k/yr private college in Boston.
 
user895378
Also, $50,000 in ones. What am I doing with my life?
 
hi
 
user895378
4:54 AM
hello.
 
well, maybe not.
 
im having some probs with xampp
and php my admin
 
user895378
<--- can't help with xampp. No experience. Sorry.
 
likewise
 
What is xampp?
 
4:55 AM
running php on iis is a much better experience than apache on windows, though
@crypticツ it's like a lamp, but with an x and two "p"s. instead of casting light, it sucks light inside of it
 
user895378
Running php without any third-party webserver is even better :)
 
aerys ftw
 
user895378
Which reminds me what I need to be doing right now.
 
ok
so i have separate tomcat installation
i need to create databases for mysql
the command line is hard
so im trying to install phpmyadmin to do that
im a newbie
hope you can guide me in the right direction
 
use mysql workbench then
yeah i know
thanks @0ɟɟouoɟıɹʇuınbɐɥs
 
4:58 AM
It does have a small bug though
 
Does deleting your own answers have a negative effect on your account? Like will it get you post banned or something? I know if you delete too many questions it's suppose to unless I'm mistaken.
 
im downloading it now
 
Sometimes el is null, and el.querySelector() won't work.
 
is it a GUI tool @Lusitanian
 
@techno yes
 

« first day (873 days earlier)      last day (4061 days later) »