« first day (727 days earlier)      last day (4212 days later) » 

user50049
2:15 AM
@DaveRandom What's a 'womble' ?
 
@TimPost ....a DVD editor, apparently: womble.com
 
2:27 AM
@TimPost Deciphering British speak
 
user50049
3:10 AM
@Lusitanian I have a poster with common translations I plan to put up when we move into our new condo. Unfortunately, I could not find one (poster sized) that contains common vulgar insults.
 
4:55 AM
Good Morning Every one
 
user50049
5:33 AM
Why on earth would a company offer an API that only supports GET?
 
@TimPost background info?
Maybe their API doesn't allow users to mutate state?
 
user50049
@Lusitanian Enom. Calls to purchase, get, delete, everything are GET based.
 
user50049
or even modify
 
-_____________________________________-
The first rule of HTTP is that GET doesn't mutate state
 
user50049
If I want to update nameserver for a domain? GET nameservers?domain=foo.com&ns1=ns1.foo.com&ns2=... ...
 
5:41 AM
LOL
that's rich
 
user1125394
the payload size is limitated for GET ( the url length), 350 chars I think
 
user50049
If I want to register a domain? Oh my .. have a look
 
user50049
Yep, one BIG ass GET request
 
user50049
It's actually 4k @cyril for most modern webservers, I believe
 
Maximum length of URL is 2083 chars @cyril, but that's just on the client side
 
user50049
5:45 AM
2k, sorry
 
user1125394
ok
 
Nah, you could be right -- I'm speaking from experience with IE/FF
 
user1125394
I got this error once
 
Back in the day when I was 9 years old and thought GET was amazing because you could see variables in the URL
 
user50049
Yeah, I am pretty sure it's 4k
 
user1125394
5:45 AM
too large url 403 or sometyhing
 
46
Q: maximum length of HTTP GET request?

Mark HarrisonWhat's the maximum length of an HTTP GET request? Is there a response error defined that the server can/should return if it receives a GET request exceeds this length? update: as indicated in the tags, this is in the context of a web service API, although it's interesting to see the browser lim...

@TimPost according to this, 8192
 
user50049
REST .. it doesn't mean throw an API together between lunch(es), people.
 
And looking at that paste you sent
holy crap
nice tony the pony
 
user50049
@Lusitanian Older versions of Apatchy will break at over 4k I believe
 
user50049
I think there was even a CVE regarding that
 
user50049
5:47 AM
you could inject roge code at the end of a very big request and it would run or something
 
user50049
@Lusitanian You have no idea how much array juggling and flattening went into making that call actually work
 
I don't understand why Apache is so damn popular
What redeeming values does it have over NGinx, LighTPD or even IIS that makes it worth dealing with fubar config files and the worst security of any of the major web servers -- and crappy performance?
 
user50049
@Lusitanian Longevity I suppose. It's been around for a long time, and for a while (unless you used TUX) it was the only option
 
user1125394
@TimPost are u sure it was not POST only rather lol
 
user1125394
5:49 AM
without any GET it's hard too
 
@TimPost Reasonable...but it's just so much easier to get a performant, secure nginx configuration than Apache
 
user1125394
you can't see a page
 
Granted, this is coming from someone who is very far from being a sysadmin...
 
user50049
We typically substitute litespeed for apache on shared / managed servers, and use nginx for task specific things. It works out well, because litespeed 'just works' as a replacement
 
That's not FLOSS ):
Do you guys do managed cloud hosting in addition to the shared stuff?
 
user50049
5:53 AM
@Lusitanian Tell it to my dentist while our sites stay up :)
 
hehe
 
user50049
@Lusitanian Yeah. The offerings are not yet on the site, but we do. My current project is building out the entire user portal where such stuff is managed
 
I ask because I'm in the research phase for hosting of a project I'm launching
One of my thoughts was doing a semi-managed solution like scalr
 
user1125394
Twitter have not engineers, neither programmers, they have "scientists"
 
