adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.3, 2.7.5, 2.6.9: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
howdoi has quit [Quit: Connection closed for inactivity]
pwnd_sfw3 has joined #ruby
pwnd_sfw has quit [Read error: Connection reset by peer]
pwnd_sfw3 is now known as pwnd_sfw
Gost has joined #ruby
Gost has quit [Client Quit]
freeworld has quit [Ping timeout: 252 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 268 seconds]
dohtem has joined #ruby
Nex6 has quit [Quit: Leaving]
Al2O3 has quit [Quit: I'm quitting, thanks for all the sharks.]
Al2O3 has joined #ruby
roadie has joined #ruby
Rounin has quit [Ping timeout: 256 seconds]
roadie has quit [Ping timeout: 252 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
unyu has quit [Quit: WeeChat 3.3]
roadie has joined #ruby
roadie has quit [Ping timeout: 252 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 252 seconds]
roadie has joined #ruby
kaivai has quit [Quit: ZNC - https://znc.in]
kaivai has joined #ruby
duds- has joined #ruby
roadie has quit [Ping timeout: 252 seconds]
_ht has joined #ruby
random-jellyfish has joined #ruby
roadie has joined #ruby
roadie` has joined #ruby
roadie has quit [Remote host closed the connection]
freeworld has joined #ruby
roadie` is now known as roadie
freeworld has quit [Quit: Konversation terminated!]
vit has joined #ruby
vit is now known as Guest5351
Guest5351 is now known as freeworld
Rounin has joined #ruby
_ht has quit [Remote host closed the connection]
teclator has joined #ruby
random-jellyfish has quit [Ping timeout: 256 seconds]
Milos has quit [Quit: ZNC 1.8.2 - https://znc.in]
Milos has joined #ruby
fercell has joined #ruby
ollysmith has quit [Ping timeout: 268 seconds]
BSaboia has joined #ruby
TomyWork has joined #ruby
taupiqueur has joined #ruby
<taupiqueur> hello
<taupiqueur> is there iterators in ruby?
<taupiqueur> I'm trying to skip the first element in a chain for reduce
<taupiqueur> l = [1,2,3]; l.each.tap(&.next).to_a # => [2,3] I was expecting to skip the first element
<taupiqueur> I need it to avoid to do in my reduce block something like: `next sum if index.zero?`
<nakilon> try drop(1) maybe
BSaboia has quit [Read error: Connection reset by peer]
BSaboia has joined #ruby
niv has quit [Quit: Powered by LunarBNC: https://LunarBNC.net]
<g_sg> #tap returns the original array
<g_sg> (or, more precisely, the original object)
niv has joined #ruby
niv has quit [Client Quit]
niv has joined #ruby
niv has quit [Client Quit]
niv has joined #ruby
niv has quit [Client Quit]
niv has joined #ruby
niv has quit [Client Quit]
niv has joined #ruby
niv has quit [Client Quit]
niv has joined #ruby
niv has quit [Client Quit]
niv has joined #ruby
niv has quit [Client Quit]
roadie has quit [Ping timeout: 252 seconds]
roadie has joined #ruby
BSaboia has quit [Quit: Leaving]
<havenwood> or lazy.drop(1), depending
<adam12> havenwood: block of the morning to ya
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
<nakilon> do |morning| end ?
nullheroes has quit [Quit: WeeChat 2.3]
nullheroes has joined #ruby
unyu has joined #ruby
<adam12> nakilon: lol. never thought of it that way.
<adam12> nakilon: It was a bit of a joke about recent news of havenwood's $WORK
<nakilon> I missed it I guess
taupiqueur has quit [Quit: taupiqueur]
gr33n7007h has quit [Ping timeout: 252 seconds]
gr33n7007h has joined #ruby
Bounga has joined #ruby
Milos has quit [Quit: ZNC 1.8.2 - https://znc.in]
yans has joined #ruby
Milos has joined #ruby
roadie has joined #ruby
niv has joined #ruby
Inline has joined #ruby
BSaboia has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
moldorcoder7_ has quit [Ping timeout: 265 seconds]
moldorcoder7 has joined #ruby
Inline has quit [Ping timeout: 252 seconds]
Inline has joined #ruby
<havenwood> adam12: Now to convert all this Ruby to Blockly...
crankharder has joined #ruby
___nick___ has joined #ruby
Inline has quit [Ping timeout: 252 seconds]
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
BSaboia has joined #ruby
___nick___ has joined #ruby
crankharder has quit [Ping timeout: 256 seconds]
crankharder has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
donofrio has joined #ruby
freeworld has quit [Quit: Konversation terminated!]
BSaboia has joined #ruby
crankharder has quit [Ping timeout: 256 seconds]
Inline has joined #ruby
Inline has quit [Ping timeout: 256 seconds]
crankharder has joined #ruby
belak has quit [Quit: ZNC 1.8.2 - https://znc.in]
belak has joined #ruby
roadie has quit [Ping timeout: 268 seconds]
Wafficus has joined #ruby
<Wafficus> I am trying to run 'bundle' in my project which contains a 'GEMFILE' for dependencies for the 'glimmer-dsl-tk' GUI framework, and am receiving this error:
<Wafficus> This is the contents of the 'GEMFILE':
<Wafficus> I installed 'ruby' via 'Homebrew' package manager on MacOS. Also, I tried installing the other dependency 'tcl-tk' via Homebrew but it said I already had the latest up-to-date version of this package as well for reference, as I am trying to go through the installation prerequisites:
<adam12> Wafficus: Might need to manually provide a path to the tk dev files.
<Wafficus> ah, like within the 'GEMFILE' itself right?
<adam12> Wafficus: There's an override for it. But the tk gem is a binding to the tk library. This normally means it might look for /usr/lib/libtk.so or something, but if you install with Homebrew or similar, then it might get placed in a non-standard location. You then need to "suggest" to the tk gem where it's installed.
<adam12> Wafficus: I see it's still using jRuby, which might also be the issue.
<adam12> JRuby doesn't support linking to C libraries. It might be failing just because of that.
Bounga has quit [Ping timeout: 256 seconds]
<adam12> Were you still using jruby for a reason?
<Wafficus> hmm well, if it was installed with Brew, then it probably wasn't installed via a .gem file in the first place
<Wafficus> I don't think I'm using Jruby in this case
<adam12> Wafficus: We're talking two different things. there's tk the Ruby gem, and there's tk the library.
<Wafficus> Found where brew stores tcl-tk:
<Wafficus> Here: /usr/local/cellar/tcl-tk/8.6.12 $ pwd
<adam12> Wafficus: Inside that dir is lib?
<Wafficus> * /usr/local/cellar/tcl-tk/8.6.12
<Wafficus> Inside that directory: /usr/local/cellar/tcl-tk/8.6.12 $ ls
<Wafficus> ChangeLog INSTALL_RECEIPT.json README.md bin changes include lib license.terms share
<Wafficus> I think this contains both 'tcl' and 'tk' into one package though
<Wafficus> maybe, should I just use 'gtk+3' instead?
<Wafficus> Looks like the most sane approach: https://dev.to/nitinkatkam/building-a-desktop-gui-app-with-ruby-3b0m
<adam12> Wafficus: Maybe.
<adam12> Are you on Linux?
<adam12> I thought you were on Mac (if you're the person from yesterday)
<Wafficus> no, this would be on MacOS (but I totally use Linux on the side)
<adam12> Oh nm.
<Wafficus> I am the person from 2 days ago though :)
<adam12> I didn't realize gtk3 will work on Mac. Maybe it uses the X11 server somehow...
<Wafficus> me too, never knew
<Wafficus> didn't know you could tap into X11 on MacOS
<Wafficus> otherwise I would have overhauled the window manager a while back :)
hwrd has quit [Remote host closed the connection]
<adam12> I think you could probably get tk to work, but you'd need to somehow get the gem to find the libraries correctly. But I just looked at the tooling around that and it's .. pretty wild. I'm not sure I could offer a suggestion on it at all.
<Wafficus> (though I know Magenta exists, etc)
<adam12> I say for now, just work through the list :P there's still the libui bindings too. Hehe.
<Wafficus> no worries, I'm convinced at this point that GUI development sucks :)
<Wafficus> exactly
<Wafficus> just prototyping a simple example app for the team to be honest, whatever works, works
hwrd has joined #ruby
crankharder has quit [Ping timeout: 256 seconds]
<adam12> I still think you're using jruby, inadvertently. Your paste has metions of jruby everywhere. That _may_ cause issues, because of how Java and C libraries interop.
crankharder has joined #ruby
roadie has joined #ruby
<Wafficus> hmm I should probably uninstall it then :)
\`_ has joined #ruby
roadie has quit [Ping timeout: 252 seconds]
crankharder has quit [Ping timeout: 256 seconds]
<\`_> Hi, what is the equivalent way of using perl 'e' regex modifier in ruby, like something shown here https://paste.debian.net/1221717/
<leah2> str.gsub(/\w/) { |s| s.upcase }
<leah2> ie use a block
BSaboia has quit [Quit: This computer has gone to sleep]
Wafficus has quit [Ping timeout: 252 seconds]
<\`_> leah2: how do I access capture group from gsub from inside the block?
<leah2> $1
<\`_> that so obvious I feel stupid
<leah2> :)
crankharder has joined #ruby
roadie has joined #ruby
hwrd-test has joined #ruby
hwrd-test has quit [Quit: WeeChat 3.3]
___nick___ has quit [Ping timeout: 256 seconds]
hwrd-test has joined #ruby
roadie has quit [Ping timeout: 268 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 252 seconds]
hwrd-test has quit [Quit: WeeChat 3.3]
roadie has joined #ruby
\`_ has quit [Ping timeout: 276 seconds]
roadie has quit [Ping timeout: 252 seconds]
roadie has joined #ruby
dohtem has quit [Quit: Connection closed for inactivity]
walez has joined #ruby
\`_ has joined #ruby
_aeris_ has joined #ruby
aeris has quit [Ping timeout: 276 seconds]
_aeris_ is now known as aeris
yans has quit [Ping timeout: 252 seconds]
pwnd_sfw has quit [Quit: Ping timeout (120 seconds)]
dohtem has joined #ruby
pwnd_sfw has joined #ruby
walez has quit [Quit: Leaving]
roadie has quit [Ping timeout: 268 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 252 seconds]
Inline has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 268 seconds]
Al2O3 has quit [Remote host closed the connection]
sagax has quit [Ping timeout: 252 seconds]
Al2O3 has joined #ruby
BSaboia has joined #ruby
Wafficus has joined #ruby
<Wafficus> Got a sample terminal calculator program I made, but I can't understand why the result variable isn't actually working
<leftylink> at minimum six lines are going to have to change there
crankharder has quit [Ping timeout: 256 seconds]
<leftylink> after line 20, what is operator
roadie has joined #ruby
<Wafficus> Hmm maybe operator needs to have a default value, is that the issue?
<Wafficus> As in like, an empty string?
<Wafficus> ex: operator = ''
<weaksauce> you are assigning the variable instead of equality
<weaksauce> and you are trying to do math on strings
<Wafficus> so is there a better way to declare an integer variable in this scenario though?
roadie has quit [Ping timeout: 252 seconds]
crankharder has joined #ruby
<Wafficus> got it, '.to_i' is the method: https://code-maven.com/convert-string-to-number-in-ruby
Wafficus has quit [Quit: Connection closed]
crankharder has quit [Ping timeout: 252 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 252 seconds]
crankharder has joined #ruby