« first day (430 days earlier)      last day (4523 days later) » 
00:00 - 17:0017:00 - 00:00

12:04 AM
@LeviMorrison: In the Proposal section, can you add to each change from what they change away? I read Exception all the way down so it's easy to loose sight ;)
 
@hakre I didn't quite understand that, could you rephrase it?
 
> SplObjectStorage should then be deprecated and eventually removed.
ouch. that would break some code.
 
@hakre Yes. That is the idea. Eventually removed is long-term, several versions out.
 
Rephrase example:
SplDoublyLinkedList:
Should throw an UnderflowException *instead of CurrentException* when you call bottom, peek, pop, shift, and top on an empty container.
@LeviMorrison You want me make to decide which of the two new ones I'd like to use?
While I'm currently fine with SplObjectStorage?
I don't know yet if any of the two new ones would make it for me, so it's hard to tell. If it would be only "change a name" in my extend clause, that'll be okay. But what if one of the two new ones won't match?
 
@hakre Yes. The simple fact is that if you mix map and set functionality within SplObjectStorage you do get crazy results sometimes. Having a Set and Map API would prevent that kind of error.
@hakre Let's say I'm using SplObjectStorage as a set. Creating a key using array syntax would be $set[$myClass]; That's the same syntax for a read, which could throw an exception. That is not ideal by any means. In order to use that syntax you have to do $set[$myClass] = null; That isn't ideal, either.
 
12:11 AM
@LeviMorrison I did not run into these crazy results you talk about. But I can see the point you want to differ between map and set.
I see something valid in your wish.
@LeviMorrison Isn't that a more general problem of ArrayAccess even?
 
@hakre Not really. The only reason it is a problem for SplObjectStorage is that to use it like a set you have to ignore values. What other array structure does that?
 
All values not in a set return NULL?
 
@hakre When you use SplObjectStorage as a set, you never use the actual value of the array, you only use the key. The key is the data, instead of the value. It should have been a flag in the developers' head when he implemented it.
 
Maybe I'm not getting the concept of what a set is properly. I would say a set is just a set of zero or more values.
Normally you can only tell if some value is part of a set or not.
So you can compare two sets which each other then.
 
@hakre A set is not ordered, and it does not contain duplicate values. Because of these properties, it is really fast to look up things.
 
12:17 AM
So a set won't need a key.
to access a value
well actually you can not tell if a specific value is a duplicate or not as a set is not ordered and a set only can tell if a value is in there or not - but not how often.
that would be a list
in a list you can tell how often a specific value is in there, zero or more.
 
@hakre Incorrect. See :
In computer science, a set is an abstract data structure that can store certain values, without any particular order, and no repeated values. It is a computer implementation of the mathematical concept of a finite set. Unlike most other collection types, rather than retrieving a specific element from a set, one typically tests a value for membership in a set. Some set data structures are designed for static or frozen sets that do not change after they are constructed. Static sets allow only query operations on their elements — such as checking whether a given value is in the set, or enume...
Here is one of my main objections to using SplObjectStorage as a set:
If I see the code `$objectStorage[$myClass] = null;`, it appears that I'm using it as a Map, not a Set.
I need to drive home, but I'll be back on later.
 
I'm away later.
 
hello all
 
whats the difference in phpmyadmin between primary and unique?
 
that are two different type of indexes/keys.
a unique key will be unique
a primary key can only exist once per table.
 
12:23 AM
so for instance....
 
nice 1 hakre ;)
 
primary key should be like the row identifier
 
ID is a good example of a column that is used as primary key.
 
unique would be something like username which you dont want duplicated
 
you have it in every row of your table.
 
12:24 AM
you can have many rows in a table with unique identifier
hello charles :)
 
so unique identifier isnt specific to a single row
 
@JMRboosties for example, yes. the database will prevent to change the data into a state where uniqueness is lost.
so the database protects your data because of that unique key.
 
wait it is
ok so if i dont want two usernames to be the same, i would say this field is unique
 
@JMRboosties yes, you can do so.
 
and if i want to declare a column as my row_id column it should be primary
but i cant do both on the same field huh, a unique primary? or does primary infer uniqueness
 
12:26 AM
@JMRboosties You should add one first column (best named ID) to each table as a primary key, of the INT/LONG family.
 
i was hoping to use a UUID actually
 
@JMRboosties primary keys must be unique by default. Otherwise your database won't work.
 
i figured as much just making sure
 
You need one row identifier to query all available data.
For the username and uniqueness: This depends.
 
ive worked with databases before but im just trying to really understand them more
i kind of just did it without thinking to be honest
 
12:28 AM
For example, you might want to allow users to share names for some reason.
More import than the username is the user ID.
 
