baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: 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!
<zenspider> rawr
<baweaver> alo
uplime has joined #ruby
crankharder has joined #ruby
crankharder has quit [Ping timeout: 252 seconds]
xfbs has joined #ruby
DTZUZU has quit [Quit: WeeChat 2.2]
al2o3-cr has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN_ has quit [Quit: The system is going down for reboot NOW!]
DTZUZU has joined #ruby
ramfjord has joined #ruby
venmx has quit [Ping timeout: 252 seconds]
rivalomega has quit []
marmotini_ has joined #ruby
oncall-pokemon has joined #ruby
lxsameer has joined #ruby
Spitfire has quit [Ping timeout: 276 seconds]
knight33 has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
Francisco has joined #ruby
Fr4n has quit [Ping timeout: 252 seconds]
houhoulis has joined #ruby
DTZUZU has quit [Quit: WeeChat 2.2]
c0ncealed3 has quit [Remote host closed the connection]
c0ncealed3 has joined #ruby
asphyxia has joined #ruby
cagomez has joined #ruby
bsliger has joined #ruby
arescorpio has joined #ruby
<zxq2> can anyone recommend a good ruby debugger that allows you to single-step through code?
<zxq2> are there any informative resources having to do with debugging large-scale ruby apps?
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
jetchisel has quit [Ping timeout: 246 seconds]
LiftLeft has joined #ruby
jetchisel has joined #ruby
nertzy has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jetchisel has quit [Ping timeout: 244 seconds]
asphyxia has quit [Ping timeout: 244 seconds]
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #ruby
xfbs has quit [Quit: afk]
nertzy has quit [Quit: This computer has gone to sleep]
jetchisel has joined #ruby
asphyxia has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
esrse has joined #ruby
houhoulis has quit [Remote host closed the connection]
tdy has joined #ruby
<zenspider> zxq2: what problems ya having?
dbz has joined #ruby
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
dbz has quit [Remote host closed the connection]
Dimik has quit [Ping timeout: 245 seconds]
knight33 has joined #ruby
camilasan has quit [Quit: No Ping reply in 180 seconds.]
LiftLeft2 has joined #ruby
camilasan has joined #ruby
marmotini_ has quit [Ping timeout: 250 seconds]
weaksauce has joined #ruby
helpa has joined #ruby
LiftLeft has quit [Ping timeout: 276 seconds]
arescorpio has quit [Quit: Leaving.]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
<zxq2> zenspider, i would like to single-step code to better understand what it's doing
arekushi has joined #ruby
orbyt_ has joined #ruby
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zenspider> zxq2: that's not your problem. that's your proposed solution.
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
asphyxia has quit [Ping timeout: 250 seconds]
bmurt has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lytol_ has quit [Remote host closed the connection]
LiftLeft2 is now known as LiftLeft
darkhanb has joined #ruby
orbyt_ has joined #ruby
tdy has quit [Ping timeout: 246 seconds]
_kupo has joined #ruby
dellavg_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rivalomega has joined #ruby
asphyxia has joined #ruby
lxsameer has joined #ruby
asphyxia has quit [Ping timeout: 244 seconds]
lxsameer has quit [Ping timeout: 268 seconds]
MyMind has joined #ruby
Sembei has quit [Ping timeout: 250 seconds]
MoritaShinobu has joined #ruby
cagomez has quit [Remote host closed the connection]
tdy has joined #ruby
ramfjord has joined #ruby
s2013 has joined #ruby
s2013 has quit [Client Quit]
asphyxia has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
sawdog has joined #ruby
dellavg_ has quit [Ping timeout: 250 seconds]
skwurl has joined #ruby
<skwurl> hi, how can i randomly assign an array into 3 different variables.
<skwurl> im trying something like :
<skwurl> a, b, c = array.sample
sawdog has quit [Quit: sawdog]
<Radar> randomly assign the elements from the array into those 3 variables?
<skwurl> nvm.
<havenwood> skwurl: a, b, c = array.sample 3
<skwurl> a, b, c = array.sample(3)
<skwurl> ; )
<havenwood> skwurl: note, those won't be repeated elements
<Radar> havenwood wins again
<skwurl> drka drrr
<havenwood> haha
<skwurl> thanks
<havenwood> for repeated, one way is: a, b, c = Array.new(3) { array.sample }
<havenwood> (though it's nicer not to do parallel assignment there)
asphyxia has quit [Quit: leaving]
reber has joined #ruby
Francisco has quit [Quit: Francisco]
MoritaShinobu has quit [Ping timeout: 250 seconds]
<skwurl> parallel assignment is not random though right?
MoritaShinobu has joined #ruby
LenPayne has quit [Quit: ZNC 1.7.1 - https://znc.in]
LenPayne has joined #ruby
whysthatso has joined #ruby
<havenwood> skwurl: right, it's ordered
<skwurl> anybody using weechat?
<skwurl> havenwood: i need it to be random
<havenwood> skwurl: You want to assign three variables to random, distinct array elements?
<havenwood> skwurl: sample(3) is random order, which is maintained when assigned in parallel
<skwurl> example?
weaksauce has quit [Ping timeout: 244 seconds]
<havenwood> >> [*0..10].sample(3)
<skwurl> is the above an example of that?
<ruby[bot]> havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<havenwood> #=> [9, 5, 2]
<havenwood> #=> [5, 10, 3]
<havenwood> #=> [1, 10, 6]
<havenwood> skwurl: ^ it'll always be three elements of the array, never the same one twice
<skwurl> nice
<skwurl> oh yeah that works great.
<skwurl> heres how i've applied it...
<skwurl> d4, d8, d12 = ['Warrior','Wizard','Explorer',].sample(3)
<skwurl> its for a tabletop rpg 'Dungeon Squad'
<skwurl> heres another question
<havenwood> skwurl: array.shuffle
apeiros_ has quit [Remote host closed the connection]
<havenwood> skwurl: %w[Warrior Wizard Explorer].shuffle
<skwurl> hehe
<skwurl> even briefer
<havenwood> skwurl: %i[d4 d8 d12].zip(%w[Warrior Wizard Explorer].shuffle).to_h
<havenwood> #=> {:d4=>"Explorer", :d8=>"Warrior", :d12=>"Wizard"}
<skwurl> whaa...???
<skwurl> lol
whysthatso has quit [Quit: whysthatso]
<skwurl> i dont like that one
<skwurl> .to_h is ?
<havenwood> skwurl: to Hash
<skwurl> hmmm
<skwurl> %i , %w ?
<havenwood> skwurl: shorthand for Array of Symbols and Array of Strings
<skwurl> oh cool
<skwurl> okay thats not to bad
mahlon has quit [Ping timeout: 252 seconds]
hanmac has joined #ruby
<skwurl> here's another question. howcome when i puts the output of a class its not in the same order as the methods within it?
mahlon has joined #ruby
<havenwood> skwurl: Another way to write it:
<havenwood> %w[Warrior Wizard Explorer].shuffle.each_with_object({}).with_index { |(role, result), index| result[:"d#{index * 4}"] = role }
<havenwood> #=> {:d0=>"Warrior", :d4=>"Wizard", :d8=>"Explorer"}
<havenwood> oops, bad maths
<havenwood> %w[Warrior Wizard Explorer].shuffle.each_with_object({}).with_index(1) { |(role, result), index| result[:"d#{index * 4}"] = role }
<havenwood> #=> {:d4=>"Warrior", :d8=>"Explorer", :d12=>"Wizard"}
<havenwood> skwurl: Show an example of what you mean?
<skwurl> damn thats kind of long though. if i can
<skwurl> d4, d8, d12 = ['Warrior','Wizard','Explorer',].shuffle
roshanavand has joined #ruby
<havenwood> skwurl: I was just being silly to avoid having to type 4, 8 and 12
<havenwood> skwurl: yes, that's a fine way
<skwurl> ok one sec
<skwurl> new_character = Character.new
<skwurl> puts new_character
<skwurl> or codeshare ....
venmx has joined #ruby
<skwurl> havenwood: i have alot of questions. like also why do i bot need to def initialize in this or no attr-reader is not necessary
mahlon has quit [Ping timeout: 252 seconds]
MoritaShinobu has quit [Ping timeout: 252 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
za1b1tsu has joined #ruby
<havenwood> skwurl: By initializing, you can memoize the skills so #skills returns the same ones every time for a character.
<havenwood> skwurl: If you don't need any internal state (anything remembered) then you can use a module instead of a class.
<havenwood> skwurl: Do characters have skills when they're created?
Nicmavr has joined #ruby
<havenwood> skwurl: Can a name be changed?
oncall-pokemon has quit [Quit: Connection closed for inactivity]
<skwurl> the names are sampled from a textfile
<havenwood> skwurl: Try setting @instance_variables for the name and skills in an initialize method.
<skwurl> heres a look at the character sheet
mahlon has joined #ruby
MyMind has quit [Excess Flood]
MyMind has joined #ruby
_kupo has quit [Quit: WeeChat 2.2]
DTZUZO_ has quit [Ping timeout: 250 seconds]
<havenwood> skwurl: With that code ^, how would you implement #name and #skills methods?
<skwurl> id you see my codeshare?
<skwurl> di you see my codeshare?
<havenwood> skwurl: Yes. I tried to show an example with initializing state, but didn't implement #name and #skills like your example.
<havenwood> skwurl: If you added those methods, which printed the same output as your example (#to_s as well) - you'd have something working that preserved state between method calls.
MoritaShinobu has joined #ruby
<havenwood> skwurl: The instance variables are what stick around between method calls.
<havenwood> skwurl: @name and @skills
<havenwood> skwurl: Adding to the bottom of your codeshare...
aupadhye has joined #ruby
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
<havenwood> skwurl: Let me know if any of my comments in the codeshare don't make sense or if you'd like me to expound.
<skwurl> makes sense. theres a couple things ive seen before but havent learned about yet. Your approach really minimizes redundancies
ramfjord has joined #ruby
<skwurl> im finding there are alot of options to do things.
ramfjord has quit [Ping timeout: 252 seconds]
skwurl has quit [Quit: WeeChat 2.2]
lunarkitty7 has quit [Ping timeout: 252 seconds]
marz_d`ghostman has joined #ruby
<marz_d`ghostman> Is it possible to stub a gem I am using in my script?
<marz_d`ghostman> for rspec testing?
<baweaver> Yes, but why?
yokel has quit [Remote host closed the connection]
yokel has joined #ruby
venmx has quit [Ping timeout: 245 seconds]
<marz_d`ghostman> baweaver: How? I'm currently using double, doesn't seem to be working though. I'm trying to test that my conditionals are working if the gem succeeds/fails.
<baweaver> allow(something).to receive(:method).with(:arguments).and_return(something_else)
ruby462 has quit [Ping timeout: 256 seconds]
lunarkitty7 has joined #ruby
clemens3 has joined #ruby
whysthatso has joined #ruby
dogweather has joined #ruby
throwntall has quit [Remote host closed the connection]
throwntall has joined #ruby
samort7 has quit [Read error: Connection reset by peer]
aufi has joined #ruby
armyriad has quit [Ping timeout: 268 seconds]
Tuor has joined #ruby
clemens3_ has joined #ruby
GodFather has quit [Read error: Connection reset by peer]
dogweather has quit [Quit: dogweather]
clemens3 has quit [Ping timeout: 272 seconds]
<marz_d`ghostman> baweaver: I'll try that, thanks.
lyr has left #ruby ["The Lounge - https://thelounge.github.io"]
armyriad has joined #ruby
<marz_d`ghostman> baweaver: Can't seem to make it work though. Am I missing something? https://gist.github.com/marzdgzmn/8ba0bc2ccb70295b6d105f24afba96bd
GodFather has joined #ruby
<baweaver> That's why you let us know earlier on what your actual code is.
<baweaver> You need to stub out the yield to the block as well.
<baweaver> allow(something).to receive(x).with(y).and_yield(z)
BTRE has quit [Ping timeout: 250 seconds]
BTRE has joined #ruby
<marz_d`ghostman> hmmm, tried allow(Marz::Rsync).to receive(:run).with(any_args).and_yield(result), but output doesn't seem to be stubbed
<marz_d`ghostman> oh my bad, it is
wildermind has joined #ruby
lxsameer has joined #ruby
alem0lars has joined #ruby
alem0lars has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
jp has quit [Ping timeout: 260 seconds]
<marz_d`ghostman> Does Rspec.describe run any methods prior to the test? I have a puts method inside my class and it seems to be invoked before the tests
jp has joined #ruby
<tbuehlmann> marz_d`ghostman: it's plain inside the class? then it's executed when the class is loaded
venmx has joined #ruby
<marz_d`ghostman> tbuehlmann: I have this method: https://gist.github.com/marzdgzmn/8ba0bc2ccb70295b6d105f24afba96bd and the puts gets invoked before any tests. Does that mean that the gem(Marz::Rsync) method gets invoked too?
<tbuehlmann> uh, no, that method shouldn't be called by rspec before your examples
<marz_d`ghostman> cause puts result.output is invoked apparently
ramfjord has joined #ruby
nowhere_man has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
jetchisel has joined #ruby
ReporterMan has joined #ruby
<zxq2> rspec is like broken english
<zxq2> don't know why it attempts to mimic a natural language
<zxq2> readability isn't gained
phaul has joined #ruby
<zxq2> the little readability that's gained is bought with an awkward syntax, which makes writing a pain
<tbuehlmann> cool
Spitfire has joined #ruby
<phaul> rspec isn't for everyone. some love it. some don't. I do.
<phaul> but I agree that not fully understanding whats a method call there, what expect gives back, why matchers are chainable, or what runs when, makes it really a false promise
<phaul> dangerous too. You can easily write something that runs and passes but dooesn't test what you wanted
<phaul> but.., if you know how to use it, it becomes productive. at least for me
arekushi has quit [Quit: Gateway shutdown]
nowhere_man has quit [Ping timeout: 272 seconds]
ReporterMan has quit [Read error: Connection reset by peer]
Reporter_ has joined #ruby
johnny56 has joined #ruby
ikbenhet has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
SanguineAnomaly has quit [Ping timeout: 260 seconds]
SanguineAnomaly has joined #ruby
za1b1tsu has quit [Ping timeout: 252 seconds]
Reporter_ has quit [Quit: ragequit]
bijan_ has joined #ruby
arekushi has joined #ruby
lunarkitty7 has quit [Ping timeout: 252 seconds]
bijan_ has quit []
za1b1tsu has joined #ruby
za1b1tsu has quit [Ping timeout: 244 seconds]
xfbs has joined #ruby
mister_solo has joined #ruby
mister_solo has quit [Client Quit]
mister_solo has joined #ruby
mister_solo has quit [Client Quit]
lxsameer has joined #ruby
vonfry has joined #ruby
za1b1tsu has joined #ruby
lxsameer has quit [Ping timeout: 272 seconds]
ikbenhet has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has quit [Ping timeout: 246 seconds]
apeiros_ has joined #ruby
aufi has quit [Remote host closed the connection]
aufi has joined #ruby
lxsameer has joined #ruby
ramfjord has joined #ruby
apeiros_ has quit [Ping timeout: 276 seconds]
kent\n has quit [Ping timeout: 244 seconds]
apeiros_ has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
apparition has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
kurko_ has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
apeiros has joined #ruby
apeiros_ has quit [Ping timeout: 250 seconds]
nowhere_man has joined #ruby
esrse has quit [Ping timeout: 252 seconds]
lxsameer has joined #ruby
koensw has joined #ruby
DTZUZO_ has joined #ruby
mister_solo has joined #ruby
ikbenhet has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
vonfry has quit [Quit: WeeChat 2.2]
rivalomega has quit [Remote host closed the connection]
cd has joined #ruby
bmurt has quit [Quit: Textual IRC Client: www.textualapp.com]
rivalomega has joined #ruby
lxsameer has joined #ruby
rivalomega has quit [Ping timeout: 252 seconds]
crankharder has joined #ruby
phaul has quit [Ping timeout: 252 seconds]
darkhanb has quit [Read error: Connection reset by peer]
crankharder has quit [Ping timeout: 246 seconds]
marmotini_ has joined #ruby
<Bish> since when is 2007-01-01 not valid 8601?
<Bish> >> Time.iso8601("2007-01-01")
<ruby[bot]> Bish: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
za1b1tsu has joined #ruby
<Bish> >> require 'time';Time.iso8601("2007-01-01")
<ruby[bot]> Bish: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
marmotini has joined #ruby
nertzy has joined #ruby
<Bish> ArgumentError: invalid date: "2018-10-17"
<Bish> while this is taken from the wikipedia page of iso8601
marmotini_ has quit [Ping timeout: 250 seconds]
<bhaak> >> require 'time'; Time.iso8601("2007-01-01T12:34:56")
<ruby[bot]> bhaak: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<bhaak> looks like the bot is broken?
<bhaak> or wait
<bhaak> >> require 'date'; puts Date.iso8601("2007-01-01")
<ruby[bot]> bhaak: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
Pupeno_ has joined #ruby
<bhaak> na, broken
<bhaak> but the explanation is in the documentation of iso8601
crankharder has joined #ruby
<bhaak> "alias for xmlschema" and under xmlschema: "Parses date as a dateTime defined by the XML Schema and converts it to a Time object. The format is a restricted version of the format defined by ISO 8601."
<bhaak> _restricted_
<apeiros> bhaak: Date.iso8601 if you don't have a time part
<apeiros> and the above error with the bot is sadly http://eval.in being broken
<apeiros> personally I'd consider it correct if Time.iso8601("2007-01-01") would be treated as 2007-01-01T00:00:00 in local time. apparently ruby sees that differently.
mister_solo has quit [Quit: My ansible has gone to sleep. ZZZzzz…]
<Bish> apeiros: but i don't know beforehand if i have a date part
<bhaak> puts then you would get a Time object and not a Date object.
kapil____ has joined #ruby
<bhaak> s/puts/but
<bhaak> too much ruby
<Bish> ruby - where method named after a standard, don't get you the standard
<Bish> and i remember this being differently
mister_solo has joined #ruby
<Bish> different*
<bhaak> you might remember the parse method and not iso8601?
<apeiros> Bish: uh, yeah, don't tell me it's difficult for you to test that :-p
nertzy has quit [Quit: This computer has gone to sleep]
Fusl has quit [Excess Flood]
<Bish> bhaak: no, that code is super old
<Bish> apeiros: well, there will always be testcases that slip through
<Bish> like.. not testing a method that is named after an iso
Fusl has joined #ruby
<Bish> maybe i should test if nil.nil?
nowhereman has joined #ruby
nowhereman is now known as Guest6910
nowhere_man has quit [Ping timeout: 268 seconds]
<bhaak> I just tested it for 1.8.7, doesn't work either
<bhaak> looking at the source code, the relevant method has been last changed in 2014. the regexp matches the input string even only in 2008
<apeiros> Bish: you certainly should. also test 1 < 2 and "string".is_a?(String) for good measure
* apeiros afk
apeiros has quit []
crankharder has quit [Ping timeout: 252 seconds]
lxsameer has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
GodFather has quit [Ping timeout: 245 seconds]
ramfjord has joined #ruby
xfbs has quit [Quit: afk]
ramfjord has quit [Ping timeout: 252 seconds]
GodFather has joined #ruby
nertzy has joined #ruby
apeiros_ has joined #ruby
throwntall has quit [Remote host closed the connection]
throwntall has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
bsrd has joined #ruby
whysthatso has left #ruby [#ruby]
venmx has quit [Ping timeout: 250 seconds]
ikbenhet has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
whysthatso has joined #ruby
whysthatso has quit [Remote host closed the connection]
knight33 has joined #ruby
<bsrd> Hey I've a puma server running a grape API. We've just had a down and unresponsive period because our logger died. I'm thinking about just offloading to a new thread whenever we log something and continue without calling join or value, so reponses are made regardless of whether the log is alive or not. Has anyone experience with that?
crankharder has joined #ruby
aupadhye has quit [Ping timeout: 252 seconds]
whysthatso has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
aupadhye has joined #ruby
deathwishdave has joined #ruby
ikbenhet has joined #ruby
apeiros_ has quit [Remote host closed the connection]
uplime has quit [Ping timeout: 244 seconds]
rivalomega has joined #ruby
rivalomega has quit [Remote host closed the connection]
apeiros_ has joined #ruby
justicefries has joined #ruby
apeiros_ has quit [Remote host closed the connection]
<darix> bsrd: log to something like a message bus and feed your real log destination from there
lxsameer has quit [Ping timeout: 252 seconds]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marz_d`ghostman has quit [Quit: Page closed]
lxsameer has joined #ruby
mixfix41 has quit [Ping timeout: 252 seconds]
crankhar1er has joined #ruby
mister_solo has quit [Quit: So long, and thanks for all the fish!]
Xiti has quit [Ping timeout: 252 seconds]
Xiti has joined #ruby
mixfix41 has joined #ruby
Xiti has quit [Ping timeout: 252 seconds]
Xiti has joined #ruby
jetchisel has quit [Ping timeout: 272 seconds]
<bsrd> darix: Thanks! sucker_punch gem seems to be the solution I want.
jetchisel has joined #ruby
vondruch has quit [Ping timeout: 268 seconds]
vondruch has joined #ruby
<darix> just feeding into sidekiq would be one way yes
Guest6910 has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
discopatrick has joined #ruby
phaul has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
rivalomega has joined #ruby
marmotini has quit [Ping timeout: 250 seconds]
venmx has joined #ruby
MoritaShinobu has quit [Ping timeout: 260 seconds]
nowhere_man has joined #ruby
Rapture has joined #ruby
apparition has quit [Quit: Bye]
knight33 has joined #ruby
Dbugger has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
Tuor has quit [Ping timeout: 245 seconds]
whysthatso has quit [Quit: whysthatso]
MoritaShinobu has joined #ruby
dbugger_ has joined #ruby
aupadhye has quit [Quit: Leaving]
marmotini_ has joined #ruby
crankharder has quit [Quit: leaving]
kurko__ has joined #ruby
crankharder has joined #ruby
kurko_ has quit [Ping timeout: 244 seconds]
Inline has quit [Disconnected by services]
Fusl has quit [Ping timeout: 256 seconds]
koensw has quit [Remote host closed the connection]
knight33 has quit [Ping timeout: 272 seconds]
planigan_ has joined #ruby
za1b1tsu has quit [Ping timeout: 252 seconds]
elomatreb_ has joined #ruby
ablackack_ has joined #ruby
kurko_ has joined #ruby
kurko__ has quit [Ping timeout: 250 seconds]
Dbugger has quit [*.net *.split]
Rapture has quit [*.net *.split]
crankhar1er has quit [*.net *.split]
wildermind has quit [*.net *.split]
fluxAeon has quit [*.net *.split]
elomatreb has quit [*.net *.split]
KazeFX has quit [*.net *.split]
Dark_Arc has quit [*.net *.split]
jmcgnh has quit [*.net *.split]
planigan has quit [*.net *.split]
baweaver has quit [*.net *.split]
cgfbee has quit [*.net *.split]
devyn has quit [*.net *.split]
Cork has quit [*.net *.split]
maxmanders has quit [*.net *.split]
mniip has quit [*.net *.split]
jtdowney has quit [*.net *.split]
hurricanehrndz has quit [*.net *.split]
S007 has quit [*.net *.split]
ablackack has quit [*.net *.split]
helpa has quit [Ping timeout: 252 seconds]
WebDawg has quit [Ping timeout: 252 seconds]
michael_mbp has quit [Ping timeout: 252 seconds]
marmotini_ has quit [Ping timeout: 252 seconds]
cgfbee has joined #ruby
WebDawg has joined #ruby
jtdowney has joined #ruby
xfbs has joined #ruby
roshanavand has quit [Ping timeout: 272 seconds]
chouhoulis has joined #ruby
wildermind has joined #ruby
michael_mbp has joined #ruby
maxmanders_ has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
marmotini_ has joined #ruby
za1b1tsu has joined #ruby
millerti has joined #ruby
Bish has quit [Ping timeout: 246 seconds]
venmx has quit [Ping timeout: 252 seconds]
leafyleong has quit [Ping timeout: 252 seconds]
aufi has quit [Ping timeout: 245 seconds]
mikecmpbll has joined #ruby
leafyleong has joined #ruby
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ikbenhet has quit [Quit: Textual IRC Client: www.textualapp.com]
mniip_ has joined #ruby
emerson is now known as 07IAAJ8B3
jcarl43 has joined #ruby
nowhere_man has quit [Ping timeout: 244 seconds]
rippa has joined #ruby
orbyt_ has joined #ruby
nertzy has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros_ has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
lxsameer has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
havenwood has left #ruby ["Textual IRC Client: www.textualapp.com"]
havenwood has joined #ruby
dbz has joined #ruby
havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.2, 2.4.5, 2.3.8, 2.6.0-preview2: 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!
dbz has quit [Ping timeout: 252 seconds]
djellemah has quit [Ping timeout: 244 seconds]
djellemah has joined #ruby
Inline has joined #ruby
eckhardt has joined #ruby
mniip has joined #ruby
Dark_Arc has joined #ruby
devyn has joined #ruby
Cork has joined #ruby
hurricanehrndz has joined #ruby
jmcgnh has joined #ruby
KazeFX has joined #ruby
mniip has quit [Read error: Connection timed out]
whysthatso has joined #ruby
elcontrastador has quit [Ping timeout: 252 seconds]
whysthatso has quit [Remote host closed the connection]
whysthatso has joined #ruby
dinfuehr has quit [Ping timeout: 252 seconds]
whysthatso has quit [Remote host closed the connection]
whysthatso_ has joined #ruby
dinfuehr has joined #ruby
lunarkitty7 has joined #ruby
cajone has joined #ruby
cajone has left #ruby [#ruby]
mikecmpbll has quit [Ping timeout: 245 seconds]
za1b1tsu has quit [Ping timeout: 272 seconds]
orbyt_ has joined #ruby
Mike11 has joined #ruby
MoritaShinobu has quit [Quit: Leaving]
lunarkitty7 has quit [Ping timeout: 260 seconds]
lunarkitty7 has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
_kupo has joined #ruby
akem__ has joined #ruby
akem has quit [Ping timeout: 260 seconds]
havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.2, 2.4.5, 2.3.8, 2.6.0-preview2: 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!
rivalomega has quit [Remote host closed the connection]
Fusl has joined #ruby
rivalomega has joined #ruby
justicefries has joined #ruby
themsay has quit [Ping timeout: 272 seconds]
andygeorge has joined #ruby
themsay has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<balo> 2.5.2 havenwood ? i started to look around but can't see the announcement
<balo> or the downloads
<balo> spoiler? :P
<havenwood> balo: It's in the process of being released :) https://github.com/ruby/ruby/releases
<tbuehlmann> havenwood: this is probably not included, right? https://twitter.com/tenderlove/status/1052252450776727552
clemens3_ has quit [Ping timeout: 252 seconds]
baweaver has joined #ruby
<havenwood> tbuehlmann: correct
<tbuehlmann> thanks
apeiros_ is now known as apeiros
<apeiros> lol, havenwood is fast with the topic :D
<baweaver> It's a mark of distinction among we ops to beat havenwood to the punch
<apeiros> I gave up long ago
<baweaver> I get one in under their nose on occasion
eckhardt has joined #ruby
mikecmpbll has joined #ruby
andygeorge has quit [Ping timeout: 244 seconds]
sauvin is now known as Sauvin
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
dbz has joined #ruby
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
tdy has quit [Ping timeout: 252 seconds]
macobo has joined #ruby
dbz_ has joined #ruby
dbz has quit [Ping timeout: 268 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dbz_ has quit [Remote host closed the connection]
dbz has joined #ruby
uplime has joined #ruby
orbyt_ has joined #ruby
eckhardt_ has joined #ruby
macobo has quit [Quit: Page closed]
orbyt_ has quit [Client Quit]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
petemoore has joined #ruby
themsay has quit [Ping timeout: 252 seconds]
ramfjord has joined #ruby
nadir has joined #ruby
fluxAeon has joined #ruby
nowhere_man has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
leafyleong has quit [Ping timeout: 245 seconds]
leafyleong has joined #ruby
sameerynho has joined #ruby
nowhere_man has quit [Ping timeout: 250 seconds]
rivalomega has quit [Remote host closed the connection]
dbz has quit [Remote host closed the connection]
qolq has quit [Quit: qolq]
lxsameer has joined #ruby
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kurko_> When I see a float like 2.2603e-05, how should I read it? 0.00000226?
kapil____ has quit [Quit: Connection closed for inactivity]
lxsameer has quit [Ping timeout: 252 seconds]
<jhass> yes, xey means x * 10 ** y
orbyt_ has joined #ruby
marmotini_ has quit [Ping timeout: 245 seconds]
deathwishdave has joined #ruby
SeepingN has joined #ruby
drusepth has joined #ruby
roshanavand has joined #ruby
orbyt_ has quit [Read error: Connection reset by peer]
marmotini_ has joined #ruby
marmotini_ has quit [Ping timeout: 252 seconds]
discopatrick has quit [Quit: Connection closed for inactivity]
ramfjord has quit [Ping timeout: 268 seconds]
<apeiros> they don't write a NEWS file for the changes? :(
reber has quit [Remote host closed the connection]
marmotini_ has joined #ruby
rivalomega has joined #ruby
ellcs has joined #ruby
marmotini_ has quit [Ping timeout: 246 seconds]
rivalomega has quit [Remote host closed the connection]
rivalomega has joined #ruby
rivalomega has quit [Read error: Connection reset by peer]
rivalomega has joined #ruby
Mos has joined #ruby
ellcs has quit [Ping timeout: 272 seconds]
roshanavand has quit [Ping timeout: 272 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
dinfuehr has quit [Ping timeout: 268 seconds]
venmx has joined #ruby
dinfuehr has joined #ruby
lytol_ has joined #ruby
RedNifre has joined #ruby
<RedNifre> hey there. What's a good gem for functional programming? (currying, partial application etc.)
<phaul> haskell
* phaul ducks :)
<RedNifre> ...
<RedNifre> hey there. What's a good way to do regex matching and yaml config stuff in Haskell without having to declare records for all the yaml stuff?
<phaul> well, you can't have eeverything
<RedNifre> All I want is a lightweight way to do FP. haskell is too heavy for simple stuff.
<RedNifre> Ruby is really nice except that I would like an easier way to do mappings. I don't want to use blocks when partially applied functions would also work.
<phaul> have you looked at elixir?
<phaul> that seems to be the hot stuff these days...
<RedNifre> That's erlang with ruby syntax, right? Hm....
<phaul> yeah
<RedNifre> Well, I'm looking for a programmer friendly scripting language with a large and useful standard library. That's ruby.
<RedNifre> Oh, I think I found a gem, hang on...
<RedNifre> This one looks nice, but it's 5 years old. Is that a problem with gems? When do they rot? https://github.com/banister/funkify
deathwishdave has quit [Quit: Textual IRC Client: www.textualapp.com]
<phaul> RedNifre: I was just kidding at the beginning, but give elixir a go. They even have phoenix, which is supposed to be "their rails". Or if you are a purist there is haskell Strong static types, referential transparency.. Or if you dont care about trends and buzzwords - in my opinion - you can just use ruby :) And forget about the whole nonsense
<phaul> but Ruby from the begining concepts wasn't built for being functional. You either OO or you either functional
dbugger_ has quit [Remote host closed the connection]
tdy has joined #ruby
<djellemah> >> ->a,b{a+b}.curry[1][2] # RedNifre
<ruby[bot]> djellemah: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<djellemah> @_@
<djellemah> => 3
im0nde has joined #ruby
kapil____ has joined #ruby
drusepth has quit [Ping timeout: 252 seconds]
ramfjord has joined #ruby
orbyt_ has joined #ruby
r00twrh has joined #ruby
ellcs has joined #ruby
millerti has quit [Ping timeout: 252 seconds]
ur5us has joined #ruby
<RedNifre> okay
<RedNifre> Another thing, I'd like to put a regex in a yaml file. Is there a trick or do I just put it in there as a string and turn the string into a regex when I read the file?
ur5us has quit [Read error: Connection reset by peer]
nadir has quit [Quit: Connection closed for inactivity]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> Lemur time!
<baweaver> RedNifre: What all do you want to do?
<baweaver> Qo - Pattern Matching and Fluent Querying - https://github.com/baweaver/qo
* phaul sigh
<baweaver> Xf - Lenses and deep hash querying - https://github.com/baweaver/xf
<baweaver> Mf - Modifier Functions - https://github.com/baweaver/mf
<RedNifre> uh huh
<baweaver> regex: !ruby/regexp '/matchy_match_match/'
<RedNifre> what?
<baweaver> Regex in YAML
ramfjord has quit [Ping timeout: 244 seconds]
<RedNifre> The right side looks like a regex in a string, but what is !ruby/regexp ?
<baweaver> Magic :D
<baweaver> Read that stack exchange link right above it
<RedNifre> wtf
<RedNifre> okay, I'll have to look into that. Excellent! That's exactly what I need.
<baweaver> So as far as functional programming, let us know what ya want to do
ramfjord has joined #ruby
<baweaver> and we'll supply the bad ideas.
<RedNifre> Basically everything that's possible in Haskell. I might be looking for a dynamically typed light weight Haskell like scripting language.
<RedNifre> It looks like that doesn't exist and ruby is mostly great so it would be nice to make ruby more haskelly with a library or something.
eckhardt has joined #ruby
tdy has quit [Ping timeout: 252 seconds]
Mike11 has quit [Quit: Leaving.]
<phaul> RedNifre: haskell is prretty far from ruby, and that's not saying that it's preferable in either direction. But having what haskell can in Ruby is just simply no-no
<phaul> or the other way. what ruby can in haskell will never happen.
r00twrh has quit [Read error: Connection reset by peer]
ellcs has quit [Ping timeout: 272 seconds]
Mos has quit [Ping timeout: 244 seconds]
_kupo has quit [Quit: WeeChat 2.2]
orbyt_ has quit [Ping timeout: 244 seconds]
<phaul> what I mean is that for instance to have "referential transparency" haskell had to give up variables and variable assignement. Any stateful language can't do that. In return they gained strong guaranties on behaviour..... but of course you can use baweeavers libs,.and when a haskellish syntax makes more sense in the domain, do so. I myself just started using Qo :) but Im afraid that doesnt make it what haskell
<phaul> gives you
<RedNifre> That's not a problem in practice though, if you don't use state in your code you can write haskelly code without the guarantees (you just have to make sure you obey the rules).
<RedNifre> The thing is, Ruby seems to be the perfect light weight programmer friendly OOP language. Haskell seems to be the perfect (ignoring Idris) heavy weight serious professional awesome FP language. It looks like there is no perfect light weight programmer friendly FP language out there though. So how to write light weight fp code then?
wojnar has joined #ruby
marmotini_ has joined #ruby
whysthatso_ has quit [Quit: whysthatso_]
<SeepingN> heavily
marmotini_ has quit [Ping timeout: 246 seconds]
marmotini_ has joined #ruby
pharma_joe has joined #ruby
orbyt_ has joined #ruby
nadir has joined #ruby
<baweaver> The problem is that once people start using Haskell they're convinced that any other language is morally reprehensible to use.
<baweaver> Whether that be pure FP concerns or type concerns, I've seen both
<baweaver> Pragmatism trumps dogma. Use what works, and learn along the way what works best. There's no such thing as perfect code.
<baweaver> Mind, I like Haskell, but some practitioners have almost a religious level of zealotry attached to it.
xfbs has quit [Quit: afk]
ramfjord has quit [Ping timeout: 252 seconds]
marmotini has joined #ruby
knight33 has joined #ruby
marmotini_ has quit [Ping timeout: 246 seconds]
sameerynho has quit [Ping timeout: 246 seconds]
Bacteria has joined #ruby
<Bacteria> do you guys put user stuff into controller or model?
<phaul> ?rails
<ruby[bot]> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<phaul> yay, it worked :)
<Bacteria> yay
<phaul> Bacteria: what's user stufff?
<phaul> but I would say model....
<Bacteria> i dont tryst u
<Bacteria> is there any experts here
<phaul> I'm totally agreeing I wouldnt trust myself either
07IAAJ8B3 is now known as emerson
<Bacteria> damit
<Bacteria> how can u betray me like this
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Dimik has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
venmx has quit [Ping timeout: 245 seconds]
ramfjord has joined #ruby
ellcs has joined #ruby
apeiros has quit [Remote host closed the connection]
justicefries has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
snickers has joined #ruby
lxsameer has joined #ruby
fiachetti has joined #ruby
marmotini has quit [Read error: Connection reset by peer]
lxsameer has quit [Ping timeout: 268 seconds]
ellcs has quit [Ping timeout: 250 seconds]
marmotini_ has joined #ruby
<havenwood> ruby-install --latest ruby
<havenwood> rvm get head && rvm install ruby
<havenwood> Ruby 2.5.2! ^
marmotini has joined #ruby
<phaul> yay -Syu
<phaul> pacman -Syu for some...
<havenwood> phaul: i love Ruby arch packages are actually kept up-to-date
<miah> everything is kept up to date =)
<lupine> I love Ruby debian packages are actually kept stable + security fixes
<havenwood> i still like jhass' arch/chruby setup: https://gist.github.com/jhass/8839655bb038e829fba1
<havenwood> lupine: haha, true
<lupine> they recently updated firefox-esr to 60.0, and now it crashes weekly :/
<lupine> stupid capitalism
marmotini_ has quit [Ping timeout: 245 seconds]
rwb has joined #ruby
wojnar has quit [Remote host closed the connection]
marmotini has quit [Read error: Connection reset by peer]
marmotini has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kurko__ has joined #ruby
<Bacteria> i <3 debian
kurko_ has quit [Ping timeout: 252 seconds]
kapil____ has quit [Quit: Connection closed for inactivity]
phaul has quit [Quit: bye]
mikecmpbll has quit [Quit: inabit. zz.]
Xiti has quit [Quit: Xiti]
Xiti has joined #ruby
c0ncealed3 has quit [Remote host closed the connection]
c0ncealed3 has joined #ruby
wildermind has quit [Quit: Connection closed for inactivity]
Bacteria has quit [Quit: Lost terminal]
marmotini has quit [Remote host closed the connection]
marmotini has joined #ruby
uplime has quit [Ping timeout: 272 seconds]
c0ncealed3 has quit [Ping timeout: 245 seconds]
RedNifre has quit [Ping timeout: 244 seconds]
marmotini_ has joined #ruby
c0ncealed3 has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marmotini has quit [Ping timeout: 246 seconds]