cryocaustik

Activity Graph

Page 1 of 1

2017-11-23

[02:51:56] cryocaustik: has joined #ruby
[05:23:33] cryocaustik: Remote host closed the connection

2017-11-20

[08:34:44] cryocaustik: Remote host closed the connection

2017-11-19

[19:30:43] cryocaustik: has joined #ruby
[19:33:33] cryocaustik: I was wondering it if would be possible to run https://github.com/discourse/discourse and also add a subsite for my data application into the discourse infrastructure?
[19:33:33] cryocaustik: Hi - I am very new to ruby and am trying to learn; my goal is to setup a web forum that would also have a subsite with charts/tables to consume some data from another database.
[19:36:16] cryocaustik: I have read about it; an infrastructure to help people new to ruby get setup and running
[19:37:43] cryocaustik: I am interested in learning ruby overall; but what drove me to the language is wanting to build a forum/subsite
[19:39:40] cryocaustik: that is a good point; I am about 20% into the codecademy tutorial; I will give rails a try and see if I can setup a site using that
[19:39:59] cryocaustik: nah, that is a great timeline
[19:40:05] cryocaustik: esp. considering I am new to ruby :D
[19:40:43] cryocaustik: nice - I will look it up
[19:40:52] cryocaustik: thanks again for the advice

2015-12-08

[05:40:26] cryocaustik: has joined #ruby
[06:00:53] cryocaustik: Quit: went to chop soup

2015-12-07

[04:11:59] cryocaustik: Quit: went to chop soup

2015-12-06

[00:58:35] cryocaustik: lol, well that
[00:58:41] cryocaustik: that's a story to come back to
[02:15:26] cryocaustik: hey all - is .exclude? still valid?
[02:15:53] cryocaustik: I am trying to use it with a user entry
[02:16:00] cryocaustik: to check if the entry has certain letters
[02:17:48] cryocaustik: that is very odd
[02:17:55] cryocaustik: anytime i try to use it, i get:
[02:18:04] cryocaustik: randomtest_2.rb:3:in `<main>': undefined method `exclude?' for "alex":String (NoMethodError)
[02:18:35] cryocaustik: I used it as: puts usr.exclude?("s")
[02:19:21] cryocaustik: oh.. you are right
[02:19:26] cryocaustik: sorry and thnx!
[02:26:26] cryocaustik: Read error: Connection reset by peer
[02:28:36] cryocaustik: has joined #ruby
[02:48:02] cryocaustik: other than using activesupport and .exclude?, is there any other way to check if a string does not include certain characters?
[02:48:23] cryocaustik: example of what I am trying to do:
[02:48:24] cryocaustik: while (user_input.exclude? ("s" ||"ss" || "ci" || "ce")) || (user_input.empty? == true)
[02:48:25] cryocaustik: user_input = gets.chomp
[02:48:25] cryocaustik: system("cls")
[02:53:02] cryocaustik: sorry about that paste
[02:55:47] cryocaustik: !input.include? did it, didn't think to use the ! before my string. Thank you!
[09:46:50] cryocaustik: was wondering if I could get some advice on best practices in ruby; when using loops is it better to use {} or the "do" method?
[09:52:52] cryocaustik: context for the above questions: https://gist.github.com/anonymous/0feee55bcb18bbe9dfda
[10:03:23] cryocaustik: thank you both for the advice, I have to admit option a) does make sense to me as well
[10:04:36] cryocaustik: I had one more question about print/puts and how to call on variable in them
[10:05:19] cryocaustik: is there any difference in using "#{var1} : #{var2}" verses using var1 + ":" + var2
[10:06:10] cryocaustik: sorry, say I did have the spaces in the second
[10:06:55] cryocaustik: ah, that is useful. I didn't know that, I was using "#{var1.to_s} more text"
[10:07:20] cryocaustik: thanks again, apeiros and shevy
[10:07:28] cryocaustik: really appreciate all the help today!
[10:48:12] cryocaustik: Read error: Connection reset by peer
[21:25:37] cryocaustik: has joined #ruby
[21:44:37] cryocaustik: I agree, just finished putting up the tree and almost caught some ZZZ on the couch
[21:45:49] cryocaustik: heh, nah, hiding those this year. Kids are old enough too reach everything, but not old enough to understand to not break them
[21:45:56] cryocaustik: so simple stuff only this year
[21:46:46] cryocaustik: lol. I guess it also depends on who you ask...
[21:47:37] cryocaustik: Uhm, I think so?
[22:12:19] cryocaustik: I think you would be able to use a #include? and #gsub! to change the users input
[22:12:42] cryocaustik: but you would need a loop, not just an if
[22:12:45] cryocaustik: to catch all the words
[22:13:17] cryocaustik: example: https://repl.it/B6X3/1
[22:13:36] cryocaustik: I am also very new, so I could be wrong as well.
[22:14:41] cryocaustik: broadband: updated example https://repl.it/B6X3/2
[22:17:36] cryocaustik: you would just need to figure out how to make it run at certain points or triggers I guess, but I am way too new for that
[22:19:21] cryocaustik: I think you should be able to make a trigger for the script to loop through the user_input and replace the characters as needed
[22:19:52] cryocaustik: maybe make the loop a method and then call on it once a user finishes their entry?
[22:20:51] cryocaustik: I agree with Radar though, it does sound like a text editor
[22:29:08] cryocaustik: broadband: also, looking through the js code you linked; from my limited understanding of js, your friend is still using a while loop with an array to go through the users input
[22:31:43] cryocaustik: broadband: I would agree on that, but it would appear that you could most certainly duplicate that code in Ruby
[23:03:25] cryocaustik: regarding that text editor, what do you guys think of this conversion of it: https://repl.it/B6X3/4
[23:04:52] cryocaustik: adaedra: Thanks! Will look into that method.
[23:06:37] cryocaustik: adaedra: it does, I thought it would be fun to convert the js code broadband linked
[23:06:51] cryocaustik: so I used what I knew so far, and that is what I came up with...
[23:07:38] cryocaustik: converts replaces the specified characters with the specified string
[23:11:04] cryocaustik: adaedra: I am eager to hear why, I am kind of dumbfounded. It works when I write a sentence, but not with a single word
[23:12:22] cryocaustik: adaedra: if you run that code and paste: Cat came up the grey hill, just Joking around and stood Still
[23:12:42] cryocaustik: adaedra: it will then work, but not when you use single words?
[23:15:04] cryocaustik: adaedra: That is very odd; Shouldn't the || have made it so it would work as long as any one of those characters existed in it?
[23:17:45] cryocaustik: adaedra: Interesting, thank you for looking at it and pointing it out. I really misunderstood how #include? works
[23:22:14] cryocaustik: adaedra / Ox0dea: my understanding of "||" is to return "true" if at least one of the conditions is "true"; is that an incorrect understanding? or did I just use it inappropriately?
[23:28:38] cryocaustik: Thanks for the examples Ox0dea / adaedra - there are still some things I don't understand, I am going to do some more research around the above
[23:28:52] cryocaustik: Ox0dea: at the risk of sounded very stupid.... fuel?
[23:32:07] cryocaustik: adaedra: I see what you mean.
[23:32:22] cryocaustik: Thanks again!

2015-12-05

[22:36:26] cryocaustik: has joined #ruby
[22:37:21] cryocaustik: https://i.imgur.com/DNLIVcc.jpg
[22:47:19] cryocaustik: Quit: went to chop soup
[22:47:55] cryocaustik: has joined #ruby