« first day (5 days earlier)      last day (657 days later) » 
10:00 - 18:0018:00 - 22:00

18:00
oh, I guess my way makes the + required instead of optional
I don't know enough of your regex to match that
"(\d+)d(\d+)[\+(\d+)]" in standardish
It's pretty simple with regexs, really
You make the (\+\d+) optional, and the d can be replaced with a \s or something like that (to support dem noobz)
actually... does "[(\d+)d](\d+)[\+(\d+)]" make sense? Then you can do /roll 6 and it rolls 1d6+0
@Zirak well, you want it to only accept numbers, but if \s is whitespace, then that can be scattered throughout
You can make the stuff before d optional as well
@Zirak I only have a theoretical knowledge of regexes. I've only used them like, twice
But you're right, dem n00bz should learn DnD
(\d+)?d?(\d+)(?:\+(\d+))? should do it
no, wait, it allows for no d and doesn't offer substitution
(?:(\d+)d)?(\d+)(?:\+(\d+))?
18:05
@Zirak what's "?:"? Haven't seen that before
Non-capturing group
ah, right. Makes sense
isn't that what [] is for? oh right, nonstandard, duh
It means "I want this group, but don't capture what it matches as a result"
[abc] means "I want one of these"
@Zirak looks right then
@Zirak oh yeah, sorry
gskinner.com/RegExr is a good friend
Or, if your an Emacs (<3) user, M-x re-builder
Though the Emacs regex is, IIRC, not compatible to the standard
Should the other arithmetic operators be in? I've seen things like 2d8x6
18:09
@Zirak for DnD, just + and - are standard
And if it should be DnD standard, then you could also be doing 1d6+1d8
more than one die type is trickier. If you're ambitous, go for it :D
Actually, it can be done by making a small parser...breaks and starts a new token when it sees + or -
Actually, usually about here, most people just add in an expression solver for generic math, and make a d operator with higher precidence than *, but lower than exponents. PE"d"MDAS
which is more generic, more useful, and sometimes easier
@Zirak Could not process input. Error: parseCommandArgs is not defined
Didn't I fix that!?
@Zirak Items added.
!!/todo get
@Zirak (1)Fix /die to let /live work, (2)Make /tell argument delegation not suck, (3)Do what he said: chat.stackoverflow.com/transcript/message/2559290#2559290
oh, and check this out:
!!/tell MooingDuck help todo
@MooingDuck todo: Your personal todo list. /get [count] retrieves everything or count items. /add [items] adds n-items to your todo list (make sure items with spaces are wrapped in quotes) /remove [indices] removes items specified by indice
18:16
@Zirak neat
still no persistance?
I made an account on meta and when I got 200 rep on SO I got +100 for my meta account, and then I got +100 for my SO account because I had over 100 on my meta account. Could I just sign up for other SE sites and get tons of rep?
!!lick MooingDuck
todo has persistence
@CoffeeRain you might be in the wrong room
Where would I go?
I meant to be here, but I just asked that cause I was here

Lounge<C++>

