« first day (623 days earlier)      last day (4310 days later) » 
00:00 - 19:0019:00 - 00:00

12:03 AM
@PeeHaa , one thing you can never accuse SO mods of - consistency
 
Now that's a fact
 
12:37 AM
starting my new and improved scalar type hinting patch...
 
@ircmaxell Finally ;)
 
user895378
woot
 
this time I'm trying to do it without changing the parser
 
I say news of this kind deserves a celebration drink
 
lol
 
12:48 AM
@PeeHaa Hear, hear!
 
Ah That's some good stuff. cheers all
 
user895378
Did someone say drink? brb. cheers!
 
lol
doh
forgot to regenerate the vm
 
user895378
groundhog day
 
user895378
1:01 AM
same thing happened last night (vm issues, anyway). like the movie groundhog day. sorry, tangential associations don't work for other people who aren't me :)
 
I ask because I want to link to it in a blog post and if it is just going to get closed I'll go another route.
 
user895378
@CharlesSprayberry I'm on the border over whether or not Programmers would be more appropriate, but I don't personally feel strongly enough to cast a close vote.
 
looks appropriate (it's 4am here, tl;dr)
 
Seems more "white boardish" and better suited for programmers since it doesn't solve an actual problem.
 
Not construvtive
 
1:05 AM
I mean, he's blatantly asking for a pro/con list
 
user895378
It's hard for me to cv because it's an intelligent question and there are so many awful questions in the ... but it probably deserves to be closed
 
I am currently trying to get an answer from some people on the programmers chat about possibly migrating it. It is an intelligent question and I'd hate to see it closed and probably eventually deleted.
Although some of the answers are dubious quality at best
 
1:26 AM
Zend/zend_language_scanner.l(1897) :  Freeing 0x2B905FA9DAF0 (4 bytes), script=-
=== Total 1 memory leaks detected ===
 sapi/cli/php -r 'function f(int $a) { var_dump($a); }; f("2");'
int(2)
 
@ircmaxell Ah so it casts by default instead of trowing errors all over the place
 
correct
but sanely
for example:
$ sapi/cli/php -r 'function f(int $a = null) { var_dump($a); }; f(array());'

Catchable fatal error: Argument 1 passed to f() must be of the type int, array given, called in Command line code on line 1 and defined in Command line code on line 1
 
user895378
$ php -r 'function f(int $a) { var_dump($a); }; f(2.75);'
 
user895378
^ how does it handle data loss?
 
1:44 AM
@rdlowrey Shouldn't this trigger a fatal error? int !== float
 
user895378
@CharlesSprayberry I would expect it to do so, but there's been discussion about transparent data loss in the past because casting from int to float and vice versa doesn't trigger errors.
 
@rdlowrey Ah, I understand.
 
user895378
I assume there's casting happening under the hood, which is why f("2") wouldn't trigger an error on an int typehint but f(array()) would
 
user895378
I know I'd be willing to deal with transparent data loss in exchange for usable scalar typehinting ...
 
Yea, those are good points. And the first example is passing in string and returning int like you said.
Would f('') return 0?
 
1:53 AM
yes
 
Heh, codepad.viper-7.com/J5hvsP I love how it spits out a notice that it couldn't convert stdClass to an int but then went ahead and did it anyway
 
hrm... I'm thinking notice on data loss?
thoughts?
 
@CharlesSprayberry I'd love to see the opcode for that
 
@ircmaxell Ask and ye shall receive :) Thanks
 
user895378
2:03 AM
@ircmaxell I'm thinking it's best to raise a notice on data loss because if someone uses a typehint they're probably trying moreso to enforce what's coming in than enforce a type once the body of the function starts working (if that makes sense) . A notice would help to enforce what's being passed as much as what the function is operating on.
 
user895378
^ That made sense in my head, but I'm not sure I translated it well to words ...
 
user895378
Restatement: the senate of my mind votes 55-45 in favor of a notice on data loss.
 
What's against a fatal error on data loss? That's almost certain not what you wanted to do
 
