<epitron>
also, i'm sorry you had to deal with zenspider
zacts has quit [Read error: Connection reset by peer]
<epitron>
please come back anyways
<shevy>
hey
<shevy>
as long as he wasn't suggesting that someone else were to cut his toeclaws, erm .. nails!
zacts has joined #ruby
zacts has quit [Changing host]
zacts has joined #ruby
<wolf4ood>
yes because it uses double precision i think G
<epitron>
so much precision for such a small number
<epitron>
you can use 22.20.rationalize if you want the exact value :)
bkulbida has joined #ruby
<wolf4ood>
ok thanks :D
<epitron>
it's really easy to serialize too
<epitron>
just .to_s it
<epitron>
deserialize is: Rational( string )
jeff-ooh has joined #ruby
<wolf4ood>
cook thanks :D
<epitron>
np!
LouisRoR has joined #ruby
bkulbida has quit [Client Quit]
startupality has quit [Quit: startupality]
hamakn has joined #ruby
davedev24_ has quit [Ping timeout: 258 seconds]
davedev24_ has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
bigkevmcd has quit [Read error: Connection reset by peer]
nicolastarzia has joined #ruby
Neomex has quit [Read error: Connection reset by peer]
jaequery has joined #ruby
hamakn has quit [Ping timeout: 245 seconds]
olivier_bK has quit [Ping timeout: 244 seconds]
nicolastarzia has quit [Ping timeout: 240 seconds]
Akuma has quit [Quit: So long sukkas!]
marcules has quit [Quit: Page closed]
jeff-ooh has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
Musashi007 has quit [Ping timeout: 265 seconds]
elfuego has joined #ruby
patrick99e99 has quit [Ping timeout: 240 seconds]
sargas has quit [Quit: This computer has gone to sleep]
zacts has quit [Read error: Connection reset by peer]
<elfuego>
I’m new to ruby, but i’m an experienced developer, and I’d like to learn just the key features and syntax of ruby. I’m looking for a quick video tutorial that can give me a quick summary/run down of the language. Any useful resources?
<shevy>
don't think so
<shevy>
you could randomly try to search for youtube entries about ruby
rbennacer has quit [Remote host closed the connection]
econerd4ever has quit [Remote host closed the connection]
econerd4ever has joined #ruby
<apeiros_>
elfuego: zenspiders quickref gives you all of rubys syntax (not a video, though)
checkit has quit [Ping timeout: 240 seconds]
<apeiros_>
!quickref
<apeiros_>
oh, helpa is out :(
delianid_ has quit [Remote host closed the connection]
<shevy>
it's bot x-mas
<shevy>
>> 'right?'
<shevy>
see, bots are unwrapping their gifts as we type
<epitron>
i took a video of the webpage... it's a video
zakiazig_ has joined #ruby
lampd1 has quit [Ping timeout: 258 seconds]
supersym has joined #ruby
Youka has joined #ruby
rshetty has joined #ruby
windowlicker has quit [Quit: Lost terminal]
<Youka>
Is there a Ruby JIT for windows? I found Rubinius, which doesn't support windows yet, and rujit, which isn't possible to compile because of broken code (f.e. gcc attributes in msvc build, failing download connection with mingw).
amclain has joined #ruby
<brixen>
Youka: JRuby has a JIT and also has HotSpot's JIT under that
rockdon has quit [Ping timeout: 258 seconds]
mjmac has quit [Ping timeout: 258 seconds]
helpa has joined #ruby
<brixen>
s/HotSpot/JVM/ more generally, I suppose
<Youka>
Doesn't this require Java? Would like to have without.
<brixen>
it does require Java
<brixen>
Youka: are you interested in helping Rubinius work on Windows? :)
<shevy>
:D
<brixen>
I got the VM to compile at one point
<brixen>
there was an issue linking C-exts
mjmac has joined #ruby
<Youka>
I just want to compile it for a friend, not go that far :D
<shevy>
hehehe
<brixen>
Youka: there's also IronRuby, which uses the CLR, but it hasn't seen much work in a while I think
<porfa>
the only scrape i’ve done before was simple scraping, the images where located at an fixed url, so that was easy.. but a tutorial on css selectors would be the best right now
klmlfl has quit [Remote host closed the connection]
<sevenseacat>
you dont provide information, we can't provide help
<sevenseacat>
sorry.
patrickholmes has quit [Ping timeout: 244 seconds]
patrickholmes_ is now known as patrickholmes
lxsameer has quit [Read error: No route to host]
Takle has quit [Ping timeout: 265 seconds]
Cache_Money has joined #ruby
<arup_r>
sevenseacat: What information you need..
<arup_r>
?
<sevenseacat>
(16:26:35) sevenseacat: is that the version of ruby you're using? whats the actual error message?
<arup_r>
sevenseacat: Yes.. 2.1.5
<Hanmac>
sevenseacat: hm it looks like the method is gone ...
<arup_r>
Did you try?
<Hanmac>
sevenseacat: the method is documented but does not exist in the code
<arup_r>
hanmac: +1
<sevenseacat>
hanmac: i'm not the one with the problem
<sevenseacat>
i was just starting the debugging process
<Hanmac>
sevenseacat: yes, but its not arup_r's fault that it does fail
<arup_r>
+1
<sevenseacat>
i hadn't gotten that far yet
cantonic has quit [Quit: cantonic]
_Andres has quit [Read error: Connection reset by peer]
_Andres has joined #ruby
<Hanmac>
HA! i found the culpit! its a class method but its documented as instance method!
<arup_r>
hanmac: Need to report as a doco outdated.. It seems..
cantonic has joined #ruby
<Hanmac>
arup_r: "res.class.body_permitted?" works for me ...
<arup_r>
humm
<arup_r>
Got the moto of the example now..
<arup_r>
:)
rshetty has quit [Read error: Connection reset by peer]
bashusr has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
x1337807x has joined #ruby
hephaestus_rg has quit [Ping timeout: 245 seconds]
bashusr has joined #ruby
maestrojed has joined #ruby
<arup_r>
hanmac: need one help I will be doing Ajax call with URL pattern like http://www.example.com/foo?start=1&sz=50&format=ajax.. Where 1 and 50 I want to change for each call.. like 51..100, 101..50 etc How can I do that using regex ?
<arup_r>
How many time I need to replace I do have the logic.. Only not able to replace those numbers..
<Hanmac>
nope i am not doing ajax stuff
bradleyprice has quit []
lkba_ has quit [Ping timeout: 245 seconds]
<arup_r>
I need regex help
<arup_r>
can I substitute those numbers dynamically?
<arup_r>
hanmac: ^
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
hgl has quit [Max SendQ exceeded]
hgl has joined #ruby
josephndenton has joined #ruby
georgesmith has quit [Quit: georgesmith]
Morkel has quit [Quit: Morkel]
keen__________11 has joined #ruby
keen__________10 has quit [Ping timeout: 245 seconds]
josephndenton has quit [Ping timeout: 258 seconds]
Zai00 has quit [Remote host closed the connection]
kj_ has joined #ruby
chinaski has joined #ruby
charliesome has joined #ruby
echooo1 has quit [Ping timeout: 245 seconds]
basex has joined #ruby
<certainty>
>> Array.new(3,"Ho!").each(&:display)
<certainty>
damn
<certainty>
anyway
Zai00 has joined #ruby
echooo has joined #ruby
chinaski has quit [Ping timeout: 258 seconds]
ohaibbq has quit [Quit: Leaving...]
basex has quit [Ping timeout: 240 seconds]
echooo1 has joined #ruby
<wasamasa>
you should be scheming anyways
echooo has quit [Ping timeout: 255 seconds]
<certainty>
wasamasa: heh ... good point
<certainty>
the sad truth is that i sadly get to scheme lately
<certainty>
erm
<certainty>
rarely
jdj_dk has joined #ruby
<wasamasa>
pah, I solved exercise 1.1 of SICP today
<certainty>
cool that's a fine book
zorak8 has quit [Ping timeout: 244 seconds]
<wasamasa>
yeah, I'm afraid the learning curve will go the emacs way though
echooo1 has quit [Ping timeout: 265 seconds]
<certainty>
heh yeah probably.
echooo has joined #ruby
jeff-ooh has joined #ruby
<certainty>
wasamasa: one thing that blew my mind was when things gone meta-circular
nicolastarzia has joined #ruby
<wasamasa>
mhh
gokulnath has quit [Quit: Leaving]
<wasamasa>
I got introduced to programming at university with a course that mixed up htdp with bits of sicp, the only thing that made sense was the calculator example
echooo1 has joined #ruby
nfk has joined #ruby
<wasamasa>
I didn't have an idea before what parsing and interpreting actually meant
echooo has quit [Ping timeout: 265 seconds]
<certainty>
wasamasa: one of the fundamental takeaways from SICP is that it explains very well how computation works. To think in terms of what processes a computation creates rather than how it is implemented
<certainty>
that's something i still use today
<certainty>
and teach to younger colleagues
chinaski has joined #ruby
<kj_>
Hi I have return a ruby script in which I am using net/smtp to send mails. In IRB first time it worked so I integrated it with the scripts now it's giving error and the error is
brahmadpk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeff-ooh has quit [Remote host closed the connection]
nicolastarzia has quit [Ping timeout: 240 seconds]
supersym has joined #ruby
<certainty>
wasamasa: do you also know the little/seasoned schemer?
sevenseacat has joined #ruby
echooo1 has quit [Ping timeout: 272 seconds]
<wasamasa>
certainty: someone at me hackerspace taught me about it
<wasamasa>
*my
<certainty>
those are very fine books as well
<certainty>
also the reasoned schemer
echooo1 has joined #ruby
<certainty>
for CL the two LoLs are great resources (of course also practical common lisp)
basex has joined #ruby
codecop has joined #ruby
<kj_>
Hi I have return a ruby script in which I am using net/smtp to send mails. In IRB first time it worked so I integrated it with the scripts now it's giving error and the error is `check_auth_response': 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgjhbuxj (Net::SMTPAuthenticationError)
Spami has quit [Quit: This computer has gone to sleep]
echooo has quit [Ping timeout: 245 seconds]
dseitz has joined #ruby
<certainty>
kj_: well check your credentials. It says that SMTP Auth failed
<certainty>
either that or your auth mechenism is not supported but iirc that would yield a different error
<certainty>
mechanism, even
<wasamasa>
wait, two LoL?
<wasamasa>
I only know about doug hoyte's let over lambda
<certainty>
wasamasa: yeah Let over Lambda and Land of Lisp
<kj_>
no issues with credentials certainty
echooo has joined #ruby
echooo1 has quit [Ping timeout: 245 seconds]
<certainty>
time to head to the family ... have fun
<kj_>
certainty_ no issues with credentials
m8 has joined #ruby
oo_ has quit [Remote host closed the connection]
echooo has quit [Ping timeout: 252 seconds]
supersym has quit [Quit: WeeChat 1.0.1]
Guest26597 has joined #ruby
echooo has joined #ruby
zorak8 has joined #ruby
Xeago has joined #ruby
<wasamasa>
certainty: well, my friend who introduced me to the little schemer told me he was disappointed with let over lambda since it assumed you already know a different language well enough to not stumble over every example
echooo1 has joined #ruby
echooo has quit [Ping timeout: 264 seconds]
Takle has joined #ruby
jeanlinux has joined #ruby
anaeem1__ has joined #ruby
Jackneill has joined #ruby
zorak8 has quit [Read error: Connection reset by peer]
alex88_ has joined #ruby
echooo has joined #ruby
zorak8 has joined #ruby
vvivv has joined #ruby
anaeem1_ has quit [Ping timeout: 245 seconds]
echooo1 has quit [Ping timeout: 264 seconds]
alex88 has quit [Ping timeout: 256 seconds]
lzx has joined #ruby
echooo1 has joined #ruby
jeanlinux has quit [Ping timeout: 244 seconds]
Xeago has quit [Remote host closed the connection]
green-big-frog is now known as frog|OFF
echooo has quit [Ping timeout: 240 seconds]
echooo has joined #ruby
echooo1 has quit [Ping timeout: 240 seconds]
<godd2>
I can't define pattern matching, but I'll know it when I see it.
rylev has joined #ruby
Synthead has quit [Quit: Leaving]
echooo1 has joined #ruby
echooo has quit [Ping timeout: 252 seconds]
ta has joined #ruby
max96at|off is now known as max96at
iamninja has quit [Quit: ZZZzzz…]
kirun has joined #ruby
rylev has quit [Ping timeout: 272 seconds]
leonmaia has joined #ruby
echooo has joined #ruby
echooo1 has quit [Ping timeout: 252 seconds]
doritostains has quit [Quit: WeeChat 1.0.1]
dumdedum has joined #ruby
aspiers has joined #ruby
<kj_>
Guys I want to send email through ruby scripts any help ?
Guest26597 has quit [Ping timeout: 245 seconds]
echooo1 has joined #ruby
hakunin has quit [Read error: Connection reset by peer]
hakunin_ has joined #ruby
echooo has quit [Ping timeout: 252 seconds]
anaeem1_ has joined #ruby
anaeem1__ has quit [Read error: Connection reset by peer]
echooo has joined #ruby
_Andres has joined #ruby
Takle has quit [Remote host closed the connection]
brahmadpk has joined #ruby
echooo1 has quit [Ping timeout: 252 seconds]
chinaski has quit [Ping timeout: 244 seconds]
rshetty_ has joined #ruby
druznek has joined #ruby
echooo1 has joined #ruby
AndyBotwin has quit [Read error: Connection reset by peer]
olivier_bK has quit [Quit: Quitte]
aspiers has quit [Ping timeout: 272 seconds]
AlexRussia has joined #ruby
rkalfane has joined #ruby
olivier_bK has joined #ruby
olivier_bK has quit [Remote host closed the connection]
JimmyNeutron has joined #ruby
olivier_bK has joined #ruby
leonmaia has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anaeem1_ has quit [Remote host closed the connection]
rshetty_ has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
tombroom_ has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
nicolastarzia has joined #ruby
mikecmpbll has joined #ruby
bkulbida has joined #ruby
<superrorc>
and one question please , trying to add symbol of new line ...
<superrorc>
out_file.write(ips.uniq.join('\n'))
<superrorc>
its failed
dionysus69 has quit [Quit: ChatZilla 0.9.91.1 [Firefox 34.0/20141127111021]]
rshetty_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
<godd2>
What is the most expressive programming language, and why is it Ruby?
nicolastarzia has quit [Ping timeout: 244 seconds]
rshetty_ has quit [Remote host closed the connection]
<superrorc>
got it) \\n
bkulbida has quit [Client Quit]
porfa has quit [Ping timeout: 265 seconds]
rshetty_ has joined #ruby
rshetty has quit [Ping timeout: 255 seconds]
tkuchiki has quit [Ping timeout: 245 seconds]
porfa has joined #ruby
tuelz has joined #ruby
child has joined #ruby
zorak8 has quit [Ping timeout: 245 seconds]
<child>
Im fucking trying to install ruby gem and bundle.... but bundle cannot be run as root, and as normal user it even not appears to the command line
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
yeticry has quit [Ping timeout: 245 seconds]
sevvie has quit [Read error: Connection reset by peer]
despai has joined #ruby
startupality has quit [Quit: startupality]
sevvie has joined #ruby
valeriansaliou has joined #ruby
rshetty_ has quit [Remote host closed the connection]
dumdedum has quit [Quit: foo]
Takle has quit [Remote host closed the connection]
rshetty has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
valeriansaliou has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
spicerack has joined #ruby
mikecmpbll has joined #ruby
<superrorc>
child: $PATH ?
brahmadpk has joined #ruby
kiyote23 has joined #ruby
jmacdonald has joined #ruby
mikecmpbll has quit [Client Quit]
gr33n7007h has joined #ruby
kiyote23 has quit [Ping timeout: 258 seconds]
thoughnut has quit [Ping timeout: 244 seconds]
lzx has quit [Remote host closed the connection]
basex has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
leitz has joined #ruby
<leitz>
I think I'm in OOP hell...
TPBaublebag has joined #ruby
<leitz>
An object has certain attributes. The class is almost always a super class. Sub-classes affect the attributes in differnet ways.
jespada has joined #ruby
<leitz>
But a few of the attributes affect which subclass is chosen. So it seems like I need to instantiate the super class and then somehow toss in the right subclass.
<leitz>
For an OOP newbie, this is confusing. At least for this OOP newbie...
<shevy>
leitz the problem starts when you use terms like "attributes"
georgesmith has joined #ruby
<shevy>
and what does "The class is almost always a super class" mean
charliesome has quit [Quit: zzz]
hiyosi has joined #ruby
chinmay_dd has joined #ruby
ta has quit [Remote host closed the connection]
ta has joined #ruby
josephndenton has joined #ruby
alex88 has quit []
rshetty has joined #ruby
Aryasam has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
<leitz>
shevy, the super class is seldom if ever used by itself. Objects are almost always created from the subclasses.
<shevy>
right so why is the super class important
<shevy>
the subclass already has the instance variables it requires
<sevenseacat>
youre not in OOP hell, you just dont really understand what youre trying to do
Takle has joined #ruby
<leitz>
sevenseacat, I don't disagree. Just don't really get it.
<sevenseacat>
maybe explain to us what youre trying to do?
<shevy>
take sevenseacat here
<shevy>
the superclass is class Cat
<sevenseacat>
meow.
josephndenton has quit [Ping timeout: 272 seconds]
<leitz>
shevy, the issue is that there are half a dozen possible sub-classes. An object only belongs to one, but which one is affected by the objects instance variables.
echooo has quit [Read error: Connection reset by peer]
<shevy>
what is characteristic of a cat? four legs... a tail... a characteristic sound ... and whiskers.
sevvie has joined #ruby
* leitz
visualizes seavenseacat introspecting...
<shevy>
yes there can be many different cats. for example, class Garfield is a fat cat instance
* sevenseacat
looks down own shirt
<shevy>
and we assume that these be unique cats, so there is only one instance of class Garfield
<shevy>
the instance variables do not determine as to what class something is; you always have the reference to class.self in your class
<kj_>
It seems that we can't send email from irb or ruby-scripts as I tried all possibilities
<leitz>
What if the superclass is Pet, and one of the variables is 'has_fur'. Sub-classes might be Cat, Dog, and FIsh. Which sub-class chosen depends on has_fur.
<sevenseacat>
your authentication details are wrong.
<sevenseacat>
use the right ones.
<kj_>
:( It worked fine when I try to login through firefox
<shevy>
leitz yes, then you set this in your subclass
<shevy>
leitz if you need to access the parent method, you can always use a call to super()
<sevenseacat>
what happens when you click on the link?
Techguy305 has joined #ruby
<shevy>
leitz you can not "choose" on an "attribute" without knowing what it is beforehand
<kj_>
redirecting me to login page
Scripore has joined #ruby
<kj_>
then "Security Checkup" Wizard
<sevenseacat>
wtf is a security checkup wizard
<shevy>
leitz what you describe here sounds as a factory pattern for creating instances, so you need another class that handles the proper instantiation of this depending on a has_fur instance variable; but it still does not make sense, because @has_fur is only available when you instantiate it
<kj_>
ya same reaction everytime I receive that link and click
<kj_>
over and over redirecting me to same link
Guest76 has joined #ruby
noop has joined #ruby
<kj_>
I don't know wat I am missing here
sevvie has quit [Read error: Connection reset by peer]
<sevenseacat>
sounds like your gmail account is a bit screwy
tombroom_ has quit [Remote host closed the connection]
<kj_>
ohk
<kj_>
Can you please suggest one
arup_r has quit [Remote host closed the connection]
AlexRussia has quit [Ping timeout: 245 seconds]
<sevenseacat>
if you just want to test sending mail locally, i would suggest something like mailcatcher.
mrnugget has joined #ruby
<leitz>
shevy, let me look at this a little differently, I'm still learning Ruby. Can I create the object with the super class and then somehow attach options from something else?
AlexRussia has joined #ruby
mrnugget has quit [Read error: Connection reset by peer]
sevvie has joined #ruby
Guest76 has quit [Ping timeout: 264 seconds]
jerius has joined #ruby
<leitz>
For example, Oscar = Pet.new.. include cat_options; outside = skin_options[rand(skin_options.length)]
mrnugget has joined #ruby
<leitz>
where skin_options would vary but whatever sort of *_options were chosen.
lampd1 has joined #ruby
<leitz>
The other idea is to generate the variables that affect sub-class options and then set them into the object after it is instantiated.
<leitz>
On a totally differnet note, sevenseacat, is your name related to a game?
<sevenseacat>
nup
<leitz>
Just wondering, it was a great game.
lampd1 has quit [Ping timeout: 258 seconds]
rylev has joined #ruby
Flcn has quit [Quit: Be back later ...]
sevenseacat has quit [Remote host closed the connection]
chinmay_dd has quit [Quit: Leaving]
TgMts has joined #ruby
<dtordable>
shevy: hello!!!!!!!!!![H
samfisher has joined #ruby
<samfisher>
hi, anyone here to help me with a small ruby script?
<AxonetBE>
but I want to have the 500 before the 1000, is there a way to do this without creating extra field?
bkulbida has joined #ruby
<shevy>
leitz ah you want a shapechanging object
vjt has quit [Quit: reboot]
reinaldob has quit [Remote host closed the connection]
<shevy>
leitz that is not easily possible; evil.rb allowed this once but it won't be supported in default ruby
<shevy>
leitz also, include happens inside of a class
reinaldob has joined #ruby
reinaldob has quit [Read error: Connection reset by peer]
<shevy>
leitz one way you can realize this is not by subclassing but by adding a module of your choosing at run-time
reinaldob has joined #ruby
<shevy>
I still don't understand where your subclass kicks in in your example leitz - so far you only described an instance of class Pet. Where are the subclasses here?
rkday has joined #ruby
<leitz>
shevy, a sub-class might be Cat or Dog. Or Fish, if you don't like fur.
<apeiros_>
AxonetBE: that's called natural sorting. and reminds me that I still haven't added it to my `sorting` gem.
rshetty has quit [Remote host closed the connection]
<AxonetBE>
apeiros_: found something : products.sort_by { |x| x.title[/\d+/].to_i }
<apeiros_>
AxonetBE: that will only sort by number
<AxonetBE>
that is ok as the title contains always a product number
<apeiros_>
if you want to sort by nothing but that number, then that solution is good, yes
nicolastarzia has joined #ruby
AlexRussia has quit [Ping timeout: 258 seconds]
jeremywrowe has joined #ruby
nateberkopec has joined #ruby
ta has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Hobogrammer has quit [Ping timeout: 264 seconds]
psyprus has joined #ruby
* leitz
is called to the brunch table. Back in a few.
giuseppesolinas has quit [Quit: This computer has gone to sleep]
Mia has quit [Ping timeout: 258 seconds]
nicolastarzia has quit [Ping timeout: 255 seconds]
anaeem1 has quit [Remote host closed the connection]
hamakn has quit [Remote host closed the connection]
silkfox has joined #ruby
elaptics is now known as elaptics`away
paulfm has joined #ruby
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tvw has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
spicerack has joined #ruby
mary5030 has joined #ruby
spicerack has quit [Client Quit]
TgMts has quit [Quit: No Ping reply in 180 seconds.]
noop has quit [Quit: Leaving]
noop has joined #ruby
DadoCe has joined #ruby
AlexRussia has joined #ruby
TgMts has joined #ruby
mengu has quit [Remote host closed the connection]
jeremywrowe has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
sevvie has quit [Ping timeout: 258 seconds]
elfuego has quit [Quit: elfuego]
josephndenton has joined #ruby
jheg has quit [Quit: jheg]
TgMts has quit [Quit: No Ping reply in 180 seconds.]
LouisRoR has quit [Ping timeout: 244 seconds]
sevvie has joined #ruby
TgMts has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
josephndenton has quit [Ping timeout: 265 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 272 seconds]
lkba has joined #ruby
mary5030 has quit [Remote host closed the connection]
sevvie has joined #ruby
mary5030 has joined #ruby
kiyote23 has joined #ruby
dtordable has quit [Quit: leaving]
dtordable has joined #ruby
noop has quit [Ping timeout: 264 seconds]
noop has joined #ruby
dtordable has quit [Client Quit]
TgMts has quit [Ping timeout: 240 seconds]
dtordable has joined #ruby
dtordable has quit [Changing host]
dtordable has joined #ruby
oo_ has joined #ruby
elfuego has joined #ruby
mrnugget has quit [Quit: mrnugget]
elfuego has quit [Client Quit]
sevvie has quit [Read error: Connection reset by peer]
anarang has quit [Quit: Leaving]
lkba has quit [Ping timeout: 255 seconds]
oleo__ is now known as oleo
sevvie has joined #ruby
bradland has joined #ruby
frog|OFF is now known as green-big-frog
Aryasam_ has joined #ruby
Aryasam has quit [Ping timeout: 264 seconds]
sevvie has quit [Read error: Connection reset by peer]
sevvie has joined #ruby
iamjarvo_ has joined #ruby
iamjarvo_ has quit [Max SendQ exceeded]
mary5030 has quit [Remote host closed the connection]
iamjarvo_ has joined #ruby
silkfox has quit [Ping timeout: 240 seconds]
nateberkopec has quit [Quit: Leaving...]
tus has joined #ruby
evanjs has quit [Remote host closed the connection]
kj_ has quit [Quit: Page closed]
pushpak has joined #ruby
giuseppesolinas has joined #ruby
Kricir has joined #ruby
paulfm has quit [Quit: Zzzzz...]
sevvie has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
green-big-frog is now known as frog|OFF
lxsameer has quit [Quit: Leaving]
behrz has joined #ruby
behrz has quit [Read error: Connection reset by peer]
rkalfane has joined #ruby
behrz has joined #ruby
delianides has joined #ruby
reinaldob has joined #ruby
sevvie has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
silkfox has joined #ruby
anaeem1 has joined #ruby
<samfisher>
anyone here pls?
<bradland>
there are 836 of us here
davout has joined #ruby
<samfisher>
bradland: I have this method nexmo.send_message(from: 'Ruby', to: 'YOUR NUMBER', text: 'Hello world') and would like to have 'Ruby" replaced with each line of a file
<samfisher>
but dunnot exactly how to do it
<samfisher>
I have File.readlines(file).each do |line|
behrz has quit [Ping timeout: 258 seconds]
<bradland>
ok, you’re on the right track
beef-wellington has joined #ruby
<bradland>
but one recommendation
jheg has joined #ruby
<samfisher>
yes please
reinaldob has quit [Ping timeout: 264 seconds]
dandrade has joined #ruby
yeticry has joined #ruby
tvw has quit []
<bradland>
don’t use File.readlines
<bradland>
just use File.open
<bradland>
File.readlines reads the entire file in to memory, which is inefficient
silkfox has quit [Ping timeout: 258 seconds]
<samfisher>
ok
kish has quit [Read error: Connection reset by peer]
<bradland>
File.open streams the file, which will read in chunks of the file in order to limit memory usage
<samfisher>
and then, how do I replace 'Ruby' with the read variables?
<bradland>
only use readlines when you need to perform an action that requires your app to “know” the entire contents
<bradland>
within the block, the variable “line” contains the line from the file
<bradland>
it’s called an iterator
mattwildig has joined #ruby
kish has joined #ruby
<samfisher>
thank you. I didn't knew what is called and couldn't search much on google
freerobby has joined #ruby
<shevy>
hanmac, does your new computer work finally?
<bradland>
the code within the do/end block will be called once for each line of the file
<bradland>
and “line” will contain a string representing the line
<samfisher>
so to: line will work?
despai has quit [Ping timeout: 264 seconds]
vvivv has quit [Ping timeout: 252 seconds]
AxonetBE has quit [Quit: AxonetBE]
kapil__ has quit [Quit: Connection closed for inactivity]
snath has quit [Ping timeout: 250 seconds]
<samfisher>
amazing
<samfisher>
it worked
yeticry has quit [Ping timeout: 245 seconds]
despai has joined #ruby
Aryasam_ has quit [Quit: Bye]
kish has quit [Read error: Connection reset by peer]
chipotle has quit [Max SendQ exceeded]
Zai00 has quit [Quit: Zai00]
kish has joined #ruby
rylev has joined #ruby
chipotle has joined #ruby
cajone has quit [Quit: Leaving.]
keen__________12 has joined #ruby
oleo has quit [Quit: Verlassend]
kish has quit [Read error: Connection reset by peer]
cajone has joined #ruby
keen__________11 has quit [Ping timeout: 252 seconds]
cajone has quit [Remote host closed the connection]
<Hanmac>
shevy new system is working, i already did play some games and do program again ... and i got a present from the ruby bug ticker xD
ta has quit [Remote host closed the connection]
cajone has joined #ruby
cajone has quit [Remote host closed the connection]
kish has joined #ruby
<shevy>
\o/
samfisher has quit [Quit: exit error code 434]
Flcn has joined #ruby
cajone has joined #ruby
oleo has joined #ruby
TgMts has joined #ruby
Takle_ has joined #ruby
Takle has quit [Ping timeout: 265 seconds]
Flcn_ has joined #ruby
lkba has joined #ruby
Deele has quit [Ping timeout: 244 seconds]
Scripore has quit [Ping timeout: 240 seconds]
delianides has quit [Remote host closed the connection]
TgMts has quit [Client Quit]
kish has quit [Read error: Connection reset by peer]
Flcn has quit [Ping timeout: 264 seconds]
<shevy>
we are the bug exterminators
<shevy>
we eliminate them
despai has quit [Quit: This computer has gone to sleep]
<bradland>
speak for yourself
<shevy>
we grab them by the balls and toss them out the window
<bradland>
i’m a bug factory
hamakn has joined #ruby
<shevy>
then we also throw bradland out the window for good measure :)
kish has joined #ruby
it0a has joined #ruby
gregf has quit [Quit: WeeChat 1.0.1]
<shevy>
how do you guys write benchmarks?
<shevy>
I feel my current way is tedious
yeticry has joined #ruby
TgMts has joined #ruby
Lucky__ has joined #ruby
<waxjar>
benchmark-ips! :D
rshetty has joined #ruby
chipotle has quit [Quit: cheerio]
hamakn has quit [Ping timeout: 272 seconds]
msmith has joined #ruby
<shevy>
hmm
spider-mario has quit [Ping timeout: 264 seconds]
<shevy>
what is ips doing?
josephndenton has joined #ruby
<bradland>
iterations per second
yeticry has quit [Ping timeout: 244 seconds]
<shevy>
I just compared .tr vs .gsub vs. .delete
<shevy>
what would you guys think is the slowest among these three for the same net operation
druznek has quit [Ping timeout: 258 seconds]
hamakn has joined #ruby
<bradland>
.delete (total guess)
despai has joined #ruby
<shevy>
let me paste the three lines... user / system / total / real
<waxjar>
gsub i suppose
davout has quit [Remote host closed the connection]
sevvie has quit [Read error: Connection reset by peer]
AxonetBE has joined #ruby
<byprdct>
Is there a way to view method arguments via the terminal? For instance when I run some_object.methods it gives me a list of methods but is there a way I can see how I would use that method?
silkfox has joined #ruby
<bradland>
byprdct: that’s a documentation feature. the command line tool for that is ri
msmith has quit [Remote host closed the connection]
<byprdct>
awesome, thanks bradland
porfa has quit [Quit: porfa]
<byprdct>
bradland so how would I use that on a specific method?
sargas has joined #ruby
<byprdct>
I'm guessing I could use it on any object in the command line
sevvie has quit [Read error: Connection reset by peer]
Darryl__ has quit [Quit: Connection closed for inactivity]
yeticry has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
<rpag>
>> "helloooo".squeeze('o')
mengu has joined #ruby
jaequery has quit [Ping timeout: 255 seconds]
sevvie has joined #ruby
jaequery has joined #ruby
<majeure>
pry
<majeure>
Whoops.
davedev24_ has quit [Ping timeout: 264 seconds]
mengu has quit [Ping timeout: 244 seconds]
Valdrone has quit [Quit: Valdrone]
porfa has joined #ruby
doodlehaus has joined #ruby
davedev24_ has joined #ruby
doodlehaus has quit [Remote host closed the connection]
doodlehaus has joined #ruby
jack_rabbit has joined #ruby
Azure has quit [Quit: My MBP went to sleep.]
gsd has joined #ruby
commmmodo has joined #ruby
yfeldblum has joined #ruby
yeticry has joined #ruby
tier has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 256 seconds]
Flcn_ has quit [Quit: Be back later ...]
nicolastarzia has joined #ruby
yeticry has quit [Remote host closed the connection]
lampd1_ has joined #ruby
doodlehaus has quit [Remote host closed the connection]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Scripore has joined #ruby
yeticry has joined #ruby
gsd has joined #ruby
checkit has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
tier has quit [Remote host closed the connection]
nicolastarzia has quit [Ping timeout: 250 seconds]
gsd has quit [Client Quit]
adriancb has quit [Remote host closed the connection]
tier has joined #ruby
lampd1_ has quit [Ping timeout: 258 seconds]
CustosL1men has joined #ruby
doodlehaus has joined #ruby
doodlehaus has quit [Remote host closed the connection]
yeticry has quit [Remote host closed the connection]
sarkis has joined #ruby
impi0us has joined #ruby
mattwildig has joined #ruby
<sarkis>
hey all - we run a ruby on rails app in production and have been using rbenv - i don't like the crazy mess it makes - remembering to run things with rbenv exec etc etc
<sarkis>
how does the ppa work out for production apps?
karmatr0n has quit [Remote host closed the connection]
<sarkis>
experimental eh?
<kalleth>
nah, it's an 'experimental' ppa but it contains good builds
<kalleth>
basically the official releases as packages, because debian/buntu package repos are so hilariously out of date when it comes to rubby releases
<sarkis>
ya - i assume it gets the newer versions sooner than the other "stable" one
<pwnz0r>
is minitest better? i have the gem but ive never really used i
<pwnz0r>
it
<pipework>
It's the successor to T::U
dc_ has joined #ruby
ixti has joined #ruby
child has quit [Ping timeout: 246 seconds]
<pwnz0r>
ic
<pwnz0r>
ill check it out
<pwnz0r>
thanks
rkday has joined #ruby
<pwnz0r>
test unit is just so simple and clean haha hopefully minitest is simple and clean
<pipework>
minitest is super simple and clean.
michaeldeol has joined #ruby
<pwnz0r>
cool
<pwnz0r>
ya checking out the github readme now. seems simple enough. although ive never written a spec file for anything due to my newbness at ruby so far
<shevy>
feliz navidad
<shevy>
feliz navidad!
startupality has joined #ruby
x1337807x has joined #ruby
icebourg has joined #ruby
<pwnz0r>
same 2 u
<shevy>
:)
<pipework>
pwnz0r: Well, you can write tests or specs with minitest and minitest-spec respectively.
<havenwood>
shevy: Fröhliche Weihnachten!
<shevy>
yay!
<havenwood>
pwnz0r: I see 6 tests and 6 assertions with TestUnit, though the last two tests are dups. What version is your TestUnit?
<pwnz0r>
2.1.5
evanjs has quit [Remote host closed the connection]
razieliyo has joined #ruby
<havenwood>
pwnz0r: ah, i thought that was your Ruby versions.. heh
<pwnz0r>
both are 2.1.5
<havenwood>
oh!
<havenwood>
pwnz0r: can you just?: gem install test-unit
<havenwood>
pwnz0r: The test-unit gem will be what ships with Ruby 2.2.
<pwnz0r>
well ive just been convinced to switch over to minitest
<havenwood>
pwnz0r: Do that instead! :)
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pwnz0r>
haha great
Stoge88 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pipework>
havenwood: Oh they're switching back to T::U?
<havenwood>
pipework: No, they're just gemifying minitest and tu
lw has quit [Quit: s]
<pwnz0r>
ruby 2.1.5 shipped with minitest and tu for me at least
<pipework>
havenwood: Oh gotcha. Thought they were shipping another vendored version.
<havenwood>
pwnz0r: they will keep shipping with bow
<havenwood>
both*
<havenwood>
just gems
decoponio has quit [Quit: Leaving...]
<pwnz0r>
cool
<havenwood>
at least as far as i recall from bugs.ruby-lang.org
<havenwood>
i think it was proposed to remove test libs entirely, objections ensued and gemifying both minitest and test-unit was settled upon
<pwnz0r>
do you guys regulary gem update? or do you run with some older versions of gems from time to time
<havenwood>
pwnz0r: bleeding edge!
spicerack has joined #ruby
<pwnz0r>
?
evanjs has joined #ruby
<havenwood>
pwnz0r: i generally use the latest stable release
<pwnz0r>
does gem update normally give you stable of development release?
_solomon has quit [Quit: _solomon]
<pwnz0r>
im with you on that one. id rather use stable as well
<pwnz0r>
just like good old debian 7
kiyote23 has joined #ruby
<pipework>
I don't ever gem update unless it's a tool that doesn't belong in a Gemfile
lolmaus has joined #ruby
<havenwood>
Update test-unit 3.0.8 (removed from repository but bundled in tarball)
<havenwood>
Update minitest 5.4.3 (removed from repository but bundled in tarball)
<havenwood>
hmm
lw has joined #ruby
lw has quit [Max SendQ exceeded]
anaeem___ has joined #ruby
spicerack has quit [Client Quit]
Channel6 has quit [Quit: Leaving]
<havenwood>
well, the march towards gemifying slowing proceeds
<havenwood>
shevy: any formal word on 2.2 ship date?
kiyote23 has quit [Remote host closed the connection]
allos_nerelin has quit []
<shevy>
havenwood dunno reall, the last release on the ftp server is like 5 days old by now
<shevy>
hanmac must have delayed it all
anaeem1 has quit [Ping timeout: 265 seconds]
lw has joined #ruby
chrishough has joined #ruby
yfeldblum has joined #ruby
lw has quit [Client Quit]
startupality has quit [Quit: startupality]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pwnz0r>
is assert_match replaced by refute_match?
<pwnz0r>
or are those two different asserts
michaeldeol has joined #ruby
<pwnz0r>
refering to minitest here
<pipework>
assert and refute inverse pairs.
despai has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
Techguy305 has quit [Ping timeout: 255 seconds]
FooMunki has quit [Quit: FooMunki]
s00pcan_ has quit [Ping timeout: 245 seconds]
<pwnz0r>
ahh
<pwnz0r>
ic
Synchunk has quit [Ping timeout: 240 seconds]
nicolastarzia has joined #ruby
<pwnz0r>
so its pretty much the same, just a few naming convensions and different inherittance of course
<pwnz0r>
cool im down for minimal change
Synchunk has joined #ruby
<pipework>
Yeah, it's pretty nice.
mloveless has joined #ruby
<pwnz0r>
what are mocks and stubs useful for?
Dopagod has joined #ruby
uber_hulk has quit [Quit: leaving]
<pipework>
pwnz0r: Lying, mostly.
<pwnz0r>
haha ok
Spami has quit [Quit: This computer has gone to sleep]
nicolastarzia has quit [Ping timeout: 252 seconds]
<pwnz0r>
and desccribe is just a way to make the output more understandable for other users i take it?
jheg has quit [Quit: jheg]
oleo__ has joined #ruby
evanjs has quit [Remote host closed the connection]
PanzerModern has quit [Remote host closed the connection]
<pwnz0r>
or is describe only used for spec, mock, and stubs, not unit tests
<pipework>
Well, describe and all that are a different approach where you follow more BDD stuff.
oleo__ has quit [Read error: Connection reset by peer]
<pipework>
mocks and stubs aren't tied to tests or specs. They're useful regardless of whether you prefer assertions or bdd style stuff.
oleo is now known as Guest73081
oleo__ has joined #ruby
tombroomfield has joined #ruby
Guest70 has joined #ruby
<pwnz0r>
alright cool
<pwnz0r>
well so far im liking this
frog0909 has joined #ruby
<pwnz0r>
very simple which is the whole point of tests
Guest73081 has quit [Ping timeout: 245 seconds]
SOLDIERz has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
shuber_ has quit [Remote host closed the connection]
shuber_ has joined #ruby
tombroomfield has quit [Ping timeout: 272 seconds]
jaequery has quit [Ping timeout: 240 seconds]
despai has joined #ruby
jimms has quit []
impi0us has quit [Ping timeout: 255 seconds]
porfa has quit [Quit: porfa]
arietis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lampd1_ has joined #ruby
michaeldeol has joined #ruby
jaequery has joined #ruby
Stoge88 has joined #ruby
commmmodo has quit [Quit: commmmodo]
lemur has joined #ruby
Valdrone has quit [Quit: Valdrone]
icebourg has quit []
sevvie has joined #ruby
renderful has joined #ruby
mattwildig has quit [Remote host closed the connection]
lampd1_ has quit [Ping timeout: 244 seconds]
Guest64 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mloveless has quit [Remote host closed the connection]
Timgauthier has joined #ruby
yfeldblum has joined #ruby
crueber has joined #ruby
doodlehaus has joined #ruby
AlexRussia has quit [Changing host]
AlexRussia has joined #ruby
Cache_Money has joined #ruby
evanjs has joined #ruby
evanjs has quit [Remote host closed the connection]
renderful has quit [Ping timeout: 245 seconds]
SOLDIERz has quit [Quit: Be back later ...]
crueber has quit [Ping timeout: 256 seconds]
doodlehaus has quit [Ping timeout: 245 seconds]
russt has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
keen__________12 has quit [Read error: Connection reset by peer]
iamninja has quit [Quit: ZZZzzz…]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<fourthousandsix>
i need help configuring ruby on linux, I am trying to use gem to install sass and i get an error that says I dont have /root/.gem/ruby/2.1.0/bin in my PATH and that excecutables will not run
bricker`work has quit [Quit: leaving]
keen__________12 has joined #ruby
Stoge88 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<fourthousandsix>
executables**
<fourthousandsix>
i am using RCH LINUX AND THE DOCUMENTATION ON THE SUBJECT IS INCOMPLETE OR INCORRECT
<bradland>
fourthousandsix: how did you install ruby? package, or ruby manager?
gfawcettpq has quit [Ping timeout: 265 seconds]
<pipework>
fourthousandsix: I don't know how to help you. If you use arch, surely you know how to change your PATH.
<pipework>
If you don't or don't want to learn it, there's chruby that can manage switching rubies into your path for you.
BTRE has joined #ruby
<fourthousandsix>
I USED PACMAN TO INSTALL IT
<bradland>
sry, can’t help you with that one. not familiar.
<bradland>
if the docs are wrong/bad/out of date, i’d maybe recommend switching to a ruby manager like chruby
<pipework>
fourthousandsix: ARE YOU TROLLING WITH YOUR CAPSLOCKS?
<fourthousandsix>
AND NOT ALL ARCH USERS KNOW EVERYTHING, i AM USING IT BECAUSE i AM RELATIVELY PROFICIENT WITH LINUX AND FIGURED iD GIVE ARCH A TRY BECAUSE IT IS AVAILIBLE FOR MY RASPBERRY PI
it0a has joined #ruby
rylev has joined #ruby
<bradland>
pls kindly press the key to the left of “a” on your keyboard
<fourthousandsix>
i DONT KNOW HOW TO CHANGE MY PATH, COULD YOU ENLIGHTEN ME
<pipework>
Yeah, they seem to cater to that kinda crowd. I'd suggest you check out some other channels for that knowledge, but for getting ruby into your path, use chruby.
<fourthousandsix>
I TRIED EDITING ~/.BASHRC AND IT DIDNT WORK
shuber_ has quit [Remote host closed the connection]
<pipework>
I'd suggest an easier distro though, until you get a hold on everything, unless you're working up to learning all these kinds of things.
jdj_dk has joined #ruby
<fourthousandsix>
no im not trolling i just use a font with all caps on my irc client and didnt know it was all caps in the output
rylev has quit [Remote host closed the connection]
<bradland>
whew
Deele has joined #ruby
<fourthousandsix>
i learn stuff like this everyday lol thats how i got here
<pipework>
Ah so you just troll yourself. :D
<bradland>
haha :)
<fourthousandsix>
fuck this
fourthousandsix has quit [Quit: Leaving]
<pipework>
Lol.
jaequery has quit [Ping timeout: 244 seconds]
<bradland>
likelihood that he’ll get through that: 0%
shuber_ has joined #ruby
<pipework>
I find arch users fascinating and frustrating.
jaequery has joined #ruby
Spami has joined #ruby
yeticry has joined #ruby
mattwildig has quit [Remote host closed the connection]
Timgauthier is now known as timgauthier_away
shuber_ has quit [Remote host closed the connection]
<dtordable>
dd
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dtordable>
Merry Christmas to all!
byprdct has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
claymore has joined #ruby
yeticry has quit [Remote host closed the connection]
Guest64 has joined #ruby
<dtordable>
shevy: are you there?
<pipework>
Even when he's present he's never quite fully 'there'.
Spami has quit [Quit: This computer has gone to sleep]
neoxquick has joined #ruby
Spami has joined #ruby
byprdct has joined #ruby
<dtordable>
pipework: shevy is a dude dude
<dtordable>
lol
Spami has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
lemur has quit [Remote host closed the connection]
arup_r has quit [Quit: Leaving.]
lemur has joined #ruby
<pwnz0r>
wow did that guy just rage quit irc?
<pwnz0r>
if you change your bashrc file you have to source it...
<pwnz0r>
who uses arch linux that doesnt knowhow to linux... kids these days
ddd has joined #ruby
x1337807x has quit [Read error: No route to host]
x1337807x has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
x1337807x has quit [Read error: Connection reset by peer]
x1337807x has joined #ruby
lemur has quit [Ping timeout: 272 seconds]
deryl has quit [Ping timeout: 255 seconds]
klmlfl has quit [Remote host closed the connection]
x1337807x has quit [Client Quit]
icebourg has joined #ruby
fourthousandsix has joined #ruby
<fourthousandsix>
i figured it out on my own, thanks for giving this channel a bad rep by being total aSSHOLES
spastorino has quit [Quit: Connection closed for inactivity]
melik has quit [Quit: (null)]
<shevy>
dtordable I am semi-here
<shevy>
fourthousandsix the problem is that you use distribution installation
<bradland>
man, i really resent being called an asshole
<bradland>
you came in to the ruby channel asking a systems question
<bradland>
used caps lock the whole time, effectively shouting at everyone
<bradland>
and got angry when no one could guide you through configuring the arch pacman packages
diegoviola has quit [Ping timeout: 252 seconds]
<shevy>
wait
<shevy>
we guide people through pacman here?
<bradland>
if you don’t, you’re an asshole (apparently)
<shevy>
nah
<bradland>
i mean, i’m all happy to help people with off topic stuff, but geeze
msmith has joined #ruby
<shevy>
it's a distribution specific problem he has so he must go to #pacman
despai has quit [Quit: This computer has gone to sleep]
<bradland>
i mean, i’d give it a shot (helping)
jdj_dk has quit [Remote host closed the connection]
<shevy>
ok fourthousandsix bradland will help you
despai has joined #ruby
byprdct has quit [Read error: Connection reset by peer]
<shevy>
he is fake trolling though :)
<shevy>
like xmas trolling
<jaequery>
is it possible to do something like this? raise MyException.new( {:msg => 'validation error occurred'}) ...... and then inside rescue MyException => e , I do puts e[:msg] ?
nicolastarzia has quit [Ping timeout: 244 seconds]
yeticry has joined #ruby
<nymous>
i don't want to install bundler on all servers
<pipework>
nymous: When packaging the app, you just use bundler to install the dependencies to vendor/bundle
icebourg has quit []
<pipework>
Then the final package is the app and its dependencies.
<pipework>
A bit larger, but a lot easier if you're deploying multiple apps into the same server or namespace.
rylev has joined #ruby
<nymous>
ok, see what i did. i have created an app folder on my dev machine, add Gemfile with primary app gem. did bundle package and bundle install --binstubs
<nymous>
this makes me a folder with gems and some structure
<nymous>
how to deploy it?
jdj_dk has quit [Remote host closed the connection]
allcentury has joined #ruby
<pipework>
You didn't vendor the gems unless you have a .bundle/config that points to vendor/bundle
ixti has quit [Ping timeout: 252 seconds]
tier has joined #ruby
deryl has quit []
deavid has quit [Ping timeout: 250 seconds]
yeticry has quit [Ping timeout: 244 seconds]
<nymous>
i don't get it
<nymous>
is there a tutorial on how to deploy with bundler?
ixti has joined #ruby
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MartynKeigher has joined #ruby
tier has quit [Ping timeout: 272 seconds]
dc_ has joined #ruby
deavid has joined #ruby
max96at is now known as max96at|off
claudiuinberlin1 has quit [Quit: Leaving.]
tombroomfield has joined #ruby
sevvie has quit [Ping timeout: 245 seconds]
chipotle has joined #ruby
mattmcclure is now known as sh1ps
josephndenton has quit [Ping timeout: 272 seconds]
sh1ps is now known as mattmcclure
Guest64 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tombroomfield has quit [Ping timeout: 245 seconds]
kiyote23 has joined #ruby
russt has quit [Quit: russt]
russt has joined #ruby
despai has joined #ruby
Synchunk has quit [Read error: Connection reset by peer]
FooMunki has joined #ruby
jheg has quit [Quit: jheg]
Synchunk has joined #ruby
lampd1_ has joined #ruby
checkit has quit [Ping timeout: 245 seconds]
mary5030 has quit [Remote host closed the connection]
rylev has quit [Remote host closed the connection]
Synchunk has quit [Read error: Connection reset by peer]
adriancb has quit [Remote host closed the connection]
adriancb has joined #ruby
lampd1_ has quit [Ping timeout: 258 seconds]
doodlehaus has joined #ruby
mary5030 has quit [Ping timeout: 244 seconds]
adriancb has quit [Ping timeout: 265 seconds]
dw2121 has joined #ruby
jaequery has quit [Ping timeout: 265 seconds]
jaequery has joined #ruby
Valdrone has quit [Quit: Valdrone]
doodlehaus has quit [Ping timeout: 255 seconds]
TgMts_ has joined #ruby
dw2121 has quit [Client Quit]
_pudding has joined #ruby
TgMts has quit [Ping timeout: 252 seconds]
bweston92 has joined #ruby
Valdrone has joined #ruby
<bradland>
nymous: in order to accomplish what you want, you’ll need to understand a little more about how rubygems work
jeanlinux has joined #ruby
Hobogrammer has joined #ruby
<bradland>
bundler installs ruby gems (packages of code) to a specific location. that location is configurable.
<bradland>
to “vendor” gems is to configure bundler to install them to a location within your app root, rather than a separate (shared) location.
gr33n7007h has quit [Ping timeout: 244 seconds]
pwnz0r has quit [Remote host closed the connection]
<_pudding>
I'm super new to Ruby, following a tutorial for Sinatra, and running into a really basic error... I've got a file called song.rb. in the same directory, I fire up IRB and type: require './song'
jeanlinux has quit [Ping timeout: 245 seconds]
<_pudding>
irb then spits out an error: LoadError: cannot load such file -- rm-core from /Users/sam/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
diegoviola has joined #ruby
pwnz0r has joined #ruby
<_pudding>
i'm not sure what to make of the error... does anyone have any pointers?
<bradland>
_pudding: hrm. ruby is complaining that it can’t load the file “rm-core”, which I don’t recognize.
<bradland>
can you pastie more of the stacktrace?
<_pudding>
gah, i'm a fool
<_pudding>
it's a typo in the song.rb file
<bradland>
yeah, i was going to say, it’s probably an issue with a require within song.rb
<bradland>
are you familiar with stack traces?
<_pudding>
only slightly
<bradland>
ok, in general, what you want to do is work your way down from the top
<bradland>
start by looking for the first entry that relates to a file within your project
<bradland>
often times, if you send bad parameters to ruby methods (like require), the error will occur within a ruby file (like custom_require.rb), but the problem originated in your script.
<bradland>
in this case, you’ll probably see a reference to song.rb and a line number within the stack trace
<bradland>
that’s where the error started
<_pudding>
ah, ok
<bradland>
this particular error is pretty common, because humans are generally bad at typing
<bradland>
and when you make a typo in a require (very common), this is the erro ryou get
<bradland>
“hey, i can’t load this thing you asked me for”
msmith has joined #ruby
mengu has joined #ruby
<_pudding>
thanks much!
<bradland>
you bet
spastorino has joined #ruby
TgMts_ has quit [Quit: No Ping reply in 180 seconds.]
nfk has quit [Quit: yawn]
Soda has quit [Remote host closed the connection]
dorei has joined #ruby
TgMts has joined #ruby
dtordable has quit [Quit: Lost terminal]
msmith has quit [Ping timeout: 252 seconds]
snath has joined #ruby
yeticry has joined #ruby
<bradland>
hey shevy, just a cool benchmark formatting trick that you might like. you can pass an argument to Benchmark.bm specifying the length of the labels so that stuff lines up correctly: http://pastie.org/9797816
<bradland>
embedding spaces lines up the results, but not the headers
<bradland>
not sure why Benchmark doesn’t auto-detect the longest label and use that ¯\_(ツ)_/¯
chipotle has quit [Quit: cheerio]
<shevy>
aha
yeticry has quit [Remote host closed the connection]
chipotle has joined #ruby
melik has joined #ruby
<waxjar>
benchmark-ips does that, sorta. very long labels get their own line
<shevy>
that's much better than having to manually pad :D
chipotle has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
<bradland>
i love how benchmark-ips provides a comparison relating in terms of “Nx slower”
josephndenton has joined #ruby
Menorah has joined #ruby
<shevy>
yeah
<shevy>
you have some pimped up computer there
<bradland>
it does 88 MPH.
<bradland>
i’m real proud of it
<shevy>
require 'benchmark/ips' is a gem addon?
shuber_ has joined #ruby
<bradland>
ya
<bradland>
gem install benchmark-ips
<bradland>
no deps. nice clean install.
<bradland>
well, may be deps, but i already had them
Guest64 has joined #ruby
Synchunk` has joined #ruby
Takle has joined #ruby
Synchunk has quit [Ping timeout: 245 seconds]
Synchunk` is now known as Synchunk
tjohnson has quit [Quit: Connection closed for inactivity]
kenneth has joined #ruby
<nymous>
bradland: i understand (partially) how bundler works, it creates whole infrastructure with dependencies in app's folder. just unsure how to properly deploy it. say, would it be ok to make "bundle install --standalone --deployment --binstubs" and just copy resulting folder to a production server?
TgMts_ has joined #ruby
<nymous>
can i make system-wide binstubs?
DLSteve has joined #ruby
Synchunk` has joined #ruby
<bradland>
i recommend using a deployment system, like capistrano
<nymous>
i already have apt repo and puppet
<bradland>
the nice thing about capistrano is that it uses all the “correct” incantations for rails, the asset, pipeline, and bundler
<nymous>
just don't want to mess with other tools too much
<bradland>
capistrano is a client-side only tool
<bradland>
you really don’t want to deploy a rails app manually
<bradland>
you’ll hate yourself for it in a week
<nymous>
i'm trying to deploy end-user ruby apps like r10k and fluentd
<bradland>
the way capistrano does it is to provide a path to bundler
TgMts has quit [Ping timeout: 252 seconds]
Synchunk has quit [Ping timeout: 240 seconds]
Synchunk` is now known as Synchunk
<nymous>
puppet itself is packaged somehow and nicely integrates into system with just system ruby
mattwildig has quit [Remote host closed the connection]
<nymous>
i want to implement something like it
<bradland>
hrm, i’ve never deployed either of these
<bradland>
only custom built rails apps
<nymous>
i mean not the tool, but packaging
<bradland>
for your own app?
<bradland>
or for r10k and fluentd?
<nymous>
for this apps
<bradland>
to some degree, the app has to support that kind of environment
Xeago has joined #ruby
<nymous>
i can install them just by executing gem install r10k or gem install fluentd
<nymous>
but they build some c-extenstions for their dependencies
<bradland>
yeah, sorry, much of the advice i’ve given you so far has been for deploying your own rails apps
<nymous>
i just do not want to install ruby-dev, build-essentials and stuff on all my servers
<bradland>
in the case of an app from someone else, you’ll have to rely on their recommended deployment practices
<bradland>
unfortunately, that’s a big part of how ruby works
russt has quit [Quit: russt]
<bradland>
any ruby gem that has c-extensions is compiled during install
<nymous>
fluentd has an omnibus prepackages version, but it contains the whole stack including their version of ruby, i think it's a bit an overkill
<nymous>
i'm quite happy with system ruby
<bradland>
therein lies the rub
mary5030 has quit [Remote host closed the connection]
<bradland>
well, not really
Guest64 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bradland>
i mean, you should be able to vendor your gems and ship them to your servers
mary5030 has joined #ruby
<bradland>
problem is, i don’t know anything about r10k
<bradland>
it’s all about the load path
<bradland>
if the gems exist within the load path, you’re fine
<nymous>
r10k is an automation script for puppet environments
<bradland>
and you install it using `gem install`?
vinleod has quit [Quit: Computer has gone to sleep.]
<nymous>
yes
pika_pika has quit [Ping timeout: 258 seconds]
<bradland>
install ruby-dev and build-essentials
<bradland>
you might be able to package all this up, but it’s going to take a lot of time and knowledge
<nymous>
well, r10k doesn't compile anything, it's fluentd who compiles
<bradland>
ah
<nymous>
i've tried fpm packaging approach
<nymous>
you can convert gems to debs with it
chipotle has quit [Quit: cheerio]
<bradland>
are all the deployment environments identical?
<nymous>
everything works perfectly fine except one thing
jeanlinux has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
m8 has quit [Quit: Sto andando via]
<nymous>
it's like omnibus i guess
<nymous>
same approach, pack everything
Takle has quit [Ping timeout: 265 seconds]
<nymous>
anyway, merry xmas bradland
jack_rabbit has quit [Ping timeout: 252 seconds]
mary5030 has joined #ruby
SOLDIERz has joined #ruby
wolf4ood has quit [Quit: (null)]
GGMethos has quit [Remote host closed the connection]
tkuchiki has joined #ruby
comm64 has joined #ruby
hiyosi has joined #ruby
<comm64>
what is the ruby way of defining a named constant?
claymore has quit [Quit: Leaving]
<crome>
ASD = 5
<comm64>
that simple?
<comm64>
thanks
rylev has joined #ruby
kiyote23 has quit [Remote host closed the connection]
<crome>
you can add a semicolon at the end if it makes you feel better
<comm64>
lol
thoughnut has quit [Quit: leaving]
SOLDIERz has quit [Ping timeout: 256 seconds]
<comm64>
does it matter if the constant I'm defining is a boolean
josephndenton has quit [Ping timeout: 240 seconds]
Cache_Money has quit [Quit: Cache_Money]
<pipework>
comm64: Constants point to objects.
<pipework>
Any object.
josephndenton has joined #ruby
zen_ has quit [Ping timeout: 244 seconds]
<shevy>
are constants also objects?
rylev has quit [Ping timeout: 252 seconds]
<crome>
besides, there aren't really constants in ruby
<pipework>
No, why would they be?
<pipework>
They aren't constant, they're variables that warn you when you reassign them to a new object.
<pipework>
But they're special too.
spicerack has joined #ruby
Guest64 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<comm64>
so, for example, in php one might do... define('CONSTANT_NAME', true);
<comm64>
how would one do that in ruby?
<pipework>
comm64: SomeConstant = something
<pipework>
Then there's stuff like const_set, but most of the time you don't need it.
<pipework>
comm64: Do a ruby tutorial.
<comm64>
I have
whyGaard has joined #ruby
mary5030_ has joined #ruby
mary5030_ has quit [Remote host closed the connection]
<whyGaard>
hiya all o/ I'm installing homebrew to get my ruby updated to 2.2. upon installing homebrew, I get this error and I'm wondering if it's actually a problem, or if I can ignore it:
<crome>
there are no constants in ruby. the closest you get (or rather, the most idiomatic thing there is) is assigning values that are supposed to be "constant" to variables that have a label starting with a capital letter
<crome>
reassigning them will give a warning
<crome>
but they are not constant per se
mary5030_ has joined #ruby
<whyGaard>
Warning: /usr/bin occurs before /usr/local/bin
<whyGaard>
Consider setting your PATH so that /usr/local/bin
<whyGaard>
occurs before /usr/bin.
tombroomfield has joined #ruby
<whyGaard>
is this an issue, at all? can I leave it alone?
<whyGaard>
or is it really beneficial to set /usrs/local/bin before /usr/bin?
<pipework>
whyGaard: It's a warning.
<comm64>
I'm trying to implement in ruby an application originally written in php
<pipework>
Most people set /usr/local first
<pipework>
comm64: My condolences. Must be like trying to draw a portrait based off of a picasso.
<whyGaard>
okay, so it's okay to leave it alone
<comm64>
lol
<pipework>
whyGaard: It's a warning. You won't be slaughtered in the night.
nicolastarzia has joined #ruby
<whyGaard>
:P
<pipework>
Most people have /usr/local/bin first
<crome>
comm64: from the perspective of the app's behaviour it does not really matter if those things are not really constant, does it? just do CONSTANT_NAME = foo and consider it done
<whyGaard>
oh oh
diegoviola has joined #ruby
mary5030 has quit [Ping timeout: 244 seconds]
jaequery has quit [Ping timeout: 240 seconds]
<pipework>
It would probably help you out if you read what each of those directories tend to hold and what goes in them.
despai has quit [Quit: This computer has gone to sleep]
<whyGaard>
okay, thanks ^^
shuber_ has quit [Remote host closed the connection]
<comm64>
pipework: that actually describes the feeling quite well
<Xeago>
whyGaard: if you install ruby through brew, which will place an executable in /usr/local/bin, but it comes after /usr/bin which also provides an executable of the same name
mary5030_ has quit [Ping timeout: 258 seconds]
<pipework>
comm64: Just wait until the acid kicks in, then you'll be a surrealist.
<Xeago>
you will use the executable in /usr/bin instead of the one provided by homebrew in /usr/local/bin
dts|pokeball has quit [Read error: Connection reset by peer]
<whyGaard>
okay. I'm going to switch it around and hope for the best. D:
Musashi007 has quit [Ping timeout: 256 seconds]
aswen has quit [Ping timeout: 245 seconds]
<Xeago>
I would suggest having /usr/local/bin in front of /usr/bin
<comm64>
pipework: huh?
<Xeago>
for interactive use, that is most often what you want
jaequery has joined #ruby
dts|pokeball has joined #ruby
<Xeago>
for really stable things, embedded, deployed servers, you will not want /usr/local/bin or as late as possible
<pipework>
'interactive use'? What a funny term.
nicolastarzia has quit [Ping timeout: 272 seconds]
josephndenton has quit [Ping timeout: 256 seconds]
<Xeago>
pipework: not sure what is funny about it?
<pipework>
Just read the FHS standard for linux, most things are in compliance with it.
kirun has quit [Quit: Client exiting]
<Xeago>
pipework: that doesn't solve his problem though
<pipework>
Xeago: just hearing someone refer to putting /usr/local as anything about interactive use.
<pipework>
Xeago: He doesn't have one.
<Xeago>
pipework: if he expects `ruby` to be homebrew's ruby, he does
<pipework>
He just doesn't know what the difference is, and after learning about it, I'm sure he can brain it out himself, or wait until he has a problem.
<pipework>
Xeago: Forecasting problems... mmm
<Xeago>
yeye, xy-problem
<whyGaard>
eep, didn't want to cause a fuss. just wanted to get ruby installed and get to coding :-)
sevvie has joined #ruby
<Xeago>
on osx you should have a decently new ruby already though
<pipework>
whyGaard: Warnings raised by software that doesn't suck are usually correct about what you should be doing.
lampd1 has joined #ruby
<whyGaard>
rails 4.2 came out the other day :D ruby 2.1 is recommended, , current is 2.2 and I have 2.0
crdpink has joined #ruby
<whyGaard>
so I wanted to get newest ruby before grabbing the new and shiny rails
crdpink2 has quit [Ping timeout: 258 seconds]
<whyGaard>
pipework: that's good advice :P
Narzew has joined #ruby
<Xeago>
that just moves all the fuss, how do you establish software x to not suck?
<Xeago>
ah well
<Xeago>
I'll go to bed :>
<Xeago>
Have a jolly holiday season all!
Xeago has quit [Remote host closed the connection]
<whyGaard>
gnight Xeago :D
<whyGaard>
oh
<whyGaard>
D:
<comm64>
pipework: are you implying that I must be tripping to attempt this?
<pipework>
Secret: All software sucks.
<pipework>
comm64: It helps.
jaequery has quit [Ping timeout: 272 seconds]
Menorah has quit [Quit: This computer has gone to sleep]
rkday has quit [Ping timeout: 240 seconds]
tombroomfield has quit [Remote host closed the connection]
hmsimha has quit [Ping timeout: 252 seconds]
Valdrone has quit [Quit: Valdrone]
sevvie has quit [Read error: Connection reset by peer]
sankaber_ has joined #ruby
jaequery has joined #ruby
XxionxX has joined #ruby
vvivv has quit [Ping timeout: 264 seconds]
Stoge88 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgs has joined #ruby
sevvie has joined #ruby
codecop has quit [Remote host closed the connection]
ixti has quit [Ping timeout: 256 seconds]
yeticry has joined #ruby
sankaber_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<XxionxX>
Well I am trying to make the loop evaluate 2520 as the smallest divisable number
<shevy>
that is not really a loop
<shevy>
loop {} <--- that is a loop
<shevy>
(1..10).each do |x|; if num % x == 0
<shevy>
so here you have: if 0 % 1 == 0
TgMts has joined #ruby
<shevy>
so ten += 1 ten will be 1
<shevy>
so you enter: return false
<shevy>
so your method returns false
charliesome has joined #ruby
<shevy>
so smallest_multiple = divisble(0) now means that smallest_multiple is false
<shevy>
ah, you have a loop down there, at while
<pipework>
It's cute to watch shevy giving lessons.
mliqu has joined #ruby
<shevy>
well we didn't see that in your first paste
allcentury has quit [Ping timeout: 244 seconds]
<shevy>
that is really complicated code
<XxionxX>
Yeah, the 'test_multiple' if in the while loop was because I was trying to figure out what I was doing wrong
<XxionxX>
Yeah, sorry I'm new to coding
<XxionxX>
I am doing Euler problems in an attempt to get better
samfisher has quit [Ping timeout: 245 seconds]
<shevy>
what do you want to achieve?
mliq has quit [Ping timeout: 240 seconds]
<XxionxX>
with this code?
<shevy>
no
sevvie has joined #ruby
jenrzzz has joined #ruby
<shevy>
what you are trying to solve
<XxionxX>
From Euler:
<XxionxX>
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?
<XxionxX>
So I was just trying to get the answer 2520
<shevy>
I see
claptor has joined #ruby
<shevy>
so we can ignore 1 as 1 is always true
<shevy>
hmm one way could be to build some arrays and then look for shared members
<XxionxX>
Yeah, but arrays are really slow, I wanted to stop before I had to search through them
<XxionxX>
I was trying to break as soon as I hit the right number
<XxionxX>
don't give me too many hints, I want to figure it out
<XxionxX>
that is why I only linked the method
comm64 has quit [Quit: ChatZilla 0.9.91.1 [Firefox 35.0a2/20141114004002]]