hotpancakes has quit [Remote host closed the connection]
alfiemax has joined #ruby
stove has quit [Quit: stove]
justicefries has joined #ruby
stove has joined #ruby
hotpancakes has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
zwliew has joined #ruby
Vapez has quit [Remote host closed the connection]
mtkd has quit [Ping timeout: 240 seconds]
eletious has quit [Remote host closed the connection]
alfiemax has joined #ruby
troys is now known as troys_
troulouliou_div2 has quit [Remote host closed the connection]
JJBby has joined #ruby
alfiemax has quit [Ping timeout: 268 seconds]
Barrt has quit [Remote host closed the connection]
mtkd has joined #ruby
<JJBby>
Hello, I am having some trouble installing ruby in ubuntu 17.10, i very new and following a guide so i am not sure what the error is that i am recieving or how to fix it...help would be appreciated
<leitz>
Is there a way to substitute one list of words for another? I have a long text and all instances of "ThisWord" should be "ThatWord"; there are about a dozen different word pair changes to be made.
<leitz>
Or just run each line through a gsub!, once for each pair of words?
<apeiros>
list = {"original" => "substitute", …}; after = text.gsub(Regexp.union(list.keys), list)
<apeiros>
leitz: ^
<apeiros>
note: this will also do e.g. with {"boots" => "shoes"} and "I have bootstrapped this" turn it into "I have shoesstrapped this"
<apeiros>
i.e. you may want to add some guarding, depending on what exactly you want to do.
<leitz>
apeiros, thanks! Keys should be fairly unique, they are planet names.
<leitz>
And where I misselled a character's name. :)
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
justicefries has joined #ruby
murican has quit [Quit: murican]
k0mpa has joined #ruby
ta_ has quit [Remote host closed the connection]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<livcd>
Is the well grounded rubyist book worth buying ?
ta_ has joined #ruby
rrutkowski has joined #ruby
jnollette has quit [Remote host closed the connection]
mjolnird has quit [Remote host closed the connection]
cschnei__ has quit [Ping timeout: 240 seconds]
sameerynho has joined #ruby
cschnei__ has joined #ruby
<havenwood>
livcd: and it's worth bothering to get the most recent addition so you have less to catch up on
* leitz
is still using pre Ruby 2.0 books.
<leitz>
If you are going to use recent versions of Ruby then yeah, get the newest version of the book(s) you can afford. I think POODR will be coming out with an update later in 2018.
<leitz>
apeiros, thanks! I've been playing with your gsub solution and it works for a test case. Need to put it to real use.
gizmore|2 has joined #ruby
rfoust has joined #ruby
cdg has joined #ruby
gizmore has quit [Ping timeout: 272 seconds]
code_zombie has joined #ruby
cdg has quit [Ping timeout: 256 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
Ltem has joined #ruby
chocoelho has joined #ruby
gizmore has joined #ruby
rrutkowski_ has joined #ruby
gizmore|2 has quit [Ping timeout: 265 seconds]
rrutkowski has quit [Ping timeout: 248 seconds]
mikecmpbll has joined #ruby
rrutkowski_ has quit [Client Quit]
rrutkowski has joined #ruby
chocoelho has quit [Quit: chocoelho]
rrutkowski has quit [Client Quit]
gizmore|2 has joined #ruby
rrutkowski has joined #ruby
gizmore|3 has joined #ruby
cschnei__ has quit [Ping timeout: 272 seconds]
gizmore has quit [Ping timeout: 248 seconds]
gizmore has joined #ruby
rrutkowski has quit [Client Quit]
gizmore|2 has quit [Ping timeout: 256 seconds]
gizmore|2 has joined #ruby
rrutkowski has joined #ruby
lostandfound has joined #ruby
gizmore|4 has joined #ruby
gizmore5 has joined #ruby
gizmore|3 has quit [Ping timeout: 272 seconds]
KeyJoo has joined #ruby
gizmore has quit [Ping timeout: 256 seconds]
gizmore|2 has quit [Ping timeout: 256 seconds]
lostandfound has quit [Ping timeout: 248 seconds]
gizmore|4 has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
clemens3 has joined #ruby
gizmore has joined #ruby
tamouse__ has joined #ruby
alfiemax has quit [Remote host closed the connection]
rrutkowski_ has joined #ruby
gizmore5 has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
rrutkowski has quit [Ping timeout: 272 seconds]
gizmore has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
cdg_ has joined #ruby
cschnei__ has joined #ruby
cdg__ has joined #ruby
cdg has quit [Ping timeout: 252 seconds]
cdg_ has quit [Ping timeout: 252 seconds]
troys has joined #ruby
troulouliou_div2 has joined #ruby
cdg__ has quit [Ping timeout: 252 seconds]
DmitryBochkarev has joined #ruby
cdg has joined #ruby
alfiemax has quit [Remote host closed the connection]
raynold has quit [Quit: Connection closed for inactivity]
millz has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
alexherbo2 has quit [Quit: WeeChat 2.0.1]
alfiemax has quit [Remote host closed the connection]
NightMonkey has joined #ruby
apeiros__ has joined #ruby
rrutkowski_ has quit [Quit: rrutkowski_]
apeiros has quit [Read error: Connection reset by peer]
LocaMocha has joined #ruby
jeffreylevesque has quit [Read error: Connection reset by peer]
tamouse__ has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
rrutkowski has joined #ruby
apeiros__ has quit [Ping timeout: 268 seconds]
madhatter has joined #ruby
rrutkowski has quit [Client Quit]
rrutkowski has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
psychicist__ has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
howdoi has joined #ruby
orbyt_ has joined #ruby
alfiemax has joined #ruby
apeiros has joined #ruby
<leitz>
Style question. If the program takes an option, and the opt.on runs a method that opens a file, should the "file not found" exception be in the opt.on or the method?
alfiemax has quit [Remote host closed the connection]
nchambers is now known as NewYear
NewYear is now known as NewYears
alfiemax has joined #ruby
chocoelho has joined #ruby
chocoelho has quit [Client Quit]
code_zombie has quit [Quit: Leaving]
troys is now known as troys_
xco has joined #ruby
<xco>
hi. String#intern and String#to_sym do EXACTLY they same thing, why does Ruby have two methods doing the same thing?
<al2o3-cr>
xco: possible aliases?
dviola has joined #ruby
<al2o3-cr>
xco: you'll be surprised at how many there is.
<leitz>
xco, al2o3-cr is right. Ruby is widely used where people speak different languages. While most of the key words are in English there are a lot of aliases to make things easier for a global audience.
<xco>
leitz: i was just going to ask WHY we need aliases for method names. what’s the difference between #to_sym and #intern to a Mandarin speaker?
<xco>
they could both be treated as english words, which all Ruby keywords are anyway
remix2000 has quit [Ping timeout: 268 seconds]
<leitz>
xco, there are a lot of aliases. As far as I can tell they are to make things easier for the programmer. I tend to pick one and stick with it, but I'm not a Ruby expert.
<leitz>
So, "why" seems to be "to make it easier".
<xco>
leitz: right
<xco>
i’ll have to accept that
<leitz>
xco, what issue does it cause?
<xco>
confusion
<leitz>
How so?
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikhael_k33hl has quit [Ping timeout: 260 seconds]
alfiemax has quit [Remote host closed the connection]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alex`` has joined #ruby
justicefries has joined #ruby
aesthetikx has quit [Ping timeout: 272 seconds]
aesthetikx has joined #ruby
naprimer has quit [Read error: Connection reset by peer]
yurko has joined #ruby
alfiemax has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mtkd has quit [Ping timeout: 268 seconds]
mtkd has joined #ruby
<havenwood>
xco: Folk coming from different schools of language look for different keywords and Matz wanted them to easily find what they're looking for.
<xco>
havenwood: well this makes more sense. thank you
<havenwood>
xco: Someone coming from Smalltalk would expect "symbol" where many other languages call them "interned strings".
<havenwood>
Or "atoms"
rrutkowski has quit [Ping timeout: 240 seconds]
psychicist__ has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
nofxx has quit [Remote host closed the connection]
<havenwood>
xco: A bunch of the aliases are the Smalltalk versus Lispy/functional name for the thing.
<havenwood>
Like collect and select (Smalltalk) versus map and find (Lisp).
<xco>
with this thought of “accommodating” different language backgrounds i think it even wise. i won’t question aliases in ruby anymore. didn’t see the sense until now
<millz>
In my own classes that I use for various projects, I'll use aliases to fit the dsl of whatever I might use it in
vipaca has joined #ruby
psychicist__ has joined #ruby
rrutkowski has joined #ruby
<xco>
i’m reading Ruby Cookbook and it’s claiming this “the hash valuse of a symbol is simply its ojbect ID.” so i did this h = :string and then puts h.hash, puts h.object_id. i got -2900118750444978704 and 276508. why did the book make this clame?
<xco>
claim***
gf3 has quit [Ping timeout: 252 seconds]
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gf3 has joined #ruby
lostandfound has quit [Ping timeout: 272 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
vichib has quit [Remote host closed the connection]
dionysus69 has joined #ruby
hightower3 has joined #ruby
alfiemax_ has joined #ruby
drewmcmillan has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
reber has quit [Remote host closed the connection]
alfiemax_ has quit [Ping timeout: 256 seconds]
naprimer has joined #ruby
randomstrangerb has quit [Ping timeout: 256 seconds]
conta has quit [Remote host closed the connection]
rrutkowski has quit [Quit: rrutkowski]
rrutkowski has joined #ruby
lostandfound has quit [Ping timeout: 248 seconds]
rrutkowski has quit [Client Quit]
rrutkowski has joined #ruby
quobo has joined #ruby
belmoussaoui has joined #ruby
lostandfound has joined #ruby
belmoussaoui has quit [Client Quit]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jtdoncas has joined #ruby
randomstrangerb has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
randomstrangerb has joined #ruby
xco has left #ruby [#ruby]
al2o3-cr has joined #ruby
lostandfound has quit [Ping timeout: 264 seconds]
SqREL has joined #ruby
pelegreno has quit [Remote host closed the connection]
Dimik has joined #ruby
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pelegreno has joined #ruby
ta_ has joined #ruby
knight33 has joined #ruby
Vapez has quit [Ping timeout: 250 seconds]
alfiemax has joined #ruby
justicefries has joined #ruby
chocoelho has joined #ruby
chocoelho has quit [Client Quit]
knight33 has quit [Client Quit]
alfiemax_ has quit [Ping timeout: 260 seconds]
knight33 has joined #ruby
lostandfound has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
pelegreno has quit [Remote host closed the connection]
pelegreno has joined #ruby
TomyLobo2 has joined #ruby
alfiemax has quit [Remote host closed the connection]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomyLobo has quit [Ping timeout: 272 seconds]
knight33 has joined #ruby
lostandfound has quit [Ping timeout: 248 seconds]
dn` has quit [Quit: dn`]
cdg has joined #ruby
millz has quit [Ping timeout: 252 seconds]
cdg has quit [Ping timeout: 250 seconds]
megamos has quit [Ping timeout: 264 seconds]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
vichib has joined #ruby
zanshin has quit [Quit: WeeChat 1.9.1]
belmoussaoui has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jrp93 has joined #ruby
ta_ has quit [Ping timeout: 240 seconds]
rrutkowski has quit [Ping timeout: 240 seconds]
wolakkk has joined #ruby
belmoussaoui has quit [Quit: belmoussaoui]
troulouliou_div2 has joined #ruby
lostandfound has joined #ruby
Vapez has joined #ruby
lostandfound has quit [Ping timeout: 240 seconds]
Pierreb has quit [Ping timeout: 256 seconds]
xco has joined #ruby
troys is now known as troys_
randomstrangerb has quit [Ping timeout: 240 seconds]
lostandfound has joined #ruby
randomstrangerb has joined #ruby
sammi` has joined #ruby
ResidentBiscuit has joined #ruby
lytol_ has quit [Read error: Connection reset by peer]
lytol_ has joined #ruby
lytol_ has quit [Remote host closed the connection]
sammi`_ has quit [Quit: Lost terminal]
meesles has joined #ruby
SqREL has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troulouliou_div2 has quit [Quit: Leaving]
raynold has joined #ruby
jtdoncas has quit [Ping timeout: 252 seconds]
weaksauce has joined #ruby
rrutkowski has joined #ruby
alfiemax has joined #ruby
justicefries has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
dinfuehr has quit [Ping timeout: 256 seconds]
rrutkowski has quit [Quit: rrutkowski]
dinfuehr has joined #ruby
rrutkowski has joined #ruby
meshsmith has joined #ruby
meshsmith has quit [Changing host]
meshsmith has joined #ruby
jamesaxl has quit [Quit: WeeChat 1.9.1]
rrutkowski has quit [Client Quit]
rrutkowski has joined #ruby
Rr4sT has joined #ruby
rigby has joined #ruby
rigby has quit [Client Quit]
Ltem has quit [Quit: good night]
jtdoncas has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
rrutkowski has quit [Ping timeout: 268 seconds]
mynameisdebian has joined #ruby
<mynameisdebian>
Is there a Ruby gem that uses Ruby-style syntax to insert into a MySQL (or other) database? By which I mean, instead of having to build a string "INSERT INTO people VALUES ..." I could just do "people.insert(people, values)" or something like that?
<apeiros>
mynameisdebian: sequel
<apeiros>
alternatively activerecord and rom (if that's still the name)