« first day (804 days earlier)      last day (4135 days later) » 

user1125394
4:00 PM
but for backward compatibility it will not instantly be better
 
@ircmaxell I'm asking because the author just sent me a mail asking whether he can interview me, and I'm wondering whether it is worth the effort
 
@Neal idk what your edit here makes sense stackoverflow.com/posts/1685867/revisions decez edited answer ,, with required information
 
@NikiC I did one for the Master's series conference.
I would do it. For nothing else than to share your name, build your brand and get your message across...
 
@ircmaxell You got a point there
 
@Chimera Why are C and C++ so popular? :P
 
@NikiC please move my above cv-pls i have pointed to answer instead of question
@NikiC memory management .. and speed
for me
 
@NullPointer doesn't make a difference I think
 
@ircmaxell sadly this is a quite common answer
 
4:16 PM
@hakre: you stole my analogy (the eval one)... :-P
 
hello again :-)
 
word
 
:-)
fresh baked products tastes so good :)
 
@Nile Please don't post that. We don't accept "down-vote please" requests. And they are very frowned upon
 
4:28 PM
:) sorry
 
looks like you have missed
delv lol
^^
 
missed what?
 
@Nile here only and are allowed you can also use :P
 
@NullPointer okay.
 
> Side note: Wouldn't it be awesome if composer supported composer.sexpr files natively, so that we would no longer have to write JSON? No, not really.
 
4:36 PM
ahhh i love this font ..
 
@ircmaxell ? :-)
 
4:52 PM
@igorw: holy hell dude. That's an AWESOME post!!!
 
@ircmaxell what? where? :-)
 
@igorw: are you going to benelux?
19 mins ago, by ircmaxell
https://igor.io/2012/12/06/sexpr.html
 
@ircmaxell thanks, and will be in antwerpen too, yeah :)
 
@DaveRandom I'd rather just remove the fact that it opens in a new tab/window.
 
(+ I (hate (s) - expressions) - 4)
LISP was such a hard class to take... to many parenthesis!!!
 
4:56 PM
Okay, Have a happy new year all !
See you next year
 
@ircmaxell um, sorry, whats so special there?
 
@Neal Contrast that with Haskell: too few
 
@LeviMorrison haha and idk how to deal with python.... not enough brackets lol
 
@LeviMorrison haskell syntax is very clean
 
anyone written or used a class or library to use oAuth with dynamic permissions instead of statically defining which permissions you want in configuration?
 
4:59 PM
@KamilTomšík It doesn't have enough syntax for my liking.
Or at least the snippets I've seen.
 
@igorw Well, if you're going to be there, want to do a "Programming With Anthony" guest spot?
@KamilTomšík it's a good read
 
@LeviMorrison there's no such thing as too little parentheses :P
 
or another method for letting the user determine which permissions she would like to grant?
 
@ircmaxell we'll see, I need to prepare two talks for the conf already; but maybe we can do a really short one :)
 
5:10 PM
@igorw short, off the cuff, whatever you want to talk about...
 
would be an honour
 
:-D
I'm also planning a video about parsers (a precursor to one on Opcode caches)
 
@NikiC should do that one, it is the only logical choice!
 
he doesn't want to do one though :-(
I have no problem doing it on my own though...
with script review...
 
@NikiC Probably because C and C++ are incredibly flexible, can be used in almost any situation and they both have sane designs. Unlike PHP which right now has limited use and a rather poor design. Which may or may not be improving.
 
5:16 PM
how do you paste a tweet into this chat?
 
@igorw just paste the link from twitter by itself
 
Breaking: the source code for the universe leaked. And yes, it's a LISP! http://twitpic.com/9nild1 (via @dalmaer)
 
@igorw lol
 
user1125394
(god "foo")
 
5:21 PM
(define god (() 42))
 
@ircmaxell should I feel bad now? :(
 
@NikiC No. It's all good...
 
evening
 
user1125394
does it make compilation faster or more efficient this polish notation?
 
user1125394
or it's just to annoy people
 
5:24 PM
@ircmaxell Yes I did. I love that one, it's really great!
It is more than worth to steal :)
 
