havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8; 2.0.0-p648: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<apeiros> hell no :D
<corecode> well, ruby libusb segfaults
<corecode> fantastic
<apeiros> I think both of my suggestions are better. the one with the method being the better of the two.
karapetyan has quit [Ping timeout: 255 seconds]
<lucasb> apeiros: hm, ok. let's agree that there's more than way to do it :)
<corecode> i think tap is elegant enough
<apeiros> lucasb: your 1.times do … end is essentially the same as ->(){}.(), just more convoluted :)
<apeiros> or rather, even less intention revealing?
<corecode> how does that create a newly scoped variable?
<apeiros> "that"?
jxs_ has joined #ruby
<apeiros> though, both possible "that"'s do it the same way - by having their own scope.
<lucasb> the only thing I don't like about 1.times is the singular/plural mismatch :)
<corecode> 1.times do ... end
<lucasb> corecode: ^^ that's a block, and it has it's own scope
<volty> the only 'clean' way to get it is to eval "lambda { #{val} }"
robbyoconnor has quit [Quit: Konversation terminated!]
<apeiros> oh dear
<volty> so that you have an immediate value
<corecode> lucasb: oh, on the outside; yes.
<apeiros> volty: immediates are not that
<volty> otherwise you end with soup code or ...
<volty> apeiros: sorry, i meant a constant value
<apeiros> nil, true, false, fixnums and symbols are immediates.
<corecode> well, anyways, seems i can't use it anyways
<corecode> because libusb is crashing the program
<corecode> so no parallelism for me
user083 has joined #ruby
al2o3-cr has quit [Ping timeout: 250 seconds]
<apeiros> corecode: no parallelism in a part of your app maybe
<apeiros> unless libusb has a problem even when interfacing with it is unthreaded.
<volty> corecode: where it crashes, at start ?
<corecode> i am unthreaded
<corecode> i'm just submitting transfers in parallel
<corecode> after a while, poof
<apeiros> corecode: ok, then I don't get your "no parallelism for me" comment
CloCkWeRX has joined #ruby
<apeiros> sounded like you had issues with libusb when using it in a threaded app.
<corecode> no, single thread, multiple outstanding transfers
<volty> corecode: do you call ruby methods on return values from usblib ?
djbkd has quit [Quit: My people need me...]
<corecode> volty: i do what?
<volty> it happened to me with String#sub on lib values, for example
<volty> external references come and go
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
<volty> (happened with taglib)
PERSIAN has quit []
myntcake has joined #ruby
myntcake has quit [Client Quit]
firstdayonthejob has quit [Ping timeout: 240 seconds]
<apeiros> sounds like a bug
<volty> apeiros: it all works fine now, just passing my filename along, instead of using taglib's Fileref.filename (or like that)
d0nn1e has quit [Ping timeout: 250 seconds]
tubuliferous_ has joined #ruby
kuon has quit [Quit: Lost terminal]
d0nn1e has joined #ruby
pawnbox has quit [Remote host closed the connection]
tubuliferous_ has quit [Ping timeout: 260 seconds]
TomyLobo has quit [Ping timeout: 245 seconds]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
gbgdev has joined #ruby
Melpaws has quit [Quit: Leaving.]
tuelz1 has joined #ruby
lucasb has quit [Quit: leaving]
sftrabbit has quit [Quit: sftrabbit]
chipotle_ has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
fourq is now known as fourq|away
zacts has quit []
cpup has quit [Ping timeout: 265 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
zacts has joined #ruby
FernandoBasso has quit [Quit: Leaving]
cpup has joined #ruby
zeroDivisible has joined #ruby
<awox> is there a basic equivalent to pylint?
fourq|away is now known as fourq
<awox> something that will tell me why my code is terrible without having to show another human would be nice
sandstrom has joined #ruby
<havenwood> awox: rubocop is one option
pawnbox has joined #ruby
tuelz1 has quit [Ping timeout: 276 seconds]
<awox> 1 file inspected, 42 offenses detected
<awox> brutal
zacts has quit [Client Quit]
<awox> Use 2 (not 4) spaces for indentation.
<awox> is this a thing?
<havenwood> awox: Absolutely.
<jhass> yes!
fourq is now known as fourq|away
<awox> what if I use tabs instead?
zacts has joined #ruby
<havenwood> awox: Nooo. Two-spaced soft tabs.
<awox> holy crap 100 offenses
fourq|away is now known as fourq
<awox> rubocop is even easier to piss off than my girlfriend
bronson has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
<awox> Space inside parentheses detected.
<awox> why is this a thing?
pawnbox has quit [Ping timeout: 240 seconds]
<awox> @doc.root << ( XML::Node.new('entity') << entity ) is much more readable than @doc.root << (XML::Node.new('entity') << entity) no?
chipotle has joined #ruby
<jhass> I'd prefer a local there actually
<awox> a local?
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> >> local_variables
<ruby[bot]> havenwood: # => [] (https://eval.in/503206)
<jhass> container = XML::Node.new('entity'); root << entity; @doc.root << container
<jhass> eh s/root/container/
bronson has quit [Ping timeout: 265 seconds]
hannelita has joined #ruby
pawnbox has joined #ruby
Yzguy has joined #ruby
Yzguy has quit [Max SendQ exceeded]
janebootydoe has joined #ruby
n00bdev has quit [Remote host closed the connection]
snowball_ has joined #ruby
usershell has joined #ruby
hannelita has quit [Ping timeout: 240 seconds]
northfurr has quit [Quit: northfurr]
janebootydoe has quit [Client Quit]
casadei has joined #ruby
sleepee has joined #ruby
usershell has quit [Read error: Connection reset by peer]
rkazak has quit [Quit: Sleep.....ing....]
janebootydoe has joined #ruby
northfurr has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Mon_Ouie has joined #ruby
usershell has joined #ruby
snowball_ has quit [Client Quit]
al2o3-cr has joined #ruby
sandstrom has joined #ruby
pawnbox has quit [Ping timeout: 272 seconds]
northfurr has quit [Client Quit]
northfurr has joined #ruby
usershell has quit [Ping timeout: 245 seconds]
chipotle has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 240 seconds]
chipotle has joined #ruby
al2o3-cr has quit [Client Quit]
pawnbox has joined #ruby
janebootydoe has quit [Quit: Leaving]
<awox> https://gist.github.com/kbni/85c28e8d24a1007e4a86 behold my terrible first ruby thing (for anyone interested in offering harsh feedback)
<awox> not sure how I feel about the whole @ thing, but I think using self. behaves differently :S
ericfreese has joined #ruby
dlitvak has joined #ruby
B1n4r10 has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JohnT has joined #ruby
dlitvak has quit [Ping timeout: 245 seconds]
chipotle has quit [Read error: Connection reset by peer]
newbie has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
disconnekted has joined #ruby
chipotle has joined #ruby
newbie is now known as Guest27320
JohnT has quit [Client Quit]
hahuang65 has joined #ruby
crdpink2 has quit [Ping timeout: 240 seconds]
yqt has quit [Ping timeout: 255 seconds]
sandstrom has joined #ruby
crdpink2 has joined #ruby
pawnbox has joined #ruby
aspire has joined #ruby
emilford has joined #ruby
jbrhbr has quit [Quit: Leaving.]
volty has quit [Quit: Konversation terminated!]
cndiv has joined #ruby
northfurr has quit [Quit: northfurr]
casadei has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
casadei has joined #ruby
pawnbox has quit [Ping timeout: 265 seconds]
jam_ has joined #ruby
graffix222 has quit [Ping timeout: 260 seconds]
<atmosx> hell
<atmosx> o
<atmosx> I wonder, can capistrano be used to connect via cli to a remote host and issue instructions to a postgresql db? like create new role etc.
chipotle has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
pawnbox has joined #ruby
marr has quit [Ping timeout: 265 seconds]
freerobby has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
fourq is now known as fourq|away
BTRE has quit [Quit: Leaving]
myntcake has joined #ruby
sandstrom has joined #ruby
krobzaur has quit [Ping timeout: 260 seconds]
fourq|away is now known as fourq
northfurr has joined #ruby
Darmani has quit [Ping timeout: 252 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tuelz1 has joined #ruby
spider-mario has quit [Remote host closed the connection]
SCHAAP137 has quit [Remote host closed the connection]
disconnekted has quit [Remote host closed the connection]
dlitvak has joined #ruby
arob has joined #ruby
Limix has quit [Quit: Limix]
ico has joined #ruby
hannelita has joined #ruby
hahuang65 has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
cholq has joined #ruby
tuelz1 has quit [Ping timeout: 264 seconds]
dlitvak has quit [Ping timeout: 265 seconds]
nchambers has joined #ruby
cndiv has quit [Quit: Be back later ...]
Channel6 has joined #ruby
cholq has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 245 seconds]
rkazak has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
sandstrom has joined #ruby
marcdel has joined #ruby
pawnbox has joined #ruby
jam_ has quit [Ping timeout: 240 seconds]
dangeranger has joined #ruby
jam_ has joined #ruby
DLSteve has joined #ruby
hahuang65 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
blackmesa has joined #ruby
pawnbox has quit [Ping timeout: 255 seconds]
yeticry has joined #ruby
northfurr has quit [Quit: northfurr]
ruby[bot] has joined #ruby
northfurr has joined #ruby
pawnbox has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
yeticry_ has quit [Ping timeout: 250 seconds]
ruby[bot] has quit [Client Quit]
emilford has quit [Ping timeout: 260 seconds]
sandstrom has joined #ruby
hahuang65 has quit [Quit: WeeChat 1.4]
karapetyan has joined #ruby
hahuang65 has joined #ruby
dbugger has quit [Ping timeout: 276 seconds]
emilford has joined #ruby
northfurr has quit [Ping timeout: 276 seconds]
pawnbox has quit [Ping timeout: 276 seconds]
myntcake has quit [Quit: Leaving]
karapetyan has quit [Ping timeout: 255 seconds]
chipotle has quit [Read error: Connection reset by peer]
chipotle_ has joined #ruby
ruby[bot] has joined #ruby
akem has joined #ruby
<apeiros> !unban cwong_on_irc
<ruby[bot]> apeiros: I could not identify any bans matching the nick "cwong_on_irc"
underplank has joined #ruby
pawnbox has joined #ruby
s00pcan has quit [Ping timeout: 250 seconds]
al2o3-cr has joined #ruby
s00pcan has joined #ruby
tomeara has quit [Ping timeout: 240 seconds]
wolffles has quit [Quit: wolffles]
underplank has quit [Client Quit]
<dorei> there's probably a bug with the bot :p
arescorpio has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
ruby[bot] has quit [Quit: leaving]
pawnbox has quit [Ping timeout: 246 seconds]
ruby[bot] has joined #ruby
sandstrom has joined #ruby
hightower2 has joined #ruby
hahuang65 has quit [Quit: WeeChat 1.4]
<hightower2> Hey, the only type of variable I can define at the Module level is a constant, right?
hahuang65 has joined #ruby
<apeiros> hightower2: you can assign to all types of variables
<apeiros> they're just not all associated with the module
<hightower2> apeiros, right, right, I mean the ones which are associated directly to the module
<apeiros> 3 types can be related to the module: constants, instance variables and class variables
<hightower2> Another question, if I run some object.extend() , does the "included" Ruby callback get called, or some other callback?
pawnbox has joined #ruby
kalopsian has joined #ruby
<hightower2> Oh I see, it has the separate 'extended' callback. Ok.
rodolfowtf has quit [Read error: Connection reset by peer]
<apeiros> dorei: if it's only one ("a bug"), I'd actually be happy. I fear it's more.
rodolfowtf has joined #ruby
yfeldblum has quit [Remote host closed the connection]
oo7cat has joined #ruby
<oo7cat> hello
Rinalds has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 264 seconds]
tuelz1 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
UtkarshRay has quit [Remote host closed the connection]
haraigoshi has quit [Ping timeout: 264 seconds]
sandstrom has joined #ruby
tuelz1 has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
solocshaw has quit [Ping timeout: 276 seconds]
pawnbox has quit [Ping timeout: 264 seconds]
chipotle_ has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
dome22xl has joined #ruby
CloCkWeRX has quit [Ping timeout: 240 seconds]
hannelita has quit [Remote host closed the connection]
pawnbox has joined #ruby
cholq has joined #ruby
Rutix has quit []
norc_ has joined #ruby
<oo7cat> i can do ruby on windows?
norc__ has joined #ruby
<oo7cat> my os is windows xp now
jackjackdripper has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
jam_ has quit [Remote host closed the connection]
Azure has quit [Ping timeout: 255 seconds]
akem has quit [Quit: Bye]
<apeiros> oo7cat: yes. ruby runs on windows.
<apeiros> ah, dome22xl was faster.
sandstrom has joined #ruby
<oo7cat> http://rubyinstaller.org/downloads/ <—— this is not original ruby? dome22xl
<dome22xl> Yeah you might need to look in the archives but there is 32bit - 64bit release for XP you'll need a 32bit obviously should be ok
norc has quit [Ping timeout: 276 seconds]
clueless_arthrop has joined #ruby
rodolfowtf has quit [Ping timeout: 272 seconds]
pawnbox has quit [Ping timeout: 250 seconds]
<oo7cat> they may have virus, because it is not public ruby. dome22xl ?
emilford has quit [Ping timeout: 245 seconds]
vikas027 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<oo7cat> what os is better for running ruby? apeiros ?
<apeiros> oo7cat: it's the official ruby compiled for windows for you. if you don't want that, you have to compile it yourself. you find the sources linked on ruby-lang.org
northfurr has joined #ruby
<apeiros> oo7cat: I'm biased. everything is better than windows for everything but games and ms office.
rodolfowtf has joined #ruby
howdoicomputer has quit [Ping timeout: 255 seconds]
<oo7cat> ok apeiros i want use ide, what ide is good for ruby?
jam_ has joined #ruby
<apeiros> IMO text editors are sufficient with ruby. but if you insist on an IDE then probably rubymine by jetbrains.
<apeiros> ?ide
<ruby[bot]> apeiros: I don't know anything about ide
<oo7cat> how about eclipse? apeiros
pawnbox has joined #ruby
<apeiros> !fact add ide an IDE is not necessary to develop with ruby. A decent text editor is sufficient. If you truly want an IDE, take a look at RubyMine by JetBrains (https://www.jetbrains.com/ruby/).
<ruby[bot]> apeiros: I will remember that ide is an IDE is not necessary to develop with ruby. A decent text editor is sufficient. If you truly want an IDE, take a look at RubyMine by JetBrains (https://www.jetbrains.com/ruby/).
<apeiros> oo7cat: well, I suppose they've got materials online which can tell you whether it'll work for ruby?
griffindy has joined #ruby
<dome22xl> Ecilpse dropped the support for Ruby a while back thats why there are Ruby versions of Eclipse like Rubymine / Komodo
casadei has quit [Remote host closed the connection]
<dome22xl> I just use Geany on Linux
<dome22xl> does the job very well.
Azure has joined #ruby
cholq has quit [Remote host closed the connection]
<oo7cat> ok thanks
cholq has joined #ruby
oo7cat has left #ruby [#ruby]
cholq has quit [Client Quit]
<dome22xl> I've tried Komodo recently and ok but i didn't get on with it back to Geany
<apeiros> they left
rkoller has quit [Ping timeout: 265 seconds]
<dome22xl> Just thinking if your on XP then checkout Editplus has Ruby syntax highlighting and supports XP
fsapo has joined #ruby
Abrin has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
Sirithcam has quit [Ping timeout: 256 seconds]
Limix has joined #ruby
sandstrom has joined #ruby
chipotle has quit [Quit: cheerio]
fedexo has joined #ruby
pawnbox has joined #ruby
jbrhbr has joined #ruby
jbrhbr has quit [Client Quit]
<dome22xl> aperios - what your opinion of calling a function after unless - i.e print_to_screen(linecounter, text_highlighter(data), quietmode) unless skip(linecounter)
<apeiros> ?tabnick dome22xl
<ruby[bot]> dome22xl: pro-tip - use tab completion for nicks. avoids typos in nicks.
<apeiros> method after unless is fine IMO
Limix has quit [Quit: Limix]
<dome22xl> Yeah thought about it the other day yet it kind of had me in the does that look right thing
Jardayn has quit [Quit: Leaving]
krobzaur has joined #ruby
<dome22xl> works well
sleepee has quit [Ping timeout: 256 seconds]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
rkazak has quit [Quit: Sleep.....ing....]
dlitvak has quit [Remote host closed the connection]
ico has quit [Remote host closed the connection]
fsapo has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
rkazak has joined #ruby
<Ebok> When you have two arrays with variables, ex: foo = [1,1,2,3] ; bar = [1,2]. And you want to get the output foobar = [1,3]. (non set subtraction) is there a good way to go about this? I ended up writing a monkeypatch array the turned one into a string, and iterated sub! over it before joining it again. Feels heavy handed.
hightower2 has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
hightower2 has joined #ruby
sandstrom has joined #ruby
<apeiros> Ebok: retaining order? i.e. foo = [1,2,3,1]; foo.your_minus(bar) # => [3,1]?
<dome22xl> foo.first / foo.last ?
<Ebok> I dont care about the order, personally.
<Ebok> Although that seems like a detail that could be important
<Ebok> And yeah, my #my_minus returns [3,1]
jam_ has quit [Remote host closed the connection]
<dome22xl> You should probably look at delete_at and index in the Array class
<Ebok> Alright
<apeiros> >> foo = [1,1,2,3] ; bar = [1,2]; subtrahend = bar.each_with_object(Hash.new(0)) { |h,e| h[e] += 1 }.to_h; foo.reject { |e| (subtrahend[e] -= 1) > 0 }
pawnbox has quit [Ping timeout: 255 seconds]
<apeiros> bad bot
tuelz1 has joined #ruby
<Ebok> I've never seen each_with_object. that's pretty cool
graffix222 has joined #ruby
<apeiros> ah fuck, I accidentally deleted the channels in the config. so stupid.
dlitvak has joined #ruby
kalopsian has quit [Ping timeout: 264 seconds]
usershell has joined #ruby
tuelz1 has quit [Ping timeout: 245 seconds]
ruby[bot] has quit [Quit: leaving]
ruby[bot] has joined #ruby
pawnbox has joined #ruby
krobzaur has quit [Ping timeout: 272 seconds]
Jardayn has joined #ruby
ruby[bot] has quit [Client Quit]
UtkarshRay has joined #ruby
ruby[bot] has joined #ruby
Jardayn has quit [Client Quit]
sandstrom has quit [Quit: My computer has gone to sleep.]
<apeiros> >> foo = [1,1,2,3] ; bar = [1,2]; subtrahend = bar.each_with_object(Hash.new(0)) { |h,e| h[e] += 1 }.to_h; foo.reject { |e| (subtrahend[e] -= 1) > 0 }
<ruby[bot]> apeiros: # => no implicit conversion of Hash into Integer (TypeError) ...check link for more (https://eval.in/503210)
pawnbox has quit [Ping timeout: 260 seconds]
<apeiros> >> foo = [1,1,2,3] ; bar = [1,2]; subtrahend = bar.each_with_object(Hash.new(0)) { |e,h| h[e] += 1 }.to_h; foo.reject { |e| (subtrahend[e] -= 1) > 0 }
<ruby[bot]> apeiros: # => [1, 1, 2, 3] (https://eval.in/503211)
<apeiros> hmmm
dlitvak has quit [Remote host closed the connection]
sandstrom has joined #ruby
davedev24 has joined #ruby
bkxd_ has quit [Ping timeout: 272 seconds]
bkxd has joined #ruby
dlitvak has joined #ruby
<apeiros> ah, off-by-one. silly me.
<apeiros> >> foo = [1,1,2,3] ; bar = [1,2]; subtrahend = bar.each_with_object(Hash.new(0)) { |e,h| h[e] += 1 }.to_h; foo.reject { |e| (subtrahend[e] -= 1) >= 0 }
<ruby[bot]> apeiros: # => [1, 3] (https://eval.in/503212)
<apeiros> retains order. is O(n+m).
diegoviola has quit [Quit: WeeChat 1.3]
_Tariq has joined #ruby
pawnbox has joined #ruby
<Ebok> Very cool aperios
<Ebok> thankyou
terminalrecluse has joined #ruby
<apeiros> ?tabnick Ebok
<ruby[bot]> Ebok: pro-tip - use tab completion for nicks. avoids typos in nicks.
<apeiros> it's one of those days…
<Ebok> Fair
<Ebok> ^_^
<Nilium> I wrote my own IRC client and my tab-complete just writes out apeiros.
dlitvak has quit [Ping timeout: 265 seconds]
<Abrin> I have a super n00b question I hope someone can help me with please.
<dome22xl> ok
dlitvak has joined #ruby
<Abrin> Is there a way to change the verison of ruby you are using via the cmd line in Windows.
<Abrin> My default is 2 but I am follow a book that using 1.9.3
pawnbox has quit [Ping timeout: 272 seconds]
Guest27320 has quit [Ping timeout: 256 seconds]
<Abrin> sorry if that is a truly stupid question. I am so used to living in a point and click world so the command line is cryptic and exotic to me.
<havenwood> Abrin: 1.9 is past end of life so maybe just use 2 anyways. One option for switching on Windows is uru: https://bitbucket.org/jonforums/uru
erlang437 has joined #ruby
<Abrin> havenwood: Thanks for the option. Sadly, the baby beginners book I have is for 1.9.3 so that is why I was using them both.
<apeiros> Abrin: about everything which works in 1.9, works the same in 2.x
ericfreese has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
<Abrin> oh! I've ran into two problems so far that have been vexing me. One was I couldn't get ARVG to pass variables written in a piece of code as the tutorial suggested and then I switched to this book and then I just had a synax error that I don't understand why I got. I'll keep hitting my head against it. If they both should work then the problem by default has got to be something I am doing. Thanks so much for the great advice. :)
<Abrin> I don't know much about Ruby at all so I was kind of fearful that I was in a Python like situation where everything changed so much between 2 and 3.
Bulo has joined #ruby
casadei has joined #ruby
govg has joined #ruby
<apeiros> Abrin: I go offline now. but gist your code (gist.github.com) and your exception, then somebody certainly will help you.
<apeiros> s/offline/afk/
aspire has quit [Quit: Leaving]
fedexo has quit [Remote host closed the connection]
fedexo has joined #ruby
<Abrin> I am going to assume that the problem is on my end since it the the safest bet so I'll just keep hitting my head against it. I really do appreciate everyone's help since it does let me know that I should be fine with either verison. You all are super awesome. Thanks. <3
pawnbox has quit [Ping timeout: 272 seconds]
casadei has quit [Ping timeout: 240 seconds]
Bulo has quit []
zotherstupidguy has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
braincrash has quit [Quit: bye bye]
BTRE has joined #ruby
Wsewolod has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
pawnbox has joined #ruby
jam_ has joined #ruby
Yzguy has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
terminalrecluse is now known as gigatexal
RobertBirnie has joined #ruby
clueless_arthrop has quit [Quit: Page closed]
pawnbox has quit [Ping timeout: 276 seconds]
braincrash has joined #ruby
dlitvak_ has joined #ruby
hannelita has joined #ruby
dorei has quit []
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
dlitvak has quit [Ping timeout: 245 seconds]
colegatron has quit [Ping timeout: 240 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
dlitvak_ has quit [Remote host closed the connection]
sandstrom has joined #ruby
fedexo_ has joined #ruby
tuelz1 has joined #ruby
baweaver has quit [Remote host closed the connection]
fedexo has quit [Ping timeout: 250 seconds]
govg has quit [Ping timeout: 260 seconds]
dome22xl has quit [Ping timeout: 252 seconds]
govg has joined #ruby
tuelz1 has quit [Ping timeout: 246 seconds]
symm- has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
davedev24 has quit []
colegatron has joined #ruby
oo7cat has joined #ruby
howdoicomputer has joined #ruby
<oo7cat> i don’t know the meaning of ‘API’, who can explaint it to me easily?
symm- has joined #ruby
<_Tariq> oo7cat: An API is the public methods that you can call on an object
<_Tariq> many websites have an API, which allows you to call certain methods and get results
<_Tariq> but some of those methods are private and are not part of the API
<oo7cat> oh thanks _Tariq, if API is made with java, then i can call it with ruby?
<oo7cat> if API is made by java, then i can call it with ruby?
sandstrom has quit [Quit: My computer has gone to sleep.]
jackjackdripper has quit [Quit: Leaving.]
govg has quit [Ping timeout: 250 seconds]
hypermist has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
<hypermist> I cannot tell if this is the right place to ask this as its rails/rake
northfurr has joined #ruby
<_Tariq> oo7cat: I don.
<hypermist> Psych::SyntaxError: (<unknown>): did not find expected key while parsing a block mapping at line 6 column 3
<oo7cat> don?
<hypermist> i get this error, when i run bundle exec rake db:setup
<hypermist> , i've checked the yaml, its vaild
ByronJoh1son is now known as ByronJohnson
<_Tariq> oo7cat: I don't think so.
ByronJohnson has quit [Changing host]
ByronJohnson has joined #ruby
<_Tariq> It was a typo on my end.
sandstrom has joined #ruby
hannelita has quit [Remote host closed the connection]
<oo7cat> thanks _Tariq
dlitvak has joined #ruby
<oo7cat> i want make API of ruby hyperdri-
<oo7cat> hypermist:
<hypermist> what oo7cat ?
usershell has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 260 seconds]
<oo7cat> API question.
<oo7cat> is related with ruby hypermist
<hypermist> I dont know anything about ruby
tjohnson has quit [Quit: Connection closed for inactivity]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<_Tariq> oo7cat: Usually when you hear about APIs, it's really in relation to websites
howdoicomputer has quit [Ping timeout: 276 seconds]
<_Tariq> etc.
<_Tariq> So if you want to make an API that other people can use, even if they don't have the same language, you generally have to make a website
<_Tariq> Which would mean using a Ruby framework such as Ruby on Rails
<_Tariq> There's even a project called Rails-API
<_Tariq> that can help you with making an API
<_Tariq> but I don't know the exact details.
pawnbox has joined #ruby
Abrin has quit [Quit: Nettalk6 - www.ntalk.de]
<_Tariq> As for your Java question, if your Java API is online, so you can interact with the API using curl, browser, etc.
<_Tariq> then maybe you can write a Ruby program to interact with that Java API by having that Ruby program act as a virtual browser
<_Tariq> I'm sorry if this sounds way too technical.
<oo7cat> no
<oo7cat> it is very helpful to me thanks :)
<oo7cat> _Tariq:
renatosilva has joined #ruby
<_Tariq> you're welcome
ohaibbq has joined #ruby
nerium has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
pawnbox has quit [Ping timeout: 264 seconds]
symm- has joined #ruby
karen96 has joined #ruby
gix has quit [Ping timeout: 264 seconds]
karen96 has left #ruby [#ruby]
dlitvak has joined #ruby
freerobby has quit [Quit: Leaving.]
nerium has quit [Ping timeout: 260 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
<hypermist> is rails or rake apart of ruby
gix has joined #ruby
_Tariq has quit [Remote host closed the connection]
rkazak has quit [Quit: Sleep.....ing....]
hightower2 has quit [Ping timeout: 245 seconds]
pawnbox has joined #ruby
sandstrom has joined #ruby
renatosilva has left #ruby ["http://pidgin.renatosilva.me - Pidgin++"]
Dicki has joined #ruby
casadei has joined #ruby
<Radar> rake comes with Ruby by default
<Radar> rails is a gem which is an optional package that you can choose to install
freerobby has joined #ruby
<hypermist> Radar, only reason i asked that is because
<hypermist> Psych::SyntaxError: (<unknown>): did not find expected key while parsing a block mapping at line 6 column 3 i get this error, when i run bundle exec rake db:setup
<hypermist> i've also checked the yml file
<Radar> hypermist: Your database.yml is badly formatted.
<Radar> ?rails hypermist
<ruby[bot]> hypermist: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<hypermist> well i did a yml test and it was nice haha
Dicki has quit [Client Quit]
pawnbox has quit [Ping timeout: 240 seconds]
renderfu_ has quit [Read error: Connection reset by peer]
symm- has quit [Ping timeout: 264 seconds]
_Tariq has joined #ruby
casadei has quit [Ping timeout: 265 seconds]
renderfu_ has joined #ruby
bluOxigen has joined #ruby
puria has joined #ruby
B1n4r10 has quit [Ping timeout: 265 seconds]
agent_white has joined #ruby
<agent_white> Evenin'
<Radar> good evening agent_white
yon0 has joined #ruby
yon0 has left #ruby ["+++"]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
northfurr has quit [Quit: northfurr]
pawnbox has joined #ruby
agent_white has quit [Client Quit]
sandstrom has quit [Quit: My computer has gone to sleep.]
Meow-J has joined #ruby
agent_white has joined #ruby
sandstrom has joined #ruby
Fezzler has joined #ruby
pawnbox has quit [Ping timeout: 256 seconds]
govg has joined #ruby
Fezzler has quit [Client Quit]
ericfreese has joined #ruby
freerobby has quit [Quit: Leaving.]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Yzguy has quit [Quit: Zzz...]
ponga has joined #ruby
pawnbox has joined #ruby
ericfreese has quit [Ping timeout: 264 seconds]
ericfreese has joined #ruby
tuelz1 has joined #ruby
<shevy> is .object_id returning negative numbers by default? I wonder if I messed something up... things like this return negative IDs here for me: x = "foo"; x.object_id # => -573087428
pawnbox has quit [Ping timeout: 240 seconds]
dlitvak has quit [Remote host closed the connection]
_Tariq has quit []
sandstrom has quit [Quit: My computer has gone to sleep.]
sandstrom has joined #ruby
tuelz1 has quit [Ping timeout: 255 seconds]
agent_white has quit [Quit: brb]
ericfreese has quit [Quit: WeeChat 1.4]
ericfreese has joined #ruby
gigatexal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
aganov has quit [Ping timeout: 250 seconds]
arescorpio has quit [Quit: Leaving.]
erlang437 has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
kalopsian has joined #ruby
oo7cat has left #ruby [#ruby]
fsapo has joined #ruby
Ox0dea has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 265 seconds]
hannelita has joined #ruby
<Ox0dea> >> ObjectSpace._id2ref(-573087428) rescue $! # shevy
<ruby[bot]> Ox0dea: # => #<RangeError: 0xddd7613c is not id value> (https://eval.in/503244)
usershell has joined #ruby
<shevy> hmm
zast has quit [Remote host closed the connection]
<eam> negative object ids are legit
<Ox0dea> They are, but odd ones are not.
<eam> I assume that's just ruby doing something silly by turning them into a signed integer type
<eam> Ox0dea: sure, odd negative object ids are legit
<Ox0dea> Nope.
<eam> >> ObjectSpace._id2ref -1
<ruby[bot]> eam: # => -1 (https://eval.in/503245)
<Ox0dea> Err, right.
<eam> the identity object id :D
<eam> but you mean outside of integers
<Ox0dea> >> ObjectSpace.each_object.map(&:object_id).count(&:odd?)
<ruby[bot]> Ox0dea: # => 0 (https://eval.in/503246)
<Ox0dea> Right, Fixnums are just tagged pointers.
<eam> (which is where they're all used up!)
<eam> yeah
hannelita has quit [Ping timeout: 255 seconds]
<eam> what's the biggest pizza I can order
sandstrom has quit [Quit: My computer has gone to sleep.]
dangeranger has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> family pizza!
sandstrom has joined #ruby
fsapo has quit [Remote host closed the connection]
<Ox0dea> > Where else can you find a King Kong sized 24" pizza that feeds 8-10 people?
agent_white has joined #ruby
<shevy> lol king kong sized
WebDawg has joined #ruby
<WebDawg> I do not know much about ruby but I am working with https://github.com/staannoe/tracks
radgeRayden_ has joined #ruby
<WebDawg> At the bottom of the page it says: For production use it is highly recommended to update the site.yml.template within the build repo, rename it to site.yml then rebuild the container.
<WebDawg> Can someone tell me what he is talking about?
usershell has quit [Remote host closed the connection]
pawnbox has joined #ruby
usershell has joined #ruby
kalopsian has quit [Ping timeout: 265 seconds]
krz has joined #ruby
baweaver has joined #ruby
radgeRayden has quit [Ping timeout: 265 seconds]
lemur has joined #ruby
<shevy> mv site.yml.template site.yml
<shevy> guess he means site.yml.tmpl
<shevy> he should check his readme for consistency
sandstrom has quit [Quit: My computer has gone to sleep.]
pawnbox has quit [Ping timeout: 260 seconds]
<Ox0dea> And merge conflict residue.
baweaver has quit [Ping timeout: 276 seconds]
sandstrom has joined #ruby
<eam> Ox0dea: that's fantastic
darkf has joined #ruby
pawnbox has joined #ruby
rodolfowtf has quit [Remote host closed the connection]
<Ox0dea> eam: Are you getting a King Kong, then?
<shevy> lol
fuzzyfuzz has quit [Quit: WeeChat 1.3]
john has joined #ruby
<eam> I want one really bad
john is now known as fuzzyfuzz
fuzzyfuzz has quit [Client Quit]
devbug has joined #ruby
john has joined #ruby
john is now known as Guest69072
Guest69072 is now known as fuzzyfuzz
pawnbox has quit [Ping timeout: 260 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
lxsameer has joined #ruby
pawnbox has joined #ruby
sandstrom has joined #ruby
zotherstupidguy has joined #ruby
baweaver has joined #ruby
usershell has quit [Remote host closed the connection]
tuelz1 has joined #ruby
guacamole has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
guacamole has quit [Client Quit]
c355e3b has quit [Quit: Connection closed for inactivity]
baweaver has quit [Ping timeout: 240 seconds]
tuelz1 has quit [Ping timeout: 246 seconds]
houhouli_ has joined #ruby
speakingcode has quit [Ping timeout: 265 seconds]
rippa has joined #ruby
guacamole has joined #ruby
guacamole has quit [Client Quit]
kalopsian has joined #ruby
speakingcode has joined #ruby
pawnbox has joined #ruby
houhoulis has quit [Ping timeout: 272 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
howdoicomputer has joined #ruby
sandstrom has joined #ruby
hannelita has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
speakingcode has quit [Ping timeout: 264 seconds]
howdoicomputer has quit [Ping timeout: 246 seconds]
speakingcode has joined #ruby
blackgoat has joined #ruby
hannelita has quit [Ping timeout: 240 seconds]
dcunit3d has joined #ruby
cornerma1 has joined #ruby
riskish has joined #ruby
n00bdev_ has joined #ruby
yardenbar has joined #ruby
<kspencer> anyone seen 'jade' and its eeriely resemblence to slim
cornerman has quit [Ping timeout: 246 seconds]
cornerma1 is now known as cornerman
fedexo_ has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
linocisco has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
RobertBirnie has joined #ruby
sandstrom has joined #ruby
claw has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
usershell has joined #ruby
lemur has quit [Read error: Connection reset by peer]
casadei has joined #ruby
baweaver has joined #ruby
claw has joined #ruby
ruby-lang037 has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
ruby-lang037 has quit [Client Quit]
casadei has quit [Ping timeout: 250 seconds]
baweaver has quit [Ping timeout: 265 seconds]
arup_r has joined #ruby
CloCkWeRX has joined #ruby
iateadonut has joined #ruby
<djellemah> Ox0dea: I realised base 1 numbers would have to be some variation of a tally system, sure enough: https://en.wikipedia.org/wiki/Unary_numeral_system
<Ox0dea> djellemah: Indeed.
iateadonut has left #ruby [#ruby]
<Ox0dea> And either nothing or everything is valid in nullary.
<Ox0dea> That is, every string of "digits" represents either 0 or undefined.
<arup_r> Ox0dea: hi . how are you /
<arup_r> ?
minimalism has quit [Quit: minimalism]
<Ox0dea> arup_r: hey : not - bad , yourself \
linocisco has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
<Ox0dea> There's been an accident at the punctuation factory.
<arup_r> good to.. lot of works I got this year, so I am happy..
sandstrom has quit [Quit: My computer has gone to sleep.]
<arup_r> punctuation factory? :p
OxDeadC0de has joined #ruby
sandstrom has joined #ruby
eaxxae has joined #ruby
caffeinic has quit [Remote host closed the connection]
baweaver has joined #ruby
akem has joined #ruby
gbgdev has quit [Remote host closed the connection]
<djellemah> Ox0dea: Nullary, so that's what it's called. It can only represent 0, and there are no digits to represent it with.
<Ox0dea> arup_r: Are you still saving up to emigrate?
pawnbox has quit [Ping timeout: 246 seconds]
<Ox0dea> djellemah: So it clearly *should* be undefined, but the "asymmetry" irks me. :<
<arup_r> Ox0dea: nah, I am in my country still..
PedramT has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
yfeldblum has joined #ruby
<djellemah> Ox0dea: One of those self-feeding paradoxes. Makes me wonder what would happen if one treated both 0 and ∞ as limits rather than as numbers.
<Ox0dea> djellemah: Would base-∞ be called infinitary?
tuelz1 has joined #ruby
pawnbox has quit [Ping timeout: 255 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
dpg_ has quit [Ping timeout: 255 seconds]
sandstrom has joined #ruby
<djellemah> Ox0dea: Sounds good. You can use as many digits as you like, and the number represented is undefined.
tuelz1 has quit [Ping timeout: 265 seconds]
rkazak has joined #ruby
<Ox0dea> djellemah: Well, is "10" in infinitary not ∞?
tubuliferous_ has joined #ruby
robbyoconnor has joined #ruby
pawnbox has joined #ruby
devbug has quit [Read error: Connection reset by peer]
<Ox0dea> ∀ n ∈ ℝ - {0,1}: n10 = 10n, where juxtaposition represents "in base".
<Ox0dea> Though of course ∞ isn't in ℝ.
kalopsian has quit [Ping timeout: 276 seconds]
dlitvak has joined #ruby
riskish has quit [Quit: Textual IRC Client: www.textualapp.com]
hannelita has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
phredus has joined #ruby
dlitvak has quit [Ping timeout: 256 seconds]
yfeldblu_ has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
PedramT has quit [Ping timeout: 240 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
amclain has quit [Quit: Leaving]
hannelita has quit [Ping timeout: 264 seconds]
kalopsian has joined #ruby
pawnbox has joined #ruby
sandstrom has joined #ruby
tmtwd has joined #ruby
kalopsian has quit [Ping timeout: 276 seconds]
kalopsian has joined #ruby
guacamole has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
guacamole has quit [Client Quit]
antgel has joined #ruby
PedramT has joined #ruby
shibly has joined #ruby
shibly has left #ruby ["Leaving"]
kalopsian has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
guacamole has joined #ruby
asmodlol has quit [Ping timeout: 250 seconds]
guardian has quit [Excess Flood]
sandstrom has quit [Quit: My computer has gone to sleep.]
asmodlol has joined #ruby
sandstrom has joined #ruby
kalopsian has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
psy has quit [Disconnected by services]
psy_ has joined #ruby
mahk has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
kalopsian has quit [Ping timeout: 245 seconds]
kalopsian has joined #ruby
pawnbox has joined #ruby
PedramT has quit [Ping timeout: 240 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
PedramT has joined #ruby
kalopsian has quit [Ping timeout: 245 seconds]
pawnbox has quit [Ping timeout: 264 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
ta has quit [Remote host closed the connection]
ohaibbq has quit [Quit: Leaving...]
felixal has joined #ruby
sandstrom has joined #ruby
PedramT has quit [Ping timeout: 272 seconds]
usershell has quit [Remote host closed the connection]
PedramT has joined #ruby
pawnbox has joined #ruby
PedramT has quit [Remote host closed the connection]
PedramT has joined #ruby
finisherr has quit [Quit: finisherr]
tuelz1 has joined #ruby
futilegames has joined #ruby
n00bdev_ has quit [Remote host closed the connection]
asmodlol has quit [Ping timeout: 240 seconds]
futilegames has quit [Client Quit]
guacamole has joined #ruby
agit0 has joined #ruby
pawnbox has quit [Ping timeout: 265 seconds]
yfeldblu_ has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
tuelz1 has quit [Ping timeout: 246 seconds]
<djellemah> Ox0dea: "11" in infinitary is also ∞. So is "www.newyorkpizzasanbruno.biz". So there's no difference in meaning between one string of digits and another.
Channel6 has quit [Quit: Leaving]
<Ox0dea> djellemah: Nuh-uh! It's ∞ + 1! /s
<Ox0dea> Er, ∞ ^ 0 = 1, right?
n00bdev has joined #ruby
<Ox0dea> >> Float::INFINITY ** 0
<ruby[bot]> Ox0dea: # => 1.0 (https://eval.in/503267)
asmodlol has joined #ruby
<djellemah> I think it depends which hat infinity is wearing at the time...
n00bdev_ has joined #ruby
karapetyan has quit [Ping timeout: 255 seconds]
howdoicomputer has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<djellemah> That is, does ∞ denote "meaningless", or does it denote a limit. Disclaimer: I'm not well-read on the meanings of infinity.
n00bdev has quit [Ping timeout: 260 seconds]
<Ox0dea> "Of course it is happening inside your head, Harry, but why on earth should that mean that it is not real?"
sandstrom has joined #ruby
Dimik has quit [Ping timeout: 276 seconds]
<Ox0dea> ∞ ∈ ℝ confirmed.
CloCkWeRX has quit [Ping timeout: 240 seconds]
<Ox0dea> Proof by induction on the wisdom of Albus Dumbledore.
rkazak has quit [Quit: Sleep.....ing....]
howdoicomputer has quit [Ping timeout: 276 seconds]
hannelita has joined #ruby
dasher00 has joined #ruby
kalopsian has joined #ruby
usershell has joined #ruby
hannelita has quit [Ping timeout: 255 seconds]
n00bdev_ has quit []
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
PedramT has quit [Ping timeout: 272 seconds]
usershell has quit [Remote host closed the connection]
usershell has joined #ruby
caffeinic has joined #ruby
firstdayonthejob has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
jam___ has joined #ruby
pawnbox has quit [Ping timeout: 246 seconds]
sandstrom has joined #ruby
CloCkWeRX has joined #ruby
jam_ has quit [Ping timeout: 250 seconds]
pskosinski has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
blackgoat has quit [Quit: WeeChat 1.3]
UtkarshRay has quit [Ping timeout: 255 seconds]
pawnbox has quit [Ping timeout: 276 seconds]
arup_r has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 260 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
usershell has quit [Remote host closed the connection]
usershell has joined #ruby
nchambers has quit [Remote host closed the connection]
eaxxae has quit [Read error: Connection reset by peer]
<djellemah> Ox0dea: http://math.stackexchange.com/q/60782 not that I understand that statement fully.
pskosinski has joined #ruby
pawnbox has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
bkxd_ has joined #ruby
haraigoshi has joined #ruby
vdamewood has joined #ruby
tuelz1 has joined #ruby
<Ox0dea> djellemah: I certainly won't contend that ∞ is a number, but I do think infinitary could be subjected to a little more rigor than "everything's valid".
<Ox0dea> "0" can be 0, "1" can be 1, and "10" can be ∞; it breaks down after that, though.
marr has joined #ruby
pawnbox has quit [Ping timeout: 246 seconds]
tuelz1 has quit [Ping timeout: 246 seconds]
<djellemah> "0" == 0 and "1" == 1 imply that ∞ ^ 0 == 1, which is true in Ruby ;-)
<Ox0dea> And sometimes math!
<djellemah> Igzakly - sometimes. From that link you just posted, "There is no universal value for ∞ ^ 0. It is indeterminate, and the value depends on how you are getting the ∞ and the 0."
<djellemah> So the meaning of ∞ and 0 depends on what you need them to be in some system (algebra). That's getting more rigorous.
tubuliferous_ has quit [Ping timeout: 260 seconds]
<Ox0dea> If it means not having to add a third special case to my Numeric#to_s patch, I'm okay with ∞ ^ 0 = 1.
<Ox0dea> Not sure how NaN plays here.
<Ox0dea> But i in base-i is totally "10".
<djellemah> lol, well if that's what you need ∞ to be in you system, nobody can really say you're wrong.
pawnbox has joined #ruby
<Ox0dea> Do I have to get it with #succ for it to be rigorous? :)
<djellemah> Ox0dea: you could maybe pull off i == 1 because there's only one digit, so it doesn't matter which one(s) you use, as long as they're there.
<Ox0dea> >> 1i # djellemah: I meant this i.
<ruby[bot]> Ox0dea: # => (0+1i) (https://eval.in/503284)
<Ox0dea> Complex numbers.
<Ox0dea> They work as radices, but not necessarily as the bases for positional number systems.
<Ox0dea> You don't have to have "digits", per se, for the math to work.
<djellemah> Ox0dea: Oh, that one. I thought you meant ∀ i ∈ ℝ : i10 = 10i
<Ox0dea> As best I can tell, that only fails to hold for i ∈ {0,1,∞}.
ericfreese has quit [Ping timeout: 245 seconds]
usershell has quit [Remote host closed the connection]
<djellemah> Ox0dea: yeah. The math works without the digits. But it becomes a bit, ah, self-referential.
<Ox0dea> Sure, it's basically a demonstration of 1 as the multiplicative identity.
Jackneill has joined #ruby
<Ox0dea> >> Float::INFINITY.real? # lol
<ruby[bot]> Ox0dea: # => true (https://eval.in/503285)
hannelita has joined #ruby
hogetaro has joined #ruby
<Ox0dea> Seems so.
pawnbox has quit [Ping timeout: 272 seconds]
vikas027 has joined #ruby
<djellemah> Ox0dea: in unary, "11" == "10" == "aa" == "42".
hannelita has quit [Ping timeout: 240 seconds]
ympeg has joined #ruby
<Ox0dea> djellemah: Bijective unary is TC: https://esolangs.org/wiki/Unary
JohnT has joined #ruby
graffix222 has quit [Ping timeout: 260 seconds]
krz has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
Mon_Ouie has quit [Ping timeout: 276 seconds]
arup_r has joined #ruby
<Ox0dea> >> ObjectSpace._id2ref Float.__id__ - 300
<ruby[bot]> Ox0dea: # => Infinity (https://eval.in/503290)
ponga has quit []
<djellemah> I was somewhat surprised to find out that unary actually has real-world uses https://en.wikipedia.org/wiki/Unary_numeral_system#Applications
<djellemah> >> ObjectSpace._id2ref 70303611 # ∞ + 1
<ruby[bot]> djellemah: # => 35151805 (https://eval.in/503291)
pawnbox has quit [Ping timeout: 265 seconds]
usershell has joined #ruby
<Ox0dea> djellemah: Whence came 70303611?
<djellemah> >> Float.__id__ - 299
<ruby[bot]> djellemah: # => 551477121 (https://eval.in/503292)
<Ox0dea> It's always different.
<djellemah> Just found that out...
<Ox0dea> But Float::INFINITY is always in the same place relative to Float.
einarj has joined #ruby
iskander has joined #ruby
<djellemah> Lol, so ObjectSpace._id2ref Float.__id__ - 299 is different every time. Kinda works. In the same way that numerology does :-O
graffix222 has joined #ruby
casadei has joined #ruby
bkxd_ has quit [Ping timeout: 240 seconds]
usershell has quit [Ping timeout: 255 seconds]
pawnbox has joined #ruby
usershell has joined #ruby
yfeldblum has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
casadei has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
neanderslob has quit [Ping timeout: 272 seconds]
mikecmpbll has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
solocshaw has joined #ruby
minimalism has joined #ruby
<Ox0dea> I'd never thought of Church numerals as being "unary", but it fits.
<Ox0dea> Predictably, calculating the Hamming distance of two very tiny numbers using only the lambda calculus takes forever.
<Ox0dea> Er, the inverse of that distance, even.
lxsameer has quit [Ping timeout: 240 seconds]
<norc_> asm>> puts "foo"
<norc_> mm.
<norc_> Good morning Ox0dea.
<Ox0dea> Morning, norc_.
<Ox0dea> I think apeiros might've been pulling your leg. :x
<norc_> Ox0dea, nope. I actually built in asm/tok/ast myself yesterday. :)
<norc_> Just waiting for it to be merged.
<norc_> Or deployed rather.
<Ox0dea> Oh, right. Nice.
<Ox0dea> RubyVM::InstructionSequence.of makes for more channel-friendly output, for what that's worth.
colegatron has quit [Ping timeout: 276 seconds]
TomyLobo has joined #ruby
<norc_> >> RubyVM::InstructionSequence.of(-> { puts "foo" } )
norc_ has quit [Changing host]
norc_ has joined #ruby
<norc_> >> RubyVM::InstructionSequence.of(-> { puts "foo" } )
<ruby[bot]> norc_: # => <RubyVM::InstructionSequence:block in <main>@/tmp/execpad-0831c903cb1d/source-0831c903cb1d> (https://eval.in/503294)
<norc_> >> RubyVM::InstructionSequence.of(-> { puts "foo" } ).disasm
<ruby[bot]> norc_: # => "== disasm: #<ISeq:block in <main>@/tmp/execpad-313bd1f1955e/source-313bd1f1955e>\n== catch table\n| ...check link for more (https://eval.in/503295)
jbrhbr has joined #ruby
<norc_> >> puts RubyVM::InstructionSequence.of(-> { puts "foo" } ).disasm
<ruby[bot]> norc_: # => == disasm: #<ISeq:block in <main>@/tmp/execpad-4e90fcc3229a/source-4e90fcc3229a> ...check link for more (https://eval.in/503296)
<Ox0dea> .of + #to_a rather.
<norc_> >> puts RubyVM::InstructionSequence.of(-> { puts "foo" } ).to_a
<Ox0dea> >> RubyVM::InstructionSequence.of(-> { 17 + 25 }).to_a[13][4, 3]
<ruby[bot]> Ox0dea: # => [[:putobject, 17], [:putobject, 25], [:opt_plus, {:mid=>:+, :flag=>16, :orig_argc=>1}, false]] (https://eval.in/503298)
<norc_> mm, possibly indeed.
stamina has joined #ruby
<Ox0dea> Quite rather.
<norc_> Well, the bytecode will be too long for even trivial statements to be contained within a single line.
<Ox0dea> Yeah.
<norc_> So might as well keep the full disasm output.
<Ox0dea> Might as well output as Forth, you mean.
blackmesa has quit [Ping timeout: 245 seconds]
<norc_> You have lost me there.
<Ox0dea> Forth, the original concatenative language?
jxs_ has quit [Remote host closed the connection]
<norc_> I do not know many languages that are nearly twice my age. :-)
<Ox0dea> There are dozens!
<Ox0dea> > mfw speedcoding was called speedcoding
<norc_> asm>> puts "foo"
<ruby[bot]> norc_: I have disassembled your code, the result is at https://eval.in/503299
<norc_> There!
<norc_> It works. Just was not identified.
<norc_> can also work with tok/ast and you can also override the language like asm20
craysiii has quit [Quit: Leaving.]
fommil has joined #ruby
<Ox0dea> Nifty!
corecode has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
<Ox0dea> asm10>> 42
<ruby[bot]> Ox0dea: I have disassembled your code, the result is at https://eval.in/503300
KnownSyntax has quit [Read error: Connection reset by peer]
FooMunki has joined #ruby
<fommil> hi all. I've never done ruby before but I'm having to use it to hack together a Jekyll page. I've defined a custom variable on a page as per http://jekyllrb.com/docs/variables/ and I want to check when that variable is not defined, so I check `if node.parent == null`... but that never triggers. Is this valid ruby?
<norc_> ast>> def foo; yield; end; puts foo { puts "Why am I not yielded" }
<ruby[bot]> norc_: I have parsed your code, the result is at https://eval.in/503301
<fommil> maybe I should ask on #jekyll
lxsameer has joined #ruby
<norc_> Ox0dea, this is the real use case I see for this, as such errors are relatively common here.
<Ox0dea> fommil: The null value is spelled `nil` in Ruby.
ziyadb has quit [Quit: Connection closed for inactivity]
tuelz1 has joined #ruby
<Ox0dea> It's "falsy" in boolean contexts, so you'd likely just say `if node.parent` there.
jxs_ has joined #ruby
jxs_ has quit [Max SendQ exceeded]
jbrhbr has quit [Quit: Leaving.]
<norc_> Ox0dea, I started with Ruby after spending a considerable time working with SQL. My head was wrapped around the notion that "null" was an unknown value and as such not falsey. Suffice it to say, that is the primary reason I always explicitely test for .nil?
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
zotherstupidguy has quit [Ping timeout: 260 seconds]
<norc_> (Though I find it quite enjoyable that NULL does not even equal NULL since it is unknown whether two unknown value are equal)
<fommil> Ox0dea: oh, thanks I'll try that.
<fommil> Ox0dea: that doesn't work either.
asmodlol has quit [Ping timeout: 265 seconds]
<fommil> norc_ heh, the theme I'm using does a comparison against null, so I guess that never fails?
<fommil> I'll push my code, maybe that'll be clealer
colegatron has joined #ruby
<fommil> clearer*
<norc_> fommil, I am strictly talking about SQL.
jxs_ has joined #ruby
tuelz1 has quit [Ping timeout: 276 seconds]
asmodlol has joined #ruby
zotherstupidguy has joined #ruby
<fommil> norc_ sorry I missed that bit
<norc_> fommil, did you replace "if node.title != null" too?
waka has quit [Remote host closed the connection]
futilegames has joined #ruby
<fommil> norc_ oh that bit works, the failing bit is the second check
<fommil> I also tried !node.parent
jxs_ has quit [Remote host closed the connection]
blackmesa has joined #ruby
romancpodolski has joined #ruby
<norc_> fommil, I do not see any variable called "parent" under page variables.
howdoicomputer has joined #ruby
<fommil> norc_ there is one for the "build_tools/sbt.md" page (which is wrong actually)
<fommil> norc_ but actually I could probably derive the parents, I just wanted to hack it first with variables
ghox has quit [Ping timeout: 265 seconds]
futilegames has quit [Client Quit]
Xeago has joined #ruby
<fommil> norc_ because page.path contains the containing folder and that might be very useful here. Maybe I should just hack it by saying "if the path doesn't contain /"
<norc_> fommil, no idea what debugging facilities it provides. Try using node.respond_to?(:parent)
waka has joined #ruby
<norc_> fommil, if that still fails, there simply is no such accessor method.
funnel has quit [Ping timeout: 255 seconds]
<fommil> norc_ ok, actually I should do the cleaner thing anyway with the node.path
<fommil> I just thought this would be easier, but it seems to have its own problems.
demond has joined #ruby
<fommil> norc_ it does access something though, it finds the content when the page does have the variable. I just can't trigger "when this isn't defined".
demond has left #ruby ["+++"]
<djellemah> Ox0dea: Heh, I had an intuition that peano and church would come up wrt unary at some point. Also this occurred to me (based on one of those links): there are as many infinities as there are ways to get there (paradoxically). So an infinity is a property of an operation, which may or may not correspond to the infinity of another operation (on possibly different sets).
BaroMeter has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
<fommil> norc_ I'm starting to think that the problem is with the jekyl interpreter. `if (node.layout == "page" && !node.path.include? "/")` doesn't work either.
hogetaro has quit [Quit: Leaving...]
<fommil> the second part of the statement is seemingly ignored
jam___ has quit [Remote host closed the connection]
hannelita has joined #ruby
<Ox0dea> djellemah: "All finitudes are alike; each infinitude is infinite in its own way."
<Ox0dea> That doesn't sound near as good as the original, but it came to mind for some reason.
<djellemah> Ah, the joys of (re)discovery ;-)
<romancpodolski> Is there a shorthand version for method(:method_name).curry.call(parameters...) ?
FernandoBasso has joined #ruby
<Ox0dea> romancpodolski: 'Fraid not.
<Ox0dea> You could use Otokari? :P
hightower2 has joined #ruby
<norc_> romancpodolski, You definitely want to use Otokari
<norc_> It was written to make the transition from C++ to Ruby much much easier.
* norc_ blinks
<fommil> seems jekyll uses Liquid and it has an incredibly minimal boolean logic implementation. ok...
<romancpodolski> Otokari? Cool, I am going to check this out
<Ox0dea> romancpodolski: This is Otokari: https://eval.in/501472
<Ox0dea> Have your laugh and then pretend this didn't happen.
hannelita has quit [Ping timeout: 264 seconds]
<Ox0dea> But, well, it probably could be finagled into doing the right thing 90% of the time.
<norc_> I can already see it Ox0dea. 5 years from now I will have a contract to fix some non working Ruby application, where I will find a mysterious weird calling convention..
<norc_> And at the top I will see a "require 'otokari'"
<Ox0dea> Ha.
<romancpodolski> WTF
<Ox0dea> Scary shit, innit?
<Ox0dea> Ruby is dangerous.
<Ox0dea> Hey, what are these? http://ai http://dk http://to http://uz
<Ox0dea> Is there a name for this?
waka has quit [Remote host closed the connection]
waka has joined #ruby
PedramT has joined #ruby
<Ox0dea> norc_: https://eval.in/503302 Can you think of a way to sneak a Hash in there somewhere such that it looks like a third "block"?
hogetaro has joined #ruby
Macaveli has joined #ruby
PedramT has quit [Ping timeout: 240 seconds]
symm- has joined #ruby
dn` has joined #ruby
asmodlol has quit [Ping timeout: 256 seconds]
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
asmodlol has joined #ruby
sigurding has joined #ruby
DoubleMalt has joined #ruby
einarj has quit [Remote host closed the connection]
s00pcan_ has joined #ruby
s00pcan has quit [Ping timeout: 272 seconds]
Ishido has quit [Remote host closed the connection]
vikas027 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
Ishido has joined #ruby
sftrabbit has joined #ruby
CloCkWeRX has quit [Ping timeout: 245 seconds]
DoubleMalt has quit [Remote host closed the connection]
govg has quit [Ping timeout: 272 seconds]
<norc_> Ox0dea, sure.
govg has joined #ruby
<norc_> Ox0dea, https://eval.in/503314
tuelz1 has joined #ruby
<norc_> But you wanted this withotu a komma eh?
fommil has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
<Ox0dea> Comma's not bad, but its absence is to be desired.
blackmesa has quit [Ping timeout: 240 seconds]
<Ox0dea> Could maybe Define Proc#-(Hash) to do something crazy. :P
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
tuelz1 has quit [Ping timeout: 264 seconds]
kalopsian has quit [Ping timeout: 264 seconds]
UtkarshRay has joined #ruby
kalopsian has joined #ruby
BSaboia has joined #ruby
dmolina has joined #ruby
karapetyan has quit [Remote host closed the connection]
Rutix has joined #ruby
Rutix has quit [Changing host]
Rutix has joined #ruby
blackmesa has joined #ruby
hannelita has joined #ruby
stamina has quit [Ping timeout: 265 seconds]
oo7cat has joined #ruby
oo7cat has left #ruby [#ruby]
oo7cat has joined #ruby
sigurding has quit [Quit: sigurding]
dbugger has joined #ruby
hannelita has quit [Ping timeout: 255 seconds]
<oo7cat> API means that app company provide source code for programmer to use programming to their app?
arup_r has quit [Remote host closed the connection]
arup_r has joined #ruby
<apeiros> norc_, Ox0dea: as you already found out, I wasn't pulling norc_'s leg. but the new bot requires registration & authentication with nickserv for a couple of commands.
spider-mario has joined #ruby
<Ox0dea> norc_: https://eval.in/503319
speaking2ode has joined #ruby
<Ox0dea> apeiros: Triple blocks!
<apeiros> amazing
<apeiros> now let me wake up and figure out what the heck you did there :D
speakingcode has quit [Ping timeout: 256 seconds]
arup_r has quit [Remote host closed the connection]
arup_r has joined #ruby
<Ox0dea> I do apologize for assuming malice there.
kalopsian has quit [Ping timeout: 256 seconds]
lxsameer has quit [Ping timeout: 264 seconds]
<jhass> oo7cat: it can mean quite a bunch of things. I'd generalize to "reusable implementation of some functionality with a stable interface"
<Ox0dea> oo7cat: You may be conflating API with SDK.
casadei has joined #ruby
kalopsian has joined #ruby
<Ox0dea> Er, well, an SDK is an API, but the reverse isn't necessarily true.
lxsameer has joined #ruby
Wsewolod has quit [Quit: Leaving]
<norc_> ast>>
<norc_> p ([0][1]).--> { :t } { :f } { :w }
<ruby[bot]> norc_: I have parsed your code, the result is at https://eval.in/503323
<oo7cat> thanks jhass and apeiros and Ox0dea
<norc_> ast>> p ([0][1]).--> { :t } { :f } { :w }
<ruby[bot]> norc_: I have parsed your code, the result is at https://eval.in/503324
<Ox0dea> Two occurrences of :method_add_block, you say? ;)
<oo7cat> if i want to invest stock with ruby it is possi ble when stock company must provide API
<oo7cat> ?
<shevy> wtf
<norc_> Ox0dea, that is interesting parser behavior.
<norc_> Ox0dea, didnt expect that.
<apeiros> oo7cat: or a SOAP or a REST API
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> ah, somehow I read "must provide a *ruby* API"
<norc_> SOAP needs to die.
<oo7cat> what is soap?
bronson has joined #ruby
<apeiros> yes. if the stock company provides an API which has methods to invest, then you can invest stock with ruby.
<apeiros> oo7cat: you know google?
casadei has quit [Ping timeout: 264 seconds]
<apeiros> and wikipedia?
<oo7cat> oh great apeiros
<norc_> It is something invented by very self important business java developers who spent weeks to describe the descrpition of a meta description.
<apeiros> norc_: SOAP isn't all that bad. but people do horrible stuff with it.
<Ox0dea> >> def _(*) end; _ _ _ _ _ {} {} {} {} {} # norc_
agent_white has quit [Quit: night]
<ruby[bot]> Ox0dea: # => nil (https://eval.in/503326)
<oo7cat> what is SOAP?
<apeiros> norc_: as far as I see it, JSON API's tend to be less horrible because it's just not as powerful and thus a bit harder to do horrible things with it…
<Ox0dea> oo7cat: Stupid Object, Asinine Protocols.
<norc_> apeiros, most SOAP APIs can either be easily replaced by REST (signifying how little of SOAP is used), or is better done with actual RPC frameworks like CORBA.
<apeiros> oo7cat: please use google & wikipedia before asking the most trivial questions here. thanks.
<Ox0dea> CORBA lives?
<norc_> Ox0dea, it does indeed. I have even implemented a full fledged ORB on some weird embedded hardware.
<apeiros> norc_: can't comment on most
<norc_> apeiros, fair enough.
<norc_> Most that I have seen.
<apeiros> norc_: but at work we're consuming some SOAP apis, and some of them have proper xsd's, which is a great support.
who42 has joined #ruby
<apeiros> some others I'd agree - they could just as well use JSON - essentially they're hashes and have no xsd to speak of (some autogenerated xsd which is worthless)
Tempesta has joined #ruby
<norc_> apeiros, if you just care about validations and descriptions I think OData is an elegant solution to REST
bronson has quit [Ping timeout: 265 seconds]
<apeiros> norc_: not json-schema?
<apeiros> haven't heard of 0Data, but will certainly take a look
<apeiros> oh, OData, not 0Data
last_staff has joined #ruby
<oo7cat> i understand API
<shevy> lol
<apeiros> norc_: good heavens, yet another terminology for limit/offset :D
<oo7cat> i want make automation trading app with api, then i want sell it with high price. is it possible?
<apeiros> norc_: but it's nice to see how every generation reinvents relational algebra / set theory
ympeg has quit [Ping timeout: 276 seconds]
dtordable has joined #ruby
<Ox0dea> Out with the old, in with the old.
shinnya has quit [Quit: ZNC - http://znc.in]
bkxd has quit [Ping timeout: 256 seconds]
shinnya has joined #ruby
OxDeadC0de has quit [Read error: Connection reset by peer]
bottiger has joined #ruby
<bottiger> How can I convert ["6162635a", "6162635a"] into two UTF-32 characters
s00pcan_ has quit [Ping timeout: 276 seconds]
sleepee has joined #ruby
<bottiger> I tried .force_encoding("UTF-32") but it gives me "\x36\x31\x36\x32\x36\x33\x35\x61" which doesn't look correct
s00pcan has joined #ruby
volty has joined #ruby
tuelz1 has joined #ruby
<apeiros> uh, yeah, how could that work…
<apeiros> it doesn't know those bytes in your source string are supposed to be hex
<bottiger> apeiros: Right, thats' what I'm thinking
<apeiros> >> ["6162635a"].pack("H*")
<ruby[bot]> apeiros: # => "abcZ" (https://eval.in/503340)
karapetyan has joined #ruby
<apeiros> this packs the hex data into the 4 bytes they represent
DoubleMalt has joined #ruby
<apeiros> >> ["6162635a"].pack("H*").force_encoding('utf-32')
<ruby[bot]> apeiros: # => "\x61\x62\x63\x5A" (https://eval.in/503341)
<apeiros> and now you tell ruby via force-encoding to consider those 4 bytes as utf-32
<apeiros> but honestly, that doesn't look like an existing codepoint to me.
emilford has joined #ruby
vdamewood has quit [Quit: Life beckons.]
<apeiros> are you sure that the hex you have there is utf-32?
<bottiger> apeiros: It's not valid UTF-32, but it's just a hack to "compress" some text (in terms of characters, not bytes)
<volty> Hi. With drb I access a sequel dataset from another process. But the problem lies in that the producing (or receiving - the prob. remains the same if I revert server & client) lies in a thread separate from the main thread (using a library that does not allow to call outside of the main thread). Any idea how can I 'bridge' across threads?
<volty> (e.c. - in that the thread is separate from the main thread)
<volty> different
<apeiros> bottiger: um, you are aware that it doesn't really compress?
FernandoBasso has quit [Ping timeout: 260 seconds]
<bottiger> apeiros: absoluty :)
tuelz1 has quit [Ping timeout: 265 seconds]
<apeiros> *shrug* okay
FernandoBasso has joined #ruby
<bottiger> apeiros: but it's a company challenge. Write the shortest program - you know the deal. And they are counting characters, not bytes
<apeiros> volty: that's an odd limitation. you can use a queue in the main thread to read instructions from.
<apeiros> bottiger: lol. well, yeah, abuse the loophole then :D
<apeiros> just hope they don't retroactively change the rules ;-)
<bottiger> apeiros: they already did after my first solution in witespace :P (they had a rule that whitespace didn't count to encurage readability)
<apeiros> adding things like "invalid byte sequences are counted as individual bytes" (that's probably what I'd do)
<bottiger> *whitespace
<apeiros> aaahaha
<apeiros> you could even use any language, treating \t and " " as bits and in ruby e.g. use tr + pack
howdoicomputer has joined #ruby
<apeiros> so basically eval(["…code in whitespace here…"].tr(" \t","01").pack("B*")) - could probably be shortened even more.
c355e3b has joined #ruby
<bottiger> apeiros: yeah, but they split the competition into two competitions. And if you whitespace is "functional" it counts
<bottiger> but I like my new idea of just "compressing" the output text into utf-32, since that's by far the most characters
<volty> apeiros: the limitation comes from Qt. And the limits are same in c++ too. If I could only have a drb server working in the main thread, asynchronously! Is drb only ruby source?
dmolina has quit [Quit: Leaving.]
<apeiros> I think drb is plain ruby, no native code.
<Ox0dea> bottiger: What's your process for writing Whitespace programs?
howdoicomputer has quit [Ping timeout: 256 seconds]
<apeiros> 1. think hard, 2. type spaces and tabs and whatever else, 3. run the program!
<bottiger> apeiros: but I also considered making a solution like: "while (sha256('100 random words")!=sha256sum)"
* apeiros hides
jam_ has joined #ruby
<volty> apeiros: fine, thx, going to give it a look, hoping to at least learn something
<bottiger> Ox0dea: I just converted the output text into whitespace using a small ruby script
<bottiger> Ox0dea: but another huy had the same idea and made a much more compact solution
<apeiros> volty: oh, that 1., 2., 3. thing wasn't at you, but at Ox0dea
<bottiger> guy
hannelita has joined #ruby
<volty> apeiros: I knew
<Ox0dea> bottiger: Oh, you weren't talking about the Whitespace programming language, then.
<apeiros> ok
codecop has joined #ruby
<apeiros> volty: but the consumer/producer pattern with queues communicating with the main thread is probably the easiest. it allows you to do about anything.
<bottiger> Ox0dea: I was. I took the output text and converted it - character by character - into whitespace programmin language source code - writing that character to the screen
who42 has quit [Ping timeout: 246 seconds]
<bottiger> output text = the text the program should output
<Ox0dea> bottiger: Er... the program's output is static?
who42 has joined #ruby
<bottiger> Ox0dea: yes
<Ox0dea> Weird.
<bottiger> Ox0dea: otherwise I probably wouldn't have done it :)
krz has joined #ruby
agit0 has quit [Ping timeout: 246 seconds]
<Ox0dea> Whitespace is fun!
<apeiros> bottiger: might want to take a look at wikipedia's compression competition then
<apeiros> though I guess while the output is static, it's probably in the nature of something where generating it is less data than compressing it?
edwinvdgraaf has quit [Remote host closed the connection]
<bottiger> apeiros: never heard about it. Do you have a link?
jam_ has quit [Ping timeout: 255 seconds]
<apeiros> bottiger: sadly not. but since it was with a high price money, it shouldn't be too hard to find
<volty> apeiros: Yes. But I feel I'll have to do more with low-level streaming than with Queue. Btw for now I resolved it with a trick — recreating the same dataset at the receiving end (using Dataset#sql). But I hope I'll succeed in bridging the threads. Going to energize. bye & thx
hannelita has quit [Ping timeout: 255 seconds]
<Ox0dea> bottiger: Tribonacci numbers in Whitespace: http://ideone.com/xegVdM :)
<Ox0dea> With memoization!
volty has quit [Quit: Konversation terminated!]
blackmesa has quit [Ping timeout: 264 seconds]
edwinvdgraaf has joined #ruby
<bottiger> Ox0dea: did you write it by hand?
<Ox0dea> bottiger: In pseudo-assembly, but yeah.
sdothum has joined #ruby
graffix222 has quit [Ping timeout: 260 seconds]
houhouli_ has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 260 seconds]
SCHAAP137 has joined #ruby
graffix222 has joined #ruby
blur3d has quit [Quit: blur3d]
ta has joined #ruby
dorei has joined #ruby
kith has quit [Quit: kith]
<norc_> bottiger, technically you can just use utf8
<norc_> and use one single multibyte character spanning as much as you want..
cpup has quit [Ping timeout: 250 seconds]
<norc_> bottiger, that would surely give you the longest possible "compression" for your task at hand.
cpup has joined #ruby
<norc_> (afaik utf8 has no limit on how long a multibyte character can be)
al2o3-cr has quit [Ping timeout: 260 seconds]
<bottiger> norc_: I read it could handle 48 bits
<bottiger> norc_: Which is more than utf-32, but I thought it would also be a bit of a PITA
<bottiger> because I assume it needs a high bit set in every byte or something like that
kalopsian has quit [Ping timeout: 272 seconds]
<norc_> bottiger, indeed. you have a leading byte and an arbitrary number of continuiation bytes
karapetyan has quit [Remote host closed the connection]
<norc_> have not heard of any 48 bit limitation thoguh
kalopsian has joined #ruby
<norc_> but I might be wrong
<norc_> apeiros might know more
<bottiger> I'm probably also wrong :P
<norc_> as our residential encoding expert :-)
<apeiros> I thought the limit was either 5 or 7 bytes. but I never studied that in detail.
<apeiros> so no idea really
<bottiger> but I'm just going to use utf-32. That the naïve implementation of a good idea. I'm not going to spend exponential much more time to do a better implementation :)
oo7cat has left #ruby [#ruby]
<apeiros> from WP it seems like 6 byte sequences + 1 byte to indicate it's a 6 byte sequence is the longest. so 7 bytes.
<apeiros> and you're limited to 7 bits in those 6 bytes
edwinvdgraaf has quit [Remote host closed the connection]
who42 has quit [Read error: Connection reset by peer]
<norc_> which means you get 6 bytes of payload
<apeiros> well, 6*7/8 = 5 bytes
who42 has joined #ruby
<norc_> Math has never been a strength of mine.
<apeiros> or rather every 4 "characters" you get 21 bytes
<apeiros> define strength
<apeiros> "neither was physics" ;-D
<norc_> apeiros, I just realized what I said. "If I take 6 bytes and strip one bit off each byte, I get 6 bytes payload"
ericfreese has joined #ruby
<norc_> Brilliant.
<apeiros> wait, what? it looks even like you only get 6 bits of usable payload per byte
<apeiros> first two bits are fixed to 10
<norc_> apeiros, since the length is variable though, the mere presence of a continuation byte is information too thoguh
<apeiros> I wonder why - make detection of non-utf-8 easier?
iateadonut has joined #ruby
<norc_> apeiros, btw I figured out this weird bizarre encoding the other day.
<norc_> apeiros, the supplier put in a font into the PDF mapping characters to random codepoints - making copy paste an absolute pointless undertaking.
<norc_> And to make things worse, that font is random in each PDF fiel.
<apeiros> you can have 128+4096+262144+16777216+4294967296+1099511627776+281474976710656 possible values with a single character while being valid utf-8
<norc_> >>
<norc_> >> 128+4096+262144+16777216+4294967296+1099511627776+281474976710656
<ruby[bot]> norc_: # => nil (https://eval.in/503374)
<ruby[bot]> norc_: # => 282578800349312 (https://eval.in/503375)
<norc_> that looks like a lot.
<apeiros> so you can basically convert that to a numbering scheme and then translate it to bits & bytes
<apeiros> it's a bit more than 48bits per char
ericfreese has quit [Ping timeout: 276 seconds]
<apeiros> oh, actually you can have more than that
<apeiros> there's multiple values starting a 2 byte sequence, same for 3 byte long sequence and 4 byte long sequence
<apeiros> so you can multiply those summands
<apeiros> (it'll still be "only" a bit more than 48bit, though)
<norc_> I am going to change my first name to ☃
arup_r has quit [Remote host closed the connection]
El3k0n has joined #ruby
fsapo has joined #ruby
<apeiros> interesting. that WP article basically tells you how to write the regex to validate utf-8.
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
BaroMeter has quit [Quit: Leaving]
arup_r has joined #ruby
al2o3-cr has joined #ruby
karapetyan has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
leksster has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
FooMunki has left #ruby [#ruby]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
<apeiros> oh
<apeiros> ooooh
<apeiros> nice
karapetyan has quit [Remote host closed the connection]
<apeiros> reading that article just informed me that parallel processing of utf-8 text is well possible
karapetyan has joined #ruby
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
<apeiros> I always thought it wasn't because you don't know whether you're in a sequence (i.e. you couldn't split the text into multiple chunks to process separately)
LoganG has quit [Ping timeout: 250 seconds]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
<apeiros> but since start-bytes and sequence-bytes are distinct, you can actually indeed split it into chunks.
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
LoganG has joined #ruby
<apeiros> it just adds a constant overhead to properly "align" the chunks. i.e. you split based on bytes, then you shift around some of the bytes at the borders.
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup___ has joined #ruby
<norc_> honestly though the only real relevant case is browsers, and the major worries there is constructing the dom as quickly as possible while it is still loading.
arup___ has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arian0n- is now known as arian0n
<apeiros> sure
<apeiros> and I just learned that a browser can do that in parallel
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
<apeiros> there are some things which might retroactively change how the parsed text is to be interpreted ("I'm in a comment, so this isn't really a DOM")
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
<apeiros> but I've other use-cases where it matters
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
usershel_ has joined #ruby
<apeiros> I've a definition of a csv-like format, and given that information I might optimize it so it can be processed in parallel.
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
usershell has quit [Ping timeout: 240 seconds]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
<apeiros> !fixcon arup_r
whiteline has quit [Ping timeout: 245 seconds]
ta has quit [Remote host closed the connection]
peteyg has quit [Read error: Connection reset by peer]
peteyg has joined #ruby
mfb2 has joined #ruby
tuelz1 has joined #ruby
peteyg has quit [Read error: Connection reset by peer]
mfb2_ has joined #ruby
whiteline has joined #ruby
mfb2 has quit [Ping timeout: 246 seconds]
peteyg has joined #ruby
tuelz1 has quit [Ping timeout: 260 seconds]
peteyg has quit [Read error: Connection reset by peer]
mostlybadfly has joined #ruby
HANJIN has joined #ruby
blackmesa has joined #ruby
hightower2 has quit [Ping timeout: 264 seconds]
peteyg has joined #ruby
who42 has quit [Read error: Connection reset by peer]
who42 has joined #ruby
HANJIN has quit [Ping timeout: 240 seconds]
ziyadb has joined #ruby
peteyg has quit [Read error: Connection reset by peer]
HANJIN has joined #ruby
peteyg has joined #ruby
hannelita has joined #ruby
davedev24 has joined #ruby
ghox has joined #ruby
lkba has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
bottiger has quit [Quit: Page closed]
edwinvdgraaf has joined #ruby
hannelita has quit [Ping timeout: 255 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
aryaching has joined #ruby
d0nn1e has quit [Ping timeout: 255 seconds]
d0nn1e has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
felixal has quit [Remote host closed the connection]
vandemar has quit [Read error: Connection reset by peer]
fsapo has quit [Remote host closed the connection]
vandemar has joined #ruby
peteyg has quit [Read error: Connection reset by peer]
peteyg has joined #ruby
bluOxigen_ has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
<legit> I get 'Zlib::DataError: unknown compression method' whenever I try open() on a wunderground.com URL. Why is that?
peteyg has quit [Read error: Connection reset by peer]
lucasb has joined #ruby
blackmesa has joined #ruby
peteyg has joined #ruby
edwinvdgraaf has joined #ruby
<bvbrandon> good morning, if 2 models share a method, where would be a good place to store it?
peteyg has quit [Read error: Connection reset by peer]
<bvbrandon> currently I have it defined in both models, but I feel like I should be putting it in a module or helper. Just not sure which is more appropriate
peteyg has joined #ruby
dcunit3d has quit [Ping timeout: 246 seconds]
Jardayn has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
gregf has quit [Quit: WeeChat 1.3]
<apeiros> !unban arup_r
edwinvdgraaf has joined #ruby
<al2o3-cr> does any one use format?
gregf has joined #ruby
<apeiros> al2o3-cr: rubycop users I presume
<apeiros> was one of the configs I changed :D
<al2o3-cr> I thought I'd ask as I've bearly seen it myself in code :P
<apeiros> I prefer sprintf over format
<apeiros> while I find the name worse, it's better known due to C
<apeiros> that said, I don't consider "format" to be an apt name for what it does either :-/
<al2o3-cr> My prefered choice too
<apeiros> and for single variable substitutions I use String#%
<apeiros> would be nice if there was a named alias for %
<apeiros> would make chaining easier
edwinvdgraaf has quit [Remote host closed the connection]
<al2o3-cr> ah, true
<apeiros> and in a couple of places IMO improve readability
<al2o3-cr> can't it be chained with perens?
<al2o3-cr> oh easier never mind :)
<apeiros> you can chain every expression with parens ;-)
<apeiros> since every expression has a return value in ruby
<al2o3-cr> yes, wasn't thinking to much then
oo7cat has joined #ruby
<al2o3-cr> apeiros: What was the intention of adding ObjectSpace.internal_class_of do you know?
dlitvak has joined #ruby
<apeiros> debugging I'd assume
<apeiros> I'd say all of ObjectSpace is for debugging
<al2o3-cr> Isn't it just the same as .singleton_class
<apeiros> the docs seem to indicate that some objects have a wrapper class around it. I'd ask people who snoop in the innards of ruby like Ox0dea.
dlitvak has quit [Remote host closed the connection]
<al2o3-cr> ok thanks will ask when he's around
<apeiros> also singleton_class only starts to exist once you use it
who42 has quit [Ping timeout: 260 seconds]
<apeiros> so I guess any call to .singleton_class will cause an object which doesn't have a singleton_class to spawn one.
<apeiros> i.e. unsuited for testing whether an object has a singleton_class
who42 has joined #ruby
cisco has joined #ruby
<al2o3-cr> apeiros: Thanks, this made thinks a bit more clear
<al2o3-cr> *things
dlitvak has joined #ruby
usershel_ has quit [Remote host closed the connection]
tuelz1 has joined #ruby
HANJIN is now known as zeros0623
zeros0623 is now known as zeros
carraroj has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
zeros is now known as zeros0623
aryaching_ has joined #ruby
zeros0623 has left #ruby [#ruby]
aryaching has quit [Ping timeout: 255 seconds]
zeros0623 has joined #ruby
Domaldel has quit [Quit: Leaving]
tuelz1 has quit [Ping timeout: 272 seconds]
stamina has joined #ruby
usershell has joined #ruby
dostoyevsky has quit [Ping timeout: 260 seconds]
howdoicomputer has joined #ruby
zeros0623 has left #ruby [#ruby]
<zotherstupidguy> is there a ruby IRC bot with a web interface(sinatra) ?
arup_r has joined #ruby
zeros0623 has joined #ruby
blackmesa has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
<apeiros> ruby[bot] partially integrates into the ruby-community.com website and will begin to integrate more. but I guess since it's closed source, that's not what you're after :)
howdoicomputer has quit [Ping timeout: 256 seconds]
emilford has quit [Ping timeout: 246 seconds]
<al2o3-cr> apeiros: you're code can't be that bad (jk) :P
<al2o3-cr> *your
dlitvak has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
jam_ has joined #ruby
<shevy> butler!
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
<apeiros> parts of that code are bad. but that's not the main reason for it being closed source atm. it's a case of security through obscurity. and while that does not work, it's still an additional obstacle.
karapetyan has joined #ruby
emilford has joined #ruby
hannelita has joined #ruby
<al2o3-cr> Is this butler; http://butler.rubyforge.org/ ?
<apeiros> it's an overhauled version, yes
<apeiros> updated for ruby 2.3 and ircv3
<shevy> al2o3-cr 10 years ago!
<oo7cat> ruby support ‘Component Object Model(com)’ of MS?
<al2o3-cr> apeiros: awesome
<shevy> I can't believe that this is indeed 10 years... almost :(
<al2o3-cr> shevy: I know :p
<shevy> al2o3-cr where has my youth and beauty gone!
<apeiros> the memories - I didn't know that site was still up :D
<al2o3-cr> shevy: these years are passing by so quickly now :(
aspiers has joined #ruby
<apeiros> "If you chose to name your **but** differently" - of course, one of the first things I spot is a typo…
<shevy> buttler!!!
<apeiros> oh, even two typos
<apeiros> oh boy…
jam_ has quit [Ping timeout: 265 seconds]
<shevy> you reached perfection years later apeiros :D
<apeiros> meh, my english is still full of flaws and my typing full of typos
<apeiros> but I do hope it has improved
<oo7cat> ruby support ‘Component Object Model(com)’ of MS?
emilford has quit [Ping timeout: 246 seconds]
<apeiros> hehe, "Lesson 0", because dijkstra
<apeiros> oo7cat: did you try google yet?
<oo7cat> yes
hannelita has quit [Ping timeout: 255 seconds]
BTRE has quit [Quit: Leaving]
<oo7cat> but i can’t find it apeiros
<apeiros> ok, I have to admit that 'com' isn't a very googleable term
<apeiros> https://www.ruby-toolbox.com/search?utf8=✓&q=win32 # <- one in this might be useful, not sure
lxsameer has quit [Quit: Leaving]
<apeiros> I still think using __END__ to have single-file plugins with code + metadata was genius :D
govg has quit [Ping timeout: 250 seconds]
BTRE has joined #ruby
marr has quit [Ping timeout: 260 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aspiers has quit [Ping timeout: 260 seconds]
aspiers_ has joined #ruby
<shevy> __END__ can be quite useful, I use it for some per-file configuration data... but it is not easily usable from when you have multiple .rb files right? or perhaps I just didn't find out how to use multiple __END__ when you also load these files
oo7cat_ has joined #ruby
rikkipitt has joined #ruby
jottr has joined #ruby
drptbl has joined #ruby
Domaldel has joined #ruby
drptbl has quit [Client Quit]
oo7cat has quit [Ping timeout: 240 seconds]
oo7cat_ is now known as oo7cat
dlitvak has joined #ruby
iskander has quit [Quit: Textual IRC Client: www.textualapp.com]
Emmanuel_Chanel has quit [Quit: Leaving]
bluOxigen has joined #ruby
jorum has joined #ruby
bluOxigen_ has quit [Ping timeout: 245 seconds]
mfb2_ has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 276 seconds]
oo7cat has left #ruby [#ruby]
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
Emmanuel_Chanel has joined #ruby
emilford has joined #ruby
ericfreese has joined #ruby
aryaching_ has quit [Ping timeout: 260 seconds]
sleepee has quit [Ping timeout: 260 seconds]
aspiers_ has quit [Ping timeout: 260 seconds]
dlitvak has quit [Remote host closed the connection]
dlitvak has joined #ruby
ericfreese has quit [Ping timeout: 240 seconds]
usershell has quit [Remote host closed the connection]
linduxed has quit [Ping timeout: 250 seconds]
hannelita has joined #ruby
drptbl has joined #ruby
karapetyan has quit [Remote host closed the connection]
dostoyevsky has joined #ruby
kalopsian has quit [Ping timeout: 256 seconds]
kalopsian has joined #ruby
arup_r has quit []
usershell has joined #ruby
tuelz1 has joined #ruby
blackmesa has joined #ruby
dlitvak has quit [Ping timeout: 256 seconds]
arup_r has joined #ruby
ponga has joined #ruby
User458764 has joined #ruby
tuelz1 has quit [Ping timeout: 265 seconds]
greister has quit [Quit: WeeChat 1.3]
last_staff has quit [Remote host closed the connection]
last_staff has joined #ruby
<norc_> looks like 4 octets max
dlitvak has joined #ruby
greister has joined #ruby
<apeiros> yes, 5 & 6 violate 3629
<apeiros> but they're in use
blackmes1 has joined #ruby
<norc_> The thing tho is for such a competition it would probably be better if its spec conform.
<apeiros> don't emojis use 5 byte sequences? and that caused havoc with mysql's default settings?
karapetyan has joined #ruby
sonOfRa has quit [Quit: Bye!]
* apeiros afk for a bit, cya :)
blackmesa has quit [Ping timeout: 250 seconds]
hannelita has quit [Remote host closed the connection]
<apeiros> oh and norc_ - thanks a lot for the asm>>, ast>> and tok>> patches!
<apeiros> remind me to put it in the credits on the website. I'm quite behind with updates there :(
sonOfRa has joined #ruby
emilford_ has joined #ruby
emilford has quit [Ping timeout: 246 seconds]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
karapetyan has quit [Ping timeout: 255 seconds]
rikkipitt has quit [Quit: Leaving...]
Xeago has quit [Ping timeout: 272 seconds]
emilford_ has quit [Ping timeout: 255 seconds]
emilford has joined #ruby
blackmes1 has quit [Ping timeout: 260 seconds]
ympeg has joined #ruby
govg has joined #ruby
falkhan has joined #ruby
karapetyan has joined #ruby
zeros0623 has quit [Quit: zeros0623]
jorum has quit [Ping timeout: 245 seconds]
cisco has quit [Quit: Leaving.]
falkhan has quit [Quit: Leaving]
The_Phoenix has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
ljames has joined #ruby
karapetyan has quit [Ping timeout: 255 seconds]
drptbl has joined #ruby
casadei has joined #ruby
aryaching has joined #ruby
jorum has joined #ruby
emilford has quit [Ping timeout: 265 seconds]
Fluent has quit [Disconnected by services]
casadei has quit [Ping timeout: 245 seconds]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
arup_r has quit []
bronson has joined #ruby
Fluent has joined #ruby
akem has quit [Remote host closed the connection]
Fluent has quit [Disconnected by services]
zast has joined #ruby
Fluent has joined #ruby
greister has quit [Quit: WeeChat 1.3]
Fluent has quit [Disconnected by services]
greister has joined #ruby
Guest49451 has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
aryaching has quit [Ping timeout: 272 seconds]
iskander has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
aryaching has joined #ruby
jorum has quit [Ping timeout: 255 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
jottr_ has joined #ruby
karapetyan has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
benjohn has joined #ruby
cisco has joined #ruby
cisco has quit [Max SendQ exceeded]
dwfait has joined #ruby
cisco has joined #ruby
cisco has quit [Client Quit]
hogetaro has quit [Read error: Connection reset by peer]
northfurr has joined #ruby
hogetaro has joined #ruby
rodolfowtf has joined #ruby
aryaching has quit [Ping timeout: 256 seconds]
karapetyan has quit [Ping timeout: 255 seconds]
rkazak has joined #ruby
emilford has joined #ruby
colegatron has joined #ruby
tildes has joined #ruby
aryaching has joined #ruby
tuelz1 has joined #ruby
tjohnson has joined #ruby
walidvb has joined #ruby
<walidvb> hi all. trying to create a regexp, but can't get to it right
dfinninger has joined #ruby
emilford has quit [Ping timeout: 264 seconds]
dlitvak has quit [Ping timeout: 245 seconds]
arup_r has joined #ruby
<walidvb> basically, my user pastes a soundcloud link directly into a wysiwyg, and i then want to convert those to players(using the regexp to find the song id)
tuelz1 has quit [Ping timeout: 240 seconds]
<jhass> ?regex_xml walidvb
<ruby[bot]> walidvb: Don't use Regexp to parse XML or HTML. Use an XML parser like nokogiri or oga. See also: http://stackoverflow.com/a/1732454/2199687
dlitvak has joined #ruby
howdoicomputer has joined #ruby
emilford has joined #ruby
<bvbrandon> hey all, I have a field which needs to append it’s value to the current value, i.e. if User.data == ‘foo’ and I save the value ‘bar’ I need User.data to return ‘foo,bar’
<jhass> walidvb: or maybe consider using URI.extract & ruby-oembed
hannelita has joined #ruby
<walidvb> jhass: hm. fair enough. however, for this use case, only 1 user, little content that won't change, so i'll stick to regexp. i take your point, though
vikaton has joined #ruby
Guest49451 has quit [Quit: ZNC - http://znc.in]
<lucasb> walidvb: $1 is getting set to the url you wanted, no?
<jhass> still consider using oEmbed, it's taking the URL you already sucessfully extracted, url encoding it and using it as a parameter against the endpoint
<jhass> you get some json back with one of the attributes being the embed html
<walidvb> well, it's the wyswiyg who extracts it client side
<walidvb> but it's a really small usecase, teally
kalopsian has quit [Ping timeout: 255 seconds]
howdoicomputer has quit [Ping timeout: 260 seconds]
hogetaro has quit [Read error: Connection reset by peer]
hogetaro has joined #ruby
emilford has quit [Ping timeout: 260 seconds]
jam_ has joined #ruby
<jhass> walidvb: I think we're not sure what your question is
<walidvb> i think i have found my regexp :)
kalopsian has joined #ruby
dlitvak_ has joined #ruby
mhib has joined #ruby
emilford has joined #ruby
mhib has quit [Remote host closed the connection]
jam_ has quit [Ping timeout: 255 seconds]
dlitvak has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
BTRE has quit [Quit: Leaving]
edwinvdgraaf has joined #ruby
hannelita has quit [Ping timeout: 264 seconds]
edwinvdgraaf has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
emilford has quit [Ping timeout: 255 seconds]
tildes has quit [Ping timeout: 260 seconds]
Xeago has quit [Ping timeout: 245 seconds]
<bvbrandon> hey all, I have a field which needs to append it’s value to the current value, i.e. if User.data == ‘foo’ and I save the value ‘bar’ I need User.data to return ‘foo,bar’
asccigcc has joined #ruby
leksster has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
emilford has joined #ruby
pzula has joined #ruby
aspiers_ has joined #ruby
hogetaro has quit [Read error: Connection reset by peer]
El3k0n has quit [Quit: Sto andando via]
nanoz has joined #ruby
hogetaro has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
<jhass> context?
<jhass> rails/activerecord?
<jhass> consider serialize & an array
armyriad has joined #ruby
JohnT has joined #ruby
emilford has quit [Ping timeout: 255 seconds]
linduxed has joined #ruby
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.3]
emilford has joined #ruby
dlitvak_ has quit [Ping timeout: 272 seconds]
lkba has quit [Remote host closed the connection]
marr has joined #ruby
dbugger has quit [Quit: Leaving]
hogetaro has quit [Read error: Connection reset by peer]
hogetaro has joined #ruby
emilford has quit [Ping timeout: 260 seconds]
northfurr has quit [Ping timeout: 264 seconds]
jottr has joined #ruby
aspiers_ has quit [Ping timeout: 246 seconds]
funnel has joined #ruby
jottr_ has quit [Ping timeout: 276 seconds]
emilford has joined #ruby
benjohn has quit [Read error: Connection reset by peer]
dfinninger has quit [Remote host closed the connection]
Limix has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
emilford has quit [Ping timeout: 272 seconds]
troulouliou_div2 has joined #ruby
mfb2 has joined #ruby
Xzanron has joined #ruby
beast has joined #ruby
emilford has joined #ruby
symm- has quit [Quit: Leaving...]
hxegon has joined #ruby
ruby-lang944 has joined #ruby
aspiers_ has joined #ruby
symm- has joined #ruby
mfb2 has quit [Ping timeout: 265 seconds]
northfurr has joined #ruby
<ruby-lang944> I am have been working with ruby for more than a year now. Just last week I noticed the existence of Float::INFINITY. I wonder why does ruby support the concept of Infinity and not simply throw a DevideByZero error.
emilford has quit [Ping timeout: 272 seconds]
<ruby-lang944> I would easier for developers to rescue the exception and take corrective actions than checking the value against Infinity and Nan.
nanoz has quit [Ping timeout: 245 seconds]
yardenbar has quit [Ping timeout: 256 seconds]
<havenwood> ruby-lang944: "Imagine you have zero cookies and split them evenly among zero friends. How many cookies does each person get?"
arup_r has quit [Remote host closed the connection]
tuelz1 has joined #ruby
<ruby-lang944> that's a 0/0. which not defined.
antgel has quit [Ping timeout: 265 seconds]
arup_r has joined #ruby
who42 has quit [Ping timeout: 264 seconds]
pwnd_nsfw has joined #ruby
<ruby-lang944> I would be happy to rescue a DevideByZero exception and then assign 0 cookies to each one.
aspiers_ has quit [Ping timeout: 264 seconds]
<lucasb> it raises a ZeroDivisionError here on my end
<havenwood> >> 1.fdiv 0
<ruby[bot]> havenwood: # => Infinity (https://eval.in/503412)
emilford has joined #ruby
<hxegon> because you shouldn't use error handling for expected behaviour?
<lucasb> ah, I didn't know about fdiv
<ruby-lang944> but when I say 1.fdiv 0, I get infinity which does not make sense.
dmolina has joined #ruby
jottr_ has joined #ruby
psy_ has quit [Remote host closed the connection]
<ruby-lang944> there are no cookies to give away, and no friends to receive them. So the Infinity does not make sense to me.
Xeago has joined #ruby
<havenwood> ruby[bot]: 1
<shevy> ruby-lang944 you clearly did not do 0/0 in irb man
<ruby-lang944> I did and it gave me ZeroDivisionError.
<ruby-lang944> but this is only for integer devision by zero.
dwfait has quit [Remote host closed the connection]
<norc_> 20>> 1.fdiv 0
<ruby[bot]> norc_: # => Infinity (https://eval.in/503416)
hogetaro has quit [Read error: Connection reset by peer]
stamina has quit [Quit: WeeChat 1.3]
northfurr has quit [Ping timeout: 256 seconds]
<ruby-lang944> I am lost when my cookies count is a float
tuelz1 has quit [Ping timeout: 240 seconds]
hogetaro has joined #ruby
who42 has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
northfurr has joined #ruby
Rickmasta has quit [Read error: Connection reset by peer]
Xzanron has quit [Quit: Leaving]
emilford has quit [Ping timeout: 272 seconds]
<ruby-lang944> My problem is when working with numbers (consider i am working with floats) and perform a devision somewhere in the long chain of calculations.
walidvb has quit [Remote host closed the connection]
<ruby-lang944> Somewhere in between my denominator became zero.
Rickmasta has joined #ruby
<ruby-lang944> And now i am not aware of this. the system still continue with the further calculations, which will either end in an Infinity or Nan.
<ruby-lang944> That not what I expect of a good language.
dlitvak has quit [Ping timeout: 265 seconds]
<lucasb> sorry to correct you, but it's spelled "division" :)
<shevy> sounds bogus
<ruby-lang944> year sorry bout the spelling.
dfinninger has joined #ruby
<ruby-lang944> Sorry... What sounds bogus?
emilford has joined #ruby
northfurr has quit [Read error: Connection reset by peer]
dfinninger has quit [Remote host closed the connection]
zeros0623 has joined #ruby
jgt has quit [Ping timeout: 264 seconds]
yuta has joined #ruby
emilford has quit [Ping timeout: 272 seconds]
PsionTheory has joined #ruby
hannelita has joined #ruby
aperyon has joined #ruby
northfurr has joined #ruby
hogetaro has quit [Read error: Connection reset by peer]
hogetaro has joined #ruby
emilford has joined #ruby
usershell has quit [Remote host closed the connection]
<ruby-lang944> I don't see a scenario where Infinity will be useful, except when I need an infinite range, which in itself i feel is wrong.
hannelita has quit [Ping timeout: 240 seconds]
northfurr has quit [Read error: Connection reset by peer]
asccigcc has quit [Quit: asccigcc]
bronson has joined #ruby
howdoicomputer has joined #ruby
mostlybadfly has joined #ruby
iateadonut has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
bronson has quit [Remote host closed the connection]
emilford has quit [Ping timeout: 265 seconds]
aspiers_ has joined #ruby
jottr_ is now known as jottr
jokester has quit [Quit: WeeChat 1.3]
dlitvak has joined #ruby
tildes has joined #ruby
jokester has joined #ruby
solars has joined #ruby
<shevy> I don't see a scenario where this is a problem
dlitvak has quit [Remote host closed the connection]
dfinninger has joined #ruby
howdoicomputer has quit [Ping timeout: 272 seconds]
emilford has joined #ruby
fourq is now known as fourq|away
casadei has joined #ruby
northfurr has joined #ruby
ruby-lang944 has left #ruby [#ruby]
ruby-lang944 has joined #ruby
emilford has quit [Ping timeout: 255 seconds]
pawnbox_ has joined #ruby
casadei has quit [Ping timeout: 240 seconds]
UtkarshRay has quit [Ping timeout: 276 seconds]
pawnbox has quit [Ping timeout: 276 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ruby-lang944 has quit [Ping timeout: 252 seconds]
Bloomer has quit [Remote host closed the connection]
emilford has joined #ruby
fourq|away is now known as fourq
xet7 has quit [Ping timeout: 246 seconds]
emilford has quit [Ping timeout: 256 seconds]
cndiv has joined #ruby
lucasb has quit [Quit: leaving]
arup_r has quit []
gregf has quit [Quit: WeeChat 1.3]
emilford has joined #ruby
<bvbrandon> how does one get the nth occurance of a character?
cndiv has quit [Ping timeout: 260 seconds]
gregf has joined #ruby
antgel has joined #ruby
emilford has quit [Ping timeout: 256 seconds]
BrunoSaboia has joined #ruby
<shevy> here is one way:
<shevy> "abcdefghijkl".chars.select.each_with_index {|char, index| index % 3 == 0 } # => ["a", "d", "g", "j"]
amclain has joined #ruby
jorum has joined #ruby
A124 has quit [Quit: '']
BSaboia has quit [Ping timeout: 265 seconds]
futilegames has joined #ruby
BTRE has joined #ruby
speaking2ode has quit [Ping timeout: 260 seconds]
emilford has joined #ruby
yardenbar has joined #ruby
Xeago has quit [Remote host closed the connection]
speakingcode has joined #ruby
dfinninger has quit [Remote host closed the connection]
yuta has quit [Quit: ERC (IRC client for Emacs 25.1.50.1)]
jbrhbr has joined #ruby
musl has quit [Quit: WeeChat 1.3]
wolffles has joined #ruby
emilford has quit [Ping timeout: 255 seconds]
tuelz1 has joined #ruby
arup_r has joined #ruby
dlitvak has joined #ruby
dmolina has quit [Quit: Leaving.]
lucasb has joined #ruby
dlitvak_ has joined #ruby
<aperyon> Hey guys! Im trying to find a easy to find in reference as proper documentation on ruby. Im pretty happy with what python has, but i seem to struggle to find similar stuff for ruby?
griffindy has joined #ruby
emilford has joined #ruby
<wolffles> ruby-docs?
aspire has joined #ruby
<aperyon> rubydocs.info?
tuelz1 has quit [Ping timeout: 260 seconds]
antgel has quit [Ping timeout: 246 seconds]
<wolffles> oh i just ment the website
<aperyon> ye im browsing it now
<aperyon> just giving each link a try
dlitvak has quit [Ping timeout: 250 seconds]
<aperyon> in a way i enter each
<aperyon> and see what pops up
<wolffles> each is an enumerator
jgt has joined #ruby
<aperyon> its just a test to see how easy to navigate and find what im looking for straight from reference rather than stackoverflow
y3 has joined #ruby
northfurr has quit [Ping timeout: 246 seconds]
<wolffles> yee super helpful
<havenwood> aperyon: ri each
emilford has quit [Ping timeout: 250 seconds]
<aperyon> i already saw rdoc
<aperyon> didt make much sense
<aperyon> and i saw ri being mentioned there as well
<havenwood> aperyon: ^ take a look at Storimer's quick recap of ri
c0ncealed has quit [Read error: Connection reset by peer]
solocshaw has joined #ruby
<havenwood> ?pry
<ruby[bot]> 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.
<ruby[bot]> org/ or get it now with: gem install pry pry-doc
drocsid has joined #ruby
<havenwood> aperyon: ^ you might also enjoy Pry! That's a great way to introspect code and find docs.
<wolffles> how do you learn how to use pry cuz right now im just using it to test simple lines
thoraxe has quit [Ping timeout: 260 seconds]
jgt has quit [Ping timeout: 245 seconds]
<aperyon> interesting
<aperyon> ri doesnt know anything about exit
jam_ has joined #ruby
<lucasb> I think the ri must be generated first
<lucasb> *the ri database
emilford has joined #ruby
PedramT has joined #ruby
<havenwood> aperyon: works on my machine
<havenwood> aperyon: How'd you install Ruby?
<havenwood> aperyon: It came preinstalled, package manager, RVM, ruby-build, ruby-instal or you built it yourself?
hannelita has joined #ruby
<aperyon> i installed it a while ago almost 'accidentally' cuz of sass
<aperyon> im just starting it now
<aperyon> as a second language after python
ur5us has joined #ruby
<drocsid> I installed rvm awhile back and run some cron jobs by rvm created environments. Then recently my rvm environments started giving me trouble. It appeared the rvm installed ruby version had dissappeared somehow. I reinstalled it and continued to use my environment. Now I'm getting errors that have an issue with get_host_by_name. The ruby envionment doesn't seem to be able to resolve hostnames that the system c
<drocsid> an otherwise resolve via nslookup. Has anybody expierenced the get_host_by_name issue or missing rvm rubies?
jam_ has quit [Ping timeout: 246 seconds]
aspiers has joined #ruby
<aperyon> im installing it with apt as ruby-full
aspiers_ has quit [Ping timeout: 264 seconds]
emilford has quit [Ping timeout: 276 seconds]
northfurr has joined #ruby
aspiers_ has joined #ruby
JohnT has quit [Read error: Connection reset by peer]
<aperyon> havenwood: ye, now its working after installing it with apt
<havenwood> aperyon: Was gunna say, ri's a dep of ruby-full!
<havenwood> aperyon: nice
<aperyon> how do i understand what i see?
northfurr has quit [Client Quit]
<aperyon> as in:
<aperyon> from kernel, from context from argf
BSab has joined #ruby
<aperyon> and more
hannelita has quit [Ping timeout: 255 seconds]
c0ncealed has joined #ruby
gruz0 has joined #ruby
<aperyon> aaah starts making sense
<aperyon> very interesting
jbrhbr has quit [Quit: Leaving.]
<havenwood> drocsid: It's hard to say why the Ruby you had selected with RVM didn't persist. Especially now that you've reinstalled it. It could have not been sourcing in your dotfiles, you might have set system or another default, etc, etc.
emilford has joined #ruby
aspiers has quit [Ping timeout: 260 seconds]
tmtwd has joined #ruby
<havenwood> drocsid: Gist the full errors?
howdoicomputer has joined #ruby
BrunoSaboia has quit [Ping timeout: 276 seconds]
bronson has joined #ruby
thoraxe has joined #ruby
northfurr has joined #ruby
Xeago has joined #ruby
symm- has quit [Ping timeout: 276 seconds]
krz has quit [Quit: WeeChat 1.2]
emilford has quit [Ping timeout: 260 seconds]
howdoicomputer has quit [Ping timeout: 250 seconds]
bronson has quit [Ping timeout: 265 seconds]
aspiers_ has quit [Ping timeout: 264 seconds]
dlitvak has joined #ruby
A124 has joined #ruby
emilford has joined #ruby
<wolffles> so im having issues with a condition in an enumerator. i think its just syntax im having trouble wtih.
dlitvak_ has quit [Ping timeout: 260 seconds]
aperyon has quit [Read error: Connection reset by peer]
<wolffles> i cant seem to break the loop
emilford has quit [Ping timeout: 256 seconds]
<lucasb> do you want to use #each or #select?
<wolffles> select cuz i want to choose the ones that fit the conditions
<wolffles> or im not sure
ror15 has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
<lucasb> if I understand correctly, Prime is an infinite enumerator
emilford has joined #ruby
<wolffles> yes it is thats why im having trouble breaking it
<wolffles> if its possible
<wolffles> this is the condition when “ x <( 600851475143 / 2 )”
<wolffles> or until i mean
PedramT has quit [Remote host closed the connection]
<wolffles> i suppose i shouldnt use && cuz it wouldnt make sense for both conditions to pass
<al2o3-cr> >> require 'prime'; Prime.take(2**16).select {|x| (600851475143 % x == 0) && (x < 600851475143 / 2) }
<ruby[bot]> al2o3-cr: # => [71, 839, 1471, 6857] (https://eval.in/503441)
czsr has joined #ruby
czsr has quit [Changing host]
czsr has joined #ruby
<wolffles> al2o3-cr: thats beautiful
jorum has quit [Quit: leaving]
ror15 has left #ruby [#ruby]
jorum has joined #ruby
guardian has joined #ruby
<wolffles> my first solution took 10 lines :/
<al2o3-cr> wolffles: it's your code :P
<wolffles> but yours al2o3-cr makes sense lol
emilford has quit [Ping timeout: 260 seconds]
* al2o3-cr goes and checks his euromillions to see if he's a winner winner chicken dinner
northfurr has quit [Quit: northfurr]
User458764 has joined #ruby
guardian has quit [Client Quit]
<havenwood> wolffles: Or you could use lazy there: Prime.lazy.select { ... }.first 4
PedramT has joined #ruby
karapetyan has joined #ruby
cashnguns has joined #ruby
emilford has joined #ruby
guardian has joined #ruby
aryaching has quit [Ping timeout: 260 seconds]
guardian has quit [Client Quit]
victortyau has joined #ruby
<wolffles> wow
Dimik has joined #ruby
<wolffles> havenwood: i should probably learn .lazy
<al2o3-cr> +1 lazy :p
northfurr has joined #ruby
northfurr has quit [Client Quit]
karapetyan has quit [Ping timeout: 246 seconds]
karapetyan has joined #ruby
<al2o3-cr> >> Prime.prime_division(600851475143).map(&:first)
<ruby[bot]> al2o3-cr: # => uninitialized constant Prime (NameError) ...check link for more (https://eval.in/503445)
<al2o3-cr> >> require 'prime'; Prime.prime_division(600851475143).map(&:first)
<ruby[bot]> al2o3-cr: # => [71, 839, 1471, 6857] (https://eval.in/503446)
devbug has joined #ruby
emilford has quit [Ping timeout: 276 seconds]
victortyau has quit [Remote host closed the connection]
symm- has joined #ruby
victortyau has joined #ruby
jorum has quit [Quit: leaving]
jorum has joined #ruby
victortyau has quit [Max SendQ exceeded]
znz_jp has quit [Ping timeout: 260 seconds]
<wolffles> al2o3-cr: also great. however dont understand the :first
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
emilford has joined #ruby
graphettion has joined #ruby
<wolffles> because it returns more than the first
guardian has joined #ruby
<al2o3-cr> &ri Enumerable#first
victortyau has joined #ruby
victortyau has quit [Max SendQ exceeded]
tuelz1 has joined #ruby
victortyau has joined #ruby
tildes has quit [Ping timeout: 272 seconds]
ta0 has joined #ruby
A124 has quit [Quit: '']
<wolffles> oh cuz the enumerator will return 1 integer at a time for map to choose from?
emilford has quit [Ping timeout: 256 seconds]
Blaguvest has joined #ruby
<al2o3-cr> [[71, 1], [839, 1], [1471, 1], [6857, 1]] this is an array of arrays, yes?
<wolffles> yes
<al2o3-cr> map takes each element in the array which is an array so the first one is [71, 1], yes?
tuelz1 has quit [Ping timeout: 245 seconds]
govg has quit [Ping timeout: 272 seconds]
<wolffles> yee
<al2o3-cr> then calls [71, 1].first which is 71 do you see what i mean (also not a great explainer) :P
<wolffles> no that was exactly what i needed
<wolffles> thanks :}
<al2o3-cr> yw :)
dsfdsgdf has joined #ruby
yardenbar has quit [Ping timeout: 240 seconds]
emilford has joined #ruby
jgt has joined #ruby
Bulo has joined #ruby
jorum has quit [Ping timeout: 276 seconds]
asthasr has left #ruby ["Leaving"]
dsfdsgdf has quit [Remote host closed the connection]
ericfreese has joined #ruby
znz_jp has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
jgt has quit [Ping timeout: 265 seconds]
DrCode has joined #ruby
The_Phoenix has quit [Quit: Leaving.]
karapetyan has quit [Remote host closed the connection]
A124 has joined #ruby
emilford has joined #ruby
casadei has joined #ruby
hannelita has joined #ruby
PedramT has quit [Remote host closed the connection]
dionysus69 has quit [Quit: dionysus69]
dlitvak has quit [Ping timeout: 260 seconds]
gbgdev has joined #ruby
karapetyan has joined #ruby
dionysus69 has joined #ruby
PedramT has joined #ruby
decoponio has quit [Quit: Leaving...]
drptbl has joined #ruby
emilford has quit [Ping timeout: 276 seconds]
hannelita has quit [Ping timeout: 264 seconds]
gbgdev has quit [Ping timeout: 255 seconds]
marcdel has quit [Ping timeout: 246 seconds]
emilford has joined #ruby
diegoviola has joined #ruby
marcdel has joined #ruby
marcdel has quit [Max SendQ exceeded]
sonOfRa has quit [Quit: Bye!]
marcdel has joined #ruby
sonOfRa has joined #ruby
yardenbar has joined #ruby
dmolina has joined #ruby
doublemalt_ has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
al2o3-cr has quit [Ping timeout: 250 seconds]
DoubleMalt has quit [Ping timeout: 250 seconds]
ruby-lang069 has joined #ruby
arup_r has quit []
emilford has joined #ruby
<ruby-lang069> Can anyone help me with a ruby script I'm trying to write having finished code academt please?
PedramT has quit [Remote host closed the connection]
<Radar> ruby-lang069: If you show us your code and explain your problem then we can help you.
User458764 has joined #ruby
<ruby-lang069> Just trying to write a method that returns one of two strings at random.
yardenbar has quit [Ping timeout: 245 seconds]
<ruby-lang069> I've created methods that convert a string to upper and lower case and my third challenge is to return one string or another.
<j416> ruby-lang069: Array#sample is a quick way to accomplish that.
<ruby-lang069> I've tried that but couldn't get it to work.
PedramT has joined #ruby
blackmes1 has joined #ruby
<j416> ruby-lang069: so show the code
<Radar> ^
<wolffles> you taking the app academy exam?
emilford has quit [Ping timeout: 240 seconds]
<ruby-lang069> array = ["chris","tony"]
<ruby-lang069> this sets the array up yeah?
<wolffles> thats an array yes
<ruby-lang069> array = ["chris","tony"] def random_name(random_name) random_name = array#sample end puts "Hello #{random_name}"
spooq|2 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
bluOxigen_ has joined #ruby
<ruby-lang069> sorry, can't get line spacing on here
dmolina has quit [Quit: Leaving.]
dmolina has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
casadei has quit [Remote host closed the connection]
<ruby-lang069> Any ideas?
<j416> ruby-lang069: use a pastebin, it'll be easier
emilford has joined #ruby
<j416> ruby-lang069: Array#sample means "the instance method called 'sample' on an object of type Array"
<j416> ruby-lang069: it's nothing that you type out as-is
<j416> ruby-lang069: Array#sample means [].sample
aspire has quit [Quit: Leaving]
PedramT has quit [Remote host closed the connection]
PedramT has joined #ruby
<ruby-lang069> What should it be then?
<j416> ruby-lang069: so in your case, since you have a variable that you call array, you can do array.sample
<wolffles> ruby-lang069 = array = ["chris","tony"].sample
<j416> wolffles: that is just confusing
<wolffles> but its what he wants
<j416> no
<ruby-lang069> thanks guys
<j416> he does not want two variables ruby-lang069 and array containing a string
einarj has joined #ruby
<j416> ruby-lang069: did it work out?
<wolffles> ruby-lang069: is his name sorry
<ruby-lang069> I just want a method that can then be put to the screen with one string or another at random
<j416> ruby-lang069: so you should be done
<j416> ruby-lang069: is there still a problem?
karapetyan has quit [Remote host closed the connection]
<j416> >> array = ['foo', 'bar]; array.sample
<ruby[bot]> j416: # => /tmp/execpad-a16f2f559a61/source-a16f2f559a61:2: unterminated string meets end of file ...check link for more (https://eval.in/503465)
<j416> sorry
<j416> >> array = ['foo', 'bar']; array.sample
<ruby[bot]> j416: # => "bar" (https://eval.in/503466)
<j416> ^ there
<ruby-lang069> Would you put that in the method then?
<j416> ruby-lang069: I just told you, twice.
emilford has quit [Ping timeout: 260 seconds]
<wolffles> for app accademy tho they want you to create a method
karapetyan has joined #ruby
peeja has joined #ruby
<wolffles> https://eval.in/503467 ruby-lang069
<ruby-lang069> Sorry I can't get it working. I'll keep trying. Back in 20 mins.
kobain has joined #ruby
<j416> ruby-lang069: wolffles just gave you a complete solution
<wolffles> lol
<j416> it's hard to know what your problem is if you can't communicate it..
<wolffles> im doing app accademy too ruby-lang069
emilford has joined #ruby
<ruby-lang069> I'll try explaining it again in a bit
<ruby-lang069> Thanks
<wolffles> gl
<j416> hf
xet7 has joined #ruby
aef has joined #ruby
<lucasb> jk
guacamole has joined #ruby
<hxegon> lol
carraroj has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
al2o3-cr has joined #ruby
emilford has quit [Ping timeout: 265 seconds]
Rodya_ has joined #ruby
zeros0623 has quit [Quit: zeros0623]
rhg135 has quit [Ping timeout: 256 seconds]
dlitvak has quit [Ping timeout: 245 seconds]
karapetyan has quit [Remote host closed the connection]
tuelz1 has joined #ruby
yardenbar has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
emilford has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
blackmes1 has quit [Ping timeout: 265 seconds]
pulgolino has quit [Remote host closed the connection]
blackmes1 has joined #ruby
craysiii has joined #ruby
craysiii has quit [Max SendQ exceeded]
futilegames has quit [Quit: futilegames]
victortyau has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
craysiii has joined #ruby
codecop has quit [Remote host closed the connection]
blackmes1 has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
tuelz1 has quit [Ping timeout: 264 seconds]
pawnbox_ has quit [Remote host closed the connection]
emilford has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
unreal has quit [Ping timeout: 276 seconds]
houhoulis has joined #ruby
victortyau has joined #ruby
unreal has joined #ruby
<ruby-lang069> ok. wolffles and j416 are you guys there?
<wolffles> ?
beast has quit [Ping timeout: 264 seconds]
<j416> ?
<ruby-lang069> cool
PedramT has quit []
<ruby-lang069> I have a method that converts a string to upper case....
<ruby-lang069> def upper(name) name = name.upcase end
<ruby-lang069> and one that converts to lower case...
<ruby-lang069> def lower(name) name = name.downcase end
<ruby-lang069> When I call them, they work:
<ruby-lang069> puts "Hello #{upper(name)}" puts "Hello #{lower(name)}"
blackmesa has quit [Ping timeout: 250 seconds]
emilford has joined #ruby
gbgdev has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
<j416> ruby-lang069: remove the puts in your randomizer method, voilà.
<wolffles> so whats the problem?
* j416 off
<ruby-lang069> now I need a method that will output one name or another when called.
<ruby-lang069> the method is called "random_name"
<ruby-lang069> and I need this to call it:
<ruby-lang069> puts "Hello #{random_name}"
blackmesa has joined #ruby
pawnbox has quit [Ping timeout: 272 seconds]
jam_ has joined #ruby
beast_ has joined #ruby
blackmesa has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
<wolffles> ruby-lang069: https://eval.in/503472
<ruby-lang069> thanks wolffles but I don't understand. I need: puts "Hello #{random_name}" to call the method
emilford has quit [Ping timeout: 276 seconds]
ta0 has quit [Ping timeout: 272 seconds]
<lucasb> def random_name; ["chris","tony"].sample; end
jam_ has quit [Ping timeout: 272 seconds]
hannelita has joined #ruby
<Radar> ruby-lang069: You're not explaining it very well. What method should it call
<Radar> ruby-lang069: Should it call one of upper or lower?
<ruby-lang069> puts "Hello #{random_name}"
emilford has joined #ruby
Rodya_ has quit [Remote host closed the connection]
usershell has joined #ruby
<wolffles> or if you really wanted you could just have done this https://eval.in/503475
<ruby-lang069> is P short for Puts?
<wolffles> yes
rakm has joined #ruby
<Radar> ruby-lang069: it's short hand for puts thing.inspect
usershell has quit [Read error: Connection reset by peer]
Cohedrin has joined #ruby
usershell has joined #ruby
puria has quit [Remote host closed the connection]
<ruby-lang069> Ok.... now I need to implement a method called `random_case` that will return a lower or upper case version of a string (passed in as an argument) at random.
blackmesa has quit [Read error: Connection reset by peer]
<Radar> ruby-lang069: We are not going to do your homework for yuo.
hannelita has quit [Ping timeout: 255 seconds]
blackmesa has joined #ruby
<Radar> ruby-lang069: Please show that you've tried something and then we'll guide you along the path to the right answer. We really shouldn't be handing out answers here.
<wolffles> yeah is this the exam? where are you getting these problems cuz i never got these
<wolffles> are you doing the app acdemy in sf?
<Radar> ^
howdoicomputer has joined #ruby
<ruby-lang069> just some help would be nice? I can't get my head around it.
<Radar> "Please help me cheat the exam"
<Cohedrin> wait
<Radar> ruby-lang069: I told you how to get help. Please follow my instructions.
<Cohedrin> you're trying to cheat on a code school test
<Cohedrin> LOL
bronson has joined #ruby
<ruby-lang069> how can I use a paste board? Much easier to give my answer on there
emilford has quit [Ping timeout: 256 seconds]
peeja has quit [Ping timeout: 276 seconds]
<Radar> ?gist ruby-lang069
<ruby[bot]> ruby-lang069: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<Radar> Cohedrin: ikr
usershell has quit [Ping timeout: 256 seconds]
<Radar> ruby-lang069: the trouble with us giving you answers is that you'll become a help vampire and you won't be a very good programmer at all... because the very second you get stuck you'll come crying to us for help.
<wolffles> string = “this is how you upcase”; string.upcase
<ruby-lang069> Sorry I don't get it. I'll just try it on my own.
<Radar> ruby-lang069: And if you get hired as a "competent" programmer who just asks questions on IRC all the time then the company will see right through that and (very likely) fire you.
<Radar> ruby-lang069: If you're stuck in 15min then show us what you've tried and we'll help you.
<ruby-lang069> thanks
<wolffles> id be pretty upset if you got into app academy tbh cuz ive been studying non stop for almsot a 2 months now
<ruby-lang069> I'll do it on my own then
howdoicomputer has quit [Ping timeout: 250 seconds]
<Cohedrin> wollfles which one are you trying to get into?
<wolffles> the sf one
bronson has quit [Ping timeout: 265 seconds]
<wolffles> the next classes start in march
<Radar> lol
<Radar> so precise
emilford has joined #ruby
<Radar> there are at least a billionty code academies in SF
pawnbox has joined #ruby
<Cohedrin> tru fam
<Cohedrin> I pass like 5 on my way to work
<wolffles> lol
<Cohedrin> and I only walk 10 minutes
<wolffles> true lol
<wolffles> i like AA’s promised benefits
<wolffles> but honestly if i had the money id go with Bloc
<Radar> Hardtail who's sometimes here graduated from Bloc iirc.
<wolffles> they seem to have a more rigourous course and indepth about CS
blackmes1 has joined #ruby
Bulo has left #ruby [#ruby]
<wolffles> cuz so far i havent learned anything about umm operating systems
gruz0 has quit [Quit: This computer has gone to sleep]
<Cohedrin> wait I thought code schools were free, they took part of your salary
<wolffles> Block is upfront you pay for school
<Radar> Cohedrin: depends
<wolffles> no exam required
dlitvak has joined #ruby
<Radar> Cohedrin: Turing.io tuition can be paid up front or in instalments AND if they don't find you a job within 6mths they refund the whole thing.
dtordable has left #ruby [#ruby]
blackmesa has quit [Read error: Connection reset by peer]
<Cohedrin> I see, the only one I'm familiar with is the one by that havard dropout.. code school? There was a video on it
yardenbar has quit [Ping timeout: 240 seconds]
emilford has quit [Ping timeout: 240 seconds]
<wolffles> im definatly going back to uni for a CS degree once i get a job in the industry
<Cohedrin> ah no, make school: https://www.youtube.com/watch?v=6rT00QXqZak
<Cohedrin> wolffles, what do you want to do?
<Cohedrin> web apps, data shit, etc
<ruby-lang069> Ok... can I ask some questions without ridicule? please?
gruz0 has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
<wolffles> tbh i feel like the schooling system is failing
dlitvak has quit [Ping timeout: 276 seconds]
gbgdev has quit [Remote host closed the connection]
dionysus69 has quit [Quit: dionysus69]
gbgdev has joined #ruby
<Cohedrin> wolffles I agree with you that its failing developers. Which is why I'm asking what you want to do.
<ruby-lang069> can I ask please?
<Cohedrin> If you want to make web apps, or something similar, a cs degree is just going to waste your time in most cases
<Cohedrin> _especially_ if you want to work in sf, sf is very progressive in terms of degrees
<lucasb> only if they are ruby programming related questions
emilford has joined #ruby
<wolffles> be a developer i think
<wolffles> i havent looked at job possibilitys yet
<lucasb> ot
<wolffles> when i look into the future i get overwhelmed and discourage cuz i have to learn so much more to get there
<ruby-lang069> Isn't the: p names.sample the same as puts names.sample
ericfreese has quit [Quit: WeeChat 1.4]
<Cohedrin> no
<Cohedrin> p means puts element.inspect
<ruby-lang069> how do you mean?
<Cohedrin> go into irb
<ruby-lang069> ok
drocsid has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
<ruby-lang069> and type: p names.sample
<Cohedrin> yes, for simple objects the output is going to look the same
<Cohedrin> the difference is that p calls the .inspect method on the object
yfeldblum has joined #ruby
TomyLobo has quit [Ping timeout: 256 seconds]
<Cohedrin> which produces different output depending on the object
<djellemah> >> puts ["1","2"] # ruby-lang069
<ruby[bot]> djellemah: # => 1 ...check link for more (https://eval.in/503479)
<djellemah> >> p ["1","2"] # ruby-lang069
<ruby[bot]> djellemah: # => ["1", "2"] ...check link for more (https://eval.in/503481)
<ruby-lang069> so why "p" in my case?
<ruby-lang069> the help file you sent suggests that it's the class name?
lolquery has joined #ruby
<lolquery> anyone good at regex?
<lolquery> i would like some help with this regular expression: https://repl.it/Be6X
<lolquery> i would like to match only letters
<Cohedrin> I don't know what you're trying to ruby-lang069
sonOfRa_ has joined #ruby
<Cohedrin> if you're trying to debug, p is usually more suitable for debugging
emilford_ has joined #ruby
<Cohedrin> puts is usually more suitable for just printing strings
<norc_> if you are trying to debug, pry is your best friend.
<Cohedrin> norc_ has a good point
drptbl has joined #ruby
pawnbox has quit [Ping timeout: 255 seconds]
<ruby-lang069> so in my line of code.... is: p names.sample the same as: puts names.sample - I don't think it is.
ico has joined #ruby
psyq_ has joined #ruby
<Cohedrin> it depends on what names is
<Cohedrin> is it an array of strings
<ruby-lang069> yes
<norc_> ri Kernel#p
<norc_> &ri Kernel#p
<norc_> ruby-lang069, ^--
<Cohedrin> already linked him norc_ lol
<Cohedrin> we're not reading docs here
<Cohedrin> thats too 2000
bithon has joined #ruby
ico has quit [Remote host closed the connection]
emilford has quit [*.net *.split]
guacamole has quit [*.net *.split]
sonOfRa has quit [*.net *.split]
marcdel has quit [*.net *.split]
c0ncealed has quit [*.net *.split]
lucasb has quit [*.net *.split]
wolffles has quit [*.net *.split]
BTRE has quit [*.net *.split]
gregf has quit [*.net *.split]
linduxed has quit [*.net *.split]
Ishido has quit [*.net *.split]
psyq has quit [*.net *.split]
spacemud has quit [*.net *.split]
klaas has quit [*.net *.split]
chouhoulis has quit [*.net *.split]
El3ktra has quit [*.net *.split]
mrtomme has quit [*.net *.split]
KillerFox has quit [*.net *.split]
M-Technic has quit [*.net *.split]
inkky has quit [*.net *.split]
TheBrayn has quit [*.net *.split]
hypnosb has quit [*.net *.split]
mame2 has quit [*.net *.split]
ccowart has quit [*.net *.split]
hinbody has quit [*.net *.split]
Couch has quit [*.net *.split]
duracrisis has quit [*.net *.split]
chridal has quit [*.net *.split]
Platini has quit [*.net *.split]
tekk has quit [*.net *.split]
forgot has quit [*.net *.split]
<Cohedrin> go into irb, and type puts "a"
<Cohedrin> then p "a"
<Cohedrin> you'll see the difference
<djellemah> &ri Regexp
<djellemah> lolquery: ^-- look for [[:alpha:]]
<ruby-lang069> one returns nil and the other returns "a"
<ruby-lang069> is that correct?
klaas has joined #ruby
<norc_> Cohedrin, I just recommend you dont endulge the troll./
<ruby-lang069> thanks
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Cohedrin> I would recommend you read the docs that I and norc_ have linked you
emilford_ has quit [Ping timeout: 272 seconds]
<Cohedrin> thats what they're there for :D
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
symm- has quit [Ping timeout: 240 seconds]
lolquery has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
<ruby-lang069> thanks
xProto has joined #ruby
lucasb has joined #ruby
Darmani has joined #ruby
symm- has joined #ruby
<Darmani> Hey guyss
emilford has joined #ruby
ruby-lang069 has quit [Quit: Page closed]
finisherr has joined #ruby
psyq_ has quit [Quit: Conversation terminated]
psyq has joined #ruby
darkf has quit [Quit: Leaving]
diegoviola has quit [Ping timeout: 240 seconds]
<apeiros> hi girly
carraroj has joined #ruby
carraroj has quit [Client Quit]
pawnbox has quit [Ping timeout: 265 seconds]
emilford has quit [Ping timeout: 256 seconds]
<Darmani> Lol apeiros.
victortyau has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Darmani> I'm not sure why I keep getting this error. I don't get it when I run it in my code editor https://repl.it/Be65
tuelz1 has joined #ruby
diego1 has joined #ruby
mist has quit [Ping timeout: 610 seconds]
diego1 has quit [Changing host]
diego1 has joined #ruby
<Darmani> Besides that error though, the real problem is that the boolean returns true and it shouldn't. I don't know why it comes back as true...
diego1 is now known as diegoviola
ohaibbq has joined #ruby
iskander has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> seems to be a bug with repl.it
<apeiros> works fine in pry
<Darmani> @apeiros - Oh okay.
<Darmani> @apeiros - It shouldn't return as true though... "ab" is not a letter.
<apeiros> but remove those parens. it looks silly and is not necessary.
<Cohedrin> I suspect its a repl thing
<Cohedrin> apeiros beat me to it :D
<apeiros> Darmani: and @ is not required in irc - that makes you look silly.
<havenwood> Darmani: And use two-spaced soft tabs.
<Darmani> lmao okay now that we're done nitpicking...
<havenwood> Darmani: That's a community standard.
<Darmani> Someone tell me why it returns as true. I don't get it.
<apeiros> as for it not doing what you want - well, you'll have to fix your regex then
<apeiros> because "ab" matches /[a-z]/
<apeiros> >> "ab" =~ /[a-z]/
<Darmani> It does??
<ruby[bot]> apeiros: # => 0 (https://eval.in/503482)
<apeiros> totally
emilford has joined #ruby
<apeiros> you want the regex to mean *exactly one* [a-z]?
<Darmani> How do I fix that...
<havenwood> "ab" has a character in the range of a to z.
<Darmani> yuss
<apeiros> anchor it
<apeiros> >> "ab" =~ /\A[a-z]\z/
<ruby[bot]> apeiros: # => nil (https://eval.in/503483)
<apeiros> the regex is allowed to match anywhere in your string
pawnbox has joined #ruby
<Darmani> Ohh.
<apeiros> and \A says "start of string" and \z says "end of string"
<apeiros> don't confuse them with ^ and $ (start of line and end of line)
tuelz1 has quit [Ping timeout: 240 seconds]
<Darmani> So the whole string is judged instead of each character?
<norc_> And you should probably include upper case letters too.
<apeiros> yes, =~ will try at every possible position
<apeiros> >> "foobar" =~ /bar/
<ruby[bot]> apeiros: # => 3 (https://eval.in/503484)
<hxegon> How can I get 'context' syntax in minitest specs? I read about minitest-context, but that seems depreciated.
<Darmani> Ahhh. I see. I guess that makes sense.
<havenwood> >> 'á' =~ /\A[[:lower:]]\z/
<ruby[bot]> havenwood: # => 0 (https://eval.in/503485)
tmtwd has quit [Ping timeout: 260 seconds]
<Darmani> Cool thanks guys ^.^
<apeiros> sure sis
<Darmani> apeiros - I'm starting to like you.
<Darmani> Just a little bit.
pwnd_nsfw has quit [Ping timeout: 250 seconds]
<havenwood> >> 'á' =~/\A\p{Lower}\z/
<hxegon> apeiros also, something I've been wondering. \a and \z are case insensitive right? \a == \A, \z == \Z?
<ruby[bot]> havenwood: # => 0 (https://eval.in/503486)
<apeiros> as long as you don't expect it to be mutual :-p
<Darmani> apeiros - Ha. I wouldn't dream of it =P
<apeiros> hxegon: incorrect
jgt has joined #ruby
<apeiros> \z != \Z, and I have no idea what \a is :)
<apeiros> might be just a
<hxegon> apeiros :| I may have some code to run too...
<apeiros> \z = end of string, \Z = end of string, allowing a newline after the \Z
<hxegon> ahh. ty apeiros
<havenwood> or golf: \p{Ll}
newbie22 has joined #ruby
<Darmani> apeiros - Quick question. So \A and "^" are not the same thing?
<apeiros> >> ["foo\n" =~ /foo\z/, "foo\n" =~ /foo\Z/] # <- hxegon
<ruby[bot]> apeiros: # => [nil, 0] (https://eval.in/503487)
<apeiros> Darmani: correct. \A and ^ differ
<apeiros> >> ["foo\nbar" =~ /^bar/, "foo\nbar" =~ /\Abar/] # <- Darmani
<ruby[bot]> apeiros: # => [4, nil] (https://eval.in/503488)
emilford has quit [Ping timeout: 260 seconds]
<havenwood> Darmani: Give the Regexp docs a once over, or at least the cliff notes: http://rubular.com
<apeiros> ^ is start of line - which is any line. hence "foo\nbar" satisfies /^bar/, since there is indeed a line starting with "bar"
<Darmani> havenwood - Roger that.
<Darmani> apeiros - Mmk, thanks.
b2zeldafreak has joined #ruby
haraigoshi has quit [Ping timeout: 250 seconds]
<apeiros> and yeah, +1 @ regexp docs. they're now in a quite good shape.
pawnbox has quit [Ping timeout: 265 seconds]
jgt has quit [Ping timeout: 272 seconds]
emilford has joined #ruby
<apeiros> Darmani: re your repl.it problem - you're not in toplevel. class ::String instead of class String fixes the problem.
Dimik has quit [Ping timeout: 245 seconds]
<Darmani> apeiros - ehhh. I'm still a little iffy on how scopes work... I have to study more.
<apeiros> Darmani: essentially you're doing `module Context; class String; … ; end; end?
<apeiros> because they eval your code within that Context thingy.
<apeiros> so you create a class Context::String with a single #letter? method, instead of changing String.
<lucasb> this is a repl.it specific thing, right?
<havenwood> Darmani: Use a local REPL! Pry is nice.
<apeiros> and ::String just tells ruby "use toplevel String, not Current::Scope::String"
<apeiros> lucasb: yes
<apeiros> and +1 pry
<havenwood> ?pry Darmani
<ruby[bot]> Darmani: 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:/
<ruby[bot]> /pryrepl.org/ or get it now with: gem install pry pry-doc
<apeiros> after more than 15min, it's silly to still use repl.it or similar.
<apeiros> hu? who made that longer than a single message? o0
<apeiros> that should be verboten.
<Darmani> apeiros - Okay. That was a little hard to follow but thanks. I'll fix it.
bluOxigen_ has quit [Ping timeout: 250 seconds]
<Darmani> havenwood - I've been using sublime as of late.
pawnbox has joined #ruby
<apeiros> oh, I guess cinch didn't split, butler does
hannelita has joined #ruby
mist has joined #ruby
emilford has quit [Ping timeout: 276 seconds]
<havenwood> Darmani: I think you can set Sublime to detect spacing by buffer or whatever they call it. It should know Ruby's convention well. Or in your settings tab_size 2 and translate_tables_to_spaces true.
<havenwood> translate_tabs*
brack has joined #ruby
<hxegon> Anyone have an opinion on minitest::unit vs minitest::spec?
<Darmani> havenwood - The sizes for the tabs are 4. It's easier for me to see what I'm doing that way.
lxsameer has joined #ruby
<apeiros> sublime sometimes fails wrt spaces/tabs
<apeiros> for some reason it sometimes assumes insane tab-widths
pwnd_nsfw has joined #ruby
guacamole has joined #ruby
hannelita has quit [Ping timeout: 240 seconds]
emilford has joined #ruby
<havenwood> Darmani: I'd recommend two-spacing anyways for code you publish. It's a strong convention.
vikas027 has joined #ruby
<Darmani> havenwood - Noted, thanks.
graphettion has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 260 seconds]
chridal has joined #ruby
chridal has quit [Changing host]
chridal has joined #ruby
duracrisis has joined #ruby
bronson has joined #ruby
M-Technic has joined #ruby
hinbody has joined #ruby
spacemud has joined #ruby
tomaw is now known as 21WAAR5J5
Couch has joined #ruby
tekk has joined #ruby
ccowart has joined #ruby
casadei has joined #ruby
chouhoulis has joined #ruby
hypnosb has joined #ruby
21WAAR5J5 is now known as tomaw
mrtomme has joined #ruby
TheBrayn has joined #ruby
El3ktra has joined #ruby
El3ktra has quit [Changing host]
El3ktra has joined #ruby
linduxed has joined #ruby
KillerFox has joined #ruby
Platini has joined #ruby
einarj has quit [Remote host closed the connection]
gregf has joined #ruby
blackgoat has joined #ruby
inkky has joined #ruby
inkky has quit [Changing host]
inkky has joined #ruby
Kryptonical has joined #ruby
emilford has quit [Ping timeout: 272 seconds]
Xeago has quit [Remote host closed the connection]
vikas027 has quit [Quit: Textual IRC Client: www.textualapp.com]
Azure has joined #ruby
haraigoshi has joined #ruby
CloCkWeRX has joined #ruby
brack has quit [Ping timeout: 252 seconds]
chouhoulis has quit [Remote host closed the connection]
pawnbox has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
Xeago has joined #ruby
mame2 has joined #ruby
forgot has joined #ruby
doublemalt_ has quit [Remote host closed the connection]
emilford has joined #ruby
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
newbie22 has quit [Quit: Leaving]
guacamole has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
BSab has quit [Ping timeout: 276 seconds]
last_staff has joined #ruby
mfb2 has joined #ruby
Xeago has quit [Ping timeout: 245 seconds]
Melpaws has joined #ruby
blackmes1 has quit [Ping timeout: 245 seconds]
y3 has quit [Quit: Leaving]
diego1 has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
diego1 has quit [Changing host]
diego1 has joined #ruby
diegoviola has quit [Ping timeout: 255 seconds]
mistermocha has joined #ruby
diego1 is now known as diegoviola
emilford has quit [Ping timeout: 260 seconds]
faewfd has joined #ruby
marcdel has joined #ruby
mfb2_ has joined #ruby
mondok has joined #ruby
stevemackinnon has joined #ruby
Melpaws has quit [Ping timeout: 240 seconds]
changa has joined #ruby
changa was kicked from #ruby by ChanServ [Banned: goodbye]
mfb2 has quit [Ping timeout: 264 seconds]
skade has joined #ruby
romancpodolski has quit [Quit: Lost terminal]
emilford has joined #ruby
lxsameer has quit [Quit: Leaving]
sharkman has joined #ruby
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
<sharkman> a = [8, 10, 3, 1]... how do i return just 10, and 1... like a[1,3]
colegatron has quit [Ping timeout: 272 seconds]
pawnbox has joined #ruby
minotep has joined #ruby
<sharkman> by doing a[1,3] i get [10,3,1] which is not what i want
<lucasb> a.at_values(1, 3)
<sharkman> thanks!
<lucasb> *values_at
Melpaws has joined #ruby
rkazak has joined #ruby
zast has quit [Remote host closed the connection]
emilford has quit [Ping timeout: 260 seconds]
dlitvak has joined #ruby
harai has joined #ruby
Rodya_ has joined #ruby
vifino has quit [*.net *.split]
erichmenge has quit [*.net *.split]
tsunamie has quit [*.net *.split]
renderfu_ has quit [Ping timeout: 265 seconds]
Kruppe has quit [Ping timeout: 256 seconds]
tuelz1 has joined #ruby
rhg135 has joined #ruby
haraigoshi has quit [Ping timeout: 260 seconds]
renderfu_ has joined #ruby
erichmenge has joined #ruby
tsunamie has joined #ruby
vifino has joined #ruby
tsunamie has quit [Max SendQ exceeded]
pawnbox has quit [Ping timeout: 240 seconds]
tsunamie has joined #ruby
emilford has joined #ruby
lucasb has quit [Quit: leaving]
tuelz1 has quit [Ping timeout: 264 seconds]
dorei has quit [Ping timeout: 265 seconds]
dorei has joined #ruby
diegoviola has quit [Ping timeout: 240 seconds]
emilford has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
colegatron has joined #ruby
guacamole has joined #ruby
j_mcnally has joined #ruby
PhilK has quit [Quit: Connection closed for inactivity]
mfb2_ has quit [Remote host closed the connection]
emilford has joined #ruby
guacamole has quit [Client Quit]
Kruppe has joined #ruby
sankaber has joined #ruby
pawnbox has quit [Ping timeout: 255 seconds]
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
zast has joined #ruby
ur5us has quit [Remote host closed the connection]
emilford has quit [Ping timeout: 240 seconds]
faewfd has quit [Quit: IRC]
solars has quit [Ping timeout: 260 seconds]
zenlot2 has joined #ruby
duoi has joined #ruby
tekk has quit [Ping timeout: 250 seconds]
skade has quit [Read error: No route to host]
skade has joined #ruby
zenlot1 has quit [Ping timeout: 256 seconds]
diego1 has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
yorickpeterse has quit [Ping timeout: 250 seconds]
hollywood has quit [Ping timeout: 250 seconds]
yorickpeterse has joined #ruby
unsymbol has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
nomadic has quit [Ping timeout: 250 seconds]
bakedb_ has quit [Ping timeout: 240 seconds]
gruz0_ has joined #ruby
timmow has quit [Ping timeout: 240 seconds]
tekk has joined #ruby
timmow has joined #ruby
mayamai has quit [Ping timeout: 250 seconds]
houhoulis has quit [Remote host closed the connection]
stevemackinnon has quit [Ping timeout: 250 seconds]
minimalism has quit [Ping timeout: 250 seconds]
levifig has quit [Ping timeout: 250 seconds]
jsaak has quit [Ping timeout: 250 seconds]
code_ has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Ping timeout: 250 seconds]
snapcase has quit [Ping timeout: 250 seconds]
nomadic has joined #ruby
code_ has joined #ruby
stevemackinnon has joined #ruby
minotep has quit [Quit: minotep]
crowell has quit [Ping timeout: 250 seconds]
CustosLimen has quit [Ping timeout: 250 seconds]
lannonbr1 has joined #ruby
marr123 has joined #ruby
Rickmasta has joined #ruby
psyq has quit [Ping timeout: 250 seconds]
gruz0 has quit [Ping timeout: 250 seconds]
hanmac1 has quit [Ping timeout: 250 seconds]
scottymeuk has quit [Ping timeout: 250 seconds]
marr has quit [Killed (sendak.freenode.net (Nickname regained by services))]
marr123 is now known as marr
snapcase has joined #ruby
emilford has joined #ruby
webhat has quit [Read error: Connection reset by peer]
ruisantos has quit [Ping timeout: 240 seconds]
pzula has quit [Ping timeout: 240 seconds]
gilesww has quit [Ping timeout: 240 seconds]
lannonbr has quit [Ping timeout: 240 seconds]
matugm has quit [Ping timeout: 240 seconds]
Brando753 has quit [Excess Flood]
tomaw has quit [Read error: Connection reset by peer]
Silex has quit [Ping timeout: 250 seconds]
okdas has quit [Ping timeout: 250 seconds]
hollywood has joined #ruby
matugm has joined #ruby
matugm has quit [Changing host]
matugm has joined #ruby
Brando753-o_O_o has joined #ruby
psyq has joined #ruby
Silex has joined #ruby
sumark has quit [Ping timeout: 240 seconds]
gilesww has joined #ruby
unsymbol has joined #ruby
webhat has joined #ruby
varesa has quit [Ping timeout: 250 seconds]
CustosLimen has joined #ruby
crowell has joined #ruby
crowell has quit [Changing host]
crowell has joined #ruby
sumark has joined #ruby
levifig has joined #ruby
aep has quit [Ping timeout: 250 seconds]
ruby[bot] has quit [Ping timeout: 240 seconds]
tomaw has joined #ruby
grassass has quit [Ping timeout: 250 seconds]
minimalism has joined #ruby
ropeney has joined #ruby
Brando753-o_O_o is now known as Brando753
hanmac has joined #ruby
jam_ has joined #ruby
kalopsian has quit [Ping timeout: 260 seconds]
sharkman has quit [*.net *.split]
znz_jp has quit [*.net *.split]
amclain has quit [*.net *.split]
armyriad has quit [*.net *.split]
davedev24 has quit [*.net *.split]
mahk has quit [*.net *.split]
phredus has quit [*.net *.split]
Meow-J has quit [*.net *.split]
Kryptonical has quit [*.net *.split]
crdpink2 has quit [*.net *.split]
ixti has quit [*.net *.split]
Apocalypse has quit [*.net *.split]
LiquidInsect has quit [*.net *.split]
dmonster has quit [*.net *.split]
mclee has quit [*.net *.split]
Seich has quit [*.net *.split]
shadeslayer has quit [*.net *.split]
Guest4184____ has quit [*.net *.split]
angiebadillo has quit [*.net *.split]
daxroc has quit [*.net *.split]
rfv has quit [*.net *.split]
joaomdmoura__ has quit [*.net *.split]
ELCALOR has quit [*.net *.split]
deimos has quit [*.net *.split]
charles81 has quit [*.net *.split]
adambeynon has quit [*.net *.split]
acadavid has quit [*.net *.split]
jpinnix_______ has quit [*.net *.split]
Lloyd has quit [*.net *.split]
Heero has quit [*.net *.split]
halfdan has quit [*.net *.split]
jxf has quit [*.net *.split]
greenhat has quit [*.net *.split]
tinnvec has quit [*.net *.split]
djellemah has quit [*.net *.split]
sfr^ has quit [*.net *.split]
melter has quit [*.net *.split]
__main__ has quit [*.net *.split]
Keltia has quit [*.net *.split]
HaythamKenway has quit [*.net *.split]
cschneid has quit [*.net *.split]
Cork has quit [*.net *.split]
clamstar has quit [*.net *.split]
ddfreyne has quit [*.net *.split]
Zarthus has quit [*.net *.split]
avenj has quit [*.net *.split]
llua has quit [*.net *.split]
Coraline has quit [*.net *.split]
Zarthus_ has joined #ruby
armyriad has joined #ruby
Nightmare has joined #ruby
iamayam has joined #ruby
pawnbox has quit [Ping timeout: 272 seconds]
grassass has joined #ruby
Cork has joined #ruby
jinie has quit [Ping timeout: 250 seconds]
jsaak has joined #ruby
deimos has joined #ruby
daxroc has joined #ruby
emilford has quit [Ping timeout: 276 seconds]
rfv has joined #ruby
snapcase has quit [Ping timeout: 250 seconds]
chrisarcand has quit [Ping timeout: 250 seconds]
jxf has joined #ruby
ruisantos has joined #ruby
mfb2 has joined #ruby
unsymbol has quit [Ping timeout: 250 seconds]
aep has joined #ruby
chrisarcand has joined #ruby
djellemah has joined #ruby
kalopsian has joined #ruby
edwinvdgraaf has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
okdas has joined #ruby
jam_ has quit [Ping timeout: 255 seconds]
ELCALOR has joined #ruby
sharkman has joined #ruby
sfr^ has joined #ruby
Kryptonical has joined #ruby
znz_jp has joined #ruby
amclain has joined #ruby
mclee has joined #ruby
Apocalypse has joined #ruby
phredus has joined #ruby
Seich has joined #ruby
shadeslayer has joined #ruby
mahk has joined #ruby
dmonster has joined #ruby
LiquidInsect has joined #ruby
davedev24 has joined #ruby
crdpink2 has joined #ruby
joaomdmoura__ has joined #ruby
angiebadillo has joined #ruby
acadavid has joined #ruby
llua has joined #ruby
Heero has joined #ruby
jpinnix_______ has joined #ruby
avenj has joined #ruby
halfdan has joined #ruby
Coraline has joined #ruby
__main__ has joined #ruby
ddfreyne has joined #ruby
charles81 has joined #ruby
tinnvec has joined #ruby
clamstar has joined #ruby
cschneid has joined #ruby
adambeynon has joined #ruby
Guest4184____ has joined #ruby
Keltia has joined #ruby
Lloyd has joined #ruby
melter has joined #ruby
jinie has joined #ruby
unsymbol has joined #ruby
ELCALOR has quit [Changing host]
ELCALOR has joined #ruby
greenhat has joined #ruby
okdas has quit [Changing host]
okdas has joined #ruby
Keltia has quit [Ping timeout: 247 seconds]
Guest4184____ has quit [Max SendQ exceeded]
ELCALOR has quit [Max SendQ exceeded]
sfr^ has quit [Max SendQ exceeded]
sfr^ has joined #ruby
sfr^ has quit [Changing host]
sfr^ has joined #ruby
varesa has joined #ruby
Keltia has joined #ruby
scottymeuk has joined #ruby
mfb2_ has joined #ruby
pawnbox has joined #ruby
hannelita has joined #ruby
emilford has joined #ruby
Meow-J has joined #ruby
ELCALOR has joined #ruby
Guest4184____ has joined #ruby
mfb2 has quit [Ping timeout: 264 seconds]
diegoviola has quit [Ping timeout: 256 seconds]
sideshowcoder has quit [Ping timeout: 260 seconds]
Rodya_ has quit [Remote host closed the connection]
dmolina has quit [Quit: Leaving.]
sideshowcoder has joined #ruby
bakedb has joined #ruby
snapcase has joined #ruby
kalopsian has quit [Ping timeout: 265 seconds]
howdoicomputer has joined #ruby
emilford has quit [Ping timeout: 240 seconds]
hannelita has quit [Ping timeout: 264 seconds]
pawnbox has quit [Ping timeout: 256 seconds]
dlitvak has quit [Ping timeout: 265 seconds]
skade has quit [Quit: Computer has gone to sleep.]
emilford has joined #ruby
peteyg has quit [Read error: Connection reset by peer]
ixti has joined #ruby
howdoicomputer has quit [Ping timeout: 255 seconds]
peteyg has joined #ruby
Zarthus_ is now known as Zarthus
juddey has joined #ruby
chouhoulis has joined #ruby
casadei has quit [Remote host closed the connection]
pawnbox has joined #ruby
sonOfRa_ is now known as sonOfRa
emilford has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
x0f has quit [Ping timeout: 255 seconds]
chouhoulis has quit [Ping timeout: 264 seconds]
Blaguvest has quit [Ping timeout: 255 seconds]
emilford has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
pawnbox has quit [Ping timeout: 276 seconds]
stannard has joined #ruby
x0f has joined #ruby
sandstrom has joined #ruby
SCHAAP137 has quit [Read error: Connection reset by peer]
DLSteve has joined #ruby
gbgdev_ has joined #ruby
gbgdev has quit [Ping timeout: 260 seconds]
emilford has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
waka has quit [Read error: No route to host]
pawnbox has joined #ruby
blur3d has joined #ruby
waka has joined #ruby
emilford has joined #ruby
stannard has quit [Remote host closed the connection]
Yzguy has joined #ruby
Rodya_ has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
dpg_ has joined #ruby
diego1 has joined #ruby
dn` has quit [Quit: dn`]
ur5us has joined #ruby
Yzguy has quit [Client Quit]
Yzguy has joined #ruby
pawnbox has quit [Ping timeout: 256 seconds]
emilford has quit [Ping timeout: 245 seconds]
XxionxX has joined #ruby
mistermocha has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
ss_much has joined #ruby
skade has joined #ruby
dlitvak has joined #ruby
mfb2_ has quit [Remote host closed the connection]
gruz0_ has quit [Ping timeout: 264 seconds]
mistermocha has quit [Remote host closed the connection]
gbgdev_ has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
emilford has joined #ruby
pawnbox has joined #ruby
casadei has joined #ruby
sandstrom has joined #ruby
Rodya_ has joined #ruby
ur5us has quit [Remote host closed the connection]
hannelita has joined #ruby
musl has joined #ruby
emilford has quit [Ping timeout: 265 seconds]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 240 seconds]
griffindy has joined #ruby
griffindy has quit [Client Quit]
ympeg has quit [Ping timeout: 256 seconds]
<dostoyevsky> Hi. Does ruby's set_trace_func also include Procs? Like: do {|a| a.something }
xProto has left #ruby [#ruby]
pawnbox has joined #ruby
joneshf-laptop has quit [Remote host closed the connection]
kobain has quit [Read error: Connection reset by peer]
joneshf-laptop has joined #ruby
jgt has joined #ruby
ur5us has joined #ruby
m1dnight_ has quit [Ping timeout: 260 seconds]
FernandoBasso has quit [Quit: Leaving]
akem has joined #ruby
m1dnight_ has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Melpaws has quit [Ping timeout: 256 seconds]
Rodya_ has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 256 seconds]
emilford has joined #ruby
jgt has quit [Ping timeout: 276 seconds]
sandstrom has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
who42 has quit [Ping timeout: 276 seconds]
firstdayonthejob has quit [Ping timeout: 264 seconds]
casadei has quit [Remote host closed the connection]
sftrabbit has quit [Quit: sftrabbit]
casadei has joined #ruby
emilford has quit [Ping timeout: 264 seconds]
mistermocha has quit [Remote host closed the connection]