« first day (454 days earlier)      last day (4488 days later) » 

12:00 AM
?
how do i do this?
 
@user1079641 make it a block element.
 
@user1079641 you could either use padding or set the element to inline-block
 
@user1079641 I seriously question your skills in HTML. You are always asking about odd things.
 
That's because I always mess up and confuse on the smallest things in html
anyways, i really can't get this to work.
I will give you the code I have
CSS CODE:

.profSideLinks A:link {
text-decoration: none;
color: #00A0E3;
width:100%;
}
.profSideLinks A:visited {
text-decoration: none;
color: #00A0E3;
width:100%;
}
.profSideLinks A:active {
text-decoration: none;
color: #00A0E3;
width:100%;
}
.profSideLinks A:hover {
text-decoration: none;
color: #00A0E3;
background: #ddd;
width:100px;
}
HTML CODE:

<span class="profSideLinks">
<a style="inline-block" href="">Hello</a>
</span>
 
@user1079641 jsfiddle.net/TFU5g
 
12:19 AM
Anyone joining the CSS channel to talk about PHP?
 
mee!!!
 
 
2 hours later…
2:24 AM
posted on January 13, 2012 by Christopher Jones

I've updated my relatively "vanilla" PHP 5 RPMs to 5.3.9 on oss.oracle.com/projects/php. They are built for Oracle Linux 5.7 (and RHEL 5.7). I've included the OCI8 extension for Oracle DB, of course. The various MySQL extension are there and use the mysqlnd driver, so installation doesn't require any client-side MySQL libraries. Note the PHP 5.3.9 RPMs are for testing only. For production u

 
 
5 hours later…
7:01 AM
 
7:15 AM
7
A: What does {} do in MySQL queries?

BoltClockThat's PHP syntax, not MySQL syntax. It allows you to interpolate complex expressions in a double-quoted string. So in your example, the array index $listing['cityname'] will be evaluated, and its value used in your query. It has nothing to do with SQL whatsoever. By the way, that's a gaping SQ...

Are people expecting us to rip irrelevant examples from the manual and dump them into our answers even if they don't help the OP or the OP has kindly provided an example for us now?
(see comments under my answer)
 
@OmeidHerat You online?
 
7:51 AM
@hakre I think somebody removed all your votes on me :(
@hakre Probably it's considered cheating after all
 
8:03 AM
@NikiC bonjour
hmm I was only clicking on those that pleased me
probably this was triggering some patterns.
but hmm, didn't most of the votes went into the limit anyway?
 
@hakre No ^^ Yesterday I was something around 19.5k, now I am at 19.0k ^^
 
Well.. The only reasons to leave that question around is for google hits I'd say
The functional stuff should be covered by "What does this symbol do in php" anyways
> earned 22 reputation out of a maximum of 1000 from suggested edits

Only 489 minor php/phpunit versions to go!
 
what do you mean @edorian (and good morning)
 
Morning :) The only way to get rep for suggested edits when having +3k rep is editing tags afaik
 
@BoltClock Could you please delete the comments on stackoverflow.com/q/8028957/385378? We hijacked that question into a reference question and the comments are irrelevant now ;)
 
@NikiC Just flag the question, there are a dozen mods on SO (not counting devs) and I may not always be in chat
 
is it possible to in php have while loop with 2 conditions eg:

while ($i < $num_row and $i <51){
//do something
$i++
}
 
Which kind of retard decided that reinventing magic quotes is in the best interest of wordpress. I despise that functionality.
@redslazer Why the heck not? It's an expression like any other....it can contain a million different conditions...
@BoltClock Are you swiss? A swiss clock? :D
 
@ChristianSciberras just realised the example code that i wrote works perfectly. Im not sure what exactly i was doing in the actual code. Thanks for making me check again :)
 
8:54 AM
@hakre The other answers shows an opendir approach.. :(
 
@edorian You can go edit :D
> - Edorian's Note: Don't use opendir ffs!
 
hello
So confussing :/
 
@ChristianSciberras I used to either glob or SPL to list dir, but anything specific wrong with opendir ?
@TimothyPerez Yeah, Now I am on. How are you ?
 
9:13 AM
@Trippy I suggest you to forget about mysql_* functions and go with mysqli_*or PDO. though you need to understand Object Oriented programming in PHP.
 
and the problem was .. the table was wrong -_-.
 
@edorian Than add a better answer ;)
 