user50049
Which is fun .. it means talking to 10 different things using 10 different API's (accounting, cpanel, onapp, enom, etc, etc) .. normalizing that, storing locally what we need, caching sensibly to avoid 20 api calls to render a page, etc.
 
user50049
5:55 AM
next I have to tie it in to cacti and nagios
 
Written in PHP?
 
user50049
yep
 
codeigniter? don't say yes ):
 
user50049
@Lusitanian Had to, was a requirement
 
sadface.
Do you have your own datacenter?
 
user50049
5:57 AM
@Lusitanian It was either that or watch people go at it without using classes, much less anything resembling mvc. CI is not the greatest, but it's better than what would have happened.
 
Yeah we already had this conversation -- just wasn't sure if it was the same project.
I get yelled at in here for saying that I like Symfony --- but if you get assigned another project try convincing them to use it. Much cleaner when used properly.
 
user50049
@Lusitanian We have several colocations, 3 - 5 racks in a few different data centers in Vancouver as well as the US
 
Nice
 
user50049
@Lusitanian We're closing down the US locations over time though, they just weren't popular. People want Peer1 Vancouver
 
Interesting.
 
@shiplu.mokadd.im done.
@TimPost I've always been partial to linode for situations where a fast, reliable and somewhat cheap VPS is a requirement
My problem is that I think AWS is an absolute nightmare to manage, especially configuring their elastic load balancers, etc
Hence why I'm now looking for a managed service that pins all the annoying work on someone else --- but isn't quite as expensive as the PaAS solutions
 
user50049
6:16 AM
@Lusitanian Generally you're fine to develop on a VM, or even in a specially configured shared setting. After that things like HAProxy, Gluster, Varnish, etc, etc can be put in place for you. You'd be amazed what a few 1.5 GB properly configured VMs can do behind HAProxy, which would be a total of 4 virtual machines (basically the cost of one higher end dedicated box, but fully managed)
 
@TimPost Yeah of what you just said I know what "Varnish" and "1.5 GB properly configured VMs" means
:)
 
user50049
HAProxy is the load balancer stack overflow uses
 
ah
gotcha
 
user50049
Traffic would go to a smaller HAProxy VM, which in turn distributes it to 2 - 3 application VMs
 
interesting
 
user50049
6:18 AM
And possibly one static server VM for static content, running a very light configuration of nginx / lighttpd
 
and of course, the inevitable non-technical person's demand of "it needs to scale fast omg" is satisfied since it's vm based ;)
gluster looks interesting
 
user50049
@Lusitanian Yeah. You just make a snapshot of one of the application VMs, boot it, and tell HAProxy about it
 
yup
that's sensible
Do you scale databases too?
Or are you a webserver only guy
 
user50049
@Lusitanian I've built a lot of private clouds that function as such on top of the basic Xen hypervisor, with most of that fully automated
 
nice
remind me to hire you
 
user50049
6:20 AM
@Lusitanian You'd probably start off with two smaller MySQL (or whatever) VMs in a Master -> Master cluster. If you had to scale that, you could just add some slaves in the mix. Same with redis if you used it, depending on what kind of sharding you have to do
 
Read-scaling MySQL is dead simple from my very limited experience
 
user50049
You could also let each app server double as a DB node and increase the memory a bit. So each node you add automatically scales http and db at the same time
 
I've used postgres for a while
 
user50049
@Lusitanian Yeah. If it's just read scaling, it's not an issue. MySQL can also operate behind a reverse proxy (actually, any DB can)
 
Indeed
My totally untested solution for write-scaling would be to avoid sharding as much as possible
and send the frequent writes to redis or memcache
 
user50049
6:22 AM
So you could M->M->M->... .... ... infinitely in the simplest sense
 
user50049
How big are the typical writes?
 
then flush the cache during periods of least-activity
for this particular application the majority of them will be tiny and depending on its success, very frequent
i'm going to check size, one second
 
Does anyone know how MSN,Yahoo bots are written? I mean is there any library without libpurple?
 