2:18 AM
i need some help with a problem of mine..basically I capture the following 3 data from user: Age,Sex,Zip..example is: 30,M,90210 ...The challenge is that the information can be in any order or any format such as 30/M/90210 or 30 M 90210 or 30 Male 90210 or 90210 M 30 ...how do i approach this?
 
user895378
@Adil Easy: you're always going to have three pieces of information: (1) a 5-digit number (or at least more than 3 digits for age). (2) An age number and (3) one or more alphabetic characters that start with either 'M' or 'F'. Your example looks like there will always be a delimiter of some kind as well between the three groupings. Apply some brain cells and you'll be able to get there :)
 
user895378
You could also do a preg_match to find the first occurrence of a character that isn't [a-zA-Z0-9] and you'll know that's the delimiting character. Then explode the string on the delimiter and you'll have three array elements and you can easily determine which is which.
 
yeah i just feel burnt out trying to solve this..I tried using the explode with if else statements and it doesn't seem to be working
 
user895378
Problem solving. That's all it is. A series of if statements with a finite set of possible delimiters is a sub-optimal strategy, though.
 
2:34 AM
@rdlowrey I'm building a new set of apis
instead of void convert_to_long(op)
int convert_to_long_safe(op)
which returns FAILURE if there was data loss
 
@Adil Start by using preg_split with your possible set of delimiters.. something like ~[\s,\/]~: Split by spaces, commas, or forward-slashes. Then send each part into a function/method that identifies it
 
user895378
@ircmaxell ah nice
 
the side effect is:
 sapi/cli/php -derror_reporting=-1 -r 'function f(int $a = null) { var_dump($a); }; f(2.75);'

Notice: Argument 1 passed to f() resulted in data loss on cast to int, called in Command line code on line 1 and defined in Command line code on line 1
int(2)
 sapi/cli/php -derror_reporting=-1 -r 'function f(int $a = null) { var_dump($a); }; f(array());'

Notice: Argument 1 passed to f() resulted in data loss on cast to int, called in Command line code on line 1 and defined in Command line code on line 1
int(0)
 
2:57 AM
crap. is_numeric_string fails
nevermind
 
user895378
What happens if you give it a foobar'd default value and invoke with no arguments like this:
 
user895378
f(int $a = array()) ... f()
 
user895378
?
 
sapi/cli/php -derror_reporting=-1 -r 'function f(int $a = array()) { var_dump($a); }; f();'

Notice: Argument 1 passed to f() resulted in data loss on cast to int, called in Command line code on line 1 and defined in Command line code on line 1
int(0)
 
user895378
nice
 
user895378
3:04 AM
Also, it's a lot nicer without the cast parens around the typehint f((int) $a){}
 
 sapi/cli/php -derror_reporting=-1 -r 'function f(float $a = null) { var_dump($a); }; f("2.5abc");'

Notice: A non well formed numeric value encountered in Command line code on line 1
float(2.5)
 
user895378
@ircmaxell How about "A malformed numeric value ..." instead of "A non well formed"?
 
nevermind
Fixed:
sapi/cli/php -derror_reporting=-1 -r 'function f(float $a = null) { var_dump($a); }; f("2.5abc");'

Notice: Argument 1 passed to f() resulted in data loss on cast to float, called in Command line code on line 1 and defined in Command line code on line 1
int(2)
 
user895378
I really like this casting implementation. I was thinking for a bit that maybe a fatal error would be more appropriate than a notice on data loss ... but if you're using it that way you're almost certainly already throwing exceptions on E_NOTICE situations anyway ...
 
3:28 AM
almost done
one more function to implement
yay
 
user895378
3:48 AM
mother-f'ing woot
 
doing a BUNCH of cleanup here
making some really cool stuff work
like references
sapi/cli/php -derror_reporting=-1 -r 'function f(int &$a = null) { var_dump($a); }; $a = 5.5; f($a); var_dump($a);'

