These are chat archives for dcsan/gitterbot

15th
Aug 2015
dc
@dcsan
Aug 15 2015 00:50
@irinatag did you finish that full text search feature?
dc
@dcsan
Aug 15 2015 02:43
@/all I just released new version of gitterbot to the main FCC channel
we have 7 contributors! go team :)
https://github.com/dcsan/gitterbot/compare/rel-008...rel-009
thanks @irinatag @oab00 @Jorgixhallo @dting @abhisekp
CamperBot
@camperbot
Aug 15 2015 02:44
dcsan sends brownie points to @irinatag and @oab00 and @jorgixhallo and @dting and @abhisekp :sparkles: :thumbsup: :sparkles:
:star: 28 | @abhisekp | http://www.freecodecamp.com/abhisekp
:star: 185 | @oab00 | http://www.freecodecamp.com/oab00
:star: 6 | @dting | http://www.freecodecamp.com/dting
dc
@dcsan
Aug 15 2015 02:44
thanks @irinatag
CamperBot
@camperbot
Aug 15 2015 02:44
dcsan sends brownie points to @irinatag :sparkles: :thumbsup: :sparkles:
Omar
@oab00
Aug 15 2015 02:46
dc
@dcsan
Aug 15 2015 02:47
haha, giphy alert!
i debated adding some of those more frivolous things to camperbot but haven't done too many so far.
just the rollem easter egg...
rollem
CamperBot
@camperbot
Aug 15 2015 02:48
dc
@dcsan
Aug 15 2015 02:48
hmm. sometimes it gets expanded and sometimes not ...
maybe there's a gitter setting to expand images in channels..
Omar
@oab00
Aug 15 2015 02:50
hmm dunno about youtube but I used ![](url) for that image :p
it expanded now :frowning:
Abhisek Pattnaik
@abhisekp
Aug 15 2015 04:44

@oab00 type
/collapse
to collapse all media

or type
/expand
to expand all media

