n_blownapart has quit [Remote host closed the connection]
iamcalledrob has joined #ruby
ritz4_5 has joined #ruby
ritz4_5 has quit [Remote host closed the connection]
ritz4_5 has joined #ruby
axilla has quit [Ping timeout: 258 seconds]
d34th4ck3r has joined #ruby
lambo has joined #ruby
ddv has joined #ruby
cashnguns has joined #ruby
zzzbra_ has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 252 seconds]
redondo has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
ritz4_5 has quit [Ping timeout: 252 seconds]
tiguser has quit [Ping timeout: 245 seconds]
Nexus_x1 has quit [Quit: Computer has gone to sleep.]
redondo has joined #ruby
ixti has quit [Ping timeout: 252 seconds]
olivier_bK has quit [Ping timeout: 245 seconds]
b1205 has joined #ruby
snath has joined #ruby
tiguser has joined #ruby
moritzs has quit [Ping timeout: 264 seconds]
natevick has joined #ruby
ocke has left #ruby [#ruby]
Shidash has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
aspires has quit [Client Quit]
codename539 has joined #ruby
lw has joined #ruby
redondo has quit [Ping timeout: 276 seconds]
t0rc1 has joined #ruby
natevick has quit [Client Quit]
codename539 is now known as dmitrykorotkov
Megtastique has joined #ruby
dmitrykorotkov has quit [Client Quit]
Soliah has quit [Quit: Soliah]
dmitrykorotkov has joined #ruby
sqwirl has joined #ruby
sinkensabe has joined #ruby
dmitrykorotkov is now known as Guest57387
sqwirl has quit [Client Quit]
Guest57387 has quit [Client Quit]
codename539 has joined #ruby
zz_karupa is now known as karupa
moneydouble has joined #ruby
sinkensabe has quit [Ping timeout: 240 seconds]
Nexus_x1 has joined #ruby
codename539 has quit [Client Quit]
codename539 has joined #ruby
mijicd has quit [Remote host closed the connection]
marr has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
codename539 has quit [Remote host closed the connection]
dmitrykorotkov has joined #ruby
noob101 has quit [Quit: Page closed]
yfeldblu_ has joined #ruby
dmitrykorotkov is now known as Guest37760
Guest37760 has quit [Client Quit]
agrinb_ has quit [Remote host closed the connection]
alexju has joined #ruby
Guest37760 has joined #ruby
agrinb has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
Guest37760 has quit [Remote host closed the connection]
b1205 has quit [Quit: Lost terminal]
redondo has joined #ruby
hakunin has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
Shidash has joined #ruby
agrinb has quit [Ping timeout: 245 seconds]
sdwrage has joined #ruby
hakunin has quit [Ping timeout: 240 seconds]
thomasxie has quit [Quit: Leaving.]
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
Takle has quit [Remote host closed the connection]
sepp2k1 has quit [Read error: Connection reset by peer]
jgx has joined #ruby
pyon has joined #ruby
lyanchih_ has joined #ruby
selite has joined #ruby
<selite>
What are some fun things to build in Ruby?
meatherl_ has joined #ruby
bluehavana has joined #ruby
Megtastique has quit []
danshultz has joined #ruby
mercwithamouth has joined #ruby
motoford_ has joined #ruby
Shidash has quit [Quit: Leaving.]
motoford_ is now known as motoford
d34th4ck3r has quit [Quit: zzz]
poikon has quit [Read error: Connection reset by peer]
poikon has joined #ruby
hgl has joined #ruby
<pipework>
selite: Anything.
tkuchiki has joined #ruby
meatherl_ has quit [Ping timeout: 258 seconds]
<selite>
pipework: How about a game, is it suited to build a game?
<pipework>
selite: Well, it depends on what you expect to do. You might need to use libraries in other languages in your game, but you can definitely use ruby as the glue for the building blocks.
<pipework>
I'm assuming you mean CRuby rather than any of the other implementations.
hakunin has joined #ruby
oo_ has joined #ruby
dawkirst has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
try has joined #ruby
combusean has joined #ruby
larissa has quit [Quit: Leaving]
yfeldblu_ has quit [Remote host closed the connection]
Atttwwww has joined #ruby
yfeldblum has joined #ruby
hakunin has quit [Ping timeout: 252 seconds]
Hanmac has joined #ruby
b1205 has joined #ruby
dawkirst has quit [Ping timeout: 252 seconds]
Megtastique has joined #ruby
axilla has joined #ruby
chrisseaton has quit []
combusean has quit [Ping timeout: 240 seconds]
Atttwww has quit [Ping timeout: 276 seconds]
prathamesh has joined #ruby
Hanmac1 has quit [Ping timeout: 252 seconds]
zzzbra has joined #ruby
Megtastique has quit [Client Quit]
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
mostlybadfly has joined #ruby
vivekpoola has joined #ruby
gaspyr has joined #ruby
<vivekpoola>
Hi all
iamcalledrob has quit [Quit: Computer has gone to sleep.]
BAMbanda has joined #ruby
<BAMbanda>
is ruby regexp identical to perl's? or is it a variant
axilla has quit [Ping timeout: 240 seconds]
<vivekpoola>
I have a question on the each method for arrays. Right now I am trying to create a method to sum consecutive numbers in a class Array. Here is my solution for doing that. However, I know that by having the values for the array in the method dont work since this method needs to work for consecutive numbers as well as random numbers. Here is the question, and here is what I have. Also, I cannot use inject yet
<vivekpoola>
question: Add a method named sum_numbers to the Array class. The method should sum all of the numbers in the Array that it's called on.
<vivekpoola>
I’m not sure how I do this for a random set of numbers in the array
danshultz has quit [Ping timeout: 252 seconds]
<BAMbanda>
vivekpoola, from the looks of it, since you are modifying the Array class itself, you need to apply the method to the elements of the array that you are calling and not on a fixed array defined inside of the method
<vivekpoola>
do you mind typin an example? it would be really helpful to see
<havenwood>
vivekpoola: commented on your gist
<havenwood>
vivekpoola: oh, no #inject you said
<vivekpoola>
awesome, so instead of just printing sum, thast where i would specify my values for the array? and also no inject
<vivekpoola>
yes correct
sambao21 has quit [Ping timeout: 240 seconds]
moneydouble has quit [Quit: Leaving.]
t0rc1 has left #ruby ["WeeChat 0.4.3"]
selite has quit [Quit: Page closed]
<havenwood>
vivekpoola: another comment
<havenwood>
vivekpoola: swap your `a` for a `self`
<vivekpoola>
okay so this method is specific to the class
<vivekpoola>
okay
<vivekpoola>
let me give it a shot
t0rc has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
t0rc has left #ruby [#ruby]
chrisseaton has joined #ruby
VinDH has quit [Remote host closed the connection]
chrisseaton has quit [Client Quit]
<vivekpoola>
Awesome, thanks @havenwood
robustus has joined #ruby
Gooder has quit [Read error: Connection reset by peer]
Gooder has joined #ruby
yoshiki__ has quit [Read error: Connection reset by peer]
prathamesh has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
prathamesh has joined #ruby
yoshiki__ has joined #ruby
try has quit [Ping timeout: 276 seconds]
lethe has joined #ruby
endash has quit [Quit: endash]
moneydouble has joined #ruby
prathamesh has quit [Ping timeout: 252 seconds]
b1205 has quit [Ping timeout: 240 seconds]
Slavox is now known as Slavox|AFK
lelerferfe has joined #ruby
Lewix has quit [Disconnected by services]
lelerferfe is now known as lewix
lewix has quit [Changing host]
lewix has joined #ruby
subbyyy has joined #ruby
<lambo>
how can i catch when the terminal is resized with curses? is it about Curses::Key::RESIZE ??
jgx has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lambo>
havenwood thx it seems goods , my script is still buggy but it doesnt crash anymore
trhodes_ has joined #ruby
hamakn has quit [Remote host closed the connection]
omosoj has joined #ruby
mary5030 has joined #ruby
Megtastique has joined #ruby
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby
lunaticedit\afk is now known as lunaticedit
d34th4ck3r has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
Arkaniad has joined #ruby
hakunin has quit [Ping timeout: 276 seconds]
Arkaniad has quit [Max SendQ exceeded]
freerobby has quit [Quit: Leaving.]
kitak_ has quit [Remote host closed the connection]
kitak_ has joined #ruby
hamakn has joined #ruby
mr_snowf1ake has quit [Quit: Leaving]
glenfe has joined #ruby
ashleyis has joined #ruby
krz has joined #ruby
kure_ has joined #ruby
bradhe has joined #ruby
lukec has joined #ruby
axilla has joined #ruby
VinDH has joined #ruby
centrx has joined #ruby
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sqwirl has joined #ruby
CpuID has joined #ruby
CpuID has quit [Remote host closed the connection]
axilla has quit [Ping timeout: 252 seconds]
radic has quit [Ping timeout: 252 seconds]
sdwrage has joined #ruby
lyanchih_ has quit [Quit: lyanchih_]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lambo>
i got an object with 2 curses window stored as instance variable, i made a thread with a loop for the signal trap and when trapped i overide the object with a new one but it is a mess ^^ any idea?
radic has joined #ruby
ritz has joined #ruby
lyanchih has joined #ruby
elshaka has joined #ruby
gaspyr has left #ruby [#ruby]
bmurt has joined #ruby
rexmortus has joined #ruby
<rexmortus>
gday m8s
aces1up9939 has joined #ruby
Hanmac has joined #ruby
sinkensabe has joined #ruby
<aces1up9939>
if i'm having multiple threads running a find operation on a hash, but no threads modify the hash at all, could this cause issues with find results if i do not make it thread safe?
michael_lee has joined #ruby
<centrx>
aces1up9939, I would think only reads access the hash, there would be no concurrency issues.
<elshaka>
is there a simple way to do a select on an array but at the same time have those selected items removed from said array?
<centrx>
aces1up9939, You can use #freeze to ensure that the hash is not altered
Hanmac1 has quit [Ping timeout: 264 seconds]
<elshaka>
right now i'm using: selected = original.select {|i| condition}; original -= selected
<centrx>
elshaka, #reject, #reject!, or #delete_if
dseitz has joined #ruby
<aces1up9939>
centrx is that really needed though?
d34th4ck3r has quit [Quit: zzz]
<aces1up9939>
centrx i mean multiple find operations would have an issue?
<centrx>
elshaka, #reject! or #delete_if will change the original array, #reject will return a new array
sinkensabe has quit [Ping timeout: 252 seconds]
phoo1234567 has quit [Quit: Leaving]
<centrx>
aces1up9939, It's more to expose any bugs right away, e.g. in development
<centrx>
there's no cost to using freeze
<aces1up9939>
centrx i see so it makes an exception if it attempts to be modified/
<aces1up9939>
?
<centrx>
Yes
<aces1up9939>
cool
<centrx>
aces1up9939, It is possible it does something internally to cauterize the object in a way that would be relevant to threading, but I don't know
<centrx>
aces1up9939, However, note that the objects inside the hash are not frozen
<centrx>
aces1up9939, And those can present a concurrency issue themselves. The hash will return the same object to multiple threads if it is the same
salt has joined #ruby
<Rylee>
what would be the idiomatic way to trim a string down to a max char length
salt has left #ruby [#ruby]
sdwrage has quit [Quit: This computer has gone to sleep]
<Rylee>
str.trim_to 512 #=> str if str.length <= 512; else first 512 chars of str
<centrx>
elshaka, You may want to use Array#partition, it will return two partitions, < 4 and >= 4
atraylen has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
lw has quit [Quit: s]
<centrx>
elshaka, Actually Enumerable#partition
danijoo has joined #ruby
<BAMbanda>
httparty
<BAMbanda>
:)
<elshaka>
centrx, brilliant, thank you so much!
BAMbanda has quit [Quit: Lost terminal]
<Rylee>
centrx, thanks
BAMbanda has joined #ruby
freerobby has quit [Ping timeout: 252 seconds]
<centrx>
You are welcome
Hobogrammer has quit [Read error: Connection reset by peer]
sdwrage has joined #ruby
<vivekpoola>
Hi all, can you take a look at this gist and let me know what I’m doing wrong? The exercise I am working on is asking me to add a method that will take the index value of an element’s position and add it to the string in the same position. so if I had an array [1,2,3], it should say [“0 is 1”, “1 is 2”, “2 is 3”]. I’m almost there in irb. I’ve been able to get those values, but they are split across diff lines. I’m posting the gist a
<vivekpoola>
is there another way you’d suggest without using .map? o
<havenwood>
vivekpoola: the #each way to do `[1, 2, 3].map { |n| n.to_s }` is for example `result = []; [1, 2, 3].each { |n| result << n.to_s }; result`
lewix has quit [Ping timeout: 258 seconds]
<havenwood>
vivekpoola: so in your case, `result = []` then instead of puts, `<<` into your array, then have your implicit return be `result`
poikon has quit [Remote host closed the connection]
danshultz has joined #ruby
<vivekpoola>
can you comment on my gist again, thanks havenwood
<havenwood>
vivekpoola: create the `result` array then replace `puts` with `result <<` then return `result`
<havenwood>
(inside your Array#add_index method)
danshultz has quit [Remote host closed the connection]
<lambo>
is there a way to block the resize capacity of virtual terminal?
danshultz has joined #ruby
<vivekpoola>
hm
<havenwood>
lambo: to prevent it from growing at all or or maxing at a certain size?
<lambo>
to prevent it to move since it pown my curses features xD
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
<havenwood>
vivekpoola: check gist
<aces1up9939>
is there something like split but for an array?
<vivekpoola>
thanks you @havenwood
<aces1up9939>
I would like to split array into sub_array based on delimiter / element
<havenwood>
aces1up9939: just do nothing and it's already split! :P
<havenwood>
aces1up9939: show example input with desired output?
<lambo>
i spawn a thread to look for the signal you said it works well but i cant figure out how to dynamicly resize my curses window i got some unexpected behaviors
RaptorJesus has quit [Write error: Connection reset by peer]
St_Marx has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
tacos1de has quit [Write error: Connection reset by peer]
end_guy has quit [Write error: Connection reset by peer]
Boohbah has quit [Write error: Connection reset by peer]
tiguser has quit [Ping timeout: 252 seconds]
raspberryfan has joined #ruby
prathamesh has quit [Remote host closed the connection]
prathamesh has joined #ruby
<vivekpoola>
I’m presented an array of books that I need to capitalize the first letter of each word, and ignore words such as “a, the, of” etc that dont need to be capitalized. I was able to write a method for each of the first letters for the list, but I’m unsure of how to ignore those other words. The hint says include? can help. Here is my gist: https://gist.github.com/vpoola88/cedcac863d535e509481
prathamesh has quit [Read error: Connection reset by peer]
kitak_ has quit [Remote host closed the connection]
havenwood has joined #ruby
<lambo>
well the :WINCH and $stdin.winsize do the job but my code is sloppy so i cant do what i want but i guess there is a way i just hope i wont have to rebuild the whole thing
<havenwood>
lambo: does this need to be portable, or running on a particular system?
St_Marx has joined #ruby
<vivekpoola>
so if it includes @foo, i have to write the condition I want which is downcase?
Boohbah has joined #ruby
<b1205>
vivekpoola: yes, or you could use unless
kitak_ has joined #ruby
prathamesh has quit [Remote host closed the connection]
<vivekpoola>
okay now a tricky one. Say I wnat to ignore “the”, unless its the first word of a book.. like “the lord of the rings”. I want it to say “The Lord of the Rings” but I’m not sure how to say dont capitlize ‘the’ unless its hte first word
<havenwood>
vivekpoola: or invert that statement, downcase it if it is the first word
kitak__ has joined #ruby
ritz has quit [Remote host closed the connection]
<havenwood>
vivekpoola: note they mention #include? and #downcase
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
<vivekpoola>
hm. okay let me look into that. thanks guys
ritz has joined #ruby
kitak_ has quit [Ping timeout: 240 seconds]
agrinb has joined #ruby
Royalb15 has quit [Read error: Connection reset by peer]
Royalb15 has joined #ruby
<lambo>
havenwood well its jsut for training purpose (chatrooms server using drb which ill like to extends with features in future) but i was hoping maybe getting it to run on windows to well i dont realy care in fact
saarinen has quit [Read error: Connection reset by peer]
<havenwood>
lambo: aha, interesting
prathamesh has quit [Ping timeout: 252 seconds]
tacos1de has joined #ruby
saarinen has joined #ruby
amargherio has quit [Remote host closed the connection]
<lambo>
i just love drb
omosoj has quit [Ping timeout: 240 seconds]
ritz_ has joined #ruby
ritz has quit [Read error: Connection reset by peer]
try has joined #ruby
amargherio has joined #ruby
<havenwood>
lambo: drb \o/
<havenwood>
(when it isn't segfaulting :P)
KillerFox has quit [Ping timeout: 252 seconds]
bradhe has quit [Remote host closed the connection]
end_guy has joined #ruby
<lambo>
lol even me i had it a few time with my low level code xD
KillerFox has joined #ruby
<havenwood>
lambo: i've been playing around with a wrapper for rinda/tuplespace. fun stuff but hard to find docs.
bradhe has joined #ruby
agrinb has quit [Remote host closed the connection]
agrinb has joined #ruby
<BAMbanda>
can someone help me understand why I can't install the httparty gem?
<BAMbanda>
havenwood, will I still be able to use it with ruby 2.1.2? and yes It's sudo
<lambo>
havenwood well the dRuby book (nice for beginner like me but scratch the surface) made my mind about starting realy learning ruby and linda/rinda i didnt play with it yet but it sounds sugars to
<mozzarella>
havenwood: ?
prathamesh has joined #ruby
<BAMbanda>
mozzarella, ahh ubuntu can be weird with permissions, or maybe I haven't tinkered with it enough
<havenwood>
lambo: hem, i think i might look into getting a copy - that sounds like an interesting read
<vivekpoola>
hm..still stuck
<havenwood>
BAMbanda: well, you're using the apt package for 1.9.3 - if you want to use Ruby 2.1.2 you're not now
<BAMbanda>
havenwood, I installed it with rvm
raspberryfan has quit []
<havenwood>
BAMbanda: then listen to mozzarella and no sudo
<havenwood>
BAMbanda: you have more than one Ruby installed
<havenwood>
BAMbanda: what do you get for: rvm current
<havenwood>
BAMbanda: so you're using a different `ruby` than `gem`
<havenwood>
BAMbanda: tell me?: rvm current
Dreamer3 has quit [Quit: Leaving...]
<BAMbanda>
havenwood, yeah its 2.1.2 and it worked without sudo
<BAMbanda>
that's pretty wierd, but cool
agrinb has joined #ruby
oo_ has quit [Remote host closed the connection]
prathamesh has quit [Remote host closed the connection]
bmurt has quit []
<havenwood>
BAMbanda: you can `rvm use system` or even uninstall system Ruby if you care to, or have more than one installed
prathamesh has joined #ruby
endash has joined #ruby
<lambo>
havenwood its by the author of the lib and its pretty nice i think the most interesting part is about rinda wich start being interesting even for seasoned rubyist -i guess
<havenwood>
BAMbanda: the debian way to manage them is with `update-alternatives` and until recent versions you had to set `ruby` and `gem` separately
<lambo>
bundler has his own way of resolving dependencies or it download true gem? because i have a crazy thing going on with gem (on both different box but both archlinux didnt try with other os) i cant install gems, i can query the repo, sometimes after launching the cmd about 30 times without exageration i can install one, but if i make a gem file and bundle install in the directory it works
oo_ has joined #ruby
<havenwood>
mozzarella: yeah, arch and fedora keep such nice up-to-date Rubies and do user installs so no sudo needed! makes it painful on debian-based systems, though they seem to be heading in the right direction at least.
iamcalledrob has joined #ruby
kure_ has quit [Quit: Leaving]
b1205 has quit [Ping timeout: 252 seconds]
sqwirl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has quit [Ping timeout: 240 seconds]
<havenwood>
lambo: just curious, but?: gem -v
<lambo>
havenwood 2.2.2
<havenwood>
lambo: i can't think of a reason RubyGems shouldn't be fetching em
oo_ has quit [Remote host closed the connection]
ashleyis has quit [Quit: WooChat 0.4.3]
<lambo>
but it was the same month ago with another when i debug it cry about SSL stuff
<havenwood>
lambo: maybe a .gemrc setting?
narcan has joined #ruby
<havenwood>
lambo: anything weird in ~/.gemrc
<lambo>
maybe i didnt touch it
<havenwood>
lambo: if there was an old source http instead of https maybe, i just don't know
<havenwood>
lambo: what's the error or it times out?
<havenwood>
lambo: dunno why it would, but does it work if instead of `bundle install` you `gem i -g`
SegFaultAX has quit [Excess Flood]
<havenwood>
guess it would rule out a magical Gemfile :P
<havenwood>
gem install --file Gemfile
lyanchih has quit [Quit: lyanchih]
<lambo>
ill try
<havenwood>
i'm guessing magical Gemfile's aren't involved though and it's some sort of proxy issue between you and RubyGems or something
<havenwood>
Gemfiles*
sinkensabe has joined #ruby
SegFaultAX has joined #ruby
dawkirst has quit [Ping timeout: 240 seconds]
bluehavana has quit [Quit: Connection closed for inactivity]
<lambo>
gem -g Gemfile worked for gli ^^
<havenwood>
huh... so a magical Gemfile
* havenwood
blinks
<havenwood>
lambo: well, that helps narrow the issue
<lambo>
so whats the matters?
<havenwood>
lambo: might try #rubygems, betcha drbrain would know
<lambo>
kk
<havenwood>
lambo: somehow the dependency resolvers are bypassing your (proxy?) issue
lxsameer has joined #ruby
<havenwood>
lambo: or an issue on the Githubs, but eventually people will come around in #rubygems
<havenwood>
lambo: if i think of anything i'll yell :P
<lambo>
dont wory i have plenty to do with std lib for now
<havenwood>
:)
himsin has joined #ruby
b1205 has joined #ruby
raspberryfan has joined #ruby
prathame_ has quit [Remote host closed the connection]
prathamesh has joined #ruby
<lambo>
i should try with other os see if its arch related but it would be suprizing (also i have very low conection dunno if it can be related)
try has quit [Ping timeout: 264 seconds]
fresham has joined #ruby
oo_ has joined #ruby
prathamesh has quit [Ping timeout: 252 seconds]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
Es0teric has quit [Quit: Computer has gone to sleep.]
duncannz has joined #ruby
himsin has quit [Quit: himsin]
elshaka has quit [Quit: Saliendo]
BAMbanda has quit [Remote host closed the connection]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
narcan has joined #ruby
kaspergrubbe has joined #ruby
diegoviola has joined #ruby
Shidash has joined #ruby
agrinb has quit [Remote host closed the connection]
lukec has quit [Quit: lukec]
charliesome has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
_JokerDoom has joined #ruby
kaspergrubbe has quit [Ping timeout: 264 seconds]
Rahul_Roy has quit [Quit: Connection closed for inactivity]
JokerDoom has quit [Ping timeout: 258 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
yfeldblum has joined #ruby
craigp has quit [Remote host closed the connection]
craigp has joined #ruby
Takle has joined #ruby
kies has quit [Quit: baaaaiiiiiiiiiii~]
Takle has quit [Ping timeout: 264 seconds]
Royalb15 has quit [Remote host closed the connection]
reference has joined #ruby
endash has joined #ruby
amargherio has quit [Remote host closed the connection]
<n_blownapart>
Hi I know this is a poorly written program, but why does 22 output the hash but throws an error on line 25 : undefined method 'keys' thanks
<n_blownapart>
havenwood: thanks so can we say ...
linuxnewb2 has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
<n_blownapart>
that once a puts statement returns nil, at the top level of the program there is nothing left to pass into factorize(600851475143).keys.max ? for lack of a better way to say it..
<n_blownapart>
havenwood: ^
reference-lost has joined #ruby
raspberryfan has quit [Remote host closed the connection]
<havenwood>
n_blownapart: calling `factorize(600851475143)` returns `nil` which you then call `keys` upon unto fail
<havenwood>
n_blownapart: just put `factors` as the last line to the method, just under the #puts
raspberryfan has joined #ruby
<havenwood>
n_blownapart: then it'll return the `factors` Hash it seems you're trying to get at
<n_blownapart>
havenwood: yeah thanks one sec
<AlexRussia>
morning
<havenwood>
g'evening
lyanchih_ has joined #ruby
reference has quit [Ping timeout: 264 seconds]
<n_blownapart>
bingo havenwood thanks
<havenwood>
n_blownapart: no prob
freerobby has joined #ruby
saarinen has quit [Quit: saarinen]
fantazo has joined #ruby
Es0teric has joined #ruby
Morkel has joined #ruby
JasmeetQA has joined #ruby
nnu has joined #ruby
timonv has joined #ruby
freerobby has quit [Ping timeout: 252 seconds]
axilla has joined #ruby
alexju has quit [Remote host closed the connection]
<n_blownapart>
havenwood: When calling `factorize(600851475143)` returns `nil` , is that strictly because the final statement in the method returns a 'nil' into the top level , so to speak?
<havenwood>
n_blownapart: not top level, but the method returns `nil` because the #puts on its last line is implicitly returned
zcreative has quit [Quit: Computer has gone to sleep.]
<havenwood>
meant to show `nil` >.>
<havenwood>
anyways, it returns nil i promise
<havenwood>
n_blownapart: so unless you explicitly return early the method will implicitly return the last line
duncannz has quit [Ping timeout: 276 seconds]
phansch has joined #ruby
<havenwood>
n_blownapart: puts is nil, so it returns nil
axilla has quit [Ping timeout: 245 seconds]
<havenwood>
n_blownapart: it doesn't return `factor` unless you put that last
<havenwood>
n_blownapart: you basically put `nil` as the last line by having it be a #puts
<n_blownapart>
oh so essentially when we call the method with the argument on line 25, all the entire method does is return a big fat nil ?
<havenwood>
n_blownapart: yeah, it prints some stuff to standard out then returns `nil` every time
<havenwood>
n_blownapart: if you put `factors` below line 22, below the puts so it is last, then the `factors` hash will be returned instead of `nil`
yfeldblum has quit [Read error: Connection reset by peer]
sigurding has joined #ruby
sunya7a has joined #ruby
yfeldblum has joined #ruby
sunya7a has quit [Changing host]
sunya7a has joined #ruby
<n_blownapart>
havenwood: that is interesting. But returning anything (the hash in this case) instead of nil will allow the program to work with an argument.. havenwood
bradhe has quit [Remote host closed the connection]
tjsousa_ has quit [Remote host closed the connection]
tjsousa_ has joined #ruby
coderhs has joined #ruby
timonv has joined #ruby
frosgy has quit [Ping timeout: 264 seconds]
Xeago_ has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
iamcalledrob has joined #ruby
ltdl has quit [Ping timeout: 252 seconds]
lessless has joined #ruby
<lessless>
is this an idiomatic method for dynamic module mixin @stadium.track.class_eval('include TrackDecorator') ?
moritzs has quit [Ping timeout: 252 seconds]
<Hanmac1>
lessless: #extend ?
Hanmac1 is now known as Hanmac
narendraj9__ has quit [Remote host closed the connection]
<lessless>
Hanmac, extend adds methods as class methods, isn't it?
<apeiros>
lessless: @stadium.track returns a class?
<ari-_-e>
or just #include
iamcalledrob has quit [Ping timeout: 264 seconds]
<lessless>
apeiros, yes
<ari-_-e>
then there's Module#include
<apeiros>
lessless: I don't think it's common/idiomatic to alter a whole class from within a method
<lessless>
ari-_-e, ndefined method `include' for #<Track:0x007f0440923c90> :(
<apeiros>
lessless: that's not a class then
<ari-_-e>
lessless: you said that @stadium.track is a class
<ari-_-e>
lessless: did you lie?
<apeiros>
Track is a class, #<Track: …> is an *instance* of Track
<apeiros>
extend then, as Hanmac said
tjsousa_ has quit [Quit: Computer has gone to sleep.]
axilla has joined #ruby
hgl has quit [Ping timeout: 240 seconds]
<Hanmac>
even more fun is singleton_class.prepend ;P
shvelo has quit [Ping timeout: 252 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lessless>
ari-_-e, if so it was unintentionally :P
<apeiros>
ari-_-e: giving wrong information about your own problem is usually ignorance, not deception
<apeiros>
(in the context of irc, at least :-p)
freerobby has joined #ruby
hgl has joined #ruby
justinxreese has quit [Ping timeout: 246 seconds]
Takle has quit [Remote host closed the connection]
Takle has joined #ruby
<lessless>
at least I'm not holding on my ignorance :)
axilla has quit [Ping timeout: 240 seconds]
justinxreese has joined #ruby
<lessless>
Hanmac, singleton_class.prepend is something cool
<apeiros>
ingorance is easily beaten by learning :-)
Xeago_ has joined #ruby
<lessless>
doing that every day ;)
Xeago has quit [Read error: Connection reset by peer]
<lessless>
except sundays :D
jilk23 has quit [Ping timeout: 245 seconds]
freerobby has quit [Ping timeout: 240 seconds]
tjsousa_ has joined #ruby
tjsousa_ has quit [Remote host closed the connection]
jilk23 has joined #ruby
flughafen has joined #ruby
brunops has quit [Ping timeout: 245 seconds]
brunops has joined #ruby
agjacome has joined #ruby
danielpclark has quit [Quit: Leaving]
andrewhl has joined #ruby
moritzs has joined #ruby
coderhs has quit [Ping timeout: 264 seconds]
moritzs has quit [Ping timeout: 240 seconds]
endash has joined #ruby
moritzs has joined #ruby
agrinb has joined #ruby
agrinb_ has joined #ruby
kris has joined #ruby
terlar has quit [Quit: WeeChat 0.4.3]
bradhe has joined #ruby
terlar has joined #ruby
fabrice31 has quit [Remote host closed the connection]
endash has quit [Ping timeout: 240 seconds]
agrinb has quit [Ping timeout: 240 seconds]
Rahul_Roy has joined #ruby
Hanmac1 has joined #ruby
moritzs has quit [Ping timeout: 240 seconds]
Hanmac has quit [Ping timeout: 240 seconds]
bradhe has quit [Ping timeout: 245 seconds]
brunops has quit [Ping timeout: 252 seconds]
kris has quit [Quit: Computer has gone to sleep.]
sgflt has joined #ruby
frobrob has joined #ruby
agjacome has quit [Ping timeout: 252 seconds]
jack_rabbit has joined #ruby
andrewhl has quit [Quit: andrewhl]
<sgflt>
i have a shell script in a string that i want to write out. what's the most idiomatic way to replace a few variables in there (not shell variables, just any sort of string formatting)?
<sgflt>
ari-_-e, the equivalent of python's string % ('a', 'b', 'c') or preferably string.format(....)
GriffinHeart has joined #ruby
User458764 has joined #ruby
<sgflt>
ari-_-e, does % work pretty much the same, or do i need to prepare for surprises?
<ari-_-e>
sgflt: I mean what do you need to replace in the string?
poikon has joined #ruby
User458764 is now known as User458764_NotHe
User458764_NotHe is now known as User458764
<sgflt>
ari-_-e, user names, for example, in the generated shell script
User458764 is now known as User458764_NotHe
<sgflt>
ari-_-e, there appears to a multitude of ways to achieve the same thing (so far i've found #{} and %) and i'm not apt at navigating the docs yet =/
<ari-_-e>
the problem is that you can never really know that you're only replacing what you want to when the string is actually code
<ari-_-e>
dealing with code in a string is nasty business
<ari-_-e>
and often leads to security issues
<sgflt>
ari-_-e, the string is a string literal. it's a 6 line shell script inside a Vagrantfile. it needs to have a username and password filled in from elsewhere. those are manageable parameters =/
<ari-_-e>
sgflt: so can't you just interpolate them?
<sgflt>
ari-_-e, that's what i'm doing. i was just wondering about common/best practices. i'm new to ruby and don't want to get started on the wrong idioms
<ari-_-e>
yeah, with #{}
<ari-_-e>
well, if you're comfortable writing code in a string then that's perfectly idiomatic, yes
marr has quit [Ping timeout: 276 seconds]
<ari-_-e>
sub/gsub would not be what you want
<sgflt>
ari-_-e, now i just need to find the official reference docs on that
<ari-_-e>
sgflt: well, string interpolation is part of the syntax
sumark_ has quit [Remote host closed the connection]
<lambo>
i got some crapy margins in the buttom and sides of xterm and urxvt screen with curses but on the other hand its all right from tty and from windows cmd.exe some1 has an idea what can be messing with it?
sumark has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
<SchrodingerDog>
still cant get it working.
ndrei has joined #ruby
_bart has joined #ruby
kitak has quit [Remote host closed the connection]
Hanmac has joined #ruby
kitak has joined #ruby
yakko_ has joined #ruby
Hanmac1 has quit [Ping timeout: 245 seconds]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
porco has joined #ruby
RaptorJesus has joined #ruby
banister has joined #ruby
yakko has quit [Ping timeout: 264 seconds]
iamcalledrob has joined #ruby
Rubass has joined #ruby
Rubass has quit [Changing host]
Rubass has joined #ruby
kaspergrubbe has joined #ruby
<lambo>
wai i squelch?
<lambo>
*was i
moritzs has joined #ruby
mercwithamouth has joined #ruby
_bart has quit [Ping timeout: 240 seconds]
frobrob has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iamcalledrob has quit [Ping timeout: 240 seconds]
kaspergrubbe has quit [Remote host closed the connection]
yacks has quit [Quit: Leaving]
r00ster has joined #ruby
Megtastique has joined #ruby
agjacome has joined #ruby
axilla has joined #ruby
<SchrodingerDog>
i have no idea what is wrong
obs has joined #ruby
Takle has quit [Remote host closed the connection]
freerobby has joined #ruby
Vivekananda has joined #ruby
bradhe has joined #ruby
akonny has quit [Quit: akonny]
freerobby has quit [Ping timeout: 252 seconds]
franzip has joined #ruby
yfeldblu_ has joined #ruby
alexju has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
yfeldbl__ has joined #ruby
oo_ has quit [Remote host closed the connection]
Ginfuru has joined #ruby
yfeldblu_ has quit [Ping timeout: 252 seconds]
akonny has joined #ruby
oo_ has joined #ruby
alexju has quit [Ping timeout: 264 seconds]
yfeldbl__ has quit [Ping timeout: 264 seconds]
Ginfuru_ has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
Ginfuru has quit [Ping timeout: 240 seconds]
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
davedev24_ has joined #ruby
andrewlio has quit [Quit: Leaving.]
yfeldblum has quit [Ping timeout: 245 seconds]
endash has joined #ruby
craigp has quit []
jgx_ has joined #ruby
SchrodingerDog has quit [Ping timeout: 240 seconds]
youvender has joined #ruby
freerobby has joined #ruby
motoford has quit [Quit: motoford]
Takle has joined #ruby
krz has joined #ruby
agjacome has quit [Quit: leaving]
endash has quit [Ping timeout: 258 seconds]
ndngvr` has joined #ruby
oo_ has quit [Remote host closed the connection]
GriffinHeart has quit [Remote host closed the connection]
youvender has left #ruby [#ruby]
ruboco has joined #ruby
tkuchiki_ has joined #ruby
akonny_ has joined #ruby
akonny has quit [Ping timeout: 240 seconds]
<ruboco>
Hi, quick question ! I have two Module Object (V1 and Foobar) both located in two different variables, I would like to concatenate them in order to do a .const_get call on it. Any idea?
ndngvr has quit [Ping timeout: 276 seconds]
akonny_ is now known as akonny
tkuchiki has quit [Ping timeout: 258 seconds]
SCommette has joined #ruby
tkuchiki_ has quit [Ping timeout: 258 seconds]
mijicd has joined #ruby
subraminion has quit [Quit: Computer has gone to sleep.]
lewix has quit [Remote host closed the connection]
<Hanmac>
ruboco: question, in the variable do you have V1 inside it as the class object itself, or do you have "V1" inside as the string?
<ruboco>
V1 as the class object itself
RealMarc is now known as Marc
yacks has joined #ruby
LekeFly has joined #ruby
_bart has joined #ruby
Marc is now known as Guest3776
nomadic has quit [Ping timeout: 255 seconds]
nomadic has joined #ruby
bmurt has joined #ruby
akonny has quit [Quit: akonny]
Jake232 has joined #ruby
ParanoidSP has quit [Ping timeout: 240 seconds]
roberto_ has joined #ruby
bmurt_ has joined #ruby
roberto_ has quit [Remote host closed the connection]
robertodecurnex has joined #ruby
mikecmpbll has quit [Ping timeout: 276 seconds]
ndrei has quit [Quit: Lost terminal]
jespada has joined #ruby
bmurt has quit [Ping timeout: 265 seconds]
mikecmpbll has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
<ruboco>
Hanmac: any idea? :(
alem0lars has quit [Quit: Going AFK...]
bmurt has joined #ruby
<Hanmac>
variable::FooBar does work if the name is fixed
_bart has quit [Ping timeout: 255 seconds]
tkuchiki has joined #ruby
bmurt_ has quit [Ping timeout: 265 seconds]
Baked has joined #ruby
Ankhers has joined #ruby
Lo^66 has joined #ruby
spider-mario has joined #ruby
Gooder` has joined #ruby
simono has joined #ruby
Squarepy has quit [Ping timeout: 252 seconds]
iamcalledrob has joined #ruby
banister has joined #ruby
Loaft has quit [Ping timeout: 264 seconds]
<ruboco>
Hanmac: NoMethodError: undefined method `second_namespace' for V1:Module with : namespace::second_namespace, I could do something with string versions of these modules names but it forces me to create two temporary objects.
echevemaster has joined #ruby
Loaft has joined #ruby
<Hanmac>
if second_namespace is already the object, why do you need :: or const_get ?
kotk has joined #ruby
Baked has quit [Ping timeout: 252 seconds]
Baked has joined #ruby
armyriad has quit [Ping timeout: 258 seconds]
iamcalledrob has quit [Ping timeout: 252 seconds]
Lo^66 has quit [Ping timeout: 258 seconds]
banister has quit [Client Quit]
bradhe has joined #ruby
poikon has quit [Remote host closed the connection]
noop has quit [Ping timeout: 276 seconds]
alem0lars has joined #ruby
<ruboco>
Hanmac: The originale line of code is _module.const_get "#{resource.class.name}Serializer" the const_get fails if the resource.class.name also have a namespace (Foobar::User). Instead of doing a const_get on V1::Foobar it does the call on V1 only.
Loaft has quit [Ping timeout: 276 seconds]
Baked is now known as Loaft
<Hanmac>
ruboco: use newer ruby version, in recent version its possible too
Macaveli has quit [Read error: Connection reset by peer]
GriffinHeart has joined #ruby
andrewjanssen has joined #ruby
mikemac has quit [Remote host closed the connection]
mikemac has joined #ruby
GriffinHeart has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
GriffinHeart has joined #ruby
Loaft has joined #ruby
sinkensabe has quit [Ping timeout: 252 seconds]
Ankhers has quit [Ping timeout: 272 seconds]
mercwithamouth has joined #ruby
ta has joined #ruby
stef_204 has joined #ruby
endash has joined #ruby
lukec has joined #ruby
bal has quit [Quit: bal]
alem0lars has quit [Quit: Going AFK...]
omosoj has quit [Ping timeout: 276 seconds]
omosoj has joined #ruby
alem0lars has joined #ruby
sinkensabe has joined #ruby
gregf has quit [Quit: WeeChat 0.4.3]
pothibo has joined #ruby
gverri has joined #ruby
endash has quit [Ping timeout: 245 seconds]
hamakn has quit [Remote host closed the connection]
osvimer has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
IceDragon has joined #ruby
NukePuppy has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<toretore>
adac: EM.add_timer
banister has joined #ruby
osvimer has quit [Client Quit]
Hanmac1 has joined #ruby
lethe has quit [Remote host closed the connection]
adac has quit [Ping timeout: 265 seconds]
Hanmac has quit [Ping timeout: 264 seconds]
diegovio1 has joined #ruby
Baked has joined #ruby
diegoviola has quit [Ping timeout: 255 seconds]
Loaft has quit [Ping timeout: 255 seconds]
GriffinHeart has joined #ruby
diegovio1 is now known as diegoviola
Vivekananda has joined #ruby
<axilla>
man, i just had some killer aha moments :)
<axilla>
i love programming
<axilla>
lol.
fabrice31 has quit [Remote host closed the connection]
bakflash has joined #ruby
Baked is now known as Loaft
jzig has joined #ruby
linoj has quit [Ping timeout: 252 seconds]
coderhs has quit [Ping timeout: 252 seconds]
jzig has left #ruby [#ruby]
lw has joined #ruby
crome has joined #ruby
<crome>
makk
oo_ has joined #ruby
<shevy>
axilla what aha moments
EatMulti has quit [Quit: leaving]
sinkensabe has quit [Remote host closed the connection]
GriffinHeart has quit [Remote host closed the connection]
<crome>
hey chewy
shvelo has joined #ruby
sinkensabe has joined #ruby
sigurding has quit [Quit: sigurding]
t0rc has joined #ruby
<axilla>
shevy, just working through some codeschool stuff on ruby and seeing how i can refactor my code to make it dryer and things.
jcarouth has quit [Excess Flood]
<shevy>
hey gnome
fantazo has quit [Ping timeout: 252 seconds]
<axilla>
i got my first full time development job in the back of my html/css/etc chops but I need to sharpen my ruby/rails skills.. they're super weak.
i_s has joined #ruby
<axilla>
I up until this weekend could make a simple crud app/blog whatever in rails..
<axilla>
i had gotten that far just building frontends for it.
<axilla>
but, i'm working now for a company with a great app in midstage growth.. :) needed to sharpen my ruby chops.
bradhe has joined #ruby
sinkensabe has quit [Ping timeout: 264 seconds]
infinitone has joined #ruby
lw has quit [Quit: s]
LadyRainicorn has joined #ruby
fresham has joined #ruby
hamakn has joined #ruby
dangerousdave has quit []
sheperson has quit [Ping timeout: 255 seconds]
sheperson_ has joined #ruby
lukec has quit [Quit: lukec]
bradhe has quit [Ping timeout: 264 seconds]
rippa has joined #ruby
omosoj has quit [Ping timeout: 258 seconds]
Ankhers has joined #ruby
cashnguns has quit [Ping timeout: 276 seconds]
asramos has quit [Quit: Idle as a wolf!]
iamcalledrob has joined #ruby
marr has quit []
krz has joined #ruby
pwh has quit []
yfeldblum has joined #ruby
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lambo has quit [Quit: leaving]
Levenstein has joined #ruby
Takle has quit [Remote host closed the connection]
iamcalledrob has quit [Ping timeout: 258 seconds]
pyon has quit [Quit: brb]
omosoj has joined #ruby
avril14th has quit [Quit: Page closed]
eka_ has joined #ruby
lukec has joined #ruby
andikr has quit [Remote host closed the connection]
<shevy>
Quote: "But then I found out that a function can't accept multiple blocks -- violating the principle that closures can be passed around freely as values."
picca has joined #ruby
<shevy>
that reminds me how you once wanted to have multiple blocks to methods in ruby
eka has quit [Ping timeout: 276 seconds]
_JokerDoom has quit [Quit: Leaving]
<LadyRainicorn>
Doesn't everyone want that?
JokerDoom has joined #ruby
<shevy>
dunno
* LadyRainicorn
thinks blocks are not a well designed feature.
Takle has joined #ruby
<shvelo>
lel
Dysruption has joined #ruby
<shvelo>
blocks can be used to create lambdas
<shevy>
sometimes in ruby considering that there are several ways to achieve something, it can be confusing
sheperson_ has quit [Ping timeout: 240 seconds]
<shvelo>
yeah
t0rc has left #ruby ["WeeChat 0.4.3"]
<LadyRainicorn>
Yes, but it's annoying and weirf and violates everything-is-an-object.
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<LadyRainicorn>
I really don't like how methods work in Ruby tbh.
kitak has quit [Remote host closed the connection]
i_s has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
sheperson has joined #ruby
<toretore>
closures aren't "passed around freely as values"
<toretore>
functions are
dANOKELOFF has quit [Remote host closed the connection]
kitak has joined #ruby
dumdedum has quit [Quit: foo]
sdwrage has joined #ruby
<toretore>
a closure just describes the fact that the function's scope is the same as it was when it was defined
sdwrage has quit [Remote host closed the connection]
dilated_dinosaur has joined #ruby
eka has joined #ruby
frobrob has quit [Ping timeout: 240 seconds]
<centrx>
LadyRainicorn, Methods are messages, not objects
alvaro_o has joined #ruby
<LadyRainicorn>
Yes. I dislike how this works.
<centrx>
Why?
<LadyRainicorn>
map(&method(:mymeth))
<LadyRainicorn>
^ ugly as fuck
<centrx>
no one ever does that
<LadyRainicorn>
They would if it wasn't so ugly!
<JokerDoom>
lol
sigurding has joined #ruby
eka_ has quit [Ping timeout: 264 seconds]
sigurding has quit [Client Quit]
<LadyRainicorn>
and multifunc(->{1}){2}
sigurding has joined #ruby
<LadyRainicorn>
^ icky
_infinitone has joined #ruby
* LadyRainicorn
wants multifunc({1},{2})
_infinitone has quit [Remote host closed the connection]
<shevy>
I think & is an ugly operator
<shevy>
and so is ->()
<LadyRainicorn>
Yes!
<shevy>
actually -> is even worse
<centrx>
They should be replaced with :)
<shevy>
>> :)
<eval-in__>
shevy => /tmp/execpad-2769824979dd/source-2769824979dd:2: syntax error, unexpected ')', expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END (https://eval.in/156749)
<shevy>
hmm
<centrx>
>> -> (stab) { stab.stab }
<shevy>
lol
<crome>
stab! its hammertime
<shevy>
you can put a blank after the -> ?
<LadyRainicorn>
centrx: alias ♥ lambda
cocotton has quit [Remote host closed the connection]
<LadyRainicorn>
♥{puts "yay!"}
lw has joined #ruby
shvelo has quit [Ping timeout: 276 seconds]
<LadyRainicorn>
And yield. why do you need a keyword when it could just be passed as a variable?
parzzix has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.3]
<centrx>
LadyRainicorn, You don't have to use yield
brunto has left #ruby [#ruby]
<LadyRainicorn>
I know, though if you don't there's a performance penalty.
pwh has joined #ruby
m_3 has quit [Remote host closed the connection]
jottr has joined #ruby
heftig has quit [Quit: Quitting]
pwh has quit [Client Quit]
infinitone has quit [Remote host closed the connection]
_infinitone has joined #ruby
Zetsuboushitaaa has joined #ruby
<havenwood>
blocks are perfect, PERFECT!
Deejay_ has joined #ruby
lkba has quit [Ping timeout: 276 seconds]
bluenemo has quit [Remote host closed the connection]
endash has joined #ruby
<LadyRainicorn>
lol havenwood
Jutsu has joined #ruby
<Jutsu>
please help me by clicking this link, one click will change my IRC life http://adf.ly/oKTzN
Jutsu has quit [Killed (idoru (Spam is off topic on freenode.))]
* LadyRainicorn
holds up a sign, "We want real functions! Down with blocks!"
_infinitone is now known as infinitone
Zetsuboushitaaa has left #ruby [#ruby]
linoj has joined #ruby
timonv_ has quit [Remote host closed the connection]
* centrx
declares no problem
centrx has quit [Quit: Mission accomplished. Ready for self-termination.]
Ginfuru_ has quit [Quit: Computer has gone to sleep.]
Ginfuru_ has joined #ruby
pyon has quit [Quit: annoying emacs]
cocotton has joined #ruby
omosoj has quit [Ping timeout: 276 seconds]
cocotton has quit [Remote host closed the connection]
<crome>
Im wondering how an IRC life can be changed
cocotton has joined #ruby
<crome>
also, why would anyone want to change their IRC life?
try has quit [Quit: derpity derp]
centrx has joined #ruby
<davedev24_>
hey guys, any newbies around learning Ruby on Rails? if so check out codeschool https://www.codeschool.com/account through this link you can 2 days free to try all lessons. I get 2 more days if you join. No credit card required.
magri has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 240 seconds]
<Dysruption>
probably not a good place for that, plus codeschool’s lessons are pretty bad IMO
<LadyRainicorn>
Change an IRC life?
obs has quit [Remote host closed the connection]
<allen>
Dysruption, they are pretty good for beginners
<crome>
LadyRainicorn: apparently
<havenwood>
davedev24_: Rails in #rubyonrails
<Dysruption>
allen: when i was a beginner I did them, got nothing out of htem
<davedev24_>
ah i see
<Dysruption>
felt there was a lot of fluff and it was very watered down
carraroj has joined #ruby
<Dysruption>
but to each his own
Ginfuru_ has quit [Ping timeout: 240 seconds]
<davedev24_>
hey Dysruption what helped you out most? I made an app a few days ago, and I follow Hartls Tutorial
<davedev24_>
so hopefully that balances things out
<allen>
Dysruption, how did you embark on your Ruby journey?
<axilla>
i think codeschools lessons are pretty good.
<LadyRainicorn>
Most things oriented towards complete beginmerd are like that.
<axilla>
i just finished the Try Ruby and then Ruby Bits 1 and it's helped me refactor my code pretty well. I already have been using ruby for a bit though.
sigurding has quit [Read error: No route to host]
wertin has joined #ruby
<Dysruption>
davedev24_: as far as rails goes, sounds like you’re on the right track. the best thing to do is keep making apps, then read after your done with each app
prathamesh has quit [Remote host closed the connection]
<davedev24_>
yeah
<Dysruption>
that way each lesson you read about will solidify because you will have made mistakes
<axilla>
allen: trial and error
prathamesh has joined #ruby
<allen>
axilla, yea that's the best. IRB :)
<davedev24_>
Dysruption: I cant tell you how happy I was to know where routes.rb is located. yes. I'm moving that slow.
<Dysruption>
it’s hard for ‘best practices’ to solidify unless you haven’t made the mistakes in the first place
<davedev24_>
right
<Dysruption>
unless you have*
sigurding has joined #ruby
<axilla>
for learning rails i wish i had learned ruby first.
<davedev24_>
also I've been having alot of fun with Why's Guide
freggles has joined #ruby
<axilla>
i did it the other way..
<davedev24_>
ah
<Dysruption>
rails is a huge beast. why’s guide is fantastic. Eloquent Ruby is fantastic
<axilla>
Dysruption: i used why's guide through codeschool.. its still great
<Dysruption>
but again, you cannot beat real coding experience. code, then read.
<allen>
Why's guide is the best
<davedev24_>
really I've been on a path of total immersion.
<davedev24_>
yeah
<axilla>
yea i'm working on becoming a ruby master :) so that i can sharpen my rails abilities.
<Dysruption>
axilla, did you have prior programming experience?
<axilla>
i've spent this weekend just working through everything ruby and its going to be awesome diving back into work tomorrow :)
mehlah has quit [Quit: Leaving...]
<axilla>
Dysruption: yes, i've been coding since Turbo Pascal and QBasic
derrida has joined #ruby
<allen>
axilla, i respect you as you are my senior
<axilla>
I started writing code when i was a kid.
<Dysruption>
and you found codeschool helpful? wow
<axilla>
I like them, yes.
<Dysruption>
different styles of learning i suppose
<axilla>
i like the learn and do.
<Dysruption>
i mean i am a practical learner, it just wasn’t holistic
<axilla>
i'm a hands on learner and codeschool is an interactive hands on approach
wallerdev has joined #ruby
<axilla>
yea it really is learning styles i think.
ikaros has quit [Quit: Ex-Chat]
mehlah has joined #ruby
gorpon has joined #ruby
<Dysruption>
important to realize that ruby is beeautiful with rails
<axilla>
i've done lynda.com in the past for other things.. i dunno i was just trying it out and have enjoyed them.
<Dysruption>
*without rails
<axilla>
yea it is :)
<axilla>
i wish i had done ruby first.. i learned all about rails and realized I had no clue about ruby.
prathamesh has quit [Ping timeout: 258 seconds]
<axilla>
things I expected to do one thing did others.
<axilla>
||= tangled for awhile.
<Dysruption>
heh
<axilla>
and just the ruby way
<derrida>
always learn language before library..
<Dysruption>
read eloquent ruby?
prathamesh has joined #ruby
<axilla>
nope
<Dysruption>
i guaruntee you’ll leave with many knowledge gems
bradhe has joined #ruby
<axilla>
well, most of the rails i learned was so that I could work on frontends.. now i'm getting to do some full stack stuff and loving learning about ruby so :)
<Dysruption>
ahh
timfoo has quit [Ping timeout: 255 seconds]
nvrch has quit [Quit: nvrch]
User458764 has joined #ruby
timfoo has joined #ruby
amargherio has joined #ruby
Shidash has quit [Ping timeout: 276 seconds]
Morkel has joined #ruby
bradhe has quit [Ping timeout: 258 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hgl has quit [Ping timeout: 240 seconds]
prathamesh has quit [Remote host closed the connection]
prathamesh has joined #ruby
pyon has joined #ruby
<lessless>
how to convert integer to another base without changing its type to string?
olivier_bK has quit [Ping timeout: 264 seconds]
<apeiros>
lessless: integers do not have a base
<toretore>
that doesn't make any sense
<apeiros>
a number is a number. bases are for representations.
yfeldblum has joined #ruby
pskosinski has joined #ruby
endash has joined #ruby
timonv has joined #ruby
prathamesh has quit [Ping timeout: 252 seconds]
Takle has quit [Remote host closed the connection]
<centrx>
oh come now
mercwithamouth has joined #ruby
deric_skibotn has joined #ruby
timonv_ has joined #ruby
fresham has quit [Ping timeout: 245 seconds]
Darryl_ is now known as Darryl
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
User458764 is now known as User458764_NotHe
<apeiros>
lessless: mind telling what you intended to achieve?
allen has quit [Ping timeout: 252 seconds]
User458764_NotHe is now known as User458764
iamcalledrob has joined #ruby
Takle has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
trhodes_ has quit [Ping timeout: 264 seconds]
Shidash has joined #ruby
chipotle has quit [Quit: cya]
bmurt has quit []
timonv has quit [Ping timeout: 258 seconds]
dik_dak has joined #ruby
mercwithamouth has quit [Ping timeout: 258 seconds]
yakko has quit [Ping timeout: 240 seconds]
osvimer has joined #ruby
lethe has joined #ruby
mercwithamouth has joined #ruby
<dideler|work>
do you indent your private methods or align them with the private keyword?
iamcalledrob has quit [Ping timeout: 265 seconds]
<havenwood>
dideler|work: align
trhodes_ has joined #ruby
einarj has quit [Remote host closed the connection]
sunya7a has joined #ruby
Freddan962 has joined #ruby
omosoj_ has quit [Quit: Leaving]
akonny has joined #ruby
Jake232 has joined #ruby
lethe has quit [Ping timeout: 252 seconds]
<apeiros>
dideler|work: I deindent `private`
ursooperduper has joined #ruby
<apeiros>
also, it's not a keyword, it's a method
mercwithamouth has quit [Ping timeout: 245 seconds]
subbyyy has joined #ruby
robert_ has joined #ruby
robert_ has joined #ruby
robert_ has quit [Changing host]
schickung has quit [Quit: schickung]
mercwithamouth has joined #ruby
sunya7a has quit [Ping timeout: 240 seconds]
<lessless>
apeiros, convert this code from js to ruby parseInt(time % 60, 10)
<havenwood>
dideler|work: now that methods return a Symbol you can even: private def example()
robert_ has quit [Max SendQ exceeded]
Su7_ is now known as Su7
<dideler|work>
apeiros: thanks. never thought of deindenting `private`, i like it
<dideler|work>
havenwood: i also like that
mercerist has quit [Quit: Computer has gone to sleep.]
cashnguns has joined #ruby
<apeiros>
lessless: that code is… stupid?
<apeiros>
op % 60 # <-- causes js to treat the value as number anyway
sinkensabe has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
sinkensabe has joined #ruby
aspires has quit []
akonny has quit [Quit: akonny]
jilk23 has quit [Ping timeout: 252 seconds]
sinkensa_ has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
aspires has joined #ruby
<shevy>
hmm if I have an array like ['abc','10','def','20'] how would I iterate over it by using 2 pairs each? so that 'abc' and '10' would go together
<shevy>
this heat here is killing me :(
<ddv>
nope ur still here
<centrx>
shevy, array.chunk(2) { } I think it is
yfeldblum has joined #ruby
sinkensa_ has quit [Remote host closed the connection]
<centrx>
shevy, scratch that, it's each_slice
<shevy>
ddv yeah but my brain is misplaced sort of
<jimbow>
it's completely useless, but i feel like it's a step forward in the right direction
<crome>
Im wondering about the def ccn bit
<jimbow>
oh yeah i could make the code shorter
<jimbow>
i see it
<Morrolan>
Right now you are using a method, when a variable would be somewhat, uh, more sensible.
<Morrolan>
"def foo_bar" defines a method called foo_bar.
<centrx>
it's an experiment!
<Hanmac>
hey, Quintus a friend of mine did make a script that can turn the defined ruby classes with included modules into a gv file parsable for dot/graphicz ;P
pskosinski has quit [Quit: Til rivido Idisti!]
sheperson has quit [Ping timeout: 265 seconds]
ndrei has joined #ruby
<jimbow>
so def would be best sued when it's doing some sort of math thing right?
<Morrolan>
I assume this is the first programming language you're learning?
maximski has joined #ruby
<jimbow>
yes
<jimbow>
used*
<crome>
jimbow: keep practicing!
<Morrolan>
def defines a method. A method is a way of bundling together code, which can be executed later on.
<jimbow>
this is going to be rev 2
sunya7a has joined #ruby
<jimbow>
i think i have a feeling what you're talking about crome
<jimbow>
brb redoing code
<Morrolan>
In this case, you'll just want a variable, i.e. a container for a value.
carraroj has quit [Ping timeout: 252 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
simono has joined #ruby
codeurge has joined #ruby
Tomasso has joined #ruby
mgorbach_ has joined #ruby
donnoc_ has quit [Ping timeout: 265 seconds]
mgorbach_ has quit [Read error: Connection reset by peer]
bmn_ has quit [Read error: Operation timed out]
mgorbach_ has joined #ruby
jheg has joined #ruby
codeurge has quit [Client Quit]
mgorbach has quit [Ping timeout: 276 seconds]
mgorbach_ is now known as mgorbach
smathieu has quit [Ping timeout: 255 seconds]
JokerDoom has quit [Read error: Connection reset by peer]
mehlah has quit [Quit: Leaving...]
JokerDoom has joined #ruby
andrewlio has quit [Quit: Leaving.]
freerobby has joined #ruby
r0bby has joined #ruby
mgorbach has quit [Read error: Connection reset by peer]
Shidash has quit [Ping timeout: 240 seconds]
robbyoconnor has quit [Ping timeout: 240 seconds]
mateNz has joined #ruby
LiohAu has quit [Quit: LiohAu]
mgorbach has joined #ruby
mateNz has left #ruby [#ruby]
mgorbach has quit [Read error: Connection reset by peer]
mgorbach has joined #ruby
sigurding has quit [Read error: No route to host]
sigurding has joined #ruby
echevemaster has joined #ruby
oo_ has quit [Remote host closed the connection]
mgorbach has quit [Read error: Connection reset by peer]
JokerDoom has quit [Read error: Connection reset by peer]
Notte has quit []
mgorbach has joined #ruby
maximski has quit [Read error: Connection reset by peer]
andrewjanssen has quit [Quit: Leaving...]
maximski has joined #ruby
JokerDoom has joined #ruby
maximski has quit [Max SendQ exceeded]
JoeGaudet has joined #ruby
mgorbach has quit [Read error: Connection reset by peer]
maximski has joined #ruby
Ankhers has joined #ruby
JokerDoom has quit [Read error: Connection reset by peer]
JokerDoom has joined #ruby
JokerDoom has quit [Client Quit]
JokerDoom has joined #ruby
andrewjanssen has joined #ruby
b1205 has quit [Ping timeout: 252 seconds]
s3ri0us is now known as s3ri0us|away
s3ri0us|away is now known as s3ri0us
doodlehaus has joined #ruby
doodlehaus has quit [Remote host closed the connection]
poikon has quit [Remote host closed the connection]
julian-delphiki has joined #ruby
Squarepy has joined #ruby
mgorbach has joined #ruby
Eyess has quit [Quit: Leaving]
Eyes has joined #ruby
asramos has quit [Quit: Idle as a wolf!]
Tomasso has quit [Ping timeout: 252 seconds]
aspires has quit []
Eyes is now known as Eyess
bean has quit [Ping timeout: 240 seconds]
allen has joined #ruby
Tomasso has joined #ruby
sigurding has quit [Quit: sigurding]
chipotle has quit [Quit: cya]
chipotle has joined #ruby
tkuchiki has quit [Remote host closed the connection]
pen has quit [Remote host closed the connection]
maximski has quit []
parzzix has joined #ruby
aspires has joined #ruby
_honning_ has joined #ruby
lw has quit [Read error: Connection reset by peer]
<Hanmac>
there is my class tree maker: https://gist.github.com/Hanmac/060ed42045c76081860d << for test try with "-r json -n JSON", currnetly the output file is not parsed with dot itself so it needs "dot -O -Tsvg inheritance.gv" or similar
lw has joined #ruby
deric_skibotn_ has joined #ruby
_honning_ has quit [Client Quit]
mehlah has joined #ruby
Xeago has joined #ruby
prathamesh has quit [Remote host closed the connection]
sigurding has joined #ruby
prathamesh has joined #ruby
User458764 is now known as User458764_NotHe
timonv has joined #ruby
g0bl1n has quit [Ping timeout: 255 seconds]
deric_skibotn has quit [Ping timeout: 265 seconds]
deric_skibotn_ is now known as deric_skibotn
kenneth__ has quit [Quit: Bye.]
kenneth has joined #ruby
mgorbach has quit [Read error: Connection reset by peer]
prathamesh has quit [Ping timeout: 265 seconds]
wertin has quit [Remote host closed the connection]
User458764_NotHe has quit [Ping timeout: 276 seconds]
LexicalScope has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
p8952 has quit [Ping timeout: 252 seconds]
timonv has quit [Remote host closed the connection]
s3ri0us is now known as s3ri0us|away
mr_blue has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pen has joined #ruby
Xeago has joined #ruby
Xeago has quit [Client Quit]
mgorbach has joined #ruby
GriffinHeart has joined #ruby
mgorbach has quit [Read error: Connection reset by peer]
ftj has joined #ruby
mgorbach has joined #ruby
sepp2k has joined #ruby
ftj has quit [Client Quit]
ftj has joined #ruby
BalkM has joined #ruby
bradhe has joined #ruby
mgorbach has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
poikon has joined #ruby
GriffinHeart has quit [Ping timeout: 240 seconds]
Uanio-235 has joined #ruby
omosoj has joined #ruby
osvimer has quit [Quit: leaving]
ftj has quit [Client Quit]
cashnguns has quit [Ping timeout: 240 seconds]
p8952 has joined #ruby
p8952 has joined #ruby
p8952 has quit [Changing host]
cashnguns has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
mgorbach has joined #ruby
mgorbach has quit [Read error: Connection reset by peer]
Uanio-235 has left #ruby [#ruby]
cocotton has quit [Remote host closed the connection]
mgorbach has joined #ruby
r0bby has quit [Excess Flood]
r0bby has joined #ruby
mgorbach has quit [Read error: Connection reset by peer]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
eLobato has joined #ruby
<eLobato>
hi there
dANOKELOFF has joined #ruby
Hanmac1 has joined #ruby
<eLobato>
perhaps i'm in the wrong channel but what's the proper way to declare in bundle "download latest available version of this gem"? I have on my gemspec s.add_dependency('activesupport', '>= 2.3.8')
<eLobato>
and running 'bundle install' in 1.8.7 results in bundle trying to pick up activesupport 4.1.1 which is obviously not compatilbe
<apeiros>
bundle update activesupport
<jhass>
no, update your ruby
<apeiros>
will update to the newest which fits the rest of your gemfile
Hanmac has quit [Ping timeout: 245 seconds]
Uanio-235 has joined #ruby
<apeiros>
ruby 1.8.7? oh dear :)
failshell has joined #ruby
<eLobato>
apeiros: I have no Gemfile.lock, I'm just trying hard to give compatibility to old ruby versions because a lot of users of my product are stuck in RHEL5
axilla has joined #ruby
dANOKELOFF has quit [Remote host closed the connection]
<centrx>
eLobato, Find out the last version of Rails that supported Ruby 1.8.7
<apeiros>
eLobato: your question contains conflicting information
mgorbach has joined #ruby
<apeiros>
you say "latest" but then say the latest (4.1.1) was not compatible
<eLobato>
apeiros: 'bundle install' should pick up '3.2.18' or something like that (I think that was the latest 1.8.7 activesupport compatible version)
<apeiros>
use ~>
<eLobato>
apeiros: latest available for the current ruby version
<apeiros>
I don't think you can specify that
b1205 has joined #ruby
<apeiros>
you can specify ~> 3.2
mijicd has joined #ruby
<apeiros>
which is equivalent to >= 3.2 and < 3.3
sinkensabe has joined #ruby
<eLobato>
apeiros: hm.. so basically I have to write a gemspec with an if clause for 1.8.7 (use activesupport 3.2.*) otherwise use latest available?
<apeiros>
or you release a "latest version for 1.8.7 users"
<centrx>
eLobato, Usually this would be a separate release. Are you not going to use any features in Rails beyond 3.2?
axilla has quit [Ping timeout: 255 seconds]
lewix has quit [Remote host closed the connection]
<eLobato>
apeiros: I don't want to lock in 1.8.7 in a version that won't get updated (it's a library for another project) so probably the if/else thingy would do
<centrx>
eLobato, I would just use the same version for both
<Hanmac1>
i looked at "ruby-graphviz" but bad it does not work for most of the stuff anymore and the code of it itself need to be refactored ... (they dont even know max_by oO )
Hanmac1 is now known as Hanmac
VinDH has joined #ruby
<centrx>
eLobato, There's no reason the users need to get different version of ActiveSupport based on which Ruby they are using
sinkensabe has quit [Ping timeout: 264 seconds]
<apeiros>
centrx: um, yes, there is. newer versions of AS are not 1.8 compatible afaik
<centrx>
right but the old versions are compatible with the new versions of Ruby
<centrx>
ActiveSupport 3.2 at least
<centrx>
->
<centrx>
<-
<centrx>
!
<apeiros>
ok, so we're back at "use ~>"
edmellum has quit [Quit: Connection closed for inactivity]
<shevy>
ack
gorpon has quit [Ping timeout: 252 seconds]
bmn has joined #ruby
<shevy>
hmm is hash.delete(key) a good way to respond to different keys given?
<shevy>
right now I seem to do: hash.delete(key) if hash.include? key
<shevy>
nope
<shevy>
key = hash.delete(key) if hash.include? key
<eLobato>
apeiros: that'd be a good solution if this wasn't a library used by rails projects (which might use rails 4)
<shevy>
more specifically:
b1205 has quit [Ping timeout: 252 seconds]
aspires has quit []
<shevy>
object_id = hash.delete(:object_id) if hash.include? :object_id
yfeldblu_ has joined #ruby
<eLobato>
apeiros: if the main project (say the one I linked before, foreman) uses rails 4, then my library cannot be locked in ~> 3.2 because bundle install won't work
sinkensabe has quit [Remote host closed the connection]
chipotle has quit [Quit: cya]
<nycto>
I want to move into web development but I'm unsure which language I should pick. As I thought Python was a web language, it wasn't.
<nycto>
I want to ask what kind of language is Ruby?
alem0lars has quit [Quit: alem0lars]
sinkensabe has joined #ruby
<havenwood>
nycto: A general purpose languages that thrives in the web space.
<centrx>
nycto, What do you mean by a "web language"
<centrx>
nycto, Both Ruby and Python are often used for web development
poikon has quit [Remote host closed the connection]
<nycto>
Well, PHP can be used to interact with html and such.
<crome>
dva: not sure httparty can automatically json-decode the response but faraday can
sinkensabe has quit [Read error: No route to host]
<nycto>
What type is Ruby?
<crome>
its just a lot less "user friendly"
zorak has quit [Ping timeout: 276 seconds]
b00stfr3ak has joined #ruby
<nycto>
Do you have to use alot of libraries?
<havenwood>
nycto: I don't think your concept of language "type" is sound.
<Squarepy>
nycto ruby is the awesome type
sinkensabe has joined #ruby
<Hanmac>
nycto: i use ruby for Destop GUI, and for 2d and 3d rendering too
<centrx>
PHP is unique
<crome>
Hanmac: what binding do you use for 2d/3d?
noob101 has joined #ruby
<crome>
I used to use a ruby-opengl gem but the last update was in the 19th century I think
<noob101>
Hey guys.
<Hanmac>
crome: 2d i tried gosu but it was a bit to low tec so i wrote my own for SFML ... for 3d i had something for ogre3d but both are not used recently
<parzzix>
Was interested in looking in some non web Ruby projects. Any desktop apps being done in ruby?
sigurding has quit [Quit: sigurding]
Metics has joined #ruby
<Hanmac>
parzzix: while i not have an app in ruby, i wrote a new wxRuby replacement
<Metics>
Hi everybody
<Metics>
I have a module, say... A. This module has a class, say... DatClass. I would like to inherit from that class outside of the module. And create an other class such as... class ThisClass < A::DatClass
<Hanmac>
it was mutli binding before ... until jruby does grab it and didnt give it back ... like some spoiled child
mostlybadfly has quit [Quit: Connection closed for inactivity]
decoponio has quit [Quit: Leaving...]
sigurding has joined #ruby
andrewjanssen has joined #ruby
Ginfuru_ has quit [Ping timeout: 265 seconds]
NinoScript has joined #ruby
<Metics>
jhass: Sadly, trying to reproduce a kind-of similar scheme works... Well, at least I know the module is not the problem...
<jhass>
then show actual code
<jhass>
and error message
dwayhs has quit [Read error: Connection reset by peer]
meatherly has joined #ruby
Cosmicjoker has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
dwayhs has joined #ruby
<Metics>
I'm gonna do that on pastebin :)
Es0teric has joined #ruby
jheg has joined #ruby
sepp2k has quit [Ping timeout: 240 seconds]
jespada has quit [Remote host closed the connection]
andrewjanssen has quit [Client Quit]
sepp2k has joined #ruby
gheegh has quit [Remote host closed the connection]
setra has joined #ruby
gheegh has joined #ruby
jespada has joined #ruby
snath has joined #ruby
bradhe has joined #ruby
LexicalScope has quit [Quit: Leaving]
<Metics>
jhass: meh, forget it. I'm a moron
meatherly has quit [Ping timeout: 264 seconds]
<jhass>
:( _I_ wanted to point that out ;P
Es0teric has quit [Ping timeout: 252 seconds]
<Metics>
Actually, it wasn't at all related with that. By erasing some part of the classes for the example's sake I saw that I mistook in the 'end' statement of one of my block...
donnoc_ has joined #ruby
<Metics>
At least, I was doing the unit testing when I faced this problem. All hail testing
<Metics>
And since I'm pretty new to modules, I assumed that my ignorance was the problem rather than my stupidity, haha
<shevy>
wow
<shevy>
Metics
<shevy>
I like how you go at describing your intellectual prowess
Cosmicjoker has quit [Quit: Leaving]
Xeago has joined #ruby
banisterone has joined #ruby
<LadyRainicorn>
wow such smart much thinking
<Metics>
shevy: you like the tired-lyric kind of style?
bradhe has quit [Ping timeout: 265 seconds]
<shevy>
I like self-insults in general
p8952 has quit [Ping timeout: 252 seconds]
<shevy>
I guess I am wicked, it does make me feel better
<Metics>
I'm in general more keen on pointing out how bad something/someone is, but I guess that error caught me!
andrewlio has joined #ruby
BalkM has quit [Read error: Connection reset by peer]
michael_lee has quit [Remote host closed the connection]
BalkM has joined #ruby
zoraj has joined #ruby
ylluminarious has joined #ruby
Martxel has joined #ruby
mr_snowf1ake has joined #ruby
Soda has quit [Remote host closed the connection]
adac has quit [Ping timeout: 240 seconds]
sputnik13 has joined #ruby
brunops has joined #ruby
aspires has quit []
flughafen has quit [Ping timeout: 252 seconds]
aspires has joined #ruby
IRLeif has joined #ruby
flughafen has joined #ruby
aspires has quit [Client Quit]
sputnik13 has quit [Client Quit]
axilla has joined #ruby
Ginfuru_ has joined #ruby
aspires has joined #ruby
b1205 has joined #ruby
<nycto>
So Ruby on Rails is for web development right?
claymore has quit [Ping timeout: 252 seconds]
<nycto>
Is it suggested?
<axilla>
yes?
<RubyPanther>
nycto: I have heard it suggested, this true.
<axilla>
lol
<RubyPanther>
[is]\
LekeFly has joined #ruby
sigurding has quit [Quit: sigurding]
claymore has joined #ruby
Ginfuru_ has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby
p8952 has joined #ruby
<jheg>
o/
<RubyPanther>
I have also heard Camping suggested. Some do not understand Camping and lash out with spears reaching 4 to 6 feet in length. Others fear and quake beneath carcass attire.
b1205 has quit [Ping timeout: 240 seconds]
lethe has joined #ruby
<jheg>
anyone here ever taken part in a dev bootcamp?
centrx has quit [Quit: Mission accomplished. Ready for self-termination.]
<omosoj>
is there a way to determine the language of a string?
kyb3r_ has joined #ruby
<nycto>
Would you guys consider Ruby the *right* language for web development? Ruby on rails?
gorpon has joined #ruby
<nycto>
Sorry for asking but I'm new when it comes to web.
<RubyPanther>
vjanicek: but consult the String class because there are a few other ways too
<omosoj>
nevermind i found a few gems
<RubyPanther>
nycto: No.
dva has quit [Ping timeout: 240 seconds]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
<nycto>
RubyPanther: no?
Hanmac1 has joined #ruby
ixti has joined #ruby
mehlah has joined #ruby
<vjanicek>
RubyPanther, thanks, I will
<RubyPanther>
nycto: Ruby is only the right language if you're already a Ruby programmer. There is no advantage otherwise of using Ruby, and the tooling is less mature than Perl's, or others
simono has joined #ruby
<nycto>
RubyPanther: So you are saying, don't learn Ruby..
bradhe has joined #ruby
<nycto>
RubyPanther: Which language would you recommend? For web?
<RubyPanther>
Right, you never "should" learn Ruby.
combusean has joined #ruby
danshultz has joined #ruby
<RubyPanther>
You "should" know C, JS, SQL, a couple high level languages... but there is no reason for Ruby to be one of them unless you <3 Ruby for whatever reason
Hanmac has quit [Ping timeout: 265 seconds]
GriffinHeart has quit [Ping timeout: 240 seconds]
<nycto>
RubyPanther: C? or C++?
<RubyPanther>
nycto: JS is the currently popular thing, and Perl has stable tooling
<Sigma00>
there is no 'right' language. There is only the language you feel more comfortable in and with a market you like
Jake232 has quit [Read error: Connection reset by peer]
<RubyPanther>
C++ is useless unless you're using C++. Whereas, C is the standard glue language that is used for extending everything. If you learn C++, you still have to learn C.
simono_ has joined #ruby
<nycto>
How would C help in web development?
VinDH has quit [Remote host closed the connection]
<RubyPanther>
But "nobody" wants to do web programming with cgic :)
<RubyPanther>
nycto: If you're integrating with apache httpd, then the standard choices are C or Perl. That would be the use case.
<RubyPanther>
So for most people, no
simono has quit [Ping timeout: 240 seconds]
bradhe has quit [Ping timeout: 240 seconds]
RandyT has quit [Ping timeout: 264 seconds]
danshultz has quit [Read error: Connection reset by peer]
<alsu>
Sigma00: so I’m not sure how to use your suggestion for IO#binread.
danshultz has joined #ruby
<nycto>
RubyPanther: Are you a C guru -.-
<alsu>
I came up with @buf = StringIO.new('', 'w+b’); @buf.write(newdata); … @buf.read(38)
sdwrage has joined #ruby
RandyT has joined #ruby
<alsu>
which seems to be pretty good, except the nasty case the return value and needing to rewind, truncate, and write back the remainder
<RubyPanther>
nycto: No, I avoid learning much C and instead lean heavily on libraries like the Ruby C API, apache apr, glib from Gtk, etc
aef has joined #ruby
poikon has quit [Remote host closed the connection]
<nycto>
RubyPanther: I come from desktop development and I really want to get into web development. I know some C/C++ but I wouldn't consider myself pro. I want to make a right choice and pick a good language for web development. What would you say about PHP?
<Jamo___>
for webapps, nodejs or rails is the best choice :)
<RubyPanther>
nycto: PHP is optimized for non-programmers. You should probably just use node.js
lxsameer has quit [Quit: Leaving]
<jimbow>
how is php optimized for non programmers?
<jheg>
what is a web app?
<jimbow>
isn't it just the same as anythinge else?
<RubyPanther>
JS is getting used outside the browser a lot now, so it is a useful thing to know, and you "have to" know it anyways to do web dev. So using node.js it is one less language
benzrf is now known as benzrf|offline
yvemath has quit [Excess Flood]
<RubyPanther>
jimbow: It is a factual statement, not opinion. Read about the reasons for PHP even existing if you're curious.
yvemath has joined #ruby
moneydouble has joined #ruby
<Jamo___>
a chose ruby a few years back, but if I now had to make that decision again, I would choose nodejs...
<jimbow>
i thought php came to existence to make html formatting more tolerable to look at
<Jamo___>
it ofcourse depends on what you are doing...
<nycto>
RubyPanther: So not Python or?
<RubyPanther>
I chose Ruby because St. Wall said that if you want to do everything with OOP then Ruby is better than Perl. (He then defended procedural programming) I was already using Perl and trying to do everything with OOP, so I followed his advice and switched.
<nycto>
And now comes the big question. Who is St. Wall?
sdwrage has quit [Quit: This computer has gone to sleep]
<RubyPanther>
nycto: Python is fine. If it doesn't turn your stomach, use it! I've had to use it for online classes, it seems to work.
<RubyPanther>
If you don't know who St. Wall is, that is a whole different problem. Read your history books, kids. lol
<Jamo___>
Python is heavily used in academic world (with mathlab and R)... but its much more procedural language than ruby
<jimbow>
are the c99 shells open source?
<nycto>
RubyPanther: I checked and it seems that Google/Youtube is using python.
<ari-_-e>
Jamo___: that's not really true...
<nycto>
RubyPanther: I do, didn't mean that way..
noop has quit [Ping timeout: 258 seconds]
<RubyPanther>
I can't like Python, I've known meaningful whitespace sucks ever since I learned COBOL
brunops has quit [Changing host]
brunops has joined #ruby
<Jamo___>
to_str or whatever it was is ihmo a good example :)
<jimbow>
i found the source to a c99 shell! woot!
allen has quit [Remote host closed the connection]
<nycto>
RubyPanther: You don't seem to like C++ either.
<RubyPanther>
Nobody likes C++, not even people who choose to use it.
<jimbow>
c++ is fun
<jimbow>
it's like a cleaner version of c
ndrei has joined #ruby
<RubyPanther>
Everybody agrees that the language as a whole is awful, and they get around that by not using the whole thing. Problem though, they can't agree which parts to use.
<RubyPanther>
It is a known problem, and claiming it is "cleaner" is some sort of joke.
<jimbow>
why not make a new language? Problem solved?
<RubyPanther>
If it has advantages, you might be the only one who would claim it is cleaner.
farn has quit [Remote host closed the connection]
<nycto>
RubyPanther: So is it true what Larry Wall said that "Some new language tried to replace C but didn't really succeed" ?
whomp has quit [Ping timeout: 252 seconds]
smathieu has joined #ruby
<RubyPanther>
nycto: Everybody said that, so probably true
<nycto>
RubyPanther: Everybody?
<RubyPanther>
I've said it, half the old-timers in here have said it
<RubyPanther>
Most of the rest didn't say it because somebody else just did
<nycto>
RubyPanther: Yes but that's maybe because you guys are oldschool don't you think?
<jimbow>
what car does larry wall drive in?
<RubyPanther>
Sure, that's why we know so much
mostlybadfly has joined #ruby
<nycto>
I see.
whomp has joined #ruby
lw has quit [Quit: s]
zorak has joined #ruby
sdwrage has joined #ruby
Vivekananda has quit [Read error: No route to host]
ldnunes has quit [Quit: Leaving]
mr_snowf1ake has quit [Ping timeout: 255 seconds]
larissa has joined #ruby
huoxito has quit [Quit: Leaving]
frosgy has joined #ruby
i_s has joined #ruby
danshult_ has joined #ruby
Hanmac has joined #ruby
smathieu has quit [Remote host closed the connection]
jimbow has quit [Quit: jimbow]
poikon has joined #ruby
smathieu has joined #ruby
Hanmac1 has quit [Ping timeout: 252 seconds]
frogssgy has quit [Ping timeout: 245 seconds]
danshultz has quit [Ping timeout: 252 seconds]
i_s has quit [Ping timeout: 276 seconds]
mijicd has quit [Quit: leaving]
roolo has joined #ruby
akonny has quit [Quit: akonny]
nfk has quit [Quit: yawn]
smathieu has quit [Ping timeout: 264 seconds]
banisterone has joined #ruby
AndChat|102836 has quit [Read error: Connection reset by peer]
danshult_ has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
phansch has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
tacos1de has quit [Ping timeout: 272 seconds]
Olipro has quit [Ping timeout: 246 seconds]
<headius>
Hanmac: I believe shoes4 went to JRuby because bootstrapping people with any of the MRI gui extensions was super painful
<headius>
That was entirely decided by shoes4 contribs
zoraj has quit [Ping timeout: 265 seconds]
Avahey_ has joined #ruby
IRLeif has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
failshell has quit []
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eval-in__>
jhass => invalid value for Integer(): "sad" (ArgumentError) ... (https://eval.in/156760)
ecksit has joined #ruby
<ecksit>
hey, i am having an issue with my gem installing to the bin directory and being system wide executable. it worked in 1.9.3 but no longer in 2.1.0. (i am using chruby if that helps)