Today we're daydreaming about C++26 reflection
18:19
@CoffeeRain That regex has limited capabilities, it does give ([\w\s]+) a lick
or at least it has people there to talk about stuff :/ This room is kinda specific
!!give MooingDuck a lick
:D
@CoffeeRain Unidentified command give
@CoffeeRain Mmmm! MooingDuck tastes just like raisin
@Zirak I was looking up en.wikipedia.org/wiki/… to see how to "approximate" NdM (for kicks)
The second method listed is a good one. Generate 100dM, multiply by (N/100), and add 1dN. For large N, nobody will notice the difference.
18:22
!!what's a dog?
@CoffeeRain A domesticated carnivorous mammal related to the foxes and wolves and raised in a wide variety of breeds. (source)
!!what are animals
!!what's an animal
@CoffeeRain Could not find definition for n animal
That should be fixed, unless you want people to use 'a' for words that begin with vowels
!!what a animal
@CoffeeRain An animal organism other than a human, especially a mammal. (source)
18:24
@CoffeeRain what's a
oh, I didn't know "what a" worked.
:D It's just a regex
!!/tell Zirak "fix the regex for what is"
@CoffeeRain Unidentified command to
@CoffeeRain Unidentified command 'fix
@CoffeeRain doublequote
@CoffeeRain Unidentified command 'hi'
@CoffeeRain Unidentified command fix the regex for what is
18:27
@CoffeeRain oh, and tell forwards commands, not strings
!!/learn forward "$0"
@Mooing Duck Command forward learned
!!/tell Zirak forward "fix the regex for what is"
@Zirak "fix the regex for what is"
18:28
@CoffeeRain or you can just tell him yourself :D
:D
@zirak You should fix the regex for 'what is'
!!what is regex
I wonder if it's in the dictionary
@CoffeeRain Could not find definition for a regex
@CoffeeRain regular expression In programming, a set of symbols used to search for occurrences of text or to search and replace text. (source)
Wow
!!what are sushi
@CoffeeRain cold rice dressed with vinegar, formed into any of various shapes, and garnished especially with bits of raw seafood or vegetables. (source)
Cool
!!!/tell MooingDuck forward "This does not produce an error even though I used three exclamation points"
!!/tell MooingDuck forward "It worked before"
18:31
@MooingDuck "It worked before"
!!!tell CoffeeRain forward "Maybe with no slash?"
I edited those posts
:(
!!tell MooingDuck forward "Maybe the bot is down?"
!!/forward "test"
@CoffeeRain "test"
Hmm...
!!tell this should" error"
!!/hang
@CoffeeRain Unidentified command hand
@CoffeeRain Unidentified command hang
18:34
!!hang
!!/new
@CoffeeRain Unidentified command new
Loaded it now (am partially afk)
!!/hang
  +---+
  |   |
  |
  |
  |
__+__

-----------
!!e
!!a
!!i
!!o
!!u
!!/hang guess
:D
!!/hang guess "a"
@CoffeeRain Only alphanumeric and whitespace characters allowed
18:36
?
I meant like:
!!/hang e
  +---+
  |   |
  |
  |
  |
__+__
e
-e---------
!!/hang a
  +---+
  |   |
  |
  |
  |
__+__
a, e
-e---a-----
18:36
!!/hang o
  +---+
  |   |
  |
  |
  |
__+__
a, e, o
-e-o-a--o--
!!/hang i
  +---+
  |   |
  |
  |
  |
__+__
a, e, i, o
-e-o-a-io--
!!/hang s
  +---+
  |   |
  |
  |
  |
__+__
a, e, i, o, s
-e-o-a-io-s
18:37
!!/hang n
  +---+
  |   |
  |
  |
  |
__+__
a, e, i, n, o, s
-e-ona-ions
!!/hang t
  +---+
  |   |
  |
  |
  |
__+__
a, e, i, n, o, s, t
-etonations
!!/hang d
@CoffeeRain Correct! The phrase is detonations.
18:37
No body parts hung!
Leaving
@CoffeeRain hax
!!/todo add "Just a reminder: (?:(\d+)d)?(\d+)(?:\+(\d+))?"
@Zirak Items added.
!!what is an animal
@Zirak Could not find definition for an animal
what(?:\'s|\'re)? (?:(?:is|are) )(?:(?:an|a) )([\w\s\-]+)(?: (?:are|is))?\??
!!what is an animal
@Zirak An animal organism other than a human, especially a mammal. (source)
YES!
Final regex: what(?:\'s|\'re)? (?:(?:is|are) )?(?:(?:an|a) )?([\w\s\-]+)(?: (?:are|is))?\??
gulp
It allows tons of grammatical mistakes, but who cares?
!!what're is an banana are?
2
@Zirak Could not find definition for banana are
~_~
19:01
I don't think "what're" is a word
@Zirak greedy matched the [\w\s\-]+, and then the trailing are is optional so....
facepalm
"what're => what are"
@Zirak eh, I'm pretty sure that's not real English, but if the bot accepts it, that's fine.
Let's see:
!!/define what're
@Zirak Could not find definition for what're
You win
I think I'll move the are|is outside the regex, and have sane things deal with it
19:20
@Zirak is there a way to make the [\w\s\-]+ not greedy? That's also a fix
If it'd not greedy, it'll only match the first character
@Zirak is there an end-of-line character? Make it match that
$what(?:\'s|\'re)? (?:(?:is|are) )(?:(?:an|a) )([\w\s\-]+)(?: (?:are|is))?\??^
@Zirak: javascriptkit.com/javatutors/redev2.shtml says I had them backwards. ^ is beginning of input, $ is end of input
20:16
@MooingDuck It'll still fall under the greedy match
I think I'll just remove everything after the last is or are...but which to choose from? @_@
!!/mdn String.indexOf
Of course, I can always make the ? mandatory...and then it'll be easier to chop things off
@Zirak but if it has to match the $, then it's not allowed to match only the first character. So a non-greedy should work
Even the lazy match will find it, since ` are` and ` is` fall under [\w\s\-]
20:56
So I still need to find something that matches the general feel of "I want you to define this", and then operate on these results
Or I can just say "fuck this, no suffix unless you use a ?"
GGG
GGG
hmm ok looking at it now
/what('s| is| are)/
yeah could force a ?
/what('s| is| are).*\?/
@Zirak ;)
oh do you need the backreferences for the function
doesn't matter can just use 0
The ?: is so they won't meddle with the real definition. With non-capturing groups, I just say grab the first match and go home (though hope did match...)
@GGG Y U IGNORE ME
GIEF SOLUTION
GGG
GGG
21:14
lol what are you trying to do
just take the whole match
make sure there's something that looks like what's
and maybe a question mark somewhere after that
then take match 0 and parse it up
(@Zirak)
Whole match is kinda vague. Parsing through every single communication with it sounds kinda...heavy, even in my standards
GGG
GGG
so to trigger the thing it has to match the regex
but this wolud match:
a beachball? what is that?
so you can't just get the stuff after "what is"
if you want to be really effective
get all of it
Damn you're right...
GGG
GGG
maybe have backreferences to the "what is" and the question mark and throw those out
but everything else you probably want to keep
Am I too thinking too loosely? I'm beginning to question my sanity about this one...I think I'm aspiring to places I can't reach
The next step sounds like a completely freaky language parser
GGG
GGG
21:20
i think it's kinda cool
just think of peices of language you want to identify
maybe make it a bit more abstract but not too much
It's very cool, just very hard, and probably not something a simple regex can do
GGG
GGG
like it could just be for queries
no not a simple regex but some logic and some regexes and some token parsing maybe
gulp
GGG
GGG
so you could say it identifies a query and a subject and throws everything else out
that's not too complicated of an idea
accept a finite number of query types
eg who what when where why
maybe not why
the "subject" can be kina loose
and include an action maybe
so "who invented jquery" the subject could actually be invented jquery
i gotta make some phone calls and stuff but this is interesting, i'll be back
"who is the inventor of jquery"
//=>
{
    query : 'who',
    subject : 'inventor of jquery'
}
GGG
GGG
21:23
yeah
"who invented jquery"
//=>
{
query : 'who',
subject : 'invented jquery'
}
both should give similar results when you run them thru google or wikipedia or whatever
I can already envision some bitchingly long whitelists
GGG
GGG
i don't think so
just blacklist stopwords
or no
or maybe yeah
And they'll all fail when encountering dem n00bz, "whos jquery"
GGG
GGG
"like who the hell invented jquery, anyway?"
probably need to deal with that kind of thing
Or maybe this is a tad too far for my league. It sounds super awesome, but natural languages scare the shizzles out of me (imagine what parsing Perl, the language made by a linguist, sounds like...)
The regex now can match for anything, besides things like "tell me what a boing is"
GGG
GGG
21:40
what is a boing?
what is the way that i use this bot?
!!what is a boing?
@Zirak Could not find definition for boing
GGG
GGG
!!tell Zirak what is a duck?
@GGG Any of various wild or domesticated swimming birds of the family Anatidae, characteristically having a broad, flat bill, short legs, and webbed feet. (source)
!! gets the bot's attention. After that, a / indicates to execute a command, and just writing text makes it try to respond. I'm working on making a default error-message
@GGG Any of various wild or domesticated swimming birds of the family Anatidae, characteristically having a broad, flat bill, short legs, and webbed feet. (source)
/tell is a command
GGG
GGG
!!/tell Zirak what a duck is
@GGG Unidentified command what
GGG
GGG
21:42
lol that would be cool
!!/tell @Zirak define duck
@GGG duck: Any of various wild or domesticated swimming birds of the family Anatidae, characteristically having a broad, flat bill, short legs, and webbed feet. (source)
Async commands aren't too keen on /tell, I'm working on that :P
GGG
GGG
!!what the fuck is a duck
@GGG Could not find definition for the fuck is a duck
GGG
GGG
lol
nice
haha
10:00 - 18:0018:00 - 22:00

« first day (5 days earlier)      last day (657 days later) »