@cyril No, it makes parsing FAR easier and far less ambiguous...
@hakre I'm not complaining, just pointing it out
@hakre And next time, spread a link to the video ;-)
 
:-D
 
user1125394
this notation makes me think it's lower level language, but with practise it can be ok maybe
 
@hakre i know u know symfony can u help me out. pastebin.com/sHhV0yPm
 
5:30 PM
A lot of advanced calculators used to support RPN (Reverse Polish Notation).
 
its hard to debug something that doesnt give any error. :x
 
it was quicker entering in complex formulas, and required far less () characters
for example: 2 4 5 + * is the same as 2 * (4 + 5)...
 
user1125394
in lisp let me guess it's (* 2 (+ 4 5))
 
I now have edit powers. MWA-HAHAHAHAHA!!!!!!!
 
in fact, many "evaluation" systems use the Shunting Yard algorithm to convert infix notation (2 * (4 + 5)) into RPN 2 4 5 + * because they are easier to execute...
 
5:33 PM
Hang on. How am I supposed to get rep points now? Almost all my rep has come in those +2s I get for fixing other people's grammar.
 
@cyril Correct, because lisp uses Prefix notation (Polish Notation), where the other is Suffix notation or RPN (Reverse Polish Notation)
In computer science, the shunting-yard algorithm is a method for parsing mathematical expressions specified in infix notation. It can be used to produce output in Reverse Polish notation (RPN) or as an abstract syntax tree (AST). The algorithm was invented by Edsger Dijkstra and named the "shunting yard" algorithm because its operation resembles that of a railroad shunting yard. Dijkstra first described the Shunting Yard Algorithm in Mathematisch Centrum report [http://repository.cwi.nl/search/fullrecord.php?publnr=9251 MR 34/61]. Like the evaluation of RPN, the shunting yard algorithm is ...
 
@Neal sooo.... I've just got banned because of you :) you'd better watch what you type from now ;)
 
huh?
you did?
 
@ircmaxell yep, it is... I just thought theres something new in there...
 
@KamilTomšík huh?
 
lol
must have missed that
we usually invalidate all the flags ;)
 
whatever :) was worth it, nobody should deny lisp because of parentheses :)
 
I know I missed it
 
@KamilTomšík I think it's a good reason to deny it
@KamilTomšík I mean, it's just cosmetics, but cosmetics do matter
If a language is ugly, that's a good reason not to use it
(not saying that lisp is necessarily ugly, just saying that one might consider it so)
 
@NikiC to going mainstream, they do, no argument there. but lisp is not just a programming language
 
5:44 PM
@NikiC ugly ~= hard to use/learn/code as well in some cases
 
on top of that, there are other problems with lisp to be usable for everyday programming
@NikiC scala is ugly :)
 
@KamilTomšík What is it apart from a programming language?
 
@NikiC a lot of experience you'll gain and can reuse in some other programming languages
 
@KamilTomšík It is? Looked reasonably unugly last time I checked
 
@NikiC nowadays you can think of haskell as being new lisp
 
5:48 PM
@KamilTomšík When I saw some videos it looked better than Java imo
 
still, to me, that self-describing (page long) eval-apply loop was just wonderful for me
 
@KamilTomšík :-P
 
@KamilTomšík not arguing with that
 
I remember in school we had to make a LISP parser... it was terrible...
 
@NikiC @KamilTomšík like JavaScript, it's also a data format: github.com/edn-format/edn
 
5:52 PM
@Neal lol
you're kidding right?
 
user1125394
expression -> atom | list
atom -> number | name | string | operator
list -> '(' expression* ')'
 
@NikiC No.
 
Lisp is like the simplest language to parse and execute, coming right after brainfuck :)
 
user1125394
lisp parsing ^
 
@NikiC The parenthesis made my brain hurt...
 
5:53 PM
http://www.arcfn.com/2008/07/maxwells-equations-of-software-examined.html
could not find that faster, sorry
 
