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)
<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?
<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>
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 ;)
<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>
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: 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 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]
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
<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]
<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
<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…]
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]
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.
<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>
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]
<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
<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?
<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]
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
<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]
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
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
<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
<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
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?
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.
<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
<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]
<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
<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>
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
<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.
<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.