« first day (812 days earlier)      last day (4119 days later) » 

3:00 PM
@Baba Yo yo
 
user1125394
@igorw eval.in/6000 there are more than one tail call, is it still a case of tail recursions
 
Morning all
 
I agree though, commonly you would actually return a value from the recursion as opposed to mutation.
@cyril one could argue that the final iteration of the foreach is a tail call
 
Good morning @PeeHaa
 
Hiya!
 
user1125394
3:04 PM
ideone.com/h1Mytg holly this site is running php 5.2
 
I now reported my problem with var_dump and DOMNode: bugs.php.net/bug.php?id=63910 - I also left some note that the older bug can be closed.
 
@cyril that's not very useful though, because if PHP had TCO (which it doesn't) it would only optimize away the last iteration.
so you save almost nothing
 
3:28 PM
I've suggested as a tag synonym: stackoverflow.com/tags/php/synonyms
 
Evening guys!
 
Anyone knows any good solution on how to convert XML to array?
 
hi guys im in a bit of a pinch here.i have three select dropdown and i am trying to store the selected values into variables to send them through the url. here's a lil bit of the code:
 
@LilzVotcaLove edit message -> ctrl+k
 
ok
ive done the ctrl-k thing but it says the message is too old to be edited
 
1 message moved to recycle bin
 
Hi
 
@LilzVotcaLove You can try again :)
 
3:47 PM
Do you guys like MVC?
 
@Jeffrey hiya
 
@PeeHaa alright
 
Oh boy.
global is never the answer.
1
A: How to create a global configuration file in php

Eugen Rieckdefine() is quite a good way of doing things. An alternative is to define a global array. such as $config['display_ad']=true; $config['something_else']='a value'; //... function doSomething() { global $config; if ($config['display_ad']) echo 'Ad code goes here'; } The latter way is what ...

 
@Jeffrey I don't want to make love with it, but for solving some structuring problems it is pretty useful yeah
 
<form method="get" >
    <label class="fsize3">Choose a business plan:</label>&nbsp&nbsp&nbsp&nbsp
    <select name="busislctd">
    <option>SELECT</option>
    <option>B$1000[49]</option>
    <option>B$Star[25]</option>
    <option>B$100000[99]</option>
    <option>B$fly</option>
    </select><br/><br/>
    <label class="fsize3">Choose a price range:</label>&nbsp&nbsp&nbsp&nbsp
    <select name="pricerange">
    <option>SELECT</option>
    <option>50000rs to 100000rs</option>
    <option>100000rs to 150000rs</option>
 
3:48 PM
@PeeHaa, any serious alternatives? (serious = not RMR)
 
remove the ping and use fixed font @LilzVotcaLove
 
@PeeHaa i thik i got it now
 
@Bracketworks, oh God dat new array syntax []...
@Bracketworks, it's like a kick in the balls
 
@Jeffrey wut? why?
 
3:51 PM
@PeeHaa, it makes the understanding of what's the inner array so hard...
 
@Jeffrey rmr?
@Jeffrey indentation is key no matter what format you use :)
Ask the python guys :P
 
@PeeHaa, yeah rmr.
 
i'd like to store the selected values and send them through url.am using jquery load so that the page does not refresh
 
@Jeffrey seeing array( ... ) everywhere makes it hard to understand.
 
@Bracketworks, a matter of preferences I guess.
 
3:54 PM
@Jeffrey HTTP resource can be thought of as an object. If I read that correctly an URI is coupled to a single class
Basically RMR is what most frameworks call MVC :)
 
@PeeHaa It seems like MVC but taking the C granularity a step further.
 
@PeeHaa, the PUT DELETE GET and POST use in RMR is quite a good idea but not really applicable...
 
@Jeffrey Why not?
It's part of what makes it restful (god I hate that word)
 
@PeeHaa, the resource (MVC model) has to call the representation (MVC view) so that each view depends on the model called. This seems stupid, it should be viceversa otherwise a multi model view (view that deal with multiple type of data in the same page) would be impossible...
 