Notice: Argument 1 passed to f() resulted in data loss on cast to int, called in Command line code on line 1 and defined in Command line code on line 1
int(5)
int(5)
sapi/cli/php -derror_reporting=-1 -r 'function f(string &$a = null) { var_dump($a); }; $a = new StdClass; f($a); var_dump($a);'

Catchable fatal error: Object of class stdClass could not be converted to string in Command line code on line 1
Ok, off to bed
good night!
 
4:07 AM
hey guys intersting problem I have a function which SHOULD echo back some other variables (yes im using echo instead of return) however it for some reason changes the render order of things on page
 
user895378
@ircmaxell nice work, later!
 
@ert3 output buffering?
 
@MikeB thanks I figured out the rendering issue
new problem though if your game
$table = $dbh->prepare("SELECT * FROM :table");
$table->bindParam(":table", $name);
$table->execute();
<? while($line = $table->fetch()) {?>
<tr>
<? foreach($fields as $field) {
$field = "'".$field."'"?>
<td><FONT color="#FFFFFF"><? echo $line[$field]; ?></FONT></td>
<? } ?>
for some reason this doesn't return anything
not even an error
$fields is an array holding the field names as they occur in the database
 
4:31 AM
@ert3 I'm not sure that the FROM can be a parameter like that. You need to explicitly state which table in your SQL statement
 
@ert3 Do you have exceptions turned on?
 
yes for my account they are turned on so i should see all errors
going to go ahead and toss in something sql specific to see what i get
 
11
Q: Can PHP PDO Statements accept the table name as parameter?

JrgnsWhy can't I pass the table name to a prepared PDO statement? $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) { var_dump($stmt->fetchAll()); } Is there another safe way to insert a table name into a SQL query? With safe I me...

 
found this i think i need to change things up
oh HAI
did we post the same thing
 
:)
 
4:39 AM
I get that this is unsafe but im just testing right now

$table = $dbh->prepare("SELECT * FROM $name");
Notice: Undefined index: 'title' in
so yeah
now i just have to unbreak the next part but i have an error to go with
working perfectly with shorthand, just need to make a shorthand scrubber
 
Only been coding around with it for about a day but I'm really starting to like PHPStorm.
 
5:07 AM
anyone off the top of their head know how to show all entries until current date in mysql
good lord the thank you section of my about page is growing
 
hello friend any one helps me in zen cart i need help for the shopping cart
 
5:33 AM
@ircmaxell thanks for the tip
 
 
1 hour later…
7:00 AM
mornings
 
good morning
 
morning
@tereško sup
slowing starting to hate arrays
@tereško hey have you checked out
Sensei no Barrage
Its this semi new stuff being published by shonenjump alpha, its pretty good
Like Ravemaster but without being bastardised by 4kids and the completely nonsensical plot that dragged on like they got payed by the word
 
 
2 hours later…
9:13 AM
good morning
 
morning
 
9:32 AM
morning
 
