havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.5, 2.5.7, 2.7.0-preview1: 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!
Swyper has quit [Remote host closed the connection]
gnufr33d0m has quit [Ping timeout: 268 seconds]
brandoncc has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
Swyper has joined #ruby
wildtrees has joined #ruby
blackmesa has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
wildtrees has quit [Quit: Leaving]
duderonomy has joined #ruby
<havenwood> It looks like Perl 6 is renaming to Raku.
AJA4350 has quit [Quit: AJA4350]
Swyper has quit [Remote host closed the connection]
<baweaver> havenwood: So Perl is dead then?
<baweaver> Wonder how eam will take it
<havenwood> baweaver: Hah
<CherryPy> :o
blackmesa has joined #ruby
CherryPy has quit [Quit: Bye Bye]
jaequery has joined #ruby
<havenwood> I love how Perl 6 has Ruby influences. I remember seeing a lot of parallels. One example: https://gist.github.com/havenwood/3933580
<Frankenstein> i was writing some elixir + phoenix code and it was all pretty close to valid rails code
gnufr33d0m has joined #ruby
<havenwood> Frankenstein: Here's my stab at a rough implementation of Elixir stdlib in Ruby: https://github.com/havenwood/elixir.rb
<havenwood> Frankenstein: My partner is looking at doing an Elixir clone of Chart.js with LiveView for rendering. (I'm a fan.)
blackmesa has quit [Ping timeout: 245 seconds]
<Frankenstein> oh cool
<Frankenstein> chart.js is a cool project. itll be cool to do a clone
<havenwood> Frankenstein: Yeah, for LiveView to matter you'd have to generate the SVGs on the server and sync the diff.
<havenwood> Which seems like a great idea to me.
CherryPy has joined #ruby
<Frankenstein> yeah, that sounds like it would be pretty quick
* havenwood Frankenstein: This is a Rails clone of LiveView, fwiw: https://github.com/hopsoft/stimulus_reflex
banisterfiend has quit [Read error: Connection reset by peer]
<havenwood> Frankenstein: She's looking to hire an Elixir dev to do the backend SVG generation work. The LiveView portion should then be fairly straightforward.
ravenousmoose has joined #ruby
<havenwood> With TruffleRuby you'd be able to use use lang interop to use Chart.js from the backend. :)
<Frankenstein> stimulus looks really cool. i might have to play around with that
<Frankenstein> oh so is the clone a professional project then?
ravenousmoose has quit [Ping timeout: 245 seconds]
uranoss has quit [Quit: Connection closed for inactivity]
blackmesa has joined #ruby
<havenwood> It's interesting how different I feel about Fibers in Ruby (extremely positive): https://devblogs.microsoft.com/oldnewthing/20191011-00/?p=102989
<havenwood> I guess it's just how you're using them.
blackmesa has quit [Ping timeout: 245 seconds]
bambanx has quit [Quit: Leaving]
<havenwood> I think it may just not be yet thoroughly explored.
millerti has quit [Ping timeout: 240 seconds]
henninb has quit [Quit: Lost terminal]
lucasb has quit [Quit: Connection closed for inactivity]
dasher00 has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
teardown has quit [Read error: Connection reset by peer]
teardown has joined #ruby
chalkmonster has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Quit: vondruch]
blackmesa has joined #ruby
vondruch has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
xGrind has quit [Quit: Saindo]
exchgr` has joined #ruby
exchgr has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
Technodrome has joined #ruby
brendan- has quit [Ping timeout: 250 seconds]
witlesswonder has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
impermanence has quit [Ping timeout: 268 seconds]
brendan- has joined #ruby
dbz_ has joined #ruby
Ai9zO5AP has quit [Quit: WeeChat 2.5]
blackmesa has joined #ruby
wald0 has joined #ruby
dbz_ has quit [Ping timeout: 240 seconds]
Leopere has joined #ruby
Leopere has quit [Client Quit]
brendan- has quit [Ping timeout: 245 seconds]
blackmesa has quit [Ping timeout: 245 seconds]
salinasc has quit [Ping timeout: 268 seconds]
Norrin has quit [Quit: ""]
Norrin has joined #ruby
xtsee has quit [Ping timeout: 264 seconds]
drincruz has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
Esa_ has quit [Ping timeout: 268 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
gnufr33d0m has quit [Quit: gnufr33d0m]
brendan- has joined #ruby
brandoncc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CherryPy has quit [Quit: Bye Bye]
blackmesa has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cd has quit [Quit: cd]
xtsee has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
duderono_ has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
sankamur_ has quit [Ping timeout: 245 seconds]
blackmesa has quit [Ping timeout: 264 seconds]
wald0 has quit [Quit: leaving]
blackmesa has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
gix has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
brool has quit [Ping timeout: 246 seconds]
_whitelogger has joined #ruby
blackmesa has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
blackmesa has joined #ruby
brandoncc has joined #ruby
cyclonis_ has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
fig-le-deunch has joined #ruby
bradleyprice has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
exchgr` is now known as exchgr
akemhp has quit [Ping timeout: 265 seconds]
exchgr has left #ruby [#ruby]
blackmesa has joined #ruby
bradleyprice has quit [Ping timeout: 250 seconds]
donofrio has quit [Remote host closed the connection]
brandoncc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cyclonis has quit [Read error: Connection reset by peer]
cyclonis_ has joined #ruby
brandoncc has joined #ruby
brandoncc has quit [Client Quit]
blackmesa1 has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
blackmesa1 has quit [Ping timeout: 250 seconds]
blackmesa1 has joined #ruby
blackmesa1 has quit [Ping timeout: 245 seconds]
dbz_ has joined #ruby
cthulchu_ has quit [Ping timeout: 268 seconds]
dbz_ has quit [Ping timeout: 245 seconds]
blackmesa1 has joined #ruby
blackmesa1 has quit [Ping timeout: 250 seconds]
bradleyprice has joined #ruby
edwardly has quit [Read error: Connection reset by peer]
alnka has joined #ruby
edwardly has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
bradleyprice has quit [Ping timeout: 276 seconds]
zenspider has quit [Quit: bye]
zenspider has joined #ruby
bradleyprice has joined #ruby
bradleyprice has quit [Ping timeout: 246 seconds]
alnk has quit [Quit: leaving]
alnka is now known as alnk
schne1der has quit [Ping timeout: 268 seconds]
bradleyprice has joined #ruby
bradleyprice has quit [Ping timeout: 245 seconds]
fig-le-deunch has quit [Ping timeout: 240 seconds]
dbz_ has joined #ruby
bradleyprice has joined #ruby
dbz_ has quit [Ping timeout: 246 seconds]
bradleyprice has quit [Ping timeout: 268 seconds]
sauvin has joined #ruby
mossplix has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akemhp has joined #ruby
fig-le-deunch has joined #ruby
akemhp_ has joined #ruby
akemhp has quit [Ping timeout: 250 seconds]
uranoss has joined #ruby
jeremycw has joined #ruby
fig-le-deunch has quit [Quit: Konversation terminated!]
jeremycw has quit [Ping timeout: 265 seconds]
blackmesa1 has joined #ruby
TomyWork has joined #ruby
curious_being has joined #ruby
duderonomy has quit [Ping timeout: 268 seconds]
phaul has joined #ruby
mossplix has quit [Remote host closed the connection]
curious_being has quit [Read error: Connection reset by peer]
mossplix has joined #ruby
_whitelogger has joined #ruby
dbz_ has joined #ruby
dellavg has joined #ruby
dbz_ has quit [Ping timeout: 268 seconds]
queip has quit [Ping timeout: 268 seconds]
queip_ has joined #ruby
queip_ is now known as queip
mossplix has quit [Remote host closed the connection]
absolutejam4 has joined #ruby
mossplix has joined #ruby
DTZUZO has quit [Ping timeout: 268 seconds]
TomyWork has quit [Remote host closed the connection]
absolutejam4 has quit [Ping timeout: 240 seconds]
Swyper has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
ravenousmoose has joined #ruby
Nicmavr has joined #ruby
bradleyprice has joined #ruby
mossplix has quit [Remote host closed the connection]
bradleyprice has quit [Ping timeout: 245 seconds]
Swyper has quit [Remote host closed the connection]
mossplix has joined #ruby
agent_white has joined #ruby
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 240 seconds]
_phaul has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
conta has joined #ruby
bradleyprice has joined #ruby
conta1 has joined #ruby
conta has quit [Ping timeout: 240 seconds]
conta1 is now known as conta
bradleyprice has quit [Ping timeout: 264 seconds]
dbugger has joined #ruby
bradleyprice has joined #ruby
bradleyprice has quit [Ping timeout: 245 seconds]
dbugger has quit [Quit: Leaving]
dbugger has joined #ruby
suukim has joined #ruby
ravenousmoose has quit [Read error: Connection reset by peer]
mossplix has quit [Remote host closed the connection]
ravenousmoose has joined #ruby
mossplix has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
_phaul is now known as phaul
Emmanuel_Chanel has joined #ruby
gix has joined #ruby
fig-le-deunch has joined #ruby
davor has quit [Ping timeout: 240 seconds]
dbz_ has joined #ruby
davor has joined #ruby
dbz_ has quit [Ping timeout: 240 seconds]
dasher00 has joined #ruby
brendan- has quit [Read error: Connection reset by peer]
brendan- has joined #ruby
neha has joined #ruby
<neha> how to i write minitest for "magic_number = rand(range)"
dionysus69 has joined #ruby
<phaul> what do you want to test about that line? built in things like rand can be trusted, and you shouldn't need to test them.
<c-c> test if its a number and not nil?
<neha> magic_number = rand(range) until try_guess(magic_number) do end end def try_guess(magic_number) print "What's your guess? " guess = gets.chomp.to_i if guess == magic_number puts "You guessed correctly!" return true elsif guess < magic_number puts "Guess higher" return false else puts "Guess lower" return false
<neha> end
chalkmonster has quit [Quit: WeeChat 2.6]
<phaul> ?flood
<ruby[bot]> Please use https://gist.github.com for more than three lines of text!
<phaul> you can also use dpatse.de as suggested by the topic
<neha> I wan to write minitest for that code any help plase
<phaul> testing will be difficult this way (but still possible) because of the IO is interleaved with the business logic. You could have a method that instead of doing IO gets the input as an argument, and insteadof puts returns the result as a string. Then you can assert on the return value. The main program would use that method to do IO
blackmesa1 has quit [Quit: WeeChat 2.6]
<phaul> otherwise you would need to stub IO i think to be able to assert on it.
<phaul> you have a few incorrect parts at line 2, and line 4
<neha> ohk thanks
<neha> Any reference for IO to write test case ?
<c-c> I would make a static class and a static method for the (starting a new) guessing-loop with class var boolean to signify if while -loop still valid, finally a static method for IO
<c-c> but thats just me
rbanffy has joined #ruby
Esa_ has joined #ruby
<phaul> we don't have static methods in ruby
<neha> ok
Ai9zO5AP has joined #ruby
<neha> I have stuck with this code when i run that time error was liked: "LocalJumpError: no block given (yield)" code
<neha> Any solutions for resolved that error
<c-c> something like: class GuessGame; @@correct = false; def self.get_input(prompt); p prompt; return gets.chomp_to_i; end; self.ask_guess; guessed = self.get_input("Guess?"); end; def self.new_game; magic = rand(100); while !@@correct do; self.ask_guess;
<c-c> phaul: you don't like def self.NNN?
brendan- has quit [Read error: Connection reset by peer]
<phaul> I have nothing against it. but static is a C++ terminology and it's a completely different mechanism from the way it works in Ruby
<c-c> its lexically static
<c-c> B)
<phaul> not really
<ccooke> neha: you're using yield in the working implementation of your 'math' method (line 16). However, you don't pass a block when you call it. Change line 21 to - for instance - 'math(let_array) { |a,b,c| puts [a,b,c] }' and it will print any yielded values
mossplix has quit [Remote host closed the connection]
<c-c> phaul: well its not instantiated class object
mossplix has joined #ruby
brendan- has joined #ruby
<c-c> so in this approach, one does: GuessGame::new_game()
<phaul> you shouldn't use :: in front of method calls
<phaul> GuessGame.new_game is the accepted way
<c-c> but you get the point
<neha> No
<c-c> one could use plain instantiated class as well but that feels so dirty for a small job like this
<phaul> c-c can I recommend you watching https://www.youtube.com/watch?v=X2sgQ38UDVY
<c-c> thanks
<c-c> I've heard about it once
fig-le-deunch has quit [Quit: Konversation terminated!]
fig-le-deunch has joined #ruby
fig-le-deunch has quit [Client Quit]
akemrir has joined #ruby
rbanffy has quit [Quit: rbanffy]
<c-c> phaul so would you use instead something like: magic_n = rand(); def magic_n.get_input(prompt); return gets; def magic_n.new_game; while !self.guessed; get_input("Guess?").to_i == magic_n ? self.guessed = true : return false; end; end
<c-c> yes: that is horrible pseudocode
CherryPy has joined #ruby
agent_white has quit [Quit: later]
Fernando-Basso has joined #ruby
conta1 has joined #ruby
conta has quit [Ping timeout: 268 seconds]
conta1 is now known as conta
Hobbyboy has joined #ruby
mossplix has quit [Remote host closed the connection]
<c-c> - I guess that second one should use the "class << magic_n" -notation.
catbusters has joined #ruby
hiroaki has joined #ruby
mossplix has joined #ruby
rbanffy has joined #ruby
rbanffy has quit [Remote host closed the connection]
Inline has quit [Ping timeout: 264 seconds]
rbanffy has joined #ruby
rbanffy has quit [Remote host closed the connection]
nahra has joined #ruby
x0f has quit [Ping timeout: 240 seconds]
x0f has joined #ruby
Technodrome has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
chalkmonster has joined #ruby
DTZUZO has joined #ruby
ellcs has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
DaRock has joined #ruby
mossplix has quit [Ping timeout: 240 seconds]
x0f has quit [Ping timeout: 276 seconds]
AJA4350 has joined #ruby
x0f has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
x0f_ has joined #ruby
x0f has quit [Ping timeout: 268 seconds]
x0f_ has quit [Ping timeout: 240 seconds]
x0f has joined #ruby
xGrind has joined #ruby
x0f has quit [Ping timeout: 245 seconds]
cyclonis_ has quit [Quit: -a- Connection Timed Out]
cyclonis has joined #ruby
cyclonis has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
x0f has joined #ruby
dionysus69 has joined #ruby
drincruz has joined #ruby
hutch1 has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 276 seconds]
AJA4351 is now known as AJA4350
cyclonis has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
cyclonis has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
hutch1 has quit [Ping timeout: 264 seconds]
akemrir has quit [Quit: WeeChat 2.6]
Inline has joined #ruby
nahra has quit [Ping timeout: 268 seconds]
poontangmessiah has joined #ruby
hightower2 has quit [Ping timeout: 246 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 276 seconds]
AJA4351 is now known as AJA4350
CherryPy has quit [Quit: Bye Bye]
drincruz has quit [Ping timeout: 268 seconds]
hutch1 has joined #ruby
dellavg has quit [Ping timeout: 240 seconds]
hightower2 has joined #ruby
cyclonis has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
cyclonis has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis_ has joined #ruby
conta has quit [Quit: conta]
hutch1 has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
donofrio has joined #ruby
neha has quit [Remote host closed the connection]
Diogo_ has joined #ruby
Diogo_ is now known as Diogo
AJA4350 has quit [Ping timeout: 265 seconds]
ta1 has quit [Ping timeout: 250 seconds]
schne1der has joined #ruby
duderonomy has joined #ruby
Fernando-Basso has quit [Ping timeout: 265 seconds]
Mrgoose845701915 has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 250 seconds]
GodFather has joined #ruby
GodFather has quit [Ping timeout: 265 seconds]
queip has quit [Ping timeout: 268 seconds]
Emmanuel_Chanel has joined #ruby
queip has joined #ruby
brendan- has quit [Read error: Connection reset by peer]
dbz_ has joined #ruby
Fernando-Basso has joined #ruby
brendan- has joined #ruby
lucasb has joined #ruby
dbz_ has quit [Ping timeout: 252 seconds]
GodFather has joined #ruby
fanta1 has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
ellcs has quit [Ping timeout: 240 seconds]
queip has quit [Ping timeout: 265 seconds]
queip_ has joined #ruby
queip_ is now known as queip
snickers has joined #ruby
x0f_ has joined #ruby
cyclonis_ has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
x0f has quit [Ping timeout: 250 seconds]
GodFather has quit [Ping timeout: 240 seconds]
x0f has joined #ruby
x0f_ has quit [Ping timeout: 276 seconds]
xGrind has quit [Read error: Connection reset by peer]
x0f has quit [Ping timeout: 252 seconds]
CherryPy has joined #ruby
x0f has joined #ruby
akemrir has joined #ruby
brendan- has quit [Read error: Connection reset by peer]
brendan- has joined #ruby
cycloni74 has joined #ruby
xGrind has joined #ruby
x0f has quit [Ping timeout: 240 seconds]
DaRock has quit [Ping timeout: 268 seconds]
x0f has joined #ruby
nahra has joined #ruby
dionysus69 has joined #ruby
x0f_ has joined #ruby
x0f_ has quit [Changing host]
x0f_ has joined #ruby
x0f has quit [Ping timeout: 265 seconds]
x0f has joined #ruby
x0f_ has quit [Ping timeout: 250 seconds]
brendan- has quit [Ping timeout: 250 seconds]
poontangmessiah has quit [Ping timeout: 268 seconds]
agent_white has joined #ruby
cycloni74 has quit [Ping timeout: 246 seconds]
agent_white has left #ruby [#ruby]
cd has joined #ruby
tsujp has quit [Ping timeout: 240 seconds]
Ai9zO5AP has quit [Ping timeout: 265 seconds]
catbusters has quit [Quit: Connection closed for inactivity]
x0f has quit [Ping timeout: 265 seconds]
x0f has joined #ruby
mikecmpbll has joined #ruby
sevvie has joined #ruby
sevvie has quit [Changing host]
sevvie has joined #ruby
tsujp has joined #ruby
gavlee has joined #ruby
x0f has quit [Ping timeout: 245 seconds]
x0f has joined #ruby
jacksoow has quit [Read error: Connection reset by peer]
x0f_ has joined #ruby
Ai9zO5AP has joined #ruby
jacksoow has joined #ruby
Swyper has joined #ruby
x0f has quit [Ping timeout: 265 seconds]
x0f_ has quit [Ping timeout: 265 seconds]
queip_ has joined #ruby
queip has quit [Ping timeout: 265 seconds]
queip_ is now known as queip
drincruz has joined #ruby
tsujp_ has joined #ruby
tsujp has quit [Ping timeout: 240 seconds]
Diogo has quit [Quit: Connection closed for inactivity]
x0f has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
JohanP has joined #ruby
AJA4350 has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
GodFather has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
hiroaki has quit [Remote host closed the connection]
salinasc has joined #ruby
havenwood has quit [Quit: ZNC 1.7.3 - https://znc.in]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
drincruz has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
havenwood has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
hiroaki has joined #ruby
jacksoow_ has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
jacksoow has quit [Ping timeout: 245 seconds]
GodFather has quit [Ping timeout: 264 seconds]
ta has joined #ruby
CherryPy has quit [Quit: Bye Bye]
queip has quit [Ping timeout: 268 seconds]
x0f has quit [Ping timeout: 264 seconds]
queip_ has joined #ruby
queip_ is now known as queip
x0f has joined #ruby
hiroaki has quit [Ping timeout: 265 seconds]
x0f has quit [Ping timeout: 252 seconds]
x0f has joined #ruby
KeyJoo has joined #ruby
dbz_ has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
GodFather has joined #ruby
dbz_ has quit [Ping timeout: 240 seconds]
akem__ has joined #ruby
Mrbuck has joined #ruby
hiroaki has joined #ruby
<Mrbuck> hey all ruby is actively developed?
bradleyprice has joined #ruby
akemhp_ has quit [Ping timeout: 265 seconds]
Swyper has quit [Remote host closed the connection]
GodFather has quit [Ping timeout: 245 seconds]
akem__ has quit [Read error: Connection reset by peer]
akem__ has joined #ruby
drincruz has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4351 is now known as AJA4350
agent_white has joined #ruby
Swyper has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
jaequery has joined #ruby
<ged> Mrbuck: yes
<Mrbuck> ged: https://www.coursera.org/learn/programming-languages I wan; to learn ruby
<Mrbuck> since its taught in that course
<ged> Sounds good to me.
<Mrbuck> ged: how about job opportunities ?
<ged> I guess it depends on where you are geographically, but there are quite a few Ruby jobs in the US in the usual tech-job places, especially if you know Rails.
<ged> I can't speak to other countries.
<Mrbuck> ged: so for job preference ruby is not best but though better to learn oop ?
<ged> I don't understand what you're asking.
<Mrbuck> learn ruby to become good at oop concepts but not for jobs
<Mrbuck> am I right?
<mikecmpbll> there's plenty of ruby jobs, more than there are ruby devs. certainly here in the UK.
<mikecmpbll> there's fewer overall jobs than e.g. .NET or PHP though.
<ged> I disagree, but you can learn some OOP concepts with Ruby.
<mikecmpbll> but what relevance has that? :) demand is everything.
<ged> I am employed as a full-time Ruby programmer, FWIW.
<Mrbuck> FWIW means ?
<mikecmpbll> me too.
<ged> For What It's Worth
<Mrbuck> I wan't to learn ruby also thinking there will be scarcity for rubydevs
<ged> And I've been getting paid to write Ruby for 12+ years.
salinasc has quit [Ping timeout: 250 seconds]
<ged> I don't have any interest in convincing you of anything, though. Do what makes you happy.
<havenwood> Mrbuck: Ruby is very actively developed and there are plenty of jobs. Every one of the top ten languages is actively developed with available jobs though.
<mikecmpbll> fwiw, if anyone's looking for a ruby job in yorkshire, uk, lemme know ;)
<havenwood> I like Ruby a lot.
<Mrbuck> mikecmpbll: I will learn and let you know ?
<Mrbuck> havenwood: why ? how it is so different ?
<mikecmpbll> sure :)
<rapha> mikecmpbll: that'd be fun moving to the UK when all other continent-dwellers are fleeing in the brexit woes :P
<Mrbuck> mikecmpbll: I am trying to finish https://www.coursera.org/learn/programming-languages
<mikecmpbll> ah, no such woes. all of our many european workers have applied for the right to remain brexit process, and received it within weeks.
dbz_ has joined #ruby
<mikecmpbll> very efficient process.
queip has quit [Ping timeout: 265 seconds]
queip_ has joined #ruby
<sagax> hi all!
queip_ is now known as queip
<sagax> what we have log with ENV key before run script?
<sagax> to log*
<havenwood> sagax: Huh?!
fanta1 has quit [Quit: fanta1]
salinasc has joined #ruby
<havenwood> Mrbuck: DHH says something like it "fits my brain." It's simple and expressive to get started with but aimed at experienced C programmers as an audience so it keep relevance as you level up.
<sagax> havenwood: i found Logger, thanks
<Mrbuck> havenwood: i can write a bit of python
<havenwood> Mrbuck: That's a nice language too. Try a few and see what you like as you use them to solve various problems.
suukim has quit [Quit: Konversation terminated!]
salinasc has quit [Ping timeout: 268 seconds]
brandoncc has joined #ruby
<Mrbuck> ah thanks havenwood
SneakyGrimlin has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
booboy has joined #ruby
<sagax> how to know where gem placed?
<sagax> after gem has been install
bradleyprice has quit [Remote host closed the connection]
<adam12> sagax: `gem which nameofgem` might get you whwat you want.
Mrbuck has quit [Remote host closed the connection]
<adam12> sagax: `gem info nameofgem` is a bit more verbose but includes where it might be installed, depending on version.
AJA4350 has quit [Ping timeout: 240 seconds]
drincruz has joined #ruby
brool has joined #ruby
impermanence has joined #ruby
Mrbuck has joined #ruby
salinasc has joined #ruby
bradleyprice has joined #ruby
bradleyprice has quit [Ping timeout: 252 seconds]
drincruz has quit [Ping timeout: 264 seconds]
dbz_ has quit [Ping timeout: 250 seconds]
akemrir has quit [Quit: WeeChat 2.6]
wildtrees has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
jaequery has joined #ruby
Mrbuck has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
bradleyprice has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has joined #ruby
bradleyprice has quit [Ping timeout: 245 seconds]
ogres has joined #ruby
JohanP has quit [Remote host closed the connection]
JohanP has joined #ruby
KeyJoo has quit [Read error: Connection reset by peer]
KeyJoo has joined #ruby
x0f has quit [Ping timeout: 245 seconds]
Swyper has quit [Remote host closed the connection]
x0f has joined #ruby
Swyper has joined #ruby
JohanP has quit [Remote host closed the connection]
JohanP has joined #ruby
akemrir has joined #ruby
bradleyprice has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby
snickers has quit [Quit: Textual IRC Client: www.textualapp.com]
bradleyprice has quit [Ping timeout: 264 seconds]
dbz_ has joined #ruby
salinasc has quit [Ping timeout: 246 seconds]
snickers has joined #ruby
salinasc has joined #ruby
dbz_ has quit [Ping timeout: 268 seconds]
absolutejam4 has joined #ruby
bradleyprice has joined #ruby
CherryPy has joined #ruby
bradleyprice has quit [Ping timeout: 246 seconds]
jaequery has joined #ruby
JohanP has quit [Ping timeout: 264 seconds]
salinasce has joined #ruby
bambanx has joined #ruby
salinasc has quit [Read error: Connection reset by peer]
schne1der has quit [Remote host closed the connection]
JohanP has joined #ruby
queip_ has joined #ruby
queip has quit [Ping timeout: 240 seconds]
queip_ is now known as queip
x0f_ has joined #ruby
x0f has quit [Ping timeout: 264 seconds]
akemhp_ has joined #ruby
x0f_ has quit [Ping timeout: 240 seconds]
akem__ has quit [Ping timeout: 240 seconds]
x0f has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troulouliou_div2 has joined #ruby
ExoUNX has joined #ruby
<ExoUNX> greetings
bradleyprice has joined #ruby
<ExoUNX> I'm getting this error - `<module:RbReadline>': HOME environment variable (or HOMEDRIVE and HOMEPATH) must be set and point to a directory (RuntimeError)
<ExoUNX> when I run "set" HOME is set
<ExoUNX> I've also temporarily added HOME under /etc/environment just so it's available to all users and I still get the error
Freshnuts has joined #ruby
<adam12> ExoUNX: What's the output of `echo $HOME`
<adam12> ExoUNX: (from the shell)
<ExoUNX> "/root" as expected
<adam12> ExoUNX: And the output of `stat $HOME`?
<adam12> ExoUNX: Actually even better, `file $HOME`?
<ruby[bot]> ExoUNX: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<adam12> ExoUNX: OK looks correct.
bradleyprice has quit [Ping timeout: 252 seconds]
<adam12> ExoUNX: What are you running that's triggering the error?
<ExoUNX> apt-get update && sudo apt-get install gitlab-ce=10.8.1-ce.0
<phaul> try ENV['HOME'] from irb?
<ExoUNX> so I'm assuming the upgrade (auto-migration) script runs as a different user, but that's why I set /etc/environment
<phaul> or ruby -e 'p ENV["HOME"]' from shell
<adam12> ExoUNX: You're running that as root?
<ExoUNX> adam12 the apt commands, yes
<ExoUNX> gitlab itself runs under various gitlab users
<ExoUNX> phaul "/root"
<adam12> ExoUNX: Any reason why the second command uses `sudo`?
<adam12> ExoUNX: I gotta run so I can't stick around and help. sudo is known to drop environment variables and I wonder if somehow `HOME` is being dropped somewhere.
<ExoUNX> accidentally added, same problem persists without that sudo
JohanP has quit [Ping timeout: 268 seconds]
KeyJoo has quit [Quit: KeyJoo]
queip has quit [Ping timeout: 240 seconds]
queip has joined #ruby
Fernando-Basso has quit [Remote host closed the connection]
<phaul> what I would try is to run it with pry-rescue. trigger pry prompt at exception and look at ENV at that point. and look at the code that causes the exception.
<phaul> ExoUNX: are you familiar with pry/pry-rescue?
<ExoUNX> phaul entirely unfamiliar
JohanP has joined #ruby
<ExoUNX> however, I'm going to check out the .deb and see how it's running the script
<phaul> ok, my idea might not be something that's feasible then
bradleyprice has joined #ruby
bradleyprice has quit [Ping timeout: 250 seconds]
<phaul> btw what system is this? Linux? running natively or in a container?
akemrir has quit [Quit: WeeChat 2.6]
<ExoUNX> .deb didn't show anything, I'm checking with the #gitlab channel
<ExoUNX> running on Ubuntu 16.04 on a LXC container running kernel version 5.0.15-1
bradleyprice has joined #ruby
<phaul> ExoUNX: good luck, I hope they point you to the right place on #gitlab. It's a rare occurance that ppl tell if they are asking cross channel, (as they should). Appreciated.
<ExoUNX> thanks for the help
<Iambchop> ExoUNX: gitlab deb is installed and you're upgrading to 10.8.1? try 10.8.2 in case it's just a 10.8.1 bug?
bradleyprice has quit [Ping timeout: 245 seconds]
<ExoUNX> Iambchop well I don't think it's even a problem with the install because if I try to run gitlab-rake I get the same error
<Iambchop> did it used to work? (I've never tried to install it under LXC)
hightower2 has quit [Changing host]
hightower2 has joined #ruby
JohanP has quit [Ping timeout: 240 seconds]
<ExoUNX> Iambchop here's the section of code - https://gist.github.com/ExoUNX/d371e1e382d80285aa56563016092b83
<ExoUNX> Iambchop yah, I'm just moving the lxc instance from an different host (different lxc/kernel version)
dbugger has quit [Ping timeout: 250 seconds]
bradleyprice has joined #ruby
hutch1 has joined #ruby
Swyper has quit [Remote host closed the connection]
bradleyprice has quit [Ping timeout: 246 seconds]
<ExoUNX> Iambchop I think I found the issue
troulouliou_div2 has quit [Read error: Connection reset by peer]
Emmanuel_Chanel has quit [Ping timeout: 252 seconds]
<ExoUNX> yup got it, I dropped in print ENV["HOME"} and print print ENV["USER"] and it helped me troubleshoot the problem
bradleyprice has joined #ruby
absolutejam4 has quit [Ping timeout: 268 seconds]
<ExoUNX> yah somewhere ENV["HOME"] was being set to a different directory, and it didn't get backed up for the move
<ExoUNX> I've created the directory to test it and it worked, but now I just need to redo the backup with the data directory and I'm set
<ExoUNX> thanks
dhollinger has quit [Ping timeout: 240 seconds]
dhollinger has joined #ruby
bradleyprice has quit [Ping timeout: 276 seconds]
JohanP has joined #ruby
JohanP has quit [Remote host closed the connection]
JohanP has joined #ruby
bambanx has quit [Remote host closed the connection]
bambanx has joined #ruby
Ven`` has joined #ruby
bradleyprice has joined #ruby
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bradleyprice has quit [Ping timeout: 250 seconds]
<Iambchop> :-)
Swyper has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
CherryPy has quit [Quit: Bye Bye]
duderono_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<sagax> hi all!
<sagax> how to write to file without block? i need write to file and see this with `tail` in command line
hutch1 has quit [Ping timeout: 246 seconds]
dbugger has joined #ruby
Emmanuel_Chanel has joined #ruby
<Frankenstein> file = File.open "file.txt", "w"; file.write "abcd"; file.close
ogres has joined #ruby
fanta1 has joined #ruby
<sagax> no, i't should be block file
<sagax> i need write without block
<sagax> and don't `close` file very long time
<sagax> and see change with `tail` in command line
<Frankenstein> when you say block, do you mean a ruby block or a filesystem block? the code i gave you doesn't close the file until you call file.close. If you want it to close later just call it later
<Frankenstein> oh, you mean write to it asynchronously?
<Frankenstein> tailing it won't block from writing to it
<sagax> uff,
<sagax> `tail` don't block, i just want see all change with `tail -f file.name`
snickers has quit [Ping timeout: 265 seconds]
<sagax> but File.open should be block file, and `tail` not see any change before file have open
hutch1 has joined #ruby
witlesswonder has quit [Remote host closed the connection]
witlesswonder has joined #ruby
jacksoow_ has quit [Read error: Connection reset by peer]
<Frankenstein> oh, you can use File#flush to have it dump the buffer to the actual file
<Frankenstein> e.g. file = File.open "file.txt", ?w; <start tailing> ... file.write "hi there\n"; file.flush; <see "hi there" in the tail> ... long time later ... file.close
<sagax> hm, maybe
<sagax> thanks
<sagax> i will try this
<Frankenstein> ok cool
jacksoow has joined #ruby
morozovm has joined #ruby
morozovm has quit [Client Quit]
brandoncc has quit [Ping timeout: 268 seconds]
hutch1 has quit [Ping timeout: 246 seconds]
edwardly has quit [Read error: Connection reset by peer]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
fanta1 has quit [Quit: fanta1]
cyclonis has joined #ruby
bradleyprice has joined #ruby
banisterfiend has joined #ruby
<brool> anyone know a good gem for parsing HTML in CLI?
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
JohanP has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
cthulchu_ has joined #ruby
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CherryPy has joined #ruby
Xiti has quit [Quit: Xiti]
CherryPy is now known as SeeSeeRider
RiPuk_ has joined #ruby
RiPuk has quit [Ping timeout: 240 seconds]
r3m has quit [Quit: WeeChat 2.7-dev]
r3m has joined #ruby
<brool> like i just want to curl and pipe html to a ruby script and get the contents of certain elements, and preferrably not rely on regex hackery
<brool> but i guess i could
<baweaver> brool: nokogiri, or oga if you want lighter weight
<brool> ty
<baweaver> XPaths can be interesting though
<Frankenstein> I'm going to have to be using Nokogiri's html builder soon. took a peak at the api and it looks interesting
<baweaver> Oga doesn't rely on C extensions so it may be faster.
JohanP has joined #ruby
cyclonis has quit [Ping timeout: 265 seconds]
cyclonis has joined #ruby
JohanP has quit [Ping timeout: 250 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cyclonis_ has joined #ruby
AJA4350 has joined #ruby
cyclonis has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
Xiti has joined #ruby
ravenousmoose has joined #ruby
banisterfiend has joined #ruby
cycloni43 has joined #ruby
cyclonis_ has quit [Read error: Connection reset by peer]
cyclonis has quit [Ping timeout: 276 seconds]
ravenousmoose has quit [Ping timeout: 264 seconds]
Esa_ has quit []
ravenousmoose has joined #ruby
dbugger has quit [Quit: Leaving]
SeeSeeRider has quit [Quit: Bye Bye]
ravenousmoose has quit [Ping timeout: 250 seconds]
bradleyprice has quit [Remote host closed the connection]
ravenousmoose has joined #ruby
drincruz has joined #ruby
cycloni43 has quit [Ping timeout: 240 seconds]
cyclonis has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
ravenousmoose has quit [Ping timeout: 245 seconds]