« first day (1683 days earlier)      last day (3262 days later) » 

7:00 PM
@MarceloCamargo I was about to tell you to use token_get_all instead of writing your own scanner
 
That's really good. I was about to redo this job, lol.
 
because the PHP lexer is crazy and it's hard to write a scanner from scratch... you have nested heredocs, inline html, etc
 
It becomes easier thus.
Do you think it will be need to add a special token for %% or match two % tokens?
 
if you write a token stream class it can take care of detecting the opening and closing token sequence for you
when you find '%' you just need to peek the next token and see if it's '%' again
 
I see. I'm gonna do it right in the scanner.
 
7:09 PM
@marcio Good point, are there any other keywords that we are likely to need?
 
@NikiC from my part, no. My RFCs are going to reuse keywords that already exist. But we better make a list and try to solve it in a single thread.
 
Good evening all!
I got a problem with Ghost users or it's also called invisible bans.
 
@VeeeneX hell ban?
 
Because I'm doing select query with offset and that's the problem
 
oh lol
 
7:18 PM
@marcio, what file exactly is responsible for the lexical analysis on C source?
 
@PeeHaa you don't know it?
Reddit has it, I'm not sure
 
@MarceloCamargo it's a generated re2c scanner Zend/zend_language_scanner.l
just click the link Nikic posted ^^
 
Ah, I see. Thanks!
 
And the question is What's the most efficient way how to do that, Here is a solutions that I had found Connect user invisible posts with database and do select query depending on insertime but I'm not sure about it imaging loading all user's posts to php. That's crazy.
 
7:23 PM
@iroegbu ironically serverfault is down for me right now
 
@marcio, I'm using "token" and "[x]translate" as reserved keywords there. Do you think this can be problematic later?
 
there, where?
 
Adding them as keywords to be parsed on lexer. An option is also look for identifiers that match with preprocessor keywords.
"to be parsed on lexer". So redundant.
 
you have the %% already that acts like a sigil, so it's unlikely that you need to reserve anything
 
Ah, I see.
Matching non-terminal symbols on preprocessor, with a semantic-also analysis, @Andrea's :> operator could be defined as:


%%
operator LEFT <left> (:>) <right> => { <left>[makeStr(<right>)]; }
%%
Mozilla's Sweet.js has a very similar grammar.
 
7:31 PM
would this be enough to support things like this:
%% xtranslate pp\Queue<$1>
    class {
        protected $items = [];

        function push($1 $item) : {
            $this->items[] = $item;
        }
    }
%%

class Task { /* blah blah */ }

$queue = new pp\Queue<Task>;
$queue->push(new Task('buy milk'));
 
In a very similar grammar, such as IRCMaxell generics implementation does.
 
or at least allowing you to define the pseudo namespaced pp\Queue<Something>, with 'Something' being an argument
 
But this feature would require anonymous classes.
 
we have anonymous classes, PHP7 has it
 
Then, it is totally possible. I did a similar implementation with Harbour.
 
the example would process to:
    class Task {}

    $queue = new class {
        protected $items = [];

        function push(Task $item) : {
            $this->items[] = $item;
        }
    };

    $queue->push(new Task('buy milk'));
@MarceloCamargo cool, that's expressive enough :)
 
Why this echo"<td>" . date('d-m-Y', strtotime($row)); . "</td>"; wont work?
anybody? cant find the bug
 
@WTFZane Depends a ton on what $row is
 
i cant find*
hey.
i don't think thats the problem, because the error it is giving me is a syntax error that expects a "."
 
7:40 PM
@WTFZane Oh. Take the semicolon after date out
 
I think I can't.
echo "<td>".$row['book_title']."</td>";
echo"<td>" . date('d-m-Y', strtotime($row)); . "</td>"
My code is like that.
 
A Sweet.js sample without transforming a token into a string for :> operator: sweetjs.org/browser/…$le‌​ft,%20$right%20%7D%20=%3E%20#%7B%20$left%5B$right%5D%20%7D%0A%0Afoo:%3Ebar:%3Ebaz
 