user1125394
plz, what kind of reverse proxy are the most used, (have tried socketo.me recently)
 
@TimPost 28 bytes for some as they're essentially standardized, non-detailed log entries
Then the far-less frequent writes are much larger but so infrequent that i'm not concerned at all
 
user50049
6:26 AM
@cyril A bunch. HAProxy handles just about anything you'd need though. There's also pound, crossroads, and others
 
user50049
So you're looking at 28 bytes * 960 - 1024 per second?
 
user1125394
@TimPost in what languages mostly?
 
user1125394
socketo is php
 
user50049
Or for safety sake, figure 56 bytes.
 
@TimPost halve that. let's say 500 per second
this is a total guess and likely going to be revised
 
user50049
6:28 AM
@cyril C/C++ - these run as daemons on a separate server
 
but i'm trying to get a sense of what will work
 
user50049
@Lusitanian Roughly, to start, 1 HAProxy node, 2 app nodes and one MySQL node to begin, put redis on one of them or let it have it's own node too.
 
that little in terms of virtualization? wow
 
user50049
Then scale out from there. Gluster can keep your webroot in sync just fine.
 
hmm
very interesting
 
user50049
6:29 AM
then add either more DB servers, or memory to existing ones as you need it
 
user50049
With the writes you describe, I don't see a need for a DB cluster right away
 
user50049
You can also get a dedicated mid range server for DB stuff and run it on bare metal .. just minimal debian + your RDBMS of choice.
 
1 HAProxy VM + 1 PostgreSQL VM + 1 Redis VM + 2 NGinx/PHP-FPM + 1 varnish?
 
user50049
@Lusitanian That would get you going. DNS would be on your host's nameservers
 
Initially, presumably.
 
user50049
6:31 AM
You might want a small static server vm too, depending on your content. If the static stuff is just js / css and a few design elements probably not worth it
 