@Jeffrey Model is Layer
 
3:58 PM
@Gordon, so...?
 
@Jeffrey so a Resource is not an MVC Model, because there is just one Model Layer.
 
eveningz
 
Jo @tereško
 
evenings
 
did i miss anything entertaining ?
 
4:00 PM
@Jeffrey and you should never call the View from the Model because the Model is oblivious to the UI (C+V)
 
s/UI/presentation
 
@tereško whats the difference to you?
 
@Gordon, that's what I am saying. In the RMR the "model" calls the "view". It shouldn't happen...
@Gordon, return new Response(200, getRepresentation(request.url, resourceData));
 
@Gordon minor one .. imho, the view is responsible for UI creation/logic while controller deals with user activity/input .. as whole they comprise the presentation layer. It is possible to have several UIs that cause same form of user activity
 
@tereško interesting. I'd name it the other way round. To me, the C is an essential part of the UI because it accepts the User Input and the View is merely the graphical representation. So C and V together I call UI.
@Jeffrey IMO RMR is pointless. When you start to use terms like Resource, Method and Representation you are halfway en route to REST. So why not just do REST (including Hypermedia) then?
 
4:08 PM
"[...] a RESTful way, an alternative to the popular MVC model, a model I call RMR, or Resource-Method-Representation."
 
@Gordon, so what's REST in the web context?
 
@Jeffrey Richardson Maturity Level 3
 
REST is compatible with MVC pattern .. hell .. i think MVC ideas were are direct cause for development of REST concept
 
anything not level 3 is just Restful
and RMR is merely using HTTP vocabulary IMO
> So in an OO language, a HTTP resource can be thought of as an object with private member variables and a number of public methods that correspond to the standard HTTP methods.
that's just nonsense
IMO, a resource does not map 1:1 to something in the Model. It can, but there is reason it has to. A resource is something you expose via URIs and which you can interact with. But it's certainly not a Domain Object
 
4:14 PM
@Gordon Hmm, so OData (and supporting tech like WCF) got it right...
 
resources actually map closer to the interfaces of services
and only some methods of some services
 
@Gordon The way I view it is the Resource is a proxy to lower level service classes and buisness logic
 
morning
 
@ircmaxell yes. Something like that. But coupled to HTTP, while the stuff in the Model should be free of that implementation detail.
@Bracketworks i lack knowledge to agree or disagree on that statement
 
@Gordon exactly...
 
4:18 PM
REST is just an aspect of presentation layer
 
IMHO: the Resource takes the place of the controller in MVC...
 
@tereško yeah, one could probably say that. It just specified how you interact with the Model through HTTP
 
@Gordon M$ data services... I've had the pleasure of working with them for awhile now.
I just meant, got it right as per the Richardson model.
 
@ircmaxell not sure if it does. The responsibility of a Controller is pretty much defined as handling user input, while a Resource points to a specific Data Entity which you will never get hold of except for in it's various representations you get back when interacting with it.
 
4:23 PM
@Gordon The methods act on the resource
so you have $resource->get(), $resource->post(), etc
 
@ircmaxell I'd put the verbs on a Controller tbh
or maybe I'd not have them at all but just map them
from the Request object to an MVC Controller
Like when I know the Request was for DELETE example.com/Order/1234 I need to call DeleteOrderController::handle($request) which then calls DeleteOrderUseCase::run() or something
in that sense, the resource never manifests in code at all. It's just all in the URI and gets mapped
 
i tend to write controller's methods as : getDocument(), deleteUser(), putUser(), postComment() etc.
it makes for much fewer IFs in the controller's code
 
@igorw I wasn't suggesting that they exist purely for the memory save, I just said that if that were the case then we wouldn't need them
But I still fail to see what they are good for
To distinguish between strings and string identifiers this way
Seems like a rather arbitrary distinction to me
Which might be okay for Ruby, but not for PHP. After all we don't even have distinct array/dict types ^^
 
