AJA4350 has quit [Remote host closed the connection]
AJA4350 has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.5]
mre- has joined #ruby
cd has joined #ruby
bitwinery has joined #ruby
mistergibson has joined #ruby
<havenwood>
[rg]: packages of Ruby code that we publish and share
<havenwood>
[rg]: if you have some code and want to share it with the world, you can "cut a gem" and distribute it so other can `gem install gem-name-here`.
<[rg]>
is this central to ruby spec or just happens to be part of community development
<[rg]>
like java jars
<[rg]>
it's always mentioned but without context when I look at docs for ruby
<havenwood>
[rg]: Ruby didn't have Gems at one time but now RubyGems ships with Ruby and is officially maintained.
amateur_rubyist has quit [Remote host closed the connection]
sleepee has quit [Ping timeout: 272 seconds]
amateur_rubyist has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
jottr has joined #ruby
queip has quit [Ping timeout: 246 seconds]
jottr has quit [Ping timeout: 268 seconds]
brool has joined #ruby
poontangmessiah has joined #ruby
queip has joined #ruby
rippa has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
dinfuehr has quit [Ping timeout: 272 seconds]
dinfuehr has joined #ruby
banisterfiend has joined #ruby
hrhsh has joined #ruby
hrhsh has quit [Client Quit]
ellcs has joined #ruby
hrhsh has joined #ruby
hutch has quit [Quit: WeeChat 2.5]
hrhsh has quit [Client Quit]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grilix has joined #ruby
banisterfiend has quit [Ping timeout: 245 seconds]
igolden has joined #ruby
poontangmessiah has quit [Remote host closed the connection]
igolden has quit [Quit: leaving]
amateur_rubyist has quit [Remote host closed the connection]
queip has quit [Ping timeout: 272 seconds]
suukim has quit [Quit: Konversation terminated!]
jenrzzz has joined #ruby
queip has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
morozovm has joined #ruby
star_prone has joined #ruby
<star_prone>
Hi!
Freshnuts has joined #ruby
<star_prone>
I started learning Ruby and found as a resource http://rubykoans.com/. downloaded the Koans, installed ruby on Ubuntu 18.04 with snap, opened the files in RubyMine and tried to configure Ruby interpreter, but I get the error "Error configuring SDK: Could not get RubyGems environment for ruby-2.6.3-p62: ver.2.6.3p0 (/snap/bin/ruby)."
<star_prone>
any ideas?
deepredsky has joined #ruby
deepreds1 has quit [Ping timeout: 248 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
drnerdius has joined #ruby
Nicmavr has joined #ruby
banisterfiend has joined #ruby
Fernando-Basso has quit [Remote host closed the connection]
poontangmessiah has joined #ruby
<havenwood>
star_prone: Same if you?: eval "$(ruby.env)"
<havenwood>
star_prone: I've not used the snap package for Ruby development. Hmm.
<havenwood>
star_prone: You might want to consider installing the Brightbox ruby-dev package for Ubuntu or the Fullstaq one.
<havenwood>
star_prone: It might be fun to get the snap Ruby version working. I think of snaps as more to be available as dependencies, but I've not actually tried using the Ruby snap for Ruby dev so I can't rule out that it's possible.
<star_prone>
havenwood: command not found: ruby.env
<ruby[bot]>
^amra: 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
<havenwood>
#!> NameError: undefined local variable or method `team_red' for main:Object
Technodrome has quit [Remote host closed the connection]
<^amra>
I have two sorted by :score key hashes team_red and team_blue, and I try to merge both by :n_1 {:player_7 {}, :player_3 {}}
<havenwood>
^amra: You don't need to pre-declare: teams_red = {}
<havenwood>
^amra: Check your variable names closely, but more importantly run it!
<havenwood>
Running code surfaces issues.
<havenwood>
?irb ^amra
<ruby[bot]>
^amra: irb is "interactive ruby", it is part of ruby. You can run ruby code and see results immediately. it's useful for testing code. Also see ?pry, a gem which is a popular alternative to irb.
<ruby[bot]>
^amra: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
<havenwood>
#!> NameError: undefined local variable or method `team_blue' for main:Object
<havenwood>
^amra: Close!
<havenwood>
^amra: But not quite.
<havenwood>
I think you're a 1 away.
<havenwood>
^amra: Paste it in irb?
<havenwood>
^amra: From the command line, type: irb
<^amra>
In first key of hash named :n_7 must be two hashes but there is only one
<^amra>
And this heshes must be player_7 and player_3
<^amra>
bu there is only player_7 hash in n_7
<^amra>
And I don't understand why it's named :n_7 and no :n_1
<havenwood>
^amra: For :n_7 you can: :"n_#{n}"
<havenwood>
^amra: (it's currently :n7)
<leftylink>
well of course it's n7. think about what what `k[/\d+\z/]` result in for `:player_7`
<leftylink>
there's nothing else it could possibly be
queip has quit [Ping timeout: 258 seconds]
<^amra>
oh, sorry, the "_" is not important
<^amra>
I mean :n1 and not :n7 as first key in hash
<havenwood>
^amra: :n1 is another key
<havenwood>
^amra: it's there
<havenwood>
^amra: what's wrong about it?
<havenwood>
^amra: These aren't sorted, to be clear. Is the issue that you want them to be sorted?
<havenwood>
^amra: Showing the desired result would help us be able to glean the purpose without you saying.
<havenwood>
^amra: In the absence of the desired result, you'll need to spell it out.
<^amra>
I want to get two sorted hashes :team_red and :team_blue and merge them one by one to :n1 {:player_7 {}, player_3 {}}, n2: {:player_8 {}, :player_4 {}}
<havenwood>
^amra: Is the sort order wrong? What's wrong?
<^amra>
But I got :n7 {:player_7 {}}, n8: {:player_8 {}}
<havenwood>
^amra: That works with additional hashes if you want to: hashes.reduce(:merge).group_by { |score:, **| score }.to_h { |k, v| [:"n_#{k}", v.to_h] }
<havenwood>
It works in my head. Prove it!
<^amra>
It's put into new one hash the key value pair from team_red sorted by score and then from team_blue
<^amra>
Where is :"n_#{n}" includes only one key value pair, but it must be two pairs
<havenwood>
I'm bored of this, but since I understand your ask now I guess I'll implement. Unless someone else wants to?
<^amra>
It must be 8 and 4, but it's 8 and 0
<ec>
yes?
<leftylink>
my immediate and visceral reaction to "unless someone else wants to" was "F*** NO" but I had to debate on whether to actually type that in channel. as you can see, the result of the debate was to type it.
reber has quit [Remote host closed the connection]
<^amra>
:))
<^amra>
The solution is very close :)
<leftylink>
:)
RyanMcCoskrie has quit [Read error: Connection reset by peer]
bitwinery has quit [Remote host closed the connection]
<havenwood>
^amra: I *think* I understand what you want. Check the code!
bitwinery has joined #ruby
<^amra>
sec)
<^amra>
YES!
<^amra>
Like a charm!
<^amra>
Oh my god.
<^amra>
Thank you very much :))
<havenwood>
You're welcome
<^amra>
And sorry for incorrectly explaining
jottr has quit [Ping timeout: 245 seconds]
<havenwood>
^amra: No worries. You'll find the UNIX rule holds true that data is easier to understand than logic. If you can provide working code with desired data input and output it'll often shortcut a solution.
<^amra>
You right
<^amra>
Thanks :)
ur5us has quit [Read error: Connection reset by peer]
<havenwood>
No prob :)
ur5us has joined #ruby
ur5us_ has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
phroa has quit [Ping timeout: 272 seconds]
sameerynho has quit [Ping timeout: 272 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
Fernando-Basso has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
ur5us_ has quit [Read error: Connection reset by peer]
ElFerna has joined #ruby
morozovm has joined #ruby
ElFerna has quit [Client Quit]
morozovm has quit [Ping timeout: 258 seconds]
<leftylink>
&>> p
<rubydoc>
stderr: /home/carcin/carcin/sandboxes/ruby/sandboxed_ruby2.6.0: error while loading shared libraries:... check link for more (https://carc.in/#/r/7g96)
gix has quit [Ping timeout: 245 seconds]
AJA4350 has joined #ruby
<leftylink>
did anyone ever make a joke about ogen