jhass changed the topic of #ruby to: Welcome new users migrating from #ruby-lang! || Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
CloCkWeRX has quit [Quit: Leaving.]
<Ox0dea> ~ $ cat foo.c && ./foo
<Ox0dea> int main(void) { printf("%f %f\n", 1/0.0, 0/0.0); }
<Ox0dea> inf -nan
<Ox0dea> Senjai: ^ For what that's worth.
<Ox0dea> I'm sure it's just a case of matz deciding not to fight his platform all those years ago.
jcoe has joined #ruby
CodyStringham has joined #ruby
ramfjord has joined #ruby
<Senjai> Ox0dea: Thanks. But you must understand my bleh
<Senjai> :P
<Senjai> I'm sure that has to be a thing because reasons, but bleh
PaulCapestany has quit [Ping timeout: 264 seconds]
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
joelataylor has joined #ruby
<Senjai> I would want to use a specialized arithmatic library if I wanted that kind of behavior
<Senjai> I'm sure I'm wrong for.. reasons
chipotles has joined #ruby
blue_deref has quit [Quit: bbn]
Rickmasta has joined #ruby
CloCkWeRX has joined #ruby
joelataylor has quit [Ping timeout: 248 seconds]
PaulCapestany has joined #ruby
dfockler has quit [Remote host closed the connection]
iloverubynoob has left #ruby ["Leaving..."]
iloverubynoob has joined #ruby
iloverubynoob has left #ruby ["Leaving..."]
iloverubynoob has joined #ruby
iloverubynoob has left #ruby ["Leaving..."]
7GHAAP6P7 has joined #ruby
64MADC7ZF has joined #ruby
iloverubynoob has joined #ruby
ruby-lang046 has quit [Ping timeout: 246 seconds]
PaulCape_ has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
marr has quit []
iloverubynoob has quit [Remote host closed the connection]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pecopeco has joined #ruby
iloverubynoob has joined #ruby
mleung has quit [Quit: mleung]
freerobby has quit [Quit: Leaving.]
astrobun_ has joined #ruby
astrobun_ has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 255 seconds]
pecopeco has quit [Ping timeout: 244 seconds]
iloverubynoob has quit [Ping timeout: 244 seconds]
rehat has quit [Remote host closed the connection]
Kully3xf_ has quit [Read error: Connection reset by peer]
Thomas-0725 has joined #ruby
benlieb has quit [Quit: benlieb]
PaulCape_ has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
Yzguy has joined #ruby
devbug has quit [Ping timeout: 248 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
v0n has quit [Ping timeout: 252 seconds]
eggoez has quit [Ping timeout: 256 seconds]
drewo has quit [Ping timeout: 248 seconds]
werelivinginthef has quit [Remote host closed the connection]
PaulCapestany has quit [Ping timeout: 256 seconds]
Agoldfish has quit [Quit: G'Bye]
drewo has joined #ruby
sevenseacat has joined #ruby
arturmartins has quit [Quit: Leaving...]
jeramyRR has joined #ruby
finisherr has joined #ruby
S0da has quit [Remote host closed the connection]
Agoldfish has joined #ruby
bigkevmcd has quit [Ping timeout: 244 seconds]
bronson has quit [Remote host closed the connection]
PaulCapestany has joined #ruby
yuuvee has quit [Quit: Leaving...]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PaulCapestany has quit [Client Quit]
tmtwd has quit [Ping timeout: 256 seconds]
bronson has joined #ruby
jpfuentes2 has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
PaulCape_ has quit [Ping timeout: 255 seconds]
eggoez has joined #ruby
failshell has joined #ruby
joelataylor has joined #ruby
gccostabr has joined #ruby
nveselinov has quit [Quit: Connection closed for inactivity]
graydot has quit [Quit: graydot]
sevvie has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
baweaver has quit [Remote host closed the connection]
godzillaenlacasa has quit [Quit: ZZZZZ....]
seal has joined #ruby
bungoman has joined #ruby
ryba has quit [Ping timeout: 265 seconds]
pengin has quit [Remote host closed the connection]
failshell has quit [Ping timeout: 246 seconds]
eggoez has quit [Ping timeout: 246 seconds]
bungoman has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
bungoman has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eshy has joined #ruby
xcesariox has joined #ruby
xkef has quit [Ping timeout: 252 seconds]
ujjain has quit [Max SendQ exceeded]
eggoez has joined #ruby
ujjain has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
oo_ has joined #ruby
xkef has joined #ruby
dgutierrez1287 has quit [Ping timeout: 246 seconds]
nfk has quit [Remote host closed the connection]
jaycee has joined #ruby
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has joined #ruby
godzillaenlacasa has joined #ruby
drewvanstone has quit [Ping timeout: 246 seconds]
Guest76729 has quit [Remote host closed the connection]
symm- has joined #ruby
leitz has quit [Quit: Nappy time]
serivichi has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
v0n has joined #ruby
seal has quit [Quit: Ex-Chat]
Zamyatin has joined #ruby
sickmate has joined #ruby
dgutierrez1287 has joined #ruby
nfk has joined #ruby
Oka has joined #ruby
bronson has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
rflappo has quit [Quit: Leaving]
nfk has quit [Read error: Connection reset by peer]
duderonomy has quit []
bronson has joined #ruby
Igorshp has joined #ruby
failshell has joined #ruby
Oka has quit [Ping timeout: 248 seconds]
htmldrum has joined #ruby
martianixor has joined #ruby
martianixor has quit [Max SendQ exceeded]
pepperbreath1 has joined #ruby
Contigi has joined #ruby
martianixor has joined #ruby
bungoman_ has joined #ruby
nobitano_ has quit [Remote host closed the connection]
nfk has joined #ruby
nobitanobi has joined #ruby
nobitanobi has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 264 seconds]
bungoman has quit [Ping timeout: 255 seconds]
Igorshp has quit [Ping timeout: 244 seconds]
failshell has quit [Ping timeout: 246 seconds]
jackjackdripper has quit [Quit: Leaving.]
hahuang6_ has joined #ruby
_blizzy_ has joined #ruby
astrobun_ has joined #ruby
nettoweb has joined #ruby
bungoman_ has quit [Ping timeout: 248 seconds]
danielpclark has quit [Remote host closed the connection]
SiliconDon has quit []
nettoweb has quit [Max SendQ exceeded]
reset has quit [Quit: Leaving...]
nettoweb has joined #ruby
htmldrum has quit [Ping timeout: 264 seconds]
Papierkorb has quit [Remote host closed the connection]
foertter has joined #ruby
_blizzy_ has quit [Ping timeout: 248 seconds]
msnyon has joined #ruby
nettoweb_ has joined #ruby
hahuang6_ has quit [Quit: Textual IRC Client: www.textualapp.com]
nettoweb_ has quit [Max SendQ exceeded]
oo_ has quit [Remote host closed the connection]
doctorly has joined #ruby
nettoweb_ has joined #ruby
oo_ has joined #ruby
yqt has quit [Read error: Connection reset by peer]
juanpaucar has quit [Remote host closed the connection]
hahuang61 has joined #ruby
nettoweb has quit [Ping timeout: 265 seconds]
gccostabr has quit [Quit: ZZZzzz…]
dfockler has joined #ruby
Kyhz has quit []
dfockler has quit [Remote host closed the connection]
podman has quit [Quit: Connection closed for inactivity]
foertter has quit [Quit: Textual IRC Client: www.textualapp.com]
fgo has joined #ruby
htmldrum has joined #ruby
chipotles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: zzz]
GitGud has quit [Ping timeout: 255 seconds]
foertter has joined #ruby
jeramyRR has joined #ruby
astrobun_ has quit [Remote host closed the connection]
hahuang62 has joined #ruby
frem has joined #ruby
hahuang61 has quit [Quit: WeeChat 1.2]
montyboy_ has joined #ruby
fgo has quit [Ping timeout: 244 seconds]
ramfjord has quit [Ping timeout: 250 seconds]
nettoweb_ has quit [Ping timeout: 250 seconds]
keen__________21 has quit [Ping timeout: 250 seconds]
montyboy has quit [Ping timeout: 250 seconds]
hahuang65 has quit [Ping timeout: 250 seconds]
joneshf-laptop has quit [Ping timeout: 250 seconds]
i8igmac has quit [Ping timeout: 250 seconds]
postmodern has quit [Ping timeout: 250 seconds]
frem has joined #ruby
frem has quit [Changing host]
keen__________21 has joined #ruby
pkrnj has joined #ruby
tsvenson has quit [Ping timeout: 256 seconds]
sp33drac3r has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
joneshf-laptop has joined #ruby
Yzguy has quit [Quit: Zzz...]
i8igmac has joined #ruby
towski_ has quit [Remote host closed the connection]
sp33drac3r has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sarkyniin has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
idiocrash has joined #ruby
graydot has joined #ruby
zacstewart has joined #ruby
Musashi007 has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
ramfjord has joined #ruby
astrobun_ has joined #ruby
sarkyniin has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
mikeric has quit []
tkuchiki has joined #ruby
astrobun_ has quit [Remote host closed the connection]
bricker has quit [Quit: leaving]
htmldrum has quit [Ping timeout: 244 seconds]
jeramyRR has quit [Quit: Peace out!]
dieogviola has joined #ruby
Rennex_ has joined #ruby
CodyStringham has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
braincra- has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
Agoldfish has quit [Quit: G'Bye]
zr2d2 has joined #ruby
CodyStringham has joined #ruby
xkef has quit [Ping timeout: 256 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dieogviola has quit [Changing host]
dieogviola has joined #ruby
f4cl3y has joined #ruby
f4cl3y has joined #ruby
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lucky_ has joined #ruby
niemcu has quit [Ping timeout: 255 seconds]
braincrash has quit [Ping timeout: 264 seconds]
tmtwd has joined #ruby
godzillaenlacasa has quit [Quit: ZZZZZ....]
felixjet has quit [Read error: Connection reset by peer]
tmtwd has quit [Remote host closed the connection]
finisherr has quit [Quit: finisherr]
arescorpio has joined #ruby
camilasan has quit [Remote host closed the connection]
f4cl3y has quit [Ping timeout: 256 seconds]
finisherr has joined #ruby
tmtwd has joined #ruby
nofxx has quit [Ping timeout: 256 seconds]
swgillespie has joined #ruby
bruno- has joined #ruby
finisherr has quit [Client Quit]
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
htmldrum has joined #ruby
pygospa has quit [Ping timeout: 255 seconds]
pygospa has joined #ruby
Ox0dea has quit [Ping timeout: 265 seconds]
Rennex has quit [Quit: leaving]
swgillespie has quit [Client Quit]
Rennex_ is now known as Rennex
scripore has quit [Read error: Connection reset by peer]
bruno- has quit [Ping timeout: 250 seconds]
camilasan has joined #ruby
nfk has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 250 seconds]
speaking1ode has joined #ruby
graydot has quit [Quit: graydot]
WillAmes has joined #ruby
htmldrum has quit [Ping timeout: 265 seconds]
sepp2k1 has quit [Read error: Connection reset by peer]
Stratege_ has quit [Ping timeout: 248 seconds]
JoshuaPaling has joined #ruby
htmldrum has joined #ruby
duderonomy has joined #ruby
veduardo has joined #ruby
idiocrash has quit []
meph has joined #ruby
failshell has joined #ruby
zacstewart has quit [Ping timeout: 252 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
diego1 has joined #ruby
towski_ has joined #ruby
dopie has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
failshell has quit [Ping timeout: 244 seconds]
PaulCapestany has joined #ruby
shinnya has quit [Ping timeout: 246 seconds]
dieogviola has quit [Ping timeout: 265 seconds]
davedev24 has quit []
dopieee has joined #ruby
failshell has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<zr2d2> I'm trying to use sequel to connect to a remote mssql host, but http://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html#label-odbc+ suggests that it can't be done.
dopie has quit [Ping timeout: 240 seconds]
doctorly has quit [Ping timeout: 256 seconds]
<sevenseacat> it can.
Spami has quit [Quit: This computer has gone to sleep]
<sevenseacat> just not via odbc.
failshell has quit [Remote host closed the connection]
<sevenseacat> use tinytds.
foertter has quit [Quit: Another time, another day, another supercomputer...]
htmldrum has quit [Ping timeout: 256 seconds]
foertter has joined #ruby
htmldrum has joined #ruby
mikeric has joined #ruby
Fezzler has joined #ruby
iateadonut has joined #ruby
TheNet has joined #ruby
bigkevmcd has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
<sphex> hey.. is it safe to depend on `if` expressions returning nil when no branches are taken?
c_nick has joined #ruby
joelataylor has quit [Quit: Lingo: www.lingoirc.com]
bungoman has joined #ruby
<existensil> yes
<existensil> safe in the sense its reliable/predictible behavior. might not be the clearest code to read.
htmldrum has quit [Ping timeout: 264 seconds]
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has joined #ruby
<sphex> existensil: alright
CloCkWeRX has quit [Quit: Leaving.]
howdoicomputer has joined #ruby
<c_nick> I have a testing framework where my Web Module (Sinatra web app) displays information to the user. Ideally it picks all the data from database and displays but the information i am picking up comprises of multiple joins basically too much Database processing will it be a better approach that when the results are written to the Db, i write a text file and then for Web UI uses this test file to display Pros: web component has zero processing and info is trivial
<c_nick> - Grouping of tests Cons: Not sure if the approach is legitimate
fgo has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
howdoicomputer has quit [Ping timeout: 244 seconds]
diego1 has quit [Quit: WeeChat 1.2]
konsolebox has joined #ruby
zacstewart has joined #ruby
mikeric has quit []
_blizzy_ has joined #ruby
Igorshp has joined #ruby
Lucky_ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Igorshp has quit [Ping timeout: 244 seconds]
MatrixBridge has quit [Remote host closed the connection]
_blizzy_ has quit [Read error: Connection reset by peer]
meph has quit [Remote host closed the connection]
MatrixBridge has joined #ruby
bronson has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
_blizzy_ has joined #ruby
iateadonut has quit [Quit: Leaving.]
mase-chatter has quit [Quit: Leaving]
poguez_ has quit [Quit: Connection closed for inactivity]
Fezzler has quit [Quit: Leaving]
jesterfraud has joined #ruby
jenrzzz has joined #ruby
chinmay_dd has quit [Ping timeout: 256 seconds]
luriv_ has joined #ruby
htmldrum has joined #ruby
CodyStringham has quit []
foertter has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
perrier has quit [Remote host closed the connection]
perrier has joined #ruby
vdamewood has joined #ruby
zacstewart has quit [Ping timeout: 252 seconds]
luriv has quit [Ping timeout: 264 seconds]
jamesaxl has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
radialneon has joined #ruby
bungoman has quit [Remote host closed the connection]
Zinja has quit [Ping timeout: 256 seconds]
phutchins has quit [Ping timeout: 264 seconds]
baweaver has joined #ruby
perturbation has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
kfpratt has joined #ruby
howdoicomputer has quit [Ping timeout: 264 seconds]
htmldrum has quit [Ping timeout: 244 seconds]
danzilio has quit [Quit: My computer has fallen asleep!]
gaucheph has joined #ruby
howdoicomputer has joined #ruby
Trynemjoel has quit [Quit: Quitting]
cek has quit [Quit: Connection closed for inactivity]
Trynemjoel has joined #ruby
TheNet has quit [Remote host closed the connection]
bronson has joined #ruby
TheNet has joined #ruby
Thr34t has joined #ruby
dfockler has joined #ruby
<Thr34t> Hey
<Thr34t> Anyone here
<Aeyrix> h
<Thr34t> Hello?
baweaver has quit [Remote host closed the connection]
<Aeyrix> People are here.
braincra- has quit [Quit: bye bye]
howdoicomputer has quit [Ping timeout: 256 seconds]
<Thr34t> Can Ppl state their Ruby Programing Ranks ? From Freshman - Senior
sarkyniin has quit [Ping timeout: 255 seconds]
perrier has quit [Remote host closed the connection]
perrier has joined #ruby
serivichi has quit [Ping timeout: 244 seconds]
<Thr34t> Or Does any one have an idea of a program to creat to understand the heart or use of the truby language
dfockler has quit [Ping timeout: 250 seconds]
howdoicomputer has joined #ruby
<Thr34t> Does any one have an idea of a program to creat to understand the heart or use of the truby language
<Aeyrix> You what?
<sevenseacat> what on earth do those 'ranks' mean
tubuliferous_ has quit [Ping timeout: 240 seconds]
<Aeyrix> I'm not sure what you're asking tbh.
<Aeyrix> sevenseacat: You didn't get a rank?
<sevenseacat> I failed the exam.
<Aeyrix> :(
<sevenseacat> then again, the only question I answered, I wrote 'lol roobee'
<Aeyrix> lmaod
<Aeyrix> -d
braincrash has joined #ruby
<Thr34t> have an idea of a program to creat to understand the heart or use of the truby language
<Aeyrix> Getting strange looks for laughing at IRC.
<Thr34t> Whats an lol roobe
<sevenseacat> :)
<sevenseacat> Thr34t: if you dont know what you want to build, why are you here?
chinmay_dd has joined #ruby
<Thr34t> To learn
<sevenseacat> for what end?
<Aeyrix> Do you have any particular questions we can help with?
<Thr34t> & I wanna crete something small to start with
<Thr34t> What are some rookie programs , to toy with
<sevenseacat> !twgr
zz_barkerd427 is now known as barkerd427
<sevenseacat> oh duh, this isnt #rubyonrails
<Aeyrix> Wrong chan. ;)
fgo has quit [Ping timeout: 240 seconds]
<Aeyrix> wtf is that command supposed to do?
<sevenseacat> Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
<Aeyrix> Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
<Thr34t> Whats this CHL aabout
<Aeyrix> CHL?
<Aeyrix> Channel?
<Thr34t> Arent You Guys Ruby Programers
<pontiki> chill, mang
<Aeyrix> This is... people who know or want to know Ruby.
<sevenseacat> yes, we are.
xkickflip has quit [Quit: xkickflip]
<Thr34t> What have you guys built ?
<perturbation> I use Ruby for wrangling Mongo and writing reports in my day-to-day
<perturbation> I like Rails but I haven't really used it for work
<Aeyrix> I built a system that monitors more things than the NSA. :^)
<sevenseacat> a lot of web apps.
<Thr34t> Anyone here a tinker
<sphex> I was dishonourably discharged and stripped of my ruby rank :(
i8igmac has quit [Ping timeout: 256 seconds]
<Aeyrix> sphex: Ouch.
<sevenseacat> sphex: we told you not to put it there.
<Thr34t> ?
<Coraline> Conway's Game of Life is a good learning exercise.
<Aeyrix> I agree.
<sevenseacat> I had to look up what that was, when I read the four elements of simple design.
maletor has joined #ruby
desigx has joined #ruby
zenguy_pc has quit [Remote host closed the connection]
<Coraline> I learned about it at a code retreat some years back.
darkf has joined #ruby
<sevenseacat> seems like a cool idea, but I've never actually built an implementation of it
tmtwd has quit [Remote host closed the connection]
<Coraline> For a while I was working on a combination game of life / prisoners dilemma
<sevenseacat> I think I'd get bogged down too much in the pretty output
<Coraline> Yeah, that's easy to do.
<c_nick> I am grouping my test results so for n groups n join queries to db to retrieve test statics is better or while saving results to db we write a file which can be references for displaying the stats by the web module?
Ox0dea has joined #ruby
<c_nick> these stats comprise of Groups - Tests - Pass - Fail
barkerd427 is now known as zz_barkerd427
<Ox0dea> sevenseacat: In that case, you're going to hate me for showing you this: https://en.wikipedia.org/wiki/Langton's_ant
howdoicomputer has quit [Ping timeout: 240 seconds]
<Aeyrix> Yo Ox.
<Ox0dea> I had so much fun mucking about with different turn sequences and colors when I first discovered Langton's ant.
<Ox0dea> Ohai, Aeyrix!
<sevenseacat> hah cool
Thr34t has quit [Ping timeout: 246 seconds]
dellavg has joined #ruby
desigx has quit [Ping timeout: 244 seconds]
serivichi has joined #ruby
<Ox0dea> If memory serves, I did it in Racket to learn its object system.
jcdesimp has joined #ruby
eggoez has quit [Ping timeout: 240 seconds]
<sevenseacat> now I want to play with these kind of things
bffff_ has quit [Quit: Connection closed for inactivity]
<sevenseacat> good thing tomorrow is my professional development day at work eh
perturbation has quit [Quit: Leaving]
jcdesimp has quit [Client Quit]
jcdesimp has joined #ruby
freerobby has joined #ruby
howdoicomputer has joined #ruby
zacstewart has joined #ruby
psy_ has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
<c_nick> no ones helping me :(
<Ox0dea> sevenseacat: You'd have to do some serious finagling, but I suspect the Turing-completeness of both Conway's Game of Life and Langton's ant could be made to work in your favor.
* c_nick makes cute kitten faces
yfeldblum has joined #ruby
<c_nick> ok suppose i have {test => [groups] } can i convert that to {group => [tests]}
howdoicomputer has quit [Ping timeout: 252 seconds]
<Ox0dea> >> {a: 1, b: 2}.invert
<ruboto> Ox0dea # => {1=>:a, 2=>:b} (https://eval.in/399541)
<Coraline> c_nick: use a database. Performance is good and you will have an historic reference as well.
fgo has joined #ruby
<c_nick> Coraline, I maintain the group information in a Configuration File, and that information is mostly static (changes once in a bluemoon) thats the reason why i felt i should use the file
konsolebox has quit [Quit: Leaving]
veduardo has quit [Ping timeout: 265 seconds]
eggoez has joined #ruby
<c_nick> using Active Records i dont really need to maintain the join table (foreign key,foreign key / many to many relation) its just that while i display the stats it will be a query for each row .. vs read a file and get the data .. Saying this file processing will be involved too (viz. Group test pass fail ) and process the whole shit and stuff
<c_nick> i'll explore the db way today if no luck then try the file way .. thanks Coraline
<Coraline> Sure
desigx has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
zipkid has quit [Ping timeout: 248 seconds]
<c_nick> {test1 => [group1,group2] , test2 => [group1]}.invert
<c_nick> > {test1 => [group1,group2] , test2 => [group1]}.invert
<c_nick> >> {test1 => [group1,group2] , test2 => [group1]}.invert
<ruboto> c_nick # => undefined local variable or method `test1' for main:Object (NameError) ...check link for more (https://eval.in/399544)
ledestin has joined #ruby
<c_nick> >> {'test1' => ['group1','group2'] ,'test2' => ['group1']}.invert
<ruboto> c_nick # => {["group1", "group2"]=>"test1", ["group1"]=>"test2"} (https://eval.in/399545)
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zipkid has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
joshbamboo1 has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
zacstewart has quit [Ping timeout: 246 seconds]
kfpratt has quit [Remote host closed the connection]
zacstewart has joined #ruby
knowtheory has quit [Ping timeout: 264 seconds]
jpinnix______ has quit [Read error: Connection reset by peer]
JoshuaPaling has quit [Quit: Textual IRC Client: www.textualapp.com]
halfdan has quit [Ping timeout: 240 seconds]
jmcc has quit [Ping timeout: 240 seconds]
mikeric has joined #ruby
adambeynon has quit [Read error: Connection reset by peer]
thiagovsk has quit [Read error: Connection reset by peer]
whoojemaflip has quit [Read error: Connection reset by peer]
holsee_ has quit [Read error: Connection reset by peer]
ramblinpeck has quit [Read error: Connection reset by peer]
amitchellbullard has quit [Read error: Connection reset by peer]
exadeci has quit [Read error: Connection reset by peer]
spastorino has quit [Ping timeout: 240 seconds]
frankS2 has quit [Ping timeout: 248 seconds]
bestie has quit [Ping timeout: 248 seconds]
mroth has quit [Read error: Connection reset by peer]
zero7 has quit [Write error: Connection reset by peer]
bb010g has quit [Read error: Connection reset by peer]
petems has quit [Read error: Connection reset by peer]
jlyndon has quit [Read error: Connection reset by peer]
neersighted has quit [Read error: Connection reset by peer]
alxndr has quit [Ping timeout: 246 seconds]
frem has quit [Ping timeout: 244 seconds]
akahn has quit [Ping timeout: 246 seconds]
devbug has joined #ruby
ELLIOTTCABLE has quit [Ping timeout: 240 seconds]
Guest85414______ has quit [Ping timeout: 248 seconds]
ljen has quit [Ping timeout: 248 seconds]
carlosoliveira has quit [Ping timeout: 248 seconds]
pusewicz has quit [Ping timeout: 252 seconds]
ggherdov has quit [Ping timeout: 252 seconds]
harleypig has quit [Ping timeout: 252 seconds]
yo61 has quit [Ping timeout: 252 seconds]
frode15243 has quit [Ping timeout: 252 seconds]
cstrahan has quit [Ping timeout: 252 seconds]
hellschreiber has quit [Ping timeout: 252 seconds]
thesheff17 has quit [Ping timeout: 252 seconds]
jevs has quit [Ping timeout: 246 seconds]
cbednarski has quit [Ping timeout: 246 seconds]
bttf has quit [Ping timeout: 246 seconds]
ckrailo has quit [Ping timeout: 256 seconds]
cbetta has quit [Ping timeout: 256 seconds]
vcoinminer has quit [Ping timeout: 256 seconds]
bungoman has joined #ruby
hashrocket has quit [Ping timeout: 252 seconds]
maZtah has quit [Ping timeout: 252 seconds]
zemmihates has quit [Ping timeout: 252 seconds]
iamdevnul has quit [Ping timeout: 252 seconds]
im0b has quit [Ping timeout: 252 seconds]
MiracleBlue has quit [Ping timeout: 252 seconds]
deimos has quit [Ping timeout: 252 seconds]
Heero has quit [Ping timeout: 240 seconds]
glowcoil has quit [Ping timeout: 240 seconds]
alekst_ has quit [Ping timeout: 240 seconds]
benlakey has quit [Ping timeout: 248 seconds]
charles81 has quit [Ping timeout: 248 seconds]
machty has quit [Ping timeout: 248 seconds]
avitzurel has quit [Remote host closed the connection]
firevolt has quit [Ping timeout: 256 seconds]
troter___ has quit [Ping timeout: 256 seconds]
jxf has quit [Ping timeout: 256 seconds]
countryHick has quit [Ping timeout: 246 seconds]
mrsolow has quit [Ping timeout: 265 seconds]
saintcajetan has quit [Ping timeout: 248 seconds]
avitzurel has joined #ruby
Juanchito has quit [Ping timeout: 246 seconds]
Lloyd has quit [Ping timeout: 246 seconds]
lala has quit [Ping timeout: 246 seconds]
lancetw has quit [Ping timeout: 246 seconds]
mrsolo has quit [Ping timeout: 256 seconds]
krainboltgreene has quit [Ping timeout: 256 seconds]
rflot has quit [Ping timeout: 256 seconds]
coderkevin has quit [Ping timeout: 246 seconds]
djbender has quit [Ping timeout: 246 seconds]
pmarreck has quit [Ping timeout: 256 seconds]
zrl has quit [Ping timeout: 264 seconds]
adambeynon has joined #ruby
_blizzy_ has quit [Ping timeout: 265 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
CpuID has joined #ruby
Kharma has quit [Read error: Connection reset by peer]
hoey_ has quit [Read error: Connection reset by peer]
PhilK has quit [Read error: Connection reset by peer]
shelling__ has quit [Read error: Connection reset by peer]
Klumben has quit [Ping timeout: 248 seconds]
bttf has joined #ruby
SegFaultAX has quit [Ping timeout: 240 seconds]
drewdavis has quit [Remote host closed the connection]
akahn has joined #ruby
mroth has joined #ruby
johnhamelink has quit [Ping timeout: 248 seconds]
alekst_ has joined #ruby
jaygen has joined #ruby
Casty has quit [Quit: Textual IRC Client: www.textualapp.com]
ChasedSpade has quit [Ping timeout: 248 seconds]
G has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
gix has quit [Ping timeout: 246 seconds]
jaygen_ has quit [Ping timeout: 255 seconds]
vcoinminer has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
nateberkope has joined #ruby
firevolt has joined #ruby
deimos has joined #ruby
MiracleBlue has joined #ruby
machty has joined #ruby
cstrahan has joined #ruby
pusewicz has joined #ruby
maZtah has joined #ruby
harleypig has joined #ruby
thiagovsk has joined #ruby
hellschreiber has joined #ruby
baweaver has joined #ruby
charles81 has joined #ruby
c_nick has quit [Remote host closed the connection]
halfdan has joined #ruby
djbender has joined #ruby
mikeric has quit []
zemmihates has joined #ruby
icarus has joined #ruby
frem has joined #ruby
bb010g has joined #ruby
gix has joined #ruby
knowtheory has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
baweaver has quit [Ping timeout: 248 seconds]
thesheff17 has joined #ruby
im0b has joined #ruby
frankS2 has joined #ruby
jcoe has quit [Quit: Quitting...]
tubuliferous_ has joined #ruby
troter___ has joined #ruby
yo61 has joined #ruby
alxndr has joined #ruby
drewdavis has joined #ruby
saintcajetan has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
zenguy_pc has joined #ruby
benlakey has joined #ruby
hashrocket has joined #ruby
Juanchito has joined #ruby
iamdevnul has joined #ruby
atomi has quit [Quit: upgrading]
TheNet has quit [Remote host closed the connection]
slash_nick has quit [Ping timeout: 264 seconds]
mrsolow has joined #ruby
rflot has joined #ruby
tubuliferous_ has quit [Ping timeout: 248 seconds]
jpinnix______ has joined #ruby
failshell has joined #ruby
zemmihates has quit []
Musashi007 has joined #ruby
htmldrum has joined #ruby
casadei_ has quit [Remote host closed the connection]
atomi has joined #ruby
dgutierrez1287 has joined #ruby
desigx has quit [Ping timeout: 244 seconds]
failshell has quit [Ping timeout: 240 seconds]
PhilK has joined #ruby
ramblinpeck has joined #ruby
jesterfraud has joined #ruby
amitchellbullard has joined #ruby
TheNet has joined #ruby
petems has joined #ruby
dgutierrez1287 has quit [Ping timeout: 256 seconds]
bestie has joined #ruby
whoojemaflip has joined #ruby
krainboltgreene has joined #ruby
jevs has joined #ruby
ljen has joined #ruby
spastorino has joined #ruby
ckrailo has joined #ruby
martianixor has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 256 seconds]
coderkevin has joined #ruby
lancetw has joined #ruby
zrl has joined #ruby
haraoka has joined #ruby
serivichi has quit [Ping timeout: 265 seconds]
Kharma has joined #ruby
mrsolo has joined #ruby
pmarreck has joined #ruby
Guest85414______ has joined #ruby
oo_ has joined #ruby
felixjet has joined #ruby
cbednarski has joined #ruby
holsee_ has joined #ruby
htmldrum has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby
shelling__ has joined #ruby
hoey_ has joined #ruby
haneen has quit [Read error: Connection reset by peer]
zacstewart has quit [Remote host closed the connection]
carlosoliveira has joined #ruby
Fezzler has joined #ruby
jmcc has joined #ruby
ivanskie has joined #ruby
zacstewart has joined #ruby
jlyndon has joined #ruby
jxf has joined #ruby
desigx has joined #ruby
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maletor has joined #ruby
dellavg has quit [Ping timeout: 264 seconds]
swgillespie has joined #ruby
alvaro_o has joined #ruby
howdoicomputer has joined #ruby
iateadonut has joined #ruby
glowcoil has joined #ruby
exadeci has joined #ruby
cbetta has joined #ruby
cbetta has quit [Changing host]
cbetta has joined #ruby
cbetta has quit [Changing host]
cbetta has joined #ruby
Heero has joined #ruby
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
zero7 has joined #ruby
zacstewart has quit [Ping timeout: 264 seconds]
sp1rs has joined #ruby
simplyianm has joined #ruby
neersighted has joined #ruby
frode15243 has joined #ruby
astrobun_ has joined #ruby
Alina-malina has joined #ruby
vdamewood has quit [Ping timeout: 246 seconds]
ELLIOTTCABLE has joined #ruby
SegFaultAX has joined #ruby
ggherdov has joined #ruby
Guest10289 has joined #ruby
G has joined #ruby
mrsolo_ has joined #ruby
haneen has joined #ruby
ramfjord has joined #ruby
bruno- has joined #ruby
Guest10289 has quit []
symm- has quit [Ping timeout: 256 seconds]
mrsolo has quit []
lancetw has quit []
jesterfraud has joined #ruby
radialneon has quit [Read error: Connection reset by peer]
<7GHAAP6P7> should a state machine care how it got to particular state?
7GHAAP6P7 is now known as quazimodo
johnhamelink has joined #ruby
ChasedSpade has joined #ruby
Klumben has joined #ruby
cpruitt has joined #ruby
xcesariox has joined #ruby
xcesariox has quit [Client Quit]
krz has joined #ruby
<sphex> quazimodo: no, that would be extra state. the point is to make all state explicit.
MichaelGG has joined #ruby
mikepack has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
icarus has quit [Ping timeout: 265 seconds]
Lloyd has joined #ruby
bungoman has quit [Remote host closed the connection]
rubie has quit [Remote host closed the connection]
haneen has quit [Read error: Connection reset by peer]
icarus has joined #ruby
lancetw has joined #ruby
Guest10289 has joined #ruby
jcdesimp has quit [Quit: Leaving...]
icarus has quit [Read error: Connection reset by peer]
<quazimodo> sphex: so how does that apply to doing actions from state to state transitions
arescorpio has quit [Remote host closed the connection]
serivichi has joined #ruby
oo_ has quit [Remote host closed the connection]
Scroff has joined #ruby
howdoicomputer has quit [Ping timeout: 256 seconds]
icarus has joined #ruby
Guest10289 has quit []
Fezzler has quit [Quit: Leaving]
MichaelGG has quit [Ping timeout: 246 seconds]
gaucheph__ has joined #ruby
lala has joined #ruby
howdoicomputer has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
Scroff has quit [Ping timeout: 265 seconds]
bigkevmcd has joined #ruby
MichaelGG has joined #ruby
<sphex> quazimodo: the actions would occur only when the machine switches from one state to another, which should be decided solely based on the current state and the input. once the machine is in a certain state, the previous states and actions should not matter.
gaucheph has quit [Ping timeout: 248 seconds]
MichaelGG has left #ruby [#ruby]
desigx has quit [Ping timeout: 252 seconds]
wildroman2 has joined #ruby
ivanskie has quit [Quit: Textual IRC Client: www.textualapp.com]
<sphex> quazimodo: so it can matter which state it goes to when in a certain state.. but after the transition, which state it came from must not matter
haneen has joined #ruby
pepperbreath1 has left #ruby [#ruby]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
failshell has joined #ruby
fantazo has joined #ruby
TheNet has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
riotjones has joined #ruby
failshell has quit [Ping timeout: 240 seconds]
aphprentice has joined #ruby
TheNet has joined #ruby
leat1 has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 246 seconds]
leat1 has joined #ruby
mleung has joined #ruby
<Ox0dea> >> def sum(s) s.bytes.reduce(:+) - 96 * s.size end; [sum('second'), sum('minute') - 60 + sum('hour') - 60] # whoadude
<ruboto> Ox0dea # => [60, 24] (https://eval.in/399612)
eGGsha has joined #ruby
lessless has joined #ruby
eGGsha has quit [Remote host closed the connection]
voycey has joined #ruby
bluOxigen has joined #ruby
xcesariox has joined #ruby
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<voycey> Hi guys, I am reasonably new to Ruby and am trying to setup a really simply application to help me solve a problem on a PHP app, I need to set up a really simple basic script using Resque that runs a single comamnd
<voycey> is there any way i can do this without having to install a full framework like Rails / Sinatra as well? That's all I seem to be able to find online
pietr0 has quit [Quit: pietr0]
TheNet has quit [Remote host closed the connection]
<havenwood> voycey: Rails and Sinatra are both Rack adapters. You could use a bare Rack app. Say more about what you're doing?
<voycey> I screwed up something on php-resque and one of my queues has a few hundred failed jobs on it - there is nothing on the PHP port that allows a simple requeue of these jobs
<voycey> just basically need to tell that queue to retry all the failed ones :(
revath has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
revath has left #ruby [#ruby]
simplyianm has quit [Remote host closed the connection]
<havenwood> voycey: Can you just do that from your REPL? Do you need an API for it? How does Rails/Sinatra come into play?
<voycey> Im hoping it doesnt have to
<voycey> not overly experience with Redis - wasnt my choice to use it for deferred processing - if I can do it some other way that would be excellent haha
Iskarlar has joined #ruby
fallen_ has quit [Ping timeout: 244 seconds]
gaucheph has joined #ruby
<voycey> essentially I just want to tell redis to re-process all the failed ones - figured as they were queued through resque (or PHP's version of it) i would need to go throguh that?
<havenwood> voycey: In a Ruby REPL I mean. There are even gems to make it easier like: https://github.com/ono/resque-cleaner#readme
<havenwood> voycey: Like IRB or Pry.
<voycey> I have a ruby environment setup that works from prev projects and have a really basic script that just doesnt do anything
<voycey> that link looks good though - ill give that a bash :) thanks!
<havenwood> voycey: I'm surprised there's no lib in PHP for processing php-resque failed jobs. Have you searched?
zz_barkerd427 is now known as barkerd427
gaucheph__ has quit [Ping timeout: 248 seconds]
cochise has quit [Remote host closed the connection]
sp1rs has quit [Ping timeout: 244 seconds]
<havenwood> voycey: Good luck! Yeah, I'd try something like that in Ruby. You can do it with just the resque gem as well but the above is made for the purpose.
<voycey> I have - one of my problems is that its wrapped in another plugin for a framework as well so its all a bit of hard work
<voycey> ill give this a go :)
zacstewart has joined #ruby
leat1 has quit [Remote host closed the connection]
leat1 has joined #ruby
gaucheph has quit [Ping timeout: 248 seconds]
mikepack has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
sickmate has quit [Ping timeout: 264 seconds]
tagrudev has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ryba has joined #ruby
psyprus has quit [Read error: Connection reset by peer]
psyprus has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
barkerd427 is now known as zz_barkerd427
tubuliferous_ has joined #ruby
jenrzzz has joined #ruby
simplyianm has joined #ruby
<atmosx> voycey: the best way to solve a problem on a php app is to uninstall php :-P
lkba_ has quit [Quit: Bye]
lkba has joined #ruby
rubie has joined #ruby
mercwithamouth has quit [Quit: leaving]
slucx has joined #ruby
tubuliferous_ has quit [Ping timeout: 255 seconds]
baweaver has joined #ruby
simplyianm has quit [Client Quit]
fallen_ has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
tkuchiki has joined #ruby
felixr has joined #ruby
mrsolo_ has quit [Quit: Leaving]
mleung has quit [Quit: mleung]
El3ktra has joined #ruby
El3ktra has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
_ht has joined #ruby
wildroman2 has quit [Remote host closed the connection]
zacstewart has quit [Ping timeout: 244 seconds]
scripore has joined #ruby
Fezzler has joined #ruby
uxp has quit [Read error: Connection reset by peer]
uxp has joined #ruby
Fezzler has quit [Client Quit]
felixr has quit [Ping timeout: 252 seconds]
CloCkWeRX has quit [Ping timeout: 240 seconds]
amclain has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 246 seconds]
avitzurel has quit [Remote host closed the connection]
eGGsha has joined #ruby
sphex_ has joined #ruby
avitzurel has joined #ruby
dhjondoh has joined #ruby
swgillespie has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
sphex has quit [Ping timeout: 244 seconds]
bigkevmcd has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
yfeldblum has quit [Ping timeout: 255 seconds]
GitGud has joined #ruby
Ilyas has joined #ruby
shoutsid has joined #ruby
rockworldmi has joined #ruby
<rockworldmi> Hi all..
riotjones has joined #ruby
<rockworldmi> I am having problem with larch to connect to gmail ... anyone knows workaround to allow to conect to gmail?
Ilyas has quit [Read error: Connection reset by peer]
howdoicomputer has quit [Ping timeout: 255 seconds]
pecopeco has joined #ruby
iloverubynoob has joined #ruby
mikeric has joined #ruby
ixti has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
msnyon has quit [Ping timeout: 256 seconds]
wildroman2 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
iloverubynoob has quit [Ping timeout: 265 seconds]
pecopeco has quit [Ping timeout: 265 seconds]
framling has quit [Remote host closed the connection]
wldcordeiro_ has quit [Remote host closed the connection]
andikr has joined #ruby
lxsameer has joined #ruby
Musashi007 has quit [Quit: Musashi007]
mike___1234 has joined #ruby
zacstewart has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
bigkevmcd has joined #ruby
sickmate has joined #ruby
baweaver has quit [Remote host closed the connection]
ohaibbq has joined #ruby
zemmihates has joined #ruby
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wildroman2 has quit []
sp1rs has joined #ruby
arturaz has joined #ruby
rockworldmi has quit [Quit: Page closed]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cpruitt has quit [Quit: cpruitt]
xcesariox has quit [Read error: Connection reset by peer]
leat1 has quit [Remote host closed the connection]
krz has quit [Read error: Connection reset by peer]
leat1 has joined #ruby
zacstewart has quit [Ping timeout: 244 seconds]
rubie has joined #ruby
krz has joined #ruby
martinium has joined #ruby
AlphaAtom has joined #ruby
AlphaAtom has quit [Client Quit]
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Sp4rKy> Hi, I'm trying to include a ruby file from another one
yfeldblum has joined #ruby
<Sp4rKy> and access variables that are defined in the included file
jenrzzz has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
voycey has left #ruby [#ruby]
fabrice31 has joined #ruby
Timba-as__ has joined #ruby
<Antiarc> local variables are never made visible across files
yfeldblum has quit [Ping timeout: 265 seconds]
xkickflip has joined #ruby
aganov has joined #ruby
<Aeyrix> And global variables are gross.
<Antiarc> You should expose a module or class which contains the variables you wish to share
<Sp4rKy> Antiarc: mhh ok, let's do it that way
oo_ has quit [Remote host closed the connection]
CloCkWeRX has quit [Quit: Leaving.]
towski_ has quit [Remote host closed the connection]
arquebus has joined #ruby
casadei_ has joined #ruby
pecopeco has joined #ruby
iloverubynoob has joined #ruby
<tuor> I want to write templates to files. The error I get is: ArgumentError: The given fd is not accessible because RubyVM reserves it
<tuor> from (pry):175:in `initialize'
araujo has joined #ruby
howdoi has joined #ruby
niemcu has joined #ruby
jackjackdripper has joined #ruby
jackjackdripper has quit [Client Quit]
joonty has joined #ruby
<tuor> I don't understand why file descriptors are relevant ?
<Antiarc> tuor: templates_list[name] is an integer, Ruby is interpreting that as a fd handle rather than a filename
yardenbar has joined #ruby
<tuor> Antiarc, ah ok. thx.
<Antiarc> (I presume, anyhow. It works on my system. What version of Ruby?)
casadei_ has quit [Ping timeout: 264 seconds]
adeponte has quit [Ping timeout: 256 seconds]
shawnatyger has quit [Ping timeout: 256 seconds]
krz has quit [Read error: Connection reset by peer]
fabrice31 has quit [Remote host closed the connection]
blackmesa has joined #ruby
<Antiarc> If you genuinely want to use numbers for your filenames, then just set them as strings or call #to_s on them when you pass them to File.open
fabrice31 has joined #ruby
acke has joined #ruby
schaerli has joined #ruby
brainslug has quit [Ping timeout: 255 seconds]
shawnacscott has joined #ruby
pwnz0r has joined #ruby
sarlalian has quit [Ping timeout: 248 seconds]
failshell has joined #ruby
felixr has joined #ruby
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
adeponte has joined #ruby
thomas has quit [Remote host closed the connection]
polyrob has quit [Ping timeout: 240 seconds]
helpa has quit [Remote host closed the connection]
thomas has joined #ruby
oo_ has joined #ruby
helpa has joined #ruby
dualbus has quit [Ping timeout: 256 seconds]
serivichi has quit [Read error: Connection reset by peer]
riking_ has quit [Ping timeout: 256 seconds]
sarlalian has joined #ruby
<tuor> Antiarc, ah the problem is, when I take longerstrings. (took a simpler version of my code for pasting)
dgutierrez1287 has joined #ruby
raenk has quit [Ping timeout: 255 seconds]
El3ktra has quit [K-Lined]
ndrei has quit [Ping timeout: 240 seconds]
<tuor> It works with shorter strings to.
<tuor> But i replaced with "#{...}" so im shure it will do what it has to
felixr has quit [Client Quit]
exceion has quit [Ping timeout: 255 seconds]
chinmay_dd has quit [Ping timeout: 252 seconds]
haxrbyte_ has quit [Remote host closed the connection]
brainslug has joined #ruby
jidar has quit [Ping timeout: 264 seconds]
mikeric has quit []
failshell has quit [Ping timeout: 256 seconds]
justinmcp has joined #ruby
haxrbyte has joined #ruby
jesterfraud has joined #ruby
Nilium has quit [Ping timeout: 264 seconds]
skyjumper has quit [Ping timeout: 244 seconds]
oo_ has quit [Remote host closed the connection]
zacstewart has joined #ruby
towski_ has joined #ruby
polyrob has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 264 seconds]
voxxit has quit [Ping timeout: 255 seconds]
Riking has joined #ruby
blackmesa has joined #ruby
DoubleMalt has joined #ruby
dgutierrez1287 has quit [Ping timeout: 255 seconds]
dualbus has joined #ruby
adeponte has quit [Read error: No route to host]
bluOxigen has quit [Ping timeout: 265 seconds]
chinmay_dd has joined #ruby
darkf has quit [Read error: Connection reset by peer]
raenk has joined #ruby
darkf has joined #ruby
oo_ has joined #ruby
Evan_ has quit [Quit: Oh shit the geek died!]
pragmatism has quit [Ping timeout: 264 seconds]
bluOxigen has joined #ruby
Nilium has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
keen__________21 has quit [Read error: Connection reset by peer]
araujo has quit [Ping timeout: 250 seconds]
TomyWork has joined #ruby
exceion has joined #ruby
roolo has quit [Remote host closed the connection]
adeponte has joined #ruby
GitGud has quit [Quit: My name is your name]
skyjumper has joined #ruby
Iskarlar has joined #ruby
arturmartins has joined #ruby
keen__________21 has joined #ruby
segv has quit [Ping timeout: 252 seconds]
eGGsha has joined #ruby
thiagovsk has quit [Quit: Connection closed for inactivity]
sp1rs has quit [Ping timeout: 252 seconds]
voxxit has joined #ruby
roolo has joined #ruby
roolo has quit [Remote host closed the connection]
mikeric has joined #ruby
pragmatism has joined #ruby
mikeric has quit [Client Quit]
araujo has joined #ruby
segv has joined #ruby
rdark has joined #ruby
Evan_ has joined #ruby
gvdevil has quit [Quit: ZNC restarting...]
timonv has quit [Quit: WeeChat 1.2]
_djbkd has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
foooobear has joined #ruby
TinkerTyper has joined #ruby
towski_ has quit [Remote host closed the connection]
tubuliferous_ has joined #ruby
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
htmldrum has joined #ruby
maletor has quit [Ping timeout: 246 seconds]
dhjondoh has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<adaedra> Hello
Scroff has joined #ruby
arquebus has quit [Quit: konversation disconnects]
tubuliferous_ has quit [Ping timeout: 250 seconds]
sp1rs has joined #ruby
eGGsha has joined #ruby
senayar has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
laurentide has quit [Quit: Leaving]
jidar has joined #ruby
slucx has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
dhjondoh has joined #ruby
htmldrum has quit [Ping timeout: 264 seconds]
Violentr has joined #ruby
_ht has quit [Remote host closed the connection]
saadq has joined #ruby
_ht has joined #ruby
bruno- has joined #ruby
<Sp4rKy> so, with cls.instance_variables, I can get the list of instance variables name, but how can I then access them using this list?
xkef has joined #ruby
<Sp4rKy> ok, instance_variable_get is the answer, missed it :)
<havenwood> Sp4rKy: aye: nstance_variables.map { |var| instance_variable_get var }
<Sp4rKy> :)
zacstewart has quit [Ping timeout: 246 seconds]
TheHodge has joined #ruby
charliesome has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
Iskarlar has joined #ruby
polysics has joined #ruby
Hounddog has joined #ruby
chipotles has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
dhjondoh has quit [Quit: dhjondoh]
revath has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pecopeco has quit [Ping timeout: 250 seconds]
iloverubynoob has quit [Ping timeout: 250 seconds]
allomov has joined #ruby
white_bear has joined #ruby
ndrei has joined #ruby
genpaku has quit [Ping timeout: 264 seconds]
genpaku has joined #ruby
Igorshp has joined #ruby
mikecmpbll has joined #ruby
fantazo has quit [Quit: Verlassend]
pwnz0r has quit [Remote host closed the connection]
Iskarlar has joined #ruby
arturmartins has quit [Quit: Leaving...]
chipotles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Zai00 has joined #ruby
krz has joined #ruby
zz_barkerd427 is now known as barkerd427
Igorshp has quit [Ping timeout: 246 seconds]
iloverubynoob has joined #ruby
pecopeco has joined #ruby
OrbitalKitten has joined #ruby
OrbitalKitten has quit [Client Quit]
eshy has quit [Max SendQ exceeded]
ndrei has quit [Ping timeout: 264 seconds]
fabrice31_ has joined #ruby
eshy has joined #ruby
fabrice31 has quit [Ping timeout: 244 seconds]
leat1 has quit [Remote host closed the connection]
leat1 has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
fabrice31 has joined #ruby
einarj has joined #ruby
dhjondoh has joined #ruby
barkerd427 is now known as zz_barkerd427
tvw has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
mikecmpb_ has joined #ruby
zacstewart has joined #ruby
edwinvdgraaf has joined #ruby
saadq has quit []
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
xkef has quit [Ping timeout: 250 seconds]
<shevy> code code code
<adaedra> no u
mikecmpb_ has quit [Ping timeout: 256 seconds]
robbyoconnor has quit [Ping timeout: 240 seconds]
n008f4g_ has joined #ruby
r0bby_ has joined #ruby
facebook has joined #ruby
blackmesa has joined #ruby
OrbitalKitten has joined #ruby
Oka has joined #ruby
matcouto has joined #ruby
matcouto has quit [Client Quit]
oo_ has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
TheNet has joined #ruby
oo_ has joined #ruby
bronson has quit [Remote host closed the connection]
Node_ has joined #ruby
<Node_> Check our forum ! http://syntaxcore.com
_djbkd has quit [Quit: My people need me...]
Node_ has quit [Client Quit]
<shevy> :\
ohaibbq has quit [Quit: Leaving...]
TheNet has quit [Ping timeout: 255 seconds]
anisha has joined #ruby
<adaedra> :/
zacstewart has quit [Ping timeout: 250 seconds]
chipotles has joined #ruby
bashusr has quit [Ping timeout: 240 seconds]
dubkoidragon has joined #ruby
dubkoidragon has left #ruby [#ruby]
dubkoidragon has joined #ruby
lkba has quit [Ping timeout: 244 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
noethics_ has joined #ruby
noethics has quit [Disconnected by services]
noethics_ is now known as noethics
mikecmpb_ has joined #ruby
<yorickpeterse> morning
<adaedra> hi yorickpeterse
djbkd has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
Timba-as__ has quit [Quit: Lingo: www.lingoirc.com]
mikecmpbll has quit [Ping timeout: 256 seconds]
edwinvdg_ has joined #ruby
blueOxigen has joined #ruby
<zenspider> riddle: when will pry + pry-stack-explorer's show-stack NOT have a stack to show?
edwinvdgraaf has quit [Ping timeout: 265 seconds]
axl_ has joined #ruby
bluOxigen has quit [Ping timeout: 265 seconds]
edwinvdg_ has quit [Client Quit]
<shevy> hmmm
bluOxigen has joined #ruby
<shevy> when there is no stack?
<zenspider> (no, I don't know the answer)
senayar has quit [Remote host closed the connection]
htmldrum has joined #ruby
<zenspider> there's definitely a stack... this is inside psych inside rails inside a mess
<adaedra> zenspider: when all the planets are aligned with the sun
blueOxigen has quit [Ping timeout: 252 seconds]
senayar has joined #ruby
<zenspider> but for some reason, show-stack, up, down, etc do nothing
<zenspider> no clue
<quazimodo> anyon here written a shopify plugin?
<quazimodo> to rephrase
<quazimodo> a guy i work with is pulling hairs out over his failed attempt at a shopify plugin for shipping
casadei_ has joined #ruby
sofija has joined #ruby
<zenspider> on top of it, I'm inside a rescue I added to psych, and firing up binding.pry, and ... nothing.
<quazimodo> sphex_: sorry i went afk. I understand what you're saying though
<quazimodo> I presumed as much
<zenspider> wtf? show no exception... which is fine.
Zai00 has quit [Quit: Zai00]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
<zenspider> I'm trying to hunt down Psych freaking out trying to dump an anonymous Module... which I need to track down to figure out where it came from
bayed has joined #ruby
revath has quit [Ping timeout: 244 seconds]
<zenspider> ObjectSpace.each_object { |m| m.instance_variables.each do |iv| p m if m.instance_variable_get(iv) == o rescue nil; end } ... ouch
quimrstorres has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
casadei_ has quit [Ping timeout: 264 seconds]
<apeiros> cute
<apeiros> I think the rescue nil is needed for .instance_variables too
<apeiros> might have a couple of objects not responding to that in OS
oo_ has quit [Remote host closed the connection]
<zenspider> shouldn't
<TheBrayn> in which cases should I use the short form with &: or & for functions like map?
edwinvdgraaf has joined #ruby
<zenspider> oddly, I get a strange error if I don't have the rescue
<zenspider> NoMethodError: undefined method `[]' for #<Module:0x007fd57b679168>
arturmartins has joined #ruby
<apeiros> o0
<apeiros> it overrides ivar_get?
<zenspider> not sure what that's about or why it happens
<zenspider> I guess it could? seems like madness
<apeiros> TheBrayn: & is not a short form. &:sym can only be used in certain cases, so you'd use them only in those
oo_ has joined #ruby
<zenspider> gems/soap2r-1.5.8/lib/soap/soap.rb
<zenspider> 134: def instance_variable_get(ivarname)
f4cl3y has joined #ruby
<zenspider> blame everything bad on soap
<TheBrayn> in cases where the method applied to each element does not have any parameters, right?
<apeiros> aaaahaha
stan has quit [Quit: Leaving]
<apeiros> yeah. overriding ivar_get. sounds like a great idea :D
<zenspider> what could possibly go wrong?
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> TheBrayn: it can actually take params, but that use case is pretty rare. the args would have to be part of what is yielded to the block.
<zenspider> x = []; ObjectSpace.each_object { |m| m.instance_variables.each do |iv| x << [m, iv] if m.instance_variable_get(iv) == o rescue nil; end }
<zenspider> x.last.first.instance_variable_get x.last.last
<zenspider> damn... my life is wierd
livathinos has joined #ruby
timonv has joined #ruby
<zenspider> it's a ActionDispatch::Routing::RouteSet::NamedRouteCollection and only has this anonymous module if a destroy method renders some shit ... I have no words
Mafious has joined #ruby
<Mafious> a Hey Guys someone can buy my Shitgame Please ? Go here to buy my game please
<zenspider> !ban Mafious !T 1d trolls go home
<apeiros> zenspider: need some? I've got some spare words…
Mafious was banned on #ruby by ChanServ [Mafious!*@*]
Mafious was kicked from #ruby by ChanServ [Banned: trolls go home]
marr has joined #ruby
<zenspider> damn that's slow
<apeiros> chanserv so slow :(
marr has quit [Client Quit]
<apeiros> yeah, I want to perma-op ruboto so it can do that stuff faster
<zenspider> prolly should
marr has joined #ruby
gguggi has joined #ruby
<apeiros> also seems we have to go away from akick, as only founders can remove stuff :<
charliesome has quit [Quit: zzz]
zacstewart has joined #ruby
xkef has joined #ruby
lkba has joined #ruby
marr has quit [Client Quit]
[k- has joined #ruby
ruurd has joined #ruby
<[k-> Ox0dea!
revath has joined #ruby
Zai00 has joined #ruby
<apeiros> well, I *should* get a bit of spare time to work on ruboto & ruby-community.com next week.
njs126 has quit [Ping timeout: 244 seconds]
<[k-> yay! upgrades!
bubbys has quit [Ping timeout: 240 seconds]
<[k-> thanks apeiros
r0bby_ is now known as robbyoconnor
matcouto has joined #ruby
djbkd has quit [Remote host closed the connection]
marr has joined #ruby
bodzio has joined #ruby
robbyoconnor has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
arturaz has quit [Remote host closed the connection]
failshell has joined #ruby
<dubkoidragon> hey guys, is there anywhere that I can get a qucik read on what I need to install and run my ruby codes, and the process in which to run them, pref an article with pics rather than video.
htmldrum has quit [Ping timeout: 264 seconds]
<dubkoidragon> Thanks a lot man. cheers
<dubkoidragon> I'm coming from a pyton backround, and I am really excited to start workign with ruby
<adaedra> also
<adaedra> ?guys
<ruboto> we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
<dubkoidragon> i look forward to getting to know yall
<zenspider> argh. I have no idea how to track this BS down
<dubkoidragon> i meant no disrespect
<dubkoidragon> jujst my common speech slang my friends
<dubkoidragon> ;)
<adaedra> most don't. don't worry, you're not in trouble, just a friendly reminder :)
<adaedra> have fun with ruby though :)
failshell has quit [Ping timeout: 256 seconds]
bruno- has joined #ruby
<dubkoidragon> thank you, I'm almost done learning the syntax here which is scary close to pythons, then i'm gonna hit up some rails too as well as working with base ruby
revath has quit [Remote host closed the connection]
<zenspider> there's gotta be a better way
asui has joined #ruby
<[k-> isn't it french that has a lot of gender-specific words :o
revath has joined #ruby
<dubkoidragon> ya a lot of languages do, I'm speaking verbal languages obviously
ruurd has quit [Quit: ZZZzzz…]
<adaedra> [k-: you're welcome to discuss that in offtopic :)
<dubkoidragon> what's off topic
<adaedra> ?ot
<ruboto> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<dubkoidragon> ok ty, sry
<adaedra> :)
fabrice31_ has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
<apeiros> zenspider: your code bombs on serialization of data?
<apeiros> zenspider: and you have the place where the code is being serialized?
<apeiros> i.e. you have all except the place where the anonymous module which causes the bombing is created?
eGGsha has joined #ruby
devbug has quit [Ping timeout: 264 seconds]
isxek has joined #ruby
fabrice31 has quit [Ping timeout: 252 seconds]
<zenspider> I know what the module is, and where it comes from... I have no idea how it makes it into the object graph being serialized, nor do I (currently) know the top of the graph
tubuliferous_ has joined #ruby
<apeiros> ah
htmldrum has joined #ruby
oo_ has quit [Remote host closed the connection]
<zenspider> tho, I just found out that my test is holding onto the module in question (indirectly).... I need to figure out why nilling it out isn't working
<zenspider> this stupid pattern is working
<zenspider> a = find_obj m; a.map { |x| [x[0].class, x[1]] }
<zenspider> pick... then m = a[1][0]; nil
<zenspider> repeat
plashchynski has joined #ruby
oo_ has joined #ruby
<zenspider> and just.... fyi... Bundler::Definition holds onto EVERYTHING
<zenspider> I think, quite possibly, literally...
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<asui> Hi everyone, I've started to learn ruby but I've got some trouble with threads. If I spawn multiple threads t1...tn = Thread.new everthing works fine. But if I do the same thing in a loop (0..7) it will only spawn 3-4 threads? I don't understand this behavior. could anybody explain it to me?
matcouto has joined #ruby
stan has joined #ruby
<zenspider> I can't find the top of this stupid graph tho
lxsameer has quit [Ping timeout: 244 seconds]
khebbie has joined #ruby
Scrofff has joined #ruby
lxsameer has joined #ruby
tubuliferous_ has quit [Ping timeout: 264 seconds]
xkef has quit [Read error: Connection reset by peer]
64MADC7ZF has quit [Ping timeout: 255 seconds]
Scroff has quit [Ping timeout: 256 seconds]
quazimodo has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
foooobear has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
Pupeno has joined #ruby
Pathfinder has joined #ruby
Karpah has joined #ruby
<adaedra> ?code asui
<ruboto> asui, We can't help you without your code, please post it to https://gist.github.com
<adaedra> both versions, and a little more about context and what you're trying to do
<yorickpeterse> TIL Ruby's String#downcase is meh when it comes to downcasing unicodes
<adaedra> language support, I guess
<adaedra> >> "åäæß".upcase
<ruboto> adaedra # => "åäæß" (https://eval.in/399844)
<yorickpeterse> e.g. Pg can downcase it just fine to "åkarp"
ruurd has joined #ruby
<yorickpeterse> But Ruby keeps it as is
<apeiros> yupp, ruby only knows about ascii cases
<apeiros> you need one of the unicode gems to properly translate cases
bronson has quit [Ping timeout: 250 seconds]
sevenseacat has quit [Ping timeout: 240 seconds]
Karpah is now known as sevenseacat
kham has joined #ruby
<yorickpeterse> well wadda ya know, there's a unicode Gem
<apeiros> ?justabot asui
<ruboto> asui, I'm just a bot. You don't need to address me.
<apeiros> yorickpeterse: there are several. and as it seems, AS' mb_chars is quite decent too.
<adaedra> asui: first note, you can change 0..vids.length - 1 to 0...vids.length
mikecmpb_ is now known as mikecmpbll
dgutierrez1287 has joined #ruby
<adaedra> when you say that less than 7 threads are spawned, you have results not displayed?
<asui> I'm looking on the file system how many files are created
<asui> maybe every thread is spawned but theres no Downloaded file from it
<zenspider> 1) Use Queue. 2) Use map. 3) threads.each(&:join) can't do anything if empty
plashchynski has quit [Quit: plashchynski]
htmldrum has quit [Quit: Lost terminal]
blackmesa has quit [Ping timeout: 264 seconds]
Scrofff has quit [Ping timeout: 244 seconds]
Scrofff has joined #ruby
<mikecmpbll> anyone know how i'd parse this ? https://gist.github.com/mikecmpbll/f26f9cc8424567720d86
<mikecmpbll> it's a sql dump, basically.
<mikecmpbll> i want to extract the value at column x for each row, but parsing it is a nightmare.
zacstewart has quit [Ping timeout: 244 seconds]
avitzurel has quit [Ping timeout: 244 seconds]
dgutierrez1287 has quit [Ping timeout: 256 seconds]
arturmartins has quit [Quit: Leaving...]
oo_ has quit [Remote host closed the connection]
<asui> zenspider, thank you. I've changed vids[count] to vids.pop... now it seems to work how it should. but why?
<yorickpeterse> apeiros: what's the Gem name of that?
<apeiros> activesupport?
<apeiros> I think activesupport's gem name is active_support ;-p
<apeiros> (or the other way round - or maybe they fixed that inconsistency by now…)
<adaedra> aaah, activesupport.
<adaedra> last time I used it, it was still unconsistent
<yorickpeterse> apeiros: No I meant mb_chars
avitzurel has joined #ruby
<yorickpeterse> ooooh
<yorickpeterse> I missed the AS' part
<apeiros> yeah, mb_chars is from active_support
<apeiros> :D
<yorickpeterse> Hell no I'm not touching active_support
<apeiros> need some garlic?
* adaedra gives yorickpeterse an hazmat suit
* apeiros off for lunch
plashchynski has joined #ruby
<ljarvis> hi
<yorickpeterse> hai
sevenseacat has quit [Quit: Me dun like you no more.]
acke has quit [Quit: Leaving...]
<yorickpeterse> Well, seems https://github.com/blackwinter/unicode it is then
<adaedra> It's weird ruby has no support for that
<adaedra> I'm sure even C knows how to do that, with locales
ruurd has quit [Quit: ZZZzzz…]
blackmesa has joined #ruby
plashchynski has quit [Quit: plashchynski]
t_ has quit [Ping timeout: 256 seconds]
<yorickpeterse> ha ha ha
<yorickpeterse> ha ha
<yorickpeterse> no
<adaedra> no?
<yorickpeterse> Have you seen Ruby's existing unicode system?
<adaedra> not in deep
<yorickpeterse> It's perfectly reasonable they don't want to touch that
ruurd has joined #ruby
<adaedra> ah.
gguggi has quit [Ping timeout: 264 seconds]
<yorickpeterse> but annoying nevertheless
bubbys has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
matcouto has joined #ruby
dubkoidragon has quit [Ping timeout: 256 seconds]
<gregf_> mikecmpbll: i'd just use a regex and then a csv module to parse the resulting data
<gregf_> something like this i guess:
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mikecmpbll> gregf_: i can't get it to work, the comma in the string plays havoc with CSV
ruurd has quit [Client Quit]
blackmesa has quit [Ping timeout: 256 seconds]
Oka has quit [Remote host closed the connection]
<gregf_> mikecmpbll: /\((?<str1>.*)\),\((?<str2>.*)\)$/ =~ %{(1,"abcde,fg",213,"abc(feg)"),(1,"abcde,fg",213,"abc(feg)")}; p [str1,str2]
<gregf_> mikecmpbll: that is a csv :/
sdothum has joined #ruby
Skelz0r has joined #ruby
<gregf_> it may be a dump but the data has commas as well
<mikecmpbll> gregf_: the comma in the middle of t he value
arturaz has joined #ruby
<gregf_> mikecmpbll: thats what csv modules are for :/
ruurd has joined #ruby
DaniG2k has joined #ruby
haraoka has quit [Ping timeout: 246 seconds]
acke has joined #ruby
matcouto has quit [Client Quit]
bubbys has quit [Ping timeout: 244 seconds]
pawz has left #ruby ["Palaver http://palaverapp.com/"]
<mikecmpbll> i don't really know what you mean, but either way i can't seem to get the result i want with the csv lib
f4cl3y has quit [Ping timeout: 256 seconds]
arturmartins has joined #ruby
livathinos has quit []
blackmesa has joined #ruby
eGGsha has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
facebook has quit [Ping timeout: 255 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Flipez has joined #ruby
zacstewart has joined #ruby
oo_ has joined #ruby
xkef has joined #ruby
Axy has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
chinmay_dd has quit [Quit: See ya!]
desigx has joined #ruby
Mia has quit [Ping timeout: 248 seconds]
sp1rs has quit [Ping timeout: 252 seconds]
lkba_ has joined #ruby
t_ has joined #ruby
sp1rs has joined #ruby
Oka has joined #ruby
OrbitalKitten has joined #ruby
<gregf_> mikecmpbll: what i meant was, first use a regex to split that string. thereafter use a csv module to split the rows into columns
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lkba has quit [Ping timeout: 244 seconds]
<gregf_> let me write something :/
ruurd has quit [Quit: ZZZzzz…]
<mikecmpbll> crap hold on
<mikecmpbll> i think i was doing something wrong.
quazimodo has joined #ruby
quazimod1 has joined #ruby
<gregf_> >> /\((?<str1>.*)\),\((?<str2>.*)\)$/ =~ %{(1,"abcde,fg",213,"abc(feg)"),(1,"abcde,fg",213,"abc(feg)")}; str="";[str1, str2].each { |s| dat = s.chars.inject([]){ |arr,c| if ( c == "," && ( str =~ /\d$/ || str =~ /\D"$/ ) ); arr << str; str=""; else; str +=c; end; arr } ; dat << str; str = ""; p dat }
<ruboto> gregf_ # => ["1", "\"abcde,fg\"", "213", "\"abc(feg)\""] ...check link for more (https://eval.in/399950)
<gregf_> mikecmpbll: ^^ if that helps. its awful tho :/
<mikecmpbll> yeah, sweet
<gregf_> change that += to << :/
farn has quit [Remote host closed the connection]
asui has quit [Ping timeout: 240 seconds]
AviShastry has joined #ruby
<mikecmpbll> thanks gregf_ , appreciate it
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gregf_> no worries
fabrice31 has joined #ruby
rubie has joined #ruby
zacstewart has quit [Ping timeout: 244 seconds]
desigx has quit [Ping timeout: 240 seconds]
sp1rs has quit [Ping timeout: 264 seconds]
Igorshp has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
blackmes1 has joined #ruby
doertedev has joined #ruby
ruurd has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
AviShastry has quit [Quit: AviShastry]
ruurd has quit [Client Quit]
<Mon_Ouie> It's probably easier to use some parser library or write your own than to try and get regular expressions to handle balanced parentheses
livathinos has joined #ruby
blackmes1 has quit [Ping timeout: 246 seconds]
<yxhuvud> *giggle*
frem has quit [Quit: Connection closed for inactivity]
desigx has joined #ruby
bodzio has left #ruby [#ruby]
ruurd has joined #ruby
lala has quit [Quit: Connection closed for inactivity]
senayar has quit [Remote host closed the connection]
OrbitalKitten has joined #ruby
senayar has joined #ruby
pecopeco has quit [Remote host closed the connection]
iloverubynoob has quit [Remote host closed the connection]
awk has joined #ruby
LMity has joined #ruby
desigx has quit [Ping timeout: 255 seconds]
<awk> hi, i'm a ruby noob.. if I have $dir="/home/user" and then I have files = Dir.glob($dir) and puts files it outputs /home/user ... how do I modify either Dir.glob($dir or puts to output /home/user/* without having to put /home/user/* in $dir ="/home/user/*" ?
OrbitalKitten has quit [Client Quit]
blackmes1 has joined #ruby
sp1rs has joined #ruby
<adaedra> If your goal is to list files in the given directory, glob is not the most appropriate
Papierkorb has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra> ?ri Dir.entries
<ruboto> Dir.entries, I don't know anything about ri
<adaedra> oops
<adaedra> &ri Dir.entries
thelastinuit has joined #ruby
<awk> tx
quazimodo has quit [Ping timeout: 256 seconds]
intinig has joined #ruby
quazimod1 has quit [Ping timeout: 250 seconds]
<adaedra> also, don't use globals.
Blaguvest has joined #ruby
schaerli has joined #ruby
intinig has quit [Read error: Connection reset by peer]
edwinvdgraaf has quit [Remote host closed the connection]
Scroff has joined #ruby
codecop has joined #ruby
mnemon2 is now known as mnemon
LMity has quit [Read error: Connection reset by peer]
ruurd has quit [Quit: ZZZzzz…]
LMity has joined #ruby
stonith has quit [Ping timeout: 264 seconds]
intinig has joined #ruby
Scrofff has quit [Ping timeout: 244 seconds]
stonith has joined #ruby
stonith has quit [Changing host]
stonith has joined #ruby
mandarinkin has joined #ruby
ruurd has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Miron has quit [Ping timeout: 252 seconds]
Miron has joined #ruby
devbug has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
arup_r has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
OrbitalKitten has joined #ruby
ndrei has joined #ruby
edwinvdgraaf has joined #ruby
tubuliferous_ has joined #ruby
failshell has joined #ruby
devbug has quit [Ping timeout: 265 seconds]
schaerli has quit [Remote host closed the connection]
nateberkopec has joined #ruby
nateberkope has quit [Read error: Connection reset by peer]
tkuchiki has quit [Remote host closed the connection]
bashusr has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
mhib has joined #ruby
tubuliferous_ has quit [Ping timeout: 244 seconds]
arturmartins has quit [Quit: Leaving...]
galeido has joined #ruby
failshell has quit [Ping timeout: 256 seconds]
LMity has quit [Quit: Nettalk6 - www.ntalk.de]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 244 seconds]
zz_Outlastsheep is now known as Outlastsheep
desigx has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
facebook has joined #ruby
Iskarlar has joined #ruby
lessless has joined #ruby
<shevy> adaedra but ruby uses so many globals!
krz has quit [Quit: WeeChat 1.0.1]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Outlastsheep is now known as zz_Outlastsheep
<adaedra> $shevy.mute!
Oka has quit [Read error: Connection reset by peer]
<shevy> :(
iloverubynoob has joined #ruby
pecopeco has joined #ruby
<adaedra> :)
Oka has joined #ruby
quazimodo has joined #ruby
quazimod1 has joined #ruby
Igorshp has quit [Remote host closed the connection]
Oka has quit [Read error: Connection reset by peer]
tmtwd has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Oka has joined #ruby
Iskarlar has joined #ruby
nfk has joined #ruby
schaerli has joined #ruby
farn has joined #ruby
jeramyRR has joined #ruby
bruno- has joined #ruby
eGGsha has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
arup_r has quit [Remote host closed the connection]
ryba has quit [Ping timeout: 265 seconds]
symm- has joined #ruby
casadei_ has joined #ruby
MrJiks has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
<awk> @all is there a way with Class: Net::SCP to only transfer files that have changed.. I don't want to use rsync
autrilla has joined #ruby
haxrbyte has quit [Ping timeout: 265 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
phutchins has joined #ruby
<[k-> shevy!
peeja has joined #ruby
ldnunes has joined #ruby
casadei_ has quit [Ping timeout: 248 seconds]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k-> oh gosh horrible code
<shevy> wat
<shevy> I didn't write anything!
<[k-> <gregf_> >> /\((?<str1>.*)\),\((?<str2>.*)\)$/ =~ %{(1,"abcde,fg",213,"abc(feg)"),(1,"abcde,fg",213,"abc(feg)")}; str="";[str1, str2].each { |s| dat = s.chars.inject([]){ |arr,c| if ( c == "," && ( str =~ /\d$/ || str =~ /\D"$/ ) ); arr << str; str=""; else; str +=c; end; arr } ; dat << str; str = ""; p dat }
thiagovsk has joined #ruby
<shevy> ack
<shevy> the Ox0dea style of coding expands
<adaedra> to count the number of `true` in an array composed of `true` and `false`, is there better than `count(&:itself)`?
Zai00 has quit [Quit: Zai00]
Iskarlar has joined #ruby
schaerli has quit [Remote host closed the connection]
<[k-> nope
ruurd has quit [Quit: ZZZzzz…]
Xzanron has joined #ruby
_solomon has joined #ruby
Oka has quit [Remote host closed the connection]
nfk has quit [Remote host closed the connection]
allcentury has joined #ruby
edwinvdgraaf has joined #ruby
schaerli has joined #ruby
<apeiros> adaedra: don't think it's better, but as an alternative: (ary-[false]).size
nfk has joined #ruby
facebook has quit [Ping timeout: 246 seconds]
<adaedra> that creates a second array though
OrbitalKitten has joined #ruby
<apeiros> so?
blackmes1 has quit [Ping timeout: 244 seconds]
<shevy> it's slow!
yuuvee has joined #ruby
<adaedra> well, it's better without creating a new array
<apeiros> shevy: it's actually faster
<apeiros> adaedra: why? :)
ndrei has quit [Ping timeout: 252 seconds]
lala_ has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> adaedra your code is slower!
<adaedra> that's allocating a lot of ressources (the array + all inside elements) just to do a count and throw it away (and the array I check into already have a short lifespan), especially when this array can have a lot of elements inside
<adaedra> I just noticed I can do with a step less >_<
OrbitalKitten has quit [Client Quit]
ruurd has joined #ruby
<apeiros> it's ~20bytes + 8bytes * elements
<apeiros> so 10k elements is 80KB memory
allomov has quit []
<adaedra> And allocating 0B is no better?
davejlong has joined #ruby
Zai00 has joined #ruby
<apeiros> it is. but that's not the only part of the equation.
<apeiros> count(&:itself) does N method calls in ruby space, which is expensive
<adaedra> ah ok
<apeiros> (ary-[false]).size does 2 method calls in ruby space
zacstewart has joined #ruby
endash has joined #ruby
<[k-> what is this ary-[false]
<adaedra> ary minus all false elements
<adaedra> so you get an array of just true elements
prestorium has joined #ruby
<adaedra> &ri Array#-
<apeiros> if you don't care about the original array: ary.delete(false); ary.size :)
<apeiros> no new array is created
<[k-> you write worser code than me
mandarinkin has quit [Remote host closed the connection]
<adaedra> mmh, still haven't removed this extra -
<apeiros> funny. .dup + .delete is actually the fastest
OrbitalKitten has joined #ruby
<apeiros> at least in this microbench :D
jpfuentes2 has joined #ruby
schaerli has quit [Remote host closed the connection]
Timba-as has joined #ruby
<[k-> :o
<[k-> is .dup lazy
<apeiros> dup is copy on write. but since you write, the lazy doesn't help here.
Ropeney has joined #ruby
danzilio has joined #ruby
symbol has joined #ruby
<[k-> you write the true values only!
johnny12000 has joined #ruby
<adaedra> I've a stupid error, but I'll see it after lunch
edwinvdgraaf has quit [Remote host closed the connection]
<[k-> >> 10.times { true.object_id }
<ruboto> [k- # => 10 (https://eval.in/400006)
<[k-> :(
<adaedra> apeiros: guess I'm not used to optimization in interpreted languages
jeramyRR has quit [Quit: Peace out!]
<[k-> >> 10.times.to_a.map { true.object_id }
<ruboto> [k- # => [2, 2, 2, 2, 2, 2, 2, 2, 2, 2] (https://eval.in/400009)
<[k-> no wonder hash is quick!
yuuvee is now known as yuuvee|away
yuuvee|away is now known as yuuvee
<[k-> and eql?
<adaedra> Array.new with a block may be what you look for, [k-
<adaedra> >> Array.new(10) { true.object_id }
<ruboto> adaedra # => [2, 2, 2, 2, 2, 2, 2, 2, 2, 2] (https://eval.in/400010)
<[k-> yes! the!
<[k-> thanks*
* apeiros used Array.new(1000) { rand < 0.5 } # to generate test data :)
mandarinkin has joined #ruby
jpfuentes2 has quit [Ping timeout: 256 seconds]
DaniG2k has quit [Quit: leaving]
<awk> anyone can advise on a way with ruby using scp to only upload/download changed files ?
tmtwd has quit [Ping timeout: 244 seconds]
<[k-> the most idiomatic way is still count(&:itself) tho
timonv has joined #ruby
arup_r has joined #ruby
symbol has quit [Ping timeout: 248 seconds]
blackmes1 has joined #ruby
cek has joined #ruby
<shevy> awk I think you have to do that manually, e. g. keep track of which files have a different modification date
ruurd has quit [Quit: ZZZzzz…]
_solomon has quit [Quit: _solomon]
<[k-> ^ that's what I did
mandarinkin has quit [Remote host closed the connection]
tkuchiki has joined #ruby
skyrocker has joined #ruby
blackmes1 has quit [Ping timeout: 246 seconds]
arturmartins has joined #ruby
skyrocker has left #ruby [#ruby]
ruurd has joined #ruby
i-blis has joined #ruby
<awk> shevy: m' kay tx
schaerli has joined #ruby
presto has joined #ruby
prestorium has quit [Ping timeout: 240 seconds]
scripore has joined #ruby
Pathfinder_ has joined #ruby
Pathfinder has quit [Ping timeout: 256 seconds]
haxrbyte has joined #ruby
Igorshp has joined #ruby
sp1rs has quit [Ping timeout: 256 seconds]
chinmay_dd has joined #ruby
haxrbyte_ has joined #ruby
yuuvee is now known as yuuvee|away
sgambino has joined #ruby
aspiers has joined #ruby
<shevy> is there some "popularity chart" for rubygems? something like, not only top downloads, but also like ... how important a gem is for the whole ruby infrastructure
edwinvdgraaf has joined #ruby
<mikecmpbll> shevy: they're in the process of adding reverse dependencies to the gem page
<mikecmpbll> iirc
<shevy> that's neat
<mikecmpbll> they already added a function to the api but i think they're working out how to display it
<mikecmpbll> lemme find the gh issue
xkef has quit [Ping timeout: 244 seconds]
<shevy> I think bricker showed me some new trick lately... how to grab the latest n programs updated, in json
yuuvee|away is now known as yuuvee
haxrbyte has quit [Ping timeout: 264 seconds]
symbol has joined #ruby
livcd_ has joined #ruby
Iskarlar has joined #ruby
<livcd_> Hi guys is there some style guide you can recommed / or you just like ?
<shevy> livcd_ the rubocop one adheres to one
<shevy> you can test rubocop output on your projects
<shevy> I think rubocop conforms to this guide: https://github.com/bbatsov/ruby-style-guide
<shevy> there is an older one from chris2 which is here: https://github.com/chneukirchen/styleguide/blob/master/RUBY-STYLE
<shevy> and I am sure apeiros uses another one, where he explains the use of "then" :)))
pietr0 has joined #ruby
<[k-> does then have to be explained?
schaerli_ has joined #ruby
<[k-> it's just a one line thing!
<shevy> well I think you can use then in at least two cases or?
<shevy> in if-structurs, and case/when/then right?
<shevy> *structures
<apeiros> correct
<[k-> from what I know
segfalt has joined #ruby
arturmartins has quit [Read error: Connection reset by peer]
<[k-> I have never seen an unless then and I never want to
<shevy> haha
<shevy> yeah you are right... for some reason, it's more popular in "if condition then"
<livcd_> thanks :-)
<[k-> no one likes unless!
schaerli has quit [Ping timeout: 246 seconds]
joonty has quit [Quit: joonty]
facebook has joined #ruby
<shevy> do you use unless in your code [k-?
andikr has quit [Remote host closed the connection]
<[k-> !object -> Bool; !Bool -> int; !Int -> string
<[k-> no I do not
<[k-> too much mental overhead
<shevy> haha
* yorickpeterse quite enjoys unless
<[k-> !!!object = yay
<ljarvis> unless is fine
<shevy> I like if, because it's a simple toggle... "if condition" ... "if !condition"
desigx has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
Zamyatin has joined #ruby
matcouto has joined #ruby
<[k-> ^
Zamyatin has quit [Max SendQ exceeded]
<[k-> who has the mental capacities to unless anyway
<shevy> I do use unless too though
<shevy> but mostly "afterwards", as in
<shevy> I first write: "if !"
tkuchiki has quit [Remote host closed the connection]
<[k-> we have this discussion every other day!
<shevy> we have style discussions every day!
Zamyatin has joined #ruby
AlexRussia has quit [Ping timeout: 246 seconds]
<[k-> true
arturaz has quit [Remote host closed the connection]
schaerli_ has quit [Ping timeout: 246 seconds]
sofija has quit [Ping timeout: 265 seconds]
<shevy> just look at your oneliners :-)
<[k-> touche even
<[k-> wat
keen__________22 has joined #ruby
Zamyatin has quit [Max SendQ exceeded]
<shevy> haha
Zamyatin has joined #ruby
<shevy> code golfing masteries
konsolebox has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
Zamyatin has quit [Max SendQ exceeded]
Zamyatin has joined #ruby
keen__________21 has quit [Ping timeout: 248 seconds]
ndrei has joined #ruby
oo_ has quit [Remote host closed the connection]
xkef has joined #ruby
stantonnet has joined #ruby
jaycee has quit [Quit: Textual IRC Client: www.textualapp.com]
Kully3xf has joined #ruby
dabradley has quit [Quit: WeeChat 0.4.2]
<livcd_> what's the reason for preferring single line format for class definition with no body ?
<mikecmpbll> it takes up one line
<livcd_> :D
<mikecmpbll> did you expect any other answer?
<mikecmpbll> heh
sepp2k has joined #ruby
<ljarvis> :)
segfalt has quit [Quit: segfalt]
Scrofff has joined #ruby
dabradley has joined #ruby
<livcd_> yeah something mysterious
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
<shevy> lol
<shevy> that was one of the best question-answers I could read
<Silex> livcd_: it makes it a little bit clearer the class is really dumb
<[k-> when there have class bodies
<mikecmpbll> Silex: sshh
<[k-> no class bodies*
<shevy> livcd_ here may be one though: define some empty skeleton, then fill it up lateron
<[k-> they**
<[k-> :/
Scroff has quit [Ping timeout: 240 seconds]
<[k-> usually u see them in error classes
dabradley has quit [Client Quit]
<[k-> class MyError < StandardError; end is how they do it
tkuchiki has joined #ruby
dabradley has joined #ruby
<mikecmpbll> i prefer SerialisationError = Class.new(StandardError)
<mikecmpbll> tbh
<mikecmpbll> fiiiightttt
<shevy> yes if jhass would be here there would be a fight now
<livcd_> mikecmpbll: the's okay according to the guide
<mikecmpbll> \o/
<livcd_> why ? is he german ?
ryba has joined #ruby
<[k-> I hardly see the other in the wild
<[k-> but I don't read a lot
<[k-> (disclosure: I don't read at all)
nfk has quit [Remote host closed the connection]
<[k-> still have that roda thing on my list
<mikecmpbll> i think dostoyevsky uses it in notes from underground
<mikecmpbll> oh code
<mikecmpbll> also, what are the chances that that would be a highlight.
Outlastsheep is now known as zz_Outlastsheep
<[k-> 100%
<mikecmpbll> :)
<konsolebox> Class.new for me would also be preferable sometimes. it depends on the part of code that declares it.
johnny12000 has quit [Quit: ERC Version 5.2 (IRC client for Emacs)]
dhjondoh has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> Ox0dea also supports the Class.new notation
<[k-> welp, I'm jumping in the bandwagon then
<mikecmpbll> first time anyone's ever agreed with me. i feel special
<shevy> :)
chinmay_dd has quit [Read error: Connection reset by peer]
symbol is now known as lobmys
bmurt has joined #ruby
<DefV> From a code-reading perspective I think class MyError < StandardError; end is a lot more clear in its intent
<mikecmpbll> DefV: why u go spoil it
senayar has quit [Remote host closed the connection]
* ljarvis much prefers class X < Y; end
<DefV> for MyError = Class.new(StandardError) you (I) have to do a mental check-in "Oh, this does that"
Igorshp has quit [Remote host closed the connection]
<mikecmpbll> i should've quit while i was ahead.
<[k-> >> class MyError < StandardError end
<ruboto> [k- # => /tmp/execpad-dd33577d961d/source-dd33577d961d:2: syntax error, unexpected keyword_end, expecting ';' ...check link for more (https://eval.in/400064)
<[k-> :( I thought u didn't need a ;
senayar has joined #ruby
fabrice31 has quit [Read error: Connection reset by peer]
hinbody has joined #ruby
fabrice31 has joined #ruby
<[k-> I was trying to be clever but failed hard
<ljarvis> for me it's because it's easier to grep for a definition
quimrstorres has quit [Remote host closed the connection]
bruno- has joined #ruby
<DefV> ljarvis: why would you grep for things
<mikecmpbll> >> if true; puts "foo" end
<ruboto> mikecmpbll # => foo ...check link for more (https://eval.in/400067)
<ljarvis> because Ruby's tooling sucks?
<DefV> SO IT SEEMS
kaleido has joined #ruby
<mikecmpbll> >> class Foo; puts "foo" end
<[k-> avdi has a blog post about it
<ruboto> mikecmpbll # => foo ...check link for more (https://eval.in/400070)
<shevy> [k- that is why I usually always use a ; when I am unsure
mandarinkin has joined #ruby
<izzol> hmm, there is a simply way to decompress file.bz2 with the names of compressed files?
<Mon_Ouie> I use pry which can try and guess the location of a class
<DefV> Mon_Ouie: That was what I was going to say
<izzol> I'm trying to catch the stdout or stderr by Open3 without the good results. Flag -v doens't work as well.
<[k-> shevy: but that makes it easier to beautify code!
<[k-> I don't want that now, do i
<shevy> beautify
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-> I remember showing you my minified code
<shevy> well ideally would be to avoid ';' :)
<DefV> Mon_Ouie: but StandardError.descendants is quite the list
<shevy> but I can understand that ruboto wants one-liners
keeguon has joined #ruby
schaerli has joined #ruby
<kaleido> ruboto is kind of a punk
<Mon_Ouie> >> ObjectSpace.each_object(StandardError.singleton_class).count
<ruboto> Mon_Ouie # => 185 (https://eval.in/400075)
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
joonty has joined #ruby
hj2007 has joined #ruby
chipotles has quit [Read error: Connection reset by peer]
astrobun_ has quit [Remote host closed the connection]
<[k-> experts use objectspace all the time to dig into the internals of Ruby
<shevy> objectspace scares me
aspiers has quit [Ping timeout: 252 seconds]
davedev24 has joined #ruby
allcentury has quit [Ping timeout: 246 seconds]
<yorickpeterse> "experts"
<yorickpeterse> You mean "people who sadly can't use anything better because Ruby doesn't specify anything better"
<ljarvis> back2 ljarvis> because Ruby's tooling sucks?
<ljarvis> >> ObjectSpace.count_objects
<ruboto> ljarvis # => {:TOTAL=>28604, :FREE=>650, :T_OBJECT=>45, :T_CLASS=>580, :T_MODULE=>22, :T_FLOAT=>7, :T_STRING=>977 ...check link for more (https://eval.in/400076)
nfk has joined #ruby
<[k-> I don't use pry!
<[k-> Hi ho
Dwarf has quit [Ping timeout: 246 seconds]
<[k-> it looks like gc.count
[k-_ has joined #ruby
casadei_ has joined #ruby
serivich has joined #ruby
tubuliferous_ has joined #ruby
<shevy> well that is scary
Kully3xf has quit [Remote host closed the connection]
workmad3 has joined #ruby
Dwarf has joined #ruby
PierreRambaud has quit [Read error: Connection reset by peer]
<[k-_> i like baweaver's Ox0dea series
eGGsha has joined #ruby
cochise has joined #ruby
neanderslob has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
<shevy> what did he do? more one-liners "we store the world in this line"?
pabloh has joined #ruby
Scroff has joined #ruby
<[k-_> he actually breaks down Ox0dea's code trying to make sense of it!
<[k-_> how Ox0dea does assignment: ->a,b{}[a,b]
<shevy> aha
dimasg has joined #ruby
<shevy> where is the assignment?
bungoman has joined #ruby
<shevy> well perhaps I should not ask ...
tubuliferous_ has quit [Ping timeout: 260 seconds]
Scrofff has quit [Ping timeout: 240 seconds]
senayar has quit [Remote host closed the connection]
bungoman has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
senayar has joined #ruby
<[k-_> well, object a enters the scope of the lambda as a
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 248 seconds]
dhjondoh has quit [Quit: dhjondoh]
stantonnet has quit [Remote host closed the connection]
<[k-_> ->a,b{}[1,3]
<[k-_> so a is 1 and b is 3!
<kaleido> lambda lambda lambda? revenge of the nerds?
<ccooke> Hmm. Anyone know how to get the repeated combinations of a set of lists?
dhjondoh has joined #ruby
victortyau has joined #ruby
chussenot has joined #ruby
<mikecmpbll> ccooke: simple example?
dopieee has quit [Quit: This computer has gone to sleep]
stantonnet has joined #ruby
<ccooke> as in, where [1,2].repeated_combination(2) would yield [1,1], [1,2], [2,2]
schaerli has quit [Remote host closed the connection]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mikecmpbll> ah gotcha
<ccooke> that's already in Array
<ccooke> what I need to do is get the combinations of multiple arrays
ruurd has quit [Quit: ZZZzzz…]
<ccooke> so:
<[k-_> merge them?
davejlong has quit [Remote host closed the connection]
<ccooke> [ [1,2], [1,2], [3] ].method(2) => [1,1,3], [1,2,3], [1,2,3]
chinmay_dd has joined #ruby
<[k-_> merge them????
<ccooke> hmm
nug is now known as cFouts
<ljarvis> the (2) in that method call makes no sense
bungoman has joined #ruby
<ccooke> ljarvis: sorry, yes
scripore has joined #ruby
<ccooke> ignore it.
<ccooke> Brainfart from the existign example
<ccooke> you could also have is as:
quimrstorres has joined #ruby
<ccooke> [1,2].method([1,2],[3])
<ljarvis> i still don't get why [[1,2], [1,2]] would result in [1,1,3], [1,2,3]
<mikecmpbll> arys.first.product(*arys.drop(1).map(&:to_a)) ??
<ccooke> (similar to the way Array#product is called)
<ccooke> ljarvis: you missed the [3]
<mikecmpbll> >> arys = [[1,2],[3,4],[5,6]]; arys.first.product(*arys.drop(1).map(&:to_a))
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruboto> mikecmpbll # => [[1, 3, 5], [1, 3, 6], [1, 4, 5], [1, 4, 6], [2, 3, 5], [2, 3, 6], [2, 4, 5], [2, 4, 6]] (https://eval.in/400087)
<ccooke> mikecmpbll: that's teh product
schaerli has joined #ruby
<mikecmpbll> k, then i'm out
<ccooke> I need the repeated combinations
<ccooke> I mean, I can write the code for it myself - it's not actually complex
<mikecmpbll> i don't understand the notion of a repeated combination of an array
<mikecmpbll> unless it returns a combination of arrays
<ccooke> Okay, here's a concrete example
lobmys has quit [Ping timeout: 240 seconds]
<ccooke> This is for some probability distribition code
<ccooke> Imagine you are rolling 1d4 and 1d6 together
<[k-_> >> [[1,2],[3,4],[5,6]].reduce(:+).combination
<ruboto> [k-_ # => wrong number of arguments (0 for 1) (ArgumentError) ...check link for more (https://eval.in/400089)
<[k-_> >> [[1,2],[3,4],[5,6]].reduce(&:+).combination
<ruboto> [k-_ # => wrong number of arguments (0 for 1) (ArgumentError) ...check link for more (https://eval.in/400091)
<[k-_> :/
<mikecmpbll> combination
<ljarvis> ?irb
<ruboto> irb is "interactive ruby", it is part of ruby. You can run ruby code and see results immediately. it's useful for testing code. Also see ?pry, a gem which is a popular alternative to irb.
<[k-_> do we need some argument for it
<ccooke> [k-_: combination takes an argument for the number of picks
<mikecmpbll> yes
<[k-_> i was trying to show something!
<ccooke> in this case, the size of the input array
<[k-_> >> [[1,2],[3,4],[5,6]].reduce(&:+).combination 2
<ruboto> [k-_ # => #<Enumerator: [1, 2, 3, 4, 5, 6]:combination(2)> (https://eval.in/400092)
rubie has joined #ruby
<[k-_> i give up as well
<ccooke> heh
<ljarvis> ccooke: can you gist a proper example? I might be missing something but I'm totally lost
dfinninger has joined #ruby
<mikecmpbll> ^
<ccooke> ljarvis: I'll do so in a bit, sure
<mikecmpbll> not just you, ljarvis!
tmtwd has joined #ruby
linuxboy_ has quit [Remote host closed the connection]
axl_ has quit [Remote host closed the connection]
<ccooke> I've been searching to see if there's "proper" code for it for a bit, but it looks not
krz has joined #ruby
linuxboytoo has joined #ruby
<ccooke> To give the concrete example, anyway. Imagine you are rolling dice. You roll three dice - two of them four sided and one six sided
desigx has joined #ruby
symm- has quit [Ping timeout: 264 seconds]
malconis has joined #ruby
<adaedra> &roll 2d4
* `derpy rolls 2 dice… got 2, 4. Total: 6
<adaedra> sorry :>
malconis has quit [Remote host closed the connection]
<ccooke> now, the product of those are all the possible individual rolls that you could make
zacstewart has quit [Remote host closed the connection]
allcentury has joined #ruby
segfalt has joined #ruby
<[k-> a prediction?
malconis has joined #ruby
<ccooke> so: [1,2,3,4].product([1,2,3,4],[1,2,3,4,5,6]) will return a *lot* of possible results
workmad3 has quit [Ping timeout: 264 seconds]
davejlong has joined #ruby
<ccooke> as in, every individual possible roll you could make. But that's horribly inefficient if you just want to work out the probabilities of any individual result.
<[k-> [ a*b*c | a <- ary1, b <- ary2, c <- ary3 ]
JoshL has joined #ruby
<ccooke> for that, [1,2,3,4,5,6].repeated_combinations(3) will give you every distinct result *set*
rubie has quit [Ping timeout: 265 seconds]
<ccooke> Let's say that one of the value sets you get for that is [1,1,5], and you want to calculate the probability of that roll.
endash has quit [Quit: endash]
linuxboytoo has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Remote host closed the connection]
<[k-> but why would you want a set?
<[k-> you can't have probability with sets!
endash has joined #ruby
fabrice31 has joined #ruby
leat2 has joined #ruby
leat1 has quit [Remote host closed the connection]
<ccooke> [k-_: you can if you code for it :-)
prettiestPony11 has joined #ruby
zacstewart has joined #ruby
duggiefresh has joined #ruby
<ccooke> Anyway, I will write up the code I mean.
<ccooke> Thanks for the suggestions :-)
<ccooke> and for not being visibly bored with my explanation ;-)
AlexRussia has joined #ruby
<[k-_> visibly ( ͡° ͜ʖ ͡°)
<ccooke> The internet covers a multitude of sins :-)
<[k-_> isnt probability the number of times in the array over total length of the array
<ccooke> [k-_: it is for simple things, yes
bhaak has quit [Remote host closed the connection]
yuuvee is now known as yuuvee|away
yuuvee|away is now known as yuuvee
<ccooke> but I'm handling more complex ones, like exploding dice (which, if you haven't heard of the term, means "roll another die whenever a die rolls maximum" (yes, recursively))
bhaak has joined #ruby
quimrstorres has quit [Remote host closed the connection]
hfp_work has quit [Ping timeout: 264 seconds]
<ccooke> and some modifiers like "drop the lowest N", or "treat values of X or more as a success, values below as failure"
hfp has quit [Ping timeout: 256 seconds]
drewvanstone has joined #ruby
Iskarlar has joined #ruby
kaleido has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-_> more...math things...
<ccooke> yep :-)
hfp has joined #ruby
<phreakocious> hi, can someone explain why I get this error message when doing a Queue.pop(true) for non-blocking: in `pop': no implicit conversion of true into Integer (TypeError)
desigx has quit [Ping timeout: 264 seconds]
hfp__work has joined #ruby
devdazed has joined #ruby
dblessing has joined #ruby
<ddv> phreakocious: you are giving a a boolean but it wants an integer?
<phreakocious> the docs and many online examples show it is correct syntax
<konsolebox> phreakocious: what do you get with puts object.class?
hfp_work- has joined #ruby
<konsolebox> where object is the queue
<phreakocious> Queue
hfp- has joined #ruby
<konsolebox> phreakocious: bug maybe
<Mon_Ouie> ?code phreakocious
<ruboto> phreakocious, We can't help you without your code, please post it to https://gist.github.com
<[k-_> do you have proof that the docs show that it is correct?
dhjondoh has quit [Remote host closed the connection]
[H]unt3r has joined #ruby
leat2 has quit [Remote host closed the connection]
leat2 has joined #ruby
<[k-_> Ox0dea is so cunning, he uses num&1<1 to check if the number is even
<ddv> he is right
oo_ has joined #ruby
hfp has quit [Ping timeout: 250 seconds]
segfalt has quit [Quit: segfalt]
<shevy> he is a genius
ruurd has joined #ruby
<shevy> and he'll miss all that talk because he is sleeping
<ddv> ### Functions go down here because I like Perl lol what
<[k-_> unless hosts.empty?; hosts = File.readlines(b) }
hfp__work has quit [Ping timeout: 246 seconds]
<[k-_> L17
<Mon_Ouie> phreakocious: When you were asked to 'puts object.class' where did you put that line of code?
<Mon_Ouie> Because indeed, this ^
<[k-_> yay me!
<phreakocious> right above the declaration of counters
whippythellama has joined #ruby
bffff_ has joined #ruby
Hounddog has quit [Read error: Connection reset by peer]
<phreakocious> [k-_: what's wrong with that?
<[k-_> you change the type of hosts to array
<[k-_> and array doesnt have pop(bool)
_solomon has joined #ruby
<phreakocious> it doesn't show that when i puts hosts.class though
<shevy> ddv epic line
zrowe007 has joined #ruby
rubie has joined #ruby
<[k-_> you nest too much
<[k-_> that is a code smell
lobmys has joined #ruby
<phreakocious> thanks for the help all
hfp has joined #ruby
linuxboytoo has joined #ruby
hfp_work has joined #ruby
axl_ has joined #ruby
Pathfinder_ has quit [Ping timeout: 264 seconds]
<[k-_> usually when someone says that, the problem is solved
<[k-_> \o/
<phreakocious> not yet but it will be
tkuchiki has quit [Remote host closed the connection]
thang has quit [Ping timeout: 246 seconds]
TomyWork has quit [Ping timeout: 264 seconds]
thang has joined #ruby
hfp_work- has quit [Ping timeout: 244 seconds]
hfp- has quit [Ping timeout: 264 seconds]
lessless has joined #ruby
desigx has joined #ruby
schaerli has quit [Remote host closed the connection]
linuxboy_ has joined #ruby
sevenseacat has joined #ruby
prefixed has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
paulcsmith has joined #ruby
Kully3xf has joined #ruby
quimrstorres has joined #ruby
thang has quit [Ping timeout: 246 seconds]
<Kully3xf> I have a file that calls module Enumerable and it was working fine, and I split it out into it's own file and now it won't work. Copy paste - where should I be looking
linuxboytoo has quit [Ping timeout: 246 seconds]
<phreakocious> [k-_: you were totally right, thanks again
thang has joined #ruby
<[k-_> :>
<[k-_> ?code Kully3xf
<ruboto> Kully3xf, We can't help you without your code, please post it to https://gist.github.com
scripore has quit [Quit: This computer has gone to sleep]
<[k-_> ?gist_usage
<ruboto> To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
arup_r has quit [Remote host closed the connection]
<adaedra> ninja'd
rbennacer has joined #ruby
<[k-_> oh gosh nested defs!
<adaedra> And I think you lack a couple end
<[k-_> is that even legal
<Kully3xf> there's more code below
<Kully3xf> but irrelevant
<Kully3xf> I take it nested defs is not allowed then - I'll start there
kies has quit [Ping timeout: 264 seconds]
<shevy> it's often not needed; you can do conditionals define via define_method and instance_eval / class_eval too
aphprentice_ has joined #ruby
aphprentice has quit [Ping timeout: 244 seconds]
oo_ has quit [Remote host closed the connection]
failshell has joined #ruby
tkuchiki has joined #ruby
scripore has joined #ruby
kies has joined #ruby
linuxboy_ has quit [Read error: Connection reset by peer]
linuxboytoo has joined #ruby
schaerli has joined #ruby
ada2358 has quit [Ping timeout: 256 seconds]
jgpawletko has joined #ruby
revath has quit [Ping timeout: 256 seconds]
ada2358 has joined #ruby
shredding has joined #ruby
pecopeco has quit [Remote host closed the connection]
iloverubynoob has quit [Remote host closed the connection]
devbug has joined #ruby
NeverDie has joined #ruby
Freijo has quit [Remote host closed the connection]
xkef has quit [Ping timeout: 265 seconds]
<quazimodo> any way to get rspec to stop compaining about _spec.rb files not found (LoadError) when running through guard-rspec ?
msnyon has joined #ruby
tagrudev has quit [Remote host closed the connection]
<sevenseacat> dont look for _spec.rb files?
<sevenseacat> whats looking for them?
meph has joined #ruby
<quazimodo> Guardfile is matching them, but plenty don't exist
<sevenseacat> then your Guardfile should be fixed
<quazimodo> i guess the only option is to make everything in app/ also have something in spec/ eh?
intinig has quit [Remote host closed the connection]
codecop has quit [Quit: Išeinu]
<sevenseacat> recent versions of guard have really gone off the deep end in their dsl
<sevenseacat> IMO
<quazimodo> meh
Fraeon has joined #ruby
Fraeon has quit [Client Quit]
Fraeon has joined #ruby
thang has quit [Ping timeout: 252 seconds]
facebook has quit [Ping timeout: 252 seconds]
devdazed has quit [Quit: Bye]
ada2358 has quit [Ping timeout: 240 seconds]
devbug has quit [Ping timeout: 250 seconds]
prettiestPony11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
choppington has joined #ruby
aphprentice_ has quit [Ping timeout: 265 seconds]
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
thang has joined #ruby
ada2358 has joined #ruby
jpfuentes2 has joined #ruby
dopie has joined #ruby
workmad3 has joined #ruby
sankaber has joined #ruby
cpruitt has joined #ruby
unshadow has joined #ruby
dimasg has quit [Ping timeout: 244 seconds]
ndrei has quit [Ping timeout: 246 seconds]
Zamyatin has joined #ruby
danzilio has quit [Quit: My computer has fallen asleep!]
GhettoCode has joined #ruby
happyface has joined #ruby
devdazed has joined #ruby
unshadow has quit [Client Quit]
edwinvdgraaf has joined #ruby
pecopeco has joined #ruby
iloverubynoob has joined #ruby
godzillaenlacasa has joined #ruby
blackmes1 has joined #ruby
umgrosscol has joined #ruby
sofija has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
njs126 has joined #ruby
cpruitt has quit [Ping timeout: 252 seconds]
prestorium has joined #ruby
bodzio has joined #ruby
xkef has joined #ruby
presto has quit [Ping timeout: 264 seconds]
konsolebox has quit [Ping timeout: 244 seconds]
sshuff has joined #ruby
cpruitt has joined #ruby
episage has joined #ruby
JoshL has quit [Read error: Connection reset by peer]
JoshL has joined #ruby
<thoraxe> why would a "rake db:migrate" not do anything if there was already a db/migrate/xxxxxx file?
<jhass> ?rails thoraxe
<ruboto> thoraxe, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<thoraxe> usually that's because the db schema is newer than the migration or whatever?
<thoraxe> is that actually rails?
<ljarvis> yes
<ljarvis> are you using rails?
yardenbar has quit [Quit: Leaving]
<thoraxe> no, sinatra.
<ljarvis> with activerecord?
<thoraxe> i didn't think rake was specific to rails
<jhass> well, AR expertise is still much higher over there
<thoraxe> k
<ljarvis> it's nothing to do with rake
<thoraxe> makes sense
<ljarvis> but yeah AR stuff will be more helpful there
<ljarvis> including those rake tasks
bhaak has quit [Ping timeout: 260 seconds]
bubbys has joined #ruby
freerobby has joined #ruby
<yorickpeterse> Sequel > All
<yorickpeterse> ᕕ(ᐛ)ᕗ
bhaak has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<ljarvis> truth
<ljarvis> although I haven't used it in so long
Guest87318 has joined #ruby
<Guest87318> How should I log a variable? https://gist.github.com/anonymous/592f2f0d3555f42f1a8c I want both of those specs to pass, and yet old_array is updated along with array. How do I log the old array? The value that it was before the When block was executed? I've tried using let and let! but to no avail. I like the RSpec-Given syntax and I like one liner specs, I know I could do this in one it block but I want to see if an old variable can be logged usi
Xzanron has quit [Quit: Leaving]
linuxboytoo has quit [Remote host closed the connection]
<ljarvis> Given(:old_array){ array.dup }
<ljarvis> though better the other way around imo
<ljarvis> also this is an awful tests so I'm hoping there's a lot more to it
Igorshp has quit [Remote host closed the connection]
<Guest87318> ljarvis yeah it's just an example
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis> ok, so yeah they both point to the same object, you want to duplicate that
<Kully3xf> what's the better way to accomplish this if statement in one line without having to retype the input and also not using a variable
Igorshp has joined #ruby
kies^ has joined #ruby
<Guest87318> ljarvis I got you, thanks a lot
grill has joined #ruby
grill has quit [Changing host]
grill has joined #ruby
<ljarvis> Kully3xf: "not using a variable" lolwut
<jhass> Kully3xf: gets.chomp.downcase.tap {|sg| sg = "1235678" if sg.size; validate_sg(sg) }
arturaz has joined #ruby
<ljarvis> that uses a variable
<Kully3xf> that's ok
<jhass> no, a parameter! :P
<ljarvis> psh
<ljarvis> awful code is awful
nettoweb has joined #ruby
<Kully3xf> lol
<jhass> yeah, just make it two lines
<sevenseacat> dont do it in one line.
<ljarvis> ^
<Kully3xf> ok
<sevenseacat> readable code > short code
<jhass> or three actually
scripore has joined #ruby
<Kully3xf> sg = gets.to_s.downcase.chomp (sg.length < 1)? "12345678" : validate_sg(sg)
schaerli has quit [Remote host closed the connection]
dfinninger has quit [Remote host closed the connection]
<Kully3xf> (two lines)
schaerli has joined #ruby
<jhass> you don't do anything with "1235678" there, so it's rather pointless
<Kully3xf> yea I return it if the string is blank
<Kully3xf> so if user puts nothing into the terminal it'll default the security group name to 12345678
revath has joined #ruby
<sevenseacat> err
bhaak has quit [Ping timeout: 250 seconds]
<jhass> security_group.empty? then
<sevenseacat> not in that code you just posted
Igorshp has quit [Ping timeout: 256 seconds]
<jhass> note how I could use the proper variable name only after you said it
<jhass> so rename sg to security_group _everywhere_
prefixed has quit [Ping timeout: 264 seconds]
segfalt has joined #ruby
pico-pete has joined #ruby
Igorshp has joined #ruby
OrbitalKitten has joined #ruby
sarkyniin has joined #ruby
bhaak has joined #ruby
ljt has joined #ruby
<Kully3xf> and yes my code works - I just ran it and it returned 12345678 as sg name
<jhass> Kully3xf: sg name is not a valid term, purge it from your head now
<Kully3xf> output --security-group-ids 'sg-12345678'
<jhass> abbreviations are bad
<Kully3xf> how is it not
<Kully3xf> that's the API call name
Scroff has quit [Ping timeout: 246 seconds]
<jhass> after a month of not touching the code you'll have to constantly remember what it stand for
<ljarvis> is this aws?
<Kully3xf> ya
Azulinho has joined #ruby
<ljarvis> it's fine where you can't help it, but you can help naming variables and methods
<ljarvis> and you should definitely use a descriptive name
<Kully3xf> ok
linuxboytoo has joined #ruby
sshuff has quit [Ping timeout: 240 seconds]
<jhass> for all I care sg means stargate
prestorium has quit [Ping timeout: 256 seconds]
<sevenseacat> means singapore, to me.
<[k-_> ^
GhettoCode has quit [Ping timeout: 248 seconds]
prestorium has joined #ruby
<[k-_> still busy refactoring Ox0dea's code
<[k-_> ;-;
<yorickpeterse> amazon_web_services_auto_scaling_group_name = 'sg-12345678'
lxsameer has quit [Quit: Leaving]
<yorickpeterse> code should be self documenting
bodzio1 has joined #ruby
<shevy> [k-_ what do you mean with "refactoring" there
intinig has joined #ruby
quimrstorres has quit [Remote host closed the connection]
_solomon has quit [Quit: _solomon]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k-_> prettify
bodzio has quit [Ping timeout: 244 seconds]
<shevy> you make it uglier!
<[k-_> i mean legit
<[k-_> i forgot how a case statement works :/
<dudedudeman> you add 4 spaces on the indent!
<shevy> what indent =_O
<dudedudeman> hey oh!
<shevy> Ox0dea's code forbids ' '
<shevy> Look dudedudeman: ->a,b{}[1,3]
yeticry has quit [Ping timeout: 264 seconds]
<dudedudeman> i haven't said to Ox0dea in a hot minute! Hi Ox0dea!
<dudedudeman> << a,b{}[1,3]
senayar has quit [Remote host closed the connection]
<dudedudeman> bah
<shevy> lol
danzilio has joined #ruby
_solomon has joined #ruby
senayar has joined #ruby
<[k-_> i made it nice
<Ox0dea> Morning, all!
<shevy> damn
sarkyniin has quit [Remote host closed the connection]
yeticry has joined #ruby
<shevy> you use "if condition then"
<dudedudeman> Morning, Ox0dea!
<Ox0dea> dudedudeman: What's the rate of conversion between hot minutes and standard ones? :P
<shevy> dudedudeman you awoke the Ox0dea
<[k-_> Ox0dea!
<dudedudeman> Ox0dea: it follows the Canadien to American dollar
<Ox0dea> [k-_!
<shevy> what the ... is this ? = ?[?]
prestorium has quit [Quit: Konversation terminated!]
<[k-_> there is no such thing...
prestorium has joined #ruby
<shevy> that looks like the ancient greeks coding in ruby
<Ox0dea> [k-_: It's off in a few places. :(
blackmes1 has quit [Ping timeout: 246 seconds]
<gregf_> Kully3xf: you dont need a conditional there :/. you can just do if ( val = gets.downcase.chomp ); validate(val);end
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis> gregf_: um.. no
bungoman has quit [Remote host closed the connection]
mary5030 has joined #ruby
<[k-_> i sacrificed some for idiomaticness
<ljarvis> that won't ever return non-truthly
sarkyniin has joined #ruby
rideh has joined #ruby
<sevenseacat> gregf_: that is a conditional lol
danzilio has quit [Client Quit]
<gregf_> def validate_sg(inval); return !inval.nil? && !inval.match(/\A\s*\z/) ? 1: 0;end; c = 0;loop{ if ( sg = gets.to_s.downcase.chomp ); p validate_sg(sg);end; break if ((c+=1) >= 2); }
<[k-_> assuming you were talking about what i was talking
<[k-_> OMY PLS NO
danzilio has joined #ruby
<[k-_> DIE GREG!
mary5030 has quit [Remote host closed the connection]
<gregf_> heh
<shevy> lol
tvw has quit [Remote host closed the connection]
<ljarvis> gregf_: the condition is moot, it'll never fail
schaerli has quit [Remote host closed the connection]
<ljarvis> plus that code makes me want to tear my face off
<yorickpeterse> what the hell is that
mary5030 has joined #ruby
<[k-_> shevy: how do you like my code?
<[k-_> i wrote idiomatic code for once!
<Ox0dea> [k-_: Yeah, never mind. It's all in there, in one form or another.
speaking1ode has quit [Ping timeout: 248 seconds]
rideh has quit [Client Quit]
<Ox0dea> It feels like C, though.
rideh has joined #ruby
<shevy> [k-_ I dunno... knowing that it originated from unicode, I don't like your code as a result now!
<[k-_> ruby is imperative ¯\_(ツ)_/¯
<[k-_> but i took effort to refactor it into sensible human readable code!
<shevy> at least Ox0dea's code was visually aesthetic, you could assume that it were greek code from 4000 years ago
sshuff has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ytti> casual python hate
<[k-_> how dare you!
<shevy> yeah you could have done something else too like help me fix bugs!
<ytti> i often see python code written imperatively
senayar has quit [Remote host closed the connection]
<gregf_> wonder why someone would do 2&1<1 when 2%2 == 0 can be used :/
<gregf_> *wonders
<ytti> even many experienced pythonists don't really capitalize on OO
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
tubuliferous_ has joined #ruby
<dudedudeman> less things to type?
<ytti> but i very rarely see ruby code written like that
<shevy> they just get too annoyed about explicit self all the time
<ytti> and leaking variables all over the place
bungoman has joined #ruby
<shevy> :D
<Ox0dea> gregf_: Golfers would do that, for instance.
<shevy> obfuscaters!
<Ox0dea> Aesthetes.
<gregf_> cavedwellers
<[k-_> you discourage me to write readable code
<shevy> :D
<dudedudeman> code colf hurts my mind
<shevy> code calf?
<dudedudeman> cammit. gold*
<dudedudeman> ! dammint*** golf***
<Ox0dea> Gold calf?
<shevy> hehe
<shevy> I'd code for gold
<[k-_> i'll transform it more then
<ytti> also i've not heard of rubyist turning to pythonist, voluntarily
<[k-_> Ox0dea's code is imperative anyway
<Ox0dea> [k-_: For what it is, it's quite nice.
<ytti> but i've seen pythonists embracing ruby
eGGsha has joined #ruby
<ytti> but they may be biased, they were weeboos
<shevy> ytti I read some blogger lately who went that route... not sure who it was... some guy who no longer cared about programming languages, I think he complained about Julia
endash has quit [Quit: endash]
schaerli has joined #ruby
lobmys has quit [Quit: WeeChat 1.1]
symbol has joined #ruby
symbol is now known as lobmys
tubuliferous_ has quit [Ping timeout: 265 seconds]
fgo has quit [Ping timeout: 252 seconds]
intinig has quit [Remote host closed the connection]
ljt has quit [Read error: Connection reset by peer]
sgambino has joined #ruby
ndrei has joined #ruby
livathinos has quit []
mikepack has joined #ruby
kies^ has quit [Read error: Connection reset by peer]
arturaz has quit [Ping timeout: 244 seconds]
drewvanstone has quit [Ping timeout: 256 seconds]
revath has quit [Ping timeout: 240 seconds]
schaerli has quit [Remote host closed the connection]
hfp_work has quit [Ping timeout: 256 seconds]
hfp has quit [Ping timeout: 256 seconds]
werelivinginthef has joined #ruby
konsolebox has joined #ruby
dumdedum has joined #ruby
sharpmachine has joined #ruby
davejlong has quit [Remote host closed the connection]
hfp has joined #ruby
riotjones has quit [Remote host closed the connection]
hfp_work has joined #ruby
hello_ has joined #ruby
edwinvdgraaf has joined #ruby
tmtwd has quit [Ping timeout: 248 seconds]
dfinninger has joined #ruby
dimasg has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
Scroff has joined #ruby
dimasg has quit [Ping timeout: 244 seconds]
niemcu has quit [Ping timeout: 264 seconds]
fabrice31 has quit [Remote host closed the connection]
quimrstorres has joined #ruby
decoponio has joined #ruby
gamename has joined #ruby
<[k-_> does this look nicer now
<ljarvis> nothing about that looks nice
<[k-_> you dont look nice either! :c
<Ox0dea> [k-_: Are you trying to take it from completely non-alphanumeric to completely alphanumeric?
nobitanobi has joined #ruby
konsolebox has quit [Remote host closed the connection]
* Ox0dea is now wondering if it's possible to write Ruby without using symbols.
* Ox0dea doubts it.
platzhirsch has joined #ruby
yardenbar has joined #ruby
<[k-_> . is a symbol
<[k-_> you dont have a chance
hello_ has quit [Ping timeout: 246 seconds]
lobmys has quit [Quit: WeeChat 1.1]
symbol has joined #ruby
kies^ has joined #ruby
livathinos has joined #ruby
OrbitalKitten has joined #ruby
dEPy has joined #ruby
<Ox0dea> I got as far as `def send method proc do` before I needed the pipe. :/
quimrstorres has quit [Ping timeout: 240 seconds]
* [k-_ nods
<[k-_> <<-
<[k-_> some code here
dom__ has joined #ruby
<[k-_> oops forgot the tag
<[k-_> well whatever
<[k-_> then you can eval it!
icebourg has joined #ruby
<Ox0dea> Boo.
quimrstorres has joined #ruby
drewvanstone has joined #ruby
<[k-_> you are wondering about possiblilty, im giving you an option!
<[k-_> also, do you know how Object#hash works?
wordsarewind has joined #ruby
<Ox0dea> It's different for different objects.
revath has joined #ruby
<[k-_> and?
<ruurd> <[k-_> why ask if you can look at the code?
<[k-_> eww, c
<[k-_> do you think i can read c?
<[k-_> because i cannot
blue_deref has joined #ruby
<adaedra> booh.
<Ox0dea> [k-_: It uses SipHash 2-4, if that helps any.
charliesome has joined #ruby
eGGsha is now known as eGGshke
milesmatthias has joined #ruby
milesmatthias has quit [Client Quit]
jhack has joined #ruby
duoi has quit [Quit: duoi]
<[k-_> at least i know it does :/
<[k-_> +now
Siyfion has joined #ruby
<Ox0dea> For most objects, it seems #hash just uses SipHash on the actual bytes that represent the object in memory.
bungoman has quit [Remote host closed the connection]
gambl0re has joined #ruby
sharpmachine has quit [Remote host closed the connection]
rideh has quit [Quit: zap]
plsk has joined #ruby
saadq has joined #ruby
sharpmachine has joined #ruby
msnyon has quit [Ping timeout: 248 seconds]
MrJiks_ has joined #ruby
acke has quit [Remote host closed the connection]
Marsupermammal has joined #ruby
dfinninger has quit [Remote host closed the connection]
MrJiks has quit [Ping timeout: 250 seconds]
dfinninger has joined #ruby
psy has joined #ruby
psy has quit [Max SendQ exceeded]
platzhirsch has left #ruby [#ruby]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
psy has joined #ruby
dom__ has quit [Ping timeout: 256 seconds]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
rcvalle has joined #ruby
aganov has quit [Remote host closed the connection]
Scroff has quit [Ping timeout: 264 seconds]
OrbitalKitten has joined #ruby
rippa has joined #ruby
havenwood has joined #ruby
bruno- has joined #ruby
leonardoajim has joined #ruby
leonardoajim has quit [Remote host closed the connection]
dumdedum has quit [Quit: foo]
ruby-lang812 has joined #ruby
tmtwd has joined #ruby
grizzlybair has joined #ruby
Scrofff has joined #ruby
white_bear has quit [Quit: leaving]
ruby-lang812 has quit [Client Quit]
jhack has quit [Remote host closed the connection]
yardenbar has quit [Quit: Leaving]
livathinos has quit []
grizzlybair has quit [Quit: leaving]
riotjones has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
polysics_ has joined #ruby
yuuvee has quit [Quit: Leaving...]
bungoman has joined #ruby
devbug has joined #ruby
freerobby has quit [Read error: No route to host]
freerobby1 has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
Channel6 has joined #ruby
jobewan has joined #ruby
edwinvdgraaf has joined #ruby
pecopeco has quit [Remote host closed the connection]
iloverubynoob has quit [Remote host closed the connection]
edwinvdg_ has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
polysics has quit [Ping timeout: 250 seconds]
sheperson has joined #ruby
tkuchiki has quit [Remote host closed the connection]
blackmes1 has joined #ruby
edwinvdgraaf has quit [Ping timeout: 244 seconds]
<tmtwd> \join #atom
<sheperson> I think that is /join
<sheperson> :-)
<tmtwd> yup
<[k-_> how do you even...
<adaedra> but you need the join package for that
alakra has joined #ruby
<Ox0dea> /join #even
<adaedra> [k-_: i think / and \ are close on some keyboards.
rippa has quit [Read error: Connection reset by peer]
<phreakocious> another question, if I may.. is it possible to set the name of a thread that will appear in ps/top? $0 changes the main process and all threads show that.
devdazed has quit [Read error: Connection reset by peer]
bronson has joined #ruby
<phreakocious> google has not been helpful
rippa has joined #ruby
Freijo has joined #ruby
<Ox0dea> phreakocious: Does Process.setproctitle not suit your needs?
devdazed has joined #ruby
dfockler has joined #ruby
sickmate has quit [Ping timeout: 248 seconds]
edwinvdgraaf has joined #ruby
<adaedra> ninja'd again
<phreakocious> ah ruby 2.1 :( that might work, though
<Ox0dea> phreakocious: If you're actually wanting to name your threads, Thread#name= went into Ruby 2.3 on June 13.
<havenwood> phreakocious: Thread#name and Thread#name= will land in 2.3.
pecopeco has joined #ruby
iloverubynoob has joined #ruby
<adaedra> it's no problem, since everyone is under ruby 2.2, no? O:)
shredding has quit [Ping timeout: 244 seconds]
<phreakocious> ah very nice. Thanks again
dfockler has quit [Remote host closed the connection]
blackmes1 has quit [Ping timeout: 250 seconds]
<phreakocious> I would like to be on 2.2, but this is not an easy thing :)
jamesaxl has joined #ruby
charliesome has quit [Quit: zzz]
wordsarewind has left #ruby ["WeeChat 1.2"]
dfockler has joined #ruby
towski_ has joined #ruby
davedev2_ has quit []
elia has joined #ruby
davejlong has joined #ruby
Oka has joined #ruby
radialneon has joined #ruby
<[k-_> you guys are so updated!
davedev24 has joined #ruby
darkf has quit [Quit: Leaving]
<sheperson> Yes they are!
dfinninger has quit [Remote host closed the connection]
t0rrieri has joined #ruby
<sheperson> I think they contribute to Ruby
<[k-_> well they do submit feature requests and issues from time to time
jhack has joined #ruby
aspiers has joined #ruby
willywos has joined #ruby
Oka has quit [Ping timeout: 256 seconds]
LoBoGoL has joined #ruby
<shevy> long live ruby 2.3!
griffindy has joined #ruby
<[k-_> suggestions on readme: https://github.com/SkyBirdSoar/libobf
jaygen_ has joined #ruby
Pathfinder has joined #ruby
scottschecter has joined #ruby
<Ox0dea> [k-_: FWOOD?
<shevy> remove project
<[k-_> nah, im continuing it
<[k-_> FWOOD?
DoubleMalt has quit [Remote host closed the connection]
danzilio has quit [Ping timeout: 244 seconds]
<shevy> "If you are lazy, you can also just map(&:$-o[?:]) over m"
<[k-_> that's pretty much what i did
<[k-_> it is a verbosity adder afterall
prestorium has quit [Quit: Konversation terminated!]
ndrei has quit [Ping timeout: 248 seconds]
jaygen has quit [Ping timeout: 246 seconds]
radialneon has quit [Ping timeout: 265 seconds]
kham has quit [Ping timeout: 250 seconds]
tkuchiki has joined #ruby
ndrei has joined #ruby
Igorshp has quit [Remote host closed the connection]
Igorshp has joined #ruby
<Ox0dea> [k-_: Why's the tagline title-cased if it's not supposed to be an acronym?
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anisha has quit [Quit: Leaving]
momomomomo has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
momomomomo has quit [Client Quit]
<[k-_> because it looks better & adds professionalism?
timonv has quit [Ping timeout: 264 seconds]
dfinninger has joined #ruby
radialneon has joined #ruby
<[k-_> i need to somehow reduce verbosity
plashchynski has joined #ruby
<ljarvis> there is no professionalism here
senayar has quit [Remote host closed the connection]
<Ox0dea> [k-_: Ah, I suppose I ought to've gathered that from the ™.
<dfockler> Because It Looks Better & Adds Professionalism™
<[k-_> ^ +1
<Ox0dea> dfockler: BILBAP?
<dfockler> perfect
momomomomo has joined #ruby
Igorshp has quit [Read error: No route to host]
momomomomo has quit [Client Quit]
senayar has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
Igorshp has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
dimasg has joined #ruby
rideh has joined #ruby
paulcsmith has joined #ruby
yeticry has quit [Ping timeout: 240 seconds]
podman has joined #ruby
haxrbyte_ has quit [Ping timeout: 246 seconds]
elia has quit [Ping timeout: 244 seconds]
<[k-_> i was thinking Obfuscate { |o| alphanum methods available here }
senayar has quit [Remote host closed the connection]
charliesome has joined #ruby
senayar has joined #ruby
dEPy has quit [Quit: (null)]
<[k-_> and a .call so $-o.(?.,->{...})
momomomomo has joined #ruby
yeticry has joined #ruby
bruno- has quit [Ping timeout: 248 seconds]
momomomomo has quit [Client Quit]
joonty has quit [Quit: joonty]
duderonomy has quit [Ping timeout: 244 seconds]
jwaldrip has joined #ruby
dimasg has quit [Ping timeout: 240 seconds]
atomical has joined #ruby
k3asd` has joined #ruby
Marsupermammal has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-_> i should number them off
Scrofff has quit [Ping timeout: 250 seconds]
amclain has joined #ruby
<Ox0dea> Or construct an encoding.
charliesome has quit [Client Quit]
Marsupermammal has joined #ruby
<[k-_> that defeats the purpose!
Marsupermammal has quit [Client Quit]
<Ox0dea> Of obfuscation?
failshell has quit []
<Ox0dea> There are 33 non-control, non-alphanumeric ASCII characters. That's 1089 distinct pairs you could map to various things.
linuxboytoo has quit [Remote host closed the connection]
niemcu has joined #ruby
failshell has joined #ruby
failshell has quit [Remote host closed the connection]
<[k-_> but i wouldn't be able to use them in a block to reduce verbosity
<Ox0dea> Are you using _ for anything?
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-_> no
astrobun_ has joined #ruby
<Ox0dea> Make it a method on Kernel. :)
rapha has joined #ruby
<rapha> Hi!
rbennacer has quit [Remote host closed the connection]
<[k-_> ah
isxek has quit [Ping timeout: 246 seconds]
poguez_ has joined #ruby
<rapha> Given {a => {x => [1, 2, 3], y => [1, 2]}, b => {x => [1], y => [1, 2, 3, 4]}}, is there any elegant way of counting the number of things inside all x's and y's? (i.e., x:4, y:6 in this case)
Marsupermammal has joined #ruby
l0oky has joined #ruby
<l0oky> Hello.
bricker has joined #ruby
sharpmachine has quit [Remote host closed the connection]
jwaldrip has quit [Quit: Lingo: www.lingoirc.com]
pietr0 has quit [Quit: pietr0]
<l0oky> I have this hash process[:error] = [{:code=>"10415", :messages=>["Transaction refused because of an invalid argument. See additional error messages for details.", "A successful transaction has already been completed for this token."]}] How do I select the second message? I tried this process[:error][0][:messages][1]
saadq has quit [Remote host closed the connection]
<Ox0dea> l0oky: That should work.
teotwaki has quit [Ping timeout: 246 seconds]
Scroff has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
ryba has quit [Ping timeout: 244 seconds]
<l0oky> I get no implicit conversion of Symbol into Integer
<l0oky> ...
davejlong has quit [Remote host closed the connection]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gagrio has quit [Ping timeout: 244 seconds]
nobitano_ has joined #ruby
<Ox0dea> l0oky: Then you've provided insufficient information to diagnose your problem.
<Ox0dea> >> process = {}; process[:error] = [{:code=>"10415", :messages=>["msg1", "msg2"]}]; process[:error][0][:messages][1]
<ruboto> Ox0dea # => "msg2" (https://eval.in/400218)
lala_ has quit [Quit: Connection closed for inactivity]
graydot has joined #ruby
jwaldrip has joined #ruby
teotwaki has joined #ruby
<l0oky> process is a method that returns hash return {:success => false, :error => ex.message}
nobitanobi has quit [Ping timeout: 248 seconds]
graydot has quit [Client Quit]
Timba-as has quit [Quit: Be back later ...]
psy has quit [Disconnected by services]
<Ox0dea> The point stands.
benlieb has joined #ruby
wildroman2 has joined #ruby
psy_ has joined #ruby
acke has joined #ruby
<l0oky> What should I give you ? I really don't know what's causing this problem.
benlieb has quit [Client Quit]
sheperson has quit [Quit: sheperson]
astrobun_ has quit [Remote host closed the connection]
<Ox0dea> l0oky: Does process[:error] contain the data you originally posted, or does it contain an exception message?
towski_ has quit [Remote host closed the connection]
astrobun_ has joined #ruby
<l0oky> ex.message is that data I originally posted
astrobun_ has quit [Read error: Connection reset by peer]
<l0oky> Array of hashes
senayar has quit []
blackmes1 has joined #ruby
eGGshke is now known as eGGsha
bwilson has quit [Quit: +++CARRIER LOST+++]
<Ox0dea> >> Exception.new([1, 2, 3]).message
<ruboto> Ox0dea # => "[1, 2, 3]" (https://eval.in/400219)
<Ox0dea> l0oky: Do you see the problem?
<l0oky> is exception message a hash at all?
<Ox0dea> It is not.
<Ox0dea> It's being converted to a string.
astrobun_ has joined #ruby
<l0oky> what can I do is there a to_hash method?
<Ox0dea> Well, an exception's message really ought to be a string anyway.
<Ox0dea> If you simply *must* put an array of hashes in your exception message, you're going to need to use eval to pull it back out.
wookiehangover has quit [Ping timeout: 248 seconds]
<l0oky> that looks bad practice
<Ox0dea> It's terrible.
<l0oky> ill do a to_json then
<l0oky> or something :D
<Ox0dea> You'll lose your Symbols that way.
pecopeco has quit [Remote host closed the connection]
iloverubynoob has quit [Remote host closed the connection]
<Ox0dea> rapha: Hash#merge takes an optional block that can be used for handling merge conflicts.
<jhass> l0oky: stop. you're trying to solve this at the wrong point. What is giving that datastructure as exception message? (=who's raising it)
<l0oky> my process method
zacstewart has quit [Remote host closed the connection]
Siyfion has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> and why don't you put the message you want there?
<jhass> why do you pass the datastructure?
<havenwood> rapha: Not elegant, but here's a start: inject { |h1, h2| h1.merge(h2) { |_, h1_values, h2_values| h1_values.size + h2_values.size } }
<havenwood> >> [{:x=>[1, 2, 3], :y=>[1, 2]}, {:x=>[1], :y=>[1, 2, 3, 4]}].inject { |h1, h2| h1.merge(h2) { |_, h1_values, h2_values| h1_values.size + h2_values.size } }
<ruboto> havenwood # => {:x=>4, :y=>6} (https://eval.in/400220)
<l0oky> I am using RoR so I want to pass the ex.message to a toast that means redirecting user with ex.message as a parameter
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
<l0oky> Anyway I need to pass that datastucture throug..
pietr0 has joined #ruby
jwaldrip_ has joined #ruby
<havenwood> rapha: That version ^ does work if there are more than two Hashes in the Array though. :)
Ilyas has joined #ruby
jwaldrip has quit [Ping timeout: 248 seconds]
<havenwood> So that's nice if it might happen.
sshuff has quit [Quit: Leaving]
<havenwood> ?rails l0oky
<ruboto> l0oky, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<l0oky> havenwood: I am not talking about rubyonrails just plain ruby? not am I?
Casty has joined #ruby
<l0oky> now*
RobertBirnie has joined #ruby
<havenwood> l0oky: What's a toast?
dseitz has joined #ruby
shinnya has joined #ruby
<l0oky> seriously?
wookiehangover has joined #ruby
gagrio has joined #ruby
bungoman has quit [Remote host closed the connection]
<l0oky> It's like a popup If you ever seen a mac you should know what that is
tubuliferous_ has joined #ruby
<havenwood> l0oky: Oh, gui terminology?
<l0oky> yeah
<Ox0dea> Just UI, really.
<havenwood> l0oky: I assumed Rails had toast... :P
<Ox0dea> You could totally have toasts in your terminal.
pecopeco has joined #ruby
iloverubynoob has joined #ruby
<havenwood> ActiveToast
<l0oky> nah, its my js messaging for user anyways we aren't talking about ror
astrobun_ has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
keeguon has quit [Quit: keeguon]
sharpmachine has joined #ruby
revath has quit [Ping timeout: 256 seconds]
<havenwood> l0oky: Maybe I'm wrong to point to #RubyOnRails here then. Often there's a Rails way though.
diegoviola has joined #ruby
pietr0 has quit [Quit: pietr0]
<shevy> most epic question today
<l0oky> I always go to #RubyOnRails first though.. :)
<shevy> <havenwood> l0oky: What's a toast?
<havenwood> shevy: Hey, I'm just having coffee... I'm slow at the moment.
NeverDie has joined #ruby
<rapha> havenwood: you mean as opposed to a solution with Hash#merge like 0x0dea suggested?
<Ox0dea> rapha: He's using Hash#merge.
<l0oky> shevy: RoR thing for my app If you want to know more we can talk about it at #RubyOnRails
<havenwood> rapha: I showed what Ox0dea suggested, yeah.
tubuliferous_ has quit [Ping timeout: 264 seconds]
<havenwood> rapha: Give that a try! :)
<rapha> havenwood: nevermind, you do use merge :-P
baweaver has quit [Remote host closed the connection]
<rapha> Ox0dea: sorry, didn't read properly at first!
Agoldfish has joined #ruby
<Ox0dea> No worries.
<Ox0dea> rapha: Are a and b distinct objects, or are they actually keys in a surrounding hash?
Rickmasta has quit [Ping timeout: 265 seconds]
<l0oky> I am using a library that passes ex.message as a hash, but... It's a string to makes me troubles...
<Ox0dea> l0oky: Which library is that, if you don't mind?
<rapha> Ox0dea: the latter! Also for some reason havenwood's solution doesn't work right out of the box with my real-world object for some reason, trying to adapt it...
<l0oky> paypal-reccurring gem
<Ox0dea> rapha: havenwood's solution is for an array of hashes.
TvL2386 has joined #ruby
<rapha> Ox0dea: yes, mine is a bit different ... this is what the object looks like right now. https://gist.github.com/sixtyfive/dab7daf5cfcd34c3d641
Spami has joined #ruby
einarj has quit [Remote host closed the connection]
nahtnam has joined #ruby
ton31337 has left #ruby [#ruby]
[Butch] has joined #ruby
<l0oky> so my only way through is using eval?!
<l0oky> That looks terrible...
<havenwood> rapha: just add a: .values
<havenwood> rapha: to the start
<Ox0dea> l0oky: No, you're just not using the library correctly.
<havenwood> >> {"v"=>{"I"=>["قال", "كان", "راح", "يعني", "ترى", "بغى", "جاي", "شاء", "شاف", "عرف", "ودى", "يهدي", "سال", "وجد", "يصل", "تقوم", "حلب", "صار", "فهم", "قرا", "مشى", "نجرب", "نحمد", "يجب", "يستر", "ابغيت", "اسكت", "اسمع", "اضع", "اضغط", "اعجب", "اقصد", "امزح", "بتزعل", "بخيل", "
<ruboto> havenwood # => /tmp/execpad-1311776060b3/source-1311776060b3:5: syntax error, unexpected tGVAR, expecting ']' ...check link for more (https://eval.in/400225)
<havenwood> تروى", "تزهق", "تعني", "تقوموا", "جزى", "حصلنا", "درى", "رمت", "زارت", "ظلمت", "عاد", "نؤمن", "نجلس", "نرى", "نسبح", "نعي", "نلقي", "ودع", "يحدث", "يزال", "يسلم", "يسير", "يصبح", "يفرح"], "II"=>["حد", "سمى", "فكر", "جننتي", "سوى", "صدق", "قررت", "مر", "يخلي", "اغير", "اوجه
<havenwood> ", "بخيب", "تحدث", "تحسسي", "تقدر", "تمت", "تهم", "خليتي", "دور", "سلم", "شوشت", "ود"], "III"=>["ساعد", "تخابر", "داع", "ساعدت", "يعاني"], "IV"=>["احسنتوا", "بيصيب", "يريح", "يريد"], "V"=>["تفضلوا", "اتحدث", "اتكلم", "تتعلق", "تخلص", "تخوف", "يتغير", "يتوفى"], "VI"=>["تعالى
<l0oky> How do you know?
bb010g has joined #ruby
<havenwood> ", "نتسامح", "نتكاتف"], "VII"=>[], "VIII"=>["التقى", "اعتقد", "تهتمي", "اشتغل", "نشتري", "ينتهي"], "IX"=>[], "X"=>["استريحوا", "استعمال", "تستمر", "تستمع"]}, "pp"=>{"I"=>[], "II"=>["محصنين", "معوق", "معينة"], "III"=>["مبارك"], "IV"=>[], "V"=>[], "VI"=>[], "VII"=>[], "VIII"=>["مجتمع"], "IX"=>[], "X"=>[]}, "ap"=>{"I"=>["
<havenwood> صاحي", "ناقص", "جايين", "صاير", "ناوي"], "II"=>["مقدر"], "III"=>[], "IV"=>["مزعج", "مقلق"], "V"=>[], "VI"=>[], "VII"=>[], "VIII"=>[], "IX"=>[], "X"=>[]}}.values.inject { |h1, h2| h1.merge(h2) { |_, h1_values, h2_values| h1_values.size + h2_values.size } }
<havenwood> Sorry...
<havenwood> Didn't realize how long that was, yikes.
<dfockler> O_O
<l0oky> havenwood: gist.github.com
<havenwood> Apologies.
<havenwood> l0oky: values.inject { |h1, h2| h1.merge(h2) { |_, h1_values, h2_values| h1_values.size + h2_values.size } }
<shevy> lol
<shevy> you need more coffee!
<gregf_> rapha: O_o
<gregf_> oops sorry ;/
allomov has joined #ruby
<havenwood> shevy: Yeah, muting myself until two more cups consumed!
mikecmpbll has quit [Ping timeout: 246 seconds]
<Ox0dea> l0oky: paypal-recurring returns that data structure from Response::Base#errors, but it's not setting it as the message of an exception anywhere.
cochise has quit [Read error: Connection reset by peer]
desigx has quit [Ping timeout: 246 seconds]
tvw has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
cochise has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<l0oky> Ox0dea: What kid of exception does PaypalPayment.new(self).make_recurring return?
Igorshp has quit [Remote host closed the connection]
pengin has joined #ruby
Igorshp has joined #ruby
<rapha> havenwood: wow, can't believe you actually pasted that hahahahhah :-P
<l0oky> because the ex.message It's returning is a string not a hash ( As you've pointed out )
polysics_ has quit [Remote host closed the connection]
<Ox0dea> l0oky: `grep -R PaypalPayment paypal-recurring-1.1.0` finds no such occurrences.
sharpmachine has quit [Remote host closed the connection]
<rapha> shevy: or he needs *less* coffee ;)
BeepDog has left #ruby [#ruby]
<l0oky> havenwood: Is that arabic? :D
stan has quit [Ping timeout: 246 seconds]
blackmes1 has quit [Ping timeout: 244 seconds]
Igorshp has quit [Read error: No route to host]
Igorshp has joined #ruby
<l0oky> Ox0dea: whats grep?
<rapha> l0oky: yeah, it's Arabic ... I'm doing some word frequency analysis.
<shevy> grep finds strings in files
<shevy> so he searches for a keyword there
happyface has quit [Quit: Connection closed for inactivity]
davejlong has joined #ruby
eggoez has quit [Ping timeout: 252 seconds]
<rapha> havenwood: it returns wrong counts though ... strange.
<l0oky> Ox0dea: Uh Oh that's my object sorry
blackmes1 has joined #ruby
peter_paule has joined #ruby
<l0oky> PayPal::Recurring.new(self).make_recurring
spider-mario has joined #ruby
sharpmachine has joined #ruby
<l0oky> That's more like it. I guess
<rapha> havenwood: is it possible that I need one "h" for each of the roman numbers?
fgo has joined #ruby
<l0oky> rapha: letter frequency analysis? cool!
davejlong has quit [Remote host closed the connection]
bodzio1 has quit [Quit: Leaving.]
<havenwood> rapha: My stab at it was for the values from your initial example. Now that you've shown the real input, add a file to that gist with the return value you want to get.
<l0oky> It's a bit different with arabic letters though, I guess. is it? You can say one thing in many ways.
cpruitt has left #ruby [#ruby]
howdoicomputer has joined #ruby
<rapha> l0oky: words! not letters!
davejlong has joined #ruby
<havenwood> l0oky: maybe some Persian words as well?
<rapha> l0oky: well, you can do that in any language. it's just that arabic is especially bad. i'm lucky because my corpus is quite small (1400 words) so i can do a lot of things manually.
Igorshp has quit [Remote host closed the connection]
zacstewart has joined #ruby
bodzio has joined #ruby
<havenwood> shevy: here I am talking after only one cup... but i'm being careful ;)
<rapha> l0oky: actually, the bad thing is that a lot of words can mean many different things depending on context. that's what really kills you.
<l0oky> rapha: It's a nightmare for developers I know that. But the language It self is beautiful
webopsx has joined #ruby
freerobby1 has quit [Quit: Leaving.]
momomomomo has joined #ruby
<hanmac> shevy i did even more stuff for rwx, check it out ;P
<Ox0dea> l0oky: Paypal::Recurring.new expects an options hash.
sharpmachine has quit [Ping timeout: 246 seconds]
jwaldrip_ has quit [Ping timeout: 255 seconds]
<rapha> havenwood: yes, i see now ... the initial example input was wrong. let me play with your code some more, though, maybe i can figure out how it works.
<l0oky> Ox0dea: Yes I pass options and do a .send(action)
<l0oky> PayPal::Recurring.new(options).send(action).errors
fgo has quit [Ping timeout: 256 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
<Ox0dea> l0oky: Yes, that's how you get that data structure from earlier.
malconis has joined #ruby
<Ox0dea> How does it end up in an exception message?
<rapha> l0oky: actually, just handling arabic is actually quite okay these days if you know what you're doing. what is making people's heads spin is how to do natural language processing on it. the language is too polysemantic for that to be easy by even the most awful definition of easy.
edwinvdgraaf has joined #ruby
<l0oky> I do a raise response.errors.inspect HAHAHAHAHHAHA
malconis has quit [Remote host closed the connection]
<rapha> l0oky: and btw i'm using Ruby for my scripting because it's so awesome at handling Unicode ;)
<l0oky> there lays a problem
<Ox0dea> Aye, there it is.
jackjackdripper has joined #ruby
eggoez has joined #ruby
<l0oky> Ox0dea: thanks ;)
<Ox0dea> Sure thing.
malconis has joined #ruby
webopsx has quit [Client Quit]
<Ox0dea> rapha: Except we still don't have named Unicode literals.
rehat_ has joined #ruby
lala has joined #ruby
lkba has joined #ruby
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
benlieb has joined #ruby
jwaldrip_ has joined #ruby
<rapha> Ox0dea: seems like a pet peeve of yours ... when I google that term, your github repo gets the top hit! :)
<Ox0dea> Fancy that.
lkba_ has quit [Ping timeout: 252 seconds]
pecopeco has quit []
iloverubynoob has quit [Quit: Leaving...]
<l0oky> rapha: That's right haha. But that's why the language is so rich. If they make NLP for that language I guess they might just make a real AI with it haha
<rapha> Ox0dea: (i do wonder, how many of these named literals do you know by heart :P)
plashchynski has quit [Quit: plashchynski]
niemcu has quit [Ping timeout: 244 seconds]
<Ox0dea> rapha: There's a reasonably intuitive pattern to most of the groups.
desigx has joined #ruby
ryba has joined #ruby
<rapha> l0oky: i wouldn't be at all surprised if serious development would come from that direction some day. arabic is very interesting also because some aspects of its grammar are almost mathematical. that means you can actually parse it relatively easily into a state where you can clearly assign a list of possible meanings to every part of speech.
graydot has joined #ruby
Muhannad has joined #ruby
Scroff has quit [Ping timeout: 240 seconds]
<l0oky> rapha: Yeah you mean the assignment of numerical values for each letter, I researched that a bit :)
Violentr has quit [Ping timeout: 256 seconds]
chussenot has quit [Quit: chussenot]
Rickmasta has joined #ruby
icarus has quit [Read error: Connection reset by peer]
<l0oky> rapha: I was planning to study arabic language next year, that's why I show so much interest in it hehe :)
Jackneill has joined #ruby
momomomomo has quit [Ping timeout: 248 seconds]
momomomomo has joined #ruby
fabrice31 has joined #ruby
<Ox0dea> l0oky: Greek calls that "isopsephy", and Hebrew "Gematria"; what's it called in Arabic?
towski_ has joined #ruby
<Ox0dea> Or is it not quite the same thing?
workmad3 has quit [Ping timeout: 244 seconds]
rbennacer has joined #ruby
eggoez has quit [Ping timeout: 248 seconds]
bubbys has quit [Ping timeout: 264 seconds]
chinmay_dd has quit [Quit: See ya!]
charliesome has joined #ruby
<rapha> Ox0dea: does your project work for stuff like http://unicodelookup.com/#%D9%89/1? just uppercase the name and off you go?
<l0oky> Ox0dea: Something like that. Abajad numberals
djbkd has joined #ruby
sharpmachine has joined #ruby
ixti has joined #ruby
fabrice31 has quit [Ping timeout: 260 seconds]
benlieb has quit [Quit: benlieb]
t0rrieri has quit [Quit: Be back later ...]
ndrei has joined #ruby
<Ox0dea> rapha: Yes, that's right, although I had to make a few concessions regarding hyphens.
<rapha> l0oky: nah, that's an old thing which we also had in most western languages. what i meant was that almost all arabic words are constructed by laying a pattern over three or four root radicals.
<Ox0dea> kitab, katib, maktaba.
<rapha> yeah, that
<Ox0dea> "Root" is probably better than "radical" for that, I think.
<rapha> wow, you guys know a lot more than the "so they teach you how to build bombs at university, mwahahahah" folks i usually meet :P
<l0oky> lol
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aytch has joined #ruby
godzillaenlacasa has quit [Quit: ZZZZZ....]
<rapha> Ox0dea: it's fixed terminology. the root is k-t-b with radical 1 being k, r2 t, r3 b.
blackmes1 has quit [Ping timeout: 246 seconds]
phreakocious has quit [Ping timeout: 264 seconds]
<rapha> l0oky: if you wanna begin studying it at a university level, you're in for a wild ride!
retornam has quit [Ping timeout: 246 seconds]
<l0oky> so If I were to pronouce your nickname it would be rpa?
tubuliferous_ has joined #ruby
<l0oky> uh I know right
michael_mbp has quit [Ping timeout: 246 seconds]
RobertBirnie has quit [Ping timeout: 264 seconds]
<l0oky> It is at a university level
drewdavis has quit [Quit: No Ping reply in 180 seconds.]
Antiarc has quit [Quit: No Ping reply in 180 seconds.]
doertedev has quit [Quit: Lost terminal]
<l0oky> They don't require for you to know anything though
bmn has quit [Ping timeout: 246 seconds]
<l0oky> from 0 to hero :D
devdazed has quit [Max SendQ exceeded]
rubie has quit [Remote host closed the connection]
aryaching has joined #ruby
PaulCapestany has quit [Max SendQ exceeded]
miah has quit [Ping timeout: 264 seconds]
<rapha> l0oky: as the ph in my nickname is actually a single phoneme ("f") it would be r-ph (there are few 2-radical words, which are said to be the oldest words in arabic)
<l0oky> rph
<[k-_> so i have method = { method1: *blah*, method2: method[:method1] } and ruby cries
<l0oky> yeah
<[k-_> how shall i do this
<l0oky> i figured
Hamled|Erp has quit [Ping timeout: 246 seconds]
devdazed has joined #ruby
papercode has quit [Ping timeout: 264 seconds]
Antiarc has joined #ruby
miah has joined #ruby
<Ox0dea> [k-_: Well, what's *blah*?
Obfuscate has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
PaulCapestany has joined #ruby
phreakocious has joined #ruby
sivoais has quit [Ping timeout: 252 seconds]
Hamled has joined #ruby
retornam_ has joined #ruby
<Ox0dea> Oh, never mind. You'll have to build the hash incrementally. :(
<l0oky> object?
sivoais has joined #ruby
drewdavis has joined #ruby
<rapha> l0oky: here, they give you 2 weeks per lesson and expect you to know everything afterwards. the bachelor is 3 years but it took me 5, and i'm one of the 30 out of 300 who didn't drop out... not sure how big the variation is from university to university.
papercode has joined #ruby
bmn_ has joined #ruby
<[k-_> ->_,*__,&___{____=__.shift;___=__.pop if (!block_given? and __.last.to_proc rescue false);_.public_send ____, *__, &___}
rubie has joined #ruby
davejlong has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
<l0oky> Well I am not a native speaker I guess they'll go easier on me :P
retornam_ is now known as retornam
plashchynski has joined #ruby
<rapha> l0oky: also note that short vowels are never radicals, only long vowels are. so the problem with a western nickname like "rapha" is that you can't know what vowels are long. the full name ("raphael") would have been easier: it's r-ph-l there.
gambl0re has quit [Read error: Connection reset by peer]
<[k-_> oh, incrementally.
<[k-_> thx Ox0dea :(
eggoez has joined #ruby
<rapha> l0oky: i'm not a native speaker, either. it doesn't matter much, though. the native speakers have a hard time, too, because noone in the world is a native speaker of Modern Standard Arabic, they all speak one dialect or another.
<Ox0dea> [k-_: That does seem like it shouldn't be so. :(
kies^ has quit [Ping timeout: 264 seconds]
<l0oky> yeah dialects
<l0oky> good point :D
jenksy has quit [Ping timeout: 246 seconds]
akkad has quit [Ping timeout: 246 seconds]
gambl0re has joined #ruby
aryaching has quit []
<Ox0dea> >> proc { |hash| {a: -> x { x + 1}, b: hash[:a] } }[Hash.new] # [k-_
<ruboto> Ox0dea # => {:a=>#<Proc:0x41b0fe64@/tmp/execpad-d17fb20d5e37/source-d17fb20d5e37:2 (lambda)>, :b=>nil} (https://eval.in/400235)
michael_imac has joined #ruby
jenksy has joined #ruby
<Ox0dea> Hash literals are constructed "in parallel".
<rapha> l0oky: if you want one tip, decide on *one* dialect to specialise in as soon as you can and then stick to it and make sure you always know when you're in your dialect and when you're in MSA. the professors might tell you to stay away from dialects completely, but that's pure academic phantasy and has nothing to do with real life.
<Ox0dea> rapha: PSO player?
wildroman2 has quit [Ping timeout: 264 seconds]
<rapha> Ox0dea: since I don't know what that is, no.
<Ox0dea> Ah, I thought "phantasy" might've been a slip.
rideh has quit [Quit: zap]
allcentury has quit [Ping timeout: 265 seconds]
ndrei has quit [Ping timeout: 264 seconds]
<l0oky> rapha: Yeah, is there a big difference in dialects? Maybe some words are almost the same
benlieb has joined #ruby
akkad has joined #ruby
linuxboytoo has joined #ruby
<rapha> Ox0dea: oh right! it's fantasy in English. it was a slip, but a different one ;)
<l0oky> phantastic :D
allcentury has joined #ruby
aryaching has joined #ruby
aspiers has quit [Ping timeout: 244 seconds]
rideh has joined #ruby
xkef has quit [Ping timeout: 244 seconds]
charliesome has quit [Quit: zzz]
<hanmac> l0oky: like in a country like germany you have many different dialects and sometimes they are such strong that two different cant understand each other ;P
whiteline has quit [Ping timeout: 248 seconds]
drewo has quit [Ping timeout: 255 seconds]
<rapha> l0oky: "no problem" is a good example. MSA: "lā tūǧad muškile". Egyptian: "mā fīš muškila". Most Levantene dialects: "miš muškile". Most Gulf dialects: "mā muškila".
postmodern has quit [Quit: Leaving]
<rapha> l0oky: of course, that
bubbys has joined #ruby
<rapha> 's nothing compared with the 100+ words for "lion"
momomomomo has quit [Quit: momomomomo]
<l0oky> asd?
mike___1234 has quit [Ping timeout: 246 seconds]
<rapha> asad
<rapha> asd would again be the root
<rapha> but that's just the most commonly used one
<l0oky> assad
benlieb has quit [Client Quit]
<l0oky> hahah
rideh has quit [Client Quit]
<rapha> l0oky: did you know that the name of the guy's wife is really close to "chaos"?
<l0oky> what?!
postmodern has joined #ruby
<l0oky> hahah
drewo has joined #ruby
<rapha> l0oky: "asma al-asad" ... chaos is "azma", just a softer s/z sound.
godzillaenlacasa has joined #ruby
<l0oky> It might implicate a contrast where asma is completly different from azma ?
* hanmac is voting for a president with the name "chaos" ... what chould go wrong? ;P
<l0oky> So It's just the sound
<l0oky> haha
<rapha> l0oky: nah, it becomes more distinct once we write proper MSA transliteration. her name is "ʾasmāʾ", lit. "names", whereas "ʾazma" is a feminine noun built off the root ʾ-z-m. there's actually really little similarity here.
benlieb has joined #ruby
<rapha> (just enough for it to have become some sort of running gag amongst arabists)
axl_ has quit [Ping timeout: 245 seconds]
<jhass> rapha: l0oky: I think you might enjoy our offtopic channel #ruby-offtopic
<l0oky> rapha: So what dialect is closest to root words? I guess beginners would start learning root words first then more complex dialects
LoBoGoL has quit [Ping timeout: 264 seconds]
<l0oky> jhass: Yeah sorry
<l0oky> a bit carried away :D
blackmes1 has joined #ruby
devbug has quit [Ping timeout: 256 seconds]
<rapha> jhass: sorry
<l0oky> rapha: nice to meet you anyways :P
<jhass> don't be sorry, just join there!
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bungoman has joined #ruby
<l0oky> jhass: We got the message? You don't need to be all steve jobs on me :P
<jhass> you did, rapha I'm not so sure :P
rdark has quit [Ping timeout: 240 seconds]
davejlong has joined #ruby
Marsupermammal has joined #ruby
<rapha> l0oky: every native speaker will tell you his own dialect is closest. the truth is they all have some elements close to it and some farther away. i'd recommend to make your decision based on the political situation to make it easier to visit. anyways, i'll shut up now so jhass doesn't get the /kick hammer out and also i need to keep working!
<[k-_> i give up
<l0oky> Yeah me too :P
astrobun_ has joined #ruby
<[k-_> i watched sublime text rewind my whole progress
devbug has joined #ruby
<Ox0dea> Vim would've saved you.
<[k-_> im surprised it kept my whole history
<Ox0dea> Oh.
<l0oky> Ox0dea: Vim has a learning curve
<[k-_> no, i purposely pressed cmd+z until it went back to the start of time
_dev0urer has joined #ruby
<l0oky> I was afraid I would fall so I didn't use Vim :D
<Ox0dea> [k-_: Looking for when you introduced some error, or?
astrobun_ has quit [Read error: Connection reset by peer]
<weaksauce> l0oky the basics of vim are pretty easy to learn in a few minutes.
drewo has quit [Quit: WeeChat 0.4.2]
<weaksauce> enough to get you competent enough to edit a basic file
Zai00 has quit [Quit: Zai00]
<[k-_> i gave up on the approach and let sublime text destroy it!
quimrstorres has quit [Remote host closed the connection]
<[k-_> i watched what i did on fast mode
bodzio has quit [Quit: Leaving.]
ryba has quit [Ping timeout: 252 seconds]
<l0oky> weaksauce: yeah.. you're probablly right but I don't want to run it on glitchy cygwin :P
<l0oky> If I ever get a mac I'll use it
bungoman has quit [Ping timeout: 260 seconds]
skade has joined #ruby
mikecmpbll has joined #ruby
<weaksauce> i imagine they have a vim dist that runs on windows. not nearly as good a gui as macvim though.
atomi has quit [Quit: adding ca certificates to my container brb]
blaines has joined #ruby
mike___1234 has joined #ruby
bungoman has joined #ruby
<weaksauce> sublime is pretty good too though. emacs with evil mode might be a good option
whiteline has joined #ruby
<[k-_> --terminated from history--
Obfuscate has joined #ruby
<[k-_> i even created a new branch ._.
troulouliou_div2 has joined #ruby
<[k-_> if only there was an easy way of doing things
atomi has joined #ruby
<[k-_> i totally lost motivation :(
<jhass> [k-_: do something nice instead then :P
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
MagePsycho has joined #ruby
<l0oky> [k-_: I feel you :(
<[k-_> i lost motivation for ruby
<l0oky> ruby?!
<l0oky> I recommend RubyMine then :P
<shevy> [k-_ you must create useful projects!
Violentr has joined #ruby
<l0oky> jetbrains IDE I use to be productive
jottr_ has joined #ruby
<[k-_> i dont need an ide for ruby
i-blis has quit [Quit: Leaving.]
<l0oky> Yeah It's clear you haven't tried this one :P
<grill> what does someword::init_gem node mean?
dfinninger has quit [Read error: Connection reset by peer]
<grill> what is this syntax?
<[k-_> ?code
<ruboto> We can't help you without your code, please post it to https://gist.github.com
<jhass> grill: a sad one. :: can used to call a method, but someword.init_gem would be better
<l0oky> [k-_: Give ruby a day off then come back :D
jpfuentes2 has joined #ruby
<[k-_> a day may not be enough
LoBoGoL has joined #ruby
<grill> so :: is functionally equivalent to .?
<[k-_> i'll just look at Ox0dea's code and learn
<jhass> grill: no, :: also resolves namespaces
<l0oky> [k-_: nah just one day
<jhass> which . doesn't
<grill> so . is a subset of ::?
<l0oky> [k-_: Don't give up on ruby like I gave up on C++ lol
bayed has quit [Quit: Connection closed for inactivity]
<[k-_> im going to haskell >.>
graydot has quit [Quit: graydot]
<jhass> grill: kind of, but as said using :: for method calls is highly discouraged in the community
<grill> jhass why
<jhass> because of the ambiguity
<l0oky> I still have that gut feeling that I have to learn C++....
<shevy> . is one character shorter than ::
<l0oky> waii!?
<jhass> always using . for method calls leaves :: to clearly mean accessing a namespace
<grill> why? because it could be resolving a namespace, or it could be calling a method?
<jhass> yes
davejlong has quit [Remote host closed the connection]
Gonzih has joined #ruby
<grill> ok
Violentr has quit [Ping timeout: 246 seconds]
<grill> do you have any good documentation on ruby namespaceS?
desigx has quit [Ping timeout: 248 seconds]
ndrei has joined #ruby
<jhass> there's not much to it, you can use modules and classes as namespaces
ndrei_ has joined #ruby
<jhass> module Foo; class Bar; end; end; -> Foo::Bar
<grill> I don't understand the concept of namespace in this context
bubbys has quit [Ping timeout: 244 seconds]
graydot has joined #ruby
<jhass> class Foo; module Bar; BAZ = 1; end; end; Foo::Bar::BAZ
kies^ has joined #ruby
jwaldrip_ has quit [Ping timeout: 264 seconds]
<[k-_> havenwood is like a library
<shevy> yeah
astrobun_ has joined #ruby
Gonzih has quit [Client Quit]
astrobun_ has quit [Read error: Connection reset by peer]
<shevy> grill what you write below that, is part of its namespace. module Foo; def bar <--- there is a method called bar residing as part of Foo
MasterPiece has joined #ruby
<grill> ok. so modules are synonymous with namespaces?
<l0oky> I get `exception class/object expected`...
<shevy> grill and classes
<grill> so classes are namespaces?
<shevy> you could also use class Foo; class Bar
<rapha> havenwood: okay, I think I found the shortest possible solution: counts={};stems.each {|k1,v1| counts[k1]={}; v1.each {|k2,v2| counts[k1][k2]=v2.count}}; counts.values.inject(Hash.new(0)) {|total,h| h.each {|k,v| total[k] += v}; total}
<l0oky> If I do raise response.errors if response.errors.present? where response = PayPal::Recurring.new(options).send(action)
lkba_ has joined #ruby
<grill> ok
<rapha> havenwood: (stems contains the hash which i gist'd earlier)
<shevy> there really isn't much more to them. Foo::Bar::name_here_of_anything - that's it really
astrobun_ has joined #ruby
pietr0 has joined #ruby
<havenwood> rapha: Nice, a solution! But that's not the shortest possible solution. :)
<grill> so, what is this then: Scn::init_gem node
<grill> Scn looks like a namespace
<shevy> looks like a fancy and ugly way to invoke the init_gem() method
<shevy> it is a constant
troulouliou_div2 has quit [Remote host closed the connection]
sarkyniin has quit [Ping timeout: 244 seconds]
<grill> perhaps init_gem() is overriden? can you do that in ruby?
<havenwood> grill: Call methods like: Scn.init_gem
<shevy> you can override everything at runtime
<shevy> but here you just invoke it right?
<havenwood> grill: ::s to separate namespaces and .s to call methods.
<shevy> Scn::init_gem node -> Scn.init_gem node -> Scn.init_gem(node)
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<l0oky> Ox0dea: remember that exception from paypal_recurring gem? if I `raise response.errors` where `response = PayPal::Recurring.new(options).send(action)` I get exception class/object expected
atomical_ has joined #ruby
TheNet has joined #ruby
<Ox0dea> >> raise Hash.new
<ruboto> Ox0dea # => exception class/object expected (TypeError) ...check link for more (https://eval.in/400239)
pietr0_ has joined #ruby
<Ox0dea> l0oky: Why're you raising a Hash?
jackjackdripper has quit [Quit: Leaving.]
<l0oky> is that what exception is made of?
dfinninger has joined #ruby
bungoman_ has joined #ruby
bruno- has joined #ruby
<l0oky> hmm
<Ox0dea> Well, response.errors is an array of Hashes, but the point stands.
<rapha> havenwood: here's the whole gist again ... what i like about this solution is the interim result (see https://gist.github.com/sixtyfive/dab7daf5cfcd34c3d641 again) ... i don't think it can be made shorter than this without sacrificing that interim result.
atomical has quit [Ping timeout: 248 seconds]
lkba has quit [Ping timeout: 264 seconds]
<l0oky> How can I make an exception that passes a hash?
<Ox0dea> Don't.
<shevy> can't you raise stuff?
<jhass> l0oky: make your own subclass that supports it. But I would strongly, very strongly encourage you not to
<Ox0dea> >> [(Kernel::Integer rescue $!.class), (Kernel.Integer rescue $!.class)] # grill
<ruboto> Ox0dea # => [NameError, ArgumentError] (https://eval.in/400240)
<[k-_> jhass: use vehemously
pietr0 has quit [Ping timeout: 248 seconds]
<[k-_> more impact
pietr0_ is now known as pietr0
<Ox0dea> *vehemently
<shevy> lol
plashchynski has quit [Quit: plashchynski]
<[k-_> :|
<Ox0dea> Still love you, though.
<shevy> now you get typo-corrected by the oracle
<[k-_> it's ok, i need to improve my english to get good grades
<l0oky> I am suprised there is no string to hash in ruby
<Ox0dea> ...
bungoman has quit [Ping timeout: 264 seconds]
<l0oky> I have to eval ... no no way though
<l0oky> i am not making evals
<shevy> l0oky not needed, split it into an array, then use Hash[*array]
wildroman2 has joined #ruby
<shevy> and! you could always add a to_h method to class String
workmad3 has joined #ruby
revath has joined #ruby
bubbys has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
hinbody has quit [Read error: Connection reset by peer]
<shevy> although to be fair, I don't seem to need to modify core classes of ruby much at all these days
<l0oky> shevy: yeah the second one looks cool :D
<[k-_> why are you passing the problem instead of telling people the problem
jackjackdripper has joined #ruby
<shevy> there are no problems, only solutions
<l0oky> ^
<jhass> there's tackling the wrong problems
desigx has joined #ruby
<jhass> instead of solving the underlying causes
<[k-_> then what is the solution to parallel assignment of hash keys
<shevy> we don't need to have everything
<l0oky> \join #philosophy
troulouliou_div2 has joined #ruby
<jhass> passing complex data structures around via exceptions is a very serious design issue
<[k-_> shevy--
jhack has quit [Remote host closed the connection]
Zai00 has joined #ruby
NeverDie_ has joined #ruby
hinbody has joined #ruby
<havenwood> rapha: For example, for the first part this is more concise: stems.map { |stem, h| [stem, h.map { |k, v| [k, v.size] }.to_h] }.to_h
sarkyniin has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
<shevy> [k-_ did you downvote me :(
<Ox0dea> [k-_: I thought you were addressing him.
<Ox0dea> Pre-{inc,dec}rement > post-.
xkef has joined #ruby
avitzurel has quit []
bubbys has quit [Ping timeout: 252 seconds]
schaerli has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
<[k-_> --shevy
<shevy> ah, an upvote! \o/
jhack has joined #ruby
peter_paule has quit [Ping timeout: 244 seconds]
yardenbar has joined #ruby
troulouliou_div2 has joined #ruby
<l0oky> shevy: How's that an upvote? :D
davejlong has joined #ruby
<shevy> what comes before goes up, what comes behind goes down
freerobby has joined #ruby
mfranzwa has joined #ruby
<Ox0dea> At best, it removed the previous downvote and put you back at neutral.
<l0oky> no
<rapha> havenwood: ah, with .map instead of with .each. i really need to train using .map more, right now it still makes my head hurt.
<l0oky> at least in c++
blaines has quit [Ping timeout: 256 seconds]
<Ox0dea> C++ == C
<l0oky> nope
<Ox0dea> But yes.
<Ox0dea> That's how post-incrementation works.
<[k-_> yes
mikepack has quit [Remote host closed the connection]
<[k-_> Ox0dea is 100% correct
<l0oky> ohhhhhh
<l0oky> hahha
<jhass> [k-_: you'd never say otherwise anyway
<l0oky> A++ = A
<l0oky> ++A = A + 1
LoBoGoL has quit [Ping timeout: 246 seconds]
<l0oky> ++A == A + 1
<havenwood> rapha: For the second part there might be better, but: counts.values.inject { |h1, h2| h1.merge(h2) { |_, x, y| x + y } }
blackmes1 has quit [Quit: WeeChat 1.2]
<[k-_> that's because Ox0dea is always correct that i dont have an opportunity to correct him!
<havenwood> rapha: That's shorter at least. :)
<rapha> havenwood: your first-part solution, why did you use an array inside of the map?
blackmesa has joined #ruby
<[k-_> i prefer reduce!
<havenwood> rapha: When you map Hashes you return an Array.
<rapha> havenwood: and in your second-part solution, what is the meaning of the underscore?
<l0oky> Ox0dea: We all have mistakes the thing is who hides them the best haha.
<havenwood> rapha: The underscore signals it's not used.
<rapha> oh okay
<l0oky> oops meant to ping [k-_
Channel6 has quit [Quit: Leaving]
kidoz has joined #ruby
<[k-_> you failed to hide your mistake
<[k-_> 0/10
wildroman2 has quit [Remote host closed the connection]
<l0oky> [k-_: ^ :D
<havenwood> rapha: So like another way to write Hash#keys would be: {aim: true}.map { |k, _v| k }
<l0oky> [k-_: yu the new judge? :D
bubbys has joined #ruby
<[k-_> i was always a judge
<havenwood> rapha: #=> [:aim]
<shevy> in singapore!
<rapha> havenwood: and coming back to my original questions, would you consider these two lines "elegant" now?
wildroman2 has joined #ruby
<TeresaP> Dir.glob("(\d+)_*") should return something if a folder underneath the cwd is called "01_foo" right?
<l0oky> Let's judge your judgement hmm 0... no 1/10 :D
TheNet has quit [Remote host closed the connection]
<jhass> TeresaP: no, glob patterns are distinct to regular expressions
<shevy> TeresaP dunno but I think .glob does not use regexes
<[k-_> ¯\_(ツ)_/¯
arup_r has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
<rapha> havenwood: with the last thing you wrote, couldn't you just leave out the ", _v" (as it's the last part, not the first)
<havenwood> rapha: The first seems elegant enough. The latter is a bit busy for my taste.
TheNet has joined #ruby
<havenwood> rapha: Nope:
<havenwood> >> {aim: true}.map { |k| k }
<ruboto> havenwood # => [[:aim, true]] (https://eval.in/400242)
<rapha> oh
blaines has joined #ruby
<havenwood> >> {aim: true}.map { |k, _| k }
<ruboto> havenwood # => [:aim] (https://eval.in/400243)
<havenwood> rapha: compare with ^
<rapha> >> puts "Hello world!"
<ruboto> rapha # => Hello world! ...check link for more (https://eval.in/400244)
<rapha> :-)))
leat3 has joined #ruby
TheNet has quit [Remote host closed the connection]
Musashi007 has joined #ruby
<TeresaP> I always forget that
leat2 has quit [Remote host closed the connection]
<[k-_> why does that happen :o
<Ox0dea> havenwood: Might as well nix the underscore as well.
<TeresaP> I need to get all subfolders that start with 1 or more digits followed by an underscore followed by 1 or more of any character
<jhass> nah, it's more readabile with it
Igorshp has joined #ruby
<havenwood> and no var assigned
bungoman_ has quit [Remote host closed the connection]
gambl0re has quit [Ping timeout: 240 seconds]
<[k-_> that's a lie!
<Ox0dea> >> {aim: true}.map { |k,| k } # havenwood
<ruboto> Ox0dea # => [:aim] (https://eval.in/400245)
<[k-_> ruby does assign _!
<rapha> havenwood: about the second part, what i don't get is the h1, h2 designation. the hash that goes into it actually consists of three parts in the case of my data, but that's not what you mean, is it?
<havenwood> Ox0dea: Ah, I see what you mean. But still underscore. :P
<l0oky> while true
<jhass> TeresaP: use an as specific glob pattern as possible (*_* comes to mind) and then .select { } down the result set by any means necessary (like with a regex passed to .match)
<havenwood> rapha: The inject goes between each and does the thing
<l0oky> >> puts 'yeah' while true
<ruboto> l0oky, I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
gambl0re has joined #ruby
<l0oky> muhahahaha
<Ox0dea> ?experiment l0oky
<ruboto> l0oky, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
<l0oky> right...
<rapha> "does the thing" lol
<[k-_> pls no infinite loops
<havenwood> Ox0dea: heh, no two ,,s in a row
<havenwood> >> [[:x, :y, :z]].map { |x,_,| x }
<ruboto> havenwood # => [:x] (https://eval.in/400248)
bubbys has quit [Ping timeout: 264 seconds]
<Ox0dea> havenwood: Indeed not, and surely for the better.
<rapha> havenwood: aah you mean inject first goes between the first and the second, then between the second and the third?
<havenwood> Ox0dea: :)
<havenwood> rapha: aye
<rapha> havenwood: okay, thanks! learned a lot of new things now!
<havenwood> rapha: so you could say: left_hash, right_hash
prestorium has joined #ruby
<l0oky> Why does ruboto return 500? It is just requesting eval.in, response should be output too long
<[k-_> i would have a $-o[?,][?a,?b] #=> ["a","b"] but i cant be bothered anyomore
cajone has joined #ruby
cajone has left #ruby [#ruby]
<TeresaP> Thanks jhass
<Ox0dea> [k-_: Erm, the identity function?
<rapha> havenwood: called them lh and rh now :)
<jhass> TeresaP: http://devdocs.io/ruby/file#method-c-fnmatch has a more throughout explanation on what you can do with glob patterns
Siyfion has joined #ruby
bubbys has joined #ruby
<havenwood> rapha: It's only been a few seconds and I don't remember what those mean. :P
Timba-as has joined #ruby
<[k-_> Ox0dea: no, (,) a b = (a, b)
Kyhz has joined #ruby
<[k-_> so same thing here
<ljarvis> are we still talking about obfuscation
casadei_ has quit [Remote host closed the connection]
<havenwood> red_hat and lavender_hat
<[k-_> we dont need identity functions in ruby
<Ox0dea> >> 5.itself
dfockler has quit [Remote host closed the connection]
<ruboto> Ox0dea # => 5 (https://eval.in/400249)
<Ox0dea> But we've got 'em.
<[k-_> where does itself come from, what version
<TeresaP> Dir.glob("[0-9]*_*") works, somehow
<Ox0dea> [k-_: 2.2, I believe.
<havenwood> rapha: Name variables descriptive things that will make sense to readers.
Siyfion has quit [Client Quit]
<havenwood> rapha: Concise is good but cryptic is bad.
<jhass> rapha: readers = you in the future
<l0oky> (Remote host closed the connection)
<havenwood> which then further in the future will be you in the past
<havenwood> so think of future past you having just read it
LoBoGoL has joined #ruby
<ljarvis> ...
<ljarvis> that alone is cryptic
<Ox0dea> > Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live.
<[k-_> Ox0dea should provide his inp--
hfp_work has quit [Ping timeout: 240 seconds]
<adaedra> This reminds me, Ox0dea, I have some code review to do.
leat3 has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
leat3 has joined #ruby
blackmes1 has joined #ruby
<l0oky> [k-_: It's inp__
<l0oky> :D
<havenwood> ljarvis: past me that wrote it was hoping for a chuckle from future me, but alas I'm not amused
<rapha> havenwood, jhass: yeah, i've already learned that. in this special case i have the problem that it would be good if the whole script could fit onto one A4 page.
<Ox0dea> What year is it?
<[k-_> im sticking with --, whatever __ is
hfp has quit [Ping timeout: 244 seconds]
<jhass> rapha: use a smaller font
<havenwood> Ox0dea: Boomtime, the 51st day of Confusion in the YOLD 3181
<rapha> >> Time.now.year
<ruboto> rapha # => 2015 (https://eval.in/400250)
<ljarvis> havenwood: :D
jottr_ has quit [Ping timeout: 256 seconds]
acke has quit [Remote host closed the connection]
<l0oky> cool
<rapha> Ox0dea: there, found that out for you :-)
<l0oky> >> Time.now.seconds
<rapha> jhass: it's already as small as it can be!
<ruboto> l0oky # => undefined method `seconds' for 2015-07-16 18:29:23 +0000:Time (NoMethodError) ...check link for more (https://eval.in/400251)
<jhass> rapha: sounds like you can still read it
casadei_ has joined #ruby
<l0oky> Why do I always get errors :(
<jhass> ?pry l0oky
<ruboto> l0oky, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
krz has quit [Quit: WeeChat 1.0.1]
astrobun_ has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 248 seconds]
<ljarvis> that's basically the pry readme right there
<jhass> and we didn't even copy paste it!
<l0oky> haha
astrobun_ has joined #ruby
<Ox0dea> havenwood: Are you a Discordianist?
<rapha> wow! pry pages by default! already loving it!!
xkef has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
polysics has joined #ruby
<havenwood> Ox0dea: In the sense that "All affirmations are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense."
schaerli has joined #ruby
<jhass> mmh, reminds me, still need to buy hotdogs for tomorrow
bubbys has quit [Ping timeout: 244 seconds]
<Ox0dea> Hot dogs are meaningless.
<Ox0dea> In some sense.
<[k-_> got to go sleep
<Ox0dea> Night, [k-_.
<[k-_> night
Blaguvest has quit []
<havenwood> [k-_: have a good evenin'
[k-_ has quit [Quit: Lingo: www.lingoirc.com]
<havenwood> sleep*
reset has joined #ruby
BTRE has quit [Quit: Leaving]
zata has joined #ruby
<bricker> I have a CS question.... I have query (A) that loads a bunch of data, and another query (B) that loads associated data. No matter how big or small query A is, query B will always take rougly the same amount of time. What do you call this?
Macaveli has joined #ruby
BTRE has joined #ruby
astrobu__ has joined #ruby
<bricker> Some representation of O(log n) but I'm not super familiar with that
leat3 has quit [Remote host closed the connection]
Scroff has joined #ruby
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
astrobun_ has quit [Ping timeout: 240 seconds]
leat3 has joined #ruby
zata has quit [Client Quit]
bruno- has quit [Ping timeout: 255 seconds]
<Ox0dea> I think the time and space complexities of such an arrangement are both O(mg).
Pupeno has quit [Remote host closed the connection]
jmhmccr has joined #ruby
Lucky_ has joined #ruby
wildroman2 has quit [Remote host closed the connection]
Pupeno has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> 0(mg) = O(g) if m is nonzero but O(mgwtfbbq) if m is infinite?
rippa has quit [Ping timeout: 264 seconds]
<ljarvis> ^
Pupeno_ has joined #ruby
Pupeno_ has quit [Remote host closed the connection]
yokel has quit [Ping timeout: 240 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
genpaku has quit [Ping timeout: 246 seconds]
Pupeno has quit [Ping timeout: 244 seconds]
c_nick has joined #ruby
genpaku has joined #ruby
sankaber has joined #ruby
yokel has joined #ruby
Scroff has quit [Remote host closed the connection]
Scroff has joined #ruby
symbol has quit [Ping timeout: 252 seconds]
bungoman has joined #ruby
iateadonut has left #ruby [#ruby]
astrobu__ has quit [Remote host closed the connection]
wallerdev has joined #ruby
Scroff has quit [Client Quit]
pietr0 has quit [Quit: pietr0]
acke has joined #ruby
NeverDie_ is now known as NeverDie
pietr0 has joined #ruby
<l0oky> infinite is a number with a dimension of time
schaerli has quit [Remote host closed the connection]
stbenjam has joined #ruby
zata has joined #ruby
nikhgupta has joined #ruby
howdoicomputer has quit [Ping timeout: 265 seconds]
schaerli has joined #ruby
skade has joined #ruby
revath has quit [Ping timeout: 264 seconds]
decoponio has quit [Read error: Connection reset by peer]
dfockler has joined #ruby
nofxx has joined #ruby
decoponio has joined #ruby
edwinvdg_ has joined #ruby
jottr_ has joined #ruby
Marsupermammal has quit [Quit: Textual IRC Client: www.textualapp.com]
[Butch] has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
rideh has joined #ruby
victortyau has quit [Quit: Leaving]
Macaveli has quit [Read error: Connection reset by peer]
Macaveli_ has joined #ruby
edwinvdgraaf has quit [Ping timeout: 260 seconds]
bubbys has joined #ruby
ttilley has joined #ruby
momomomomo has joined #ruby
ttilley has quit [Changing host]
ttilley has joined #ruby
baweaver has joined #ruby
last_staff has joined #ruby
last_staff has quit [Client Quit]
codecop has joined #ruby
last_staff has joined #ruby
umgrosscol has quit [Remote host closed the connection]
peter_paule has joined #ruby
rideh has quit [Client Quit]
bungoman has quit [Remote host closed the connection]
last_staff has quit [Client Quit]
bungoman has joined #ruby
last_staff has joined #ruby
Alayde has quit [Ping timeout: 255 seconds]
dfinninger has quit [Remote host closed the connection]
last_staff has quit [Client Quit]
ESpiney has joined #ruby
<rapha> gawd i really wish some of the Rails additions were finally accepted into Ruby
<rapha> like, .blank?
<dfockler> I'd like the time functions
wprice has quit [Quit: wprice]
<rapha> those too
Pathfinder_ has joined #ruby
hfp_work has joined #ruby
<havenwood> bricker: Too simplistic?: TA(n) = cn ⇔ TB(n) = cn
<havenwood> bricker: dunno
hfp has joined #ruby
LoBoGoL has quit [Ping timeout: 256 seconds]
dfinninger has joined #ruby
Pathfinder has quit [Ping timeout: 265 seconds]
<bricker> I'm not sure, I assumed there was a simple answer to the question
<havenwood> bricker: Dunno, I need to learn more about various notations.
baweaver has quit [Remote host closed the connection]
lessless has joined #ruby
peter_paule has quit [Ping timeout: 246 seconds]
<Mon_Ouie> #blank? always feels to me like it encourages not handling bugs early and silently ignoring getting nil when you're not supposed to --- nil, the empty string and the empty array are completely different things
<Mon_Ouie> (well, "an" empty array/string)
<l0oky> .empty?
<ljarvis> ugh no dont put blank? into core
hfp_work has quit [Ping timeout: 240 seconds]
hfp has quit [Excess Flood]
hfp has joined #ruby
hfp_work has joined #ruby
momomomomo_ has joined #ruby
zata has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
momomomomo has quit [Ping timeout: 264 seconds]
momomomomo_ is now known as momomomomo
zata has joined #ruby
phutchins has quit [Ping timeout: 248 seconds]
Kirklander has joined #ruby
jhack has quit [Ping timeout: 265 seconds]
schaerli has quit [Remote host closed the connection]
<TeresaP> Is Zippy recommended over Rubyzip for creating archives?
<zrowe007> I'm having trouble connecting to an MSSQL server using TinyTds::Client.new, but I can connect on the command line using tsql
LoBoGoL has joined #ruby
fabrice31 has quit [Ping timeout: 255 seconds]
wordsarewind has joined #ruby
krz has joined #ruby
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has quit [Remote host closed the connection]
wordsarewind has left #ruby ["WeeChat 1.2"]
zz_Outlastsheep is now known as Outlastsheep
baweaver has joined #ruby
pietr0 has quit [Quit: pietr0]
Pupeno has joined #ruby
xkickflip has quit [Quit: xkickflip]
Pupeno has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
Igorshp has quit [Remote host closed the connection]
peter_paule has joined #ruby
dling` has quit []
atomical has joined #ruby
Stratege has joined #ruby
ruurd has joined #ruby
kirun has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
xkef has joined #ruby
<TeresaP> What is the recommended zip mechanism?
scripore has joined #ruby
zenguy_pc has joined #ruby
<ruurd> TeresaP sorry?
einarj has joined #ruby
<TeresaP> ruurd what gem would you recommend to assist in zipping files
TvL2386 has quit [Quit: Ex-Chat]
<ruurd> Oh. Aha.
vickleton has joined #ruby
dling has joined #ruby
<TeresaP> I found a few places that recommended Zippy but the documentation is not great
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruurd> There is also one called rubyzip
<TeresaP> Yeah, I might just use that even though it is supposedly less abstracted
<ruurd> but using system to invoke zip should also work
<TeresaP> Isn't that kindof frowned upon?
abuzze_ has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xkickflip has joined #ruby
peter_paule has quit [Ping timeout: 256 seconds]
leat3 has quit [Remote host closed the connection]
leat3 has joined #ruby
Muhannad has quit [Ping timeout: 246 seconds]
<shevy> why
<shevy> it works!
ruurd has quit [Quit: ZZZzzz…]
abuzze has joined #ruby
<TeresaP> I don't remember the reason, but I seem to remember someone in here was very anti-system calls :)
serivich has joined #ruby
ruurd has joined #ruby
<ruurd> You might want to be careful doing that yes. It's not exactly portable really
<l0oky> If I have only one line in a method does that mean method returns that line?
casadei_ has quit [Remote host closed the connection]
ruby-prudi has joined #ruby
<ruurd> No. The result of that line maybe. Or nil if it does not return anything.
rbennace_ has joined #ruby
<l0oky> maybe?
<ruurd> You know - that kind of questions you can answer yourself by just trying it out in irb.
Vols has joined #ruby
Alayde has joined #ruby
frem has joined #ruby
rbennacer has quit [Ping timeout: 240 seconds]
t0rrieri has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
radialneon has quit [Ping timeout: 246 seconds]
<ruurd> $ irb
<ruurd> 2.2.2 :001 > puts 'foo'
<ruurd> foo
<ruurd> => nil
<ruurd> 2.2.2 :002 >
<ruby-prudi> Hello! Why in Ruby is better to define an array of string with %w( ... ) instead of ["..", "..", ..] ?? Thanks!!
Casty has joined #ruby
<jhass> ruby-prudi: because you have to type less " and ,
tvw has quit []
tvw has joined #ruby
<Ox0dea> ruby-prudi: "Isn't", "this", "slightly", "harder", "to", "read"?
jenrzzz has joined #ruby
absurdity1 has joined #ruby
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ruby
<ruby-prudi> Thanks to all!! :)
sepp2k has quit [Client Quit]
whiteline has quit [Quit: Leaving]
sepp2k has joined #ruby
sepp2k has quit [Client Quit]
mikepack has joined #ruby
kadoppe has quit [Ping timeout: 246 seconds]
whiteline has joined #ruby
astrobun_ has joined #ruby
absurdity1 has left #ruby ["WeeChat 1.1.1"]
zenguy_pc has quit [Read error: Connection reset by peer]
zenguy_pc has joined #ruby
sepp2k1 has joined #ruby
serivich has quit [Ping timeout: 265 seconds]
wprice has joined #ruby
kadoppe has joined #ruby
astrobun_ has quit [Read error: Connection reset by peer]
Pathfinder_ has quit [Ping timeout: 246 seconds]
ruurd has quit [Quit: ZZZzzz…]
bungoman has quit [Remote host closed the connection]
zenguy_pc has quit [Read error: Connection reset by peer]
zenguy_pc has joined #ruby
schaerli has joined #ruby
schaerli has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
edwinvdg_ has quit [Remote host closed the connection]
rideh has joined #ruby
Rollabunna has joined #ruby
ruurd has joined #ruby
gambl0re has quit [Remote host closed the connection]
speaking1ode has joined #ruby
gambl0re has joined #ruby
baweaver has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
Kalov has joined #ruby
tmtwd has quit [Ping timeout: 246 seconds]
shadoi has joined #ruby
toretore has joined #ruby
radialneon has joined #ruby
finisherr has joined #ruby
bungoman has joined #ruby
wallerdev has quit [Quit: wallerdev]
rubie has joined #ruby
rideh has quit [Quit: zap]
hk33801 has joined #ruby
linuxboytoo has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 1.0.1]
aryaching has quit [Read error: Connection reset by peer]
linuxboytoo has joined #ruby
<hk33801> $ which gem | /home/hk3380/.rbenv/shims/gem | gem update --system | You don't have write permissions for the /usr/lib/ruby/gems/2.2.0
skade has quit [Ping timeout: 248 seconds]
einarj has quit [Remote host closed the connection]
<hk33801> i thought rbenv was supposed to allow me run gem without sudo?
jottr_ has quit [Ping timeout: 256 seconds]
<jhass> maybe the system ruby is active?
<hk33801> how do i deactivate it?
<hk33801> oh do i just uninstall it?
hfp has quit [Quit: bye]
hfp_work has quit [Quit: bye]
<jhass> meh, wrong link, sorry
hfp has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
speaking2ode has joined #ruby
hfp_work has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
edwinvdgraaf has joined #ruby
linuxboytoo has quit [Ping timeout: 250 seconds]
y0da has quit [Ping timeout: 264 seconds]
zata has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aryaching has joined #ruby
skade has joined #ruby
<zrowe007> I'm trying to connect to an MSSQL server using tinytds, and I can on the console using tsql, but not using tinytds in a ruby script, i just get "Adaptive Server connection failed" My script and log output is here: https://gist.github.com/zr2d2/6b26a5d3f8e4a1ff4727
mesamoo has quit [Quit: Konversation terminated!]
speaking1ode has quit [Ping timeout: 260 seconds]
zata has joined #ruby
SCHAAP137 has joined #ruby
roolo has joined #ruby
jottr_ has joined #ruby
Pupeno has joined #ruby
atomical has joined #ruby
<l0oky> Will .empty? check for nil ?
<Mon_Ouie> >> nil.empty?
<ruboto> Mon_Ouie # => undefined method `empty?' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/400274)
tmtwd has joined #ruby
desigx has quit [Ping timeout: 246 seconds]
Pupeno has quit [Remote host closed the connection]
codecop has quit [Quit: Išeinu]
ramfjord has quit [Ping timeout: 250 seconds]
dfinninger has quit [Remote host closed the connection]
<l0oky> >> nil.nil?
<ruboto> l0oky # => true (https://eval.in/400276)
<l0oky> >> nil.blank?
<ruboto> l0oky # => undefined method `blank?' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/400277)
<jhass> ?experiment l0oky
<ruboto> l0oky, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
<l0oky> right right, we humans forget
nikhgupt has joined #ruby
Kirklander has left #ruby [#ruby]
_ht has quit [Quit: Konversation terminated!]
blackmes1 has quit [Ping timeout: 265 seconds]
nikhgupta has quit [Ping timeout: 256 seconds]
aryaching has quit [Ping timeout: 256 seconds]
pengin has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 240 seconds]
segfalt has quit [Quit: segfalt]
nikhgupt has quit [Ping timeout: 255 seconds]
Macaveli_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bronson has quit [Remote host closed the connection]
Sypheren has joined #ruby
Sypheren has left #ruby [#ruby]
dfinninger has joined #ruby
Sypheren has joined #ruby
dfockler has quit [Remote host closed the connection]
hinbody_ has joined #ruby
Musashi007 has quit [Quit: Musashi007]
bashusr has quit [Ping timeout: 255 seconds]
nettoweb has joined #ruby
rbennace_ has quit [Remote host closed the connection]
danzilio has joined #ruby
_dev0urer has quit [Ping timeout: 265 seconds]
howdoicomputer has joined #ruby
hinbody has quit [Ping timeout: 248 seconds]
hinbody_ is now known as hinbody
aspiers has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
gambl0re has quit [Remote host closed the connection]
Outlastsheep is now known as zz_Outlastsheep
gambl0re has joined #ruby
douglasssss has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has quit [Quit: This computer has gone to sleep]
segfalt has joined #ruby
lxsameer has joined #ruby
zz_barkerd427 is now known as barkerd427
segfalt has quit [Client Quit]
dfockler has joined #ruby
happyface has joined #ruby
yfeldblum has joined #ruby
whiteline has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
Musashi007 has joined #ruby
jenrzzz has joined #ruby
whiteline has joined #ruby
Ox0dea has quit [Read error: No route to host]
bashusr has joined #ruby
_dev0urer has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
NeverDie has joined #ruby
davejlong has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
ubermonkey has joined #ruby
ubermonkey has quit [Client Quit]
Jackneill has quit [Ping timeout: 240 seconds]
ubermonkey has joined #ruby
sepp2k1 has quit [Quit: Leaving.]
Pupeno has joined #ruby
Pupeno has quit [Read error: Connection reset by peer]
c_nick has quit [Quit: Ex-Chat]
zata has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ubermonkey has quit [Client Quit]
ubermonkey has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
nettoweb_ has joined #ruby
luriv_ has quit [Remote host closed the connection]
ubermonkey has quit [Client Quit]
allomov has quit [Remote host closed the connection]
hanmac has quit [Ping timeout: 246 seconds]
<Karunamon|2> Hi folks - wondering if there's a better way to return an array from an iterator, this seems really dupe-ey: https://gist.github.com/Karunamon/98da3cc06c6dbc734fca
Karunamon|2 is now known as Karunamon
<jhass> Karunamon|2: just call .map on it
momomomomo has quit [Quit: momomomomo]
maletor has joined #ruby
<jhass> Karunamon: or for this case do Array.new(amount) { RandomWord.nouns.next }
prestorium has quit [Quit: Konversation terminated!]
zata has joined #ruby
wallerdev has joined #ruby
nettoweb has quit [Ping timeout: 264 seconds]
<jhass> and if RandomWord.nouns returns an Enumerator, just RandomWord.nouns.take(amount)
<Karunamon> I did not know array.new accepted a block
<Karunamon> ..neat!
momomomomo has joined #ruby
<jhass> btw filename convention for RandomWord would be random_word.rb not random-word.rb
momomomomo has quit [Client Quit]
jottr_ has quit [Ping timeout: 248 seconds]
AlexRussia has quit [Read error: Connection reset by peer]
<mozzarella> why not use RandomWord.nouns.take(number)?
<jhass> mozzarella: looks like you overlooked my third note ;)
allomov has joined #ruby
whiteline has quit [Read error: Connection reset by peer]
Timba-as has quit [Remote host closed the connection]
whiteline has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
Timba-as has joined #ruby
mh888 has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 1.2]
momomomomo has joined #ruby
mh888 has quit [Client Quit]
jottr_ has joined #ruby
<Karunamon> am I right in understanding that, generally, if you're repeating yourself, you're probably doing something either the wrong way or harder than it ought to be?
AlexRussia has joined #ruby
ESpiney has quit [Quit: Leaving]
tvw has quit [Remote host closed the connection]
AlexRussia has joined #ruby
baweaver has joined #ruby
bronson has quit [Remote host closed the connection]
but3k4 has joined #ruby
<shevy> anyone happens to know if there is a standalone project that will only generate an up-to-date skeleton for a ruby project?
<Aria> I think there's a tension between repeating yourself and coupling.
<Aria> But if you get to the point of 'this is tedious and I wouldn't notice a mistake" ... you've crossed far into 'this should be automated' territory.
JoshL has quit []
hanmac has joined #ruby
blueOxigen has joined #ruby
dblessing has quit [Ping timeout: 265 seconds]
baweaver has quit [Ping timeout: 256 seconds]
bluOxigen has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
djbkd has quit [Remote host closed the connection]
nettoweb has joined #ruby
Ilyas has quit [Quit: Leaving]
WildBamboo-Josh has joined #ruby
SaintMoriarty has joined #ruby
ramfjord has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<bricker> I think I know the answer but want some confirmation, is Array#uniq with a block guaranteed to retain the first occurrence of the object?
ruurd has joined #ruby
jenrzzz has joined #ruby
saadq has joined #ruby
nettoweb_ has quit [Ping timeout: 260 seconds]
davejlong has joined #ruby
<Radar> shevy: "skeleton"?
<Radar> shevy:
<Radar> "bundle gem" is all I can think of
hfp_work has quit [Ping timeout: 265 seconds]
hfp has quit [Ping timeout: 244 seconds]
cpruitt has joined #ruby
l0oky has quit [Read error: Connection reset by peer]
douglasssss has quit [Quit: Leaving]
<Radar> Karunamon: Subjective.
<Radar> bricker: example?
<bricker> Radar: If I have ["a
<bricker> shit
LoBoGoL has quit [Ping timeout: 260 seconds]
Ox0dea has joined #ruby
<Ox0dea> bricker: #uniq is implemented internally using a hash table, and Ruby's hashes maintain insertion order.
Lucky_ has quit [Read error: Connection reset by peer]
pengin has joined #ruby
noethics has quit [Ping timeout: 244 seconds]
nettoweb has quit [Ping timeout: 246 seconds]
Musashi007 has joined #ruby
diegoviola has quit [Quit: WeeChat 1.2]
dionysus69 has quit [Quit: dionysus69]
<Ox0dea> >> s = Struct.new(:a, :b); [s.new(1, 0), s.new(2, 0), s.new(2, 1), s.new(1, 1)].uniq(&:b)
<ruboto> Ox0dea # => [#<struct a=1, b=0>, #<struct a=2, b=1>] (https://eval.in/400296)
<bricker> Ox0dea: I'm more concerned that the block form of uniq would somehow change that... it seems like it'll be okay though
abuzze has quit []
<Ox0dea> I used the block form in my example, for what that's worth.
<bricker> Ox0dea: I know, your example shows that your example returns the expected result, but you're saying that it's guaranteed?
<bricker> I believe you, just confirming
<bricker> and sanity check for me
bmurt has quit []
<Ox0dea> It's guaranteed in MRI.
atomi has quit [Quit: leaving]
<Ox0dea> I'm sure there's something in RubySpec about making hashes maintain insertion order.
atomi has joined #ruby
<bricker> schweet
baweaver has joined #ruby
momomomomo has quit [Ping timeout: 246 seconds]
yokel has quit [Ping timeout: 248 seconds]
ccooke has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby
ccooke has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
jeramyRR has joined #ruby
yokel has joined #ruby
mhib has quit [Remote host closed the connection]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
futilegames has joined #ruby
nobitano_ has quit []
dblessing has joined #ruby
arescorpio has joined #ruby
davejlong has quit [Remote host closed the connection]
MagePsycho has quit [Ping timeout: 264 seconds]
zata has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheNet has joined #ruby
edwinvdgraaf has joined #ruby
Kyhz has quit [Ping timeout: 264 seconds]
devbug has quit [Ping timeout: 244 seconds]
zata has joined #ruby
fabrice31 has quit [Ping timeout: 244 seconds]
pabloh has quit [Quit: Saliendo]
ldnunes has quit [Quit: Leaving]
eggoez has quit [Ping timeout: 252 seconds]
jeramyRR has quit [Quit: Peace out!]
davejlong has joined #ruby
LoBoGoL has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
TheNet has quit [Ping timeout: 244 seconds]
hfp has joined #ruby
hfp_work has joined #ruby
eggoez has joined #ruby
crdpink2 has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
crdpink has quit [Ping timeout: 248 seconds]
icarus_ has joined #ruby
MagePsycho has joined #ruby
davejlong has quit [Remote host closed the connection]
arup_r has quit [Quit: Leaving]
phutchins has joined #ruby
davedev2_ has joined #ruby
episage has quit [Remote host closed the connection]
duderonomy has joined #ruby
davedev24 has quit [Ping timeout: 248 seconds]
freerobby has quit [Quit: Leaving.]
saadq has quit [Remote host closed the connection]
xkef has quit [Ping timeout: 244 seconds]
charliesome has joined #ruby
borodin has joined #ruby
[H]unt3r has quit []
Pupeno has joined #ruby
stantonnet has quit [Ping timeout: 248 seconds]
Rollabunna has quit [Remote host closed the connection]
FernandoBasso has joined #ruby
Rollabunna has joined #ruby
<borodin> help oh ruby genii! help a wary traveller! https://gist.github.com/anonymous/3b38dc958740b35ed7f0 I'm getting an unexpected end when I know an end belongs there!
<SaintMoriarty> hello, do I have to change settings to allow connections from outside of the host?
<SaintMoriarty> when running rails server
<borodin> SaintMoriarty: you have to specify to listen to an ip which can be seen outside the server
jgpawletko has quit [Quit: jgpawletko]
<borodin> rails s -b0.0.0.0 etc.
<borodin> (on the newest rails server)
havenwood has joined #ruby
<SaintMoriarty> ah so its not in any of the configs?
<borodin> it used to be automagically 0.0.0.0 but now it's not
Musashi007 has quit [Quit: Musashi007]
<borodin> not in any of the configs either
tkuchiki has quit [Remote host closed the connection]
bronson has joined #ruby
acke has quit [Remote host closed the connection]
barkerd427 is now known as zz_barkerd427
Rollabunna has quit [Ping timeout: 246 seconds]
jottr has joined #ruby
<havenwood> borodin: Is there an ambiguity with the Hash kwarg value here?: https://gist.github.com/anonymous/3b38dc958740b35ed7f0#file-archive-rb-L6
Musashi007 has joined #ruby
<havenwood> borodin: Double check?: validates(:crypto_key1, :crypto_key2, length: { minimum: 8 })
<borodin> havenwood I can tell you can help me because you're using words I haven't ever heard of
<borodin> are you saying add in the parens?
devbug has joined #ruby
charliesome has quit [Quit: zzz]
<havenwood> borodin: Yeah. On a quick scan at least that was what seemed suspicious to me.
<toretore> self.completed_at |= Time.now
spider-mario has quit [Remote host closed the connection]
jottr_ has quit [Ping timeout: 260 seconds]
futilegames has quit [Quit: futilegames]
ruurd has joined #ruby
<borodin> toretore should be ||= ?
arescorpio has quit [Quit: Leaving.]
xkef has joined #ruby
<toretore> probably
<Ox0dea> Yes. :)
<borodin> but it didn't fix the problem?
choppington has quit [Ping timeout: 240 seconds]
<borodin> moar!!!
edwinvdgraaf has joined #ruby
<borodin> havenwood: I added the parens, didn't change the outcome
<toretore> update gist with new code
<havenwood> borodin: looking closer
<toretore> and new error
<havenwood> borodin: aye, updated gist would be good! :
<borodin> is there any chance that this error comes from anything other than this file?
peeja has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> borodin: Is this the whole file?
ruurd has quit [Client Quit]
<borodin> yes that's the whole file
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
cek has quit [Quit: Connection closed for inactivity]
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
xkickflip has quit [Quit: xkickflip]
<Ox0dea> borodin: Nix the question mark on line 50.
paulcsmith has quit [Quit: Be back later ...]
<havenwood> Ox0dea: good catch
zacstewart has quit [Remote host closed the connection]
ruurd has joined #ruby
<borodin> Ox0dea: I knkew you were the smart one!
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<borodin> giggles - thanks everybody
paulcsmith has joined #ruby
atomical has joined #ruby
<Kalov> any body knows, a good place for finding ruby code examples?
yokel has quit [Ping timeout: 246 seconds]
blackmes1 has joined #ruby
ruurd has quit [Client Quit]
Musashi007 has quit [Quit: Musashi007]
yokel has joined #ruby
eGGsha has joined #ruby
werelivinginthef has quit [Remote host closed the connection]
kullsputra has joined #ruby
<Ox0dea> Kalov: Are you on Windows?
jamesaxl|2 has joined #ruby
SaintMoriarty has quit [Ping timeout: 244 seconds]
_solomon has quit [Quit: _solomon]
TheNet has joined #ruby
gccostabr has joined #ruby
jamesaxl has quit [Ping timeout: 246 seconds]
cpruitt has quit [Quit: cpruitt]
<Kalov> yes i am Ox0dea
graydot has quit [Quit: graydot]
duggiefresh has quit [Remote host closed the connection]
ruurd has joined #ruby
<Ox0dea> Kalov: Do you have Ruby installed?
gccostabr has quit [Client Quit]
NeverDie has quit [Quit: Textual IRC Client: www.textualapp.com]
djbkd has joined #ruby
kullsputra has quit []
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nofxx has quit [Read error: Connection reset by peer]
kullsputra has joined #ruby
<Kalov> yes i think so
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
bungoman has quit [Remote host closed the connection]
ryba has joined #ruby
genpaku has quit [Ping timeout: 255 seconds]
<ruurd> OK what happens if you enter irb on the command line?
zata has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeverDie has joined #ruby
jaequery has joined #ruby
yokel has quit [Ping timeout: 246 seconds]
mfranzwa has left #ruby [#ruby]
<adaedra> be careful that depending on your windows install, you may have a special shortcut for Ruby-enabled shell.
howdoicomputer has quit [Ping timeout: 240 seconds]
linuxboytoo has joined #ruby
whippythellama has quit [Quit: WeeChat 1.2]
cpruitt has joined #ruby
graydot has joined #ruby
ohaibbq has joined #ruby
devdazed has quit [Ping timeout: 264 seconds]
LoBoGoL has quit [Ping timeout: 244 seconds]
cpruitt has quit [Client Quit]
_solomon has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
<Kalov> i am not sure really sure how to, i downloaded and installed an .exe "ruby 2.2.2"
Kully3xf has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
yokel has joined #ruby
decoponio has quit [Read error: Connection reset by peer]
decoponio has joined #ruby
vickleton has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
njs126 has quit [Quit: Leaving]
baweaver has quit [Remote host closed the connection]
_solomon has quit [Client Quit]
baweaver has joined #ruby
duoi has joined #ruby
baweaver_ has joined #ruby
baweaver has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
<havenwood> Kalov: There are multiple ways to install Ruby on Windows but a popular option is RubyInstaller for Windows. You can check that you have the version you expect from your command line with `ruby -v`.
pietr0 has joined #ruby
dblessing has quit [Ping timeout: 240 seconds]
Carnage\ has joined #ruby
s00pcan has quit [Ping timeout: 256 seconds]
baweaver_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 246 seconds]
s00pcan has joined #ruby
<ruurd> Kalov if I were you I'd run away from Windows real fast if you want to do any Ruby stuff... It's a menace.
casadei_ has joined #ruby
Rollabunna has quit [Ping timeout: 264 seconds]
<hal_9000_> trying redcarpet for first time — can’t get simple list to work --
LoBoGoL has joined #ruby
<Guest87318> hi I'm testing a method that takes a block: specify { expect { |b| m_array.tk_each(&b) }.to yield_successive_args([]) }
dopie has quit [Quit: This computer has gone to sleep]
<hal_9000_> 2.1.0 :001 > text = "This is a list:\n* first\n* second\n"
<hal_9000_> 2.1.0 :002 > out = Redcarpet::Markdown.new(Redcarpet::Render::HTML.new).render(text)
<hal_9000_> => "<p>This is a list:\n* first\n* second</p>\n" # Can someone explain?
centrx has joined #ruby
<Guest87318> hal_9000 doesn't readcarpet render html from a string? So it's automatically putting your text into paragraphs
TheNet has quit [Remote host closed the connection]
xkickflip has joined #ruby
Guest87318 is now known as JimmytheHat
<hal_9000_> well… there are newlines in there. i thought it would honor them
<apeiros> hal_9000_: add an empty line between the list and the text before
djbkd has quit [Remote host closed the connection]
<hal_9000_> ahhh
djbkd has joined #ruby
<havenwood> Kalov: There's always lots of code to read on the Githubs: https://github.com/trending?l=ruby
<hal_9000_> conclusion: i don’t know markdown :)
zz_barkerd427 is now known as barkerd427
<hal_9000_> thanks apeiros
<apeiros> yw
<havenwood> Kalov: Depends what type of examples you're looking for. There are lots of resources.
LoBoGoL has quit [Client Quit]
leat3 has quit [Remote host closed the connection]
<havenwood> Kalov: I think it's a great idea to read a bunch of code.
leat3 has joined #ruby
kies^ has quit [Ping timeout: 256 seconds]
<Ox0dea> $ gem search --no-vers | xargs gem install
riotjone_ has joined #ruby
<havenwood> Ox0dea: Then just cron a `gem update` and good to go?
<Ox0dea> Good to go.
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> \o/
<havenwood> Ship it!
<Kalov> yes havenwood i tought the same, reading and learning
<Kalov> do you know where i can find code?
<havenwood> Kalov: For a beginner?
<havenwood> Kalov: Any particular interests?
<Kalov> anything will do
<Kalov> yes biginner
<havenwood> Kalov: Here are some links to resources: http://ruby-community.com/pages/links
pengin has quit [Remote host closed the connection]
<Ox0dea> Hey! Let's count in Ruby for Kalov.
riotjones has quit [Ping timeout: 264 seconds]
t_ has quit [Ping timeout: 256 seconds]
<Ox0dea> >> 'sky'.count('aeiou')
<ruboto> Ox0dea # => 0 (https://eval.in/400330)
bungoman has joined #ruby
FernandoBasso has quit [Quit: May the force be with you.]
<ruurd> 'is the limit'.count('aeiouy')
pengin has joined #ruby
<havenwood> >> 'sky'.count('aeiou').next
wrbtrader has joined #ruby
<ruboto> havenwood # => 1 (https://eval.in/400331)
<ruurd> >> 'is the limit'.count('aeiouy')
<ruboto> ruurd # => 4 (https://eval.in/400332)
<Ox0dea> ruurd: Get out.
jamesaxl|2 is now known as jamesaxl
<JimmytheHat> hi all does this make sense? https://gist.github.com/anonymous/7d06a8957d50b6f5f797 How can I achieve this?
FernandoBasso has joined #ruby
<ruurd> >> puts 'No'
<ruboto> ruurd # => No ...check link for more (https://eval.in/400333)
barkerd427 is now known as zz_barkerd427
bmurt has joined #ruby
rubie has quit [Remote host closed the connection]
<JimmytheHat> does anyone know anything about rspec's yield matchers?
baweaver has joined #ruby
momomomomo has quit [Quit: momomomomo]
havenwood has quit [Ping timeout: 255 seconds]
<Ox0dea> JimmytheHat: You're no longer testing that your #my_each yields values correctly once you're explicitly indexing into its return value.
SCHAAP137 has quit [Remote host closed the connection]
<Ox0dea> Are you just doing this to learn yield matchers, or?
hk33801 has quit [Ping timeout: 246 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has quit [Ping timeout: 246 seconds]
sgambino has joined #ruby
zacstewart has joined #ruby
blueOxigen has quit [Ping timeout: 246 seconds]
t_ has joined #ruby
howdoicomputer has joined #ruby
EllisTAA has joined #ruby
bruno- has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
jgpawletko has joined #ruby
hk33801 has joined #ruby
cek has joined #ruby
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
cek has left #ruby [#ruby]
tkuchiki has joined #ruby
jhack has joined #ruby
nveselinov has joined #ruby
t_ has quit [Ping timeout: 240 seconds]
grill has quit [Quit: ( www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )]
xkickflip has quit [Quit: xkickflip]
thiagovsk has quit [Quit: Connection closed for inactivity]
Musashi007 has quit [Quit: Musashi007]
<JimmytheHat> Ox0dea just learning, but I feel it would be nice to spec each yield value separately? all my values, all my counts and more for more complex yields. Is it possible? By 'explicitly indexing' do you mean I'd no longer be testing the order of my yield values?
Carnage\ has quit []
speaking2ode has quit [Ping timeout: 246 seconds]
tkuchiki has quit [Ping timeout: 265 seconds]
<Ox0dea> JimmytheHat: Explicitly indexing means you're testing that Enumerator#[] works, not #my_each.
crunk_bear has joined #ruby
willywos has quit [Ping timeout: 265 seconds]
<JimmytheHat> Oxodea you mean I shouldn't bother testing count?
freerobby has joined #ruby
ruurd has joined #ruby
<Ox0dea> JimmytheHat: Your #my_each is just a re-implementation of #each, yes?
Papierkorb has joined #ruby
dfinninger has quit [Remote host closed the connection]
EllisTAA has quit [Quit: EllisTAA]
<JimmytheHat> Ox0dea ah no it's just an example, it doesn't even exist. Let's just pretend that I do just want to really test my count returns 0,1,2 how could I do that in one expectation? One expectation for each yield value, if possible.
<JimmytheHat> it's an rspec-style simple example :P
<JimmytheHat> rspec-docs style
Rickmasta has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
<Ox0dea> JimmytheHat: I suppose you could try `expect { array.my_each(&b).enum_for(:last) }`.
EllisTAA has joined #ruby
<JimmytheHat> Ox0dea ah yes that might do it thanks a lot
<Ox0dea> Sure thing.
radialneon has quit [Ping timeout: 240 seconds]
eggoez has quit [Ping timeout: 252 seconds]
jhack has quit [Remote host closed the connection]
scripore has joined #ruby
Musashi007 has quit [Client Quit]
jobewan has quit [Quit: Leaving]
xkickflip has joined #ruby
EllisTAA has quit [Client Quit]
t_ has joined #ruby
_dev0urer has quit [Quit: leaving]
rubie has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
jerius has joined #ruby
Zai00 has quit [Quit: Zai00]
swgillespie has joined #ruby
slumos[away] is now known as slumos
yqt has joined #ruby
graydot has quit [Quit: graydot]
fallen_ has quit [Read error: Connection reset by peer]
allcentury has joined #ruby
Timba-as has quit [Quit: Be back later ...]
gambl0re has quit [Ping timeout: 256 seconds]
malconis has joined #ruby
allomov has quit [Remote host closed the connection]
<zrowe007> I'm trying to use tinyTDS, but keep getting an 'Adaptive Server connection failed' error in irb, and also through the interpreter tds_version=>5, even though i passed in tds_version: '70'
SaintMoriarty has joined #ruby
SaintMoriarty has quit [Remote host closed the connection]
<zrowe007> could that be a printing error
EllisTAA has joined #ruby
lxsameer has quit [Quit: Leaving]
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aphprentice has joined #ruby
eggoez has joined #ruby
mandarinkin has quit [Quit: Leaving]
benlieb has quit [Quit: benlieb]
Rollabunna has joined #ruby
allomov has joined #ruby
EllisTAA has quit [Client Quit]
<centrx> zrowe007, Why does the error have to be caused by the version?
graydot has joined #ruby
roolo has quit [Remote host closed the connection]
t0rrieri has quit [Quit: Be back later ...]
graydot has quit [Client Quit]
thejoecarroll has quit [Quit: ZNC - http://znc.in]
ndrei_ has quit [Ping timeout: 244 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
slumos has left #ruby [#ruby]
jerius has quit [Quit: /part]
<zrowe007> centrx: it isn't, i found the mapping in the source code
swgillespie has joined #ruby
roolo has joined #ruby
ndrei has quit [Ping timeout: 248 seconds]
<zrowe007> centrx: i'm just befuddled as to why it works on the connand line and not in ruby
serivich has joined #ruby
<zrowe007> *command
Musashi007 has joined #ruby
thejoecarroll has joined #ruby
fgo has joined #ruby
ndrei has joined #ruby
sofija has quit [Ping timeout: 244 seconds]
wrbtrader has left #ruby [#ruby]
Rollabunna has quit [Ping timeout: 248 seconds]
eggoez has quit [Ping timeout: 256 seconds]
ndrei_ has joined #ruby
hk33801 has quit [Quit: WeeChat 1.2]
allomov has quit [Ping timeout: 256 seconds]
graydot has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
<zrowe007> here's my gist of what happens: https://gist.github.com/zr2d2/6b26a5d3f8e4a1ff4727
malconis has quit [Ping timeout: 252 seconds]
jhack has joined #ruby
hj2007 has quit [Quit: This computer has gone to sleep]
leat3 has quit [Remote host closed the connection]
leat3 has joined #ruby
roolo has quit [Ping timeout: 244 seconds]
icebourg has quit []
dimasg has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
alvaro_o has quit [Quit: Ex-Chat]
fallen_ has joined #ruby
<centrx> zrowe007, does it want 71 instead of 70?
benlieb has joined #ruby
<centrx> zrowe007, Are you able to use that dpa.USNG2 database from the command-line? Maybe the DB is supposed to be just 'USNG2' excluding the schema?
jbw has quit [Ping timeout: 246 seconds]
Mia has joined #ruby
Mia has joined #ruby
dh64 has joined #ruby
jbw has joined #ruby
Yzguy has joined #ruby
Rickmasta has joined #ruby
danzilio has quit [Quit: Baiii!]
thiagovsk has joined #ruby
sp33drac3r has quit [Quit: Textual IRC Client: www.textualapp.com]
fabrice31 has joined #ruby
havenwood has joined #ruby
pepperbreath has joined #ruby
<zrowe007> well it dies at TinyTds::Client.new user: ENV['mssql_user'], password: ENV['mssql_pw'], host: 'content.femadata.com'
Axy has quit [Ping timeout: 246 seconds]
nofxx has quit [Ping timeout: 244 seconds]
eggoez has joined #ruby
Thomas-0725 has joined #ruby
EllisTAA has joined #ruby
dimasg has quit [Ping timeout: 248 seconds]
<toretore> zrowe007: the file you gisted is not the file you're getting the error from
Musashi007 has quit [Quit: Musashi007]
fabrice31 has quit [Ping timeout: 244 seconds]
EllisTAA has quit [Client Quit]
k3asd` has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
<zrowe007> toretore: there were some other methods that confused someone, so i removed it
mikepack has quit [Remote host closed the connection]
Zinja has joined #ruby
abbe has quit [Ping timeout: 258 seconds]
flori has joined #ruby
Killerkeksdose_ has joined #ruby
Musashi007 has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
flori_ has quit [Ping timeout: 246 seconds]
Killerkeksdose has quit [Ping timeout: 246 seconds]
quazimod1 has quit [Ping timeout: 252 seconds]
quazimodo has quit [Ping timeout: 256 seconds]
TheHodge has joined #ruby
abbe has joined #ruby
blackmes1 has quit [Quit: WeeChat 1.2]
McSoFake has joined #ruby
<zrowe007> I update it so the lines match up
McSoFake is now known as Guest15971
dimasg has joined #ruby
Guest15971 has quit [Client Quit]
speaking1ode has joined #ruby
<toretore> zrowe007: you should always gist whole files, this still looks like it's missing some parts
tkuchiki has joined #ruby
<toretore> but anyway, try writing a new file containing only what's required to produce the error
jesterfraud has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<toretore> i.e. only the db connection parts, with hardcoded values
fantazo has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
m4rCsi_ has quit [Ping timeout: 264 seconds]
EllisTAA has joined #ruby
EllisTAA has quit [Client Quit]
kirun has quit [Quit: Client exiting]
casadei_ has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
dimasg has quit [Ping timeout: 252 seconds]
gamename has quit [Remote host closed the connection]
swgillespie has joined #ruby
rubie has quit [Remote host closed the connection]
xkef_ has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
radialneon has joined #ruby
xkef has quit [Ping timeout: 244 seconds]
m4rCsi has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
ruurd has joined #ruby
Lucky_ has joined #ruby
t0rrieri has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
pengin has quit [Remote host closed the connection]
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
<ruurd> zzzzz
<zrowe007> toretore: there, it still shows the same thing
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruurd has quit [Client Quit]
t0rrieri has quit [Client Quit]
m4rCsi has quit [Client Quit]
Vols has quit [Ping timeout: 248 seconds]
eggoez has quit [Ping timeout: 256 seconds]
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pengin_ has joined #ruby
eggoez has joined #ruby
<SirFunk> Is there any way to save off old methods (like alias_method) when doing object.extend(Module) ?
Ropeney has joined #ruby
nahtnam has quit [Quit: Connection closed for inactivity]
Vols has joined #ruby
<wallerdev> you could loop through the object's methods and alias them
icarus_ has quit [Remote host closed the connection]
rcvalle has quit [Quit: rcvalle]
<toretore> zrowe007: you should probably not include the password in the gist though ;)
benlieb has quit [Ping timeout: 255 seconds]
tkuchiki has quit [Remote host closed the connection]
<SirFunk> hmm
<zrowe007> yeah, i've been doing that
<SirFunk> wallerdev: trying to do something with self.extended
<zrowe007> I'll change it
<toretore> zrowe007: so that means either the parameters are wrong, or the server isn't available
<zrowe007> hmm, but the connection works on the command line with tsql
<toretore> zrowe007: where's the debug output coming from?
<toretore> {:user=>"dpa_reset", :password=>"...", etc}
bungoman_ has joined #ruby
<toretore> double check that you're using the same credentials, hostname, port number, etc
<wallerdev> SirFunk: well you can call super to call the old one
<wallerdev> not totally sure what the goal is
<SirFunk> wallerdev: super doesn't work
<zrowe007> i did a puts on the options to the connect call inside client.rb
<wallerdev> really?
<toretore> SirFunk: it should work
<SirFunk> not when doing .extend
<zrowe007> the call thats failling inside the tiny_tds gem
<SirFunk> leme see if I can find a repl to paste an example
SaintMoriarty has joined #ruby
<SaintMoriarty> hello!
Rollabunna has joined #ruby
<wallerdev> >> module Cool; def wow; puts 5; super; end end; module Rawr; def wow; puts 10; end end; x = Object.new.extend(Rawr).extend(Cool).wow
<ruboto> wallerdev # => 5 ...check link for more (https://eval.in/400335)
j4cknewt has joined #ruby
<SirFunk> oh crap
<SaintMoriarty> for some reason I am running rails start -b 0.0.0.0 and its still only available on the host
<SirFunk> I swear that didn't work before
<SirFunk> lol
<SirFunk> nvm then
<zrowe007> TDSVER=7.1 tsql -H content.femadata.com -p 1433 -U dpa_reset
<zrowe007> yup, looks the same to me
finisherr has left #ruby [#ruby]
bungoman has quit [Ping timeout: 256 seconds]
<SaintMoriarty> anyone?
<Ox0dea> zrowe007: Why on earth are you posting credentials in IRC?
MagePsycho has quit [Quit: MagePsycho]
<wallerdev> yolo
bungoman_ has quit [Ping timeout: 264 seconds]
<Ox0dea> You Only Login Once.
<dfockler> and then someone hacks you and you can't login again
<Ox0dea> ^
baweaver has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 248 seconds]
centrx has quit [Ping timeout: 250 seconds]
<Coraline> It's okay, there's only 1032 people here.
<toretore> just delete it quickly and it'll be fine
ttilley has quit [Quit: Leaving...]
m4rCsi has joined #ruby
<Ox0dea> Yeah, the Internet forgets things almost immediately.