@tereško i dont see nothing wrong with that. I'd just map it so I dont have the HTTP semantics permeate through to my code
 
Would it make sense if traits were to implement interfaces, guaranteeing a full implementation for compilation?
 
4:33 PM
@Bracketworks yes. imo that's the only way they make sense
 
@Bracketworks I think that sentence stopped making sense somewhere around "traits" :)
 
@Gordon the downside that i see would be that you end up with a lot more controllers for the same view
 
@Bracketworks like outlined here: stackoverflow.com/questions/7892749/…
 
@Gordon that's the thing, RMR isn't supposed to be MVC... You have a front controller, but not a traditional MVC controller
 
@ircmaxell I wonder what RMR is supposed to be at all :) It's not MVC, nor is it particularly RESTful, let alone real REST, so what is it
 
4:34 PM
@igorw Another use for symbols I could see if the language's comparison operator compared strings by address, not by content. But that's not the case for neither Ruby nor PHP
 
@Gordon Yea, but one step further creating an implementation requirement on the trait.
 
@Bracketworks huh?
 
morning btw
 
interface ISomething {
    function foo();
    function bar();
}
trait TSomething implements ISomething {
    public function foo() { }
    // fails without bar()
}
 
mornings @NikiC
 
@Bracketworks ah I see. That will result in a fatal.
 
@Gordon Correct (I was just mocking up a fatal error for an edit ;))
Mixing traits and overriding/aliasing would still be possible, so long as all of the implementation requirements are met in the containing definition (trait, class)
The mixing class wouldn't automagically implement the interface.
 
@Gordon It's unfortunate how non-compliant so many compliance tools are.
Its like the IRS auditing you with the a 3-beaded abacus.
 
Is it just me, or is Stack Exchange in general utterly slow?
 
4:49 PM
It's you :)
Maybe you are on a crap CDN?
 
@MadaraUchiha same here. in fact, it doesn't load at all atm
 
@Gordon :|
Yeah, same
 
Never used this trait thing yet.
 
crap now it's slow for me too. Thanks guys
@shiplu.mokadd.im Which is often a good thing to say :)
 
works fast for me.
 
4:53 PM
@cryptic heh, so they are discriminating against male users obviously
 
@Gordon, so you like the REST pattern?
 
@Jeffrey when it's done properly, yes. But there is very little APIs I know that do Maturity Level 3
 
@Gordon, do you have any example of it?
 
I like SOAP over REST. wastes some bandwidth though
 
@Jeffrey for APIs not utilizing REST? Twitter comes to mind
 
4:58 PM
@Gordon, of code utilizing REST
 
@Jeffrey iirc Github has a Hypermedia API
 
@Jeffrey , why exactly you want to use REST ?
 
@tereško, I don't I just want to learn it
 
please, do not use technology for technology's sake
 
5:01 PM
I dont think REST is not standardized yet.
 
@tereško, wat?
 
Hello everyone, I have posted a virtual host related question on server fault, but I think people from stackoverflow might be able to help.
 
oh .. a canned server, i guess i will pass
 
@AnPel did you try test:80 on browser?
 
5:04 PM
@AnPel have you pinged test and verified it looks at the loopback address?
 
@AnPel for such task I use a automated script for ubuntu. a2makesite
 
How does one submit an RFC?
 
@shiplu.mokadd.im it takes me to test.com
 
@Bracketworks To where?
 
I'll stop this s***t. I drop it. I'm gonna play some C with CGI and everything will be fine.
 
5:06 PM
@PeeHaa PHP RFCs.
 
@PeeHaa yes, ping shows 127.0.0.1 and w3m shows the contents of the index.html in the test dir
 
user1125394
what is the "codevyper" script site again please?
 
@NikiC yea, not sure if it makes practical sense for PHP. introducing it at this point will probably only produce inconsistency. one place that comes to mind where it is used is for referencing method names. i.e. foo.send(:bar, args) which would be the same as call_user_func([$foo, 'bar'], $args). semantically I can see how it makes sense to separate, but it also sounds like the kind of thing people have flamethrower wars over.
 