and everything backwards too... I am not used to that notation at all
 
5:58 PM
^^ what he hell is that?. :3 lol
 
can anyone look at this. http://stackoverflow.com/questions/14073521/symfony2-array-collection-returns-nothing
I cant seem to pinpoint the problem.
 
lol having fun r u? @hakre
 
moar patterns :)
 
6:02 PM
Wallpaper javascript"> <!-- eval(unescape( on sale now. 100% individually fetched from the internets, it's a must have for the settled geeks living room.
2
 
@Neal There's nothing wrong with that answer. I wouldn't upvote it, but it doesn't deserve to be deleted...
 
@ircmaxell It is wrong. It does not log the DOM elements to the console so that they could be viewed in the inspector.
 
Hi everybody!
 
@Neal I need this one to be cracked: stackoverflow.com/questions/13975919/…
 
no it's not. I can get to the dom element from that log
 
@hakre: Did you shuffle the ids?
 
@ypercube ah I need to run that. I read through your answer btw, very interesting. I though about changing it a bit so that I keep the old ID in the table, too.
 
@Neal console.log.apply is the way to go, your solution would print elements each to its own line...
 
7
Q: Intro book on CS for girlfriend

ChrisInEdmontonI am a software developer. These days, I work for a social networking site and write in Ruby, Php, C, C++, and of course, use SQL. I have a B.Sc. in Computing Science. I love my job. In my free time, I set up MythTV boxes, install open-source firmware on my WRT-54GL wireless router, and gener...

lol
i more delv to go
 
6:13 PM
@KamilTomšík yes yes it would. console.log.apply does not print the DOM elements. My answer is not the correct answer, but it is one that leads you in the right direction.
@hakre hmmmm
 
@yeah, you can add a new column, if you want. How many tables (and how big) are you dealing with?
 
@ypercube It's not much. I think 5 tables, of some 0.5 to 1.5k rows.
It's really more some fun.
 
@Neal it does what chrome did for years, it is correct answer
 
Somebody is scraping the site and I want to inject the other database connection to mix all the IDs.
 
night ...
 
6:15 PM
So I have the real database and I have the shuffled copy and I can switch per request. ^^
 
@KamilTomšík lol nope. They changed it. It used to have an array of the DOM elements into which you can go to them in the elements panel. You cannot anymore. -> it now has an array of "jQuery" object elements which are useles...
 
Ok, because the ORDER BY RAND() would kill the server on big tables.
 
I also created an output buffer that is reversing all text via DomDocument gg
@ypercube Yes but I think there is an alternative in case that goes down. I would run this on a test system first anyway.
 
@KamilTomšík what version of Chrome are you on?
Show me a screenshot of what you see when you console.log(jQueryObject)
 
@Neal youre right, it does not work
neither the accepted answer
theres no way to show the element in elements pane
 
6:21 PM
Anybody handy at analyzing malware payload?
 
@KamilTomšík The accepted answer works beautifully :-)
How doesnt it work by you?
 
@Neal it looks like it could but does not, clicking reveal in elements pane does nothing
 
I've got a screenshot of the unencoded markup.
 
@KamilTomšík it was changed to right click... It is good enough. :-)
 
@Neal clicking in context menu does nothing, whatever :)
 
6:22 PM
The Ok" goes with the flow of the question... @NullPointer
 
Heeey room
 
@PeeHaa Hey
 
No takers? Hmm.
 
@JaredFarrish What platform is the malware targeting?>
 
I'm guessing Windows. It's trying to load Shockwave with an <object>, some file called dream.dcr
@PeeHaa
 
6:27 PM
Even there are about 200 emails in my inbox, none of them seems interesting or important.
 
@JaredFarrish What does the payload look like?
 
@PeeHaa - Here's a screen grab: i_imgur_com/TWsHJ_png Just replace the underscores with periods.
 
@JaredFarrish Just post the image link here please?
 
@JaredFarrish Did they also manage to place the file referenced?
 
