« first day (2051 days earlier)      last day (2911 days later) » 

6:00 PM
Let me check how horrible creating the structure is manually with pdo
 
very.
 
Yeah :(
        $dbConnection->exec($query);

        $dbConnection->exec(sprintf('ALTER TABLE users OWNER TO %s', $username));
        $dbConnection->exec('CREATE SEQUENCE users_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1');
        $dbConnection->exec(sprintf('ALTER TABLE users_id_seq OWNER TO %s', $username));
        $dbConnection->exec('ALTER SEQUENCE users_id_seq OWNED BY users.id');
        $dbConnection->exec('ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval(\'users_id_seq\'::regclass)');
^ single table
Ugh damnit. I just realized I cannot depend on having a local sql client
meh screw it. I'll try to come up with something when it's starts to annoy me enough
 
I prefer double-quote to escape character
or string concatenation
 
I used to too, but the number of string literals in my queries are very limited
I think 95% of the cases I am binding the data when I need it
 
Wes
trivia I have never used sprintf/printf and co. in my entire life :B
though i have a gettext kind of thing, which is similar
 
6:12 PM
haha me too. I'd better use it.
 
@Wes It can certainly be useful. In most simple cases I just prefer concatenating though
 
Wes
problem is having to remember all the formatting options
 
Meh we have docs for that
You just need to remember that the functions are available
 
Wes
for example the padding thing. [%10.10s]
 
6:21 PM
@Wes and arguments of functions
 
Wes
i have no idea what that means. i'd just use str_pad rather than checking the documentation
 
#bestToolForTheJob
 
Wes
:B
 
i always forget the arguments. for instance; in_array(haystack, needle) or in_array(needle, haystack)
:/
 
@AdilIlhan array functions needle, haystack, string functions haystack, needle
(unless a callback is involved)
Not saying it's not insane, just saying it's not that bad in most cases
 
6:30 PM
:)
 
I have a query which has a IN() on its WHERE clause. Something like this: . . . WHERE id IN ($ids). sometimes $id is containing 40 numbers, is that fine?
 
Wes
!!docs memory_get_usage
 
[ memory_get_usage() ] Returns the amount of memory allocated to PHP
 
Wes
aw no arglist in the preview?
memory_get_usage(!$made_up_usage) is one of my fav arg names
 
@Wes I am agree. It could totally do with an arg list
 
Wes
6:32 PM
 
hint hint nudge nodge nod nod wink wink
 
Wes
are you talking to me?
 
Should be easy to add. Do it!
You get to parse HTML!
Bitches will love you for that!Q
 
Wes
too lazy
 
Hmmm travis thinks my build is failing, but cannot be arsed to tell me why
Oh wrong tab :P I still have php nightly in there
 
6:37 PM
@Shafizadeh, i don't know your use case. but most of uses of "where in" can be replaced with a "join"
 
@AdilIlhan Yes it can be ..
 
\o/ build passing. Ship it!
hehehe
 
@PeeHaa uuuuuuh … well… not?
 
:p
 
Ekn
7:01 PM
evenings
 
ma'am o/
 
Ekn
how's your weekend going, sir @PeeHaa?
 
Pretty good consider the fact that I am doing html+css :-)
 
Wes
\o
@PeeHaa oh btw if you need help...
 
@Ekn How's yours milady?
@Wes Shoot
 
Wes
7:05 PM
@PeeHaa you shoot :P
 
Ekn
Quite good considering I slept 5hrs only, will work on some side projects again after a bit alcohol, señor :)
 
@Ekn Waaaaay ahead of you :P
 
Ekn
hehe I guessed so :p
 
;-)
@Wes Ooooh yeah misread that :P
@Wes I think I will make some more pages and dump it to you entirely at some point. atm I only have an install page
 
Wes
!!eval if(PHP_VERSION === '7.0.7') switch(random_int(0,2)){ case 0: echo 'get pizza'; break; case 1: echo 'mcdonalds or smt'; break; case 2: echo 'something healthy'; }
 
7:12 PM
[ 7.0.7 ] get pizza
 
Wes
wait for it
 
:P
 
WTF IS DAT YO!?
HE JUST ASKED YOU A SIMPLE QUESTION
oh stupid non braces
@Jeeves sorry bruv
While complaining... is there a php pretty formatter?
 
hmm php-fmt?
 
7:15 PM
!!google php-fmt
 
@PeeHaa Today is Saturday. And Sunday comes afterwards
 
FUCKING ASSHOLES
!!command unmap google
 
Command 'google' is no longer mapped
 