@AnPel If you are telling me that when you type http://test (full address) in the addressbar and it takes you to test.com you should really uninstall that browser
 
user1125394
5:07 PM
@Gordon thx :)
 
@PeeHaa well its firefox, chrome says address not found
@PeeHaa Oops! Google Chrome could not find test to be exact
 
@Bracketworks I think you might need to have an account, but I;m not 100% sure about the process. PIng @Gordon, @NikiC @ircmaxell, @salathe for that (which I have just done) :)
@AnPel Are you using Apache?
 
There was site that allows to run same script on many versions of PHP. does anyone know what is it?
 
And is it the first vhost in the list?
 
@igorw Not like one couldn't do foo.send("bar", args) there... ^^
 
5:09 PM
@Bracketworks Two ways: get access to the wiki (ask on list for wiki karma) or get a "sponsor" to post it for you
 
@ircmaxell Thanks :)
 
@PeeHaa yes, apache, i just reinstalled ubuntu and installed lamp-server^ to install it all
@PeeHaa in what list?
 
@AnPel The list of vhosts
 
@igorw I have a serious issue understanding that feature. From where I'm standing it just looks like Ruby did a bad design decision in that they force programmers to do an optimization that the compiler could do by itself. But I guess that there is some deep reason to it that just isn't properly explained anywhere
 
If it is the first, you can try to access it by ip
 
5:12 PM
@PeeHaa you mean go for 127.0.0.1:80?
 
no need for the port because it is the default http port
 
@AnPel try curl --header "Host: test" http://127.0.0.1/ -i in command line
 
:7029095 anpel@anpel:~$ curl --header "Host: test" 127.0.0.1 -i
HTTP/1.1 200 OK
Date: Sat, 05 Jan 2013 17:16:06 GMT
Server: Apache/2.2.22 (Ubuntu)
Last-Modified: Sat, 05 Jan 2013 09:39:47 GMT
ETag: "3c0515-20-4d2876076106d"
Accept-Ranges: bytes
Content-Length: 32
Vary: Accept-Encoding
Content-Type: text/html
X-Pad: avoid browser bug

<html>
	please work ffs
</html>
 
@AnPel Is it your index.html content? the last 3 lines?
 
@shiplu.mokadd.im yes
 
5:19 PM
Then your Apache Virtual host settings are working.
Your system also recognizes it.
 
2
Q: Why do "Invalid Flag" flags get disputed?

Madara UchihaI know how it works, once a flag is issued, and an "Invalid Flag" flag gets issued against it, both flags get disputed, and do not affect flag weight. Why? What makes the "Invalid Flag" flag be different than any other flag? What's the reasoning behind this? From my perspective, what should hap...

 
@shiplu.mokadd.im where should I look next then?
 
@AnPel I think you have problem in browser. You should enter "http://test/" literally in address-bar. Not "test"
In modern browsers if you enter only "test" it starts to search for it. and "test.com" is the first thing to redirect
 
@shiplu.mokadd.im test in chrome outputs 'oops test was not found' and in firefox redirects me to test.com
 
@NikiC in ruby strings are mutable objects. as in: a = "foo"; b = a; b << "bar"; that will change both a and b. symbols are immutable, which makes a major difference for ruby.
 
5:27 PM
@igorw Just read that too
So in short, Ruby symbols are immutable, interned strings
 
yes
 
Amazing that they have mutable strings by default
That sounds like a really bad idea (tm)
 
but it's object oriented, it has to be mutable!!!1
 
why?
 
amended for sarcasm
:)
 
5:29 PM
ah i see "!!!1"
anyway, I didn't like Ruby much before, now I have more reasons not to like it :D
2
 
Damn it Stack Exchange is slow! Anything about a planned maintenance?
 
@MadaraUchiha Its quite fast in here. Even though we run the slowest Internet in the world!
My monthly plan is 1Mbps!!
 
