huddy has quit [Quit: Connection closed for inactivity]
DadoCe has quit [Remote host closed the connection]
zacstewart has quit [Remote host closed the connection]
multi_io has joined #ruby
AlexRussia has quit [Ping timeout: 244 seconds]
blackoperat has quit [Remote host closed the connection]
Aova has joined #ruby
<d10n-work>
Is there a way to get top-level Sinatra DSL with a module-style application in a way shorter than this? http://pastebin.mozilla.org/8548689
zacstewart has joined #ruby
multi_io_ has quit [Ping timeout: 265 seconds]
AlexRussia has joined #ruby
<Diabolik>
havenwood i have one final query if you're still around
bMalum has quit [Quit: bMalum]
<havenwood>
Diabolik: just ask, and if i'm around i'll answer
<shadoi>
d10n-work: you need it to be a module?
<havenwood>
Diabolik: or someone else will
<shevy>
I insist that havenwood shall
<shevy>
if he is sleeping, someone has to run over and wake him up
<d10n-work>
shadoi: yes
<Diabolik>
im trying incredibly hard and im doing a challenge, but im convinced im doing an incredibly inefficient job
<shadoi>
d10n-work: guess not then, it's pretty unusual to make it be a module
<havenwood>
Diabolik: Have a Gist of the challenge and your code so far?
sent1nel has quit [Remote host closed the connection]
<Diabolik>
interpolating each array number must be the wrong way
<Diabolik>
im supposed to use map
ghr has quit [Ping timeout: 264 seconds]
<havenwood>
BeLucid_: the extra " at the end of line 24
<zenspider>
you're misunderstanding map
atomical has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider>
you're using map as each and doing a map manually
<havenwood>
and that ^
<d10n-work>
shadoi: to clarify, I need to avoid using just require 'sinatra' - I need to use my own option parser. I think a module-style Sinatra application is the only way to do this.
<Diabolik>
ok
momomomomo has joined #ruby
<Diabolik>
how do i do the interpolation to record what im doing effectively?
pu22l3r has joined #ruby
<zenspider>
a = []; ary.each do |x| a << x.meth; end; a IS ary.map { |x| x.meth }
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest5532 is now known as ixx
bMalum has joined #ruby
<zenspider>
(which IS ary.map(&:meth); but that doesn't apply in your case
<Diabolik>
what is meth?
<zenspider>
also, use "+ 2" instead of ".next.next". don't be clever.
<zenspider>
whatever method you want to call
Aswebb_ has quit [Remote host closed the connection]
<zenspider>
ie, whatever calculation you want for the result of the map
<squar1sm>
does anyone know of a quick ruby proxy debug thing for http? I'm about to write something in sinatra but I feel like I've seen this. I just want to redirect a JS client to a temp place and see the traffic.
DadoCe has joined #ruby
<squar1sm>
I see it in chrome but want another view.
<leafybasil>
squar1sm: you mean like requestb.in
<leafybasil>
Or something more advanced
<Diabolik>
zenspider i don't understand the a IS ary.map
momomomomo has quit [Ping timeout: 264 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bronson has joined #ruby
<squar1sm>
just the requests coming in, yeah
<leafybasil>
Diabolik: a.map is a function that does the same work as a << x.meth
<squar1sm>
it doesn't need to proxy out
<squar1sm>
although that'd be cool
<squar1sm>
I know there's fiddler ...
<leafybasil>
squar1sm: then requestb.in should do the job
<squar1sm>
oh i see.
<squar1sm>
thx
<zenspider>
Diabolik: I said it doesn't apply. so don't understand it for now
mikepack has joined #ruby
<zenspider>
Diabolik: do you have irb up? or tryruby or something interactive?
<Diabolik>
since i'm sure you've all been on the edge of your seats
<shevy>
works fine for me
<Diabolik>
i've got map working fine
pdoherty has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<Diabolik>
interpolation isn't accepting num or any other paramater
<shevy>
congrats Diabolik
<shevy>
you have passed the first of the 36 chambers of Ruby
<Diabolik>
i will buy all of you your own weight in beer if you come to lonond
<Diabolik>
*london
<shevy>
I'll come EXTRA HEAVY then
<havenwood>
basichash: "It's like one of those little Hello Kitty boxes they sell at the mall that's stuffed with tiny pencils and microscopic paper, all crammed into a glittery transparent case that can be concealed in your palm for covert stationery operations. Except that blocks don't require so much squinting." ~_why
<zenspider>
Diabolik: isn't accepting num or any other parameter?? don't think so
<Diabolik>
im just doing map! then interpolating
josephndenton has joined #ruby
zachrab has joined #ruby
<zenspider>
Diabolik: don't use map!. use map. like they hinted. and there is no "then"
Aova has quit [Read error: Connection reset by peer]
<havenwood>
basichash: or lots of search material on the web for blocks in Ruby
pdoherty has quit [Ping timeout: 265 seconds]
<basichash>
havenwood: is a block basically a lambda function?
dimaursu16 has quit [Ping timeout: 265 seconds]
Takle has joined #ruby
<zenspider>
Diabolik: again: no "and then interpolating"
<Diabolik>
i have to interpolate to pass the rspec?
tokik has joined #ruby
<epitron>
basichash: very similar
<zenspider>
Diabolik: no "then"
<havenwood>
basichash: similar to an anonymous lambda, a one-off sugar
<zenspider>
Diabolik: you're still not getting the point of map
<zenspider>
play with map. a lot
dimaursu16 has joined #ruby
<epitron>
map isn't very complicated. the hard part is thinking about problems in terms of transforming arrays into other arrays
<zenspider>
exactly
<Diabolik>
ok
livingstn has quit []
Aova has joined #ruby
ghr has joined #ruby
Takle has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
CpuID2 has joined #ruby
CpuID2 has joined #ruby
<basichash>
havenwood, epitron: what's the delta that makes it 'similar' and not 'the same'
kristian-aalborg has quit [Quit: Leaving]
totimkopf has joined #ruby
andy___ has joined #ruby
<havenwood>
basichash: for example, lambdas have a strict arity and blocks, like procs, do not. but blocks share locality of return with lambdas not procs.
<epitron>
nonlocal returns! \o/
<zenspider>
it's a mess. I wish we only had one
dabrorius has quit [Remote host closed the connection]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<epitron>
i wonder why that segfaults for me
rbennacer has quit [Remote host closed the connection]
<havenwood>
epitron: doesn't segfault for me
<havenwood>
epitron: on 1.8, 1.9, 2.0, 2.1 or 2.2
<epitron>
fascinating
<epitron>
what OS?
uptownhr has quit [Quit: uptownhr]
<havenwood>
epitron: OS X
<epitron>
oic
p3ery has joined #ruby
<havenwood>
epitron: same so far on linux
<epitron>
how curious
<pipework>
epitron: Have fun with Hash.new with a block. I gave it a default proc and then called that default proc from within the block that passes you the hash with the default proc.
<pipework>
It's fun.
w2 has quit [Client Quit]
rbennacer has joined #ruby
Joufflu is now known as derp
derp is now known as joufflu
<epitron>
:D
<epitron>
can you show me in >> ?
razieliyo has quit [Ping timeout: 264 seconds]
zachrab has quit [Remote host closed the connection]
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
triple_b has joined #ruby
<epitron>
ohhh yes
<epitron>
i had to do that once
shum has joined #ruby
greenbagels has joined #ruby
<pipework>
I was thinking of implementing something like deep_fetch but for assignment, where the block is yielded if the key already exists or something.
hmsimha has joined #ruby
jerematic has quit [Remote host closed the connection]
<epitron>
havenwood: weird. i rebuilt ruby, and it blows up still
n80 has joined #ruby
oleo__ has joined #ruby
<pipework>
epitron: Your computer is broken, throw it in the trash.
oleo is now known as Guest62867
<havenwood>
epitron: hrm
<havenwood>
pipework: :O
tyfighter has quit [Quit: tyfighter]
<havenwood>
pipework: i have a bad habit of hoarding my old computers away
Guest62867 has quit [Ping timeout: 244 seconds]
<epitron>
pipework: NOOOOOOOOO
<pipework>
epitron: You're broken, throw epitron into the trash.
* epitron
throws epitron into the trash
* epitron
starts spinning in mid-air
LudicrousMango has joined #ruby
russt_ has quit [Ping timeout: 246 seconds]
<banister>
epitron hi sweet eppy, what's up
Aova has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
Hijiri has quit [Quit: 移動中]
ta_ has joined #ruby
Aswebb_ has joined #ruby
crazydiamond has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 245 seconds]
shime_ has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
pu22l3r has quit [Remote host closed the connection]
sent1nel has joined #ruby
ta_ has quit [Ping timeout: 250 seconds]
Robr3rd has joined #ruby
hamakn has joined #ruby
Aova has joined #ruby
<Robr3rd>
Following the Arch Wiki for installing multi-user RVM (https://wiki.archlinux.org/index.php/RVM), I get to the "$ rvmsudo rvm get head" part and Bash complains that the command "rvmsudo" cannot be found. Any ideas?
jottr has quit [Ping timeout: 264 seconds]
Hijiri has joined #ruby
Aswebb_ has quit [Ping timeout: 252 seconds]
hamakn has quit [Read error: Connection reset by peer]
ghr has joined #ruby
hamakn has joined #ruby
<havenwood>
Robr3rd: Is RVM not yet installed?
<epitron>
havenwood: doesn't blow up using ruby head.. guess they fixed whatever it was! :D
<havenwood>
epitron: nice
Troy^ has joined #ruby
<havenwood>
Robr3rd: There's a helpful #rvm channel or here are the RVM install docs: https://rvm.io/rvm/install
rbennacer has quit [Remote host closed the connection]
tobago has joined #ruby
tobago has quit [Client Quit]
iamninja has quit [Quit: ZZZzzz…]
StreetlampSalad has joined #ruby
caustic has joined #ruby
ghr has quit [Ping timeout: 244 seconds]
<Robr3rd>
havenwood, Thanks, I'll take a look at those.
Robr3rd has left #ruby ["Leaving"]
rbennacer has joined #ruby
Musashi007 has joined #ruby
Lewix has joined #ruby
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
StreetlampSalad has quit [Ping timeout: 264 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nobitanobi has quit []
<epitron>
i would've told him not to use rvm :(
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Troy^ has joined #ruby
tunaCanBruh has quit [Ping timeout: 250 seconds]
bronson has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 240 seconds]
StreetlampSalad has joined #ruby
kapil__ has joined #ruby
vlad_starkov has joined #ruby
danjordan has joined #ruby
<epitron>
wow, how do they get it to stay on that branch for so long
<omosoj>
how do you guys store login or authentication information in projects you open source? i'm reading something that say u should use a variable defined in your bash profile. is that the best way?
CpuID2 has joined #ruby
CpuID2 has joined #ruby
<wallerdev>
yeah environment variables work for deploying things
<wallerdev>
other options are just to store it locally but add it to gitignore
<omosoj>
k, define it in config.ru?
<wallerdev>
or just use local authentication
<omosoj>
(i'm working on a sinatra app now)
StreetlampSalad has quit [Ping timeout: 264 seconds]
rsty1 has joined #ruby
<epitron>
omosoj: config.ru would be in your git repo
<epitron>
put it in config.yml or something
<omosoj>
k, thanks
<epitron>
i think environment variables make the most sense though
<epitron>
that would disallow hackers from accessing the file on the filesystem if they found a bug
<epitron>
well, they could access any file they wanted, but they couldn't get the environment as easily
<epitron>
rsty1: it's an array of arrays, so you can go: array[1][5]
<rsty1>
i can use variable.at() to view the groups of 3, but what about each avlue
<rsty1>
oh
<epitron>
(array[1])[5]
<rsty1>
works very well, thank you epitron :)
<epitron>
oh sorry, 5 would be too big
<epitron>
but 0..2 :)
<rsty1>
hehe, yes, it works! thanks
<epitron>
np
<epitron>
if .at() works, you could do .at() twice
<epitron>
array.at(1).at(0)
IrishGringo has quit [Ping timeout: 245 seconds]
<rsty1>
yes, my mistake was trying (0,0)
<rsty1>
but (0)(0) works
<epitron>
:O
<rsty1>
learning :)
x1337807x has joined #ruby
CpuID2 has quit [Quit: This computer has gone to sleep]
<omosoj>
hm, i guess i should have gitignore ignore itself, right?
<Nilium>
No.
IrishGringo has joined #ruby
<omosoj>
doesn't it say 'hey i'm hiding stuff here!'?
CpuID2 has joined #ruby
dc has quit [Remote host closed the connection]
danjordan has quit [Quit: danjordan]
wallerdev has quit [Quit: wallerdev]
rgs has quit [Ping timeout: 246 seconds]
<Troy^>
so i can use in_file = open(from_file).read does that mean i can write to a file with those read lines as such out_file = open(to_file, 'w').write(in_file)
CpuID2 has quit [Client Quit]
rgs has joined #ruby
StreetlampSalad has joined #ruby
goodenough has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tmtwd has joined #ruby
zacstewart has quit [Remote host closed the connection]
commmmodo has joined #ruby
StreetlampSalad has quit [Ping timeout: 244 seconds]
beneggett has joined #ruby
x1337807x has joined #ruby
n008f4g_ has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
neoxquick has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 250 seconds]
zacstewart has joined #ruby
ta_ has joined #ruby
Brando753 has joined #ruby
mrmargolis has joined #ruby
StreetlampSalad has joined #ruby
_djbkd has quit [Remote host closed the connection]
_ixti_ has quit [Ping timeout: 252 seconds]
amystephen has quit [Quit: amystephen]
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
selaruvich has quit [Ping timeout: 245 seconds]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
snath has joined #ruby
atomical has quit [Ping timeout: 245 seconds]
pdoherty has joined #ruby
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beneggett has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
adriancb has joined #ruby
JBreit has joined #ruby
Aova has quit [Read error: Connection reset by peer]
rbennacer has quit [Remote host closed the connection]
atomical has joined #ruby
rbennacer has joined #ruby
pdoherty has quit [Ping timeout: 264 seconds]
Pharaoh2 has joined #ruby
pengin_ has joined #ruby
jottr has joined #ruby
swgillespie has joined #ruby
bronson has joined #ruby
ta_ has joined #ruby
cjim has joined #ruby
duncannz has joined #ruby
Aova has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ta_ has quit [Ping timeout: 252 seconds]
ghr has joined #ruby
lordsday has joined #ruby
mikedugan has joined #ruby
echevemaster has quit [Remote host closed the connection]
Aova has quit [Read error: Connection reset by peer]
<certainty>
workmad3: o/
* certainty
plays semaphore again
<workmad3>
;o
<workmad3>
err... \o even
<certainty>
:)
leafybasil has joined #ruby
josephndenton has quit [Ping timeout: 244 seconds]
quimrstorres has joined #ruby
robustus has quit [Ping timeout: 255 seconds]
quimrstorres has quit [Remote host closed the connection]
Grumelo has quit [Read error: Connection reset by peer]
Aova has joined #ruby
CpuID2 has joined #ruby
ta has joined #ruby
MasterPiece has quit [Quit: Leaving]
robustus has joined #ruby
quimrstorres has joined #ruby
gkra has joined #ruby
arup_r has quit [Remote host closed the connection]
ta has quit [Ping timeout: 256 seconds]
codecop has quit [Remote host closed the connection]
basichash has joined #ruby
blizzy has joined #ruby
arup_r has joined #ruby
lrocknrolmarc has joined #ruby
rocknrollmarc has joined #ruby
tmtwd has quit [Remote host closed the connection]
<shevy>
~o~
krz has quit [Ping timeout: 245 seconds]
timonv has quit [Ping timeout: 250 seconds]
AlSquire has joined #ruby
blizzy has quit [Ping timeout: 244 seconds]
ta has joined #ruby
nii236|irssi has joined #ruby
bronson has quit [Remote host closed the connection]
<arup_r>
Ahem! Ahem!!!!!
ghostpl has joined #ruby
LudicrousMango has joined #ruby
zacstewart has joined #ruby
duncannz has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
piotrj has quit [Ping timeout: 245 seconds]
CpuID2 has quit [Quit: This computer has gone to sleep]
ta has quit [Ping timeout: 264 seconds]
tvw has joined #ruby
piotrj has joined #ruby
lrocknrolmarc has quit [Ping timeout: 264 seconds]
nolic has joined #ruby
piotrj has quit [Read error: Connection reset by peer]
rocknrollmarc has quit [Ping timeout: 250 seconds]
lrocknrolmarc has joined #ruby
solars has joined #ruby
rocknrollmarc has joined #ruby
<solars>
hi, can anyone tell me how to use benchmark inline? e.g. not wrap around the complete script but around a particular section that is run within the whole?
zacstewart has quit [Ping timeout: 250 seconds]
piotrj has joined #ruby
<avril14th>
well, put the code in the block? :)
piotrj has quit [Client Quit]
piotrj has joined #ruby
decoponio has joined #ruby
lrocknrolmarc has quit [Ping timeout: 252 seconds]
tunaCanBruh has joined #ruby
bMalum has quit [Quit: bMalum]
jenrzzz has quit [Ping timeout: 245 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
rocknrollmarc has quit [Ping timeout: 252 seconds]
<Peppuz>
how can I create relationships between posts in wordpress?
sevenseacat has quit [Remote host closed the connection]
arup_r has joined #ruby
<Peppuz>
I'm talking about 'has_one' and 'has_many' relations
jonr22 has quit [Quit: WeeChat 0.4.2]
<apeiros_>
Peppuz: wrong channel?
<Peppuz>
in a book-author scenario
<tobiasvl>
#php ?
<Peppuz>
omg
<apeiros_>
wordpress is php, no?
bMalum_ has joined #ruby
<Peppuz>
xD
<Peppuz>
sorry guys
anaeem1 has joined #ruby
<Peppuz>
I hope that it din't offend you
<tobiasvl>
haha
<apeiros_>
totally
Timgauthier has quit [Read error: Connection reset by peer]
jottr has joined #ruby
<apeiros_>
kickban won't suffice. therefore I won't do it.
<workmad3>
Peppuz: w*******s is a dirty word
<workmad3>
deserves censorship
<Peppuz>
I'm forced to use that crap
Timgauthier has joined #ruby
<workmad3>
my brother-in-law runs a WP-based company... I try to avoid association :P
ponga has joined #ruby
<Peppuz>
stupid masses want wordpress
bMalum has quit [Ping timeout: 246 seconds]
bMalum_ is now known as bMalum
<Timgauthier>
yeah thats because its popular
<Timgauthier>
i'm going to try really hard not to get into that again :(
<Timgauthier>
but if you want to build a nice site and need a cms, and are okay using php, i recommend kirbycms, getkirby.com
sinkensabe has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
Ellypse_ has joined #ruby
nolic has quit [Remote host closed the connection]
<Peppuz>
I'm not ok using php, but I'll check that out anyway, thanks Timgauthier
<apeiros_>
odd, I thought wordpress was one of the better php cms'es?
<Timgauthier>
wordpress is not a cms
shime has joined #ruby
<apeiros_>
well, website lego toolkits
<apeiros_>
or whatever this stuff is called
<Timgauthier>
its not that either
<Timgauthier>
its a blog platform
Takle has joined #ruby
<apeiros_>
I thought it had grown beyond that?
<Timgauthier>
but it has lots and lots of layers of tech
<Timgauthier>
and so its easy for someone to break
<Timgauthier>
no its still just a blog platform, people just use it and think of it as a CMS
oo_ has quit [Remote host closed the connection]
<Timgauthier>
you log in and want to add content, it is still a post
<apeiros_>
ok
ponga has quit [Ping timeout: 246 seconds]
* apeiros_
obviously never used it
<workmad3>
the central system metaphor is still 'blog'
<Timgauthier>
want to make a static page, cool, you don't really get to use a template for that, unless the template your using for your site has a sub template system for static pages
<Timgauthier>
you want to make a part of the site that has the ability for people to update easily in the back end, sure, you rig up a sub blog for it, and then fuck around with it so it only ever shows the newest post
<Timgauthier>
its a mess
<Timgauthier>
don't ever use it ;)
Ellypse_ has quit [Read error: Connection reset by peer]
Ellypse_ has joined #ruby
<workmad3>
Timgauthier: I know a site that uses wordpress to publish 'packages' for price comparison... the guy running it wanted to sort packages by price and asked my wife (who was being paid piece-work to fill in content) to sort all the prices and rank them numerically
<workmad3>
Timgauthier: I told her 'don't do that... just put the price in as the ordering...'
<Timgauthier>
that seems so convoluted my mind doesn't even follow
Takle has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
<Peppuz>
workmad3, you need a plugin for that
<Timgauthier>
you can't
<Peppuz>
$129
<workmad3>
129
<Timgauthier>
or you can, but you gotta write shit up for that no ?
<workmad3>
works fine :P
<workmad3>
or 12900
<workmad3>
(if you include pence)
<Timgauthier>
lol
jerematic has joined #ruby
<Peppuz>
workmad3, don't worry, it's gonna break up your other plugins on the next update
<workmad3>
Peppuz: not my site :)
tunaCanBruh has joined #ruby
<workmad3>
and it's still better than re-ordering every single post every time a new 'package' needs to be added halfway through the list
thiagovsk has joined #ruby
rdark has quit [Read error: Connection reset by peer]
<Peppuz>
no one knows how to answer my question btw, looks like it's actually a product for bloggers
rdark has joined #ruby
kristofferR has joined #ruby
jerematic has quit [Ping timeout: 264 seconds]
mkaesz has joined #ruby
tunaCanBruh has quit [Ping timeout: 246 seconds]
basichash has quit [Ping timeout: 250 seconds]
raphaelss has joined #ruby
yfeldblum has joined #ruby
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lkba has joined #ruby
raphaelss has quit [Client Quit]
kristofferR has quit [Client Quit]
jottr has quit [Ping timeout: 245 seconds]
scripore has quit [Quit: This computer has gone to sleep]
shum1 has quit [Quit: WeeChat 1.1.1]
shum1 has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
Ellypse_ has quit [Quit: Ellypse_]
cpt_yossarian has quit [Ping timeout: 245 seconds]
pandaant has quit [Remote host closed the connection]
* arup_r
feeling shy
* arup_r
thinking why he didn't ask his Dad to get a white box when he was *
<arup_r>
8
<arup_r>
shevy: I am 27
<arup_r>
how can he be half..
<arup_r>
:(
spyderman4g63 has joined #ruby
<shevy>
arup_r well he is 15
<arup_r>
humm..
<shevy>
when he is 16 you'll be almost 32!
spyderma_ has joined #ruby
<shevy>
when he is 17, and you 34
<shevy>
:-)
<arup_r>
Arithmetic progression
<shevy>
well he'll have you in 4 years
<shevy>
almost
<shevy>
hahaha
* arup_r
always got average marks in Math
livathinos has quit [Remote host closed the connection]
<shevy>
I almost flunked in math
apurcell has joined #ruby
<shevy>
I am only somewhat good in head calculations
amil has quit [Quit: Leaving...]
ta has joined #ruby
revoohc has joined #ruby
<arup_r>
That's a mature calculation..
lrocknrolmarc has quit [Ping timeout: 264 seconds]
<arup_r>
It needs in our day-to-day life
CustosL1men has quit [Ping timeout: 265 seconds]
livathin_ has joined #ruby
livathin_ has quit [Remote host closed the connection]
livathinos has joined #ruby
tunaCanBruh has joined #ruby
<shevy>
"Python-2.7.9 is used by many scripts. Ruby-2.2.0 is used by some scripts, mostly within mtx_context which is part of conTeXt, but also for one or two others, such as match_parens, which are generally useful."
scripore has quit [Quit: This computer has gone to sleep]
avril14th has joined #ruby
jerius has quit [Client Quit]
triple_b has quit [Ping timeout: 264 seconds]
scripore has joined #ruby
seal has quit [Quit: Ex-Chat]
fantazo has joined #ruby
lxsameer has quit [Quit: Leaving]
Kruppe has joined #ruby
<shevy>
d10n-work I guess you can't make this shorter because you need to tap into those methods
josephndenton has joined #ruby
jerius has joined #ruby
marr has joined #ruby
oo_ has joined #ruby
mischief has quit [Ping timeout: 265 seconds]
danman has joined #ruby
werelivinginthef has joined #ruby
devdazed has joined #ruby
bronson has joined #ruby
rbennacer has joined #ruby
Takle has quit [Remote host closed the connection]
n1lo has quit [Quit: Leaving]
noop has quit [Ping timeout: 245 seconds]
oleo has joined #ruby
Takle has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
psy_ has joined #ruby
sent1nel has joined #ruby
chinmay_dd has quit [Quit: Connection closed for inactivity]
timonv has quit [Ping timeout: 255 seconds]
timonv has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
krz has quit [Quit: WeeChat 1.0.1]
codecop has quit [Ping timeout: 252 seconds]
ta_ has joined #ruby
pu22l3r has joined #ruby
trufflesnout has joined #ruby
shredding has quit [Quit: shredding]
BTRE has quit [Quit: back in two shakes]
roshanavand has quit [Ping timeout: 245 seconds]
pdoherty has joined #ruby
lethjakm1 has joined #ruby
enebo has joined #ruby
mloveless has joined #ruby
rbennacer has quit [Remote host closed the connection]
tunaCanBruh has joined #ruby
piotrj has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
mitchellhenke has joined #ruby
piotrj has joined #ruby
scripore has joined #ruby
bigeast has left #ruby [#ruby]
shay- has joined #ruby
lethjakm1 has quit [Ping timeout: 245 seconds]
waynerade has joined #ruby
mloveless has quit [Ping timeout: 245 seconds]
noop has joined #ruby
Pharaoh2_ has joined #ruby
<shay->
hi, I have an array a with hashes and I want to check if the key "installed" is not null or empty in all hashes. how to to that?
sankaber has quit [Read error: Connection reset by peer]
tunaCanBruh has quit [Ping timeout: 255 seconds]
sankaber has joined #ruby
<apeiros_>
shay-: use Array#all? and in the block .nil? and .empty?
<apeiros_>
note: it's nil in ruby, not null.
<shay->
ok thanks i will give it a try
zenith_ has joined #ruby
<apeiros_>
alternatively .none? with inversed condition in the block
<apeiros_>
*inverted
Pharaoh2 has quit [Ping timeout: 256 seconds]
EvanFreeman has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
SOLDIERz has quit [Quit: Be back later ...]
oleo is now known as Guest11037
oleo__ has joined #ruby
krisquigley has joined #ruby
Takle has quit [Remote host closed the connection]
Guest11037 has quit [Ping timeout: 240 seconds]
oleo__ has quit [Read error: Connection reset by peer]
Zamyatin has joined #ruby
mloveless has joined #ruby
piotrj has quit [Read error: Connection reset by peer]
oleo__ has joined #ruby
ta has quit [Read error: Connection timed out]
spider-mario has joined #ruby
lolmaus has joined #ruby
top4o has joined #ruby
mdw has joined #ruby
<YamakasY>
anyone seeing an issue in this script why having to nics it´s all putted in one file ? http://pastebin.com/9HXzxSKz
tjohnson has joined #ruby
ta has joined #ruby
<tobiasvl>
what?
Trynemjoel has quit [Ping timeout: 272 seconds]
lmickh has joined #ruby
<YamakasY>
tobiasvl, when I have one interface it´s all fine, all needed stuff is in there, but when I have two, both are placed in one file and the second one as the cat lines above it
<YamakasY>
so it does not loop
<YamakasY>
as it shoud
<YamakasY>
should
<YamakasY>
maybe the EOL should be lower
<YamakasY>
EOF
<IceDragon>
Its the same template isn't it...
Trynemjoel has joined #ruby
Aova has quit [Read error: Connection reset by peer]
Takle has joined #ruby
cphrmky has joined #ruby
jobewan has quit [Ping timeout: 264 seconds]
tunaCanBruh has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
Megtastique has joined #ruby
momomomomo has quit [Quit: momomomomo]
<YamakasY>
yap
sinkensabe has joined #ruby
<YamakasY>
I include this as ¨snippet¨
<IceDragon>
YamakasY: From what I see, it should work correctly, assuming the elements in the @name.interfaces Array is "correct"
<IceDragon>
@root*
<YamakasY>
yap it should be like that
<YamakasY>
let me see
aapole has quit [Ping timeout: 250 seconds]
<IceDragon>
what does an interface.name look like?
<YamakasY>
IceDragon, wrong :) I see it
einarj has quit [Remote host closed the connection]
kaspertidemann has joined #ruby
<IceDragon>
K
freerobby has joined #ruby
Aova has joined #ruby
top4o has quit [Quit: ChatZilla 0.9.91.1 [Firefox 35.0.1/20150122214805]]
momomomomo has joined #ruby
aryaching has joined #ruby
<YamakasY>
IceDragon, thanks for pointing me out :D
PanzerModern has joined #ruby
krz has joined #ruby
<IceDragon>
YamakasY: I find that querying is nice debugging method, so you're welcome
livathinos has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<IceDragon>
no problem, shevy will just make another clone :P
<shevy>
no, you are a singleton IceDragon
tagrudev has quit [Remote host closed the connection]
<IceDragon>
o_____O Who's been tampering with my source code then!?
<shevy>
you are the last of your kind
delianides has joined #ruby
<IceDragon>
orz
<shevy>
if you wanna mate you have to find a female green or blue dragon
<shevy>
or even a fiery red one
it0a has joined #ruby
crueber has joined #ruby
Xeago_ has joined #ruby
lethjakm1 has quit [Ping timeout: 250 seconds]
<IceDragon>
(⌐■_■)
<IceDragon>
Challenge accepted
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy>
I am trying to compilex latex :(
<shevy>
erm, *compile
phutchins has joined #ruby
blizzy has quit [Ping timeout: 244 seconds]
nickjj has quit [Quit: Leaving]
blackmes1 has joined #ruby
sambao21 has joined #ruby
<IceDragon>
Is compilex a new compilation method?
<IceDragon>
Sounds interesting, how does it work!?
<wasamasa>
shevy: `pdflatex document.tex`
blizzy has joined #ruby
<wasamasa>
shevy: or if you're super-edgy, replace pdflatex with xelated or lualatex
Xeago has quit [Ping timeout: 264 seconds]
jerematic has quit [Remote host closed the connection]
sigurding has quit [Ping timeout: 264 seconds]
sigurding has joined #ruby
Pharaoh2_ is now known as Pharaoh2
jerematic has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
rbennacer has joined #ruby
codecop has joined #ruby
rbennacer has quit [Remote host closed the connection]
<shevy>
IceDragon :P right now I am working through texlive
AFKGeek has quit [Quit: Fades into the shadows]
<IceDragon>
P:
rbennacer has joined #ruby
<IceDragon>
I've never used latex so I have no idea what half of this stuff is
DukeJames has quit [Ping timeout: 244 seconds]
lolmaus has quit [Quit: Konversation terminated!]
aganov has quit [Remote host closed the connection]
<shevy>
yeah
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy>
I would not want to have to learn it either but I'll have to write scientific papers sooner or later
freerobby has quit [Quit: Leaving.]
apurcell has joined #ruby
livathinos has quit []
freerobby has joined #ruby
<wasamasa>
shevy: texlive is just a tex distribution
<shevy>
I want it all!
<wasamasa>
shevy: it doesn't impose the choice of how to compile your document on you
zzzbra has joined #ruby
nanoyak has joined #ruby
Channel6 has joined #ruby
<workmad3>
shevy: why not hire someone to write the papers for you? :P
<shevy>
nah
nanoyak has quit [Remote host closed the connection]
Ankhers has joined #ruby
<shevy>
that would be like renting a lamborghini!
nanoyak has joined #ruby
jobewan has quit [Quit: Leaving]
jobewan has joined #ruby
<workmad3>
shevy: heh :) I know someone in a CS department who has a team of RAs, and one of them has basically the full-time job of writing up results into publishable papers for the rest of them :)
apurcell has quit [Ping timeout: 245 seconds]
noop has quit [Ping timeout: 245 seconds]
commmmodo has joined #ruby
Soda has joined #ruby
nickjj has joined #ruby
noop has joined #ruby
dreinull75 has quit [Remote host closed the connection]
havenwood has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
dreinull75 has joined #ruby
rippa has joined #ruby
danman has quit [Quit: danman]
gheegh has joined #ruby
Diabolik has joined #ruby
GaryOak_ has joined #ruby
riotjone_ has quit [Remote host closed the connection]
amundj has quit [Ping timeout: 245 seconds]
einarj has joined #ruby
momomomomo has quit [Ping timeout: 255 seconds]
noop has quit [Quit: Leaving]
beneggett has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
pasv_ has quit [Ping timeout: 244 seconds]
snath has joined #ruby
anaeem1 has joined #ruby
lethjakm1 has joined #ruby
iamninja has quit [Quit: ZZZzzz…]
momomomomo has joined #ruby
beneggett has quit [Client Quit]
cicloid has quit [Ping timeout: 245 seconds]
anaeem1 has quit [Remote host closed the connection]
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev2_ has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
davedev2_ has joined #ruby
davedev24_ has quit [Ping timeout: 250 seconds]
anaeem1 has quit [Remote host closed the connection]
lethjakm1 has quit [Ping timeout: 246 seconds]
Macaveli has quit [Ping timeout: 250 seconds]
sambao21 has joined #ruby
mitchellhenke has joined #ruby
anaeem1_ has joined #ruby
sambao21 has quit [Client Quit]
beneggett has joined #ruby
beneggett has quit [Client Quit]
kwd has quit [Quit: kwd]
paulfm has quit [Ping timeout: 252 seconds]
lyuben_ has quit [Quit: This computer has gone to sleep]
wallerdev has joined #ruby
_maes_ has joined #ruby
asmodlol has joined #ruby
doobi-sham-95717 has joined #ruby
shum1 has quit [Quit: WeeChat 1.1.1]
pasv_ has joined #ruby
mdw has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CustosL1men has quit [Ping timeout: 245 seconds]
ghostpl has quit [Remote host closed the connection]
dfinninger has joined #ruby
sambao21 has joined #ruby
skrite has joined #ruby
skrite has quit [Remote host closed the connection]
shum1 has joined #ruby
Alayde has joined #ruby
<Alayde>
On redhat based distributions, if a gem is installed as an RPM (e.g. rubygem-net-ssh)..is there any kind of magic I need to require it? Just doing 'require rubygems' and 'require net-ssh' in my script don't seem to be working
lethjakm1 has joined #ruby
jrvlima has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
paulfm has joined #ruby
<apeiros_>
Alayde: require is a method, the argument is a string. so you can't just have a bare word. i.e. `require "rubygems"`, not `require rubygems`
Aova has quit [Read error: Connection reset by peer]
Morkel has joined #ruby
<apeiros_>
and net-ssh is required as net/ssh
x77686d has joined #ruby
<apeiros_>
but maybe you want to elaborate your "not working" (as that's a rather useless problem description)
<Alayde>
apeiros_: It was kind of useless wasn't it
piotrj has joined #ruby
triple_b_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Alayde>
apeiros_: LoadError: no such file to load -- net/ssh
<Alayde>
or any gem installed as an RPM for that matter
<apeiros_>
and you're using the ruby installed via rpm?
sent1nel has quit [Remote host closed the connection]
<Alayde>
Correct
mikepack has joined #ruby
momomomomo has quit [Quit: momomomomo]
<apeiros_>
then IMO it should work. certainly does in non-RPM ecosystem.
i0n_ has joined #ruby
i0n_ is now known as i0n
<apeiros_>
(just verified)
lethjakm1 has quit [Ping timeout: 245 seconds]
oleo__ is now known as oleo
i0n was kicked from #ruby by apeiros_ [you're not welcome here]
<Alayde>
apeiros_: Yeah I've a sneaking suspicion there's some other bullshit going on on this server. Apparently my predacessors didn't believe in RVM
tyfighter has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
_mynameis has joined #ruby
jrvlima has joined #ruby
<shevy>
well you wont need rvm if you have only one version :)
<apeiros_>
Alayde: I have no direct experience with rpm, but second hand experience was rather troublesome. might stem from me not understanding rpm idioms, though.
<apeiros_>
that is, ruby + rpm
jusmyth has joined #ruby
Aova has joined #ruby
jusmyth has quit [Client Quit]
piotrj has quit [Ping timeout: 255 seconds]
scripore has joined #ruby
<apeiros_>
not sure, does suse use rpm? if so, try asking darix over in #ruby-lang. he should have good knowledge.
<Alayde>
apeiros_: Roger that. Appreciate the help
kaspertidemann has quit []
mkaesz has quit [Remote host closed the connection]
<apeiros_>
oh, wait, apt was the trouble maker, not rpm. I don't even have second hand experience with rpm. sorry :D
<Alayde>
lol it's all good
yfeldblum has joined #ruby
gsd has joined #ruby
RitterJack has joined #ruby
Kricir has joined #ruby
<Alayde>
Ah fuck
<Alayde>
I think I figured it out
<Alayde>
The gem path on the VM is a bit fucked. Well at least it makes sense now
sigurding has quit [Quit: sigurding]
bronson has joined #ruby
hamakn has quit [Remote host closed the connection]
droidburgundy has joined #ruby
jimms has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
__chris has joined #ruby
triple_b has joined #ruby
sinkensabe has joined #ruby
triple_b has quit [Client Quit]
bronson has quit [Ping timeout: 252 seconds]
apeiros_ has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
schickung has quit [Quit: schickung]
lethjakm1 has joined #ruby
zenith_ has quit [Ping timeout: 255 seconds]
mary5030 has joined #ruby
<IceDragon>
shevy: I just shot myself in the foot with this switch case in C o_O I have no idea how it works anymore
arup_r has joined #ruby
<havenwood>
IceDragon: Write it in mruby and embed it in your C.
<shevy>
switch case?
cpt_yossarian has joined #ruby
<IceDragon>
havenwood: Thats exactly what it is!
<havenwood>
IceDragon: Ha, nice!
tyfighter has quit [Quit: tyfighter]
apeiros_ has quit [Ping timeout: 264 seconds]
<IceDragon>
shevy: in ruby terms, its a "case when"
lethjakm1 has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
nb_bez___ has joined #ruby
Zai00 has quit [Quit: Zai00]
<IceDragon>
shevy: I'm trying to handle method overloading for a Vector3 (see how this is getting bad already), you can pass in a Vector3, 3 Numeric, or a combination of: Vector1, Vector2, or Numeric
<IceDragon>
Its the scariest shit ever written
greenarrow has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<Xeago_>
and whenever we're trying new things, we just ruby-install and chruby
<Alayde>
looks pretty neat
<havenwood>
Diabolik: Ah, well good to practice mapping anyways. :) Sec, phone.
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_ixti_ has joined #ruby
<Xeago_>
So we bundle ruby with our packages nowadays as a dependent package, and the environment for each application is set up to just know of that ruby and no other
<Xeago_>
and gems are bundled with the build as well
sigurding has joined #ruby
<Xeago_>
we haven't really used chgems yet though
ixti has quit [Ping timeout: 245 seconds]
B1n4r10 has joined #ruby
mary5030 has quit [Remote host closed the connection]
tier has joined #ruby
jrvlima has joined #ruby
<IceDragon>
YamakasY: I made a few minor changes and updated the gist, now I must do my daily walk, I hope things go fine for you :)
<workmad3>
Xeago_: I cut chruby out of the mix with my chef stuff :) only use ruby-install and use chef resources to expose the environment for a specific ruby to other parts of the automation
<YamakasY>
IceDragon, ok thanks mate!
riotjones has quit [Ping timeout: 245 seconds]
Sid05_ has joined #ruby
<Xeago_>
workmad3: yea that's essentially how we do it too :)
<Xeago_>
we don't chef, we're a puppetshop
mitchell_ has joined #ruby
<workmad3>
Xeago_: if you're doing that, why bother installing chruby? or do you only install that on dev machines? :)
zenith_ has joined #ruby
tier_ has quit [Ping timeout: 250 seconds]
<Xeago_>
for trying out new versions, custom patches, things like that
SOLDIERz has joined #ruby
<Xeago_>
we have a ruby-install puppet resource to set things up, but we also have it as a dh_ruby-install directive
penzur has quit [Ping timeout: 252 seconds]
scripore has quit [Quit: This computer has gone to sleep]
<Xeago_>
which will read .ruby-version or Gemfile
Sid05 has quit [Ping timeout: 245 seconds]
Sid05_ is now known as Sid05
ghr has quit [Ping timeout: 250 seconds]
lethjakm1 has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
timonv has quit [Ping timeout: 245 seconds]
stunder has joined #ruby
mitchellhenke has quit [Ping timeout: 245 seconds]
<workmad3>
Xeago_: ah, I set up my chef deploy to read .ruby-version from the git checkout and install that version of ruby if it's present
shum has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<workmad3>
Xeago_: it also stamps out a script to set up the environment if I need to test something out on the console :)
tjbiddle has joined #ruby
Peppuz has quit [Quit: Leaving]
apeiros_ has joined #ruby
Alayde has left #ruby ["WeeChat 1.0"]
jottr has quit [Ping timeout: 240 seconds]
lethjakm1 has quit [Ping timeout: 244 seconds]
pdoherty has quit [Remote host closed the connection]
AlexRussia has joined #ruby
banister has joined #ruby
momomomomo has joined #ruby
cphrmky has quit [Read error: Connection reset by peer]
catsoup has joined #ruby
IrishGringo has joined #ruby
sambao21 has joined #ruby
n80 has quit [Quit: n80]
sigurding has quit [Quit: sigurding]
triple_b has joined #ruby
moted has joined #ruby
livathinos has joined #ruby
livathinos has quit [Client Quit]
n80 has joined #ruby
ta has joined #ruby
lyuben_ has joined #ruby
Sid05 has quit [Quit: Sid05]
maximski has joined #ruby
Aova has quit [Read error: Connection reset by peer]
wldcordeiro_ has quit [Quit: Leaving]
wldcordeiro_ has joined #ruby
fryguy9 has quit [Quit: Leaving.]
rbennacer has quit [Remote host closed the connection]
bricker has joined #ruby
Sid05 has joined #ruby
Sid05 has quit [Client Quit]
rylev has joined #ruby
ta has quit [Ping timeout: 245 seconds]
checkit has joined #ruby
ldnunes has quit [Ping timeout: 244 seconds]
kobain has joined #ruby
Timgauthier has quit [Quit: Cities XXL is go!]
Sid05 has joined #ruby
ldnunes has joined #ruby
<Diabolik>
havenwood here?
lethjakm1 has joined #ruby
Aova has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
Lemur has joined #ruby
pdoherty has joined #ruby
deric_skibotn has joined #ruby
momomomomo_ has joined #ruby
shum has joined #ruby
krisquigley has quit [Remote host closed the connection]
krisquigley has joined #ruby
thisirs has joined #ruby
spyderman4g63 has joined #ruby
momomomomo has quit [Ping timeout: 245 seconds]
momomomomo_ is now known as momomomomo
uptownhr has joined #ruby
avahey has joined #ruby
Sid05 has quit [Ping timeout: 252 seconds]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lethjakm1 has quit [Ping timeout: 245 seconds]
aswen has quit [Ping timeout: 245 seconds]
davidhq has joined #ruby
allcentury has quit [Ping timeout: 264 seconds]
krisquigley has quit [Ping timeout: 265 seconds]
swgillespie has joined #ruby
tier has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
swgillespie has quit [Client Quit]
apurcell has joined #ruby
apurcell has quit [Read error: Connection reset by peer]
apurcell has joined #ruby
Takle has quit [Remote host closed the connection]
colli5io_ has quit []
antgel has quit [Ping timeout: 252 seconds]
scripore has joined #ruby
anaeem1_ has quit [Quit: Leaving...]
anaeem1 has joined #ruby
zenith__ has joined #ruby
Lemur has quit [Remote host closed the connection]
sambao21 has joined #ruby
hemanth has joined #ruby
mikecmpbll has quit [Ping timeout: 245 seconds]
<havenwood>
Diabolik: So you're stuck on interpolation?
patrick99e99 has quit [Read error: Connection reset by peer]
apurcell has quit [Ping timeout: 240 seconds]
pengin has quit [Remote host closed the connection]
Jackneill has joined #ruby
freerobby has quit [Quit: Leaving.]
ohaibbq has joined #ruby
pengin has joined #ruby
freerobby has joined #ruby
zenith_ has quit [Ping timeout: 245 seconds]
drkyro has joined #ruby
yfeldblum has joined #ruby
maximski has quit []
bronson has joined #ruby
selaruvich has quit [Quit: Leaving]
ohaibbq_ has joined #ruby
<havenwood>
Diabolik: Or just the test isn't passing?
drkyro has quit [Client Quit]
<havenwood>
Diabolik: Show us your code!
zenith__ has quit [Ping timeout: 245 seconds]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackoperat has joined #ruby
pengin has quit [Ping timeout: 250 seconds]
ohaibbq has quit [Ping timeout: 245 seconds]
<Diabolik>
sorry havenwood
<Diabolik>
was working
<Diabolik>
def add_two(array)
<Diabolik>
a = array.map { |n| n + 2 }
<Diabolik>
"#{}"
<Diabolik>
end
<Diabolik>
my map function is now correct
yfeldblum has quit [Ping timeout: 264 seconds]
ohaibbq_ has quit [Ping timeout: 245 seconds]
tjbiddle has quit [Quit: tjbiddle]
shum has quit [Quit: WeeChat 1.1.1]
<havenwood>
Diabolik: That method always returns an empty String.
zachrab has quit [Remote host closed the connection]
riotjones has joined #ruby
<jhass>
juicer2: look up the API docs for whatever you're using. When you can call each on it there's a good chance it includes Enumerable and you get Enumerable#to_a
<jhass>
arup_r: that requires a decent amount of staring at and since I use that capacity for gobject atm... ;P
rdark has quit [Quit: leaving]
graydot has joined #ruby
tier has joined #ruby
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devdazed_ has joined #ruby
Kache4 has joined #ruby
zachrab has joined #ruby
<arup_r>
ok
<juicer2>
jhass: thanks, wish I could find the right api reference, there's like 12 different ones for ruby and aws
<arup_r>
ignore it ;)
nickjj has joined #ruby
havenwood has quit []
<jhass>
juicer2: I usually use ruby-doc.org for MRI and rubydoc.info for everything else
JBreit has joined #ruby
zenith_ has joined #ruby
mitchell_ has quit [Quit: Computer has gone to sleep.]
<jhass>
there's omniref.com, but I find that horrible to use
Mon_Ouie has quit [Quit: WeeChat 1.1.1]
riotjones has quit [Ping timeout: 264 seconds]
devdazed has quit [Ping timeout: 256 seconds]
lioninawhat has quit [Remote host closed the connection]
<shevy>
Diabolik yield will access the whole block
<shevy>
Diabolik so you have: Foo.new { method_one; method_two; method_three } <--- all three methods are invoked if you call yield()
JBreit has left #ruby [#ruby]
nb_bez___ has quit [Quit: Connection closed for inactivity]
d10n-work has quit [Quit: Connection closed for inactivity]
dfinninger has joined #ruby
<ellisTAA>
constructors intialize variables for a new instances of a class, right?
<jhass>
that's a common thing they do, yes
allcentury has quit [Ping timeout: 240 seconds]
aapole has joined #ruby
<jhass>
not meaning it's their only purpose though
yfeldblum has quit [Ping timeout: 245 seconds]
allcentury has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
<ellisTAA>
what other purpose could they serve?
<jhass>
whatever you want to happen when a new instance of your class is instantiated really
jottr has quit [Ping timeout: 252 seconds]
<jhass>
the code they can run is in no way limited
stunder has quit [Quit: Leaving]
commmmodo has quit [Quit: commmmodo]
pengin has joined #ruby
anaeem1 has joined #ruby
skj3gg has joined #ruby
zenith_ has joined #ruby
stunder has joined #ruby
<apeiros_>
though in ruby you usually have the initializer, not a constructor. and you can create class methods which act somewhat like a constructor but funnel through initialize in the end.
sandelius has joined #ruby
sandelius has quit [Max SendQ exceeded]
duncannz has joined #ruby
<jhass>
dunno, I feel like initialize is pretty close to what other languages call constructor
icarus has joined #ruby
<jhass>
you have pretty much the same environment, an object that's allocated but not initialized
duncannz has quit [Max SendQ exceeded]
sandelius has joined #ruby
SOLDIERz has quit [Quit: Be back later ...]
duncannz has joined #ruby
drkyro has joined #ruby
sandelius has quit [Max SendQ exceeded]
drkyro has quit [Client Quit]
duncannz has quit [Max SendQ exceeded]
sandelius has joined #ruby
mLF has quit [Ping timeout: 250 seconds]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
ChoiKyuSang has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
duncannz has joined #ruby
ta has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
telling has quit [Quit: leaving]
ChoiKyuSang has joined #ruby
basichash has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
<apeiros_>
jhass: I think there was a conceptual difference between constructor and initializer
<jhass>
educate me!
<apeiros_>
maybe a constructor's return value is the constructed object? not sure. been a while.
<jhass>
I know it's not true for Java and Java definitely calls it constructor
<apeiros_>
hm, tho, not the case in some languages I know
<jhass>
my C++ is very faint but I think it's the same there
<apeiros_>
yeah
zachrab has joined #ruby
<jhass>
I think they're synonyms and initializer is maybe just a little more descriptive about the purpose
ta has quit [Ping timeout: 264 seconds]
jobewan has quit [Ping timeout: 255 seconds]
<apeiros_>
mhm, or it's another case of "diluted" language.
pmarreck_ is now known as pmarreck
mikecmpbll has quit [Quit: ciao.]
paulfm has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
spyderman4g63 has quit []
Xeago has quit [Remote host closed the connection]
goodenough has joined #ruby
allcentury has quit [Ping timeout: 245 seconds]
shellfu_afk is now known as shellfu
Lemur has quit [Remote host closed the connection]
<havenwood>
Diabolik: They are in order. The first sets `array` for the rest.
scripore has quit [Client Quit]
james_ has joined #ruby
james_ is now known as DukeJames
SOLDIERz has joined #ruby
<havenwood>
Diabolik: If you do `array = [1, 2, 3]` and `new_array = []` then the rest should work out of order.
asmodlol has quit [Ping timeout: 245 seconds]
<Diabolik>
i did them
<Diabolik>
but havenwood
Jackneill has quit [Ping timeout: 256 seconds]
<Diabolik>
how does this pertain to yield
CpuID2 has quit [Client Quit]
scripore has joined #ruby
Megtastique has quit []
scripore has quit [Remote host closed the connection]
zenith_ has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 250 seconds]
paulfm has joined #ruby
scripore has joined #ruby
mkaesz has joined #ruby
davedev2_ has quit [Ping timeout: 264 seconds]
scripore has quit [Client Quit]
sambao21 has joined #ruby
<havenwood>
Diabolik: It shows you how #each can append to a new Array to emulate #map. You're not doing anything with the value you're yielding, and it shows you how you might.
Narzew has joined #ruby
jgt has joined #ruby
yfeldblum has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
_djbkd has quit [Remote host closed the connection]
davedev24_ has joined #ruby
Takle has joined #ruby
<Diabolik>
but havenwood i thought the codeblock being fed into yield does that
momomomomo_ has joined #ruby
momomomomo has quit [Ping timeout: 244 seconds]
momomomomo_ is now known as momomomomo
SOLDIERz has quit [Ping timeout: 255 seconds]
<Diabolik>
rather than me adding something to yield itself
paulfm has quit [Remote host closed the connection]
<havenwood>
if the former, array.map(&:to_s).map(&:capitalize)
Ankhers has quit [Ping timeout: 250 seconds]
Lemur has joined #ruby
<havenwood>
or compact
metadave_ has joined #ruby
<hoelzro>
sure enough
<havenwood>
if that's the desired behavior
Aova has joined #ruby
<basichash>
i'd like to keep nil there if possible
<havenwood>
basichash: as a nil or as an empty string?
<jhass>
basichash: then just use the long form
CpuID2 has quit [Quit: This computer has gone to sleep]
<basichash>
havenwood: nil
<jhass>
.map {|month| month.capitalize if month }
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zacts has quit [Ping timeout: 245 seconds]
<havenwood>
^
Morkel has quit [Quit: Morkel]
emdub has quit [Quit: Changing server]
<basichash>
jhass: that doesn't make the change inplace though, does it?
<basichash>
it would return a new array
<jhass>
no, for that you would need the .map! variant
wallerdev has quit [Quit: wallerdev]
<basichash>
ah ok cheers
CpuID2 has joined #ruby
CpuID2 has quit [Changing host]
CpuID2 has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
<ellisTAA>
i’ve got the basics of ruby down i think. now i’m looking for the next book to help me level up while i simultaneously learn rails. any recommendations? i’ve got two avdi grimm books and sandi metz book on object oriented programming
ta has joined #ruby
Troy^ has joined #ruby
<havenwood>
ellisTAA: What have you already read?
wallerdev has joined #ruby
<ellisTAA>
havenwood: i’m about to finish peter cooper’s beginning ruby
<havenwood>
ellisTAA: The Ruby Programming Language or the Well-Grounded Rubyist, Second Edition are foundational.
<ellisTAA>
havenwood: if i have to choose 1 which do u recommend, or do u recommend both?
oetjenj has joined #ruby
<havenwood>
hmm
<havenwood>
either or both, I'd have to reread them both with it in mind
Megtastique has joined #ruby
<havenwood>
I think pick one.
<havenwood>
Or both sure wouldn't hurt.
<havenwood>
More the merrier.
commmmodo has joined #ruby
delianides has quit [Remote host closed the connection]
fryguy9 has quit [Quit: Leaving.]
delianides has joined #ruby
tyfighter has joined #ruby
<havenwood>
ellisTAA: Well-Grounded Second Edition is more up-to-date.
<havenwood>
I think.
<ellisTAA>
havenwood: thy i think ill get that one
sambao21 has joined #ruby
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
ellisTAA: speaking of Avdi, have you looked at his Ruby Tapas?: http://www.rubytapas.com/
_djbkd has joined #ruby
greenbagels has quit [Read error: Connection reset by peer]
<ellisTAA>
yeah, i think ill buy a subscription after i finish an introduction book to rails
<havenwood>
ellisTAA: Sign up for at least one month do get all back episodes.
luksaur has quit [Quit: gone]
<ellisTAA>
havenwood: thanks for sharing
dc has joined #ruby
zachrab has joined #ruby
testcore has quit [Ping timeout: 250 seconds]
tejas-manohar has joined #ruby
davedev24_ has joined #ruby
jack_rabbit has joined #ruby
zachrab has quit [Ping timeout: 264 seconds]
SOLDIERz has joined #ruby
Lemur has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
leat has quit [Ping timeout: 252 seconds]
momomomomo has quit [Ping timeout: 245 seconds]
russt1 has quit [Remote host closed the connection]
jobewan has quit [Ping timeout: 244 seconds]
linoespinoza has joined #ruby
jgt has quit [Ping timeout: 244 seconds]
delianides has quit [Remote host closed the connection]
Lemur has joined #ruby
Megtastique has quit []
Glitch has joined #ruby
dtscode- has joined #ruby
ellisTAA has quit [Quit: ellisTAA]
CpuID2 has quit [Quit: This computer has gone to sleep]
testcore has joined #ruby
graydot has quit [Quit: graydot]
SOLDIERz has quit [Ping timeout: 240 seconds]
pu22l3r_ has quit [Ping timeout: 244 seconds]
mLF has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
jack_rabbit has quit [Ping timeout: 246 seconds]
thebastl has quit [Quit: Leaving...]
allcentury has quit [Ping timeout: 264 seconds]
cjim has quit [Quit: (null)]
Glitch has quit []
davedev2_ has joined #ruby
davedev24_ has quit [Ping timeout: 245 seconds]
crdpink has quit [Quit: q term]
<Diabolik>
havenwood how often is monkey patching used in day to day ruby
paulfm has quit [Read error: Connection reset by peer]
kalusn has joined #ruby
graydot has joined #ruby
jerematic has quit [Remote host closed the connection]
<havenwood>
ahem, freedom patching
jobewan has joined #ruby
<Senjai>
Diabolik: Err day
alex88 has quit []
thisirs has quit [Ping timeout: 255 seconds]
paulfm has joined #ruby
<havenwood>
Diabolik: it's rare to monkey patch core classes
<jhass>
Diabolik: generally you should do it when you need it, not when it's just convenient
Tuxero has quit [Ping timeout: 240 seconds]
mkevin has joined #ruby
<workmad3>
^^ sometimes you can do a small monkey-patch and work around an otherwise project-crippling bug, or make something massively simpler... but it's a tool of last resort, not first choice, IMO
<ellisTAA>
will studying design patterns make me write better ruby code?
<GaryOak_>
nope
<GaryOak_>
it will help you architect better software
iliketurtles has quit [Quit: zzzzz…..]
jgt has joined #ruby
<pipework>
ellisTAA: Only as much as reading about a topic makes you better at actually doing whatever the topic covers.
waynerade has quit [Ping timeout: 256 seconds]
<ellisTAA>
garyoak: so does that mean it would come in handy when building something using Ror?
<ellisTAA>
PIPEWORK: but is it relevant?
<GaryOak_>
maybe, it just depends on the situation
jottr has quit [Ping timeout: 256 seconds]
<pipework>
ellisTAA: To what?
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
rbennace_ has joined #ruby
<ellisTAA>
is there a topic that if i study it i can solve coding problems more efficiently? i thought design patterns would do that but i guess its more related to software
juanpablo_ has quit [Ping timeout: 245 seconds]
Megtastique has joined #ruby
<workmad3>
ellisTAA: yes there is... it's called problem solving
<pipework>
ellisTAA: Yeah, lots of them. It helps to study computers, programming, maths, bartending.
<GaryOak_>
and algorithm design, and linear algebra
juanpablo_ has joined #ruby
<pipework>
because the last two aren't maths, they're tools for getting laid.
<ellisTAA>
workmad3: do u have a book on problem solving that you recommend? im looking for a good methodology
<workmad3>
ellisTAA: basically, any subject that involves taking a problem and working out solutions to it will help you solve coding problems, because it'll train you in the thought processes involved in... well... solving problems :P
<pipework>
ellisTAA: I'm a fan of the Bereinstain bears series.
<GaryOak_>
haha
rbennacer has quit [Ping timeout: 244 seconds]
iliketurtles has joined #ruby
thiagovsk has quit [Quit: Connection closed for inactivity]
iliketurtles has quit [Remote host closed the connection]
Lemur has quit [Remote host closed the connection]
iliketurtles has joined #ruby
<wasamasa>
workmad3: why no hello kitty sudoku
rbennace_ has quit [Ping timeout: 252 seconds]
Hijiri has joined #ruby
<workmad3>
wasamasa: very quick search :P
<wasamasa>
ok
devdazed has quit [Quit: Computer has gone to sleep.]
<wasamasa>
ellisTAA: the best way to get better at solving problems is... solving more problems
<wasamasa>
ellisTAA: I know, anticlimatic
<workmad3>
wasamasa: although I'm now tempted to see if there's a book "Problem solving with My Little Pony"...
SOLDIERz has quit [Ping timeout: 252 seconds]
tyfighter has quit [Quit: tyfighter]
<wasamasa>
ellisTAA: there are actually books about algorithms, data structures, program design, etc.
<wasamasa>
ellisTAA: but even these need to be figured out by you
<pipework>
There are also books about adorable bears that have some pretty fun and silly adventures while running into and eventually solving problems.
josephndenton has quit [Ping timeout: 246 seconds]
agjacome has quit [Quit: leaving]
lioninawhat has quit [Remote host closed the connection]
<workmad3>
ellisTAA: but I'm sure you get the idea by now... problem solving skills are multi-discipline, studying them in one area helps with solving problems in other areas (books on specific subject-area knowledge give you a boost in an area as it makes you more aware of potential solutions... but without that base of problem-solving, you'll just be grasping at straws)
jhebden has joined #ruby
jenrzzz_ has joined #ruby
LouisRoR has quit [Ping timeout: 250 seconds]
triple_b has joined #ruby
dfinninger has quit [Remote host closed the connection]
jerematic has quit [Ping timeout: 264 seconds]
axl_ has left #ruby [#ruby]
jenrzzz has quit [Ping timeout: 264 seconds]
mloveless has quit []
_ixti_ has quit [Ping timeout: 264 seconds]
mkevin has quit [Quit: mkevin]
jenrzzz has joined #ruby
Lemur has joined #ruby
RitterJack has quit [Remote host closed the connection]
jenrzzz_ has quit [Ping timeout: 250 seconds]
pdoherty has quit [Remote host closed the connection]
Alina-malina has quit [Ping timeout: 244 seconds]
maletor has quit [Ping timeout: 240 seconds]
jgt has quit [Ping timeout: 245 seconds]
maximski has joined #ruby
zzzbra has quit [Ping timeout: 245 seconds]
maximski has quit [Max SendQ exceeded]
athan has joined #ruby
knut has quit [Ping timeout: 245 seconds]
maximski has joined #ruby
metadave_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
quimrstorres has quit [Remote host closed the connection]
tunaCanBruh has quit [Ping timeout: 245 seconds]
n80 has quit [Quit: n80]
zzzbra has joined #ruby
DadoCe has quit [Remote host closed the connection]
diegoviola has quit [Remote host closed the connection]
quimrsto_ has joined #ruby
jottr has joined #ruby
Takle has joined #ruby
LouisRoR has joined #ruby
Pumukel has quit [Quit: ChatZilla 0.9.91.1 [Firefox 35.0.1/20150122214805]]
blizzy has quit [Ping timeout: 244 seconds]
ellisTAA has quit [Quit: ellisTAA]
dotix has joined #ruby
Musashi007 has quit [Quit: Musashi007]
athan has quit [Ping timeout: 252 seconds]
sn0wb1rd has quit [Ping timeout: 245 seconds]
DadoCe has joined #ruby
Aova has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
lele has quit [Ping timeout: 252 seconds]
Takle has quit [Ping timeout: 245 seconds]
sn0wb1rd has joined #ruby
maximski has quit []
zacstewart has quit [Remote host closed the connection]
quimrsto_ has quit [Remote host closed the connection]
adriancb has quit [Remote host closed the connection]
juanpablo_ has quit [Ping timeout: 252 seconds]
tunaCanBruh has joined #ruby
dotix has quit [Ping timeout: 264 seconds]
_ixti_ has joined #ruby
juanpablo_ has joined #ruby
quimrstorres has joined #ruby
echevemaster has joined #ruby
tejas-manohar has quit [Quit: Page closed]
ghr has joined #ruby
Aova has joined #ruby
sinkensabe has quit [Ping timeout: 245 seconds]
Lemur has quit [Remote host closed the connection]
corg has quit [Ping timeout: 246 seconds]
zachrab has quit [Remote host closed the connection]
systemd0wn has quit [Remote host closed the connection]
fryguy9 has quit [Quit: Leaving.]
quimrstorres has quit [Remote host closed the connection]
terabyte has quit [Quit: Leaving]
scripore has joined #ruby
zzzbra has quit [Ping timeout: 252 seconds]
jhebden has quit [Ping timeout: 252 seconds]
quimrstorres has joined #ruby
zachrab has joined #ruby
revoohc has joined #ruby
enebo has quit [Quit: enebo]
ferr has quit [Remote host closed the connection]
Megtastique has quit []
quimrstorres has quit [Remote host closed the connection]
pu22l3r has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
fryguy9 has joined #ruby
freerobby has quit [Quit: Leaving.]
n_blownapart has joined #ruby
n80 has joined #ruby
kobain has joined #ruby
ghr has quit [Ping timeout: 255 seconds]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ruby
penzur has joined #ruby
penzur has quit [Read error: Connection reset by peer]
JoshGlzBrk has joined #ruby
Solnse has joined #ruby
thumpba has quit [Remote host closed the connection]
jhebden has joined #ruby
fryguy9 has quit [Quit: Leaving.]
solars has quit [Ping timeout: 256 seconds]
nobitanobi has joined #ruby
hmsimha has quit [Ping timeout: 252 seconds]
rbennacer has joined #ruby
stunder has quit [Remote host closed the connection]
n80 has quit [Quit: n80]
apeiros_ has quit [Remote host closed the connection]
Deithrian has quit [Read error: Connection reset by peer]