Okay guys, I need a bit more help.
How can I add code on here? Just paste it in?
I have this:
while($row = mysql_fetch_array($result)){

}
and in that while look, I need to echo out the data..... My friend showed me an example....
echo "The id is " . $row['id'] . " and the quote is: <b>" . htmlentities($row['quote']) . '</b>';
 
start with var_dump($row);
 
But I only need the quote part.....
 
9:21 AM
Then only pick what you need.
 
I tried "echo htmlentities(....'); but gave me a list of errors.
ohhhhhhhh
Okay, I got it.
 
@Trippy You are trying to learn it the wrong way.
get a proper book.
 
I already wondered as it didn't sound that complicated ;)
 
I am really trying to learn and I've tried to read books and I can only get half way. I understand the logic of it I just don't get the code, I guess
 
Don't just read the books, work with them.
if you left a book halfway, it's either the problem with the way you study or the book.
get an other book, and change how you read it.
Make sure to read the Preface, introduction and How-to-use part of the book.
 
9:26 AM
Okay, so I got the data to display. but.. problem. All of the columns are displaying.. I need only 1 to display in a div...
I'm reading, just not daily. I just don't have time. I'm trying to learn by force. I have to try this for a client. and it's actually working out. I just need to understand it more
 
@Trippy Poor client, is s/he paying for this ?
 
Read about each function / language construct you use in a code snippet until you understand how it works together. That's the only way. If you start with large code-example this is complex. So start easy with some little "hello world" example.
 
@hakre Only understand how functions work is not enough I think,
A walking Documentation of a language is pretty useless without understanding of programming concepts.
 
I've been doing that. A matter of fact, a friend showed me line by line how to submit the form, enter into a database, displaying it. He sent me the files and I searched what each line mean't. So yeah
I don't even copy paste. I type it all just to get the hang of it
 
Hello guys! very fast&easy question, if i have a php array like $datos = array('url' => $result['url'], 'description' => $result['description']); How can i push a new pair of values like 'new string' => $aGenericVar
 
9:36 AM
@DomingoSL $datos['new string'] = $aGenericVar but that is not binded to Array and is just copied.
 
what you mean by not binded and just copied?
 
@DomingoSL That is, if you change $aGenericVar the $datos array value for the key new string won't change.
 
of course, Thank you!
 
Yay, I did it :D
 
No problem.
 
9:44 AM
@OmeidHerat Yeah you should do that with pen and paper first drawing flow-charts and make that language agnostic.
 
stackoverflow.com/questions/8847942/… got closed because it duplicates another question... the latter having only bad answers?
 
@hakre I would prefer to not argue further. but anything beside the syntax of a language that you know in programming is concept.
 
@salathe Both might be merged.
 
most recent is ascending or descending?
 
10:12 AM
@salathe Also added one that might look more promising to you: stackoverflow.com/a/8848798/367456
 
I see what you did there!
 
Okay, so I need to start storing the time when each submitted data is being saved......
 
we really need to clean up the php tag. its so full of duplicates
 
@Gordon: But how?
 
@hakre i guess the only thing we can do is rigorous flagging and requesting merging
and moving
like for instance, all those could be moved to programmers:
http://stackoverflow.com/questions/1812472/in-a-php-project-what-are-good-ways-to-store-access-and-organize-helper-object
http://stackoverflow.com/questions/2180460/setting-up-a-deployment-build-ci-cycle-for-php-projects
http://stackoverflow.com/questions/2154457/pre-installed-linux-for-web-developers
http://stackoverflow.com/questions/2345412/quality-php-code-snippet-repositories
http://stackoverflow.com/questions/1775503/minimalistic-tools-for-developer-documentation
http://stackoverflow.com/questions/2405825/do-you-have-health-checks-in-your-web-app-or-web-site
and/or closed as subjective
or deleted
 
10:30 AM
I never tried using ajax before. this is gonna be fun :D
 
10:43 AM
posted on January 13, 2012 by Fabien Potencier