dc
@dcsan
Aug 15 2015 04:57
botstatus
CamperBot
@camperbot
Aug 15 2015 04:57
All bot systems are go!
botVersion: 0.0.9a
env: prod
botname: camperbot
dc
@dcsan
Aug 15 2015 04:58
@jojacino @qmikew1 hi
Serenity
@qmikew1
Aug 15 2015 04:59
@dcsan hi,
dc
@dcsan
Aug 15 2015 04:59
hola
so you wanna make a multilingual AI :question:
Serenity
@qmikew1
Aug 15 2015 05:00
Looks pretty daunting
dc
@dcsan
Aug 15 2015 05:01
i'm working on one for wechat
chatuni.jpg
Tom
@PHLMoney
Aug 15 2015 05:01
@dcsan Unfortunately I'm not that clever. would this work?
regex: /(?:thanks|thank you)/,
CamperBot
@camperbot
Aug 15 2015 05:01
phlmoney sends brownie points to @dcsan :sparkles: :thumbsup: :sparkles:
:star: 94 | @dcsan | http://www.freecodecamp.com/dcsan
Tom
@PHLMoney
Aug 15 2015 05:02
I'm thinking that space isn't going to work out there.
dc
@dcsan
Aug 15 2015 05:02
well, you should definitely test it
Serenity
@qmikew1
Aug 15 2015 05:02
oh, I see...yandex was top of mind you're already there
dc
@dcsan
Aug 15 2015 05:02
in some online regex tester
Serenity
@qmikew1
Aug 15 2015 05:02
in terms of attention
dc
@dcsan
Aug 15 2015 05:02
how do you mean?
japanese for russians? not sure i follow :)
Serenity
@qmikew1
Aug 15 2015 05:03
you're already working on a multi-lingual lol
dc
@dcsan
Aug 15 2015 05:03
yep
is an app i'm developing
i want to do comicJapanese / chinese etc too
chatbot/story/game to learn a language
Serenity
@qmikew1
Aug 15 2015 05:04
I get it. Like a mixed media learning approach
dc
@dcsan
Aug 15 2015 05:05
yes. using chat and AI
it would be cool to have super busy chatrooms like we have here
of people all mashing up their languages!
Serenity
@qmikew1
Aug 15 2015 05:06
that's a whole different level
it might be interesting to get other takes on coding
culture /language
Tom
@PHLMoney
Aug 15 2015 05:07
The wechat chinese translator is the worst.
after maybe google translate.
Serenity
@qmikew1
Aug 15 2015 05:08
I never even attempted to learn Chinese...
a lot of regional stuff
dc
@dcsan
Aug 15 2015 05:09
i only use it for chinese > english
its a shame you can't do it the other way around
Serenity
@qmikew1
Aug 15 2015 05:10
that's a barrier
dc
@dcsan
Aug 15 2015 05:10
i think it just translates INTO whatever your phone lang setting is
chinese seems easier than japanese
at least each kanji only has one way of being read.
Serenity
@qmikew1
Aug 15 2015 05:11
with some kana thrown in
Tom
@PHLMoney
Aug 15 2015 05:11
Thanks @dcsan
CamperBot
@camperbot
Aug 15 2015 05:11
phlmoney sends brownie points to @dcsan :sparkles: :thumbsup: :sparkles:
:star: 95 | @dcsan | http://www.freecodecamp.com/dcsan
Tom
@PHLMoney
Aug 15 2015 05:12
Sorry, for nothing in particular. Just trying to understand regex.
dc
@dcsan
Aug 15 2015 05:12
haha, i'll take it :)
now you have two problems :)
Serenity
@qmikew1
Aug 15 2015 05:13
you might want to be more greedy with your regex (i.e, any occurance of thank....)
vs. | (or)
Tom
@PHLMoney
Aug 15 2015 05:13
I was actually a little surprised it worked. I didn't think it was case insensitive.
I thought ?i made it case insensitive.
dc
@dcsan
Aug 15 2015 05:14
no, thats a non-capturing...
Tom
@PHLMoney
Aug 15 2015 05:14
I thought ?: was non capturing
Serenity
@qmikew1
Aug 15 2015 05:14
^
Serenity
@qmikew1
Aug 15 2015 05:23
what if you used:
thank*
dc
@dcsan
Aug 15 2015 05:24
try it. i never trust regex to "this should work!"
Serenity
@qmikew1
Aug 15 2015 05:24
the string hit wouldn't have to be 100% you're just testing for existence
dc
@dcsan
Aug 15 2015 05:24
or even just 'thank'
since we're searching for the string anywhere
no word boundaries
Serenity
@qmikew1
Aug 15 2015 05:25
that's true too, even shorter.
M Used
@mildused
Aug 15 2015 05:25
Lol @dcsan Check out how my chat backfired at /Help
Serenity
@qmikew1
Aug 15 2015 05:27
thank works when I switch to regex in sublime found all occurrences of:
thanks
thank you
Thanks
M Used
@mildused
Aug 15 2015 05:28
No thanks to you @qmikew1 ?
CamperBot
@camperbot
Aug 15 2015 05:28
mildused sends brownie points to @qmikew1 :sparkles: :thumbsup: :sparkles:
dc
@dcsan
Aug 15 2015 05:28
cool.
M Used
@mildused
Aug 15 2015 05:28
No thank to you @qmikew1 ?
dc
@dcsan
Aug 15 2015 05:28
do you want to change it on the repo?
M Used
@mildused
Aug 15 2015 05:28
What's a brownie point?
Serenity
@qmikew1
Aug 15 2015 05:28
where is it?
dc
@dcsan
Aug 15 2015 05:28
you could even make that edit on github.com without checking it out locally...
Serenity
@qmikew1
Aug 15 2015 05:29
wait that last one didn't fire
@qmikew1 i made you a collaborator on the repo so you should have edit rights
Serenity
@qmikew1
Aug 15 2015 05:30
is the colon js context specific (I'd drop the ?)
dc
@dcsan
Aug 15 2015 05:30
@mildused BPs are your stars on the main site (tho its linked to the beta site atm(
not sure relaly... i'm not a regex guru
Serenity
@qmikew1
Aug 15 2015 05:31
well, let's see what happens
Tom
@PHLMoney
Aug 15 2015 05:31
Not an expert either. I don't trust the regex tester I found either.
Tom
@PHLMoney
Aug 15 2015 05:31
While you're in there, add thanx.
That's the tester I was using, but it wasn't finding the uppercase T cases.
dc
@dcsan
Aug 15 2015 05:33
/gim ?
Tom
@PHLMoney
Aug 15 2015 05:33
I'm sure there's user error in there somewhere
Serenity
@qmikew1
Aug 15 2015 05:33
do I have to logout/in? (can't seem to edit on fly)
dc
@dcsan
Aug 15 2015 05:34
from GH? no
blob
M Used
@mildused
Aug 15 2015 05:35
Can I add a rick roll regex?
Tom
@PHLMoney
Aug 15 2015 05:35
already there..
rollem
CamperBot
@camperbot
Aug 15 2015 05:35
M Used
@mildused
Aug 15 2015 05:35
really?
Wow
@PHLMoney You're ahead of me
Serenity
@qmikew1
Aug 15 2015 05:36
pass command to bot to check
M Used
@mildused
Aug 15 2015 05:36
@PHLMoney Where can I find that?
dc
@dcsan
Aug 15 2015 05:36
@qmikew1 i see your update here
M Used
@mildused
Aug 15 2015 05:36
This message was deleted
dc
@dcsan
Aug 15 2015 05:36
dcsan/gitterbot@49c13be
M Used
@mildused
Aug 15 2015 05:36
@qmikew1 what about thx?
Serenity
@qmikew1
Aug 15 2015 05:36
test the first two
to see if it works first
M Used
@mildused
Aug 15 2015 05:36
thanx @dcsan
Tom
@PHLMoney
Aug 15 2015 05:37
thank you @qmikew1
CamperBot
@camperbot
Aug 15 2015 05:37
phlmoney sends brownie points to @qmikew1 :sparkles: :thumbsup: :sparkles:
dc
@dcsan
Aug 15 2015 05:37
botstatus
Serenity
@qmikew1
Aug 15 2015 05:37
ok, throw a thanx somebody elses way
M Used
@mildused
Aug 15 2015 05:37
thanx @dcsan
dc
@dcsan
Aug 15 2015 05:37
hang on
takes ~ 1min to recycle
gitter API issue
botstatus
Tom
@PHLMoney
Aug 15 2015 05:38
well, the thank you case works
Abhisek Pattnaik
@abhisekp
Aug 15 2015 05:38
the regex can be shortened to /than[kx]/gim
dc
@dcsan
Aug 15 2015 05:38
botstatus
CamperBot
@camperbot
Aug 15 2015 05:38
All bot systems are go!
botVersion: 0.0.9a
env: prod
botname: camperbot
dc
@dcsan
Aug 15 2015 05:39
ok thanx
M Used
@mildused
Aug 15 2015 05:39
thanx @dcsan
CamperBot
@camperbot
Aug 15 2015 05:39
mildused sends brownie points to @dcsan :sparkles: :thumbsup: :sparkles:
:star: 98 | @dcsan | http://www.freecodecamp.com/dcsan
dc
@dcsan
Aug 15 2015 05:39
kthanxbai @abhisekp
CamperBot
@camperbot
Aug 15 2015 05:39
dcsan sends brownie points to @abhisekp :sparkles: :thumbsup: :sparkles:
:star: 31 | @abhisekp | http://www.freecodecamp.com/abhisekp
Tom
@PHLMoney
Aug 15 2015 05:39
Thanks @camperbot
CamperBot
@camperbot
Aug 15 2015 05:39
phlmoney sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 2 | @camperbot | http://www.freecodecamp.com/camperbot
M Used
@mildused
Aug 15 2015 05:39
thx for all the brownies so far @camperbot
Serenity
@qmikew1
Aug 15 2015 05:39
@abhisekp let me test that in sublime
Tom
@PHLMoney
Aug 15 2015 05:39
THANK YOU @camperbot
CamperBot
@camperbot
Aug 15 2015 05:39
phlmoney sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
Tom
@PHLMoney
Aug 15 2015 05:39
hm, seems to cover those cases.
Huzzah!
CamperBot
@camperbot
Aug 15 2015 05:40
YW
Serenity
@qmikew1
Aug 15 2015 05:40
didn't add thx
Abhisek Pattnaik
@abhisekp
Aug 15 2015 05:40
new regex /\btha?n[xk]s?\b/
M Used
@mildused
Aug 15 2015 05:41
@abhisekp Lol
Tom
@PHLMoney
Aug 15 2015 05:41
gah @abhisekp
it takes me 10 minutes of research to figure out how to parse what I want with regex
I need more practice.
dc
@dcsan
Aug 15 2015 05:42
why the first ?
/\btha?n[xk]s?\b/
non capture benefit is?
Serenity
@qmikew1
Aug 15 2015 05:42
I didn't use the global flag (but we're looking for a single hit)
right?
dc
@dcsan
Aug 15 2015 05:43
yeh if theres moer i dont think it matters
M Used
@mildused
Aug 15 2015 05:44
Can someone help me set this up locally?
I want to test something...
dc
@dcsan
Aug 15 2015 05:44
suer
are you on win/mac ?
M Used
@mildused
Aug 15 2015 05:44
win
Serenity
@qmikew1
Aug 15 2015 05:44
@abhisekp that pattern didn't produce any hits (am assuming im portion after g was something else)
Tom
@PHLMoney
Aug 15 2015 05:44
So can someone explain why the upper case thanks works?
Abhisek Pattnaik
@abhisekp
Aug 15 2015 05:44
@dcsan @qmikew1 This works for all case https://regex101.com/r/hH5cN7/1
Tom
@PHLMoney
Aug 15 2015 05:44
without /i
dc
@dcsan
Aug 15 2015 05:44
do you have node running @mildused ?
or donwladed?
M Used
@mildused
Aug 15 2015 05:45
@dcsan I do
dc
@dcsan
Aug 15 2015 05:45
the README actually explains it..
M Used
@mildused
Aug 15 2015 05:45
ahh ok
thanks
thx @dcsan
Serenity
@qmikew1
Aug 15 2015 05:45
it shouldn't work.... it would be case sensitive
Abhisek Pattnaik
@abhisekp
Aug 15 2015 05:46
@dcsan @qmikew1 updated regex https://regex101.com/r/hH5cN7/2
dc
@dcsan
Aug 15 2015 05:46
have you used git to get fiels befoer?
Tom
@PHLMoney
Aug 15 2015 05:46
but it works
Serenity
@qmikew1
Aug 15 2015 05:47
it does, yes but it shouldn't
dc
@dcsan
Aug 15 2015 05:47
that looks good, but mayeb someone else is editing that file? @qmikew1 do you want to use that?
Serenity
@qmikew1
Aug 15 2015 05:47
let me exit out of the file
M Used
@mildused
Aug 15 2015 05:48
@dcsan node app.js is throwing an error
dc
@dcsan
Aug 15 2015 05:48
which is?
➜ nap git:(rel-009) node --version
v0.12.7
M Used
@mildused
Aug 15 2015 05:49
yes
Abhisek Pattnaik
@abhisekp
Aug 15 2015 05:49
why is no one applying that thanks regex? :'(
dc
@dcsan
Aug 15 2015 05:49
@qmikew1 exited so you could edit
@mildused whats the error?
you should see
node app
--------------- startup ------------------
WARN> AppConfig AppConfig.init serverEnv: local
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
GBot> botname on rooms bothelp
Demo app running at http://localhost:7891
GBot> joined>  egetzel/demo
GBot> joined>  bothelp/testing
GBot> joined>  camperbot/localdev
thats normal
M Used
@mildused
Aug 15 2015 05:50
hold on
how do I output my return in cmd?
dc
@dcsan
Aug 15 2015 05:50
you mean copy/paste it?
not sure
on win. anyone else here on win?
M Used
@mildused
Aug 15 2015 05:52
WARN> AppConfig AppConfig.init serverEnv: demobot
C:\Users\\gitterbot\nap\node_modules\passport-oauth2\lib\strategy.js:83
  if (!options.clientID) { throw new TypeError('OAuth2Strategy requires a clie
                                 ^
TypeError: OAuth2Strategy requires a clientID option
    at new OAuth2Strategy (C:\Users\\gitterbot\nap\node_modules\passport-oa
uth2\lib\strategy.js:83:34)
    at Object.<anonymous> (C:\Users\\gitterbot\nap\lib\gitter\passportModul
e.js:26:14)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (C:\Users\\gitterbot\nap\app.js:19:16)
    at Module._compile (module.js:460:26)
dc
@dcsan
Aug 15 2015 05:53
did you copy that file?
M Used
@mildused
Aug 15 2015 05:53
copy that file?
Abhisek Pattnaik
@abhisekp
Aug 15 2015 05:53
@dcsan do i need to fork it, clone, branch it and then add that regex and pull request?
dc
@dcsan
Aug 15 2015 05:53
@abhisekp let me make you a collab
2s
M Used
@mildused
Aug 15 2015 05:54
@dcsan Do I need to have iojs?
dc
@dcsan
Aug 15 2015 05:54
you are aleady. you can just edit in the web UI
@mildused 1m
Abhisek Pattnaik
@abhisekp
Aug 15 2015 05:54
@dcsan it says I need to be on a branch
Serenity
@qmikew1
Aug 15 2015 05:55
I added a mix of cases to @abhisekp 's example on 101.. they work. Only thing, I've never seen those extended flags /gim (usually, in bash, it would be /g/something else. That site is js, but would need to check if those flags would work
Tom
@PHLMoney
Aug 15 2015 05:55
thx too?
Abhisek Pattnaik
@abhisekp
Aug 15 2015 05:55
@qmikew1 then you could add the new regex
dc
@dcsan
Aug 15 2015 05:56
@mildused my bad. can you git pull
and then do that to ren .env the file again
Serenity
@qmikew1
Aug 15 2015 05:56
thx work too, you can add to the example but cant save on the 101 site
Tom
@PHLMoney
Aug 15 2015 05:56
cool @abhisekp
Serenity
@qmikew1
Aug 15 2015 05:56
least I couldn't
can try with the flags, not a big risk...
dc
@dcsan
Aug 15 2015 05:57
@qmikew1 make sure to select JS on the left menu
M Used
@mildused
Aug 15 2015 05:57
@dcsan working
Serenity
@qmikew1
Aug 15 2015 05:57
@dcsan ok
under FLAVOR
M Used
@mildused
Aug 15 2015 05:58
@dcsan What about token error when I go to the localhost and authorize?
dc
@dcsan
Aug 15 2015 05:58
don't worry about it for now just chat to your bot in
Serenity
@qmikew1
Aug 15 2015 05:59
test it. thx @abhisekp
oh, I forgot it's not in ready state
dc
@dcsan
Aug 15 2015 06:00
shall i push it then?
Serenity
@qmikew1
Aug 15 2015 06:00
go for it
dc
@dcsan
Aug 15 2015 06:00
         chance: 1   // only say this 50% of the time
     },
     {
-        regex: /thank|thanx/,
+        regex: /\btha?n?[xk]s?\b/gim,
         func: BotCommands.thanks
     }
 ]
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:00
@qmikew1 what was your new regex?
dc
@dcsan
Aug 15 2015 06:00
you can see on the RH menu of this chat room as changes are made
Serenity
@qmikew1
Aug 15 2015 06:01
nice I can see the new commit with grey'd out old
Tom
@PHLMoney
Aug 15 2015 06:01
\b is word boundary right?
dc
@dcsan
Aug 15 2015 06:02
botstatus
M Used
@mildused
Aug 15 2015 06:02
@dcsan Can you allow me to change the ReadMe?
Serenity
@qmikew1
Aug 15 2015 06:02
yep, there's a cheat sheet on left pane here: http://www.regexr.com/
Tom
@PHLMoney
Aug 15 2015 06:02
so thanksgiving shouldn't hit when I invite yall over in chat.
dc
@dcsan
Aug 15 2015 06:02
yeah go for it!
Serenity
@qmikew1
Aug 15 2015 06:02
the fan?
dc
@dcsan
Aug 15 2015 06:02
thanx
thanx @mildused
CamperBot
@camperbot
Aug 15 2015 06:03
dcsan sends brownie points to @mildused :sparkles: :thumbsup: :sparkles:
:star: 37 | @mildused | http://www.freecodecamp.com/mildused
Tom
@PHLMoney
Aug 15 2015 06:03
thx @abhisekp
dc
@dcsan
Aug 15 2015 06:03
oops!
thx @PHLMoney
also tx i sometimes use...
Tom
@PHLMoney
Aug 15 2015 06:03
lol @dcsan
Serenity
@qmikew1
Aug 15 2015 06:03
i have get used to the extended flags
dc
@dcsan
Aug 15 2015 06:04
its getting pretty unreadable. just for one simple thing. LOL regex
M Used
@mildused
Aug 15 2015 06:04
@dcsan Do I have write access?
dc
@dcsan
Aug 15 2015 06:04
maybe better to just use tx|thanx| .. etc
Tom
@PHLMoney
Aug 15 2015 06:04
I was thinking the same thing, @dcsan
Serenity
@qmikew1
Aug 15 2015 06:04
regex so powerful, so ugly
Tom
@PHLMoney
Aug 15 2015 06:04
for readability
even though it's extra keystrokes
M Used
@mildused
Aug 15 2015 06:04
This message was deleted
dc
@dcsan
Aug 15 2015 06:04
@mildused you do now
Serenity
@qmikew1
Aug 15 2015 06:04
there are patterns that are like 50 chars +
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:04
@dcsan tx is super short.
Serenity
@qmikew1
Aug 15 2015 06:05
too easy to match
dc
@dcsan
Aug 15 2015 06:05
yeh, but if its a word boundary it maybe ok...
Serenity
@qmikew1
Aug 15 2015 06:05
or \s
dc
@dcsan
Aug 15 2015 06:05
|\btx\b|.... yeh
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:05
in my experience of room chats, never seen tx
dc
@dcsan
Aug 15 2015 06:05
ah, maybe just me then
M Used
@mildused
Aug 15 2015 06:05
@dcsan It won't let me...
dc
@dcsan
Aug 15 2015 06:05
can you reload the page?
youre on the list..
Tom
@PHLMoney
Aug 15 2015 06:06
should we cover thansk too? Don't want to shortchange the bad typers.
M Used
@mildused
Aug 15 2015 06:06
It says Fork this project
dc
@dcsan
Aug 15 2015 06:06
haha. maybe you could send them a special message :)
dunno how to fix that @mildused i did add you
Serenity
@qmikew1
Aug 15 2015 06:07
(\btha?n?[xk]s?\b)|\btx
sorta hackish
dc
@dcsan
Aug 15 2015 06:07
knowing how to fork and send a proper pull request is good experience anyway? that's how you usually should do it.
most OSS projects don't open up commit rights to the main repo, its more through PRs across forks
M Used
@mildused
Aug 15 2015 06:08
@dcsan I'm changing the ReadMe to include nodemon so changes can be updated by watch
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:08
dc
@dcsan
Aug 15 2015 06:08
good idea
M Used
@mildused
Aug 15 2015 06:10
@dcsan I'm confused. It's asking me for pull request. Should I do it?
Serenity
@qmikew1
Aug 15 2015 06:11
@abhisekp both work (including boundry) your is more elegant
yours
M Used
@mildused
Aug 15 2015 06:11
@dcsan Sorry if I did something wrong. I did something...
Am I supposed to create a pull request when I make a change?
dc
@dcsan
Aug 15 2015 06:15
hi
so it looks like you're logged in as a different user
dcsan/gitterbot#123
opatel99
M Used
@mildused
Aug 15 2015 06:16
@dcsan That's me...
dc
@dcsan
Aug 15 2015 06:16
right ok so you have wot GH accounts
M Used
@mildused
Aug 15 2015 06:16
One junk and one proper
dc
@dcsan
Aug 15 2015 06:18
added comments to your PR
opatel99/gitterbot@c5d5b9e
M Used
@mildused
Aug 15 2015 06:19
@dcsan Got it
Serenity
@qmikew1
Aug 15 2015 06:19
oh, this git thing is making more sense
Tom
@PHLMoney
Aug 15 2015 06:19
tx @abhisekp
M Used
@mildused
Aug 15 2015 06:19
@dcsan So how do I delete that and make my changes?
dc
@dcsan
Aug 15 2015 06:20
just modify the file again
really what you should do is make a branch, and work in that branch
when you're done, then send a PR with all those changes
you never really just "cowboy commit" straight to master branch.
M Used
@mildused
Aug 15 2015 06:20
@dcsan I'll get up to date with git tonight, is it ok for now?
dc
@dcsan
Aug 15 2015 06:20
test it out first
sure
Serenity
@qmikew1
Aug 15 2015 06:20
I might have to skip ahead to setting up local (clone right?)
dc
@dcsan
Aug 15 2015 06:21
yep, install info is in the README.md
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:21
thx @PHLMoney
tx @PHLMoney
Tom
@PHLMoney
Aug 15 2015 06:21
not updated yet?
What is the q for? /\bth?a?n?[xk]s?q?\b/gim
dc
@dcsan
Aug 15 2015 06:21
you want me to deploy? @PHLMoney ?
@mildused lookslike you di dmake a fork, and you're working there and sent a PR
so that's all great.
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:22
thankq
M Used
@mildused
Aug 15 2015 06:22
@dcsan lol what?
Tom
@PHLMoney
Aug 15 2015 06:22
ah, okay. I've not seen that one either.
M Used
@mildused
Aug 15 2015 06:22
 - To make your file changes update the local server automatically, install nodemon in an administrator console.
        npm install -g nodemon
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:22
thankq @dcsan
CamperBot
@camperbot
Aug 15 2015 06:22
abhisekp sends brownie points to @dcsan :sparkles: :thumbsup: :sparkles:
:star: 99 | @dcsan | http://www.freecodecamp.com/dcsan
Serenity
@qmikew1
Aug 15 2015 06:22
do I have to add extra headers to kernal (linux) I've had to do this for some distros to get virtualbox or vmware to work (I think I saw a reference at end of read me)
M Used
@mildused
Aug 15 2015 06:22
@dcsan Is that ok?
Right after the team treehouse install node link...
dc
@dcsan
Aug 15 2015 06:23
er, i have to see it in context but i guess so?
install -g needs sudo on *nix
M Used
@mildused
Aug 15 2015 06:23
@dcsan gotcha
Windows

To install Node.js on Windows, follow these instructions: http://blog.teamtreehouse.com/install-node-js-npm-windows.

To make your file changes update the local server automatically, install nodemon in an administrator console. npm install -g nodemon

To download the app, clone the repository the bot is in:

git clone https://github.com/dcsan/gitterbot.git
Run the following commands to run the app:

cd gitterbot
cd nap
ren dot-EXAMPLE.env dot.env
node app.js
dc
@dcsan
Aug 15 2015 06:23
most of the time anyway
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:23
txq @PHLMoney
dc
@dcsan
Aug 15 2015 06:24
so you're going to change that last line?
Tom
@PHLMoney
Aug 15 2015 06:24
not sure why tx isn't coming through @abhisekp
M Used
@mildused
Aug 15 2015 06:24
@dcsan yeah
Serenity
@qmikew1
Aug 15 2015 06:25
I've got nodejs package in linux
tx @PHLMoney
Tom
@PHLMoney
Aug 15 2015 06:25
alright, I got way more practice with regex than I wanted today. night all, good chatting.
M Used
@mildused
Aug 15 2015 06:26
@dcsan dcsan/gitterbot#125
Serenity
@qmikew1
Aug 15 2015 06:26
night @PHLMoney
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:26
@qmikew1 @PHLMoney @dcsan works here https://regex101.com/r/hH5cN7/4#javascript
But not working in bot
Tom
@PHLMoney
Aug 15 2015 06:26
Yeah, looked good to me too just reading it
I think all the common ones work though
thanks @camperbot
CamperBot
@camperbot
Aug 15 2015 06:27
phlmoney sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 3 | @camperbot | http://www.freecodecamp.com/camperbot
Serenity
@qmikew1
Aug 15 2015 06:27
maybe there was cross talk in file edit since both might have been done in master?
Tom
@PHLMoney
Aug 15 2015 06:27
THANK YOU @camperbot
CamperBot
@camperbot
Aug 15 2015 06:27
phlmoney sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
Tom
@PHLMoney
Aug 15 2015 06:27
The latest had the Q though, and thankq works @camperbot
CamperBot
@camperbot
Aug 15 2015 06:27
phlmoney sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
Serenity
@qmikew1
Aug 15 2015 06:28
tx @camperbot
dc
@dcsan
Aug 15 2015 06:29
should i deploy?
-        regex: /\btha?n?[xk]s?\b/gim,
+        regex: /\bth?a?n?[xk]s?q?\b/gim,
         func: BotCommands.thanks
Tom
@PHLMoney
Aug 15 2015 06:30
it's already deployed, no?
dc
@dcsan
Aug 15 2015 06:30
wow, pity the next person who comes along to try and figure that out
Tom
@PHLMoney
Aug 15 2015 06:30
Otherwise thankq wouldn't work
dc
@dcsan
Aug 15 2015 06:30
nope
ok just tell me when
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:30
This message was deleted
@dcsan why thankq works?
CamperBot
@camperbot
Aug 15 2015 06:30
abhisekp sends brownie points to @dcsan :sparkles: :thumbsup: :sparkles:
:star: 100 | @dcsan | http://www.freecodecamp.com/dcsan
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:31
if it's not yet deployed
@dcsan the tx not working though
Tom
@PHLMoney
Aug 15 2015 06:31
sure, go for it. Curious if anything changes
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:32
@dcsan don't deploy it to main now. Some test cases not working.
Tom
@PHLMoney
Aug 15 2015 06:32
oh, you meant to main
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:33
M Used
@mildused
Aug 15 2015 06:33
@dcsan I fixed
Serenity
@qmikew1
Aug 15 2015 06:34
try it without the flags,,,, it works in pattern match with just /g (no im)
extended flags that is
Tom
@PHLMoney
Aug 15 2015 06:34
thanxsq @camperbot
CamperBot
@camperbot
Aug 15 2015 06:34
phlmoney sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 4 | @camperbot | http://www.freecodecamp.com/camperbot
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:34
@dcsan but there should be an algorithm which also takes into account the interaction of a user with others along with others thanking the user
Tom
@PHLMoney
Aug 15 2015 06:34
I'm glad thanxsq works. I think I will use that exclusively now
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:35
@PHLMoney tx
tx @dcsan
Tom
@PHLMoney
Aug 15 2015 06:35
txs @abhisekp
Serenity
@qmikew1
Aug 15 2015 06:35
tx @PHLMoney
Tom
@PHLMoney
Aug 15 2015 06:36
thx @qmikew1
M Used
@mildused
Aug 15 2015 06:36
@dcsan I'm a little too excited for my first public contribution, can my pull be evalutated?
Serenity
@qmikew1
Aug 15 2015 06:36
TX @abhisekp
M Used
@mildused
Aug 15 2015 06:36
that's texas guys...
what state are you in @qmikew1 ?
Tom
@PHLMoney
Aug 15 2015 06:36
thank you's are bigger in TX
M Used
@mildused
Aug 15 2015 06:36
oh TX @qmikew1
Serenity
@qmikew1
Aug 15 2015 06:36
yeah, I'm just checking the case
NC
Tom
@PHLMoney
Aug 15 2015 06:37
tx thx tks @qmikew1
Yeah, none of those
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:38
@dcsan now it's your call to fix tx and :point_up: August 15, 2015 12:07 PM
dc
@dcsan
Aug 15 2015 06:38
nah lets leave it if noone uses it
@mildused merged in, thanks!
CamperBot
@camperbot
Aug 15 2015 06:38
dcsan sends brownie points to @mildused :sparkles: :thumbsup: :sparkles:
:star: 38 | @mildused | http://www.freecodecamp.com/mildused
Serenity
@qmikew1
Aug 15 2015 06:38
the regex is valid
dc
@dcsan
Aug 15 2015 06:38
ok so ... good to go?
Serenity
@qmikew1
Aug 15 2015 06:38
but it's not working
dc
@dcsan
Aug 15 2015 06:38
it snot live yet
Serenity
@qmikew1
Aug 15 2015 06:39
why?
Tom
@PHLMoney
Aug 15 2015 06:39
as long as I can use thanxsq , I'm good. @camperbot
CamperBot
@camperbot
Aug 15 2015 06:39
phlmoney sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 5 | @camperbot | http://www.freecodecamp.com/camperbot
Serenity
@qmikew1
Aug 15 2015 06:39
snot live lol
dc
@dcsan
Aug 15 2015 06:39
so whats going on? are you finished editing it? i'm confused.
LMK when, i'd rather just deploy once after you've tested it.
Tom
@PHLMoney
Aug 15 2015 06:40
@dcsan there's several cases that don't work that seem like they should
but they are less common
Serenity
@qmikew1
Aug 15 2015 06:40
I want to try it without the extended flags
Tom
@PHLMoney
Aug 15 2015 06:41
tx thx tks @camperbot
dc
@dcsan
Aug 15 2015 06:41
you can't test it here.
Tom
@PHLMoney
Aug 15 2015 06:41
tnx @camperbot
so weird
dc
@dcsan
Aug 15 2015 06:41
until the code is deployed.
maybe there's some misunderstanding guys
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:42
@dcsan the regex should work for tx but it's not working here. How do we test it, otherwise?
The regex is good to go though.
dc
@dcsan
Aug 15 2015 06:42
when you edit the code in github it's not actually running.
Tom
@PHLMoney
Aug 15 2015 06:42
But the Q was added with the latest revision
dc
@dcsan
Aug 15 2015 06:42
either test in a regex matcher offline
Tom
@PHLMoney
Aug 15 2015 06:42
and that DOES work.
thankq @camperbot
CamperBot
@camperbot
Aug 15 2015 06:42
phlmoney sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 6 | @camperbot | http://www.freecodecamp.com/camperbot
Tom
@PHLMoney
Aug 15 2015 06:42
unless I'm misunderstanding. I say deploy it and clear things pu now
dc
@dcsan
Aug 15 2015 06:42
the live code is in branch rel-009
k
2m
M Used
@mildused
Aug 15 2015 06:43
@dcsan Made a pull for markdown changes
Serenity
@qmikew1
Aug 15 2015 06:43
Oh, hence the local version to test
nm that was a total non sequitur
dc
@dcsan
Aug 15 2015 06:45
botstatus
CamperBot
@camperbot
Aug 15 2015 06:45
All bot systems are go!
botVersion: 0.0.9a
env: prod
botname: camperbot
dc
@dcsan
Aug 15 2015 06:45
its live
tx
Tom
@PHLMoney
Aug 15 2015 06:45
tx @abhisekp
dc
@dcsan
Aug 15 2015 06:45
tx @camperbot
CamperBot
@camperbot
Aug 15 2015 06:45
dcsan sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 7 | @camperbot | http://www.freecodecamp.com/camperbot
Serenity
@qmikew1
Aug 15 2015 06:45
it does work
dc
@dcsan
Aug 15 2015 06:45
about @abhisekp
CamperBot
@camperbot
Aug 15 2015 06:45
:star: 31 | @abhisekp | http://www.freecodecamp.com/abhisekp
Tom
@PHLMoney
Aug 15 2015 06:45
I was a few seconds too fast
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:45
tx @dcsan
CamperBot
@camperbot
Aug 15 2015 06:45
abhisekp sends brownie points to @dcsan :sparkles: :thumbsup: :sparkles:
:star: 101 | @dcsan | http://www.freecodecamp.com/dcsan
M Used
@mildused
Aug 15 2015 06:46
about @mildused
CamperBot
@camperbot
Aug 15 2015 06:46
:star: 38 | @mildused | http://www.freecodecamp.com/mildused
dc
@dcsan
Aug 15 2015 06:46
no, i dunno why it didnt work
for you PHL
Tom
@PHLMoney
Aug 15 2015 06:46
tx @abhisekp
CamperBot
@camperbot
Aug 15 2015 06:46
phlmoney sends brownie points to @abhisekp :sparkles: :thumbsup: :sparkles:
:star: 32 | @abhisekp | http://www.freecodecamp.com/abhisekp
Tom
@PHLMoney
Aug 15 2015 06:46
worked that time
dc
@dcsan
Aug 15 2015 06:46
glitch.
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:46
@dcsan it didn't work for anyone previously
Tom
@PHLMoney
Aug 15 2015 06:46
Now I can sleep easy
dc
@dcsan
Aug 15 2015 06:46
thank you @abhisekp
CamperBot
@camperbot
Aug 15 2015 06:46
dcsan sends brownie points to @abhisekp :sparkles: :thumbsup: :sparkles:
:star: 33 | @abhisekp | http://www.freecodecamp.com/abhisekp
dc
@dcsan
Aug 15 2015 06:47
yay, make it RAIN $$ points
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:47
@dcsan btw, that was my first contribution to gitterbot. :)
dc
@dcsan
Aug 15 2015 06:47
now you're part of the FCC insiders :)
Tom
@PHLMoney
Aug 15 2015 06:47
TX @abhisekp @dcsan @qmikew1 and good night
CamperBot
@camperbot
Aug 15 2015 06:47
phlmoney sends brownie points to @abhisekp and @dcsan and @qmikew1 :sparkles: :thumbsup: :sparkles:
:star: 34 | @abhisekp | http://www.freecodecamp.com/abhisekp
:star: 102 | @dcsan | http://www.freecodecamp.com/dcsan
Serenity
@qmikew1
Aug 15 2015 06:47
same here (overwritten but same here lol)
dc
@dcsan
Aug 15 2015 06:48
@qmikew1 doesn't have an account on the beta site, so you won't show up on that list...
Serenity
@qmikew1
Aug 15 2015 06:48
lol night @PHLMoney
dc
@dcsan
Aug 15 2015 06:48
about @qmikew1
about @abhisekp
CamperBot
@camperbot
Aug 15 2015 06:48
:star: 34 | @abhisekp | http://www.freecodecamp.com/abhisekp
dc
@dcsan
Aug 15 2015 06:48
:shipit: :shipit: :shipit: :shipit:
Serenity
@qmikew1
Aug 15 2015 06:48
do I use same credential for beta
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:48
@dcsan i don't think the g flag was needed though
dc
@dcsan
Aug 15 2015 06:48
agreed @abhisekp
yes you should login with github
Serenity
@qmikew1
Aug 15 2015 06:48
me either, you just need a single hit
dc
@dcsan
Aug 15 2015 06:49
beta site is only for testing tho.
it was hoped to go live tonite...
not sure if it will
M Used
@mildused
Aug 15 2015 06:49
If a regex matches a message, how do I get that entire message in its entirety as a var?
Serenity
@qmikew1
Aug 15 2015 06:49
it's tomorrow here, and soon to be on west coast
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:50
@mildused regex.exec()[0]
dc
@dcsan
Aug 15 2015 06:50
@qmikew1 the input contains the whole message you're matching against
do you actually want to write a function to do some processing?
or just a regex s/x/y type substituion?
M Used
@mildused
Aug 15 2015 06:51
me?
Serenity
@qmikew1
Aug 15 2015 06:51
I used to have to drive through DC a lot (off topic)
it looks like the existing function pertains to all rooms
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:56
@mildused understood your question.
var regex = /^(.+)$/;
var matched = string.match(regex)[1]
M Used
@mildused
Aug 15 2015 06:57
@abhisekp I'm trying to do this. adding another regex to the RoomMessages
and regex : /jsdlafjlks/,
Abhisek Pattnaik
@abhisekp
Aug 15 2015 06:58
@mildused just wrap your capturing what with parentheses
@mildused what would that regex do? /jsdlafjlks/
M Used
@mildused
Aug 15 2015 06:59
that's just an example
but func: return str.substring(0,1);
or something like that
dc
@dcsan
Aug 15 2015 06:59
var matched = string.match(regex)[1]
if there's nothing returned from that would that throw an error?
null has no [1] property
M Used
@mildused
Aug 15 2015 07:00
where I write regex. If it matches, the func will run. How do I access that entire message in RoomMessages.js
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:00
@dcsan @mildused if(regex.test(string))
M Used
@mildused
Aug 15 2015 07:00
{
        regex: /\bth?a?n?[xk]s?q?\b/gim,
        func: BotCommands.thanks
    }
that's an example
Serenity
@qmikew1
Aug 15 2015 07:01
can use the existing file as a template (return false)
dc
@dcsan
Aug 15 2015 07:01
thats what it does atm
if matches, the func gets called
M Used
@mildused
Aug 15 2015 07:01
Right
but let's say I want to write something similar
dc
@dcsan
Aug 15 2015 07:01
you want to add a new func?
M Used
@mildused
Aug 15 2015 07:01
Yeah!
dc
@dcsan
Aug 15 2015 07:01
you can add that
M Used
@mildused
Aug 15 2015 07:02
From BotCommands.js
dc
@dcsan
Aug 15 2015 07:02
{
        regex: /magic/gim,
        func: function() { ... } 
    }
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:02
@mildused but do mildly get used to it in your local server
M Used
@mildused
Aug 15 2015 07:02
@abhisekp I am locally playing now
dc
@dcsan
Aug 15 2015 07:02
or you can add the function to BotCommands and then just reference it
M Used
@mildused
Aug 15 2015 07:02
@dcsan I'll play in RoomMessages till I figure something out
now what is the input of function?
dc
@dcsan
Aug 15 2015 07:03
yeah @abhisekp was scared of running the server. but it only took two minutes to setup right @mildused
M Used
@mildused
Aug 15 2015 07:03
Yeah. Would have been Shorter, but there was a bug...
dc
@dcsan
Aug 15 2015 07:03
yep so look in BotCommands and you'll see it gets given (input, bot)
M Used
@mildused
Aug 15 2015 07:03
```
{
        regex: /magic/gim,
        func: function(input) { return input; } 
    }
```
like that?
Serenity
@qmikew1
Aug 15 2015 07:03
so if you clone this and have nodejs, how does 'it look locally'

    // very simple example function showing how to parse a message and respond
    // 'echo' is already a botCommand
    echo: function(input, bot) {
        var username = input.message.model.fromUser.username;
        return "@" + username + " said: " + input.message.model.text;
    },
thats an example func that shows how to get at the text of the messages and other property
echo wassup
CamperBot
@camperbot
Aug 15 2015 07:05
@dcsan said: echo wassup
M Used
@mildused
Aug 15 2015 07:05
Ahh!
dc
@dcsan
Aug 15 2015 07:05
that's what it does
M Used
@mildused
Aug 15 2015 07:05
That's perfect!
dc
@dcsan
Aug 15 2015 07:05
for single words that come at the start of a line, they skip the whole regex process...
echo if you do this it gets called
CamperBot
@camperbot
Aug 15 2015 07:06
@dcsan said: echo if you do this it gets called
dc
@dcsan
Aug 15 2015 07:06
echo some markup
CamperBot
@camperbot
Aug 15 2015 07:06
@dcsan said: echo some markup
M Used
@mildused
Aug 15 2015 07:06
So BotCommands will always be running
dc
@dcsan
Aug 15 2015 07:07
yes. its a bit messy having two ways to pick up commands so i think i'll move everything to the regex method in future
M Used
@mildused
Aug 15 2015 07:08
Okay, just a few more questions then I can stop bothering you
Serenity
@qmikew1
Aug 15 2015 07:08
can you stealth the commands?
M Used
@mildused
Aug 15 2015 07:08
    testing: function(input, bot) {

        return "hello";
    }
dc
@dcsan
Aug 15 2015 07:09
echo testing
CamperBot
@camperbot
Aug 15 2015 07:09
@dcsan said: echo testing
M Used
@mildused
Aug 15 2015 07:09
I added that into the BotCommands write below echo
How do I call that from regex?
dc
@dcsan
Aug 15 2015 07:10
{
        regex: /magic/gim,
        func: function(input, bot) {
           return "hello";
      }
}
M Used
@mildused
Aug 15 2015 07:10
ok
cool
got it now. thanks. I'm going to work on something...
Serenity
@qmikew1
Aug 15 2015 07:11
don't want to interrupt the thread, but is there some disadvantage to calling the commands from within room
dc
@dcsan
Aug 15 2015 07:11
:rocket:
putting them inline in there is just a bit messy
but actually not that bad i guess
good to keep them right there with their regex
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:12
@dcsan it seems many features are tightly coupled with the bot. I was hoping the bot would be more like the nameserv or chanserv in IRC.
Serenity
@qmikew1
Aug 15 2015 07:14
@dcsan, is it the opensource paradigm thing?
dc
@dcsan
Aug 15 2015 07:14
did someone say the P word?
dcsan @dcsan whoosh!
dc
@dcsan
Aug 15 2015 07:15
@abhisekp how od you mean?
like, more meta ?
M Used
@mildused
Aug 15 2015 07:16
API Rate limit exceeded?
dc
@dcsan
Aug 15 2015 07:16
right hmm. if you're restarting a lot it might do that...
M Used
@mildused
Aug 15 2015 07:16
Gotcha...
dc
@dcsan
Aug 15 2015 07:17
how many rooms does it join at startup?
M Used
@mildused
Aug 15 2015 07:17
Working now
just had to restart nodemon with rs
dc
@dcsan
Aug 15 2015 07:20
yes its 100 req/minute
but when the app starts up it joins a few rooms
so hits the 100 req quickly
M Used
@mildused
Aug 15 2015 07:21
What if I just want to have it on the demobot room?
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:21
@mildused this wouldn't give the null error. Right @dcsan ?
var string = 'test',
    regex = /(test)/gim;
console.log(regex.test(string) && string.match(/(test)/)[1]);
dc
@dcsan
Aug 15 2015 07:21
yeah, it should just be joining that
➜  nap git:(master) ✗ bin/run.sh 
15 Aug 00:21:28 - [nodemon] v1.4.1
15 Aug 00:21:28 - [nodemon] to restart at any time, enter `rs`
15 Aug 00:21:28 - [nodemon] watching: *.*
15 Aug 00:21:28 - [nodemon] starting `node --harmony app.js`
--------------- startup ------------------
WARN> AppConfig AppConfig.init serverEnv: demobot
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
GBot> botname on rooms demobot
Demo app running at http://localhost:7891
GBot> joined>  demobot/test
thats what i see so.. not sure where the other requests are going
@abhisekp i think thats safe
Serenity
@qmikew1
Aug 15 2015 07:22
this (a live repo) is like crack for coders.
dc
@dcsan
Aug 15 2015 07:22
coffeescript has a nice ? operator that stops those type of errors
yeah, id like set it up with continuous deployment
but need some tests for that to work
M Used
@mildused
Aug 15 2015 07:25
@abhisekp thanks
CamperBot
@camperbot
Aug 15 2015 07:25
mildused sends brownie points to @abhisekp :sparkles: :thumbsup: :sparkles:
:star: 35 | @abhisekp | http://www.freecodecamp.com/abhisekp
Serenity
@qmikew1
Aug 15 2015 07:25
@dcsan thank you for the opportunity to mess with this thing. I will need to read up on git. Quantum motivator
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:26
@dcsan no brownies for you :point_up: August 15, 2015 12:55 PM
dc
@dcsan
Aug 15 2015 07:26
sure! its a lot easier to just get hacking on something in practice than studying in theory...
like playing tennis vs. reading about it..
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:26
thank @dcsan
CamperBot
@camperbot
Aug 15 2015 07:26
abhisekp sends brownie points to @dcsan :sparkles: :thumbsup: :sparkles:
:star: 105 | @dcsan | http://www.freecodecamp.com/dcsan
Serenity
@qmikew1
Aug 15 2015 07:27
totally. 3.5 gone in an instant (didn't even notice). I must sleep before I start typing with my face.
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:27
thank you for the opportunity to mess with this thing. I will need to read up on git. Quantum motivator @dcsan @qmikew1
CamperBot
@camperbot
Aug 15 2015 07:27
abhisekp sends brownie points to @dcsan and @qmikew1 :sparkles: :thumbsup: :sparkles:
:star: 106 | @dcsan | http://www.freecodecamp.com/dcsan
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:27
@dcsan thank you for the opportunity to mess with this thing. I will need to read up on git. Quantum motivator
CamperBot
@camperbot
Aug 15 2015 07:27
abhisekp sends brownie points to @dcsan :sparkles: :thumbsup: :sparkles:
dc
@dcsan
Aug 15 2015 07:28
its actually skipping the second give as we have a timeout
cooldown
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:28
@dcsan sometimes the @camperbot goes haywire! :point_up: August 15, 2015 12:55 PM
M Used
@mildused
Aug 15 2015 07:28
how do you spam the demobot to clear it up?
dc
@dcsan
Aug 15 2015 07:28
how do you mean?
M Used
@mildused
Aug 15 2015 07:28
Delete old messages.
dc
@dcsan
Aug 15 2015 07:29
in the chat?
M Used
@mildused
Aug 15 2015 07:29
yeah
dc
@dcsan
Aug 15 2015 07:29
you cant really
just page em off
.
.
.
.
.
@qmikew1 you asked how it looks when running locally?
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:29
@mildused that's what I suggested @dcsan to implement a delete previous message thing.
dc
@dcsan
Aug 15 2015 07:29
thats' @mildused 's bot
be my guest :)
its not high on my list of prio's tho
M Used
@mildused
Aug 15 2015 07:30
lol
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:31
tx @mildused @dcsan @BerkeleyTrue @benmcmahon100 @qmikew1 @QuincyLarson @dting @oab00
CamperBot
@camperbot
Aug 15 2015 07:31
abhisekp sends brownie points to @mildused and @dcsan and @berkeleytrue and @benmcmahon100 and @qmikew1 and @quincylarson and @dting and @oab00 :sparkles: :thumbsup: :sparkles:
:star: 100 | @berkeleytrue | http://www.freecodecamp.com/berkeleytrue
:star: 186 | @oab00 | http://www.freecodecamp.com/oab00
:star: 7 | @dting | http://www.freecodecamp.com/dting
:star: 144 | @quincylarson | http://www.freecodecamp.com/quincylarson
:star: 39 | @mildused | http://www.freecodecamp.com/mildused
:star: 107 | @dcsan | http://www.freecodecamp.com/dcsan
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:32
@qmikew1 no brownies for you. You're not in beta. :tongue:
Serenity
@qmikew1
Aug 15 2015 07:32
yeah, that's ok.. I was just commenting in test (bot)
M Used
@mildused
Aug 15 2015 07:32
is String.prototype.repeat() not allowed?
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:32
@qmikew1 you can login to http://beta.freecodecamp.com
Serenity
@qmikew1
Aug 15 2015 07:33
I'm like a ghost in there (I can see you but you can't see me)
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:33
@mildused why not?
M Used
@mildused
Aug 15 2015 07:33
@abhisekp It's not working
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:33
@mildused how you using it?
Serenity
@qmikew1
Aug 15 2015 07:33
I should be pushing a penny up the door (sorry couldn't resit sappy movie reference)
M Used
@mildused
Aug 15 2015 07:34
text: ">" + ".\n".repeat(100)
lol
cheating it in local system.
Serenity
@qmikew1
Aug 15 2015 07:35
sleep deprived. why newline char
?
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:35
@mildused .(dot operator) has higher precedence over + (plus operator)
Serenity
@qmikew1
Aug 15 2015 07:35
oh to page off?
dc
@dcsan
Aug 15 2015 07:35
its not a regex
M Used
@mildused
Aug 15 2015 07:35
What about "x".repeat(100)
It doesn't work
dc
@dcsan
Aug 15 2015 07:36
i havent seen that before
is that JS ?
M Used
@mildused
Aug 15 2015 07:36
It's EC2015
oh ok
dc
@dcsan
Aug 15 2015 07:36
is it in node 12?
does it error?
M Used
@mildused
Aug 15 2015 07:37
it is in node 12 supposedly
dc
@dcsan
Aug 15 2015 07:37
btw that will just return a new string
M Used
@mildused
Aug 15 2015 07:37
but it errors
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:37
@mildused --harmony
dc
@dcsan
Aug 15 2015 07:37
thats why i suggest iojs also
M Used
@mildused
Aug 15 2015 07:37
How do I use harmony?
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:38
@mildused just maintain harmony in your day to day life. :P
dc
@dcsan
Aug 15 2015 07:38
node --harmony
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:38
@mildused i think Node 0.12.7 supports repeat()
M Used
@mildused
Aug 15 2015 07:39
ok it works with node --harmony
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:39
@dcsan @mildused coderpad.io uses Node 0.12.7 and repeat() works there
M Used
@mildused
Aug 15 2015 07:40
Something whack is going on
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:40
@mildused what's your node version?
M Used
@mildused
Aug 15 2015 07:40
12.7
you?
dc
@dcsan
Aug 15 2015 07:40
you could put the string in avar and logit first
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:40
or maybe they use harmony too
Serenity
@qmikew1
Aug 15 2015 07:40
how do you test for browser compat
M Used
@mildused
Aug 15 2015 07:40
Yeah, but why doesn't it work
dc
@dcsan
Aug 15 2015 07:41
strings are immutable?
Serenity
@qmikew1
Aug 15 2015 07:42
but if you push that .repeat() wouldn't it fail on most browsers (and what's the fallback?)
not most (some)
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:43
@qmikew1 fallback is always the polyfill. http://devdocs.io/javascript/global_objects/string/repeat#Polyfill
M Used
@mildused
Aug 15 2015 07:45
How many new lines should be enough for the bot to clear it up well?
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:47
@mildused different device, different cases
Serenity
@qmikew1
Aug 15 2015 07:49
would a switch with user agent work?
dc
@dcsan
Aug 15 2015 07:50
its rendering text on the server, not the client
client just sees a string
Serenity
@qmikew1
Aug 15 2015 07:50
hmm
dc
@dcsan
Aug 15 2015 07:50
oh, mildused it may get cuto ff by gitter API is you send too much
looks like spam?
M Used
@mildused
Aug 15 2015 07:51
it's one query
Serenity
@qmikew1
Aug 15 2015 07:51
yeah it looks like the exorcist with all the notifications lol
M Used
@mildused
Aug 15 2015 07:52
i would turn on lurk mode lol
it's one query with 500 lines. .. Pushing it, but it works
Serenity
@qmikew1
Aug 15 2015 07:52
that might be a good idea... still pondering what client sees string wise
M Used
@mildused
Aug 15 2015 07:53
This message was deleted
This message was deleted
This message was deleted
Please turn on lurk mode...
This message was deleted
oops
{
regex: /clear | cls /
}
what's wrong with that?
@abhisekp
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:57
@mildused it's not js. It's regex. /clear|cls/
M Used
@mildused
Aug 15 2015 07:58
ok tx @abhisekp
CamperBot
@camperbot
Aug 15 2015 07:58
mildused sends brownie points to @abhisekp :sparkles: :thumbsup: :sparkles:
:star: 36 | @abhisekp | http://www.freecodecamp.com/abhisekp
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:58
@mildused or did you mean anything else?
M Used
@mildused
Aug 15 2015 07:58
It's clear or cls
either one can occur
Serenity
@qmikew1
Aug 15 2015 07:58
whitespace counts as a pattern element
Abhisek Pattnaik
@abhisekp
Aug 15 2015 07:58
@mildused ok. then that's it. :point_up: August 15, 2015 1:27 PM
@mildused but i recommend you use /^clear|cls$/
Serenity
@qmikew1
Aug 15 2015 07:59
ok, sleepy now. I'll keep an eye out for multi-lingual chatbot
dc
@dcsan
Aug 15 2015 08:00
help tern
CamperBot
@camperbot
Aug 15 2015 08:00

:point_right: js ternary [wiki]

The Ternary operator replaces an if/then block.

It's mostly used in one liners for simple tests and replacements, like this:

var x = false;
var s = x ? "yes" : "no";
console.log(s);  //→ "no"

:pencil: read more about js ternary on the FCC Wiki

dc
@dcsan
Aug 15 2015 08:01
update
CamperBot
@camperbot
Aug 15 2015 08:01
updating wiki...
Angular-Resources.md | 6 +++++- List-of-Free-Code-Camp-city-based-Campsites.md | 16 ++++++++++++++++ Official-Free-Code-Camp-Chat-Rooms.md | 1 + bonfire-check-for-palindromes.md | 2 +- js-ternary.md | 3 +-- 5 files changed, 24 insertions(+), 4 deletions(-)
done code: 0
:computer:
Updating 2410c27..87d5c63 Fast-forward
M Used
@mildused
Aug 15 2015 08:01
git status
darn
dc
@dcsan
Aug 15 2015 08:02
you can see how we do update
a bit risky but pretty powerful
help tern
CamperBot
@camperbot
Aug 15 2015 08:02

:point_right: js ternary [wiki]

The Ternary operator replaces an if/then block.
It's mostly used in one liners for simple tests and replacements, like this:

var x = false;
var s = x ? "yes" : "no";
console.log(s);  //→ "no"

:pencil: read more about js ternary on the FCC Wiki

M Used
@mildused
Aug 15 2015 08:05
How do I make it connect to only demobot/test?
dc
@dcsan
Aug 15 2015 08:06
RoomData.js
thats the list of rooms it will connect to (based on env)
M Used
@mildused
Aug 15 2015 08:06
Can you give me the barebones for demobot/test?
dc
@dcsan
Aug 15 2015 08:07
sorry?
M Used
@mildused
Aug 15 2015 08:07
nvm
dc
@dcsan
Aug 15 2015 08:09
ok i'm logging off ...
M Used
@mildused
Aug 15 2015 08:11
@dcsan night
dcsan @dcsan afk
dc
@dcsan
Aug 15 2015 08:12
rollem
CamperBot
@camperbot
Aug 15 2015 08:12
dc
@dcsan
Aug 15 2015 08:12
do you also see that video collapse and expand
?
M Used
@mildused
Aug 15 2015 08:12
I think so...
I loaded it as collapsed then it expanded
dc
@dcsan
Aug 15 2015 08:13
oh no its just per user setting
/collapse and /expand
M Used
@mildused
Aug 15 2015 08:14
oh
evaristoc
@evaristoc
Aug 15 2015 08:36
Hi everyone! @dcsan How are you doing?
you don't sleep, man!
how much coffee do you drink?
dc
@dcsan
Aug 15 2015 08:39
haha, chat is the buzz!
but off to sleep now. ttyl !
evaristoc
@evaristoc
Aug 15 2015 08:39
Hehehe! See you!
Vos
@KrisVos130
Aug 15 2015 08:40
Good night @dcsan
sanjay-arya
@sanjay-arya
Aug 15 2015 08:41
here, it is just 3:10pm
Abhisek Pattnaik
@abhisekp
Aug 15 2015 14:29

@dcsan New Scenario. Can you account for that? :point_up: August 15, 2015 7:57 PM

Two different messages in each line

Omar
@oab00
Aug 15 2015 14:36
needs some sort of caching for that .. dunno if one already exists
dc
@dcsan
Aug 15 2015 17:13
Morning
Vos
@KrisVos130
Aug 15 2015 17:14
Morning
evaristoc
@evaristoc
Aug 15 2015 19:08
hi man, morning...
M Used
@mildused
Aug 15 2015 19:13
@dcsan I'll get the echo documentation done tonight
edmondcartes
@edmondcartes
Aug 15 2015 19:16
@dcsan Can you make me a collaborator?
dc
@dcsan
Aug 15 2015 19:23
@edmondcartes i can do
but you can also just fork the repo and sent pull requests which is more normal way
about @edmondcartes
have you done any coding :)
dc
@dcsan
Aug 15 2015 20:40
@abhisekp bit of an edge case, i don't think we'll do that right away