@PeeHaa You mean in the question itself?
@MadaraUchiha - i.imgur.com/TWsHJ.png
 
6:32 PM
They are trying to reference the local file dream.dcr
Did they succeed in getting it on the machine?
If the answer is yes. Open the file in some text editor and inspect the contents
 
@PeeHaa - Yeah, I was kinda wondering, I didn't see anything base or other reference in the payload. Maybe the person that posted it literally just didn't know what it was, or found it on their website.
I don't have the file.
 
hmmm
 
@PeeHaa - See this user's only question: stackoverflow.com/users/1935044/seet-hong
 
I'm pretty sure that whatever is in that file is going to attempt to do some request to load some other payload to infect other people visiting a page with it
 
sup guys
 
6:41 PM
sup 8ch8ch9di
 
@PeeHaa - Exactly, that's how it's supposed to work. Do you read H Security? They have some analysis reports where they decode and decompile this stuff. That's why I recognized it. See h-online.com/security/features/…
 
@JaredFarrish Nopez didn't read it. I have bookmarked it now though. But most of those hacks use the same pattern and often the same infections methods. If you ever had the pleasure of seeing some (often outdated) WP code + plugins you have seen most of them :D
 
let's say i have a web service. what would be the best way to secure so it doesn't get hit from the browser by just anyone randomly? but I also want to use my web service in my android and iphone app and eventually i want to allow other developers to access my web service so that they can interface with my stuff on their sites and apps. should i just authenticate the usage of the web service by using username and password via ssl?
i fear using a token or something of the sort because what if the apps get decomiled or something?
 
@8ch8ch oauth.
 
@PeeHaa 2-legged? right?
 
6:49 PM
Possible yes
 
the application is a radio application so users are going to have to sign up anyway so they have to provide username and password in the mobile apps anyway
so in that case wouldn't it be easier and probably better to simply provide a secure URL using SSL/TLS (https) so users can safely transfer their login data over the internet.
that also allows me to define access to my web service on a per user basis
i'm just throwing out ideas. not sure what best practice is.
 
@8ch8ch Whatever you choose (oauth or some other authentication method) always transfer user data over SSL (with a valid cert)
 
@PeeHaa yeah definitely. but should i even bother implementing an oauth provider since users have to enter username and password anyway?
 
@8ch8ch Depends. If you only need your own app to authenticate with your webservice a "normal" login would suffice
However if you want to enable other people building apps / services and accessing / mutating user data on your webservice oauth is the way to go
 
Yep. There's only a few feasible ways to widely compromise (say, maybe 10-15% of those who hit the page?) modern browsers: Java, Flash and PDF. At least in the sense of it downloading and executing without intervention. Some of those breakdowns, like the one where someone managed to layer a file system over the real file system. It's worth reading.
 
6:54 PM
@PeeHaa oauth it is then i guess. how do you recommend i architect it though? should i fear reverse compilation of my app?
 
@8ch8ch They can reverse engineer all they want, but it wouldn't do them any good. There is no login / user data hardcoded in the app. The user will need to retrieve an access token per session
By logging in. And the user will have to allow that the app is going to be able to make changes
 
@8ch8ch - You alwasy "provide a secure *method" of requesting and receiving authentication data from anywhere. And it's only one layer.
 
6:57 PM
@PeeHaa ok cool. thanks. i've been having touble finding good info on oauth provider implementation. any suggestions?
@JaredFarrish have you done it before?
 
@8ch8ch I believe I have also seen some kinda turn key implementations for provider implementations some while back
Not sure though
Not really related when it comes to implementation, but interesting read nonetheless
 
cool i'll take a look
 
stackoverflow.com/questions/14073733/js-decoding-issue <- Yes it got children. Burn with fire.
 
thanks
that turn key solution would be nice
 
7:06 PM
The Magic Roundabout in Swindon, England was constructed in 1972 and consists of five mini-roundabouts arranged around a sixth central, anti-clockwise roundabout. It is located near the County Ground, home of Swindon Town F.C. Its name comes from the popular children's television series The Magic Roundabout. In 2009 it was voted the fourth scariest junction in Britain, in a poll by Britannia Rescue. History The roundabout was constructed according to the design of Frank Blackmore, of the British Transport and Road Research Laboratory, under the control of Highways engineer Jeff Maycock of...
o_O
 