You might think that our framework is already pretty solid and you are probably right. But let's see how we can improve it nonetheless. Right now, all our examples use procedural code, but remember that controllers can be any valid PHP callbacks. Let's convert our controller to a proper class: class LeapYearController { public function indexAction($request) { if (is_lea

 
hmmm So I'm "kinda" getting ajax to work. But when submitting, it's empty :/
haha its 6AM.... I should go to bed :3
 
Kev
11:03 AM
@NikiC @Gordon - morning all'
@NikiC @Gordon @ircmaxell - this question stackoverflow.com/questions/1183726 got flagged by the OP asking why it was closed as a dupe of a much more recent question: stackoverflow.com/questions/8028957
It wasn't until after I re-opened I realised that stackoverflow.com/questions/8028957 is shaping up to be a canonical question for this type of problem
If you folks are doing this, please can you make sure you add a comment explaining why you're closing older questions as dupes of new ones where the new one is a canonical reference. Otherwise we'll end up with a heap of flags. Better still would be to maybe leave the older questions open. Closing older questions as dupe of a new canonical can also have the side effect of attracting downvotes by folks who don't bother to compare the dates.
 
@Kev: Is it possible to merge two questions?
 
Kev
@hakre - they're not good merge candidates.
@hakre - to merge they need to be 100% identical.
 
@Kev will keep it in mind. though my obvious reaction as a developer is of course to ask for a programmatic approach to it ;)
 
@Kev Okay that's very often not the case if a code-snippet is involved.
 
11:18 AM
@Kev excuse me, but has that ever happened ? 100% identical questions ?
 
Kev
@OmeidHerat - it does happen, but we have to be careful and not end up with an answer such as Andrew Moore's which specifically addresses the OP's problem (session) doesn't end up looking out of place
Merge tends to be used where an OP asks the same question repeatedly and there have been multiple answers across all the repeat questions
 
Got it, thanks.
 
Kev
Just be careful and don't go hunting out old questions to close as dupes of a newly created/newish/newer canonical reference. By all means close newer questions.
 
@Kev should i open a feature request on meta about a notice telling me that im going to close an older question with a newer one? notice could also ask for a reason why im going to close it although its older.
 
Kev
@Gordon - I think it would be better to open a discussion about whether closing older questions as dupes of new canonicals is what the community wants
@Gordon - I doubt you'll get much traction for a new close reason like that from Jeff & Co.
@Gordon - but you could include that in the question
 
11:27 AM
@Kev not a new close reason, but just some sort of notice/warning when using the regular close as dup option
@Kev on a sidenote, not sure if Tim told you, but i abandoned the debugging/profiling digest. there is simply too many topics to be covered with too many answers scattered. i felt it was impossible to create a meaningful digest for that.
 
Kev
@Gordon no harm in asking
@Gordon no worries...I did think it would be a fairly thankless and major challenge :)
 
@Kev im thinking about collecting one for DateTime now though. That should be fairly easy.
 
Kev
@Gordon aye that would be a good one
 
hi
 
11:37 AM
@NikiC hi
 
Kev
@Gordon digesting.....
@Gordon wrt to that last one, I think Jeff didn't think his answer through. There is a discussion on meta about mergers...which I am trying to find...and the opinion, I sorta remember, was that both questions need to be bang on identical
 
@Kev So you are saying that we should let old clear-super-duplicate questions just open?
 
Kev
@NikiC well....it causes a lot of confusion for the OP of the older question because it's a "close hit" against them when they were possibly the original asker of that sort of question...and...
 
@Kev It sure would be really convenient to not close them, because there are about 500 duplicates of that question and casting all those close votes takes time. But I think from a helpfullness point of view it would make more sense to dupe them.
 
Kev
@NikiC ...without any explanation in the comments as to why this happened, i.e. it's not immediately clear the newer question is a canonical, then you get folks who like to downvote dupe askers trolling along and unfairly downvoting the older question.
 
11:45 AM
@Kev I don't think it's unfair. As I said, there are about 500 dupes of that question and only a single one of those 500 is the "original" asker that would be treated unfairly. For me that's measurement error, honestly.
 
Kev
in an ideal world it would be better to find the oldest question possible and make that the canonical, it would save a lot of heartache
 
in case of headers already sent i'd say its not a real question anyway because the answer is rhetorical. they should likely all be deleted.
 
yes, most could be just deleted
 
Kev
@NikiC yes I know there's hundreds of dupes, but the question above that was closed was asked from the view point of it happening when working with session objects and OP may not be aware of the relationship between using session and headers.
 
googling for that yields ample results. the main issue with those is that the OPs dont understand where they output stuff before their call to header() and that's fix my code questions and those are discouraged anyway
 
11:49 AM
@Kev The error message will still lead him to the solution. btw, we could extend marios answer into listing the functions which are subject to that error.
 
i mean, im fine with putting a comment but i really think it mostly cures a symptom only
 
Kev
Remember, there is no harm in dupes - there's a meta post about that somewhere and the usefulness of dupes have been discussed on the podcast as well.
 
@Kev of course there is :)
 
