« first day (1558 days earlier)      last day (3393 days later) » 

7:00 PM
But I don't know what's the name of the table
holdon
 
information_schema is a database
it has multiple tables, one of which is INFORMATION_SCHEMA.TABLES
which has all the data you could want, and you can select it just like any table
 
Ohh, I assumed Tomáš was on about the command line
 
Nope
ircmaxell is right
I'm reading the documentation now
 
the best part of INFORMATION_SCHEMA, is that the basic usage is standard and portable across RDBMS
 
Thanks your maxell
 
7:11 PM
oh man uh
Trying to figure out how to correctly parse a number
            while ($this->isDigit($text[$i]) && $i < $len) {
                $digits .= $text[$i];
                $i++;
            }
            yield new Token(Token::NUMBER, (float)$digits);
This works, but is incorrect
because then 123abc would be interpreted as 123 abc and that can't be right
 
keep reading until you get to a non-number token
 
This is tokenising, not parsing the tokens
 
yeah, just thought of that
also: why is 123abc not right to treat like 123 abc?
at least at the lexer
 
@ircmaxell Good question, actually. I mean, it's not like 123 abc is valid syntax in the language
So the error would be caught...
 
7:16 PM
right, at the parser stage
 
Except, actually, 123 abc is valid syntax in this language
 
what does it mean?
 
GML has completely optional semicolons
 
why the hell do people do that
seriously
 
x = 123 b = 456 is equivalent to x = 123; b = 456;
@ircmaxell "Beginner-friendliness"
 
7:17 PM
"we're going to make this thing that's essential to readability and robustness optional because writing is so much easier than debugging"
 
                // Ensure 123abc isn't allowed
                if (!($this->isWhitespace($text[$i]) || $this->isPunctuation($text[$i]))) {
                    throw new ParseException("Invalid numeric literal");
                }
Just doing that.
 
well, in that case, what's actually wrong with x=123y=12 ?
is that a literal parse error?
 
I'd need to check against Game Maker's implementation. Hmm.
Oh, it parses!
 
also: you could parse a whitespace token
and then get rid of it at parse time
 
7:20 PM
>> To quote Emiliano Zapata "It is better to die on your feet than live on your knees".
> I don't think constructors are what he had in mind.
Winnar.
 
I guess I'll allow 123abc then. I can always add a code-style warning if I wish
The idea of this tool is to be as (unfortunately) loose as GM 8.0 was, so I can lint an existing codebase
and do fun static analysis stuff
 
Yo room 11 thanks for all your help lately. Had the job interview today and got the job \o/
8
 
congrats, @ThomasDavidPlat :D
 
Thanks! :)
 
7:24 PM
congrats
 
@ThomasDavidPlat grats :)
@ircmaxell Instead of adding a native keyword for it, I was thinking PHP could just add an extendable class for enums. Would that sound good? Based on this API maybe.
 
@ircmaxell That kind of thing, yes. Having __callStatic makes it nicer, but yes.
 
7:29 PM
Yeah
I like the approach of myclabs/php-enum in that it allows TokenType::Number() rather than repeating myself with new TokenType(TokenType::Number), say
Having it just be a class avoids new syntax and allows you to extend it in all the ways you can a normal class
 
fair enough
 
If we were to introduce it as a syntactic feature, I think that should be done if we're making tagged unions or algebraic data types or something. There's not really a need for it otherwise, IMO.
Ooh, and this way you could have a userland polyfill :)
(Except for any overloading, of course)
 
@AndreaFaulds this package could use some love as well: github.com/ircmaxell/SecurityLib/tree/master/lib/SecurityLib/…
 
Heh
My current plans for PHP 7 would hopefully make such packages unnecessary ;)
 
precisely why I directed that at you
 
7:36 PM
Is this to encourage me to keep up my bigints work? :)
 
or if it fails to guilt you into finishing a user-land implementation :-P
 
hah
bigints are making progress. weltling (Anatol) has made most important extensions compile, though they're probably not fully ported
Which means Dmitry can test it on WordPress or something and moan at me about performances
(won't someone think of the branch predictors????????)
 
sure, build a JIT engine, and the branch predictors can be happy
 
ircmaxell the INFORMATION_SCHEMA.TABLES shows only the "tables" table info lol. Then it shows it's data. I wanted to show all tables in database
So SHOW TABLES
 
@ircmaxell Not my thing... get NikiC to do it. ;)
 
7:43 PM
@TomášAresakMalčánek SELECT TABLE_NAME, SCHEMA_NAME FROM INFORMATION_SCHEMA.TABLES <-- lists out two columns, with every table and database you have access to
 