echo "<td>".$row['book_title']."</td>";
echo"<td>" . date('d-m-Y', strtotime($row)); . "</td>";
 
@WTFZane echo"<td>" . date('d-m-Y', strtotime($row)) . "</td>";
 
Broken link. Tsc, tsc.
 
7:42 PM
Don't use semicolons when you're concatenating like that
 
Oh.
I didnt notice that
Thanks @Machavity
but how can i fetch the data from the database?
 
@WTFZane I find buckets work great. But your data is probably not written on ping pong balls and fetched by gnomes from deep within the earth so YMMV
 
Thanks man, i've fixed it out
Thank god this room is created.
 
@MarceloCamargo :O I start to like the chicken operator :>
 
7:46 PM
what is YMMV?
 
I use Sweet.JS to write small domain specific languages. It has semantic control and a powerful macro system, as powerful as Harbour's implementation.
 
What is love?
6
 
lol
 
Baby don't Hertz me
 
"The chicken operator". What a nice name!
 
7:49 PM
@PeeHaa noooo, music is on my head
 
:)
 
"What is love" reminds me "Wat"'s meme.
 
what is the origin of that "what is love" meme?
 
Não entendir, yay.
 
Man is Laravel confusing to me.
 
8:01 PM
Laravel confuses everybody, man.
 
I love the idea of it..
But it's so complex for something so simple.
 
What is the idea of it exactly?
 
Does Laravel like code generator?
 
MVC is the idea of it.
And I love the thought of MVC architecture...
 
Is there anybody who knows phing
 
8:05 PM
@BrockB. ok...
What does laravel have to do with mvc again? :P
 
Am I being trolled right now?
 
AFAIK laravel markets itself as a lot but not mvc anything (rightfully)
 
Laravel is a PHP framework that employs a MVC architecture.
 
I hate to be the one to tell you this, but no it does not :)
They don't even mention mvc anywhere on their website
 
@BrockB. it actually doesn't
 
also, a framework really cannot implement an architecture, it's what your application does or does not
 
@BrockB. It's like saying all cars can jump 3 school buses. I'm sure you can take a car and make it do that but not all cars can (or should) do that
 
Are you telling me that Laravel does not implement Models, Views and Controllers?
 
I'm not even talking about technical issues with the term mvc in combination with laravel.
 
@BrockB. We're saying that you CAN do those things, but you don't HAVE to do them. Contrast that with ZF2, which REQUIRES you to do that
 
8:12 PM
Gotcha.
But the point of Laravel is aimed at developing applications in a MVC structure, no?
 
No
Do you say anywhere on their site the term MVC?
 
@BrockB. no, no and no
 
If it would be aimed at something I would at the very least expect some mention of it
 
it implements a templating engine and ORM
 
I'm just going on what I've read in regards to the framework.
And everything I've read or watched in regards to Laravel (other than their documentation) mentions MVC.
 
8:16 PM
and most likely it has been bullshit
@BrockB. what laravel/codeigniter/cake/yii users describe as "mvc" is nothing but a clone of rails-like architecture
 