okay, this is mad code
foreach ($m = array_map(function($v) use (&$l) {
    return array(@$l[$i = &$v[1]] ? : $l[$i] = count($l) + 1, $v[2]);
}, preg_match_all('/^(?:(\s*)=> )?(.*)$/m', $input, $m, PREG_SET_ORDER) ? $m : array()) as $i => $v) {
    $pi = str_repeat('    ', $pl = @$m[$i-1][0]);
    (($v[0] - $pl) > 0) && printf("$pi<ul>\n");
    echo '  '.str_repeat('    ', $v[0]-1), "<li>$v[1]";
    $ni = str_repeat('    ', $nl = @$m[$i+1][0]);
    if (0 == $close = (($nl - $v[0])*-1)) echo "</li>\n";
    if ($close < 0) echo "\n";
 
10:12 AM
@hakre php sucks. look at that ugly code. if the OP had written in Perl, it would be much better. or in C.
 
That's why PHP has comments build in ;)
foreach ($m = array_map(function($v) use (&$l) {
    return array(@$l[$i = &$v[1]] ? : $l[$i] = count($l) + 1, $v[2]);
}, preg_match_all('/^(?:(\s*)=> )?(.*)$/m', $string, $m, PREG_SET_ORDER) ? $m : array()) as $i => $v) {
    $pi = str_repeat("    ", $pl = @$m[$i - 1][0]); # prev
    $ni = str_repeat("    ", $nl = @$m[$i + 1][0]); # next
    (($v[0] - $pl) > 0) && printf("$pi<ul>\n");     # open one?
    echo '  ' . str_repeat("    ", $v[0] - 1), "<li>$v[1]"; # output this
    if (!$close = (($nl - $v[0]) * -1)) echo "</li>\n"; # has sibling
 
:D
 
0
A: convert tab/space delimited lines into nested array

hakreIn contrast to my previous answer that is quite a bit long and explains all the steps, it's also possible to do the same but more compressed. The line splitting can be done with strtok The preg_match then "on" the line making mapping more immanent The Levels can be compressed into an array take...

You can find a OO version there, too. However, that can be improved, too. I think the same principles I apply in this chunk of code could be abstracted into an iterator that has the previous and next element as well.
 
why do you write such horrid things ?
 
@hakre what is the aim? to have the ascii in a multidim level?
 
10:21 AM
yes, that variant creates a ul/li list "on the fly" (well not really, but somewhat)
Part of the problem is that the indents in the input are not fixed per level.
 
hello guyz
 
@tereško It's an area I like to fiddle with. The mapping of hierarchical lists / structures / flat lists onto <ul> / <li> stuff and such. From time to time I play with that.
 
I want to store the mp3 file in the database can anybody suggest me how can I achieve this.I know I can store the path but I will have to do this by storing the file in database in blob field
 
Actually I'm asking myself since some weeks if it is possible to create a parser that works on the fly by using the recusrive iterator interface, so to produce the AST in memory and only partial, probably not even with it's own data structure, but this might not work.
 
@NealValecha , why would you want something like that !?!
 
10:27 AM
@NealValecha Yes you do that in blob field. PHP's MySQLi extension: Storing and retrieving blobs
 
DB is not for holding large files (and mp3, in general, are quite large) , that's why we have file systems
 
I know but I will store the small files
 
only defensible case for storing file is DB would be if you need ROLLBACK functionality , and even then it might be better, cheaper and faster to mimic that in file-system
 
I know the functionality of storing the files in filesystem.But I will never do that to store the mp3 or video files in the database
I will made this for my own experiance.
@hakre I will not store the images in the database but I will have to store the mp3 file.
 
@NealValecha The database won't inspect your files and refuse it if it's not an image (or an image of bad taste). The database just stores chunks of binary data. So pass along whatever you see fit. Be it image or mp3. It does not matter, that's the same.
So get comfortable with the very basics and you should be able to get something running quite soon.
 
10:39 AM
I will do this before that I will store the images in the database by converting it in binary form but I doesnot know will it work for mp3 files
Thanks for the information hakere
 
Good morning
 
11:05 AM
morning everyone
 
aloha
 
Sigh. is just turning into a total den of fail. stackoverflow.com/q/11273574/477127 and... oh, well at least he had the good sense to delete the "answer" to stackoverflow.com/q/11273508/477127
 
hey @Leigh
@hakre You really take those SO questions serious: gist.github.com/3018902
 
11:21 AM
@NikiC The result of an overdoze of hot, really nice, pure, black coffee in the morning.
It's like doing thesis / anti-thesis somehow.
Next version will be object oriented again. So actually readable while hopefully similar direct than the last one (3)
 
you are crazy
(that's a complement, btw)
 
@NikiC i'm still waiting for a tokenizer version of yours to that
 
@Gordon hm?
 
The former $tree array is sort of an s-expression somehow, which might be useful to compile something like the CSS Selectors in XDOM.
Would be cool if I get managed that this we
 
@NikiC to the Q @hakre answered
 
11:27 AM
Yeah something like one regex pattern you use with preg_match all and you get the array tree structure back ^^
 
how does the resulting tree look like?
@ircmaxell Too forgiving. -1
 
@NikiC what would you want it to be?
 
A node contains two elements. First itself (it's name), then it's children.
Root node has no name, so it's one element only, the children.
Children can be either array() or NULL in case there are no children.
Hmm PhpStorm does not support to jump to the goto label with ctrl+click. That software just don't feel complete ^^
 
@hakre You're using the lack of solid support for goto as a judgement of an IDE. Dissapoint
 
@ircmaxell No, I wrote it does not feel complete. Consider you encounter a goto statement, and you hate gotos. But you want to jump there to inspect it, e.g. looking forward how to refactor the code to remove it.
 
11:39 AM
why does @hakre's /^(?:(\s*)=> )?(.*)$/m match the first line but …
{
    ^           # match from beginning of line
    (?:         # start optional
        (\s*)   # capture whitespace
        =>      # up to delimiter
        [ ]{1}  # followed by a single space
    )           # end optional
    (.*)        # capture remainder
    $           # until end of line
}xm
wouldnt?
 
@hakre goto cannot leave execution scope. So the label must be within the current block which it resides in. That's not too much to look for...
 
I have to write (?:(\s*) to make it match the first line for some reason I dont know
 
@Gordon Because the first line has no indent.
 
@hakre thats why I made it optional.
 
(?: ... ) is non-capturing, but needed, (?: ... )? is non-capturing, but optional
 
11:42 AM
@hakre doh!
 
@ircmaxell You have no clue how large those files can be if goto is used.
 
@hakre still, I think it's a poor judgement point
 
@ircmaxell thanks nonetheless :)
 
@ircmaxell When I put ^^ at the end of a sentence, I signal that you should not read the sentence verbatim to interpret it. ;)
 
@hakre thanks
 
11:46 AM
morning people
 
Fun Fact: Germany didn't made it into finals.
 
@hakre they did. but since UEFA is broadcasting only the pictures they want us to see, we'll never know
so tomorrow they will use material from previous games to create an illusion of an espita game
but it never happened
 
:P
yesterday, by PeeHaa
Schade Deutschland alles ist vorbei
:)
 
I am new to php can some tell how to convert my kohana prokect to simple php
or some give me use usefull tutorail of kohana
 
@Gordon You mean some leftover background radiation floating in the area since Chernobyl? And UEFA covers this? In reality all players are already dead, sad story, yes.
 
11:53 AM
or some give me use usefull tutorail of kohana
 
@Naveed: No offence please, but if you take a little bit care about your writing, you might be better understood by others.
 
@Naveed Try www.google.com
 
@hakre this morning there was a news item that the german woman shown shedding a tear after the second goal was fake. same as yogi playing the prank on the ball boy.
 
@Gordon I suspected that would be a fake when I saw it
 
oh Gordon i know google but i think some one in the group may be experienced so that could give me good suggestions.
 
11:58 AM
@Naveed there is two Gordons in here
 
Sorry my mistake ...m saying to @GordonM
 
@na
@Naveed what is kohana.?
 
12:18 PM
@Saurabh bottled coffee-like drink
 
@tereško really!! o_O
 
i guess nobody here was a fan of Kamen Rider
 
@tereško gud news, isn't it!! ;)
 
@Saurabh , i can understand the confusion, but this chat room is not an crowd-sourced search engine. If you want to know what is some 3rd party product, google it yourself.
 
12:31 PM
Okay, I'm somewhat pushing some boundaries here: Fatal error: Invalid opcode 137/8/8.
 
@ircmaxell recorabe?
oops
I mean recoverable
 
@NikiC heh, and i was thinking i could learn a new word here
 
@Gordon If you want to learn new words, go into the C++ chatroom and listen to @sehe ^^
 
riiigth ... the place where people, who cannot even spell in their own native language, gather
that's the place for learning new words
 
@tereško You would make a good PHP basher
 
12:40 PM
@NikiC my mom always told me not to go where the plague rules
 
oO
how old are you , Mr. MacLeod ?
 
@Gordon Just don't tell them that you're a PHP dev :P Then they won't try to crucify you.
 
/me is hungry
 
@Naveed Kohana sucks
 
tried , @webarto ?
 
12:46 PM
@webarto Orcas are cool and incredibly smart
 
@Gordon we can agree on that
 
@tereško over a year :P the more I use ZF the more I miss Kohana, although they are quite similar...
 
> PHP frameworks - sliding scale of "suck"
 
I'm in it for the money
 
@NikiC Nah, Warning at most
 
12:54 PM
@tereško me hungry too, paycheck not be
 
1:15 PM
pfffffff stackoverflow.com/questions/11274179/… +3 for the wrong answer
 
@ircmaxell why?
 
0
Q: Data base driven PHP - CSS dropdown menu

Abel JojoI have created a php file to retrive the privileges of each user aginst their db datas. And the code display it as a drop down box. The code below is used to retrive and dispaly it. //session_start(); include('db.php'); //include('../CheckSession.php'); $userid=$_SESSION['UserID']; echo'<u...

Please have some attention
 
Please, don't use mysql_* functions to write new code. They are no longer maintained and the community has begun deprecation process. See the red box? Instead you should learn about prepared statements and use either PDO or MySQLi. If you can't decide which, this article will help you. If you pick PDO, here is good tutorial.
8
also , @AbelJojo , your post is missing the "question" part
 
I need a metaphor equal to "many ways to skin a cat" that doesn't involve animal abuse.
 
1:33 PM
i have nothing
 
There is this question from english.se but all of the variations there involve killing an animal in one way or another.
Be it a cat, dog or fish.
 
> "There are more ways to the Woods than one"
this one seems ok
 
There's more than one path to your destination
Thanks @tereško
 
1:52 PM
The concept known as the law of the instrument, Maslow's hammer, Gavel or a golden hammer is an over-reliance on a familiar tool; as Abraham Maslow said in 1966, "I suppose it is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail." History The first recorded statement of the concept was Abraham Kaplan's, in 1964: "I call it the law of the instrument, and it may be formulated as follows: Give a small boy a hammer, and he will find that everything he encounters needs pounding." Maslow's hammer, popularly phrased as "" and variants thereof, is from Abr...
That's the link I'm using from now on for "I want to develop a desktop application in PHP" questions.
 
@GordonM sigh
 
@NikiC why recoverable
 
2:37 PM
@Gordon Amazing - I guess sometimes people are looking for the 1-liners?
 
3:32 PM
0
Q: warning installing php extensions from source

loveshI installed php 5.3.10 from source and it runs fine. But when i tried to install extensions from source packages like xdebug and mongo i get the following output after running phpize PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626 configure....

the problem is i cant install extensions like mcrypt because which are not installed via pecl
 
4:00 PM
Are there any other commonplace names for an object that acts as a tree traversal pointer? I can think of Traverser and Walker... Pointer, I guess... any others?
 
user image
3
 
Monkey maybe? with a swingTo(Node) method.
@hakre Haha. Nails! Nails everywhere!
 
it is always funny to see, how people cannot distinguish tools, that are made for putting nails in , from tools for pulling them out.
 
Also I'd say that image with the hammer is a sexist one.
 
@hakre ?
 
4:04 PM
As if only males could be that stupid.
 
a ?
 
Not that image I posted, the general image of that "hammer as a tool".
 
Is it possible to pull the thumb image of a Soundcloud track?
 
4:25 PM
24 mins ago, by Bracketworks
Are there any other commonplace names for an object that acts as a tree traversal pointer? I can think of Traverser and Walker... Pointer, I guess... any others?
I'm going with Visitor; it's using the "Visitor" pattern anyway. (still highly suggestible here)
 
4:43 PM
xivic.com familiar to anyone?
 
@webarto No, but their website is pretty.
 
5:02 PM
@NikiC: Wrote a post now, too: Where is your Vision Jeff?
 
5:14 PM
@hakre Agree. I didn't get his post either
I mean, I seriously didn't get it
I think it was just another PHP rant, without further insight
 
PHP rage is what all the cool kids are doing. With Jeff's over other PHP sucks posts is that it was just him ranting. It felt more like he was spitting on my craft then other articles that actually pointed out flaws in the language.
 
Well really, I summarized it for myself to "PHP dun goofed, so let's use Haskell Snap or something"
Which, alright; pick another language, write another language; these are reasonable alternatives.
 
@CharlesSprayberry I just don't quite understand why he is writing it
I mean, is he seriously concerned that people suffer because they use PHP? I seriously doubt so
 
I am in general agreement, with those who feel PHP is broken. I, however, don't believe jumping ship, building a new ship, or calling it a day is the answer. Community driven efforts to improve the language are the only answer in my opinion. I wish I knew enough C to be a contributor.
The only problem beyond that is public adoption of anything that's been fixed.
 
@NikiC Yes, this is exactly it. From his article I truly believe that he feels PHP is a blight on society and people who use it deserve to be a pariah for their blasphemy.
 
5:22 PM
Btw, I do seriously think that the language landscape isn't particularly good right now
I mean, the first language I'd consider after PHP would be Python
And even Python is already getting old and rusty
 
I think he should have waited to spill his rant until he had his new language up and ready. He blew his load too soon. He's a premature ranter.
 
@CharlesSprayberry Is there any information available about his language? I haven't scoured his blog or anything.
 
@Bracketworks No, just apparently from his PHP rant he's working on something that's gonna totally make PHP obsolete and, by using his new language, make all programmers not write bad code.
 
Yea, I did read his article; I just didn't know if he has source to back the claim.
What's the opinion of Ruby from the current attendance? (and I don't implicitly mean Rails)
 
@Bracketworks I've played around with it. If I had to do something in a web language and not use PHP I'd probably use Ruby over Python. Never have liked the concept of white space having code execution implications.
 
5:28 PM
@CharlesSprayberry Agreed. If block syntax was like the C-family, I'd be much keener to adopt it. The offside rule stinks like poop.
 
Hey, does this specific implementation of a deque have a name, and is it any good? goo.gl/QpY1i
Besides 'binary tree' duh.
 
@CharlesSprayberry I don't think he has something cooking. It's just that PHP is evil which is no news. And it does not make a difference either. If it wouldn't be PHP then it would be some other language. There always will be one language that is just not - well - good. Luckily we're only scripting and there are always a lot of other powerfull DSLs around us that work particularly well with scripting languages.
 
From the post, "I'm starting a new open source web project with the goal of making the code as freely and easily runnable to the world as possible."
He definitely is doing something on a technical level that will encourage people to not develop in PHP.
 
ok , whats up
 
Precisely what that is, I'm not sure. New language? Maybe. New way to deploy on an existing language? Perhaps. He was vague.
 
5:39 PM
@Bracketworks , in my experience , Ruby community seems very monolithic ( which means that almost all all ruby web developers use rails )
 
Just yakking about Jeff's post yesterday and alternative languages
 
also the community seems poorly educated about oop principles , patterns and best practices
basically - like php community , but with more ego and less free choice
 
@CharlesSprayberry Sounds like he wants to re-invent linux. That makes hardly any sense, we've been there how many years ago?
But interesting I must have read over that statement, let me check.
 
@CharlesSprayberry Well he was starting a project he needed a language for and considered PHP. That little PHP he encountered was already too much it looks like.
But he does not open an alternative path.
 
5:51 PM
@tereško "I already use Twitter, thanks."
 
@GregRos I'm not good at that, but maybe this list helps? en.wikipedia.org/wiki/List_of_algorithms
 
Oh man; my POC is working -- a generic Node/Rule driven framework; you can assemble trees for routing, authentication, ...you name it :)
Lends perfectly to RESTful implementations.
What a PITA though; trying to accommodate the absence of generics, type covariance, and the callable/Reflection boilerplate.
 