@Kev Sure there is.
 
Kev
@Gordon ok...I'll caveat that to "within reason"
 
11:50 AM
otherwise we wouldnt need to discuss it and we wouldnt need a close reason
 
Kev
all I'm saying is be careful with older posts and use common sense.
 
with regard to Jeff's post on duplication, I consider "some" duplication to be < 6.
@Kev agreed :)
 
Kev
ok...thanks for listening folks....I better go and do some actual work :)
 
@Kev laters
 
what are header modifying functions?
apar from header(), session_start(), set(raw)cookie() ?
 
There should be more than that
session_regenerate_id
 
@NikiC how does php write headers internally? can you search for that in the source?
 
@Gordon What you mean by "how"?
 
@NikiC is it a function call? something one can search for?
 
@Gordon Yeah ^^
crash kurs in sourcecode browsing: goto lxr.php.net/opengrok/xref/PHP_TRUNK ; type "PHP_FUNCTION header" into the search ; follow the link without the ; at the end
 
12:15 PM
@NikiC ok, so curl_close and _php_curl_send_headers
 
aaaaah, now I understand what you want to do :D
nice idea ^^
 
@NikiC my naive assumption was that php has some sort of native approach how it modified headers internally and so I figured I could search for that in the source
 
And header_remove too
 
user986408
crash "kurs" :-)
 
@ThatWebNerd :D
 
12:18 PM
@Gordon But I see something else :P
 
lunch time cu laters
 
@NikiC so its calls to sapi_header we should look out for, right?
 
@Gordon Just click on it, and it will take you to the definition.
 
@Gordon I think the current list should be enough. Don't think there are any more major functions
 
btw, what you guys are up to ?
 
12:22 PM
@NikiC there seems to a number of sapi_header_op calls in the phar extension
 
@Gordon And there are also some _ex calls all around ;)
 
@NikiC what does _ex do?
i guess i dont wanna know anyway
 
@NikiC @Gordon What you guys are doing with these functions ? I am kinda curious.
 
@Gordon I mean _ex as in sapi_add_header_ex ;)
 
@OmeidHerat @NikiC is compiling a list of all PHP functions that output headers. I assume he's writing an answer to a Cannot Send Header Information canonical
 
12:27 PM
Nice, that is what I would call a throughout answer.
 
@Gordon no I don't ^^ I only added a few example functions to marios answer ^^ why should I write my own answer?!
 
user986408
i love this chat.. i read and read and only understand bahnhof, or "train station" if you like..
 
Did anyone else get an email about filling out a questionnaire on 'collaborative software'?
 
@ThatWebNerd ah, another german :D
 
Most of the questions were about SO and on any open source work you're doing
 
12:32 PM
@JohnP yeah :(
 
Ah, was wondering whether that was real or not.
I even emailed the sender asking for confirmation
Seems to be legit then
 
Still spam.
 
user986408
@NikiC everyone is, it's just that only a few admit it
 
@ThatWebNerd At least in this chat, yes, the Germans have taken over :P
 
0
Q: Introduce a Canonical Question tag

GordonHow about introducing canonical-question to StackOverflow in order to make it easier to identify them? The general idea is to have either moderators designate individual canonicals and/or auto tag those questions which have been given most often as a possible duplicate. This would allow us to l...

 
12:42 PM
@Gordon +1
 
@NikiC thx
 
+1, I didn't even knew about them just like 20ish min ago.
 
user986408
1:01 PM
contrastrebellion.com - not php related tho
 
@Gordon Can't we just check back with a mod and add those tags manually? It's not like we have many General Reference questions
 
ping @@BoltClock @@Kev @@TimPost
@NikiC i really wouldnt want the tag to be taggable by everyone to prevent it becoming abused and/or watered down in functionality, but let's ask them for their opinion.
 
@Gordon I don't think it will.
 
@ThatWebNerd I am not guilty of that at all.
 
user986408
@OmeidHerat laudable ;-)
 
