apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p327: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com
swex has joined #ruby
<jsmonkey> hi, in javascript when you want to call a function dynamicly you can either use call which takes some arguments or apply which takes the arguments but in an array. does ruby have anything equalent? I know there is send but that is just like call which takes some arguments. I want to send in an array. Ideas?
mikepack has joined #ruby
<banisterfiend> jsmonkey: you can splat an array
LucidDreamZzZ has quit [Remote host closed the connection]
<banisterfiend> jsmonkey: arg_array = [arg1, arg2, arg3]; obj.send(method_name, *arg_array)
jlast has quit [Ping timeout: 264 seconds]
LucidDreamZzZ has joined #ruby
<banisterfiend> jsmonkey: splatted array example above is equivalent to doing this: obj.send(method_name, arg1, arg2, arg3)
<jsmonkey> banisterfiend: I see. But in my case where
<jsmonkey> I have two methods w
chimkan has quit [Quit: chimkan]
<jsmonkey> and where only one takes an argument and the other does not
<banisterfiend> jsmonkey: by call a function dynamically you mean call it with a string representing the function name?
soc42 has joined #ruby
thestereobus has joined #ruby
<jekotia> I have a potentially-compromised Redmine installation. I have no idea if it is compromised or not, I just know that other areas of the account on the web server were so I'm not taking any risks. Can I re-use the redmine database with a new redmine install to pick up where I left off? I know next to nothing about RoR :/
<jsmonkey> i will get an error if passing in something for that. I want to like args = ["my_func"] ; args << "some argument" if monkey_bla_bla == :write
<jsmonkey> let me do a quick fiddle of it
<apeiros_> jsmonkey: yeah, ruby is not like java in that regard. you must not pass more arguments than the method accepts
<apeiros_> but send is like apply & call combined. you use it like apply by using splat which banisterfiend mentioned, and like call otherwise
kbeddingfield has joined #ruby
<apeiros_> obj.send(:method_name, *arg_array) # --> obj.method_name.apply(obj, arg_array)
<apeiros_> obj.send(:method_name, arg1, arg2) # --> obj.method_name.call(obj, arg1, arg2)
robbyoconnor has quit [Ping timeout: 252 seconds]
<jsmonkey> this is what I want to do
BigO has quit [Remote host closed the connection]
<jsmonkey> ah I get it
<jsmonkey> the clock is to much :P I can just call splat on the args array
<jsmonkey> get it now!
<jsmonkey> smart!
<jsmonkey> love ruby :)
<apeiros_> you don't need to_s with #{}
<apeiros_> #{} will do that for you if the value is not a string
<jsmonkey> cool that makes it even nicer
kbeddingfield has quit [Ping timeout: 244 seconds]
<apeiros_> (might try to_str first, don't remember)
pcarrier has joined #ruby
<jsmonkey> :)
BigO has joined #ruby
<jsmonkey> apeiros_: it worked without to_s and it now works as I want
piotr__ has quit [Remote host closed the connection]
<jsmonkey> thanks banisterfiend and apeiros_ !
<apeiros_> yw
ninegrid has quit [Ping timeout: 265 seconds]
havenn has joined #ruby
arya has quit [Ping timeout: 244 seconds]
jds has quit [Remote host closed the connection]
shevy has joined #ruby
ltsstar has quit [Quit: ltsstar]
robbyoconnor has joined #ruby
tchebb has joined #ruby
slainer68 has quit [Remote host closed the connection]
teedex has joined #ruby
arya has joined #ruby
Xeago has quit [Remote host closed the connection]
arya has quit [Ping timeout: 244 seconds]
Vert has joined #ruby
xsbeats has joined #ruby
arya has joined #ruby
cakehero has joined #ruby
Xeago has joined #ruby
segmond has joined #ruby
segmond has left #ruby [#ruby]
thone has joined #ruby
elaptics is now known as elaptics`away
hackerdude has quit [Remote host closed the connection]
thone_ has quit [Ping timeout: 252 seconds]
dantesun has quit [Ping timeout: 240 seconds]
qwerxy has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
jds has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
slainer68 has joined #ruby
hackerdude has joined #ruby
ij has quit [Ping timeout: 248 seconds]
LouisGB has quit [Ping timeout: 246 seconds]
himsin_ has joined #ruby
mikepack has quit [Remote host closed the connection]
himsin_ has left #ruby [#ruby]
techhelp has joined #ruby
himsin_ has joined #ruby
king313 has quit [Quit: Saliendo]
Goles has joined #ruby
havenn has quit [Remote host closed the connection]
slainer68 has quit [Ping timeout: 244 seconds]
zemanel has quit [Quit: Remote hottie closed the connection]
BigO has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Computer has gone to sleep.]
davidcelis has quit [Read error: Connection reset by peer]
xsbeats has quit [Ping timeout: 260 seconds]
himsin has quit [Remote host closed the connection]
jds has quit [Ping timeout: 256 seconds]
himsin_ is now known as himsin
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
kbeddingfield has joined #ruby
ephemerian has left #ruby [#ruby]
Vert has quit [Read error: Connection reset by peer]
techhelp has quit [Quit: This computer has gone to sleep]
Xeago has quit [Remote host closed the connection]
davidcelis has joined #ruby
jlast has joined #ruby
jsmonkey has quit [Quit: Lost terminal]
DrShoggoth has joined #ruby
kbeddingfield has quit [Ping timeout: 255 seconds]
xsbeats has joined #ruby
LouisGB has joined #ruby
xsbeats has quit [Client Quit]
xsbeats has joined #ruby
arya_ has joined #ruby
jlast has quit [Ping timeout: 248 seconds]
dv_ has quit [Ping timeout: 244 seconds]
techhelp has joined #ruby
JStoker has quit [Excess Flood]
dv_ has joined #ruby
mikepack has joined #ruby
mjolk has quit [Quit: returning some videotapes]
arya has quit [Ping timeout: 244 seconds]
mjolk has joined #ruby
techhelp has quit [Client Quit]
arya_ has quit [Ping timeout: 244 seconds]
dv_ has quit [Ping timeout: 248 seconds]
LouisGB has quit [Ping timeout: 252 seconds]
davidcelis has quit [Quit: K-Lined.]
soc42 has quit [Remote host closed the connection]
nazty has quit [Quit: Leaving]
JStoker has joined #ruby
beiter has joined #ruby
JStoker has quit [Excess Flood]
arya has joined #ruby
soc42 has joined #ruby
Goles has quit [Remote host closed the connection]
joast has joined #ruby
postmodern has joined #ruby
brianpWins has quit [Quit: brianpWins]
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
gbchaosmaster has joined #ruby
JStoker has joined #ruby
iamjarvo has joined #ruby
qwerxy has quit [Quit: offski]
beiter has quit [Quit: beiter]
dv_ has joined #ruby
arya_ has joined #ruby
arya has quit [Ping timeout: 244 seconds]
fir_ed has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
havenn has joined #ruby
davidcelis has joined #ruby
RandyInLA_ has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
apeiros_ has quit [Remote host closed the connection]
arya_ has quit []
arya_ has joined #ruby
havenn_ has joined #ruby
ebobby has quit [Quit: Lost terminal]
RandyInLA has quit [Ping timeout: 252 seconds]
RandyInLA_ is now known as RandyInLA
samphippen has quit [Quit: Computer has gone to sleep.]
havenn has quit [Ping timeout: 244 seconds]
fmcgeough has quit [Quit: fmcgeough]
BigO has joined #ruby
jds has joined #ruby
vikingly has joined #ruby
<vikingly> Hi! Is there a way in ruby to get a string containing the code of a function?
Slivka has quit [Remote host closed the connection]
<havenn_> vikingly: The Pry gem: http://pryrepl.org/
<havenn_> vikingly: show-source method_name_here
jds has quit [Ping timeout: 260 seconds]
<vikingly> hevenn_: Thanks.
kil0byte has quit [Ping timeout: 246 seconds]
<becom33> if this is a variable value #<Console:0x7fd6332706f8>
<becom33>
<becom33> how can I write a if condition using that value
<vikingly> havenn_: My use-case is to store functions that represent a service fee computation in our db so that our whole system is auditable.
<havenn_> vikingly: Ahh.
techhelp has joined #ruby
<vikingly> havenn_: Please let me know if you know of a more elegant solution for this use-case.
<havenn_> becom33: class Console;end; console = Console.new; console.is_a? Console #=> true
vitor-br has quit [Read error: Connection reset by peer]
<havenn_> becom33: console = Console.new #=> #<Console:0x5e3c>
<jrajav> vikingly: More elegant would be to abstract your computation into a DSL
<jrajav> vikingly: That would also be a lot more work, though :P
<jrajav> You can't make everything elegant - otherwise we'd all just code in Lisp 24/7
Hanmac1 has joined #ruby
<becom33> havenn_, got it
generalissimo has joined #ruby
kjs has joined #ruby
<havenn_> vikingly: Could you use RDOC, I wonder? Then parse that, hrmm, not sure.: http://rdoc.sourceforge.net/doc/
soc42 has quit [Remote host closed the connection]
<vikingly> jrajav: :) to lisp. I looked into rule engines which is a DSL for this kind of usecase, but to be quite honest they seem like a huge overkill unless you have a large team with lots of people touching the code.
<becom33> havenn_, is there a function for opossit of is_a ?
Hanmac has quit [Ping timeout: 250 seconds]
<havenn_> becom33: No isn't_a? but you could not or bang: !Class.is_a? Class #=> false
<jrajav> vikingly: Actually, this would be trivial if you WERE using Lisp - making a DSL is almost faster than writing the longform code, and everything is perfectly serializable (auditable)
<jrajav> But I rest my case :P
undersc0re97 has quit [Quit: Leaving]
<vikingly> jrajav: it is definitely easy to write a DSL in Ruby, but that does not take care of the auditable part of the equation since anyone can meddle with the DSL rules.
<becom33> havenn_, thanks got it
generalissimo has quit [Remote host closed the connection]
<havenn_> vikingly: Looks like the way Pry parses #show-source might help for your case: https://github.com/pry/pry/blob/master/lib/pry/commands/show_source.rb
mjolk has quit [Quit: returning some videotapes]
<vikingly> A DSL for pricing formulas are especially simple since all business transactions can be represented by: (unit_cost*quantity)*markup + fixed fee
<havenn_> vikingly: Err, rather I shoulda linked to: https://github.com/pry/pry/blob/master/lib/pry/code.rb
undersc0re97 has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
workmad3 has quit [Ping timeout: 276 seconds]
<vikingly> havenn_: Nice :)
<vikingly> havenn_: Looks like this is the code that extracts the method: https://github.com/pry/pry/blob/master/lib/pry/method.rb
tomsthumb has joined #ruby
apeiros_ has joined #ruby
generalissimo has joined #ruby
tomsthumb has quit [Client Quit]
Shamgar has joined #ruby
generalissimo has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 255 seconds]
arya has joined #ruby
dhruvasagar has joined #ruby
arya_ has quit [Ping timeout: 244 seconds]
Goles has joined #ruby
u89 has quit [Remote host closed the connection]
apeiros_ has quit [Ping timeout: 264 seconds]
havenn_ has quit [Remote host closed the connection]
Yarou has quit [Quit: Leaving]
BigO has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
ner0x has joined #ruby
<ner0x> Can you gsub and capitalize per instance?
havenn has joined #ruby
<ner0x> Find all "space+letter" and capitalize letter ?
noyb has joined #ruby
Synthead has joined #ruby
<shevy> ner0x what does this mean
<havenn> 'overly simplified caps'.split.map(&:capitalize)* ' ' #=> "Overly Simplified Caps"
teedex has quit [Remote host closed the connection]
<ner0x> ... I need to learn more about map, apparently.
teedex has joined #ruby
arya has quit [Ping timeout: 276 seconds]
Goles has quit [Remote host closed the connection]
Synthead has quit [Client Quit]
<ner0x> ... I get something kind of like that.
<ner0x> But in an array.
<ner0x> An array times something appends them?
arya has joined #ruby
teedex has quit [Ping timeout: 265 seconds]
<jrajav> Array#join
<jrajav> split returns an array, and map returns an array
<jrajav> havenn missed a step :P
<ner0x> jrabbit: Ah I didn't know Array * "type" is the same as join
<ner0x> Great. :)
<ner0x> jrajav: ^
<ner0x> jrabbit: My apologies.
<jrajav> Oh, I didn't see that part
<jrajav> yeah
<jrajav> :P
toekutr has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<havenn> jrajav: I was golfing :O
<havenn> ner0x: Caps each word unless it is verboten!: https://gist.github.com/4138166
brianpWins has joined #ruby
<ner0x> havenn: I like the first example. :)
apeiros_ has joined #ruby
<havenn> Interestingly >.>, in Pry: split.map(&:capitalize)*' ' #=> "Version : 7"
<havenn> In IRB: #=> "#"
lolcathost has joined #ruby
jds has joined #ruby
wpaulson has joined #ruby
wpaulson has quit [Client Quit]
pipopopo has quit [Read error: Operation timed out]
araujo has quit [Quit: Leaving]
xyzodiac has quit [Quit: Textual IRC Client: www.textualapp.com]
apeiros_ has quit [Ping timeout: 244 seconds]
jds has quit [Ping timeout: 248 seconds]
pipopopo has joined #ruby
adeponte has quit [Remote host closed the connection]
ddd has joined #ruby
pipopopo has quit [Ping timeout: 245 seconds]
Ruler_Of_Heaven_ has joined #ruby
areil has joined #ruby
joeycarmello has quit [Remote host closed the connection]
joeycarmello has joined #ruby
tomsthumb has joined #ruby
pcarrier has quit []
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
thestereobus has quit [Quit: thestereobus]
tomsthumb has quit [Read error: No route to host]
tomsthumb1 has joined #ruby
pcarrier has joined #ruby
pcarrier has quit [Max SendQ exceeded]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
zodiak has quit [Ping timeout: 246 seconds]
dantesun has joined #ruby
dantesun has quit [Max SendQ exceeded]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
zodiak has joined #ruby
marknyc has joined #ruby
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
dhruvasagar has quit [Ping timeout: 265 seconds]
havenn has quit [Remote host closed the connection]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
joeycarmello has quit [Remote host closed the connection]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
pcarrier has joined #ruby
koshii has quit [Ping timeout: 255 seconds]
joeycarmello has joined #ruby
peterpan has joined #ruby
apeiros_ has joined #ruby
charliesome has joined #ruby
cintrikz has joined #ruby
vikingly has quit [Ping timeout: 244 seconds]
koshii has joined #ruby
thestereobus has joined #ruby
apeiros_ has quit [Ping timeout: 260 seconds]
xnm has joined #ruby
jenrzzz has joined #ruby
xAndy is now known as xandy
arya_ has joined #ruby
thestereobus has quit [Ping timeout: 244 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 255 seconds]
arya has joined #ruby
tomsthumb1 has quit [Quit: Leaving.]
thestereobus has joined #ruby
thestereobus has quit [Client Quit]
arya_ has quit [Ping timeout: 246 seconds]
skaragianis has joined #ruby
arya has quit [Ping timeout: 240 seconds]
arya has joined #ruby
codeFiend has joined #ruby
arya_ has joined #ruby
ewag has joined #ruby
ecart has joined #ruby
<ecart> in `require': no such file to load -- launchy (LoadError)
<ecart> from brute.rb:5
<ecart> I got this error
<ecart> Anyone know what can be?
arya has quit [Ping timeout: 244 seconds]
codeFiend has left #ruby [#ruby]
bradhe has joined #ruby
ner0x has quit [Quit: Leaving]
<ecart> neutrinos.rb:53:in `each_line': no block given (LocalJumpError)
<ecart> from neutrinos.rb:53
skaragianis has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
jds has joined #ruby
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
barce has quit [Quit: leaving]
ddd has quit [Quit: Leaving.]
mjolk has joined #ruby
mjolk has quit [Remote host closed the connection]
generalissimo has joined #ruby
jds has quit [Ping timeout: 276 seconds]
apeiros_ has joined #ruby
adeponte has joined #ruby
a215 has joined #ruby
tjbiddle has joined #ruby
InFlames has joined #ruby
<InFlames> anyone familiar with the nokogiri gem?
kbeddingfield has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9.2]
tjbiddle_ has joined #ruby
daniel_- has quit [Ping timeout: 252 seconds]
kbeddingfield has quit [Ping timeout: 260 seconds]
tjbiddle__ has joined #ruby
tobago has joined #ruby
c0rn has joined #ruby
tjbiddle has quit [Ping timeout: 276 seconds]
tjbiddle_ has quit [Ping timeout: 244 seconds]
apeiros_ has quit [Ping timeout: 264 seconds]
tjbiddle__ has quit [Ping timeout: 265 seconds]
havenn has joined #ruby
ddd has joined #ruby
ecart has quit []
havenn_ has joined #ruby
Chiy0 has joined #ruby
<Chiy0> Hello
havenn has quit [Ping timeout: 246 seconds]
kil0byte has joined #ruby
<Chiy0> I want to write scripts
<reactormonk> Chiy0, then do so
<Chiy0> Is Ruby fully automated?
frogstarr78 has quit [Remote host closed the connection]
Chiy0 is now known as Grillyda
techhelp has quit [Quit: This computer has gone to sleep]
teedex has joined #ruby
ninegrid has joined #ruby
adeponte has quit [Remote host closed the connection]
lolcathost has quit [Ping timeout: 245 seconds]
johnmilton has quit [Quit: Leaving]
marknyc has quit []
frogstarr78 has joined #ruby
ninegrid has quit [Read error: Connection reset by peer]
SwooshyCueb has joined #ruby
havenn_ has quit [Remote host closed the connection]
havenn has joined #ruby
apeiros_ has joined #ruby
phantasm66 has quit [Quit: *sleeeeep*]
jgrevich_ has joined #ruby
Grillyda is now known as ldoru
jeffreybaird has quit [Quit: jeffreybaird]
radic has quit [Disconnected by services]
radic_ has joined #ruby
ldoru has left #ruby [#ruby]
jgrevich has quit [Ping timeout: 244 seconds]
jgrevich_ is now known as jgrevich
havenn has quit [Ping timeout: 244 seconds]
phantasm66 has joined #ruby
blazes816 has quit [Quit: blazes816]
brandon_ has joined #ruby
lolcathost has joined #ruby
brandon has quit [Ping timeout: 246 seconds]
brandon_ is now known as brandon
Nisstyre-laptop has joined #ruby
Guest92676 has joined #ruby
xsbeats has quit [Ping timeout: 244 seconds]
apeiros_ has quit [Ping timeout: 264 seconds]
xsbeats has joined #ruby
havenn has joined #ruby
jds has joined #ruby
ananthakumaran has joined #ruby
rakl has joined #ruby
cantonic has joined #ruby
jds has quit [Ping timeout: 276 seconds]
VegetableSpoon has quit [Ping timeout: 245 seconds]
snorkdude has joined #ruby
kbeddingfield has joined #ruby
poRz has quit [Remote host closed the connection]
kbeddingfield has quit [Ping timeout: 264 seconds]
<dyreshark> hello! can someone point me to how scoping inside of blocks works? i'm curious because i recently got the gmail gem, and if you pass in a block to gmail.deliver, you can call things such as to, subject, etc. that aren't normally in global scope from inside said block. so i'm a tad confused :p
<dyreshark> thank you in advanced :)
adeponte has joined #ruby
rakl has quit [Quit: sleeping]
<davidcelis> if a block yields an object, you have that object's scope
<dyreshark> oh, neat. thanks
Blaster has joined #ruby
pcarrier has quit []
ninegrid has joined #ruby
apeiros_ has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
ninegrid has quit [Read error: Connection reset by peer]
statarb3 has quit [Ping timeout: 246 seconds]
mahmoudimus has joined #ruby
rakl has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
teedex has quit [Remote host closed the connection]
ryanlecompte has joined #ruby
brianpWins has quit [Quit: brianpWins]
snorkdude has quit [Quit: snorkdude]
snorkdude has joined #ruby
jenrzzz has joined #ruby
Orcris has joined #ruby
apeiros_ has quit [Ping timeout: 252 seconds]
himsin has quit [Remote host closed the connection]
jojosiao has joined #ruby
himsin has joined #ruby
joeycarmello has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 246 seconds]
rohit has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
Ankhers has joined #ruby
becom33 has quit [Quit: Leaving]
gbchaosmaster has quit [Read error: Operation timed out]
Guest92676 has quit [Read error: Connection reset by peer]
seanwash has quit [Quit: Computer has gone to sleep.]
arya_ has quit [Ping timeout: 244 seconds]
jalcine has quit [Read error: Operation timed out]
KindTwo has quit [Ping timeout: 260 seconds]
arya has joined #ruby
rakl has quit [Quit: sleeping]
darkc0met has quit [Ping timeout: 245 seconds]
arya has quit [Ping timeout: 244 seconds]
arya has joined #ruby
apeiros_ has joined #ruby
arkiver has joined #ruby
CaptainJet has quit [Ping timeout: 252 seconds]
<arkiver> I am trying to run this code: http://stackoverflow.com/a/2915904/1262639 in pry. But when I write require 'rubygems' a false is returned. Is there anything else I need to do to get it working ?
rknLA has joined #ruby
rknLA has quit [Changing host]
rknLA has joined #ruby
<rknLA> ahoy!
<rknLA> i want to write a CLI app that has it's own shell and a custom command language. is there a way to use something like optparse or trollop on lines input from stdin?
CaptainJet has joined #ruby
Playground has joined #ruby
lolcathost has quit [Read error: Connection reset by peer]
Orcris has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
dantesun has joined #ruby
kbeddingfield has joined #ruby
rakl has joined #ruby
dantesun has quit [Max SendQ exceeded]
jenrzzz has quit [Ping timeout: 265 seconds]
apeiros_ has quit [Ping timeout: 252 seconds]
noyb has quit [Ping timeout: 248 seconds]
kbeddingfield has quit [Ping timeout: 240 seconds]
answer_42 has joined #ruby
<reactormonk> rknLA, nah
sphera_ is now known as sphera
sphera has quit [Remote host closed the connection]
nari has joined #ruby
<rknLA> oh good.
<davidcelis> arkiver: that gives false because rubygems is already required
<davidcelis> arkiver: it's _always_ required. sre
havenn has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
[Neurotic] has quit [Ping timeout: 260 seconds]
<arkiver> davidcelis, ohh! Thanks :)
<arkiver> But the next : require 'dnsruby' gives a load error.
skrewler has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
danneu has quit [Ping timeout: 255 seconds]
skrewler has quit [Client Quit]
xnm has quit [Quit: WeeChat 0.3.8]
lemonsparrow has joined #ruby
<lemonsparrow> If item.bets is empty array item.bets.map(&:points).inject(:+).to_s returns "" instead I want it to return 0 #Any easy way of doing it ? https://gist.github.com/4138646
s4muel has joined #ruby
[Neurotic] has joined #ruby
<davidcelis> arkiver: then there's nothing called "dnsruby" to require
c0rn has quit [Quit: Computer has gone to sleep.]
<davidcelis> arkiver: what are you trying to require?
tomsthumb has joined #ruby
generalissimo has quit [Remote host closed the connection]
CaptainJet has quit []
psycho_one has joined #ruby
ninegrid has joined #ruby
rknLA has quit [Ping timeout: 250 seconds]
snorkdude has quit [Quit: snorkdude]
<arkiver> davidcelis, I was trying to this this code: http://stackoverflow.com/a/2915904/1262639
<arkiver> So was trying to run it line by line in pry
<davidcelis> arkiver: did you install that gem?
<arkiver> when called require 'dnsruby' i get a load error
<havenn> arkiver: In Pry: gem-install dnsruby
rohit has quit [Ping timeout: 244 seconds]
<arkiver> havenn, davidcelis, oh right. I'll install it right away
<davidcelis> god
<davidcelis> is there anything that pry can't do
apeiros_ has joined #ruby
<davidcelis> [1] pry(main)> make-sandwich
<arkiver> davidcelis, hehe
<arkiver> :)
<arkiver> Well that script worked :)
<reactormonk> davidcelis, that sends a message to my gf who then brings me a sandwitch :>
ToTo has joined #ruby
ninegrid has quit [Ping timeout: 264 seconds]
seanyo has quit [Ping timeout: 264 seconds]
ninegrid has joined #ruby
margle has joined #ruby
akemrir has joined #ruby
arya has quit [Ping timeout: 244 seconds]
apeiros_ has quit [Ping timeout: 264 seconds]
rohit has joined #ruby
<havenn> davidcelis: Try Pry: cohen-poem
<davidcelis> lolz
<davidcelis> not as good as `brew beer` though
<havenn> :)
arya has joined #ruby
akemrir has quit [Quit: WeeChat 0.3.9.2]
afgeneralist has quit [Ping timeout: 252 seconds]
BrianJ has quit [Quit: BrianJ]
<jrabbit> meaning to start doing more testing, whats the going testing framework?
<havenn> jrabbit: minitest/spec is a good bet
arya has quit [Ping timeout: 244 seconds]
<havenn> jrabbit: very fast, rpsec-esque syntax, included in Ruby
<davidcelis> minitest++
<davidcelis> er sorry, minitest += 1
<havenn> jrabbit: You can mix-and-match minitest/unit and minitest/spec style, then minitest/pride make it pretty
Naeblis has joined #ruby
<Naeblis> I'm going through Ruby Koans, and in some places, eval is used because the code is syntax error. Can someone explains how that works?
eldariof has joined #ruby
kbeddingfield has joined #ruby
Ankhers has quit [Remote host closed the connection]
atno has joined #ruby
kbeddingfield has quit [Ping timeout: 260 seconds]
atno has left #ruby [#ruby]
ebouchut has joined #ruby
icole has joined #ruby
apeiros_ has joined #ruby
arkiver has quit [Quit: Leaving]
akemrir has joined #ruby
akemrir has quit [Client Quit]
akemrir has joined #ruby
akemrir has quit [Client Quit]
akemrir has joined #ruby
akemrir has quit [Client Quit]
akemrir has joined #ruby
arkiver has joined #ruby
straind` has joined #ruby
akemrir has quit [Client Quit]
akemrir has joined #ruby
apeiros_ has quit [Ping timeout: 260 seconds]
straind has quit [Ping timeout: 252 seconds]
Hanmac1 has quit [Quit: Leaving.]
Hanmac has joined #ruby
arkiver has quit [Quit: Leaving]
dantesun has joined #ruby
dantesun has quit [Max SendQ exceeded]
arkiver has joined #ruby
hola123 has joined #ruby
arkiver has quit [Read error: Connection reset by peer]
<hola123> This may be OT: I have been developing ruby on rails apps since six months now. But I feel I hardly know ruby programming. Can anyone suggest books/ tutorials etc for understanding ruby and coding exercises in it ?
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
pcarrier has joined #ruby
pcarrier has quit [Client Quit]
brandon has quit [Read error: Connection reset by peer]
brandon has joined #ruby
Mon_Ouie has joined #ruby
joeycarmello has joined #ruby
fantazo has quit [Remote host closed the connection]
lowg has joined #ruby
jackiechan0 has joined #ruby
jackiechan0 is now known as jackbrownhf
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
rohit has quit [Quit: Leaving]
apeiros_ has joined #ruby
hola123 has quit [Quit: Leaving]
zaargy has left #ruby [#ruby]
diegoviola has quit [Quit: leaving]
joeycarmello has quit [Remote host closed the connection]
ebouchut has quit [Quit: ebouchut]
jds has joined #ruby
xsbeats_ has joined #ruby
xsbeats has quit [Read error: Connection reset by peer]
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
jds has quit [Ping timeout: 250 seconds]
lolcathost has joined #ruby
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
tomsthumb has quit [Quit: Leaving.]
diegoviola has joined #ruby
apeiros_ has quit [Ping timeout: 252 seconds]
akemrir has quit [Quit: WeeChat 0.3.9.2]
akemrir has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
ebouchut has joined #ruby
ebouchut has quit [Read error: Connection reset by peer]
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
joofsh has quit [Remote host closed the connection]
InFlames has quit [Read error: Connection reset by peer]
ebouchut has joined #ruby
icole has quit [Remote host closed the connection]
ebouchut has quit [Read error: Connection reset by peer]
ebouchut has joined #ruby
ebouchut has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 255 seconds]
ebouchut has joined #ruby
ebouchut has quit [Read error: Connection reset by peer]
ebouchut has joined #ruby
ebouchut has quit [Read error: Connection reset by peer]
ebouchut has joined #ruby
ebouchut_ has joined #ruby
ebouchut_ has quit [Read error: Connection reset by peer]
ebouchut has quit [Read error: Connection reset by peer]
ebouchut has joined #ruby
ebouchut has quit [Read error: Connection reset by peer]
seanstickle has joined #ruby
ebouchut_ has joined #ruby
ebouchut_ has quit [Read error: Connection reset by peer]
ebouchut has joined #ruby
ebouchut has quit [Read error: No route to host]
ebouchut has joined #ruby
ebouchut has quit [Read error: Connection reset by peer]
tomsthumb has joined #ruby
EyesIsServer has quit [Ping timeout: 244 seconds]
jgrevich has quit [Remote host closed the connection]
apeiros_ has joined #ruby
hamed_r has joined #ruby
akemrir has quit [Quit: WeeChat 0.3.9.2]
akemrir has joined #ruby
akemrir has quit [Client Quit]
hamed_r has quit [Client Quit]
akemrir has joined #ruby
akemrir has quit [Client Quit]
akemrir has joined #ruby
akemrir has quit [Client Quit]
gtech has joined #ruby
<gtech> Is there a way to access the filenames of a directory one at a time as a stream?
rakl has quit [Quit: gone]
<gtech> using ruby?
hackerdude has quit [Remote host closed the connection]
thinkdevcode has quit [Remote host closed the connection]
<davidcelis> probably
akemrir has joined #ruby
Nisstyre-laptop has quit [Read error: Operation timed out]
akemrir has quit [Client Quit]
apeiros_ has quit [Ping timeout: 250 seconds]
icole has joined #ruby
RandyInLA has quit [Quit: RandyInLA]
sheerun has joined #ruby
grzywacz has joined #ruby
akemrir has joined #ruby
monkegjinni has quit [Remote host closed the connection]
icole has quit [Ping timeout: 240 seconds]
ananthakumaran1 has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
ananthakumaran has quit [Ping timeout: 260 seconds]
havenn has quit [Ping timeout: 265 seconds]
qwerxy has joined #ruby
Hanmac has quit [Remote host closed the connection]
rohit has joined #ruby
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
tobago has left #ruby [#ruby]
Dreamer3 has quit [Quit: Leaving...]
lemonsparrow has quit [Ping timeout: 245 seconds]
nyuszika7h has joined #ruby
joeycarmello has joined #ruby
workmad3 has joined #ruby
kbeddingfield has joined #ruby
ewag has quit [Ping timeout: 252 seconds]
Hanmac has joined #ruby
apeiros_ has joined #ruby
joeycarmello has quit [Ping timeout: 260 seconds]
kbeddingfield has quit [Ping timeout: 260 seconds]
bradhe has joined #ruby
babinho has quit [Ping timeout: 255 seconds]
bradhe has quit [Ping timeout: 252 seconds]
Tuxist has joined #ruby
ZubKonst_ has joined #ruby
codeFiend has joined #ruby
apeiros_ has quit [Ping timeout: 248 seconds]
ZubKonst has quit [Ping timeout: 250 seconds]
codeFiend has left #ruby [#ruby]
yshh has joined #ruby
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
gtech has left #ruby [#ruby]
workmad3 has quit [Ping timeout: 264 seconds]
ebouchut has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
<TTilus> `ls`
kil0byte has quit [Read error: Operation timed out]
<seanstickle> [directory listing denied]
fir_ed has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
mikepack has quit [Remote host closed the connection]
nari has quit [Ping timeout: 244 seconds]
Xeago has joined #ruby
hamed_r has joined #ruby
qwerxy has quit [Quit: offski]
ebouchut has quit [Ping timeout: 252 seconds]
karakedi has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
daslicious has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
nemesit has joined #ruby
karakedi has quit [Ping timeout: 244 seconds]
apeiros_ has joined #ruby
pageman has joined #ruby
pageman has quit [Client Quit]
ewag has joined #ruby
adambeynon has joined #ruby
monkegjinni has joined #ruby
pageman_ has joined #ruby
slainer68 has joined #ruby
wallerdev has quit [Quit: wallerdev]
<msch> Dir['*']
qwerxy has joined #ruby
zaki has quit [Read error: Operation timed out]
jds has joined #ruby
slainer6_ has joined #ruby
slainer68 has quit [Read error: Connection reset by peer]
apeiros_ has quit [Ping timeout: 250 seconds]
vlad_starkov has quit [Remote host closed the connection]
jds has quit [Ping timeout: 245 seconds]
SeySayux has quit [Read error: Operation timed out]
Villadelfia has quit [Read error: Connection reset by peer]
timonv has joined #ruby
beiter has joined #ruby
<Mon_Ouie> Dir.foreach("some_dir") { |file| … }
ebouchut has joined #ruby
<Mon_Ouie> Dir['*'] returns an array the lazy one (or the one that could possible be lazy) is Dir.glob('*') { … }
havenn has joined #ruby
pyx has quit [Quit: WeeChat 0.3.9.2]
Villadelfia has joined #ruby
SeySayux has joined #ruby
kbeddingfield has joined #ruby
ewag has quit [Ping timeout: 244 seconds]
kzrl has quit [Ping timeout: 276 seconds]
kzrl has joined #ruby
havenn has quit [Ping timeout: 252 seconds]
pageman_ has quit [Ping timeout: 245 seconds]
kbeddingfield has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby
zaki has joined #ruby
bradhe has joined #ruby
hsbt is now known as hsbt_away
jamesaxl has joined #ruby
ebouchut has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
arietis has joined #ruby
hamed_r has quit [Quit: Leaving]
[Neurotic] has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
whowantstolivefo has joined #ruby
apeiros_ has joined #ruby
lemonsparrow has joined #ruby
<lemonsparrow> I have an array of objects and I would like to arrange the array of objects based on the value of an integer attribute points in the object..
<seanstickle> sort_by
dantesun has joined #ruby
<lemonsparrow> seanstickle: yes I used s.bets.sort_by {|obj| obj.points}
dantesun has quit [Max SendQ exceeded]
Virunga has joined #ruby
<lemonsparrow> seanstickle: but I want it in descending order.. highets points should come first
lkba has quit [Ping timeout: 276 seconds]
<seanstickle> .reverse
<banisterfiend> seanstickle: sup stick
<Hanmac> hm ruby needs some kind of reserse_sort_by :/
<banisterfiend> lemonsparrow: then s.bets.sort_by { |obj| -obj.points }
<seanstickle> lemonsparrow: or s.bets.sort {|x,y| y.points <=> x.points }
<seanstickle> Hey banisterfiend
<banisterfiend> sup stick
<seanstickle> So you said!
<banisterfiend> you didnt answer, stick
<banisterfiend> i said waht's up
<lemonsparrow> banisterfiend: seanstickle thanks
daniel_- has joined #ruby
FredLe has quit [Read error: Operation timed out]
<lemonsparrow> seanstickle: what does this sort {|x,y| y.points <=> x.points } mean ideally ?
FredLe has joined #ruby
<heftig> sort descending by points
<heftig> descending, because x and y are reversed (y is on the left)
<seanstickle> banisterfiend: your question was rhetorical and didn't want an answer.
<lemonsparrow> heftig: ok thanks :)
jojosiao has left #ruby [#ruby]
apeiros has joined #ruby
<seanstickle> banisterfiend: but in case it was not rhetorical, I am slogging through the grey miserable days of my existence, moving ever towards the end of my corrupted flesh.
apeiros_ has quit [Read error: Connection reset by peer]
<seanstickle> But, on the upside, I do some Ruby programming
rohit has quit [Ping timeout: 244 seconds]
areil_ has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
areil has quit [Ping timeout: 256 seconds]
Mon_Ouie has joined #ruby
ebouchut has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
ewag has joined #ruby
<banisterfiend> seanstickle: r u unhappy
<seanstickle> Nope. How are you?
<banisterfiend> seanstickle: pretty good, we're selling pry stickers now, u should buy some for your wife
vlad_starkov has joined #ruby
reinaldob has quit [Remote host closed the connection]
<seanstickle> Link me?
<seanstickle> Seems like you should be selling pry crowbars
<banisterfiend> seanstickle: http://www.devswag.com/collections/pry
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
icole has joined #ruby
daniel_- has quit [Ping timeout: 252 seconds]
Naeblis has left #ruby [#ruby]
icole has quit [Ping timeout: 264 seconds]
ebouchut has quit [Ping timeout: 255 seconds]
mpereira has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
mpereira has joined #ruby
banisterfiend has quit [Ping timeout: 244 seconds]
mpereira has quit [Ping timeout: 256 seconds]
rohit has joined #ruby
mpereira has joined #ruby
nkts has quit []
oposomme has joined #ruby
kbeddingfield has joined #ruby
arya_ has joined #ruby
demian`_ has quit [Quit: demian`_]
hoelzro|away is now known as hoelzro
Vert has joined #ruby
kbeddingfield has quit [Ping timeout: 260 seconds]
bradhe has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
Rockfordal has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
bradhe has quit [Ping timeout: 276 seconds]
seanstickle has quit [Quit: seanstickle]
visof has joined #ruby
<lemonsparrow> is there a ruby way to count the number of lines in a file in such a way that it doesnt include plain lines... bt only lines with content ?
Rym has quit [Quit: Rym]
visof has left #ruby [#ruby]
<apeiros> lemonsparrow: what have you tried so far?
<lemonsparrow> apeiros: count = 0 File.open(filename) {|f| count = f.read.count("\n")}
<lemonsparrow> apeiros: not sure if this is a good way
<apeiros> but that counts all lines
Russell^^ has joined #ruby
<apeiros> it's ok, could be shortened to File.read(filename).count("\n")
ebouchut has joined #ruby
<lemonsparrow> apeiros: yeah... that's nicer... but I would only want lines which are not blank some content should be there
<apeiros> so your current solution does not do that… I'd worry about "the ruby way" later and first get a working version ;-)
dekroning has joined #ruby
<lemonsparrow> apeiros: that's interesting but I need only worry about ruby.. but the solution should apply to any type of files.. like rb or js and so on.
FredLe has quit [Quit: Leaving.]
<lemonsparrow> apeiros: something like this ? http://www.ruby-forum.com/topic/144199
AndChat| has joined #ruby
emmanuelux has joined #ruby
Banistergalaxy has quit [Ping timeout: 248 seconds]
<lemonsparrow> apeiros: u there ? any luck :)
krisfremen has quit [Read error: Connection reset by peer]
<apeiros> lemonsparrow: I am here. we may have a misunderstanding. you asked for "a ruby way", so I assumed that you generally know how to do it, but want to do it nicely too
<apeiros> but seems you didn't mean "a ruby way" but rather "how do I do it with ruby (at all)"
<lemonsparrow> apeiros: well, if you know anyway in which I can get it done.. do leme know.. but eventually I would want it in ruby code :)
xandy is now known as xAndy
chendo has quit [Ping timeout: 265 seconds]
<apeiros> lemonsparrow: well, point is, I don't like to solve people's problem. solving is not the same as helping. IMO you should come up with a solution yourself. What I do is help either improving it or finding the right tools.
chendo has joined #ruby
Rym has joined #ruby
ebouchut has quit [Ping timeout: 255 seconds]
<apeiros> in that forum post you've linked, there's enough info that you should be able to come up with a solution
himsin has quit [Remote host closed the connection]
kil0byte has joined #ruby
krisfremen has joined #ruby
krisfremen has quit [Changing host]
krisfremen has joined #ruby
kil0byte has quit [Remote host closed the connection]
arya_ has joined #ruby
bier has quit [Ping timeout: 244 seconds]
bier_ has quit [Ping timeout: 252 seconds]
mpereira has quit [Ping timeout: 252 seconds]
Vert has quit [Ping timeout: 252 seconds]
icole has joined #ruby
kil0byte has joined #ruby
akemrir has quit [Quit: WeeChat 0.3.9.2]
k610 has joined #ruby
monkegjinni has joined #ruby
icole has quit [Ping timeout: 264 seconds]
bier has joined #ruby
Vert has joined #ruby
daniel_- has joined #ruby
bier_ has joined #ruby
k610 has quit [Ping timeout: 265 seconds]
ij has joined #ruby
FredLe has joined #ruby
dreinull has joined #ruby
<dreinull> Is there a color scheme for textmate and vim that makes comments first class citizens in code?
ebouchut has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
<shevy> hmmm
<hoelzro> dreinull: what exactly do you mean by "first class citizens"?
<shevy> lemonsparrow via File.readlines('/foo/bla.txt') you can read in a file into an array directly, then you can work on that array like in ruby. i.e. you can use .reject to reject content you dont want to include, then you can apply .size to find out how many lines that has
beiter has quit [Quit: beiter]
samphippen has joined #ruby
arya_ has joined #ruby
Virunga has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 240 seconds]
Slivka has joined #ruby
BigO has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
sepp2k has joined #ruby
bradhe has joined #ruby
ebouchut has quit [Ping timeout: 252 seconds]
arya_ has quit [Ping timeout: 252 seconds]
<Xeago> dreinull: try idlefingers / railscasts theme
BigO has quit [Remote host closed the connection]
<Xeago> there's a tm -> vim converter on the web somewhere if you like it
<Xeago> otherwise
BigO has joined #ruby
<Xeago> give me a pm and I'll send you the vim-theme form idlefingers/railscasts that I converted a while back
arya_ has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
jimeh has joined #ruby
VegetableSpoon has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
jaygen has joined #ruby
k610 has joined #ruby
<lemonsparrow> shevy: interesting logic... will try that out thanks :)
codecop has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9.1]
workmad3 has joined #ruby
k610 has quit [Ping timeout: 240 seconds]
arturaz has joined #ruby
matrixise has joined #ruby
oposomme has quit [Ping timeout: 260 seconds]
<shevy> that's what objects are about after all... a set of data with associated behaviour defined in methods
BigO has quit [Remote host closed the connection]
staafl has joined #ruby
<shevy> hmm anyone has a list of what could be considered an archive?
<shevy> right now my primitive way is to check for inclusion of ".tar" but apparently .zip is missing, I wonder if there is some better way... but I dont want to write too many new lines, that class is very small
shikamaru has joined #ruby
`brendan has joined #ruby
Xeago has quit [Remote host closed the connection]
lowg has quit [Read error: Connection reset by peer]
monkegjinni has quit [Remote host closed the connection]
lowg has joined #ruby
tomoyuki28jp has joined #ruby
<tomoyuki28jp> Date.today.cweek returns week number in the year, but how can I get week number for the month?
<dreinull> Xeago, thanks will try that
areil_ has quit [Remote host closed the connection]
<dreinull> hoelzro: a theme that doesn't gray out inline documentation/comments. If you primarily work with docs you want to read those better than the code.
<hoelzro> shevy: shouldn't you just check for ones you support?
SwooshyCueb has quit [Quit: And so my animus . . . I carry you in me . . .]
<hoelzro> dreinull: ah. well, I'm using peaksea right now, which doesn't gray them out
<AndChat|> Dreinull then use ri
<AndChat|> (or pry)
ebouchut has joined #ruby
<dreinull> AndChat|: ri or pry for editing documentation?
matrixise has quit [Ping timeout: 240 seconds]
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
SwooshyCueb has joined #ruby
<shevy> hoelzro ah, I support them all via a class cleverly called Extracter. I suppose I could use that class too, and add a method like .is_archive?
<shevy> guess that may be the simplest solution
<hoelzro> shevy: what I've done in the past is have a class for each format, and have a sort of factory class that returns an object of the correct type given a filename
<shevy> hmm... a class for each format?
<hoelzro> yes
<dreinull> hoelzro: ok, way better than most others
<dreinull> I think I'll have to add my own theme at some point
<hoelzro> usually something like classes.first { |c| c.supports? filename }
<hoelzro> dreinull: you could always modify your existing them to highlight comments better =)
ping_pong is now known as ping-pong
<dreinull> I'm not good at reinventing wheels :)
rohit has quit [Quit: Leaving]
Rym has quit [Quit: Rym]
<hoelzro> dreinull: it's probably a one-line change
tomoyuki28jp has left #ruby ["ERC Version 5.2 (IRC client for Emacs)"]
<dreinull> hoelzro: yes but usually it entails more changes. If I highlight comments I need to unhighlight (or whatever else the antonym is) other parts
<hoelzro> heh, lowlight? ;)
<shevy> hehe
<shevy> "unhighlight"
<shevy> I like it
<hoelzro> dreinull: true, but depending on your theme, you could probably find a comment color that fits in rather well
<shevy> when I read lowlight, I think of youtube videos that show a fighter doing stupid things
ebouchut has quit [Read error: Connection reset by peer]
Virunga has joined #ruby
<dreinull> nohl is probably the vimish expression
ebouchut has joined #ruby
<dreinull> I'll experiment a bit but I do remember someone posting a theme on HN or somewhere along these lines.
<dreinull> ok, off to other things
nemesit has quit [Quit: Leaving...]
<shevy> BEER!
ebouchut has quit [Ping timeout: 240 seconds]
akemrir has joined #ruby
FredLe has quit [Ping timeout: 252 seconds]
jwang has quit [Read error: Connection reset by peer]
arya_ has quit [Ping timeout: 250 seconds]
spike|spiegel has joined #ruby
ij has quit [Read error: Connection reset by peer]
lolcathost has joined #ruby
jwang has joined #ruby
ij has joined #ruby
fantazo has joined #ruby
lolcathost has quit [Ping timeout: 264 seconds]
seanyo has joined #ruby
LouisGB has joined #ruby
arya_ has joined #ruby
jackbrownhf has quit [Ping timeout: 260 seconds]
nyrb has quit [Remote host closed the connection]
FredLe has joined #ruby
nyrb has joined #ruby
Banistergalaxy has joined #ruby
LouisGB has quit [Disconnected by services]
n8888 has joined #ruby
atmosx has joined #ruby
<atmosx> hello
<atmosx> Now that (in 1 day) I've mastered the craft of CSS and HAML and my website looks like a 2-year old with 3 pencils, I'd like to know why on earth everybody is using JSON for building REST api's with sinatra.
<atmosx> Isn't ruby enough?
AndChat| has quit [Ping timeout: 255 seconds]
<hoelzro> atmosx: what do you mean?
<atmosx> I'd like to write a really simple API for a project of mine.
<atmosx> just for fun, no rush or anything
<atmosx> All guides I can find online on how to approach this, since I know nothing about web-dev in general
x0F has quit [Disconnected by services]
<atmosx> talk about sinatra/rails + JSON
x0F_ has joined #ruby
<atmosx> and I wonder why I can't do it using plain ruby and sinatra routes...
x0F_ is now known as x0F
blacktulip has joined #ruby
<hoelzro> atmosx: well, there's no reason you can't
<atmosx> there must be a reason if everyone uses a specific tool for a job
<atmosx> hm
<hoelzro> well, JSON is very easy to work with
<atmosx> define easy
<atmosx> the code seems kinda, ugly but I understood the basics
<hoelzro> atmosx: if you hadn't read those posts, how would you go about setting up your API?
tommyvyo has joined #ruby
<atmosx> hoelzro: I've read a couple of tutorials on Sinatra and routes and I'm playing with them… I'm being able to display DB info using them.. so I thought that this would be enough
<hoelzro> atmosx: well, think about how the client would work
<atmosx> no idea
<atmosx> hm
<atmosx> what I'm missing is how data is transfered actually
<hoelzro> it would request some data via http://example.com/my-info
<atmosx> yeap
<hoelzro> what format is the response in?
<atmosx> a text file? or a yaml file ?
psycho_one has quit [Remote host closed the connection]
<hoelzro> ok
wargasm has quit [Ping timeout: 260 seconds]
<hoelzro> YAML is a good choie
<hoelzro> *choice
<hoelzro> can you think about what a problem with a text file might be?
<atmosx> well since I need some sort of structure yeap, yaml would be better probably than plain txt
<hoelzro> right
margle has joined #ruby
<hoelzro> JSON is just an alternative for YAML here
<hoelzro> there's no real reason to use one over the other
<hoelzro> other than support
<atmosx> I see.
<atmosx> so it's a sort of standard.
<atmosx> with wider community support
<atmosx> nice
<workmad3> hoelzro: yaml has standardised support for type information during serialization
<atmosx> what is serialization workmad3 ?
<atmosx> workmad3: how's life btw?
monkegjinni has joined #ruby
<workmad3> atmosx: serialization is the process of converting memory into a format suitable for transmission
<atmosx> oh
<atmosx> thanks didn't knew.
dantesun has joined #ruby
<hoelzro> YAML is a sort of JSON++, imo
dantesun has quit [Max SendQ exceeded]
<hoelzro> it supports additional features
<atmosx> hoelzro: like what?
<hoelzro> and is more pleasing to the eye
<hoelzro> atmosx: references
ebouchut has joined #ruby
<hoelzro> the ability to embed multiple documents in a stream
n8888 has quit [Ping timeout: 255 seconds]
<atmosx> aha
<workmad3> JSON and YAML are just different formats... which one is the right choice depends on a lot of factors to do with your actual data and your source/target
imami|afk has quit [Excess Flood]
banseljaj has joined #ruby
<atmosx> My data will be "text" extracts from an SQLite3 db
<atmosx> and should be fairly small amounts of data, less than 1 kb usually.
ChampS666 has joined #ruby
<atmosx> anyway, I'll try with YAML. thanks for the info :-)
kirun has joined #ruby
pac1 has joined #ruby
ebouchut has quit [Ping timeout: 244 seconds]
<workmad3> atmosx: do you actually need any structure?
<workmad3> atmosx: although it's not a bad idea to go with something like JSON or YAML off the bat to allow easier extension I guess
<atmosx> workmad3: I have a database o 'greek words'. Most of them, not all. I'd like to get them all at some point in time. But every word has some data like: 'sha1', 'web_ranking', 'web_ranking_date' and so on.
<atmosx> but it's 1 table actually, with 407.000 records.
<workmad3> ah, so you do have some structure and metadata :)
<atmosx> yeap :-)
<atmosx> I'd like it to be used for sentiment analysis later on
<atmosx> and also could be used for other fancy projects as well :-) that's how the idea came actually from a project I'm writing in my spare time… Trying to calculate the knowledge level of an author.
jackiechan0 has joined #ruby
<atmosx> blogger, etc.
<atmosx> err language knowledge level.. not his tech knowledge.
_cheney has quit [Ping timeout: 245 seconds]
_cheney has joined #ruby
EyesIsServer has joined #ruby
Banistergalaxy has quit [Ping timeout: 255 seconds]
<atmosx> bb
atmosx has quit [Quit: And so the story goes…]
workmad3 has quit [Ping timeout: 250 seconds]
miphe has joined #ruby
arya_ has quit [Read error: Connection reset by peer]
arya_ has joined #ruby
LouisGB has joined #ruby
postmodern has quit [Quit: Leaving]
Emmanuel_Chanel has quit [Quit: Leaving]
jds has joined #ruby
dekroning has quit [Quit: leaving]
nemesit has joined #ruby
csmrfx has joined #ruby
<csmrfx> 8)
yeats has joined #ruby
yeats has left #ruby [#ruby]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
jackiechan0 is now known as jackbrownhf
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
arabi has joined #ruby
seanyo has quit [Ping timeout: 264 seconds]
<arabi> i have an error with my rails server pls help http://pastebin.com/UhcxKD84
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
<csmrfx> arabi: go to a rails chan ;)
<arabi> lemme give the name pls
seanyo has joined #ruby
<csmrfx> I was watching a prez by the leet J. E. Gray on things you didn't know ruby can do - but now I can't find it on youtube. Strange! Anyone got correct link?
<csmrfx> arabi: perhaps #ror or #rubyonrails or #rails
Emmanuel_Chanel has joined #ruby
ebouchut has joined #ruby
ToTo has quit [Quit: Leaving...]
slainer6_ has quit [Remote host closed the connection]
<csmrfx> Ah, found it, its "Ten Things You Didn't Know You Could Do"
Banistergalaxy has joined #ruby
arya_ has quit [Disconnected by services]
davidcelis has quit [Ping timeout: 260 seconds]
arya__ has joined #ruby
davidcelis has joined #ruby
hoelzro is now known as hoelzro|away
<csmrfx> wudup Mr. Banner?
fyolnish has quit [Remote host closed the connection]
fyolnish has joined #ruby
kbeddingfield has joined #ruby
<sheerun> Did you know it's possible to write: [1,2,3].map(&method(:private_method_name)) in class?
ebouchut has quit [Ping timeout: 248 seconds]
Ivo has quit [Quit: WeeChat 0.3.9.2]
qwerxy has quit [Quit: offski]
kbeddingfield has quit [Ping timeout: 260 seconds]
bradhe has joined #ruby
arabi has quit [Quit: Leaving]
<csmrfx> sheerun was that in the prez?
<sheerun> No. I've just encountered it in my code.
<csmrfx> does that blockify the method...
psycho_one has joined #ruby
TomRone has quit [Ping timeout: 245 seconds]
jds has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 245 seconds]
nemesit has quit [Quit: Leaving...]
TomRone has joined #ruby
psycho_one has quit [Remote host closed the connection]
darkc0met has joined #ruby
jackbrownhf has quit [Quit: Sto andando via]
VegetableSpoon has quit [Ping timeout: 260 seconds]
jds has joined #ruby
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
jalcine has joined #ruby
<charliesome> sheerun: should be possible
Guest30953 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
schaerli has joined #ruby
phantasm66 has quit [Quit: *sleeeeep*]
dantesun has joined #ruby
failshell has joined #ruby
dantesun has quit [Max SendQ exceeded]
<failshell> hello. i have strings of the following type: define('DB_NAME', 'wordpress');. i would like the extract the value (wordpress), what would be the best way to do that?
Rockfordal has quit [Ping timeout: 248 seconds]
<csmrfx> failshell: what are you talking about
<failshell> csmrfx: im reading a wordpress config file, i want to extract the user/pass/db names
Vert has quit [Ping timeout: 252 seconds]
<failshell> so i open the file, but getting the values is harder than i thought
<Banistergalaxy> Csmrfx sup carl
jslowe has joined #ruby
<csmrfx> failshell: open file with what
<failshell> File.open
Vert has joined #ruby
<csmrfx> failshell: parse line by line
<failshell> yes that i can do
<failshell> i match based on a regex
<failshell> but i end up with define('DB_NAME',
<csmrfx> split by define(' to get teh key, by , ' to find the value
<failshell> define('DB_NAME','wordpress');
Beoran_ has quit [Read error: Operation timed out]
pavilionXP has joined #ruby
<csmrfx> or hm, maybe you could split by the parenthesis
chussenot has joined #ruby
<csmrfx> then eval [ result ]
<csmrfx> and get an arr with key, val 8P
<failshell> right now, i have a function that removes all the unwanted stuff with .gsub
<failshell> but that's ugly
<csmrfx> if theres a lot of that you might want to consider a streaming implementation
croz has quit [Quit: changing servers]
ebouchut has joined #ruby
<csmrfx> anyway, should be trivial to do by splitting or with regexes
<failshell> thanks for the pointers
demian`_ has joined #ruby
chussenot has quit [Quit: chussenot]
akemrir has quit [Quit: WeeChat 0.3.9.2]
jimeh has quit [Quit: Computer has gone to sleep.]
arya__ has quit [Ping timeout: 276 seconds]
jalcine has quit [Remote host closed the connection]
darkc0met has quit [Read error: Connection reset by peer]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
arya__ has joined #ruby
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
<failshell> well, it's not going to win any awards, but it works: https://gist.github.com/4139968
pcarrier has joined #ruby
Beoran_ has joined #ruby
JohnBat26 has joined #ruby
ebouchut has quit [Ping timeout: 276 seconds]
<csmrfx> failshell: whats .split[1] split the lines by?
thecreators has quit [Quit: thecreators]
applesarefruits has joined #ruby
chussenot has joined #ruby
<failshell> i end up with 'wordpress');
<failshell> so its using the comma
dangerousdave has joined #ruby
<apeiros> those 3 gsub!'s can be replaced by a single l.delete!(";)'")
dangerousdave has quit [Remote host closed the connection]
<apeiros> and String#split defaults to splitting on \s+
<failshell> line.split("'")[3]
<failshell> even cleaner
<failshell> with something this simple, i dont even need a function
haxrbyte has joined #ruby
diegoviola has quit [Ping timeout: 260 seconds]
slainer68 has joined #ruby
failshell has quit [Quit: Lost terminal]
chussenot has quit [Quit: chussenot]
chimkan_ has joined #ruby
dantesun has joined #ruby
dantesun has quit [Max SendQ exceeded]
Elhu has joined #ruby
darkc0met has joined #ruby
arya__ has quit [Ping timeout: 244 seconds]
arya__ has joined #ruby
jalcine has joined #ruby
jalcine has quit [Changing host]
jalcine has joined #ruby
jalcine has joined #ruby
akemrir has joined #ruby
slainer68 has quit [Ping timeout: 244 seconds]
haxrbyte has quit [Remote host closed the connection]
jds has quit [Remote host closed the connection]
iamjarvo has joined #ruby
kbeddingfield has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
Guest92676 has joined #ruby
kbeddingfield has quit [Ping timeout: 252 seconds]
lemonsparrow has quit [Quit: Page closed]
jalcine has quit [Ping timeout: 252 seconds]
darkc0met has quit [Ping timeout: 246 seconds]
bradhe has joined #ruby
ebouchut has joined #ruby
areil has joined #ruby
dantesun has joined #ruby
dantesun has quit [Max SendQ exceeded]
tenmilestereo has joined #ruby
<shevy> hehehe
<shevy> but methods make the code cleaner!
_bart has joined #ruby
ToTo has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
<_bart> Hi, I'm very much annoyed by the way LateX markup feels, it feels like a time machine pushing you back to the 80's, and I'm thinking of writing a new markup and processing it with ruby. I don't think it has been done before right?
dantesun has joined #ruby
dantesun has quit [Max SendQ exceeded]
<csmrfx> like, html doesn't exist?
<csmrfx> or postscript, pdf, svg, ....
seanstickle has joined #ruby
joofsh has joined #ruby
ewag has quit [Ping timeout: 240 seconds]
dantesun has joined #ruby
dantesun has quit [Max SendQ exceeded]
<shevy> _bart cool idea
otters has quit [Ping timeout: 252 seconds]
<shevy> sounds like a lot of work however
<_bart> shevy: yes, being a physicist, the match/formula-writing part will be important. I think I'll just start with http://prawn.majesticseacreature.com/ and invent a new markup language. If it doesn't work out I'll still learn some new things along the way.
elux has joined #ruby
<shevy> :)
noyb has joined #ruby
ewag has joined #ruby
Virunga has quit [Remote host closed the connection]
<csmrfx> I suggest starting by creating a subset of latex that does what you want with less LateX
Elhu has quit [Quit: Computer has gone to sleep.]
<csmrfx> like Sass or Haml did
Elhu has joined #ruby
nkts has joined #ruby
chimkan___ has joined #ruby
pavilionXP has quit [Ping timeout: 264 seconds]
<shevy> how do I do a conditional include?
Slivka has quit [Remote host closed the connection]
<shevy> include Foo unless Foo is included ?
chimkan_ has quit [Ping timeout: 260 seconds]
arturaz has quit [Ping timeout: 252 seconds]
<heftig> shevy: include Foo unless self < Foo
ewag has quit [Ping timeout: 240 seconds]
<shevy> hmmmmmm
<shevy> that's so ugly that I will need to find a nicer looking alternative :\
<Banistergalaxy> You don't need to check
<Banistergalaxy> Include is a no op
<Banistergalaxy> If already included
phantasm66 has joined #ruby
<heftig> Banistergalaxy: it does fire the callbacks, though
<heftig> module A def self.included(base) puts base end end; class B; include A; include A end
Virunga has joined #ruby
<heftig> making the callback idempotent is probably the best choice
Mon_Ouie has quit [Ping timeout: 240 seconds]
<Banistergalaxy> Heftig thats what she said
elux has quit [Quit: Bye!]
<csmrfx> hm, I thought require does that for you
nemesit has joined #ruby
<heftig> csmrfx: talking about include
<csmrfx> I know
<csmrfx> But doesn't require check if Foo has been included
<heftig> require and include are not related
<csmrfx> hmm
DaZ has quit [Ping timeout: 252 seconds]
<heftig> require loads a file, adding it to $LOADED_FEATURES, an array it checks to see if it's already required
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<csmrfx> haha, I guess thats why I always use require in ruby to include
<heftig> include inject a Module into another Module's (or Class') ancestor chain
<csmrfx> hm, maybe I've been misusing extend
<heftig> extend includes a Module in an Object's singleton class
dnyy has joined #ruby
<heftig> obj.extend Foo like doing class << obj; include Foo; end
alee- has quit [Ping timeout: 276 seconds]
hoelzro|away is now known as hoelzro
DaZ has joined #ruby
BrianJ has joined #ruby
seanstickle has quit [Quit: seanstickle]
alee- has joined #ruby
kbeddingfield has joined #ruby
noyb has quit [Ping timeout: 256 seconds]
notfunk has joined #ruby
maxmanders has quit [Quit: leaving]
maxmanders has joined #ruby
vlad_sta_ has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
jackiechan0 has joined #ruby
jackiechan0 is now known as jackbrownhf
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
verto|off is now known as verto
jackbrown has joined #ruby
jackbrownhf has quit [Client Quit]
kbeddingfield has quit [Ping timeout: 252 seconds]
jackbrown has quit [Read error: Connection reset by peer]
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
Beoran_ has quit [Ping timeout: 255 seconds]
verto is now known as verto|off
maxmande1s has joined #ruby
maxmanders has quit [Client Quit]
rumba has joined #ruby
bradhe has joined #ruby
pkircher has joined #ruby
<rumba> hi. how can i use SOAP::WSDLDriverFactory with HTTP authentication? i've been on Google for days and i haven't found a way to do this. the moment i call SOAP::WSDLDriverFactory(url), it tries to connect to the remote server and fails because it doesn't authenticate.
arya__ has quit []
<pkircher> join #ROR
arya__ has joined #ruby
demian`_ has quit [Quit: demian`_]
bradhe has quit [Ping timeout: 246 seconds]
headius has joined #ruby
byennen has joined #ruby
noyb has joined #ruby
LouisGB has quit [Ping timeout: 260 seconds]
spike|spiegel has quit [Quit: leaving]
koshii has quit [Ping timeout: 264 seconds]
maxmande1s is now known as maxmanders
Goles has joined #ruby
dantesun has joined #ruby
sputnick has joined #ruby
<sputnick> Hi
dantesun has quit [Max SendQ exceeded]
<sputnick> is ruby support "\K" look-around advanced feature ? Or asked another way, do ruby use PCRE ?
<sputnick> (regex)
maxmanders has quit [Quit: leaving]
maxmanders has joined #ruby
Ankhers has joined #ruby
jackbrownhf has quit [Quit: Sto andando via]
spike|spiegel has joined #ruby
ewag has joined #ruby
chimkan___ has quit [Quit: chimkan___]
<_bart> csmrfx: thanks
<_bart> csmrfx: I'm taking markdown as a starting point
demian`_ has joined #ruby
demian`_ has quit [Client Quit]
<apeiros> sputnick: ruby regex is mostly pcre
<csmrfx> np
<apeiros> consult `ri Regexp` as for whether \K is supported
<apeiros> or just try it
Mon_Ouie has quit [Ping timeout: 240 seconds]
Beoran_ has joined #ruby
atno has joined #ruby
ToTo has quit [Ping timeout: 244 seconds]
ChampS666 has quit [Ping timeout: 245 seconds]
haxrbyte has joined #ruby
chimkan has joined #ruby
hsbt_away is now known as hsbt
thecreators has joined #ruby
replore_ has joined #ruby
LouisGB has joined #ruby
croz has joined #ruby
<sputnick> apeiros: seems not working : "echo foobar | ruby -ne 'puts $_.sub!( /foo\Kbar/, "foobar" )'"
<sputnick> (return nothing)
<sputnick> or better : "echo foobar | ruby -ne 'puts $& if /foobar/'"
nkts has quit []
haxrbyte has quit [Ping timeout: 246 seconds]
<sputnick> \K forgotten : "echo foobar | ruby -ne 'puts $& if /foo\Kbar/'"
phantasm66 has quit [Quit: *sleeeeep*]
Indi0 has joined #ruby
Indi0 has left #ruby [#ruby]
tenmilestereo has quit [Quit: Leaving]
chimkan___ has joined #ruby
<sputnick> $ ri Regexp
<sputnick> Nothing known about Regexp
haxrbyte has joined #ruby
chimkan has quit [Ping timeout: 244 seconds]
chimkan___ is now known as chimkan
<_bart> how do I use Listen without file? https://github.com/guard/listen
sailias has joined #ruby
thinkdevcode has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
seanstickle has joined #ruby
u89 has joined #ruby
Goles has quit [Remote host closed the connection]
u89 has quit [Remote host closed the connection]
u89 has joined #ruby
noyb has quit [Ping timeout: 240 seconds]
haxrbyte_ has joined #ruby
seanyo_ has joined #ruby
akemrir has quit [Ping timeout: 244 seconds]
sailias has quit [Ping timeout: 252 seconds]
mityaz has joined #ruby
seanyo has quit [Ping timeout: 240 seconds]
haxrbyte has quit [Ping timeout: 250 seconds]
generalissimo has joined #ruby
spike|spiegel has quit [Quit: WeeChat 0.3.9.2]
chimkan___ has joined #ruby
spike|spiegel has joined #ruby
arturaz has joined #ruby
haxrbyte has joined #ruby
replore_ has quit [Remote host closed the connection]
AlSquirrel has joined #ruby
havenn has joined #ruby
haxrbyte_ has quit [Ping timeout: 245 seconds]
haxrbyte_ has joined #ruby
chimkan has quit [Ping timeout: 244 seconds]
chimkan___ is now known as chimkan
AlSquirrel has quit [Client Quit]
AlSquirrel has joined #ruby
haxrbyte has quit [Ping timeout: 252 seconds]
Slivka has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
chimkan___ has joined #ruby
chimkan___ has quit [Client Quit]
mklappstuhl has joined #ruby
chimkan has quit [Ping timeout: 240 seconds]
tenmilestereo has joined #ruby
bradhe has joined #ruby
u89 has quit [Remote host closed the connection]
sailias has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
AlSquirrel has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
fir_ed has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
thecreators has quit [Quit: thecreators]
pcarrier has quit []
ewag has quit [Ping timeout: 252 seconds]
<apeiros> sputnick: "nothing known about Regexp" means you haven't installed the docs
<apeiros> if you've installed ruby via rvm, do: rvm docs generate
<apeiros> sputnick: but doesn't seem like \K was supported
babinho has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
LouisGB has quit []
chimkan has joined #ruby
fabio has joined #ruby
<shevy> hmm is there a way to convert german umlauts in a webpage to html entities?
tommyvyo has joined #ruby
<fabio> hello, im in ubuntu precise with ruby 1.9.3, i must have to do this for installing an app?
<fabio> rvm use 1.9.2@appdownloaded --create
<fabio> ?
<fabio> or rvm use 1.9.3@appdownloaded --create
<fabio> I have to compile all ruby, or can i use the ubuntu ruby?
<spike|spiegel> fabio: just use the default ruby you have from ubuntu
<spike|spiegel> unless you need to support/test on ruby versions other than 1.9.3
replore_ has joined #ruby
chimkan has quit [Ping timeout: 245 seconds]
<rumba> Can the Ruby Wasabi library be configured to follow redirects? http://stackoverflow.com/questions/13543685/
king313 has joined #ruby
king313 has quit [Changing host]
king313 has joined #ruby
<heftig> spike|spiegel: isn't the "default" ruby still 1.8?
<king313> Hello, simple question which I do not found in google (maybe because I am not using the right keywords)
<king313> I have a simple string: "ia"
<king313> as input to a method, this method checks if the "i" have a strong vowel (like a) before or after
<fabio> spike|spiegel, then i have to do this command
<king313> the method does that checking: "if STRONG_VOWELS.include? word[pos-1]"
<fabio> bundle install --binstubs
<fabio> inside my app
<king313> because i is in position 0, it does i-1 and validates "ia" as having a strong vowel before, what is not true
chimkan_ has joined #ruby
<fabio> i can do that without use a specifici rvm use¿?
<havenn> king313: Can you paste a Gist of the code? http://gist.github.com
<king313> how can I avoid the -1 going to the end? any way else than checking in the if the position?
<king313> yes! no problem
<heftig> king313: implement it using a regular expression
LouisGB has joined #ruby
<spike|spiegel> heftig: maybe, but it's just easy to get 1.9 as the default with the alternatives system
seanwash has joined #ruby
onibox has joined #ruby
<spike|spiegel> fabio: what is bundle doing here?
ninegrid_ has joined #ruby
xyzodiac has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
ninegrid has quit [Ping timeout: 252 seconds]
<king313> here is my code
maxmanders has quit [Quit: leaving]
ebouchut has quit [Quit: ebouchut]
ryanlecompte has joined #ruby
<king313> I am not skilled into regex, so I do not know how to do it
saispo has joined #ruby
<king313> anyway, I only want to check the position before and after with a array, nothing more
<heftig> eww
<heftig> king313: well, that's not enough context to efficiently convert to Regexp
<heftig> king313: just check if pos > 0 && STRONG_VOWELS.include? word[pos-1]
<king313> yup, this would solve the problem
Ankhers has quit [Remote host closed the connection]
bradhe has joined #ruby
<king313> I thought about that, but then I supposed that ruby should have a more elegant way and wanted some opinion
<king313> from more skilled developers
<king313> thanks, heftig :)
koshii has joined #ruby
swiftsure has joined #ruby
maxmanders has joined #ruby
afgeneralist has joined #ruby
skcin7 has joined #ruby
kzrl has quit [Ping timeout: 260 seconds]
jrajav has joined #ruby
maxmanders has quit [Client Quit]
ikaros has joined #ruby
etank has joined #ruby
maxmanders has joined #ruby
schaerli has quit [Remote host closed the connection]
xAndy is now known as xandy
deepgray has joined #ruby
<deepgray> hi guys!
<deepgray> if (testobj.respond_to? :join)
zemanel has joined #ruby
<deepgray> what does mean :join? in this case
Elhu has quit [Quit: Computer has gone to sleep.]
<arturaz> deepgray, method name
<deepgray> argument for respond_to? if yes
<deepgray> why symbol used?
kzrl has joined #ruby
ninegrid_ has quit [Ping timeout: 255 seconds]
AlSquire has joined #ruby
<seanstickle> deepgray: you can use a string too
<seanstickle> Although I believe it converts it internally to a symbol
dagnachew has joined #ruby
<deepgray> so, this code checks that object testobj has method join? Correct?
<seanstickle> More or less.
ninegrid has joined #ruby
maxmanders has quit [Quit: leaving]
chimkan___ has joined #ruby
maxmanders has joined #ruby
<seanwash> Hey, this may be the wrong place to ask for help with this, but do any of you have experience with hosting a ruby app on a VPS?
dagnachew has quit [Client Quit]
ewag has joined #ruby
yshh has quit [Remote host closed the connection]
<seanwash> There seem to be a hundred different ways to do this and I'm feeling a bit lost.
dagnachew has joined #ruby
icole has joined #ruby
<seanstickle> seanwash: sure nuff
<seanwash> @seanstickle I'm running ubuntu, and I want to use nginx as the backbone to proxy apache for php, but for ruby/rails/sinatra, there is thin, unicorn, passenger
dagnachew has quit [Client Quit]
<seanstickle> Use unicorn.
<seanstickle> Done.
maxmanders has quit [Client Quit]
<havenn> seanwash: puma
dagnachew has joined #ruby
maxmanders has joined #ruby
<seanwash> @seanstickle ok. That will allow me to have multiple apps running at once?
bbttxu has joined #ruby
<seanstickle> seanwash: as many as you desire
<seanwash> @seanstickle I like the sound of that.
chimkan_ has quit [Ping timeout: 255 seconds]
<seanwash> @seanstickle do you know of any good documentation for getting that up? I've read a bunch of blogs but they all have their own way of doing it
Nisstyre-laptop has joined #ruby
<seanwash> @havenn puma?
<havenn> seanwash: Puma, Unicorn, Thin or Passenger as a web server behind Nginx for load balancing.
<havenn> seanwash: http://puma.io/
generalissimo has quit [Remote host closed the connection]
<seanwash> @havenn exactly. I guess I'm just having trouble configuring things besides installing rvm/ruby & nginx
icole has quit [Ping timeout: 260 seconds]
Spam`Bot has joined #ruby
mahmoudimus has joined #ruby
seanstickle has quit [Quit: seanstickle]
<seanwash> @havenn and rails ≠ rack, correct?
<havenn> seanwash: Not at all.
nkts has joined #ruby
nkts has quit [Max SendQ exceeded]
<havenn> seanwash: Yes, !=
<seanwash> @havenn so I could use puma for my sinatra/rack apps, and unicorn for rails
monkegjinni has quit [Remote host closed the connection]
nkts has joined #ruby
<seanwash> @havenn and use nginx to proxy the traffic to the correct locations
<havenn> Unicorn, Rainbows!, Puma, Passenger, and Thin are all excellent Rack app Web Server choices.
<havenn> seanwash: There are reasons to choose between the various Rack web servers. For example, Unicorn is meant for fast clients so it doesn't work for streaming data.
<havenn> seanwash: Rainbows! is Unicorn for slow clients, which works great for streaming.
deepgray has quit [Ping timeout: 244 seconds]
<seanwash> @havenn ah. I'll just have to do more research then. I don't want to keep bothering you for stuff I can find with documentation! I'm not sure what streaming is
ebouchut has joined #ruby
<seanwash> @havenn I'm a front end developer trying to get into ruby/rails development and I'm tired of using hosts that aren't flexible
<havenn> seanwash: Passenger can actually be installed as an Nginx or Apache module.
replore_ has quit [Remote host closed the connection]
<havenn> seanwash: Just an aside, but this is a good article on streaming data :) http://tenderlovemaking.com/2012/07/30/is-it-live.html
slainer68 has joined #ruby
u89 has joined #ruby
<seanwash> @havenn lol at that logo & tagline
Somelauw has joined #ruby
<Somelauw> I'm doing the interactive tutorial on the website, but the interactive repl doesn't enable me to use ' or ", so I can't type any strings.
slainer68 has quit [Read error: Operation timed out]
greenarrow has quit [Quit: IRC is just multiplayer notepad]
<havenn> Somelauw: tryruby.org?
<Somelauw> on tryruby.org, yes
<Somelauw> I should probably tell that my keyboardlayour is us-international
<Somelauw> that means I have to press "(space) to get "
schaerli has joined #ruby
<Somelauw> Why am I pm'ed by a spambot that tells me not to tell ****** on ruby?
workmad3 has joined #ruby
maxmanders has quit [Quit: leaving]
erry has joined #ruby
tommyvyo_ has joined #ruby
<erry> .
replore_ has joined #ruby
greenarrow has joined #ruby
chimkan___ has quit [Ping timeout: 264 seconds]
Spam`Bot has quit []
jds has joined #ruby
<Somelauw> Can someone here disable Spam`Bot?
maxmanders has joined #ruby
<havenn> Somelauw: I don't see anyone by that name in this channel?
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
<seanwash> hey @havenn thanks for the help. I'm gonna roll with Puma for now
<seanwash> Wish me luck!
bbttxu has quit [Quit: bbttxu]
<havenn> seanwash: G'luck!
xandy is now known as xAndy
<Somelauw> havenn: It doesn't but it is likely that someone is monitoring me on this channel, because it talks to me each time I write something in this channel.
jimeh has joined #ruby
phelps has joined #ruby
eindoofus has joined #ruby
<eindoofus> Just curious, for those that use Linux, what distros are you guys running?
<havenn> eindoofus: Ubuntu & CentOS (though I'd switch from CentOS to Scientific Linux if I migrated the server)
<havenn> PCI Compliance is particularly a pain on CentOS....
xAndy is now known as xandy
zemanel has quit [Quit: zemanel]
<eindoofus> Is there any particular distro that has more Ruby On Rails support online with the install process and whatnot
replore_ has quit [Remote host closed the connection]
slainer68 has joined #ruby
marainein has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
schaerli_ has joined #ruby
TheFuzzball has quit [Read error: Connection reset by peer]
ltsstar has joined #ruby
<havenn> eindoofus: For Debian and RedHat downstream distros at least, the process is pretty similar. I don't know about Gentoo and ArchLinux.
xandy is now known as xAndy
dantesun has joined #ruby
ToTo has joined #ruby
dantesun has quit [Max SendQ exceeded]
__class__ has quit [Ping timeout: 252 seconds]
schaerli has quit [Ping timeout: 265 seconds]
jphpsf has joined #ruby
TheFuzzball has joined #ruby
dantesun has joined #ruby
dantesun has quit [Max SendQ exceeded]
Vert has quit [Read error: Connection reset by peer]
<havenn> eindoofus: Looks like ArchLinux actually keeps an up-to-date Ruby available via package installer. I guess that puts it ahead of the pack... I heard rumor Debian was going to update to 1.9.3, but if you're using RVM, rbenv, rbfu, or chruby to manage your Rubies it doesn't really matter I guess.
<havenn> <3 chruby + ruby-build
phantasm66 has joined #ruby
icole has joined #ruby
Tuxist has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
apeiros has quit [Remote host closed the connection]
ChampS666 has joined #ruby
wargasm has joined #ruby
apeiros_ has joined #ruby
<eindoofus> does anyone use fedora? I was thinking about giving that a try. I don't know what there reputation is though.
__class__ has joined #ruby
maka has joined #ruby
<havenn> eindoofus: For development or production?
Russell^^ has quit [Quit: Russell^^]
<havenn> eindoofus: I think as far as Redhat goes, Fedora is best distro for development and Scientific Linux is best for production.
CaptainJet has joined #ruby
Niamkik has joined #ruby
mklappstuhl has quit [Ping timeout: 255 seconds]
staafl has quit [Ping timeout: 244 seconds]
Steppen has joined #ruby
jds has quit [Remote host closed the connection]
<shevy> hehe
<shevy> nice that you mention scientific linux
<shevy> I've had installed Bio-Linux
<shevy> a while ago... but this thing is ubuntu based and ubuntu loves unity
arya__ has quit [Ping timeout: 244 seconds]
<shevy> unity constantly feels like getting-into-the-way
<shevy> in the old days, I would click on the start menu, usually on the bottom left, and look around for programs and applications to try out
<shevy> with this unity/dash thing however, I was too dumb to find this :\
Steppen has quit [Client Quit]
greenarrow has quit [Ping timeout: 256 seconds]
greenarrow has joined #ruby
arya__ has joined #ruby
headius has quit [Quit: headius]
<havenn> shevy: I've been meaning to check out Linux Mint 14, see what I think of Cinnamon.
Nisstyre-laptop has quit [Quit: Leaving]
kirun has quit [Ping timeout: 250 seconds]
yshh has joined #ruby
<shevy> linux mint is quite nice as a distribution
maka has quit [Ping timeout: 260 seconds]
<wallmani> yep
<wallmani> it's quite refreshing to use it
Nisstyre-laptop has joined #ruby
<shevy> it's sitting on distrowatch rank #1 right now even before ubuntu (and mageia, which is also ok) :)
icole has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Computer has gone to sleep.]
yshh has quit [Ping timeout: 246 seconds]
daniel_hinojosa has joined #ruby
daniel_hinojosa has quit [Client Quit]
kirun has joined #ruby
jphpsf has quit [Ping timeout: 244 seconds]
shadow_fox has joined #ruby
daniel_hinojosa has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
ebouchut has quit [Quit: ebouchut]
jphpsf has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
ryanlecompte has quit [Remote host closed the connection]
greenarrow has quit [Ping timeout: 255 seconds]
greenarrow has joined #ruby
hackerdude has joined #ruby
bradhe has quit [Remote host closed the connection]
Xeago has joined #ruby
codezombie has joined #ruby
mercwithamouth has joined #ruby
otters has joined #ruby
bradhe has joined #ruby
ebouchut has joined #ruby
schaerli_ has quit [Remote host closed the connection]
arya__ has quit [Ping timeout: 244 seconds]
wargasm1 has joined #ruby
<wallmani> dyreshark: :(
bradhe has quit [Ping timeout: 255 seconds]
zemanel has joined #ruby
<atno> morning
<dyreshark> haidar
arya__ has joined #ruby
wargasm has quit [Ping timeout: 260 seconds]
jgrevich_ has joined #ruby
<wallmani> hello jewels :)
F1skr has joined #ruby
Xeago_ has joined #ruby
jgrevich has quit [Ping timeout: 244 seconds]
jgrevich_ is now known as jgrevich
jds has joined #ruby
areil has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 244 seconds]
_bart has quit [Quit: _bart]
arya__ has quit [Ping timeout: 244 seconds]
Neomex has joined #ruby
Neomex has quit [Client Quit]
eindoofus has left #ruby ["Leaving"]
maetthew has quit [Quit: bye!]
vlad_starkov has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
hackerdude has quit [Remote host closed the connection]
arya__ has joined #ruby
dagnachew has quit [Quit: Leaving]
hatch has joined #ruby
schaerli has joined #ruby
nemesit has quit [Quit: Leaving...]
jds has quit [Ping timeout: 252 seconds]
adambeynon has joined #ruby
cam` has quit [Quit: Connection closed for inactivity]
shevy has quit [Ping timeout: 260 seconds]
jrajav has quit [Quit: I tend to be neutral about apples]
hatch has left #ruby [#ruby]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
cantonic has quit [Ping timeout: 250 seconds]
vlad_starkov has quit [Ping timeout: 260 seconds]
xcvd`` has joined #ruby
keymone_ has joined #ruby
keymone has quit [Ping timeout: 264 seconds]
keymone_ is now known as keymone
jphpsf has quit [Ping timeout: 244 seconds]
jslowe has quit [Ping timeout: 276 seconds]
shevy has joined #ruby
lolcathost has joined #ruby
lolcathost has quit [Changing host]
lolcathost has joined #ruby
u89 has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
applesarefruits has quit [Read error: Operation timed out]
blazes816 has joined #ruby
tomsthumb has quit [Quit: Leaving.]
applesarefruits has joined #ruby
schaerli has quit [Remote host closed the connection]
atmosx has joined #ruby
yeltzooo has quit [Remote host closed the connection]
staafl has joined #ruby
zemanel has quit [Quit: zemanel]
staafl has quit [Client Quit]
johnmilton has joined #ruby
yeltzooo has joined #ruby
zemanel has joined #ruby
ewag has quit [Ping timeout: 264 seconds]
Xeago_ has quit [Remote host closed the connection]
zemanel has quit [Client Quit]
u89 has joined #ruby
johnmilton has quit [Client Quit]
johnmilton has joined #ruby
replore_ has joined #ruby
cantonic has joined #ruby
kbeddingfield has joined #ruby
emmanuelux has quit [Ping timeout: 244 seconds]
c0rn has joined #ruby
seanwash has quit [Quit: Computer has gone to sleep.]
replore_ has quit [Remote host closed the connection]
yakko has joined #ruby
havenn has quit [Read error: Connection reset by peer]
ryanf has quit [Ping timeout: 276 seconds]
havenn has joined #ruby
bradhe has joined #ruby
BigO has joined #ruby
icole has joined #ruby
ToTo has quit [Quit: Leaving...]
alexwh has quit [Ping timeout: 252 seconds]
sailias has quit [Quit: Leaving.]
ryanf has joined #ruby
bradhe has quit [Remote host closed the connection]
Xeago has joined #ruby
alexwh has joined #ruby
<atmosx> hello
icole has quit [Ping timeout: 260 seconds]
reset has joined #ruby
ChampS666 has quit [Ping timeout: 252 seconds]
emmanuelux has joined #ruby
ryanlecompte has joined #ruby
answer_42 has quit [Remote host closed the connection]
<csmrfx> ack
cousine has joined #ruby
ryanlecompte has quit [Ping timeout: 252 seconds]
<hoelzro> well, speed-wise, anyway.
mercwithamouth has quit [Ping timeout: 276 seconds]
LucidDreamZzZ has quit [Remote host closed the connection]
applesarefruits has quit [Ping timeout: 255 seconds]
Nisstyre-laptop has quit [Ping timeout: 244 seconds]
<ddd> Does anyone know of any online courses or workshops using Ruby and its toolsets for intermediate to advanced TDD/BDD?
<csmrfx> ddd there are many
<csmrfx> well, video presentations anyway
tomsthumb has joined #ruby
<ddd> outside of rails. I'm looking more for learning the paradigm of both TDD and its brother BDD, just using Ruby rather than Java which I don't know.
adambeynon has quit [Quit: Computer has gone to sleep.]
<ddd> csmrfx: thats fine too
<workmad3> ddd: I don't know of any online courses/workshops for intermediate to advanced TDD/BDD full stop
<ddd> either an online course with realtime discussions or even a video course without is fine
LucidDreamZzZ has joined #ruby
<ddd> workmad3: damn. I'm working through those ebooks, but I'd like to interact with some humans, get a better understanding. My college course won't be covering testing and stuff so was looking for an augmentation
brian` has joined #ruby
<ddd> csmrfx: yeah I was looking through, but I don't really know names associated with that paradigm, ones that know what they're doing, that practice it daily, that actually teach it, so figured I'd ask in here
<csmrfx> ddd yeah, it helps if you know which toolset you want to use
u89 has quit [Remote host closed the connection]
<csmrfx> many test frameworks have excellent video prez
<ddd> csmrfx: i've been using rspec mainly
tomsthumb has quit [Client Quit]
gbchaosmaster has joined #ruby
Xeago has quit [Remote host closed the connection]
<ddd> but was hoping to learn more of the paradigm itself with hands on usage of rspec or minitest or some tool like that. i think in my head i'm more aiming at the paradigm than the toolset itself, if that makes sense for stress point
kbeddingfield has quit [Remote host closed the connection]
Beoran__ has joined #ruby
<ddd> its not a field i know well obviously, looking TO learn more, but not sure if i'm explaining what i'm looking for right
<csmrfx> lots and lots of this stuff about http://www.youtube.com/watch?v=8ZmawOCDeyo
<workmad3> ddd: do you have access to Practical OO Design?
<ddd> yes. I bought the ebook
<workmad3> ddd: the last chapter in that is pretty illuminating on the subject :)
<fabio> hello i put "rails server -p 3000" and i get
<fabio> No such file or directory - /usr/lib/ruby/vendor_ruby/rails
<workmad3> ddd: which I know is another book reference rather than interaction...
<ddd> csmrfx: workmad3 thanks for not dismissing out of hand
<fabio> after a list of creates
<fabio> what i am doing wrong?¿
answer_42 has joined #ruby
<csmrfx> ddd go see confreaks for tons and tons more
<ddd> workmad3: yeah I'll read it for sure, its the interaction i guess i'm looking for. like i would in class
<workmad3> ddd: other than that... local user group if you have one?
<pkircher> fabio .. no rails installed ?
<ddd> csmrfx: yeah been datamining that and railscasts (though i'm trying not to limit to rails specifics since i code more straight ruby than rails)
<csmrfx> there are of course video courses that cost money, too
Beoran_ has quit [Ping timeout: 252 seconds]
<fabio> pkircher, it tells me the rails command
<ddd> ok, to refine what it is i'm looking for. looking to learn what TDD and BDD is actually, how to implement the thought processes that uses, interact with other humans (be able to ask questions dumb or not) to gain a better understanding of that, and then learning how to use the current toolsets I use, better. if that makes any sense
<workmad3> ddd: you might also want to expand the scope to include java (and maybe some smalltalk)... a lot of the agile and TDD stuff grew in java over the last decade, but it is hard to sift out the good stuff from the dross (there is a lot of crappy java out there, because there's a lot of java out there)
<fabio> installed in ubuntu
<ddd> csmrfx: ok, i'll mine a bit deeper
<fabio> deb package
<fabio> im noob about ruby on rails
<fabio> only want to get an app running
cantonic has quit [Quit: cantonic]
<ddd> workmad3: yeah part of that i think will come from school. the degree uses C++ and Java
<ddd> i don't know java at the moment so i've been spending more time trying to dig through what something means in java than the actual paradigm hehe
<workmad3> ddd: I've not got a large amount of faith in java/C++/OO in general that gets taught in formal education (as I'm sure you've gathered in other convos :) )
<ddd> yeah
<havenn> fabio: The apt-get package is horribly broken. Conventional wisdom is build your own Ruby or compile one easily with RVM or ruby-build.
<workmad3> ddd: tends to focus very much on the wrong stuff
<ddd> i'm self taught in everything I know at the moment, i suppose I could teach myself java too, it just seems like a major side tangent just to come back to ruby land
<fabio> ok havenn
Vert has joined #ruby
<havenn> ddd: On the JVM I'd prefer Jruby then Scheme then... Closure? Anything but Java! :P
u89 has joined #ruby
<ddd> oh i have definite plans to learn the differences from MRI to jruby
mrkris has joined #ruby
<ddd> only reason I still use mri is because I use a lot of gems that are C extension gems. some carry over but not a lot
<havenn> I thought Matt Aimonetti's talk at Ruby conf was really interesting comparing Ruby to Go, Closure, and Scheme: http://www.confreaks.com/videos/1288-rubyconf2012-ruby-vs-the-world
<ddd> actually starting to think i should be learning java directly but still not sure. so many languages, etc
<havenn> Go is actually pretty cool, I like the idea of Channels.
daslicious has quit [Quit: daslicious]
<havenn> But we have iChannel in Ruby!!: https://github.com/robgleeson/ichannel
<csmrfx> fabio havenn IME debian brings rubies and gems. Those work fine from apt-get. If you want to mix-and-match apt-get:ted and gem:med gems, you need to have mad skillz. RVM worked fine for me.
<ddd> well, I'm really loving ruby itself as a language. I've a lot to learn on how to use it. learned a good portion of the language core (semantics/syntax) but there's still how to use blocks and procs etc for more advanced processing which is a experience thing. the more i spend with ruby the more advanced techniques I'm learning. I'm sort of loathe to potentially confuse myself with learning a 2nd language from scratch at the same time
<ddd> but it almost seems like i'll have to or at least will be especially once classes start.
<csmrfx> I think java will be gone in 10 years
<pkircher> nah
<pkircher> just in the medical sector like anything runs on java
<pkircher> erp systems are mostliky java as well .. just look at SAP
<ddd> however, I've seen and felt the value directly using tests to direct how I build what I build now. However, there's a great many holes in my knowledge and skills with the various testing apparatus. Like when to use what, how to properly use what (like mocking, etc)
<ddd> just looking to close some of them
Nisstyre-laptop has joined #ruby
slainer68 has quit [Remote host closed the connection]
eldariof has quit []
<csmrfx> can one learn two languages at once? watch ruby presentations in portuguese
<ddd> like i want to learn minitest, however, thats just a single testing framework. rspec is fairly similar i'm told. however, how high can you go with it (as in walking the stack. capybara for rails would be visit "/", whats the same in minitest, etc)
<ddd> csmrfx: hahah
jarred has joined #ruby
<pkircher> it dep on what you are testing for
<pkircher> rspec is powerfull
<pkircher> but it wont help at frontend tests at all
<pkircher> or javascript
<pkircher> behavior in general
<pkircher> thats just the code base
<workmad3> ddd: you don't need to learn java in-depth
<workmad3> ddd: but you should learn it well enough to read (IMO)
<pkircher> workmad .. as long as you got a propper understanding of OO ..
<pkircher> you should be able to read java
<csmrfx> just make some tests to see if critical parts have the proper parameters
<ddd> but i'm also not coding a lot in rails. I'm writing straight ruby that uses some of the gems that rails does simply because that was my original exposure to ruby and familiar. but I'm also wanting to swap out some of them like AR going byebye for sequel, etc. so there's no stack like in rails to write tests against.
<ddd> workmad3: yeah i'm definitely getting that feeling from my splintered walks through various ebooks and touted testing books etc
lamba has quit [Ping timeout: 252 seconds]
spike|spiegel has quit [Quit: WeeChat 0.3.9.2]
<ddd> i don't really *mind* learning a new language. it would only improve my skillsets knowing more than a couple languages, i just don't want to get sidetracked (and potentially stuck) while doing so
<workmad3> pkircher: I don't personally feel that java codifies 'proper' OO :P
<ddd> anyways, thanks for answering my questions and not outright dismissing them. i do apologize if my defining of what i was looking for was scatterbrained. it just reflects my unsureness of the who what when where why and how of TDD/BDD (other than general conpcetual understanding)
<workmad3> but then, I'm dubious about the term 'proper' OO anyway... there are many styles, definitions and approaches that all codify OO in various ways
<ddd> i'll look through those youtube links and confreaks a bit more
reset has quit [Quit: Leaving...]
<pkircher> well im fact java was like the first language which promoted OO
<workmad3> ddd: have you done 'TDD: By Example'
<ddd> workmad3: well, you know me. think you've a good understanding of where i'm standing transition wise.
<workmad3> pkircher: hardly
<ddd> workmad3: no
<ddd> got a link?
slainer68 has joined #ruby
ewag has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
<workmad3> pkircher: smalltalk was doing OO well before java was a glimmer in anyone's eye
<workmad3> ddd: it's a book again (I loves my books)
<pkircher> fair enough yep
<ddd> thats fine. if its a targeted book, that helps actually
slainer68 has quit [Remote host closed the connection]
<workmad3> ddd: it's still one of the most practical TDD books I've come across :)
<ddd> i got the everyday rails with rspec as well. is that similar to this one?
Whackatre_ has joined #ruby
Guest92676 has quit [Quit: Guest92676]
<ddd> who is the author and what publisher?
lamba has joined #ruby
<workmad3> Kent Beck is the author
spanx_ has joined #ruby
<workmad3> I think it's an addison-wesely
<workmad3> [sp]
<ddd> oh, crap! I think I actually have that one. came in a bunch of books someone got for me. (which I'm still working through)
<ddd> let me look in my lib
* workmad3 just had a thought... would the world be a better place if that was addison-weasly? :)
brandon_ has joined #ruby
jphpsf has joined #ruby
<ddd> yes i do
<ddd> 2002 correct?
mercwithamouth has joined #ruby
<workmad3> ddd: TDD by example is basically 2 examples that are basically Kent almost stream-of-consciouness doing TDD into written form
<workmad3> sounds about right
tekacs has quit [Ping timeout: 246 seconds]
Whackatre has quit [Ping timeout: 246 seconds]
NimeshNeema has quit [Ping timeout: 246 seconds]
spanx has quit [Ping timeout: 246 seconds]
spanx_ is now known as spanx
<ddd> gotcha.
<workmad3> first example is TDDing a particular need in a java app, the second is TDDing a TDD framework in python
NimeshNeema_ has joined #ruby
<ddd> oh nice. working code *and* tdd'ing a framework itself.
tekacs has joined #ruby
GeekOnCoffee has quit [Ping timeout: 246 seconds]
alienvenom has quit [Ping timeout: 246 seconds]
<workmad3> the second example is, IMO, really mind-blowing, because it's not only TDDing a TDD framework, it's TDDing using the framework that you're building...
brandon has quit [Ping timeout: 246 seconds]
brandon_ is now known as brandon
<ddd> haha yeah that'd be definite coolness factor :)
dross has quit [Ping timeout: 246 seconds]
GeekOnCoffee has joined #ruby
altivec has quit [Ping timeout: 246 seconds]
pdtpatrick has quit [Ping timeout: 246 seconds]
alienvenom has joined #ruby
<ddd> ok, going to dumpster dive what you guys gave me. thanks again. &
altivec has joined #ruby
dross has joined #ruby
pdtpatrick has joined #ruby
seanstickle has joined #ruby
tomsthumb has joined #ruby
sepp2k1 has joined #ruby
wallerdev has joined #ruby
arya__ has quit [Ping timeout: 244 seconds]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
sepp2k has quit [Ping timeout: 240 seconds]
wallerdev has quit [Client Quit]
wallerdev has joined #ruby
arya__ has joined #ruby
lowg has quit [Quit: This computer has gone to sleep]
workmad3 has quit [Ping timeout: 276 seconds]
havenn has quit [Ping timeout: 244 seconds]
chimkan has joined #ruby
x77686d has joined #ruby
gbchaosmaster has quit [Ping timeout: 240 seconds]
mneorr has joined #ruby
<shevy> hamster dive?
codeFiend has joined #ruby
lolcathost has quit [Quit: brb peepls!!1]
havenn has joined #ruby
lolcathost has joined #ruby
answer_42 has quit [Ping timeout: 276 seconds]
BigO has quit [Remote host closed the connection]
bradhe has joined #ruby
ewag has quit [Ping timeout: 256 seconds]
haxrbyte has joined #ruby
bradhe has quit [Ping timeout: 244 seconds]
nkts has quit []
<shevy> dumpster the hamster!
slainer68 has joined #ruby
workmad3 has joined #ruby
Dreamer3 has joined #ruby
h4mz1d has joined #ruby
nkts has joined #ruby
hackerdude has joined #ruby
replore has joined #ruby
<jarred> I want to install a Ruby gem from a Ruby script. Can I do this in Ruby, or do I need to go through bash/a separate shell in order to do this?
xsbeats_ is now known as xsbeats
<waxjar> you can execute commands from within ruby
<havenn> waxjar: Yes.
<havenn> waxjar: There are multiple ways depending on what you want to happen with output, etc.
replore has quit [Ping timeout: 255 seconds]
<waxjar> i know it's possible havenn, i was telling jarred :p
tommyvyo_ has joined #ruby
<havenn> waxjar: Oh, never mind me...! >.>
undersc0re97 has quit [Quit: Leaving]
slainer68 has quit [Ping timeout: 250 seconds]
<havenn> jarred: Using ls as an example: system('ls'); `ls`; IO.popen('ls'); exec('ls')
<workmad3> jarred: https://github.com/rubygems/rubygems/blob/master/bin/gem <-- you can avoid shelling out if you want
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<workmad3> jarred: but you don't have guarantees that doing that will continue to work into the future in the same way that shelling out to 'gem install' would
h4mz1d has quit [Ping timeout: 245 seconds]
fabio has quit [Quit: Saliendo]
<havenn> jarred: require 'rubygems/dependency_installer'; install_dir = File.writable?(Gem.dir) ? Gem.dir : Gem.user_dir; Gem::DependencyInstaller.new(:install_dir => install_dir).new.install 'gem-you-want-to-install-here'; Gem.refresh
lolmaus has joined #ruby
<shevy> jarred you can install a local .gem file via "gem install name_of_the_gem_here.gem"
<shevy> ah
h4mz1d has joined #ruby
<shevy> didn't read the full sentence :\
<havenn> jarred: Just as an aside, you can install a gem from within Pry: gem-install 'gem-name-here'
<workmad3> havenn: I think I'd prefer 'GemRunner.new.run "install", "gem-you-want-to-install"' personally
CaptainJet has quit [Ping timeout: 252 seconds]
<shevy> GemRunner? odd name
<havenn> workmad3: That would be much more sane... =P
<shevy> they should add Gem.install("bla-1.0.gem")
<waxjar> what do you need it for though jarred? i can't really think of a use case, except if you have a hatred towards rake/bundler?
mrkris has quit [Quit: 'MURICA!]
lowg has joined #ruby
<jarred> This makes sense. Thanks
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
<jarred> waxjar: I have a Vagrant VM setup, and I want vagrant-dns always set up
<shevy> waxjar perhaps if gem is not available
<waxjar> ah, makes sense
<jarred> so prior to loading the config file, I want it to install and setup vagrant-dns if it isn't already installed
<workmad3> jarred: I'd personally be ensuring that using other mechanisms tbh
<jarred> Yeah, I think a Gemfile could work
<jarred> but
<jarred> I would need an "after the gem is installed" callback
<jarred> because it needs to run an additional command
<waxjar> gems have that
<waxjar> i mean, it's possible to run a script after a gem is installed
<jarred> Does bundler have callbacks?
<jarred> I do dislike this current way of installing it -- it makes every command involving Vagrant take ~500ms longer
<workmad3> or you write an installation script to set up the environment for your app
<jarred> yeah
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
darkc0met has joined #ruby
<workmad3> and then put an error output in your app that says 'have you run <whatever> to set up the script?'
nyrb has quit [Remote host closed the connection]
nyrb has joined #ruby
<mneorr> hi, I have a problem with embedding RSpec into existing Rails app
<mneorr> it can't load files when you run `rspec` , /Users/mneorr/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- user (LoadError)
jalcine has joined #ruby
<mneorr> and Googling didn't solve my problem :)
linhareta has joined #ruby
<waxjar> sorry i was wrong, there only is a post_install_message, apparantly
<havenn> mneorr: Have you run?: bundle
linhareta has quit [Client Quit]
<mneorr> yep
<havenn> is rspec in the Gemfile?
<mneorr> and rails generate rspec:install
lowg has quit [Quit: This computer has gone to sleep]
linhareta has joined #ruby
linhareta has quit [Client Quit]
\13k has quit [Remote host closed the connection]
\13k has joined #ruby
<mneorr> group :development, :test do
<mneorr> gem 'rspec-rails', '~> 2.0'
<mneorr> end
CaptainJet has joined #ruby
<mneorr> the models were there already, and the test-unit folder structure. but that's empty, nobody wrote tests
<burgestrand> mneorr: what would "require 'user'" require?
<mneorr> burgestrand: app/models/user.rb
<burgestrand> mneorr: if you are using rails, by default your spec_helper probably requires the entirety of your app before that anyway
<burgestrand> mneorr: have you generated the spec_helper?
<burgestrand> mneorr: I believe it might be "rails g rspec:install" or something similar to that — I don’t know, I don’t generate it that much anymore :p
cousine has quit [Remote host closed the connection]
Steppen has joined #ruby
<mneorr> burgestrand: it seems like it is generated yeah,. wait, let me try to run it without a require statement
c0rn has quit [Quit: Computer has gone to sleep.]
<burgestrand> mneorr: spec/spec_helper.rb is not required by default from your tests (don’t ask me why)
<burgestrand> mneorr: you can either require it explicitly from your test
lowg has joined #ruby
<mneorr> burgestrand: thank you so much
<burgestrand> mneorr: personally I always create an ".rspec" file in the project root with this contents: http://pastie.org/5429149
<mneorr> burgestrand: this solved my problem
<burgestrand> mneorr: saves me from requiring the spec_helper in every test
<burgestrand> :)
<burgestrand> mneorr: you’re welcome
<mneorr> burgestrand: just require 'spec_helper'
codeFiend has quit [Quit: codeFiend]
jarred has quit [Ping timeout: 244 seconds]
<burgestrand> mneorr: yeah, I find it annoying to do that for every spec, all of them want the spec_helper anyway, might as well be automatic
<burgestrand> ;)
<mneorr> burgestrand: that's awesome
<mneorr> burgestrand: i've just copied the --require spec_helper , it works
tomsthumb has quit [Quit: Leaving.]
Bosma has joined #ruby
<mneorr> burgestrand: will have to check what the other flags do (except --color :P )
<burgestrand> mneorr: -fp is short for --format progress
<burgestrand> mneorr: progress means there is just a dot for each test
havenn_ has joined #ruby
iPhoneMRZ has joined #ruby
<burgestrand> (often don’t need the verbosity of the rspec test descriptions)
iPhoneMRZ has quit [Client Quit]
havenn has quit [Ping timeout: 264 seconds]
<mneorr> burgestrand: got it tnx
<mneorr> burgestrand: and the -Ispec? :)
lowg has quit [Client Quit]
iPhoneMRZ has joined #ruby
<burgestrand> mneorr: it adds spec/ to the load path, I’ve had issues with loading files from the spec/ directory in the past
undersc0re97 has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
workmad3 has quit [Ping timeout: 255 seconds]
bradhe has joined #ruby
iPhoneMRZ has quit [Client Quit]
<mneorr> burgestrand: great, you saved me some time ;) If you're somewhere in the valley you have a beer
<burgestrand> mneorr: hehe, thanks for the offer, but I’m in northern europe (sweden) ;)
havenn_ has quit [Remote host closed the connection]
havenn has joined #ruby
kirun_ has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
<burgestrand> mneorr: i'm off for a while, good luck in your endeavours
KindTwo has joined #ruby
w400z has joined #ruby
kirun has quit [Ping timeout: 260 seconds]
ewag has joined #ruby
<shevy> lalala
<arturaz> oh, the magical valley
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
havenn has quit [Ping timeout: 256 seconds]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
<seanstickle> Magical valley, eh?
tomku has quit [Quit: WeeChat 0.3.9]
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
lolcathost has joined #ruby
<reactormonk> wasn't that the silicon valley?
pcarrier has joined #ruby
pcarrier has quit [Excess Flood]
hackerdude has quit [Remote host closed the connection]
<arturaz> reactormonk, yes, it's still is
nemesit has joined #ruby
<arturaz> but it is regarded as a magical place
havenn has joined #ruby
pcarrier has joined #ruby
<arturaz> where startups flourish and investors give cash to anyone
<arturaz> and instead of exceptions people get rainbows
<arturaz> or so I've heard ;)
<havenn> minitest/pride is the closest I've seen to that vision
FredLe has quit [Quit: Leaving.]
<arturaz> newgrounds.com just told me my first name is invalid
<arturaz> :(
ewag has quit [Ping timeout: 260 seconds]
jphpsf has quit [Ping timeout: 240 seconds]
<shevy> arturaz what name did you use
iPhoneMRZ has joined #ruby
<arturaz> Artūras
xAndy is now known as xandy
<arturaz> my real name
<shevy> hey I cant read that
<shevy> art<<<ras
ltsstar has quit [Remote host closed the connection]
<shevy> call yourself "david" :)
<shevy> what character is that in the middle?
<shevy> the ū
xandy is now known as xAndy
<arturaz> like u
<arturaz> just longer
<arturaz> Artuuras, i guess
<arturaz> my english name is Arthur
<havenn> Artwras (double-u after all >.>)
<seanstickle> Not quite as cool as the name Aiwas
<seanstickle> But that's perhaps a bit more esoteric
generalissimo has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
<seanstickle> Aiwass, sorry
<seanstickle> Misspelling.
arya__ has quit [Ping timeout: 244 seconds]
<arturaz> Sounds latvish :)
yshh has joined #ruby
banseljaj is now known as imami|afk
<Somelauw> u with an overscore
<Somelauw> overline*
chimkan has quit [Quit: chimkan]
<havenn> ∞ = Float::INFINITY
<Somelauw> it would be cool if you could actually use unicode symbols in programming languages
<shevy> any of you guys doing R and ruby?
kbeddingfield has joined #ruby
<Somelauw> so you can actually use ≤ inc code
<shevy> I am wondering... perhaps all those statistics in R could be done in ruby...
tomku has joined #ruby
<shevy> Somelauw you can in ruby can't you? the Pi symbol can be used for Math::PI
Somelauw has quit [Remote host closed the connection]
<shevy> (if you assign it)
mityaz has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<havenn> shevy: Yeah, all valid.
<shevy> well he is gone...
<havenn> shevy: Unfortunately we don't have that flexibility with RubyGems :P
<arturaz> you can't in scala
<arturaz> its hell
<havenn> shevy: I tried to make a gem named ∞ and no-go.
<arturaz> unicode in proglangs is stupid :)
<shevy> I cant read any of that :(
Somelauw has joined #ruby
<shevy> yeah arturaz
<Somelauw> huh, what happened?
<havenn> TODO: Submit patch to RubyGems to allow extended gem names...
<shevy> I dont know of any programming language that has gone mainstream with unicode variables
<havenn> Some good gem-name realestate: £
<shevy> I mean, as one of their defining features
<havenn> shevy: Shoot, too late to propose Emoji be allowed as var names in 2.0.0. :P
<shevy> emoji?
<Somelauw> shevy: racket allows λ in code
<mneorr> burgestrand: I'm originally also from Europe :) thanks, have a good one
<Somelauw> and emacs changes lambda into λ automatically
<Somelauw> but only for displaying
<havenn>
<havenn> Somelauw: Ruby allows var names like ∞ or £
<havenn> Mmm, λ would be a good gem name.
<Somelauw> does irb have tab completion like R?
ichilton has quit [Remote host closed the connection]
<Somelauw> In python it can also be enabled by some trick
<arturaz> <arturaz> ! def ⊙▃⊙ = "I'M SCARED!!!"
<arturaz> <multibot_> $u2299$u2583$u2299: java.lang.String
<arturaz> <arturaz> ! ⊙▃⊙
<arturaz> <multibot_> java.lang.String = I'M SCARED!!!
<shevy> Somelauw you come from R?
<shevy> Somelauw yeah you can enable tab completion for method names and constants I think
<havenn> Somelauw: Pry does: http://pryrepl.org/
<havenn> Somelauw: Use Pry!
<Somelauw> I found: require 'irb/completion'
<Somelauw> shevy: I come from many languages
<Somelauw> ruby is the one I know the least of
Banistergalaxy has quit [Ping timeout: 244 seconds]
<shevy> Somelauw, in irb try this require 'irb/completion'
<shevy> ah yes
<shevy> you found it in the meantime
<shevy> :P
Banistergalaxy has joined #ruby
<shevy> cool
<shevy> I am working through some R tutorials right now
aharris6 has quit [Remote host closed the connection]
<Somelauw> shevy: can i automatically start it when starting irb?
<Somelauw> by putting it in some kind of .rubyrc?
<shevy> yes, irb reads the file irbrc, so just put the stuff you want available on startup into irbrc (~/.irbrc)
iPhoneMRZ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
shadow_fox has quit [Quit: Leaving.]
Michae___ has joined #ruby
<Somelauw> thanks, works great
dreinull has quit [Remote host closed the connection]
h4mz1d has quit [Ping timeout: 260 seconds]
kirun_ has quit [Quit: Client exiting]
slainer68 has joined #ruby
adamrb has joined #ruby
<adamrb> has anyone seen any issues with installing librex in 1.93?
<adamrb> I'm getting "invalid gem format" but other gems seem to install OK
<havenn> adamrb: No prob here with librex install 1.9.3.
<adamrb> hrm
<havenn> adamrb: Error?
<adamrb> this is on ruby on windows (I know) if that matters
<adamrb> "invalid gem format"
<adamrb> I'll try a -v one sec
<adamrb> gah
<adamrb> I deleted it from cache and tried again and it worked
seanwash has joined #ruby
slainer68 has quit [Ping timeout: 255 seconds]
perun_ has quit [Ping timeout: 255 seconds]
mikepack has joined #ruby
codecop has quit [Quit: Išeinu]
Neomex has joined #ruby
Neomex has quit [Client Quit]
mneorr has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
mneorr has joined #ruby
nivanson has joined #ruby
<atmosx> I have this "Alinof timer" program from macosx, just scared me to to death...
<atmosx> still, reminded me to get the laundry out of the washing machine heh
<atmosx> few
Steppen has quit [Remote host closed the connection]
arturaz has quit [Remote host closed the connection]
BoomCow has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
swiftsure has quit [Ping timeout: 260 seconds]
jarred has joined #ruby
jds_ has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
ehc_ has joined #ruby
dangerousdave has joined #ruby
perun_ has joined #ruby
ehc_ has quit [Client Quit]
ehc has joined #ruby
VegetableSpoon has joined #ruby
jds_ has quit [Remote host closed the connection]
jds_ has joined #ruby
nivanson has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
jackbrownhf has quit [Quit: Sto andando via]
yakko has quit [Read error: Connection reset by peer]
meskyanichi has joined #ruby
meskyanichi has quit [Client Quit]
seanwash has quit [Quit: Computer has gone to sleep.]
jds_ has quit [Read error: Operation timed out]
kbeddingfield has quit [Remote host closed the connection]
BoomCow has quit [Quit: Leaving]
masterkorp has joined #ruby
masterkorp has left #ruby ["WeeChat 0.3.2"]
kbeddingfield has joined #ruby
tenmilestereo has quit [Quit: Leaving]
Michae___ has quit [Remote host closed the connection]
hoelzro is now known as hoelzro|away
arya__ has joined #ruby
mahmoudimus has joined #ruby
lolmaus has quit []
noyb has joined #ruby
<Somelauw> After studying ruby for about 10 minutes, there seem to be a lot of double functions. Like it allows both map and collect. But also && and 'and' are both ways to check if 2 boolean conditions are true.
<havenn> Somelauw: '&&' differs from 'and' in precedence
<havenn> Somelauw: But yeah, a lot of methods have aliases.
<d-snp> Somelauw: did you learn python first? it's a difference between ruby and python
<d-snp> python strives to have a single good solution for everything
<havenn> ruby strives to have multiple better solutions for everything
<d-snp> lol no :P
<d-snp> ruby strives to not surprise you, and wants whatever you type to just work
<atmosx> isn't that what programming are about?
onibox has quit [Quit: leaving]
<atmosx> programming langs *
<Somelauw> d-snp: I learned python first, which has "There should be one and only one obvious way to do it" as one of its design goal :P
<d-snp> as I suspected ;)
alanp has joined #ruby
<Somelauw> I think I probably agree with python on this part.
<d-snp> atmosx: well, many programming languages do not have such goals
<havenn> d-snp: "I want to make Ruby users free. I want to give them the freedom to choose. People are different. People choose different criteria. But if there is a better way among many alternatives, I want to encourage that way by making it comfortable. So that's what I've tried to do." ~ Matz
<d-snp> both ruby and python aim to give the programmer a lot of comfort in learning the language this way
alanp_ has quit [Ping timeout: 246 seconds]
<d-snp> most other programming languages just try to enable features
nasso has quit [Ping timeout: 240 seconds]
Michael_ has joined #ruby
<d-snp> havenn: yes, in contrast python just selects the best way of doing it, and tries to eliminate the alternatives where possible
Virunga has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<d-snp> anyway Somelauw, the idea is that you decide for yourself wether you like && or and more, perhaps it even depends on the situation you're in
volte has quit [Read error: Connection reset by peer]
nasso has joined #ruby
<havenn> Ruby is comfy, free, and beautiful and Python is... a snake. I rest my case.
<d-snp> >_>
volte has joined #ruby
<Mon_Ouie> Rubies aren't quite free
<d-snp> many people would say it is totally weird and surprising to find that && and 'and' have slightly different semantics
cam` has joined #ruby
<d-snp> but this is the wrong way of thinking about them.. the semantics of && and 'and' are designed to mimic what you expect of them, not to be equal to eachother
applesarefruits has joined #ruby
<Mon_Ouie> When I'm lazy, I use 'and' instead of '&&' (or vice versa) to save parens
<Mon_Ouie> That's pretty much the only difference between them as far as I'm concerned
<havenn> You've got to learn precedence in any case... * is higher precedence than +, && higher than and - not that hard.
<havenn> Or use a ton of parens!
mneorr has quit [Remote host closed the connection]
<d-snp> I like to use parens in any case where precedences might screw me over.. and TDD :P
mneorr has joined #ruby
jenrzzz has joined #ruby
Slivka has joined #ruby
<havenn> I'm against hunting down words and killing them in English or Ruby. Intrepid and audacious both deserve to exist. I think the subtlety between them is pleasant (if slightly esoteric) just like && vs 'and'.
snearch has joined #ruby
<shevy> havenn haha funny that you mention it. I try to get better at english and sometimes read older english books, and they use so many words that are unknown to me... for instance the book "How to Win Friends & Influence People", that was written around... 1936 http://en.wikipedia.org/wiki/How_to_Win_Friends_and_Influence_People and the author has a really weird style to write
<seanstickle> shevy: try the 19th century, even better
icole has joined #ruby
<seanstickle> shevy: I love that style of writing
applesarefruits has quit [Read error: Operation timed out]
<seanstickle> I try to read old books of languages I am learning. Gets me a flavor of how the words that are in current use came to be.
aharris6 has joined #ruby
dagnachew has joined #ruby
<shevy> avidly adroit askance disbarment estuary edifice extricate gaiety gale
<shevy> giddiness gregarious gutsy hmm... I'd have to fetch the book, I wrote them down at the end
afgeneralist has quit [Ping timeout: 246 seconds]
<shevy> seanstickle haha... hmm, but which book to take? I'd like to learn something new when reading a book still, not just new words alone
<havenn> I was thinking about Age of Innocence, but 1920s lit has great words too!: http://www.gutenberg.org/files/541/541-h/541-h.htm
<seanstickle> shevy: General Grant's memoirs of the Civil War
<seanstickle> Splendid
<seanstickle> And strategically interesting
<shevy> ok
<seanstickle> Or old editions of the Tatler
<seanstickle> Which cover a lot of current events of the 18th century
BrianJ has quit [Quit: BrianJ]
<Somelauw> d-snp: I think that when using && and 'and', one should always use brackets. In that case both are exactly the same. By only supporting one style, it becomes easier to keep the code consistent when working with multiple programmers.
<shevy> hehe yeah... the book "how to win friends etc.." mentioned two letters from ... hmm who was the chief back then ... lincoln... this one http://showcase.netins.net/web/creative/lincoln/speeches/bixby.htm ... and especially that one here http://www.historyplace.com/lincoln/lett-6.htm
<shevy> it's cool... one last quote, then I stop:
<shevy> "Again, my dear general, I do not believe you appreciate the magnitude of the misfortune involved in Lee's escape. He was within your easy grasp, and to have closed upon him would, in connection with our other late successes, have ended the war. As it is, the war will be prolonged indefinitely. If you could not safely attack Lee last monday, how can you possibly do so South of the river, when you can take wi
<shevy> th you very few more than two thirds of the force you then had in hand? It would be unreasonable to expect, and I do not expect you can now effect much. Your golden opportunity is gone, and I am distressed immeasurably because of it."
<havenn> Somelauw: Many Ruby style guides just recommend solely using &&: https://github.com/styleguide/ruby
<shevy> whoa that was much :\
<shevy> sorry
<Somelauw> Is there by the way any blog in which van rossum is bashing ruby or Matsumoto is bashing python?
<shevy> Somelauw dont think so
<ryanf> haha no
<shevy> Somelauw matz usually just focuses on ruby alone
<shevy> and guido... does he ever give any interviews at all?
<havenn> Somelauw: That unless/else and private-sandwiched-on-next-method are really the only Github Styleguide things I take issue with.
<ryanf> there is an interesting thread about python gc that matz participated in
<ryanf> like 10 years ago or whatever
<shevy> Somelauw, this is my favourite matz-interview, if you have not read it, read it once, it really gives the reason why ruby is ruby (its philosophy!) http://www.artima.com/intv/ruby.html
<Somelauw> There is a blog in which guido is totally bashing scala.
<Somelauw> shevy: i'll read it
<shevy> I dont know scala, as far as I know it requires one to have java, and I am java free since many years
<shevy> I do have python 3.3.0 installed here though!
<shevy> but it seems, most of the python world is stuck on 2.7.x
<shevy> Yukihiro Matsumoto: "Language designers want to design the perfect language."
<shevy> hehe
<seanstickle> I'd say that is less true of Larry Wall
<seanstickle> If only because he has studied linguistics and knows that territory quite well.
<seanstickle> He is not trapped in the fallacy of the pre-babel language.
<shevy> hehehehe
<shevy> but perl is like a chaotic mess
<seanstickle> Like most real languages
<Somelauw> shevy: that is because unfortunately, a lot of libraries became backwards uncompatible in 3.x
<shevy> some are worse than others
<shevy> like PHP!!!
<havenn> Perl 6 really is quite nice.
<ninegrid> how does one go about modeling a discriminated union (or union type) in ruby?
<shevy> what is a union type?
<ninegrid> that would be a type with variants... as an example... type Shape = Square | Circle | Triangle
noyb has quit [Ping timeout: 260 seconds]
<Somelauw> havenn: does it still have context? Seriously, what is the goal of context besides being as confusing as possible?
<ninegrid> where square, et al are constructors of Shape
<ninegrid> they are used quite a bit in functional languages like haskell and ml
<havenn> Somelauw: Yeah, there still are contexts.
BrianJ has joined #ruby
<havenn> Here is a comparison of how close Ruby and Perl6 resemble each other and Python for contrast (I didn't write the Python >.>): https://gist.github.com/3928203
<shevy> ninegrid hmm still not quite sure
<ninegrid> shevy: more specifically, i'm looking for a way to represent a tagged union
<shevy> ninegrid it sounds as if you may have a base class Shape, then subclass that into Square, Circle, Triangle
<ninegrid> i suppose i could use subclasses, but here the type information is the important part, not the data it encapsulates
<shevy> tagged union... what is that hehe :D
<shevy> well
<seanstickle> havenn: I also think Perl 6 is quite nice
<shevy> you can enforce rules about all members in your class
<seanstickle> But quite different than Perl Classic
mikepack has quit [Remote host closed the connection]
<ninegrid> so like, say i wanted to model a cellular automata cell.. i could do: type Cell = A | B; and then instances of A or B are of type cell, but the type (A or B) itself is what carries the information about its state
<havenn> seanstickle: For sure! They really should have given it a new name...
<shevy> seanstickle, help me out here, how can he enforce typed unions in ruby?
pyx has joined #ruby
<seanstickle> shevy: wait, what, I missed that
<shevy> sorry ninegrid you totally lost me there
medik has quit [Quit: medik has no reason]
<shevy> ninegrid, why not just object.is_a? or object.respond_to? queries?
<ninegrid> shevy: http://en.wikipedia.org/wiki/Typed_union has more than i can type on irc
Jasko2 has joined #ruby
<ninegrid> shevy: i will try that, but being new to ruby i thought i'd ask around before blindly blazing a trail
BrianJ has quit [Client Quit]
Jasko has quit [Read error: Connection reset by peer]
<shevy> hmm I cant seem to find http://en.wikipedia.org/wiki/Typed_union
<seanstickle> ninegrid: will get you started, I think
blacktulip has quit [Remote host closed the connection]
<havenn> seanstickle: If they're trying to leapfrog Ruby, they shoulda named it Peridot: Birthstones %[Pe(a)rl Ruby Peridot Saphhire]
F1skr has quit [Quit: WeeChat 0.3.9.2]
<ninegrid> shevy: http://en.wikipedia.org/wiki/Tagged_union ... sorry
<seanstickle> havenn: Or, you know, SuperPerl
dangerousdave has quit [Quit: Leaving...]
<shevy> ack
Mon_Ouie has quit [Quit: WeeChat 0.3.9.1]
<ninegrid> shevy: as it stands, i will need to use subclasses and program logic to build an "untagged union"
<shevy> SuperPerl ...
<havenn> seanstickle: Or they coulda pulled a Rake (v0.9 to v10.0) and been Perl 9000!
segmond has joined #ruby
<havenn> In other news, Rake is now (semantically) stable version-wise. Finally! :P
<havenn> Not like anyone uses Rake in production or anything. >.>
kbeddingfield has quit [Remote host closed the connection]
<shevy> hehe
<shevy> that was so mean
<shevy> I got annoyed about the format in rake
<shevy> "rake failed!"
<shevy> or "rake aborted"
<shevy> setup.rb was always happy when I used it
xcvd`` has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<havenn> "rake is angry at you"
<shevy> hehe
<shevy> "rake wants to make babies with you"
havenn has quit [Remote host closed the connection]
<ninegrid> shevy: ffr i was able to find what im looking for here https://gist.github.com/871431
<d-snp> Somelauw: I can link you to a talk where van rossum says ruby and python are the same language, and that we should get along
Xeago has joined #ruby
<Somelauw> d-snp: ok
<shevy> YES
<shevy> I WANT TO READ THIS
<shevy> ninegrid, interesting
<shevy> "Algebraic Data types for Ruby"
Myk267 has left #ruby ["..."]
Somelauw has quit [Remote host closed the connection]
<d-snp> oh
<shevy> data Tree a = Empty | Leaf a | Node a (Tree a) (Tree a)
<ninegrid> adt's are a supertype of tagged union... as in adt encapsulates the notion of product types and sum types
<shevy> haskell totally scares me
<shevy> I have accepted my fate of never understanding monads
<seanstickle> shevy: link to paper?
<ninegrid> well when you gut out syntax what you're left with is more stuff you have to know to parse the program
<shevy> paper?
<seanstickle> shevy: Algebraic Data types for Ruby ?
<shevy> ah
<d-snp> you don't necessarily need to understand monads to program in haskell
<shevy> just in that github script
<d-snp> also, I don't think ADT's are a very good idea in ruby :P
<seanstickle> You don't need to understand method missing to write in Ruby either
<seanstickle> But it's a really good idea
<shevy> ok one thing I can definitely
<shevy> say
<ninegrid> shevy: just see that the Tree of "a's" is either Empty, a Leaf with an "a" in it, or it is a Node with an "a" in it and two more trees
<shevy> guido's english is better than matz's english :(
<seanstickle> shevy: ah, I was expecting a longish monograph
<d-snp> haha
emergion has joined #ruby
<shevy> seanstickle haha, the attention span of most people is small, so they need only small snippets of information
<seanstickle> shevy: not me -- Springer Verlag makes more money off of me than I care to tabulate
pkircher has quit [Quit: pkircher]
<d-snp> seanstickle: well I meant more that monad as a mathematical construct are a bit hard to grasp perhaps because it's so abstract, but it's real world applications are very simple and easy to understand
<d-snp> so even if you don't get monads, they are easy to use in haskell
<seanstickle> d-snp: I think they are fairly straightforward, but terribly explained by most programming texts.
<d-snp> and you don't have to create a monad yourself, you can just use existing ones by looking at code
<seanstickle> d-snp: you do need to run through the whole monoid stuff and so forth though
<seanstickle> I think Stepanov was right when he claims that programming is best treated as a branch of abstract algebra
joeycarmello has joined #ruby
<shevy> man
<d-snp> you can look for example at the IO monad and say it's just a linked list of lambda's, where every lambda is executed before the next, and its result is bound in the next
<ninegrid> i think that for a while there a lot of people were of the frame of mind that "i'm going to understand this monad thing, i know i'll write a blog about it" and then they regurgitate the three monad laws and copy identity and maybe monads and think that validates their understanding of the subject
<shevy> I think monads were created to keep the lowly people away from haskell
<d-snp> and if you say it like that, you lose all meaning of what a monad is, but you still get everything that io monad is
<shevy> there are three monad laws?
<seanstickle> ninegrid: I think you are very correct
Xeago has quit [Remote host closed the connection]
<adamrb> newb question
<adamrb> I have a gem that gives me a class
<seanstickle> shevy: a monad may not harm a human being, or allow a human being to come to harm
<seanstickle> shevy: etc
<d-snp> :D
<adamrb> is there a way to reference the objects/methods without prepending the class name?
* d-snp encapsulates some evil side effects in his monad :P
<adamrb> instead of saying classname::thing.new() just saying thing.new()?
<shevy> seanstickle lol
mercwithamouth has joined #ruby
Somelauw has joined #ruby
<shevy> that's either the robocop monad, or that iRobot monad
dagnachew has quit [Quit: Leaving]
havenn has joined #ruby
<Somelauw> sorry, I didn't get that
<seanstickle> robonad
<shevy> no wait... ilegend was the name of that movie or?
Somelauw has quit [Remote host closed the connection]
<shevy> d-snp, do you happen to know at when time he mentions ruby?
<d-snp> hmm
Somelauw has joined #ruby
Somelauw has quit [Changing host]
Somelauw has joined #ruby
<Somelauw> what happened?
snearch has quit [Quit: Verlassend]
<d-snp> let me do a binary search on the talk ;)
<d-snp> lol
<d-snp> I clicked randomly inthe vid and it was exactly before the ruby thing
<d-snp> 5:25 shevy :)
<seanstickle> Somelauw: there was a glitch in the matric
banisterfiend has joined #ruby
<shevy> cool
<d-snp> the binary search algorithm in my brain is O(1)
<shevy> his english is better than matz's, but matz is much funnier
<Somelauw> matric?
w400z has quit []
<d-snp> Somelauw: everytime if I paste you the talk you disconnect
Somelauw has quit [Remote host closed the connection]
<d-snp> loool
Somelauw has joined #ruby
jds_ has joined #ruby
<Somelauw> d-snp: weird
<Somelauw> I got the url
<d-snp> Somelauw: what client do you use? you seriously disconnect when I paste you the url..
<d-snp> ok
<Somelauw> don't paste again
<d-snp> haha
<shevy> well guido is right
joeycarmello has quit [Remote host closed the connection]
<shevy> I think the biggest similarity is that the scripting languages fill a very similar niche
swex has quit [Read error: Operation timed out]
joeycarmello has joined #ruby
<shevy> some better than the others
<shevy> hmm... and lua
<seanstickle> And APL?
<shevy> dont know APL, is that a scripting language?
<seanstickle> Sorta kinda
<d-snp> yes apl and ruby are indistuingishable :P
<seanstickle> Depends on how you define "scripting language"
<shevy> Somelauw at that video, starting at 05:00 guido starts to talk about other languages
<shevy> k let me find some APL code example
barzogh has left #ruby ["WeeChat 0.3.7"]