Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allomov has quit [Ping timeout: 260 seconds]
rrichardsr3 has quit [Ping timeout: 255 seconds]
<shevy>
darix what window manager are you using?
moeabdol1 has quit [Ping timeout: 255 seconds]
<darix>
shevy: plain gnome 3
<shevy>
ruby-gnome as well?
<darix>
had no need for that yet
ericjphillips has quit [Quit: Leaving.]
<someguy_>
I'm trying to set up my IRC client textual and I can't seem to figure it out.
minimalism has joined #ruby
<shevy>
darix :(
<shevy>
someguy_ did you not say so a few million times... stop webchatting, get a real client!
tsujp has quit [Quit: tsujp is snoozing]
charliesome has joined #ruby
pontiki has joined #ruby
<someguy_>
shevy, I must be using the same name that someone else used on here a bit ago. I just got on. I remember your name. You used to help me quite a bit back in may.
noethics has quit [Quit: Leaving]
someguy is now known as that1guy
jun_ has quit [Remote host closed the connection]
Pathfinder_ has quit [Remote host closed the connection]
tlolczyk_ has quit [Quit: Leaving]
nettoweb has joined #ruby
skweek has quit [Remote host closed the connection]
rrichard_ has quit [Quit: The road to hell is paved with good intentions...]
yeticry has quit [Read error: Connection reset by peer]
<ruboto>
Mattacker, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
Mattacker has left #ruby [#ruby]
iyan has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 252 seconds]
ruurd has joined #ruby
<[k->
!ops Mattacker's link
<[k->
!op
<[k->
!ops
<jhass>
they're gone already
davedev24 has quit [Remote host closed the connection]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bb010g has quit [Quit: Connection closed for inactivity]
r0x0rZ has joined #ruby
<r0x0rZ>
is there a channel to discuss Rails or can I do it here?
<jhass>
?rails
<ruboto>
Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<r0x0rZ>
thx
SCHAAP137 has joined #ruby
cih has joined #ruby
roxtrongo has joined #ruby
Rezmond has joined #ruby
karapetyan has quit [Remote host closed the connection]
platzhirsch has joined #ruby
tmtwd has joined #ruby
santi_coma has quit [Quit: (null)]
tejasmanohar has quit [Quit: tejasmanohar]
roxtrongo has quit [Ping timeout: 240 seconds]
lkba_ has quit [Quit: Bye]
cih has quit [Remote host closed the connection]
justusjonas74 has joined #ruby
blackmes1 has quit [Ping timeout: 240 seconds]
joufflu has quit [Ping timeout: 246 seconds]
marr has joined #ruby
nofxx has joined #ruby
justusjonas74 has quit [Quit: Leaving...]
armyriad has quit [Quit: Leaving]
tkuchiki has quit [Remote host closed the connection]
Rezmond has quit [Ping timeout: 246 seconds]
bigmac__ has joined #ruby
EasyCo has quit [Quit: Connection closed for inactivity]
ruurd has quit [Quit: ZZZzzz…]
ruurd has joined #ruby
Soda has joined #ruby
bigmac_ has quit [Ping timeout: 244 seconds]
<r0x0rZ>
sometimes when ppl talk about classes in ruby I see them using `#`. Does this mean that for example Class1#Class2 = Class1::Class2? Or does # notate class method?
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yxhuvud has joined #ruby
bruno- has joined #ruby
tomphp has joined #ruby
michael_mbp has quit [Excess Flood]
kalusn has joined #ruby
<jhass>
r0x0rZ: it notes an instance method actually
<jhass>
and thus I'm sure you're seeing SomeClass#foo and not SomeClass#Foo
<r0x0rZ>
oh ok so if I do `b = 'hello'` I could write b#empty? for example?
<jhass>
SomeClass::foo denotes a class method
<jhass>
no, it's purely a documentation convention
michael_mbp has joined #ruby
kalusn has quit [Remote host closed the connection]
ruurd has quit [Quit: ZZZzzz…]
<jhass>
SomceClass::Foo is a nested class/module/constant
tkuchiki has joined #ruby
<r0x0rZ>
jhass: ok got it. strange why don't ppl use dot notation? makes more sense
<jhass>
to disambiguate methods you call on the class from methods you call on instances of it
<r0x0rZ>
jhass: ah i see
<jhass>
Let's take File::write vs File#write for example
<r0x0rZ>
jhass: basically notes diff between Class and Instance methods
<jhass>
first is File.write("foo", "bar"), second is File.open("foo") {|f| f.write("bar" }
<jhass>
yeah
dikaio has quit [Quit: ........]
r0x0rZ has quit []
yfeldblum has quit [Ping timeout: 240 seconds]
radgeRayden has quit [Ping timeout: 244 seconds]
Phil-Work has quit [Ping timeout: 240 seconds]
fantazo has quit [Quit: Verlassend]
ruurd has joined #ruby
Phil-Work has joined #ruby
CloCkWeRX has joined #ruby
<apeiros>
note that Foo::Bar *can* be a class method too. though, it's rare to have methods start with an uppercase letter (personally I'd add () to make it clear)
tmtwd has quit [Ping timeout: 265 seconds]
<apeiros>
when calling, methods with an uppercase first letter must be unambiguous anyway. i.e. either explicit parens, or params being passed.
beast has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
<jhass>
you still need a smart join/part filter :P
<jhass>
what's up with old ruboto being so laggy recently though?
einarj has joined #ruby
CloCkWeRX has quit [Ping timeout: 255 seconds]
arup_r has quit [Ping timeout: 265 seconds]
ruurd has quit [Quit: ZZZzzz…]
<[k->
ruboto's old age
devbug_ has quit [Read error: Connection reset by peer]
einarj has quit [Remote host closed the connection]
bkxd has joined #ruby
<apeiros>
no idea, and with cinch, I don't want to investigate.
blackmes1 has joined #ruby
spider-mario has joined #ruby
<apeiros>
systemload is low, so it's not the machine being busy
<ruboto>
adaedra # => [JSON::ParserError, JSON::JSONError, StandardError, Exception, Object, JSON::Ext::Generator::Generat ...check link for more (https://eval.in/440247)
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
they probably copy/pasted from one another :D
<adaedra>
-_-
<darix>
not sure if trolling
<shevy>
well, we could perhaps even find out
<shevy>
for instance, I have an empty directory at ruby-2.2.3/ext/curses
Akagi201 has quit [Remote host closed the connection]
<shevy>
which does not seem very useful
<darix>
which is empty
willardg has joined #ruby
<darix>
at least in 2.2.3
<shevy>
ah
Akagi201 has joined #ruby
<shevy>
ok so it probably still existed in 2.2.2
<darix>
it exists in both
<darix>
but is empty
<adaedra>
If only there was a way of tracking file history.
<darix>
adaedra: that would be horrible
<shevy>
wonder why they did not get rid of the directory in ruby 2.2.3 ...
psy_ has quit [Ping timeout: 265 seconds]
willardg has quit [Client Quit]
Anti-Pizza has joined #ruby
<shevy>
darix I forgot... you use gnome3, but what distribution? opensuse?
<darix>
shevy: uhm ... yes?
mary5030 has joined #ruby
Akagi201 has quit [Ping timeout: 260 seconds]
mary5030 has quit [Remote host closed the connection]
<shevy>
darix what ruby version can you use on opensuse? 2.2.3 already?
<darix>
i have to maintain distro packages at work ... why would i use a different distro at home
karapetyan has joined #ruby
<darix>
shevy: add devel:languages:ruby as repository to your install and you can have 2.2.3
skweek has quit [Remote host closed the connection]
mary5030 has joined #ruby
<shevy>
I had to use windows at work!
<darix>
+ tons of gems build for it in devel:languages:ruby:extensions
<atmosx>
I'm contemplating on writing a script which will execute some commands on each dir... but I need to keep track of the actions. i'm between leaving a trace (.e.g a .done file) and keeping everying in a sqlite3 db.
<atmosx>
any ideas, notes?
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
grotewold has joined #ruby
<[k->
at the script directory?
<[k->
at each directory it traverses?
<shevy>
atmosx do both :)
<[k->
at the root directory of where it traverses?
<shevy>
and the database could log all of it centrally
<atmosx>
[k-: where it traverses, it will recursivelly scan for mp4,mkv and avi and download/embed subs
<atmosx>
using a ruby gem for fetching subs and ffmpeg
j4cknewt has joined #ruby
apt-get has joined #ruby
<adaedra>
atmosx: both methods (not at the same time!) can work. Depends on what you want to do.
mary5030 has quit [Ping timeout: 240 seconds]
<atmosx>
adaedra: I think the creatino of a 'report' file it's easier to keep in track. But this is a RPi, each read/write operation is expensive (SD card). So it woul dbe better to avoid traversing he entire tree every time.
dasher00 has quit [Ping timeout: 240 seconds]
<[k->
create a json please
<adaedra>
It's all up to you at this moment
<[k->
that would be easier to maintain
<atmosx>
[k-: true
j4cknewt has quit [Ping timeout: 240 seconds]
fullofcaffeine has joined #ruby
tkuchiki has quit [Remote host closed the connection]
bruno-_ has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
roxtrong_ has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
noethics has joined #ruby
bentanweihao has quit [Remote host closed the connection]
ruurd has joined #ruby
krz has joined #ruby
<freezevee>
can someone give me an idea how else could I write a function with 4 independent if's ?
<freezevee>
I am looking for a smart idea that my inexperienced and burnt out mind cannot think
rbennacer has joined #ruby
grotewold has quit [Ping timeout: 264 seconds]
<Papierkorb>
is it possible to find out which file defined a certain constant at run-time?
cmoneylulz has quit [Remote host closed the connection]
Macaveli has joined #ruby
k3asd` has joined #ruby
<adaedra>
freezevee: you can remove the 'return' at the end. Ruby always returns the last result.
grotewold has joined #ruby
danieli has joined #ruby
<freezevee>
sure
grotewold has quit [Max SendQ exceeded]
darkf has quit [Quit: Leaving]
<freezevee>
I am running it through pullreview and it gives me a bad score because "i need to refactor this complex method"
grotewold has joined #ruby
<adaedra>
Automated code review
pawnbox has quit [Remote host closed the connection]
<freezevee>
yep
grotewold has quit [Max SendQ exceeded]
<adaedra>
I don't see anything common between four conditions
grotewold has joined #ruby
<freezevee>
so we suppose the alarm is wrong ?
<darix>
and replacing them with method calls just to make this method "less complex" seems silly
<adaedra>
yeah
santi_coma has quit [Remote host closed the connection]
<adaedra>
I think touching this method trying to make it look less complex for a computer process would make it more complex for an human, defeating the purpose
<freezevee>
it might get less complex with ternary operator instead of ifs ?
<darix>
dont think so
<adaedra>
no, ifs are fine
<adaedra>
keep ternary for really simple things
<atmosx>
freezevee: is this code you share with other ppl?
<darix>
if you want to remove lines you could move the ifs behind the assignment
<darix>
and that doesnt help readability
Soda has joined #ruby
<freezevee>
atmosx: meaning ?
<freezevee>
its for an assignement
<freezevee>
I just want to be the best I can
arup_r has quit [Ping timeout: 252 seconds]
<adaedra>
ah
<atmosx>
adaedra: would this work: neighbours << left_node if (left_node > 0 && current_node % @table_x != 0 && @table_merged[left_node] != "X") ?
<freezevee>
yes it could
<darix>
atmosx: it would but it is less readable with such long condition
<atmosx>
true
<freezevee>
but isn't it more unreadable ?
<freezevee>
yeah
bronson has joined #ruby
<adaedra>
doesn't change the complexity
<adaedra>
yes, you removed two lines, but it's still a conditional
fullofcaffeine has quit [Remote host closed the connection]
<adaedra>
even worse, you push the test at the end, which can be more unreadable, and creating a very long line
moeabdol1 has quit [Ping timeout: 264 seconds]
<adaedra>
shortened forms are good for small things.
renderfu_ has joined #ruby
bazbing80 has joined #ruby
bazbing81 has joined #ruby
<adaedra>
I think that if you want to attack complexity in this, you may have to take it one step higher.
bruno-_ has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
pawnbox has joined #ruby
<freezevee>
do you think I should break it to functions ?
pawnbox has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 255 seconds]
<freezevee>
or a separate class ?
pawnbox has joined #ruby
<freezevee>
class Neighbour ?
<darix>
for a proper answer to this question we would need to understand the whole task
<freezevee>
but it doesn't make sense
<adaedra>
I don't know your project well enough to answer that
<freezevee>
no problem, thanks for helping
renderfu_ has quit [Ping timeout: 246 seconds]
yardenbar has joined #ruby
karapetyan has quit [Remote host closed the connection]
umgrosscol has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
lxsameer has quit [Quit: Leaving]
grotewold has quit [Ping timeout: 255 seconds]
zotherstupidguy has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has quit [Remote host closed the connection]
kalusn has quit [Remote host closed the connection]
arup_r has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
iamninja_ has joined #ruby
iamninja has quit [Ping timeout: 240 seconds]
atomical has joined #ruby
karapetyan has joined #ruby
Eising has quit [Ping timeout: 264 seconds]
Eising has joined #ruby
Akagi201 has quit [Read error: Connection reset by peer]
Akagi201 has joined #ruby
jun_ has joined #ruby
hectortrope has quit [Remote host closed the connection]
rushed has quit [Quit: rushed]
karapetyan has quit [Remote host closed the connection]
hectortrope has joined #ruby
Igorshp has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 246 seconds]
grotewold has joined #ruby
LatoSans has quit [Ping timeout: 244 seconds]
bkxd has quit [Ping timeout: 246 seconds]
peteykun has joined #ruby
zenguy_pc has quit [Ping timeout: 246 seconds]
peteykun has quit [Client Quit]
bruno- has quit [Ping timeout: 260 seconds]
iyan has quit [Quit: iyan]
pandaant has quit [Remote host closed the connection]
umgrosscol has quit [Remote host closed the connection]
bruno- has joined #ruby
naftilos76 has quit [Ping timeout: 272 seconds]
uri_ has joined #ruby
JammyHammy has quit [Ping timeout: 255 seconds]
FernandoBasso has quit [Ping timeout: 250 seconds]
hays has joined #ruby
hays has quit [Changing host]
hays has joined #ruby
Yzguy has joined #ruby
JammyHammy has joined #ruby
jun_ has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 264 seconds]
dikaio has joined #ruby
nofxx has joined #ruby
zenguy_pc has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
Akagi201 has quit [Remote host closed the connection]
ruurd has quit [Quit: ZZZzzz…]
mary5030 has joined #ruby
atmosx has quit [Quit: WeeChat 0.4.4-dev]
RegulationD has joined #ruby
mary5030 has quit [Ping timeout: 244 seconds]
The_Phoenix has quit [Read error: Connection reset by peer]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
m8 has quit [Quit: Sto andando via]
soulcake has joined #ruby
Yzguy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
grotewold has quit [Ping timeout: 250 seconds]
RegulationD has quit [Ping timeout: 272 seconds]
jun_ has joined #ruby
Xeago has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 268 seconds]
last_staff has joined #ruby
grotewold has joined #ruby
tom_lowndes has joined #ruby
Xeago has joined #ruby
grotewold has quit [Max SendQ exceeded]
tomphp has joined #ruby
grotewold has joined #ruby
grotewold has quit [Max SendQ exceeded]
drptbl has joined #ruby
grotewold has joined #ruby
grotewold has quit [Max SendQ exceeded]
voltalio has joined #ruby
grotewold has joined #ruby
cih has joined #ruby
bruno- has joined #ruby
cih has quit [Remote host closed the connection]
grotewold has quit [Max SendQ exceeded]
<shevy>
why are there not more games written or using ruby?
grotewold has joined #ruby
allomov_ has quit [Remote host closed the connection]
xet7 has quit [Quit: Leaving]
bronson has joined #ruby
cmoneylulz has joined #ruby
saddad has joined #ruby
pontiki has joined #ruby
ruurd has joined #ruby
beast has quit [Quit: Leaving]
ruurd has quit [Client Quit]
bronson has quit [Ping timeout: 244 seconds]
bruno- has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
pyon has quit [Quit: I get up... I get down...]
fullofcaffeine has joined #ruby
symm- has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kayloos has joined #ruby
bruno- has joined #ruby
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tmtwd has joined #ruby
rushed has joined #ruby
nofxx has quit [Ping timeout: 246 seconds]
jschmid has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
Azure has joined #ruby
Yzguy has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
pawnbox has quit [Remote host closed the connection]
hendricius has joined #ruby
blackmes1 has quit [Ping timeout: 260 seconds]
solocshaw has quit [Ping timeout: 240 seconds]
solocshaw has joined #ruby
hendricius has quit [Client Quit]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gustav_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
Xeago has joined #ruby
fullofcaffeine has quit [Read error: Connection reset by peer]
<ghostlines>
howdy, every time I run `cap production deploy:start` I get a command not found error. It can't even find ruby on it's path. Any idea's what I'm doing wrong here? http://hastebin.com/iyezaqozir.coffee
sjums has joined #ruby
<sjums>
are there a good gem for handling cookies when doing http calls on sites behind a login?
UtkarshRay has quit [Quit: Leaving]
<jhass>
sjums: sounds like you could benefit from mechanize in general, but search for "cookie jar", several solutions to that
krz has quit [Quit: WeeChat 1.2]
tno has quit [Remote host closed the connection]
<jhass>
ghostlines: that's not really showing anything about your ruby setup, how you installed capistrano or the specific error message you're getting
<sjums>
will look into it :) Thanks for the pointer, jhass !
Coldblackice has joined #ruby
<rgb-one>
I have updated the gist with more info as it was a bit lacking before
<sjums>
jsrn, No wonder you're around :3
fullofcaffeine has quit [Remote host closed the connection]
Xeago has joined #ruby
blackmes1 has joined #ruby
Soda has quit [Remote host closed the connection]
zenguy_pc has quit [Read error: Connection reset by peer]
firstdayonthejob has quit [Ping timeout: 255 seconds]
DrCode has quit [Read error: Connection reset by peer]
FernandoBasso has joined #ruby
Xeago has quit [Ping timeout: 244 seconds]
<sjums>
jhass, mechanize looks very promising :) Thanks again!
<jhass>
ghostlines: well the the error is happening on the remote system from the looks of it, there's no Ruby installed there
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dasher00 has joined #ruby
ruurd has joined #ruby
<jhass>
oh wait that which is the remote machine?
dikaio has left #ruby ["........"]
<jhass>
are you sure it's activated if you don't change into the given directory though?
<jhass>
I think there's a #capistrano btw
<ghostlines>
jhass correct, Ruby is not installed on the remote machine system wide, it's only installed for my deploy user(ghost for now) FYI I'm executing everything on the server
blackmes1 has quit [Ping timeout: 250 seconds]
<ghostlines>
jhass kewl I'll dig into there, thx!
dikaio has joined #ruby
<jhass>
anyway, looks like it ssh's into the machine (again) and then lands somewhere where there's no Ruby activated
noethics has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
nofxx has joined #ruby
Xeago has quit [Remote host closed the connection]
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
joufflu has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
parduse has joined #ruby
[k- has quit [Ping timeout: 260 seconds]
cocaine has joined #ruby
sagittarian|2 has joined #ruby
willardg has joined #ruby
havenwood has joined #ruby
fastAndSlow has quit [Ping timeout: 240 seconds]
Rickmasta has joined #ruby
psy_ has quit [Quit: Leaving]
ruurd has quit [Quit: ZZZzzz…]
sagittarian has quit [Ping timeout: 268 seconds]
ruurd has joined #ruby
blackmes1 has joined #ruby
cocaine has quit [Quit: leaving]
dome22xl has joined #ruby
<bazbing81>
so ENV['TERM'] returns nil in windows command prompt? How should I determine which type of terminal my ruby script is running in if windows (urgh) returns nil? Ubuntu's gnome terminal returns 'xterm'
zenguy_pc has joined #ruby
<dome22xl>
Does anyone know why you can't inherit a refinement from an existing class ?
Anti-Pizza has quit [Quit: Quit]
DrCode has joined #ruby
KnownSyntax has quit [Read error: Connection reset by peer]
framling has joined #ruby
<darix>
bazbing81: windows just doesnt use the TERM variable to tell you that.
KnownSyntax has joined #ruby
neohunter has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jun_ has quit [Read error: Connection reset by peer]
jun_ has joined #ruby
<bazbing81>
darix what does windows use?
brnpcn has joined #ruby
<shevy>
bazbing81 it is an environment variable. you can check if you run on windows via the constant RUBY_PLATFORM
<bazbing81>
shevy: thanks, is there magic bullet for finding out what terminal the user is using? Or do I need to determine the OS first and then drill down to find out what terminal?
henryaj has joined #ruby
<shevy>
there is no trivial way to do so as far as I know. if you manage to find out lemme know. a user can set TERM to anything. I am also not sure how to determine whether the .rb file runs in konsole or gnome-terminal or xterm or any other term
moeabdol1 has quit [Quit: WeeChat 1.3]
yqt has joined #ruby
jun_ has quit [Read error: Connection reset by peer]
<bazbing81>
shevy: well it runs as far as running "ruby <myfile>.rb" but I'm guessing that's not what you mean? Looking for a gem regarding terminal identification.. ^_^
jschmid has quit [Remote host closed the connection]
jun_ has joined #ruby
bronson has joined #ruby
ericjphillips has joined #ruby
mosez has quit [Ping timeout: 252 seconds]
moeabdol has joined #ruby
henryaj has quit []
mosez has joined #ruby
platzhirsch has joined #ruby
spider-mario has quit [Ping timeout: 246 seconds]
<shevy>
of course it runs
<shevy>
but in which terminal does it run!
parduse has quit []
thejamespinto has quit [Remote host closed the connection]
<pontiki>
the gems installed in .../2.2.0/ are not being seen, of course
<pontiki>
i just don't know *why* or *how* they're getting in there
tom_lowndes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tom_lowndes has joined #ruby
<Starthunder>
Is Ruby stuff still 32-bit only? O.o
fullofcaffeine has quit [Remote host closed the connection]
roxtrongo has quit [Remote host closed the connection]
<Starthunder>
Trying to install `sup` here; it's failing to build…I guess this is the gem, for ncurses?
<Starthunder>
> ld: warning: ignoring file /usr/local/lib/libncursesw.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libncursesw.dylib
ruurd has quit [Quit: ZZZzzz…]
yfeldblum has quit [Ping timeout: 240 seconds]
<shevy>
what is .dylib
<ruby-lang778>
Can someone share with me a link with something which can describe me why should I use ruby instead of some languages like Python or Java Script
<freezevee>
well I thought I could get a more understandable explanation
<freezevee>
but it's ok
<shevy>
freezevee usually when you want to pass around blocks to other methods
<freezevee>
confuses me with references of c++ a little
Azure has joined #ruby
<freezevee>
the splat also
ruurd has quit [Quit: ZZZzzz…]
<freezevee>
but I'll get over it
<freezevee>
:P
nofxx has quit [Ping timeout: 246 seconds]
gustav_ has joined #ruby
momon has left #ruby [#ruby]
<adaedra>
freezevee: & before an argument name creates a variable that holds the block passed to the method, allowing to do more things than with `yield`.
nofxx has joined #ruby
<freezevee>
got it
<freezevee>
thanks
<shevy>
splat is much easier
<shevy>
def foo(*i)
<freezevee>
splat is easier yes
<shevy>
pp i
<shevy>
end
<shevy>
foo 1,2,3
<shevy>
foo 1,2,3,4
<shevy>
that really is simple to understand
<freezevee>
but If you use c++ and ruby it confuses
<shevy>
well you have to understand that the ruby parser is a complex beast
pawnbox has quit [Remote host closed the connection]
tejasmanohar_ has joined #ruby
<shevy>
it tries to yodel while grabbing its butt with one arm, being drunk, waving around with the other arm and dancing on tip-toes on a chasm towards insanity
pawnbox has joined #ruby
<shevy>
I assume that they used & because it was simple to use/parse
<shevy>
.map(&:chomp)
<freezevee>
what is the equivalent of &:chomp ?
solocshaw has joined #ruby
<adaedra>
.map { |e| e.chomp }
<freezevee>
|k| k = chomp ?
gustav_ has quit [Remote host closed the connection]
rgb-one has quit [Remote host closed the connection]
tejasmanohar has quit [Ping timeout: 255 seconds]
tejasmanohar_ is now known as tejasmanohar
<freezevee>
but thanks, at least I got ambersand and splat
<shevy>
proc is not doing much
<shevy>
you only .call on it and that was it
<adaedra>
you said you come from c++. Did you use C++11 anonymous functions, freezevee ?
<shevy>
I still have to find out myself how proc is super-useful
<freezevee>
adaedra: hmm not much
<adaedra>
proc are the same thing
atomical_ has joined #ruby
<adaedra>
(±)
<freezevee>
adaedra: graduated from college by using C++ at 100% of the lessons
<adaedra>
Can be C++98 tho.
atomical has quit [Ping timeout: 255 seconds]
davedev24 has quit [Ping timeout: 246 seconds]
davedev24 has joined #ruby
<freezevee>
shevy: same here, I am seeing also Structs and I don't get the usability
<freezevee>
like a Hash for example
<freezevee>
but they are tools and we're free to choose
TomyLobo has quit [Ping timeout: 250 seconds]
gustav_ has joined #ruby
<adaedra>
A struct is like a C++ struct
<freezevee>
indeed
atomical has joined #ruby
<adaedra>
A pre-determined structure with public access to members
matled has quit [Read error: Connection reset by peer]
matled- has joined #ruby
matled- is now known as matled
<freezevee>
another question
<freezevee>
in RSpec, do you test variables ?
<freezevee>
or only classes and methods ?
<freezevee>
I mean, things that create action
<workmad3>
adaedra: you know a C++ struct is just a class with default private scope, right? :)
<freezevee>
I am building my first tests and have been wondering
<adaedra>
public*
<workmad3>
adaedra: ah yeah, sorry
<freezevee>
workmad3: actually I believe it's a C feature
<workmad3>
freezevee: C struct and C++ struct are different
<freezevee>
didn't know that
dikaio has quit [Quit: ........]
<adaedra>
Well, C++ structs are still make to be a bit compatible with C's one, even if they can do what C++ classes can.
atomical_ has quit [Ping timeout: 255 seconds]
<leitz>
freezevee, I'm a newbie, so I test whatever I can figure out how to test. It let's me have some confidence when I refactor. :)
<adaedra>
I usually use struct for code-less structures, class otherwise.
<adaedra>
freezevee: what do you mean, by testing variables?
<freezevee>
leitz: same here, but I am afraid that I test silly things
<freezevee>
leitz: I am doing it { is_expected.to respond_to( for all attributes
dikaio has joined #ruby
<leitz>
It's not silly if you're learning.
<freezevee>
not sure why
<workmad3>
adaedra: sure, if you don't use any C++ features (so no scope modifiers, no methods, etc.), a C++ struct is the same memory layout as a C struct, so compatible, iirc
<freezevee>
adaedra: test If they have the right values, the right type etc.
<adaedra>
freezevee: internal variables?
<leitz>
freezevee, I tend to gut my code as I learn, so any tests help me see unintended changes. Found some the other night as I reworked a class based on comments here.
<adaedra>
freezevee: you should be testing that the public interface of your classes behave correctly
<workmad3>
freezevee: while you're still learning, you tend to end up with a lot of tests that, later on, you realise aren't necessary... but what tests those are can vary based on coder... essentially, you end up over-testing initially and, as you gain confidence, your tests get whittled down to the ones that give you the most confidence in the areas that you're most unsure of
<freezevee>
leitz: well I've tried to learn Ruby and Rails on my own and succeeded so far, created some apps with many models, used tools as Chef to provision etc. but so far the most difficult part for me is tests
<freezevee>
leitz: I don't believe myself, but I am sitting on the chair thinking "what to test?"
nofxx has quit [Ping timeout: 240 seconds]
<adaedra>
Aaah, tests.
<leitz>
Given your background, it's just a matter of time.
<adaedra>
Those fuckers.
<freezevee>
leitz: I can't imagine I got here without tests actually
nofxx has joined #ruby
p0wn3d__ has joined #ruby
<freezevee>
it seems like I'm playing guitar with no hands
<freezevee>
no strings
<leitz>
In the book "Practical Object Oriented Design in Ruby", the auther talks about objects passing messages. What messages are you passing?
<freezevee>
tests are a very basic thing when creating stuff and I ignored it in order to build fast
<leitz>
It's easy to code without tests. Chanigng the code, though, is a bugger if you still want it to work.
<workmad3>
leitz: is that a question you want answered, or a question you're asking freezevee? :)
<adaedra>
class Guitar; def initialize; @strings = Array.new(5) { "" }; end; end; Guitar.new # Here, a guitar with strings.
<freezevee>
leitz: it's complicated
<leitz>
workmad3, more a thought for freezevee. I'm getting the impression fv is a bit more advanced and can probably understand better than I.
<adaedra>
leitz: fancy way of talking about method calling.
tomchapin has joined #ruby
`derpy has quit [Read error: Connection reset by peer]
<leitz>
adaedra, it was a relevation for me. An object is pretty useless unless it does somethig. I always considered them important. Really, it's what they do that's important, not what they are.
Esya| has quit [Ping timeout: 246 seconds]
<freezevee>
I love this room
`derpy has joined #ruby
<freezevee>
where are you from ?
<leitz>
Such is my understanding. I have it my "read it once" level. It hasn't soaked in very far though.
<leitz>
Which you? Define from. :)
<workmad3>
adaedra: personally, I don't see 'message passing' as a 'fancier' way of talking about method calling... more it's a different analogy, and one that opens up some new ideas for thinking about your systems
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<freezevee>
leitz: what about you ?
<adaedra>
BUT ITS SO FANCAY
p0wn3d_ has joined #ruby
p0wn3d__ has quit [Ping timeout: 264 seconds]
fumduq has quit [Ping timeout: 246 seconds]
Gachr has quit [Quit: Leaving]
<leitz>
freezevee, I am from almost where I am, with about three dozen moves between then and now.
<workmad3>
adaedra: not to smalltalkers... it's just normal for them... 'message passing' is also the phrase used by Alan Kay in his definition for OO
<leitz>
Which is a philospohical way to cosnole myself with having moved back to Appalachia after living in several states and a few other countires.
mary5030 has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
Pumukel has quit [Ping timeout: 252 seconds]
fumduq has joined #ruby
<adaedra>
workmad3: yeah, I know, it's used in Obj-C too.
Mekkis has joined #ruby
devoldmx has joined #ruby
dopamean_ has joined #ruby
<adaedra>
I will now start to write 100 times "I shall not use “fancy”" for cleaning this error :(
<leitz>
freezevee, I'm a RubyNewbie. I tinker with my code and run the tests. I'm still trying to get good tests, and will eventually know enough aruba to fix the gemspec and be able to run cucumber.
Esya- has joined #ruby
scripore has joined #ruby
<freezevee>
leitz: I am struggling with the tests too
<freezevee>
leitz: I got so much to show to employers but they all care about tests
<leitz>
freezevee, then step away from your code and write something just to test.
cornerman has quit [Quit: leaving]
<leitz>
Play.
<freezevee>
and as time passes by I understand they are right
<leitz>
You have the brains for it, just not the understanding. Play is a high form of learning.
<freezevee>
the most difficult thing is to know what to write
<workmad3>
freezevee: I personally recommend working through 'TDD: By example' if you want to get a feel for a lot of the style of testing that's frequently used
<workmad3>
freezevee: it even gives some suggestions to help with the 'what to test?' question
<freezevee>
leitz: I got an algorithm solving a problem split over functions and 2-3 classes
steeljav has quit [Quit: leaving]
<freezevee>
leitz: so the algorithm is pretty difficult and I got it working
tejasmanohar has quit [Quit: tejasmanohar]
<freezevee>
leitz: and now that I 've finished I am wondering two things
<freezevee>
leitz: first of all what to test
Pathfinder_ has quit [Read error: Connection reset by peer]
<workmad3>
freezevee: test the output of the algorithm... and then try to break it
<freezevee>
and second workmad3: how would I write it If I had begun with TDD
<freezevee>
workmad3: how to break it ?
<freezevee>
workmad3: it's an array with numbers
<freezevee>
that's all
<workmad3>
freezevee: yeah... think of weird inputs... what happens if you pass it no numbers? what happens if you pass it negatives? or infinity? or complex numbers? etc
<freezevee>
isn't it silly to write if "solution.table" is equal to [1,2,3,4]
<workmad3>
freezevee: what if you pass it strings containing numbers?
<freezevee>
and then if solution.table is not equal to [2,3,4,5] ?
<freezevee>
I mean it's an example like "if you didn't hear the ring, then it didn't rang"
<workmad3>
freezevee: try to avoid 'if' in your tests
cornerman has joined #ruby
<freezevee>
workmad3: you mean from the "input" perspective
<workmad3>
freezevee: so your test should really be 'I should hear a ring when the bell is rung', not 'if the bell was rung, I should hear a ring'
<freezevee>
yes this is possible to test different inputs
<workmad3>
freezevee: yeah, a few interesting inputs, or a few interesting outputs
<workmad3>
freezevee: a good typical example is a triangle classifier... you give it 3 numbers, representing sides of triangles, and the method classifies it as equilateral, right-angle, isoceles, etc.
<freezevee>
and what If a method doesn't return something ?
<workmad3>
freezevee: if there are cases it doesn't return something, test those
<workmad3>
freezevee: they're a good edge-case
<freezevee>
that's why I asked about testing variables
<freezevee>
I have methods that calculate things using instance variables
<freezevee>
they don't get input and don't return anything
<freezevee>
just calculate with what's already there
<workmad3>
freezevee: preferably, avoid testing implementation details... e.g. things like private methods or instance variables
roxtrongo has joined #ruby
mary5030 has quit [Remote host closed the connection]
<workmad3>
freezevee: if it's particularly complex, you may want to test it anyway... but tests of that sort tend to freeze your implementation and make it harder to change your class down the line, rather than making it easy to support internal changes
p0wn3d_ has quit [Ping timeout: 268 seconds]
mary5030 has joined #ruby
<workmad3>
freezevee: and those methods sound like private methods that are helpers to the main algorithm ;)
jairojunior has joined #ruby
tsujp has quit [Quit: tsujp is snoozing]
<freezevee>
workmad3: how did you learn to test ?
mary5030 has quit [Ping timeout: 252 seconds]
<workmad3>
freezevee: mostly self taught through books like TDD: By Example, talking to people on IRC and real life and trying things out
dorei has quit []
baweaver has joined #ruby
arian0n has left #ruby ["WeeChat 1.3"]
ngscheurich has joined #ruby
<adaedra>
Time for bed, see y'all
<workmad3>
freezevee: Growing Object Orient Software can be a source too, if you're OK with reading java examples (I had to read it twice... first time through innoculated me to the jmock boilerplate so I could pick up the interesting details on a second read)
freezeve_ has joined #ruby
dorei has joined #ruby
freezeve_ has quit [Client Quit]
<workmad3>
freezevee: then there's books like Refactoring... I had a book a while back on software testing that I never got all the way through, but it opened my eyes on the sort of things that can be considered for testing (that's the first time I found the triangle classifier, for example)
freezeve_ has joined #ruby
freezevee has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
freezeve_ has quit [Client Quit]
bluOxigen has quit [Ping timeout: 240 seconds]
vF3hNGxc47h8 has joined #ruby
freezevee has joined #ruby
Akagi201 has joined #ruby
<workmad3>
freezevee: how much of the convo did you miss before your connection went screwy?
Voker57 has quit [Read error: Connection reset by peer]
bronson has quit [Ping timeout: 244 seconds]
djbkd has quit [Ping timeout: 246 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CanTonic has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<leitz>
Yeah. adaedra made a comment yesterday, when he looked at my code. He said "there is so much that could be improved." I was going to ask for recommendations of areas to focus on.
<leitz>
Something besides "everything", which my mind tries to do.
FrankD has quit [Ping timeout: 255 seconds]
JammyHammy has quit [Read error: Connection reset by peer]
<shevy>
yeah he is very critical
<leitz>
Critical feedback is critical to growth.
RegulationD has quit [Ping timeout: 244 seconds]
<leitz>
At least to rapid growth. I can putz along for years.
<leitz>
I have ~ 6 months of PHP spread over 10 years of coding. :)
danieli has quit [Quit: *does an epic backflip into nowhere*]
<leitz>
Trying to pick up the pace with Ruby.
JammyHammy has joined #ruby
Balzrael has quit [Quit: Leaving]
bentanweihao has joined #ruby
<leitz>
freezevee, another thing is to consider when you test. I had a working test for a method that did "something" if a certain set of conditions was met.
<leitz>
I forgot that another method or two could change the testable conditions, and they acted after the method under test.
FrankD has joined #ruby
firstdayonthejob has quit [Ping timeout: 256 seconds]
postmodern has joined #ruby
Trynemjoel has quit [Ping timeout: 250 seconds]
jairojunior has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roxtrongo has quit [Remote host closed the connection]
ezra has joined #ruby
ezra is now known as Guest26078
<Guest26078>
Hi, I need some help with dating_app I am trying to create. I am very new to Ruby-on-Rails, and for some reason, my terminal will not let me create a StaticPages Controller
Trynemjoel has quit [Ping timeout: 250 seconds]
<Guest26078>
can I post the error message and can someone give me feedback for my current predicament?
rmrrn has joined #ruby
rmrrn has joined #ruby
vF3hNGxc47h8 has quit [Read error: Connection reset by peer]
jun_ has quit [Remote host closed the connection]
minimalism has quit [Quit: leaving]
Trynemjoel has joined #ruby
<Guest26078>
this the error message that I get when I try to try to type in the command 'rails g controller StaticPages home directory':vbaker/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:150:in `resolve_all': undefined method `each' for #<String:0x007fc4668d6e68> (NoMethodError) from /Users/r/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.4/l
michaeldeol has joined #ruby
devgiant has quit [Quit: Leaving]
roxtrongo has joined #ruby
<baweaver>
Guest26078: ?rails
<baweaver>
fine ruboto... Join RubyOnRails
rbennacer has joined #ruby
<baweaver>
this channel is just ruby
devoldmx has quit [Remote host closed the connection]
swgillespie has joined #ruby
bigmac_ has quit [Ping timeout: 246 seconds]
Kallis has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maikowblue has joined #ruby
roxtrong_ has joined #ruby
devoldmx has joined #ruby
wildlander has quit [Quit: Saliendo]
FernandoBasso has quit [Quit: WeeChat 1.3]
jairojunior has joined #ruby
framling has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
roxtrongo has quit [Ping timeout: 265 seconds]
Guest26078 has quit [Ping timeout: 246 seconds]
gustav_ has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Stalkr_ has quit [Quit: Leaving...]
renderfu_ has joined #ruby
BTRE has quit [Quit: Leaving]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
<shevy>
you must read the array message
<shevy>
[] + '' ruby not likes
jdawgaz has joined #ruby
donkey_hotei has joined #ruby
<donkey_hotei>
hello - I'm looking for a simple method of creating an array of strings from within a view and then passing that array in as a query parameter
jamesaxl has quit [Remote host closed the connection]
<donkey_hotei>
I know this must have been done by someone on this chan
jdawgaz has quit [Client Quit]
karapetyan has joined #ruby
quazimodo has joined #ruby
<shevy>
hololeap seems as if the input passed to new() is invalid
renderfu_ has quit [Ping timeout: 264 seconds]
<hololeap>
shevy: i found a couple of blatent typos. i fixed them but it still isn't working. i added some working code for reference
bronson has quit [Ping timeout: 272 seconds]
jun_ has quit [Remote host closed the connection]
jdawgaz has joined #ruby
karapetyan has quit [Ping timeout: 246 seconds]
<shevy>
it works without the [] part to new
<shevy>
you must be doing something that makes this invalid
<ruboto>
shevy # => [[:array_one, :array_two], :var_three, :var_four] ...check link for more (https://eval.in/440364)
bentanweihao has quit [Remote host closed the connection]
<shevy>
I've never seen code like yours before :)
roxtrong_ has quit [Remote host closed the connection]
<hololeap>
shevy: i know, but i don't understand why. the arrays get merged and splatted before being sent to super(), so there shouldn't be any problem
Jardayn has quit [Quit: Leaving]
<shevy>
I don't know why either, the code is very strange
<shevy>
I've never seen this before:
<shevy>
super *(variables + Array(subarray_names)) do
jairojunior has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hololeap>
that _should_ be equivelant to `Struct.new(*(variables + Array(subarray_names))) { ... }`