apeiros changed the topic of #ruby to: Ruby 2.1.5; 2.0.0-p598; 1.9.3-p551: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
rylev has joined #ruby
jimbach has joined #ruby
tskogberg has joined #ruby
jonr22 has quit [Remote host closed the connection]
PeterBoy has joined #ruby
FooMunki_ has quit [Read error: No route to host]
FooMunki has joined #ruby
chrishough has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krzbrg has joined #ruby
rylev has quit [Ping timeout: 264 seconds]
jimbach has quit [Ping timeout: 272 seconds]
goshdarnyou has joined #ruby
mloveless has quit [Read error: Connection reset by peer]
wex13r has left #ruby [#ruby]
<krazyj> does anyone know how to make private helper methods?
<krazyj> in middleman, i have to do: `helpers do … end` to declare helper methods
<krzbrg> Private to what?
russt has joined #ruby
mloveless has joined #ruby
<krazyj> i have a method i don’t want my partials to be able to access, but the only way to access it from my helper methods seems to be to put it in `helpers do … end`
tastycode has joined #ruby
blahwoop has quit [Remote host closed the connection]
boombadaroomba has joined #ruby
<krazyj> KramerC:
<krazyj> sorry, krzbrg
jonr22 has joined #ruby
bennyDaBeard has joined #ruby
volty has joined #ruby
weemsledeux has joined #ruby
<banister> anyone here speak malay?
jenrzzz has joined #ruby
tskogberg has quit [Ping timeout: 258 seconds]
workmad3 has joined #ruby
<krazyj> in ruby, do you typically declare empty variables, before an if-block that will always assign them?
<krazyj> i.e. foo = ‘’; if bar foo = ’a’ else foo = ‘b’ end;
jlast has joined #ruby
workmad3 has quit [Client Quit]
workmad3 has joined #ruby
tskogberg has joined #ruby
jonr22 has quit [Remote host closed the connection]
Trevoke has joined #ruby
<volty> no, not usually
<Trevoke> Hi all, can I reopen a closed UNIXServer socket?
oo_ has joined #ruby
<volty> >> foo = bar ? 'a' : 'b'
<eval-in__> volty => undefined local variable or method `bar' for main:Object (NameError) ... (https://eval.in/225156)
<volty> >> bar = true; foo = bar ? 'a' : 'b'
<eval-in__> volty => "a" (https://eval.in/225157)
<pontiki> krazyj: in that case, it's so ruby doesn't create an inner local variable foo there
<krazyj> volty: ok.. am i doing this in the right ruby way? https://gist.github.com/joshavant/13a939352fc43d6c41be
Techguy305 has joined #ruby
<Trevoke> volty: first of all, if you can rename the file to ".rb" so the gist properly does the syntax highlighting it'll be great :)
<volty> sorry krazyj, i have just enough force for simple advices
<krazyj> ah p
<krazyj> pontiki: thoughts?
<Trevoke> volty: boolean methods (returning true/false) should end with "?" and not start with "is". In addition, use snake_case instead of camelCase
aspiers has joined #ruby
<workmad3> Trevoke: I think you mean that to be directed at krazyj, not volty ;)
<volty> Trevoke: sorry, but I don't get at what are you telling me
<krazyj> Trevoke: ohhh ok
kobain has joined #ruby
<Trevoke> krazyj: You're basically on spot for Ruby-isms, but your method is receiving two booleans, which means it can probably do up to four different things, and you should instead have a number of smaller methods that do just the one thing you want it to do
<workmad3> krazyj: you'll produce invalid HTML with an active hyperlink in that method
<krazyj> Trevoke: what about boolean arguments/variable names?
<Trevoke> krazyj: the boolean arguments hint at a violation of the Single Responsibility Principle
<krazyj> workmad3: ahh will it? haven’t sanity checked it yet
oo_ has quit [Ping timeout: 255 seconds]
<krazyj> Trevoke: that’s a good point, but, for the application, it’s acceptably messy
<workmad3> krazyj: you need to close tags in the opposite order to opening them ;)
<krazyj> workmad3: ahh good spot
<Trevoke> krazyj: it's your code. I would write it differently, but you're the one responsible for the app :)
<krazyj> Trevoke: so declaring `element = ‘’` is ok in rubyland?
<Trevoke> krazyj: That's just a consequence of the violation of the SRP as indicated above
<krazyj> ahh
<Trevoke> all: can I reopen a unixsocket / unixserver?
corehook has joined #ruby
dkb20k has joined #ruby
<volty> no
<krzbrg> I don't think so.
<krzbrg> Could be wrong, though.
<workmad3> krazyj: I'm not fully happy with it, but I'd be tempted down a route like this personally: https://gist.github.com/workmad3/7c19660c50e56167f992
<krzbrg> I keep seeing krazyj and thinking it's my name.
<Trevoke> krzbrg: I don't find any way of doing it. Interestingly, creating a UNIXServer means creating a 'file' .. but closing it doesn't get rid of the file! Is there a Ruby-ism to clean that, too?
jokke has joined #ruby
<krazyj> workmad3: ahhh interesting. thank you for the example!
* krazyj is still learning his Rubyisms.
<krazyj> krzbrg: heh
wjimenez5271 has joined #ruby
<krzbrg> Trevoke Could you remove the file manually? Ruby's filesystem library is fairly robust.
yfeldblum has quit [Ping timeout: 258 seconds]
<krzbrg> It's quiet in the Rails room, I'm going to re-ask this here:
Lingos has quit [Quit: Be back later ...]
corehook has quit [Ping timeout: 258 seconds]
<krzbrg> What's a good way to make a private method available to the "include" block within a Model's concerns?
<krzbrg> I have this working but looks really wonky to me: http://pastie.org/private/trbvboetevlyow9fqkgq
dkb20k has quit [Ping timeout: 258 seconds]
<krzbrg> Not thrilled about defining self methods within the include's block above wherever they are needed.
<Trevoke> krzbrg: a private method refers to the internal, the bowels of the class. Making a module method private is an interesting choice; why do you want to make it private?
<krazyj> workmad3: i think the ideal implementation in this situation probably involves correct HTML interpretation + parsing
<krazyj> workmad3: but, for now, hokey string mainpulation will do
wjimenez5271 has quit [Client Quit]
nateberkopec has quit [Quit: Leaving...]
<Trevoke> krzbrg: in addition, "included" is, unless I'm wrong, a class-level method, so unless the private method is also class-level (using private_class_method, that is, otherwise it won't be private), you won't be able to use it
<krzbrg> Trevoke: Because it's in essence a helper method that will only be called within this module.
<krzbrg> Right.
<krzbrg> Hm.
<workmad3> krazyj: yeah :) I was just looking for a way to extract out the commonality of what your condition checks were doing, while also making it harder to generate invalid HTML by forcing opening and closing into a stack ;)
jokke has quit [Quit: ZNC - http://znc.in]
<aep> how the heck does unpack('b*') work? for some obscure reason it flips bytes in pairs of two :O
<aep> wtf is the endianess of a byte?
<Trevoke> krzbrg: I must ask you to consider as well whether you are doing premature abstraction / refactoring. I don't _much_ like the idea of the concerns as they have been introduced in Rails
jokke has joined #ruby
<Trevoke> krzbrg: If at all possible, I'd urge you to avoid doing this until you find an absolute need to extract that behavior and name it
lw has quit [Quit: s]
<krzbrg> Trevoke: That's fair. I have a trio of related models that are all using the exact same Paperclip definitions. I am using a concern to mix that functionality in.
<workmad3> krzbrg: it's also worth noting - 'private to a module' isn't a concept that makes sense in ruby... 'private' means 'cannot be called with an explicit receiver', it's not like private in java
<krzbrg> workmad3: I think that's what I'm getting tripped up on.
<krazyj> if i have `foo do … end`… is there a standard way to access the scope containing `foo`?
<krazyj> inside of foo
<Trevoke> krazyj: depends on the containing scope :)
<Trevoke> krzbrg: why is any of this logic private in the first place?
<krazyj> Trevoke: i have all of this: https://gist.github.com/joshavant/6c5b858520d4cb90f387
nateberkopec has joined #ruby
<krazyj> but, i only want my templates to be able to access `nav_element`
<krazyj> therefore, i’d like to make every other method except that private
tastycode has quit [Quit: tastycode]
<krazyj> is that normal, or would i usually just leave it all in the `helpers` scope?
<krzbrg> Trevoke: It doesn't really need to be. I was just thinking that was a cleaner approach given that the method was not to be called anywhere else in the codebase. Perhaps I've spent too much time muddling around in JavaScript's land of globals.
<Trevoke> krzbrg: think about it this way: if the method contains logic that needs to be testable, then it should be public. If it is a completely internal concern, then it should be private.
<Trevoke> It's not a perfect point of view, but it's a good starting point
<krzbrg> Trevoke: That's a fair stance. Thanks.
jokke has quit [Quit: ZNC - http://znc.in]
jimbach has joined #ruby
krisquigley has joined #ruby
hakunin_ has quit [Ping timeout: 264 seconds]
<krzbrg> Trevoke: Here's the actual application code, if it helps clarify what I was saying: http://pastie.org/private/umn2o48u4tgvf31tuf2idw
ghr has joined #ruby
<krzbrg> Trevoke: There's really no harm in allowing the method to remain as is. It just felt strange defining it within the block being passed to include.
<Trevoke> krzbrg: "name == GalleryImage" ? Looks like you're forcing abstraction
baroquebobcat_ has joined #ruby
<Trevoke> If it's almost the same but not the same AND your only logic hook is the class name, there's a small
<Trevoke> I must urge you to wait a little longer before you do this refactor
<Trevoke> s/small/smell
rkalfane has joined #ruby
hiyosi has quit [Ping timeout: 256 seconds]
jokke has joined #ruby
baroquebobcat has quit [Ping timeout: 258 seconds]
baroquebobcat_ is now known as baroquebobcat
<krzbrg> I could just flip the column name of "image" to "hero" so that the included block is the same across all models.
jlast has quit [Ping timeout: 272 seconds]
<krzbrg> That's a good point, though. The fact that I'm having so much trouble with this is probably a sign that I'm forcing the abstraction.
krisquigley has quit [Ping timeout: 256 seconds]
<krzbrg> Thanks Trevoke.
rgs has quit [Ping timeout: 250 seconds]
<Trevoke> krzbrg: My pleasure!
ghr has quit [Ping timeout: 255 seconds]
* Trevoke turns and flips his cape, then walks off to the nearby coffee shop to get his fill of fuel.
rgs has joined #ruby
mloveless has quit [Read error: Connection reset by peer]
mloveless has joined #ruby
jokke has quit [Quit: ZNC - http://znc.in]
Trevoke has quit [Remote host closed the connection]
Joufflu has quit [Ping timeout: 258 seconds]
fabrice31 has joined #ruby
marcux has quit [Quit: marcux]
Xeago has quit [Remote host closed the connection]
jimbach has quit [Remote host closed the connection]
jonr22 has joined #ruby
fabrice31 has quit [Ping timeout: 264 seconds]
workmad3_ has joined #ruby
jonr2219 has joined #ruby
<zacts> ok! so I'm starting to understand the order in which messages to objects are resolved to a particular method
<zacts> so there are no method collisions
<volty> enlighten us
<zacts> volty: a.zacts - it will first resolve to the class that defines a.
<zacts> if it's there good
<zacts> otherwise look to see if it is in an included module mixed-in to that class
<zacts> it orders modules in reverse included order
<zacts> although you can't include a module into a class >1
moritzs has joined #ruby
<zacts> if it's not there then it goes to the class's superclass, and so on. all the way up to BasicObject
<volty> you couldn't distinguish (if > 1)
<volty> nice :)
<zacts> volty: I don't understand
<zacts> sorry for my quick typing
moritzs has quit [Max SendQ exceeded]
<zacts> you can't include a module into a class more than once
Olivertynes has quit [Ping timeout: 245 seconds]
patrick99e99 has joined #ruby
<volty> of course, since you couldn't resolve its method names
ta has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3_ has quit [Ping timeout: 258 seconds]
jonr2219 has quit [Ping timeout: 255 seconds]
yetanotherdave has quit [Quit: Lost terminal]
<zacts> well you can have 'include module' more than once in a class, but only the first inclusion is noticed. the subsequent includes are just ignored
<workmad3> zacts: now you just need to fit in method_missing to your understanding ;)
sski has joined #ruby
<volty> (i mean since the interpreter, or MRI, couldn't build the "lookup tables")
<zacts> workmad3: what is method_missing?
Musashi007 has joined #ruby
bmichelsen has joined #ruby
Olivertynes has joined #ruby
<workmad3> zacts: your next research project ;)
<zacts> ok
jokke has joined #ruby
<zacts> workmad3: I mean if it can't find the method in BasicObject, then it doesn't exist
weemsledeux has quit [Remote host closed the connection]
jokke has quit [Client Quit]
<workmad3> zacts: wanna bet? :P
<volty> the method you are trying to 'resolve' isn't there -- method_missing
jokke has joined #ruby
<zacts> workmad3: oh, so it calls method_missing
<zacts> instead?
<workmad3> zacts: yup... back at the start of the lookup chain
perturbation has joined #ruby
<zacts> heh, ok
<zacts> that's kind of recursive
<volty> but you can create it, on the fly -- and that's you after-next research
<workmad3> zacts: there's also singleton classes and prepend modules to fit in... but they're just specific modifications of the lookup chain ;)
bmichelsen has quit [Client Quit]
weemsledeux has joined #ruby
<volty> it's a kinda just walking, 'recursive' sounds too pretentious :)
bmichelsen has joined #ruby
ta has quit [Ping timeout: 258 seconds]
patrick99e99 has quit [Ping timeout: 265 seconds]
weemsledeux has quit [Remote host closed the connection]
sargas has joined #ruby
krzbrg has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<volty> but go back to: what are class and module, there superclasses, their relation etc etc
Ulrike_Rayne has quit [Read error: Connection reset by peer]
mloveless has quit []
Ulrike_Rayne has joined #ruby
russt has quit [Quit: russt]
<zacts> yeah, I just read an intro to singleton classes
lidaaa has joined #ruby
<zacts> they are going to be covered in full in a couple of ch
<zacts> every class is a subclass of Object
<zacts> even BasicObject is a subclass of Object
<zacts> it gives a chicken / egg problem
rylev has joined #ruby
yfeldblum has joined #ruby
<zacts> so I guess it has to do with the bootstrapping of the objects / class instances that resolves the paradox?
jokke has quit [Quit: ZNC - http://znc.in]
benzrf|offline is now known as benzrf
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby
marcux has joined #ruby
jokke has joined #ruby
jokke has quit [Remote host closed the connection]
rylev has quit [Ping timeout: 264 seconds]
sigurding has joined #ruby
elaptics is now known as elaptics`away
jokke has joined #ruby
Musashi007 has quit [Quit: Musashi007]
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
jokke has quit [Client Quit]
yfeldblum has joined #ruby
jokke has joined #ruby
jlast has joined #ruby
rylev has joined #ruby
dorei has quit []
disKounted has joined #ruby
yfeldblu_ has quit [Ping timeout: 258 seconds]
<volty> no paradoxes - just axioms
sigurding has quit [Ping timeout: 272 seconds]
pengin has joined #ruby
jokke has quit [Quit: ZNC - http://znc.in]
jokke has joined #ruby
robustus has quit [Ping timeout: 250 seconds]
volty has left #ruby ["Konversation terminated!"]
jimbach has joined #ruby
robustus has joined #ruby
jlast has quit [Remote host closed the connection]
jlast has joined #ruby
jonr22 has quit [Remote host closed the connection]
dkb20k has joined #ruby
nfk has quit [Quit: yawn]
matchaw_ has quit [Quit: No Ping reply in 180 seconds.]
econerd4ever has quit [Quit: Leaving...]
matchaw has joined #ruby
pengin has quit [Remote host closed the connection]
Soda has quit [Remote host closed the connection]
pengin has joined #ruby
dkb20k has quit [Ping timeout: 240 seconds]
CorySimmons has joined #ruby
funburn has joined #ruby
PeterBoy has quit [Quit: Bye Bye]
funburn has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
JBreit has joined #ruby
pengin has quit [Ping timeout: 264 seconds]
workmad3 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
hiyosi has joined #ruby
lw has joined #ruby
avrc has joined #ruby
matchaw has quit [Quit: No Ping reply in 180 seconds.]
lw has quit [Read error: Connection reset by peer]
boombadaroomba has quit [Remote host closed the connection]
kayloos has joined #ruby
lw has joined #ruby
marr has quit [Ping timeout: 240 seconds]
airdeluxe has quit [Quit: Leaving]
ghr has joined #ruby
marcux has quit [Quit: marcux]
kyb3r_ has joined #ruby
matchaw has joined #ruby
kalusn has quit [Ping timeout: 258 seconds]
nateberkopec has quit [Quit: Leaving...]
Musashi007 has joined #ruby
hiyosi has quit [Ping timeout: 255 seconds]
baroquebobcat has joined #ruby
ghr has quit [Ping timeout: 272 seconds]
_honning_ has quit [Ping timeout: 265 seconds]
dc_ has joined #ruby
adriancb has joined #ruby
dc_ has quit [Remote host closed the connection]
wsmoak has quit [Quit: wsmoak]
sargas has quit [Quit: This computer has gone to sleep]
exadeci has quit [Quit: Connection closed for inactivity]
dc___ has quit [Ping timeout: 258 seconds]
jbueza has quit [Quit: Textual IRC Client: www.textualapp.com]
klmlfl has joined #ruby
CorySimmons has quit [Quit: Bye!]
sargas has joined #ruby
Kricir has joined #ruby
dcunit3d has quit [Ping timeout: 264 seconds]
jokke has quit [Quit: ZNC - http://znc.in]
Spami has joined #ruby
marcux has joined #ruby
adriancb has quit [Remote host closed the connection]
jokke has joined #ruby
Pumukel has quit [Remote host closed the connection]
nasgyh has joined #ruby
nasgyh has quit [Quit: Leaving]
jimbach has quit [Remote host closed the connection]
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
adriancb has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
charliesome has joined #ruby
dc_ has joined #ruby
adriancb has quit [Remote host closed the connection]
dcunit3d has joined #ruby
hakunin has joined #ruby
CustosL1men has quit [Ping timeout: 255 seconds]
chrishough has joined #ruby
<zacts> ok
corehook has joined #ruby
oo_ has joined #ruby
cleopatra has quit [Quit: Saliendo]
godd2 has joined #ruby
jlast has quit [Remote host closed the connection]
adriancb has joined #ruby
lemur has joined #ruby
nateberkopec has joined #ruby
rkalfane has quit [Quit: Textual IRC Client: www.textualapp.com]
sigurding has joined #ruby
nateberkopec has quit [Client Quit]
klmlfl has quit []
corehook has quit [Ping timeout: 258 seconds]
klmlfl has joined #ruby
adriancb has quit [Remote host closed the connection]
adriancb has joined #ruby
benzrf is now known as benzrf|offline
goshdarnyou has quit [Quit: Connection closed for inactivity]
blahwoop has joined #ruby
<blahwoop> hi all
oo_ has quit [Quit: Leaving...]
<blahwoop> if i do def make_word(letter, word="") will it word be defaulted at "" and if i provide an argument it will be whatever i provide it?
sigurding has quit [Ping timeout: 255 seconds]
hamakn_ has quit [Remote host closed the connection]
<blahwoop> like if i do make_word(letter) then word is = ""
Kricir has quit [Remote host closed the connection]
hamakn has joined #ruby
<blahwoop> and if i do make_word(letter,"b") then word is "b"?
ep3static has joined #ruby
krazyj has quit [Quit: krazyj]
<rpag> zacts, BasicObject isn't a subclass of Object
Sirupsen has joined #ruby
ep3static has quit [Client Quit]
<blahwoop> ok figured it out
<blahwoop> default value is only when none is provided
Joufflu has joined #ruby
marcux has quit [Quit: marcux]
yfeldblum has quit [Ping timeout: 255 seconds]
cleopatra has joined #ruby
selene has joined #ruby
selene has quit [Read error: Connection reset by peer]
haxr has joined #ruby
krisquigley has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Kricir has joined #ruby
hiyosi has joined #ruby
krisquigley has quit [Ping timeout: 256 seconds]
boombadaroomba has joined #ruby
tobleronegordon has quit [Ping timeout: 264 seconds]
fabrice31 has joined #ruby
loyalthird has joined #ruby
<loyalthird> anyone know what is jass
nateberkopec has joined #ruby
goshdarnyou has joined #ruby
JBreit has left #ruby ["Leaving"]
FooMunki has quit [Read error: No route to host]
elepfontius has joined #ruby
boombadaroomba has quit [Ping timeout: 265 seconds]
fabrice31 has quit [Ping timeout: 240 seconds]
Kricir has quit [Remote host closed the connection]
FooMunki has joined #ruby
ghr has joined #ruby
KC9YDN has quit [Quit: Condenadme, no importa, la Historia me absolverá. - Fidel Castro]
workmad3 has joined #ruby
AlSquirrel has quit [Quit: This computer has gone to sleep]
<zacts> rpag: that's not what I said
<zacts> BasicObject is a superclass of Object
<zacts> but every class is an object
<zacts> so the instance of BasicObject must be an Object, correct me if I'm wrong
sargas has quit [Quit: This computer has gone to sleep]
rylev has quit [Remote host closed the connection]
<zacts> so it gives like a chicken and egg problem
ramfjord has quit [Quit: Lost terminal]
<rpag> BasicObject doesn't have any relation to Object(the class), it lives on its own
ghr has quit [Ping timeout: 264 seconds]
elepfontius has quit [Quit: Leaving]
<banister> zacts you are wrong :)
<banister> zacts everything is an object but that doesn't mean everything ha to be an instance of the Object class
<banister> zacts BasicObject.new ---> not an instance of Object
workmad3 has quit [Ping timeout: 240 seconds]
phantasm66 has quit [Quit: *poof*]
yfeldblum has joined #ruby
<crome> >> Object.ancestors
<eval-in__> crome => [Object, Kernel, BasicObject] (https://eval.in/225207)
<crome> there you go
BadQuanta has joined #ruby
<zacts> http://sprunge.us/GUMZ <- this is what is confusing me I think
krz has joined #ruby
<zenspider> easier: everything is an object. all objects have a class. all classes have a superclass (except one).
<zenspider> apeiros: nuke kirloo
<zenspider> or make me op
charliesome has quit [Read error: Connection reset by peer]
<zenspider> fucking tired of this
machete has joined #ruby
banister is now known as banisterfiend
elepfontius has joined #ruby
kirloo was kicked from #ruby by banisterfiend [Your behavior is not conducive to the desired environment.]
<zenspider> hah. how tactful. :P
<zenspider> "Fuck off spammer" would have been mine :P
blahwoop has quit [Remote host closed the connection]
<zacts> zenspider: so BasicObject is the only class with no superclass.
Musashi007 has quit [Quit: Musashi007]
<zenspider> as of 1.9, yes.
<zacts> and > 1.9?
<zenspider> aye
<zacts> cool
<zacts> yet BasicObject is a class right?
<zacts> and all classes are objects
tyll_ has joined #ruby
<zenspider> >> BasicObject.class
<eval-in__> zenspider => Class (https://eval.in/225209)
kayloos has quit [Remote host closed the connection]
<zacts> ok, so every class is an instance of Class
kalusn has joined #ruby
<zacts> so BasicObject as an object is an instance of class
<zacts> there is some odd circularity there
<zacts> and that's what I think my book was hinting at.
edough has joined #ruby
<zenspider> "as an object" is redundant to the point of not making sense
<zenspider> it isn't "as an" anything else
<zenspider> it's an object. everything is an object. that part is tautological
<zacts> ok
tyll has quit [Ping timeout: 264 seconds]
<banisterfiend> zacts it is a bit confusing, but if you draw it out and spend time thinking about it, it actually hangs together. The part that is often most confusing for people is they seem to mix up superclass/subclass relationships with class/instance relationships
<zenspider> the nil superclass is a bit unfortunate, but it works well enough.
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
adriancb has quit [Remote host closed the connection]
<zenspider> everything else makes sense when you think about it. def: drawing it helps
adriancb has joined #ruby
tus has quit []
kalusn has quit [Ping timeout: 258 seconds]
Kricir has joined #ruby
kasperti_ has quit []
jenrzzz has quit [Ping timeout: 240 seconds]
jY has left #ruby ["Linkinus - http://linkinus.com"]
ght2 is now known as ght
<banisterfiend> zacts so for example, the fact that BasicObject is an instance of Class (which is a subclass of Object) is irrelevant to BasicObject.new being an instance of BasicObject --- it doesn't mean that BasicObject.new is an instance of Object. BasicObject.new's class is BasicObject,end of story. If BasicObject was a subclass of Object then BasicObject.new would be an instance of Object, but it's not. BasicObject is the end of the road, it
<banisterfiend> has no superclass
<banisterfiend> blergh
hamakn has quit [Read error: Connection reset by peer]
<banisterfiend> draw it out
<crome> :D
hamakn has joined #ruby
<zacts> ah! I think that makes total sense now
<zacts> cool
<aep> bah, pry and ffi are not friends. just require makes ruby crash :(
lw has quit [Quit: s]
ARCADIVS has joined #ruby
KC9YDN has joined #ruby
lemur has quit [Remote host closed the connection]
<banisterfiend> zacts yeah, as far as BasicObject.new is concerned BasicObject coulbe be an instance of PinkRabbit, it doesn't matter. All that matters to BasicObject.new are the *ancestors* (superclasses) of BasicObject, not the *class* of BasicObject
lemur has joined #ruby
renderful has joined #ruby
dkb20k has joined #ruby
renderfu_ has quit [Ping timeout: 258 seconds]
sski has quit [Remote host closed the connection]
sski has joined #ruby
lw has joined #ruby
n_blownapart has joined #ruby
lemur has quit [Ping timeout: 272 seconds]
dkb20k has quit [Ping timeout: 244 seconds]
notjohn has joined #ruby
sski has quit [Ping timeout: 245 seconds]
klmlfl has quit [Remote host closed the connection]
sski has joined #ruby
<aep> just running pry makes ruby go boom. :/ http://npaste.de/p/44G
<aep> worked yesterday, then i install some gems. hm
<n_blownapart> hi this is from the ruby koans. I have some questions re: lines 41-43 and some other places. thanks http://pastie.org/9737664
<aep> n_blownapart: and the question would be?
mary5030 has joined #ruby
FooMunki has quit [Ping timeout: 258 seconds]
<n_blownapart> aep thanks. first, why y>3 and not y == 3
<n_blownapart> because to add 1000 points requiring three ones rolled..
<n_blownapart> requires*
FooMunki has joined #ruby
<banisterfiend> aep it's because you're using the debugger gem on ruby 2.0+
<banisterfiend> aep pry-debugger is 1.9.3 only
<banisterfiend> aep use pry-byebug instead on ruby 2.0+
<aep> oooh
<aep> actually, isnt that what binding.pry does?
baroquebobcat has joined #ruby
<banisterfiend> aep wat?
crazydiamond has quit [Ping timeout: 250 seconds]
<aep> eh, pretty sure i'm using pry-byedebug. its in the trace
<aep> /home/aep/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0-static/byebug-3.5.1/byebug/byebug.so(Init_breakpoint+0x24) [0x7f8e103c8434] ruby_debug.c:981
<zenspider> well... there you go. :)
<banisterfiend> aep /home/aep/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-debugger-0.2.3/lib/pry-debugger/cli.rb:14 [FINISH]
St_Marx has quit [Ping timeout: 250 seconds]
<aep> yeah weird huh
<banisterfiend> aep not really, you just have both gems installed, uninstall pry-debugger
<aep> oooh
<aep> that made it work magically. thanks!
wald0 has quit [Ping timeout: 255 seconds]
St_Marx has joined #ruby
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eka has joined #ruby
<n_blownapart> could I bother you to walk me through that aep ? http://pastie.org/9737664
eka has quit [Client Quit]
Kricir has quit [Remote host closed the connection]
oo_ has joined #ruby
<aep> smells like homework
<n_blownapart> so to speak
<zenspider> FFS, n_blownapart fix your intendation before asking for help
NoNMaDDeN has joined #ruby
airdeluxe has joined #ruby
<aep> and its missing some stuff that is probably in that required file.
<zenspider> NOBODY should have to read that
oo_ has quit [Remote host closed the connection]
<n_blownapart> uh oh
sinequanon has joined #ruby
oo_ has joined #ruby
Jet4Fire has joined #ruby
Jet4Fire has quit [Client Quit]
haxr has quit [Read error: Connection timed out]
<aep> n_blownapart: the indention is wrong, thats what confuses you
sevenseacat has joined #ruby
haxr has joined #ruby
sinequanon has quit [Remote host closed the connection]
<n_blownapart> aep well I do get some of the statements either
zzzbra has quit []
Sirupsen has quit [Quit: Textual IRC Client: www.textualapp.com]
oo_ has quit [Read error: Connection reset by peer]
<n_blownapart> sorry don't*
<aep> like, ruby syntax?
<zenspider> start by using an editor that knows ruby and reindent the whole file
<n_blownapart> yeah aep the game has three ones equalling 1000. why is the if statement y > 3 ? hold on I screwed up the line numbers.
<aep> now you made me read it anyway. yeah looks wrong
radic has quit [Ping timeout: 265 seconds]
krz has quit [Quit: WeeChat 1.0.1]
<n_blownapart> sorry the tutorial was going nicely then they come out of nowhere with this exercise . this is an answer I got off a blog. aep
<aep> maybe try your own answer? :P
<zenspider> learning is hard. let's go google
FooMunki_ has joined #ruby
FooMunki has quit [Read error: Connection reset by peer]
FooMunki_ is now known as FooMunki
baroquebobcat has quit [Quit: baroquebobcat]
<n_blownapart> not lazy, just confused..
radic has joined #ruby
<sevenseacat> !since n_blownapart
<helpa> I first saw n_blownapart on 2013-06-16. They've been around now for 524 days.
ghr has joined #ruby
<n_blownapart> sevenseacat, so I got sick maybe.
blahwoop has joined #ruby
<blahwoop> good evening
autom8tr has joined #ruby
<blahwoop> thank u guys for all the help
nateberkopec has quit [Quit: Leaving...]
<aep> n_blownapart: i'd probably start with sort
kirloo has quit [K-Lined]
<aep> or group_by
<aep> and then mod
<aep> step0: delete that answer-from-some-blog, it's terrible.
<n_blownapart> thanks aep .. ok will do.
mary5030 has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 244 seconds]
mary5030 has joined #ruby
<autom8tr> Been trying to get to unfiniti's website to update JewelryBox. Are they down for anyone else?
adriancb has quit [Remote host closed the connection]
adriancb has joined #ruby
hmsimha_ has joined #ruby
haxr has quit [Read error: Connection timed out]
mary5030 has quit [Ping timeout: 255 seconds]
yfeldblum has quit [Ping timeout: 244 seconds]
haxr has joined #ruby
<aep> n_blownapart: Hash[[1,1,1,5,1].group_by {|x| x}.map {|k,v| [k,v.count]}] --> {1=>4, 5=>1}
<blahwoop> https://github.com/iRichLau/stuff/blob/master/board.rb is my logic off in the make_word method? i'm trying to recursively go through the whole board
fedexo has joined #ruby
<n_blownapart> aep thanks very much I'm going to work on it..
rylev has joined #ruby
corehook has joined #ruby
<zenspider> less magic:
<zenspider> >> h = [1,1,1,5,1].group_by {|x| x}; h.each { |k,v| h[k] = v.size }; h
<eval-in__> zenspider => {1=>4, 5=>1} (https://eval.in/225215)
<n_blownapart> thanks zenspider aep much appreciated to get some guidance
<aep> ah nice
benzrf|offline is now known as benzrf
rylev has quit [Ping timeout: 264 seconds]
<banisterfiend> zenspider in ruby 2.2 we can use itself for that :P
<banisterfiend> group_by(&:itself)
<banisterfiend> don't like the name of that method tho..
jimbach has joined #ruby
Musashi007 has joined #ruby
corehook has quit [Ping timeout: 258 seconds]
<aep> is that just identity ?
<banisterfiend> aep yeah
RyanV has joined #ruby
<benzrf> >> 3.itself
<eval-in__> benzrf => undefined method `itself' for 3:Fixnum (NoMethodError) ... (https://eval.in/225220)
braincrash has quit [Quit: bye bye]
tlarevo has joined #ruby
<banisterfiend> 2.2 >> 3.itself
<banisterfiend> >> 2.2 3.itself
<eval-in__> banisterfiend => /tmp/execpad-7028f2e0f218/source-7028f2e0f218:2: syntax error, unexpected tINTEGER, expecting keyword_end ... (https://eval.in/225221)
<banisterfiend> >>2.2 3.itself
<eval-in__> banisterfiend => /tmp/execpad-45dd7663c874/source-45dd7663c874:2: syntax error, unexpected tINTEGER, expecting keyword_end ... (https://eval.in/225222)
<banisterfiend> idk how to set the ruby version
tkuchiki has joined #ruby
<Areessell> Try magic
<aep> i wonder why & isnt just identity :/
<aep> oh wait. doh
<RyanV> is it bad practice to set an array to a constant which can be added to? shouldnt constants be constant? if yes, wouldnt a best practice be to freeze any constant implementations?
<banisterfiend> aep in rails you can kind of use presence
<zenspider> I used to write all my code and comments in the first person. actually helps you get into the code more
<Areessell> RyanV: Nope, the constant is still "constant" It always holds the same array instance
braincrash has joined #ruby
<zenspider> itself actually works for things like that
yfeldblum has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<Areessell> I prefer having "cached" methods, or whatever you might call them: def things; @things ||= []; end
<RyanV> so the instance being constant is what makes it a constant, not the value
<RyanV> value is not the right word, but the object internal state
<Areessell> It constantly holds a reference to an object, which can be something like a float or integer, or a container such as a array, set, or hash. The object the constant is referencing stays the same, but it's content might change.
<zenspider> there's nothing constant about constants. don't get hung up on it
<Areessell> Like I said though, I generally avoid constants in general.
Dev_R3d has quit [Quit: Quitte]
<zenspider> eh. they're perfectly usable things... they have a place
gsd has joined #ruby
<Areessell> Totally. I use em when developing applications on occasion. Almost never when writing libraries, however.
<zenspider> if it is a question between adding a constant with an array vs a class method that ||='s it... unless there is more complex logic than that, I'm going with the constant
<zenspider> simplest thing first
<RyanV> Areessell if thats the case (same instance) constants are, in a way, functionally similar to a singleton class?
<Areessell> Not too sure about that.
<RyanV> sorry, i mean the value of the constant
<zenspider> singleton class? no. they're analagous to class variables
chu has joined #ruby
avrc has quit [Quit: this channel is bakas]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kireevco has quit [Quit: Leaving.]
hamakn has quit [Remote host closed the connection]
uber_hulk has joined #ruby
hamakn has joined #ruby
haxr has quit [Read error: Connection timed out]
krisquigley has joined #ruby
<RyanV> another random q, can you guys think of any "gotcha"s with using class level instance variables
<zenspider> depends on what you're using them for
haxr has joined #ruby
<zenspider> I find a lot of ppl don't really "get it" wrt class vars vs class ivars
perturbation has quit [Quit: Leaving]
russt has joined #ruby
jimbach has quit [Remote host closed the connection]
<RyanV> usually, im using them similarly to class vars/constants when a subclass might need to assign a different value
iml has joined #ruby
krisquigley has quit [Ping timeout: 250 seconds]
iml has left #ruby [#ruby]
<zenspider> well... depends. you might want a class ivar if the subclass needs to override that value. you might want a cvar/constant if you want them all to share
fabrice31 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
<n_blownapart> aep zenspider those solutions to the dice roll are very cool..
kireevco has joined #ruby
keen___________7 has quit [Read error: Connection reset by peer]
spastorino has quit [Quit: Connection closed for inactivity]
keen___________7 has joined #ruby
blahwoop has quit [Ping timeout: 258 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
fabrice31 has quit [Ping timeout: 245 seconds]
<rpag> 2.2>> 3.itself
dkb20k has joined #ruby
uber_hulk has quit [Ping timeout: 245 seconds]
mistermocha has joined #ruby
testcore has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
workmad3 has joined #ruby
jonr22 has joined #ruby
DenSchub has quit [Quit: This should never happen.]
DenSchub has joined #ruby
n_blownapart has quit [Quit: Leaving]
adriancb has quit [Remote host closed the connection]
ta has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
jonr22 has quit [Ping timeout: 250 seconds]
uber_hulk has joined #ruby
boombadaroomba has joined #ruby
lw has quit [Quit: s]
mikepack has joined #ruby
deepali has joined #ruby
mikepack has quit [Client Quit]
haxr has quit [Read error: Connection timed out]
ta has quit [Ping timeout: 256 seconds]
haxr has joined #ruby
Alina-malina has quit [Ping timeout: 265 seconds]
adriancb has joined #ruby
Spami has joined #ruby
Eiam has quit [Ping timeout: 250 seconds]
Alina-malina has joined #ruby
boombadaroomba has quit [Ping timeout: 250 seconds]
mikepack has joined #ruby
russt has quit [Quit: russt]
chu has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
adriancb has quit [Ping timeout: 256 seconds]
Mateon1 has joined #ruby
iamjarvo has joined #ruby
chipotle has joined #ruby
chipotle has quit [Client Quit]
russt has joined #ruby
Channel6 has joined #ruby
testcore has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
DenSchub has quit [Remote host closed the connection]
DenSchub has joined #ruby
arup_r has joined #ruby
FooMunki has quit [Quit: FooMunki]
kyb3r_ has joined #ruby
mistermocha has quit [Remote host closed the connection]
arescorpio has quit [Excess Flood]
<autom8tr> \q
autom8tr has quit [Quit: leaving]
goshdarnyou has quit [Quit: Connection closed for inactivity]
<uber_hulk> !books
patrick99e99 has joined #ruby
patrick99e99 has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby
sargas has joined #ruby
koderok has joined #ruby
lw has joined #ruby
mikepack has quit [Remote host closed the connection]
corehook has joined #ruby
<ght> Any idea how to declare a gemset in a standalone ruby file so I don't keep getting these "file not found" on include errors?
benzrf is now known as benzrf|offline
lemur has joined #ruby
corehook has quit [Ping timeout: 258 seconds]
Jake232 has joined #ruby
JCii8 has joined #ruby
ezra_ has quit [Ping timeout: 255 seconds]
<JCii8> so ive been in computers for 20 years. just now encountering ruby. is it primarily a mac osx thing?
sargas has quit [Quit: This computer has gone to sleep]
ezra has joined #ruby
ezra is now known as Guest18066
<sevenseacat> no
thumpba has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
<JCii8> i mean im using it on linux, but a lot of the screenshots of examples i see are mac...that's what made me think that
<godd2> JCii8 no but the majority of ruby developers are on mac. But since the main distro of ruby is written in C, it runs natively anywhere you compile for
<godd2> JCii8 for example, I develop ruby on Windows
<JCii8> do you use rspec on windows?
<godd2> JCii8 yes
<JCii8> with puppet?
<godd2> I don't use puppet
<JCii8> k
<godd2> but that's not cause I don't like it, its cause Ive never tried it
<godd2> I don't even know what it does
<JCii8> im tackling the puppet stack, but im a dev so i want unit tests, so rspec, so ruby. cool. just curious.
jenrzzz has joined #ruby
Alayde has joined #ruby
<zacts> JCii8: what do you think of ruby so far?
<JCii8> still figuring the difference between gem/rvm/etc. spent most of my time in the puppet dsl, so havent seem anything yet.
<zacts> ah ok
klmlfl has joined #ruby
<zacts> rvm2 is going to hopefully be out for testing I hear by the end of the year
<zacts> rvm1 internals are a mess, but rvm is a really useful tool
<JCii8> i hope to stay ignorant of those internals. learning devops. managing servers. inherited someone else's puppet code
<JCii8> found a packt'pub book on rspec, which is helpful
thumpba has quit [Ping timeout: 255 seconds]
<JCii8> does ruby do syntax checking before execution?
Mia has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
sinequanon has joined #ruby
Musashi007 has quit [Quit: Musashi007]
sski has quit [Remote host closed the connection]
sski has joined #ruby
koderok has quit [Ping timeout: 255 seconds]
<Alayde> JCii8: I know that feeling, that's been my life for the last two months now
Techguy305|2 has joined #ruby
gr33n7007h has joined #ruby
<zacts> ok, so one can overload the method_missing method
sski has quit [Ping timeout: 264 seconds]
Megtastique has joined #ruby
<zacts> and use super to call method_missing.
Techguy305 has quit [Ping timeout: 255 seconds]
t_mmyv has quit [Ping timeout: 255 seconds]
mary5030 has joined #ruby
ghr has joined #ruby
mary5030_ has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
arup_r has quit [Read error: Connection reset by peer]
ghr has quit [Ping timeout: 240 seconds]
haxr has quit [Ping timeout: 255 seconds]
aspiers has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
arup_r has joined #ruby
Techguy305|2 has quit [Ping timeout: 255 seconds]
Channel6 has quit [Quit: Leaving]
tkuchiki_ has joined #ruby
russt has quit [Quit: russt]
tkuchiki has quit [Ping timeout: 240 seconds]
<zacts> JCii8: I find that Ruby is enlightening, it's changing the way I view programming, but I'm a total OOP / Ruby newbie.
<zacts> but Ruby is different from many languages.
<zacts> but takes in some similarities too
parabolize has joined #ruby
<godd2> Yay I just set up my first VirtualBox OSX environment!
<JCii8> i dont think i'll have to really learn it...just need to get down irb/rspec/gvm/bundle/ruby...the infrastructure.
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<godd2> keep in mind that rspec and bundler are just ruby libraries
BadQuanta has quit [Remote host closed the connection]
<JCii8> good to know
chu has joined #ruby
hephaestus_rg has joined #ruby
<hephaestus_rg> hello, so i'm using eventmachine
<hephaestus_rg> with faye websocket client
<hephaestus_rg> is there some way to use gets and send input into eventmachine?
krisquigley has joined #ruby
tlarevo has quit [Remote host closed the connection]
<hephaestus_rg> if i try to gets outside the EM block it doesn't seem to get called
BlackGear has joined #ruby
<hephaestus_rg> and if i have it inside, it blocks other events
tlarevo has joined #ruby
BlackGear has quit [Max SendQ exceeded]
BlackGear has joined #ruby
nilurie has joined #ruby
sski has joined #ruby
Channel6 has joined #ruby
fabrice31 has joined #ruby
oo_ has joined #ruby
kiyote23 has joined #ruby
krisquigley has quit [Ping timeout: 250 seconds]
dseitz has joined #ruby
<hephaestus_rg> i don't even have to use gets
<hephaestus_rg> i just need some way to get user input from inside eventmachine
kiyote23 has left #ruby [#ruby]
kiyote23 has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
arup_r_ has joined #ruby
elepfontius has quit [Quit: Leaving]
BraddPitt has quit [Ping timeout: 250 seconds]
wallerdev has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
oo_ has quit [Remote host closed the connection]
chipotle has quit [Quit: cya]
fabrice31 has quit [Ping timeout: 272 seconds]
charliesome has quit [Read error: Connection reset by peer]
wallerdev has quit [Client Quit]
charliesome has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby
jenrzzz has joined #ruby
Joufflu has quit [Quit: Leaving]
DenSchub has left #ruby ["Leaving."]
jonr22 has joined #ruby
mary5030_ has quit [Remote host closed the connection]
mary5030 has joined #ruby
arup_r_ has quit [Remote host closed the connection]
ta has joined #ruby
aledovsky has quit [Quit: ZNC - http://znc.in]
Techguy305|2 has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
notjohn has quit [Quit: notjohn]
jonr22 has quit [Ping timeout: 240 seconds]
Megtastique has quit []
mary5030 has quit [Ping timeout: 240 seconds]
kiyote23 has quit [Remote host closed the connection]
ta has quit [Ping timeout: 264 seconds]
byprdct has quit [Quit: by]
blahwoop has joined #ruby
rshetty has joined #ruby
<blahwoop> hi guys. i'm havin trouble with my boggle game. i tried to inspect my something method
<blahwoop> it's supposed to return false but it keeps giving me true
lw has quit [Quit: s]
goshdarnyou has joined #ruby
speakingcode has quit [Ping timeout: 240 seconds]
speakingcode has joined #ruby
<godd2> blahwoop make sure that in the something method, you refer to @board, not just board
<godd2> since you're in a separate method, you're in a new scope, and board without the @ is a local variable with no value
<blahwoop> should i use self.board
<blahwoop> i can't seem to figure out why it's return weird values for me
<godd2> blahwoop you can only do that if you have a method named board. oh dummy me, you do since you did attr_reader :board
<blahwoop> it is ok to just use board if i ihave a attr_reader
<godd2> yes
<blahwoop> ok
<godd2> I didn't see the attr_reader at first, it was my mistake
<blahwoop> ive been workin on this for 12 hours. still can't figure it out
<blahwoop> i goin nuts!
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
ghr has joined #ruby
<godd2> blahwoop hehe, just so you know, you can trim down your words.txt file, since a lot of those aren't possible on a traditional boggle board ;)
<godd2> like abdominohysterectomy (more than 16 letters)
diegoviola has quit [Remote host closed the connection]
<blahwoop> lol ok thanks
<blahwoop> are trie structures hard to implement in ruby
<godd2> you mean the same thing that clojure vectors are made out of?
arup_r has quit [Ping timeout: 245 seconds]
<blahwoop> prefix trees
<godd2> I mean, I don't think it would be particularly difficult. You'd just have to implement all the expected features, like node copying
<blahwoop> just add a gem
<blahwoop> well the dictionary list is down to 229031
ghr has quit [Ping timeout: 255 seconds]
<blahwoop> godd2: any chance u can help me out with my prob
rshetty has quit [Remote host closed the connection]
<godd2> blahwoop yea I just copied the code
<blahwoop> thanks dude
<godd2> what is solver.something doing that you don't want?
<blahwoop> it's not giving me all the word combos i want
rshetty has joined #ruby
uber_hul1 has joined #ruby
<blahwoop> either the something or make_words is messed up
tkuchiki_ has quit [Read error: Connection reset by peer]
<godd2> do you have pry installed?
tkuchiki has joined #ruby
<blahwoop> all i want to do is make a recursion method that will traverse through all the possible paths
<godd2> its a gem, and it's like irb, but better
<blahwoop> i should
<godd2> just do `gem install pry` in terminal
<godd2> and then put require 'pry' at the top of board.rb and then in the something method, on the first line of the loop, but binding.pry
<blahwoop> ok
uber_hulk has quit [Ping timeout: 258 seconds]
<godd2> and then the next time you run your program, pry will pause execution at that point, and you'll be able to type out anything you want as if you were in irb
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pen has joined #ruby
<godd2> put* instead of but
jdj_dk has joined #ruby
<blahwoop> ok
<godd2> blahwoop your something method will look like this: https://gist.github.com/anonymous/8515d85feccd2fe0226b
<godd2> once you're in, type "letter" (wihtout the quotes) and press enter
<blahwoop> oops
<blahwoop> i got an error
<godd2> what error
patrick99e99 has joined #ruby
<blahwoop> pry 10 conflicts with pry 9
<blahwoop> guess i had it
<blahwoop> lol
yfeldblum has joined #ruby
<godd2> blahwoop okay I think there's a problem with how you build neighbors
<godd2> cause these object are way too big
<blahwoop> so it'll slow down
<godd2> among other problems
<blahwoop> i guess i tried to get too fancy
<godd2> haha, that's okay. It's better to go too far and stretch your imagination a little :)
<zenspider> pry is up to v 10?
<godd2> https://rubygems.org/gems/pry looks like it
<blahwoop> gem conflict
fedexo has quit [Ping timeout: 265 seconds]
patrick99e99 has quit [Ping timeout: 240 seconds]
<blahwoop> im going to try to keep this simple
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
BlackGear has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tab_ has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
corehook has joined #ruby
kies has quit [Quit: baaaaiiiiiiiiiii~]
<zenspider> oh. 0.10... that doesn't count :P
lxsameer has joined #ruby
lxsameer has joined #ruby
<godd2> Dwarf Fortress is still in alpha ;) it's at v0.40.18
<ght> I'm executing a ruby script from a different centos user with his own copy of rvm and gemsets on his account, and I need the ruby script on the other user's account to execute within his rvm gemset; otherwise, I get "file not found" errors for the reqire statements.
<ght> I tried .rvmrc, and I tried .ruby-version, so far no luck.
jenrzzz has quit [Ping timeout: 240 seconds]
<blahwoop> i give up for today. time for bed
<blahwoop> good night guys
<ght> In the ruby script itself, I explicity define, at the top, the exact ruby instance to use within the gemset.
<blahwoop> thanks godd2
<blahwoop> for the help
<godd2> blahwoop no problem. I'm jealous that you're at that sweet spot of Ruby learning :)
<ght> Any idea how to explicitly define a gemset within a ruby file?
<blahwoop> whats the sweet spot lol
<godd2> its where you're learning how to get comfortable making your own objects and their interactions and making ruby work for you
rshetty has quit [Remote host closed the connection]
corehook has quit [Ping timeout: 258 seconds]
<blahwoop> i still a noobz
<blahwoop> i hope it's all down hill from here
arup_r has joined #ruby
tzero has quit [Ping timeout: 240 seconds]
<zenspider> ght: GEM_HOME=~user/.rvm/whatever ~user/script.rb
Techguy305|2 has quit [Ping timeout: 240 seconds]
Techguy305 has joined #ruby
<zenspider> gemsets aren't a rubygems thing, but gem repos are, and they're controlled via env vars
<sevenseacat> mmm gemsets
<sevenseacat> why do people still use them
<zenspider> because rvm does too much
charliesome has quit [Read error: Connection reset by peer]
<sevenseacat> well theres that
haxr has joined #ruby
<godd2> plus it's a pun! to "set" a gem? eh? eh??
<zenspider> ght: looks like you could do ENV["GEM_HOME"] = "..."; Gem.clear_paths
<zenspider> at the top, before requires
<sevenseacat> bundler is my favorite friend in ruby.... i guess gemsets are a hangover from a time pre-bundler
wallerdev has joined #ruby
blahwoop has quit [Ping timeout: 258 seconds]
n008f4g_ has quit [Remote host closed the connection]
rshetty has joined #ruby
wallerdev has quit [Client Quit]
parabolize has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
pen has quit []
lw has joined #ruby
lw has quit [Max SendQ exceeded]
lw has joined #ruby
FooMunki has joined #ruby
Tab_ has quit [Quit: This computer has gone to sleep]
dc_ has quit [Remote host closed the connection]
tzero has joined #ruby
rshetty has quit [Remote host closed the connection]
mary5030 has joined #ruby
n008f4g_ has joined #ruby
adriancb has joined #ruby
dcunit3d has quit [Ping timeout: 240 seconds]
mary5030 has quit [Ping timeout: 258 seconds]
dcunit3d has joined #ruby
dc_ has joined #ruby
adriancb has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
antgel has quit [Ping timeout: 250 seconds]
Spami has joined #ruby
drewvanstone has quit [Ping timeout: 265 seconds]
Musashi007 has joined #ruby
ghr has joined #ruby
chu has quit [Ping timeout: 244 seconds]
disKounted has quit [Ping timeout: 244 seconds]
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
Channel6 has quit [Quit: Leaving]
AndChat| has quit [Quit: Bye]
jdj_dk has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 258 seconds]
tkuchiki has quit [Remote host closed the connection]
jamesbrink has joined #ruby
tkuchiki has joined #ruby
braincra- has joined #ruby
enp0s25 has quit [Ping timeout: 244 seconds]
krisquigley has joined #ruby
fabrice31 has joined #ruby
t7y9r has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Ping timeout: 265 seconds]
Soda has joined #ruby
braincrash has quit [Ping timeout: 264 seconds]
nilurie has quit [Quit: bbs.]
krisquigley has quit [Ping timeout: 240 seconds]
sara-zahrani has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
giuseppesolinas has joined #ruby
samuel02 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
kyb3r_ has quit [Quit: Leaving]
lw has quit [Quit: s]
samuel02 has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jack_rabbit has joined #ruby
workmad3 has joined #ruby
davedev24_ has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
davedev24_ has joined #ruby
davedev2_ has joined #ruby
davedev24_ has quit [Read error: Connection reset by peer]
JBreit has joined #ruby
bmichelsen has quit [Quit: ZZZzzz…]
sski has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 255 seconds]
deepali has quit [Quit: This computer has gone to sleep]
mikepack has joined #ruby
jonr22 has quit [Ping timeout: 240 seconds]
Areessell has quit [Quit: leaving]
Areessell has joined #ruby
rshetty has joined #ruby
Photism has quit [Quit: Leaving]
sski has joined #ruby
mikepack has quit [Ping timeout: 258 seconds]
sigurding has joined #ruby
sinequanon has quit [Remote host closed the connection]
n008f4g_ has quit [Ping timeout: 256 seconds]
b4rbz has joined #ruby
Jackneill has joined #ruby
rshetty has quit [Remote host closed the connection]
Akagi201 has joined #ruby
deepali has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
antgel has joined #ruby
browndawg has joined #ruby
sigurding has quit [Ping timeout: 255 seconds]
hmsimha_ has quit [Ping timeout: 255 seconds]
n008f4g_ has joined #ruby
Lingos has joined #ruby
moritzs has joined #ruby
kies has joined #ruby
deepali has quit [Quit: This computer has gone to sleep]
Kricir has joined #ruby
uber_hul1 has quit [Ping timeout: 272 seconds]
ta has joined #ruby
boombadaroomba has joined #ruby
oo_ has joined #ruby
boombadaroomba has quit [Ping timeout: 240 seconds]
ItSANgo has joined #ruby
deepali has joined #ruby
corehook has joined #ruby
deepali has quit [Remote host closed the connection]
ghr has joined #ruby
Guest6644 has joined #ruby
antgel_ has joined #ruby
browndawg has quit [Quit: Leaving.]
Techguy305 has quit [Ping timeout: 255 seconds]
antgel_ has quit [Client Quit]
ghr has quit [Ping timeout: 264 seconds]
corehook has quit [Remote host closed the connection]
Guest6644 has quit [Quit: WeeChat 1.0.1]
sski has quit [Remote host closed the connection]
AliRezaTaleghani has joined #ruby
crandersons has joined #ruby
hephaestus_rg has quit [Quit: leaving]
webgen has joined #ruby
crantron has quit [Ping timeout: 256 seconds]
abuzze has joined #ruby
sigurding has joined #ruby
corehook has joined #ruby
Soda has quit [Remote host closed the connection]
max96at|off is now known as max96at
Takle has joined #ruby
<rpag> sevenseacat, they are, yeah
<sevenseacat> makes sense
oo_ has quit [Remote host closed the connection]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
oo_ has joined #ruby
kike_chavez has joined #ruby
<kike_chavez> what is the difference between if and when?
<zenspider> an apple and an orange
Takle has quit [Ping timeout: 265 seconds]
<Areessell> When is used within a case statement. Case and if are conditionals.
<kike_chavez> thank you Areessell
<kike_chavez> so can i use a case in a class?
<Areessell> I think you should skim though a beginner's Ruby book, Have you tried tryruby.org?
oo_ has quit [Ping timeout: 255 seconds]
<kike_chavez> Areessell: yes i've finished it a bunch of times, i don't really understand it
<kike_chavez> i'm a programming neophyte and computers in general
<kike_chavez> i didn't really understand it
<Areessell> It's fairly rare that I have a conditional within a class definition, but definitly within the method definitions on the class.
<Areessell> Ah I see
deepali has joined #ruby
deepali has quit [Remote host closed the connection]
<kike_chavez> why would you use a case over a conditional?
JCii8 has quit [Ping timeout: 244 seconds]
<zenspider> case IS a conditional
<Areessell> Case is a conditional. A conditional simply takes a condition and performs an action based on the result
<kike_chavez> whoops i meant over an if statement
<Areessell> if/elsif blocks can end up being repetitive and case could make it easier to understand. They are interchangable for the most part.
<Areessell> See the `when "A"` and `when "B"` parts? With an if block, that would instead be `if grade == "A"` and `elsif grade == "B"`
deepali has joined #ruby
codecodecode123 has joined #ruby
kike_chavez_ has joined #ruby
<codecodecode123> hi
<kike_chavez_> hi
<kike_chavez_> something is wrong with my internet
<kike_chavez_> the screen just froze and i had to refresh the page
_honning_ has joined #ruby
<Areessell> So you didn't see what I said?
ht__th has joined #ruby
<kike_chavez_> the last thing i remember was you saying conditionals are if statements
<kike_chavez_> but then i said whoops i meant case over if
<kike_chavez_> and that's when bad stuff happened
<codecodecode123> why does the bell sound ( \a ) not work in http://pastie.org/9737950
<Areessell> if/elsif blocks can end up being repetitive and case could make it easier to understand. They are interchangable for the most part.
klmlfl has quit [Remote host closed the connection]
<Areessell> See the `when "A"` and `when "B"` parts? With an if block, that would instead be `if grade == "A"` and `elsif grade == "B"`
kike_chavez has quit [Ping timeout: 246 seconds]
<codecodecode123> can anyone help?
<Areessell> codecodecode123: Works for me, is your terminal setup to give a bell notification?
<codecodecode123> what do you mean?
<Areessell> Mine is setup to show a visual notification rather than a sound
<Areessell> I mean what I said.
<codecodecode123> mine is supposed to give sound
<codecodecode123> isn't that default?
uber_hulk has joined #ruby
<Areessell> Not everywhere, no.
<codecodecode123> my system is ubuntu 14.02
<kike_chavez_> Areessell: yes, i see that, but why would you choose one over the other?
<Areessell> kike_chavez_: I just told you.
<Areessell> Easier to understand and less repitition.
<sevenseacat> no its not, 14.02 doesnt exist
<codecodecode123> 14.o something
<codecodecode123> dont remember
<Areessell> codecodecode123: Check your terminal settings to see if bell notifications are enabled.
<codecodecode123> from where do i chek them
<codecodecode123> *check
<sevenseacat> from the terminal preferences.
<Areessell> Simple, google "how to recompile kernel"
godd2 has quit [Remote host closed the connection]
<codecodecode123> sevenseacat: im using rubymine terminal for this btw
<codecodecode123> Areessell:
<sevenseacat> good to know. check your terminal preferences.
webgen has quit [Ping timeout: 255 seconds]
<codecodecode123> how do i do that in rubymine
<sevenseacat> buggered if i know.
yfeldblu_ has joined #ruby
<sevenseacat> check your rubymine preferences
<codecodecode123> ok
<sevenseacat> we're not here to teach you how to use a computer
<Areessell> Or perhaps read a manual.
<sevenseacat> if youve chosen to use a certain piece of software like rubymine, the onus is on you to learn how to use it
Freemason has quit []
<sevenseacat> or at least ask your questions about it in the right place
rubyracer has joined #ruby
webgen has joined #ruby
<Areessell> To test it, I just opened irb and ran `puts "\a"` and it displayed a notification. Try it from your terminal to test if they are enabled for you.
<codecodecode123> ok
<kike_chavez_> Areessell: thank you for that link, it was a difficult read, but i think i am somewhat understanding it
max96at is now known as max96at|off
<kike_chavez_> i need to learn more of about the ruby language to understand it all
yfeldblum has quit [Ping timeout: 240 seconds]
<sevenseacat> probably so
<codecodecode123> \a doesnt work on both
<kike_chavez_> what's a seven sea cat?
<codecodecode123> whatever
<codecodecode123> ill stop posting things on the wrong channel now
<Areessell> Did you write that pastie from scratch or copy and paste? If you copied and pasted, I recommend building from scratch. Definitely helps you learn better.
<Areessell> More goodly.
deepali has quit [Quit: This computer has gone to sleep]
<codecodecode123> i copypasted it
<sevenseacat> kike_chavez_: it's me.
<codecodecode123> ok thanks for the tip
<kike_chavez_> but what does it mean?
webgen has quit [Read error: Connection reset by peer]
<Areessell> Yeah, every language is hard to learn when using copy-pasta.
kalusn has joined #ruby
<Areessell> Turns out, Ubuntu disabled terminal notifications system wide and you gotta do tricksy stuff to re-enable it: http://askubuntu.com/questions/228096/terminal-bell-doesnt-ring
<kike_chavez_> i guess it is you
<codecodecode123> oh no
<kike_chavez_> i thought it meant something sevenseacat
<sevenseacat> kike_chavez_: nope.
<kike_chavez_> but why would you tie your online identity to your real name
<kike_chavez_> that kind of defeats the purpose
* sevenseacat is starting to wonder about kike_chavez_
<kike_chavez_> lol
<kike_chavez_> what do you mean?
<Areessell> This is my profession. Noones going to hire RubyMa5terz518.
rubyracer has quit [Quit: Konversation terminated!]
<kike_chavez_> why not?
<kike_chavez_> sounds legit
<codecodecode123> how do you do that in web hat sevenseacat
kalusn has quit [Remote host closed the connection]
<codecodecode123> *webchat
<sevenseacat> sounds totally professional, too
kalusn has joined #ruby
<codecodecode123> *how do you do that in webchat sevenseacat
<codecodecode123> the onw with *
<codecodecode123> *one
<Areessell> Oh man. I feel as if I'm undergoing a lobotomy.
<sevenseacat> type /me something something something
<kike_chavez_> well, in terms of professional, i would only consider first and last names, nicks are completely irrelevant
* sevenseacat something something something
<codecodecode123> ok
* codecodecode123 thinks that he is a typo professional
<sevenseacat> :)
exadeci has joined #ruby
<sevenseacat> Areessell: i know them feels.
* codecodecode123 thinks that it happens at SUNDAYS
* kike_chavez_ facepalms
* codecodecode123 faceplants
<sevenseacat> i've created a monster.
<codecodecode123> YES YOU HAVE
<kike_chavez_> lol i already knew about /me for a long time
<Areessell> Thank god there's no bot in here.
<Areessell> ..right?
<sevenseacat> >_>
<sevenseacat> (there are two)
<codecodecode123> phew
<kike_chavez_> i don't mean to sound like an asshole, but why didn't you complete your site?
<Areessell> hah well let's not out their identities.
haxrr has joined #ruby
<Areessell> Looks done to me
<kike_chavez_> lol it's a google search away :P
<sevenseacat> what site?
kalusn has quit [Ping timeout: 256 seconds]
moritzs has quit [Ping timeout: 255 seconds]
<Areessell> There's even a cat on the page to top it off
<kike_chavez_> yours sevenseacat
haxr has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
<sevenseacat> mine's as finished as i wanted it to be.
kike_chavez has joined #ruby
<Areessell> You're missing linked in, but yeah that's really all you need. Just my code on Github has caused tech recruiters to seemingly never leave me alone.
<kike_chavez> this is terrible something is wrong with my connection
<kike_chavez> i should boot up wireshark
<sevenseacat> i think i made it before i had a linked in account
<Areessell> Wireshart? Like for hacking n64 and PS1 games?
<sevenseacat> enough recruiters seem to find me there anyway
fabrice31 has joined #ruby
<kike_chavez> Areessell: no it's for networking, you can do a lot of cool stuff
<kike_chavez> it analyzes protocols and gives you a lot of nice feedback
<Areessell> Ahh okay I know what you're talking about now. You're using the webchat?
<kike_chavez> yep
<Areessell> If so, get yourself a for-realsies IRC client
<kike_chavez> sevenseacat: i am going to sound like an asshole by saying this, but part of being professional is being able to take critique
* sevenseacat raises eyebrow
kike_chavez_ has quit [Ping timeout: 246 seconds]
<kike_chavez> i think your site could do much much much better in terms of design and styling
Spami has quit [Quit: This computer has gone to sleep]
<sevenseacat> good for you.
<Areessell> Wtf does design have to do with how good a person can program?
<kike_chavez> it looks half-assed
GoldenArms has joined #ruby
<kike_chavez> Areessell: everything, people judge based on results
<Areessell> How much do you make per year programming, kike_chavez?
maestrojed has quit [Quit: Computer has gone to sleep.]
<kike_chavez> nothing, i'm learning now
<kike_chavez> but i've made 290k this year from real estate
<kike_chavez> so if i can combine the two i can make a bit more :)
<GoldenArms> Quick question, can I do string manipulation with shell-executed back ticks like this? `cd /var/lib/#{file_path}` ?
<Areessell> Try in IRB
krisquigley has joined #ruby
<GoldenArms> ah, of course
fabrice31 has quit [Ping timeout: 265 seconds]
<Areessell> >> h = "Hello"; `echo #{h}`
<eval-in__> Areessell => (https://eval.in/225245)
oleo__ has joined #ruby
<Areessell> Guess that doesnt work in the bot.
<kike_chavez> that's some interesting code
<GoldenArms> worked in irb
<GoldenArms> thanks Areessell
<Areessell> =)
<Areessell> Not a problem.
<Areessell> Anyways, kike_chavez. As someone who is self-taught and spend years in this business. Design doesn't really matter. The code speaks for itself.
jack_rabbit has quit [Ping timeout: 265 seconds]
<Areessell> All an employer really needs is links to the code, linked in, etc.
oleo is now known as Guest80354
<kike_chavez> oh, that's interesting
ghr has joined #ruby
<kike_chavez> because if i were to do something i would go all out
<kike_chavez> show them that i'm superman or something lol
<kike_chavez> i guess that's why i'm not doing too bad in real estate
<Areessell> Of course, if you are a web designer, then you're web site better blow me away. Cause that's your area of expertise.
<kike_chavez> but isn't coding part of design?
<Areessell> Heh, my last employer had a whole separate wing of employees that only worked design, where as me and my team worked back end code.
Lingos has quit [Quit: Be back later ...]
Guest80354 has quit [Ping timeout: 272 seconds]
krisquigley has quit [Ping timeout: 264 seconds]
<Areessell> Some designers only work in photoshop creating mockups and stuff all day.
<kike_chavez> well, i would like to see back end guys being able to do front end stuff, i want them to feel the projects
<Areessell> There's a hell of alot of that in the Rails community.
GoldenArms has quit [Ping timeout: 246 seconds]
<sevenseacat> indeed
<kike_chavez> that's exactly what i'm studying
<kike_chavez> i'm going to a rails bootcamp soon
<kike_chavez> but i understand that in large enough projects the need to separate the designers from the coders
<kike_chavez> even though it's sad for me to see that, it saves time and money
ghr has quit [Ping timeout: 244 seconds]
maestrojed has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<Areessell> Why? I frequently jump between front end and back end work. It's just management of resources. It doesnt mean all designers don't know how to write backend code or vice-versa.
kalusn has joined #ruby
<kike_chavez> Areessell: well, in basic terms, it would take me twice as long, if not longer, to do a mockup and code it than just receiving a mockup to code
<Areessell> If anything, it's a great thing, because it relays the importance of teamwork in large applications. It would me impossibly stressful for one person to work on all of the code all of the time.
<sevenseacat> kike_chavez: well yes, if you do twice as much work, it would take twice as much time.
<kike_chavez> but it's sad that then you don't get the creative control
<sevenseacat> sigh
<kike_chavez> maybe it's only me that likes to have creative control, idk
<Areessell> Why would you have creative control when you are creating a product to a clients specifications? Do you know how this business works at all?
sigurding has quit [Quit: sigurding]
jack_rabbit has joined #ruby
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
kloeri has quit [Changing host]
kloeri has joined #ruby
workmad3 has joined #ruby
lxsameer has quit [Ping timeout: 258 seconds]
jonr22 has joined #ruby
dc_ has quit [Remote host closed the connection]
kike_chavez has quit [Quit: Page closed]
n008f4g_ has quit [Ping timeout: 245 seconds]
hmsimha_ has joined #ruby
anaeem1_ has joined #ruby
AndroUser466 has joined #ruby
marr has joined #ruby
AndroUser466 has quit [Client Quit]
joshua__ has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
<joshua__> Hey guys, I have 2 data structures as so: https://gist.github.com/joshmyers/0c86630a58824154b5cb
Mongey has quit [Ping timeout: 240 seconds]
jonr22 has quit [Ping timeout: 244 seconds]
dcunit3d has quit [Ping timeout: 272 seconds]
<Areessell> Yes?
<sevenseacat> good to know.
Lingos has joined #ruby
<joshua__> I want to key on each OS kind and take each visits value and divide by the same transactions value
<joshua__> can anyone suggest the nicest way to do this?
anaeem1_ has quit [Remote host closed the connection]
<joshua__> It's not the nicest structure and would suit a hash better, but it's how an API gives it
<joshua__> and I need it in an array for later anyway
<Areessell> Tricky
<joshua__> I guess, turn it into a hash, merge the hashes, do some math, and then turn back in array?
dcunit3d has joined #ruby
lidaaa has quit [Ping timeout: 265 seconds]
<sevenseacat> something to do with zip, maybe
siso has joined #ruby
dc_ has joined #ruby
pushpak has joined #ruby
<sevenseacat> or inject
<joshua__> group_by seems to get me a decent hash keys on OS pretty easy
AFKGeek has joined #ruby
<zenspider> two data structures? arrays and strings?
<Areessell> >> visits = [["desktop", "941"], ["mobile", "2009"], ["tablet", "446"]]; transactions = [["desktop", "123"], ["mobile", "99"], ["tablet", "17"]]; visits.each.with_index { |(type, num), index| p transation_num = transactions[index].last }
<eval-in__> Areessell => "123" ... (https://eval.in/225246)
<Areessell> That should get you started.
Mateon2 has joined #ruby
timonv_ has joined #ruby
vinleod has joined #ruby
<joshua__> zenspider: yes
<joshua__> Areessell: thanks, I'll have a look
<joshua__> cheers!
<Areessell> zenspider: sevenseacat: You guys seem a bit jaded =p
<sevenseacat> many years on IRC will do that to you.
<Areessell> This is why I idle. Can't sleep tonight, though
dcunit3d has quit [Ping timeout: 264 seconds]
<zenspider> nobody is paying me to do ppl's homework AND be non-snarky
dc_ has quit [Ping timeout: 255 seconds]
Mateon1 has quit [Ping timeout: 264 seconds]
<Areessell> Haha I can appreciate that
<sevenseacat> i'm always here while i do other stuff. right now im reviewing book content, so i can chat and write at the same time.
pandaant has quit [Remote host closed the connection]
rshetty has joined #ruby
n008f4g_ has joined #ruby
<Areessell> I hop on from time to time. I like to help cause I took all my computer baby steps by badgering people on IRC when I was a pup. #VB6 and #ubuntu did not like me too much.
<sevenseacat> hehe
lxsameer has joined #ruby
kireevco has quit [Quit: Leaving.]
<Hanmac> Areessell: do you want visit per transaction or transaction per visit?
kireevco has joined #ruby
kireevco has quit [Client Quit]
<Hanmac> joshua__: o did mean you with my question
<Areessell> =)
rshetty has quit [Ping timeout: 240 seconds]
<joshua__> Hanmac: transaction per visit
<joshua__> i.e. conversion rate :)
<Hanmac> >> visits = [["desktop", "941"], ["mobile", "2009"], ["tablet", "446"]].to_h; transactions = [["desktop", "123"], ["mobile", "99"], ["tablet", "17"]].to_h; visits.map { |type, num| [type, transactions[type].to_f / num.to_i] }.to_h
<eval-in__> Hanmac => {"desktop"=>0.13071200850159406, "mobile"=>0.04927824788451966, "tablet"=>0.03811659192825112} (https://eval.in/225248)
<Hanmac> means 13% for "desktop"
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
TripTastic has joined #ruby
AFKGeek has quit [Quit: Off to fly a kite]
<joshua__> Hanmac: cheers! :)
<Areessell> I totally forgot about the `[[key,value],..].to_h` trick. Nice.
<joshua__> I was going down the inject route, but that looks nicer :)
govg has quit [Quit: leaving]
max96at|off is now known as max96at
JBreit has quit [Ping timeout: 258 seconds]
<joshua__> hmm
<joshua__> NoMethodError: undefined method `to_h' for [["desktop", "941"], ["mobile", "2009"], ["tablet", "446"]]:Array
gargarin has joined #ruby
<Areessell> >> Hash[ [["desktop", "941"], ["mobile", "2009"], ["tablet", "446"]] ]
<eval-in__> Areessell => {"desktop"=>"941", "mobile"=>"2009", "tablet"=>"446"} (https://eval.in/225249)
<Areessell> Square brackets galore!
Lingos has quit [Quit: Be back later ...]
jack_rabbit has quit [Ping timeout: 245 seconds]
Olivertynes has quit [Quit: Connection closed for inactivity]
gargarin has left #ruby [#ruby]
<joshua__> Areessell: lol, could you explain why that works and to_h does not?
<Areessell> I think Array#to_h was added in a later version of MRI than what you are using.
<rpag> to_h is a ruby 2.1 thing afaik
<rpag> >> [[1,2], [3,4], [4,5]].to_h
<eval-in__> rpag => {1=>2, 3=>4, 4=>5} (https://eval.in/225250)
<joshua__> ah, figure, using 2.0 here
<joshua__> for this proj anyway
<rpag> upgraaaade
<joshua__> jaja, usually running 2.1.3
gargarin has joined #ruby
<rpag> 2.1.5 is out already
<joshua__> ye, I've built the .deb 2.1.5 package but not using in production yet
<rpag> sweet
gargarin has left #ruby [#ruby]
dcunit3d has joined #ruby
dc_ has joined #ruby
_honning_ has quit [Ping timeout: 265 seconds]
lemur has quit [Remote host closed the connection]
lemur has joined #ruby
webgen has joined #ruby
drewvanstone has joined #ruby
charliesome has joined #ruby
dcunit3d has quit [Ping timeout: 258 seconds]
dc_ has quit [Ping timeout: 255 seconds]
charliesome has quit [Read error: Connection reset by peer]
TripTastic has quit [Quit: Leaving]
TripTastic has joined #ruby
dc_ has joined #ruby
drewvanstone has quit [Ping timeout: 258 seconds]
lemur has quit [Ping timeout: 272 seconds]
duncannz has quit [Remote host closed the connection]
dc_ has quit [Ping timeout: 240 seconds]
shortCircuit__ has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
nrsk has joined #ruby
Avahey has quit [Quit: Connection closed for inactivity]
goshdarnyou has quit [Quit: Connection closed for inactivity]
reinaldob has joined #ruby
ghr has joined #ruby
<arup_r> Any body reading this http://clean-ruby.com/ book ?
Soda has joined #ruby
<sevenseacat> im gonna see if my work will buy it for me >_>
ghr has quit [Ping timeout: 272 seconds]
j416 has quit [Ping timeout: 244 seconds]
<shevy> sevenseacat will fish for fish
<shevy> then trade the fish for mice
<shevy> then eat half of the mice and trade the other half for the book
<sevenseacat> i dont actually eat fish (or any seafood), surprisingly.
rylev has joined #ruby
<Areessell> “I have not come across such a revelatory approach to things since first learning OOP.” — Mike Pence, Owner at Hayduke Labs, LLC
<Areessell> Really? Keeping your application modular is news?
JohnBat26 has joined #ruby
<shevy> Areessell he could be a slow learner
tlarevo_ has joined #ruby
tlarevo has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby
j416 has joined #ruby
FooMunki_ has joined #ruby
Kricir has quit [Remote host closed the connection]
<shortCircuit__> what is the s=d0e74da622ed303ae738373349c358e0 in the request body of the webpage at webchat.freenode.net
FooMunki has quit [Read error: No route to host]
FooMunki_ is now known as FooMunki
_5kg has quit [Ping timeout: 244 seconds]
<Areessell> The author spoke at rubyconf about using SimpleDelegator and Forwardable. >_o Guys! Check out Pathname! It's like the File AND the Dir classes! I just wrote a book about it, only $46!
Lingos has joined #ruby
<shortCircuit__> s=d0e74da622ed303ae738373349c358e0&c=PRIVMSG%20%23ruby%20%3Awhat%20is%20the%20s%3Dd0e74da622ed303ae738373349c358e0%20in%20the%20request%20body%20of%20the%20webpage%20at%20webchat.freenode.net ah this is nice.. I have to just find a may to use the xmlhttprequest to do this thing. and then I have a browser based chat application. which I will build maybe using maybe nodejs
gargarin has joined #ruby
tkuchiki has joined #ruby
<Areessell> You want to build an application to connect to the webchat to communicate on irc?
<shortCircuit__> yeah
<shortCircuit__> um..
<shortCircuit__> no
<shortCircuit__> wats the difference
<shortCircuit__> ir.freenode.net !== webchat.freenode.net ?
Spami has joined #ruby
AliRezaTaleghani has quit [Quit: Leaving.]
<Areessell> ...
<Areessell> Okay IRC is a application protocol just like HTTP is, running on TCP/IP which you can just connect directly to IRC from your application, instead of through HTTP AJAX requests o_o
<shortCircuit__> oh
<Areessell> Funny thing is your idea would probably work, just in a round about way
<shortCircuit__> how?
<shortCircuit__> I don't need ajax but then how do I connect. From a browser I can ony connect with JS'es websockets or ajax
weemsledeux has joined #ruby
gargarin has left #ruby [#ruby]
nfk has joined #ruby
tkuchiki has quit [Remote host closed the connection]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 240 seconds]
RyanV has quit [Quit: (null)]
JCii8 has joined #ruby
<Areessell> Through a TCP socket, but you dont have to worry about that, just find and use an IRC client gem: https://github.com/cho45/net-irc
fabrice31 has joined #ruby
shortCircuit__ has quit [Ping timeout: 246 seconds]
elaptics`away is now known as elaptics
psy has quit [Remote host closed the connection]
tlarevo_ has quit [Remote host closed the connection]
pushpak has quit [Quit: Linkinus - http://linkinus.com]
fabrice31 has quit [Ping timeout: 264 seconds]
lxsameer has joined #ruby
psy has joined #ruby
quimrstorres has joined #ruby
krisquigley has joined #ruby
Areessell has quit [Ping timeout: 244 seconds]
ptrrr has joined #ruby
krisquigley has quit [Ping timeout: 240 seconds]
prasselpikachu has quit [Ping timeout: 255 seconds]
Areessell has joined #ruby
dcunit3d has joined #ruby
nilurie has joined #ruby
Kilo`byte has quit [Ping timeout: 255 seconds]
claymore has joined #ruby
ghr has joined #ruby
Xeago has joined #ruby
_5kg has joined #ruby
dcunit3d has quit [Ping timeout: 240 seconds]
lxsameer has quit [Ping timeout: 240 seconds]
Lingos has quit [Quit: Be back later ...]
Lingos has joined #ruby
abuzze has quit [Remote host closed the connection]
abuzze has joined #ruby
Xeago has quit [Remote host closed the connection]
workmad3 has joined #ruby
manzo has joined #ruby
siso has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
quimrstorres has quit [Remote host closed the connection]
samuel02 has joined #ruby
Lingos has quit [Quit: Be back later ...]
<aep> any built in function to split an array into equal chuncks of n items?
max96at is now known as max96at|off
Xeago has joined #ruby
nilurie has quit [Quit: leaving]
<Hanmac> aep each_slice(n) ?
workmad3 has quit [Ping timeout: 240 seconds]
<Hanmac> >> (0..9).each_slice(2).to_a
<eval-in__> Hanmac => [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9]] (https://eval.in/225260)
<aep> cheers
Xeago_ has joined #ruby
quimrstorres has joined #ruby
jonr22 has quit [Ping timeout: 272 seconds]
quimrstorres has quit [Remote host closed the connection]
Xeago has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
Unknown2 has joined #ruby
webgen has quit [Quit: Leaving]
jheg has joined #ruby
jack_rabbit has joined #ruby
Lingos has joined #ruby
lxsameer has joined #ruby
ponga has joined #ruby
yfeldblu_ has quit [Ping timeout: 245 seconds]
Lingos has quit [Client Quit]
Lingos has joined #ruby
jack_rabbit has quit [Ping timeout: 240 seconds]
wald0 has joined #ruby
samuel02 has quit [Remote host closed the connection]
sevenseacat has quit [Ping timeout: 250 seconds]
ltd has quit [Ping timeout: 255 seconds]
max96at|off is now known as max96at
max96at is now known as max96at|off
chu has joined #ruby
ltd has joined #ruby
manzo has quit [Ping timeout: 255 seconds]
quimrstorres has joined #ruby
startupality has joined #ruby
Xeago_ has quit [Ping timeout: 265 seconds]
<ponga> why do i keep getting "WARNING: can't open config file: /usr/local/etc/openssl/openssl.cnf" when trying to install ruby 2.1.5, is this normal?
<arup_r> sevenseacat: Are you planning to buy the book ?
Areessell has quit [Ping timeout: 265 seconds]
wald0 has quit [Quit: Lost terminal]
prasselpikachu has joined #ruby
sigurding has joined #ruby
Areessell has joined #ruby
Kilo`byte has joined #ruby
eka has joined #ruby
startupality has quit [Quit: startupality]
<shevy> ponga nope does not happen for me
<ponga> damn!
<shevy> ponga it would be good if you say how you install it; I compiled from source. Did you too? Additionally, that path is wrong - etc is at /etc/ and not at usr local installation prefixes
<ponga> shevy
<ponga> my re-install didn't print that error this time
<ponga> its all good now
<ponga> go and have your tea in peace
Areessel1 has joined #ruby
Areessell has quit [Ping timeout: 244 seconds]
<shevy> hehe
<ponga> hey shevy
<shevy> you are the non-japanese who can speak japanese right?
<ponga> how can i browse gems in order of most downloaded
<ponga> yeah
<ponga> im perfectly fluent in Japanese
<shevy> there is a statistic link at rubygems.org
<shevy> it should show top ten downloads
<ponga> thanks
<shevy> thor, rake, rails rack activesupport... json ... and the other action-things
<ponga> and what's this about me speaking japanese?
<shevy> *action/active*
<ponga> need help of language matter?
<shevy> nah just wondering
<shevy> there used to be a korean hacker once; kuja
<ponga> well it was like spanish guy learning Portuguese
<ponga> did he speak japanese too?
<shevy> I think so
<shevy> I think he was only half korean or something; it's been years since I met him on IRC last, he used to hangout on #rubyforce like a few others back then
MrIlyas has joined #ruby
t7y9r has joined #ruby
dorei has joined #ruby
sevenseacat has joined #ruby
Areessell has joined #ruby
corehook has quit [Remote host closed the connection]
Areessel1 has quit [Ping timeout: 256 seconds]
rylev has quit [Remote host closed the connection]
MrIlyas has quit [Quit: Leaving]
MrIlyas has joined #ruby
timonv_ has quit [Remote host closed the connection]
MrIlyas has quit [Client Quit]
<aep> hm, does Queue support complex objects? somehow it wont wake up my consumer thread
<ponga> are you a developer shevy
<aep> nah doesnt even work with an int. hurm
<aep> ah, i had an error in my producer thread but didnt get a trace
<aep> apparantly i only get traces for the thread i .join() is that expected?
St_Marx has quit [Ping timeout: 250 seconds]
davidhq has joined #ruby
ptrrr has quit [Quit: ptrrr]
<shevy> ponga dunno, I just write a lot of stuff
arup_r has quit [Read error: Connection reset by peer]
abuzze_ has joined #ruby
abuzze has quit [Ping timeout: 264 seconds]
nrsk has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
elaptics is now known as elaptics`away
manzo has joined #ruby
tastycode has joined #ruby
centrx has joined #ruby
hmsimha_ has quit [Read error: Connection reset by peer]
jamesbrink has quit [Ping timeout: 258 seconds]
hmsimha_ has joined #ruby
<zenspider> aep: ri abort_on_exception
DrCode has joined #ruby
<aep> thx
Takle has joined #ruby
arup_r has joined #ruby
kirun has joined #ruby
<ponga> i always wonder how the game is coded
St_Marx has joined #ruby
<ponga> is it like never-ending event listener til you press 'exit game'
<aep> hm so there is no sigaction in ruby?
<aep> i need to clean up in keyboard interrupt
<aep> and actually on exception/abort as well :/
Takle has quit [Ping timeout: 255 seconds]
sara-zah_ has joined #ruby
<zenspider> sigaction?
Lingos has quit [Quit: Be back later ...]
<aep> the unix signal handler
lxsameer has quit [Quit: Leaving]
<aep> for catching ^C and stuff
<zenspider> ri trap
<aep> ah thx
sigurding has quit [Quit: sigurding]
sara-zahrani has quit [Ping timeout: 256 seconds]
tastycode has quit [Ping timeout: 255 seconds]
Areessell has quit [Ping timeout: 256 seconds]
jimmyy has quit [Ping timeout: 244 seconds]
patrick99e99 has joined #ruby
postmodern has quit [Quit: Leaving]
Soda has quit [Remote host closed the connection]
joshua__ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
oleo__ is now known as oleo
patrick99e99 has quit [Ping timeout: 264 seconds]
fabrice31 has quit [Ping timeout: 255 seconds]
<shevy> aep intercept on Signal.trap('SIGINT') { exit }
<aep> actually 'ensure' works with keyboard interrupt as well. so good
ponga has quit [Remote host closed the connection]
quimrstorres has quit [Ping timeout: 245 seconds]
danguita has joined #ruby
wsmoak has joined #ruby
wsmoak has joined #ruby
sigurding has joined #ruby
quazimodo has joined #ruby
<quazimodo> hey yall
Azure has quit [Remote host closed the connection]
chu has quit [Ping timeout: 272 seconds]
SolarSailor has joined #ruby
<quazimodo> I've never really written a game in an oo way before, at the very least I never wrote one in the past by paying specific attention to the coherence of my architecture
arup_r has quit [Quit: Leaving.]
rkalfane has joined #ruby
ponga has joined #ruby
<quazimodo> I see ambiguity in where responsibilities lie
jamesbrink has joined #ruby
dkphenom has joined #ruby
krisquigley has joined #ruby
<quazimodo> It's difficult to tell without background reading, any recommended sites/articles to help me figure out what kind of object graph I need
<quazimodo> (this project is a board game and it's turn based) but I don't mind reading more abstract stuff
Azure has joined #ruby
russt has joined #ruby
haxrr has quit [Ping timeout: 255 seconds]
eguneys has joined #ruby
krisquigley has quit [Ping timeout: 256 seconds]
<eguneys> Suggest me a real world open source project using grape, similar to this http://artsy.github.io/blog/2014/09/12/designing-the-public-artsy-api/?utm_source=tuicool, I am new and I want to study something big.
corehook has joined #ruby
ponga has quit [Remote host closed the connection]
Mia has joined #ruby
arup_r has joined #ruby
jamse has joined #ruby
_honning_ has joined #ruby
timonv_ has joined #ruby
workmad3 has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SolarSailor has quit [Quit: Textual IRC Client: www.textualapp.com]
jonr22 has joined #ruby
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
parduse is now known as Guest28945
weemsledeux has joined #ruby
jonr22 has quit [Remote host closed the connection]
parduse has joined #ruby
jonr22 has joined #ruby
Guest28945 has quit [Ping timeout: 240 seconds]
<quazimodo> does a player in a realm receive a move message, or does the realm object, or does an object that handles moving players in realms ?
timonv_ has quit [Ping timeout: 264 seconds]
krz has joined #ruby
dcunit3d has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
krz has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
rylev has joined #ruby
jimbach has joined #ruby
<shevy> quazimodo always have one-ring-to-bind-them-all
<shevy> and in the darkness bind them
<shevy> in other words, you need to decide who is your master object in your game quazimodo
corehook has quit [Remote host closed the connection]
corehook has joined #ruby
corehook has quit [Remote host closed the connection]
<quazimodo> shevy: games have a master object?
<quazimodo> new to me :)
codecop has joined #ruby
gr33n7007h has joined #ruby
<shevy> quazimodo the object that binds them all
Azure has quit [Quit: Blue Sky Fish]
rylev has quit [Ping timeout: 264 seconds]
<shevy> somehow you must connect your individual parts right?
dcunit3d has quit [Ping timeout: 272 seconds]
<shevy> like class Car
<shevy> it has several components that have a specific functionality
<shevy> so in your example, the realm class must take care of the position of the players
<shevy> the different players won't know the location of all other players per se
<shevy> like in game maps where there is a fog of war effect and you can not see opposing players area
qohelet_ has joined #ruby
last_staff has joined #ruby
Lingos has joined #ruby
qohelet_ has quit [Client Quit]
lw has joined #ruby
lw has quit [Max SendQ exceeded]
Azure has joined #ruby
lw has joined #ruby
uber_hulk has quit [Quit: leaving]
weemsledeux has quit [Remote host closed the connection]
hiyosi has quit [Read error: Connection reset by peer]
AlSquirrel has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<quazimodo> shevy: that's the game loop isn't it
Lingos has quit [Ping timeout: 272 seconds]
<quazimodo> sort of
hiyosi has joined #ruby
<quazimodo> i don't even know
<shevy> well see
<shevy> your problem is that you want to give things names
<shevy> does the name itself matter?
jenrzzz has joined #ruby
<shevy> you could write up the game just by giving alphabetical names to your classes
<shevy> class A, class B, class C
<quazimodo> shevy: sure
<shevy> your primary end goal is not to find ways of abstractions or to make it more complicated but to devise ways how you can reach a functional and working game
sigurding has quit [Quit: sigurding]
<shevy> I mean there isn't a rule like "you must have 50 classes for your game" or "don't use more than 4 classes in your project"
<quazimodo> shevy: and do it simply and sensically
<shevy> yes!
<shevy> stay simple!
<shevy> less code is more!
<shevy> but features are better than no features
<quazimodo> i suppose
freerobby has joined #ruby
<quazimodo> it's hard to balance it. If I get the roles of the player objects and map objects etc fundamentally wrong... well it becomes ass
<shevy> in the end, all the objects are just clever containers of data
<shevy> so what
<shevy> you can rewrite it lateron anyway
<quazimodo> I still don't know if the chess piece object should handle movement on the board, or the board, or some rule enforcing object
Hanmac has quit [Read error: Connection reset by peer]
<shevy> does the chess object need to know where it resides?
<quazimodo> the player does
<shevy> k so you answered it - the chess object won't need where it is
<shevy> *to know
<quazimodo> piece.move could delegate to movement_controll_thing I suppose
<shevy> what a name :D
<shevy> movement_controll_thing
<quazimodo> that thingo would need to handle the rules for movement, it occurs to me that the chess piece would hold onto that piece of logic
<shevy> why
Hanmac has joined #ruby
<quazimodo> i don't know, maybe that belongs in a rule_object
<shevy> lol
<quazimodo> some sort of declarative rule book?
<quazimodo> i dno
<quazimodo> haha
<shevy> that's how complexity arises
<quazimodo> lol
<quazimodo> I still need to ask that question
<quazimodo> like
<quazimodo> piece.move("d3") -> CantMoveThereException!
<quazimodo> piece.move("f5") -> YouSunkMyBattleShip
gr33n7007h has quit [Changing host]
gr33n7007h has joined #ruby
pacMakaveli has joined #ruby
moritzs has joined #ruby
sara-zah_ has quit [Remote host closed the connection]
arrubin has quit []
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hmsimha_ has quit [Ping timeout: 255 seconds]
<shevy> dunno why your piece must contain that logic
<shevy> can't the class that handles the game map check for validity of moves?
<quazimodo> maybe?
drewvanstone has joined #ruby
moritzs has quit [Remote host closed the connection]
ringarin has joined #ruby
quimrstorres has joined #ruby
taxen has joined #ruby
russt has quit [Quit: russt]
Spami has quit [Read error: Connection reset by peer]
jimbach has quit [Remote host closed the connection]
rkalfane has joined #ruby
hmsimha_ has joined #ruby
elaptics`away is now known as elaptics
Spami has joined #ruby
Tranquility has joined #ruby
dkb20k has quit [Remote host closed the connection]
timonv_ has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
Soda has joined #ruby
timonv_ has quit [Ping timeout: 240 seconds]
claymore has quit [Quit: Leaving]
dc_ has joined #ruby
boombadaroomba has joined #ruby
Alina-malina has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
ringarin has quit [Quit: Leaving]
corehook has joined #ruby
jlast has joined #ruby
ponga has quit [Quit: Leaving...]
Spami has quit [Ping timeout: 245 seconds]
dc_ has quit [Ping timeout: 265 seconds]
fabrice31 has joined #ruby
boombadaroomba has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 272 seconds]
taxen has quit [Quit: Textual IRC Client: www.textualapp.com]
Spami has joined #ruby
corehook has quit [Ping timeout: 258 seconds]
deepali has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
tlarevo has joined #ruby
corehook has joined #ruby
<codecodecode123> hi
<codecodecode123> why does http://pastie.org/9738297 give an error?
benzrf|offline is now known as benzrf
<centrx> codecodecode123, attr_accessor uses an instance variable of the same name, @open?
<centrx> codecodecode123, but only method names can have the ?
<codecodecode123> oh
<codecodecode123> thank you
pen has joined #ruby
manzo has quit [Ping timeout: 264 seconds]
aspiers has joined #ruby
corehook has quit [Ping timeout: 258 seconds]
SCHAAP137 has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: zzz]
ctp has joined #ruby
patrick99e99 has joined #ruby
gsd has joined #ruby
tlarevo_ has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
patrick99e99 has quit [Ping timeout: 265 seconds]
parzzix has joined #ruby
krisquigley has joined #ruby
<codecodecode123> should i use "for" loops or "each" loops (assuming i am not going to create a variable which is going to be used outside the loop)?
buddy_tucker has joined #ruby
mistermocha has joined #ruby
<centrx> codecodecode123, each is standard style
<centrx> codecodecode123, for gets converted to .each
benzrf is now known as benzrf|offline
<codecodecode123> so what is the difference
<codecodecode123> does it matter if i use one or the other?
<centrx> for is just syntactic sugar
<centrx> It is best to follow the standard conventions when learning
<centrx> .each is just one way to iterate an array
<centrx> only .each has this for sugar
tlarevo_ has quit []
<codecodecode123> im not learning, so?
<centrx> There is no good reason to use for
<shevy> codecodecode123 .each is simpler, it does the counting for you
<centrx> It should be removed from the language
<shevy> you can use .each and also .each_with_index so you for is not necessary in ruby
last_staff has quit [Ping timeout: 240 seconds]
krisquigley has quit [Ping timeout: 245 seconds]
<codecodecode123> i dont care about easiness shevy
<shevy> really
<shevy> so you write difficult code
<codecodecode123> yes
o0oo0o has quit [Quit: WeeChat 0.4.3]
<shevy> I don't believe you
<codecodecode123> easy or hard
<codecodecode123> im just wondering
<centrx> He does it all
<codecodecode123> ^
mistermocha has quit [Remote host closed the connection]
<shevy> no, you said you don't care about easiness so by definition you write difficult code
<codecodecode123> the easiness level
<shevy> you should use a lot of for loops man
<shevy> the more the better
<codecodecode123> i dont care about easiness and hardness
<centrx> shevy's point is that it is good to write clear, maintainable code
<shevy> yeah so use for
<codecodecode123> ok
<codecodecode123> for loop it is
<centrx> Don't do it, he's scamming you
<shevy> exactly
o0oo0o has joined #ruby
cleopatra has quit [Ping timeout: 250 seconds]
<codecodecode123> oh i just saw the messages
<codecodecode123> shiat
JohnBat26 has quit [Remote host closed the connection]
rikai has quit [Ping timeout: 272 seconds]
<codecodecode123> quick question: how do i give a class attribute a default value?
<centrx> def my_attr; @my_attr ||= 5; end
SCHAAP137 has joined #ruby
<codecodecode123> thx
<codecodecode123> wait a minute...
startupality has joined #ruby
gargarin has joined #ruby
<codecodecode123> doesn't that work only when you run that method?
gargarin has left #ruby [#ruby]
<codecodecode123> i want it to be set when the instance is created
<codecodecode123> centrx:
JohnBat26 has joined #ruby
nkts has joined #ruby
workmad3 has joined #ruby
<livcd> Hanmac: thanks for libarchive-ruby :-)
<Hanmac> livcd: i dont know if it does still work ... if i steal some time i need to update it against newest versions of libarchive and ruby
rikai has joined #ruby
<livcd> Hanmac: it works really well ! though not by default on yosemite. I had to update system's libarchive first
<shevy> Das Abschätzen der Wachstum einer Funktion wird womit erreicht? Mi
<shevy> mispaste :>
henesy has quit [Ping timeout: 258 seconds]
deepali has quit [Quit: This computer has gone to sleep]
workmad3 has quit [Ping timeout: 264 seconds]
nrsk has joined #ruby
moritzs has joined #ruby
<centrx> codecodecode123, def initialize(my_attr); @my_attr ||= 5; end
<codecodecode123> i use attr_accessor
<centrx> codecodecode123, or def initialize; @my_attr = 5; end
sevenseacat has quit [Quit: Leaving.]
<centrx> codecodecode123, attr_accessor uses the @instance_variable underneath. It is short hand for: def my_attr; @my_attr; end; def my_attr=(x); @my_attr = x; end
<centrx> codecodecode123, So you can either define your own accessor method, which will set and return the default when the attribute is read
Soda has quit [Remote host closed the connection]
<codecodecode123> ok thx
<centrx> codecodecode123, Or you can set the instance variable when the class is instantiated (new instance created), by putting the default assignment in the #initialize method
<codecodecode123> ok
<codecodecode123> thank you
<Hanmac> codecodecode123: if you want the setter function to be called, use self.my_attr = 5
dkb20k has joined #ruby
notjohn has joined #ruby
Czechton has joined #ruby
timonv_ has joined #ruby
agjacome has joined #ruby
<codecodecode123> Hanmac: what is the setter functin
<Czechton> I'm new to ruby and I'm having trouble with "require 'xxx'" anyone willing to help?
<Hanmac> codecodecode123: i mean the set method created by attr_accesssor
<centrx> Czechton, loads header files using simple naming scheme
<codecodecode123> what is that
<codecodecode123> Hanmac:
<Czechton> centrx: i get "LOadError: cannt load such file"
<Czechton> despite having the gem installed
<Hanmac> codecodecode123: attr_accessor does create methods
<centrx> Czechton, What is your require statement actually look like?
<centrx> codecodecode123, accessors are called getters and setters, readers and writers
<Czechton> require 'mumble-ruby'
startupality has quit [Quit: startupality]
<Hanmac> Czechton: how did you install ruby, and how did you install the gems? some gem have different gem-name and require string
<Czechton> I've installed ruby using rbenv
<codecodecode123> centrx: i know reader and writer
<Hanmac> Czechton: and how did you installed that gem? with or without sudo?
<codecodecode123> but not getter and setter
<Czechton> my $LOAD_PATH doesnt include the gem path i get when i do "gem env" in shell
<Czechton> without sudo
<Czechton> installed the gem without sudo that is
<Czechton> i got an error doing sudo gem install
<Hanmac> Czechton: do gem contents "gem name" and make a gist from it or something
<Czechton> Hanmac: in irb or shell?
timonv_ has quit [Ping timeout: 240 seconds]
<Hanmac> shell
<Czechton> what should I look for
danijoo has joined #ruby
dcunit3d has joined #ruby
henesy has joined #ruby
Avahey has joined #ruby
<Czechton> everything listed is in ~/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/mumble-ruby-1.1.2/
danguita has quit [Quit: WeeChat 0.4.2]
artmann_ has quit [Read error: Connection reset by peer]
artmann has joined #ruby
dkb20k has quit [Ping timeout: 264 seconds]
crazydiamond has joined #ruby
<Hanmac> Czechton: hm look for the /lib/ dir or something
dcunit3d has quit [Ping timeout: 240 seconds]
<Czechton> there is a lib dir inside that path with a load of stuff in it
<codecodecode123> why does http://pastie.org/9738371 not work?
<codecodecode123> centrx:
<Czechton> i get the same error with any of the installed gems
<codecodecode123> shevy:
<Czechton> so its likel;y not that specific gem thats the issue
<centrx> codecodecode123, Use an array or a hash instead of defining multiple local variables programmatically
<Hanmac> codecodecode123: eval does not set local variables like that
danguita has joined #ruby
drewvanstone has quit [Ping timeout: 258 seconds]
<codecodecode123> ok
<codecodecode123> thanks for your responses
jenrzzz has quit [Ping timeout: 258 seconds]
tanath_ has quit [Remote host closed the connection]
tanath_ has joined #ruby
hmsimha_ has quit [Read error: Connection reset by peer]
russt has joined #ruby
Photism has joined #ruby
hmsimha_ has joined #ruby
corehook has joined #ruby
mikelodeon has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
terlar has joined #ruby
SCHAAP137 has joined #ruby
nateberkopec has joined #ruby
tier has joined #ruby
kobain has joined #ruby
<txdv> shevy
<txdv> i have nothing to do, please entertain me
<shevy> lol
Channel6 has joined #ruby
<txdv> NO
<txdv> YOU ENTERTAIN ME
<txdv> i have to say lol not you
<centrx> lol
quimrstorres has quit [Remote host closed the connection]
<Hanmac> txdv checkout the game "simutrans" ;P
crazydiamond has quit [Ping timeout: 272 seconds]
jimbach has joined #ruby
<txdv> i can't play simcity like games
<txdv> i get bored
<txdv> its the same over and over again
tus has joined #ruby
m8 has joined #ruby
blahwoop has joined #ruby
<blahwoop> hi all!
<txdv> maybe i should try out farcry
gummybehr has joined #ruby
<txdv> I heared it is a good game
aspiers has quit [Ping timeout: 264 seconds]
<blahwoop> if i have an array of words ["hello, "hi", "dude"] is there a way to check if "he" is in an element by ordr from the beginning
<blahwoop> like a prefix
Beoran has quit [Read error: Connection reset by peer]
despai has joined #ruby
<shevy> wat
<shevy> I don't understand the question
<shevy> you have an array; 3 members. what comes next?
<shevy> use .include? to find out if your array has something
<blahwoop> so if i have ["hello", "head", "the"] can i only return the first two not the last one
<Czechton> shevy: i think he means checking to see if a member of the array matches a particular substring
rshetty has joined #ruby
<shevy> oh so a partial include
<blahwoop> if i pass in "he"
<shevy> blahwoop use .reject / .select or .any? on your check
<txdv> >> ["hello", "hi", "dude"].select { |e| e =~ /^he/ }
<eval-in__> txdv => ["hello"] (https://eval.in/225306)
<blahwoop> ^he will give me the first ones right?
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<shevy> txdv I am working through old DOS games right now
<shevy> blahwoop ^ anchors at the beginning of the line
<shevy> eval-in__ showed the output of txdv's code
<txdv> Interesting definition of 'working'
<txdv> I wish I could work like that all day long
<blahwoop> i see
<shevy> txdv yeah, I am working through to see how they were
<Hanmac> txdv use grep
<txdv> Hanmac: genious idea
<shevy> but unfortunately I have been demystified - my memory said that the games were much better than they really were :(
<txdv> how didnt i come up with that
krz has quit [Quit: WeeChat 1.0.1]
<shevy> most DOS RPGs were actually crap
terlar has quit [Ping timeout: 250 seconds]
* Hanmac is now known as "the Thousand-Master" because he knows more than 1000 functions and methods from the ruby core lib ;P
<shevy> what functions
<Hanmac> shevy " and methods" i know that in ruby there are no real "functions" but you get what i mean#
<shevy> yeah
<shevy> I just wonder how you counted that
<shevy> 1 ... 2 .... 1000?
ARCADIVS has quit [Quit: ARCADIVS]
<shevy> know what
<shevy> I'm gonna add a table to my local knowledgebase
<shevy> and count how many methods there are
<shevy> hmm
<shevy> should I count ::new as well?
ferri has joined #ruby
twistedpixels is now known as zz_twistedpixels
<shevy> class String has 115 methods
<shevy> I'll count generously
despai has quit [Quit: This computer has gone to sleep]
drewvanstone has joined #ruby
<shevy> Array: 94 methods
<shevy> Hash: 56 methods
<shevy> damn Hanmac
<shevy> I am not sure we can reach 1000
<Hanmac> shevy rwx itself currently has a total of 1282 ;P
gummybehr has quit []
jonr2219 has joined #ruby
mistermocha has joined #ruby
<shevy> well
gummybehr has joined #ruby
shredding has joined #ruby
mistermocha has quit [Remote host closed the connection]
despai has joined #ruby
timonv_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
Spami has quit [Client Quit]
gummybehr has quit []
mikelodeon has quit [Quit: mikelodeon]
Techguy305 has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
dangerousdave has joined #ruby
chu has joined #ruby
rdark has joined #ruby
ta has quit [Ping timeout: 256 seconds]
<Hanmac> shevy ruby itself has a Total of "15521" ... so rwx has still a long way to go ;P
<i8igmac> this is maybe a stupid question...
<i8igmac> puts list.each_line.size => fail
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<i8igmac> puts list.split("\n").size => 150
<i8igmac> why does each_line say <enumerator>
<i8igmac> and what happen to map
<i8igmac> when is the proper time to use map
zz_twistedpixels is now known as twistedpixels
parabolize has joined #ruby
shredding has quit [Quit: shredding]
anaeem1 has joined #ruby
<shevy> you use .map when you wish to apply something on your Array
<shevy> >> [1,2,3].map(&:to_s)
<eval-in__> shevy => ["1", "2", "3"] (https://eval.in/225328)
antgel has quit [Ping timeout: 250 seconds]
<shevy> on each member of your Array
mikepack has joined #ruby
<txdv> I love that &:to_s syntax
SCHAAP137 has quit [Quit: Leaving]
<i8igmac> shevy: why &:
<shevy> i8igmac this is a shortcut, should call to_proc
<shevy> you can write it this way as well:
<shevy> >> [1,2,3].map {|entry| entry.to_s }
<eval-in__> shevy => ["1", "2", "3"] (https://eval.in/225336)
<shevy> but when you did write the second way a few hundred times
<i8igmac> oh i see
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> then you really want to use the shorter way, really. try it
<i8igmac> its about how this stuff sticks to your brain
<shevy> yeah
<i8igmac> map will not work with strings? maybe years ago it did?
<i8igmac> ("some data\nand more").map
dangerousdave has joined #ruby
<canton7> i8igmac, I think i.8 may have?
<canton7> you can call #chars
<i8igmac> yah. all my old scripts are now broke, my bad habits like map need to be fixed
SCHAAP137 has joined #ruby
krisquigley has joined #ruby
shredding has joined #ruby
shredding has quit [Client Quit]
hmsimha_ has quit [Ping timeout: 255 seconds]
jonr2219 has quit [Remote host closed the connection]
tier has quit [Remote host closed the connection]
edough has quit [Ping timeout: 246 seconds]
krisquigley has quit [Ping timeout: 264 seconds]
NoNMaDDeN has quit [Quit: Leaving...]
Takle has joined #ruby
NoNMaDDeN has joined #ruby
Zackio has quit [Remote host closed the connection]
xcesariox has joined #ruby
corehook has quit [Remote host closed the connection]
tier has joined #ruby
Megtastique has joined #ruby
Zackio has joined #ruby
xcesariox has quit [Client Quit]
blahwoop has quit [Ping timeout: 272 seconds]
workmad3 has joined #ruby
<shevy> fixing is simple
<shevy> just check for strings and arrays
<shevy> actually probably even less than that
<shevy> only .map
<shevy> grep -r \.map *.rb
<shevy> or something like that
rob_ has joined #ruby
baroquebobcat has joined #ruby
<rob_> hi, can someone tell me whats wrong with this: http://hastebin.com/mutigituxa.rb
<rob_> i get an undefiend method error
Xiti has quit [Quit: Xiti]
<pontiki> we wouldn't know what that is if you don't show the error and backtrace, really
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
corehook has joined #ruby
<shevy> rob_ does your subclass allow arguments at all?
sjohnsen has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
Xiti has joined #ruby
<shevy> what is the equivalent to sed? #grep?
dangerousdave has joined #ruby
notjohn has quit [Quit: notjohn]
corehook has quit [Ping timeout: 258 seconds]
crazydiamond has joined #ruby
hmsimha_ has joined #ruby
<codecodecode123> i know this question is offtopic, but what plain ruby project should i do and is at medium difficulty
<codecodecode123> ?
msmith has joined #ruby
abuzze_ has quit [Remote host closed the connection]
abuzze has joined #ruby
kiyote23 has joined #ruby
blahwoop has joined #ruby
diabolik65 has joined #ruby
<blahwoop> if i put pry.binding in a method what can i do with it?
<blahwoop> i tried typing stuff in but nothing happens
<blahwoop> trying to debug a method
diabolik65 has quit [Client Quit]
sara-zahrani has joined #ruby
relix has joined #ruby
Hanmac has quit [Ping timeout: 265 seconds]
<rob_> basically i want to do this: http://hastebin.com/ofegorobim.rb
dkb20k has joined #ruby
wolf4ood has joined #ruby
sjohnsen has joined #ruby
tier has quit [Remote host closed the connection]
<rob_> ah, oops, shouldve used map
havenwood has joined #ruby
<pontiki> blahwoop: it should be binding.pry, not pry.binding
SCHAAP137 has quit [Quit: Leaving]
<pontiki> if you have required pry in your code, binding.pry will give you a really nice pry prompt right at the point and you can inspect the code, step through it, etc.
SCHAAP137 has joined #ruby
<Czechton> hei still haven't had success getting 'require' to work
<Czechton> *i
dkb20k has quit [Ping timeout: 255 seconds]
<Czechton> anyone here a rbenv guru?
<blahwoop> i typed in a variable and it gives me erros
<pontiki> shevy: something sed-like would essentally be #map!, wouldn't it?
<blahwoop> thanks pontiki that did it
<pontiki> shevy: or if simple substitution, #gsub!
<pontiki> Czechton: !rbenv
uber_hulk has joined #ruby
chu has quit [Ping timeout: 272 seconds]
wolf4ood has quit [Quit: (null)]
<pontiki> oh rats, not here...
<pontiki> Czechton: most rbenv problems i've enountered are solved with a rehash
<shevy> pontiki yeah I guess .gsub would be closest
<Czechton> ok i'll try that first
<havenwood> i solved all my rbenv problems by switching to chruby
terlar has joined #ruby
benzrf|offline is now known as benzrf
fantazo has joined #ruby
naturtrunken_m has joined #ruby
josephndenton has joined #ruby
Jake232 has joined #ruby
corehook has joined #ruby
St_Marx has quit [Remote host closed the connection]
naturtrunken_m has quit [Remote host closed the connection]
ta has joined #ruby
kiyote23 has quit [Remote host closed the connection]
<blahwoop> when using pry how can i look inside my array content
<blahwoop> it just gets stuck when i run letter.neighbors
<blahwoop> and i have to cntrl-c out of it
<blahwoop> and it gives me only an array object
<blahwoop> only thing that actually works is letter.name
dcunit3d has joined #ruby
<Czechton> pontiki: that appears to have worked
Megtastique has quit []
tus has quit [Ping timeout: 245 seconds]
IotaSpencer has quit [Quit: ZNC - http://znc.in]
corehook has quit [Ping timeout: 258 seconds]
MattB2 has joined #ruby
<pontiki> Czechton: excellent.
<pontiki> havenwood: same same
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> pontiki: :)
naturtrunken_m has joined #ruby
IotaSpencer has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hanmac has joined #ruby
<pontiki> clients i'm working with right now use rbenv; such a pain, but it's easier for me to accomodate them than vice versa, i suppose :>
<pontiki> they do have a rather nice tool, boxci, for making working with vagrant and ci pretty easy. http://boxci.io
dcunit3d has quit [Ping timeout: 264 seconds]
Areessell has joined #ruby
disKounted has joined #ruby
sski has joined #ruby
<havenwood> ah, neat
rkalfane has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
cmckee has joined #ruby
naturtrunken_m has quit [Remote host closed the connection]
cmckee has quit [Client Quit]
rshetty has quit [Remote host closed the connection]
chu has joined #ruby
dangerousdave has joined #ruby
<Czechton> aha finally
pacMakaveli has quit [Remote host closed the connection]
<Czechton> rbenv is functional
<Czechton> apparently all i had to do was run rbenv rehash
St_Marx has joined #ruby
jimbach has quit [Remote host closed the connection]
yfeldblum has joined #ruby
rtl has quit [Ping timeout: 250 seconds]
<havenwood> rehash is the devil
kireevco has joined #ruby
<havenwood> thought they finally automated that
yfeldblum has quit [Ping timeout: 264 seconds]
mistermocha has joined #ruby
shredding has joined #ruby
mistermocha has quit [Remote host closed the connection]
jheg has quit [Quit: jheg]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lesce has joined #ruby
benzrf is now known as benzrf|offline
Megtastique has joined #ruby
jonr22 has quit [Remote host closed the connection]
nateberkopec has joined #ruby
kyb3r_ has joined #ruby
govg has joined #ruby
diegoviola has joined #ruby
fabrice31 has joined #ruby
tus has joined #ruby
msmith has quit [Remote host closed the connection]
iamjarvo has joined #ruby
russt has quit [Quit: russt]
fabrice31 has quit [Ping timeout: 256 seconds]
gccostabr has joined #ruby
<ght> Question: How do I specify a gemset in a ruby script so that if the script is called by other users, I don't get "file not found" errors on all the require statements?
LudicrousMango has joined #ruby
hmsimha_ has quit [Ping timeout: 255 seconds]
rkalfane has quit [Quit: Textual IRC Client: www.textualapp.com]
AlSquirikou has joined #ruby
reinaldo_ has joined #ruby
nateberkope has joined #ruby
MattB2_ has joined #ruby
RTG has joined #ruby
RTG` has quit [Disconnected by services]
RTG is now known as Guest79317
AlSquirrel has quit [Read error: Connection reset by peer]
nateberkopec has quit [Read error: Connection reset by peer]
greenbagels_ has joined #ruby
chu_ has joined #ruby
reinaldob has quit [Read error: Connection reset by peer]
davidhq_ has joined #ruby
chu has quit [Read error: Connection reset by peer]
buddy_tucker has quit [Remote host closed the connection]
Mateon2 has quit [Read error: Connection reset by peer]
buddy_tucker has joined #ruby
corehook has joined #ruby
Mateon2 has joined #ruby
MattB2 has quit [Ping timeout: 256 seconds]
davidhq has quit [Ping timeout: 256 seconds]
postmodern has joined #ruby
greenbagels has quit [Ping timeout: 264 seconds]
ixti has quit [Ping timeout: 255 seconds]
lesce has quit [Quit: Lost terminal]
Kricir has joined #ruby
olivier_bK has joined #ruby
MattB2_ has quit [Remote host closed the connection]
Tranquility has quit [Quit: Connection closed for inactivity]
Megtastique has quit []
adriancb has joined #ruby
vinleod has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
parabolize has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Unknown2 has quit [Ping timeout: 245 seconds]
AlexRussia has quit [Ping timeout: 245 seconds]
hmsimha_ has joined #ruby
sara-zahrani has quit []
kobain has quit [Ping timeout: 255 seconds]
Narzew has joined #ruby
clauswitt has joined #ruby
Kricir has quit [Remote host closed the connection]
jimbach has joined #ruby
JCii8_ has joined #ruby
despai has joined #ruby
MrIlyas has joined #ruby
Soda has joined #ruby
<zacts> is the book exceptional ruby good?
<shevy> dunno
<shevy> write write write code, that's how you improve the most
<zacts> ah ok
JCii8 has quit [Ping timeout: 244 seconds]
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anaeem1 has quit [Remote host closed the connection]
fedexo has joined #ruby
jimbach has quit [Ping timeout: 258 seconds]
ixti has joined #ruby
<i8igmac> im having a hard time printing the date like this =>2014/11/23-11-14
anaeem1_ has joined #ruby
<i8igmac> %y/%m/%d-%m-%y
anaeem1_ has quit [Read error: Connection reset by peer]
anaeem1_ has joined #ruby
kyb3r_ has quit [Quit: Leaving]
quimrstorres has joined #ruby
<i8igmac> well... im stupid lol
<i8igmac> got it
<airdeluxe> :)
boombadaroomba has joined #ruby
abuzze has quit [Remote host closed the connection]
Kricir has joined #ruby
boombadaroomba has quit [Ping timeout: 250 seconds]
krisquigley has joined #ruby
Prawnzy has joined #ruby
yfeldblum has joined #ruby
james_ has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
james_ is now known as Guest44173
timonv_ has quit [Remote host closed the connection]
AlexRussia has joined #ruby
<shevy> anyone of you heard of "String-Matching-Automatons" before?
Megtastique has joined #ruby
<shevy> don't ask me what it is right now please as I have no idea - youtube is going to become my teacher, apparently
hmsimha_ has quit [Read error: Connection reset by peer]
jamesbrink has quit [Ping timeout: 264 seconds]
maestrojed has joined #ruby
krisquigley has quit [Ping timeout: 272 seconds]
uber_hulk has quit [Quit: leaving]
yfeldblum has quit [Ping timeout: 272 seconds]
hmsimha_ has joined #ruby
reinaldo_ has quit [Remote host closed the connection]
kalusn has quit [Remote host closed the connection]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ght> Question: I'm trying to specify the default gemset when running this ruby script, and it's failing.
kalusn has joined #ruby
<ght> Using RVM to organize gemsets.
<ght> I've tried every damn variation of using shebang /usr/bin/env /path/to/my/rvm/ruby/install
<ght> when other users run the script, it fails when trying to find the require gems.
kayloos has joined #ruby
Takle has quit [Remote host closed the connection]
<ght> I'm using a per-user rvm install
maestrojed has quit [Quit: Computer has gone to sleep.]
<ght> If anyone can help me it would be greatly appreciated
anaeem1_ has quit [Remote host closed the connection]
workmad3 has joined #ruby
dangerousdave has joined #ruby
kalusn has quit [Ping timeout: 255 seconds]
shredding has quit [Quit: shredding]
Kricir has quit [Remote host closed the connection]
<ght> For god's sake.
<ght> This should not be so difficult.
Techguy305|2 has joined #ruby
workmad3_ has joined #ruby
<zacts> ght: you may also try #rvm on freenode
<zacts> but I'm just a newbie, so hopefully someone will help soon
<ght> I tried #rvm, people don't speak for weeks at a time in the channel, and their topic includes a plea for help.
rylev has joined #ruby
<ght> I'm betting off asking here and dealing with the "Try #rvm" comments, as far as I can tell.
<zacts> oh interesting..
<workmad3> ght: you could potentially rely on the auto-switching behaviour of RVM by specifying the gemset in .ruby-gemset
rylev has quit [Read error: Connection reset by peer]
patrick99e99 has joined #ruby
jdj_dk has joined #ruby
<workmad3> ght: but I'd personally be very dubious about trying to specify the gemset directly in a script... I'd suggest either using an RVM wrapper for the script, using a .ruby-gemset file or just telling other users to install the gems and make sure they've got the appropriate gemset enabled
Techguy305 has quit [Ping timeout: 265 seconds]
stevenhaddox has joined #ruby
tectonic has joined #ruby
workmad3_ has quit [Ping timeout: 264 seconds]
stevenhaddox has left #ruby [#ruby]
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
adriancb has quit [Remote host closed the connection]
danijoo has quit [Read error: Connection reset by peer]
Takle has joined #ruby
<ght> How do you go about "using an rvm wrapper for the script"? I tried both .rvmrc and .ruby-version and had issues with both of those.
danijoo has joined #ruby
<workmad3> ght: rvm.io has details on generating wrappers
<ght> Having other users install the gems and switch to the gemset is not pracical in this situation.
chu_ is now known as chu
<workmad3> ght: and .ruby-gemset is neither .rvmrc or .ruby-version ;)
patrick99e99 has quit [Ping timeout: 255 seconds]
<ght> Ok, yes, not sure if I tried that one, let's give it a whirl.
hfp_ has joined #ruby
hfp__work has joined #ruby
<ght> Will using .ruby-gemset allow the application to be executed as a different user?
<ght> The implication that other users can't execute a program coded in ruby without installing all the headers themselves seems a bit silly
hfp has quit [Ping timeout: 240 seconds]
hfp_ is now known as hfp
duplex has quit [Read error: Connection reset by peer]
anaeem1 has joined #ruby
hfp_work has quit [Ping timeout: 256 seconds]
hfp__work is now known as hfp_work
<workmad3> ght: none of these solutions will get around the need for a user with a different ruby install (or on a different machine) to install the gems, and if the gems have a native extension, that will require ruby headers to be available
duplex has joined #ruby
alexherbo2 has joined #ruby
drewvanstone has quit [Ping timeout: 264 seconds]
duplex has quit [Max SendQ exceeded]
_ixti_ has joined #ruby
<workmad3> ght: however, with that said, rvm installs should always have the headers... and you can help on the installation front by using bundler, which will reduce installation down to 'gem install bundler; bundle install;' (assuming you don't have any other libraries that need to be installed for gems to work)
Soda has quit [Remote host closed the connection]
duplex has joined #ruby
kasperti_ has joined #ruby
hfp has quit [Quit: bye]
hfp_work has quit [Quit: bye]
ixti has quit [Ping timeout: 264 seconds]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
tus has quit [Ping timeout: 244 seconds]
hakunin_ has joined #ruby
corehook has quit [Remote host closed the connection]
hfp has joined #ruby
dkb20k has joined #ruby
hfp_work has joined #ruby
jonr22 has joined #ruby
hakunin has quit [Ping timeout: 255 seconds]
nateberkope has quit [Quit: Leaving...]
dkb20k has quit [Ping timeout: 240 seconds]
pandaant has joined #ruby
ctp has joined #ruby
jonr22 has quit [Ping timeout: 244 seconds]
Macaveli has joined #ruby
TripTastic has left #ruby ["Leaving"]
ReRixo has quit [Ping timeout: 264 seconds]
sski has quit [Remote host closed the connection]
sski has joined #ruby
dangerousdave has quit [Ping timeout: 265 seconds]
freerobby has quit [Quit: Leaving.]
sski has quit [Ping timeout: 244 seconds]
yeticry has quit [Ping timeout: 244 seconds]
ferri has quit [Remote host closed the connection]
yeticry has joined #ruby
<ght> workmad3: The wrapper worked, thank you sir.
jimbach has joined #ruby
jaxxstorm has joined #ruby
<blahwoop> https://gist.github.com/iRichLau/c9d9461bc3076ac41795 i am having a problem with this recursion
<blahwoop> can anyone help me?
tectonic has quit []
<blahwoop> im only getting one layer of letters
s00pcan has quit [Ping timeout: 240 seconds]
<Areessell> You should be using an `#each` look rather than a `for` loop
<Areessell> loop*
<blahwoop> yeah i will change that
Takle_ has joined #ruby
<Areessell> Methods should be returning something
<Areessell> What is `results`?
<blahwoop> results is Set
jaxxstorm has quit [Client Quit]
<blahwoop> its a recursive method
dcunit3d has joined #ruby
<blahwoop> that goes through all the letters and finds all the possible words by going through it's neighbors
Takle has quit [Ping timeout: 258 seconds]
<Areessell> I've noticed. How about sharing the whole class so this isn't completely out of context?
jaxxstorm has joined #ruby
<blahwoop> ok
s00pcan has joined #ruby
Cache_Money has joined #ruby
<blahwoop> thanks dude
<blahwoop> u can clone it and run it
papercode has quit [Quit: WeeChat 0.4.3]
<blahwoop> it's that little bit i can't seem to get
papercode has joined #ruby
fabrice31 has joined #ruby
<Areessell> I'm seeing alot of stuff wrong so I'm just gonna list em
<workmad3> ah, the traditional recursive countdown solver...
<workmad3> or is this one scrabble? :)
gsd has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
dcunit3d has quit [Ping timeout: 265 seconds]
<blahwoop> boggle
kayloos has quit [Remote host closed the connection]
kalusn has joined #ruby
jdj_dk has quit [Read error: Connection reset by peer]
<blahwoop> lots of stuff wrong with the whole thing? or just the method lol
jdj_dk has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
grzywacz has joined #ruby
grzywacz has joined #ruby
gsd has quit [Read error: Connection reset by peer]
gsd has joined #ruby
timonv_ has joined #ruby
<blahwoop> lol that bad Areessell
lemur has joined #ruby
<Areessell> Not lots of things actually. Dictionary#initalize opens a File IO but doesn't close it. Dictonary#possible_word? will return a String unless the condition is met.
<Areessell> Naw trying to figure out the problem with the recursive method
arup_r has quit [Quit: Leaving.]
<Areessell> A little messy, but the logic is there
<blahwoop> o gotta close it
kalusn has quit [Ping timeout: 250 seconds]
<Areessell> Or but the `each_line` line within a block: File.open('foo.txt') { |file| ... }
henesy has quit [Ping timeout: 258 seconds]
<Areessell> Fix that `possible_word?` method and see if that fixes it
<blahwoop> words.select { |prefix| prefix =~ /^#{word}/ }.empty? ? false : true
<blahwoop> good?
<Areessell> Just simply: words.select { |prefix| prefix =~ /^#{word}/ }.empty?
<blahwoop> if its empty it's not a possible word
<Areessell> #empty? already returns true/false =)
<Areessell> Oh invert it
quimrstorres has quit [Remote host closed the connection]
<Areessell> !words.select { |prefix| prefix =~ /^#{word}/ }.empty?
<Areessell> Or even: words.any? { |prefix| prefix =~ /^#{word}/ }
<blahwoop> that helps a bit. but i still goes through b bg
<blahwoop> bgi
<Areessell> Huh?
<blahwoop> it should be kicked out if bg is not any possiblity
<shevy> you can do so. you have .select, and you have .reject
<blahwoop> but it still checks bgih
kalusn has joined #ruby
<Areessell> Are you sure Board#set_neighbors is doing it's job correctly?
<shevy> and you can negate a regex too, by doing !~
<blahwoop> yup
<blahwoop> im pretty sure
rdark has quit [Quit: leaving]
<blahwoop> im going nuts
<Areessell> Recursion will do that do that do that
<workmad3> In order to understand recursion, you must first understand recursion
<blahwoop> recursionz
<blahwoop> i rather have 10000 if statements
<Areessell> No, you wouldn't, trust meh
Juanchito has joined #ruby
<shevy> recursion for a method is to call itself, until it has finished processing its task
<Areessell> send gist of output of `letter.unused_neighbors`
<blahwoop> in where?
<blahwoop> inside the loop?
<Areessell> in `def something`
<Areessell> It seems like that resulting Array is empty, so it wont recurse
timonv_ has quit [Ping timeout: 272 seconds]
<blahwoop> any way to puts the content of an array
<blahwoop> inspect poops it
eguneys has quit [Quit: ERC (IRC client for Emacs 25.0.50.1)]
<Areessell> Just use `p`
<blahwoop> tried that but it gets stuck
<blahwoop> it hangs
<blahwoop> should i just do a count
<Areessell> Then it must be resursing indefinitely
<Areessell> Just comment everything out un `def something` and replace with `p board.letters.sample.unused_neighbors`
<Areessell> These are the reasons why we do Test Driven Development.
hiyosi has quit [Ping timeout: 265 seconds]
byprdct has joined #ruby
<blahwoop> TDD is a friend
<Areessell> Why not make some tests, then?
FooMunki has quit [Read error: No route to host]
parabolize has joined #ruby
bmichelsen has joined #ruby
<blahwoop> still giving me inspect errors
FooMunki has joined #ruby
nrsk has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<shevy> blahwoop
<shevy> do
<shevy> require 'pp'
<shevy> then
<Areessell> Dude, we're inspecting a part of the code that is irrelevent to the recursion right now. Comment out anyhting doing recursion and `p` that
<shevy> pp your_array
<Areessell> We are literally just inspecting the array of neighbor letters itself.
anaeem1 has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
<shevy> he is having difficulties with the basics in ruby
elaptics is now known as elaptics`away
elaptics`away is now known as elaptics
jimbach has quit [Remote host closed the connection]
<Areessell> A little bet but his code looks like he's been programming Ruby for a bit, at least.
anaeem1_ has quit [Read error: Connection reset by peer]
anaeem1_ has joined #ruby
nrsk has joined #ruby
<blahwoop> yeah it's just getting stuck
<blahwoop> i tried the pp but it just keeps going
workmad3 has quit [Ping timeout: 244 seconds]
<blahwoop> is my unused_neighbor method messed up
nrsk has quit [Client Quit]
Jackneill has quit [Ping timeout: 250 seconds]
Techguy305|2 has quit [Ping timeout: 244 seconds]
<Areessell> Probably, push your changes so I can see
banister has joined #ruby
banister has quit [Max SendQ exceeded]
amundj has joined #ruby
amundj has quit [Client Quit]
banister has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
banister has quit [Max SendQ exceeded]
<Areessell> That tells me absolutely nothing
chipotle has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
krisquigley has joined #ruby
freerobby has joined #ruby
banister has joined #ruby
<Areessell> It has neighbors, but what are they? And is the unused neighbors method working? What is the values of `name` and `unused` instance variables on the neighbors? You know? Just push the new code
<blahwoop> pushed up the newest
<blahwoop> neighbors are letter objects
<Areessell> Yeah. I know...
<blahwoop> lol
<blahwoop> sorry a bit fried
yfeldblum has joined #ruby
kasperti_ has quit []
chipotle has quit [Ping timeout: 264 seconds]
marcdel has quit []
einarj has joined #ruby
MattB2 has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
airdeluxe has left #ruby ["Leaving"]
PR0C3SS has joined #ruby
einarj has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
PR0C3SS has quit [Remote host closed the connection]
einarj has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
weemsledeux has joined #ruby
henesy has joined #ruby
lw has quit [Quit: s]
mois3x has joined #ruby
lemur has quit [Read error: Connection reset by peer]
lemur has joined #ruby
<Areessell> Dunno man, it looks okay to me save for being a bit messy like I said.
<Areessell> Can't find any glaring reason why it wouldn't work.
<blahwoop> right?
Unknown2 has joined #ruby
<Areessell> Definitely make tests and try test driven devlopment instead (write tests before the implementation)
danijoo has quit [Read error: Connection reset by peer]
<blahwoop> weird
<blahwoop> alright man. thanks though
danijoo has joined #ruby
<blahwoop> it's a head scratcher
codecop has quit [Ping timeout: 272 seconds]
havenwood has quit [Remote host closed the connection]
jonr22 has joined #ruby
<blahwoop> the outputs are wrong right?
nucatus has joined #ruby
marcdel has joined #ruby
<Areessell> I dunno, I havn't ran it
codecop has joined #ruby
<Areessell> Tests would determine that.
<blahwoop> oh ok
<blahwoop> thanks dude appreciate the hell
<blahwoop> help
dts has quit [Ping timeout: 244 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kireevco has quit [Quit: Leaving.]
dc_ has joined #ruby
<wasamasa> I appreciate hell, too
josephndenton has quit [Ping timeout: 255 seconds]
kaiwren has joined #ruby
JCii8 has joined #ruby
NoNMaDDeN has quit [Remote host closed the connection]
blackmesa has joined #ruby
dc_ has quit [Ping timeout: 240 seconds]
JCii8_ has quit [Ping timeout: 244 seconds]
relix has joined #ruby
krisquigley has quit [Remote host closed the connection]
krisquigley has joined #ruby
ctp has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby
<blahwoop> lol
mikepack has quit [Remote host closed the connection]
NoNMaDDeN has joined #ruby
krisquigley has quit [Ping timeout: 264 seconds]
giuseppesolinas has joined #ruby
shredding has joined #ruby
jdj_dk has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 255 seconds]
kaiwren has quit [Read error: Connection reset by peer]
jlast has quit [Remote host closed the connection]
xiq has joined #ruby
codecodecode123 has quit [Ping timeout: 246 seconds]
Macaveli has quit [Ping timeout: 255 seconds]
kaiwren has joined #ruby
quimrstorres has joined #ruby
jheg has joined #ruby
spastorino has joined #ruby
jheg has quit [Client Quit]
hiyosi has joined #ruby
jimmyy has joined #ruby
pen has quit [Remote host closed the connection]
jonr22 has quit [Remote host closed the connection]
pen has joined #ruby
<parabolize> blahwoop: check out set_grid
<blahwoop> sup bro
patrick99e99 has joined #ruby
<parabolize> >> (['a', 'b'] * '').scan(/..../)
<eval-in__> parabolize => [] (https://eval.in/225487)
dkb20k has joined #ruby
<blahwoop> i made it into one big string
havenwood has joined #ruby
<parabolize> err
hiyosi has quit [Ping timeout: 244 seconds]
<parabolize> >> 'ab'.scan(/..../)
<eval-in__> parabolize => [] (https://eval.in/225488)
<Areessell> 'test'.scan(/..../)
<Areessell> >> 'test'.scan(/..../)
<eval-in__> Areessell => ["test"] (https://eval.in/225490)
jonr22 has joined #ruby
<Areessell> >> 'test'.scan(/.{4}/)
<eval-in__> Areessell => ["test"] (https://eval.in/225491)
pen has quit [Ping timeout: 255 seconds]
<Areessell> looks like hes gathering every 4 letters and splitting them
<parabolize> oh, guess I should have used more letters >.<
<blahwoop> yeah [[a,b,c,d],[e,f,g,h]]
NoNMaDDeN has quit [Remote host closed the connection]
<blahwoop> its somsething in make_words
<havenwood> blahwoop: `letters.join` is nicer than `letters * ""`
wolf4ood has joined #ruby
<blahwoop> yup just changed that
<blahwoop> thanks
<Areessell> I would do something like this, prolly a better way but meh: "testing12345".chars.each_slice(4).to_a
patrick99e99 has quit [Ping timeout: 256 seconds]
<havenwood> why turn it into a string in the first place?
freerobby has quit [Quit: Leaving.]
dkb20k has quit [Ping timeout: 265 seconds]
<Areessell> lol right even better. I only looked at that line not the context it was in.
benzrf|offline is now known as benzrf
olivier_bK has quit [Ping timeout: 265 seconds]
jonr22 has quit [Ping timeout: 264 seconds]
timonv_ has joined #ruby
lidaaa has joined #ruby
NoNMaDDeN has joined #ruby
<blahwoop> so i can put it into 2d array
<Areessell> Right, so
<Areessell> >> letters = "asjdfberhsdbfdkgjsgbdjksgf"; letters.each_slice(4).to_a
<eval-in__> Areessell => undefined method `each_slice' for "asjdfberhsdbfdkgjsgbdjksgf":String (NoMethodError) ... (https://eval.in/225492)
<Areessell> Er..
<Areessell> >> letters = "asjdfberhsdbfdkgjsgbdjksgf".chars; letters.each_slice(4).to_a
<eval-in__> Areessell => [["a", "s", "j", "d"], ["f", "b", "e", "r"], ["h", "s", "d", "b"], ["f", "d", "k", "g"], ["j", "s", "g", "b"], ["d", "j", "k", "s"], ["g", "f"]] (https://eval.in/225493)
<Areessell> Only instead of actual Strings containing the letter, you'd have Letter instances where the name is letter
<blahwoop> yeah
LudicrousMango has quit [Remote host closed the connection]
<blahwoop> and the letter has a name and neighbors
<blahwoop> and if its used or not
siso has joined #ruby
<blahwoop> i just can't get it to work
<Areessell> Yeah, we were just talking about the splitting part
<parabolize> >> (['a', 'b', 'c', 'd'] * '').scan(/..../).map {|c| c.split ''}
<eval-in__> parabolize => [["a", "b", "c", "d"]] (https://eval.in/225494)
despai has quit [Quit: This computer has gone to sleep]
<havenwood> >> ['a', 'b', 'c', 'd'].each_slice(4).to_a
<eval-in__> havenwood => [["a", "b", "c", "d"]] (https://eval.in/225495)
<havenwood> it's already an Array
Mongey has joined #ruby
<blahwoop> no need to string it
<havenwood> >> ?a.upto(?f).each_slice(4).to_a
<eval-in__> havenwood => [["a", "b", "c", "d"], ["e", "f"]] (https://eval.in/225496)
<blahwoop> sweet
timonv_ has quit [Ping timeout: 265 seconds]
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<blahwoop> thanks!
jlast has joined #ruby
<blahwoop> now if it could only just work
<Areessell> Have you tried standing at a crossroad and striking a deal with the devil?
<Areessell> You could have played so many games of boggle by now =x
nucatus has quit [Remote host closed the connection]
<blahwoop> exactly
<blahwoop> it's a code challlenge for a job. so i guess i wont get the job
noway_ has joined #ruby
<Areessell> Instead of setting the neighbors, why not have a get_neighbors(letter) method that finds based on that letter's X/Y indicies?
fabrice31 has joined #ruby
ht__th has quit [Remote host closed the connection]
<havenwood> blahwoop: what's the challenge?
<Areessell> for example, if my letter is a 2,2, it's neighbors would be at 1,2 - 2,3 - 3,2 - etc
despai has joined #ruby
<blahwoop> build a boggle that outputs all the words
<havenwood> what's a boggle?
<Areessell> You've never played Boggle?
<blahwoop> yeah i should do that
<havenwood> Areessell: nope, should i?
jlast has quit [Ping timeout: 258 seconds]
<Areessell> It's like an 8x8 grid of letters and you set a timer, Then you come up with all words that connect
<havenwood> looking at the wikipedia now
<blahwoop> 4x4
siso_ has joined #ruby
siso has quit [Ping timeout: 272 seconds]
siso_ is now known as siso
<blahwoop> hey Areessell can it be that when i set the used to true/false it's messing up there?
<blahwoop> or im not making new words
<Areessell> [[?h, ?t, ?o],[?e, ?y, ?l]] would return ["hey", "lot", ... ]
<Areessell> Nope, that seems fine to me
jonr22 has joined #ruby
weemsledeux has joined #ruby
<Areessell> Ah wait a sec
fabrice31 has quit [Ping timeout: 256 seconds]
<blahwoop> show me the light!
m8 has quit [Quit: Sto andando via]
anaeem1_ has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
anaeem1_ has joined #ruby
<Areessell> When you're setting it to false, it would recurse back to the letter you were just on after moving on to the neighbor... I think
<Areessell> What's the problem again? Does it loop indefinitely or what? Show us the terminal output of your code in a gist
<havenwood> >> Array.new(4) { Array.new(4) { [*'a'..'z'].sample } }
<eval-in__> havenwood => [["y", "r", "d", "f"], ["t", "x", "e", "r"], ["b", "q", "p", "x"], ["f", "w", "w", "f"]] (https://eval.in/225498)
jlast has joined #ruby
jimmyy has quit [Ping timeout: 264 seconds]
Photism has quit [Quit: Leaving]
msmith has joined #ruby
<Areessell> red, rex, ... That's a terrible board =|
<havenwood> >> Array.new(4) { [*'a'..'z'].sample 4 }
<eval-in__> havenwood => [["t", "b", "i", "j"], ["c", "x", "n", "u"], ["p", "e", "q", "w"], ["b", "g", "x", "m"]] (https://eval.in/225499)
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
<Areessell> bin, bine, bing
<havenwood> bine/.
<Areessell> I dunno, I might be cheating with that one
MattB2 has quit [Remote host closed the connection]
bmichelsen has quit [Quit: ZZZzzz…]
anaeem1_ has quit [Ping timeout: 264 seconds]
<Areessell> blahwoop: It really looks like your Board#set_neighbors isn't setting up the right neighbors. I would definitly use a Board#get_neighbor(letter) or Board#get_neighbot(x_index, y_index) method
freerobby has joined #ruby
<blahwoop> get neighbor
<Areessell> Right like I said before, it would return the letters in the matrix based on the x/y indicies of the given letter
<Areessell> "for example, if my letter is at 2,2, it's neighbors would be at 1,1 - 1,2 - 1,3 - 2,1 - 2,3 - 3,1 - 3,2 - 3,2"
henesy has quit [Ping timeout: 264 seconds]
<Areessell> Er that last one is supposed to be 3,3
tus has joined #ruby
<blahwoop> still have to somehow mark them as being used
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
<Areessell> It looks like it's doing that, but isn't getting the correct neighbors.
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoviola has quit [Remote host closed the connection]
<blahwoop> ok
tejas-manohar has joined #ruby
<tejas-manohar> do ppl use this channel or #ruby-lang more
<havenwood> tejas-manohar: this channel is a bit more active
sea_local has joined #ruby
MattB2 has joined #ruby
claudiuinberlin has joined #ruby
dcunit3d has joined #ruby
<havenwood> blahwoop: you could go through each word in the dictionary and try to find it ;O
<blahwoop> probably the best way
<havenwood> blahwoop: that almost seems easier to me on first impression than trying partials over and over
claudiuinberlin has left #ruby [#ruby]
duncannz has joined #ruby
bmichelsen has joined #ruby
<Areessell> His is a more elegant solution and would work nicely
relix has joined #ruby
<Areessell> I would hire the guy who wrote this rather than the guy who just loops through the whole dictionary for every permutation of letters
<blahwoop> lol
jimbach has joined #ruby
<blahwoop> so i take in a word. see if it's inside the grid
RoxasShadowRS has joined #ruby
<blahwoop> if not throw it away
<blahwoop> if it does check the next one and see if it's a neighbor
<blahwoop> if its not then throw it away
<tejas-manohar> https://github.com/tj/commander/issues/82 -- anyone got an idea on this?
<Areessell> No dude. Your solution is better
ColloquyUser has joined #ruby
<blahwoop> oh lol
dcunit3d has quit [Ping timeout: 256 seconds]
<tejas-manohar> That issue is more of a question, maybe someone here has an answer?
<Areessell> Never even heard of commander before, I've always used Thor
pen has joined #ruby
<blahwoop> i was really hoping my way would work with the neighbors
<Areessell> It still can only instead of Letters knowing their neighbors, the board does. That makes more sense anyways
jimbach has quit [Ping timeout: 258 seconds]
anaeem1_ has joined #ruby
<blahwoop> true
<tejas-manohar> Areesell: ok thats what i heard from a friend maybe its best i just switch lol
<Areessell> Try it out, it looks similar
hmsimha_ has quit [Read error: Connection reset by peer]
kobain has joined #ruby
<tejas-manohar> Areessell: wow i feel this is waaay too complex for simple interfaces -- do you have any idea on my actual issue tho
buddy_tucker has quit [Read error: Connection reset by peer]
<Areessell> It's not complex at all. It looks pretty much the same to me..
buddy_tucker has joined #ruby
<Areessell> And no, it looks like a Commander bug
<tejas-manohar> Areessell: example small apps built with thor on github? easy for me to start by looking at examples
ColloquyUser has quit [Remote host closed the connection]
hamakn has quit [Remote host closed the connection]
<havenwood> tejas-manohar: just need option parsing?
<havenwood> tejas-manohar: check out slop: https://github.com/leejarvis/slop#readme
benzrf is now known as benzrf|offline
<Areessell> Slop is excellent as well
<Areessell> Also supports commands
hmsimha_ has joined #ruby
<tejas-manohar> havenwood: Areessell: o ok not just option parsing, commands as well
hamakn has joined #ruby
<tejas-manohar> Areessell: have any of those sample apps? havenwood: you have any sample apps i can look at for slop?
parabolize has quit [Ping timeout: 240 seconds]
kalusn has quit []
wolf4ood has quit [Quit: (null)]
<tejas-manohar> Aressell: no i meant sample apps built w/ slop
<tejas-manohar> that i can look at
chrishough has joined #ruby
<tejas-manohar> often ive found when ppl suggest things to me they've used it and can show some sample on gh or something Aressell: havenwood:
krisquigley has joined #ruby
claudiuinberlin has joined #ruby
MrIlyas has quit [Ping timeout: 265 seconds]
blahwoop has quit [Remote host closed the connection]
<tejas-manohar> still no but whatever man, if you gotta be rude welp
krisquigley has quit [Ping timeout: 265 seconds]
shredding has quit [Quit: shredding]
<havenwood> tejas-manohar: Pry was the first thing I thought of, but not really a nice simple example.
<tejas-manohar> havenwood: yea, p big was thinking for something small but its ok
adriancb has joined #ruby
mistermocha has joined #ruby
parabolize has joined #ruby
<tejas-manohar> its fine
terlar has quit [Ping timeout: 265 seconds]
parzzix has quit [Remote host closed the connection]
<tejas-manohar> general ruby question
<tejas-manohar> havenwood: <Commander::Command::Options g=true> --> commander or not, general ruby question, how to parse the commands used from that
<tejas-manohar> p options results in that
<havenwood> tejas-manohar: i've never used commander so i'm not at all familiar
<tejas-manohar> oh
<tejas-manohar> thats not a ruby object or anything?
<havenwood> lemme take a look, no clue
tomeara has joined #ruby
adriancb has quit [Ping timeout: 240 seconds]
<tejas-manohar> havenwood: btw it returns like this -- <Commander::Command::Options g=true b=true lol=true whateverflag=true>
<tejas-manohar> doesnt ever put false there, just shows the ones used like -g -b --lol --whateverflag
<havenwood> tejas-manohar: yeah, so -t is just hardcoded to --trace, like -v and -h are hardcoded to --version and --help: https://github.com/tj/commander/blob/master/lib/commander/runner.rb#L60
tomeara has quit [Client Quit]
<havenwood> tejas-manohar: I think your issue is a dup of #23.
<tejas-manohar> havenwood: oh
ColloquyUser has joined #ruby
ColloquyUser has quit [Remote host closed the connection]
LudicrousMango has joined #ruby
<havenwood> tejas-manohar: since that issue is four years old, i'd guess either fix it in a fork of commander or yeah use something like slop instead
<tejas-manohar> havenwood: yeah i guess thats not really an issue, just set @never_trace to true
<havenwood> mm
anaeem1_ has quit [Remote host closed the connection]
<havenwood> tejas-manohar: that should work :)
ColloquyUser has joined #ruby
anaeem1_ has joined #ruby
<tejas-manohar> havenwood: http://pastebin.com/KdffW5HE still does the trace=true thing
despai has quit [Quit: This computer has gone to sleep]
<havenwood> oh, nvm
<tejas-manohar> havenwood: ?
<havenwood> tejas-manohar: linked wrong line and not right anyways, all sorts of fail :P
drewvanstone has joined #ruby
<havenwood> tejas-manohar: yeah, i dunno - but they do hijack those flags
<tejas-manohar> havenwood: do i needa fork this gem and then fix that and install from that
<havenwood> tejas-manohar: I'd just slop, it's easy.
<tejas-manohar> havenwood: fixed it my man
<tejas-manohar> havenwood: added never_trace! above my code
<havenwood> tejas-manohar: what'd ya do?
<havenwood> tejas-manohar: ahha
<havenwood> tejas-manohar: nice, happy hacking!
<tejas-manohar> havenwood: lol thanks, but do you know how to parse <Commander::Command::Options t=true>
<havenwood> hah, no
<tejas-manohar> to just get the options used like t
<tejas-manohar> aw
<tejas-manohar> i'd just use string parsing on that?
<tejas-manohar> like regex
<tejas-manohar> ?
rixius has joined #ruby
rixius is now known as Guest697
anaeem1_ has quit [Ping timeout: 255 seconds]
<havenwood> maybe i'll read commander's code later, but at the moment i don't know!
<tejas-manohar> havenwood: but isn't receiving something like <Commander::Command::Options t=true> not commander-specific and ruby in general? is this some rb object? or is this arbitrary string?
<tejas-manohar> ok
<tejas-manohar> np
<tejas-manohar> foudn it
hamakn has quit [Remote host closed the connection]
<tejas-manohar> havenwood: lol wtf why dont they just return an array
chrisja has joined #ruby
msmith has quit [Remote host closed the connection]
<tejas-manohar> havenwood: any idea on that part of the codebase? once i figure out this, its all straight ruby no more commander lol
jimmyy has joined #ruby
mistermocha has quit [Remote host closed the connection]
adriancb has joined #ruby
* apeiros is tempted to kick tejas-manohar for cross-posting.
<tejas-manohar> apairos: cross-posting?
sea_local has quit [Remote host closed the connection]
<apeiros> also for nick-mutilation.
<tejas-manohar> apairos: I moved away from #ruby-lang cuz i realized no one was there
<tejas-manohar> apeiros: nick-mutilation? wtf
<apeiros> tejas-manohar: then tell them instead of being an asocial dick.
freerobby has quit [Quit: Leaving.]
<apeiros> tejas-manohar: congrats. you finally managed to spell my nick correctly.
<tejas-manohar> apeiros: ok lol
davasaurous has joined #ruby
Mateon2 has quit [Ping timeout: 255 seconds]
jimmyy has quit [Remote host closed the connection]
ColloquyUser has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
Axy has joined #ruby
jimmyy has joined #ruby
Mia has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
jimmyy has quit [Max SendQ exceeded]
jimmyy has joined #ruby
sea_local has joined #ruby
jimmyy has quit [Max SendQ exceeded]
josephndenton has joined #ruby
davasaurous has quit [Remote host closed the connection]
ReRixo has joined #ruby
oleo has quit [Ping timeout: 256 seconds]
jimmyy has joined #ruby
<tejas-manohar> apeiros: that said any idea how to parse commander's response like "<Commander::Command::Options t=true, m=true>" i wanna get the options out of it like t, m (btw it comes from https://github.com/tj/commander/blob/master/lib/commander/command.rb#L33 in the gem's source)
sea_local has quit [Remote host closed the connection]
hamakn has joined #ruby
mistermocha has quit [Client Quit]
oleo has joined #ruby
<apeiros> just call the methods with the name of the option. cmd.t # => true
<havenwood> tejas-manohar: look at the method above the one you linked
<havenwood> er
<havenwood> yeah, i need to actually read this source to comment
<havenwood> and more coffee
<apeiros> see __hash__ and method_missing
<havenwood> ^
tier has joined #ruby
<tejas-manohar> oh hmmm
<havenwood> slop :P
<tejas-manohar> lol
<tejas-manohar> once i get this part im done w/ commander stuff, i just wanna finish it first ;P
davasaurous has joined #ruby
workmad3 has joined #ruby
hamakn has quit [Ping timeout: 250 seconds]
* havenwood goes in search of sorely needed coffee
<havenwood> getting a headache
<tejas-manohar> lol im sry
lolmaus has quit [Quit: Konversation terminated!]
diegoviola has joined #ruby
mikepack has joined #ruby
<havenwood> tejas-manohar: lack of coffee's fault not youres
havenwood has quit []
<tejas-manohar> apeiros: i looked at that code, still can't get the options printing
Prawnzy has quit [Remote host closed the connection]
josephndenton has quit [Ping timeout: 264 seconds]
mengu has quit [Remote host closed the connection]
<tejas-manohar> apeiros:i tried p @table got nothing :(
workmad3 has quit [Ping timeout: 272 seconds]
<tejas-manohar> apeiros: sorry didnt ping correctly last time
mikepack has quit [Ping timeout: 245 seconds]
crazydiamond has quit [Ping timeout: 244 seconds]
tus has quit [Ping timeout: 265 seconds]
<tejas-manohar> ill just do a does string contain substring thing
Xeago has joined #ruby
jimbach has joined #ruby
josephndenton has joined #ruby
kaiwren has quit [Quit: kaiwren]
hiyosi has joined #ruby
henesy has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tejas-manohar> hey guys
<tejas-manohar> http://pastebin.com/bsv0ayaT -- for options="<Commander::Command::Options t=true, m=true>" -- how does this not work?
tastycode has joined #ruby
<tejas-manohar> i get no output
<tejas-manohar> i expect puts 'invalid options'
* Radar suggested using Thor almost an hour ago now
<Radar> #justsayin
JCii8_ has joined #ruby
dkb20k has joined #ruby
hiyosi has quit [Ping timeout: 245 seconds]
nuck has quit [Quit: Nuck Off]
rabbitdew has joined #ruby
kirun has quit [Quit: Client exiting]
einarj has quit [Remote host closed the connection]
havenwood has joined #ruby
bobdobbs` has joined #ruby
JCii8 has quit [Ping timeout: 244 seconds]
crazydiamond has joined #ruby
<tejas-manohar> Radar: this s gneral ruby im strugglign w/ now, nothin to do with commander afaik
dkb20k has quit [Ping timeout: 256 seconds]
<Radar> ok then
<havenwood> tejas-manohar: to me it seems like you're dealing with commander specific issues
<tejas-manohar> oh
<bobdobbs`> I'm using rbenv, and I've got a project that requires 1.9.3-p551. However, if I do 'rbenv install -l', I don't see that version. Does this mean that I have to remove rbenv and install rvm to get access to that version?
Musashi007 has joined #ruby
<havenwood> bobdobbs`: update ruby-build
<havenwood> bobdobbs`: rbenv installs rubies with ruby-build, whose definitions are updated with new ruby releases
timonv_ has joined #ruby
<bobdobbs`> hmmm
<bobdobbs`> thanks
<tejas-manohar> havenwood: wait this is a commander-specific issue? https://github.com/tejas-manohar/1-1/blob/master/ifttt.rb#L24
<tejas-manohar> havenwood: all that outputs is <Commander::Command::Options t=true, m=true>
<tejas-manohar> havenwood: for ./ifttt.rb create -t -m frontend
<havenwood> bobdobbs`: you can also install rubies for rbenv with ruby-install, e.g.: https://github.com/postmodern/ruby-install#integration
rabbitdew has quit [Ping timeout: 256 seconds]
claudiuinberlin has left #ruby [#ruby]
<havenwood> tejas-manohar: though i've now had coffee the caffeine hasn't hit me yet
<tejas-manohar> havenwood: ok l0l
jlast has quit [Remote host closed the connection]
nucatus has joined #ruby
mary5030 has joined #ruby
timonv_ has quit [Ping timeout: 264 seconds]
codecop has quit [Remote host closed the connection]
patrick99e99 has joined #ruby
mary5030_ has joined #ruby
Joufflu has joined #ruby
Guest44173 has quit [Remote host closed the connection]
JCii8_ has quit [Ping timeout: 244 seconds]
fabrice31 has joined #ruby
nucatus has quit [Ping timeout: 250 seconds]
mary5030 has quit [Ping timeout: 258 seconds]
xiq has quit [Remote host closed the connection]
patrick99e99 has quit [Ping timeout: 255 seconds]
bmichelsen has quit [Quit: ZZZzzz…]
workmad3 has joined #ruby
workmad3 has quit [Client Quit]
siso has quit [Ping timeout: 272 seconds]
davasaurous has quit [Remote host closed the connection]
freerobby has joined #ruby
josephndenton has quit [Ping timeout: 256 seconds]
davasaurous has joined #ruby
kobain has quit [Ping timeout: 255 seconds]
JCii8 has joined #ruby
mengu has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
lemur has quit [Remote host closed the connection]
mjuszczak has joined #ruby
lemur has joined #ruby
RoxasShadowRS has quit [Quit: Leaving]
workmad3 has joined #ruby
<ght> Question: For testing purposes, I'm attempting to run a ruby program I wrote from rails console.
<ght> The external ruby program is on another user account and uses its own rvm install, with its own gemset
<ght> As recommended earlier, I have used rvm wrappers to ensure that, if called from the shell of another user, the ruby application uses the proper gemset.
<zenspider> I already answered this
<ght> Did you? Well, it works from the shell.
AlSquirikou has quit [Quit: This computer has gone to sleep]
<ght> from another user account.
russt has joined #ruby
iamjarvo has joined #ruby
<ght> So if you recommended that, thank you.
josephndenton has joined #ruby
lemur has quit [Ping timeout: 258 seconds]
<ght> However, if I launch the darn wrapper from rails console on another user account, it fails; says it's looking for rake.
sevenseacat has joined #ruby
mengu has quit [Ping timeout: 255 seconds]
<zenspider> then you're not "launching"
freerobby has quit [Quit: Leaving.]
charliesome has joined #ruby
siso has joined #ruby
<ght> By "launch" I mean "execute", in case that's now clear.
<ght> I've tried utilizing system, backticks, and %w
iamjarvo has quit [Client Quit]
bmichelsen has joined #ruby
adriancb has quit [Remote host closed the connection]
<ght> however, if I'm not in rails console and simply at the other user's shell, it executes fine, which it did not do prior to deploying the recommended rvm wrapper.
workmad3_ has joined #ruby
Narzew has quit [Quit: Wychodzi]
davasaurous has quit [Remote host closed the connection]
<ght> Prior to that it would give "not found" errors for the various gems, so, the wrapper appears to be working, it just doesn't work from within a seperate rails environment.
LudicrousMango has quit [Remote host closed the connection]
jimmyy has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 256 seconds]
workmad3_ has quit [Client Quit]
jimbach has quit [Remote host closed the connection]
workmad3 has joined #ruby
ColloquyUser has joined #ruby
<ght> I suppose there's no way around this? I'd have to add all the gems of the rails project to the seperate app's gemset?
<ght> Cause right now it appears to be looking for the rails project gems when executing the seperate app.
krzbrg has joined #ruby
<Areessell> I'm not 100% sure what your problem is, but that might help
henesy has quit [Ping timeout: 264 seconds]
<Areessell> Oh just reread.. nvm
aspires has joined #ruby
<zenspider> I really dislike repeating myself, esp from less than 17 hours ago...
<zenspider> so, I'm gonna go get a cappuccino instead
tier has quit [Remote host closed the connection]
henesy has joined #ruby
<ght> The great zenspider has left the building.
<ght> Anyone else?
krzbrg has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
hamakn has joined #ruby
<sevenseacat> not gemsets again
_honning_ has quit [Ping timeout: 256 seconds]
<havenwood> ght: why do you have gemsets?
dc_ has joined #ruby
henesy has quit [Ping timeout: 244 seconds]
hamakn has quit [Ping timeout: 240 seconds]
<ght> Why do I have gemsets? Well, I've only been deving in Ruby for a coupld years, but originally, I did system-wide rvm deployments, then had gemsets for individual projects. Now, I do per-user rvm deployments so I can switch between ruby versions if needed, and I just use the stock default gemset.
krzbrg has joined #ruby
<havenwood> ght: are you familiar with bundler?
<ght> The thing is, I"m not using anything other than the default gemset on the per-user rvm deployment. It's just two different users on the same host, one has a standalone ruby app, the other has a rails 4.0.x instance.
ColloquyUser has quit [Remote host closed the connection]
Akuma has quit [Ping timeout: 240 seconds]
<ght> Yes, I use budler with rails regularly, of course. Not an expert outsode of using it within a rails environment, however.
ColloquyUser has joined #ruby
<ght> My app runs fine on user1, it's using a per-user rvm instance, and gems are installed to the default gemset for that rvm instance
<ght> on user2, I have anotehr per-user rvm instance, and I've got rails 4.0.x deployed, and on user2, I need to be able to call the standalone ruby app on user1.
<havenwood> ght: seems like a good question for #RVM
<ght> Now thanks to someone's suggestion in here, I now can from the shell thanks to rvm wrappers.
<tejas-manohar> havenwood: any idea about writing json to a file in ruby?
<ght> Yes, #rvm would be the logical choice, but alas, people don't talk for weeks at a time in #rvm, and their topic includes a plea for help.
<havenwood> tejas-manohar: Serialize to JSON and write to file?
<tejas-manohar> havenwood: yeah
<ght> Therefore, I'm better off asking here and just dealing with the odd "what about #rvm" questions.
manzo has joined #ruby
<havenwood> ght: It's quite active and questions get answered.
dcunit3d has joined #ruby
<ght> wat
<zenspider> rvm is anathema to stable code
<havenwood> ght: You're using the RVM ecosystem. You don't have to but you are.
<tejas-manohar> havenwood: just like make a hash and then .to_json
<ght> Yes, I'm aware.
<havenwood> ght: Did your question go unanswered in #rvm?
<ght> Of course, as always.
<zenspider> so go reask it there
<zenspider> you reasked it here...
<ght> lol
<havenwood> It's an #rvm question.
<zenspider> rvm isn't ruby. so go ask there since that's your problem. You ignored my advice, so... have fun with that.
aspires has quit []
<ght> So, say you have multiple user accounts on a single host, and with each user, you want a unique ruby instance and series of gems. What do you guys recommend instead of rvm?
gtc has quit [Quit: kill -9 gtc]
<wasamasa> rbenv/chruby
msmith has joined #ruby
msmith has quit [Remote host closed the connection]
<ght> zenspider: At no point did I ignore your advice, you said you mentioned someting some 17 hours ago, I spent 10 minutes going through my scrollback buffer, was unable to locate it.
<havenwood> wasamasa: chruby!
<zenspider> it's like a broken record.
<ght> And then you said "I don't repeat myself" and went and got coffee.
<zenspider> I spent 15 seconds going through it and found it.
<havenwood> but this is solvable with rvm
davasaurous has joined #ruby
msmith has joined #ruby
<ght> lol, ,christ.
<wasamasa> as for per-user gems
gtc has joined #ruby
<wasamasa> why not use `gem` for that?
hamakn has joined #ruby
* wasamasa is puzzled
<ght> lol
krisquigley has joined #ruby
<ght> So chruby is recommended for per-user switching of ruby versions.
tus has joined #ruby
<ght> Appreciated, thank you.
krzbrg has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
krzbrg has joined #ruby
tobleronegordon has joined #ruby
r0bby_ has joined #ruby
klmlfl has joined #ruby
robbyoconnor has quit [Ping timeout: 264 seconds]
krisquigley has quit [Ping timeout: 244 seconds]
hamakn has quit [Ping timeout: 255 seconds]
St_Marx has quit [Remote host closed the connection]
krzbrg has quit [Client Quit]
krism has joined #ruby
St_Marx has joined #ruby
hamakn has joined #ruby