Well, I mean Laracasts (which is directly linked on Laravel's website) directly talks about MVC in their introduction videos to Laravel.
 
lol
template is not a view, active record is not model and controllers do not contain application logic
 
@NikiC I'd be in favor of not reserving void, to keep the barrier to use void later high…
 
If somebody has a good naming idea for my chat app, just drop your idea here. /cc @PeeHaa ( just stole your issue :P )
7
 
@BrockB. , if everything you think you know about MVC you learned Laravel, then I am quite sure that most of it is completely wrong
2
 
8:20 PM
@kelunik I need more booze to come up with something either genius or retarded
 
@tereško No need to be condescending.
 
@tereško Finally I complete agree.
He is not being condescending, he is just being realist.
Yay.
 
@BrockB. The thing is the words you are actually looking for and should spend time achieving are on this page en.wikipedia.org/wiki/SOLID_%28object-oriented_design%29 (at least it's a good start)
(imo)
 
user1994804
Hey guys, I was wondering if this is the correct way of sanitizing data before insertion
 
That is a million times better than being able to say: look imma use models!
 
user1994804
8:24 PM
$Var = mysql_real_escape_string(ucfirst($_POST['Something']));
 
no
 
user1994804
Could u correct me?
 
Use prepared statements and bound parameters
 
user1994804
Ah
 
You are using an "ancient" database api
 
user1994804
8:25 PM
Yea I know but I guess it'll have to do for now
 
mysql_* functions aren't supported anymore, guy.
 
@YourAdrenalineFix No you don't
 
You might be interested to look there stackoverflow.com/a/60496/576767 @YourAdrenalineFix
 
user1994804
Yep, You guys are suggesting PDO I think
 
user1994804
still got other more important stuff b4 learning pdo
 
user1994804
8:27 PM
but Thank You @FélixGagnon-Grenier I WILL be studying this page
 
@YourAdrenalineFix No, no, no. Do not combine sanitzation with validation!
 
@YourAdrenalineFix so you decided to learn something wrong and outdated befioehand ?
 
user1994804
Yep
 
that's really strange line of thinking
 
user1994804
Not really, I started at the bottom
 
user1994804
8:28 PM
and learned the ropes
 
The bottom should not be the waste dump.
 
user1994804
upwards
 
user1994804
its not
 
user1994804
the bottom is a the start of a learning process
 
8:28 PM
No, we're pretty sure ext/mysql is in the trash. It has been for OVER A DECADE. Not making that up.
 
user1994804
Im not doubting you
 
@YourAdrenalineFix this makes me question the source you have been using for your studies
3
 
^^ that.
 
user1994804
but a lot of the new stuff just changes the call n ame
 
user1994804
just youtube tuts
 
user1994804
8:29 PM
the ones with the most traffic
 
lol. if those youtube tuts do use mysql_* extension, please do link them here so we can massively downvote them
 
Can we safely report them as containing unsafe content?
 
user1994804
a lot of the new syntax is great and all but its good to learn the basic first
 
@FélixGagnon-Grenier that won't make a dent
 
user1994804
8:31 PM
They dont anymore
 
@YourAdrenalineFix It's not just syntax, it's an entire way of thinking.,
 
@YourAdrenalineFix then why didnt you start by learning assembler ?
 
user1994804
yea yea yea i know i know
 
you line of reasoning is broken
 
user1994804
nah
 
user1994804
8:31 PM
a lot of people say so
 
user1994804
I dont use word preess or anything of the sort
 
ya know what, I don't care .. off ya go to the ignore list
 
user1994804
Notepad++
 
user1994804
@tereško whats your problem?
 
user1994804
jealous?
 
8:32 PM
lolwut
 
YourAdrenalin, mysql_* functions aren't anymore supported.
They are yet more than deprecated and have big security issues, that's why we have PDO.
 
As in: you should really turn that windows xp box off unsupported
 
user1994804
Yea that's what I learned at like the last mysql tut I spent a year watrhing and studying
 
mysql_* aren't the basics. It is an old and obsolete security hole set.
 
8:33 PM
no, ext/mysql is Windows 2000, not XP.
 
lol @kelunik I only now noticed you have copied the thing verbatim :D
 
@Charles you both are wrong
NT architecture is what powers windows 10
 
mysqlnd?
 
user1994804
Yes, thats what ive learned however when you know nothing you gotta start somehewr
 
:p
 
8:34 PM
what you are looking for is either 98 or ME
 
user1994804
typing fast as I can
 
user1994804
wasting time I could be studying pdo
 
user1994804
and the links u guys provided
 
@tereško Oh god ME. Now that was godawful
 
user1994804
whew...
 
8:35 PM
@PeeHaa Yeah. :P
 
user1994804
ttyl
 
@PeeHaa true, but it also came with a l;ot of new stuff
for example plug'n'play was introduced in ME
 
@tereško Even it it would have been a gorgeous blond standing in front of me naked I wouldn't touch ME with a ten foot pole
 
OMG, that joke....
 
I think we had to use it at some point in school. I blame that for being AWOL that much smoking pot to forget about it
 
8:43 PM
@YourAdrenalineFix Look at the manual entry. Do you see the giant red box?
 
What is a decent torrent client on the mac? transmission?
 
I +1 for transmission, fwiw
did not tried a lot of other ones, mostly because I could do what I want with transmission.
 
@FélixGagnon-Grenier I only need it to do two things: 1) download torrent 2) not be slow
 