@shiplu.mokadd.im I don't know, but sometimes it seems as if the connection hangs
Sometimes pages don't load at all, and sometimes even chat messages fail to deliver.
Like now
 
Hello guys
 
5:45 PM
only 17 away from 20k!
 
@Flexo: If you think it's a compiler bug, and you're not writing PHP, it probably isn't. — Tinctorius 7 mins ago
 
@NikiC imho, ruby it's not all that bad .. it's just that people who are usually using it are clueless ... and almost everyone is trying to write classical OO in it, whole ruby is much closer to prototypal language
 
Wow mantis is so shitty about input / output encoding. I wonder why those filthy devs are always paying such high compromises.
 
@shiplu.mokadd.im Congrats, you are now a slave for the !
 
@shiplu.mokadd.im see the "Backlog" link in the sidebar? Spend the leftover of your del-votes every day on that list.
 
Hi! I have 2 arrays:

$first = array('a' => '1', 'b' => '2');
$second = array('a' => '3', 'b' => '1');

is there a quick way of summing up the values of keys from both arrays? I want the output array like:

$all = ('a' => '4', 'b' => '3');
 
@PeeHaa Yeah, that's likely true
 
@ircmaxell PHPs while is buggy now?
:P
 
no, just the compiler in general isn't the sanest
 
6:15 PM
Ah right :)
 
/me is burning the CPU on his mac mini build server...
generating a large rainbow table (64 gb when it's done)
 
@ircmaxell table of what?
 
2mb generated so far :-X
 
What chars / algo / length?
 
6:17 PM
md5 1-7 95char (a-zA-Z0-9 + common symbols)
with a 71k chain length
 
@ircmaxell what for?
 
@Lusitanian my presentation at PHP benelux
 
6:22 PM
@ircmaxell Where is PHP benelux?
 
ow antwerp
That's only a 1 hour drive :)
 
Come!
 
uhhhhm € 160,00? wut?
 
6:26 PM
It's worth it ;-)
 
> * No more tickets available at the moment. However, some reserved tickets are not yet paid. They might become available again within 30 minutes.
But serious that's a hefty price :|
 
:-X
 
Looks like it'd cost be a solid $2k to even get to Belgium :)
 
@Lusitanian: where are you again?
 
6:29 PM
Ohio, you're in New Jersey, correct?
 
Yup
@Lusitanian: check out sunshine PHP (Miami), MidWestPHP (Minnesota)
or, we're debating throwing a small conf here in NYC some time (small)
 
Are you speaking at either?
NYC is driveable, could be interesting
 
I'm speaking at both ;-)
 
I see @igorw will also be speakign
 
yup!
 
6:37 PM
> Stan Lemon is the Software Architect at GiftCards.com the internet's number one online giftcard site. GiftCards.com is a PCI Level 1 LAMP shop where we literally print money, yes you read that right - we use PHP to print Visa and Mastercard gift cards in a high security facility every single day.
hmm interesting
 
@igorw: You should find a photo that represents you better for such events ;)
 
People use PHP for some reallY weird things
 
What's wrong with that one @hakre ?
 
for example, in certain areas of the EU, your license plate is read by PHP while driving
 
@ircmaxell They use PHP for that?!?
 
6:40 PM
Yup
 
reminds me of this
 
@ircmaxell Not here in NL :(
 
6:40 PM
I wonder what our traffic cameras/red light cameras here run
 
:D
 
@Lusitanian The view from above. - Igor is looking so nice, but that photo does not represent him well I'd say.
 
@dev-null-dweller that's the link I just posted ;-)
and yes, that really did happen...
or so I was told at least...
 
6:42 PM
@ircmaxell that is a wonderful sight
 
@dev-null-dweller lol.
 
yay, my new business cards should be here monday
and I'm starting to get worried I may be traveling too much again
 
3 trips in a 3.5 week span
 
@ircmaxell take care with long high altitude flights because of the radiation.
 
6:44 PM
1 to San Francisco for 2 days, 1 to Belgium for 5 days, and 1 to Miami for 4 days
 
are you having a talk in antwerp?
 
yup
 
but I'm excited about going out to Google's campus again...
 
@PeeHaa Will be @ FOSDEM '13 Brussels / 2 & 3 February 2013 - But probably I should do some holidays in Belgium in between?
@PeeHaa ah, now I understand how that works. If you buy conference only, you are forced to visit the M$ azure talk. Otherwise if you pay the 300 mark, you are free to choose a real tutorial ;)
 