right, in my case i dont want shared usernames, so i should put that unique label on them
nevertheless i feel a UUID is a good column to have
 
For what do you want to use UUID?
 
the primary id column
 
Well actually you can name it like you want.
 
yea i'll just name it id
or "santaclaus" or whatever i feel like
probably just id lol
 
12:30 AM
It's just common to name it id, often uppercase because it's that important. But that's all.
 
yea
 
12:43 AM
if you set a field to CURRENT_TIMESTAMP does it update every time the row is updated or just on creation?
 
updated every update
 
That's a field type, isn't it?
 
well the type is timestamp but the defualt val is CURRENT_TIMESTAMp
 
> CURRENT_TIMESTAMP and CURRENT_TIMESTAMP() are synonyms for NOW().
 
ugh
cant i just have a timestamp field without it autoupdating it
i want to do an account_created column that takes a timestamp once and never again
 
12:47 AM
of course you can
 
There are multiple options for TIMESTAMP fields, see dev.mysql.com/doc/refman/5.5/en/timestamp.html
 
hm, so
 
> **Auto-initialization only:**
> `col_name TIMESTAMP DEFAULT CURRENT_TIMESTAMP`
 
yea i think i got it
 
just don't use the on update clause when you create/edit that filed
 
12:52 AM
yea i found it
 
good night all
 
1:18 AM
Ahoy hoy
 
@ircmaxell howdy
 
sup?
 
We have had only one programmer working on our CodeIgniter project but starting today we will have two more joining us. I have never had dealt with something like this. What can I use so that its easier for everyone to collaborate?
 
a project management tool like Redmine, Leankit, etc
I've written code that violates google.com/patents/US5946647
which was just affirmed by court
 
1:39 AM
@ircmaxell Serious repercussions?
 
No, the patent was affirmed by court against HTC
 
These software patents are ridiculous...the only thing that worries me about getting into a development career
 
yeah, it's fubar
 
user557846
its the ITC nd the other courts that uphold the BS patents that are the problem, I dont blame the patent holders for having a go.
 
@Dagon If a rule isn't enforced it might as well not even be a rule. If the courts don't enforce the patent then there is no point in getting the patent. The courts are only enforcing the laws they've been entrusted to enforce, its the patent system itself that is flawed.
 
2:46 AM
Just got PHPUnit integrated with Netbeans. I have to say I really like the integration, much improvement over running off the command line.
If Netbeans didn't eventually start hogging memory like a chump it'd be a really great IDE.
 
I use phpunit both CLI and within the IDE. I must say that for quick test iterations I still prefer the CLI, even there is a wonderful PHPUnit integration in Eclipse. I have the feeling that shell is "more direct".
 
@hakre I still have to run the test suites on the CLI when I want code coverage...haven't figured out how to do that from within the IDE yet
 
bootstrap config file
 
3:07 AM
@CharlesSprayberry: Don't know for Netbeans, in Eclipse it's ticking a checkbox for CodeCoverage. You get the lines that are (not) covered highlighted in the editor. I could assumes that Netbeans offers something comparable.
 
@ircmaxell I'll have to look into the configuration file. Right now I'm still basking in the glory of actually feeling semi-confident about my small codebase
 
:-D
 
3:52 AM
Any Magento wizards in the room?
 
4:22 AM
@ircmaxell: Do you have a link to the PHPUnit improvement you have made for string comparisons?
 
5:18 AM
Hiii Good Morning to all
 
hello
 
@Urvisha Hello
 
 
1 hour later…
6:48 AM
morning guys, gals and everyone else
 
what a coincidence
I was about to sleep.
 
so what's everyone doing this close to Christmas?
 
@JohnP Working on PHP datastructures :)
 
well, something similar here as well. But I'm alternating that with eating cake batter :)
I'll be 'working' from home for the rest of the season
 
7:10 AM
Magento gave me long class names for Christmas :) Cobbweb_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Backend_Media
 
@JohnP Learning more Lisp.
 
@Cobby that is just nasty
 
7:35 AM
0
Q: Multi-insertion with foreach loop

Leon YeoAm doing a multiple insertion using foreach (there are two level of looping because each product may have many attribute). Have suggested to use stmt, but not sure how to do these. I know the way of retrieving data from form.And i need help on putting the data into database. Array ( [1] => A...

 
@tereško lol
 
 
1 hour later…
8:50 AM
Steam Christmas sale is now on! Control your reflex buying impulses, be strong.
@Gordon you get a 33% to 50% off voucher if you just login to Steam
 
can anyone help me on birt report on php
 
@JohnP i hate steam for doing yet another sale. i already bought three games
 
yeah, it's not easy on the wallet. I'm going to wait till I see something I really need
btw, you should pick up Skyrim if you haven't already. That is one amazing game!
 
@JohnP way too expensive to buy now :)
i spent like 16 bucks yesterday for amnesia, metro and some adventure pack
 