user1125394
does it make sense to move all your php mvc architecture thas is on a per-request apache server, to a persistent process proxy server, (let's say socketo so the language is the same)
 
No, the main focus of this is static content, actually.
For that I was just planning S3 with cloudfront in front of it
 
user50049
Then you may want a small static server for that, also synced to your webroot via gluster
 
user1125394
or the reverse proxy should just be a complement to your mvc
 
Streaming videos + lots of pictures + an entire frontend app written in javascript
 
user50049
6:32 AM
Disclaimer: I used to work for Gluster as an outside contractor
 
hehe
It's alright
Anyway, I'm not the only one who's going to decide on the architecture but this has been very informative --- I appreciate it!
 
user50049
@Lusitanian No problem, I like helping people design stuff
 
I'm a helpless noob when it comes to this type of thing --- never really had the time to learn it despite its importance.
 
user50049
I learned through more error than trial. The web hosting industry is very interesting .. clients don't care why their site goes down or slows down, they just want you to fix it. That's what initially got me into clusters (OpenSSI / Mosix / Kerrighed), then into Xen .. which then became this whole 'cloud' thing.
 
'Cloud' is the greatest buzzword since the invention of buzzwords.
 
user50049
6:36 AM
I loved the XKCD 'cloud storage' comic
 
There's planned downtime every night when we turn on the Roomba and it runs over the cord.
2
that one?
 
user50049
Nope
 
oh --- i love that one
oh the latest one?
where he's literally storing clouds?
 
user50049
 
yeah
@TimPost So I'm assuming you'd suggest that I buy the VMs from your company? :P
 
user50049
6:39 AM
@Lusitanian I wouldn't suggest that you don't lol, but it would depend on where in the world you expect your traffic from.
 
Northern USA to start
eventually entire USA
 
What does this mean?
[12-Oct-2012 06:39:06 UTC] PHP Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in /Applications/MAMP/htdocs/DWS/Public/inc/php/functions.inc.php on line 20
 
not international for a while
@W3Geek literally what it says
it expects the first parameter to be an instance of mysqli
and you gave it null
 
user50049
@W3Geek Connection dropped or was never established
 
I defined mysqli connection in database.inc.php and required it into functions.inc.php
The require is above all code.
 
user50049
6:41 AM
@W3Geek You only get a returned object if the connection worked
 
user50049
did the connection work?
 
why are you using the procedural api anyway
 
Its at the beginning of the code. Yes, the connection worked.
 
user50049
^^^^^^^^^^^^^^^^^^^^^^^
 
$con = mysqli_connect(DB_HOST, DB_USER, DB_PASS);

if (!$con) {
include("mysqlError.inc.php");
die();
}

#Step 2 : Select Database
$db = mysqli_select_db($con, DB_NAME);

if (!$db) {
include("mysqlError.inc.php");
die();
}
 
6:42 AM
Please don't use die if you ever want testable code
 
thats the connection code... I require it to the functions.inc.php code.
 
user50049
I think he's more worried about getting it to work at this point, @Lusitanian
 
require_once("database.inc.php");

    # DECLARE GLOBAL VARIABLES (accessible to all modules)

    $userIP = $_SERVER["REMOTE_ADDR"];

    # DECLARE GLOBAL FUNCTIONS (accessible to all modules)

    function checkUser($email, $password) {
        if ($email == "" || $password == "") {
            return; // if email or password is empty return from function
        }

        // To protect against MySQL injection.
        $email = stripslashes($email);
        $password = stripslashes($password);
 
@TimPost I know, it's the auto-horror I get from seeing a call to die or exit
 
Good morning
 
6:42 AM
How do you format code on here?
 
@ircmaxell morning
@W3Geek select all, ctrl+k
 
@ircmaxell hi hi
 
how is everything going?
 
@W3Geek it's null because you're not explicitly declaring the connection as a global variable
which is really bad practice and you should actually be injecting the resource into the function but
global $con; at the beginning of checkUser would fix it.............just
 
user50049
59 mins ago, by Tim Post
If I want to register a domain? Oh my .. have a look
 
6:44 AM
don't.
 
user50049
Seems I found a use for that scotch after all, @ircmaxell
 
what would be the best way to get around this?
 
user50049
Yep, that's one big GET request :)
 
Well, you really should re-architect your application :P
 
Oh yeah?
 
6:44 AM
I'd use OOP for everything because I like silver bullets
but if you want to do it procedurally with that API
 
I'm planning to. :P Using MySQLi...
 
then just inject the connection as a parameter to checkuser
 
what's that @TimPost
 
user50049
@W3Geek The easiest fix is take what you have, put it into a class and define a class variable to hold the connection object
 
6:46 AM
Or, to say it in less words: encapsulate what you have into an object
 
Mornng peeps, what's the happy haps
 
user50049
Or, just .. don't use the procedural API, just use PDO
 
15 words vs 7
 
I don't really wanna use objects since this is going to be a small website to start off... but I will convert it over to OOP in the future.
 
mysqli has an object-oriented api
 
user50049
6:46 AM
@Lusitanian Word golf? Seriously?
 
@TimPost look, it's 3am and i'm bored
 
I know, I plan on using that in the future.
 
Then why not now?
 
user50049
@W3Geek The future is here.
 
user50049
HA! FOUR WORDS. TIE!
 
6:47 AM
@DaveRandom how goes it?
@TimPost aww :(
 
Because :P I just want to write it thy standard way and upgrade it slowly.
 
user50049
 
Your poor desk...
 
I don't want to use bad practice... I just want to know how to write code different ways.
 
This already is bad practice, though.
 
6:48 AM
But it wouldn't have been considered bad practice 2-3 years ago... would it?
 
Yes it would have.
 
What about 5-6?
 
Yup -- though I probably wrote code like that 6 years ago ):
 
user50049
@W3Geek Classes are much easier to test and maintain over time. Be kind to your future self :) And seriously, now is as good a time as any to just get used to PDO, your future self will want to travel back in time and cuddle with you if you learn how to use it :)
 