@Bracketworks Encapsulate what varies.
 
@hakre Bridge pattern?
(or some variation of it)
 
6:07 PM
No idea, I must admit I have no idea what covariance means in your sentence. what is the callable/Reflection boilerplate?
 
covariance = narrowing the accepted parameter types of an overriding method in an extending class.
callable/Reflection boilerplate = dealing with the fact that ReflectionFunctionAbstract should be a factory, accepting callable.
 
@Bracketworks I didn't look into it much, but from what I've seen it is too "hacky". Can't really put it in words, but Ruby had a Perl-ish feel to it. Like it's trying very hard to save characters, even at the expense of unintelligible code.
 
what is the reverse of "acronym" ?
 
I'd say expansion, but that's purely a guess.
 
.. you know what i mean
 
6:11 PM
@Bracketworks For that create your own callable type that encapsulates everything callable by PHP. Give it the invoke method. Provide a Reflection for it.
 
I managed to read "antonym"...
 
I should have even boilerplate code for that.
Let me check
 
@hakre S'what I did :) Action (they don't return, but act on context, so I used C#'s naming)
However, it wasn't working out as well as I had hoped, and I've reverted to callable, stripping out a bunch of magical overhead. The magical overhead was nice, but I'm working on an eloquent way to deal with the problem.
The callable issue was only worth mentioning because I had to find a place for the solution to live.
The major issue was type inference of Visitors to a given Node/Rule, but I solved that by taking the "I can't make it impossible to code wrong, so I'll just make it hard" approach. Covariance would be nice, but whatever. Callbacks can accept anything, and incompatible parameter types will scream if you dun goofed.
 
