havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.3, 2.4.5, 2.3.8, 2.6.0-preview3: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
asphyxia has joined #ruby
Fernando-Basso has quit [Remote host closed the connection]
chouhoulis has joined #ruby
Azure has joined #ruby
postmodern has joined #ruby
k0mpa has joined #ruby
chouhoulis has quit [Ping timeout: 268 seconds]
chouhoulis has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
asphyxia has quit [Ping timeout: 268 seconds]
ivanskie has joined #ruby
orbyt_ has quit [Ping timeout: 268 seconds]
chouhoulis has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
shoogz has quit [Ping timeout: 246 seconds]
ellcs has quit [Read error: Connection reset by peer]
shoogz has joined #ruby
mroutis has quit [Read error: Connection reset by peer]
ellcs has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
AJA4350 has joined #ruby
mroutis has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
chouhoulis has quit [Ping timeout: 244 seconds]
chouhoulis has joined #ruby
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 245 seconds]
chouhoulis has joined #ruby
venmx has quit [Ping timeout: 246 seconds]
jcarl43 has quit [Quit: WeeChat 2.3]
chouhoulis has quit [Ping timeout: 245 seconds]
chouhoulis has joined #ruby
eckhardt_ has joined #ruby
orbyt_ has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
TheBloke has joined #ruby
blackmesa has joined #ruby
arescorpio has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
eckhardt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
chouhoulis has quit [Ping timeout: 268 seconds]
cthulchu has quit [Ping timeout: 272 seconds]
chouhoulis has joined #ruby
ellcs has quit [Ping timeout: 264 seconds]
chouhoulis has quit [Ping timeout: 244 seconds]
chouhoulis has joined #ruby
meinside has joined #ruby
chouhoulis has quit [Ping timeout: 272 seconds]
chouhoulis has joined #ruby
pyrmont has left #ruby [#ruby]
rubydoc has quit [Ping timeout: 252 seconds]
renlo has quit [Ping timeout: 272 seconds]
chouhoulis has quit [Ping timeout: 268 seconds]
chouhoulis has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 272 seconds]
chouhoulis has joined #ruby
jetchisel has quit [Ping timeout: 250 seconds]
chouhoulis has quit [Ping timeout: 252 seconds]
bmurt has joined #ruby
Noroe has joined #ruby
jetchisel has joined #ruby
chouhoulis has joined #ruby
jetchisel has quit [Excess Flood]
jetchisel has joined #ruby
mangold has joined #ruby
jetchisel has quit [Excess Flood]
chouhoulis has quit [Ping timeout: 268 seconds]
chouhoulis has joined #ruby
ua has quit [Ping timeout: 246 seconds]
jetchisel has joined #ruby
AJA4350 has quit [Quit: AJA4350]
jetchisel has quit [Excess Flood]
jetchisel has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
chouhoulis has joined #ruby
jetchisel has quit [Max SendQ exceeded]
jetchisel has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
Noroe has quit [Quit: Leaving]
chouhoulis has quit [Ping timeout: 245 seconds]
jetchisel has quit [Excess Flood]
chouhoulis has joined #ruby
jetchisel has joined #ruby
elcontrastador has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
gnufied has quit [Quit: Leaving]
chouhoulis has quit [Ping timeout: 268 seconds]
chouhoulis has joined #ruby
esrse has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby
<havenwood> On modern Ruby, `chomp: true` is a nifty addition: File.readlines('json', chomp: true)
ivanskie has joined #ruby
DTZUZO has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby
bambanx has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
fredolinhares has quit [Quit: WeeChat 1.9.1]
bambanxx has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
bambanx has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
bga57 has joined #ruby
mroutis has quit [Read error: Connection reset by peer]
chouhoulis has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby
stalactit has joined #ruby
<stalactit> this may interest people in this channel https://www.elttam.com.au/blog/ruby-deserialization/
<stalactit> it releases the first public universal gadget chain to achieve arbitrary command execution for Ruby 2.x
mroutis has joined #ruby
chouhoulis has quit [Ping timeout: 268 seconds]
chouhoulis has joined #ruby
<stalactit> related to unsafe use of Marshal
blackmesa has quit [Ping timeout: 252 seconds]
mangold has quit [Quit: This computer has gone to sleep]
chouhoulis has quit [Ping timeout: 245 seconds]
mangold has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mangold has joined #ruby
darkhanb has joined #ruby
elphe has quit [Ping timeout: 245 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
braincrash has quit [Quit: bye bye]
arescorpio has quit [Ping timeout: 246 seconds]
braincrash has joined #ruby
rippa has quit [Read error: Connection reset by peer]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mroutis has quit [Read error: Connection reset by peer]
mroutis_ has joined #ruby
elphe has joined #ruby
kapil____ has joined #ruby
za1b1tsu has joined #ruby
marz_d`ghostman has joined #ruby
<marz_d`ghostman> Pertaining instance variable, I've seen people assign values to instance variables then create a attr_reader with the same name as the instance variable so they can refer to the instance variable without '@'. How does that work and what's the advantage of doing it?
<baweaver> They create methods which are essentially: def ivar_name; @ivar_name end
<baweaver> you don't have to type @, mostly.
arescorpio has joined #ruby
dellavg_ has joined #ruby
_whitelogger has joined #ruby
jcalla has joined #ruby
ivanskie has joined #ruby
idiocrash has joined #ruby
bambanxx has quit [Quit: Leaving]
mroutis_ has quit [Remote host closed the connection]
mangold has quit [Quit: This computer has gone to sleep]
mangold has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
ChatCodingLab has joined #ruby
vondruch has joined #ruby
idiocras_ has joined #ruby
idiocrash has quit [Ping timeout: 244 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
ChatCodingLab has quit [Quit: Leaving]
idiocras_ has quit [Quit: Textual IRC Client: www.textualapp.com]
themsay has quit [Ping timeout: 268 seconds]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dellavg_ has quit [Ping timeout: 240 seconds]
ChatCodingLab has joined #ruby
arescorpio has quit [Quit: Leaving.]
ChatCodingLab has quit [Ping timeout: 256 seconds]
<marz_d`ghostman> baweaver: I see. Thanks for clarifying that one
<marz_d`ghostman> I'm trying to override a subject inside an inner context. However, it appears that the variable inside the inner context which is suppose to be local inside the context is overriding the subject outisde of the context.
mangold has joined #ruby
rubydoc has joined #ruby
reber has joined #ruby
ivanskie has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
voiceftp has quit [Remote host closed the connection]
aufi has joined #ruby
voiceftp has joined #ruby
elphe has quit [Ping timeout: 240 seconds]
conta has joined #ruby
DTZUZO has quit [Ping timeout: 245 seconds]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand has quit [Ping timeout: 276 seconds]
conta has quit [Ping timeout: 250 seconds]
phaul has joined #ruby
roshanavand has joined #ruby
conta has joined #ruby
tdy has quit [Ping timeout: 272 seconds]
elphe has joined #ruby
elphe has quit [Client Quit]
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
<dachi> whats up hackers!
<dachi> morning!
apparition has joined #ruby
clemens3_ has joined #ruby
mangold has joined #ruby
postmodern has quit [Quit: Leaving]
gix has joined #ruby
MoritaShinobu has joined #ruby
roshanavand1 has joined #ruby
roshanavand has quit [Ping timeout: 252 seconds]
roshanavand1 is now known as roshanavand
jamied has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
Burgestrand has joined #ruby
blackmesa has joined #ruby
Burgestr_ has joined #ruby
Burgestrand has quit [Ping timeout: 276 seconds]
<scrooloose> dachi: greetings my child, may your facehole be ever blessed with pie
blackmesa has quit [Ping timeout: 252 seconds]
tdy has joined #ruby
conta has quit [Ping timeout: 264 seconds]
ua has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
<Cork> when on is defining a method_missing; is it possible when calling super (cause it isn't handled) to have the stacktrace show the original location?
blackmesa has joined #ruby
irdr has joined #ruby
irdr has quit [Max SendQ exceeded]
venmx has joined #ruby
reber__ has joined #ruby
roshanavand has quit [Quit: Gone planting!]
reber has quit [Ping timeout: 245 seconds]
jetchisel has quit [Ping timeout: 268 seconds]
jetchisel has joined #ruby
<marz_d`ghostman> when doing tests in rsped for your class method do you put each method test via describe under one whole describe 'Class'?
hays_ has joined #ruby
hays has quit [Ping timeout: 276 seconds]
<tbuehlmann> I'm usually doing this: RSpec.describe SomeClass do; describe '.some_class_method' do; <examples here>; end ; end
roshanavand has joined #ruby
<phaul> marz_d`ghostman: sometimes. My main rule of thumb is that it has to produce sensible description of the test when all fragments (descibe, context, it, expect) are pasted
<marz_d`ghostman> phaul: I'm trying to test each method of my class. So basically I have Rspec.describe Class then describe '#method'. However, my problems is I want to create a subject for each method is that even possible? I tried it but it appears that the subjects overrides each other
<phaul> altough subjects are scoped in describe
<phaul> -although ^^
<marz_d`ghostman> phaul: Yeah. Also, when testing, I want to terminate after an expect is met. How do I do that? so it won't go on and continue the entire script
<phaul> you can tell rspec which example to run on the command line, then it runs a single example
conta has joined #ruby
<phaul> otherwise RSpec runs all examples. There are further options to track and retry only last failing example for instance
<marz_d`ghostman> I see, I'll try looking into that
<marz_d`ghostman> just found out after block gets executed before any ensure
tdy has quit [Ping timeout: 244 seconds]
<phaul> random rambling: I think the `context' concept in rspec is broken. it's just an alias to describe afaik, but to me a context is much more. A context is like a concern to a class, we should be able to mix in any number and combination of contexts, in a flat manner, not deep embeding them into each other..
<phaul> but.. ppl are already think rspec is complex enough and hard to understand as it is :)
despai has joined #ruby
Daneel has joined #ruby
<Daneel> hi all
<phaul> hi Daneel
<Daneel> i would like to use the function captures(), how to know what require ?
<phaul> &list captures
<rubydoc> MatchData#captures, StringScanner#captures
<phaul> which one do you need?
<Daneel> what about Open3 ?
Bish has joined #ruby
<Bish> >> Integer === Integer
<ruby[bot]> Bish: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Bish> why is that false :o
<phaul> Bish: use &>> to route it to rubydoc
<phaul> &>> Integer === Integer
<rubydoc> # => false (https://carc.in/#/r/5gyq)
<Bish> i mean i get what it does.. but what is the logic behind that
<phaul> Daneel: you have to require 'open3'
<Daneel> phaul: thank you
<Daneel> with this i get an undefined method error
<Daneel> so i need to install something special ?
<phaul> &ri Module#===, Bish
<Daneel> i am using centos7 and install yum install ruby
<Daneel> and got 2.1.9
esrse has quit [Ping timeout: 252 seconds]
<phaul> Bish: logic behind it is to write case 1 ; when Integer then ..
<phaul> === does not imply ==
tdy has joined #ruby
conta has quit [Quit: conta]
<phaul> Daneel: please paste the full error log you get
moei has joined #ruby
Guest53511 has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
Burgestr_ has quit [Quit: Closing time!]
<phaul> hm, in this case it's the other way. == does not imply === either.
conta has joined #ruby
<phaul> Daneel: ?
kapil____ has joined #ruby
theRoUS has left #ruby ["Off to another part of the maze of twisty little passages"]
ta_ has joined #ruby
IanMalcolm has joined #ruby
AJA4350 has joined #ruby
<phaul> Bish: I did a bit of background research, and I came to the conclusion that I agree with you. === is semantically broken, because Object implements it and makes a promise that == implies ===. Then overriding implementations completely disregard super
conta1 has joined #ruby
venmx has quit [Ping timeout: 272 seconds]
jamied has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
n13z has joined #ruby
arand has quit [Ping timeout: 264 seconds]
arand has joined #ruby
conta has quit [Quit: conta]
conta1 is now known as conta
bmurt has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Burgestrand has joined #ruby
irdr has joined #ruby
irdr has quit [Remote host closed the connection]
irdr has joined #ruby
<Daneel> phaul: sorry i was trying a coworker by asking for him. But he went away now .
<Daneel> thank you for your help anyway
<phaul> np. important thing is that you get it working ;)
<Bish> phaul: well i agree on the semantically broken thing
<Bish> i totally fell into the == ⇒ === trap
gix has quit [Ping timeout: 244 seconds]
Burgestrand has quit [Quit: Closing time!]
<biberao> hi
<phaul> yeah, it breaks polymorphism. Class is almost like an Object but not quite. The way out is not to define === for Object, but then you get NoMethod === errors from case statements, which can also be confusing for someone who just starts off with ruby
<biberao> arent there any pdfs for learn ruby for beginners?
<biberao> :D
tdy has quit [Ping timeout: 272 seconds]
leitz has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rwb has quit [Ping timeout: 268 seconds]
Burgestrand has joined #ruby
jamied has joined #ruby
<Bish> biberao: just write something in ruby
<Bish> boom, u learned it
* Bish 's guide to learning languages
<biberao> Bish: im a newb:D
<Bish> everyone is
<biberao> advise me how to start
<Bish> as i said, pick a project of your skill level work on it
<Bish> i suppose you want to do web?
<Bish> try to write the todo app with rails/sinatra/rails
<Bish> start by displaying a list of items, then add a form( u know those from php right? ), then save it
<Bish> rails/sinatra/roda *
<biberao> i want to start scripts first
<biberao> then move to another thing
<biberao> i dont even know syntax
<biberao> :P
<Bish> yeah, that's how i learned, too
<biberao> is this even up to date btw
<biberao> ?
<Bish> i actually hated rails, but everyone was doing it
<Bish> still hate, btw
<Bish> but same principle... pick a project of your skill level
venmx has joined #ruby
<Bish> one of the first things i did was creating a generator for files
<Bish> say you have a folder template.. and you want to put that folder with parameters somewhere, like a javascript MVC thingie
<Bish> like yeoman
<biberao> Bish: how did you learn syntax
<biberao> and other things?
cd has quit [Quit: cd]
aufi has quit [Ping timeout: 240 seconds]
despai has quit [Quit: ...]
k0mpa has quit [Ping timeout: 256 seconds]
n13z has quit [Ping timeout: 245 seconds]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
voolik has joined #ruby
conta has quit [Ping timeout: 264 seconds]
govg has joined #ruby
bmurt has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
houhoulis has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
ss_much has quit [Quit: Connection closed for inactivity]
aufi has joined #ruby
rippa has joined #ruby
Burgestrand has quit [Ping timeout: 252 seconds]
Burgestrand has joined #ruby
cd has joined #ruby
Burgestrand has quit [Ping timeout: 264 seconds]
houhoulis has quit [Remote host closed the connection]
k0mpa has joined #ruby
apparition has quit [Quit: Bye]
apparition has joined #ruby
Tohm3 has joined #ruby
apparition has quit [Quit: Bye]
<Tohm3> Hey Guys, I'm New To Ruby And The Rails Environment. I've Been Google'n "Ruby On Rails App Templates". Like With LAMP Environments And Gradle Where You Can Take A Prebuilt Template And Just Edit It A Bit. But I Can't Find Any, Do These Even Exist On Rails?
<phaul> Lol Your Capitalize Lock Is On.
Mike11 has joined #ruby
<Tohm3> Lol, Sorry, Force Of Habit. I Just Like To Cap The First Letter Of Every Word
<mnemon> Tohm3: you can find complete applications in github and such. but Gradle and Rails are pretty different.
mikecmpbll has joined #ruby
Burgestrand has joined #ruby
gnufied has joined #ruby
irdr has quit [Remote host closed the connection]
tdy has joined #ruby
mistergibson has quit [Read error: Connection reset by peer]
samort7 has joined #ruby
im0nde has joined #ruby
Burgestrand has quit [Quit: Closing time!]
jetchisel has quit [Ping timeout: 244 seconds]
Burgestrand has joined #ruby
irdr has joined #ruby
gix has joined #ruby
Guest53511 has quit [Ping timeout: 276 seconds]
irdr has quit [Remote host closed the connection]
DTZUZO has joined #ruby
Inline has joined #ruby
Guest53511 has joined #ruby
irdr has joined #ruby
irdr has quit [Remote host closed the connection]
whysthatso has joined #ruby
DTZUZO has quit [Ping timeout: 268 seconds]
jamied has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
irdr has joined #ruby
<Tohm3> I've Looked Into A Few On Github, But I'm Starting To Realize Ruby Isn't Great With Different Versions. If The App Is Built In 2.3 And I'm Using 5.2 It's A Nightmare And None Of Those Let Me Just Run A Build Command And Start A Server. I Always Run Into 1Million Errors
tdy has quit [Ping timeout: 252 seconds]
<Tohm3> Thanks Tho @mnemon
<Tohm3> Lol, Sorry, I'm So Used To @'n
<havenwood> Tohm3: Try going from PHP 5 to PHP 6! :P
<phaul> Tohm3: are you in here for the most polite troll award :D
Burgestrand has quit [Quit: Closing time!]
cow[moo] has joined #ruby
MoritaShinobu has quit [Quit: Leaving]
<Tohm3> phaul: I'm Sorry If It Seems That Way, I'm Just New To Ruby And I'm Sharing My Experience With It So Far And Try'n To See How I Can Use It That's Similar To The Other Environments I've Used
Burgestrand has joined #ruby
<Tohm3> I've Run Into A Lot Of Version Issues With Try'n To Get Github Repos Built On Ruby Running And I Don't Know If It's Just Stupidity On My Part Or If It's Designed That Way. It's Just My Impression.
cow[moo] has quit [Ping timeout: 268 seconds]
<leitz> Tohm3, most of the Ruby I've done in version 2.x and greater seems to work okay, though newer versions add stuff.
Wojnar has joined #ruby
<leitz> If you're just trying to learn, does the OS come with a version of Rails and Ruby? They will be old, and if you try to install gems and use github repositories you'll have issues.
<leitz> But if you can just start with the basics, it's pretty fun. Well, Ruby is. Not sure about Rails.
<bougyman> Tohm3: sounds like you jumped to chapter 14 without going through chapter 1
<bougyman> nor any of the ones between 1 and 14
<Tohm3> I See
despai has joined #ruby
Burgestrand has quit [Ping timeout: 264 seconds]
<Tohm3> Thanks Guys. I Guess I Have Been Working Backwards. But TBH It's Kinda How I've Learned Everything I Know Up Till Now, Lol
orbyt_ has joined #ruby
<Tohm3> I Guess I'll Just Have To Take A More Traditional Role With Ruby. Thanks For The Insight
Guest979 is now known as maxmanders
chouhoulis has joined #ruby
<leitz> Tohm3, it sort of depends. The issue isn't Ruby, exactly, but trying to mix your sources.
k0mpa has quit [Remote host closed the connection]
mikecmpb_ has joined #ruby
<leitz> It took me a while to like Ruby (and to put up with some of the gruff here) but once I got into it I was hooked. I've only moved away because I'm on a new career that isn't Ruby based.
<leitz> Sadly...
mikecmpbll has quit [Ping timeout: 252 seconds]
<leitz> Have you looked at Rack and Sinatra? Or Hanami?
<leitz> Might be an easier learn.
<havenwood> Or Roda!
whysthatso has quit [Quit: whysthatso]
aufi has quit [Remote host closed the connection]
moei has quit [Read error: Connection reset by peer]
moei has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
despai has quit [Quit: ...]
n13z has joined #ruby
mikecmpb_ has quit [Quit: inabit. zz.]
mikecmpbll has joined #ruby
<leitz> havenwood, i couldn't remember that one. Jeremy impresses me, though that doesn't take much.
<havenwood> Roda's site got a nice overhaul: http://roda.jeremyevans.net/
despai has joined #ruby
clemens3_ has quit [Ping timeout: 252 seconds]
<leitz> Nice.
<leitz> Ruby was the first language I really wanted to read the reference documents on.
JasonO has quit [Ping timeout: 245 seconds]
galeido has quit [Ping timeout: 250 seconds]
_ari has quit [Ping timeout: 250 seconds]
galeido has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Burgestrand has joined #ruby
nchambers has quit [Ping timeout: 240 seconds]
nchambers has joined #ruby
JasonO has joined #ruby
Burgestrand has quit [Ping timeout: 268 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
lytol has joined #ruby
venmx has quit [Ping timeout: 260 seconds]
venmx has joined #ruby
jcarl43 has joined #ruby
elcontrastador has quit [Ping timeout: 272 seconds]
venmx has quit [Ping timeout: 264 seconds]
venmx has joined #ruby
renlo has joined #ruby
conta has joined #ruby
jetchisel has joined #ruby
darkhanb has joined #ruby
cthulchu_ has joined #ruby
MyMind has joined #ruby
Sembei has quit [Ping timeout: 245 seconds]
meinside has quit [Quit: Connection closed for inactivity]
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
despai has quit [Quit: ...]
xuanrui has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
kapil____ has joined #ruby
cthulchu_ has quit [Ping timeout: 272 seconds]
zapata has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
Guest53511 has quit [Ping timeout: 272 seconds]
venmx has quit [Ping timeout: 252 seconds]
orbyt_ has joined #ruby
samort7 has quit [Read error: Connection reset by peer]
samort7 has joined #ruby
samort7 has quit [Read error: Connection reset by peer]
Mike11 has quit [Quit: Leaving.]
whysthatso has joined #ruby
lancelotlac has joined #ruby
eckhardt has joined #ruby
chouhoulis has quit [Remote host closed the connection]
za1b1tsu has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
buyfn has joined #ruby
linuxdaemon has quit [Ping timeout: 252 seconds]
chouhoulis has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby
whysthatso has quit [Quit: whysthatso]
zapata has quit [Quit: WeeChat 2.3]
chouhoulis has quit [Ping timeout: 240 seconds]
phaul has joined #ruby
renlo has quit [Read error: Connection reset by peer]
whysthatso has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
linuxdaemon has joined #ruby
bmurt has joined #ruby
DTZUZO has joined #ruby
bmurt has quit [Client Quit]
bmurt has joined #ruby
cats has quit [Ping timeout: 240 seconds]
whysthatso has quit [Quit: whysthatso]
reber has joined #ruby
reber__ has quit [Read error: Connection reset by peer]
nicesignal has quit [Remote host closed the connection]
cd has quit [Quit: cd]
nicesignal has joined #ruby
voolik has quit [Ping timeout: 245 seconds]
whysthatso has joined #ruby
despai has joined #ruby
despai has quit [Client Quit]
lxsameer has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
whysthatso has quit [Quit: whysthatso]
whysthatso has joined #ruby
whysthatso has quit [Remote host closed the connection]
Nicmavr has joined #ruby
Tohm3 has quit [Ping timeout: 245 seconds]
buyfn has quit [Quit: buyfn]
cats has joined #ruby
Fernando-Basso has joined #ruby
lancelotlac has quit [Ping timeout: 252 seconds]
whysthatso has joined #ruby
Guest53511 has joined #ruby
tdy has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
Guest53511 has quit [Ping timeout: 245 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Inside> \o
bmurt has joined #ruby
<Bish> o/
Pisuke has joined #ruby
<havenwood> \o/
MyMind has quit [Ping timeout: 244 seconds]
<al2o3-cr> /o/
<baweaver> /o\
<al2o3-cr> it's like YMCA hehe =)
<Bish> >> a = ['/','\']; "#{a.sample}o#{a.sample}"
<ruby[bot]> Bish: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Bish> &>> a = ['/','\']; "#{a.sample}o#{a.sample}"
<rubydoc> # => (https://carc.in/#/r/5h3q)
<baweaver> &>> a = ['/','\\']; "#{a.sample}o#{a.sample}"
<rubydoc> # => "\\o/" (https://carc.in/#/r/5h3r)
<baweaver> &>> a = ['/',"\\"]; "#{a.sample}o#{a.sample}"
<rubydoc> # => "\\o/" (https://carc.in/#/r/5h3s)
<baweaver> havenwood save me
DTZUZO has quit [Ping timeout: 246 seconds]
* Eiam looks up what the heck sample does
postmodern has joined #ruby
<havenwood> &>> [1, 2, 3].sample 4 # Eiam
<rubydoc> # => [2, 3, 1] (https://carc.in/#/r/5h3v)
<havenwood> &>> [1, 2, 3].sample 2
<rubydoc> # => [2, 1] (https://carc.in/#/r/5h3w)
elcontrastador has joined #ruby
<Bish> oops
<Bish> &>> (0..5).map { |x| (0..5).to_a.sample (1..5).rand }
<rubydoc> # => private method `rand' called for 1..5:Range (NoMethodError) (https://carc.in/#/r/5h3x)
<Bish> hngg
<havenwood> &>> puts '💪o💪'.gsub(?💪) { %w[/ \\].sample }
<rubydoc> # => (https://carc.in/#/r/5h3y)
<Bish> &>> (0..5).map { |x| (0..5).to_a.sample (1..5).sample }
<rubydoc> # => undefined method `sample' for 1..5:Range (NoMethodError) (https://carc.in/#/r/5h3z)
<Bish> &>> (0..5).map { |x| (0..5).to_a.sample (1..5).to_a.sample }
<rubydoc> # => [[0, 2, 5, 4, 1], [5], [2, 4], [3, 1, 0, 4], [4, 2, 3, 5, 0], [1, 5, 3]] (https://carc.in/#/r/5h40)
conta has quit [Quit: conta]
<havenwood> Bish: I'd probably write that something like:
<havenwood> 6.times.map { [*0..5].sample rand 1..5 }
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<nchambers> what does [*0..5] do?
<baweaver> Splats a range
<havenwood> &>> [*0..5]
<rubydoc> # => [0, 1, 2, 3, 4, 5] (https://carc.in/#/r/5h41)
<nchambers> oh that makes sense
<havenwood> Mm, `Array.new(n)` is also a bit nicer than `6.times.map`.
<havenwood> Array.new(6) { [*0..5].sample rand 1..5 }
<havenwood> One fewer method calls.
<Bish> havenwood: was just going to confuse the audience
<Bish> bad code is good for that
stooj has quit [Quit: ZNC 1.7.0 - https://znc.in]
stooj has joined #ruby
<al2o3-cr> well i never knew you could use break in tap.
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 240 seconds]
<Eiam> lol thats just cruel
<Eiam> 'here is this non destructive thing, lets make it destructive!'
DTZUZO has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
DTZUZO has quit [Ping timeout: 240 seconds]
leitz has quit [Quit: Leaving]
wolfshappen has quit [Quit: sasltest]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wolfshappen has joined #ruby
<baweaver> Eiam: Well we all wanted to go out with a bank
<baweaver> bang*
<baweaver> but I guess we have to settle for taking a break instead
k0mpa has joined #ruby
<nchambers> i would like to go out with a bank
<al2o3-cr> my thoughts too.
aarkerio has joined #ruby
<aarkerio> hi! if I have an array of symbols like: [:HTML, :CSS, :JavaScript, :Python, :Ruby]
<aarkerio> how can I convert it to a "string" of symbols ?
<nchambers> &>> [:HTML, :CSS, :JavaScript, :Python, :Ruby].map(&:to_s)
<rubydoc> # => ["HTML", "CSS", "JavaScript", "Python", "Ruby"] (https://carc.in/#/r/5h4r)
<nchambers> \o/
<aarkerio> I mean, I have this method: params.require(:data).require(:name, :email, :password)
<aarkerio> but the arguments in the "require" method can be variable
<nchambers> oh
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<aarkerio> something like: fields = action_name == "signup" ? [:name, :email, :password] : [:email, :password]
<nchambers> params.require(:data).require(*mylist)
<aarkerio> so: params.require(:data).require(fields)
<aarkerio> but "require" is expecting symbols
<nchambers> *mylist gives it symbols
eckhardt has joined #ruby
<nchambers> it takes a variable number of symbols right? you could just do something like: fields = [:email, :password]; fields << :name if action_name == "signup"; params.require(*fields)
rwb has joined #ruby
<aarkerio> works! thanks!
<nchambers> np!
whysthatso has quit [Quit: whysthatso]
Fernando-Basso has quit [Remote host closed the connection]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> &>> ([*?a..?z,*' ']*'').unpack('x11aX8ax7ax7aX4ax0ax7aX23ax16aX18ax19aX3aX16aX4ax12aX14a')*''
<rubydoc> # => "lemurs eveywhere" (https://carc.in/#/r/5h4s)
<al2o3-cr> oops, i missed the *r
<phaul> ah, so this is basically a brainfuck interpreter
<al2o3-cr> phaul: hmm, nope.
<phaul> sort of.. some subset of it. It cant do loops
<al2o3-cr> but i suppose it could be, you know what i've never thought about doing it this way.
mroutis has joined #ruby
<phaul> hm. manipulating the data tape is an issue :(
mroutis has quit [Client Quit]
aarkerio has quit [Quit: Leaving]
<al2o3-cr> hmm, you can probably use @ ?
<phaul> isn't that just good for positioning the head? like move to absolute offset
<al2o3-cr> ah, probably not.
<phaul> yeah. it would have been cool :)
<al2o3-cr> phaul: yes.
<al2o3-cr> would've ayy =)
<al2o3-cr> oh well, good thought though.
<al2o3-cr> &>> ?\x20
<rubydoc> # => " " (https://carc.in/#/r/5h4u)
<nchambers> what does the * operator do?
<al2o3-cr> nchambers: alias to join
<nchambers> erm, I meant ? sorry
<al2o3-cr> char/byte literal
<nchambers> oh i see
clemens3_ has joined #ruby
blassin has joined #ruby
Wojnar has quit [Quit: Leaving]
eckhardt has joined #ruby
eckhardt has quit [Client Quit]
clemens3_ has quit [Ping timeout: 268 seconds]
jetchisel has joined #ruby
eckhardt has joined #ruby
eckhardt has quit [Client Quit]
reber has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
paraxial has quit [Quit: The Lounge - https://thelounge.github.io]
bmurt has joined #ruby
eckhardt has joined #ruby
gregf_ has quit [Ping timeout: 256 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt has joined #ruby
asphyxia has joined #ruby
phaul has quit [Ping timeout: 246 seconds]
segy has quit [Ping timeout: 268 seconds]
segy has joined #ruby
ta_ has quit [Remote host closed the connection]
dostoyevsky has quit [Quit: leaving]