apeiros changed the topic of #ruby to: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org, other public logging is prohibited
Lingo has quit [Quit: (null)]
zachrab has quit [Ping timeout: 272 seconds]
GenghisKen has quit [Ping timeout: 250 seconds]
willharrison has joined #ruby
djbkd has quit [Remote host closed the connection]
<Radar> h00d: Show us an example please.
<h00d> "Dono da bola": 5,
<h00d> "Isgalamido": 18,
<h00d> "Zeh": 20
<Radar> h00d: sounds like you want a hash.
bricker has quit [Quit: leaving]
grindmodeon has quit [Quit: Leaving.]
FernandoBasso has quit [Quit: leaving]
<h00d> if "Dono da bola" killed Isgalamido then "Dono da bola": 6
_honning__ has quit [Ping timeout: 244 seconds]
<shevy> come on h00d
djbkd has joined #ruby
DefV has quit [Ping timeout: 276 seconds]
<shevy> there aren't so many data structures in ruby
<shevy> string, array, hash. that's the unholy trinity
DavidDudson has joined #ruby
DefV has joined #ruby
argoneus has quit [Ping timeout: 264 seconds]
Rollabun_ has quit [Remote host closed the connection]
nateberkopec has joined #ruby
AlphaAtom has quit [Ping timeout: 246 seconds]
argoneus has joined #ruby
Rollabunna has joined #ruby
pika_pika has joined #ruby
DavidDudson has quit [Client Quit]
jottr has joined #ruby
<zenspider> Coraline: hey. what do I need to check out to get equivalent flog scores? I tried canvas-lcm and it only looks like half
<h00d> yes I am aware, but there is so much information with examples on the internet. The information that I find are very broad
snockerton has quit [Quit: Leaving.]
thomas has quit [Quit: leaving]
MyGreenP1 has quit [Ping timeout: 252 seconds]
bricker has joined #ruby
<zenspider> h00d: then what are you asking?
thomas has joined #ruby
<shevy> h00d you should collect useful information into local files, then you will be less dependent on crappy info from the www; in your example, use a hash: hash = Hash.new; now populate it with the keys, set these keys to 0 or whatever other value you have; if you dont know how to add to a hash, here is one example: http://stackoverflow.com/questions/9571768/how-to-add-new-item-to-hash
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davedev24_ has quit []
starless has joined #ruby
<zenspider> hash = {} ... Hash.new w/o a value is pointless
speakingcode has joined #ruby
icebourg has quit []
DerisiveLogic has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
MyGreenP1 has joined #ruby
fabrice31 has joined #ruby
endash has joined #ruby
zubov has quit [Quit: Leaving]
GaryOak_ has quit [Remote host closed the connection]
mleung has quit [Quit: mleung]
<bricker> zenspider: I think it's about intent, and to me Hash.new is more clear than {}
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
fabrice31 has quit [Ping timeout: 248 seconds]
<h00d> ok, thanks
<h00d> I will study more about.
<shevy> \o/
<shevy> he'll be a good ruby hacker in no time
DavidDudson has joined #ruby
juanpaucar has quit [Remote host closed the connection]
RubyIsFullOfRCE has joined #ruby
juanpaucar has joined #ruby
zubov has joined #ruby
krisquigley has joined #ruby
zubov has quit [Client Quit]
ianseyer has joined #ruby
zubov has joined #ruby
<h00d> what?
DavidDudson has quit [Ping timeout: 248 seconds]
zubov has quit [Client Quit]
<h00d> shevy: the link you gave me is exactly what needed
DavidDudson has joined #ruby
<h00d> tks.
zubov has joined #ruby
<shevy> well, ruby has the "there is more than one way to do things"
Vile` has quit [Remote host closed the connection]
speakingcode has quit [Ping timeout: 265 seconds]
krisquigley has quit [Ping timeout: 246 seconds]
<shevy> so as a newcomer you have more than one thing to learn eventually
juanpaucar has quit [Ping timeout: 250 seconds]
MyGreenP1 has quit [Ping timeout: 248 seconds]
MXfive has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ismaelga has quit [Remote host closed the connection]
<h00d> really, but there is always an easier way to do.
Vile` has joined #ruby
speakingcode has joined #ruby
<shevy> very often
<shevy> the less code you can get away with is often for the better, unless it would be unreadable
<h00d> really
alvaro_o has quit [Quit: Ex-Chat]
Azure has joined #ruby
<shevy> it would make your code more efficient and often easier to change as well lateron
<shevy> you can think of methods as logical chunks
<shevy> open_door; steal :baweaver; close_door; run_away
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> h00d perhaps have a look at the activerecord pattern
MyGreenP1 has joined #ruby
* baweaver scratches head
bim has joined #ruby
<shevy> I just wanted to steal you!
<sevenseacat> sorry baweaver. bye!
MXfive has joined #ruby
<shevy> h00d, like here http://guides.rubyonrails.org/active_record_querying.html - just look at the examples
bim is now known as Guest45536
<shevy> belongs_to :client
gusrub has quit [Quit: Leaving]
<shevy> has_many :orders
x1337807x has joined #ruby
<baweaver> Well if any of you are keen on SF
<shevy> client = Client.find(10)
<shevy> is
<shevy> SELECT * FROM clients WHERE (clients.id = 10) LIMIT 1
<shevy> h00d so you see, which one is easier to memorize there?
iceyec_ has joined #ruby
iceyec has quit [Read error: Connection reset by peer]
iceyec_ is now known as iceyec
djbkd has quit [Remote host closed the connection]
ChoiKyuSang_ has joined #ruby
<baweaver> Admittedly I tend to cringe whenever I see something like ``val = {}`` because normally what follows should have been written in the form of map, reduce, or merge instead
djbkd has joined #ruby
mjuszczak has joined #ruby
MXfive has quit [Read error: Connection reset by peer]
zacts has quit [Remote host closed the connection]
wlanboy has quit [Ping timeout: 245 seconds]
<baweaver> or just straight putting the values in the hash.
zacts has joined #ruby
andrew-l` has joined #ruby
<h00d> active record
djbkd_ has quit [Read error: Connection reset by peer]
DEA7TH has quit [Ping timeout: 272 seconds]
zacts has quit [Read error: Connection reset by peer]
kblake has quit [Read error: Connection reset by peer]
MXfive has joined #ruby
sn0wb1rd has quit [Ping timeout: 245 seconds]
blenny has quit [Ping timeout: 245 seconds]
djbkd_ has joined #ruby
kblake has joined #ruby
<baweaver> Though I kinda wish there was a cleaner way to maybe add a value to a hash without breaking flow. hash[:a] = a if a # bugs me a bit
<sevenseacat> ive written that once or twice - usually when trying to avoid a convoluted inject
<sevenseacat> the syntax for inject is ugly
kq_away_ has quit [Ping timeout: 245 seconds]
<h00d> understand, quite interesting is another matter I want to study.
kq_away has joined #ruby
ReK2GnULinuX has joined #ruby
Guest45536 has quit [Ping timeout: 276 seconds]
oo_ has quit [Remote host closed the connection]
ChoiKyuSang has quit [Ping timeout: 245 seconds]
b1nd has quit [Ping timeout: 245 seconds]
<baweaver> I normally write it as reduce, as that's essentially what you're doing most of the time
<baweaver> reducing a collection into a single element given a function.
scottstamp has quit [Ping timeout: 245 seconds]
<postmodern> those using brightbox's ruby-ng ubuntu packages
x1337807x has quit [Ping timeout: 255 seconds]
<baweaver> or foldL, depends who's been using too much Haskell lately.
<postmodern> how do you keep the /usr/bin/ruby symlinks pointing to ruby2.0?
bricker has quit [Ping timeout: 240 seconds]
DerisiveLogic has quit [Ping timeout: 245 seconds]
rek2wilds has quit [Remote host closed the connection]
scottstamp has joined #ruby
<baweaver> . /usr/bin/env ruby
sn0wb1rd has joined #ruby
wlanboy has joined #ruby
<postmodern> even after setting them with ruby-switch --set ruby2.0, an apt-get upgrade caused the ruby1.9.1 package to reset them
<sevenseacat> update-alternatives ?
<shevy> sevenseacat admit it - you dislike .inject because of the most ancient fear of cats not wanting to see a vet with a huge nasty syringe
<postmodern> sevenseacat, not what I'm asking
blenny has joined #ruby
<sevenseacat> oh sorry.
jenrzzz has quit [Ping timeout: 264 seconds]
<postmodern> sevenseacat, how do I make it permanent
<shevy> a permanent symlink?
<postmodern> sevenseacat, ruby-switch is basically a shell script around update-alternatives
<sevenseacat> ah okay
andrew-l has quit [Ping timeout: 245 seconds]
b1nd has joined #ruby
<postmodern> shevy, yes, one that can survive an apt-get upgrade, where ruby1.9.1 gets upgraded and dpkg re-triggers an update-alternatives
oo_ has joined #ruby
DavidDudson has quit [Read error: Connection reset by peer]
mjuszczak has quit []
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
chintanparikh has quit [Ping timeout: 256 seconds]
RubyIsFullOfRCE has quit [Quit: leaving]
MXfive has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DavidDudson has joined #ruby
djbkd has quit [Remote host closed the connection]
<Coraline> zenspider: I'm not sure of the makeup and distribution of the OSS version
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
ReK2 has joined #ruby
keen__ has quit [Read error: Connection reset by peer]
grindmodeon has joined #ruby
grindmodeon has quit [Max SendQ exceeded]
DavidDudson has quit [Client Quit]
grindmodeon has joined #ruby
Soda has joined #ruby
DavidDudson has joined #ruby
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
keen__ has joined #ruby
<shevy> aha
mrmargol_ has joined #ruby
<shevy> postmodern not sure but I assume that perhaps you can add custom hooks to those upgrades
oo_ has quit [Ping timeout: 248 seconds]
casadei has quit [Remote host closed the connection]
zacts has joined #ruby
Lingo has joined #ruby
<postmodern> shevy, unfortunately i don't know enough about dpkg to do that
Guest54522 has joined #ruby
ebbflowgo has quit [Ping timeout: 244 seconds]
kblake has quit [Remote host closed the connection]
centrx has joined #ruby
<pietr0> postmodern: i'd file a bug on debian
Wmaddox has joined #ruby
Lingo has quit [Quit: (null)]
delianides has joined #ruby
Megtastique has joined #ruby
davispuh is now known as [
MatthewsFace has joined #ruby
[ is now known as Guest13585
pietr0 has quit [Quit: pietr0]
ianseyer has quit [Ping timeout: 264 seconds]
ebbflowgo has joined #ruby
Guest54522 has quit [Quit: This computer has gone to sleep]
baweaver has quit [Remote host closed the connection]
dblessing has joined #ruby
jeramy_s has joined #ruby
existensil has quit [Ping timeout: 255 seconds]
Guest13585 is now known as davispuh
zachrab has joined #ruby
failshell has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
Yzguy has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
robustus|Off has joined #ruby
robustus|Off is now known as robustus
jenrzzz has joined #ruby
Sawbones has joined #ruby
pika_pika has quit [Ping timeout: 245 seconds]
zachrab has quit [Ping timeout: 240 seconds]
amdbcg has joined #ruby
failshell has quit [Ping timeout: 245 seconds]
lessless has joined #ruby
icebourg has joined #ruby
pengin has quit [Remote host closed the connection]
Wmaddox has quit [Ping timeout: 246 seconds]
wallerdev has quit [Quit: wallerdev]
x77686d has quit [Quit: x77686d]
lidenskap has quit [Remote host closed the connection]
CaffeineShot has joined #ruby
atom3_ has joined #ruby
Igorshp has joined #ruby
swgillespie has joined #ruby
charliesome has quit [Quit: zzz]
moeabdol has joined #ruby
havox has quit [Ping timeout: 246 seconds]
DavidDudson has joined #ruby
charliesome has joined #ruby
atom3 has quit [Ping timeout: 276 seconds]
baweaver has joined #ruby
existensil has joined #ruby
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pengin has joined #ruby
jottr has quit [Read error: Connection reset by peer]
Igorshp has quit [Ping timeout: 264 seconds]
jottr has joined #ruby
starless has quit [Quit: Leaving]
pika_pika has joined #ruby
_honning__ has joined #ruby
oo_ has joined #ruby
charliesome has quit [Ping timeout: 256 seconds]
sohrab has joined #ruby
baweaver has quit [Remote host closed the connection]
iteratorP has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
teddyp1cker has joined #ruby
oo__ has joined #ruby
thumpba_ has quit [Ping timeout: 276 seconds]
casadei has joined #ruby
Akagi201 has joined #ruby
oo_ has quit [Ping timeout: 250 seconds]
grindmodeon has quit [Quit: Leaving.]
pika_pika has quit [Ping timeout: 245 seconds]
Sawbones has quit [Remote host closed the connection]
teddyp1cker has quit [Ping timeout: 246 seconds]
x1337807x has joined #ruby
pengin has quit [Remote host closed the connection]
Sawbones has joined #ruby
bruno- has joined #ruby
duncannz has joined #ruby
Megtastique has quit [Read error: Connection reset by peer]
bruno- has quit [Ping timeout: 264 seconds]
Megtastique has joined #ruby
DarthGandalf has quit [Ping timeout: 245 seconds]
CaffeineShot has quit [Quit: Leaving]
rhg135 has quit [Remote host closed the connection]
jeramy_s has joined #ruby
havenwood has joined #ruby
rodfersou has quit [Quit: leaving]
baweaver has joined #ruby
Renich has joined #ruby
ftj has joined #ruby
mrmargo__ has joined #ruby
mrmargol_ has quit [Read error: Connection reset by peer]
djbkd_ has quit [Remote host closed the connection]
djbkd has joined #ruby
Deele has quit [Ping timeout: 256 seconds]
apoplexy has quit [Quit: Check out the following topic specific channels: ##investments ~ ##accounting ~ ##internetmarketing :]]
RegulationD has joined #ruby
Wmaddox has joined #ruby
vivekananda has quit [Quit: Leaving]
DarthGandalf has joined #ruby
jottr_ has joined #ruby
thatslifeson_ has joined #ruby
x77686d has joined #ruby
iasoon has quit [Ping timeout: 245 seconds]
Wmaddox has quit [Client Quit]
x77686d has quit [Client Quit]
jottr has quit [Ping timeout: 245 seconds]
danzilio has quit [Quit: Baiii!]
baweaver has quit [Remote host closed the connection]
_djbkd has joined #ruby
atom3 has joined #ruby
sankaber has joined #ruby
djbkd has quit [Ping timeout: 255 seconds]
atom3_ has quit [Ping timeout: 276 seconds]
RegulationD has quit [Ping timeout: 248 seconds]
Conner_A has quit [Ping timeout: 245 seconds]
fedexo has joined #ruby
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weaksauce has quit [Ping timeout: 245 seconds]
gsd_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ebbflowgo has quit [Quit: ebbflowgo]
<dorei> Is active_support/inflector the easy way to go if I just want to pluralize strings but not in a naive way (eg. when adding a final 's' is not enough, like entity => entities)?
<sevenseacat> its certainly the way to go in a rails app, not sure about outside rails
iotouch has joined #ruby
<dorei> i'm using ruby off rails :) but I think inflector can be required anywhere
zubov has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 264 seconds]
weaksauce has joined #ruby
sevvie has joined #ruby
Sawbones has quit [Remote host closed the connection]
x77686d has joined #ruby
GeorgeThompson has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
QualityAddict has joined #ruby
kblake has joined #ruby
mrmargo__ has quit [Remote host closed the connection]
Sawbones has joined #ruby
lidenskap has joined #ruby
x77686d has quit [Ping timeout: 250 seconds]
pontiki has joined #ruby
<pontiki> hallo o/
mary5030 has joined #ruby
kblake has quit [Ping timeout: 276 seconds]
chintanparikh has joined #ruby
<chintanparikh> How would I use gets.chomp ignoring all data in ARGV?
<Radar> chintanparikh: !code
<Radar> chintanparikh: Please stop asking questions without code.
<chintanparikh> Line 29
<chintanparikh> I want that to ignore anything from the command line args
lordkryss has quit [Quit: Connection closed for inactivity]
delianides has quit [Remote host closed the connection]
grindmodeon has joined #ruby
psy_ has joined #ruby
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ruby
<pontiki> gets never reads the command line arguments
<pontiki> it reads from STDIN
fabrice31 has joined #ruby
<chintanparikh> Hm strange, I'll add my error to the gist
Sawbones has quit [Remote host closed the connection]
lidenskap has quit [Remote host closed the connection]
<chintanparikh> I can't figure out why it's trying to open a file called 5678
ebot1 has joined #ruby
kblake has joined #ruby
<pontiki> i don't know either. what's RTPSocket?
<chintanparikh> pontiki: I'll add it to the gist. But it was working fine when I hard coded the values in instead of passing them in from the command line
jeramy_s has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
pdoherty has quit [Quit: Leaving]
zachrab has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 1.1.1]
brixen has quit [Ping timeout: 264 seconds]
reinaldob has quit [Remote host closed the connection]
saturnflyer has joined #ruby
mistermocha has joined #ruby
gf3 has quit [Ping timeout: 245 seconds]
sindork_ has quit [Ping timeout: 245 seconds]
DanKnox has quit [Ping timeout: 245 seconds]
sweeper has quit [Ping timeout: 252 seconds]
reinaldob has joined #ruby
<chintanparikh> This is so strange, even when I comment out every other line, I still get that error
orionstein has quit [Ping timeout: 256 seconds]
aytch has quit [Ping timeout: 246 seconds]
ujjain has quit [Quit: Textual IRC Client: www.textualapp.com]
<centrx> How about if you comment out every line
SirFunk_ has quit [Ping timeout: 250 seconds]
Gnubie_ has quit [Ping timeout: 265 seconds]
philtr has quit [Ping timeout: 276 seconds]
<chintanparikh> centrx: No error
javawizard has quit [Ping timeout: 246 seconds]
xybre has quit [Ping timeout: 256 seconds]
<sevenseacat> so its somewhere in your code :D
seanmarcia has quit [Ping timeout: 255 seconds]
krisquigley has joined #ruby
Kovensky has quit [Ping timeout: 252 seconds]
juanpaucar has joined #ruby
<chintanparikh> sevenseacat: Yup, but now the file only contains command = gets.chomp
<chintanparikh> And I'm still getting the error, which makes no sense
<sevenseacat> "Returns (and assigns to $_) the next line from the list of files in ARGV (or $*), or from standard input if no files are present on the command line."
lidenskap has joined #ruby
<sevenseacat> so Kernel.gets *does* read from argv
zachrab has quit [Remote host closed the connection]
<chintanparikh> Yup that's what I thought
<chintanparikh> How would I stop that?
<pontiki> well that is interesting
<pontiki> use STDIN.gets instead, i guess
headius has left #ruby [#ruby]
<chintanparikh> Sweet, that solved that error
<chintanparikh> Now getting another
<chintanparikh> client.rb:10:in `parse': undefined method `connect' for nil:NilClass (NoMethodError) from client.rb:30:in `block in <main>' from client.rb:27:in `loop' from client.rb:27:in `<main>'
<chintanparikh> I'll add it to the gist
<pontiki> thanks, sevenseacat, i did not know Kernel.gets did that
<sevenseacat> neither did i
<chintanparikh> I'm getting that error after I type in connect (so command = "connect")
mary5030 has quit [Remote host closed the connection]
reinaldob has quit [Ping timeout: 248 seconds]
<sevenseacat> trying to work out how to get a link to the doc in dash
<pontiki> what have you tried to solve that so far, chintanparikh
krisquigley has quit [Ping timeout: 245 seconds]
juanpaucar has quit [Ping timeout: 256 seconds]
<chintanparikh> Nevermind, that was a stupid error
<sevenseacat> pontiki: he posted it here :D
ringarin has quit [Ping timeout: 246 seconds]
MyGreenP1 has quit [Ping timeout: 265 seconds]
oo_ has joined #ruby
Feyn has joined #ruby
davispuh has quit [Remote host closed the connection]
oo__ has quit [Ping timeout: 264 seconds]
jcp has joined #ruby
<pontiki> ;)
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
saturnflyer has quit []
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Akagi201 has quit [Remote host closed the connection]
mgberlin has joined #ruby
crdpink has quit [Ping timeout: 245 seconds]
crdpink2 has joined #ruby
Akagi201 has joined #ruby
<dorei> :D
<centrx> holycow
Akagi201 has quit [Remote host closed the connection]
grindmodeon has quit [Quit: Leaving.]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<dorei> and I've found about a funny operator sequence in C/C++ today :)
x77686d has joined #ruby
Akagi201 has joined #ruby
lorn has quit [Ping timeout: 246 seconds]
nettoweb has joined #ruby
tus has quit []
<sevenseacat> ??!??! lol
bim has joined #ruby
bim is now known as Guest63002
DavidDud_ has joined #ruby
<dorei> it certainly conveys the feeling that something went wrong :D
<weaksauce> that's pretty awesome
DavidDudson has quit [Ping timeout: 240 seconds]
lorn has joined #ruby
Guest63002 has quit [Ping timeout: 255 seconds]
<ebot1> .quit
DanKnox has joined #ruby
ebot1 has quit [Quit: Leaving.]
gsd has joined #ruby
Akagi201 has quit [Remote host closed the connection]
grindmodeon has joined #ruby
orionstein has joined #ruby
cntrx has joined #ruby
centrx has quit [Ping timeout: 276 seconds]
aytch has joined #ruby
MyGreenP1 has joined #ruby
Akagi201 has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
towski_ has quit [Remote host closed the connection]
swgillespie has joined #ruby
DuoSRX has quit [Quit: Connection closed for inactivity]
towski_ has joined #ruby
failshell has joined #ruby
jeramy_s has joined #ruby
Renich has quit [Quit: leaving]
endash has quit [Quit: endash]
ujihisa has joined #ruby
kblake has quit [Remote host closed the connection]
dfinninger has joined #ruby
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Yzguy has quit [Quit: I'm sleeping, go away.]
Kovensky has joined #ruby
swgillespie has quit [Client Quit]
towski_ has quit [Ping timeout: 264 seconds]
failshell has quit [Ping timeout: 245 seconds]
xybre has joined #ruby
swgillespie has joined #ruby
swgillespie has quit [Client Quit]
Gnubie_ has joined #ruby
cntrx has quit [Quit: Shutting down, Please wait...]
sindork has joined #ruby
chintanparikh has quit [Ping timeout: 256 seconds]
jeramy_s has quit [Quit: Peace out!]
SirFunk has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Akagi201 has quit [Remote host closed the connection]
grindmodeon has quit [Quit: Leaving.]
philtr has joined #ruby
sweeper has joined #ruby
grindmodeon has joined #ruby
Akagi201 has joined #ruby
A205B064 has quit [Ping timeout: 276 seconds]
deric_skibotn has quit [Ping timeout: 252 seconds]
brixen has joined #ruby
lidenskap has quit [Remote host closed the connection]
freerobby has joined #ruby
lidenskap has joined #ruby
jeromelanteri has joined #ruby
jeromelanteri_ has joined #ruby
swgillespie has joined #ruby
swgillespie has quit [Client Quit]
mitchellhenke has joined #ruby
zzing has joined #ruby
oo_ has quit [Ping timeout: 248 seconds]
oo__ has joined #ruby
jeromelanteri has quit [Ping timeout: 256 seconds]
pwnz0r has joined #ruby
<vulix> Something Im confused about as I learn more about Ruby - gems are not platform independent?
<sevenseacat> not the ones with native extensions.
<sevenseacat> the rest are.
ss__ has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
<vulix> Ok so if I write a gem that is solely contains code that should run natively in the mri, im platform independent
<sevenseacat> I think we have different definitions of the word 'native'
ramfjord has quit [Ping timeout: 252 seconds]
<eam> not all pure ruby gems are platform independent
icebourg has quit []
h00d has quit [Read error: Connection reset by peer]
<vulix> So I'm not sure if I have this right, let me know if it is - the problem with writing a rails app on windows and deploying on linux might be some of the gems, like the sqlite3 gem, have a windows-specific version and if I deploy on linux the app would be bundled with the win-specific version and it wouldnt go out and fetch the linux one?
hazelux has joined #ruby
bruno- has joined #ruby
lemur has joined #ruby
zachrab has joined #ruby
amdbcg has quit [Ping timeout: 245 seconds]
mary5030 has joined #ruby
<eam> vulix: you would re-bundle or re-gem install on linux
<eam> many developers do rails development on a different system/architecture than they deploy on
<sevenseacat> they shouldnt IMO, but anyway
multi_io has quit [Ping timeout: 245 seconds]
<eam> sevenseacat: eh why so judgey
<sevenseacat> because it leads to tricky little problems
Akagi201 has quit [Remote host closed the connection]
<sevenseacat> yes your code works beautifully on your OSX machine, with its case insensitive file system and other crap
<sevenseacat> deploy to linux... *many explosions*
Akagi201 has joined #ruby
braincrash has joined #ruby
braincrash is now known as braincras
<eam> sevenseacat: well I presume the ci/staging/integration and production environments will be the same architecture
<eam> but who cares where the editor is run?
<sevenseacat> sure they are, but now you're putting a lot more credence in the test suite than it probably deserves
teddyp1cker has joined #ruby
multi_io has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
hgl has quit [Max SendQ exceeded]
hgl has joined #ruby
zachrab has quit [Ping timeout: 252 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ss__ has joined #ruby
willharrison has joined #ruby
teddyp1cker has quit [Ping timeout: 255 seconds]
yfeldblum has quit [Remote host closed the connection]
nettoweb has joined #ruby
<sevenseacat> i'm a little cynical when it comes to these things - I've seen devs do things like install beta versions of software to get the functionality they want on their machines, and then gasp in shock when the code they wrote against the beta version doesnt work anywhere else
freerobby has quit [Quit: Leaving.]
<eam> well if it doesn't shake out in staging there's no reason to think it'll shake out on the dev laptop either
<c-c> KISS
<eam> but I don't know why I'm arguing this point since I do everything in linux
amdbcg has joined #ruby
freerobby has joined #ruby
<sevenseacat> i'd prefer to do everything in linux, but now i have a company-mandated macbook
<eam> not because I'm afraid of differences, more because OSX is just an absurdly poor environment
<eam> sevenseacat: me too
MyGreenP1 has quit [Ping timeout: 256 seconds]
<eam> but it runs plenty of VMs
aytch has quit [Ping timeout: 245 seconds]
RegulationD has joined #ruby
lidenskap has quit [Remote host closed the connection]
nettoweb has quit [Client Quit]
grindmodeon has quit [Quit: Leaving.]
ftj has quit [Quit: Textual IRC Client: www.textualapp.com]
horsecow_ has quit [Remote host closed the connection]
Conner__ has joined #ruby
aytch has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
Akagi201 has quit [Remote host closed the connection]
Megtastique has quit []
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iotouch has quit [Quit: This computer has gone to sleep]
lidenskap has joined #ruby
iotouch has joined #ruby
thatslifeson_ has quit [Ping timeout: 248 seconds]
duncannz has quit [Remote host closed the connection]
kofione has quit [Quit: Linkinus - http://linkinus.com]
lolmaus has joined #ruby
oo__ has quit [Ping timeout: 246 seconds]
havenwood has quit [Remote host closed the connection]
duncannz has joined #ruby
mistermocha has quit [Ping timeout: 255 seconds]
dorei has quit [Remote host closed the connection]
_honning__ has quit [Ping timeout: 265 seconds]
vim_shimm has joined #ruby
jenrzzz has joined #ruby
Megtastique has joined #ruby
seanmarcia has joined #ruby
arescorpio has quit [Excess Flood]
oo_ has joined #ruby
SirFunk has quit [Ping timeout: 245 seconds]
weemsledeux has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
duncannz has quit [Quit: Leaving]
duncannz has joined #ruby
ramfjord has joined #ruby
oo__ has joined #ruby
Akagi201 has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
bMalum has joined #ruby
Akagi201 has quit [Remote host closed the connection]
d10n-work has joined #ruby
sevvie has quit [Ping timeout: 240 seconds]
bMalum has quit [Client Quit]
sevvie has joined #ruby
iotouch has quit [Quit: This computer has gone to sleep]
SirFunk has joined #ruby
freerobby has quit [Quit: Leaving.]
fabrice31 has joined #ruby
endash has joined #ruby
dfinninger has quit [Remote host closed the connection]
Megtastique has quit []
charliesome has joined #ruby
Alina-malina has quit [Ping timeout: 272 seconds]
jcp has quit [Quit: No Ping reply in 180 seconds.]
fabrice31 has quit [Ping timeout: 272 seconds]
jcp has joined #ruby
icebourg has joined #ruby
gf3 has joined #ruby
mary5030 has quit [Remote host closed the connection]
pontiki has quit [Ping timeout: 265 seconds]
brixen has quit [Ping timeout: 245 seconds]
aphprentice_ has joined #ruby
lessless has quit [Ping timeout: 272 seconds]
juanpaucar has joined #ruby
krisquigley has joined #ruby
lidenbrock has joined #ruby
icebourg has quit [Ping timeout: 246 seconds]
<tubuliferous> I want to read a flat file into a string, then remove the header and all "\n" characters. What's a straightforward and fast way to do that?
Akagi201 has joined #ruby
<tubuliferous> What I'm doing right now is neither straightforward nor fast...
<tubuliferous> basically I'm reading line by line
WildBamboo-Josh has joined #ruby
lidenbrock has quit [Client Quit]
pwnz0r has quit [Remote host closed the connection]
Akagi201 has quit [Remote host closed the connection]
pwnz0r has joined #ruby
mistermocha has joined #ruby
pontiki has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Akagi201 has joined #ruby
krisquigley has quit [Ping timeout: 256 seconds]
juanpaucar has quit [Ping timeout: 264 seconds]
havox has joined #ruby
iotouch has joined #ruby
spider-mario has quit [Ping timeout: 256 seconds]
<existensil> tubuliferous: File.readlines("file_name_here")[1..-1].map(&:chomp).select(&:present?)
renier_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<existensil> the last bit removes blank lines
<existensil> take if off if you want them
Deele has joined #ruby
<tubuliferous> glorious!
<existensil> [1..-1] skips the first line
<tubuliferous> by the way...
<existensil> chomp strips \n
<existensil> and any other whitespace
<tubuliferous> that's fantastic
lemur has quit [Remote host closed the connection]
<existensil> (at the start or end of the string)
ianseyer has joined #ruby
<tubuliferous> so...I'm thinking of learning Python...
pwnz0r has quit [Ping timeout: 245 seconds]
<existensil> oh, wait... maybe that's not what chomp does
<existensil> but it works for this example :-P
<tubuliferous> hahaha
<tubuliferous> I thought it was only at the end
<tubuliferous> but yeah...are you a Python guy also?
spider-mario has joined #ruby
<tubuliferous> I'm just looking for an opinion...
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<existensil> ok, chomp is just newlines and carriage returns by default
<tubuliferous> gotchya...
<existensil> yes, I have done some python
<tubuliferous> what do you think?
<tubuliferous> is it worth it?
<existensil> not professionally, but a little GUI stuff and built a web spider in it
<tubuliferous> does Ruby have a future?
<existensil> I've been a professional ruby developer for years, so, yes I think it has a bright future
<tubuliferous> is it going to be relegated to Rails use forever?
<existensil> the community is so enthusiastic and active
jottr_ has quit [Ping timeout: 276 seconds]
<c-c> tubuliferous: yes, its always going to be on track
<existensil> no, definitely not. ruby is such a gorgeous language. far more expressive than python or almost anything else
<tubuliferous> Yeah...
<sevenseacat> why do people say ruby is just rails?
havox has quit [Ping timeout: 250 seconds]
<tubuliferous> I only know a little Ruby...
<existensil> well most of the ruby jobs are rails or require rails knowledge
<tubuliferous> but every time I look at Python it seems kinda stale
oo__ has quit [Ping timeout: 256 seconds]
<tubuliferous> Too bad the bioinformatics community isn't really onboard with Ruby =)
<tubuliferous> well whatever...Ruby rocks my face off
<c-c> I think such premises often lead to incorrect conclusions
sevvie has quit [Ping timeout: 244 seconds]
Morkel has joined #ruby
<tubuliferous> uh-oh...that code didn't work for me, existensil
plutonic has quit [Read error: Connection reset by peer]
<tubuliferous> "`select': undefined method `present?' for #<String:0x007fb1581d8330> (NoMethodError)"
<pipework> sevenseacat: that sounds like a stupid thing to say or a very existentialist stupid thing to say.
plutonic has joined #ruby
<c-c> People say silly things because they don't have all the data
<sevenseacat> pipework: yeah well your face.
philtr has quit [Ping timeout: 256 seconds]
sweeper has quit [Ping timeout: 265 seconds]
<c-c> and its easy to know, if you know enough to make informed conclusions
<pipework> <sevenseacat> why do people say ruby is just rails?
<pipework> That's what I was responding to. D:
<sevenseacat> because people are stupid.
* sevenseacat nods.
<pipework> But mah face?
<c-c> uh, its *not* easy to know
<sevenseacat> your face isnt stupid. its purty.
<pipework> D'aw. D:
<pipework> c-c: What isn't easy to know?
philtr has joined #ruby
oo_ has joined #ruby
<pipework> The only things I believe aren't easy to know are the things that you don't have the resources to acquire knowledge about.
<c-c> things like programming languages, their culture, lifecycle or future
<pipework> c-c: Egh, if ease directly correlates to ones ability to intuit about those things, I guess.
mistermocha has quit [Remote host closed the connection]
<existensil> tubuliferous: String#present? may not be in all versions of ruby
<tubuliferous> oh...
<pipework> Or if time was a constraint that informed whatever measure of ease you're using, I could see that.
<existensil> this version is more compatible
<pipework> tubuliferous: #present? came from ActiveSupport
sevvie has joined #ruby
<tubuliferous> ActiveSupport?
<tubuliferous> I'm just a beginner =)
<existensil> File.readlines(".gitignore")[1..-1].map(&:chomp).reject{|s| s.length == 0 }
<pipework>   tua gem.
<pipework> tubuliferous: A gem
<existensil> (I'm using my .gitignore file to play with"
<existensil> )
<tubuliferous> gotchya
<existensil> select{|s| s.length > 0 } would be the same thing
<existensil> and is basically what #present? does
<pipework> existensil: Try #reject(&:empty?)
bluOxigen has joined #ruby
<pipework> String.empty is pretty nice.
<pipework> Except the whole predicate method typo.... >.>
<tubuliferous> so wait... it looks like the output from that one-liner is an array...
Morkel has quit [Read error: Connection reset by peer]
<pipework> tubuliferous: Yup.
<pipework> It's an array of strings that came from each of the lines of the .gitignore
<existensil> ah, yes, #empty? is there
<tubuliferous> so would the fastest way of joining the elements into one array be: @arr.join("")
<pipework> tubuliferous: No arg needed for #join
<tubuliferous> yeah, it looks like that's fine...
<tubuliferous> oh
<tubuliferous> Cool
<pipework> If you want to join without anything, #join does that. However, you might want to make sure that's what you want.
Akagi201 has quit []
<tubuliferous> I have to stick with Ruby because of chaining =D
<existensil> looks like present was brought in by activesupport. didn't realize i was on a rails console.
<tubuliferous> gotchya
<pipework> Chaining isn't really one of the great reasons.
<tubuliferous> looks good
Morkel has joined #ruby
sweeper has joined #ruby
ChoiKyuSang_ has left #ruby ["Closing Window"]
<tubuliferous> Yeah, but it's my reason =D
ChoiKyuSang has joined #ruby
<pipework> >> %w|hello there buddy|.join
tcrypt has quit [Remote host closed the connection]
<ruboto> pipework # => "hellotherebuddy" (https://eval.in/314335)
<tubuliferous> so what are the great reasons?
<pipework> tubuliferous: That's like telling a grasshopper the greatest secrets to the universe.
gsd has joined #ruby
yfeldblum has joined #ruby
<c-c> syntax, features, culture?
endash has quit [Quit: endash]
<existensil> expressiveness. flexibility. and a second for culture.
<tubuliferous> cool
<tubuliferous> Hey, let's say I want to use a GUI framework for Ruby in OS X...
<tubuliferous> what do you think my best option is
* Nilium doesn't actually use Ruby except as a better alternative to shell scripting.
<existensil> chaining is cool. so are the functional aspects of ruby.
<tubuliferous> yeah, that's basically how I've been using it, Nilium
<Nilium> tubuliferous: Well, if you use RubyMotion, you just use Cocoa.
<existensil> I've been writing init scripts in ruby for a while now
<tubuliferous> Yeah...
<existensil> :-P
<existensil> it is a fabulous shell scripting language
<tubuliferous> wanted to avoid using RubyMotion
<c-c> I usually suggest jruby
<tubuliferous> ok
<existensil> #!/usr/bin/env ruby
<c-c> then theres many ways to gui
<Nilium> I was working on a gui gem (I literally have the gui gem name)
<tubuliferous> I wish wxRuby was still going
<pipework> Nilium: Sometimes I do.
<Nilium> That's been sidelined indefinitely for a while now.
<tubuliferous> indeed
<pipework> tubuliferous: Shoes if you want free and don't have issues with the JVM.
<Nilium> More for lack of effort, since it technically works now that input and window creation works.
<tubuliferous> I have issues with JVM...
<pipework> RubyMotion if you don't mind paying for what I've heard is good software.
<Nilium> Like I had buttons working.
<tubuliferous> but I guess I can just deal with it
<Nilium> It just wasn't native UI 'cause I built it in GL.
<existensil> tubuliferous: if you are doing specific OS X stuff and don't need it to run much place else, rubymotion is a fabulous option
<pipework> tubuliferous: I'm sure you'll eventually see the light.
<existensil> and extremely well supported
<Nilium> Seeing as I also wrote one of the OpenGL binding gems
<tubuliferous> yeah...
<existensil> but its commercial, so you have to pay a little bit
<pipework> And not completely free and open source!
<tubuliferous> I've been looking at that project for a while now...
<Nilium> RubyMotion is quite good, but I don't use it all that much despite having a license.
<tubuliferous> since it was MacRuby
<Nilium> Side-effect of all my day-to-day work now being backend server-side Go programming
<tubuliferous> but do you do app programming, Nilium?
brixen has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
<tubuliferous> ah...
<Nilium> I do everything that isn't regular web dev.
<pipework> You mean mobile app, or what kind?
<Nilium> So, game programming, graphics programming, phone apps, desktop apps, server-side crap that isn't just a fancy web server, etc.
<pipework> Like, application isn't exactly a great word to use in this context.
<pipework> Nilium: I'd argue the fanciness isn't all that great anyways.
<weaksauce> existensil I wouldn't go so far to say "extremely well supported" but it's quite nice
<Nilium> The fanciness is mostly boring from what I've seen since it's just different ways of displaying HTML and CSS.
casadei has quit [Remote host closed the connection]
<Nilium> I am rapidly approaching the point where I feel like I need to learn Erlang.
<existensil> compared to any other ruby GUI tools :-P
<weaksauce> fair :D
<Nilium> wxRuby is dead as a rock, so you can at least ignore that.
<pipework> I don't mind browsers, or HTTP, if the problem doesn't beg to not be over HTTP. I mean, websockets are nice, but the browser sandboxed environment is one I don't have interest in working on more than occasionally. I'd not want to work on one constantly if I felt like it was either a pile of shit or becoming that.
<weaksauce> Nilium that's probably the first time that sentence has been uttered about erlang
<pipework> weaksauce: definitely not
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki_ has joined #ruby
<pipework> Lots of times when you hear the phrase "embarassingly parallel", it's followed by utterances of "I should learn erlang" or "I know erlang, we should use that."
<Nilium> I basically end up writing stuff that needs to be heavily-distributed but communicating somehow, and Erlang's kind of up there for those jobs
<weaksauce> I kid pipework... but it's still fringe for most purposes like haskell or prolog
<pipework> Yeah, so most things have parallelism and concurrency, but you either need to select or create a mechanism for distribution of work.
<existensil> as someone who already knows go, you think it doesn't fill the same void really?
<pipework> existensil: It doesn't.
<Nilium> No. Go's good at single-process concurrency.
<existensil> I know its concurrency is supposed to be awesome
<pipework> I mean, it can with libraries and stuff to support all the features in erlang.
<pipework> They have channels, we have actors.
<existensil> i guess, yeah, I haven't heard anything about distributing workloads across many machines with go
<pipework> With either we can make the other though.
<Nilium> Communicating across processes is still a case of picking and choosing how you do it, be it messaging via ZeroMQ or using some sort of RPC or what have you
<pipework> weaksauce: I mean, it's not a popular language, but it's more prevalent in closed source systems than you might assume.
anaeem1_ has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
sindork has quit [Ping timeout: 264 seconds]
<pipework> I'd dare say a lot more than haskell is. Prolog probably is more prevalent as whale. I'm not personally sure on that one.
anaeem1 has joined #ruby
<pipework> However, the next new language I learn will be ocaml.
<pipework> Or rust.
gf3 has quit [Ping timeout: 246 seconds]
<Nilium> Erlang's thing, for me, is that the VM and programs can be distributed and communicate across a cluster and it's just built for that.
<weaksauce> the problems prolog solves it can solve well.
<existensil> Nilium, pipework ... so, is IPC mechanisms built into erlang? are they integrated into it's concurrency patterns?
<Nilium> Basically yes.
<pipework> existensil: Yes.
<pipework> Literally, a message pass.
<weaksauce> but It's not a great programming language
<existensil> jeez, maybe I should check out some erlang
<pipework> weaksauce: What isn't?
<existensil> ugh
<weaksauce> prolog
<Nilium> There's also Elixir, not sure if that's actually worth learning over Erlang.
<pipework> weaksauce: I don't know that I could agree if I'm being intellectually honest.
<Nilium> Same VM, so at least it's a single target.
<pipework> Nilium: Actually, there's *also* Elixir. Not just instead.
zzing has joined #ruby
<weaksauce> pipework with the full statement or just the last bit?
<pipework> Because Elixir emits more efficient bytecode than erlang does.
<Nilium> Interesting
<pipework> weaksauce: That prolog isn't a great programming language.
sindork has joined #ruby
<pipework> Nilium: Yeah, that's why I'm considering elixir.
<weaksauce> so the last bit
<pipework> But I know erlang.
<Nilium> At any rate, I just see Go and Erlang and so on as being different approaches to different problems.
bim has joined #ruby
<weaksauce> the full statement was the problems prolog solves it can solve well but It's not a great programming language
failshell has joined #ruby
<Nilium> If I want a single binary that only needs to know about itself, Go's pretty great.
bim is now known as Guest41804
<pipework> Yeah, you can make it entirely cross-platform and not even link any libraries dynamically, even the linux.so
<Nilium> There's a lot to be said for easy cross-compiling
<pipework> The tooling for that is great. IIRC, you can do the same with erlang with the exception of some dynamic library loading for, iirc, system call symbols.
<Nilium> It tends to get brushed over, but being able to build a binary for Linux on my Mac and scp it over to where it needs to be is pretty swell.
<pipework> But go is pretty cool. They ship with gofmt which is great.
<pipework> I disagree with some of it, but at least there's a single source of truth on how to format go.
x1337807x has joined #ruby
<Nilium> Yeah, it's not perfect, but consistency goes a long way.
<Nilium> It's definitely not the language for all problems, anyway. Kind of worrying that some people try to make it that.
<pipework> There's nothing I dislike about Go that's objective. There's just more that I like about erlang that I believe is objective.
<Nilium> I can believe that.
gf3 has joined #ruby
<pipework> Erlang is slow on a single-process perspective.
seanmarcia has quit [Excess Flood]
seanmarcia has joined #ruby
Guest41804 has quit [Ping timeout: 246 seconds]
<pipework> But if you have parallel work, the real time you save by using erlang can crunch hours of single-threaded embarrassingly parallel work can be enormous.
vim_shimm has quit [Ping timeout: 256 seconds]
<pipework> Especially if you've got more than one node.
failshell has quit [Ping timeout: 245 seconds]
<Nilium> That is why it interests me.
Spami has joined #ruby
Koolaids has joined #ruby
<Koolaids> Holy crap, I cant believe they finally announced Half-Life 3!!!!!!!!!!!! https://www.youtube.com/watch?v=dQw4w9WgXcQ
<pipework> It's really fun to marvel at the collective 'man hours' versus realtime.
<pipework> Koolaids: Some people's clients show previews, nice rick roll attempt.
<Nilium> I just don't click anything with multiple exclamation marks.
<Nilium> I wonder if I could just set up a fleet of 32 Raspberry Pi 2s and if that'd handle Erlang well.
<pipework> Nilium: You've probably missed out on boatloads of free penis enlargement offers.
<pipework> Nilium: I don't know if erlang has support for arm.
kyrylo has joined #ruby
<Nilium> It looks like it might, but I'm googling specifically for arm64, so it's a little iffy.
vim_shimm has joined #ruby
<Nilium> Granted I could just try building it on my Pi 2.
tubuliferous_ has joined #ruby
renier has joined #ruby
last_staff has joined #ruby
dudedudeman has quit [Ping timeout: 256 seconds]
<Nilium> The idea of getting a cluster of Pis going just seems neat to me since it'd be an interesting way to get a low-power cluster for various things.
<Nilium> Not sure what those things would be yet, so that's the hard part.
NoNMaDDeN has joined #ruby
dudedudeman has joined #ruby
hmsimha has joined #ruby
greenbagels has joined #ruby
zorak8 has joined #ruby
<pipework> Nilium: You could always implement your own BEAM
<pipework> On arm64.
NoNMaDDeN has quit [Ping timeout: 272 seconds]
<pipework> My jokes aren't funny.
yfeldblum has joined #ruby
last_staff has quit [Quit: last_staff]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
icebourg has joined #ruby
icebourg has quit [Max SendQ exceeded]
mgberlin has quit [Remote host closed the connection]
ianseyer has quit [Ping timeout: 256 seconds]
lidenskap has quit [Remote host closed the connection]
Alina-malina has joined #ruby
SpicyMagpie has joined #ruby
zachrab has joined #ruby
SpicyMagpie has quit [Read error: Connection reset by peer]
A205B064 has joined #ruby
fedexo has quit [Read error: Connection reset by peer]
braincrash has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
teddyp1cker has joined #ruby
zachrab has quit [Ping timeout: 264 seconds]
lidenskap has joined #ruby
lidenskap has quit [Remote host closed the connection]
lxsameer has joined #ruby
fedexo has joined #ruby
braincras has quit [Ping timeout: 250 seconds]
<Nilium> pipework: Also didn't help that I went off to shower.
<pipework> Nilium: No, I mean that they aren't funny ever.
<pipework> Not just that one.
<Nilium> That said, I already have a hobby virtual machine going.
<Nilium> So, uh, it might happen.
<Koolaids> is there any point to learning ruby
<pipework> Koolaids: is there any point?
<Nilium> You could come up with a point.
<Koolaids> what can ruby do that python cant
<Koolaids> python is the scripting language of the gods
<Nilium> You're not very good at this
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sevenseacat> trollololol?
<Koolaids> but seriously, i'm drawn to wanting to learn ruby simply because i like actual rubies. as in the gem.
<sevenseacat> your reasons are pretty irrelevant.
RegulationD has joined #ruby
<Nilium> Maybe your life's calling is robbing jewelry stores.
<Radar> !popcorn
<Koolaids> :-D
amdbcg has quit [Ping timeout: 245 seconds]
<Koolaids> well cmon, sell me on ruby
<sevenseacat> why?
<pipework> Koolaids: It's not something to be sold, only revered.
<Nilium> I'm gonna go play some Titan Souls
Lingo has joined #ruby
<Radar> Koolaids: I've been programming for 15 years and it's *still* my favourite language.
<Koolaids> Radar: I like your enthusiam!!!!!
<Koolaids> ok
<Radar> Koolaids: Do you have it installed?
<Koolaids> no
<Radar> Ok, go through Try Ruby first: http://tryruby.org/
<Radar> You'll find out why we like it :)
Channel6 has joined #ruby
tenseiten has quit [Read error: Connection reset by peer]
RegulationD has quit [Ping timeout: 250 seconds]
Lingo has quit [Client Quit]
<Radar> And I've been doing Ruby for about 10 years of that 15... and I just tried to define a method called "send" but caught myself before I could do any real damage.
seitensei has joined #ruby
<sevenseacat> hehe
ponga has joined #ruby
<pipework> But you can do that as long as you don't define __send__ too.
wwwbukolaycom has joined #ruby
<pipework> IIRC, the bare minimum is #object_id and #__send__ and a couple other __-ish methods
Spami has quit [Quit: This computer has gone to sleep]
<Koolaids> yeah ruby seems nice
<Koolaids> i dig it
<pipework> Koolaids: The big thing that python doesn't seem to ever want to do is have powerful lambdas.
<pipework> List comprehensions and other fun things with their weak lambdas seem to keep them happy enough.
Koolaids has quit [Remote host closed the connection]
<apeiros> >> BasicObject.instance_methods
<ruboto> apeiros # => [:==, :equal?, :!, :!=, :instance_eval, :instance_exec, :__send__, :__id__] (https://eval.in/314343)
<apeiros> I guess you could qualify that as the basic minimum. I still wish for an external introspection class, though.
* wwwbukolaycom hi
narcan has joined #ruby
werelivinginthef has joined #ruby
<pipework> apeiros: I don't think that's even the minimum. I think you can drop everything but __send__ and __id__ if #object_id is no longer the necessary method for that.
<apeiros> pipework: afaik ruby does not require any of those methods either
<apeiros> it'll just be hard to do a lot of stuff since most code assumes them to be present
lidenskap has joined #ruby
<pipework> apeiros: Yeah? I guess you'd just have to trade off the ability to send messages or play with objectspace, respectively.
<apeiros> I actually wonder how irb/pry do an inspect on a basicobject
<apeiros> given that it lacks #class
<apeiros> and missing #instance_variables certainly doesn't make it easier either
sinkensabe has joined #ruby
<apeiros> well, gotta commute, cya :)
<pipework> :D
<pipework> apeiros: Thanks for the extra info.
<pipework> I haven't needed a cleanroom-style object in quite a long time.
teddyp1cker has quit [Remote host closed the connection]
werelivinginthef has quit [Ping timeout: 255 seconds]
greenbagels has quit [Read error: Connection reset by peer]
SpicyMagpie has joined #ruby
tagrudev has joined #ruby
Filete has joined #ruby
grindmodeon has joined #ruby
SOLDIERz has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
colorados has quit [Ping timeout: 250 seconds]
eones has joined #ruby
colorados has joined #ruby
fabrice31 has joined #ruby
x1337807x has joined #ruby
grindmodeon has left #ruby [#ruby]
eones has quit [Quit: Leaving]
turtil-kun has joined #ruby
weemsledeux has quit [Quit: Textual IRC Client: www.textualapp.com]
SpicyMagpie has quit [Quit: Leaving]
fabrice31 has quit [Ping timeout: 255 seconds]
teddyp1cker has joined #ruby
mistermocha has joined #ruby
markholmes has joined #ruby
SOLDIERz has quit [Read error: Connection reset by peer]
Lingo has joined #ruby
rgb-one has joined #ruby
juanpaucar has joined #ruby
krisquigley has joined #ruby
pandaant has joined #ruby
krisquigley has quit [Ping timeout: 250 seconds]
juanpaucar has quit [Ping timeout: 264 seconds]
willywos has joined #ruby
jayeshsolanki has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
ponga has quit [Remote host closed the connection]
ponga has joined #ruby
icebourg has joined #ruby
ponga has quit [Remote host closed the connection]
ponga has joined #ruby
zorak8 has quit [Ping timeout: 264 seconds]
Lingo has quit [Quit: (null)]
RegulationD has joined #ruby
icebourg has quit [Ping timeout: 272 seconds]
zachrab has joined #ruby
riotjones has joined #ruby
teddyp1cker has joined #ruby
havenwood has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
astrobunny has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
wet88 has quit [Quit: Quiting the chat]
zachrab has quit [Ping timeout: 265 seconds]
dcarmich has joined #ruby
solars has joined #ruby
aganov has joined #ruby
hazelux has quit [Remote host closed the connection]
topolinux has joined #ruby
willywos has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x77686d has quit [Quit: x77686d]
balazs_ has quit [Ping timeout: 256 seconds]
arturaz has joined #ruby
Channel6 has quit [Quit: Leaving]
swgillespie has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
NoNMaDDeN has joined #ruby
pontiki has quit [Ping timeout: 250 seconds]
failshell has joined #ruby
x1337807x has joined #ruby
queequeg1 has quit [Ping timeout: 256 seconds]
queequeg1 has joined #ruby
shellfu_afk has quit [Ping timeout: 250 seconds]
joonty has joined #ruby
dseitz has quit [Read error: Connection reset by peer]
dseitz has joined #ruby
vire has joined #ruby
failshell has quit [Ping timeout: 245 seconds]
Zamyatin has joined #ruby
lidenskap has quit [Remote host closed the connection]
swgillespie has quit [Read error: Connection reset by peer]
NoNMaDDeN has quit [Ping timeout: 264 seconds]
<certainty> moin
sigurding has joined #ruby
roshanavand has joined #ruby
vire has quit [Ping timeout: 256 seconds]
<ponga> moin?
ponga has quit [Remote host closed the connection]
ponga has joined #ruby
<certainty> ponga: means morning
<certainty> or good morning
<certainty> well actuall moin as used in the north is short for moin moin which is like hi and not bound to a particular time of the day
eones has joined #ruby
bim has joined #ruby
oz has quit [Remote host closed the connection]
bim is now known as Guest74101
ineb has quit [Remote host closed the connection]
Guest74101 has quit [Ping timeout: 245 seconds]
hs366 has joined #ruby
eshiffob has joined #ruby
oz has joined #ruby
havenwood has quit [Ping timeout: 272 seconds]
fedexo has quit [Ping timeout: 245 seconds]
ponga has quit [Ping timeout: 264 seconds]
somnium has quit [Ping timeout: 265 seconds]
somnium has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
ndrei has quit [Ping timeout: 256 seconds]
Joufflu has quit [Read error: Connection reset by peer]
joonty has quit [Ping timeout: 246 seconds]
cefkamcau has quit [Ping timeout: 246 seconds]
bigkevmc_ is now known as bigkevmcd
ndrei has joined #ruby
vire has joined #ruby
mistermocha has quit [Remote host closed the connection]
bruno- has joined #ruby
gagrio has joined #ruby
sigurding has quit [Quit: sigurding]
allenn has joined #ruby
SOLDIERz has joined #ruby
havenwood has joined #ruby
fabrice31 has joined #ruby
bruno- has quit [Ping timeout: 245 seconds]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
pwnz0r has joined #ruby
lpiql has joined #ruby
lpiql has left #ruby [#ruby]
Mon_Ouie has joined #ruby
icebourg has joined #ruby
yfeldblum has quit [Remote host closed the connection]
HayesHimself has joined #ruby
icebourg has quit [Ping timeout: 245 seconds]
zachrab has joined #ruby
DerisiveLogic has joined #ruby
wwwbukolaycom has quit []
andikr has joined #ruby
gauke has joined #ruby
ss__ has quit [Ping timeout: 250 seconds]
sigurding has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
universa1 is now known as universal
universal is now known as universa1
eones has quit [Quit: Leaving]
roshanavand1 has joined #ruby
codecop has joined #ruby
roshanavand has quit [Ping timeout: 272 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
zachrab has quit [Ping timeout: 246 seconds]
eones has joined #ruby
ki0 has joined #ruby
oo__ has joined #ruby
hazelux has joined #ruby
oo_ has quit [Ping timeout: 250 seconds]
RTG` has quit [Ping timeout: 272 seconds]
plutonic has quit [Quit: plutonic]
Advocation has quit [Ping timeout: 250 seconds]
allenn has quit [Remote host closed the connection]
anrah has joined #ruby
<anrah> Hello folks!
_djbkd has quit [Remote host closed the connection]
Advocation has joined #ruby
vtunka has joined #ruby
<anrah> I would appreciate little help with nokogiri
xcesariox has joined #ruby
lidenskap has joined #ruby
DavidDud_ has quit [Quit: Goodbye all, and thankyou.]
RTG` has joined #ruby
ponga has joined #ruby
<anrah> I'm getting this far finding the correct values from XML-file: <field name="Duration" value="02:15:23:156"/>
pwnz0r has quit [Remote host closed the connection]
<anrah> with search like this: puts doc.at_xpath("//streamnode[@id=0]//info//field[@name='Duration']")
<anrah> I would like to have just the value
pwnz0r has joined #ruby
<ytti> anrah, #content
hazelux has quit [Ping timeout: 272 seconds]
blackmesa has joined #ruby
wallerdev has joined #ruby
<pagios> morning, howq cna i convert a BSON into string
livathinos has joined #ruby
lidenskap has quit [Ping timeout: 252 seconds]
livathinos is now known as livathinos|away
<anrah> ytti: text should do the came thing? but i get empty line
Hounddog has joined #ruby
edwinvdgraaf has quit [Ping timeout: 240 seconds]
pwnz0r has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
livathinos|away is now known as livathinos
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<ytti> anrah, what does p doc.at_xpath("//streamnode[@id=0]//info//field[@name='Duration']")
<ytti> output, exactly
<ytti> or just
<ytti> doc.at_xpath("//streamnode[@id=0]//info//field[@name='Duration']") in pry or so
<ytti> does #values output anything?
<anrah> Duration
<anrah> 02:15:23:156
<anrah> values return that
<anrah> puts doc.at_xpath("//streamnode[@id=0]//info//field[@name='Duration']").values
<ytti> then #values.last :)
<anrah> argh :) yes
<ytti> i don't understand why #content does not work
<anrah> me neither :)
<anrah> and I was trying to use .value instead of values :S
havenwood has quit [Remote host closed the connection]
<ytti> but i'm pretty clueless about nokogiri
<anrah> anyway, values.last works fine :)
<anrah> thanks a lot!
<ytti> np
NotanEvader has joined #ruby
solars has quit [Ping timeout: 240 seconds]
<NotanEvader> whats up my niggas
<NotanEvader> where sevenseacat at?
<NotanEvader> that bitch sexy af
<NotanEvader> i've seen pics yo
<sevenseacat> hello.
<NotanEvader> yo you fine girl
<NotanEvader> whats up
<NotanEvader> DAMN
<NotanEvader> i like the way you
NotanEvader was kicked from #ruby by sevenseacat [Your behavior is not conducive to the desired environment.]
mengu has joined #ruby
ta has joined #ruby
casadei has joined #ruby
stirfryad has joined #ruby
edwinvdgraaf has joined #ruby
anarang has joined #ruby
lobolars has joined #ruby
tvw has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
ki0 has quit [Remote host closed the connection]
User458764 has joined #ruby
hanmac has quit [Ping timeout: 265 seconds]
ki0 has joined #ruby
ki0 has quit [Remote host closed the connection]
ki0 has joined #ruby
Filete has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chridal has joined #ruby
casadei has quit [Ping timeout: 245 seconds]
ki0 has quit [Remote host closed the connection]
rhg135 has joined #ruby
moeabdol has quit [Ping timeout: 245 seconds]
ki0 has joined #ruby
antgel has joined #ruby
drizz has quit [Ping timeout: 264 seconds]
moeabdol has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
a5i has quit [Quit: Connection closed for inactivity]
<pagios> arn:aws:sns:us-east-1:006241701704:art
<pagios> sns.unsubscribe(subscription_arn: x["subscription_arn"].from_bson_string
<pagios> i get an error cant convert bson into string
blackmesa has quit [Ping timeout: 244 seconds]
krz has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
juanpaucar has joined #ruby
krisquigley has joined #ruby
chridal has quit [Ping timeout: 272 seconds]
charliesome has quit [Quit: zzz]
rgb-one has quit [Read error: Connection reset by peer]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x1337807x has joined #ruby
juanpaucar has quit [Ping timeout: 244 seconds]
krisquigley has quit [Ping timeout: 272 seconds]
solars has joined #ruby
<flughafen> morning everybody
x1337807x has quit [Client Quit]
markholmes has quit [Quit: So it goes.]
hanmac has joined #ruby
NoNMaDDeN has joined #ruby
wallerdev has quit [Quit: wallerdev]
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iqbalkhan has joined #ruby
A205B064 has quit [Ping timeout: 252 seconds]
NoNMaDDeN has quit [Ping timeout: 246 seconds]
Violentr has joined #ruby
DavidDudson has joined #ruby
SOLDIERz has joined #ruby
RegulationD has joined #ruby
NoNMaDDeN has joined #ruby
tvw has quit []
Soda has quit [Remote host closed the connection]
lidenskap has joined #ruby
mikecmpbll has joined #ruby
<pagios> anyone?
RegulationD has quit [Ping timeout: 276 seconds]
bricker has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
vtunka has quit [Quit: Leaving]
<sevenseacat> pagios: you havent posted your error
bradleyprice has quit [Remote host closed the connection]
<sevenseacat> no-one can help you
<pagios> ERROR TypeError: can't convert BSON::Document into String
<sevenseacat> gist the code and the full error with stack trace
_blizzy_ has quit [Ping timeout: 245 seconds]
icebourg has joined #ruby
tesuji has joined #ruby
hmsimha has quit [Ping timeout: 256 seconds]
Myrl-chan has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
last_staff has joined #ruby
sohrab has quit [Ping timeout: 256 seconds]
<sevenseacat> okay, theres the error
icebourg has quit [Ping timeout: 246 seconds]
<sevenseacat> now what code is causing it?
<pagios> sevenseacat: i updated ..
froots has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
ghr has joined #ruby
neanderslob has quit [Remote host closed the connection]
pontiki has joined #ruby
neanderslob_ has joined #ruby
neanderslob_ has quit [Read error: Connection reset by peer]
psmolen has quit [Ping timeout: 256 seconds]
michael_mbp has quit [Excess Flood]
neanderslob_ has joined #ruby
rdark has joined #ruby
fabrice31_ has joined #ruby
neanderslob_ has quit [Remote host closed the connection]
chthon has joined #ruby
neanderslob has joined #ruby
lolmaus has joined #ruby
xcesariox has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby
iamninja_ has quit [Read error: Connection reset by peer]
iamninja_ has joined #ruby
fabrice31 has quit [Ping timeout: 244 seconds]
michael_mbp has joined #ruby
ujihisa has quit [Ping timeout: 245 seconds]
pontiki has quit [Ping timeout: 276 seconds]
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stirfryad has quit [Remote host closed the connection]
failshell has joined #ruby
chridal has joined #ruby
<pagios> sevenseacat: should i consider outputing string instead of bson from mongodb?
kyrylo has quit [Remote host closed the connection]
<sevenseacat> pagios: i honestly dont know what youre doing or whats causing the error.
<sevenseacat> you havent given much to go on.
<pagios> i am getting info from mongodb and trigger aws
<pagios> the sns.unsubscribe takes a hash and a string, it is complaining since the value is in bson format
kyrylo has joined #ruby
AlphaAtom has joined #ruby
SOLDIERz has joined #ruby
<sevenseacat> i'll take your word for it, because the error message doesnt say that.
<pagios> line 77 mainly
<sevenseacat> but it sounds like you just need to cast the BSON document to a string.
failshell has quit [Ping timeout: 245 seconds]
<pagios> sevenseacat: how can i do that? trying .to_s no good
<sevenseacat> define 'no good'
<pagios> sns.unsubscribe(subscription_arn: x["subscription_arn"].to_s) -> ERROR TypeError: can't convert BSON::Document into String
<pagios> ^ sevenseacat
<sevenseacat> that doesnt make much sense, given a BSON::Document is a hash and hash has a to_s method
antgel has quit [Ping timeout: 256 seconds]
* workmad3 can't see the line number pagios thinks is at issue in the stack trace
<sevenseacat> yeah its not there.
<sevenseacat> neither is any reference to a line number with an error on it.
kith has quit [Ping timeout: 246 seconds]
<workmad3> pagios: that's the line you think is at issue, I got that
<workmad3> pagios: but that line isn't referenced in the stack trace of your error
<pagios> o
<workmad3> pagios: making me suspect that the error is somewhere completely different
elaptics_away is now known as elaptics
Zai00 has joined #ruby
antgel has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
krz has joined #ruby
dumdedum has joined #ruby
ParmesanCaesar has quit [Ping timeout: 264 seconds]
chridal has quit [Ping timeout: 265 seconds]
xcesariox has joined #ruby
<aawe> Would it be possible to create a NilClass initializer?
djbkd has joined #ruby
<aawe> or is NilClass just a behavoir class around a null pointer, without any capacity for storing instance variables?
gmas has quit [Ping timeout: 245 seconds]
bim has joined #ruby
weaksauce has quit [Read error: Connection reset by peer]
bim is now known as Guest96612
<workmad3> aawe: you can monkey-patch NilClass with methods that include ivar usage
<aawe> workmad3: I want to add "@_nil_caller = caller_locations(1,1)[0]" to the initializer to store where the nil value was created
kyrylo has quit [Read error: Connection reset by peer]
<workmad3> aawe: but you can't sensibly add an initialize constructor to NilClass... 'nil' is created a single time during Ruby's startup, it isn't recreated every time you access 'nil'
vulix has quit [Ping timeout: 246 seconds]
<aawe> that's a shame
<sevenseacat> nil is a singleton, isnt it
<sevenseacat> just like true and false
<workmad3> sevenseacat: I'd call nil, true and false globals personally... and NilClass, TrueClass and FalseClass are singleton classes :)
<sevenseacat> ah hah okay
<aawe> it would be great to get some info where a nil was "created" anyway
<aawe> instead of where it was attempted to be used as something else
lloyd is now known as Lloyd
yfeldblum has joined #ruby
<workmad3> aawe: except it isn't created apart from when ruby starts
thatslifeson_ has joined #ruby
<aawe> workmad3: that could be changed
Guest96612 has quit [Ping timeout: 244 seconds]
<workmad3> aawe: not without a significant change to the ruby runtime, both in code and in semantics of nil
<aawe> significant how? it's just a few if statements ;)
<aawe> I see your point but I think it would be feasible
<aawe> and it would be great to see where I got a nil instead of a null pointer exception
yfeldblu_ has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
<workmad3> aawe: the runtime short-circuits a lot of stuff around 'nil' because it's always a single instance that it can check very quickly and easily
Conner__ has quit [Ping timeout: 245 seconds]
<workmad3> aawe: so it would be significant because *all* of that optimization would need to be pulled out
bobbrez has joined #ruby
kyrylo has joined #ruby
ponga has quit [Remote host closed the connection]
ponga has joined #ruby
<workmad3> aawe: and semantically, you'd be altering the idea that there's only a single 'empty reference' value, and replacing it with the idea that every 'nil' is somehow special and newly created... and what value would you then use if you *couldn't* create a new 'nil' instance? such as in OOM situations...
yfeldblum has quit [Ping timeout: 245 seconds]
mlev has quit [Read error: Connection reset by peer]
DavidDudson has joined #ruby
ahmetkapikiran has joined #ruby
sevvie has quit [Ping timeout: 246 seconds]
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sevvie has joined #ruby
zachrab has joined #ruby
Violentr has quit [Ping timeout: 264 seconds]
Violentr has joined #ruby
ponga has quit [Ping timeout: 256 seconds]
ponga has joined #ruby
mengu has quit [Remote host closed the connection]
zachrab has quit [Ping timeout: 245 seconds]
icebourg has joined #ruby
elev has joined #ruby
<elev> someone here on?
elev is now known as anonym
<anonym> s
<apeiros> no, yes, maybe
<apeiros> just ask your question and you'll see ;-)
hazelux has joined #ruby
icebourg has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
astrobunny has quit [Remote host closed the connection]
PierreRambaud has quit [Remote host closed the connection]
ahmetkapikiran_ has joined #ruby
SOLDIERz has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
ahmetkapikiran has quit [Ping timeout: 272 seconds]
ahmetkapikiran_ is now known as ahmetkapikiran
colorisco has joined #ruby
robbyoconnor has joined #ruby
anonym has quit [Ping timeout: 264 seconds]
marr has joined #ruby
hazelux has quit [Ping timeout: 264 seconds]
lidenskap has quit [Remote host closed the connection]
mlev has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
Pupeno has quit [Quit: Leaving...]
oo__ has quit [Remote host closed the connection]
erts has joined #ruby
iamninja_ has quit [Ping timeout: 276 seconds]
DavidDudson has joined #ruby
<aawe> According to my client there are 898 users here
teddyp1cker has quit []
oo_ has joined #ruby
<Myrl-chan> aawe: lol
Igorshp has joined #ruby
oo_ has quit [Remote host closed the connection]
ujjain has joined #ruby
astrobunny has joined #ruby
Pupeno has joined #ruby
kyrylo has quit [Quit: Konversation terminated!]
polarking has joined #ruby
<pagios> x["topic_arn"] =~ /#{topic}/ means find if x[topic_arn] contains a topic string?
Cust0sL1men has joined #ruby
kyrylo has joined #ruby
tkuchiki_ has quit [Read error: Connection reset by peer]
ujjain has quit [Changing host]
ujjain has joined #ruby
tkuchiki has joined #ruby
<certainty> ruboto: tell me a joke
kyrylo has quit [Client Quit]
<aawe> certainty: this kills the bot
MXfive has joined #ruby
<aawe> pagios: yes
fabrice31_ has quit [Remote host closed the connection]
duncannz has quit [Ping timeout: 240 seconds]
<aawe> pagios: but x["topic_arn"].contains?(topic) would be better in this case
fabrice31 has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
nfk has joined #ruby
edwinvdgraaf has joined #ruby
RTG` has quit [Ping timeout: 272 seconds]
<aawe> also x["topic_arn"] =~ /#{topic}/ is "failsy" if it begins with the topic ("monkeys" =~ /mon/ => 0)
<pagios> awwaiid: if (x["endpoint"] == @subscriberARN && x["topic_arn"].contains?(topic)) then ... <-- the == is ok too ? or use .equal?
vulix has joined #ruby
tkuchiki has quit [Remote host closed the connection]
joonty has joined #ruby
colorisco has quit [Ping timeout: 245 seconds]
<aawe> wait it should be .include?
<vulix> anyone ever integrate ruby and apache solr?
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
<pagios> aawe: i want to compaure if the strings are equal and if topic var is contained in x["topic_arn"]
RTG` has joined #ruby
<pagios> if (x["endpoint"].eql?(@subscriberARN) && x["topic_arn"].contains?(topic)) then
juanpaucar has joined #ruby
krisquigley has joined #ruby
<aawe> pagios: it should be .include?
<pagios> not there yet, it is not matched even though i am sure the strings are equal
mengu has quit [Remote host closed the connection]
<pagios> .include instead of .contains you mean
tkuchiki has joined #ruby
<aawe> yes
<aawe> you rarely want to use .equals, use .eql or ==
codecop has quit [Remote host closed the connection]
edwinvdg_ has joined #ruby
<pagios> if (x["endpoint"] == @subscriberARN && x["topic_arn"].include?(topic)) then
<pagios> still it does not match
huddy has joined #ruby
joonty has quit [Read error: Connection reset by peer]
juanpaucar has quit [Ping timeout: 250 seconds]
colorisco has joined #ruby
quimrstorres has joined #ruby
krisquigley has quit [Ping timeout: 250 seconds]
psmolen has joined #ruby
edwinvdgraaf has quit [Ping timeout: 252 seconds]
quimrstorres has quit [Remote host closed the connection]
kyrylo has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
lordkryss has joined #ruby
iamninja_ has joined #ruby
quimrstorres has joined #ruby
nettoweb has joined #ruby
arup_r has joined #ruby
merqlove has joined #ruby
maasha has joined #ruby
<apeiros> aawe, pagios: topic could contain regex special characters. so .include?(topic) is not necessarily the same.
kyrylo has quit [Client Quit]
<arup_r> >> require 'socket'; Socket.gethostname
<ruboto> arup_r # => "ev1.eval.in" (https://eval.in/314399)
<apeiros> e.g. topic = "to+pic" would match "toooopic" too.
leafybasil has quit [Remote host closed the connection]
<maasha> case class mystery? -> https://gist.github.com/maasha/051dc361e3cc7aab646c why wat?
<arup_r> How can I get the IP ?
<arup_r> I need IP
<apeiros> arup_r: a plain socket doesn't have an ip
<apeiros> arup_r: do you mean TCPSocket?
joonty has joined #ruby
<arup_r> Ok..
<apeiros> maasha: `case expression when condition` is evaluated as condition === expression
<apeiros> maasha: and Class#=== is an alias for .is_a?, but you do String.is_a?(String), and that's false
<maasha> apeiros: yup, that I don't get.
drizz has joined #ruby
<apeiros> maasha: what part of it do you not get?
bim has joined #ruby
bim is now known as Guest16934
RegulationD has joined #ruby
colorisco has quit [Ping timeout: 264 seconds]
<maasha> Sting.class #=> Class
<maasha> *String
<maasha> but "foo".class # => String
serivich has joined #ruby
<maasha> Class != String
<apeiros> correct
<apeiros> but String.is_a?(Class), right?
AlphaAtom has quit [Ping timeout: 256 seconds]
kyrylo has joined #ruby
<apeiros> maasha: following the rule I gave you above, with `case "foo".class; when String.class`, what does ruby evaluate?
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<apeiros> show me how it is transformed to the === expression
colorisco has joined #ruby
<maasha> I would say String === Class
Violentr has quit [Ping timeout: 246 seconds]
<maasha> but that cant be right
astrobunny has quit [Remote host closed the connection]
fabrice31_ has joined #ruby
<apeiros> maasha: don't do any other transformation
<apeiros> i.e. don't yet transform the `"foo".class` and `String.class` expressions
<apeiros> (and you're right, it's not String === Class)
RegulationD has quit [Ping timeout: 252 seconds]
bricker has quit [Ping timeout: 264 seconds]
Guest16934 has quit [Ping timeout: 272 seconds]
<apeiros> maasha: you'll need to hurry up. I go for lunch in a minute…
<apeiros> 11:36 apeiros: maasha: `case expression when condition` is evaluated as condition === expression
<apeiros> take a close look at the order
<maasha> (x = "foo".class) && x.class == String.class
<apeiros> maasha: um, that has nothing to do with what I asked you?
fabrice31 has quit [Ping timeout: 272 seconds]
<apeiros> well, I'll go for lunch now. So I'll just show you the transformation. you really should study it:
<apeiros> `case expression when condition` is evaluated as condition === expression
jgoyon has joined #ruby
<apeiros> `case "foo".class; when String.class` is evaluated as String.class === "foo".class
<maasha> apeiros: yeah, I'll stare at it. happy lunch
<maasha> :o)
<apeiros> String.class === "foo".class resolves to Class === String
<apeiros> and that is equivalent to String.is_a?(Class) (i.e. a === b tests whether b is_a? a)
konsolebox has joined #ruby
<apeiros> order is relevant. (a === b) != (b === a)
konsolebox has quit [Max SendQ exceeded]
konsolebox has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
selu has joined #ruby
<maasha> apeiros: so but the approach is wrong? (damn SO). This responds "wrong" https://gist.github.com/maasha/051dc361e3cc7aab646c
reinaldob has joined #ruby
ArchRogem has joined #ruby
oo_ has quit [Remote host closed the connection]
wald0 has joined #ruby
oo_ has joined #ruby
chridal has joined #ruby
pontiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
ahmetkapikiran has joined #ruby
iamninja_ has quit [Ping timeout: 244 seconds]
joonty has quit [Read error: Connection reset by peer]
ahmetkapikiran has quit [Client Quit]
leafybasil has joined #ruby
pontiki has quit [Ping timeout: 264 seconds]
iamninja_ has joined #ruby
baash05 has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
icebourg has joined #ruby
failshell has joined #ruby
<maasha> apeiros: OK, I went with sawa's suggestion here: http://stackoverflow.com/questions/9537895/using-a-class-object-in-case-statement
iteratorP has quit [Remote host closed the connection]
leafybasil has quit [Remote host closed the connection]
lanemeyer has quit []
leafybasil has joined #ruby
wwwbukolaycom has joined #ruby
baash05 has quit [Quit: Leaving.]
icebourg has quit [Ping timeout: 264 seconds]
khebbie has joined #ruby
chridal has quit [Ping timeout: 265 seconds]
selu has quit [Read error: Connection reset by peer]
failshell has quit [Ping timeout: 245 seconds]
joonty has joined #ruby
ralku has joined #ruby
sigurding has quit [Quit: sigurding]
lidenskap has joined #ruby
maasha has quit [Ping timeout: 246 seconds]
chthon has quit [Ping timeout: 244 seconds]
fabrice31_ has quit [Remote host closed the connection]
iteratorP has joined #ruby
lanemeyer has joined #ruby
Myrl has joined #ruby
Myrl-chan has quit [Killed (kornbluth.freenode.net (Nickname regained by services))]
Myrl is now known as Myrl-chan
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DavidDudson has joined #ruby
lidenskap has quit [Ping timeout: 255 seconds]
chridal has joined #ruby
antgel has quit [Ping timeout: 252 seconds]
Guest92947 has joined #ruby
Guest92947 has quit [Excess Flood]
antgel has joined #ruby
Juanchito has joined #ruby
davedev24_ has joined #ruby
plutonic has joined #ruby
duncannz has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
bruno- has joined #ruby
mist__ is now known as mist
chthon has joined #ruby
tubuliferous_ has quit [Ping timeout: 276 seconds]
serivich has quit [Ping timeout: 272 seconds]
arup_r_ has joined #ruby
User458764 has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
arup_r has quit [Ping timeout: 245 seconds]
bruno- has quit [Ping timeout: 252 seconds]
arup_r_ has quit [Client Quit]
arup_r has joined #ruby
AlphaAtom has joined #ruby
PeopleLaugh has joined #ruby
<PeopleLaugh> apeiros: can you get a chick and get laid? seriously?
iteratorP has quit [Remote host closed the connection]
<wasamasa> ...
<PeopleLaugh> no he cant
<wasamasa> PeopleLaugh: your nick looks like you need the affirmation for your crappy trolling
<PeopleLaugh> whatever do you mean?
<wasamasa> it is a lie
<PeopleLaugh> one these days imma learn how to make an irc bot and program a vpn changer in
<PeopleLaugh> then leave it on a left alone computer and run that shit all day on freenode
<wasamasa> and chill the fuck out, just because you got banned for trolling with java doesn't mean you should keep pestering #ruby
<PeopleLaugh> how do you know i got banned from java?
<wasamasa> haven't you got anything better to do
<PeopleLaugh> also its quite flattering that i'm so famous
<certainty> x(
<PeopleLaugh> literally every coding channel knows who i am
<PeopleLaugh> and they cant keep me out
neanderslob has quit [Remote host closed the connection]
<PeopleLaugh> ##java can suck my dick
<PeopleLaugh> yall know how it is
<PeopleLaugh> where my niggas at
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<PeopleLaugh> niggers and queers
<wasamasa> yup, you haven't got anything better to do
<PeopleLaugh> NO i dont
arup_r_ has joined #ruby
<apeiros> !kick PeopleLaugh bye
<jhass> !ban PeopleLaugh boooring
PeopleLaugh was kicked from #ruby by ruboto [bye]
<canton7> hah
<canton7> teamwork!
mengu has joined #ruby
<jhass> join #node.js if you want more fun
arup_r has quit [Ping timeout: 272 seconds]
arup_r_ has quit [Client Quit]
pagios has quit [Remote host closed the connection]
decoponio has joined #ruby
wwwbukolaycom has quit []
ponga has quit [Remote host closed the connection]
ponga has joined #ruby
zachrab has joined #ruby
plutonic has quit [Quit: plutonic]
gfawcettpq has joined #ruby
ralku has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> ah, and ^5 jhass :D
ahmetkapikiran has joined #ruby
a5i has joined #ruby
chridal has quit [Ping timeout: 276 seconds]
mengu__ has joined #ruby
basiclaser has joined #ruby
ralku has joined #ruby
elfuego has quit [Quit: elfuego]
zachrab has quit [Ping timeout: 250 seconds]
bim has joined #ruby
mengu has quit [Ping timeout: 245 seconds]
DavidDudson has joined #ruby
bim is now known as Guest48650
ponga has quit [Ping timeout: 245 seconds]
hazelux has joined #ruby
iqbalkhan has quit [Remote host closed the connection]
ralku is now known as ralku[away]
jeromelanteri_ has quit [Ping timeout: 272 seconds]
kith has joined #ruby
iotouch has quit [Quit: This computer has gone to sleep]
hazelux has quit [Ping timeout: 256 seconds]
eighthbit has joined #ruby
tvw has joined #ruby
eighthbit has quit [Client Quit]
iteratorP has joined #ruby
serivich has joined #ruby
dahl has joined #ruby
Myrl-chan has quit [Ping timeout: 264 seconds]
Zai00 has quit [Quit: Zai00]
doodlehaus has joined #ruby
joonty has quit [Ping timeout: 248 seconds]
wwwbukolaycom has joined #ruby
icebourg has joined #ruby
AlphaAtom has quit [Read error: Connection reset by peer]
havox has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
mengu__ has quit [Ping timeout: 256 seconds]
AlphaAtom has joined #ruby
elfuego has joined #ruby
ralku[away] is now known as ralku
anaeem1 has quit [Read error: Connection reset by peer]
serivich has quit [Ping timeout: 244 seconds]
icebourg has quit [Ping timeout: 248 seconds]
User458764 has joined #ruby
<BLuEGoD> what's the best way to deal with my_array['a']['b']['c']['d'] undefined method [] when somewhere in the middle something does not exist? like my_array['a']['b'] is nil. This actually comes from a Yaml file so unable to initialize non known values. I just want to return an empty string back, but don't want to check every single thing for nil?
ponga has joined #ruby
<rom1504> you'll need to check
<rom1504> no magic
<apeiros> BLuEGoD: multiple options - a) reorganize your data so you use proper datastructures which remove this need, b) write a method with a signature like: deep_fetch(hash, *keys), c) check every single level manually
havox has quit [Ping timeout: 240 seconds]
<BLuEGoD> if my_array['a'] && my_array['b'] && ...... my_array['z'] => sucks
<apeiros> BLuEGoD: also array['a'] <-- is certainly not an array ;-)
jayeshsolanki has quit [Quit: bye!]
khebbie has quit [Ping timeout: 250 seconds]
<apeiros> (arrays are indexed, they don't have string keys)
<BLuEGoD> well a hash in this case
DEA7TH has joined #ruby
<BLuEGoD> sorry for that
<apeiros> np, luckily it was obvious enough this time
jeromelanteri_ has joined #ruby
AlphaAtom has quit [Read error: Connection reset by peer]
<BLuEGoD> groovy has something like a['b']?['c']?['d'] which may look a bit weird but certainly better than implement a method for this. I'm aware of .try, but looks horrible.
AlphaAtom has joined #ruby
<rom1504> who said anything about "if my_array['a'] && my_array['b'] && ...... my_array['z'] "
<rom1504> there are better ways to check
elfuego has quit [Quit: elfuego]
iotouch has joined #ruby
krisquigley has joined #ruby
juanpaucar has joined #ruby
solars has quit [Ping timeout: 256 seconds]
iotouch has quit [Client Quit]
iasoon has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<certainty> I agree array['a'] is certainly not an arry
<certainty> now you have certainty
juanpaucar has quit [Ping timeout: 240 seconds]
rodfersou has joined #ruby
_honning__ has joined #ruby
krisquigley has quit [Ping timeout: 245 seconds]
oo_ has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 1.0.1]
elev has joined #ruby
<elev> Can someone help me with variables?
<certainty> elev: sure. here you have one
<certainty> @
<certainty> damn
<elev> what is @?
<elev> means=
<certainty> it's a typo
<elev> I started ruby today
<elev> no idea where to start
pwattste has joined #ruby
elev has quit [Client Quit]
chthon has quit [Ping timeout: 244 seconds]
<certainty> elev: what are you struggling with?
bruno- has joined #ruby
pontiki has joined #ruby
postmodern has quit [Quit: Leaving]
arturmartins has joined #ruby
bmn has quit [Quit: obai]
pontiki has quit [Remote host closed the connection]
mwlang has joined #ruby
bmn has joined #ruby
Guest94978 has quit [Changing host]
Guest94978 has joined #ruby
Guest94978 is now known as daynaskully
bmn has quit [Client Quit]
bruno- has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
elfuego has joined #ruby
bmn has joined #ruby
moeabdol has quit [Ping timeout: 244 seconds]
SOLDIERz has joined #ruby
yfeldblu_ has quit [Ping timeout: 245 seconds]
oo_ has joined #ruby
Nimf has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
elfuego has quit [Quit: elfuego]
moeabdol has joined #ruby
bMalum has joined #ruby
sigurding has joined #ruby
mg^ has quit [Read error: Connection reset by peer]
chthon has joined #ruby
dumdedum has quit [Quit: foo]
polysics has joined #ruby
solars has joined #ruby
xmad-afk is now known as xmaddness
iteratorP has quit [Read error: Connection reset by peer]
iteratorP has joined #ruby
mg^ has joined #ruby
zenspider has quit [Ping timeout: 252 seconds]
giuseppesolinas has joined #ruby
ldnunes has joined #ruby
yeticry has quit [Ping timeout: 240 seconds]
doobi-sham_ has joined #ruby
lanemeyer has quit [Ping timeout: 245 seconds]
zenspider has joined #ruby
crdpink has joined #ruby
serivich has joined #ruby
crdpink2 has quit [Ping timeout: 245 seconds]
yeticry has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
doobi-sham has quit [Ping timeout: 245 seconds]
doodlehaus has quit [Remote host closed the connection]
merqlove has quit [Quit: Connection closed for inactivity]
nettoweb has joined #ruby
bMalum_ has joined #ruby
bMalum has quit [Ping timeout: 256 seconds]
bMalum_ is now known as bMalum
NinjaOps has joined #ruby
failshell has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
sgambino has joined #ruby
konsolebox has quit [Ping timeout: 246 seconds]
Alina-malina has quit [Ping timeout: 256 seconds]
<rom1504> start at the beginning
Alina-malina has joined #ruby
hazelux has joined #ruby
prawnsalad has joined #ruby
SerbianDouche has joined #ruby
SerbianDouche has left #ruby [#ruby]
d10n-work has joined #ruby
vt102 has joined #ruby
iasoon has quit [Quit: WeeChat 1.1.1]
iasoon has joined #ruby
failshell has quit [Ping timeout: 245 seconds]
ujjain has quit [Quit: Textual IRC Client: www.textualapp.com]
cefkamcau has joined #ruby
Caius has quit [Ping timeout: 276 seconds]
SerbianDouche has joined #ruby
quimrstorres has quit [Remote host closed the connection]
ujjain- has joined #ruby
eshiffob has quit [Ping timeout: 250 seconds]
bMalum has quit [Quit: bMalum]
senayar has joined #ruby
ujjain- has quit [Changing host]
ujjain- has joined #ruby
hazelux has quit [Ping timeout: 245 seconds]
bMalum has joined #ruby
ki0 has quit []
lidenskap has joined #ruby
_honning__ has quit [Remote host closed the connection]
mwlang has quit [Quit: mwlang]
Caius has joined #ruby
GeorgeThompson has joined #ruby
ki0 has joined #ruby
bMalum_ has joined #ruby
anaeem1 has joined #ruby
werelivinginthef has joined #ruby
icebourg has joined #ruby
bMalum has quit [Ping timeout: 256 seconds]
bMalum_ is now known as bMalum
lidenskap has quit [Ping timeout: 248 seconds]
ujjain- is now known as ujjain
konsolebox has joined #ruby
quimrstorres has joined #ruby
konsolebox has quit [Max SendQ exceeded]
werelivinginthef has quit [Ping timeout: 276 seconds]
konsolebox has joined #ruby
SerbianDouche has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
icebourg has quit [Ping timeout: 276 seconds]
AlphaAtom has quit [Ping timeout: 245 seconds]
hectortrope has joined #ruby
hectortrope is now known as noobQ
pika_pika has joined #ruby
<shevy> certainty you scared him away!
<certainty> shevy: yeah :(
krz has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doodlehaus has joined #ruby
lxsameer has quit [Quit: Leaving]
anaeem1 has quit [Ping timeout: 255 seconds]
PierreRambaud has joined #ruby
doodlehaus has quit [Remote host closed the connection]
ponga has quit [Remote host closed the connection]
ascarter has joined #ruby
ponga has joined #ruby
sgambino has quit [Remote host closed the connection]
mwlang has joined #ruby
brb3 has joined #ruby
jeromelanteri_ has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
AlphaAtom has joined #ruby
elev has joined #ruby
<elev> I use sublime text and I am done with an easy code. Do I have to write end?
Nimf has quit [Read error: Connection reset by peer]
<mwlang> given a Hash: h = {:a=>{:b=>{:c=>"hello"}}} is it possible to assign h[:a][:b] to a variable, say “v” such that I could do v[:c][:d] = “World” and get {:a=>{:b=>{:c=>"hello”, :d => “World”}}} for h?
mikecmpbll has quit [Ping timeout: 248 seconds]
<elev> yes mwlang
<rom1504> elev: yes write end, 9 times
<mwlang> I’m trying to recursively build a hash from a tree of nodes
<elev> I write end 9 times?
<rom1504> yeah
<elev> ?
<elev> why?
<rom1504> because it's better than 8 !
<elev> dude
<elev> give me a answear fucker
<jhass> elev: watch your language
<elev> ydo I have to write end?
<elev> sorry jhass
<elev> but he is kidding with me
<rom1504> elev: give me a question, I'll give you an answer
<elev> jhass are you on this channel 24/7?
<elev> rom1504 I write ruby in sublime etxt
<elev> aftwr a code is done do I have to write end?
bruno- has joined #ruby
arturmartins has quit [Read error: Connection reset by peer]
<jhass> rom1504: don't bother, its our troll
<elev> dude
arturmartins has joined #ruby
<elev> pls
<elev> do I have to write end?
<elev> or no?
<rom1504> try it
<jhass> yes, you have to
<elev> ok thanks
<elev> and after I write end, I can start another program?
<elev> like write another code?
<jhass> sure
<mwlang> does my question make sense?
<jhass> mwlang: yes and yes you can
Ove___ has quit [Ping timeout: 245 seconds]
juanpaucar has joined #ruby
juanpaucar has quit [Read error: Connection reset by peer]
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mwlang> oh, wait, just tried it again and it worked. Must’ve fubarred it first time around.
juanpaucar has joined #ruby
ponga has quit [Ping timeout: 245 seconds]
* mwlang *grumbles*
Zai00 has joined #ruby
<elev> jhass?
<elev> what happens when I write end
<elev> ?
ahmetkapikiran has joined #ruby
elev is now known as I
I is now known as IloveJhass
RegulationD has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
<IloveJhass> +1
<IloveJhass> :D
konsolebox has quit [Ping timeout: 246 seconds]
<IloveJhass> mwlang
<jhass> !kick IloveJhass you focus on me again, I get it
<IloveJhass> jhass and mwlang are online here 24/7
IloveJhass was kicked from #ruby by ruboto [you focus on me again, I get it]
Ruby4newbie has joined #ruby
<Ruby4newbie> hello guys
<kaspergrubbe> hi
GeorgeThompson has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ruby4newbie> can someone help me with an thing?
tus has joined #ruby
dfinninger has joined #ruby
<rom1504> maybe
<Ruby4newbie> When I start irssi my name is always Mathias123
<Ruby4newbie> and I change it with / nick and new name
<rom1504> /nick your_nick then /save
<jhass> whoops
Ruby4newbie was kicked from #ruby by jhass [Ruby4newbie]
Ove_ has joined #ruby
fryguy9 has joined #ruby
<wasamasa> lolwat
droidburgundy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
zachrab has joined #ruby
<Mon_Ouie> Wrong argument order? :p
<jhass> yeah sorry
Rapier- has joined #ruby
mikecmpbll has joined #ruby
<DefV> lol
<DefV> I'm glad my nick isn't game
<DefV> *justsaying*
<jhass> :P
<apeiros> lolwut? jhass!
<jhass> apeiros: it's our troll
fryguy9 has quit [Client Quit]
RegulationD has quit [Ping timeout: 240 seconds]
<apeiros> no, I mean… those… um… bans?
<DefV> we have a troll?
<jhass> yeah, I fucked up there, sorry :P
<jhass> let's see if he figures out what $r does
* wasamasa looks it up
<DefV> I'm too lazy for that
<DefV> what does $r do?
bhegel has joined #ruby
<jhass> match the realname
<wasamasa> ooh
<wasamasa> I didn't notice he kept it the same
zachrab has quit [Ping timeout: 246 seconds]
livathinos has quit [Ping timeout: 272 seconds]
vim_shimm has quit [Ping timeout: 272 seconds]
<DefV> I like
<DefV> I like me some trolling
* wasamasa eyes DefV suspiciously
dfinning_ has joined #ruby
chridal has joined #ruby
dfinninger has quit [Ping timeout: 245 seconds]
<DefV> I think it's funny
<wasamasa> well, it kind of was back when he was DeathCode and spoke about java
<wasamasa> but now it has become boring
RegulationD has joined #ruby
ss has joined #ruby
<jhass> DefV: you can have hours of fun, just message him next time, he likes to PM
<wasamasa> :|
ss is now known as Guest76015
<wasamasa> jhass: how much did you suffer in the PMs?
wolf4ood_ has joined #ruby
<jhass> I'm good with ignoring, I just kept him baited once
sigurding has quit [Quit: sigurding]
<wasamasa> I thought chanops aren't allowed to ignore :D
soxet has joined #ruby
<jhass> well, not that kind of ignore
<jhass> didn't figure out a pattern for it anyway
sgambino has joined #ruby
wolf4ood_ has quit [Read error: Connection reset by peer]
GeorgeThompson has joined #ruby
chridal has quit [Ping timeout: 265 seconds]
willharrison has joined #ruby
colorisco has quit [Ping timeout: 240 seconds]
sigurding has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Akagi201 has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
vtunka has joined #ruby
willharrison has quit [Client Quit]
bMalum has quit [Quit: bMalum]
giuseppesolinas has joined #ruby
brb3 has quit [Read error: Connection reset by peer]
brb3_ has joined #ruby
kobaltz has joined #ruby
Enki has quit [Ping timeout: 256 seconds]
ralku has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Megtastique has joined #ruby
hs366 has quit [Quit: Leaving]
failshell has joined #ruby
Guest48650 has quit [Remote host closed the connection]
bim has joined #ruby
Enki has joined #ruby
khebbie has joined #ruby
khebbie has quit [Remote host closed the connection]
bim is now known as Guest42184
khebbie has joined #ruby
sankaber has joined #ruby
hazelux has joined #ruby
ParmesanCaesar has joined #ruby
kobaltz has quit [Quit: Textual IRC Client: www.textualapp.com]
polysics has quit []
User458764 has joined #ruby
delianides has joined #ruby
failshell has quit [Ping timeout: 245 seconds]
hazelux has quit [Remote host closed the connection]
hazelux has joined #ruby
hazelux has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
dblessing has joined #ruby
colorisco has joined #ruby
ascarter has joined #ruby
lanemeyer has joined #ruby
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby
delianides has quit [Ping timeout: 256 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
roshanavand1 has quit [Read error: Connection reset by peer]
ascarter has quit [Max SendQ exceeded]
antgel has quit [Ping timeout: 244 seconds]
MXfive has quit [Quit: Textual IRC Client: www.textualapp.com]
ki0 has quit []
ascarter has joined #ruby
roshanavand has joined #ruby
brb3_ has quit [Ping timeout: 245 seconds]
werelivinginthef has joined #ruby
icebourg has joined #ruby
antgel has joined #ruby
senayar has quit [Remote host closed the connection]
bhegel has quit [Quit: bhegel]
krisquigley has joined #ruby
User458764 has joined #ruby
jerius has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
fmcgeough has joined #ruby
ndrei has quit [Ping timeout: 276 seconds]
Igorshp has quit [Remote host closed the connection]
werelivinginthef has quit [Ping timeout: 245 seconds]
Igorshp_ has joined #ruby
icebourg has quit [Ping timeout: 240 seconds]
kstuart_ has joined #ruby
oo_ has quit [Remote host closed the connection]
brb3 has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pandaant has quit [Remote host closed the connection]
krisquigley has quit [Ping timeout: 276 seconds]
wwwbukolaycom has quit [Ping timeout: 250 seconds]
kstuart has quit [Ping timeout: 256 seconds]
ponga has joined #ruby
failshell has joined #ruby
vtunka has quit [Quit: Leaving]
delianides has joined #ruby
enebo has joined #ruby
Aswebb_ has joined #ruby
lidenskap has joined #ruby
kotk_ has quit [Quit: Leaving...]
ismaelga has joined #ruby
MXfive has joined #ruby
fryguy9 has joined #ruby
failshel_ has joined #ruby
failshell has quit [Read error: Connection reset by peer]
<certainty> damn i missed the fun
quimrstorres has quit [Remote host closed the connection]
lidenskap has quit [Ping timeout: 256 seconds]
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
brb3 has quit [Read error: Connection reset by peer]
brb3 has joined #ruby
bMalum has joined #ruby
Guest42184 has quit [Read error: Connection reset by peer]
helpa has quit [Remote host closed the connection]
lavros has joined #ruby
ismael__ has joined #ruby
workmad3 has joined #ruby
tesuji has joined #ruby
Zai00 has joined #ruby
helpa has joined #ruby
krz has quit [Ping timeout: 244 seconds]
allcentury has joined #ruby
ismaelga has quit [Ping timeout: 272 seconds]
bhegel has joined #ruby
Industrial has joined #ruby
<Industrial> Hi. Are there books on how to implement things and/or patterns on how to make things more DRY that is not linked to one platform or language?
RegulationD has quit [Remote host closed the connection]
<Industrial> like besides assuming stuff is there ...
Trynemjoel has quit [Ping timeout: 272 seconds]
<Industrial> I don't really know how to create things so that I might evade boilerplate code :)
<Industrial> How to create systems that avoid you from writing boilerplat code. I guess :)
Trynemjoel has joined #ruby
<aawe> Industrial: I recommend watching the Destroy All Software screencasts
Guest76015 has quit [Ping timeout: 245 seconds]
elfuego has joined #ruby
hanmac1 has joined #ruby
ta has quit [Remote host closed the connection]
|bb| has joined #ruby
endash has joined #ruby
<|bb|> hello
fgo has joined #ruby
<|bb|> what are the best books for a rails beginner?
<hanmac1> |bb| #RubyOnRails
<|bb|> k
cocotton has joined #ruby
|bb| has quit [Client Quit]
mrmargolis has joined #ruby
quimrstorres has joined #ruby
konsolebox has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
bim has joined #ruby
bim is now known as Guest36004
zz_Outlastsheep is now known as Outlastsheep
Igorshp_ has quit [Remote host closed the connection]
Igorshp has joined #ruby
Feyn has quit [Quit: Leaving]
parduse has quit [Ping timeout: 264 seconds]
catcher has joined #ruby
<jhass> Industrial: Design patterns in Ruby is also good. Don't worry about which language the book uses, you can easily transfer such stuff to all languages you know well enough
balazs_ has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
adude has joined #ruby
mlev has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
cocotton has quit [Quit: Leaving...]
parduse has joined #ruby
rbennacer has joined #ruby
kobain has joined #ruby
<hanmac1> jhass: design patterns are nice, but some does use them just to have them which is wrong imo ... (and such patterns can be overused ... like Java with FactoryFactory classes ;P)
rbennacer has quit [Remote host closed the connection]
* certainty uses patterns for conversations
<certainty> rarely for code
freerobby has joined #ruby
ki0 has joined #ruby
horsecowdog has joined #ruby
horsecowdog has quit [Client Quit]
rbennacer has joined #ruby
ta has joined #ruby
<jhass> I totally agree, but I sometimes recognize them in my code and that helps me do the last step in some cases
<jhass> in any case I think learning them can help you think a bit more object oriented which helps in DRYing up your code usually
bMalum has quit [Quit: bMalum]
cocotton has joined #ruby
<hanmac1> jhass: »Described as "everything that's wrong with Java in a single class"« https://plus.google.com/+aerotwist/posts/1QhcnQizuPc
edwinvdg_ has joined #ruby
<jhass> hanmac1: I posted that one several times to this channel...
werelivinginthef has joined #ruby
droidburgundy has joined #ruby
<hanmac1> that only shows we are currently on the same wavelength, lets hope there are no interferences ;P
tesuji has quit [Ping timeout: 264 seconds]
RegulationD has joined #ruby
edwinvdgraaf has quit [Ping timeout: 250 seconds]
DerisiveLogic has quit [Ping timeout: 252 seconds]
iteratorP has quit [Remote host closed the connection]
lordkryss has quit [Quit: Connection closed for inactivity]
* adaedra tunes hanmac1 a few Mhz lower
slackbotgz has joined #ruby
ismael__ has quit [Remote host closed the connection]
cocotton has quit [Remote host closed the connection]
* hanmac1 now has a deeper voice - lets checkout if that change some other stats too ;P
cocotton has joined #ruby
sevenseacat has joined #ruby
polysics has joined #ruby
cocotton has quit [Remote host closed the connection]
<jhass> MHz, deeper voice
* jhass wonders if hanmac1 was quiet or is it now
dmmoody has joined #ruby
AlphaAtom has quit [Read error: Connection reset by peer]
AlphaAtom has joined #ruby
adude has quit []
edwinvdg_ has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
freerobby has quit [Quit: Leaving.]
mlev has joined #ruby
basiclaser has quit [Quit: Connection closed for inactivity]
freerobby has joined #ruby
evanjs has joined #ruby
sgambino has quit [Remote host closed the connection]
delianides has quit [Read error: Connection reset by peer]
hazelux has joined #ruby
delianides has joined #ruby
hazelux has quit [Remote host closed the connection]
hazelux has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
B1n4r10 has joined #ruby
catcher has quit [Quit: Leaving]
icebourg has joined #ruby
leafybas_ has joined #ruby
Guest36004 has quit [Remote host closed the connection]
bMalum has joined #ruby
icebourg has quit [Client Quit]
AlphaAtom has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
livathinos has joined #ruby
leafybasil has quit [Ping timeout: 276 seconds]
lolmaus has quit [Quit: Konversation terminated!]
mrmargolis has quit [Ping timeout: 240 seconds]
spyderman4g63 has quit [Remote host closed the connection]
dmmoody has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
havox has joined #ruby
anibara has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
mrmargolis has joined #ruby
thinkswan has joined #ruby
last_staff has quit [Quit: last_staff]
ndrei has joined #ruby
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
sgambino has joined #ruby
RegulationD has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
cocotton has joined #ruby
havox has quit [Ping timeout: 256 seconds]
edwinvdg_ has joined #ruby
JimmyNeutron has quit [Ping timeout: 256 seconds]
ponga has quit [Quit: Leaving...]
<ninjs> So I'm working on a project where I grab a bunch of claim files and spit them out to an excel file, one claim per line. Before I write them to the spreadsheet, I need to sort them by one of the values(date_range). I'm wondering if I could solve this by making a class 'Claim'? I'm not sure
Aswebb_ has joined #ruby
AlphaAtom has quit [Ping timeout: 245 seconds]
riotjones has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
vtunka has joined #ruby
timanema has joined #ruby
vt102 has quit [Remote host closed the connection]
<mikecmpbll> ninjs: probably a bit overkill. just sort whichever structure you're parsing the 'claim files' into.
JimmyNeutron has joined #ruby
<ninjs> Haha. I was told yesterday that my code was a mess and that I should make it more 'rubylike'
hiyosi has joined #ruby
Beoran has quit [Ping timeout: 255 seconds]
<ninjs> So I'm trying to first separate my giant method into a bunch of smaller ones, but the way I'm writing those files is looping through all of the files in a directory, and doing file.each that writes each grabbed value to a row that gets written to an excel file
vt102 has joined #ruby
zachrab has joined #ruby
Rollabunna has quit [Ping timeout: 250 seconds]
ujihisa has joined #ruby
ismaelga has joined #ruby
mitchellhenke has joined #ruby
polarking has quit [Quit: polarking]
roshanavand has quit [Remote host closed the connection]
polarking has joined #ruby
turtil-kun has quit [Ping timeout: 256 seconds]
dfinning_ has quit [Remote host closed the connection]
claw__ has joined #ruby
claw_ has quit [Ping timeout: 265 seconds]
zachrab has quit [Ping timeout: 256 seconds]
speakingcode has quit [Ping timeout: 244 seconds]
bruno- has joined #ruby
<shevy> is there a question
Outlastsheep is now known as zz_Outlastsheep
ss has joined #ruby
ss is now known as Guest43741
freerobby has quit [Quit: Leaving.]
cocotton has quit [Remote host closed the connection]
ujihisa has quit [Ping timeout: 244 seconds]
Beoran has joined #ruby
<certainty> interesting i have a case where my AR model doesn't typcast a column correctly. The column has type smallint(6). It's a mysql db. Saving an int to that column works fine. Howver loading the record again results in a string value for that column. Might be some gem messing with AR or the MySQL adapter
Aswebb_ has quit []
mary5030 has joined #ruby
failshel_ is now known as failshell
<certainty> will construct a testcase later
<certainty> damn i justed wanted to upgrade
freerobby has joined #ruby
<bMalum> how can i set manually a cookie for get requests with ruby net::http
<dudedudeman> in what context are you using AR, certainty?
<dudedudeman> outside of rails?
AlphaAtom has quit [Read error: Connection reset by peer]
thinkswan has quit [Quit: ...]
AlphaAtom has joined #ruby
bim has joined #ruby
sinkensabe has quit [Remote host closed the connection]
bim is now known as Guest87098
<hanmac1> imo i still find it funny that some big things like Symphony or CakePHP does not work correctly with Models that does have combined primary key ;P imo its a key feature of databases and it does makes a bad view if ORMs does not support that
jblancett has quit [Remote host closed the connection]
chridal has joined #ruby
xploshioon has joined #ruby
Morkel has quit [Quit: Morkel]
dmmoody has joined #ruby
s7ry93r has joined #ruby
aphprentice_ has quit [Remote host closed the connection]
<ytti> StringScanner question
<ytti> sc = StringScanner.new string
juanpaucar has quit [Remote host closed the connection]
AlphaAtom has quit [Ping timeout: 276 seconds]
<ytti> sc.scan_until /something
<ytti> data = sc.pre_match
sethette1 has left #ruby [#ruby]
<ytti> sc.scan_until /somethin_else/
shellfu has joined #ruby
<ytti> how do i get delta between last scan_until
<ytti> and current scan_until
<ytti> w/o the matched data?
<ytti> i guess string manipulation is only option?
<ytti> delta = sc.scan_until /something_else/
<ytti> then remove sc.matched from delta?
tosbourn has joined #ruby
sigurding has quit [Quit: sigurding]
chridal1 has joined #ruby
chridal has quit [Ping timeout: 245 seconds]
<tosbourn> Quick question: Before requiring 'date' in an IRB session, what is the Date class that you have access to?
eones has quit [Read error: Connection reset by peer]
<tosbourn> I was trying to look it up but my google-fu is letting me down
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
tus has quit [Ping timeout: 246 seconds]
andrew-l` is now known as andrew-l
zlude has quit [Read error: No route to host]
giuseppesolinas has quit [Quit: Leaving]
wallerdev has joined #ruby
freerobby has joined #ruby
<ninjs> So I have a method now that crates each claim that is processed using the Claim class.. my thought was at the end of each iteration to write it to a row on the excel sheet based on it's id#. But I'm looking for a way to sort all of the claims, collectively, by date_range, before I write them. Any ideas? I'll post a gist.
allcentury has quit [Ping timeout: 250 seconds]
vtunka has quit [Quit: Leaving]
<mikecmpbll> ninjs: what data structure are the claims stored in?
slackbotgz has quit [Remote host closed the connection]
sgambino has quit [Remote host closed the connection]
cocotton has joined #ruby
<ninjs> mikecmpbll: I'm not sure what you mean, sorry
<jhass> tosbourn: what's your rubygems version?
<mikecmpbll> ninjs: you must be holding the claims somewhere in a variable
krisquigley has joined #ruby
jobewan has joined #ruby
<mikecmpbll> are they in an array?
<ninjs> line 114
hmsimha has joined #ruby
sgambino has joined #ruby
s7ry93r has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
bigmac__ has joined #ruby
<mikecmpbll> ninjs: ok, it doesn't appear you're storing each claim in that loop
<mikecmpbll> just printing it out
<ninjs> I was thinking of replacing line 115 'claim.show' with something like newsheet1.row(claim.get_number)
<tosbourn> gem -v gives me 2.2.2 jhass
<ninjs> mikecmpbll: yeah I was just printing it for now to make sure everything was working
<mikecmpbll> ninjs: if you create an array before you iterate over the files: claims = []
<mikecmpbll> ninjs: then add each new claim to the array: claims << claim
<mikecmpbll> then you can use ruby's sort and sort_by methods
<jhass> tosbourn: then it comes from there, 2.4 removed it
<ninjs> mikecmpbll: awesome! but how do I write that array out?
<tosbourn> jhass: thanks :)
<mikecmpbll> ninjs: to the spreadsheet?
<ninjs> I guess, I mean how do I grab each claim out of the array once I put it in there haha
bigmac_ has quit [Ping timeout: 276 seconds]
<mikecmpbll> ninjs: you can iterate over the array using .each for example
<mikecmpbll> like you're doing with the files.
<ninjs> Oh. awesome
juanpaucar has joined #ruby
evanjs has quit [Remote host closed the connection]
krisquigley has quit [Ping timeout: 250 seconds]
<ninjs> My array looks crazy though.
zubov has joined #ruby
khebbie has joined #ruby
<mikecmpbll> why?
<ninjs> It's like #<Claim:0x007f96d7951a08 @payor="PAYER NAME", @patient="John Doe", @total="TOTALS.TT", @date_range="D./FR/OM-D./TO/OO", @sent_date="CR/EA/TE", @comments="Sent on CR/EA/TE", @loc="unknown", @units="22">]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mikecmpbll> that's a claim object.
<matugm> That's an object, not an array.
<mikecmpbll> (with a closing array bracket at the end)
<mikecmpbll> :)
<ninjs> right I mean it's an array of object that look like that
<mikecmpbll> yes, correect.
<matugm> Yell, having an array of objects is fine :)
<ninjs> that's right? so I do something like Claims.each do |claim|; print claim.patient; end; for example?
casadei has joined #ruby
paulcsmith has joined #ruby
<mikecmpbll> you can do that, yes.
<matugm> Well*
bigmac_ has joined #ruby
<mikecmpbll> except not exactly that.
<mikecmpbll> claims*
iceyec has quit [Quit: iceyec]
<ninjs> oh just lowercase c at the beginning
<mikecmpbll> ninjs: yep, if that's what you called the array.
MatthewsFace has quit [Remote host closed the connection]
evanjs_ has joined #ruby
<ninjs> That's right. I'm getting invalid method 'patient' with that example
<mikecmpbll> ninjs: because that method isn't defined on Claim.
jobewan has quit [Remote host closed the connection]
Matip has joined #ruby
bigmac__ has quit [Ping timeout: 245 seconds]
<ninjs> Oh, they keep on being a claim object
<ninjs> nice. I love ruby haha
<mikecmpbll> you can use attr_reader :patient if you want that method.
kblake has joined #ruby
speakingcode has joined #ruby
solars has quit [Ping timeout: 245 seconds]
<Matip> I have a class and in each of the n methods I'm adding "def foo \n begin \n ... \n rescue Bar => e \n puts e.message \n end"
<Matip> can I do that on a class level so I don't have to do so on each method?
maasha has joined #ruby
delianides has quit [Remote host closed the connection]
stephenh has joined #ruby
<Matip> something like class Example \n def on_exception(e) puts e.message end end" or something
jobewan has joined #ruby
<ninjs> mikecmpbll: so to sort that array... claims.sort(date_range) ? or something like that
delianides has joined #ruby
Igorshp has quit [Remote host closed the connection]
havox has joined #ruby
<Matip> I mean, define an exception handler for the whole class
<mikecmpbll> ninjs: if you want to sort it in-place (replacing it with the sorted version), you can do claims.sort_by!{ |c| c.date_range }
rbennacer has quit [Remote host closed the connection]
<mikecmpbll> ninjs: but, if it's a method you've not used before just look at the docs.
<mikecmpbll> and it will tell you how to use it.
rbennacer has joined #ruby
<hanmac1> Matip maybe use a Decorator for that
delianid_ has joined #ruby
<ninjs> but c.date_range has to be a method in the Claim class
<stephenh> hi, hopefully not too off topic.. is there a way to use bundler to install gems from git into the gem path ? the problem i'm having is gems from git are installed to $GEM_PATH/bundler/gems and not $GEM_PATH/gems; i'd like to make use of these gems without using 'bundle exec'
<ninjs> mikecmpbll: ^
<mikecmpbll> ninjs: yes, correct.
<Mon_Ouie> You could write a method that generates your methods by using using define_method. You can also drop the `begin' and just have a single line that goes rescue Bar => e; foo(e) at the end of each method
delianides has quit [Read error: Connection reset by peer]
lobolars has quit []
<maasha> Rubocop tells me this is too complex - how can I make it simpler? https://gist.github.com/maasha/af1252a2fe46a7bf41d5
anarang has quit [Quit: Leaving]
snockerton has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
sevenseacat has quit [Quit: Me dun like you no more.]
<ninjs> mikecmpbll: matugm: thanks for your help, I really appreciate it. :)
<hanmac1> maasha: you might use || for line 4-6
fabrice31 has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
fabrice31 has joined #ruby
mbff has joined #ruby
<mbff> Hello! I am having a bit a trouble with requiring files
senayar has joined #ruby
<mbff> I have require './lib/strike_api'
SOLDIERz has quit [Ping timeout: 244 seconds]
<hanmac1> imo rubocop is a whiny little spoiled child ... it tears at the simplest code
<shevy> if you have a gem structure, or a gem, then require 'name' should be fine mbff
<mikecmpbll> maasha: simply replace lines 4..8 with all your conditions or'd together
<hanmac1> mbff: checkout require_relative
x77686d has joined #ruby
<shevy> mbff otherwise try require_relative
ndrei has joined #ruby
<mikecmpbll> you don't need any return statements
<mbff> however the file that uses that require will only run from the root of my project
RegulationD has joined #ruby
<mbff> how would i write the require statement so regardless of where I run "ruby test.rb" it works
centrx has joined #ruby
iceyec has joined #ruby
aganov has quit [Quit: Leaving]
Pumukel has quit [Ping timeout: 265 seconds]
<maasha> hanmac1: agreed, but it makes my code better I think.
leafybas_ has quit [Remote host closed the connection]
xploshioon has quit [Quit: Leaving]
<mikecmpbll> maasha: the worst thing about that code is the if true; return true; else return false; end antipattern
leafybasil has joined #ruby
Freet has joined #ruby
<mikecmpbll> that's probably not what robocop is complaining about tho
dseitz has joined #ruby
<maasha> mikecmpbll: antipattern?
fabrice31 has quit [Ping timeout: 272 seconds]
havox has quit [Ping timeout: 264 seconds]
riotjones has joined #ruby
<mikecmpbll> maasha: ineffective code
<shevy> mbff make it a gem, it's much simpler in the long run; or use an aliased directory, then you could use something like: require 'x/strike_api.rb' if x is the name of the symlink
<shevy> but as said, if you have it a gem, require 'name_of_project' would work as-is; in test.rb, you can have this as the first line, and it'll work
RegulationD has quit [Ping timeout: 250 seconds]
ParmesanCaesar has quit [Quit: Lost terminal]
gauke has quit [Quit: gauke]
<mikecmpbll> maasha: fwiw, this is what i meant: https://gist.github.com/mikecmpbll/d3c05c41c26094cc55f5
antgel has quit [Ping timeout: 246 seconds]
bricker has joined #ruby
riotjones has quit [Ping timeout: 240 seconds]
antgel has joined #ruby
<hanmac1> maasha: that might be a bit different in the output, but does this makes more sense? https://gist.github.com/Hanmac/e163cb8b5a112ec12c04
<maasha> mikecmpbll: hanmac1: yup, got it. thanks.
agarie has joined #ruby
evanjs_ has quit [Remote host closed the connection]
<agarie> Ruby got 15 slots for GSoC this year! \o/
mostlybadfly has joined #ruby
<maasha> hanmac1: mikecmpbll here is another: https://gist.github.com/maasha/69aaee9255496ebfdae6
evanjs has joined #ruby
<mikecmpbll> maasha: you're making the same return true if <condition> mistake in there
Akagi201 has quit [Remote host closed the connection]
dmmoody has quit [Remote host closed the connection]
<Mon_Ouie> maasha: Use Enumerable#any?
<mikecmpbll> maasha: actually ignore me
<mikecmpbll> but yeah that can still be simplified quite substantially.
freerobby has quit [Quit: Leaving.]
mipsln has joined #ruby
<maasha> Mon_Ouie: ?
Igorshp has joined #ruby
nettoweb has joined #ruby
<Mon_Ouie> What do you mean, '?'? Enumerable#any? is a method for checking if there is any element in a collection that satisfies some predicate, which is what you're doing here
<hanmac1> maasha: about " return true if value.is_a?(String) && @exact.include?(value.to_sym), return true if !value.is_a?(String) && @exact.include?(value)" what other types than String / Symbol does you expect? Symbol does have to_sym too
dfinninger has joined #ruby
CloCkWeRX has quit [Remote host closed the connection]
<mikecmpbll> ^ yeah that too. i didn't even read the code tbh :D
<maasha> hanmac1: expected types are String, Symbol, Integer and Float
<centrx> ???
<centrx> >> ??
<ruboto> centrx # => "?" (https://eval.in/314568)
<adaedra> ¿¿ <<
ki0 has quit [Ping timeout: 245 seconds]
<hanmac1> maasha: normally "return true if @exact.include?(value.respond_to?(:to_sym) ? value.to_sym : value)" should do what you want
chridal1 has quit [Read error: Connection reset by peer]
Nimf has joined #ruby
Channel6 has joined #ruby
allcentury has joined #ruby
agarie has quit [Remote host closed the connection]
icebourg has joined #ruby
chridal1 has joined #ruby
GaryOak_ has joined #ruby
<maasha> hanmac1: ...in 80 chars with a bit of indention and you-know-who whines?
ianseyer has joined #ruby
<hanmac1> ah the 80 chars rule ... my old archenemy
<maasha> but it is probably more clean, agreed
<maasha> maasha: and fixes the complexity problem. Thanks.
<bricker> > "a" ??!??! "b"
<bricker> >> "a" ??!??! "b"
<ruboto> bricker # => /tmp/execpad-bab35b50b24f/source-bab35b50b24f:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/314569)
<hanmac1> maasha: you might write it in more lines like this with linebreaks "return true if @exact.include?( \n value.respond_to?(:to_sym) ? value.to_sym : value \n )" ... but sooner or later rubocop will whine that the method is to long again
<bricker> aww
freerobby has joined #ruby
gmas has joined #ruby
Pupeno has quit [Remote host closed the connection]
<Mon_Ouie> >> Α = 3; A = 4; A == Α
<ruboto> Mon_Ouie # => false (https://eval.in/314570)
<maasha> hanmac1: "put down your weapon, you have 20 seconds to comply"
Igorshp has quit [Remote host closed the connection]
Freet has quit [Quit: Leaving]
<hanmac1> Mon_Ouie: ha nice try but i see though it! ;p
<hanmac1> >> "Α" == "A"
<ruboto> hanmac1 # => false (https://eval.in/314573)
codecop has joined #ruby
wallerdev has quit [Quit: wallerdev]
hmsimha has quit [Ping timeout: 256 seconds]
sgambino_ has joined #ruby
banister has joined #ruby
sgambino has quit [Quit: Leaving...]
banister has quit [Max SendQ exceeded]
malcolmva has quit [Ping timeout: 250 seconds]
HayesHimself has quit [Ping timeout: 276 seconds]
hanmac1 has quit [Quit: Leaving.]
<bricker> what's the secret
<Mon_Ouie> >» "Α".ord
<Mon_Ouie> >> ["Α".ord, "A".ord]
<ruboto> Mon_Ouie # => [913, 65] (https://eval.in/314578)
Guest87098 has quit [Remote host closed the connection]
<mikecmpbll> heh :)
<Mon_Ouie> The first one is also known as GREEK CAPITAL LETTER ALPHA)
<bricker> oh :D
<adaedra> (same kind of trick)
<bricker> I don't think method names can start with numbers
<mikecmpbll> heh
<adaedra> bricker: it doesn't :)
<bricker> oh :D
<adaedra> this code totally works
<mikecmpbll> not in ruby 2 it doesn't ;d
<adaedra> 5
spyderman4g63 has quit [Remote host closed the connection]
<bricker> I forgot my unicode glasses at home today
<adaedra> with ruby 2.1.2
spyderman4g63 has joined #ruby
<mikecmpbll> yep
agarie has joined #ruby
MhdAli has joined #ruby
Nimf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
noname has quit [Ping timeout: 276 seconds]
lidenskap has joined #ruby
rbennacer has quit [Remote host closed the connection]
ghostmoth has joined #ruby
mgorbach has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
mgorbach has joined #ruby
rbennacer has joined #ruby
<maasha> ooh, a rubocop bug
RegulationD has joined #ruby
Guest43741 has quit [Ping timeout: 240 seconds]
malcolmva has joined #ruby
havox has joined #ruby
havox has quit [Client Quit]
havenwood has joined #ruby
hollywood has joined #ruby
havox has joined #ruby
<mikecmpbll> maasha: what's the bug there?
<centrx> maasha, the block argument is unused
<mikecmpbll> :)
lidenskap has quit [Ping timeout: 245 seconds]
mleung has joined #ruby
ki0 has joined #ruby
Zamyatin has joined #ruby
<maasha> I am assigning a new value to the backreference match - so it is used?
<mikecmpbll> you're creating a new variable.
<centrx> you're assigning the name match to a new object, not re-assigning the previous object
MyGreenP1 has joined #ruby
<mikecmpbll> puts match.object_id; match = "X"; puts match.object_id
<mikecmpbll> :d
x77686d has quit [Quit: x77686d]
ismaelga has quit [Remote host closed the connection]
agarie has quit [Remote host closed the connection]
iceyec has quit [Quit: iceyec]
spider-mario has joined #ruby
nszceta has joined #ruby
nszceta has quit [Max SendQ exceeded]
sgambino_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bim has joined #ruby
bim is now known as Guest38538
Soda has joined #ruby
mbff has quit [Ping timeout: 265 seconds]
<maasha> So how do you gsub something using the backreference to determine the outcome?
<maasha> apparently my way is messy
<mikecmpbll> maasha: why?
nszceta has joined #ruby
Nimf has joined #ruby
<maasha> rubocop says so.
psy_ has quit [Read error: Connection reset by peer]
<mikecmpbll> that code isn't doing anything
nszceta has quit [Max SendQ exceeded]
<mikecmpbll> if you've got some real code to show, then by all means show it
nszceta has joined #ruby
<mikecmpbll> maasha: what i mean by not doing anything is the assignment of `match` isn't affecting that code, you could just as well replace line 6 with 'X'
<shellfu> "Go ahead skin it! Skin that smoke wagon and see what happens!"
chridal1 has quit [Ping timeout: 245 seconds]
lavros has quit [Ping timeout: 250 seconds]
MXfive has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gagrio has quit [Ping timeout: 276 seconds]
ujihisa has joined #ruby
arup_r has joined #ruby
arturaz has quit [Ping timeout: 244 seconds]
fryguy9 has quit [Quit: Leaving.]
lavros has joined #ruby
Kricir has quit [Remote host closed the connection]
Guest43741 has joined #ruby
krz has joined #ruby
ki0 has quit [Remote host closed the connection]
chthon has quit [Read error: Connection reset by peer]
mojo619 has joined #ruby
<ninjs> If anyone is interested, here is the completed code that IRC helped me create. :) https://gist.github.com/ninjs/08f77b6899fd27fc2e81
<adaedra> Mine is in /dev/null
<centrx> oh boy
fryguy9 has joined #ruby
sgambino has joined #ruby
maasha has quit [Quit: Page closed]
<shevy> centrx seems not happy
teddyp1cker has joined #ruby
<shevy> @number = @@no_of_claims
ki0 has joined #ruby
erts has quit [Ping timeout: 272 seconds]
<ninjs> oh is that wrong
gsd has joined #ruby
<shevy> btw ninjs you can make your code shorter
<mikecmpbll> ninjs: if it works, great. plenty of style improvements that can be made though
<mikecmpbll> :)
<ninjs> It does work! haha but I'm open to any improvements that could make it sweeter. I'm pretty proud of it for my first project haha
<mikecmpbll> that's the main thing.
nszceta has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
antgel has quit [Ping timeout: 264 seconds]
RegulationD has quit [Remote host closed the connection]
<ninjs> shevy: Oh, I see what you mean, condense some of those if statements
DerisiveLogic has joined #ruby
<ninjs> so that I don't repeat myself
ujihisa has quit [Ping timeout: 256 seconds]
<adaedra> I was told to prefer the use of interpolation or String#% to adding strings, as it will not create temporary objects
dmmoody has joined #ruby
<shevy> ninjs yeah
zachrab has joined #ruby
<shevy> because you duplicate the same task
dorei has joined #ruby
<adaedra> And I would do the "name split" by first_name, last_name = full_name.split(/, /).map(&:capitalize)
dorei has quit [Read error: Connection reset by peer]
<adaedra> so you have it in one line and don't do the split operation twice
dorei has joined #ruby
MhdAli has quit [Quit: Leaving]
maletor has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
charliesome has joined #ruby
<adaedra> oh ninjs
<adaedra> is that a tab character in Claim#show ?
dorei has quit [Read error: Connection reset by peer]
<ninjs> whoops that's a pasting error haha
maletor has quit [Client Quit]
sdothum has joined #ruby
<ninjs> that Claim#show doesn't even need to be there I was just using it for testing haha
dorei has joined #ruby
jespada has joined #ruby
<adaedra> And ARGV is supposed to be an array, so ARGV == 'help' seems wrong
jefus has quit [Quit: WeeChat 1.1.1]
dorei has quit [Read error: Connection reset by peer]
gr33n7007h has quit [Ping timeout: 246 seconds]
x77686d has joined #ruby
zachrab has quit [Ping timeout: 244 seconds]
nszceta has joined #ruby
maletor has joined #ruby
mbff has joined #ruby
<adaedra> Your variable naming in file_move is very bad
<adaedra> What's w, x, y, z
MatthewsFace has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
<centrx> always improvements
DerisiveLogic has quit [Ping timeout: 255 seconds]
dorei has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
Guest38538 has quit [Remote host closed the connection]
bradleyprice has joined #ruby
<adaedra> aww, you can't comment lines on a gist, too bad
DerisiveLogic has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
<mikecmpbll> ninjs: btw if you had a hash which contained the row numbers for the different type of data in the different formats, you could avoid all that if claim_ext == .. nonsense in every method
fryguy9 has quit [Quit: Leaving.]
<mikecmpbll> and just do claim_array[column_for[claim_ext][:sent_date]) or something like that
MatthewsFace has quit [Ping timeout: 264 seconds]
bhegel has quit [Quit: bhegel]
<mikecmpbll> i worded that like shit so you've probably got no idea what i mean, nvm
<ninjs> adaedra: yeah that was an old quick script I wrote haha
dEPy has joined #ruby
Senjai has quit [Ping timeout: 240 seconds]
<dEPy> If I rescue like this: rescue *[SomeError, AnotherError]
blackmesa has joined #ruby
<dEPy> Can I do this? rescue *[SomeError, AnotherError] => e ?
iceyec has joined #ruby
failshell has quit [Remote host closed the connection]
ekaleido has joined #ruby
serivich has quit [Quit: Leaving]
MasterPiece has joined #ruby
<Mon_Ouie> `*[X, Y]' is silly, you can just replace it with `X, Y'
<Mon_Ouie> But yes, you can do that just fine
<dEPy> oh, ok
<dEPy> Tnx! :)
<bricker> It could be useful if you're dynamically deciding which errors to rescue
<bricker> shrug
allcentury has quit [Ping timeout: 265 seconds]
delianid_ has quit [Remote host closed the connection]
ramfjord has joined #ruby
delianides has joined #ruby
Cust0sL1men has quit [Ping timeout: 264 seconds]
endash has quit [Quit: endash]
<apeiros> dEPy: that said, you could do something like: RelevantExceptions = [SomeError, AnotherError]; … begin; …; rescue *RelevantExceptions => e; … end
<apeiros> now I ponder trying a method in the rescue clause - should work I'd say…
<eam> apeiros: it does I just tried it
marr has quit [Ping timeout: 240 seconds]
<apeiros> eam: thanks :)
MatthewsFace has joined #ruby
<eam> >> def RuntimeError; 1; end; [RuntimeError, RuntimeError(), (raise rescue RuntimeError)]
<ruboto> eam # => [RuntimeError, 1, RuntimeError] (https://eval.in/314593)
lavros has quit [Quit: leaving]
oddskillz is now known as oddskill
<eam> >> def RuntimeError; 1; end; [RuntimeError, RuntimeError(), (raise rescue RuntimeError), (raise rescue RuntimeError())]
<ruboto> eam # => [RuntimeError, 1, RuntimeError, 1] (https://eval.in/314594)
<eam> terrible
oddskill is now known as Guest3520
juanpaucar has quit [Remote host closed the connection]
MyGreenP1 has quit [Ping timeout: 276 seconds]
Guest3520 is now known as odd_figureoutwtf
senayar has quit []
Guest43741 has quit [Ping timeout: 250 seconds]
JimmyNeutron has quit [Remote host closed the connection]
dEPy has quit [Read error: Connection timed out]
delianides has quit [Ping timeout: 272 seconds]
iasoon has quit [Ping timeout: 272 seconds]
GeorgeThompson has quit [Ping timeout: 250 seconds]
bhegel has joined #ruby
Zamerick_ has joined #ruby
lessless has joined #ruby
chridal1 has joined #ruby
Zamerick_ has quit [Read error: Connection reset by peer]
vivekananda has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
MyGreenP1 has joined #ruby
ekaleido has quit [Quit: Textual IRC Client: www.textualapp.com]
<eam> apeiros: actually I think I lied about that
<apeiros> eam: terrible
Senjai has joined #ruby
<eam> inline rescue is just returning the method result, doesn't seem to work in a rescue expr => e
Zamerick_ has joined #ruby
amdbcg has joined #ruby
Zamerick has quit [Ping timeout: 272 seconds]
<apeiros> >> def exces; [ArgumentError, SyntaxError]; end; begin; raise ArgumentError; rescue *exces; "weeeha!"; else "wutt?"; end
<eam> waaait no I didn't lie
<ruboto> apeiros # => "weeeha!" (https://eval.in/314595)
Zamerick__ has joined #ruby
ZeeNoodleyGamer has joined #ruby
<apeiros> it looks like you lied about lying! you lying liar you! :D
<eam> what's a hmmm
<eam> yes :)
amdbcg1 has joined #ruby
amdbcg has quit [Read error: Connection reset by peer]
MXfive has joined #ruby
<eam> was just playing around with this and I returned nil instead of a class/method
<apeiros> ^^
* apeiros goes back to silly "ruby & encodings, tl;dr edition" article
<apeiros> discovering not all the things are as I thought they'd be :< (mostly stuff I haven't used, but thought I knew how it would work out…)
thumpba has joined #ruby
<eam> >> def maybe_fine; rand(2).zero? ? NilClass : Exception end; def ouch; begin; raise "I'm on fire"; rescue maybe_fine => e; puts "just kidding"; end; end; ouch
<ruboto> eam # => I'm on fire (RuntimeError) ...check link for more (https://eval.in/314602)
<apeiros> oh, actually
gauke has joined #ruby
<apeiros> WHY ON EARTH DOES FILE.NEW ACCEPT RANDOM KEYWORD ARGS IT DOESN'T UNDERSTAND?!?
Zamerick_ has quit [Client Quit]
<apeiros> (╯°□°)╯︵ ┻━┻
thumpba_ has joined #ruby
brb3 has quit [Quit: <.<]
MyGreenP1 has quit [Ping timeout: 256 seconds]
krisquigley has joined #ruby
bobby__ has joined #ruby
<apeiros> sooo, it works indeed as I thought it would. you just have to use the right name for the keyword argument. and File.new doesn't effing care if you pass it nonsense.
gauke has quit [Client Quit]
CorpusCallosum has joined #ruby
mbff has quit [Quit: Leaving]
bobby__ has quit [Client Quit]
brb3 has joined #ruby
<dorei> but how could File.new know what arguments make sense?
CorpusCallosum has quit [Max SendQ exceeded]
zacts has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<apeiros> dorei: serious question?
<dorei> doesnt that depend upon the underlying filesystem?
gauke has joined #ruby
<apeiros> no
<apeiros> the underlying file system has absolutely nothing to do with which keyword arguments File.new accepts
pengin has joined #ruby
thumpba has quit [Ping timeout: 245 seconds]
<dorei> oh, i see what you mean
Guest43741 has joined #ruby
allcentury has joined #ruby
michaeldeol has joined #ruby
krisquigley has quit [Ping timeout: 250 seconds]
gauke has quit [Client Quit]
<apeiros> and I wrote encoding_external: "utf-8" instead of external_encoding: "utf-8"
<eam> File.new takes keyword arguments?
<apeiros> well, technically it accepts a hash
<apeiros> it has not yet been retrofitted to take kwargs
<apeiros> and that's probably the reason for its behavior, as it doesn't check against unknown keys in the hash.
krz has quit [Quit: WeeChat 1.0.1]
momomomomo has joined #ruby
<eam> ah for opt
rbennacer has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 250 seconds]
<wald0> im trying to use "ruby-staccato" to track google-analytics events, but it simply not works (pry says that everything is OK)
spider-mario has quit [Remote host closed the connection]
<wald0> is there anybody that uses it or that knows that it WORKS ?
fryguy9 has joined #ruby
chipotle has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
roshanavand has joined #ruby
ndrei has joined #ruby
ismaelga has joined #ruby
iasoon has joined #ruby
DerisiveLogic has quit [Ping timeout: 276 seconds]
momomomomo_ has joined #ruby
wald0 has quit [Ping timeout: 246 seconds]
agarie has joined #ruby
ta has joined #ruby
NoNMaDDeN has quit [Remote host closed the connection]
momomomomo has quit [Ping timeout: 264 seconds]
momomomomo_ is now known as momomomomo
mikecmpbll has joined #ruby
mrmargolis has quit [Ping timeout: 250 seconds]
wald0 has joined #ruby
livathinos has quit []
jottr_ has joined #ruby
<wald0> im trying to use "ruby-staccato" to track google-analytics events, but it simply not works (pry says that everything is OK)
<wald0> is there anybody that uses it or that knows that it WORKS ?
zachrab has joined #ruby
odd_figureoutwtf has quit [Changing host]
odd_figureoutwtf has joined #ruby
odd_figureoutwtf has joined #ruby
odd_figureoutwtf is now known as oddskill
mrmargolis has joined #ruby
freerobby has joined #ruby
<momomomomo> wald0: !ask
<momomomomo> damn you helpa, damn and blast
<momomomomo> wald0: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
mrmargolis has quit [Remote host closed the connection]
<centrx> ?ask
<ruboto> Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<centrx> helpa has been replaced by MR ruboto
<momomomomo> centrx: that’s not the type of response I was looking for
agarie has quit [Ping timeout: 250 seconds]
Matip has quit [Ping timeout: 272 seconds]
<centrx> uh oh
<momomomomo> I was specifically looking for the getting answers guide
mrmargolis has joined #ruby
<centrx> yeah
<centrx> fu ruboto
<momomomomo> :p
<apeiros> :<
andikr has quit [Remote host closed the connection]
<momomomomo> apeiros: is that your bot?
<apeiros> I'd say "it's our bot"
<apeiros> but yes
ta has quit [Ping timeout: 250 seconds]
<momomomomo> make it not deviate from railsbot
<adaedra> Our bot ♪ In the middle of our chan ♪
scripore has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> momomomomo: it eventually will. I don't intend to import all of helpa's factoids. there's quite a lot of stuff in it I'd prefer not to have.
<momomomomo> did Radar deprecate helpa?
<centrx> radar has been locked in a room until he agrees with the bot coup
<centrx> I think the room is called ##political-prisoner
<apeiros> but I'll see with Radar how far we can sync
bim has joined #ruby
<momomomomo> wack, I like helpa
<momomomomo> why the change?
bim is now known as Guest75590
<dudedudeman> how to ask smart questions is a good read
<momomomomo> dudedudeman: agreed!
Matip has joined #ruby
<apeiros> momomomomo: because ruboto will be connected with the channel website. and that's far easier when the bot runs on the same server.
<momomomomo> loooool didn’t realize there was a channel website
<apeiros> topic :)
<apeiros> it's new. we're working on getting our tooling up.
<momomomomo> but also, that’s a pretty weak excuse :p
<centrx> and no longer links to mod-ruby from 185
<centrx> 1985
<apeiros> momomomomo: you're free to provide the work to make it work with helpa.
<apeiros> momomomomo: until then I suggest you stop judging what's how strong or weak a reason.
<centrx> maybe the bots should fight to decide
riotjones has joined #ruby
<momomomomo> apeiros: what level of integration are you looking for?
<wald0> momomomomo: centrx: i dont understand... i asked the question, there's nothing in my statistics using staccato, checking if anybody here can confirm that works
<momomomomo> i.e. what’s the scope of the connectivity?
<apeiros> momomomomo: join #ruby-community to discuss that
mistermocha has joined #ruby
gr33n7007h has joined #ruby
banister has joined #ruby
<centrx> wald0, I think the answer is "no one here really knows staccato, but we may be able to answer a more specific, practical question"
banister has quit [Max SendQ exceeded]
agarie has joined #ruby
* dudedudeman wants to see a bot fight
chinmay_dd has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<wald0> centrx: but i dont see anything more specifical... pry reports that everything is fine, but there's no track at all in my google-analytics, so... idk
<centrx> wald0, check the log files? puts/p out some of your variables in your code to see what's happening?
FrankD has quit [Read error: Connection reset by peer]
cocotton has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 256 seconds]
<dudedudeman> some .inspect might be helpful, too
n80 has joined #ruby
<centrx> yeah p calls inspect
RegulationD has joined #ruby
<dudedudeman> does it?
fabrice31 has joined #ruby
<dudedudeman> consider me enlightened
<wald0> the staccato command simply sends a call to google analytics, so i dont know to where see any logs
mistermocha has quit [Remote host closed the connection]
<wald0> something like: tracker.event(category: 'video', action: 'play', label: 'cars', value: 1)
quimrstorres has quit [Remote host closed the connection]
banister has joined #ruby
mistermocha has joined #ruby
failshell has joined #ruby
RegulationD has quit [Remote host closed the connection]
RegulationD has joined #ruby
failshell has quit [Remote host closed the connection]
chridal1 has quit [Ping timeout: 276 seconds]
Akagi201 has joined #ruby
banister has quit [Client Quit]
Filete has joined #ruby
fabrice31 has quit [Ping timeout: 248 seconds]
wallerdev has joined #ruby
tcrypt has joined #ruby
zorak8 has joined #ruby
Crisix has joined #ruby
quimrstorres has joined #ruby
MasterPiece has quit [Remote host closed the connection]
Crisix has quit [Max SendQ exceeded]
dyce has joined #ruby
charliesome has quit [Quit: zzz]
workmad3 has quit [Ping timeout: 265 seconds]
agarie_ has joined #ruby
<dyce> is there a way to import a cookie from firefox? like start a private session in firefox, login, and record the cookie into Mechanize?
mistermocha has quit [Remote host closed the connection]
agarie has quit [Read error: Connection reset by peer]
<dyce> import into mechanize*
Akagi201 has quit [Ping timeout: 265 seconds]
rdark has quit [Quit: leaving]
Hijiri has quit [Ping timeout: 256 seconds]
Guest75590 has quit [Remote host closed the connection]
gusrub has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
dfinninger has quit [Remote host closed the connection]
wallerdev has quit [Ping timeout: 264 seconds]
<jhass> dyce: Ctrl+Shift+C, cogwheel in the top right, enable Storage
<centrx> dyce, I think you load the file into mechanize with the CookieJar #load
A205B064 has joined #ruby
failshell has joined #ruby
sohrab has joined #ruby
<gr33n7007h> when creating a dsl like method would it be better to pass &b to instance_eval / yield self?
<centrx> it should be CookieJar#stuff and CookieJar#eat but it's called #save and #load for some reason
doritostains has joined #ruby
icebourg has quit []
momomomomo_ has joined #ruby
CorpusCallosum has joined #ruby
<centrx> gr33n7007h, using yield performs much faster than using a block parameter
scripore has joined #ruby
momomomomo_ has quit [Client Quit]
<dyce> centrx,jhass: i should make the mechanize UA the same as firefox or the cookie might void?
thatslifeson_ is now known as Conner-A
<gr33n7007h> centrx: ok i'll go with yield self, thanks for the reply
<jhass> that would be unusual
Conner-A is now known as Conner_A
Zai00 has quit [Quit: Zai00]
<jhass> the UA is not tied to he cookie, at least not in the HTTP protocol
momomomomo has quit [Ping timeout: 252 seconds]
<centrx> dyce, I generally try to make scrapers as anonymous/secret as possible, to fool the site
fgo has quit [Quit: WeeChat 1.1.1]
<centrx> acting like a human user
<dyce> just wish there was a little gui for mechanize, i suppose i could continously write the html that mechanize sees to a file and view in firefox
deric_skibotn has joined #ruby
tvw has quit [Remote host closed the connection]
dmmoody has quit [Remote host closed the connection]
jottr_ has quit [Ping timeout: 252 seconds]
mrmargol_ has joined #ruby
delianides has joined #ruby
m8 has joined #ruby
fryguy9 has quit [Quit: Leaving.]
<jhass> dyce: maybe you want selenium?
klaas_ is now known as klaas
mrmargolis has quit [Ping timeout: 245 seconds]
edwinvdg_ has quit [Remote host closed the connection]
chridal1 has joined #ruby
<ninjs> anyone have any tips as to converting a .rb file to a Windows executable?
dmmoody has joined #ruby
tosbourn has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
<crowell> ninjs: ocra
shadoi has quit [Quit: Leaving.]
delianides has quit [Ping timeout: 245 seconds]
havenn has joined #ruby
ki0 has quit [Remote host closed the connection]
leafybas_ has joined #ruby
<arup_r> \o
ki0 has joined #ruby
user121212 has joined #ruby
bim has joined #ruby
bim is now known as Guest70567
hazelux has quit [Remote host closed the connection]
GenghisKen has joined #ruby
havenwood has quit [Ping timeout: 245 seconds]
Axy has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
Soda has quit [Remote host closed the connection]
rgb-one has joined #ruby
<user121212> Hi!, I wrote a crawler in ruby and I want to run in in a server for a few days, and log the stdout in a log file. what will be the best way to do that?
fryguy9 has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
agarie_ has quit [Remote host closed the connection]
leafybasil has quit [Ping timeout: 272 seconds]
gfawcettpq has quit [Ping timeout: 256 seconds]
djbkd has joined #ruby
leafybas_ has quit [Ping timeout: 245 seconds]
tfitts has quit []
shadoi has joined #ruby
<dorei> user121212: you could use the shell to redirect the stdout to a file
hannahkoala has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
dcarmich has quit [Quit: Textual IRC Client: www.textualapp.com]
<crowell> $stdout.reopen("file.txt", "w")
<audy> woah didn't know you could do that to stdout
psy_ has joined #ruby
<crowell> can do it with any file handle :) $stderr, $stdout, etc.!
dfinninger has joined #ruby
<audy> pretty sure you can do anything in ruby
tosbourn has joined #ruby
<apeiros> you can also reassign $stdout. I prefer doing that as I can then restore it from STDOUT
<audy> it's a magical land
djbkd has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
djbkd has joined #ruby
scripore has joined #ruby
tosbourn has quit [Remote host closed the connection]
lidenskap has joined #ruby
amdbcg1 has quit [Remote host closed the connection]
amdbcg has joined #ruby
lidenskap has quit [Read error: Connection reset by peer]
lidenskap has joined #ruby
ki0 has quit [Remote host closed the connection]
<ninjs> and here's my code I'm trying to convert: https://gist.github.com/ninjs/9c1620e835def20e0526
<ninjs> I'm not sure why ocra hates it, the code works fine
ramfjord has quit [Ping timeout: 265 seconds]
pengin has quit [Remote host closed the connection]
havox has quit [Ping timeout: 250 seconds]
<centrx> ninjs, maybe ocra doesn't work with Ruby 2.2?
user121212 has quit [Quit: Page closed]
x77686d has quit [Quit: x77686d]
<ninjs> centrx: you're right, that could be it
zubov has quit [Quit: Leaving]
<havenn> ninjs: Have you checked Ocra's open Issues on Github?
ArchRogem has quit [Quit: Textual IRC Client: www.textualapp.com]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kirun has joined #ruby
agarie has joined #ruby
oddskill is now known as butwellidkwtf
zachrab has quit [Remote host closed the connection]
wallerdev has joined #ruby
Igorshp has quit [Remote host closed the connection]
<havenn> ninjs: Using Cygwin?: https://github.com/larsch/ocra/issues/72
Igorshp has joined #ruby
Creator|Phone has joined #ruby
gfawcettpq has joined #ruby
fryguy9 has quit [Quit: Leaving.]
Mia has quit [Read error: Connection reset by peer]
Cust0sL1men has joined #ruby
aphprentice has quit [Remote host closed the connection]
dkphenom has joined #ruby
<crowell> havenn: doesn't look like a cygwin issue
<crowell> paths are unixy in cygwin
<crowell> eg, /cygdrive/c/blah instead of C:\blah
Pumukel has joined #ruby
<havenn> crowell: I think they're saying the issue is File::ALT_SEPARATOR being `nil` since Ruby isn't detecting some Cygwins as Win.
fryguy9 has joined #ruby
khebbie has quit [Ping timeout: 250 seconds]
<havenn> crowell: Actually, maybe not, just skimmed and that doesn't seem right. Dunno.
Creator|Phone has quit [Quit: Bye]
agarie has quit []
delianides has joined #ruby
GenghisKen has quit [Ping timeout: 252 seconds]
dkphenom has quit [Client Quit]
endash has joined #ruby
<ninjs> havenn: It looks like the issue was Ruby 2.2
spyderman4g63 has quit []
<ninjs> ocra only supports up to 2.1.5
amdbcg has quit [Ping timeout: 264 seconds]
<ninjs> worked fine when I downgraded, thankfully
mistermocha has joined #ruby
<havenn> ninjs: Ah.
<dyce> do any common gems have c dependencies like python? im wondering if jruby would be able to compile a uberjar
mistermocha has quit [Remote host closed the connection]
<havenn> dyce: Along the lines of Warbler or something else?: https://github.com/jruby/warbler#readme
pengin has joined #ruby
dfinninger has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
<havenn> dyce: Ah, you want to make a jar that includes c-exts?
michael_mbp has quit [Excess Flood]
Mia has joined #ruby
Mia has joined #ruby
michael_mbp has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jottr_ has joined #ruby
<dyce> havenn: yeah, im assuming some gems have c-exts right?
mitchellhenke has joined #ruby
dfinninger has joined #ruby
<havenn> dyce: Yeah, some do have c-exts. Many of the popular gems also ship with corresponding Java extensions.
GenghisKen has joined #ruby
JoshGlzBrk has joined #ruby
<havenn> dyce: There's some exciting work going on with supporting c-exts in jruby-graal: http://www.chrisseaton.com/rubytruffle/modularity15/rubyextensions.pdf
<havenn> Supporting in a super fancy way. ;)
Outlastsheep is now known as zz_Outlastsheep
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 37.0.1/2015040300]]
x77686d has joined #ruby
<dyce> havenn: nice ill check that out
Akagi201 has joined #ruby
JimmyNeutron has joined #ruby
ta has joined #ruby
pengin has quit [Remote host closed the connection]
jottr has joined #ruby
Igorshp has quit [Remote host closed the connection]
jottr_ has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
towski_ has joined #ruby
<bMalum> What can you recommend for Multiple fast FileDownload in Ruby … i was looking for thx like wget/curl/fetch wrapped in ruby.
<bMalum> or written in ruby ;)
solars has joined #ruby
jschoolcraft has joined #ruby
blazes816 has joined #ruby
<havenn> bMalum: Maybe take a look at typhoeus: https://github.com/typhoeus/typhoeus#readme
jschoolcraft has quit [Max SendQ exceeded]
wwwbukolaycom has joined #ruby
jschoolcraft has joined #ruby
<bMalum> havenn - oh looks promising
Akagi201 has quit [Ping timeout: 240 seconds]
amdbcg has joined #ruby
juanpaucar has joined #ruby
sandelius has joined #ruby
iceden has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
tcrypt has quit [Ping timeout: 255 seconds]
Iniesta8 has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
ismaelga has quit [Remote host closed the connection]
michaeldeol has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
fryguy9 has quit [Quit: Leaving.]
oetjenj has joined #ruby
jottr has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
Industrial has left #ruby ["WeeChat 0.4.1"]
juanpaucar has quit [Ping timeout: 264 seconds]
timanema has quit [Quit: leaving]
chridal1 has quit [Ping timeout: 252 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
edwinvdgraaf has quit [Remote host closed the connection]
fryguy9 has joined #ruby
<allcentury> Logger is very fast user121212
pengin has joined #ruby
<allcentury> I'm able to do 100_000 msgs in 1.2seconds to a file
mjuszczak has joined #ruby
delianides has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 250 seconds]
Mia has quit [Read error: Connection reset by peer]
* wwwbukolaycom hi
sgambino has joined #ruby
tus has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
krisquigley has joined #ruby
x1337807x has joined #ruby
ki0 has joined #ruby
<jhass> wwwBUKOLAYcom: are you spam?
<wald0> jhass: what makes you think that?
<jhass> nick and that we having surprising mixture of channels we're both in
bricker has quit [Ping timeout: 264 seconds]
Doue has joined #ruby
rbennacer has quit [Remote host closed the connection]
lukequaint has joined #ruby
<wald0> i was joking
<wald0> of course he is spam!
<wald0> fire him!
soulcake has quit [Quit: Quack.]
<Doue> Hello, I would like to create a class and to set default value to attributes if they are not given as parameter, how can I do that please ?
eshiffob has joined #ruby
soulcake has joined #ruby
hollywood has quit [Quit: Leaving]
<jhass> Doue: what's your current code?
cefkamcau has quit [Ping timeout: 246 seconds]
krisquigley has quit [Ping timeout: 252 seconds]
ki0 has quit [Ping timeout: 264 seconds]
djbkd has quit [Remote host closed the connection]
tvw has joined #ruby
weaksauce has joined #ruby
hazelux has joined #ruby
<jhass> Doue: I'm asking because I'm not sure what you mean, your code might clarify it
<Doue> @jhass: Sure, here it s is : http://pastebin.com/SjvFrxrR
<ruboto> Doue, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/703e9e48a500a5c314fd
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
rbennacer has joined #ruby
Guest43741 has quit [Ping timeout: 256 seconds]
dmmoody has quit [Remote host closed the connection]
<Doue> I would like to set my attributes to a default value if they are not given as a parameter
<jhass> Doue: I'm still not sure, I don't see any parameters?
rodferso1 has joined #ruby
pengin has quit [Remote host closed the connection]
rodfersou has quit [Ping timeout: 252 seconds]
<Doue> yeah I have not put them so far but they are all of my attributes who should be given
blizzy has joined #ruby
<Doue> who might be given *
ghr has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby
<jhass> so you want initialize to take them?
<Doue> yes, for example if is_set is not given I put it to 1
<jhass> Which Ruby version do you need to support?
rbennacer has quit [Remote host closed the connection]
lukequaint has quit [Quit: Bye!]
lukequaint has joined #ruby
<Doue> 2.0
vt102 has quit [Remote host closed the connection]
icebourg has joined #ruby
hazelux has quit [Ping timeout: 256 seconds]
<jhass> >> class Foo; attr_reader :a, :b; def initialize(a: 1, b: 2); @a = a; @b = b; end; end; foo = Foo.new(b: 3); [foo.a, foo.b] # Then I'd suggest optional keyword arguments like this, since that's quite a few parameters
<ruboto> jhass # => [1, 3] (https://eval.in/314646)
rbennacer has joined #ruby
lukequaint has quit [Read error: Connection reset by peer]
lukequaint has joined #ruby
vt102 has joined #ruby
delianides has joined #ruby
aluno1 has joined #ruby
dmmoody has joined #ruby
Notte has joined #ruby
aluno1 is now known as h00d
rodfersou has joined #ruby
<Doue> okay thanks I see how to
<Doue> thanks I will try this way
<jhass> Doue: two notes if you don't mind: prefer "string #{interpolation}" over "string" + concatenation and I'm not sure why you call super in initialize, since you don't subclass anything special
Mia has quit [Read error: Connection reset by peer]
rbennacer has quit [Remote host closed the connection]
<Doue> in your examples, can I do initize("one value") ?
ramfjord has joined #ruby
<Doue> and not only two ?
<Doue> yes I don;t need super actually
<jhass> mh? My example only passed only one parameter
rodferso1 has quit [Ping timeout: 272 seconds]
hazelux has joined #ruby
delianides has quit [Remote host closed the connection]
<apeiros> hm, interesting. seems File.read(path, external_encoding: x) will convert from x to Encoding.default_internal, except if x is binary.
<Doue> you got a and b
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
arturmartins has quit [Quit: Leaving...]
tosbourn has joined #ruby
<jhass> Doue: in the definition yeah, note that I only pass b in Foo.new
<h00d> hi guys
djbkd has quit [Remote host closed the connection]
Pumukel has quit [Remote host closed the connection]
fryguy9 has quit [Quit: Leaving.]
rbennacer has joined #ruby
hazelux has quit [Ping timeout: 256 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ki0 has joined #ruby
djbkd has joined #ruby
mistermocha has joined #ruby
mipsln has quit [Read error: Connection reset by peer]
tosbourn has quit [Ping timeout: 246 seconds]
voodookobra has joined #ruby
<voodookobra> http://example.com/?|rm -rf --no-preserve root /
mjuszczak has quit [Ping timeout: 244 seconds]
<jhass> doesn't look like ruby
<voodookobra> that joke would have been funnier if I didn't typo it
<voodookobra> and any of the bots were overzealous about parsing URLs
zachrab has joined #ruby
TerjeLarsen has joined #ruby
Irfan_A has joined #ruby
voodookobra has left #ruby [#ruby]
gfawcettpq has quit [Ping timeout: 276 seconds]
spider-mario has joined #ruby
<jhass> bots tripping over such a stupid thing would deserve to die I guess
sigurding has joined #ruby
freerobby has quit [Quit: Leaving.]
mjuszczak has joined #ruby
mistermocha has quit [Ping timeout: 256 seconds]
sonnym has joined #ruby
sonnym has quit [Max SendQ exceeded]
rbennacer has quit [Remote host closed the connection]
bhegel has quit [Quit: bhegel]
h00d has quit [Quit: ChatZilla 0.9.91.1 [Firefox 20.0/20130329043827]]
pengin has joined #ruby
fabrice31 has joined #ruby
zachrab has quit [Ping timeout: 265 seconds]
Senjai has joined #ruby
Senjai has quit [Changing host]
h00d has joined #ruby
<h00d> :)
h00d has quit [Remote host closed the connection]
<apeiros> oh, already gone
chridal1 has joined #ruby
<jhass> h00d or voodookobra?
<apeiros> voodoo
hazelux has joined #ruby
h00d has joined #ruby
elaptics is now known as elaptics_away
fabrice31 has quit [Ping timeout: 255 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
speakingcode has quit [Ping timeout: 252 seconds]
ghr has joined #ruby
huddy has quit [Quit: Connection closed for inactivity]
dmmoody has quit []
SupNiggas has joined #ruby
SupNiggas has left #ruby [#ruby]
speakingcode has joined #ruby
h00d has quit [Quit: ChatZilla 0.9.91.1 [Firefox 20.0/20130329043827]]
<ninjs> Doue: Couldn't you use an options hash to do what you are asking for
Guest70567 has quit [Remote host closed the connection]
cosmicfires has joined #ruby
<jhass> ninjs: options hash would be what I had suggested if support for Ruby < 2.0 would be required
<ninjs> ohh
<jhass> keyword args replace the usecases of options hashes
<cosmicfires> are case statements more efficient than if ... else ... end statements?
<jhass> for a large part at least
<ninjs> oh perfect. I didn't know that
<Doue> ninjs: yes I think I should but I dont know how to
<jhass> cosmicfires: efficient in what regard?
<Doue> let me paste you the code
<cosmicfires> less execution time
bim has joined #ruby
wallerdev has quit [Quit: wallerdev]
<apeiros> cosmicfires: I doubt it. but you can always benchmark.
bim is now known as Guest4446
ghr has quit [Ping timeout: 240 seconds]
cocotton has joined #ruby
<jhass> cosmicfires: not in any range that's relevant to worry about anyway
<apeiros> that is, for equivalent case/when vs. if/else. with a complex case expression, the equivalent for if/elsif would require you to assign the result to a variable first.
rbennacer has joined #ruby
tearan has joined #ruby
<jhass> cosmicfires: use what's more efficient to write in your case, not what's more efficient to run
<jhass> benchmark and optimize only if you suspect an actual bottleneck
jottr has joined #ruby
<cosmicfires> thanks
<cosmicfires> I was curious
cocotton has quit [Remote host closed the connection]
Notte has quit []
<Doue> ninjs: I should probably do something like this: def initialize(params = {}) ?
centrx has quit [Remote host closed the connection]
<jhass> Doue: why no "string #{interpolation}"? :)
centrx has joined #ruby
<jhass> Doue: no it's fine, prefer the keyword args if you can use them
<jhass> though I'd spend that definition a few more newlines
<jhass> another style note: we prefer snake_case for variable names
<cosmicfires> I did a quick benchmark if/else vs case/when if/else used 30% less cpu time so not worth worrying about
dseitz has quit [Quit: later]
Mia has quit [Read error: Connection reset by peer]
<Doue> jhass: okay I change to interpolation ! so you don't think I should use the has ?
<Doue> hash
<jhass> Doue: no, don't use the hash
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
<jhass> Doue: let me reformat your code a bit
Parker0 has joined #ruby
Parker0 has quit [Client Quit]
<Doue> okay thanks a lot!
mjuszczak has quit []
<ninjs> that works for me
colorisco has quit [Ping timeout: 244 seconds]
claw___ has joined #ruby
<Doue> ninjs: I am not ure, what did you change ?
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<ninjs> you can't set multiple defaults in one go
mistermocha has joined #ruby
claw__ has quit [Ping timeout: 256 seconds]
lukec has joined #ruby
ghostmoth has quit [Quit: ghostmoth]
<ninjs> like alertname, from, to: 'no-reply@email"
yfeldblum has joined #ruby
<Doue> oh okay I see
sandelius has joined #ruby
evanjs has quit [Remote host closed the connection]
zachrab has joined #ruby
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sigurding has quit [Quit: sigurding]
wallerdev has joined #ruby
bricker has joined #ruby
aphprentice has joined #ruby
vim_shimm has joined #ruby
pwattste has quit [Quit: Textual IRC Client: www.textualapp.com]
hannahkoala has quit []
butwellidkwtf is now known as oddlearfirststri
xiq has joined #ruby
oddlearfirststri is now known as odd
xiq is now known as xrlabs
cocotton has joined #ruby
<xrlabs> hey guys
<xrlabs> Quick question, how can I use the class "GUIElement" in Engine::GUI::GUIElement
paulcsmith has quit [Quit: Be back later ...]
delianides has joined #ruby
evanjs has joined #ruby
<jhass> xrlabs: more context please
<apeiros> xrlabs: depends on what you mean by "use" and what the docs say - but I guess you're looking for `Engine::GUI::GUIElement.new`?
<apeiros> or do you mean you have a toplevel class GUIElement and what to use it within Engine::GUI::GUIElement?
<jhass> xrlabs: don't have me have to go to omniref.com to figure out what you're using...
zachrab has quit [Ping timeout: 265 seconds]
wldcordeiro has quit [Ping timeout: 245 seconds]
ndrei has quit [Ping timeout: 250 seconds]
<xrlabs> yup apeiros
<Doue> jhass: I see, thanks a lot for this !
<apeiros> xrlabs: yup to which one?
<ninjs> Doue: yeah jhass's code is much prettier than mine haha
pengin has quit [Remote host closed the connection]
<xrlabs> yup to Engine::GUI::GUIElement.new
aw3jir809a has joined #ruby
<apeiros> ok. so problem solved?
<xrlabs> I guess =O
<apeiros> great :)
quimrstorres has quit [Remote host closed the connection]
<xrlabs> actually no, it's an uninitialized constant
<xrlabs> I'm trying to call it just in the file that defines GUIBase
<xrlabs> without requiring engine
<xrlabs> because engine is a motherfucker
amdbcg1 has joined #ruby
crazydiamond has joined #ruby
vim_shimm has quit [Ping timeout: 272 seconds]
Guest4446 has quit [Remote host closed the connection]
colorisco has joined #ruby
jottr_ has joined #ruby
arturmartins has joined #ruby
amdbcg has quit [Ping timeout: 246 seconds]
NinjaOps has quit [Quit: Konversation terminated!]
jottr has quit [Ping timeout: 256 seconds]
Irfan_A has quit [Quit: Leaving.]
Irfan_A has joined #ruby
<apeiros> xrlabs: note that this kind of language is not welcome in this channel. see http://ruby-community.com/pages/user_rules
Kricir has joined #ruby
Lloyd is now known as lloyd
nszceta has joined #ruby
speakingcode has quit [Ping timeout: 240 seconds]
n80 has quit [Quit: n80]
speakingcode has joined #ruby
ianseyer has quit [Ping timeout: 252 seconds]
Irfan_A has quit [Ping timeout: 264 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has quit [Ping timeout: 256 seconds]
juyhj has joined #ruby
Iniesta8 has quit [Quit: Textual IRC Client: www.textualapp.com]
Hijiri has joined #ruby
<juyhj> (1).+3
Zai00 has joined #ruby
sgambino has joined #ruby
<jhass> juyhj: still not boring?
amdbcg1 has quit [Ping timeout: 245 seconds]
RegulationD has quit [Remote host closed the connection]
havox has joined #ruby
havox has quit [Client Quit]
chridal1 has quit [Ping timeout: 265 seconds]
havox has joined #ruby
Soda has joined #ruby
odd is now known as o
<juyhj> hello jhass, how do I get to evalute the first method of fixnum, something like 1.methods[2..7].map {|m| m.call(1,2)}
o is now known as Guest8749
ndrei has joined #ruby
djbkd has quit [Remote host closed the connection]
Guest8749 is now known as oddskill
Akagi201 has joined #ruby
oddskill is now known as odd
<apeiros> juyhj: see Object#public_send
chridal1 has joined #ruby
bim has joined #ruby
<juyhj> thanks apeiros: irb(main):010:0> 1.methods[2..7].map {|m| 1.send(m,2)} => [3, -1, 2, 0, 0, 1]
bim is now known as Guest92531
jottr_ has quit [Ping timeout: 245 seconds]
jottr has joined #ruby
King_Dead has joined #ruby
yqt has joined #ruby
<King_Dead> anyone know how to install gems on windows?
<xrlabs> x
<bricker> gem install gemname usually
delianides has quit [Remote host closed the connection]
gsd has joined #ruby
<King_Dead> I've done that, but a bunch of errors pop up
<xrlabs> k i'll motherf*cker in another channel then
xrlabs has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
<ninjs> jhass: beat this formatting: https://gist.github.com/ninjs/4a5770ce29ef7ba4dd4c
<jhass> wut
<ninjs> (jokes)
<jhass> ninjs: heh
Akagi201 has quit [Ping timeout: 264 seconds]
chridal1 has quit [Ping timeout: 248 seconds]
<juyhj> ruby on windows, perhaps this: https://github.com/oneclick/rubyinstaller/wiki/faq
babykosh has joined #ruby
<apeiros> ninjs: my eyes!
<ninjs> and no... I didn't spend almost 20 minutes doing that...
Guest92531 has quit [Remote host closed the connection]
polarking has left #ruby [#ruby]
lukequaint has quit [Quit: Bye!]
<ninjs> apeiros: what's wrong with your eyes? haha
<juyhj> eyes = identity matrix
<vulix> How smoothly does build on OSX deploy on Linux go? Or is it really recommended to dev in Linux as well
jottr_ has joined #ruby
<King_Dead> ok I got rails to work now
RegulationD has joined #ruby
<ninjs> vulix: I haven't had many problems building on OSX and deploying on linux
<jhass> vulix: I think it's a pretty standard path, so tools should be ironed out for that. Developers with shiny MBPs and Linux on the server is quite common, especially in the Ruby community
<ninjs> Really depends on what kind of underlying stuff you're doing
paulcsmith has joined #ruby
<vulix> Ty guys
<vulix> I was worried it was like the Windows situation :P
jottr has quit [Ping timeout: 256 seconds]
<ninjs> I couldn't imagine trying to write Ruby on windows.. haha
stonecol1devin is now known as stonecolddevin
<ninjs> just having to set up environments for my coworkers to run some scripts of mine has been a headache
<vulix> yeah im surprised python has got cross-platform working so well
<vulix> I think its because theyve been on 2.7 forever and not everyones jumped to 3 yet
<ninjs> Eh, lots of science tools are on windows to start with, so python has to cater to that crowd
tgunr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
delianides has joined #ruby
tgunr has joined #ruby
<vulix> I'm wanting to port some topic modeling tools I use to Ruby from Java
<vulix> SciRuby though...I cant tell if its dead or ongoing
wallerdev has quit [Quit: wallerdev]
<juyhj> python is a big guy in science and machine learning
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
solars has quit [Ping timeout: 256 seconds]
<vulix> I know, it's just not enjoyable to use for me. I already use Java and R for that type of work anyway
user121212 has joined #ruby
failshell has quit [Read error: Connection reset by peer]
failshel_ has joined #ruby
<vulix> There seems to be a small group of people interested in Ruby for scientific applications...not many though
arturmartins has quit [Ping timeout: 256 seconds]
<centrx> SciRuby is ongoing
mary5030 has quit [Ping timeout: 245 seconds]
mary5030 has joined #ruby
<centrx> Some projects have a bad habit of not updating their websites
MatthewsFace has quit [Remote host closed the connection]
Zamyatin has joined #ruby
lukec has quit [Quit: lukec]
lanemeyer has quit [Ping timeout: 245 seconds]
scripore has quit [Quit: This computer has gone to sleep]
charliesome has joined #ruby
chridal1 has joined #ruby
Pumukel has joined #ruby
loechel has joined #ruby
failshel_ has quit [Remote host closed the connection]
jobewan has quit [Remote host closed the connection]
failshell has joined #ruby
juanpaucar has joined #ruby
paulcsmith has quit [Ping timeout: 256 seconds]
babykosh has quit [Quit: babykosh]
blackmesa has joined #ruby
loechel has quit [Client Quit]
gauke has joined #ruby
vt102 has quit [Remote host closed the connection]
<vulix> Any of you know how up to date this is? https://blog.engineyard.com/2013/ruby-concurrency
jxpx777 has joined #ruby
vt102 has joined #ruby
<Senjai> vulix: Probably fine
juanpaucar has quit [Ping timeout: 256 seconds]
<vulix> im confused how ruby can do multithreading, I thought it has a GIL
banister has joined #ruby
AlphaAtom has joined #ruby
spyderman4g63 has joined #ruby
<toretore> vulix: did you read the article you linked to?
<vulix> yes
djbkd has joined #ruby
<vulix> its not truly GIL
<vulix> xD
<vulix> er, not truly multithreaded
<toretore> yes, it is
<toretore> it's not parallel is what you mean to say
<toretore> (most of the time, on mri)
wald0 has quit [Ping timeout: 276 seconds]
<vulix> How widely adopted is Rubinius
<vulix> and toretore you're right thats a more precise answer
<havenn> vulix: Here's a nice introduction to MRI's GVL: http://www.jstorimer.com/blogs/workingwithcode/8085491-nobody-understands-the-gil
<vulix> ty
DrCode has quit [Read error: Connection reset by peer]
roshanavand has quit [Ping timeout: 255 seconds]
wallerdev has joined #ruby
roshanavand has joined #ruby
helpa has quit [Remote host closed the connection]
krisquigley has joined #ruby
helpa has joined #ruby
pagios has joined #ruby
mary5030 has quit [Remote host closed the connection]
zachrab has joined #ruby
mary5030 has joined #ruby
<juyhj> R is growing
Killerkeksdose_ has quit [Quit: No Ping reply in 180 seconds.]
rbennacer has quit [Remote host closed the connection]
Killerkeksdose has joined #ruby
ss has joined #ruby
ss is now known as Guest51219
lukec has joined #ruby
krisquigley has quit [Ping timeout: 252 seconds]
mtakkman has joined #ruby
<dudedudeman> the chat here or ruby in general
topolinux has quit [Quit: Sto andando via]
spyderman4g63 has quit [Read error: Connection reset by peer]
doodlehaus has joined #ruby
zorak8 has quit [Quit: Leaving]
plutonic has joined #ruby
spyderman4g63 has joined #ruby
zachrab has quit [Ping timeout: 265 seconds]
<vulix> or do you mean R statistical programming
* dudedudeman right over his head
<juyhj> R stats with fiddle, rstudio, shiny, and the like
<juyhj> R also interface easily with c++, forthan and other libraries
zachrab has joined #ruby
mrmargol_ has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
rbennacer has joined #ruby
odin22 has joined #ruby
mrmargolis has joined #ruby
GeorgeThompson has joined #ruby
<juyhj> here are slides of Ruby and R integration http://es.slideshare.net/sausheong/rubyand-r
mtakkman has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<juyhj> how can I filter all of those messages of people in people out, has joined has quit?
<apeiros> juyhj: go to the settings of your client
<apeiros> most have one to hide join/part
gfawcettpq has joined #ruby
<dudedudeman> i would LOVE to know how to do that as well
<dudedudeman> i'm using pidgin
<juyhj> ok, i found a little image for options done
codecop has quit [Remote host closed the connection]
<dudedudeman> oh my god
<apeiros> I googled
<juyhj> a little button just at the left of status, there is option, hide join and quit, done
<apeiros> and actually I googled for freenode's webchat
* dudedudeman bows down
motto has joined #ruby
<apeiros> and STILL found the solution for pidgin
<apeiros> ;-p
<dudedudeman> clearly i suck at the google
zorak8 has joined #ruby
<apeiros> next time, just search for a different thing than what you use :D
<juyhj> next book the art of googling
<dudedudeman> speaking of books, my copy of the pick axe book is going to be delivered today!
<jhass> dudedudeman: pidgin also has a smart filter plugin somewhere
marr has joined #ruby
<juyhj> I learned a lot with pickage but I learned online, didn't buy anything
m8 has quit [Ping timeout: 248 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dudedudeman> i think i got it set up....
<juyhj> one small advantage of using webchat.freenode is that you can browse other things at the same time very easily
<dudedudeman> true
<jhass> dudedudeman: get the pidgin plugin pack and enable IRC helper or whatever it was called
mr_snowf1ake has joined #ruby
<juyhj> dudedeman, you shouldn't repeat yourself, ruby is dry
<dudedudeman> the way i run this is i have chat, terminal and email client open on my left monitor, and all other windows full screened on my main monitor
<toretore> you mean like switching between windows?
mtakkman has joined #ruby
<jhass> toretore: tabs! that's totally different!
Guest51219 has quit [Ping timeout: 264 seconds]
tosbourn has joined #ruby
Guest51219 has joined #ruby
<toretore> i find switching windows much easier than switching tabs
<dudedudeman> toretore: same here. i don't haver to change the position with my hand to do so
<toretore> and how do you switch between channels inside the tab?
<juyhj> in webchat channels are like tabs, but not real tab, don't know the hotkey to switch tabs
goleldar has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<jhass> Alt+tab, Alt+^, Ctrl+tab all pretty much the same
rajeshchawla has joined #ruby
rajeshchawla has quit [Client Quit]
pdoherty has joined #ruby
seal has joined #ruby
chridal1 has quit [Ping timeout: 252 seconds]
delianides has quit [Read error: Connection reset by peer]
<dudedudeman> yeah, Ctrl+tab switches windows for me in pdigin
plutonic has quit [Quit: plutonic]
yqt has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
psy_ has quit [Ping timeout: 250 seconds]
<juyhj> jhass in the firefox webchat control+tab is to switch to another tab in the navigator but all channel of webchat are in one unique tab
tosbourn has quit [Ping timeout: 272 seconds]
psy_ has joined #ruby
Rapier- has quit [Quit: (null)]
<juyhj> by the way, a question of javascript, how can one discover what key are bound to any event, that is how you discover keys associated with events
zorak8 has quit [Remote host closed the connection]
<jhass> my point is that switching between tabs (Ctrl+tab) and switching between windows (alt+tab, alt+^) doesn't make much of a difference to me, so it doesn't influence my decision whether to prefer a web based tool or a native application
m8 has joined #ruby
DEA7TH has quit [Ping timeout: 248 seconds]
aw3jir809a has quit [Ping timeout: 255 seconds]
<jhass> there's #javascript or ##javascript, I don't remember (probably the later)
<juyhj> ok, jhass I discovered that you don't have all the answers ))
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<vulix> havenn I read through that GIL blog post, ty
<jhass> or maybe I stay on topic ;)
gauke has quit [Read error: Connection reset by peer]
MatthewsFace has joined #ruby
<juyhj> #javascript is full of people.
m8tt8 has joined #ruby
motto has quit [Ping timeout: 250 seconds]
<juyhj> I find handy watir with ruby, but I remember waiting for a new version to catch up with new versions of firefox
turtil-kun has joined #ruby
wallerdev has quit [Quit: wallerdev]
doodlehaus has joined #ruby
werelivinginthef has quit [Remote host closed the connection]
bim has joined #ruby
Igorshp has joined #ruby
bim is now known as Guest28443
Hijiri has quit [Quit: WeeChat 1.0.1]
kadoppe has quit [Ping timeout: 255 seconds]
fabrice31 has joined #ruby
<mr_snowf1ake> so i have an alias in zsh... alias ls="ls -Gp". so when i do "type ls" it says it's an alias to ls -Gp. When I do ruby -e 'puts `type ls`' it outputs that ls is /bin/ls. is there a way to get ruby to read in these aliases? is there some equivalent to a .bashrc or .bash_profile for ruby possibly? :P
<juyhj> askend in javascript about discovering hot keys, it seems there is not an easy way
rodfersou has quit [Ping timeout: 244 seconds]
m8 has quit [Ping timeout: 250 seconds]
rodfersou has joined #ruby
vim_shimm has joined #ruby
kadoppe has joined #ruby
<jhass> mr_snowf1ake: you could /bin/bash -c it, but it's meh
<jhass> just not worth it, use Dir[]/Dir.entries to list files in Ruby
zorak8 has joined #ruby
riskish has joined #ruby
chridal1 has joined #ruby
Filete has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gauke has joined #ruby
zorak8 has quit [Read error: Connection reset by peer]
Igorshp has quit [Remote host closed the connection]
<mr_snowf1ake> jhass: my alias is in ~/.bashrc and i tried running ruby -e 'puts `/bin/bash -c "type ls"`' and it still didn't come up with the right output. hmm...
fabrice31 has quit [Ping timeout: 252 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mr_snowf1ake> i also tried making it into a login shell with the --login option
wottam has joined #ruby
<jhass> what's your true goal?
pengin has joined #ruby
motto has joined #ruby
pdoherty has quit [Quit: Leaving]
fryguy9 has joined #ruby
kyrylo has quit [Ping timeout: 255 seconds]
<havenn> mr_snowf1ake: ruby -e 'puts `bash -ci "type ls"`' #=> ls is aliased to `echo omgwtfbbq!'
<mr_snowf1ake> jhass: i have a git commit hook written in ruby. i have cmake aliased for a system specific library configuration. i want the hook to respect that
gauke has quit [Client Quit]
<mr_snowf1ake> havenn: ooh cool, thanks!
a5i has quit [Quit: Connection closed for inactivity]
vim_shimm has quit [Ping timeout: 276 seconds]
<juyhj> -ci interactive
doodlehaus has quit [Remote host closed the connection]
<mr_snowf1ake> ahh, alright
<jhass> I wonder if there isn't some environment variable convention for cmake, like there's CC and stuff
m8tt8 has quit [Ping timeout: 250 seconds]
<mr_snowf1ake> i don't know... i tried looking for that, but couldn't find anything.
<mr_snowf1ake> but jhass, i would agree that that is the right way to solve this..
<mr_snowf1ake> i'll try #cmake as well
jgoyon has quit []
teddyp1cker has quit [Remote host closed the connection]
cocotton has quit [Remote host closed the connection]
m8tt8 has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
teddyp1cker has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lolmaus has quit [Quit: Konversation terminated!]
ldnunes has quit [Read error: Connection reset by peer]
hutch78 has joined #ruby
roshanavand has quit [Remote host closed the connection]
King_Dead has quit [Ping timeout: 246 seconds]
ismaelga has joined #ruby
freerobby has joined #ruby
ianseyer has joined #ruby
motto has quit [Ping timeout: 248 seconds]
<fmcgeough> /reload style
<jhass> style not found
<fmcgeough> apparently not :-)
a346 has joined #ruby
hazelux_ has joined #ruby
<adaedra> abort/retry/ignore?
speaking1ode has joined #ruby
nszceta has quit [Quit: Textual IRC Client: www.textualapp.com]
teddyp1cker has quit [Ping timeout: 265 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maletor has quit [Read error: Connection reset by peer]
paulcsmith has joined #ruby
speakingcode has quit [Ping timeout: 245 seconds]
fryguy9 has quit [Quit: Leaving.]
MasterPiece has joined #ruby
hazelux has quit [Ping timeout: 250 seconds]
kirun has quit [Quit: Client exiting]
goleldar has quit [Remote host closed the connection]
willharrison has joined #ruby
failshell has quit [Remote host closed the connection]
paulcsmith has quit [Ping timeout: 245 seconds]
scripore has joined #ruby
kristofferR has joined #ruby
juyhj has left #ruby [#ruby]
ta has quit [Remote host closed the connection]
mengu has joined #ruby
mary5030 has quit [Remote host closed the connection]
<user121212> newbee here, I'm learning the CSV library, I want to add some string into a csv inside a block, But it only adds the first row, can you help me to find the reason?
colorisco has quit [Ping timeout: 245 seconds]
scripore has quit [Client Quit]
bMalum has quit [Quit: bMalum]
fryguy9 has joined #ruby
blizzy is now known as _blizzy_
<jhass> user121212: you're overwriting the file in each iteration
<wasamasa> jhass: any news from our bad troll?
scripore has joined #ruby
<jhass> not so far
allcentury has quit [Ping timeout: 252 seconds]
<user121212> @jhass yes, should I open the csv from outside the block?
csmb has joined #ruby
<jhass> user121212: yeah, basically swap the blocks around
m8tt8 has quit [Ping timeout: 240 seconds]
<user121212> @jhass okay, thank you
kromm has joined #ruby
kromm has left #ruby [#ruby]
<hutch78> Hello friends, I have been trying to debug an issue I am receiving.. I am trying to schedule cron tasks using the whenever gem. I am receiving an error in cron_error_log.log which reads “bin/rails:7: undefined method `require_relative' for main:Object (NoMethodError)”. - anyone have exprience with this ? it works PERFECT locally
zorak8 has joined #ruby
freerobby has quit [Quit: Leaving.]
<jhass> hutch78: sounds like your server has an ancient ruby version (1.8)
<hutch78> which ruby shows 2.1.5
mtakkman has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<jhass> well, not inside the cron task I bet
<hutch78> ahh
nettoweb has joined #ruby
greenbagels has joined #ruby
zorak8 has quit [Remote host closed the connection]
jxpx777_ has joined #ruby
jxpx777_ has quit [Client Quit]
moeabdol has quit [Ping timeout: 256 seconds]
JoshGlzBrk has joined #ruby
iasoon has quit [Ping timeout: 272 seconds]
JoshGlzBrk has quit [Client Quit]
turtil-kun has quit [Quit: WeeChat 1.1.1]
icebourg has quit []
zorak8 has joined #ruby
ghr has joined #ruby
evanjs has quit [Remote host closed the connection]
michaeldeol has joined #ruby
jxpx777 has quit [Ping timeout: 246 seconds]
<jhass> ?crosspost hutch78
<ruboto> hutch78, Please do not crosspost without at least telling so. Experience shows that people don't bother to inform the other channels of provided solutions, therefore it is considered rude.
<Senjai> jhass: Do we not use helpa anymore? j/c
<jhass> Senjai: yeah
<Senjai> !tips
<Senjai> jhass: Yeah we do, or yeah we dont :P
<jhass> ruboto is our new overlord
<jhass> if you want any fact added, just note so ;)
<adaedra> helpa is dead, long live ruboto
edwinvdgraaf has joined #ruby
<mr_snowf1ake> is the source for ruboto available somewhere public? :)
freerobby has joined #ruby
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
TerjeLarsen has quit [Ping timeout: 250 seconds]
<dorei> is there a way to rewrite/rethink this: @file = arg.is_a?(StringIO) ? arg : File.new(arg, 'r') ?
user121212 has quit [Quit: Page closed]
<adaedra> Are you sure you will only have StringIO or String as input ?
<adaedra> Can’t you have other kinds of IO, like a File or a Socket?
<jhass> mr_snowf1ake: no
<Senjai> Why wouldnt it be public >.>
<Senjai> ?test
<ruboto> I don't know anything about test
<jhass> Senjai: because we can ban and kick with it
edwinvdgraaf has quit [Ping timeout: 250 seconds]
icarus has joined #ruby
fmcgeough has left #ruby [#ruby]
<dorei> adaedra: maybe a File
<jhass> dorei: respond_to? to_io is a nice way to duck type on IO, afaik
<Senjai> jhass: /cs access not good enough anymore ? :P
fmcgeough has joined #ruby
<jhass> Senjai: programmers are lazy ;)
doodlehaus has joined #ruby
<Senjai> jhass: Theres a plugin for that, on almost every irc client ever xD
<jhass> Senjai: timed bans and stuff like that ;)
<adaedra> Senjai: bot kickban can be automated and more precise than ChanServ or /mode
Skero has joined #ruby
<Senjai> Ah
sohrab has quit [Ping timeout: 252 seconds]
<mwlang> today is a good day. Everything I tried just worked and I had no lame questions slip out to y’all.
<mwlang> :-)
<jhass> automatic mask choosing by nick & auth status and so on
<adaedra> dorei: then as jhass said, replacing your test by a duck-typing one (test for a #read method, for example) or find a common ancestor to all classes (maybe IO) would be better
<apeiros> Senjai: cs does not support kick, and cs akick without mask goes for authname
<jhass> not that it already does that, but it gives us the possibility
<apeiros> Senjai: and the plan for the bot is to go by nick and automatically ban nick + ip, with the ip only for a limited time
<adaedra> but otherwise it’s compact enough, dorei
ksto has joined #ruby
fryguy9 has quit [Quit: Leaving.]
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
<dorei> >> StringIO.new("some string").respond_to? :to_io
<ruboto> dorei # => uninitialized constant StringIO (NameError) ...check link for more (https://eval.in/314686)
sohrab has joined #ruby
<dorei> >> require 'stringio' ; StringIO.new("some string").respond_to? :to_io
<ruboto> dorei # => false (https://eval.in/314687)
<Senjai> apeiros: Ah
chridal1 has quit [Ping timeout: 255 seconds]
<jhass> dorei: yeah, looks like it doesn't :/
<adaedra> There’s no common ancestor
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<adaedra> File has IO, but StringIO has IO::generic_writable and IO::generic_readable
fryguy9 has joined #ruby
ksto has left #ruby [#ruby]
rodfersou has quit [Quit: leaving]
sevvie has quit [Ping timeout: 264 seconds]
bluOxigen has quit [Ping timeout: 276 seconds]
greenbagels has quit [Read error: Connection reset by peer]
icebourg has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sevvie has joined #ruby
mrmargolis has quit [Remote host closed the connection]
Skero has quit [Ping timeout: 250 seconds]
bishop has joined #ruby
doodlehaus has quit [Remote host closed the connection]
mistergibson has joined #ruby
RegulationD has quit [Remote host closed the connection]
willharrison has quit [Quit: Textual IRC Client: www.textualapp.com]
sgambino has joined #ruby
<hutch78> jhass, you were right about my system ruby version, it reports 1.8 once i ran $ rvm system
havox has quit [Ping timeout: 256 seconds]
icebourg has quit []
lanemeyer has joined #ruby
sevvie has quit [Ping timeout: 246 seconds]
fmcgeough has quit [Quit: fmcgeough]
<dudedudeman> Throw that bad boy up on gist!
<dudedudeman> all the cool kids use gist
Guest51219 has quit [Ping timeout: 250 seconds]
amstv has joined #ruby
<nemish> if i wanted to rescue that script if /usr/bin/aws (pip awscli) wasn't installed or if aws returned error because of creds missing... how would I go about doing that
ClosedGL has joined #ruby
<nemish> dudedudeman, yeah sorry already had it there for another channel
speaking1ode has quit [Ping timeout: 248 seconds]
<dudedudeman> nemish: ha, i ain't mad
sgambino has quit [Client Quit]
Spami has joined #ruby
ki0 has quit [Remote host closed the connection]
<nemish> i'm far from a ruby guy this was as good as I got... just have no idea how to rescue it :(
rgb-one has quit [Read error: Connection reset by peer]
Spami has quit [Client Quit]
speakingcode has joined #ruby
davedev2_ has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
Pumukel has quit [Remote host closed the connection]
davedev24_ has quit [Ping timeout: 264 seconds]
rbennacer has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
havox has joined #ruby
RegulationD has joined #ruby
paulcsmith has joined #ruby
sevvie has joined #ruby
balazs_ has quit [Ping timeout: 256 seconds]
jottr_ has quit [Ping timeout: 240 seconds]
<bricker> nemish: what does the command do if either of those cases are true?
Rickmasta has joined #ruby
Spami has joined #ruby
zorak8 has quit [Ping timeout: 250 seconds]
<nemish> returns 1
narcan has joined #ruby
<bricker> nemish: great, just check that condition and do something
<bricker> if exit_status > 1 ...
<nemish> rescue?
<bricker> er
<bricker> > 0 would be better
djbkd has joined #ruby
<bricker> nemish: you don't need to rescue if it just returns 1.
user121212 has joined #ruby
<bricker> Well
<nemish> but its exit status of tags = Facter::Util::REsolution.exec
<bricker> right, it sounds like it's just the bash exit status
<bricker> If it works, does it return 0?
<nemish> has to return a 0 (hence the rescue i'm guessing)
<nemish> yes
<bricker> yes
<bricker> so just check the exit status
<bricker> and do something if the exit status is non-zero
<nemish> how do you check the exit_status on tags = ?
decoponio has quit [Quit: Leaving...]
juanpaucar has joined #ruby
theRoUS has joined #ruby
<bricker> nemish: tags will be set to 1 or 0
theRoUS has quit [Changing host]
theRoUS has joined #ruby
mistermocha has joined #ruby
<nemish> so basically line 9-23 would only get run if exit of tags exec is 0... else rescue just so the ruby script returns 0 exit code
thomcom has joined #ruby
<thomcom> whoa
<thomcom> I just got LocalJumpError: unexpected return
speakingcode has quit [Ping timeout: 256 seconds]
<thomcom> Is early termination illegal in ruby?
<bricker> thomcom: it's illegal from main
odin22 has quit [Read error: Connection reset by peer]
<bricker> and from non-methods
<bricker> class bodies and stuff
<thomcom> my early termination is from deep in activerecord objects
mjuszczak has joined #ruby
<thomcom> Maybe the error is something I'm not expecting then :D
<thomcom> In a statesman transition callback actually.
<bricker> thomcom: It's unlikely that the Rails team released a version with a LocalJumpError
ndrei has quit [Ping timeout: 256 seconds]
jottr_ has joined #ruby
<thomcom> yup
<bricker> . . .
<bricker> *high fice*
<bricker> high face*
<bricker> high five*
<bishop> nailed it :P
FernandoBasso has joined #ruby
<bricker> :P
<thomcom> statesman callback is somehow from main? From main of a thread?
<adaedra> *high fist*
<adaedra> ooops
riotjones has joined #ruby
mr_snowf1ake has quit [Remote host closed the connection]
mr_snowf1ake has joined #ruby
<thomcom> ugh well now I get to cordone off half a method into an else hehe
ndrei has joined #ruby
juanpaucar has quit [Ping timeout: 265 seconds]
<dudedudeman> Wooo! got my pickaxe book
<dudedudeman> it's a lot thicker than i expected.....
<ninjs> wow.. that's so dumb haha the excel libraries available for python are so much cooler than the ones for ruby
<bishop> Could someone explain the concept whole "taint" thing for objects?
d10n-work has quit [Quit: Connection closed for inactivity]
mr_snowf1ake has quit [Remote host closed the connection]
icebourg has joined #ruby
hiyosi has joined #ruby
ss has joined #ruby
GenghisKen has quit [Ping timeout: 250 seconds]
ss is now known as Guest9823
mjuszczak has quit [Ping timeout: 276 seconds]
<bricker> bishop: they're flags for your objects to tell the program whether the object can be trusted or not
<bishop> What determines a trusted object
<bishop> Like sanitization?
<bricker> bishop: Ruby does in some places, and you can also set the flags yourself
havox has quit [Ping timeout: 255 seconds]
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
<xxneolithicxx> i think its used a lot by cgi/web stuff although i havent used it much myself
<nemish> bricker, modules/ec2tags/lib/facter/ec2tags.rb:8:in `<main>': undefined local variable or method `exit_status' for main:Object (NameError)
<bricker> bishop: so for example, the strings in ENV are automatically set to "tainted"
riotjones has quit [Ping timeout: 248 seconds]
<bricker> nemish: it's not literally copy-and-paste "exit_status"
mjuszczak has joined #ruby
<thomcom> Does every object have a taint flag already, or is this something you need to create yourself?
<bricker> I'm saying your method returns an exit status, and you're setting that value to the "tags" variable
krisquigley has joined #ruby
<bricker> thomcom: taint, untaint, trust, untrust (and related check methods) are defined on Object
lidenskap has quit [Remote host closed the connection]
<nemish> bricker, no my variable returns array from the output of the command
Kricir has quit [Remote host closed the connection]
Nimf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nemish> so when the exec can't find the application it fails
<bricker> nemish: fails in what way
jerius has quit [Quit: /quit]
<nemish> bricker, /usr/share/gems/gems/json-1.7.7/lib/json/common.rb:155:in `initialize': no implicit conversion of nil into String (TypeError)
rbennacer has joined #ruby
<bricker> nemish: sorry, there's not much I can do with that.
<nemish> so if tags is nil
<nemish> exit 0 rather than continuing
scripore has quit [Quit: This computer has gone to sleep]
lidenskap has joined #ruby
fryguy9 has quit [Quit: Leaving.]
<bricker> nemish: I still don't know what you neab by "it fails"
Marabo has joined #ruby
<bricker> mean* by
<nemish> would !(tags.nil)? work?
colorados has quit [Ping timeout: 256 seconds]
<bricker> nemish: `!tags.nil?` will check if tags is nil
<Marabo> How big is Ruby compared to Python?
<xxneolithicxx> thomcom: a common example is any data from a web app, like ENV should be considered dangerous until sanitized and explicitly marked not so. and you can make dangerous functions check the taintness of objects to decide whether to handle the data differently based on a security context level
<nemish> if tags is not nil
<bricker> Marabo: in LOC?
mojo619 has quit [Quit: mojo619]
<Marabo> bricker, LOC?
<xxneolithicxx> LOC =lines of code
Filete has joined #ruby
<thomcom> Hehe
<thomcom> On WINDOWS???
<Marabo> No, semantics and libraries etc.
<thomcom> Binary size?
krisquigley has quit [Ping timeout: 240 seconds]
narcan has quit [Ping timeout: 244 seconds]
<Marabo> stdlib and such
<thomcom> Hehe popularity wise?
<thomcom> I think ruby has a MUCH bigger set of tools than python.
<thomcom> 5x
<thomcom> Python has much much more do-it-yourself.
<bishop> Marabo: I would say that one area where I use Python over ruby is most things math related. Python had a much larger selection of mathematical tools.
<bricker> Marabo: calculating now...
<Marabo> Sure, I think too. I asked the question, "How long does it take to learn Python well for a C++ programmer" in #Python and they went like, 5 years etc. So it seems pretty big language-wise.
<thomcom> Want a python web server? There's no rails! You create your own authentication, data access layer, etc etc.
mjuszczak has quit [Ping timeout: 250 seconds]
<bishop> Ruby is cool for web stuff, but I can't really imagine doing anything at scale with ruby long term.
<thomcom> numpy is pretty useful bishop
<thomcom> Seems like all that ruby is really for is web stuff at this point.
<bricker> oh he doesn't care about source LOC
<bricker> :(
CloCkWeRX has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
<Marabo> I mainly want a language for web lol.
user121212 has quit [Ping timeout: 246 seconds]
<thomcom> Ruby or Javascript :)
<bricker> well, the answer is: mri = 1,778,753 LOC, cpython = 1,802,209
<bishop> Oh yeah! No doubt, thomcom. I just am saying that Python generally has more math related libraries in my day to day programming
<Marabo> But I want to know what I dig into. Like, I didn't know Python was huge.
nemish is now known as nemish_afk
oetjenj has joined #ruby
<adaedra> who has a huge python?
<Marabo> lol
<bricker> Python and Ruby are basically the same. Marabo as a cpp dev you will be more at home using Python.
<thomcom> bishop R is my favorite math language, but I have used numpy a few times when my data was already available in python
ndrei has joined #ruby
<thomcom> Ruby is less strict than python
mjuszczak has joined #ruby
<Marabo> bricker, Really?
<thomcom> So if you as a C++ programmer want strictness, but versatile, go with python.
<Marabo> I don't know but for some reason I want to go with Ruby.
<thomcom> If you want to get as DYNAMICAL as you can, go with Ruby. :)
<ninjs> thomcom: There is django.. it's pretty close to Rails. Also saying that Ruby has a bigger set of tools is probably false
<ninjs> ruby has more web tools, but python has more general tools
<bishop> Marabo, learning any language isn't something that you need to take a lot of time to consider. Virtually any programming language will give you the insight and confidence to switch later on if you don't like.
shellfu is now known as shellfu_afk
<bishop> Given that you are looking at web-dev stuff ruby is a good place to start
<Marabo> bishop, Yea that's what I also think.
<bishop> Check out sinatra, it's small light-weight and you can have a working site in a weekend :)
<thomcom> ninjs hard to argue with that. I've written a fair amount of python and it feels a lot more like the wild west to me.
<thomcom> bishop Marabo agreed totally - it really doesn't matter much
<thomcom> Marabo make a list of stuff you like about Ruby and become a Rubyist. Simple. :) Same thing business execs do when deciding on a tech.
<ninjs> thomcom: I think it's all just what you are used to. Python's syntax can feel very wild west, but there's only one way to do things (python way) vs. Ruby's many ways to do things
<Marabo> I really want to learn the language and feel comfortable with it. I mean the flow is so important. Like in C, you have header files, using the cpp files to include them, know how it works. That's what I'm mainly looking for in a language.
<bishop> thomcom lol
<Marabo> in C++*
<ninjs> Marabo: both Ruby and Python have those elements
<bishop> yep
<ninjs> either through requiring gems in ruby, or importing libraries in python
<thomcom> Yeah python syntax is NOT wild west, it is very strict and that is a nice thing about it. What I mean is, after doing research looking for toolsets for a variety of web and numerical tasks, Python came up short way more often than Ruby does in my experience ninjs
<Marabo> Is Ruby as big or bigger than Python? Semantics and such. Much to learn?
<thomcom> I miss header files Marabo
<thomcom> You will not find them anywhere else.
<Marabo> thomcom, They are awesome.
<thomcom> Marabo maybe you should stay a C++ programmer
<ninjs> thomcom: web tasks definitely. Other tasks.. I think it really just depends. I just said maybe 10 minutes ago how the libraries for working with excel files are drastically better than the ones available for ruby.
rbennacer has quit [Remote host closed the connection]
<jhass> Marabo: I'd say syntax is less, there's some redundancy in some semantics you can safely ignore for quite a while though
tosbourn has joined #ruby
<Marabo> thomcom, How so?
<thomcom> When I was a C++ programer I really believed in code beauty. Now that I know ten languages and work with varied groups I know that all code is shit.
<ninjs> thomcom: I'm not sure I meant that syntax is wild west, but you don't often have the simple methods that good ruby code exhibits.
<thomcom> So, keep the innocence and make beautiful code. Nothing brings me more pleasure still than a well organized header file. :D :D
<jhass> Marabo: a surprising amount of stuff is just method calls or syntax sugar for them
<bricker> thomcom: all code is shit, just write it, collect paycheck, move on.
amstv has quit [Ping timeout: 246 seconds]
<bishop> Marabo, Don't sweat syntax.
<Marabo> jhass, Yea did read that :p
<thomcom> bricker ikr
<Marabo> Will any background in C++ help learning Ruby?
mary5030 has joined #ruby
<bricker> Marabo: yes
<bricker> But, also Python
<thomcom> Oh strict indentation is also AWESOME
tosbourn has quit [Remote host closed the connection]
<jhass> Marabo: blocks is probably the hardest part to grasp, after that it's easy
freerobby1 has quit [Quit: Leaving.]
<bishop> object oriented yo
GenghisKen has joined #ruby
<Marabo> I don't like Django, really. And as I said, I want a web language.
<Marabo> So I much rather use Rails.
<thomcom> You'll have no trouble with Ruby Marabo. There will be weird syntaxes that take you a long time to accept, but the core principles are always the same from language to language (except functional) hehehe
<bishop> Learn you a Haskell for great good
Guest9823 has quit [Ping timeout: 250 seconds]
<Marabo> thomcom, Yea that's true. But the #Python guys scared the sht out of me telling me it would take 5 years to decade to become good at Python.
<thomcom> know haskell bishop?
<Marabo> I was like, it took me 3 years for C++..
<thomcom> Yeah I think they probably just meant it will take you 5 years to reproduce PEP 8 exactly and perfectly without fail.
<jhass> Marabo: well, that's because "good" is arbitrary
<Marabo> jhass, True,
<jhass> so you were up to the interpretation of it of whoever was around
colorados has joined #ruby
mengu has quit [Remote host closed the connection]
<Senjai> Marabo: Deciding to be a good programmer is hard. Especially if you work for or around terrible people
<Senjai> That decision means leaving that position.
<Marabo> What I mean by good is to really be able to do what you want and understand one of the best ways of doing it.
<Senjai> A lot of people just stick it out for the paycheck and have no intetion on getting better, just getting the job done
<Marabo> Senjai, Currently I'm doing it for myself.
<bishop> That's nonsense. Find something you like. Make some things you like. Don't sweat the gurus, then you will become one. It's all just experience
<Senjai> Marabo: If you're not already in the industry, you're set!
<jhass> a common saying is that to truely master a language you need to work for 10 years with it, but I'd say you're usually productive with it already in less than 6 months, less even depending on your prior skillset
<Marabo> Senjai, Got 5 years until I get into the industry :p
<Senjai> Marabo: Nonsense, took me 5 months of self teaching, I'm sure you could do the same
<thomcom> Honestly who wants to be a true language master
<thomcom> 10 years is 1.5 epochs in computer time
iasoon has joined #ruby
<thomcom> 30 years is literally 5 pivotal changes in technology
<thomcom> or more
<Senjai> Marabo: The hardest thing to understand about code, is that its just code. No matter what language, it all works the same. Things call other things.
mary5030 has quit [Ping timeout: 250 seconds]
fryguy9 has joined #ruby
lukec has quit [Quit: lukec]
<thomcom> the more you know the better, because the better equipped you will be to completely abandon what you were doing and do something different
<Marabo> Of course, mastering something will take a life time. But as I said before, what I mean by being good is to really do what you want. "Oh I want to create a web application x that does y".
<Senjai> Marabo: Like league of legends? Do something cool with its api
<Senjai> Like games? make a tetris clone
<Senjai> Like networking? Make an IRC client
<thomcom> indeed Marabo
<thomcom> Make Stuff
<Senjai> and so on and so forth
<Marabo> Senjai, I have made a NES emulator in C++.
<Senjai> Marabo: That's impressive
<thomcom> Only by making stuff in your spare time will you truly become a master. :D
<Senjai> Marabo: open source?
<thomcom> I have 4 kids so I don't do much in my spare time anymore :D
<thomcom> Except play Pillars of Eternity
<Marabo> Senjai, Nop. It was for Uni project.
<Senjai> thomcom: That'd slow ya down
<Marabo> Senjai, Too overkill.
<Senjai> Marabo: lol what? Uni project? :P
<Marabo> But I needed the grade badly.
<Marabo> Yes.
<Marabo> University.
<Senjai> I get it
freerobby has joined #ruby
<Senjai> That just sounds like a very long project for uni
<Senjai> Like horribly involved
michaeldeol has joined #ruby
<Senjai> Marabo: You should open source it
<Marabo> Senjai, Not really, but took some time.
<Marabo> Senjai, How so?
havox has joined #ruby
<thomcom> Pretty awesome Marabo
<thomcom> Emulators are deep technology to build
<thomcom> You should open source it because it is good resume materual.
<thomcom> If I interviewed you and knew you wrote an emulator I would want to hire you probably.
<eam> which is why it's a good idea to open source stuff -- published material is your resume
<thomcom> more important than any piece of paper
elfuego has quit [Quit: elfuego]
<Marabo> I don't see it as a big deal tho but yea sure maybe I will open source it.
postmodern has joined #ruby
x1337807x has quit [Ping timeout: 272 seconds]
<Senjai> thomcom: Eh, wouldn't go that far. You can accomplish anything and still write terrible terrible code
<Senjai> Marabo: You should
Renich has joined #ruby
<Senjai> Open source EVERYTHING
djbkd has quit [Remote host closed the connection]
<postmodern> say you follow semver, and you have a method that returns a Hash{String => String}, but you want to include additional data in that Hash, how do you maintain backwards compatibility? Make a String-like class?
paulcsmith has quit [Quit: Lingo: www.lingoirc.com]
<jhass> tricky, is the called supposed to iterate over it or only access specific keys or both?
<jhass> *caller
ghostmoth has joined #ruby
<postmodern> jhass, yeah it's a collection of key value data
<shadoi> postmodern: if it's a public API that's a breaking change and requires a minor revision
<postmodern> jhass, but recently additional structured data was added and I want to expose that
x1337807x has joined #ruby
<jhass> then I think if its contract is String => String and you want to add data that's not String => String that's pretty clearly breaking API
fabrice31 has joined #ruby
davedev2_ has quit []
RegulationD has quit [Remote host closed the connection]
davedev24_ has joined #ruby
hutch78 has quit [Quit: hutch78]
<postmodern> jhass, even if i do something evil like use method_missing to forward all string functions to the string?
odd is now known as oddskill_away
<postmodern> or are fake-string-classes a smell i should avoid?
<jhass> yeah, the caller could have ignored you contract and do case key; when String for whatever strange reason
ZeeNoodleyGamer has quit [Quit: Leaving]
<jhass> and you can't trick Module#===
<eam> just modify the instance
<jhass> or similar things
<eam> no big deal
nettoweb has quit [Quit: Textual IRC Client: www.textualapp.com]
<xxneolithicxx> can you add an optional param to the method :compat = false and if compatibility return the new hash otherwise the old one and remove the compat setting with the transition to next major version
nettoweb has joined #ruby
<xxneolithicxx> reverse what i said, :compat = true
hazelux_ has quit [Remote host closed the connection]
tearan_ has joined #ruby
failshell has joined #ruby
<postmodern> jhass, er the data will be added to the value, not the key
<jhass> I was more seeking an example you can't fake metaprogramatically (I think I made that up right now :D)
dfinninger has quit [Remote host closed the connection]
jgrevich has joined #ruby
<jhass> I like xxneolithicxx idea, let the caller explicitly enable the new behavior until next major
mjuszczak has quit []
<eam> >> special="a string"; special.instance_eval { def extra(x=nil); @x=x if x;@x; end }; special.extra "data"; [special, special.class, special.extra]
<ruboto> eam # => ["a string", String, "data"] (https://eval.in/314692)
fabrice31 has quit [Ping timeout: 264 seconds]
tearan has quit [Ping timeout: 256 seconds]
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mjuszczak has joined #ruby
ClosedGL has quit [Quit: Leaving]
failshell has quit [Ping timeout: 245 seconds]
enebo has quit [Quit: enebo]
fryguy9 has quit [Quit: Leaving.]
jerius has joined #ruby
kwd has quit [Quit: I'm using a Free IRC Bouncer from BNC4FREE - http://bnc4free.com/]
riskish has quit [Quit: Textual IRC Client: www.textualapp.com]
Spami has quit [Quit: This computer has gone to sleep]
zorak8 has joined #ruby
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Deele has quit [Ping timeout: 256 seconds]
musashi1 has joined #ruby
ferz_ has joined #ruby
terlar has quit [Ping timeout: 264 seconds]
ndrei has quit [Ping timeout: 250 seconds]
jeramy_s has joined #ruby
babykosh has joined #ruby
<ferz_> Is there a method in stdlib to check multiple conditions like this without this verbosity? (1..10).detect { |i| i % 5 == 0 and i % 7 == 0 }
ndrei has joined #ruby
<jhass> no, you won't get better than this
<ferz_> I need to check multiple numbers for this condition, can I have these numbers grouped in array ot something?
<thomcom> lol
<thomcom> nice fizzbuzz
<ferz_> no its not fizzbuzz
<jhass> .find {|i| i % 5 == 5 && i % 7 == 0 } # just style
oetjenj has quit [Ping timeout: 248 seconds]
doodlehaus has joined #ruby
mengu has joined #ruby
<jhass> if you have a real lot of them you can use Enumerable#all?
<weaksauce> i % 5 == 5
<weaksauce> huh?
<thomcom> pack those conditionals into a method :D
<jhass> but I wouldn't bother < 3-4
<thomcom> that'll give you your antiverbosity
<jhass> heh, typo ;)
aw3jir809a has joined #ruby
<weaksauce> :)
<thomcom> i.satisfies() lol
<jhass> [5, 7, 13, 21].all? {|n| i % n == 0 }
<ferz_> I see, Ruby surprises me a lot, I figure there might be some hidden method that makes it more terse
<ferz_> yeah something like that
blackmesa has quit [Ping timeout: 264 seconds]
<jhass> as said, I'd prefer to write it out for 2-3 conditions
mistermocha has quit [Ping timeout: 250 seconds]
<ferz_> sounds good, thanks
mojo619 has joined #ruby
<shevy> ferz_ it is just a method, .all?
vim_shimm has joined #ruby
<shevy> think of it as a filter
aw3jir809a has quit [Client Quit]
mistermocha has joined #ruby
RegulationD has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
a5i has joined #ruby
bishop has quit [Ping timeout: 264 seconds]
<jhass> you linked any? :P
teddyp1cker has joined #ruby
jeffreyio has joined #ruby
<shevy> hmmm
mjuszczak has quit [Read error: Connection reset by peer]
<shevy> weird
lukec has joined #ruby
mjuszczak has joined #ruby
oetjenj has joined #ruby
axisys has quit [Remote host closed the connection]
seal has quit [Quit: Ex-Chat]
mojo619 has quit [Ping timeout: 250 seconds]
jespada has quit [Quit: Leaving]
mistermocha has quit [Ping timeout: 256 seconds]
Rollabunna has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
Rollabunna has quit [Remote host closed the connection]
Soda has quit [Remote host closed the connection]
lukec has quit [Ping timeout: 250 seconds]
teddyp1cker has quit [Ping timeout: 250 seconds]
Hijiri has joined #ruby
mjuszczak has quit [Client Quit]
noname has joined #ruby
thumpba_ has quit [Ping timeout: 245 seconds]
Doue has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
vim_shimm has quit [Ping timeout: 256 seconds]
havox has quit [Ping timeout: 272 seconds]
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GenghisKen has quit [Ping timeout: 265 seconds]
amdbcg has joined #ruby
kwd has joined #ruby
davedev24_ has quit [Ping timeout: 265 seconds]
elfuego has joined #ruby
tvw has quit []
musashi1 has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
tvw has quit [Client Quit]
tvw has joined #ruby
djbkd has quit [Remote host closed the connection]
havenwood has joined #ruby
davedev24_ has joined #ruby
nfk has quit [Quit: yawn]
predator217 has joined #ruby
havenn has quit [Ping timeout: 264 seconds]
jeramy_s has joined #ruby
predator117 has quit [Ping timeout: 264 seconds]
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
tearan_ has quit [Quit: Textual IRC Client: www.textualapp.com]
lukec has joined #ruby
wottam has joined #ruby
mengu has quit [Ping timeout: 248 seconds]
dfinninger has joined #ruby
doodlehaus has quit [Remote host closed the connection]
djbkd has joined #ruby
jeffreyio has quit [Remote host closed the connection]
qhartman has joined #ruby
ebbflowgo has joined #ruby
rbennacer has joined #ruby
jerius has quit [Quit: /quit]
tosbourn has joined #ruby
Akagi201 has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ebbflowgo has quit [Client Quit]
mikecmpbll has quit [Quit: i've nodded off.]
ebbflowgo has joined #ruby
michaeldeol has joined #ruby
wallerdev has joined #ruby
ebbflowgo has quit [Read error: Connection reset by peer]
endash has quit [Quit: endash]
jgrevich has quit [Ping timeout: 240 seconds]
ebbflowgo has joined #ruby
Akagi201 has quit [Ping timeout: 245 seconds]
Lucky__ has joined #ruby
tosbourn has quit [Ping timeout: 250 seconds]
bruno- has quit [Ping timeout: 245 seconds]
Matix has joined #ruby
Rickmasta has joined #ruby
Lucky__ has quit [Client Quit]
vulix has quit [Ping timeout: 246 seconds]
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
psy_ has quit [Ping timeout: 256 seconds]
Zai00 has quit [Quit: Zai00]
Matip has quit [Ping timeout: 256 seconds]
amdbcg has quit [Ping timeout: 248 seconds]
psy_ has joined #ruby
scripore has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zai00 has joined #ruby
MyGreenP1 has joined #ruby
Hijiri has quit [Ping timeout: 256 seconds]
icarus has quit [Ping timeout: 250 seconds]
icarus has joined #ruby
Marabo has quit [Ping timeout: 256 seconds]
hazelux has joined #ruby
MyGreenP1 has quit [Ping timeout: 264 seconds]
Hijiri has joined #ruby
Rollabunna has joined #ruby
ohaibbq has joined #ruby
Zai00 has quit [Quit: Zai00]
failshell has joined #ruby
tvw has quit []
tvw has joined #ruby
tvw has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
tvw has joined #ruby
ghostmoth has quit [Quit: ghostmoth]
hazelux has quit [Ping timeout: 256 seconds]
RegulationD has quit [Remote host closed the connection]
wottam has quit [Quit: Textual IRC Client: www.textualapp.com]
mistermocha has joined #ruby
failshell has quit [Ping timeout: 245 seconds]
juanpaucar has joined #ruby
GaryOak_ has quit [Remote host closed the connection]
pika_pika has quit [Ping timeout: 245 seconds]
polysics has quit [Read error: Connection reset by peer]
polysics has joined #ruby
kblake has quit [Remote host closed the connection]
juanpaucar has quit [Ping timeout: 264 seconds]
riotjones has joined #ruby
narcan has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
riotjones has quit [Ping timeout: 272 seconds]
krisquigley has joined #ruby
djbkd has quit [Remote host closed the connection]
musashi1 has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
spider-mario has quit [Ping timeout: 245 seconds]
zachrab has quit [Remote host closed the connection]