Marisa

Activity Graph

Page 1 of 1

2015-07-01

[03:49:46] Marisa: has joined #ruby
[03:55:28] Marisa: Ping timeout: 264 seconds
[04:00:41] Marisa: has joined #ruby
[09:11:43] Marisa: Ping timeout: 248 seconds

2015-06-30

[18:50:28] Marisa: has joined #ruby
[19:24:25] Marisa: Ping timeout: 264 seconds
[22:11:06] Marisa: has joined #ruby
[22:56:09] Marisa: Ping timeout: 256 seconds

2015-06-29

[01:30:34] Marisa: Ping timeout: 272 seconds
[04:55:56] Marisa: has joined #ruby
[07:01:25] Marisa: Ping timeout: 256 seconds
[07:45:38] Marisa: has joined #ruby
[11:25:29] Marisa: Ping timeout: 256 seconds
[11:28:51] Marisa: has joined #ruby
[14:27:16] Marisa: Ping timeout: 255 seconds

2015-06-28

[04:46:08] Marisa: has joined #ruby
[04:48:09] Marisa: anybody know of a good resource that explains how to parse a string so it can be split up via spaces and new lines? I'm finding the official documentation hard to follow
[04:50:10] Marisa: American actually ;)
[04:50:24] Marisa: thanks for the help
[04:51:42] Marisa: well i'm trying to split up a string by both new lines and spaces
[04:51:58] Marisa: i'm at the point where i know more about how to solve my problem than the syntax to do it...
[04:54:34] Marisa: zenspider: thanks for the tip, I appreciate it
[04:57:23] Marisa: nofxx: lol yeah, I forget that american can mean more than one continent
[04:59:17] Marisa: so, any general recommendations on books/websites to learn Ruby comprehensively? I've been doing learn ruby the hard way but I'm about 2/3rds through and starting to realize it's not very good about teaching "the ruby way" of coding
[05:00:56] Marisa: thanks :)
[05:07:03] Marisa: hmm, this is being annoying...i'm using cloud 9 as my ide and when i run ri (which does work), it can't find anything about any function
[05:08:11] Marisa: just keep getting "nothing know about .foo"
[05:10:27] Marisa: i didn't install it myself, basically, they use a virtual machine (or something like it)
[05:10:47] Marisa: believe so
[05:12:48] Marisa: i figured out how to get rvm to download the documentation
[07:09:18] Marisa: have a question about variable scope...i have 3 variables that I want to use, and i am using a loop to parse their values from my input...would best practice to use a @instancevariable when I call them in the loop and then later in the program or should i just initialize them before the loop?
[07:12:32] Marisa: it's more like, since i'm initializing them inside a loop, i can't call them later (they're local to the loop), so should i make them instance variables (by using @name) or should i just initialize the variables before i assign them values
[07:12:41] Marisa: not really a code question, more of a style question, if you dig
[07:13:22] Marisa: this is a pretty simple program, i'm not even using a class
[07:14:38] Marisa: totally, but it's not needed for what I'm doing
[07:15:34] Marisa: i think initializing the variables before the loop is the way to go for this
[07:32:06] Marisa: woohoo, I got it to parse my data inputs and assign variables correctly. Thanks guys for your help :)
[07:35:07] Marisa: sure: https://gist.github.com/marisas/eb0a731d64df556e93fd
[07:36:14] Marisa: the data is always formatted the same, on line 1 there are 3 numbers separated by spaces and on line 2 there are up to 10 numbers separated by spaces
[07:36:38] Marisa: yeah, the loop is a bit overkill, no?
[07:38:31] Marisa: any suggestions for cleaning it up? I was having trouble getting data using ARGF
[07:39:40] Marisa: I can just use split()?
[07:41:30] Marisa: the hit points of each enemy
[07:41:54] Marisa: this is for a code challenge so i'm not trying to get tooooo specific on what exactly i'm trying to do
[07:42:35] Marisa: no, this is just parsing the data, i still have to write the actual logic to give me the answer
[07:43:52] Marisa: but basically, line 1 has 3 numbers, the first is the number of enemies, second is amount of spell damage on first enemy, third is amount that the spell damage reduces for each subsequent enemy
[07:44:22] Marisa: and then line 2 has the hit points of the enemies (and the number will vary)
[07:45:19] Marisa: ah okay :)
[07:45:54] Marisa: well, i wasn't sure how to get data using ARGF line by line and then split it up without using an array
[07:46:52] Marisa: well i only want to split the first line, it will work better for line 2 to keep it in an array
[07:47:04] Marisa: let me rephrase
[07:48:17] Marisa: i want the data from line 2 to be in an array (so I can manipulate it later) and but for line 1, i want each item to be assigned to a variable
[07:48:41] Marisa: jfarmer: asaik, no
[07:49:04] Marisa: bnagy: that's super helpful, thanks
[07:50:33] Marisa: no, i'm trying to learn, i appreciate it
[07:52:43] Marisa: Ox0dea: definitely nicer, i'm just too new at this to know all the syntax especially the pretty stuff ;)
[07:53:36] Marisa: thanks for all your help though...might need to refactor it tomorrow though, it's getting late here
[07:54:13] Marisa: devdraft.com
[07:55:12] Marisa: i'm not sure i can get through all 3 programs though, this was supposed to be the easy one and it's taken me like 3 hours to just parse the data (to be fair, i've never done anything like that in my previous studies)
[07:55:56] Marisa: because of the companies listed?
[07:56:46] Marisa: i'm not realistically trying to get a job out of this, i just thought it would be a good learning experience as a worst case scenario, and best case, you never know...
[07:57:44] Marisa: i have both of those bookmarked
[07:59:29] Marisa: i've been going through the Odin Project, but I was getting bored with the HTML/CSS stuff (as I already know a fair bit about that), so I started going through learn ruby the hard way, but I feel like it's just a bad translation of learn perl the hard way and not really that useful
[08:00:23] Marisa: really just trying to make steady progress on stuff, but i've done too many super simple programs and not enough "sink or swim" type challenges, which is where i tend to learn the most
[08:01:14] Marisa: i think the best thing i've done so far was make a simple calendar generating program...learned a lot from that
[08:01:39] Marisa: like how much syntax i really don't know, for one....
[08:02:18] Marisa: i'll definitely check them both out soon
[08:05:16] Marisa: out of curiosity, is anyone here in devops?
[08:07:34] Marisa: )xxxxx[;;;;;;;;;>
[08:22:28] Marisa: hasta luego, muchas gracias amigos
[08:22:53] Marisa: c u l8r, tyvm
[08:23:49] Marisa: i'll try to visit using a real IRC client next time
[08:27:58] Marisa: Ping timeout: 246 seconds
[20:53:01] Marisa: has joined #ruby
[20:53:18] Marisa: Happy Tau Day everyone
[20:53:40] Marisa: Ruby needs a tau constant in it's Math module
[20:54:55] Marisa: http://tauday.com/tau-manifesto
[20:56:14] Marisa: Tau Day is celebrated with twice the pie
[21:36:10] Marisa: Ping timeout: 246 seconds
[23:24:26] Marisa: has joined #ruby