lol
 
Because it's so nice, here another one before I go out of my browser for some hours:
> Thank you. can you please let me know how to do that? Any idea will help. thank you in advance Where could be the problem? If anyone has an idea on this matter, please enlighten me. I need to do this using PHP. Thanks in advance.. I am grateful to any help offered. Thanks a lot for your answers! Could someone help me sort this out? Any help you can provide will be greatly appreciated! Thanks, any comment/suggetions/insight greatly appreciated. Thanks for advice.
l8ters
 
@8ch8ch - Done what? Setup an OAuth identity service? I've fooled with OpenID and Shibboleth. You might take a look at SAML and OASIS too. Shibboleth is federated identify across systems, where my university logs in users from Harvard to our system without them ever having to login to our site. It's all between servers. That's probably not relevant to you here.
 
@JaredFarrish interesting. but i think oauth is the best way to go for my scenario.
 
@8ch8ch Not so much github but it should be helpful: oauth.googlecode.com/svn
@8ch8ch If the service is getting really popular at some time please consider adding some code: github.com/PeeHaa/PHPoAuthLib :D
 
7:17 PM
@PeeHaa awesome! thanks!!
 
@8ch8ch - It's whatever. There's lots o stuff out there. Just keep the phrase defense in depth in your mind. You really have to be holistic and treat the entire picture, not just how you send passwords across the wire. Here's a Sans PDF of this issue, if you're interested: sans.org/reading_room/whitepapers/infosec/…
 
cool thanks
 
I want to give a full answer, but I'm not really feeling like typing a lot :(
0
Q: How to use an instance of a class assigned to a property of another class in the other class in php