Wes
ahahah
 
!!google fucked up
 
7:16 PM
!!command map google google
 
Command 'google' is now mapped to Google # Search
 
!!google php-fmt
 
Search for "php-fmt" (https://www.google.com/search?q=php-fmt&lr=lang_en)
• GitHub - phpfmt/fmt: phpfmt - php code formatter - phpfmt - php code formatter. Contribute to fmt development by creating an account on GitHub. (https://github.com/phpfmt/fmt)
• GitHub - phpfmt/sublime-phpfmt: Plugin to format… - Plugin to format PHP code - supports also PSR1/2. Contribute to sublime-phpfmt development by crea… (https://github.com/phpfmt/sublime-phpfmt)
• GitHub - phpfmt/vim-phpfmt: Vim plugin for php.to… - Vim plugin for php.tools. Contribute to vim-phpfmt development by creating an account on G
@PeeHaa Command 'google' is already mapped. Use !!command list to display the currently mapped commands.
 
@Jeeves lol
 
Wes
@PeeHaa ok. don't waste time doing css then :B just make a html 3.2 page
 
7:17 PM
k
 
Wes
brb pizza \o/
 
Of course :P
@AdilIlhan That looks like what I need
 
!!google fabien's psr fixer
 
Search for "fabien's psr fixer" (https://www.google.com/search?q=fabien%27s+psr+fixer&lr=lang_en)
• The PHP Coding Standards Fixer for PSR-1 and PSR-… - The PHP Coding Standards Fixer for PSR-1 and PSR-2. (http://cs.sensiolabs.org/)
• fabpot/php-cs-fixer - Packagist - The PHP Coding Standards Fixer tool fixes most issues in your code when you want to follow the PHP… (https://packagist.org/packages/fabpot/php-cs-fixer)
• Using PHP-CS-Fixer to fix up your PHP code - Matt… - I've been on a PSR-2 kick lately, so I figured why not finally try out fabpot's PHP- CS-Fixer. Note… (https://mattstauf
 
and if you need a fixer...
 
7:21 PM
neh. I just need something that format crap like this on 3v4l:
!!eval if (true) { echo foo''; } else { echo 'bar'; }
 
[ 5.5.0 - 5.6.22, 7.0.0 - 7.0.7 ] Parse error: syntax error, unexpected '''' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in /in/s2G8L on line 1 <br/><i>Process exited with code <b title="Generic Error">255</b>.</i>
[ hhvm-3.9.1 - 3.12.0 ] Fatal error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /in/s2G8L on line 1 <br/><i>Process exited with code <b title="Generic Error">255</b>.</i>
 
ugggh booze > typing
Anyway I want to input window of 3v4l to be nicely formatted
 
!!plugin list github
 
Command endpoints for plugin 'Github' (enabled):
[X] Github - Displays Github status, profile, or repo information (Default command: github, Mapped commands: github)
 
@PeeHaa ^
 
7:26 PM
Thank you sire
No btw
Don't we have a usage thingy?
 
!!plugin
 
@DaveRandom Syntax: plugin [list|disable|enable] [plugin-name]
 
It's right there :-P
 
But for specific plugins
 
@PeeHaa someone suggested the other day that we lint 3v4l input before sending it, sounds like a good plan to me
 
7:28 PM
I think I remember seeing !!github [status|username]/[repo]
@DaveRandom Yeah, but not sure
 
oh, ummm
!!plugin list
 
Nope :P
 
1 message moved to bin
!!github not/valid/string
 
Usage: !!github [status | <project> | <profile> | <profile>/<repo> ]
 
What if somebody comes in with a syntax error and you want to show it?
 
7:29 PM
dunno if there's any other way to provoke that
 
oh lol
 
@PeeHaa we can still show it, but once without sending it to 3v4l
we can detect syntax errors locally
 
That's... true
I knew that. This was just a test for you :P
 
:-D
 
btw I had a look at making @Jeeves more AI. But that shit is really hard :(
Now thinking about hiring a couple of indians to write realtime responses instead
 
7:33 PM
AI isn't necessarily hard, the hard part is understanding it the first time…
 
Yes wunderkind... :P
 
@PeeHaa The wunderkind is Nikita.
 
bedtime duty, bbiab
 
My biggest gripe is that AI isn't AI. It's just pattern matching. Just cannot think of a nice way to do it
 
And btw. I haven't understood it either fully
 
7:34 PM
@bwoebi So true
@DaveRandom You're an adult now. Don't you think you deserve another hour awake? :P
 
I am really not an adult in most of the ways that actually matter
really bbiab
 
@PeeHaa I think he must be ill…
 
Close. He's British!
 
That's actually the same :-D
(No offense, @JoeWatkins !) :-D
 
7:49 PM
Acronyms forged in the #php world. #phpsrb16 https://t.co/ZHxMAWRy0P
 
!!google dont be stupid grasp solid
 
Search for "dont be stupid grasp solid" (https://www.google.com/search?q=dont+be+stupid+grasp+solid&lr=lang_en)
• Don't be STUPID: GRASP SOLID! - nikic's Blog - The above is the typical database access implementation you will find in pretty much any PHP tutor… (https://nikic.github.io/2011/12/27/Dont-be-STUPID-GRASP-SOLID.html)
• Don't Be Stupid, Grasp Solid - GitHub Pages - Don't Be STUPID. Grasp SOLID. And Other Principles of. Object Oriented Design. These Slides. Are A… (http://ircmaxell.github.io/DontBeStupid-Presentation/)
 
@AdilIlhan the only really stupid one is premature optimization. The other ones all have their (limited) use cases. \cc @Ocramius
Why is the whole just sweepingly called stupid?
 
Only duplication and coupling is up for debate imo
 
@bwoebi because all of them stupid.
 
7:53 PM
@PeeHaa indescriptive naming is depending on the scope. In global scope, definitely. But sometimes in local scope it's just annoying
 
Why is it annoying @b?
 
@PeeHaa singleton is fine for true program globals (as long as you allow replacing the instance for tests
@PeeHaa to ping you need an exact match or at least three chars :-P
 
Well yes that's what you get with indescriptive naming
 
1207
Q: What is so bad about singletons?

Ewan MakepeaceThe singleton pattern is a fully paid up member of the GoF's patterns book, but it lately seems rather orphaned by the developer world. I still use quite a lot of singletons, especially for factory classes, and while you have to be a bit careful about multithreading issues (like any class actuall...

 
badumtish
 
7:55 PM
@PeeHaa array_map(function($x) { return $x + 2; }, $arr)
do you need a better name here for $x?
 
Not really no
 
exactly…
 
Uhm yeah. arr
Is that a pirate?
 
?
 
7:56 PM
lol
 
:P
 
just an abbreviation of $arrayPlaceholder
:-P
 
hehehehe
!!eval if(PHP_VERSION === '7.0.6') echo random_int(0, 1) ? "expanse" : "got";
 
@PeeHaa and re: untestability. It depends. In 99.99% of cases, it should be testable, but I don't care about testability of a ultrasimple function, like function getNextWatcherId() { static $id = "a"; return $id++; }
 
7:59 PM
k
@bwoebi Imo that should also be tested. If only because you want to catch behavior changes in php
 
@PeeHaa The premise of that function is to efficiently give a string which never has been emitted before.
good luck with proving this semi-decidable problem
 
But it's perfectly testable
 
It's untestable by its requirements
@PeeHaa A good test ignores the actual implementation
it's just the implementation saying that it starts at a and increments then and thus the premise is fulfiled
But the test should just test the premise and side-effects
 
There are no side effects
 
right. In this case it just needs to test the premise
 
8:05 PM
Which is why it can be tested
 
But you actually cannot test it. You can just call it a finite number of times and look whether it seems to fulfil its premise
but you cannot prove it.
if the function would be static $i = 0; return $i++;, the test would only fail after 2^63 calls
but obviously, this is impossible to test. @PeeHaa
 
@bwoebi False dichotomy
 
@NikiC hmmm?
 
@bwoebi So don't write any tests for it at all because that cannot be sanely tested?
 
@bwoebi There is something between "No tests" and "Tests covering all possible states of the environment"
 
8:13 PM
^ that so much
 
@NikiC psssscht :-P
 
@PeeHaa Do you have time?
 
I can put GOT on hold for you yeah :)
Shoot
 
Could you deploy github.com/Room-11/Jeeves/pull/58? Don't have a local env right now.
 
nice :P
 
8:18 PM
Had some minutes, waiting for the others so we can play billiard. :P
 
:D
 
@PeeHaa /me still waits 4 weeks (until end of the season)
 
I'm a season behind \o/
 
ah ^^
 
!!google compulsive hoarding
 
8:20 PM
Search for "compulsive hoarding" (https://www.google.com/search?q=compulsive+hoarding&lr=lang_en)
• Compulsive hoarding - Wikipedia, the free encyclo… - Compulsive hoarding, also known as hoarding disorder, is a pattern of behavior that is characteriz… (https://en.wikipedia.org/wiki/Compulsive_hoarding)
• Hoarding disorder - NHS Choices - Read about hoarding disorders, including why it might happen, why it's a … psychotic disorders, su… (http://www.nhs.uk/Conditions/hoarding/Pages/Introduction.aspx)
 
:P
 
@PeeHaa want a few spoilers?
 
!!should peehaa continue GOT or sleep now?
 
@kelunik second too soon
try again
 
!!should peehaa continue GOT or sleep now?
 
8:22 PM
@bwoebi ass to the hole :P
To the log mobile!
 
@PeeHaa No idea what that means … I assume yes?
 
lolnope
 
:-D
 
!!plugin list
 
Currently registered plugins:
[X] Canonicals - Posts links to canonical resources on various subjects
[X] ChuckSkeet - Posts a random Chuck Norris/Jon Skeet joke on request
[X] CodeFormat - Asks users to format their code when unformatted multi-line code blocks are posted
[X] PHPDocs - Searches the PHP manual and displays links with a summary of the result
[X] 3v4l - Executes code snippets on 3v4l.org and displays the output
[X] Google - Retrieves and displays search results from Google
[X] Github - Displays Github status, profile, or repo information
 
8:24 PM
!!should I continue GOT or sleep now?
 
You should sleep now.
 
Bitch please. You know nothing jeeves
 
@Jeeves awww
Clearly the RNG is broken, it gives the wrong answer
 
:P
 
!!should nikic debug the RNG or rather not?
 
8:26 PM
@nikic should debug the RNG.
 
:-D
 
lol it works \o/
 
:-)
 
@kelunik Clearly missing a case without "or" ;)
 
!!should there be a case without "or" or not?
 
8:28 PM
!!should I test it further or assume it just works?
 
@there should not.
You should test it further.
 
damn you
 
@Jeeves @there? o_O
 
@kelunik is getting of easy
 
!!should DaveRandom do PeeHaa's work or not?
 
8:29 PM
@DaveRandom should do PeeHaa's work.
 
@Jeeves <3
 
@PeeHaa So you don't have to test further. :P
 
Excellent
 
!!should kelunik fix the stupid @there ping or not?
 
@kelunik should not.
 
8:30 PM
damn
 
ha!
 
@Jeeves <3
 
Jeeves is broken
^^
 
!!should wtf ...
 
@kelunik Dunno.
 
8:32 PM
lolwat
so smart
 
introduction to artificial intelligence
 
!!should peehaa deploy again or rather in one minute?
 
@peehaa should deploy again.
 
fine
done
 
!!is it time to sleep?
 
8:45 PM
Oh sorry
 
!!plugin list
 
:P
 
Currently registered plugins:
[X] Canonicals - Posts links to canonical resources on various subjects
[X] ChuckSkeet - Posts a random Chuck Norris/Jon Skeet joke on request
[X] CodeFormat - Asks users to format their code when unformatted multi-line code blocks are posted
[X] PHPDocs - Searches the PHP manual and displays links with a summary of the result
[X] 3v4l - Executes code snippets on 3v4l.org and displays the output
[X] Google - Retrieves and displays search results from Google
[X] Github - Displays Github status, profile, or repo information
 
Pulled without resarting :P
done :-)
 
!!is it time to sleep?
 
8:46 PM
Guess not?
:P
Not sure what's wrong tbh
 
!!is there a reason y u not work, @Jeeves?
 
!!plugin list should
 
Command endpoints for plugin 'Should' (enabled):
[X] Should - Should I write a description or rather not? (Default command: should, Mapped commands: should)
[ ] Is - Should I write a description or rather not? (Default command: is, No mapped commands)
 
yay found it
!!plugin
 
@PeeHaa Syntax: plugin [list|disable|enable] [plugin-name]
 
8:49 PM
!!command map
 
Syntax: command [map|remap] <command> <plugin> [<endpoint>]
command unmap <command>
command alias <new command> <existing command>
command list
 
!!command map is should is
 
!!command list
 
Command 'is' is now mapped to Should # is
Commands currently mapped:
 > - Executes code snippets on 3v4l.org and displays the output (3v4l # Eval)
 ? - Retrieves and displays search results from Google (Google # Search)
 canon - Posts links to canonical resources on various subjects (Canonicals # canon)
 chuck - Posts a random Chuck Norris joke (ChuckSkeet # Chuck)
 docs - Searches the PHP manual and displays links with a summary of the result (PHPDocs # Search)
 eval - Executes code snippets on 3v4l.org and displays the output (3v4l # Eval)
 
!!is @kelunik crazy?
 
8:50 PM
I think so.
 
Good boy
 
!!is @peehaa lazy?
 
I think you know the answer already.
 
:P
 
:-D
 
8:51 PM
!!is @Gordon drunk?
 
I think so.
 
heh! I only had two beers
 
I think so too @Jeeves
 
!!is @Jimbo drunk?
 
Let me think about it … wait … yes … well actually, no.
 
8:52 PM
!!command map will should is
 
Command 'will' is now mapped to Should # is
 
!!command map does should is
 
Command 'does' is now mapped to Should # is
 
!!command map do should is
 
Command 'do' is now mapped to Should # is
 
8:53 PM
!!command map are should is
 
Command 'are' is now mapped to Should # is
 
!!should I ask about this new plugin?
 
Dunno.
 
!!do tell me
 
No.
 
8:53 PM
lol
 
!!do sudo tell me
 
thanks prick
 
Yes.
@PeeHaa error has been logged. Fix it fix it fix it fix it.
 
You hurt its feelings
 
!!command map sudo do
 
8:54 PM
@Gordon Command 'do' is already mapped. Use !!command list to display the currently mapped commands.
@Gordon Unknown plugin 'do'. Use !!plugin list to display the currently registered plugins.
 
how does that work?
 
What are you trying? :)
 
make sudo an alias to do
!!alias sudo do
it's dead Jim -.-
 
!!is it dead?
 
God, yes!
 
8:57 PM
I love you, @Jeeves.
!!do you love me?
 
Yes.
 
<3
 
!!do you love me, too?
 
No.
 
!!command alias sudo do
 
8:58 PM
@Jeeves pff. that's how you say thank you after I taught you all that swordfighting?
 
!!plugin alias sudo do
 
@PeeHaa Syntax: plugin [list|disable|enable] [plugin-name]
 
gees
 
!!do you use random to answer questions?
 
No idea …
 
9:06 PM
!!is it crypto safe?
 
I think so.
 
!!is this useful for anything?
 
No.
 
I thought so :)
 
!!is it better than abusing 3v4l?
 
9:07 PM
Let me think about it … dunno …
 
!!does it hurt?
 
Let me think about it … wait … yes … well actually, no.
 
@Jeeves that's cool
 
@PeeHaa I know right!
 
!!are you sentient yet?
 
9:13 PM
Let me think about it … wait … yes … well actually, no.
 
at least he's honest about it
 
@Jeeves jesus are you drunk?
 
@PeeHaa Hola
 
lol match fail
@Jeeves you drunk or what?
 
@PeeHaa Hola
 
9:15 PM
yeap. that's a matching "yo" :)
 
@Jeeves drunk?
 
@Jeeves Are you drunk or something?
 
@PeeHaa Screw you human!
 
@Jeeves <3
 
@PeeHaa I love you too
 
9:23 PM
@Jeeves are they turning you into a real chatbot?
apparently, not
or he just doesnt like me
 
I need to train him :)
 
Yes, let's make every math constant into its a library. Complete with tests and coverage test, in case math changes. https://github.com/const-io/numeric-constants/blob/2e61755d9726ea751352af5bf18fec66d5f40238/lib/index.js#L11
6
just another day in js community
 
I have these two different queries for one table:
     SELECT * FROM mytable WHERE id_user = :id AND seen IS NULL;

    SELECT * FROM mytable WHERE id_user = :id AND timestamp > :tm;
 
@AdilIlhan oh god lol
 
I want to know which columns need to be index?
 
9:37 PM
ahahah your field name is nice. "seen" :D
 
@AdilIlhan Honestly these weren't funny even when they weren't jokes yet.
 
by the way, this is my favorite js library: npmjs.com/package/is-integer
 
@Shafizadeh everything that you use in WHERE
 
please look at "stats" section
 
9:40 PM
@tereško there are three columns. Should I add three different indexes one them? Or should I do that as a group ?
 
yes
 
yes what? group?
 
in this case I would add three separate indexes
 
Ah .. ok
 
do you really need asterisk? @Shafizadeh
 
9:42 PM
@tereško But what about this?
ADD KEY id_user1 (id_user,seen);
ADD KEY id_user2 (seen,id_user);
@AdilIlhan that's just as example
 
cool
 
Ekn
this is how I imagine Jeeves when you guys are working on it :p
8
 
Wes
i'm dangerously mixing beer with coffee
 
9:58 PM
@Wes What side-effects are you experiencing? :-P
 
Ekn
heh I wonder that too
 

« first day (2051 days earlier)      last day (2911 days later) »