@Bracketworks No idea if it helps, that was one approach of that phase: gist.github.com/c31c9e3f27b4e51b6d88
 
@hakre Thanks :) When it comes time to factor back in the Action implementation, I'll probably borrow from that.
I can't wait to have a working version I can repo; so you folks can tear it a critical asshole ;) (no sarcasm)
 
6:26 PM
@Bracketworks NP, I added another file. Both was merely rotting on my disk.
it's from diverse language tests / plays.
 
Blarg, I herped.
 
@NikiC I don't I remember 'us' trying to crucify you, and you were quite clearly a PHP dev :)
 
greetings room
 
6:45 PM
Hi people, quick question, I have a if statement that checks for a php session variable, If it is not found it starts a session and assigns the variable. Now every time I refresh the page the session variable is not set. So I have to put session_start() before running the if statement in order for this to work. So every time the page is refreshed it runs the session_start(). Is that right? I thought session_start() should only get called once and stay active even when the page is refreshed?
 
yes
it is normal practice to automatically initialize session
 
@tereško Rhythm and Proportion is probably the worst aspect of the prototype.
From a typography perspective, anyway.
 
@Stuyvenstein , php is a share-nothing architecture. This means that there is not java-like JVM which can remember your state
@LeviMorrison , hard to tell , the competition is intense for the spot of the "worst aspect"
 
What @tereško wants to say: PHP need that session_start() otherwise it does not know that your script wants to make use of the $_SESSION feature.
 
@hakre way to tell it like it is
 
6:56 PM
Hi all respected geeks
 
Eh, I have an IteratorIterator and the offsetGet function works on it, albeit it's not defined?????
 
honestly I hate the IteratorIterator SPL class
not because it's not functional
but because it's called an IteratorIterator
 
tastes like zend framework
 
when's the next version of zend framework coming out
iirc it's been promised for a while
 
Code in question: codepad.viper-7.com/SDkhsa - scroll to end, there is a comment.
 
6:58 PM
@tereško Ok and if I set session autostart in php.conf I'm assuming it just removes the need for me to call session_start()?
 
don't do that
it kills the portability of your app
 
$next is the next from StringLines. Argh. He cool.
 
Just have it in a common.php or whatever that you include in all your files . If you aren't using a bootstrap
 
That is an IteratorAggregate
 
00:00 - 19:0019:00 - 00:00

« first day (623 days earlier)      last day (4310 days later) »