everytime i go to my SO profile and see this answer i laugh
65
A: Why does 1234 == '1234 test' evaluate to true?

LusitanianIn PHP (and JavaScript -- which has slightly different behavior), the comparison operator == works differently than it does in strongly-typed languages like C or Java. The === operator has the behavior that you most likely expect. Below is a breakdown of the two comparison operators as they apply...

 
6:49 AM
@Lusitanian Small crying child who is refusing to go back to sleep is how it currently goes.
 
I've only been writing code for 6 years now. xD
 
@DaveRandom are you talking about me or your baby?
 
@Lusitanian lol, my baby! Why, are you crying?
 
@DaveRandom nah that was a bad joke that was context-sensitive because i mentioned me six years ago with a little sad face
 
So I know I'm going to get killed... but what would be the best way without using objects?
 
6:52 AM
@W3Geek pass around your mysqli resource to functions
 
user50049
@Lusitanian I did a major facepalm when I learned that PHP implicitly cast like that. What you see are the results of the underlying call to C strtol() discarding the garbage after the integer.
 
That sounds good. Pass it through parameters. Thank you @Lusitanian
Global sucks.
 
@TimPost lololol
 
user50049
However, test1234 should not evaluate to true when compared for equality with 1234
 
Of course not, but it does. That's the PHP slogan, by the way.
PHP: "Of course it shouldn't......but it does, so screw it."
 
user50049
6:53 AM
or viceversa, as strings that begin as strings should never be cast as integers
 
Why shouldn't you use die() by the way?
 
user50049
wait, oh lord, it does work
 
lol php bashing in php room :P
 
user50049
 
@TimPost Well I don't find that quite as ridiculous as the fact that '0' == 0 and '' == 0 but '0' != ''
 
6:54 AM
I thought it just kills the script?
 
@TimPost i know it does work but it shouldn't
@W3Geek exactly. therefore it makes your code untestable
 
@itachi We do that all day every day.
 
@DaveRandom yeah that just drives me nuts
 
Oh I see what you mean.
 
PHP: "Yeah, == shouldn't.......really exist.....but it does, so let's confuse people into using it!"
 
user50049
6:55 AM
I think PHP is most often quoted, and fond of saying "I know you are but what am I?" than pee wee himself.
 
@DaveRandom oh cont then....
 
PHP: "So uh...how are closures actually supposed to work?"
 
Off-Topic: Has anyone played this game? called slender?
 
user50049
@Lusitanian Closures are pretty nice in 5.4
 
Yeah they are --- lemme find my weird demonstration of that i made when i was bored the other night
 
6:56 AM
Fucking creepy man
 
user50049
I love anonymous sorting callbacks that can use $this. Makes ape happy.
 
user1125394
@TimPost there should be a merge question tool
 
@TimPost actually it should be this viperpad.com/nlExJ7
note the Closure::bindTo call
 
user1125394
instead of the closed as duplicate
 
6:59 AM
@Lusitanian Yeh that seriously pisses me off. Until you can do $object->property = function () {} I will not be happy, and I am not an enormous fan of declaring every inherited variable at define time, even though there's nothing inherently wrong with it.
 
@DaveRandom it works perfectly with that awesome base class i wrote!!!!!!1
no idea why i left removeMethod public
 
@Lusitanian Yeh, sure, cos I want to do that every time :-P
 
@DaveRandom exactly!!!!!!!!!
imagine showing off code to your boss
"why does everything say 'extends Object'?!?!?!?"
because some kid in chat.so/php told me it was a good idea
 
Right I gotta get to work
 
enjoy
see ya later
i gotta get to bed, actually
 
7:02 AM
@Lusitanian Nighty night
Laterx all
 
laterx?
anyway night all
 
You heard... That was obviously intended. I never make typos. ever
 
i know, that's because you share my first name...
and i don't make typos
it rubs off --- unless "Dave" is not your actual name
based on your website's address, it isn't
therefore you do make typos
what the hell the above 5 messages are a clear sign i need to get off of the internet
 