then I don't think bittorrent (having unarguably lots more customization options) would be necessary
 
9:07 PM
Hey anyone here?
 
If you have a question, you should ask it in a concise way directly.
 
Not really a PHP question, more or less programming in general. How possible is it to take two coordinates from inside of a game and convert them to display on an image map (identical to an in-game map)
 
That seem too broad for chat. stackoverflow.com/help/how-to-ask
for me, that is. what is "inside a game". which "image map". is it a website? pure javascript?
all local application?
 
Anonymous
/ me wants to make the first php7-only framework
 
The game has constant coordinates for your location (Driving game). I've got a scaled down version of the in-game map displayed on a website as an image. I want to convert those in-game coordinates to the image pixel coordinates to display drivers locations. Not sure where to start with this.
 
9:15 PM
MUD
 
sup?
 
me @Sherif?
 
I'm referring to the mapping question.
MUDs teach you pretty solid basics about how to map boards :)
 
A MUD (/ˈmʌd/; originally Multi-User Dungeon, with later variants Multi-User Dimension and Multi-User Domain), is a multiplayer real-time virtual world, usually text-based. MUDs combine elements of role-playing games, hack and slash, player versus player, interactive fiction, and online chat. Players can read or view descriptions of rooms, objects, other players, non-player characters, and actions performed in the virtual world. Players typically interact with each other and the world by typing commands that resemble a natural language. Traditional MUDs implement a role-playing video game set...
 
9:22 PM
@Sherif A MUD is a text-based (M)MORPG.
 
usually entails not always.
There are graphical MUDs.
 
Oh sure.
Also: RuneScape, the MMO, started as a text-based MUD actually.
 
Back in the day MUD was all the rage, but it also taught you a lot of basic programming concepts.
Like recursion, btrees, etc...
 
@Sherif By writing one, or through scripting?
 
By writing one.
 
9:27 PM
Ah :)
Recursion is something I wish I had known years ago
Though that is the fault of imperative programming
If recursion is your only means of flow control, I suppose you'd figure out how complex recursion works quicker
 
I learned flood-fill by reverse engineering a MUD game when I was teaching myself C.
 
Flood-fill is what I was thinking of!
It's a thing I've needed to do, but had no idea how to do.
 
Well, it's usually one of those things you need in a lot of different use cases, but typically don't know of a very efficient way of doing it until you learn the theory behind it all :)
 
I have no idea how to do it efficiently. But I do know how you could possibly do it, now.
 
The length to which I do not understand what is written here sometimes makes me think about quitting programming altogether...
 
9:35 PM
@Andrea It's like learning the lesson after you've taken the test. For example, you try to build a 3D video game rendering engine for the first time and discover that you've had to learn about these things called binary trees in the process. That's what happens when you didn't go to school but learned on the job :)
The exact opposite is when you learned about binary trees in school but never actually understood the practical application until you've seen it in practice.
 
I used Prolog in school, have never needed it for anything.
 
You may not need the language itself, but the knowledge and insight you gain from knowing about it and understanding how it works will likely give you concepts that you may find very useful in other applications down the road.
It's like how most of us learned Logo in school when we were kids.
You might not think it was useful then, but it did leave you with some residuals concepts of state, spatial partitioning, and vectoring.
Whether or not you actually remember that or just relearn it from a different perspective later on, however, isn't always clear :)
 