1:12 PM
@Gordon btw, who told you that that @@ thing actually works? I couldn't find docs on it
 
@ThatWebNerd Thaks :)
 
@NikiC @ircmaxell keeps confusing me with it :)
 
@@Gordon How is this suppose to work ?
 
@Gordon Looks like superping is mod only ...
@Gordon Yeah, mod only :(
 
1:27 PM
How would you check if Array A is a subset of Array B ? I can use array_diff to look for an empty 'relative complements' of B in A but that is not fun specially that I have to do it recursively.
So how would you check for A ⊆ B respectively ?
 
@NikiC TimPost did
IIRC
 
@OmeidHerat count(B) == count(array_intersect(A, B))?
 
s/respectively/recursively. Sorry.
 
or B,A or whatever the order is for that function
 
@ircmaxell Well, yeah, but he's a mod ...
 
1:33 PM
:-P
 
@Gordon array_intersect() sounds good. I will have a look.
 
2:09 PM
Hi all ^_^
 
hi
 
Hello
 
Holla everyone!
and Hey @Donut !
Damn, it's too late here.
I am off
peace out.
 
2:51 PM
Are $_SESSION's supposed to work through file directories?
as long as it's on the same server righrt?
 
3:13 PM
divided echo on my meta post :)
@ircmaxell that pedantic note is arguable given that there is no official standard for csv.
 
what pedantic note?
 
@H
@HowdyMcGee: Correct, as long as you dont redirect to another server.
 
@Gordon I'd argue that, not because of an official standard, but because of an implied one... but whatever
 
@ircmaxell csv's rarely use commas ...
 
3:20 PM
oh? evidence to support the claim?
 
Comma separated values . . . aren't separated by commas? BOOSH! Universe gone!
 
while csv's can contain other delimiters, the standard is here: tools.ietf.org/html/rfc4180
 
@ddubs If "Csv" takes other delimeters it should be called dsv ;)
 
@ircmaxell No ;) Just how it feels (I don't know whether I ever saw comma separated csvs, but I definitely saw semicolon and tab separated ones)
 
DON
hi anyone to clear my doubt in pdo
 
3:29 PM
Kent Beck has a nice side note in "Implementation Patterns": "(Projects with little or no maintenance should use a very different set of implementation patterns from those presented in the remainder of this book.)"
 
@NikiC I wouldn't call them csv files then, I would call them semicolon delimited or tab delimited files...
 
@ircmaxell People call everything that somehow looks like a csv a csv. Maybe you wouldn't call the tab case csv anymore, but the semicolon case definitely.
Wikipedia agrees that csv using semicolons are common in germany (as , is used as the decimal point)
 
@NikiC common doesn't make it right :-P
(and I really don't care about this, I care about naming conventions)
 
@ircmaxell No, it actually does.
That's why I really hate people who say that ?: isn't the ternary operator but the conditional operator.
 
@NikiC You hate the people or you hate it when they say that?
 
3:34 PM
@LeviMorrison The latter ;) Hating people in general is pointless ;)
 
@NikiC I was sure that was what you meant, but I try to make it a point to articulate that I do not hate people. When I raise my kids, I hope to avoid telling them they are bad, but rather what they did was naughty. Some part of me thinks it will make a difference. I'm just trying to get into the habit.
 
@ircmaxell well if you care for naming conventions use the pragmatic standard then: anything tab, pipe, semicolon or comma separated is a CSV file
or, for an alternate definition, everything that open office and word can import as such
 
@LeviMorrison wow. really.
 
@LeviMorrison that sounds like a good idea. you are ok, but what you just did wasnt. nice, ill adopt it. although i think i already have that mindset. i'd rather could adopt children to live it in practise.
 
eih
 
3:45 PM
After I've used array_map on an associative array, the keys have been numerically indexed... Is there a way round this?
 
Any recommendations on "core books for managing in agile environments" ?
 
@Greg I think you can use array_walk us.php.net/manual/en/function.array-walk.php and not have that side effect.
 