user50049
$this->summary->invalidateTicketCounterCacheOnlyIfItsWednesday() WTF?! WTFF?! AAAAAAAAAAAAAAAAAAAAAAAAgggggggggggggggggggggggggggggghhhhh!!!
 
user50049
I am not planning on being sober for very much longer today.
 
user1125394
7:12 AM
it's more interesting to have a reverse proxy with websockets no? you can have more possibilities
 
hai all
 
I am off to Turin, later all
 
morning
@ircmaxell Turin sounds great, have a good trip.
 
7:29 AM
@TimPost that aint that bad
 
user50049
@Gordon It should be called any time a ticket is created or changes state, so counters refresh against a new call.
 
user50049
not just recycled once a week. Le sigh.
 
@TimPost well, i dont know about that, but name-wise it's nice. though the wednesday part should like go since wednesday is configuration. what if they decided to make that tuesday
 
user50049
@Gordon Oh no, I wasn't complaining about the naming :)
 
user50049
It's my fault. I often contract out small parts of stuff because I don't have time to do it all .. should have been watching closer.
 
user50049
7:32 AM
but yay, I just fixed several bugs at once.
 
No language specified, but can I have a for this stackoverflow.com/questions/12821445/…
 
user50049
7:58 AM
@Gordon Well, this just went in a cron job I made: if ($its->fridayInIceland()) { // kick off auto renewals
 
@TimPost if ($i->canHaz('cheezburger')) { /* Do something more productive */ }
 
user50049
@DaveRandom $its->timeForTheChaosMonkeyToStrike() < Very handy for testing
 
@TimPost if ($its->allGoingSuspiciouslyWell()) { $app->breakSomething(); }
I love the idea of an assertion helper object called $its. Do you actually do that?
 
user50049
@DaveRandom Yep. I wrote it for juggling around stuff in cron jobs, but have been expanding it a bit to do other fun things.
 
I also like it when I have cause to name a variable $hit, because I am that childish.
 
user50049
8:18 AM
$stop->hammerTime()
 
Although I have yet to do private $parts;
 
user50049
@DaveRandom I'm pretty sure I could make use of private parts in my its class
 
user50049
Hold your flags, I said its
 
I have used public $display;
 
user50049
@vascowhite That's common though, to feed data to a view
 
user1125394
8:20 AM
double pen;
 
true
 
@TimPost @Gordon brought it up the other day, I also like the idea of private long $parts; in a strongly typed language
 
user50049
@DaveRandom Why not go with long long if you going to go that route?
 
if ($appContextMainlineBaseKernel->roomForOptimizationNeeded()) { sleep(1); }
 
@TimPost Because I don't have that much of an inflated opinion of myself :-P
 
user50049
8:21 AM
Plus, your ... member .. would be deprecated in some languages
 
user50049
Nobody wants a deprecated member.
 
user50049
Yep, $its->fridayInIceland() alright (it actually is, as of 8 hours ago)
 
@hakre Genius. Then when the client asks you to make it faster, you can delete that line and go to Barbados for three weeks on the extra money they're giving you to do it.
 
@DaveRandom Yes, the way to go. But you can not do that with PHP that easily because you should at least compile the code before it ships to the client so it's not that obvious.
Or you do it for webservices.
In the new version we could improve the speed for requests by 500%. Yay!
 
Right I have concluded that PHPExcel is probably quite good. However, I can't be certain of this, because the documentation is worse than MSDN.
 
user1125394
8:38 AM
why writing new \StdClass; instead of new StdClass;
 
@cyril Presumably because the place where you find that line is not in the global namespace. Either that or whoever wrote it is just in the habit of using namespaces.
 
user1125394
ah right namespace, have to learn that ;)
 
php.net/manual/en/… - there is a FAQ for the topic, quite useful
 
user1125394
thx
 

« first day (727 days earlier)      last day (4212 days later) »