6:48 PM
:)
@hakre I might go to to fosdem :)
 
@PeeHaa Ah cool. We then can meet there! :)
 
@hakre That would be cool
 
yey just 20 away from copy editor gold badge ..now
night .... guys ....
 
6:59 PM
@hakre yo...:) ty
 
7:11 PM
@hakre you don't like my face? :P
 
these are only real copy editor 1 2 3 4 5
6 7
 
7:27 PM
@yentup
The format of a length value (denoted by <length> in this specification) is a <number> (with or without a decimal point) immediately followed by a unit identifier (e.g., px, em, etc.). After a zero length, the unit identifier is optional.
 
@igorw I like it, but the photo could be better ;)
Just showing your beautiful face in the right light ;)
 
user1125394
@igorw looks like you're trying to stare at the sun
 
> Scaling PHP with HipHop Sara Golemon K.1.105 Sunday 10:00 10:50
 
:-D
 
7:54 PM
> What’s wrong with php? Ole Michaelis K.4.201 Saturday 13:00 13:25
 
8:15 PM
Evening
 
Evenings dave
 
i am out of delvotes =/
 
How are we all this fine afternoon/evening?
 
@DaveRandom Still annoyed by that damn cold :(
 
@PeeHaa Oh don't worry, it's probably just bird flu. I'm sure a few beers will sort you right out :-P
Do you have a cat?
 
8:29 PM
@DaveRandom he has a dog, you clearly don't follow the off-topic threads of this room enough
 
hehe :)
 
@Lusitanian And? Since when are dogs and cats mutually exclusive? :-P
 
Eh, since that's what they taught me.
 
You been watching MGM cartoons again?
 
But no I only have a dog :P
 
8:30 PM
@DaveRandom evidently
 
@DaveRandom Tried that yesterday and it made it only worse
Now trying something stronger
 
A medical professional told me once that if you have ever had a cat there is a very good chance that at some point when you thought you had a cold/the flu, you actually had a mild case of toxoplasmosis.
 
@Lusitanian whiskey :)
 
@PeeHaa Ahh, crack.
 
8:35 PM
:P
 
@DaveRandom He lives in the Netherlands, that's considered "normal." :)
 
lol
 
I love Futurama
 
When they announced they were bringing it back it was in the top 5 days of my life.
 
8:38 PM
Likewise, I made something like 11 phone calls to excited nerd friends
most of whom had already heard the news
 
Have you noticed that the Simpsons has got better since they did as well? I guess they got some of the writers back doing that as well
 
I only watch it sporadically so it's hard to tell -- I always intend to watch TV and then forget because I don't care enough (except in the case of Futurama)
 
I have it on in the background a lot. I probably shouldn't, I don't really absorb the shows and it reduces productivity somewhat
 
my problem is leaving basketball games on in the background
that gets distracting
 
8:54 PM
Grrr I hate the inconsistency of text/xml vs application/json, I write text/json a lot and it's not valid. For some reason I can't seem to retrain my fingers.
 
In that case, don't use XML at all ;)
 
I agree JSON is much better for 90% of the tasks people use XML for, but there are some cases where XML is better. It's much more expressive. Just most of the time you don't use that expressiveness. But stuff like entities defined on the DTD so you can let the client worry about resolving them (and alter what they resolve to without the client having to obtain the whole document again) is a really nice feature if you need it.
 

« first day (812 days earlier)      last day (4119 days later) »