apeiros changed the topic of #ruby to: Ruby 2.1.5; 2.0.0-p598; 1.9.3-p551: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
tanath__ has joined #ruby
krzbrg has joined #ruby
maestrojed has joined #ruby
mjuszczak has quit []
<tejas-manohar> havenwood: should i use chomp to get user input in a CLI?
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tejas-manohar> gets.chomp
jenrzzz has joined #ruby
tanath_ has quit [Ping timeout: 250 seconds]
krzbrg has quit [Client Quit]
krzbrg has joined #ruby
hiyosi has joined #ruby
krzbrg has quit [Client Quit]
IotaSpencer is now known as Crazy_Atheist
volty has joined #ruby
jonr2219 has joined #ruby
ColloquyUser has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
ColloquyUser has joined #ruby
chrishough has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
jaequery has joined #ruby
msmith has quit []
Spami has joined #ruby
parzzix has joined #ruby
parzzix has left #ruby [#ruby]
freerobby has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<jaequery> i have a hash with sometimes value is empty. i want to return true if all the elements in the hash has zero value. is there a built in ruby way to do this? like .hash_all_empty?
<waxjar> what do you mean by "value is empty", just nil ?
<tejas-manohar> is it possible to do something like require 'lib/*' or require all the files in a directory
<jaequery> yes, nil or "" or []
<zenspider> jaequery: it translates pretty much the same way you describe it: values.all?(&:zero?)
<jaequery> what is &:zero ?
<zenspider> do note that zero is truthy, not falsey nor "empty"
<waxjar> tejas-manohar: use an each loop :)
lemur has joined #ruby
<waxjar> Dir.glob is your friend
<volty> jaequery: zero is whatever you want to be zero
<jaequery> sory not 0, i just meant when it's blank
<zenspider> it is the same as :zero?.to_proc which is the same as lambda { |x| x.zero? }
klmlfl has quit [Remote host closed the connection]
tier has joined #ruby
<volty> e.c. to mean (zero)
<jaequery> contacts = {:email => '', :phone => ''} , i want to do, if contacts.all_empty? do ....
<volty> contact.values.all?(&:empty)
<volty> contact.values.all?(&:empty?)
SCHAAP137 has quit [Quit: Leaving]
<jaequery> what is the meaning of, & ?
<waxjar> it passes a value as a block
ColloquyUser has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
<volty> equiv: contact.values.all? { |val| val.empty? }
triple_b has joined #ruby
<jaequery> this look wrong ? <% if !@site[:contacts].all?(&:empty?) %> contacts are empty <% end %>
davasaurous has quit [Remote host closed the connection]
<tejas-manohar> waxjar: wait for requiring things i needa use an each loop?
hiyosi has quit [Quit: WeeChat 1.0.1]
<tejas-manohar> waxjar: there's no way to require everything in a dir
<tejas-manohar> ?
<jaequery> tejas: try, autoloaders
<waxjar> Dir["dir/*.rb"].each { |file| require file }
<volty> jaequery: do not know, bookmark this http://www.zenspider.com/Languages/Ruby/QuickRef.html
Spami has quit [Quit: This computer has gone to sleep]
<tejas-manohar> waxjar: when you do things with .each is http://pastebin.com/39Q40q3W customary syntax, or on one line?
davidhq_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tejas-manohar> waxjar: is it just like one line when it's a small operation and open the braces when you have a lot of stuff to do?
r0bby_ is now known as robbyoconnor
<waxjar> tejas-manohar: you'd keep the |arguments| on the same line as the opening brace
<tejas-manohar> waxjar: for something so small, do you usually put whole thing on one line?
<waxjar> (many people use curly braces if the block is on a single line and do .. end if the block spans multiple lines)
<waxjar> tejas-manohar: yeah, that's pretty common
<tejas-manohar> waxjar: oh
hiyosi has joined #ruby
<volty> what about reloading a modified source file ?
<jaequery> someone please check this
<jaequery> both returns, false
<volty> I have to load it only if already required ?
<jaequery> any ideas?
amclain has joined #ruby
LudicrousMango has joined #ruby
<waxjar> volty, that's tricky: http://rkh.im/code-reloading
<volty> contacts.<bold>values</bold>
workmad3 has quit [Ping timeout: 258 seconds]
emmesswhy has joined #ruby
henesy has joined #ruby
<volty> waxjar: thx, but lot of activesupport there. The mine will be about reloading Qt code from a running application that is using that code
russt has quit [Quit: russt]
<volty> was @jaequery: contacts.<bold>values</bold>
<jaequery> sweet, thx
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
troyready has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
havenwood has quit [Remote host closed the connection]
workmad3 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
Spami has joined #ruby
Spami has quit [Client Quit]
mikepack has joined #ruby
hmsimha_ has quit [Quit: Leaving]
<tejas-manohar> def addMember puts 'hi' end
<tejas-manohar> thats all thats in addMember.rb
Spami has joined #ruby
jimbach has joined #ruby
parabolize has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
workmad3 has quit [Ping timeout: 255 seconds]
<waxjar> are you sure you have the right path, i'm guessing this file is in /bin
narcan has joined #ruby
<tejas-manohar> waxjar: this file is in lib/addMembers lib is a folder in my project's directory and the file thats gist'ed is in the project's dir
mikepack has quit [Ping timeout: 255 seconds]
jonr22 has quit [Remote host closed the connection]
jonr2219 has quit [Remote host closed the connection]
Xiti` has joined #ruby
pengin has joined #ruby
<tejas-manohar> waxjar: thats right? right?
Xiti` has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
jonr22 has quit [Remote host closed the connection]
Prawnzy has joined #ruby
nucatus has joined #ruby
Xiti` has joined #ruby
FooMunki has quit [Quit: FooMunki]
<waxjar> tejas-manohar: you're listing files in "/lib/lib" now, if your file is in "/lib"
Xiti has quit [Ping timeout: 244 seconds]
<tejas-manohar> waxjar: my file is in myrpeojctdirectory/lib/*.rb
<tejas-manohar> waxjar: the code we have is Dir["lib/*.rb"].each { |file| require file }
<tejas-manohar> waxjar: that code is in a file in the root of myprojectdirectory
<tejas-manohar> waxjar: whats wrong and what needs to be fixed?
nucatus has quit [Ping timeout: 265 seconds]
LudicrousMango has quit [Ping timeout: 265 seconds]
LudicrousMango has joined #ruby
<waxjar> "the code" is what you want to require, and "that code" is the file you linked?
jack_rabbit has joined #ruby
Unknown2 has quit [Quit: Leaving]
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dkb20k has joined #ruby
<tejas-manohar> waxjar: sry the gist'ed code is in the root of myprojectdirectory
davasaurous has joined #ruby
<tejas-manohar> waxjar: and the required code is in myprojectdirectory/lib
KC9YDN has quit [Remote host closed the connection]
Techguy305|2 has joined #ruby
pengin has quit [Remote host closed the connection]
pengin has joined #ruby
benzrf|offline is now known as benzrf
<waxjar> tejas-manohar: seems to me like that should work
<tejas-manohar> waxjar: you see the error?
<waxjar> yes i've seen the error
dkb20k has quit [Ping timeout: 240 seconds]
LudicrousMango has quit [Ping timeout: 255 seconds]
<tejas-manohar> waxjar: ideas?
hlegius has joined #ruby
DivineEntity has joined #ruby
timonv_ has joined #ruby
pengin has quit [Ping timeout: 258 seconds]
LudicrousMango has joined #ruby
<hlegius> Hi folks! I'm about to setup a Linux machine to serve a Ruby production environment. Could Nginx + Passenger my best option?
<waxjar> try a regular require, look at what Dir[] returns, find out what causes the difference
<tejas-manohar> waxjar: a regular require?
mikepack has joined #ruby
<tejas-manohar> from require '' format how can i tell what Dir[] returns
davasaurous has quit [Remote host closed the connection]
arescorpio has joined #ruby
davasaurous has joined #ruby
timonv_ has quit [Ping timeout: 264 seconds]
<waxjar> yeah, require your file manually, see if it works
bmichelsen has quit [Quit: ZZZzzz…]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
mikepack has quit [Ping timeout: 265 seconds]
davasaurous has quit [Remote host closed the connection]
fabrice31 has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
davasaurous has joined #ruby
mikepack has joined #ruby
Xeago has quit [Remote host closed the connection]
arescorpio has quit [Remote host closed the connection]
LudicrousMango has quit [Ping timeout: 272 seconds]
davasaurous has quit [Remote host closed the connection]
<volty> and then check Dir.pwd; $LOAD_PATH
<shevy> tejas-manohar Dir[] will return the file content of the argument path
airdeluxe has joined #ruby
davasaurous has joined #ruby
aspires has joined #ruby
Juanchito has quit [Quit: Connection closed for inactivity]
<tejas-manohar> waxjar: no same error but it is there
jonr22 has joined #ruby
<tejas-manohar> waxjar: /Volumes/Storage/Repos/Authored/1-1/ifttt.rb and /Volumes/Storage/Repos/Authored/1-1/libs/addMembers.rb
<tejas-manohar> just checked
<volty> tejas-manohar: check Dir.pwd and $LOAD_PATH
<tejas-manohar> volty: howww?
fabrice31 has quit [Ping timeout: 272 seconds]
reinaldob has joined #ruby
<waxjar> dude, your folder's called "libs", not "lib"
<volty> p Dir.pwd; p $LOAD_PATH just before that Dir[ ...
<tejas-manohar> waxjar: fixed that but still errors
toretore has quit [Quit: This computer has gone to sleep]
<tejas-manohar> volty: i dont see anything, it just errors the same thing everytime
benzrf is now known as benzrf|offline
<tejas-manohar> do you guys want me to put a download link to my app
<volty> tejas-manohar: tell us what Dir.pwd prints out; and then what $LOAD_PATH prints out
<tejas-manohar> volty: it doesnt
jlast has joined #ruby
Takle_ has quit [Remote host closed the connection]
<tejas-manohar> volty: wait nvm
<waxjar> d'oh it probably is the load path. tejas-manohar, try require_relative instead
<tejas-manohar> volty: http://i.imgur.com/cwqnZNb.png
arescorpio has joined #ruby
<waxjar> or ask someone to explain the load path to you :p
patrick99e99 has joined #ruby
havenwood has joined #ruby
tus has quit [Ping timeout: 255 seconds]
cleopatra has joined #ruby
cleopatra has quit [Client Quit]
<tejas-manohar> ohhhhhhh
cleopatra has joined #ruby
<tejas-manohar> volty: ur right
siso has quit [Quit: siso]
<tejas-manohar> volty: actually no still not working https://github.com/tejas-manohar/1-1
<tejas-manohar> volty: https://github.com/tejas-manohar/1-1/blob/master/ifttt.rb#L27 error: undefined local variable or method `addMember' for #<MyApplication:0x007fc062026d70>.
<tejas-manohar> volty: so whats the correct way to call this included method
hlegius has quit [Remote host closed the connection]
davasaurous has quit [Remote host closed the connection]
<volty> I was curious on load_path on os x . :)
<tejas-manohar> volty: lol
patrick99e99 has quit [Ping timeout: 255 seconds]
<volty> tejas-manohar: do not know, commander :)
baroquebobcat has quit [Quit: baroquebobcat]
<havenwood> tejas-manohar: maybe use slop or thor?
<tejas-manohar> volty: commander-aside, is my code correct?
<tejas-manohar> havenwood: lol
<havenwood> :P
<tejas-manohar> but commander aside is my require '' and method call right?
<tejas-manohar> thats all i ask at this point
dkb20k has joined #ruby
<volty> tejas-manohar: do not know , sorry
<waxjar> yeah
<tejas-manohar> waxjar: it is? awwwww
<tejas-manohar> "error: undefined local variable or method `addMember' for #<MyApplication:0x007fc062026d70>."
<tejas-manohar> fml
<waxjar> the error is not coming from the requiring any more
<tejas-manohar> yeah it isnt
<tejas-manohar> its coming from calling addMember
loyalthird has quit [Quit: Quitte]
<tejas-manohar> addMember is defined in a required file
<tejas-manohar> is that the right way to do things?
<havenwood> add_member*
<tejas-manohar> oh sheet, thats my fault
<tejas-manohar> im stupid
<tejas-manohar> there
<havenwood> headlessCamelCase bites again!
<shevy> haha!
<shevy> havenWood is talking
<tejas-manohar> fixed lololol
adriancb has joined #ruby
<shevy> havenWood reallyHates itIf youKeep onCoding likeThat MaN
<havenwood> shevy: so true
<waxjar> *NaN
<volty> enumerable from 1 to infinite ? is there a ready one ?
robustus has quit [Ping timeout: 255 seconds]
freerobby has quit [Quit: Leaving.]
j_mcnally has joined #ruby
<waxjar> 1.upto(Float::INFINITY) might do
<volty> (let's say from 1 till the machine blows )
<havenwood> volty: 1.upto Float::INFINITY indeed
<volty> nice, thx
parabolize has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<parabolize> #python
robustus has joined #ruby
<parabolize> sorry
marr has quit [Ping timeout: 250 seconds]
<volty> #join
<shevy> ack
<havenwood> parseltongue*
<shevy> a pythonista!
<shevy> lol havenwood
kevinxu_ has joined #ruby
<tejas-manohar> when do i needa use an @ variable
<tejas-manohar> or @@
<sevenseacat> when you need an instance variable or a class variable
KC9YDN has joined #ruby
<tejas-manohar> when its at the top of class it can be used in any methods in class already
<havenwood> tejas-manohar: which is often and never
<volty> when the need arises
<tejas-manohar> lol
<tejas-manohar> thanks guys
<tejas-manohar> so hlpeful
<havenwood> tejas-manohar: so instance variables are what you use to share a variable within the instance
<volty> we can do better , ahah
<havenwood> tejas-manohar: local variables when they suffice
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tejas-manohar> yeah
<havenwood> tejas-manohar: avoid class variables
<tejas-manohar> sure
triple_b has joined #ruby
<havenwood> tejas-manohar: so that
<havenwood> tejas-manohar: local variable is faster than instance variable is faster than method lookup
<volty> tree of bookmarks that are going to have title, url, date, etc. Struct or else ?
<havenwood> not that faster is the sole purpose
<tejas-manohar> o ok
<volty> bat tejas-manohar, do not think too much about speed at this stage :)
<havenwood> volty: i regretted mentioning speed as soon as i did
exadeci has quit [Quit: Connection closed for inactivity]
<tejas-manohar> lol
triple_b has quit [Client Quit]
<volty> what would you use to implement a tree of bookmarks (or similar), in a way that it would be easy to transfer them later in a db ?
<volty> probably a silly question
tus has joined #ruby
benzrf|offline is now known as benzrf
<havenwood> volty: i don't think it's silly. any reasons you can think of that a Hash wouldn't be ideal?
<volty> havenwood: I need order too. They are going to populate a tree widget.
bmichelsen has joined #ruby
<havenwood> volty: ah, like which bookmark is first?
<tejas-manohar> does File.read('...') error if ... doesnt exist
<volty> and folder too
<tejas-manohar> should i do File.exists? before that
<havenwood> tejas-manohar: ya, Errno::ENOENT
<volty> tejas-manohar: no, ifi the file does not exist you receive a random content from one of the black holes of the universe
<havenwood> tejas-manohar: but File.exist?
sea_local has joined #ruby
<havenwood> tejas-manohar: since the latter is deprecated
<tejas-manohar> lol
<havenwood> former*
<havenwood> >.>
<havenwood> off by one error
benzrf is now known as benzrf|offline
nucatus has joined #ruby
benzrf|offline is now known as benzrf
krisquigley has joined #ruby
MrDoctor has joined #ruby
manzo has quit [Ping timeout: 256 seconds]
<tejas-manohar> lololo
<volty> MattB2: you suggest I pass directly on a db ? Thx for the links but I'm going to put them in a regular mysql and know how to setup the relations
chrisja has quit [Quit: leaving]
lemur has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
<havenwood> volty: you need a relational database?
<havenwood> volty: must you use mysql?
lemur has joined #ruby
<havenwood> volty: i mean amongst sql dbs
<tejas-manohar> in File.new("out.txt", "w") what does "w" do
<i8igmac> any one herd of proxychains
<volty> of course -- when you have parent - children relationship. I prefer to use one db engine for all my data
<MattB2> volty: The links (specifically the postgres one) were to give you some ideas as to how to represent a tree.
<havenwood> tejas-manohar: write
<i8igmac> i wodner if i could find a proxychains like gem
Joufflu has quit [Ping timeout: 258 seconds]
<tejas-manohar> what
<tejas-manohar> File.open(yourfile, 'w') { |file| file.write("your text") }
<tejas-manohar> there's already write() tho????
<i8igmac> proxychain.socket.new("www.google.com",80)
<havenwood> tejas-manohar: which would fail if the file wasn't opened in write mode
<volty> MattB2: yes, thanks, long time since I did it, but my relational neurals never die :)
<tejas-manohar> oh
<MattB2> volty: your original Q suggested you didn't intend to use a db, I'm also suggesting your lif ewill be much easier with one, even if its just sqlite
<tejas-manohar> havenwood: so i can do file = File.new("out.txt", "w")
<tejas-manohar> file.write("your text")
nucatus has quit [Ping timeout: 240 seconds]
<havenwood> volty: if it's not relational in fact, even easier
krisquigley has quit [Ping timeout: 240 seconds]
<havenwood> tejas-manohar: best to use a block
<tejas-manohar> havenwood: like in a method?
Megtastique has quit []
NoNMaDDeN has quit [Remote host closed the connection]
<volty> MattB2: i was thinking about doing it first with ruby data (to be saved .e.g. in yaml) and then moving to db. After your suggestion I realized that I should go directly with a db.
<tejas-manohar> havenwood: since ruby does implicit returning, is anything returned by https://gist.github.com/tejas-manohar/8101339e69d79e213561 "file" is, i guess? or do i needa write "file" on last line before end
hlegius_ has joined #ruby
<havenwood> tejas-manohar: check File::open
lemur has quit [Ping timeout: 258 seconds]
<MattB2> volty: a data structure is fine, until it comes to things liek moves, deletes etc. Then things get hairy fast! If you are going with a db, ther eare quite a few tree-structure gems to choose from if you don't fance implementing yourself.
<MattB2> *there are
tier has quit [Remote host closed the connection]
<havenwood> so i link to new >.>
<havenwood> scroll down*
Joufflu has joined #ruby
freerobby has joined #ruby
<volty> ah, MattB2, it isn't for web, it is for a Qt App (QListWidget like)
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> i've jumped the gun repeatedly today, guess just one of those days
baroquebobcat has quit [Quit: baroquebobcat]
aspires has quit []
<havenwood> at least it's Sunday, i demand a redo!
avrc has joined #ruby
<havenwood> and in the alternative apologize for my blathering
<MattB2> volty: gems aren't just for web-apps! :) But if you're implementing from scratch, the postgres article gives some good pointers on possible approaches.
<sevenseacat> is not sunday, stop living in the past
<sevenseacat> <_<
Soda has joined #ruby
hlegius_ has quit [Ping timeout: 264 seconds]
<volty> table folders id, name, parent_id; table bookmarks id, folder_id, url, title ... -- that's all
triple_b has joined #ruby
<tejas-manohar> havenwood: whats the difference between w and w+
<tejas-manohar> what am i doing wrong lol havenwood: file = File.new("~/users.json", "w")
<tejas-manohar> whyd you say look at documentation there
reinaldob has quit [Remote host closed the connection]
<havenwood> tejas-manohar: check the docs on w vs w+: http://www.ruby-doc.org/core-2.1.5/IO.html#method-c-new
reinaldob has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
<volty> MattB2: thx, will look at
JoshGlzBrk has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<waxjar> volty, is sqlite not an option?
<volty> tejas-manohar: i gave you the quickref of zenspider, it is excellent (i like quick refs, or at least short stuff) for fast search
rshetty has joined #ruby
<tejas-manohar> what volty
<havenwood> volty: have you looked at YDBM?: http://ruby-doc.org/stdlib-2.1.5/libdoc/yaml/rdoc/YAML/DBM.html
<volty> waxjar: i decided to have all my bookmarks , phonebook, and all the other stuff in one place only.
<volty> (though some in different databases)
<havenwood> volty: just throwing it out there, dunno if it's appropriate
reinaldob has quit [Ping timeout: 264 seconds]
<volty> havenwood: thx, going to bookmark it, i wanted also this one (i read about somewhere) just for a trial, but didn't remember what it is about.
fandi has joined #ruby
<havenwood> volty: just a simple option built into ruby
<havenwood> volty: if you don't need more
davasaurous has joined #ruby
lw has joined #ruby
<volty> yes, it could be nice even if I want (or do later) more :)
baroquebobcat has joined #ruby
<tejas-manohar> havenwood: file = File.open('~/users.json', 'a+')
<tejas-manohar> Read and write mode. The file pointer is at the end of the file if the file exists. The file opens in the append mode. If the file does not exist, it creates a new file for reading and writing.
<tejas-manohar> so i dont needa check if file exists?
<havenwood> tejas-manohar: yeah, it'll create a new file
corehook has joined #ruby
<tejas-manohar> havenwood: is this ok? https://gist.github.com/tejas-manohar/0405c8b064100b5de767 the var is defined outside of method but thats cuz file will be messed with like in all the methods
<tejas-manohar> mesed with/read/etc
avrc has quit [Quit: this channel is bakas]
nfk has quit [Quit: yawn]
<havenwood> tejas-manohar: try to use the file within a block rather than opening it globally. I'm not sure what you mean to do.
<parabolize> tejas-manohar: I think you need to expand your user path File.expand_path. At least my pry chocked when I tried it.
garycruise has joined #ruby
<tejas-manohar> parabolize: what do you mean? how do i use that in this context? file = File.open(File.expand_path('~/users.json'), 'a+')
<tejas-manohar> like that parabolize?
<volty> tejas-manohar: it's not my business, but why righth in your home directory ?
<parabolize> yes
<tejas-manohar> volty: idk i guess i can make a folder for that
<volty> you should: order, before all
davasaurous has quit [Remote host closed the connection]
<volty> mkdir -p ~/data/twitter-app; DATA_FOLDER = '~/data/twitter-app'; fn_users = File.join(DATA_FOLDER, 'users.json')
<tejas-manohar> havenwood: all my methods here are going to read and/or write to this file, whats a good way to separate it into a block - https://gist.github.com/tejas-manohar/8034b0fffee713251f89
<tejas-manohar> havenwood: do i just make like a setup_users method and return file
davasaurous has joined #ruby
grzywacz has quit [Remote host closed the connection]
<volty> File.read returns text, so do not use file ident. And anyway you don't need an ident
<tejas-manohar> havenwood: so lol = setup_users where lol = the file var at the end of setup_users right? https://gist.github.com/tejas-manohar/6a20ecb631260e3c261f
<tejas-manohar> o
<havenwood> dunno
<tejas-manohar> o
<tejas-manohar> then why not global lol
<havenwood> i didn't read it
<havenwood> that'd help
<tejas-manohar> all my methods here are going to read and/or write to this file, whats a good way to separate it into a block - https://gist.github.com/tejas-manohar/8034b0fffee713251f89
<tejas-manohar> UPDATE
<tejas-manohar> so lol = setup_users where lol = the file var at the end of setup_users right? https://gist.github.com/tejas-manohar/6a20ecb631260e3c261f
gsd has quit [Read error: Connection reset by peer]
Avahey has quit [Quit: Connection closed for inactivity]
gsd has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> tejas-manohar: you don't have to check if the dir exists for mkdir_p
<volty> make a class Users
airdeluxe has quit [Quit: Leaving]
<tejas-manohar> havenwood: if it doesnt, arent i overwriting that folder?
<havenwood> tejas-manohar: it makes it regardless
<tejas-manohar> i dont wanna overwrite
garycruise has quit [Quit: 离开]
<tejas-manohar> id lose the content within the folder
<tejas-manohar> meaning an existing user of my CLI could lose some of his data lol
davasaurous has quit [Remote host closed the connection]
<havenwood> tejas-manohar: makes it *unless* it exists
davasaurous has joined #ruby
<tejas-manohar> volty: after making the class can i remove that setup_users rubbish and leave it at top of class?
<tejas-manohar> volty: or should i still keep it
henesy has quit [Ping timeout: 255 seconds]
workmad3 has joined #ruby
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<volty> into initialize of the class
Xiti` has quit [Quit: Xiti`]
havenwood has quit []
Xiti has joined #ruby
<volty> singleton class, of course
<volty> isn't there array.to_json ?
<volty> never mind, cannot go on, going to sleep
<volty> bye
volty has quit [Quit: Konversation terminated!]
<tejas-manohar> cya
jonr22 has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
chrishough has joined #ruby
davasaurous has quit [Remote host closed the connection]
aspiers has joined #ruby
jonr22 has joined #ruby
<tejas-manohar> havenwood: if i wanna do things with the file variable in user_exists? and create_user and other methods in the class, i need the @ before file as is, right? https://gist.github.com/tejas-manohar/019fc049b9759e1fb9b7
chrishough has quit [Client Quit]
rshetty has quit [Remote host closed the connection]
chrishough has joined #ruby
chu has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
aspiers has quit [Ping timeout: 256 seconds]
jonr22 has quit [Ping timeout: 264 seconds]
lemur has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
emmesswhy has joined #ruby
b4rbz has quit [Remote host closed the connection]
dorei has quit []
MattB2 has quit [Remote host closed the connection]
stalcott has joined #ruby
Prawnzy has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
davasaurous has joined #ruby
fedexo has quit [Ping timeout: 272 seconds]
stalcott has quit [Quit: stalcott]
wsmoak has quit [Quit: wsmoak]
Akagi201 has quit []
Takle has joined #ruby
nucatus has joined #ruby
timonv_ has joined #ruby
jimbach has quit [Remote host closed the connection]
i8igmac has quit [Ping timeout: 250 seconds]
dc_ has quit [Remote host closed the connection]
Takle has quit [Ping timeout: 255 seconds]
nucatus has quit [Ping timeout: 272 seconds]
jimbach has joined #ruby
NoNMaDDeN has joined #ruby
timonv_ has quit [Ping timeout: 264 seconds]
hlegius has joined #ruby
dcunit3d has quit [Ping timeout: 264 seconds]
fabrice31 has joined #ruby
jimbach has quit [Ping timeout: 240 seconds]
NoNMaDDeN has quit [Ping timeout: 258 seconds]
dc_ has joined #ruby
hlegius has quit [Ping timeout: 264 seconds]
dcunit3d has joined #ruby
corehook has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 264 seconds]
blahwoop has joined #ruby
<blahwoop> hi guys if i use the Set library.
<blahwoop> i have words = Set.new
nucatus has joined #ruby
<blahwoop> now i added something to it. is there a method like include? for sets?
corehook has joined #ruby
zacstewart has joined #ruby
reinaldob has joined #ruby
benzrf is now known as benzrf|offline
Trynemjoel has quit [Ping timeout: 265 seconds]
hiyosi has quit [Ping timeout: 264 seconds]
agjacome has quit [Quit: leaving]
Trynemjoel has joined #ruby
deepali has joined #ruby
<blahwoop> i got it
<blahwoop> i did includes?
<blahwoop> noob mistake
<blahwoop> thanks though
tanath__ has quit [Quit: Quit]
siso has joined #ruby
henesy has joined #ruby
reinaldob has quit [Ping timeout: 255 seconds]
goshdarnyou has joined #ruby
tyll_ has quit [Ping timeout: 264 seconds]
weemsledeux has joined #ruby
KC9YDN has quit [Quit: Condenadme, no importa, la Historia me absolverá. - Fidel Castro]
Techguy305|2 has quit [Ping timeout: 245 seconds]
klmlfl has joined #ruby
tyll has joined #ruby
KC9YDN has joined #ruby
Prawnzy has joined #ruby
hiyosi has joined #ruby
maestrojed has joined #ruby
Mateon2 has joined #ruby
reeelkkkip_ has joined #ruby
Photism has joined #ruby
jaequery has joined #ruby
Areessell has quit [Quit: leaving]
deepali has quit [Quit: Leaving]
jaequery has quit [Client Quit]
arup_r has joined #ruby
patrick99e99 has joined #ruby
<tejas-manohar> hey guys? https://gist.github.com/tejas-manohar/5d4995feae9814262e69 -- look at comments on line #13 and #14, any idea how to implement this?
moritzschaefer has joined #ruby
AlSquirikou has joined #ruby
<tejas-manohar> havenwood: blahwoop: parabolize: ideas?
patrick99e99 has quit [Ping timeout: 256 seconds]
wolflee_ has quit [Read error: Connection reset by peer]
Guest697 has quit [Ping timeout: 255 seconds]
wolflee_ has joined #ruby
moritzs has quit [Ping timeout: 272 seconds]
<Radar> !rule10
<helpa> Do not beg / plead with people to help you. This includes asking questions like "Any ideas?" after posting your original question.
<tejas-manohar> ok
<tejas-manohar> sorry
charliesome has quit [Quit: zzz]
<parabolize> tejas-manohar: I don't understand the comment. Could you rephrase in English or another programming language?
moritzschaefer has quit [Ping timeout: 250 seconds]
LudicrousMango has joined #ruby
krz has joined #ruby
<reeelkkkip_> i'd like to make a program that detects if a user is a nigger then the program won't work
LudicrousMango has joined #ruby
<Radar> apeiros: ban reeelkkkip_ plz
Guest46423 has joined #ruby
<reeelkkkip_> why Radar
<Radar> userhost: 42b075c0@gateway/web/freenode/ip.66.176.117.192
<reeelkkkip_> you fucking intolerant asshole
mary5030_ has quit [Remote host closed the connection]
mary5030 has joined #ruby
<tejas-manohar> parabolize: i want to make @data_hash have a new key named value of the method's parameter "email", i wanna model @data_source[:email] off of json like http://pastebin.com/xGyHwkHj
<tejas-manohar> parabolize: makes sense?
wolflee__ has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
xenomorph is now known as {xenomorph}
Arnie25 has joined #ruby
<Arnie25> hey guys, any ideas why when I run autotest it just hangs? (from inside the root folder of: https://github.com/saasbook/ruby-calisthenics)
<tejas-manohar> the teams parameter in my function is an array parabolize
Guest46423 has quit [Ping timeout: 255 seconds]
LudicrousMango has quit [Client Quit]
mary5030 has quit [Ping timeout: 240 seconds]
wolflee_ has quit [Ping timeout: 264 seconds]
reeelkkkip_ has quit [Ping timeout: 246 seconds]
<tejas-manohar> parabolize: did you understand my clarification?
mengu has joined #ruby
<Arnie25> I followed the instructions in the readme to install autotest: https://github.com/grosser/autotest
{xenomorph} is now known as xenomorph
henesy has quit [Ping timeout: 256 seconds]
<tejas-manohar> any idea how to solve the issue in comments here? https://gist.github.com/tejas-manohar/a8f202fde18736dfa89a -- btw teams parameter on that function is an array of strings
<parabolize> if :email isn't an email address now what is it?
<tejas-manohar> parabolize: it is an email address
<Arnie25> :[
<tejas-manohar> parabolize: ill make sure its an email address before passing it thru that function
<tejas-manohar> parabolize: i want :email to fill in the value of email parameter. i think im doing it wrong just dont know how to do it right
<tejas-manohar> i dont want the hash to literally have the key "email"
krisquigley has joined #ruby
mengu has quit [Ping timeout: 240 seconds]
rixius_ has joined #ruby
rixius_ is now known as Guest22049
maestrojed has quit [Quit: Computer has gone to sleep.]
<tejas-manohar> parabolize: understand what im saying?
<mostlybadfly> jhass: would you happen to know how to change the directory for exercism?
krisquigley has quit [Ping timeout: 258 seconds]
<tejas-manohar> hey anyone here familiar with json --> hash and hash --> json?
Guest22049 has quit [Client Quit]
<tejas-manohar> https://gist.github.com/tejas-manohar/a8f202fde18736dfa89a -- btw :email is intended to be the value of the method's email parameter
russt has joined #ruby
jamse has quit []
ajaiswal has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
Prawnzy has quit [Remote host closed the connection]
<parabolize> tejas-manohar: I think you want @data_hash[email] where email is 'blahblah@gmail.com'
jlast has joined #ruby
rixius__ has joined #ruby
sski has joined #ruby
<tejas-manohar> parabolize: yeah @data_hash[email] = {"teams" => [put each item in teams parameter (array) here], "partners" => []}
radic has quit [Ping timeout: 255 seconds]
Takle has joined #ruby
<tejas-manohar> parabolize: how do "put each item in teams parameter (array) here"
radic has joined #ruby
rockdon has quit [K-Lined]
mjmac has quit [K-Lined]
oo_ has joined #ruby
<tejas-manohar> parabolize: also pls gist me back if you know a 100000 times better way of doing the simple task i am lol
<tejas-manohar> just the hash
Musashi007 has joined #ruby
mjmac has joined #ruby
rockdon has joined #ruby
rixius__ has quit [Ping timeout: 255 seconds]
Takle has quit [Ping timeout: 265 seconds]
rixius__ has joined #ruby
eat_multi has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<tejas-manohar> i have teams[], its an array of strings
<tejas-manohar> @data_hash[email] = {"teams" => [put each item in teams[] here], "partners" => []}
<tejas-manohar> how?
emmesswhy has quit [Quit: Leaving]
hlegius has joined #ruby
russt has quit [Quit: russt]
<parabolize> @data_hash[email]['teams'] + teams; @data_hash[email]['partners'] + partners
baroquebobcat has quit [Quit: baroquebobcat]
<tejas-manohar> parabolize: so @data_hash[email]['teams'] + teams loads all the values in teams[] to that array in the hash
<tejas-manohar> ?
sevenseacat has left #ruby [#ruby]
sevenseacat has joined #ruby
<parabolize> yes
eat_multi has quit [Client Quit]
eat_multi has joined #ruby
jenrzzz has joined #ruby
Jake232 has joined #ruby
<parabolize> append might be a better word
<tejas-manohar> parabolize: so an empty [] needs to be there in the first place, right?
<parabolize> ah, good point
<parabolize> @data_hash[email]['teams'] = teams; @data_hash[email]['partners'] = partners
hlegius has quit [Ping timeout: 258 seconds]
Cache_Money has joined #ruby
<tejas-manohar> do i needa define [] for teams before that
rshetty has joined #ruby
russt has joined #ruby
rixius__ has quit [Ping timeout: 255 seconds]
rixius___ has joined #ruby
NoNMaDDeN has joined #ruby
<tejas-manohar> nvm got it
rixius___ has quit [Ping timeout: 255 seconds]
tobleronegordon has quit [Ping timeout: 244 seconds]
nucatus_ has joined #ruby
<parabolize> sorry I'm new at this: @data_hash[email].store('teams', teams)
Koolaids has joined #ruby
<Koolaids> Something is wrong in the world.
<Koolaids> Think... THINK.
<tejas-manohar> np i got it
<Koolaids> When is the last time you saw a comedy movie that was actually funny?
<Koolaids> THINK!
crandersons has quit []
<tejas-manohar> lol
NoNMaDDeN has quit [Ping timeout: 265 seconds]
<Koolaids> Now.... the Comedy Genre is a label that applies to any movie that doesn't fall into the other categories
terlar has joined #ruby
<tejas-manohar> @data_hash[email] = {"teams" => [], "partners" => []} @data_hash[email]['teams'] = teams
<tejas-manohar> no store method my man parabolize
rixius__ has joined #ruby
nucatus has quit [Ping timeout: 256 seconds]
<tejas-manohar> Koolaids: what are you saying lol? is this ruby
braincra- has quit [Quit: bye bye]
<Koolaids> yeah um I kinda use channels with lots of people in them as my platform for my daily rants about life. that's kinda my thing.
sea_local has quit [Remote host closed the connection]
nucatus_ has quit [Read error: No route to host]
vinleod has joined #ruby
klmlfl has quit [Remote host closed the connection]
<Koolaids> But on the subject of ruby
nucatus has joined #ruby
<parabolize> its working for me on your json data. http://www.ruby-doc.org/core-2.1.5/Hash.html#method-i-store
<Koolaids> Do you think it's a viable language to use for web programming? PROFESSIONALLY?
<Koolaids> Here's my issues with it
<Koolaids> There's too many ways to do stuff.
<Koolaids> And nobody uses it
<sevenseacat> oh here we go
<Koolaids> Like, you look at job postings
divi has joined #ruby
<Koolaids> And it's PHP, PHP, PHP, C#, C#, PHP, C#, PHP
<parabolize> tejas-manohar: only in newer versions maybe?
<sevenseacat> Koolaids: you been drinking too much of it.
<tejas-manohar> got it parabolize
<tejas-manohar> but it works just as your last solution lol
<tejas-manohar> @data_hash[email] = {"teams" => [], "partners" => []} @data_hash[email].store('teams', teams)
<tejas-manohar> i need to make the array blank before
<tejas-manohar> its ok
<tejas-manohar> thats fine with me
corehook has quit [Remote host closed the connection]
<parabolize> I did it with a new key..
<Koolaids> sevenseacat: Nah you see I like the IDEA of ruby. PHP makes me sick
<Koolaids> it's disgusting
<Koolaids> it doesn't even understand variable scope
corehook has joined #ruby
<Koolaids> Like you can declare a variable inside { } and still use that variable outside the { }
henesy has joined #ruby
<Koolaids> if yanno what im sayin
braincrash has joined #ruby
workmad3 has joined #ruby
<sevenseacat> see ya Koolaids, nice knowing you
hamakn has quit [Remote host closed the connection]
<Koolaids> are you hating on me sevenseacat
hamakn has joined #ruby
<parabolize> lol
jimbach has joined #ruby
kevinxu_ has quit [Quit: Textual IRC Client: www.textualapp.com]
corehook has quit [Ping timeout: 258 seconds]
kireevco has left #ruby [#ruby]
<tejas-manohar> sevenseacat: https://github.com/tejas-manohar/1-1/blob/master/lib/user.rb does this make sense? like the file functions are they being used correctly?
maxmanders has quit [Max SendQ exceeded]
workmad3 has quit [Ping timeout: 240 seconds]
<sevenseacat> i wouldnt write it like that.
maxmanders has joined #ruby
<tejas-manohar> im grabbing the whole content of the file, converting to hash, writing on it, converting back to json, writing to the file hoepfully deleting the rest and witing it with r+
<sevenseacat> partially because i have no idea what its doing
<tejas-manohar> sevenseacat: does that make sense now?
<tejas-manohar> ignore the has key part
<tejas-manohar> btw
<sevenseacat> i wouldnt write it like that.
uber_hulk has joined #ruby
jonr22 has joined #ruby
jimbach has quit [Remote host closed the connection]
<tejas-manohar> sevenseacat: how would you? and does that seem right tho, functionality wise?
jnollette_mobile has quit [Remote host closed the connection]
<sevenseacat> no.
<sevenseacat> and im not doing your homework for you.
jimbach has joined #ruby
<tejas-manohar> sevenseacat: its not my hw but ok
<sevenseacat> well you told me yesterday you were an experienced developer, so i can only assume this is homework
jnollette has joined #ruby
<tejas-manohar> sevenseacat: uh no i told you that i am not a total noob and have worked in other languages -- how does that lead to hw? lol
<tejas-manohar> sevenseacat: hey all i was asking was why that doesnt make sense logically
rixius__ has quit [Ping timeout: 255 seconds]
sea_local has joined #ruby
<tejas-manohar> sevenseacat: do you have an answer to that?
wolflee__ has quit [Read error: Connection reset by peer]
sinequanon has joined #ruby
arup_r has quit [Quit: Leaving.]
corehook has joined #ruby
kyb3r_ has joined #ruby
jonr22 has quit [Ping timeout: 244 seconds]
Rogerz has joined #ruby
buddy_tucker has quit [Quit: Konversation terminated!]
adriancb has quit [Remote host closed the connection]
divi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
n_blownapart has joined #ruby
corehook has quit [Remote host closed the connection]
<blahwoop> hi all, for some reason my find_word method is skipping the 2nd if statement totally. can someone take a look at it ? thanks https://github.com/iRichLau/stuff/blob/master/board.rb
<tejas-manohar> sevenseacat: how do i grab all contents of a file to a string?
<tejas-manohar> but i dont see how to just get all of it to a string
davasaurous has quit [Remote host closed the connection]
<sevenseacat> tejas-manohar: please stop addressing me.
<tejas-manohar> ok sorry
<blahwoop> i just want to say i hate boggle
<blahwoop> truly madly deeply
<parabolize> lol
charliesome has joined #ruby
<parabolize> you sure you don't want to break that function up? its got 5 variables.
<blahwoop> i will when i finally get it to work
<blahwoop> lol
<blahwoop> im so confused right now
<blahwoop> i dont know how to unfack myself
<parabolize> break it up so you can get part of it to work. I can't follow it.
nucatus_ has joined #ruby
davasaurous has joined #ruby
nucatus has quit [Ping timeout: 264 seconds]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
rshetty has quit [Remote host closed the connection]
davasaurous has quit [Remote host closed the connection]
<blahwoop> kk
timonv_ has joined #ruby
kp666 has joined #ruby
Sgeo is now known as Woosh2
Woosh2 is now known as Sgeo
kevinxu has joined #ruby
<blahwoop> whats the command to rollback one commit
dseitz has joined #ruby
kevinxu is now known as Guest65478
JohnBat26 has joined #ruby
NoNMaDDeN has joined #ruby
<blahwoop> git reset hard HEAD^1
timonv_ has quit [Ping timeout: 256 seconds]
jimbach has quit [Remote host closed the connection]
klmlfl has joined #ruby
<tejas-manohar> i stepped thru this
<tejas-manohar> and everything works
<tejas-manohar> except the last line with @file.write
fabrice31 has joined #ruby
divi has joined #ruby
Koolaids has quit [Remote host closed the connection]
<n_blownapart> hi I got a solution last night here using group_by. I'm getting behavior I don't understand with group_by(&:class) : http://pastie.org/9739516
vinleod has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
davasaurous has joined #ruby
jlast has quit [Ping timeout: 258 seconds]
<n_blownapart> ^^it seems like group_by returns a hash, but with group_by(&:class) I get '{Array=>[[1, 4], [5, 1]]}' . what is that exactly?
root3 has joined #ruby
<parabolize> tejas-manohar: why pastebin? I hate pastebin. It manages to get adds past my addblock. Also, it has no color highlighting for ruby.
<tejas-manohar> sorry
fabrice31 has quit [Ping timeout: 240 seconds]
<n_blownapart> pastie.org has color ^^ !
<tejas-manohar> gist does too
<tejas-manohar> pastbein does too i just forgot to select it
Musashi007 has quit [Quit: Musashi007]
mois3x has quit [Quit: mois3x]
bigmac has joined #ruby
<parabolize> tejas-manohar: what error are you getting?
Techguy305|2 has joined #ruby
<tejas-manohar> parabolize: no error!!!!
<tejas-manohar> confusing
jenrzzz has quit [Ping timeout: 255 seconds]
<parabolize> what behavior?
reinaldob has joined #ruby
kireevco1 has joined #ruby
<tejas-manohar> last line ommitting the ends
lw has quit [Quit: s]
<n_blownapart> if anyone has time I repasted this. my question involves the output of group_by(&:class) . thank you: http://pastie.org/9739527
hlegius has joined #ruby
tus has quit []
root3 has quit [Quit: WeeChat 0.4.2]
Soda has quit [Remote host closed the connection]
MrDoctor has quit [Quit: Leaving]
reinaldob has quit [Ping timeout: 264 seconds]
krz has joined #ruby
zacstewart has quit [Remote host closed the connection]
hlegius has quit [Ping timeout: 258 seconds]
corehook has joined #ruby
<tejas-manohar> im really really confused about writing json to files
freerobby has quit [Quit: Leaving.]
sinequanon has quit [Remote host closed the connection]
n008f4g_ has quit [Ping timeout: 250 seconds]
sinequanon has joined #ruby
troyready has quit [Ping timeout: 264 seconds]
siso_ has joined #ruby
corehook has quit [Ping timeout: 258 seconds]
maestrojed has joined #ruby
siso has quit [Ping timeout: 272 seconds]
siso_ is now known as siso
rshetty has joined #ruby
disKounted has quit []
davedev2_ has quit []
agrinb has joined #ruby
Alayde has left #ruby ["WeeChat 0.3.8"]
sinequanon has quit [Ping timeout: 272 seconds]
oo_ has quit [Remote host closed the connection]
mjuszczak has joined #ruby
yfeldblum has quit [Remote host closed the connection]
Takle has joined #ruby
patrick99e99 has joined #ruby
drewvanstone has quit [Ping timeout: 258 seconds]
jusmyth has joined #ruby
weemsledeux has quit [Remote host closed the connection]
jusmyth has left #ruby [#ruby]
Morkel has joined #ruby
josephndenton has quit [Ping timeout: 256 seconds]
Takle has quit [Ping timeout: 272 seconds]
patrick99e99 has quit [Ping timeout: 240 seconds]
arescorpio has quit [Excess Flood]
krisquigley has joined #ruby
b4rbz has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
uber_hulk has quit [Quit: leaving]
krisquigley has quit [Ping timeout: 240 seconds]
sumark has quit [Remote host closed the connection]
<parabolize> tejas-manohar: me too. I can write to the file with a block but I can't call it directly. File.open('/path/to/blah.json', 'w+') {|f| f.write(j.to_json)} works but File.open('/path/to/blah.json', 'w+').write(j.to_json) doesn't.
<tejas-manohar> yeah same lol
<tejas-manohar> makes no sense
tejas-manohar has quit [Quit: Page closed]
sumark has joined #ruby
Channel6 has quit [Quit: Leaving]
baroquebobcat has joined #ruby
jenrzzz has joined #ruby
josephndenton has joined #ruby
uber_hulk has joined #ruby
agrinb has quit [Remote host closed the connection]
garycruise has joined #ruby
mengu has quit [Ping timeout: 256 seconds]
garycruise has left #ruby [#ruby]
Spami has joined #ruby
arup_r has joined #ruby
arup_r_ has joined #ruby
<parabolize> tejas-manohar: File.write('/path/to/blah.json', j.to_json) works as well
oo_ has joined #ruby
amclain has quit [Quit: Leaving]
arup_r has quit [Ping timeout: 240 seconds]
avrc has joined #ruby
girassolbit has joined #ruby
n_blownapart has quit [Quit: Leaving]
girassolbit has quit [Max SendQ exceeded]
bmichelsen has quit [Quit: ZZZzzz…]
davasaurous has quit [Remote host closed the connection]
echooo1 has joined #ruby
terlar has quit [Ping timeout: 245 seconds]
bmichelsen has joined #ruby
echooo has quit [Ping timeout: 240 seconds]
jlast has joined #ruby
uber_hulk has quit [Ping timeout: 265 seconds]
greenbagels_ has quit [Quit: Leaving]
Kricir has joined #ruby
corehook has joined #ruby
iamjarvo has joined #ruby
uber_hulk has joined #ruby
Rogerz has quit [Quit: Rogerz]
timonv_ has joined #ruby
techsethi has joined #ruby
f00dMonsta has joined #ruby
<f00dMonsta> Which tutorials do you guys recommend if I need to learn ruby in 1-3 days? I don't have to be an expert, just for an interview (they don't require Ruby, but that's their main language of choice)
<sevenseacat> lol
tlarevo has joined #ruby
<f00dMonsta> o.o what?
ferr has joined #ruby
<blahwoop> codecademy covers it pretty well
<blahwoop> like a quick overview
<blahwoop> procs and lambdas
<blahwoop> structs
<f00dMonsta> blahwoop: thanks, I was looking at that, it says an estimated 9hr, but I can brisk through it
hlegius has joined #ruby
<f00dMonsta> just needed to pick one and do it
timonv_ has quit [Ping timeout: 244 seconds]
<blahwoop> yeah or read a couple of chapters of well grounded rubyist. i like that one too
klmlfl has quit [Remote host closed the connection]
jnollette has quit [Remote host closed the connection]
claptor has quit [Quit: this channel is bakas]
jnollette has joined #ruby
Rogerz has joined #ruby
hlegius has quit [Ping timeout: 256 seconds]
uber_hulk has quit [Quit: leaving]
nucatus_ has quit [Remote host closed the connection]
uber_hulk has joined #ruby
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
workmad3 has joined #ruby
fedexo has joined #ruby
kobain has joined #ruby
jimbach has joined #ruby
Rogerz is now known as Michaeljackson
Michaeljackson is now known as Bryzzle
kyb3r_ has quit [Ping timeout: 255 seconds]
kyb3r_ has joined #ruby
<cleopatra> O.o
tlarevo has quit [Remote host closed the connection]
Bryzzle has left #ruby [#ruby]
mloveless has joined #ruby
workmad3 has quit [Ping timeout: 272 seconds]
stalcott has joined #ruby
<cleopatra> ruby in 3 days O.o
stalcott has quit [Client Quit]
jimbach has quit [Ping timeout: 258 seconds]
jonr22 has joined #ruby
nagaraj has joined #ruby
tlarevo has joined #ruby
<parabolize> f00dMonsta: if you just need semantics https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/ and http://rubykoans.com/ should help.
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has joined #ruby
lxsameer has joined #ruby
josephndenton has quit [Ping timeout: 264 seconds]
Areessell has joined #ruby
<f00dMonsta> parabolize: thanks
<parabolize> f00dMonsta: Somebody refernced this a few days ago and I found it useful http://yehudakatz.com/2009/11/15/metaprogramming-in-ruby-its-all-about-the-self/
jonr22 has quit [Ping timeout: 240 seconds]
jlast has quit [Ping timeout: 258 seconds]
claptor has joined #ruby
Techguy305|2 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
anaeem1_ has joined #ruby
govg has quit [Quit: leaving]
maestrojed has quit [Quit: Computer has gone to sleep.]
marcdel has quit []
ferr has quit [Quit: Lost terminal]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Macaveli has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
mengu has joined #ruby
mengu has joined #ruby
oleo has quit [Quit: Verlassend]
Macaveli has quit [Client Quit]
tobago has joined #ruby
fabrice31 has joined #ruby
Arnie25 has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
fabrice31 has quit [Ping timeout: 256 seconds]
BlackGear has joined #ruby
BlackGear has quit [Max SendQ exceeded]
BlackGear has joined #ruby
BlackGear has quit [Max SendQ exceeded]
_JohnBat26_ has joined #ruby
BlackGear has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
neoxquick has quit [Read error: Connection reset by peer]
JohnBat26 has quit [Ping timeout: 265 seconds]
ReRixo has quit [Ping timeout: 240 seconds]
reinaldob has joined #ruby
tlarevo has quit [Remote host closed the connection]
tagrudev has joined #ruby
rshetty_ has joined #ruby
rahult has joined #ruby
divi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rshetty has quit [Ping timeout: 255 seconds]
reinaldob has quit [Ping timeout: 244 seconds]
Cache_Money has quit [Quit: Cache_Money]
siso has quit [Read error: Connection reset by peer]
timonv_ has joined #ruby
terlar has joined #ruby
o0oo0o has quit [Remote host closed the connection]
yeticry has quit [Ping timeout: 265 seconds]
o0oo0o has joined #ruby
yeticry has joined #ruby
siso has joined #ruby
kobain has quit [Ping timeout: 255 seconds]
Kricir has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
dseitz has joined #ruby
techsethi has quit [Quit: techsethi]
divi has joined #ruby
bmichelsen has quit [Quit: ZZZzzz…]
techsethi has joined #ruby
boombadaroomba has joined #ruby
BlackGear has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yeticry has quit [Ping timeout: 244 seconds]
timonv_ has quit [Remote host closed the connection]
hlegius has joined #ruby
timonv_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
samuel02 has joined #ruby
corehook has quit [Remote host closed the connection]
yeticry has joined #ruby
armyriad has joined #ruby
hlegius has quit [Ping timeout: 240 seconds]
boombadaroomba has quit [Ping timeout: 264 seconds]
nucatus has joined #ruby
rshetty_ has quit [Remote host closed the connection]
jonr22 has joined #ruby
Takle has joined #ruby
last_staff has joined #ruby
tlarevo has joined #ruby
nucatus has quit [Ping timeout: 265 seconds]
samuel02 has quit [Remote host closed the connection]
jonr2219 has joined #ruby
toretore has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
Takle has quit [Ping timeout: 250 seconds]
jlast has joined #ruby
jonr2219 has quit [Remote host closed the connection]
diegoviola has quit [Remote host closed the connection]
jonr22 has joined #ruby
bal has joined #ruby
krisquigley has joined #ruby
noway_ has quit [Remote host closed the connection]
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
Akuma has joined #ruby
x1337807x has joined #ruby
jonr2219 has quit [Remote host closed the connection]
jonr22 has joined #ruby
earlz has joined #ruby
aganov has joined #ruby
noway_ has joined #ruby
krisquigley has quit [Ping timeout: 264 seconds]
jonr22 has quit [Read error: Connection reset by peer]
_JohnBat26_ has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
JohnBat26 has joined #ruby
jonr22 has joined #ruby
patrick99e99 has joined #ruby
corehook has joined #ruby
nrsk has joined #ruby
anarang has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
<earlz> what is the best json-rpc 1.1 client library for ruby these days?
<earlz> is there nothing better than rpcjson?
ht__th has joined #ruby
jonr22 has joined #ruby
x1337807x has quit [Quit: Textual IRC Client: www.textualapp.com]
jdj_dk has joined #ruby
jdj_dk has quit [Remote host closed the connection]
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
oo_ has quit [Remote host closed the connection]
patrick99e99 has quit [Ping timeout: 244 seconds]
jonr22 has quit [Remote host closed the connection]
jonr22 has joined #ruby
JCii8 has quit [Ping timeout: 255 seconds]
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
NoNMaDDeN has quit [Remote host closed the connection]
kireevco1 has quit [Quit: Leaving.]
x1337807x has joined #ruby
dumdedum has joined #ruby
adriancb has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
jonr22 has quit [Read error: Connection reset by peer]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
jonr22 has joined #ruby
kireevco has joined #ruby
<Areessell> That looks alright
siso has quit [Ping timeout: 272 seconds]
<Areessell> Last one I promise - This one looks neat: https://github.com/movitto/rjr
adriancb has quit [Ping timeout: 255 seconds]
jonr22 has quit [Remote host closed the connection]
jonr22 has joined #ruby
x1337807x has quit [Quit: Textual IRC Client: www.textualapp.com]
maestrojed has joined #ruby
jonr22 has quit [Remote host closed the connection]
jonr22 has joined #ruby
AliRezaTaleghani has joined #ruby
x1337807x has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
sbar__ has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
divi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jlast has quit [Ping timeout: 258 seconds]
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
NoNMaDDeN has joined #ruby
samuel02 has joined #ruby
bjornar has quit [Remote host closed the connection]
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
samuel02 has quit [Remote host closed the connection]
Alina-malina has quit [Ping timeout: 264 seconds]
Joufflu has quit [Ping timeout: 258 seconds]
Alina-malina has joined #ruby
jonr22 has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
rahult has quit [Quit: Back to the world of zombies]
amundj has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
mikepack has quit [Remote host closed the connection]
lemur has quit [Remote host closed the connection]
lemur has joined #ruby
avrc has quit [Quit: this channel is bakas]
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
garbanotas has joined #ruby
claptor has quit [Quit: this channel is bakas]
bigkevmcd has joined #ruby
fabrice31 has joined #ruby
andikr has joined #ruby
workmad3 has joined #ruby
lemur has quit [Ping timeout: 258 seconds]
jonr2219 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
jimbach has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
ta has quit [Remote host closed the connection]
psy has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 258 seconds]
jonr2219 has quit [Remote host closed the connection]
hlegius has joined #ruby
jonr22 has joined #ruby
timonv_ has joined #ruby
jimbach has quit [Ping timeout: 258 seconds]
relix has joined #ruby
zacstewart has joined #ruby
jonr22 has quit [Remote host closed the connection]
jonr22 has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
hlegius has quit [Ping timeout: 258 seconds]
tlarevo has quit [Remote host closed the connection]
jonr22 has quit [Read error: Connection reset by peer]
zacstewart has quit [Ping timeout: 240 seconds]
jonr22 has joined #ruby
decoponio has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
jenrzzz has quit [Quit: Lost terminal]
clauswitt has joined #ruby
Areessell has quit [Ping timeout: 255 seconds]
Megtastique has joined #ruby
timonv_ has quit [Ping timeout: 245 seconds]
byprdct has quit [Quit: by]
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
samuel02 has joined #ruby
jonr2219 has joined #ruby
russt has quit [Quit: russt]
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
corehook has quit [Remote host closed the connection]
Guest79317 has quit []
Guest79317 has joined #ruby
Guest79317 has quit [Client Quit]
blackmesa has joined #ruby
Megtastique has quit []
jonr22 has quit [Read error: Connection reset by peer]
Guest79317 has joined #ruby
jonr22 has joined #ruby
drewvanstone has joined #ruby
abuzze has joined #ruby
BraddPitt has joined #ruby
abuzze has quit [Read error: Connection reset by peer]
abuzze has joined #ruby
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonr2219 has quit [Remote host closed the connection]
jonr22 has joined #ruby
drewvanstone has quit [Ping timeout: 244 seconds]
Lingo_ has joined #ruby
Juanchito has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
<Lingo_> Hi. So I'm trying to store files uploaded to a rails app like so
<Lingo_> however, it looks like params[:file] is coming in as a String, not as a file
<Lingo_> why is that?
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
<sevenseacat> because your form isnt multipart mabybe?
jonr22 has joined #ruby
rshetty has joined #ruby
samuel02 has quit []
jonr2219 has quit [Read error: Connection reset by peer]
keen___________7 has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
jnollette has quit [Remote host closed the connection]
Megtastique has joined #ruby
jonr22 has quit [Remote host closed the connection]
keen___________7 has joined #ruby
jnollette has joined #ruby
jonr22 has joined #ruby
uber_hulk has quit [Quit: leaving]
CustosL1men has joined #ruby
bjornar has joined #ruby
uber_hulk has joined #ruby
parabolize has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
vinleod has joined #ruby
reinaldob has joined #ruby
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jlast has joined #ruby
reinaldob has quit [Ping timeout: 250 seconds]
jonr2219 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
govg has joined #ruby
workmad3 has joined #ruby
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 255 seconds]
psy has joined #ruby
timonv_ has joined #ruby
jnollette has quit [Remote host closed the connection]
taxen has joined #ruby
jonr2219 has quit [Remote host closed the connection]
jonr22 has joined #ruby
taxen has quit [Client Quit]
jnollette has joined #ruby
garbanotas has quit [Ping timeout: 255 seconds]
kaiwren has joined #ruby
sski has quit [Remote host closed the connection]
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
sski has joined #ruby
ta has joined #ruby
Spleeze has quit [Ping timeout: 255 seconds]
ta has quit [Read error: Connection reset by peer]
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ta has joined #ruby
jonr22 has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
lolmaus has quit [Quit: Konversation terminated!]
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
sski has quit [Ping timeout: 255 seconds]
arup_r_ has quit [Remote host closed the connection]
livathinos has joined #ruby
claudiuinberlin has joined #ruby
claudiuinberlin has left #ruby [#ruby]
jonr2219 has joined #ruby
<shevy> long live ruby!
jonr22 has quit [Remote host closed the connection]
<Lingo_> sevenseacat: yeah you seem to be right
<Lingo_> im having another issue now though
<sevenseacat> i like when that happens.
kyb3r_ has quit [Quit: Leaving]
mjuszczak has quit []
<Lingo_> saving like so
<Lingo_> @doc = Doc.new(doc_params)
<Lingo_> upload = params[:file]
<Lingo_> @doc.path = "public/files/#{upload.original_filename}"
<Lingo_>
<Lingo_> File.open(@doc.path, "wp") { |f| f.write(upload['datafile'].read)}
<Lingo_> breaking at File.open(@doc.path, "wp") { |f| f.write(upload['datafile'].read)}
<sevenseacat> honestly, i would just use a gem like carrierwave for file uploads.
<sevenseacat> carrierwave or paperclip
jonr22 has joined #ruby
<sevenseacat> how is it 'breaking'?
jonr2219 has quit [Read error: Connection reset by peer]
<Lingo_> im gonna use carrierwave
lidaaa has quit [Ping timeout: 258 seconds]
<sevenseacat> :)
nucatus has joined #ruby
jonr22 has quit [Remote host closed the connection]
jonr22 has joined #ruby
amundj has joined #ruby
garbanotas has joined #ruby
francisfish has quit [Remote host closed the connection]
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
sski has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
nucatus has quit [Ping timeout: 265 seconds]
mengu has quit [Remote host closed the connection]
hlegius has joined #ruby
<blahwoop> anyone still up?
Takle_ has joined #ruby
<shevy> YES
<blahwoop> shevy
<shevy> WE ARE WAITING FOR QUESTIONS
<blahwoop> i need u
<shevy> sexual favours or intellectual help?
<shevy> I am all game
jlast has quit [Ping timeout: 258 seconds]
einarj has joined #ruby
<blahwoop> both
<blahwoop> at the same time
<shevy> oh that be difficult
bmichelsen has joined #ruby
<shevy> let's start with the intellectual part
Xeago has joined #ruby
<blahwoop> so im running this right now but it's taking waaaaaay too long
<blahwoop> any advice on how to speed it up
sski has quit [Remote host closed the connection]
<blahwoop> its been running for 10 mins still nothing lol
jonr22 has quit [Read error: Connection reset by peer]
<shevy> ok
<shevy> perhaps you have a bug
<blahwoop> im printing the results. and its'g goin through everything
<shevy> I mean I don't know that code; you should try to identify where exactly it takes so long
sski has joined #ruby
jonr22 has joined #ruby
<shevy> set_neighbors() is fast?
timonv_ has quit [Remote host closed the connection]
<blahwoop> the make_words is slow
<shevy> I usually test with a small game map
<shevy> kk
<blahwoop> it literally
<blahwoop> goes through all words
sski has quit [Remote host closed the connection]
<blahwoop> all possible combinations
sski has joined #ruby
<shevy> each letter is a special object
<blahwoop> yes
Xeago_ has joined #ruby
<shevy> that code somehow looks familiar
olivier_bK has joined #ruby
<shevy> I once wrote a MineSweeper game in ruby-gnome
krisquigley has joined #ruby
<olivier_bK> hy all
jonr2219 has joined #ruby
<blahwoop> i just want the brute force to be faster. like under a min is fine
<shevy> one class generated the map like this http://pastie.org/pastes/9739833/text
hlegius has quit [Ping timeout: 255 seconds]
jonr22 has quit [Read error: Connection reset by peer]
noop has joined #ruby
sk87 has joined #ruby
<shevy> why is make_words slow?
Takle_ has quit [Ping timeout: 264 seconds]
<blahwoop> heres a more specific question. how can i implement the possible word method into make_words
<blahwoop> so if it finds bf and its false it kills that whole path
fedexo has quit [Ping timeout: 264 seconds]
Takle has joined #ruby
<shevy> bf?
<rpag> boyfriend, best friend
<shevy> yeah rpag
<shevy> that's why I asked!
<shevy> because I thought we were talking about a grid
<rpag> shevy, will you be my boyfriend?
HayesHimself has joined #ruby
<shevy> no time
<rpag> :D
<shevy> 3 upcoming exams this week
<rpag> what's your field?
<shevy> everything hahaha
<blahwoop> badass
Xeago has quit [Ping timeout: 264 seconds]
<rpag> string theory?
<rpag> :D
iwishiwerearobot has quit [Quit: >:(]
jonr2219 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
arup_r has joined #ruby
<shevy> originally genetics; somehow I transitioned into biotech, then chemistry; the exams however will be about ecology, genetics and horticultural/agricultural market dynamics
krisquigley has quit [Ping timeout: 256 seconds]
sski has quit [Remote host closed the connection]
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sski has joined #ruby
<shevy> right now I look at plant defence systems against herbivores
<shevy> so back to blahwoop
<rpag> do you use ruby for simulations?
<shevy> if it finds a boyfriend, it kills ... what precisely?
<shevy> I mean you store a lot of stuff
<blahwoop> haha
<rpag> the girlfriend
jonr22 has quit [Remote host closed the connection]
josephndenton has joined #ruby
jonr22 has joined #ruby
<shevy> rpag dunno really... I use ruby for everything really; commandline... web ... bioruby ... but I lack knowledge in bioinformatics, the algorithms + math notation there confuse me a lot
<shevy> it's all strings though!
<shevy> with fat databases
kireevco has quit [Quit: Leaving.]
<blahwoop> if it's at the combination string of 'bf' it'll go into the dictionary list sees that there are none with that in it and never go to bfh bfhi bhfe
uber_hulk has left #ruby [#ruby]
<shevy> a password cracker!
iwishiwerearobot has joined #ruby
amundj has joined #ruby
jonr22 has quit [Remote host closed the connection]
roolo has joined #ruby
<shevy> blahwoop well, can't you decide on that with proper return values? simply return false? I mean you already seem to do quite that
jonr22 has joined #ruby
<shevy> and the string-assembly can happen through a loop
<shevy> AND you could also denote a max-timer so it won't try for too long
msgodf has joined #ruby
St_Marx has quit [Ping timeout: 250 seconds]
sski has quit [Ping timeout: 250 seconds]
kaiwren has quit [Quit: kaiwren]
<shevy> btw this line also scares me: f.each_line { |line| @words << line.downcase unless (line.length < 3 || line.length > 16) }
<blahwoop> doin too much at once?
<shevy> this means it will append to @words only under certain conditions?
<blahwoop> yup
<shevy> k
clauswitt has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
rdark has joined #ruby
<shevy> "b", "g", "e", "f","i", "h", "c", "o", "n", "a", "t", "m", "y", "p", "p", "u"
<shevy> you could do
goshdarnyou has quit [Quit: Connection closed for inactivity]
<shevy> %w( b g e f i h c o n a t m y p p u )
josephndenton has quit [Ping timeout: 255 seconds]
chthon has joined #ruby
<shevy> def set_neighbors scares me the most
jonr2219 has quit [Read error: Connection reset by peer]
<blahwoop> it's a hot mess
<shevy> I understand that you iterate over all grid members
jonr22 has joined #ruby
<shevy> but the code there just looks strange
ghostlines has joined #ruby
marr has joined #ruby
tesuji has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
antgel has joined #ruby
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
bweston92 has quit [Read error: Connection reset by peer]
jonr2219 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
jheg has joined #ruby
<blahwoop> 30 min still not done lol
sevenseacat has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has joined #ruby
patrick99e99 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
<shevy> well
jonr22 has joined #ruby
<shevy> how many members to handle do you have here?
<blahwoop> 16!
<shevy> k 16
<shevy> and how many states can each individual Letter store?
<blahwoop> 4! * 4!
timonv_ has joined #ruby
<shevy> hmmm
<shevy> then you must have a bug
<apeiros_> shevy: 16 is not 16! ;-)
<blahwoop> haha
<blahwoop> yeah
jonr22 has quit [Remote host closed the connection]
<shevy> how do you calc 16! in ruby again?
<shevy> I even forgot the name...
<apeiros_> (2..16).inject(:*)
jonr22 has joined #ruby
<shevy> ok so 20922789888000
<shevy> damn blahwoop, that is a lot
<blahwoop> indeed
<blahwoop> each one of those is checked in a dictionary of 222000 words lol
patrick99e99 has quit [Ping timeout: 264 seconds]
<shevy> cool
<apeiros_> sounds like you should change your strategy
<shevy> blahwoop what if you add the ability to interrupt at every N seconds and display the current result?
moritzschaefer has joined #ruby
ordepdev has joined #ruby
<blahwoop> ive outputed all the words being passed thorugh
antgel has quit [Ping timeout: 265 seconds]
<blahwoop> theres only 308 words
<shevy> hehehe
<shevy> not a great yield is it?
<blahwoop> nope
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
<shevy> what happens when you use only 6 letters
<apeiros_> blahwoop: what are you actually trying to do?
<blahwoop> boggle solver
Lingo_ has quit [Quit: (null)]
<apeiros_> whatever a boggle solver is
jonr22 has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
Prawnzy has joined #ruby
AlSquirikou has quit [Quit: This computer has gone to sleep]
matled has quit [Read error: Connection reset by peer]
matled- has joined #ruby
matled- is now known as matled
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> hehe
<shevy> booger solvers
<blahwoop> gives you all the boggle words
<blahwoop> lol
rob_ has left #ruby [#ruby]
jonr2219 has quit [Remote host closed the connection]
sj has joined #ruby
postmodern has quit [Quit: Leaving]
jonr22 has joined #ruby
Megtastique has quit []
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
corehook has joined #ruby
Spami has joined #ruby
Soda has joined #ruby
mikepack has joined #ruby
sk87 has joined #ruby
Photism has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 250 seconds]
Lingo has joined #ruby
kamilc__ has joined #ruby
narcan has joined #ruby
<Lingo> Im using a form to createa a new isntance of a model
<Lingo> the paramater for a file im trying to use is being passed, i see it being passed
<Lingo> but for some reason it wont save.
<Lingo> its the :data_file
shredding has joined #ruby
jonr2219 has quit [Ping timeout: 256 seconds]
arup_r has quit [Read error: Connection reset by peer]
mikepack has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby
<Lingo> "INSERT INTO "docs" ("created_at", "title", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-24 09:35:19.960405"], ["title", "asdasdasdasdasd"], ["updated_at", "2014-11-24 09:35:19.960405"]]"
<Lingo> but not the file
jimbach has joined #ruby
reinaldob has joined #ruby
pacMakaveli has joined #ruby
Timgauthier has joined #ruby
francisfish has joined #ruby
<Lingo> anyone please :(
workmad3 has quit [Ping timeout: 240 seconds]
Timgauthier has quit [Client Quit]
Timgauthier has joined #ruby
jimbach has quit [Ping timeout: 258 seconds]
kaiwren has joined #ruby
<Lingo> if i manually set @doc.data_file = params[:data_file]...
<Lingo> ["data_file", nil],
codecop has joined #ruby
sonOfRa has quit [Quit: Bye!]
rkalfane has joined #ruby
sonOfRa has joined #ruby
rshetty_ has joined #ruby
<apeiros_> Lingo: #rubyonrails
jlast has joined #ruby
exadeci has joined #ruby
uber_hulk has joined #ruby
rshetty has quit [Ping timeout: 258 seconds]
kwd has joined #ruby
manzo has joined #ruby
hlegius has joined #ruby
tlarevo has joined #ruby
F__i__L has joined #ruby
<F__i__L> hey guyzz how can I merge 2 arrays without having any common values in the end array ?
NoNMaDDe_ has joined #ruby
NoNMaDDeN has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
hlegius has quit [Ping timeout: 240 seconds]
dangerousdave has joined #ruby
charliesome has joined #ruby
_bart has joined #ruby
<tobiasvl> F__i__L: what do you mean? you want an array that consists of all values that are in either array A or array B, but not the ones that are in both?
<F__i__L> yeap
timonv_ has quit [Remote host closed the connection]
<ordepdev> array & array or array.uniq
terlar has quit [Read error: No route to host]
hiyosi has quit [Read error: Connection reset by peer]
<_bart> Hi, I'm using Ruby 2.1.5, what is the recommend built-in testing framework I should use, is it still the mini test one?
<F__i__L> I think you meant array | array but thanks !
timonv_ has joined #ruby
terlar has joined #ruby
<tobiasvl> F__i__L: if you don't want any of the common values, shouldn't it be something like (a - b) | (b - a)
davidhq has joined #ruby
<F__i__L> ah sorry you are both right !
ReRixo has joined #ruby
hiyosi has joined #ruby
workmad3 has joined #ruby
timonv_ has quit [Remote host closed the connection]
duncannz has quit [Remote host closed the connection]
<tobiasvl> or just + instead of | I guess … since there are no duplicates at that point
unshadow has joined #ruby
Darryl_ has quit [Quit: Connection closed for inactivity]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<unshadow> I'm having a wierd issue with ffi (most likly becuse my lack of knowledge in 'C'), the code is here: https://gist.github.com/bararchy/c79be78a82c64eb6df41#file-the_ruby_code-rb , an example C code is here: https://gist.github.com/bararchy/c79be78a82c64eb6df41#file-th_c_code-c , and my error is here: https://gist.github.com/bararchy/c79be78a82c64eb6df41#file-my_error-sh
bmichelsen has quit [Quit: ZZZzzz…]
jlast has quit [Ping timeout: 258 seconds]
dumdedum has quit [Ping timeout: 255 seconds]
<unshadow> Overall it looks like what ffi is sending to the C wrapper is not what the C wrapper excpects ? or something...
blackmesa has joined #ruby
quimrstorres has joined #ruby
Timgauthier has quit [Quit: Textual IRC Client: www.textualapp.com]
uber_hulk has quit [Quit: be back soon]
quimrstorres has quit [Remote host closed the connection]
dangerousdave has joined #ruby
quimrstorres has joined #ruby
jheg has quit [Quit: jheg]
bal has quit [Ping timeout: 264 seconds]
bal has joined #ruby
bal has quit [Client Quit]
iwishiwerearobot has quit [Quit: Be back later ...]
bal has joined #ruby
PierreRambaud has joined #ruby
Lingo has quit [Quit: (null)]
jheg has joined #ruby
Timgauthier has joined #ruby
iwishiwerearobot has joined #ruby
gccostabr has quit [Quit: ZZZzzz…]
duplex has quit [Ping timeout: 256 seconds]
duplex has joined #ruby
dumdedum has joined #ruby
ponga has joined #ruby
gccostabr has joined #ruby
fandi has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
ikaros has joined #ruby
mkaesz has joined #ruby
hlegius has joined #ruby
ReRixo has quit [Ping timeout: 240 seconds]
nucatus has joined #ruby
hlegius has quit [Remote host closed the connection]
duplex has quit [Ping timeout: 256 seconds]
n008f4g_ has joined #ruby
timonv_ has joined #ruby
duplex has joined #ruby
sprihodko has joined #ruby
kl_ has joined #ruby
<kl_> If I have a Gemfile.lock directory in my directory, and I modify my Gemfile, then run bundle install -- what happens?
Guest65478 has quit [Ping timeout: 240 seconds]
ldnunes has joined #ruby
nucatus has quit [Ping timeout: 264 seconds]
Spami has quit [Quit: This computer has gone to sleep]
miyabe has joined #ruby
mloveless has quit [Remote host closed the connection]
Macaveli has joined #ruby
<workmad3> kl_: Gemfile.lock is a file, not a directory... but that aside, it depends on what change you made to your Gemfile
<workmad3> kl_: if you added a new gem to your Gemfile and it doesn't require the change of any already locked versions, the new gem and its dependencies will just be merged into Gemfile.lock
krisquigley has joined #ruby
<workmad3> kl_: if it requires any version changes, bundle install will raise an error
krisquigley has quit [Ping timeout: 250 seconds]
uber_hulk has joined #ruby
ghostlines has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blahwoop has quit [Remote host closed the connection]
gccostabr has quit [Quit: ZZZzzz…]
mkaesz has quit [Ping timeout: 256 seconds]
ghostlines has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
AmBienCeD has quit [Ping timeout: 265 seconds]
Lingo has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jds has joined #ruby
charliesome has quit [Quit: zzz]
wsmoak has joined #ruby
joonty has joined #ruby
ReRixo has joined #ruby
<kl_> workmad3: sorry, that first 'directory' was a typo
<kl_> workmad3: what if I add a :git to my Gemfile ?
rkalfane has quit [Read error: Connection reset by peer]
gccostabr has joined #ruby
rkalfane has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
nrsk has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
eka has joined #ruby
jlast has joined #ruby
JCii8 has joined #ruby
<workmad3> kl_: same rules apply
damic has joined #ruby
ldnunes has quit [Read error: Connection reset by peer]
<damic> Hey can someone tell me a more ruby way to do this http://pastie.org/9740045 (i think it envolves maps)
<shevy> damic use newline = ''
n008f4g_ has quit [Ping timeout: 265 seconds]
<damic> shevy: what do you mean?
<shevy> also you have multiple same actions there
<shevy> you use newline = String.new
ldnunes has joined #ruby
<shevy> use newline = ''
<damic> shevy: ahh gotcha
<shevy> the various parts such as:
<shevy> newline << 'd'
<shevy> newline << 'e'
<shevy> are essentially the same
<shevy> write a new method that properly returns the correct value
AlexRussia has quit [Ping timeout: 245 seconds]
<shevy> newline << foo(char)
jusmyth1 has joined #ruby
<shevy> give it a better name than foo()
<damic> right
rodfersou has joined #ruby
<shevy> lol
<shevy> on line 73
anaeem1_ has quit [Remote host closed the connection]
jusmyth1 has left #ruby [#ruby]
<shevy> you already use newline = ''
<shevy> I did not notice
<shevy> so you are inconsistent ;)
charliesome has joined #ruby
<shevy> btw
<damic> but I was hoping there was a way I could define the whole char set for the orig txt and the cipher txt and then use that somehow.
<shevy> use File.readlines if you need an Array
<shevy> sure
<shevy> in a hash
<shevy> hash = {
<shevy> 'a' => 'd'
<damic> ahhh
<damic> im trying to make this only a few lines
<damic> a hash would do it. I know the map func can do it do I just don't know how to use it.
JCii8_ has joined #ruby
<kl_> workmad3: thanks
<damic> shevy: thanks for the pointers!
Morkel_ has joined #ruby
fabrice31 has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 244 seconds]
tlarevo has quit [Remote host closed the connection]
<shevy> \o/
sk87 has joined #ruby
<shevy> you should still write a method though; and inside that new method you can access that hash. I'd also make the hash a CONSTANT
patrick99e99 has joined #ruby
rahult has joined #ruby
Morkel has quit [Ping timeout: 255 seconds]
Morkel_ is now known as Morkel
JCii8 has quit [Ping timeout: 244 seconds]
mengu has joined #ruby
corehook has quit [Remote host closed the connection]
nfk has joined #ruby
Lingo has quit [Quit: (null)]
<gregf_> damic: try and read String#tr
<damic> shevy: noted. As for the inconsistent part, i did that cause at the top im declaring and the bottom im ensuring that is cleared
<gregf_> >> "1a2b3c".tr("a-z","deb")
<eval-in__> gregf_ => "1d2e3b" (https://eval.in/225658)
jonr22 has joined #ruby
razieliyo has joined #ruby
<shevy> damic it will be a different object when you use the = assignment
patrick99e99 has quit [Ping timeout: 250 seconds]
<shevy> if you wish to empty the same String object you could use .clear
<damic> ahhh, thank you
hlegius has joined #ruby
az7ar_away has quit [Remote host closed the connection]
<damic> didn't know about .clear
<shevy> me neither
<shevy> lol
<shevy> let me look at the docs
<shevy> oh ok
<shevy> it is not an extension of mine
<shevy> you are in the clear damic!
<shevy> it is an officially documented method on class String:
<damic> kewl
<shevy> I just tried it because I think Array also has clear
noway_ has quit [Quit: Leaving]
<shevy> >> array = [1,2,3]; array.clear; array
<eval-in__> shevy => [] (https://eval.in/225662)
<shevy> yeah
unshadow has quit [Quit: leaving]
<kl_> I'm happy to not know about clear
<shevy> txdv wake up... I am bored
<kl_> Sounds far too mutable to me :)
<shevy> kl_ I assume there had to be a way to not assign a new string object
<shevy> class String also has replace()
<txdv> I'm already up
sprihodko has quit [Quit: (null)]
<zenspider> heh. I use clear all the time (tho usually on collections)
<txdv> coding on shit bro
<zenspider> replace is what I use on strings
<shevy> txdv whatcha writing?
<kl_> new string object's normally better anyway
SHyx0rmZ has quit [Remote host closed the connection]
jonr22 has quit [Ping timeout: 240 seconds]
<zenspider> if you're worride about mutability, ruby is REALLY not the right language for you
SHyx0rmZ has joined #ruby
mnms__ has quit [Quit: leaving]
<kl_> zenspider: haha, yeah :)
yfeldblum has quit [Remote host closed the connection]
mkaesz has joined #ruby
<kl_> zenspider: but it pays to take inspiration from immutability, even in potentially mutable contexts
fabrice31 has joined #ruby
jimbach has joined #ruby
jlast has quit [Ping timeout: 264 seconds]
<Timgauthier> shevy you're in the Federal Republic of Germany right?
jimbach has quit [Ping timeout: 258 seconds]
St_Marx has joined #ruby
DaniG2k has joined #ruby
<txdv> shevy: IO event loop with continuation for easier programming
ldnunes_ has joined #ruby
ldnunes has quit [Read error: Connection reset by peer]
<shevy> Timgauthier nope, about ... ~400 km southeast (or more eastsoutheast), in Austria/Vienna; Bavarians are like brothers to the Austrians though, unlike the rest of Germany :>
<shevy> txdv sounds... exciting?
anaeem1 has joined #ruby
anaeem1 has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
corehook has joined #ruby
blackmesa has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
uber_hulk has left #ruby [#ruby]
<txdv> super cereal exciting
<txdv> i have found a way how to utilize all the code written with blocking code in mind
<damic> gregf: you there
<txdv> and still have everything just in one thread/event loop
<damic> String#tr was fucking awesome! https://eval.in/private/d41309b92f950b
hlegius has quit [Remote host closed the connection]
Lingo has joined #ruby
<ponga> hi shevy
ponga has quit [Remote host closed the connection]
razieliyo has quit [Quit: Saliendo]
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
<shevy> hi ponga
<shevy> damic are you working through a tutorial? :P
lxsameer has joined #ruby
lxsameer has joined #ruby
Timgauthier is now known as timgauthier_away
timgauthier_away is now known as Timgauthier
ta has quit [Ping timeout: 265 seconds]
<Timgauthier> i always forget your austrianinan, sorry m8
<Timgauthier> how is it being upside down? ;)
St_Marx has quit [Ping timeout: 250 seconds]
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
<Lingo> in rails I used a nested resource
<Lingo> resources :courses do
<Lingo> resources :docs
<Lingo> end
antgel has joined #ruby
<Lingo> now I'm geting a break in the new form,
<Lingo> <%= form_for @doc, :html => {:multipart => true} do |f| %>, claiming undefined method `docs_path' for #<#<Class:0x007ffd0cd6dbc8>:0x007ffd0cd6cef8>
skroon has joined #ruby
<Timgauthier> please use pastie.org or gist.github.com
<Timgauthier> ;) i kid i kid
<skroon> i'm trying to use ruby-install for installing ruby, but it defaults to /opt for installtion, is there a way to get it install in /usr/local/ default?
<Timgauthier> what OS skroon ?
<gregf_> damic++
<skroon> Timgauthier: linux (ubuntu 14.04)
<Timgauthier> no idea
St_Marx has joined #ruby
<shevy> skroon does ruby-install come with a --help section?
startupality has joined #ruby
<shevy> Timgauthier yeah everybody knows Australia, nobody knows Austria until either Arnold Schwarzenegger, Sigmund Freud or Adolf Hitler is mentioned :>
<Timgauthier> lol
ponga has quit [Ping timeout: 244 seconds]
<Timgauthier> yet Germany gets all the blame for hitler
<startupality> where is the list of available callbacks for https://github.com/aasm/aasm ? i want to be able to use the parameters but instead of using on_transition I want the callback which is callled after the state gets changed.
<shevy> rightfully so! he came to power in Bavaria; he got not accepted in art school in Vienna so he moved away. In hindsight, nevber let austrians leave here
<Timgauthier> lol
Lingo has quit [Quit: (null)]
movedx has joined #ruby
kirun has joined #ruby
nagaraj has quit [Ping timeout: 258 seconds]
<movedx> Why would the Foreman gem work fine (foreman start -f my_proc_file) when executed on the shell, but not when being executed, in the exact same manner, from an init script? It's just exiting immediatley with no errors or explanation.
ajaiswal has quit [Remote host closed the connection]
krisquigley has joined #ruby
kith has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<Timgauthier> did you load the George Foreman, or the ripoff no name brand?
noway_ has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> lol
giuseppesolinas has joined #ruby
yfeldblum has joined #ruby
weemsledeux has joined #ruby
tlarevo has joined #ruby
movedx has left #ruby [#ruby]
<damic> shevy: no it was some code i wrote to finish a CTF but just trying to make it cleaner now
pen has quit []
nagaraj has joined #ruby
kevinxu has joined #ruby
razieliyo has joined #ruby
razieliyo has joined #ruby
razieliyo has quit [Client Quit]
kevinxu is now known as Guest55771
skroon has quit [Quit: leaving]
yfeldblum has quit [Ping timeout: 272 seconds]
Guest55771 has quit [Max SendQ exceeded]
BlackGear has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
quimrstorres has joined #ruby
AlexRussia has joined #ruby
carlosoliveira has joined #ruby
quimrstorres has quit [Remote host closed the connection]
kevinxu_ has joined #ruby
<Timgauthier> you wrote code to finish capture the flag?
kevinxu_ has quit [Max SendQ exceeded]
spastorino has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<damic> Timgauthier: no it was a challenge for one flag in a ctf
fightback has joined #ruby
<damic> had to decrypt a cipher which led to another, then another 6 in total
Spami has joined #ruby
<Timgauthier> sounds fun
<damic> it was
<damic> our team got 3rd place in our league
<damic> actually 2nd
<shevy> out of 3 teams? :>
<shevy> hard to ask ;P
weemsledeux has quit [Remote host closed the connection]
<damic> lol
shredding has quit [Quit: shredding]
<damic> i think it was 36 teams
noway__ has joined #ruby
<damic> in our league
<damic> three leagues, were were in the 2nd class league.
fightback has quit [Client Quit]
quimrstorres has joined #ruby
noway_ has quit [Ping timeout: 265 seconds]
krz has quit [Quit: WeeChat 1.0.1]
tlarevo has quit [Remote host closed the connection]
<damic> So i changed the script to this http://pastie.org/9740148
<Timgauthier> ok
<Timgauthier> cool, i have no clue what is going on here
<apeiros_> damic: nobody uses String.new. just "".
<apeiros_> damic: also, don't rescue Exception. that's a bad idea in close to 100% of all cases. use plain rescue (defaults to StandardError).
Shazaum has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
nucatus has joined #ruby
jlast has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<damic> apeiros_: http://pastie.org/9740173 better?
quimrstorres has quit [Remote host closed the connection]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros_> damic: yes
giuseppesolinas has joined #ruby
<damic> thx
noop has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
<rpag> shevy, haha @ "never let austrians leave here"
NoNMaDDe_ has quit [Remote host closed the connection]
Shazaum has quit [Changing host]
Shazaum has joined #ruby
<rpag> shevy, don't you consider yourself german? speaking the same language and all.
nucatus has quit [Ping timeout: 264 seconds]
Macaveli has quit [Ping timeout: 250 seconds]
quimrstorres has joined #ruby
kloeri has quit [Changing host]
kloeri has joined #ruby
<shevy> rpag nah, we speak different languages essentially
rkalfane has joined #ruby
giuseppesolinas has quit [Client Quit]
Xeago_ has quit [Ping timeout: 272 seconds]
<Timgauthier> austrian german is a bit different of a dialect
<Timgauthier> but germans mostly understand it
<workmad3> shevy: is it really a different language? Bear in mind that this is still considered English... https://www.youtube.com/watch?v=btEpF334Rtc
<Timgauthier> Just because english people don't have standards for their language
luksaur has joined #ruby
<Timgauthier> this is also not that strange of a dialect of english
SOLDIERz has joined #ruby
<workmad3> Timgauthier: it's not the worst... but it's the worst I can think of that got into UK chart music...
<Timgauthier> look up newfie :P
<Timgauthier> this hosts hair is a crime
<Timgauthier> these men be gay
giuseppesolinas has joined #ruby
tlarevo has joined #ruby
<workmad3> Timgauthier: I could probably dig out some lovely welsh or geordie if I tried ;)
_5kg has quit [Ping timeout: 255 seconds]
<Timgauthier> oh geordie is lovely
giuseppesolinas has quit [Client Quit]
<workmad3> why aye man
yano has quit [Ping timeout: 612 seconds]
<Timgauthier> :P
<Timgauthier> but newfie is still worse, scott with irish, french and english
<workmad3> :)
<apeiros_> rpag: are you american?
<rpag> apeiros, irish
noop has joined #ruby
<apeiros_> rpag: oh. I see. but don't you consider yourself american? speaking the same language and all…
<rpag> hehehe
<Timgauthier> and i got to tinkin
<Timgauthier> they should be forced to sing all the time, you can at least understand that
<rpag> apeiros, tbh i figured austria to be thought of as another province of germany
<Timgauthier> lol
<Timgauthier> okay going to eat
Macaveli has joined #ruby
<workmad3> Timgauthier: that newfie song is no worse than lonnie donegan :P https://www.youtube.com/watch?v=Y7GeZ3YmONw
yeticry has quit [Ping timeout: 240 seconds]
yeticry has joined #ruby
ponga has joined #ruby
<bhaak> rpag: go back a 100 years and austrians thinking of themselves as german was widespread. but you know, "things" happened
jlast has quit [Ping timeout: 264 seconds]
Guest21879 has quit []
iref has joined #ruby
ionelmc has joined #ruby
dumdedum has quit [Ping timeout: 245 seconds]
giuseppesolinas has joined #ruby
<apeiros_> bhaak: in the time of könig und kaiserreich österreich-ungarn? I doubt that :D
yeticry has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
ponga has quit [Ping timeout: 245 seconds]
Prawnzy has quit [Remote host closed the connection]
yeticry has joined #ruby
papal has quit [Ping timeout: 255 seconds]
<shevy> :)
<bhaak> apeiros_: yes. remember that it was not binary. you could be austrian and german, like you can be now german and european or german and berliner or german and bavarian ... wait, forget the last one
<shevy> weird thing was only that hungarian as a language is so ... weird
papal has joined #ruby
vt102 has joined #ruby
giuseppesolinas has quit [Client Quit]
Timgauthier is now known as timgauthier_away
NoNMaDDeN has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
corehook has quit [Remote host closed the connection]
chu has joined #ruby
charliesome has quit [Quit: zzz]
<bhaak> shevy: it's not related to the other major languages in europe and only remotely related to finnish.
yfeldblum has quit [Ping timeout: 240 seconds]
<bhaak> some weirdness is to be expected :)
sprihodko has joined #ruby
aspiers has joined #ruby
nucatus has joined #ruby
JCii8__ has joined #ruby
jbw has quit [Ping timeout: 245 seconds]
kasperti_ has joined #ruby
rshetty_ has quit [Remote host closed the connection]
jbw has joined #ruby
techsethi has quit [Quit: techsethi]
Macaveli has quit [Ping timeout: 250 seconds]
JCii8_ has quit [Ping timeout: 244 seconds]
clauswitt has quit [Ping timeout: 250 seconds]
nucatus has quit [Ping timeout: 250 seconds]
Timgauthier has joined #ruby
noop has quit [Ping timeout: 264 seconds]
moritzschaefer has quit [Ping timeout: 255 seconds]
clauswitt has joined #ruby
ReRixo has quit [Ping timeout: 272 seconds]
ReRixo has joined #ruby
tvw has joined #ruby
dumdedum has joined #ruby
nfk has quit [Quit: yawn]
papal has quit [Remote host closed the connection]
papal has joined #ruby
ponga has joined #ruby
ponga has joined #ruby
AFKGeek has joined #ruby
timonv_ has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
marr has quit [Ping timeout: 245 seconds]
jonr22 has joined #ruby
aclearman037 has joined #ruby
mikepack has joined #ruby
iwishiwerearobot has quit [Ping timeout: 240 seconds]
techsethi has joined #ruby
yalue has joined #ruby
iwishiwerearobot has joined #ruby
sk87 has joined #ruby
nfk has joined #ruby
aspiers has quit [Ping timeout: 255 seconds]
jonr22 has quit [Ping timeout: 240 seconds]
mikepack has quit [Ping timeout: 240 seconds]
noop has joined #ruby
sprihodko has quit [Quit: (null)]
dangerousdave has joined #ruby
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
freerobby has joined #ruby
jeaye has quit [Quit: WeeChat 1.0]
kobain has quit [Max SendQ exceeded]
<shevy> when is it appropriate to raise a TypeError exception?
lucyinthesky has joined #ruby
phutchins has joined #ruby
<tobiasvl> when encountering an object that is not of the expected type
<shevy> hmm
kl_ has quit [Ping timeout: 264 seconds]
_5kg has joined #ruby
AFKGeek has quit [Remote host closed the connection]
jeaye has joined #ruby
elcheckito has quit [Ping timeout: 272 seconds]
aspiers has joined #ruby
jimbach has joined #ruby
chrisseaton has quit [Read error: Connection reset by peer]
troter__ has quit [Read error: Connection reset by peer]
mroth has quit [Write error: Connection reset by peer]
ckrailo has quit [Read error: Connection reset by peer]
casual_ has quit [Read error: Connection reset by peer]
im0b has quit [Read error: Connection reset by peer]
kapowaz_ has quit [Write error: Connection reset by peer]
incomprehensibly has quit [Read error: Connection reset by peer]
PhilK has quit [Write error: Connection reset by peer]
maZtah has quit [Read error: Connection reset by peer]
alol has quit [Read error: Connection reset by peer]
MiracleBlue has quit [Read error: Connection reset by peer]
jrunning_ has quit [Write error: Connection reset by peer]
dukedave has quit [Write error: Connection reset by peer]
whoojemaflip has quit [Read error: Connection reset by peer]
genta has quit [Ping timeout: 265 seconds]
thesheff17 has quit [Read error: Connection reset by peer]
kyote has quit [Read error: Connection reset by peer]
frode15243 has quit [Read error: Connection reset by peer]
ceej has quit [Write error: Connection reset by peer]
n1ftyn8 has quit [Write error: Connection reset by peer]
ZucchiniZe has quit [Write error: Connection reset by peer]
rfv has quit [Write error: Connection reset by peer]
bjeanes has quit [Read error: Connection reset by peer]
ewilliam_ has quit [Read error: Connection reset by peer]
culturelabs has quit [Write error: Connection reset by peer]
KnownSyntax has quit [Read error: Connection reset by peer]
yo61 has quit [Read error: Connection reset by peer]
shelling has quit [Read error: Connection reset by peer]
akitada has quit [Read error: Connection reset by peer]
sivoais has quit [Ping timeout: 265 seconds]
unclouded has quit [Ping timeout: 265 seconds]
russt has joined #ruby
Juanchito_ has joined #ruby
chrisseaton has joined #ruby
Juanchito has quit [Ping timeout: 265 seconds]
jimeh has quit [Ping timeout: 265 seconds]
hellschreiber has quit [Ping timeout: 265 seconds]
kapowaz_ has joined #ruby
tiagonobre___ has quit [Ping timeout: 265 seconds]
daxroc__ has quit [Ping timeout: 265 seconds]
charles81 has quit [Ping timeout: 265 seconds]
bcavileer_ has quit [Ping timeout: 265 seconds]
incomprehensibly has joined #ruby
im0b has joined #ruby
skarn has quit [Ping timeout: 265 seconds]
troter__ has joined #ruby
mroth has joined #ruby
ckrailo_ has joined #ruby
michael_mbp has quit [Ping timeout: 265 seconds]
alol has joined #ruby
MiracleBlue has joined #ruby
kyote has joined #ruby
daxroc__ has joined #ruby
PhilK has joined #ruby
jrunning_ has joined #ruby
thesheff17 has joined #ruby
exadeci has quit [Ping timeout: 265 seconds]
Snowstormer has quit [Ping timeout: 265 seconds]
machty has quit [Ping timeout: 265 seconds]
callenb__ has quit [Ping timeout: 265 seconds]
charles81 has joined #ruby
tiagonobre___ has joined #ruby
frode15243 has joined #ruby
callenb___ has joined #ruby
shelling_ has joined #ruby
akitada has joined #ruby
Juanchito_ is now known as Juanchito
n1ftyn8 has joined #ruby
ewilliam_ has joined #ruby
ZucchiniZe has joined #ruby
whoojemaflip has joined #ruby
yo61 has joined #ruby
KnownSyntax has joined #ruby
culturelabs has joined #ruby
hellschreiber has joined #ruby
sivoais has joined #ruby
skarn has joined #ruby
michael_imac has joined #ruby
casual_ has joined #ruby
shredding has joined #ruby
bjeanes has joined #ruby
exadeci has joined #ruby
giuseppesolinas has joined #ruby
dukedave has joined #ruby
unclouded has joined #ruby
machty has joined #ruby
rfv has joined #ruby
maZtah has joined #ruby
bcavileer_ has joined #ruby
rshetty has joined #ruby
jimeh has joined #ruby
benzrf|offline is now known as benzrf
atomi has quit [Ping timeout: 265 seconds]
centrx has joined #ruby
ceej has joined #ruby
LekeFly has joined #ruby
upp3r has joined #ruby
atomi has joined #ruby
BTRE has quit [Quit: Leaving]
rdark has quit [Quit: leaving]
jimms has joined #ruby
rdark has joined #ruby
genta has joined #ruby
MrIlyas has joined #ruby
Beoran has joined #ruby
BTRE has joined #ruby
quimrstorres has quit [Remote host closed the connection]
techsethi has quit [Quit: techsethi]
sivoais has quit [Ping timeout: 264 seconds]
nagaraj has quit [Remote host closed the connection]
sivoais has joined #ruby
timonv_ has joined #ruby
drawingthesun has joined #ruby
kaiwren has quit [Ping timeout: 264 seconds]
drawingthesun has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
elcheckito has joined #ruby
lucyinthesky has left #ruby ["Leaving"]
benzrf is now known as benzrf|offline
jlast has joined #ruby
benzrf|offline is now known as benzrf
TheLastExile has joined #ruby
benzrf is now known as benzrf|offline
lw has joined #ruby
jerius has joined #ruby
reinaldob has quit [Remote host closed the connection]
reinaldob has joined #ruby
elcheckito has quit [Ping timeout: 240 seconds]
<shevy> 123/456 is a Rational
<shevy> is there a way to split this up into its two components? a = 123; b = 456
Rampages has joined #ruby
sivoais has quit [Ping timeout: 255 seconds]
<shevy> >> Rational(9, -4).denominator
<eval-in__> shevy => 4 (https://eval.in/225693)
<shevy> hmm
_5kg has quit [Ping timeout: 250 seconds]
Channel6 has joined #ruby
iamjarvo has joined #ruby
last_staff has quit [Quit: last_staff]
kobain has joined #ruby
sivoais has joined #ruby
<shevy> >> Rational(9, -4).numerator #=> -9
<eval-in__> shevy => -9 (https://eval.in/225694)
<shevy> why is this -9
Czechton has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
reinaldob has quit [Ping timeout: 264 seconds]
_chs_ has quit [Read error: Connection reset by peer]
_chs_ has joined #ruby
_chs_ is now known as Guest73517
nrsk has joined #ruby
nkumari has joined #ruby
hlegius has joined #ruby
nucatus has joined #ruby
tier has joined #ruby
<jhass> because basic math?
davedev24_ has joined #ruby
<centrx> shevy, I suppose Rational normalizes it
<canton7> looks like it
tlarevo has quit [Remote host closed the connection]
sandelius has joined #ruby
<jhass> otherwise you would have to normalize it on every comparision operation, at least
sivoais has quit [Ping timeout: 272 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nucatus has quit [Ping timeout: 258 seconds]
<apeiros_> >> 123/456r
<eval-in__> apeiros_ => (41/152) (https://eval.in/225697)
<apeiros_> shevy: ^, in case you didn't know. there are rational literals now.
elcheckito has joined #ruby
sivoais has joined #ruby
hlegius has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 264 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sinkensabe has joined #ruby
anaeem1 has joined #ruby
ta_ has joined #ruby
AliRezaTaleghani has quit [Quit: Leaving.]
benzrf|offline is now known as benzrf
AliRezaTaleghani has joined #ruby
AliRezaTaleghani has quit [Client Quit]
yeticry has quit [Ping timeout: 245 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kaiwren has joined #ruby
yeticry has joined #ruby
rdark_ has joined #ruby
rdark has quit [Ping timeout: 264 seconds]
nkumari has quit [Remote host closed the connection]
sivoais has quit [Ping timeout: 265 seconds]
pygospa has quit [Disconnected by services]
anaeem1 has quit [Remote host closed the connection]
anarang has quit [Quit: Leaving]
ihme-TTilus is now known as TTilus
sivoais has joined #ruby
yano has joined #ruby
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GreatSUN has joined #ruby
<GreatSUN> hi all
<GreatSUN> I got a problem with an interactive process
razieliyo has joined #ruby
<GreatSUN> the process wants to get a password from stdin
anaeem1_ has joined #ruby
hlegius has joined #ruby
benzrf is now known as benzrf|offline
<GreatSUN> I am using tty to be able to communicate with the process
<GreatSUN> ruby version is 1.9.3
upp3r has quit [Quit: upp3r]
yeticry has quit [Remote host closed the connection]
jerius has quit []
<GreatSUN> when sending the password it seams not to transfer the password correctly to the subprocess
yeticry has joined #ruby
<GreatSUN> when doing it manually (without ruby) it works
Guest73517 is now known as _chs_
<GreatSUN> any idea what could cause this problem?
kl_ has joined #ruby
<GreatSUN> sorry... misstyped... it is surely pty and not tty
dangerousdave has joined #ruby
giuseppesolinas has joined #ruby
iamjarvo has joined #ruby
devdazed has quit [Quit: Computer has gone to sleep.]
relix has joined #ruby
sanguisdex has quit [Quit: Leaving.]
sivoais has quit [Ping timeout: 240 seconds]
Kricir has joined #ruby
snath has quit [Ping timeout: 240 seconds]
ghostlines has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sivoais has joined #ruby
_JamieD_ has joined #ruby
sanguisdex has joined #ruby
upp3r has joined #ruby
hlegius has quit [Remote host closed the connection]
nkumari has joined #ruby
havenwood has joined #ruby
lxsameer has quit [Quit: Leaving]
nkumari has quit [Remote host closed the connection]
nkumari has joined #ruby
cmckee has joined #ruby
russt has quit [Quit: russt]
rbennacer has joined #ruby
<rbennacer> hey guys what does this annotation mean def current_user=(user)
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<centrx> rbennacer, what about it?
<rbennacer> what is the '=' doing there?
BlackGear has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
livingstn has joined #ruby
baroquebobcat has joined #ruby
<centrx> rbennacer, It indicates a method used for assignment, method names can end in '=' or '?'
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<centrx> rbennacer, but it is part of the method name
<rbennacer> oh
ghostlines has joined #ruby
<rbennacer> ok, it was confusing. I am used to see only '!' or '?'
_axx has joined #ruby
_axx has left #ruby [#ruby]
oleo has joined #ruby
AlexRussia has quit [Ping timeout: 265 seconds]
Kricir has quit [Remote host closed the connection]
jhass has quit [Quit: Bye]
jhass has joined #ruby
dangerousdave has joined #ruby
_5kg has joined #ruby
nkumari has quit [Remote host closed the connection]
sivoais has quit [Ping timeout: 265 seconds]
kasperti_ is now known as kaspertidemann
quimrstorres has joined #ruby
lw has quit [Quit: s]
sivoais has joined #ruby
upp3r has quit [Quit: upp3r]
cmckee has quit [Quit: cmckee]
<shevy> yeah rbennacer - I think the only 3 special tokens are '!' '?' and '='; you can have method names like [] too though
<shevy> def self.[](input_argument_comes_here)
<rbennacer> nice
<rbennacer> thank you shevy
quimrstorres has quit [Ping timeout: 240 seconds]
fmcgeough has joined #ruby
pa3ce has joined #ruby
Macaveli has joined #ruby
dumdedum has quit [Ping timeout: 240 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krzbrg has joined #ruby
upp3r has joined #ruby
<krzbrg> Is there a recommended way to build a dashboard or timeline view in Rails that calls multiple models?
<krzbrg> I created a new controller for the view but the index action is starting to look a bit bloated.
pandaant has quit [Remote host closed the connection]
sivoais has quit [Ping timeout: 264 seconds]
ghostlines has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jlebrech has joined #ruby
benzrf|offline is now known as benzrf
kp666 has quit [Quit: Leaving]
noop has quit [Ping timeout: 258 seconds]
sivoais has joined #ruby
<jlebrech> I feel like there's a neater way to do this https://gist.github.com/jlebrech/02b904d662cd6d000697
sambao21 has joined #ruby
lw has joined #ruby
silkfox has joined #ruby
dorei has joined #ruby
reinaldob has joined #ruby
adriancb has joined #ruby
sailias has joined #ruby
<krzbrg> If you are using symbols as your hash keys, there is a terser syntax that you could use: {a: 3, b: 7}, etc.
kaspertidemann has quit []
enebo has joined #ruby
Tuxero has joined #ruby
upp3r has quit [Quit: upp3r]
GPH|work has joined #ruby
philwantsfish has quit [Ping timeout: 264 seconds]
<jhass> krzbrg: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ help
<krzbrg> Will do. Thanks jhass.
iamjarvo has joined #ruby
<jhass> jlebrech: ugh, start by indenting it properly
<jlebrech> krzbrg: i fix hash rockets have the same weight
devdazed has joined #ruby
tier_ has joined #ruby
<jlebrech> :a => 2, a: 2
jlast has joined #ruby
<krzbrg> They do. I just find the latter a touch easier to type and read :)
Darryl_ has joined #ruby
<jlebrech> by the time i've typed a hash rocket then changed it to new style i've typed twice as much
<jhass> jlebrech: next proper variable names would help, data, k and v are not good, they describe the data structure and not what it represents
josephndenton has joined #ruby
sivoais has quit [Ping timeout: 255 seconds]
rbennacer has left #ruby ["Leaving"]
<jlebrech> ok
jonr22 has joined #ruby
nucatus has joined #ruby
sivoais has joined #ruby
noop has joined #ruby
tier has quit [Ping timeout: 255 seconds]
<jlebrech> could i make do without .inject(...merge..).map..compact...inject ? i'll micro-optimize once i know this
maestrojed has joined #ruby
lw has quit [Quit: s]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<workmad3> jlebrech: data.map{|hsh| hsh.select{|k, v| v.is_a?(Numeric)} <-- I'd do that first too, strip out non-numeric values at the start
AlexRussia has joined #ruby
<jhass> ^ ++
<jlebrech> yeah that's a good one
benzrf is now known as benzrf|offline
quimrstorres has joined #ruby
<workmad3> (missed a closing }, but ah well :) )
<jhass> will save the compact
benzrf|offline is now known as benzrf
<workmad3> jlebrech: I'd also suggest doing 'v.fdiv(data.count)' at the end too
<workmad3> jlebrech: rather than v / data.count
<jhass> Enumerable#count -> Hash#size
<workmad3> ^^
<jlebrech> workmad3: the div makes sense
<jlebrech> no shorter way to get average in arrays of hashes? with anything built in?
quimrstorres has quit [Remote host closed the connection]
mleone has joined #ruby
Channel6 has quit [Quit: Leaving]
<ddv> jlebrech: you could extend Array, Hash
jonr22 has quit [Ping timeout: 255 seconds]
russt has joined #ruby
<jhass> .each_with_object({}) {|(k, v), averages| averages[k] = v.fdiv(data.size) }
<jhass> saves allocating a ton of hashes just to merge them into one again
<workmad3> jlebrech: first, it's the mean... 'average' can mean one of 3 different operations... and second, not afaik... there are so many ways you could structure your data in a hash, you kinda need to roll your own operations on it to handle the particular one you chose
upp3r has joined #ruby
<jlebrech> workmad3: I see.
lw has joined #ruby
klmlfl has joined #ruby
<jlebrech> maybe in a language without hashes they'd have inbuilt operations for what i'm on abgout?
ghostlines has joined #ruby
<jlebrech> about*
lw has quit [Client Quit]
kamilc__ has quit [Quit: Leaving...]
dANO has joined #ruby
<jhass> R surely has one
<workmad3> jhass: ooh... 'data.each_with_object(Hash.new(0)) {|hsh, averages| hsh.each{|k, v| averages[k] += v.fdiv(data.size) if v.is_a?(Numeric)}};
Megtastique has joined #ruby
<jlebrech> jhass: yeah, i was looking to do a map/reduce as first to no avail
<jhass> oh you can transform sum(m)/n into sum(m/n) ? I suck at math...
sivoais has quit [Ping timeout: 264 seconds]
<workmad3> jhass: (a + b + c) / d == (a / d) + (b / d) + (c / d)
Photism has joined #ruby
<ddv> add a mean method to Enumerable with something like: require 'mathn'; self.sum/self.length.to_f
sivoais has joined #ruby
<workmad3> (it's very obvious if you remember that d * (a + b + c) == a*d + b*d + c*d and that 'a / d' == 'a + d**-1'
j2p2 has joined #ruby
<workmad3> err, a * d**-1 even
AFKGeek has joined #ruby
giuseppesolinas has joined #ruby
mary5030 has joined #ruby
<jhass> mmh, right
<jhass> thanks
<jlebrech> well you guys are awesome :D
<workmad3> jlebrech: you may want to micro-optimise that so that you don't do so many divisions, as they'll be expensive... but I expect you'd need to get a lot more data in your array before you'd really need to worry about it (especially compared with the cost of iterating over the array 3 or 4 times ;) )
mary5030 has quit [Remote host closed the connection]
craigp has joined #ruby
mary5030 has joined #ruby
<jlebrech> workmad3: yeah :)
havenwood has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
j2p2 has quit [Ping timeout: 245 seconds]
craigp has quit [Client Quit]
Joufflu has joined #ruby
<jhass> also divisions are still a lot cheaper than allocations
Kricir has joined #ruby
The_NetZ has joined #ruby
<The_NetZ> hey. having some issue compiling 32bit ruby on a 64 bit system; error: https://clbin.com/Vi9ET
j2p2 has joined #ruby
<workmad3> jlebrech: oh, you may also find a bit of rounding error gets introduced there too... so if you need really high precision, again move the division to the end and maybe consider converting your calculations to use BigDecimal instead of floats
moritzschaefer has joined #ruby
livathinos has quit []
arup_r has joined #ruby
<jlebrech> workmad3: that's not an issue :)
giuseppesolinas has quit [Quit: This computer has gone to sleep]
tesuji has quit [Ping timeout: 240 seconds]
ghostlines has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jimms has quit [Remote host closed the connection]
<workmad3> jlebrech: we don't know the context, so can't be sure... hence why I flagged it up, just in case ;)
livathinos has joined #ruby
<jlebrech> workmad3: that's cool
patrick99e99 has joined #ruby
<workmad3> jlebrech: it's also surprising how quickly that sort of thing can become an issue... however, iirc my error bound maths correctly, the division should have the effect of reducing the overall error rather than increasing it
sivoais has quit [Ping timeout: 244 seconds]
giuseppesolinas has joined #ruby
apope has joined #ruby
axl_ has joined #ruby
sivoais has joined #ruby
klmlfl has quit [Remote host closed the connection]
upp3r has quit [Quit: upp3r]
divi has joined #ruby
fsapo has joined #ruby
giuseppesolinas has quit [Client Quit]
patrick99e99 has quit [Ping timeout: 265 seconds]
tobago has quit [Read error: Connection reset by peer]
dfedde has joined #ruby
zacstewart has joined #ruby
VinVanKoh has joined #ruby
dfedde has quit [Client Quit]
havenwood has joined #ruby
iamjarvo has joined #ruby
divi has quit [Ping timeout: 240 seconds]
dfedde has joined #ruby
Ankhers has joined #ruby
apope has quit [Quit: apope]
quimrstorres has joined #ruby
arrubin has joined #ruby
apope has joined #ruby
willywos has joined #ruby
VinVanKoh has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
willywos has quit [Client Quit]
corehook has joined #ruby
tagrudev has quit [Remote host closed the connection]
psy has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
divi has joined #ruby
dangerousdave has joined #ruby
upp3r has joined #ruby
sivoais has quit [Ping timeout: 272 seconds]
sivoais has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
devdazed has quit [Read error: Connection reset by peer]
mengu has quit []
adriancb has quit [Remote host closed the connection]
ph8 has quit [Ping timeout: 240 seconds]
parabolize has joined #ruby
devdazed has joined #ruby
devdazed has quit [Client Quit]
adriancb has joined #ruby
Akagi201 has joined #ruby
havenwood has joined #ruby
ghostlines has joined #ruby
ghostlines has quit [Max SendQ exceeded]
ghostlines has joined #ruby
ghostlines has quit [Max SendQ exceeded]
devdazed has joined #ruby
adriancb has quit [Remote host closed the connection]
ghostlines has joined #ruby
ghostlines has quit [Max SendQ exceeded]
adriancb has joined #ruby
noop has quit [Ping timeout: 240 seconds]
ghostlines has joined #ruby
ghostlines has quit [Max SendQ exceeded]
Guest79317 has quit []
Guest79317 has joined #ruby
ghostlines has joined #ruby
ghostlines has quit [Max SendQ exceeded]
Guest79317 has quit [Client Quit]
MrIlyas has quit [Read error: Connection reset by peer]
NoNMaDDeN has quit [Remote host closed the connection]
anaeem1_ has quit [Remote host closed the connection]
NoNMaDDeN has joined #ruby
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
momomomomo has joined #ruby
RTG` has joined #ruby
ghostlines has joined #ruby
framling has joined #ruby
ph8 has joined #ruby
ReRixo has quit [Ping timeout: 265 seconds]
sivoais has quit [Ping timeout: 272 seconds]
anaeem1_ has joined #ruby
SOLDIERz has quit [Quit: Be back later ...]
sivoais has joined #ruby
Fire-Dragon-DoL has joined #ruby
<jheg> o/
<jheg> is this possible
<jheg> I want to ask for num of players
<jheg> and set the number as a variable called num
<apeiros_> yes
moritzschaefer has quit [Ping timeout: 255 seconds]
<jheg> then I want to iterate through (1..num) and ask each players name which I will set in the Player object
krzbrg has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
VinVanKoh has joined #ruby
VinVanKoh has quit [Client Quit]
<jheg> So I have that part working and currently storing each iteration into an array
dangerousdave has joined #ruby
<jheg> so i have an array of Player objects
dangerousdave has quit [Max SendQ exceeded]
<jheg> But what I’d like to do is store variables named player1, player2, player3 etc in the array which each var being a Player object
AlexRussia has quit [Ping timeout: 264 seconds]
rippa has joined #ruby
<apeiros_> that's a bad idea.
dangerousdave has joined #ruby
<apeiros_> the lvar system is not a hash. if you want a hash, use one.
<jheg> So I think i need a way of taking the num of players then iterating through each num asking for each players name which is stored in Player.name and assigning the Player object to player1 … player2 and storing these vars in an array
mkaesz has quit [Remote host closed the connection]
<jheg> make sense
dangerousdave has quit [Max SendQ exceeded]
Hijiri has quit [Quit: WeeChat 1.0.1]
<jheg> Ah OK
mkaesz has joined #ruby
<apeiros_> but seriously, if you have player1..player4, I see no reason to not just use player[0]..player[3] instead
<apeiros_> or why do you want player1 instead of player[0]?
<jheg> Because the num of players is not finite
dumdedum has joined #ruby
<apeiros_> jheg: that's actually a reason to *even more* use player[n] instead of playerN
sinkensabe has quit [Remote host closed the connection]
AlexRussia has joined #ruby
Joufflu has quit [Ping timeout: 258 seconds]
dangerousdave has joined #ruby
<jheg> can you explain that to me apeiros_ I don’t quite follow
dangerousdave has quit [Max SendQ exceeded]
<apeiros_> I can't explain it until you gave me a good reason to prefer playerN over player[n] (the latter being an array of players)
<jheg> So lemme just check we on the same page
<Xeago> apeiros_: you don't want to address your players as player43121230847129837413249
<Xeago> err jheg
<Xeago> instead have a array, players which contains a number of items, which you access as players[index]
<Xeago> players.each { |player| puts player.name }
sivoais has quit [Ping timeout: 250 seconds]
<Xeago> instead of: puts player1.name; puts player2.name …
<jheg> yeah that’s what I have currently actualluy
<Xeago> then what is the problem?
sivoais has joined #ruby
mkaesz has quit [Ping timeout: 264 seconds]
<jheg> yeah not sure :)
<Xeago> num.times { |i| puts "Name for #{i}'th player?"; name = …read…name…; players << Player.new(name: name) }
mikepack has joined #ruby
<apeiros_> or just: players = Array.new(num) { |i| …
<apeiros_> afk
<Xeago> :O
<Xeago> didn't know that one
<jheg> I think it was just when I inspect the player array it was giving me the object [<Player:0x00000101154363458>, <Player:0x000001011cc5a8>] rather than [player1, player2]
stunder has joined #ruby
drewvanstone has joined #ruby
rodfersou has quit [Ping timeout: 240 seconds]
<Xeago> jheg: you'll need to override #to_inspect to print something useful
<Xeago> by default you'll get #to_inspect from Object
<Xeago> which prints the class and memory address
<jheg> cool that might be just what i needed to know
<jheg> so I’d do that from the Player class?
<Xeago> I'm not 100% sure on the method name, might be #inspect as well
sivoais has quit [Read error: Connection reset by peer]
<Xeago> jheg: on the class you want to be formatted as you want it to be
sivoais has joined #ruby
<apeiros_> #inspect
<apeiros_> not to_inspect ;-)
it0a has joined #ruby
<apeiros_> jheg: and assigning stuff to player1 doesn't make it show up under that name in inspect
<Xeago> >> class Foo; def inspect; "yay"; end; end; Foo.new.inspect
<eval-in__> Xeago => "yay" (https://eval.in/225755)
<apeiros_> >> x = "hello"; a = [x]; a
<eval-in__> apeiros_ => ["hello"] (https://eval.in/225756)
ctp has joined #ruby
bal has quit [Quit: bal]
<apeiros_> jheg: ^ see, doesn't say [x] in the output
<apeiros_> wouldn't make sense either.
<Xeago> >> class Foo; def inspect; "yay"; end; end; Foo.new
<eval-in__> Xeago => yay (https://eval.in/225757)
<jheg> see what you mean
dkb20k has quit [Remote host closed the connection]
<apeiros_> also a case of xy problem...
<apeiros_> !xy
The_NetZ has quit [Ping timeout: 256 seconds]
<earlz> So, anyone use Sequel?
<earlz> considering if I should write my database structure manually as SQL, or use the Sequel DSL bits
<earlz> for a data heavy application
* apeiros_ off again
apeiros_ has quit [Remote host closed the connection]
AFKGeek has quit [Quit: Leaving]
aganov has quit [Remote host closed the connection]
apeiros_ has joined #ruby
Xeago_ has joined #ruby
snath has joined #ruby
apeiros_ has quit [Ping timeout: 245 seconds]
<Takumo> Hi all, what's the best way to connect ruby to MSSQL in a way which will work on both win32 and linux?
Xeago has quit [Ping timeout: 244 seconds]
geekbri has joined #ruby
kwd has quit [Ping timeout: 240 seconds]
lmickh has joined #ruby
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
adriancb has quit [Remote host closed the connection]
<jlebrech> Takumo: write and api in c# ?
n008f4g_ has joined #ruby
<Takumo> jlebrech: whole point of this project is to not use C# as I don't know the language
<shevy> Takumo he just wants to distract you from the beauty of ruby ;)
klmlfl has joined #ruby
<Takumo> in fact, this project is to write an API in ruby to access data in an MSSQL db
<shevy> unfortunately I only know postgresql, and even then I only used ruby to autogenerate SQL statements, like into a .sql file with lots of INSERT statements
<jlebrech> the 2nd best option would be to use TDS
<earlz> some years ago, I wrote some hack to migrate PostgreSQL to MSSQL using active record I think
<shevy> tatoo driven system?
<shevy> oh lol
<earlz> but that wouldn't run on Linux I don't think
<shevy> now I actually noticed the 'S' in MSSQL... my brain thought it was MySQL for a moment ...
ghostlines has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
livathinos has quit []
apope has quit [Quit: apope]
gsd has joined #ruby
<Takumo> jlebrech: not using activerecord though, we're planning on using Sequel
<Takumo> problem is, I don't think the tiny_tds thing works on windows, does it?
<Takumo> seems dependant on FreeTDS, which is non-windows
<earlz> tiny_tds works on windows
<earlz> or somethign tds works on windows
kl_ has quit [Ping timeout: 240 seconds]
<earlz> it's been way too long, but this is what I did forever ago http://stackoverflow.com/questions/6377999/sql-server-and-rails-trouble
<earlz> (check my self-answer)
dangerousdave has joined #ruby
<jlebrech> also, try JDBC with sequel. you'll have to install a driver on the sql server box
<earlz> oh I did do that on Linux.. could've swore it was windows
apope has joined #ruby
rodfersou has joined #ruby
fabrice31 has quit [Remote host closed the connection]
LekeFly has quit [Ping timeout: 265 seconds]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Raboo has quit [Ping timeout: 264 seconds]
corehook has quit [Remote host closed the connection]
wildroman2 has quit [Remote host closed the connection]
sinkensabe has joined #ruby
paulfm has joined #ruby
Megtastique has quit []
jimms has joined #ruby
failshell has joined #ruby
<failshell> https://gist.github.com/failshell/f78e4a5432851e22a472 <- considering both code snipets achieve the same results, which is better? i cant seem to make up my mind about that.
<ericwood> I feel like URI#encode_www_form is a crappy method name
Prawnzy has joined #ruby
tzero has quit [Ping timeout: 265 seconds]
ikaros has quit [Quit: Ex-Chat]
<shevy> ericwood yeah
rshetty has quit [Ping timeout: 264 seconds]
<shevy> problem is - how to make it shorter?
<ericwood> URI#encode_arguments or something along those lines
<ericwood> leave the whole "form" bit out of it, all it does is concatenate/escape args
banister is now known as banisterfiend
dkb20k has joined #ruby
uber_hulk has joined #ruby
axisys has quit [Changing host]
axisys has joined #ruby
uber_hulk has quit [Client Quit]
apeiros_ has joined #ruby
the_lord has joined #ruby
HayesHimself has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psy has joined #ruby
chu has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikepack has quit [Remote host closed the connection]
dkb20k has quit [Ping timeout: 272 seconds]
iamjarvo has joined #ruby
olivier_bK has quit [Ping timeout: 255 seconds]
_bart has quit [Quit: Bye!]
nucatus has quit []
moted has joined #ruby
Shazaum has quit [Quit: Leaving]
adriancb has joined #ruby
realDAB has joined #ruby
realDAB has quit [Client Quit]
ferri has joined #ruby
chu has joined #ruby
apope has quit [Quit: apope]
tastycode has quit [Quit: tastycode]
giuseppesolinas has joined #ruby
Hobogrammer has quit [Ping timeout: 255 seconds]
Megtastique has joined #ruby
apope has joined #ruby
Megtastique has quit [Client Quit]
sargas has joined #ruby
ta_ has quit [Remote host closed the connection]
CustosL1men has quit [Ping timeout: 272 seconds]
giuseppesolinas has quit [Client Quit]
<epitron> I feel like encoding form stuff should be the responsibility of the http library, not the URL class
<epitron> or the CGI class
rshetty has joined #ruby
dANO has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
<epitron> URLs should just parse URLs and hold onto params
dANO has joined #ruby
tzero has joined #ruby
gsd has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
kamilc__ has joined #ruby
iref has left #ruby [#ruby]
dumdedum has quit [Quit: foo]
aspires has joined #ruby
Snowstormer has joined #ruby
Snowstormer has joined #ruby
jonr22 has quit [Ping timeout: 258 seconds]
jimms has quit [Ping timeout: 264 seconds]
checkit has joined #ruby
AugustAnna has left #ruby [#ruby]
wildroman2 has joined #ruby
<ericwood> I'd be okay with that
agjacome has joined #ruby
Hijiri has joined #ruby
Macaveli has quit [Ping timeout: 250 seconds]
kl has joined #ruby
fsapo has left #ruby [#ruby]
jlast has quit [Remote host closed the connection]
Olipro has quit [Ping timeout: 256 seconds]
Xeago_ has quit [Remote host closed the connection]
Akagi201 has quit []
msgodf has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
_ixti_ has quit [Ping timeout: 256 seconds]
corehook has joined #ruby
_ixti_ has joined #ruby
Timgauthier is now known as timgauthier_away
timgauthier_away is now known as Timgauthier
moritzschaefer has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
klmlfl_ has joined #ruby
ctp has joined #ruby
geekbri has quit []
apope has quit [Quit: apope]
f00dMonsta has quit [Ping timeout: 272 seconds]
klmlfl has quit [Ping timeout: 240 seconds]
apope has joined #ruby
SCHAAP137 has quit [Ping timeout: 255 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dangerousdave has joined #ruby
relix has joined #ruby
_JamieD__ has joined #ruby
chu has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Bira has joined #ruby
tastycode has joined #ruby
bricker`work has joined #ruby
shredding has quit [Quit: shredding]
_JamieD_ has quit [Ping timeout: 264 seconds]
_JamieD__ is now known as _JamieD_
Timgauthier is now known as timgauthier_away
timonv_ has quit [Remote host closed the connection]
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arya_ching has joined #ruby
failshell has quit []
abuzze has quit [Ping timeout: 255 seconds]
Timgauthier has joined #ruby
iwishiwerearobot has quit [Ping timeout: 240 seconds]
zacstewart has quit [Remote host closed the connection]
<shevy> This
<shevy> is
<shevy> PYTHON!!!
<ponga> shevy+1
<shevy> we need more comics like that
agjacome has quit [Quit: leaving]
<shevy> sad that _why left - noone else got any drawing skills here
<ponga> shevy: but i don't get it by 100%, is it supposed to mean you could do a = a in python
zacstewart has joined #ruby
ghostlines has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
<ponga> cos you know
<shevy> I think it's a pun on permanent self.bla or something, or that you have to pass self in python
<ponga> i don't know python
<ponga> i only know ruby
<ponga> *proud
<shevy> because in python, self is explicit
<shevy> which I hate
kireevco has joined #ruby
blackmesa has joined #ruby
<shevy> why is the object not clever enough to know where it is?
<ponga> why do you have to that?
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> well you can name it differently
<ponga> is that what they speak as 'the python way'
<shevy> I dunno really, I am sure python had a reason why it was introduced that way
<ponga> whenever i come across a question article of python , i see this kind of 'what you are supposed to do is not the true python way of coding, you should try ~'
<ponga> shevy is it normal
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
f00dMonsta has joined #ruby
<ponga> python is like there is ultimate answer and everyone should follow the devine rule
anaeem1 has joined #ruby
<shevy> dunno
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lmickh has quit [Remote host closed the connection]
<shevy> I don't think any programming language can really adhere to this without breaking that rule
<shevy> it's more like an attempt to manage complexity
<shevy> "if we keep it all super simple, it will be all super easy"
<ponga> shevy do you consider yourself a dev
<shevy> nope
<ponga> do you develop to make living shevy
startupality has quit [Quit: startupality]
<shevy> nope
benzrf is now known as benzrf|offline
pandaant has joined #ruby
_JamieD_ has quit [Ping timeout: 250 seconds]
<ponga> CAN you manage to just develop to make living as a job shevy
<ericwood> I'm going to murder this API
<shevy> I think so, but probably in bioinformatics
jimms has joined #ruby
<ponga> i see
<shevy> but I don't really want to spend more time with computers, I want to spend less time with them
<ponga> so im like you? maybe?
<banisterfiend> ponga shevy still lives with his mommy and daddy :)
whoisjake has joined #ruby
<ponga> i reckon i could only use programming to make living when its about linguistics or NLP
<ponga> but shevy... i see you here all the time...
<ponga> how come you want to spend less time with it
<shevy> ponga it's the last remaining IRC channel I am active in really
<ponga> and banisterfiend thank for personal update
bigkevmc_ has joined #ruby
<ponga> i see, youre no longer active in ##English anymore
<ponga> that's where i first saw you
<shevy> I am in 7 channels right now - 3 of them are inactive, one I can cut, another one is with some people from austria, and the last one is #ruby
<shevy> hah I missed one
klmlfl_ has quit [Ping timeout: 245 seconds]
bigkevmcd has quit [Ping timeout: 245 seconds]
<ponga> im mostly active in ##Cooking
<shevy> lol
roolo has quit [Quit: AAAAaaaaAAAAAAA]
<Timgauthier> lier
<ponga> im their authoritive asian cuisine advisory shevy
<shevy> oh... I think the 7th was #gobolinux. it had the better idea
jimms_ has joined #ruby
<ponga> everyone there is yoropean
<shevy> but it died when hisham left :(
Morkel has quit [Quit: Morkel]
<shevy> people leaving is bad! like _why
<shevy> <udac> can I use macros, in Lisp, to avoid using ()'s?
<shevy> cool
rshetty has quit [Remote host closed the connection]
doev has joined #ruby
corehook has quit [Remote host closed the connection]
jimms has quit [Ping timeout: 264 seconds]
pacMakaveli has quit [Remote host closed the connection]
rkalfane has joined #ruby
Macaveli has joined #ruby
mikepack has joined #ruby
giuseppesolinas has joined #ruby
timonv_ has joined #ruby
last_staff has joined #ruby
hmsimha has joined #ruby
grzywacz has joined #ruby
Hanmac has quit [Ping timeout: 265 seconds]
<Timgauthier> fuck i dislike having to make menu's :|
dkb20k has joined #ruby
mikecmpbll has quit [Quit: ciao.]
Tricon has joined #ruby
tvw has quit [Ping timeout: 255 seconds]
spacemud has quit [Ping timeout: 250 seconds]
SCHAAP137 has joined #ruby
dANO has quit []
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sambao21 has quit [Quit: Computer has gone to sleep.]
krisquigley has quit [Remote host closed the connection]
ptrrr has joined #ruby
DaniG2k has quit [Quit: leaving]
krisquigley has joined #ruby
upp3r has quit [Quit: upp3r]
o0oo0o has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 240 seconds]
duggiefresh has joined #ruby
nateberkopec has joined #ruby
stunder has quit [Remote host closed the connection]
wildroman2 has quit []
despai has joined #ruby
joonty has quit [Ping timeout: 265 seconds]
mois3x has joined #ruby
stunder has joined #ruby
krisquigley has quit [Ping timeout: 264 seconds]
jlebrech has quit []
sambao21 has joined #ruby
francisfish has quit [Remote host closed the connection]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
TheLastExile has quit [Ping timeout: 258 seconds]
Hanmac has joined #ruby
jheg has quit [Quit: jheg]
francisfish has joined #ruby
adriancb has quit [Remote host closed the connection]
apope has quit [Quit: apope]
mloveless has joined #ruby
abuzze has joined #ruby
mikecmpbll has joined #ruby
sargas has quit [Quit: Leaving]
Prawnzy has quit [Remote host closed the connection]
<shevy> you are cooking Timgauthier?
<Timgauthier> babies
<Timgauthier> no, for websites
francisfish has quit [Read error: Connection reset by peer]
francisfish has joined #ruby
troyready has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
the_lord has quit [Read error: Connection timed out]
the_lord has joined #ruby
deric_skibotn has joined #ruby
ReRixo has joined #ruby
pietr0 has joined #ruby
francisfish has quit [Ping timeout: 264 seconds]
jlast has joined #ruby
echooo1 has quit [Remote host closed the connection]
<shevy> ah yes
<shevy> I once had this genious idea of letting ruby auto-generate me menus
spacemud has joined #ruby
cleopatra has quit [Quit: Saliendo]
chu has joined #ruby
ghostlines has quit [Quit: Textual IRC Client: www.textualapp.com]
econerd4ever has joined #ruby
AmBienCeD has joined #ruby
Hijiri has quit [Ping timeout: 255 seconds]
giuseppesolinas has joined #ruby
timonv^ has joined #ruby
quimrstorres has quit [Remote host closed the connection]
wallerdev has joined #ruby
momomomomo has quit [Quit: momomomomo]
einarj has quit [Remote host closed the connection]
timonv_ has quit [Ping timeout: 240 seconds]
einarj has joined #ruby
giuseppesolinas has quit [Client Quit]
hiyosi has quit [Ping timeout: 265 seconds]
quimrstorres has joined #ruby
iamjarvo has joined #ruby
nateberkopec has quit [Quit: Leaving...]
Prometheian has joined #ruby
f00dMonsta_ has joined #ruby
einarj has quit [Ping timeout: 240 seconds]
henesy has quit [Excess Flood]
Macaveli has quit [Ping timeout: 255 seconds]
CorySimmons has joined #ruby
henesy has joined #ruby
fabrice31 has joined #ruby
anaeem1 has quit [Remote host closed the connection]
tvw has joined #ruby
f00dMonsta has quit [Ping timeout: 265 seconds]
bigkevmc_ is now known as bigkevmcd
aspires has quit []
jobewan has joined #ruby
<Timgauthier> brutal
<Timgauthier> i'm just going to you refills.bourbon.io code
Tricon has quit [Remote host closed the connection]
<Timgauthier> it works good enough, its better then what we had before (bootstrap) and i'm not in a place in my head to think through writing it myself right now
stunder has quit [Ping timeout: 240 seconds]
<Timgauthier> its modular so i can rewrite it later
giuseppesolinas has joined #ruby
boombadaroomba has joined #ruby
benzrf|offline is now known as benzrf
mikecmpbll has quit [Quit: i've nodded off.]
fabrice31 has quit [Ping timeout: 256 seconds]
mikecmpbll has joined #ruby
jimbach has quit [Remote host closed the connection]
noop has joined #ruby
j_mcnally has joined #ruby
stunder has joined #ruby
timonv^ has quit [Read error: Connection reset by peer]
Prometheian has quit [Remote host closed the connection]
timonv_ has joined #ruby
kl has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
timonv_ has quit [Remote host closed the connection]
GreatSUN has quit [Ping timeout: 246 seconds]
apope has joined #ruby
ctp has joined #ruby
djbkd has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
adriancb has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
arup_r has quit [Quit: Leaving.]
redb has joined #ruby
<redb> hi
_ixti_ has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
aspires has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
arup_r has joined #ruby
Timgauthier is now known as timgauthier_away
<redb> I have a simple problem which I think has some kind of obvious answer that I can't find: I'm trying scan recursively through a tree of files and folders with Dir.glob. Sometimes, I need to rename a folder. The problem is that whenever I do that, is that inside the Dir.glob structure it still has the files inside the renamed folder with the old name. So if do any operation on those files it fails. The Dir.glob process would need to restart anew to get the ne
<redb> w paths. How do I solve this?
ferri has quit [Read error: Connection reset by peer]
chthon has quit [Ping timeout: 255 seconds]
p8952_ is now known as p8952
ordepdev has quit [Ping timeout: 255 seconds]
jimms_ has quit [Remote host closed the connection]
p8952 has quit [Quit: ZNC - http://znc.in]
whoisjake has quit []
<redb> I'm working with "Dir.glob.sort.each" actually, so starting there's no built-in way to start the block again.
ferri has joined #ruby
dangerousdave has joined #ruby
St_Marx has quit [Quit: WeeChat 1.0.1]
dangerousdave has quit [Max SendQ exceeded]
Prometheian has joined #ruby
giuseppesolinas has joined #ruby
<havenwood> redb: map
<havenwood> redb: for example: Dir['**'].sort.map { |file| file.start_with?('s') ? '!!!' : file }
ferri has quit [Read error: Connection reset by peer]
grzywacz has quit [Ping timeout: 258 seconds]
t_mmyv has joined #ruby
baweaver has joined #ruby
arya_ching has quit []
arya_ching has joined #ruby
djbkd has quit [Remote host closed the connection]
upp3r has joined #ruby
despai has joined #ruby
naturtrunken_m has joined #ruby
Jake232 has joined #ruby
jonr22 has joined #ruby
klmlfl has joined #ruby
<redb> havenwood, wait I'm not getting it. could you elaborate a bit more? Assume that I know what map does, and that I know the code you have written. But I still don't uderstand how that fixes my problem.
kaspertidemann has joined #ruby
Pumukel has joined #ruby
NoNMaDDeN has quit [Remote host closed the connection]
rdark_ has quit [Quit: leaving]
aspires has quit []
<havenwood> redb: those assumptions are contradictory
<redb> we're inside the block, a line of code changes a folder's name, say from "Folder" "NEWfolder". Now the block iterates on the files that go into that folder, but it's looking for "Folder/file1" not "NEWfolder/file1"
<redb> alright, could you still explain a bit more?
aspires has joined #ruby
<havenwood> redb: whatever change you've made, return it as the value of your block
<havenwood> redb: map to the new values, whatever they are
_ixti_ has joined #ruby
naturtrunken_m has quit [Remote host closed the connection]
m8 has joined #ruby
<redb> ah mmmh, almost getting it, lemme try
djbkd has joined #ruby
beneggett has joined #ruby
jonr22 has quit [Ping timeout: 264 seconds]
timgauthier_away is now known as Timgauthier
claymore has joined #ruby
fantazo has quit [Ping timeout: 255 seconds]
jimbach has joined #ruby
jimbach has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
tvw has quit []
jimbach has joined #ruby
mikecmpbll has joined #ruby
galeido has joined #ruby
gargarin has joined #ruby
<redb> havenwood, if I've understood correctly, do I need to do use two consecutive blocks like this: Dir.glob(/**/).sort.map{change all folders that need changing}.each{now operate on files of changed folder} ??
krisquigley has joined #ruby
<redb> I can't change folders and operate directly inside of the first map right?
Authenticator has quit [Quit: leaving]
<havenwood> redb: sure you can
<redb> ah... mmmh didn't know that... lemme try again then
grzywacz has joined #ruby
Prometheian has quit [Read error: Connection reset by peer]
benzrf is now known as benzrf|offline
eguneys has joined #ruby
<eguneys> Can you help me about securing API endpoints, see this gist:
benzrf|offline is now known as benzrf
vinleod has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
terlar has quit [Ping timeout: 264 seconds]
<gargarin> Hi all
djbkd has quit [Remote host closed the connection]
cleopatra has joined #ruby
krisquigley has quit [Ping timeout: 272 seconds]
Dreamer3 has quit [Quit: Leaving...]
djbkd has joined #ruby
blahwoop has joined #ruby
<blahwoop> whats up
gargarin has left #ruby [#ruby]
arup_r has quit [Quit: Leaving.]
redb has quit [Ping timeout: 244 seconds]
<havenwood> eguneys: I doubt you'll want to be an oauth provider yourself. Sure you can use other providers, just pick ones that overlap with your users.
jdj_dk has joined #ruby
<havenwood> eguneys: i don't understand the redirects question
zacstewart has quit [Remote host closed the connection]
<havenwood> say more?
hiyosi has joined #ruby
<havenwood> eguneys: there are certainly simpler options than oauth, do you need things oauth provides?
perturbation has joined #ruby
Hijiri has joined #ruby
t7y9r has quit [Ping timeout: 245 seconds]
jdj_dk_ has joined #ruby
jdj_dk has quit [Read error: Connection reset by peer]
<havenwood> eguneys: here're some examples of basic auth: http://recipes.sinatrarb.com/p/middleware/rack_auth_basic_and_digest
t7y9r has joined #ruby
hiyosi has quit [Ping timeout: 244 seconds]
atmosx has joined #ruby
zacstewart has joined #ruby
p8952 has joined #ruby
<atmosx> hello
<havenwood> hi
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<eguneys> havenwook: thanks for simplifying the problem, I need role-based authentication like OAuth
anaeem1_ has joined #ruby
tobleronegordon has joined #ruby
ghormoon has quit [Ping timeout: 256 seconds]
blahwoop has quit [Remote host closed the connection]
ghormoon has joined #ruby
Prometheian has joined #ruby
<havenwood> eguneys: what do you mean by "browser based redirects"? like javascript? 3xx redirection?
tobleronegordon is now known as tobleronelunch[a
<eguneys> havenwood: I mean when you log in with twitter, it redirects to twitter page, then user logs in to twitter, then twitter sends token to your server back.
vinleod has joined #ruby
whoisjake has joined #ruby
rubybegg has joined #ruby
yfeldblum has joined #ruby
jdj_dk_ has quit [Remote host closed the connection]
sambao21_ has joined #ruby
<rubybegg> How come export PATH=/usr/foo/bar:$PATH works in terminal but doesnt work in a ruby script like so: system("export PATH=/usr/foo/bar:$PATH")
ghostlines has joined #ruby
sambao21 has quit [Read error: Connection reset by peer]
sambao21_ is now known as sambao21
rshetty has joined #ruby
phutchin1 has joined #ruby
rkalfane has quit [Quit: Textual IRC Client: www.textualapp.com]
<centrx> rubybegg, #system starts a new subshell that exits
<centrx> rubybegg, If you run export in a shell and then exit the shell the parent does not retain the export variable
<rubybegg> ah i see, thanks
yfeldblum has quit [Ping timeout: 245 seconds]
iamjarvo has quit [Ping timeout: 240 seconds]
vinleod has quit [Read error: Connection reset by peer]
vinleod_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
rshetty has quit [Ping timeout: 240 seconds]
Shazaum has joined #ruby
phutchins has quit [Ping timeout: 272 seconds]
vinleod_ is now known as vinleod
Juanchito has quit [Quit: Connection closed for inactivity]
axisys has left #ruby [#ruby]
baweaver has quit [Remote host closed the connection]
anaeem1_ has quit [Remote host closed the connection]
Bira has quit []
x1337807x has joined #ruby
wallerdev has joined #ruby
anaeem1_ has joined #ruby
<havenwood> rubybegg: parents don't see their children's exports, even if the children are still around
noway__ has quit [Quit: Leaving]
Tricon has joined #ruby
hlegius has joined #ruby
stunder has quit [Ping timeout: 240 seconds]
quimrstorres has quit [Remote host closed the connection]
NoNMaDDeN has joined #ruby
<shevy> oh oh oh
byprdct has joined #ruby
<shevy> parents and children problems again
<havenwood> shevy: if you don't kill your children they'll become zombies...
kyoshero has joined #ruby
ponga has quit [Quit: Leaving...]
<eam> actually they become zombies only after they're killed (which makes sense, after all)
<shevy> so now I am confused
<shevy> shall I kill them or shall I not kill them
despai has quit [Quit: This computer has gone to sleep]
the_lord has quit [Read error: Connection timed out]
upp3r has quit [Quit: upp3r]
<eam> killall5 && kill $$
the_lord has joined #ruby
lucyinthesky has joined #ruby
<havenwood> /s/kill/reap
lucyinthesky has left #ruby [#ruby]
<havenwood> eam: aye, i meant reap :O
adriancb has quit [Remote host closed the connection]
despai has joined #ruby
<eam> one of my favorite "how does unix work" interview subjects
sambao21 has quit [Quit: Computer has gone to sleep.]
jheg has joined #ruby
<eam> all processes which exit become zombies for a brief period
<havenwood> just like real life...
<havenwood> unlife*
<havenwood> momentary zombies
<havenwood> band name?
dts has joined #ruby
<eam> (this joke only makes sense in the uk) "... mains ..."
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
renderful has quit [Remote host closed the connection]
* graft doesn't get it, not in the UK. Story checks out.
sambao21 has joined #ruby
<eam> mains power. You see, computers. I should probably just apologize
<havenwood> i still don't get it :P
<eam> zombies eat brains
<havenwood> ooh, elipsis main elipsis... hahahaahahha. no, i don't get it.
<havenwood> braaaaains!!
<eam> zombie processes eat mains (power)
<eam> it's a very bad joke
<havenwood> hehe
<eam> I feel bad for telling it
lmickh has joined #ruby
Jake232 has joined #ruby
<havenwood> last joke i told on #ruby fell just as flat
<eam> especially because it's technically incorrect; the process isn't executing
Megtastique has joined #ruby
lolmaus has joined #ruby
renderful has joined #ruby
sklik has joined #ruby
troulouliou_dev has joined #ruby
momomomomo has joined #ruby
<dts> what joke?
drewvanstone has quit [Ping timeout: 264 seconds]
axl_ has quit [Ping timeout: 245 seconds]
yetanotherdave has joined #ruby
axl_ has joined #ruby
stunder has joined #ruby
almostworking has joined #ruby
x1337807x has joined #ruby
elfuego has joined #ruby
almostworking has left #ruby [#ruby]
x1337807x has quit [Client Quit]
wallerdev has quit [Quit: wallerdev]
drewvanstone has joined #ruby
<elfuego> i’m a newbie to ruby, i’m trying to check string equality from a yaml file but unsuccessful in doing so, here is my code snippet: https://gist.github.com/horaceheaven/6e01c347e4e46c26c277
the_lord has quit [Read error: Connection timed out]
doev has quit [Quit: Verlassend]
the_lord has joined #ruby
Shazaum has quit [Quit: Leaving]
hlegius has quit []
jdj_dk has joined #ruby
wallerdev has joined #ruby
divi has quit [Ping timeout: 264 seconds]
andikr has quit [Remote host closed the connection]
x1337807x has joined #ruby
icarus has joined #ruby
<havenwood> dts: A: Knock knock. B: Who's there? A: To. B: To who? A: To whom*
<dts> hehe
adriancb has joined #ruby
fantazo has joined #ruby
diegoviola has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
jdj_dk has quit [Ping timeout: 258 seconds]
mloveless has quit [Remote host closed the connection]
chu has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
stunder has quit [Ping timeout: 245 seconds]
<havenwood> elfuego: ["aws"] != "aws"
<havenwood> >> ["aws"].eql? "aws"
baweaver has joined #ruby
<eval-in__> havenwood => false (https://eval.in/225871)
tobleronelunch[a is now known as tobleronegordon
divi has joined #ruby
<havenwood> elfuego: change `eql?` to `include?`
<elfuego> havenwood: is there a way to convert [“aws”] to “aws“ ?
<havenwood> >> ['aws'].first
<eval-in__> havenwood => "aws" (https://eval.in/225872)
aspires_ has joined #ruby
<havenwood> elfuego: is environment supposed to be a list?
kl has joined #ruby
<havenwood> elfuego: might there be more than one environment?
jheg has quit [Quit: jheg]
<havenwood> elfuego: if not, just drop the dash in front of "aws" in the YAML
sambao21 has joined #ruby
<elfuego> thanks havenwood
<havenwood> elfuego: no prob
fabrice31 has joined #ruby
JoshGlzBrk has joined #ruby
divi has quit [Ping timeout: 258 seconds]
vinleod has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
stunder has joined #ruby
aspires has quit [Ping timeout: 264 seconds]
divi has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 272 seconds]
momomomomo has quit [Ping timeout: 265 seconds]
marr has joined #ruby
rodfersou has quit [Quit: leaving]
Macaveli has joined #ruby
jlast has quit [Remote host closed the connection]
last_staff has quit [Quit: too overtired to irc anymore]
sinequanon has joined #ruby
havenwood has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
jlast has joined #ruby
rubybegg has quit [Quit: Page closed]
axl_ has joined #ruby
Macaveli has quit [Ping timeout: 255 seconds]
kireevco has quit [Quit: Leaving.]
mloveless has joined #ruby
phutchin1 has quit [Ping timeout: 245 seconds]
the_lord has quit [Quit: Leaving]
sambao21 has quit [Quit: Computer has gone to sleep.]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Tricon has quit [Read error: Connection reset by peer]
jheg has joined #ruby
Tricon has joined #ruby
crdpink has joined #ruby
wedgeV has joined #ruby
kaspertidemann has quit []
phutchins has joined #ruby
Lingos has joined #ruby
ta_ has joined #ruby
mloveless has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
benzrf is now known as benzrf|offline
ldnunes_ has quit [Quit: Leaving]
Tricon has quit [Remote host closed the connection]
nrsk has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
JBreit has joined #ruby
noop has quit [Ping timeout: 245 seconds]
aspires_ has quit []
Rampages has quit [Ping timeout: 240 seconds]
<atmosx> I have a strange case, where an each loop 'hops' a value, deletes only first and last items of an array: https://gist.github.com/atmosx/4a1dc92fdc69cded3ecd#file-delete_product-rb-L19
beneggett has quit [Read error: Connection reset by peer]
beneggett has joined #ruby
nateberkopec has joined #ruby
Rampages has joined #ruby
pchellovod has joined #ruby
arya_ching has quit []
JBreit has quit [Read error: Connection reset by peer]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jimms has joined #ruby
jonr22 has joined #ruby
silkfox has quit [Ping timeout: 240 seconds]
Lingos has quit [Quit: Be back later ...]
georgedrummond has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
JBreit has joined #ruby
JBreit has left #ruby [#ruby]
klmlfl has quit [Remote host closed the connection]
jonr22 has quit [Ping timeout: 244 seconds]
klmlfl has joined #ruby
mary5030 has quit [Remote host closed the connection]
Rampages has quit [Ping timeout: 244 seconds]
mary5030 has joined #ruby
Rampages has joined #ruby
<atmosx> hm, now it works.
decoponio has quit [Quit: Leaving...]
mary5030 has quit [Remote host closed the connection]
_honning_ has joined #ruby
mloveless has joined #ruby
<waxjar> can I not refine class methods? :( https://gist.github.com/britishtea/2341446f9cd7c7b56c33
bmichelsen has joined #ruby
Lingos has joined #ruby
krisquigley has joined #ruby
chrishough has joined #ruby
mattmcclure has joined #ruby
whoisjake has quit []
Photism has quit [Quit: Leaving]
kaspertidemann has joined #ruby
tier has joined #ruby
ghostlines has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tier_ has quit [Ping timeout: 272 seconds]
<apeiros_> waxjar: try refine String.singleton_class?
<waxjar> aah, clever! thx apeiros_
<waxjar> that works
eichenwald has joined #ruby
krisquigley has quit [Ping timeout: 264 seconds]
<apeiros_> whuda thot
startupality has joined #ruby
boombadaroomba has quit [Remote host closed the connection]
yekta has joined #ruby
ghostlines has joined #ruby
yfeldblum has joined #ruby
<bricker`work> waxjar: or perhaps `def String.foo` (I don't have Ruby 2.x handy to test it right now)
danguita has quit [Remote host closed the connection]
danguita has joined #ruby
rkalfane has joined #ruby
<waxjar> that works as well bricker`work :)
CorySimmons has quit [Quit: Bye!]
athan has joined #ruby
jlast has quit [Remote host closed the connection]
<athan> Hi everyone, how do i start a rails server in development?
<bricker`work> athan: rails server
mary5030 has joined #ruby
<athan> bricker`work: Thank you. Is production different?
<athan> like an environment var or something?
<bricker`work> athan: yes, `rails server -e production`
jlast has joined #ruby
<bricker`work> athan: or you can set RAILS_ENV=production as you suggested
<athan> ahh wonderful, thank you bricker`work
ta_ has quit [Remote host closed the connection]
Xeago has joined #ruby
hiyosi has joined #ruby
georgedrummond has quit [Ping timeout: 255 seconds]
mloveless has quit [Remote host closed the connection]
georgedrummond has joined #ruby
<waxjar> but i guess that only works because it behaves just like a regular monkey-patch bricker`work, no `using` required :P
<bricker`work> waxjar: oh, I wouldn't think the refinement would be evaluated until you call 'using'
georgedrummond has quit [Remote host closed the connection]
mloveless has joined #ruby
mloveless has quit [Remote host closed the connection]
georgedrummond has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
jimms has quit [Remote host closed the connection]
Hobogrammer has joined #ruby
mloveless has joined #ruby
hiyosi has quit [Ping timeout: 272 seconds]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
georgedrummond has quit [Ping timeout: 240 seconds]
ecstaticpessimst has joined #ruby
AriaMoKr has joined #ruby
giuseppesolinas has joined #ruby
Ulrike_Schultz has joined #ruby
Pumukel has quit [Ping timeout: 258 seconds]
timonv_ has joined #ruby
paulfm has quit []
Ulrike_Rayne has quit [Ping timeout: 240 seconds]
Ulrike_Schultz has quit [Excess Flood]
Ulrike_Rayne has joined #ruby
<waxjar> hmm, the only shitty thing about refining the singleton class is that String.respond_to? behaves as if it isn't refined :/
aspires has joined #ruby
jackjackdrpr has joined #ruby
ht__th has quit [Remote host closed the connection]
silkfox has joined #ruby
paulfm has joined #ruby
DLSteve has joined #ruby
jackjackdrpr has quit [Quit: Leaving.]
rshetty has joined #ruby
jackjackdrpr has joined #ruby
havenwood has joined #ruby
Pumukel has joined #ruby
baweaver has joined #ruby
sambao21 has joined #ruby
mazarian has joined #ruby
ecstaticpessimst has quit [Ping timeout: 245 seconds]
boombadaroomba has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
rshetty has quit [Ping timeout: 264 seconds]
yfeldblu_ has joined #ruby
testcore has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 258 seconds]
testcore has joined #ruby
v0n has quit [Remote host closed the connection]
v0n has joined #ruby
n_blownapart has joined #ruby
benzrf|offline is now known as benzrf
Tricon has joined #ruby
samflores has joined #ruby
AriaMoKr has quit []
Tricon has quit [Read error: Connection reset by peer]
pa3ce has quit [Ping timeout: 255 seconds]
rylev has joined #ruby
jamescarr has joined #ruby
Tricon has joined #ruby
<jamescarr> what's the ruby equivalent to python's [name, version] = "some-name:0.1.2".split(":")
m8 has quit [Quit: Sto andando via]
govg has quit [Quit: leaving]
<jhass> remove the square brackets
upp3r has joined #ruby
baweaver has quit [Remote host closed the connection]
kamilc__ has quit [Quit: Linkinus - http://linkinus.com]
baweaver has joined #ruby
yekta has quit [Quit: yekta]
upp3r has quit [Client Quit]
ta_ has joined #ruby
Soda has quit [Remote host closed the connection]
ta__ has joined #ruby
workmad3 has joined #ruby
moritzschaefer has quit [Ping timeout: 256 seconds]
jimms has joined #ruby
Pumukel has quit [Quit: ChatZilla 0.9.91 [Firefox 33.1/20141106120505]]
ta_ has quit [Ping timeout: 265 seconds]
Tricon has quit [Remote host closed the connection]
kl has quit [Ping timeout: 265 seconds]
<Timgauthier> hahahahaha
<Timgauthier> nice
<Timgauthier> jhass <3
yalue has quit [Quit: Leaving]
pygospa has joined #ruby
ghostlines has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jheg> is it possible to mixin def initialize ?
<apeiros_> of course
<apeiros_> it's just a method
claymore has quit [Quit: Leaving]
<jheg> I can’t seem to get it to work..
b3itz has joined #ruby
bmichelsen has quit [Quit: ZZZzzz…]
<b3itz> my professor in an assignment says, "To iterate recursively through all subdirectories starting from the initial directory" What EXACTLY does this mean?
silkfox has quit [Ping timeout: 244 seconds]
jamescarr has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
sklik has quit [Read error: Connection reset by peer]
sklik has joined #ruby
<jheg> I’m trying to extract non core functionality from the Card class into a module
<jhass> b3itz: you got a directory that has files and directories that have directories and files that have... and you should iterate over all of them
<parabolize> jamescarr: the brackets arn't needed in python either.
<apeiros_> jheg: IMO put stuff into a module if you use it in more than one place
<apeiros_> otherwise that's a misguided attempt at refactoring
<jheg> would you say its overkill?
<apeiros> worse
<jhass> jheg: to answer the question though, you need to call super in the overridden method
<b3itz> jhass: so i need to iterate every directory starting at the first one, and list every file and directory?
<apeiros> it makes your code harder to follow
fantazo has quit [Quit: Verlassend]
<apeiros> so you lose something, gain nothing
<jhass> b3itz: yes
<b3itz> then go to the first, next directory, then list all directories and file
<b3itz> s
<jhass> b3itz: like find /starting_directory
atmosx has quit [Quit: Lost in trance]
<b3itz> jhass: this makes my head hurt
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
<jhass> b3itz: try running find /tmp
<jhass> you should recreate the output
<b3itz> i see. too bad we aren't allowed to use any linux commands
<jhass> it's still a oneliner ;P
x1337807x has joined #ruby
<b3itz> we are essentially recreating the ls -l, -d, -h, and -R
<havenwood> >> require 'abbrev'; ['/back/to/root/'].abbrev.keys.keep_if { |path| path.end_with? ?/ }
<eval-in__> havenwood => ["/back/to/root/", "/back/to/", "/back/", "/"] (https://eval.in/225920)
<havenwood> >.>
<b3itz> whats abbrev?
<jhass> ignore it
<havenwood> something not meant for this task :P
<jhass> havenwood's just acting silly again
razieliyo has quit [Remote host closed the connection]
<jheg> cheers apeiros_
wallerdev has joined #ruby
Lingos has quit [Quit: Lingo: www.lingoirc.com]
divi has quit [Ping timeout: 255 seconds]
jimms has quit [Remote host closed the connection]
mloveless has quit [Remote host closed the connection]
<Prometheian> I'm trying to install the pg gem on my windows box and I'm getting the following error: http://www.hastebin.com/epuyomepij.lua
<b3itz> jhass: im stumped
mloveless has joined #ruby
<jhass> b3itz: start by reducing the problem
<jhass> take out the recursion
<b3itz> jhass: so i have this that shows me all directories Dir.glob("**/*/")
grzywacz has quit [Ping timeout: 250 seconds]
<b3itz> im assuming that means show every folder with something inside it
<jhass> yes that works, you just remove the / and it lists the files too
<jhass> though that's probably not what that assignment should teach you
<b3itz> ?
mloveless has quit [Read error: No route to host]
<jhass> my guess is that you're supposed to build a recursive method
mloveless has joined #ruby
<b3itz> we are...
<b3itz> for the subdirectory one im working on
<b3itz> that other one is fine as is
<jhass> so start by building a method that lists all files and directories in a given directory
fabrice31 has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
Tricon has joined #ruby
<b3itz> Dir.glob("**/*") correct
<b3itz> ?
Ankhers has quit [Ping timeout: 250 seconds]
anaeem1_ has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
<jhass> that's already recursive and for the current directory only, not the given one
<jhass> I wonder if you even tried it out
<jhass> also it's not a method
<b3itz> i just ran it and it worked fine
<b3itz> umm
<b3itz> i havent gotten to that part yet... im currently just getting the current dir to work
<b3itz> i'll just add that after i get everything else working
<jhass> that's not a good reduction of the problem
<b3itz> -___-
hiyosi has joined #ruby
georgedrummond has joined #ruby
<jhass> start by doing what I said
kl has joined #ruby
baweaver has quit [Remote host closed the connection]
<n_blownapart> hi I'm unclear how group_by(&:class) works : http://pastie.org/9741234
<jhass> n_blownapart: which part of it?
<b3itz> Dir.glob("**/*/") works just fine, is that not recursive?
ftj has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
rahult has joined #ruby
rahult is now known as rahult_
silkfox has joined #ruby
<jhass> b3itz: it is but you didn't implement the recursion
fabrice31 has quit [Ping timeout: 265 seconds]
<jhass> which I suppose is what this should teach you
pika_pika has joined #ruby
<b3itz> so would i do something like, for every directory in here, change current working dir and then run again?
mary5030 has quit [Remote host closed the connection]
<jhass> "change the current dir" is clumsy
rahult_ is now known as rahult
<jhass> just make it work for a given directory
<n_blownapart> jhass sorry I'm struggling to pose my question..
mary5030 has joined #ruby
<jhass> b3itz: defining a method, Kernel#puts, File.directory? and Dir.entries is all you need
freerobby has quit [Quit: Leaving.]
bmichelsen has joined #ruby
hiyosi has quit [Ping timeout: 272 seconds]
<b3itz> ok. im going to save this convo.. my battery is dead and i gotta shower and run a quick errand to get my nexus 6 :P
<b3itz> i shall return
<n_blownapart> my question is why does the output on line 6 and 13 create those weird k/v pairs with Array as the key.
<n_blownapart> jhass: ^
<jhass> because
<jhass> >> {a: 'b'}.first.class
<eval-in__> jhass => Array (https://eval.in/225923)
jimms has joined #ruby
JoshGlzBrk has joined #ruby
Timgauthier is now known as timgauthier_away
baweaver has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sinequanon has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 250 seconds]
St_Marx has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> havenwood: his problem is recreating find with a single arg/Dir['foo/**/*'].each(&:display) as I understood it (w/ recursion)
nateberkopec has quit [Quit: Leaving...]
<jhass> *assignment
duggiefresh has quit []
<havenwood> jhass: oops, seems i misread the initial query
<n_blownapart> jhass: so the k/v pairs in a hash are always an array? I thought only the keys were stored in an array.
Tricon has quit [Remote host closed the connection]
<jhass> n_blownapart: neither, don't care about the internal structure
djbkd has joined #ruby
<jhass> what's important is that Hash#each yields the k,v pairs as an array of [k, v]
<jhass> .each {|k, v| } decomposes that array
paulfm has quit []
j2p2 has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
b3itz has quit [Ping timeout: 246 seconds]
<n_blownapart> {a: 'b'}.first returns an array. sorry I think I'm missing a crucial point.
<jhass> >> def each; yield [1, 2]; yield [3, 4]; end; include Enumerable; first
<eval-in__> jhass => [1, 2] (https://eval.in/225924)
<jhass> >> def each; yield [1, 2]; yield [3, 4]; end; include Enumerable; map {|k, v| [k+1, v+1] }
<eval-in__> jhass => [[2, 3], [4, 5]] (https://eval.in/225925)
aspires has quit []
georgedrummond has quit []
sambao21 has joined #ruby
divi has joined #ruby
dc_ has quit [Remote host closed the connection]
<jhass> stop thinking about how Hash#each might obtain those arrays, all you care about it is that it yields you the key/value pairs as two element arrays
<athan> Is ComfortableMexicanSofa the most popular Rails CMS?
aspires has joined #ruby
<jhass> athan: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ help
baweaver has quit [Remote host closed the connection]
<n_blownapart> ok thanks a lot jhass. thing is...
<benzrf> is ComfortableMexicanSofa a gfycat url
<n_blownapart> I gotta go. maybe later more drama? ^
n_blownapart has quit [Remote host closed the connection]
baweaver has joined #ruby
kaiwren has quit [Quit: kaiwren]
mleone has quit [Ping timeout: 258 seconds]
ftj has quit [Quit: Textual IRC Client: www.textualapp.com]
djbkd has quit [Remote host closed the connection]
dcunit3d has quit [Ping timeout: 258 seconds]
<athan> benzrf: I think so hahaha.
Tuxero has quit [Quit: Tuxero]
<benzrf> actually its not unu
sambao21 has quit [Quit: Computer has gone to sleep.]
karmatr0n has joined #ruby
<athan> so what interests you about Ruby opposed to Haskell, benzrf?
<benzrf> athan: whatcha mean
<benzrf> ruby i think is better for quick n dirty scripts
dts has quit [Read error: Connection reset by peer]
ishikawa91 has joined #ruby
<athan> benzrf: I've never really messed with it until now. The class system seems perfect for monkey-patching
<benzrf> athan: wait
<benzrf> athan: you mean whats good about haskell v. ruby?
<havenwood> freedom-patching*
<athan> benzrf: Moreso your own opinion for use cases haha
<athan> havenwood: Tattooing it into my brain :)
jonr22 has joined #ruby
<benzrf> static typing is just plain great
<benzrf> there's no contest
<benzrf> i mean
<athan> for soundness?
dts has joined #ruby
<benzrf> individual cases of static typing can suck (e.g. java)
<benzrf> but the best you can get from static is much, much better than the best you can get from dynamic
<benzrf> athan: if by soundness you mean lack of bugs, then yes
<benzrf> like i mean
<benzrf> even types aside, ruby can't so much as tell you if you typod a variable nae
<benzrf> *name
pchellovod has quit [Ping timeout: 256 seconds]
<athan> :o
<benzrf> dynamism is great for horrifying hacks and all, but how often do you use it in actual code that you're not writing for the purpose of the hack
* athan needs to study
davasaurous has joined #ruby
<benzrf> athan: wait, which one do you already know
<athan> benzrf: Do you have any tips for getting started with ruby?
<athan> haskell haha
<benzrf> ah, lol
<havenwood> benzrf: just use the variable with the closest levenshtein distance
<benzrf> havenwood: ayy lmao
<benzrf> athan: do you know any languages besides haskell
timonv_ has quit [Remote host closed the connection]
Pumukel has joined #ruby
<havenwood> >> require 'rubygems/text'; include Gem::Text; levenshtein_distance 'new', 'nwe'
<eval-in__> havenwood => 2 (https://eval.in/225927)
<athan> javascript stuffs
JohnBat26 has quit [Ping timeout: 272 seconds]
<havenwood> close enough, ship it!
<athan> havenwood wat
josephndenton has quit [Ping timeout: 264 seconds]
davasaurous has quit [Remote host closed the connection]
<benzrf> athan: how well do u know js
cndiv_ has joined #ruby
jonr22 has quit [Ping timeout: 255 seconds]
despai has quit [Quit: This computer has gone to sleep]
<athan> benzrf: Sorry, I know a bit of javascript & node work, with gulp et. al., but I've recently been forced to use rails :P
antgel has quit [Ping timeout: 240 seconds]
cndiv_ is now known as cndiv
<athan> benzrf: I'm actually trying to bring HM-style static typing to JS haha
baroquebobcat has quit [Quit: baroquebobcat]
dopie has joined #ruby
mloveless has quit [Remote host closed the connection]
<benzrf> neato
despai has joined #ruby
<benzrf> ok, so you're comfortable with imperative?
Megtastique has quit []
<athan> yep!
sklik has quit []
<benzrf> and notions of mutation and how mutating arguments works?
<benzrf> phew
<athan> yeah hahaha
<benzrf> if you werent i wouldve told you to stay the hell away from ruby until youve done a little imperative programming
<athan> wait... mutating an argument
n_blownapart has joined #ruby
* athan pukes a bit
<benzrf> :b
<benzrf> ok, ruby.
<benzrf> ruby is what smalltalk wouldve been if alan kay were trying to improve on perl instead of start from scratch
<athan> ahhh okay
mazarian has quit [Remote host closed the connection]
<havenwood> benzrf: perl 6 even used ruby as a starting point, at least i swear a monk told me that at some point, maybe in #perl6
<athan> so ruby has object inheritance like javascript's prototypes? (That's smalltalk right?)
Areessell has joined #ruby
dts is now known as dts|airhocky
divi has quit [Ping timeout: 255 seconds]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wldcordeiro has joined #ruby
ptrrr has quit [Quit: ptrrr]
<havenwood> i'm curious to play with rubinius 3.0's gradual types: http://rubini.us/2014/11/14/rubinius-3-0-part-5-the-language/
davasaurous has joined #ruby
<benzrf> athan: actually no
<benzrf> ruby has relatively standard inheritance, sadly
<benzrf> however it does have mixins
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<benzrf> much nicer
<havenwood> i'd imagine that'll be around well before Ruby 3.0's soft typing
<athan> ahhh okay
<athan> wait
<benzrf> athan: the basic concept of an object as in smalltalk is:
mloveless has joined #ruby
<athan> mixins are basically multiple prototype inheritances, right?
<benzrf> - an object is a thing that may be sent a message. then it can respond to that message
krisquigley has joined #ruby
<benzrf> - and it has internal state that it gets to play with while reading its messages
<benzrf> athan: not exactly, but that's a less important point
mloveless has quit [Remote host closed the connection]
<benzrf> athan: if you have an object in ruby, you may send it a message and then get a result
devoldmx33 has joined #ruby
<benzrf> that is the extent of what you are allowed to do with it
guest123 has joined #ruby
<benzrf> philosophically speaking, anyway
<benzrf> message sends == method calls
<athan> I see, that makes sense
<benzrf> >> 3.succ
<eval-in__> benzrf => 4 (https://eval.in/225930)
<athan> with :foo pragmas in a Class declaration, right?
<benzrf> idk what you mean by that :I
<athan> (and a @bar is a private variable to the object the class creates?)
sanguisdex has quit [Quit: Leaving.]
<benzrf> athan: basically
<athan> erm
<benzrf> athan: foo.bar is NOT "attribute lookup" like in js
<benzrf> foo.bar is "sending the message bar to foo", or "calling the bar method on foo"
<athan> >> class Foo; :bar = do return "bar" end; end
<eval-in__> athan => /tmp/execpad-dfca3fe66da4/source-dfca3fe66da4:2: syntax error, unexpected '=', expecting keyword_end ... (https://eval.in/225931)
<athan> ?
<benzrf> athan: no, that's not quite right
<benzrf> 1 sec
<athan> ahhh that makes sense
<havenwood> >> [1, 2, 3].map(&:next).map(&:abs2).map(&Math.method(:sqrt)).map(&:to_i).map(&:pred)
<benzrf> athan: one happy consequence of this is that you get to lose a lot of extraneous parens
<eval-in__> havenwood => [1, 2, 3] (https://eval.in/225932)
<athan> (it's kinda similar in js, just at the type level :P)
<benzrf> athan: one sad consequence is that methods are not first class
<benzrf> :{
<athan> ahhh wow
<athan> I can live haha
<athan> do blocks become "lambdas" right?
<benzrf> athan: not quite
<athan> via `| param | ...`?
<benzrf> that's another irritating thing
<athan> :S
<benzrf> blocks in ruby are not expressions, they are special syntax
<benzrf> >> [1, 2, 3].map {|x| x + 3}
<eval-in__> benzrf => [4, 5, 6] (https://eval.in/225933)
sinequanon has joined #ruby
<benzrf> >> {|x| x + 3}
<eval-in__> benzrf => /tmp/execpad-eeab9c79beca/source-eeab9c79beca:2: syntax error, unexpected '|', expecting '}' ... (https://eval.in/225934)
renderful has quit [Remote host closed the connection]
<athan> ahhh okay
<benzrf> athan: you may append a block to a method call, but that's it
<athan> I thought so
<benzrf> they dont go by themselves
eichenwald has quit [Quit: WeeChat 1.0.1]
<athan> hmm okay
davasaurous has quit [Remote host closed the connection]
<benzrf> athan: if you call the proc method with a block, it returns an object representing it
<benzrf> >> proc {|x| x + 3}
<eval-in__> benzrf => #<Proc:0x42254f08@/tmp/execpad-25fc0badcff2/source-25fc0badcff2:2> (https://eval.in/225935)
krisquigley has quit [Ping timeout: 250 seconds]
<benzrf> the lambda method does something similar but slightly different
<athan> :O
<benzrf> >> lambda {|x| x + 3}
<eval-in__> benzrf => #<Proc:0x41ba8fb0@/tmp/execpad-f3062d05e08d/source-f3062d05e08d:2 (lambda)> (https://eval.in/225936)
<guest123> Hi, i wonder if someone might be able to point me in the right direction. im trying the read a command inside backticks but can seem to to get it right. i wonder if someone would be able to take a look ? http://paste.ee/p/ZOWfO
<benzrf> to be precise, the objects act a bit differentlyt
renderful has joined #ruby
<benzrf> athan: in case it isn't clear, "function call" notation like `foo(1, 2, 3)' is really calling the foo method on self
<havenwood> guest123: use the block form of File.open so it auto-closes itself
<athan> benzrf: That makes sense!
<benzrf> athan: this has the annoying effect of making argsless method calls on self indistinguishable from variable lookups:
<havenwood> guest123: shelling out to curl just to learn?
<athan> :S
<guest123> liek with |file| ?
<benzrf> >> def foo; 3; end; foo = 4; foo
<eval-in__> benzrf => 4 (https://eval.in/225939)
dcunit3d has joined #ruby
<athan> kinda like javascript vars delcared without `var`?
<benzrf> >> def foo; 3; end; foo foo
<eval-in__> benzrf => wrong number of arguments (1 for 0) (ArgumentError) ... (https://eval.in/225940)
<benzrf> >> def foo; 3; end; foo
<eval-in__> benzrf => 3 (https://eval.in/225941)
msmith has joined #ruby
<havenwood> guest123: File.open("/home/debian/avg/tunnels.txt", "r") { |file| ...
dc has joined #ruby
<benzrf> athan: if you have a variable in scope with the same name as a method you can just use self.
<havenwood> guest123: or, just: File.read ...
<benzrf> >> def foo; 3; end; foo = 4; self.foo
<eval-in__> benzrf => private method `foo' called for main:Object (NoMethodError) ... (https://eval.in/225942)
<benzrf> er
Spleeze has joined #ruby
<benzrf> fuck, that's another bizarre thing
<benzrf> hold on
<benzrf> >> def foo; 3; end; foo = 4; foo()
<eval-in__> benzrf => 3 (https://eval.in/225943)
<athan> you're good lol
<benzrf> explicit parens also work
<athan> ahh okay
<guest123> i would want to read each line of the file for each run of the curl command
<havenwood> guest123: File.readlines
<havenwood> guest123: File.read
<athan> benzrf: ruby also has variable parameters and defaults, right?
davasaurous has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
<benzrf> athan: since methods live in a different namespace from variables, declaring a method does not introduce a new variable like it does in js
<benzrf> athan: yeah, but that's a less important language feature
<athan> oh woah
<athan> hmm
<benzrf> athan: there's probably some sort of resource to learn from, i g2g atm
<athan> what's the most important about ruby, in your opinion?
<athan> ahh okay
<athan> thank you for all the help
<n_blownapart> jhass et al. : why does #first work on a hash and not #last ?
<athan> (important feature)
<n_blownapart> they are both array methods ^
<benzrf> athan: be warned: ruby is a perl-like bog of neat but questionably principled features thrown together in a bubbling swamp of ambiguous syntax and special-cased behavior
<havenwood> guest123: File.readlines('/home/...').each { |line| }
<benzrf> athan: it may take some time to get comfortable in it
<jhass> n_blownapart: because it's Array#last but Enumerable#first
<benzrf> ok bye
<n_blownapart> jhass: geez
iamjarvo has joined #ruby
davasaurous has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
<athan> :P
davasaurous has joined #ruby
<havenwood> guest123: ever used OpenURI?
codecop has quit [Remote host closed the connection]
<guest123> no im very new
[gmi] has joined #ruby
tier has quit [Remote host closed the connection]
<guest123> would that be a better solution?
<guest123> thatas a gem right/ /
<guest123> ?
mloveless has joined #ruby
<havenwood> guest123: nope, it's in the standard library
<guest123> ok
<guest123> so gems are outside of the norm
<havenwood> guest123: just: require 'open-uri'
Megtastique has joined #ruby
chrishough has joined #ruby
<havenwood> guest123: gems are normal and widely used, but most don't ship with Ruby
<havenwood> guest123: the standard lib ships with Ruby
mloveless has quit [Remote host closed the connection]
b4rbz has quit [Remote host closed the connection]
<guest123> i doont think ive got the bloack quite right http://paste.ee/p/JQYSS
sinequanon has quit [Remote host closed the connection]
yfeldblu_ has quit [Remote host closed the connection]
<havenwood> guest123: sorry, with readlines no block
<havenwood> guest123: that just returns an Array of lines
[gmi] has quit [Client Quit]
<havenwood> guest123: and self-closes without a block
yfeldblum has joined #ruby
livingstn has quit []
<dopie> anyone here have experience with capistrano?
<havenwood> output = File.readlines '/just/the/path/no/r'
airdeluxe has joined #ruby
<havenwood> tunnel = open 'https://...'
davasaurous has quit [Remote host closed the connection]
<n_blownapart> jhass why does this return a hash with two k/v pairs? : http://pastie.org/9741331 jhass
<havenwood> dopie: i'm sure
<havenwood> dopie: don't ask to ask, just ask :)
<jhass> n_blownapart: because it's implicit form for [{...}]
<dopie> yeah i know i just googled and SO the question before
<dopie> and no answer is working
<havenwood> i'm a fan of Mina: https://github.com/mina-deploy/mina#readme
<guest123> like this ? http://paste.ee/p/pH3fi
djbkd has joined #ruby
<havenwood> guest123: that's right for ::readlines
<guest123> it now returns no value
<guest123> hmm
mloveless has joined #ruby
<guest123> if i run the curl command with the first line of the txt file it gies the output to screen of 'active'
<havenwood> guest123: doesn't look like you swapped curl out
<guest123> which it what im trying to get
mloveless has quit [Remote host closed the connection]
<guest123> what do you mean 'swapped curl out' ?
<n_blownapart> sorry very confused now. is a single k/v pair considered one object or two: a symbolized key and a separate value of <some.class>
<dopie> SSHKit::Runner::ExecuteError: Exception while executing on host foo: Authentication failed for user xxx@foo
<dopie> i can ssh with my user fine
<havenwood> guest123: tunnel = open 'https://...', &:read
<n_blownapart> jhass ^
<dopie> its just not letting me to a a cap production deploy
<guest123> open ?
bronak_ has joined #ruby
silkfox has quit [Ping timeout: 272 seconds]
<havenwood> guest123: in irb try: require 'open-uri'; open 'http://www.google.com', &:read
<jhass> n_blownapart: a hash is a datastructure that defines a list of mappings of one object (the key) to another object (the value)
pa3ce has joined #ruby
<jhass> In ruby there's no dedicated object to represent an item of this list, instead a two element array is used
parabolize has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<guest123> i get alot of output
<n_blownapart> jhass: very helpful thank you
<jhass> n_blownapart: [a: 1, b: 2] is just an array literal containing a single hash literal
<havenwood> guest123: compare with: curl http://www.google.com
dc has quit [Disconnected by services]
<guest123> like that? require 'open-uri'; curl 'http://www.google.com', &:read
<n_blownapart> what about in the case of [a: 'b', x: 'y'].last returning a hash of all the pairs?
<havenwood> guest123: no, outside of ruby
<havenwood> guest123: just from the command line
<n_blownapart> jhass ^
<jhass> n_blownapart: [a: 1, b: 2] is just an array literal containing a single hash literal
dc_ has joined #ruby
<guest123> oh ok
jheg has quit [Quit: jheg]
<jhass> n_blownapart: it's just a different way of _writing_ [{a: 1, b: 2}] or [{:a => 1, :b => 2}]
<havenwood> guest123: or backticks around it in ruby
<n_blownapart> jhass: that is interesting. regardless of the number of k/v pairs, it is treated as a single hash object. jhass
<jhass> n_blownapart: it's the same thing as with supplying a hash as the last parameter to a method, you can omit the { } for it
devdazed has quit [Quit: Computer has gone to sleep.]
jobewan has quit [Ping timeout: 244 seconds]
rshetty has joined #ruby
<guest123> sothe backticks around the whole lot
<guest123> open `curl -s -k 'https://admin:n3td0te!@192.168.10.10/nph-vpn.cgi?name="#{output}"&cmd=st\
davasaurous has joined #ruby
<n_blownapart> jhass: thanks I've got my work cut out..
<havenwood> guest123: so curl is a shell command
<jhass> n_blownapart: foo(a: 1, b: 2), you wouldn't expect that to be equivalent to foo({a: 1}, {b: 2}), would you?
<havenwood> guest123: you can run it from you command line, or shell out and run it from ruby
msx has joined #ruby
<havenwood> guest123: it has nothing to do with open-uri
elfuego has quit [Quit: elfuego]
<havenwood> guest123: other than they're both HTTP clients
<guest123> should the &:read part be in backticks ?
<havenwood> guest123: the curl command is just and only the line i gave ya
<havenwood> nothing else
laynemoseley has joined #ruby
<havenwood> no open, no &:read, it's a specialized tool. to learn more from the command line type: man curl
<guest123> liek that /
<guest123> ?
<havenwood> guest123: nope, line 6 remove the backticks, curl, -s and -k flags and just leave the url
<havenwood> guest123: check the google example above
mazarian has joined #ruby
<havenwood> guest123: and the docs
parabolize has joined #ruby
it0a has quit [Ping timeout: 264 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<n_blownapart> jhass: so i.e. it's common to store hashes in an array, since an array is the most basic sort of container object, say in a simple database.
borkdude has quit [Ping timeout: 265 seconds]
rshetty has quit [Ping timeout: 240 seconds]
<guest123> syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
rahult is now known as rahult_
<jhass> n_blownapart: array and map are very basic data structures, you can build many more advanced ones from them and that includes combining them in all possible ways
<jhass> so of course it's common
lidaaa has joined #ruby
moritzschaefer has joined #ruby
eguneys has quit [Remote host closed the connection]
<havenwood> guest123: err, though your url string is messed up
<jhass> as common as having a hash with array values or a hash with hash values and so on
<havenwood> guest123: sec i'll fix the gist
soulcake has quit [Quit: Quack.]
<guest123> ok thanks bud
<havenwood> guest123: fixed
<havenwood> guest123: try that? ^
<quazimodo> guys I'm trying to usen Open3 to run a command and interact with it (as though it's talking to a tty). It's failing, and I'm getting the idea that using open3 is kinda wrong. I've looked at Ruby's PTY module, but I'm not sure I understand why open3 hangs when the command attemps to read from stdin
<n_blownapart> jhass ok many thanks
sambao21 has joined #ruby
soulcake has joined #ruby
borkdude has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<guest123> /usr/lib/ruby/1.9.1/uri/common.rb:176:in `split': bad URI(is not URI?)
<guest123> theres no curl ?
Kricir has quit [Remote host closed the connection]
<guest123> i only get the output from curl
djbkd has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
rahult_ is now known as rahult
<havenwood> guest123: you can keep shelling out to curl if you'd like. or you can just use shell if you'd like.
skullz has joined #ruby
<guest123> im guessing the secodn option is better
<skullz> Is there any proper orientDB support yet?
<guest123> second*
<havenwood> guest123: if you know shell, and need to get something done, for sure
econerd4ever has quit [Remote host closed the connection]
<havenwood> guest123: if you're learning ruby, ditch the curl
Xeago has quit [Remote host closed the connection]
econerd4ever has joined #ruby
<havenwood> there're even libcurl wrapper gems, like patron and curb
djbkd has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
disKounted has joined #ruby
<havenwood> but for very simple things open-uri often suffices, or net-http is also in the stdlib
deric_skibotn has quit [Ping timeout: 244 seconds]
mois3x has quit [Quit: mois3x]
apope has left #ruby [#ruby]
<guest123> im using the curl command as its supported by the devices to give the correct reult
djbkd has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
Prometheian has quit [Remote host closed the connection]
<n_blownapart> jhass: if you have time, one last thing about group_by(&:class). isn't that the syntax for a proc/lambda getting passed as an argument?
kirun has quit [Quit: Client exiting]
deric_skibotn has joined #ruby
econerd4ever has quit [Ping timeout: 265 seconds]
sea_local has quit [Remote host closed the connection]
hiyosi has joined #ruby
Pumukel has quit [Quit: ChatZilla 0.9.91 [Firefox 33.1/20141106120505]]
msmith has quit [Remote host closed the connection]
_honning_ has quit [Ping timeout: 244 seconds]
axl_ has quit [Quit: axl_]
axl_ has joined #ruby
duncannz has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
airstream66 has joined #ruby
danijoo has joined #ruby
<jhass> n_blownapart: yes, the magic is that it also calls to_proc on the receiver, group_by(&(:class.to_proc)), and Symbol#to_proc returns a handy Proc object
j2p2 has joined #ruby
axl_ has quit [Client Quit]
mikepack has quit [Remote host closed the connection]
airstream66 has quit [Remote host closed the connection]
eat_multi has quit [Quit: leaving]
b4rbz has joined #ruby
jlast has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 264 seconds]
benzrf|offline is now known as benzrf
Narzew has joined #ruby
CustosL1men has joined #ruby
cndiv has quit [Ping timeout: 258 seconds]
<n_blownapart> jhass: thanks!
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<n_blownapart> [a: 1, b: 2].equal?([{a: 1, b: 2}]) #=> false .. why?
<centrx> == should work
<n_blownapart> centrx: tried that in pry
sargas has joined #ruby
djbkd has joined #ruby
relix has joined #ruby
<jhass> >> [a: 1, b: 2] == [{a: 1, b: 2}]
<eval-in__> jhass => true (https://eval.in/225956)
<n_blownapart> centrx: oh I see equal? is based on object_id
relix has quit [Client Quit]
b3r has joined #ruby
davasaurous has quit [Remote host closed the connection]
<tobleronegordon> https://www.udemy.com/courses/search/?q=ruby <--- any thoughts before the sale is over?
djbkd has quit [Remote host closed the connection]
<n_blownapart> jhass: yeah I mistyped something thanks
sea_local has joined #ruby
gccostabr has quit [Quit: ZZZzzz…]
<tobleronegordon> looking to learn ruby from the complete novice and up
<n_blownapart> tobleronegordon: join the club
<tobleronegordon> well the udemy sale is over soon
<tobleronegordon> so Im in a mad panic to buy
<n_blownapart> its dry as hell tobleronegordon
<tobleronegordon> or if there is a free recommended ruby absolute resource Im all ears
havenwood has quit [Remote host closed the connection]
b3r has quit [Ping timeout: 250 seconds]
<tobleronegordon> there is sooooooo much money in code jobs Im game for whatever
volty has joined #ruby
bmichelsen has quit [Quit: ZZZzzz…]
baweaver has joined #ruby
<n_blownapart> tobleronegordon: I'm enjoying the neo koans but they're sort of tough at a certain point.
Freemason has joined #ruby
Freemason has quit [Killed (idoru (Spam is off topic on freenode.))]
fabrice31 has joined #ruby
msx has quit [Read error: Connection reset by peer]
Freemason has joined #ruby
<tobleronegordon> hah that garbage youtube link is hilarious but offtopic for LEARNING RUBY
<Freemason> :)
djbkd has joined #ruby
cndiv has joined #ruby
<tobleronegordon> Ok Im checking some reviews, but anyone have any other suggestions before I spend money and find out I dumped a whole bag of garbage on my desk?
<volty> what is this crap ?
Hijiri has quit [Quit: WeeChat 1.0.1]
<tobleronegordon> lol volty
<volty> on youtube ?
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mazarian has quit [Remote host closed the connection]
Freemason has quit [K-Lined]
<tobleronegordon> lol freemason cant get a break
mazarian has joined #ruby
Freemason has joined #ruby
Freemason is now known as pasokk
<centrx> This looks like some kind of Ruby conference
<tobleronegordon> yes it is
<tobleronegordon> give me all the best learning ruby links please :D
snath has quit [Ping timeout: 240 seconds]
<pasokk> it is at a university
<volty> the protests of the poor greeks that used to give 1000 € pension to not married daughters of the high states functionaries ?
Hijiri has joined #ruby
grzywacz has joined #ruby
Blizzy has quit [Ping timeout: 244 seconds]
fabrice31 has quit [Ping timeout: 256 seconds]
<volty> those where tv-workers were going earlier in pension because of the risk of bacteria and viruses hidden in the microphones ?
<airdeluxe> heh
msx has joined #ruby
<volty> those where the public transport (metro) was free, without turnstiles
<volty> ?
msx is now known as Guest21266
<tobleronegordon> honestly it doesnt even matter what that rat-tailed girly mans problem was, the video and his hair where hilarious
djbkd has quit [Remote host closed the connection]
Guest21266 is now known as msx
<pasokk> most people dont validate ticket as there arent turnstiles yet (2016+)
msx has quit [Changing host]
msx has joined #ruby
<volty> honestly in italy it is called «chiagne e fotte» -- meaning fucking you and crying at the same time :)
<pasokk> he has anarchist style
mazarian has quit [Ping timeout: 245 seconds]
<volty> honestly all honest people now have to pay (one way or another) for them, but they still «feel» victims
<volty> de hoc satis, enough, sorry :)
<tobleronegordon> yeah Im not going to be able to afford ruby koans... $$$
grzywacz has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby
samsquanch has joined #ruby
Techguy305 has joined #ruby
Techguy305|2 has joined #ruby
davasaurous has joined #ruby
Spami has joined #ruby
Techguy305|2 has quit [Max SendQ exceeded]
Techguy305 has quit [Max SendQ exceeded]
Techguy305|2 has joined #ruby
djbkd has quit [Remote host closed the connection]
Techguy305 has joined #ruby
icarus has quit [Remote host closed the connection]
<volty> yeah, too much out of topic, but anyway pity, would have liked to teach him/them who are the (real) victims and who are the (real) squanders
<quazimodo> so yeah
<quazimodo> process IO is a pain in the ass when you aren't fully aware of the intricacies of unix streaming
Areessell has quit [Ping timeout: 264 seconds]
snath has joined #ruby
GPH|work has quit [Ping timeout: 255 seconds]
<volty> yeah - along the project/application one should always put a pair of small little programs for trying & testing purposes
<volty> (till enough streamlined)
triple_b has joined #ruby
lampd1 has joined #ruby
Hijiri has quit [Ping timeout: 240 seconds]
<pasokk> the dude
pengin has joined #ruby
<tobleronegordon> lol I dont read Greek though
<volty> but, if you do not feel bothered by mine thoughts (tell me if so - I can go to an empty chan and give conference there :) ), i learned that helper&testing files shouldn't be erased even after you master something - - just move them elsewhere, and can serve when you forget, or as (kind of) a coobook
econerd4ever has joined #ruby
<volty> better learn chinese -- sure that it is more clear and sensed and thought out :)
havenwood has joined #ruby
<pasokk> just photos and google translate *might* be your friend
<pasokk> not true
Techguy305 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<pasokk> ancient greek maybe
<volty> it must be true -- because the language influences the way you think
athan has quit [Remote host closed the connection]