thanks, I'll have a test
 
Check out this comment on dependency injection: php.net/manual/en/class.pdo.php#106125
 
3:54 PM
It is a practical comment, no doubt, but I've never seen anyone advocate mixing the singleton and injection patterns besides myself. I thought I was the only crazy one!
I try to keep my view to myself because it only starts fights.
There are two Singleton patterns on that page.
 
@LeviMorrison thank you - works perfectly
 
@Greg No problem :) Of course, it does apply it directly to the array, so if you want to preserve the original you have to make a copy first.
Has anyone seen PDO or mysqli convert empty strings to nulls when you've told it not to? I wonder if I've found a bug or if there's something I'm not seeing.
 
@LeviMorrison Yes, when using a mysql datatype like DateTime, an empty string will be converted into a null
 
@Greg I'm using a varchar
 
ok, that is odd.
 
4:03 PM
Ah, it was an error because of code duplication! Curse the previous developer's laziness!
 
@LeviMorrison Don't curse :P
 
@NikiC Too late, can't edit!
@ircmaxell @edorian @Gordon @salathe @NikiC Do you guys think that anyone would complain if I changed the documentation of functions to use camelCase? Such as strToLower?
 
@LeviMorrison óÒ
You'd be complained to death! (probably) :P
 
yes
3
A: Update old stored md5 passwords in PHP to increase security

ircmaxellOk, let's go over a few points here What you have in $salt is not a salt. It's deterministic (meaning that there is no randomness in there at all). If you want a salt, use either mcrypt_create_iv($size, MCRYPT_DEV_URANDOM) or some other source of actual random entropy. The point is that it s...

how does that edit look?
 
Hey all
for some reason mysqli prepared statements are not working.
This is what I am doing:
$prepareUserQuery = "
    INSERT INTO users ( `username`, `fName`, `lName`, `isAdmin`, `isCFO`, `domain`, `privilege` ) VALUES (?, ?, ?, ?, ?, ?, ?);