I don't know the table name lol
I want something like INFORMATION_SCHEMA.*
 
if you want to limit it to a single database? SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE SCHEMA_NAME = 'db_name';
 
I want tables
 
@TomášAresakMalčánek the literal string TABLES is the table
 
I know
But I don't want the table tables
 
7:44 PM
try running the literal queries I just typed
 
I want all tables
 
But I don't know the table name
 
@TomášAresakMalčánek YOU DO NOT NEED TO
 
7:44 PM
INFORMATION_SCHEMA.TABLES IS A TABLE THAT LISTS TABLES
 
@TomášAresakMalčánek SELECT TABLE_NAME, SCHEMA_NAME FROM INFORMATION_SCHEMA.TABLES <-- that exact query will show you every table on the database server
 
IF YOU QUERY IT
YOU GET A LIST OF TABLES
;)
 
user895378
I'm seeing a lot of ALL CAPS here. I'm just going to pretend it's all SQL query examples :)
 
why are you talking to the tiny-avatar people?
 
@ThomasDavidPlat congrats
 
7:45 PM
s/talking to/yelling at/
 
Table 'cdcol.tables' doesn't exist
 
@TomášAresakMalčánek why did you change the query?
 
@tereško lol
 
$sql = SQLAdmin_Config::connect();
foreach($db as $dbx) {
echo "<span onClick='showTables(\"$dbx\");' class='add-$dbx'>[+]</span> <a href='?database=$dbx'>$dbx</a><br>";
if(isset($database)) if($database == $dbx) $display = "block";
else $display = "none";
else $display = "none";

echo "<div id='tables-$dbx' style='display: $display;'>";
mysqli_select_db($sql, $dbx);
$query = "SELECT * FROM $dbx.TABLES";
$result = mysqli_query($sql, $query) or die(mysqli_error($sql));
for($x=0;$x<mysqli_num_rows($result);$x++) {
 
Internet Explorer is dead! Long live Spartan (which is totally NOT IE)
 
7:46 PM
why did you change the query
 
@TomášAresakMalčánek Stop editing ircmaxell's query
 
@TomášAresakMalčánek yes you did
 
@TomášAresakMalčánek Yes you did.
 
I want different databases
 
7:46 PM
$query = "SELECT * FROM INFORMATION_SCHEMA.TABLES";
 
That part is always the same
 
But I'm not looking for INFORMATION_SCHEMA tables
 
OH LOOK, A PENNY
 
Table 'cdcol.tables' doesn't exist
 
@TomášAresakMalčánek INFORMATION_SCHEMA is a meta database
 
7:47 PM
CDCOL.TABLES
Nope
 
about databases
 
But it doesn't show me
 
There's no table called TABLES in your databases
none
there is one in INFORMATION_SCHEMA
 
and if you want to limit it to the $dbx database: `$query = "SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE SCHEMA_NAME = '". mysqli_real_escape_string($sql, $dbx) . "'";
 
which lists tables in all databases
 
7:47 PM
INFORMATION_SCHEMA.TABLES shows me tables in the INFORMATION_SCHEMA
 
@TomášAresakMalčánek and other databases
 
@TomášAresakMalčánek it shows you all tables you have access to
 
☝︎ that
If you don't see your tables, well, you don't have access to them, presumably
 
7:48 PM
/me is off to the airport, later
 
I knew it lol. I was just testing you Keepo
Thanks guys.. :D
 
Hmm
PHP should do a "did you mean" on fatal errors for unknown names
 
and it should use twitter as its default error_log
 
@PaulCrovella We need an RFC that proposes sending a tweet every time someone turns on magic quotes.
Name and shame, yo.
 
8:06 PM
@PaulCrovella why
 
8:19 PM
I'm going mixed-mode, allowing both new Token(Token::NUMBER) and new Token(';')
 
user895378
ugh ... such a frustrating day of hunting bugs and failing :(
 
8:35 PM
@rdlowrey :(
 
Someone needs to rfc using UTC as default for date time and removing the warning.
 
@ircmaxell Do it.
 
@ircmaxell That would probably be the most important of all changes for PHP 7 :D
 
but it's a BC bre- oh wait
 
@AndreaFaulds My whole application runs out of the error handler and I rely on the timezone warning for it to be called!!!
5
 
8:42 PM
WHY DOES IT NOT WORK FOR HTTPS
FFS
 
@rdlowrey well… I feel like it was a productive day… we found several hard to catch and edge case issues…
and even fixed most of them
 
I'm not having a productive day
Tried working on three different projects, ran into algorithmic problems in all of them
 
do one project after the other :o
 
user895378
@bwoebi Well, to be fair, most of the positive contributions were yours. I basically just pushed incorrect fixes and said lots of variations of "Hmmm ... I don't know" :)
 
@rdlowrey yes, variations of I don't know, but "…". The But part was giving me a lot of new pointers to search :-)
 
8:45 PM
@NikiC for 7 deprecate the timezone warning by throwing E_DEPRECATED every time it's triggered, then remove it it 8. You MUST give time for people to update.
 
user895378
I need to build a 5.6 to test though, because I'm seeing some really wonky stream_select() behavior and I don't know if it's php7 weirdness or amp weirdness.
 
@PaulCrovella ow god
Warning: It is not safe to rely on the system's timezone settings. [...]
Deprecated: The timezone warning is deprecated and will be removed in PHP 8.
6
 
user895378
@NikiC \o/
 
user895378
Greatest day in the history of the PHP language? Maybe.
 
this is what Zapata had in mind
 
user895378
8:48 PM
Not kidding when I say I might have a PHP Timezone Warning Removal Party in real life when that finally happens.
 
I thought you were Sara for a moment, I need to eat and sleep...
$ php -r 'require "vendor/autoload.php"; $tokeniser = new ajf\mangl\Tokeniser(); foreach($tokeniser->tokenise("var a; a = 3;") as $foo) { echo $foo, PHP_EOL; }'
VAR_DECL "var"
IDENTIFIER "a"
";"
IDENTIFIER "a"
"="
NUMBER "3"
";"
it works ^^
 
@NikiC +1 LOOOOL
 
@NikiC actually it'd be hilarious if someone started trolling internals with that
 
user895378
I'm sad I missed my chance to vote on that lol
 
8:50 PM
"I'm sorry, but this is a serious BC break. You do NOT remove something without first deprecating it. The error handler for the timezone warning is widely used in my codebases."
 
@salathe where do you have that from?
 
@rdlowrey :-( Me too.
 
@bwoebi photoshop
 
@bwoebi salathe took an RFC and edited the HTML :p
 
@salathe photoshop? nah…
 
user895378
8:51 PM
Ahhh boooo. Still funny, but I was all like, "HOW DID I NOT KNOW ABOUT THIS!!!??!11"
 
@AndreaFaulds better :-D
 
hm no, that has 30 votes and derick on no, but not the same users
 
yep
 
@NikiC Nope, my vote isn't there
 
ThW
Morning
 
user895378
8:52 PM
@ThW morning
 
Haha, now you have to find the RFC vote that I edited :)
 
@rdlowrey we got me trolled m8.
@salathe you troll master :-)
 
AAAA why did I choose to use constants for token names
every reserved word in this language will conflict with PHP reserved words
:(
 
@AndreaFaulds VAR_
 
@NikiC Ugly, though.
I could prefix everything with T_
T_IDENTIFIER feels more serious
 
ThW
8:56 PM
ms adds an ui for 3d glasses to windows 10 wtf
 
But it's Token::T_IDENTIFIER, ew
@ThW makes sense
 
Looks fine to me... — Shomz 2 mins ago
-__________-
 
there are like ten web design listings at our college and they all require ASP.net or some other framework; none of them list PHP

I feel like a stranger in a foreign land now
 
9:00 PM
@AndreaFaulds So I'm thinking about how we can make foreach behavior more reasonable and with better perf characteristics. I think for by-value iteration we should make foreach behave as if it were working on a copy of the array. But I'm not sure how we can get away from the current approach for the by-ref case.
 
ThW
@AndreaFaulds btw T_SPACESHIP should that be something more like T_COMPARSION_OPERATOR or is that to early in the parsing?
 
@ThW T_SPACESHIP is cool though
 
ThW
Yeah, Enterprise development :-P
 
@NikiC Simple. Replace the internal array pointer with an array pointer tracker
 
@AndreaFaulds Spaceship error??
 
9:01 PM
Then emulate the internal array pointer for the very limited number of cases you need to
 
@AndreaFaulds that was my original approach
 
@NikiC OK, what changed your mind?
 
it's a rather lot of complexity for little use
 
@AndreaFaulds oh wow
 
lol
 
9:03 PM
tracking would also require an extra pointer in the HT structure
 
@NikiC Nope. At the cost of indirection, you can avoid using more space on 64-bit by indexing into a global set of tracked HashPositions. (or thread-local or w/e)
 
quick, everyone, what's the last line of code you wrote?
 
@AndreaFaulds eh, even more complexity.
 
to be perfectly honest....mine was the closing bracket, }

my life is sad
 
@NikiC :/
@NikiC Oh, I know.
 
user895378
9:07 PM
25 mins ago, by NikiC
@AndreaFaulds My whole application runs out of the error handler and I rely on the timezone warning for it to be called!!!
 
Get rid of the internal array pointer as exposed to userland
 
user895378
^ That makes two of us.
 
Keep it for the purpose of implementing foreach, but only foreach
Emulate it for current and such
Wait, then you need tracking still
argh :/
 
^^
 
...or do you?
@NikiC The internal pointer is no longer a pointer, it's an index. So we don't actually need to do tracking now, do we?
 
9:09 PM
@AndreaFaulds we no longer have memory safety concerns
the question is entirely in behavior
 
Right
You shouldn't be able to modify an array while using foreach on it
 
I just solved an interesting problem by executing CSS with PHP
 
@AndreaFaulds ^^ that ... may be unpopular :D
 
ThW
@AustinBurk css selectors or css?
 
I think it's pretty okay to iterate a copy in the by-val case (i.e. you can modify, but it means we'll separate and iterate the old one), but for the by-ref case we can't do that efficiently, at least I don't see it
 
9:11 PM
@ThW css
 
ThW
you have a css response generated by a php script?
 
so the client that views my pages will only accept one external css link
just...don't ask why.
 
@NikiC Well, not doing tracking would allow some modifications, right?
Such as appending
And removing, I think?
 
@AndreaFaulds just staying at the current position would make iteration behavior dependent on details of the hash implementation
e.g. say you append and a rehash occurs
 
I needed to append a new bit of styling to every stylesheet; but I don't want to have to modify every single one - there are more than a hundred because of theming - again, don't ask why there are that many..
 
9:13 PM
@NikiC Ah :/
 
<FilesMatch "\.css$">
AddType application/x-httpd-php .css
Header set Content-type "text/css"
php_value auto_append_file "/var/www/html/css/ds/sudomemo.css"
</FilesMatch>
 
which means we'll compact the data and the current index will point to a later element now
 
ThW
@AustinBurk easier to implement - I would do the same I think
 
ThW
keeps requests on the page under control
 
9:14 PM
Damn, that space trial video blew my mind
 
@Phil_1984_ lol
 
wtf is it
 
@ThW I didn't make the client, I just have to deal with it and work with its many quirks :P
 
ThW
Yeah but opening for only one custom css url makes sense imho
 
@Phil_1984_ it's a mash up of Phoenix Wright: Ace Attorney (a lawyering adventure game released in 2001/2005 for the GBA in Japan/DS worldwide (respectively) by Capcom) and a Portal 2 meme (it being the hip game of 2011, by Valve Software)
@NikiC Wait, why does HashTable need to track it?
Think about it. Can't you just store the key and check if the HashPosition is invalid?
 
9:17 PM
@AndreaFaulds unset current key, set current key again -> you'd end up at the end of the HT
 
@NikiC if (myHashPos != ht->nInternalPointer) { zend_hash_set_hash_pos(&myHashPos, myKey, myIntKey); } (pseudo-code)
Or... why wouldn't this work?
 
@ThW Yeah, I suppose so.
 
OH I see what you're saying
Hmmm
 
@NikiC is there any way to display in gdb (master) at what line number the various running generators actually are?
 
@NikiC I was going to suggest storing the next key, but that also doesn't work :p
 
9:19 PM
@AndreaFaulds we're already doing a hash based comparison. but all that still requires the use of the IAP to compare against and use as the canonical source
@AndreaFaulds yeah in practice its the next key, but point still applies
 
@bwoebi "various"?
 
@NikiC yeah, more than one generator running and I don't know the exact one…
 
well dump a bt?
if by "running" you mean not being suspended
 
I'm not in the gnerator…
nah, I mean the existing gens
sorry for my wording
 
9:21 PM
yeah no, you can't do that
 
@NikiC Add a "tracked" bit to the current bucket and add a global stack of HashPositions.
 
there's no list for "all existing generators"
 
@DanLugg imagine this flow in code execution
 
There must be somewhere you can stuff that bit (like the string pointer >:D... or the zval.)
 
actually kqueue() (libuv) somewhere blocks and I'd like to know where I am in my generators…
 
9:22 PM
@AndreaFaulds and two concurrent iterators?
 
@NikiC It's a stack. You can check if there were multiple iterators.
 
I mean how does that interact with "tracked" bits?
(not that I see what the bits are for)
 
@NikiC The canonical source of whether it's tracked is whether anything in the stack points to it
 
ah, so essentially what you want is instead of a HT-associated tracker list a global one and all HTs on every operation need to check against that?
 
So when you spot that you're modifying a tracked bucket, you'd then check the stack. After handling everything there, if it's still tracked by the stack and then set/unset bit as necessary
@NikiC No, only on operations where the bucket has the tracked bit
Ideally, an HT-associated tracker list + tracked bit
Optimisation :p
 
9:26 PM
@AndreaFaulds So in that case you need to check the whole stack for every iteration
 
@NikiC Only if the bucket is tracked and you're modifying it.
 
@AndreaFaulds an HT-associated tracker list is what we started out with ... the one taking the extra pointer ^^
@AndreaFaulds I mean to manage the tracking bit
 
@NikiC I know...
 
how to check if any errors were thrown during runtime? Just boolean needed
 
@NikiC No... you only need to update the tracking bit if you've hit it
 
9:27 PM
It we make it HT-associated we don't need the tracking bit
 
@animaacija were town?
 
*thrown
 
And you should ideally have the tracking bit if it's HT-associated
Otherwise you need to traverse the whole tracker list on every modify
While this way you just need to check the tracking bit on every modify
 
@AndreaFaulds you need to potentially remove a tracking bit on every iteration, right?
 
How about using your error log..?
oh wait
 
9:28 PM
@NikiC ...oh, right :/
welp
 
@AndreaFaulds from previous testing, it's not really a concern for ht-associated list
 
well i know only this error_reporting(E_ALL);
ini_set("display_errors", 1);
 
@animaacija php.net/manual/en/ref.errorfunc.php If you want to know during runtime, there's some stuff here that may be suited for you
 
uint32_t          nTableSize;
uint32_t          nTableMask;
uint32_t          nNumUsed;
uint32_t          nNumOfElements;
Get rid of one and we have space for a pointer to a list of tracked positions
;)
 
^^
 
9:31 PM
This could also mean we don't need to copy when foreaching an array within a foreach of the same array
 
error_get_last() ^^ true of false ?
@AustinBurk thanks
 
foreach($arr as $a) { foreach ($arr as $b) { } }
 
@AndreaFaulds or generally with rc>1
 
well… now I added a stupid tick handler which outputs me the current file and line :-D
 
@NikiC :D
 
9:32 PM
that's part of the point of the change
 
Is nested foreach done just by ++ the refcount?
 
no
 
nApplyCount?
 
whether we copy is refcount based
 
Right, and a foreach ++ the recount?
 
9:34 PM
if it doesn't copy, yeah
There's 100 lines of code dealing with refcount/copy management for foreach
 
D:
@NikiC nTableMask is just a clz/bsr of nTableSize, right?
 
Hi all !
Do we already have xdebug for PHP 7?
 
yes
but my first question would be why do you ask?
 
@AndreaFaulds ... how does clz come in here?
 
9:39 PM
Oh wait no I'm silly
I'm thinking of the number of elements
 
hello from the airport :-D
 
The table mask is just 1 << nTableSize - 1, right?
 
@AndreaFaulds Just nTableSize - 1. Or 0.
 
@NikiC Ah right, you're not storing the log2 of the table size
In that case, kill it!!
 
@AndreaFaulds we'd have to handle the 0 case, but yes, it could theoretically be dropped
 
9:41 PM
In other news, GCC has __builtin_clz. I did not know that. Time to strike another item off my bigints TODO list...
 
ThW
@ircmaxell hello :-)
 
@NikiC I can't remember, is the 0 case where there's no table because it's packed?
 
@AndreaFaulds well, you need some way to distinguish an uninitialized array from one with no elements
unless you just don't
 
@AndreaFaulds yes, either packed or uninitialized
 
Ah
Wouldn't it be better to either have a shared uninitialised array, or to always init arrays with a certain amount of space?
Is your flag space full, btw?
 
9:44 PM
@animaacija no problem
 
no. and we do already have a flag for uninit
 
Yeah, I just found the define set
 
@ircmaxell just doing some testing
 
@NikiC You have a packed flag too.
 
@AndreaFaulds yes
as said, we can check it, just no longer implicit
 
9:48 PM
I really need a counter: how often did I confuse strpos and in_array argument order...
 
1 hour ago, by Paul Crovella
@NikiC for 7 deprecate the timezone warning by throwing E_DEPRECATED every time it's triggered, then remove it it 8. You MUST give time for people to update.
also: I fully support this course of action
 
@PeeHaa hehehehehe
 
:)
 
That moment when a "chief architect" downvotes you because they cannot understand basic mysql problem
ohhhhh
 

« first day (1558 days earlier)      last day (3393 days later) »