9:03 AM
@edorian yeah
 
Yeah true. I procured it through local channels. Totally loving it though. So open ended
@edorian heh. yes, the wallet is going to have a bruised look the next day
sadly the free voucher can't be used in conjunction with the current sales
 
have you guys played Frozen Synapse ?
 
nope, genre?
 
Played it some while it was free. Didn't stick to it due to me not liking the interface mostly
 
@JohnP emm ... cyberpunk tactical turn based shooter ? sorry wrong link .. this is correct one : youtube.com/watch?v=9jJrUY27O0Y
 
9:05 AM
ahh, turn based strategy
I have a few indie games I bought on Steam. Still haven't managed to play through any of them :/
@tereško lol, the description on that link "Any similarities to a video of the same title made by a litigious British moron are completely coincidental and not intended to highlight the fact that his meaningless piece of paper, also known as his legal degree, mean nothing to me on this channel." :D
 
yeah , @JohnP , gonna flag that one .. he's generating views by stealing traffic
 
hmm, i could put pirates on my wishlist.
 
@tereško the rankings are pretty high as well, will check it out, thanks
 
@Gordon , you mean SPAZ ?
 
@Gordon I tried visiting all those games during the wishlist promo, didn't win anything :(
 
9:10 AM
@tereško spaz?
 
space pirates and zombies
 
@JohnP me neither
 
played it for 2 hours just now
 
@tereško no. sid meier's pirates
 
aaa, heard that one
 
9:10 AM
daily dose of trouble...
 
<<< 35 years old. played all the retro games ;)
 
I have the following function...
 
the 2kgames remake isnt too shabby
 
	function str_rcommon($str1,$str2){
		return strrev(str_common(strrev($str1),strrev($str2)));
	}
basically, it returns whatever characters are common form the right
for example: str_rcommon('abcdef',alef') => 'ef'
 
well .. depends how "old" counts as retro
 
9:13 AM
@tereško anything I played on my schneider, atari, c64 or amiga
 
i assume you have played heroes of might and magic 2
 
I'm using this with paths and the problem is that this isn't path-friendly.
 
@tereško yes
 
well .. that imo counts as retro
<< not a console-game guy
 
for example: str_common('a/b/c','o/b/c'); => '/b/c' (correct)
the problem is with folder names that are half-related:
str_common('aa/bb/cc', 'ba/ab/cc') => 'b/cc' which is wrong (should be '/cc')
Best solution to the problem? :)
 
9:16 AM
overdosing?
 
@ChristianSciberras split on / and compare the chunks in reverse
 
@LeviMorrison That was my initial thought...don't think there's anything better.
 
@ChristianSciberras what @LeviMorrison said. that's really two different logical approaches you got there: comparing paths and comparing strings. have two functions.
 
@Gordon time for a dir_rcommon() :D
thanks guys
 
9:31 AM
@ChristianSciberras viper-7.com/DpqkXk
You should be able to modify that to get exactly what you want. :)
 
nasty. But it did give me an idea.
 
it's much less opcodes XD
 
.oO( "it's much less opcodes XD" )
 
9:38 AM
lol
Those are fair comparisons.
And guess what? Same opcodes. I like my version MUCH better, thank you!
@ChristianSciberras I think this is probably the best version for speed, reliability, and maintainability: viper-7.com/zL65mE
 
.oO( wonders what for someone might need that anyway )
 
Also, why do you want / to be at the beginning? That looks like it would be buggy to me . . .
 
hmm ... guys , how do you think
is using nested stdClasses instead of nested arrays for a tree-like structure a bad choice ?
use-case: a category tree , which needs to be searchable
 
@tereško only if you want to use array functions on it.
 
@tereško I don't like StdClass. It doesn't implement Traversable but it is Traversable. I don't like that at all. But the idea of using a class instead of an array is fine.
 
9:48 AM
like array_walk_recursive
 
i am using it for the autoloader implementation
 
@tereško id rather use a classmap for that
 
emm .. what ?
 
@tereško classmap autoloader implementation: github.com/theseer/Autoload
 
seems like a really bad way to do this
 
9:52 AM
@tereško on the contrary. its the best way. its safe and its fast.
 
every time you create a new class , you are forced to register it
 
@tereško you just generate the list on deploy
 
hmm
i can actually use both ways .. well .. i should use both ways
 