";
$statement = $this->dbHandle->prepare($prepareUserQuery);
if($statement){
    $statement->bind_param('sssiisi', $posts->userName, $posts->fName, $posts->lName,
                                      $posts->isAdmin, $posts->isCFO,
                                      $posts->domain, $privileges);
    $statement->execute();
    $userID = $statement->insert_id;
and it always says "Last insert id: 0"
 
4:10 PM
@LeviMorrison yes, im so used to the functions being the way they are that i would immediately change them back to lowercase. also iirc a lot of these map directly to their c equivalents
 
What am I doing wrong there?
(sorry if im coming in the middle of something)
 
@LeviMorrison Do you write strToLower in your code?
 
:-(
 
@NikiC Yes, actually. PHP's functions are case-insensitive, so I use camelCase to match my style. It looks better.
If I'm going to smush words together, I will at least make it readable.
 
anyone? :-(
 
4:13 PM
is execute failing
 
@ircmaxell did not check. DUH, one sec :-P
 
lol;
 
@ircmaxell haha thanks ^_^ that was the issue
I forgot a field
 
handle your errors
 
@ircmaxell silly me. thanks a lot :-D
 
4:15 PM
@Gordon I understand the value of leaving as their C equivalents. However, I really don't think PHP should maintain that stance forever. I could create a PHP processor in a language other than C, and it would be fine. It's just that no one has ever created another popular processor for PHP, so the one in place is the de facto standard.
 
Yes they have
there are at least 4 versions of PHP that I'm aware of
Zend
Roadsend
JVM based
.Net based
not counting Facebook's JIT and HipHop
 
oo nice a php compiler
 
it's worthless
 
darn :\
i use php A LOT for server scripting
would have been nice
 
@ddubs The best shot you have at the moment is Facebook's HipHop. It's the most current.
 
4:19 PM
Roadsend is completely worthless. As is Quercus. Haven't tried Phalanger. HipHop and their Jit are nice, but it's not really PHP since you can't use a fair number of dynamic language features...
 
I'll check out HipHop
 
I wonder if sometime in the future I could get a research grant to create a new PHP engine . . . o.0
Not sure that I'd want to, actually.
 
it happened with Zend...
 
@ircmaxell now that you are there you'll have to settle the access-by-index argument for linked lists we had yesterday with @LeviMorrison
 
If I got a grant to build a language engine, I'd build something statically typed, and my functions would have REAL overloading, and functions would have to declare what they returned.
 
4:25 PM
@LeviMorrison :) [Read as: ...]
 
@hakre None of the questions you flagged are suitable for Programmers, sorry.
 
@NikiC Ok, what are the arguments?
 
@ircmaxell Slow.
@ircmaxell No use case yet presented.
 
slow?
 
@ircmaxell Accessing a linked list by offset is slow ;)
 
4:26 PM
I <3 php
 
The more I think about it, the more I'm convinced that a LinkedList is really just an array that's optimized for inserting elements in the middle (rather than at the ends)... (at least with respect to uses in high level languages)
so sure, accessing by offset is slow, but if you need to access by offset, use an array...
 
@NikiC I have a use-case: it's called pseudo-backwards compatibility. The current DLL has it. . .
 
@ircmaxell So are you for ArrayAccess or against it (your reply isn't quite clear => could mean both)
@LeviMorrison I'm just going to ignore that comment ;)
 
Yes, I am for it...
 
Damn
 
4:28 PM
@NikiC It was worth a shot. :)
 
It's a documentation task to document the issue...
 
@NikiC Don't curse :P
 
@ircmaxell "but if you need to access by offset, use an array" what was that about then?
 
@NikiC If I know I'll be doing a lot of access by offset, then I should pick the ArrayList (or normal array, or similar).
 
@LeviMorrison yes
 
4:30 PM
@ircmaxell My point is that you should be able to do anything using either manipulation at the ends, or manipulation while iterating. I don't see value for ArrayAccess.
 
but if you are going to be inserting in the middle alot, then pick the LinkedList
@NikiC either are interchangable in usages. The difference between them is what they are optimized for...
 
If somebody could present a real use case it would be easier to convince me, by the way :P
@ircmaxell Interchangable as in same API? Then: no.
 
The basic idea of a language library is to accommodate as many uses as you feasibly can.
@NikiC Not same, but somewhat compatible.
 
@LeviMorrison feasibly.
 
@NikiC Same on the interfaces. LL can have more, but both would be interchangable in ArrayAccess, Countable, etc...
 
4:31 PM
You want to insert something after the 4th element? I can do that. Give me a moment.
^feasible.
(As a side note, PHP frameworks suck nearly as much as PECL and PEAR. I love that poll up there :)
 
Hm, should I invite some of the C++ guys other here?
So they can give a vote?
 
@NikiC I'd like the trolls to stay where they are, thank you! They do enough damage already, I am sure.
 
@LeviMorrison But they could give us votes!
I'm still not convinced by the way :P With linked lists offset access - apart from being slow - also has lots of strange behavior. E.g. unset($list[7]); var_dump($list[7]);. It's just so unintuitive that this outputs something.
 
@NikiC Why not? Anything that maintains order, not just LinkedList, would have that behavior.
 
I would be so much more happier if somebody could show me some real example of this :(
 
4:42 PM
You don't have to code anything you don't want to. One of my favorite phrases I've heard is:
> The only thing you have to do in life is die.
 
@LeviMorrison Right, let's put SplClassLoader in core :)
 
@NikiC I'd like to include one, sure. I'm just not sure at all on the details :)
 
@NikiC I think that's actually intuitive. Because you wouldn't actually call unset() most of the time, you'd do $list->removeItem(7), after which there's still a 7th item
 
@LeviMorrison Right, let's put get_seventeenth_to_nineteenth_character_from_string() in core ;)
heh
 
Well, I need to go review some math.
Good day, everyone!
 
Ahoy folks
 
5:23 PM
Anyone around to help me optimize a function?
 
is it slow?
 
Profiled it, but I can't tell if it's production friendly
Recursive implode/explode sorta deal
 
5:40 PM
hello folks..I'm having some trouble understanding the difference between a web application (not a static site) and a cloud application
 
@user705339 ok
 
using Google Doc as a cloud application, how is different from a web app?
 
@Neal thank you very much for the link
@Neal so, the difference between a cloud app and web app is the interface it's being accessed from, correct?
 
5:55 PM
no
 
no?
 
no
 
how so?
 
bc
 

« first day (454 days earlier)      last day (4488 days later) »