hahahaha my semicolon key just died
as did a whole column of the numpad
 
lol
@Charles sounds like you lost a channel on your keyboard encoder
 
The problem being I'm 300 miles from work... they're getting a replacement overnighted. In the mean time, I get to c&p my semicolons.
@ircmaxell Yup. We're kinda hoping that it isn't some sort of progressive organ failure, so to speak.
 
9:50 PM
LOL, copy-and-paste semi-colons
now don't you wish you used Java
 
@Charles I bet you wish you were using Python now :P
 
sigh.
 
10:01 PM
@ircmaxell Regarding the libsodium RFC thread on internals, are you planning to talk about the 'PDO' like wrapper soon? Because that thread currently isn't being that productive, and it would be good to turn it positive. Not sure why Scott hasn't mentioned it, and was wondering if it was because you guys wanted to get it more finished first.
aka not sure if that gist is privte or shareable.
 
10:18 PM
youtube.com/watch?v=4N3N1MlvVc4 .. kinda made me feel too damn old
 
10:32 PM
@Danack deja vue
 
seems to happen a lot round here.
aka I didn't see a reply, so repeated the q.
 
yeah, no issues
 
So okay to point people to that gist? Or just suggest the idea?
 
Hi can someone help me setup my first PHPUnit test case
Fatal error: Class 'PHPUnit_Framework_TestCase' not found in C:\xampp\htdocs\money\tests\MoneyTest.php on line 3
I cant solve this for few days now
 
@CoolDo how is the phpUnit integrated in your environment ?
pear, composer, manually unzipped?
is it installed globally or per project?
 
10:39 PM
@tereško I tried using composer
I read that thats how I should do it
 
what are you using now?
 
composer
 
is phpunit installed globally ?
 
no
im testing in a test folder
 
is the problem on your development machine or on the production/staging server ?
 
10:41 PM
im testing in my dev machine
 
then first step would be to install phpunit globally (using composer)
 
then you need to check php.ini and that the include path is set correctly
 
thats the example I wanna try
ok I will try that
 
are you on windows, osx, bsd or linux?
 
10:48 PM
@Danack I sent the idea
 
11:00 PM
awesome. Also, scott replies very fast.
 
I don't even.
 
11:22 PM
 
@ircmaxell not sure if that's related to PHP 6 missing…
 
:-)
 
user895378
@NikiC @LeviMorrison FYI that return types memory leak I ran into this morning is fixed by @bwoebi's commit here github.com/php/php-src/commit/…
 
@rdlowrey ^ Added a test in the following commit
 
11:39 PM
I've found out how rdlowrey is so productive:
 
@Danack I have no idea what's stupid about that law :-D
@ircmaxell You're not in hurry with the next part about parsers?^^
 
@bwoebi "not in hurry", more just busy
this week is a major conference
 
which one?
 
@ircmaxell ...what?
 
@Andrea yeah, broken poor PHP 6… and PHP 7 is sad to not be PHP 6.
 
11:48 PM
@bwoebi ?
I mean
I suppose it could be a joke about 7 not "having Unicode"
 
@Andrea you know, PHP 6 tried to add unicode support or so
 
I guess that makes the most sense
 
What exactly would unicode support mean? Things like strlen() defaulting to return the number of UTF-8 characters, not bytes?
 
Weird reading a comic strip about some project you had actually worked on ... Something you helped name.
@Trowski Precisely
 
Honestly that sounds more annoying than useful.
 
11:53 PM
PHP 7 wasn't my idea. But I wrote the RFC!
@Trowski how?
 
Would there then be other functions for finding the number of bytes?
 
No, but byte strings would be a separate type.
You don't have UTF-8 strings, you just have Unicode strings (sequences of codepoints) and byte strings.
strlen would work on both
 
Ok, so you could use strlen((binary) $string).
Or $string = b'constant string';
That would be just fine. People that actually want to work with binary strings probably would know what they're doing.
 

« first day (1683 days earlier)      last day (3262 days later) »