@ChristianSciberras I learned some things working on this. But, if you want things by stats: viper-7.com/Eiuoc0 . I compare my way with some alterations to your way. Mine is usually faster, but not by much. However, mine is much easier to read and maintain. The only difference between ours is that I don't echo that extra '/'. That may be where the performance difference is.
Here's the comparison where our output is exactly the same: viper-7.com/ZYPUr9
They seem to be the same on speed.
 
on a different note, there is one thing i have been wondering about
is there a ways to automatically include class under test for phpUnit ?
 
9:59 AM
@LeviMorrison ah well :)
 
teheheh.. just opened up a webpage that wants me to download the index.php
 
@Gordon It's a very specific use case.
 
apparently they messed up the image handler on their Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.2 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a
 
I need to get the current script's (relative) path relative to doc_root
 
@ChristianSciberras yeah, everything you do usually sounds very specific to me
 
10:01 AM
@Gordon hmpf...
$path.'images/a.png' won't work when $path=='/var/www/html/myApp/stuff/'
and in order to find the '/myApp/stuff' part, I need to compare $_SERVER['SCRIPT_NAME'] (or whatever that was) with $docRoot which is /var/www/html/
happy? :)
 
@Gordon .. and you of course would download it .. in case it actually gives you php source
 
@ChristianSciberras im usually more happy when you dont show me your code ;)
@tereško yes of course. but it only had binary and headers in it :)
 
@Gordon that was pseudcode. Welcome to my warped brain.
 
watta disappointment
and i often suspect that @ChristianSciberras does this to torture us
 
@tereško was from a posh hotel site. imagine it would have contained something sensitive and i had fixed it. i might have been offered a discount on my booking.
 
10:05 AM
.. or got sued
 
@tereško I thought rule two of the chatroom was "show us your code"? Psuedocode counts, no? :D
 
@tereško nah, what for? misconfiguration on their site
 
mortals have pretty dim vague (?) understanding of what "hacking"is
 
love the apache version number though 1337
 
@tereško you could "hack a sandwich"...or "a server"...same thing :)
 
10:08 AM
did it come out in this millennium ? 1.33.x is more widely seen on computers in a museum
 
Anz
hii
 
UK schools don't teach pure maths?! O.o
anyone can confirm this?
 
10:56 AM
@ChristianSciberras I just discovered that it is faster to reverse the string than to reverse the array.
Although, I realized it's not the same semantics
nevermind
 
11:15 AM
helo
what is difference between components and extensions in yii?
 
mostly , none
 
11:35 AM
woo i just found out that "arrow up" this works on skype
which chat program invented it?
 
11:48 AM
hi
 
12:22 PM
ho
 
12:37 PM
It seems @Gordon is building a zombie army: stackoverflow.com/badges/17/necromancer?userid=208809
 
muahahahahaha!!!!!! I haz zem Zombiez!!!
 
/me runs away
 
1:36 PM
Ahhh my google adsence has been banned!
I hate u gogole
 
 
1 hour later…
2:56 PM
Good afternoon
 
3:06 PM
anyone here use imac?
i just got a new imac
went to install xcode and then it says its installing and then suddenly nothing
i have no idea if its installed or not
actually apple store is saying its installing but no progress bar
 
3:38 PM
@JohnMerlino Are you downloading the application from the Mac App Store?
 
i noticed someone setup my mac without a password, this will present some problems when trying to install some programs i presume
@CharlesSprayberry actually it was installing and finished successfully
 
3:57 PM
1
Q: PHPUnit from command line - list of dependancy files displayed. How can I make it display only the test script?

Lewis BassettI have installed PHPUnit on Windows 7, with PHP and Pear. I have a basic test script, to start with: <?php class StackTest extends PHPUnit_Framework_TestCase { public function testTest() { $this->assertTrue(false); } } I'm running it from the command prompt as: php...

SO Bugtracker -_- :)
 
hoi
@LeviMorrison I though that we didn't want to have a deque?
 
Hiho :)
 
4:13 PM
gods below , i hate that damned red Careers 2.0 banner
 
What banner? Where?
 
in russian there is phrase : "морда кирпича просит" .. face that asks for brick
im talking about this banner
 
nice
 
Oh that guy. I don't see that guy anymore. Blocked that image the first time it came up
 
it cases a visceral need to hit something
 
4:27 PM
huh?
what bannr?
And what guy?
 
@NikiC , i suspect your browser is hiding the image i pasted
 
When did you paste it?
 
after the "russian line" and before "im talking about this banner"
 
oh, yeah, seems blocked
will unblock to see
uh, now I see what you mean :D
 
4:59 PM
I think I'll start learning writing php extensions now
 
00:00 - 17:0017:00 - 00:00

« first day (430 days earlier)      last day (4523 days later) »