RasterilI am making a framework in PHP. I have an import function in library/core.php. I can use the function like this: $core->import("someclass"); This is the function: public function import() { $import_resources = func_get_args(); $check_directories = array("library", "t...

 
always confused the parameter ordering of array_filter and array_map.
 
Basically it would simply say: FUBAR
 
7:23 PM
@hakre - What was the PATTERNS comment on that edit about?
 
@shiplu.mokadd.im yep PHP is an idiot
But it kinda makes sense if you know what arguments they take
 
@NikiC: any clue why APC cuts 90% off of memory usage for cached pages? I'm seeing a drop from 3.6mb to 360kb peak memory usage from just parsing files...
 
@PeeHaa I know what arguments they take, But the order is not consistent.
One takes callback as first argument another takes it as second argument.
 
@shiplu.mokadd.im I remember it as. callback is always the last argument unless it takes any number of parameters. In that case the callback has to be the first argument
 
Oh god. PHP's function arguments order aren't consistent at all; they just seemed to take on the form of wherever the function came from, I guess.
 
7:27 PM
@JaredFarrish If you remember string vs array function order you should get pretty far
Not saying I don't agree with the fact it is somewhat fucked up though :)
 
The people who manage the manual either must think they've got a lot of new users, or they don't realize how hard it is to remember which way is which ever other or whatnot.
 
@JaredFarrish Why?
What's wrong with the manual?
 
And that all of the users are people who just can't remember. I do it all the time, easier just to look it up real quick in that case.
What's wrong the with manual? Nothing except what we're bitching about.
 
@PeeHaa This rule makes sense. Is there any doc where can I find other rules?
 
3 mins ago, by PeeHaa
@JaredFarrish If you remember string vs array function order you should get pretty far
 
7:32 PM
Man, I've been doing PHP for ten years. I blame it for my poor memory and lack of credible intellisense at work. At least I can remember the functions, right?
 
@shiplu.mokadd.im E.g. string functions are haystack, needle and array functions are needle, haystack
 
Is it str_pad, or strpad?
 
@PeeHaa thanks. Thats a great rule.
 
@JaredFarrish That shit and other shit just like that is utterly fucked up imho
 
can you map a oneToOne relationship where targetEntity: \Some\Parent\Class then make the actual related object an instance of a child class?
 
7:34 PM
I remember the order for explode. Hey. is split backwards from it though. Ahh, who cares.
 
@JaredFarrish I am also working since PHP 3.0. For things like that I have to lookup manual often.
 
@shiplu.mokadd.im I'm pretty sure everybody does :)
 
@JaredFarrish split has the same order as explode, but is deprecated because it supports the weird posix regexes
 
@shiplu.mokadd.im - Yeah, my aunt had a PHP 3 book I remember. First I had was the wine store OReilly book and then Rasmus' Programming PHP book.
Have ya'll read the hilarious nerd tweek out that some Python programmer had on his blog? He, uh, hates PHP. About 15k words worth of frothing at the mouth hate. It was funny, but true. PHP is the plumbers solution. Whatever works.
 
idea being so that i could use something like @peehaa 's oauth library and then have a table for user tokens
 
7:39 PM
@JaredFarrish Wut?!?!?!??! Somebody hates PHP. No! Way!
You're talking about the fractal of shitty design post?
 
Let me see, I bookmarked it.
 
@PeeHaa there are a lot of people who hates PHP. But I think they are generic basher who hates everything that they dont work on
 
His post on eval was pretty good, I gotta say.
 
@shiplu.mokadd.im Often they would have at least some valid points. It's only most a those points were valid years ago :)
 
with oneToOne: service: targetEntity: \OAuth\OAuth2\Service\AbstractService ... and manyToOne: user: targetEntity: User ...
 
7:42 PM
Here's the eval one, On Principle. Same guy. me.veekun.com/blog/2012/03/24/on-principle
 
or is there perhaps a better design pattern to achieve the desired result of storing multiple oAuth tokens for a single user that reference the providing service?
 
Hilarious. He has one blog entry tagged PHP. Gee, why even bother. me.veekun.com/blog/tags/php
 
it's 2012, and people are still writing new PHP code? omg! everybody should use mongodb with javascript!!!
 
It's uber webscale!
 
@igorw what is mongodb? I love JS.
I dont understand why people try to find regex solution wasting a lot of time.
while this can be done with string functions.
 
7:54 PM
@shiplu.mokadd.im "There are only two kinds of programming languages: those people always bitch about and those nobody uses." -- Bjarne Stroustrup
 
I... Just... Don't... Know... How... To... React... To... This... Kind... Of... (*^*&^&%
@PeeHaa: Initialy, there was only javascript tag on this question. And definitively no. jQuery is no Javascript. jQuery is a higher level language based on Javascript, but it's no javascript. — F. Hauri 6 mins ago
There just has got to be a badge for that comment
 
@PeeHaa ping
 
@peehaa why don't you have a setter for the scopes in the AbstractService class?
 
@philip Yo!
 
What's the state of the basic php tutorial?
 
7:57 PM
On my list to finish this year
 
bad
 
we're talking about launching the "new" php.net site and considering the large [Begin Tutorial] button, it feels critical to me
 
Yep. /me agrees.
 
what's the link?
 
@PeeHaa is there a reason that it would be bad to use a setter for the scopes?
 
7:58 PM
sorry, i'm feeling lazy :)
 
@philip i would recommend getting book "Beginning PHP 5.3" as tentative first step.
 
The biggest lesson I learnt in 2012 is that communication is hard. All technical issues/challenges just do not compare.
 
i'm not sure what you mean teresko
 
@LeviMorrison It'll take some time getting used to the new site, but it looks really good. One thing though, on 1280x1024 the manual looks cramped, not to think about lower resolutions.
 
@philip github.com/PeeHaa/php-net-tutorial But there is moar in my local repo
@dyelawn What would be the point of a setter?
 
7:59 PM
@Jasper Yeah, have plans to fix that.
 
What is the ETA of the launch @LeviMorrison @philip?
 

« first day (804 days earlier)      last day (4135 days later) »