havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.0, 2.7.2, 2.6.6: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
hiroaki_ has quit [Ping timeout: 264 seconds]
<al2o3-cr> happy new year
hiroaki_ has joined #ruby
Pierre_ has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
<havenwood> happy new year!
Pierreb has quit [Ping timeout: 240 seconds]
Pierre_ is now known as Pierreb
sphex_ has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
sphex has joined #ruby
<al2o3-cr> the fireworks are incredible here :)
<al2o3-cr> happy new year havenwood
<al2o3-cr> :)
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
coniptor has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
swaggboi has quit [Ping timeout: 260 seconds]
roshanavand has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby
Technodrome has joined #ruby
roshanavand has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
coniptor has joined #ruby
jenrzzz has joined #ruby
roshanavand1 has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
roshanavand1 has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
ur5us_ has joined #ruby
jenrzzz has joined #ruby
TCZ has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
ian| has quit [Remote host closed the connection]
swaggboi has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
FastJack has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
FastJack has joined #ruby
roshanavand1 has joined #ruby
dilated_dinosaur has quit [Ping timeout: 272 seconds]
roshanavand has quit [Ping timeout: 256 seconds]
roshanavand1 is now known as roshanavand
jenrzzz has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
<reaVer> Happy new year everyone!
ian| has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
<panorain> Thank you. :]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
envex has quit []
coniptor has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
TCZ has quit [Quit: Wawel - Czujesz sie dobrze, czynisz dobrze]
jenrzzz has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coniptor has joined #ruby
ur5us_ has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
ian| has quit [Quit: Exiting]
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
shakes has joined #ruby
shakes has quit [Client Quit]
jenrzzz has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jdeen has joined #ruby
jdeen_ has joined #ruby
jdeen has quit [Ping timeout: 264 seconds]
roshanavand1 has joined #ruby
jenrzzz has joined #ruby
hiroaki_ has quit [Ping timeout: 240 seconds]
roshanavand has quit [Ping timeout: 240 seconds]
hiroaki has joined #ruby
hiroaki has quit [Max SendQ exceeded]
hiroaki has joined #ruby
hiroaki has quit [Max SendQ exceeded]
roshanavand1 has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
woodruffw has quit [Ping timeout: 240 seconds]
woodruffw has joined #ruby
woodruffw has joined #ruby
elcuervo has joined #ruby
jenrzzz has joined #ruby
drusepth has quit [Ping timeout: 272 seconds]
cuerbot has quit [Ping timeout: 260 seconds]
hiroaki has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
gix- has joined #ruby
gix has quit [Disconnected by services]
jenrzzz has joined #ruby
teardown has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
teardown has joined #ruby
banisterfiend has joined #ruby
coniptor has quit [Ping timeout: 246 seconds]
postmodern has quit [Remote host closed the connection]
coniptor has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
TheDcoder[m] has joined #ruby
<TheDcoder[m]> Happy new year! Does `gem` automatically install all the dependencies?
<TheDcoder[m]> I installed the `asciidoctor-pdf` gem but when I run it, I get an error that a file is missing, which should be part of the dependencies.
jenrzzz has quit [Ping timeout: 246 seconds]
<havenwood> TheDcoder[m]: Yes, if you mean in a Gemfile a #gem directive does result in dependencies in the Gemfile.lock.
<havenwood> TheDcoder[m]: How are you running it? What command?
<havenwood> TheDcoder[m]: Assuming you're using Bundler and ran `bundle` then `bundle exec COMMAND_NAME HERE` or something else?
<TheDcoder[m]> havenwood: Sorry, I am not a Ruby programmer, I just used the default gem commands to install it and I am running it by typing the name of the binary
<TheDcoder[m]> My environment is correctly setup to include the path for locally installed gems
<havenwood> TheDcoder[m]: Ah, yeah if you run `gem install GEM_NAME_HER` you should be good to go with a binary.
<TheDcoder[m]> Yes, that's exactly what I did but I am still getting the error :(
<havenwood> TheDcoder[m]: Maybe they missed listing a dependency? What gem?
<TheDcoder[m]> How can I check if a particular gem is installed?
<TheDcoder[m]> havenwood: asciidoctor-pdf, I have the parent asciidoctor gem installed as well.
<havenwood> TheDcoder[m]: Ah, right, I missed that you already said that.
<TheDcoder[m]> No worries
<havenwood> TheDcoder[m]: Paste the first line of the error?
<havenwood> TheDcoder[m]: Or what file is missing?
<TheDcoder[m]> I have pasted the full output in this GitHub issue: https://github.com/asciidoctor/asciidoctor-pdf/issues/1851
<TheDcoder[m]> This should be the main error: Could not find 'prawn' (~> 2.2.0) among 176 total gem(s) (Gem::MissingSpecError)
<havenwood> TheDcoder[m]: The prawn gem is indeed listed as a dependency so it should get installed. Sanity check that it's installed freshly with the current Ruby?
<havenwood> TheDcoder[m]: Run: gem pristine asciidoctor-pdf
<havenwood> TheDcoder[m]: So installing the gem should result in the dependency. It seems like prawn somehow got uninstalled after asciidoctor-pdf was installed? Either that or something funky is going on with the command.
<havenwood> TheDcoder[m]: Are you running this command from a directory that contains a Gemfile.lock?
<TheDcoder[m]> Indeed, I checked the spec and it had prawn listed as a dep
<TheDcoder[m]> No, there is no Gemfile.lock file
<havenwood> TheDcoder[m]: Does it work after a pristine install?
<TheDcoder[m]> I just ran the pristine command and the gem has been restored to pristine condition
<TheDcoder[m]> Unfortunately that did not solve the issue
m27frogy has quit [Ping timeout: 256 seconds]
<havenwood> TheDcoder[m]: You're installing it from the same version of Ruby you're running it from, presumably? (It's *possible* for GEM_HOME (install location) to be different from GEM_PATH (locations Ruby looks for gems) but that's really strange and not something I'm used to seeing.
<TheDcoder[m]> Yes... of course. I have installed Ruby from the standard Arch Linux repository, there are no other versions installed.
<havenwood> TheDcoder[m]: Does it seem like prawn is installed locally?
<havenwood> TheDcoder[m]: gem info prawn
<havenwood> TheDcoder[m]: ruby -r prawn -e "0"
<havenwood> TheDcoder[m]: Do either of those work?
<TheDcoder[m]> cannot load such file -- prawn (LoadError)
<TheDcoder[m]> gem info is just giving me blank lines with a single line containing "'*** LOCAL GEMS ***"
<havenwood> TheDcoder[m]: Did the prawn install maybe fail when you installed asciidoctor-pdf? Does it work to install it independently?
<havenwood> TheDcoder[m]: gem install prawn -v "~> 2.2.0"
<TheDcoder[m]> I did not notice any errors when installing asciidoctor-pdf
<TheDcoder[m]> I will try manually installing it
<TheDcoder[m]> Just did and `ruby -r prawn -e "0"` is not giving me an error anymore
<TheDcoder[m]> But if I run `asciidoctor-pdf`, I get a new error
<havenwood> TheDcoder[m]: Another dep?
<TheDcoder[m]> can't satisfy 'ttfunk (~> 1.5.0, >= 1.5.1)', already activated 'ttfunk-1.7.0' (Gem::LoadError)
<TheDcoder[m]> Yes, looks like it
<havenwood> TheDcoder[m]: It sure seems like this command is being run inside a bundle, like there's a Gemfile.lock invovled?
cd has quit [Quit: cd]
<havenwood> TheDcoder[m]: Do you get the same result for?
<havenwood> asciidoctor-pdf -v
<havenwood> bundle exec asciidoctor-pdf -v
<TheDcoder[m]> Yes, I just tried -v in a new empty folder
<TheDcoder[m]> same error
<TheDcoder[m]> I don't have bundle installed
<havenwood> TheDcoder[m]: Just super strange for dependencies to not get installed.
<havenwood> TheDcoder[m]: What gem version? gem -v
<TheDcoder[m]> Yeah... very strange :-/
<TheDcoder[m]> 3.1.4
<havenwood> TheDcoder[m]: What directory are gems installing to?
<TheDcoder[m]> I can share the output of gem env if wanted
<havenwood> TheDcoder[m]: gem env gemdir
<TheDcoder[m]> /home/TheDcoder/.gem/ruby/2.7.0
<havenwood> TheDcoder[m]: Yeah, pasting a gist of the `gem env` might help someone here spot the issue.
<havenwood> TheDcoder[m]: Is prawn installed there/
<havenwood> TheDcoder[m]: Is `/home/TheDcoder/.gem/ruby/2.7.0/bin` in your $PATH?
<TheDcoder[m]> Yes
<TheDcoder[m]> I think prawn is installed properly now, I see the `/home/TheDcoder/.gem/ruby/2.7.0/gems/prawn-2.2.2/` directory
<havenwood> TheDcoder[m]: Just sanity checking, but `which asciidoctor-pdf` is `/home/TheDcoder/.gem/ruby/2.7.0/bin/asciidoctor-pdf` too?
<TheDcoder[m]> yup, already did that check
<TheDcoder[m]> same path
<TheDcoder[m]> Here is my gem env: https://bpa.st/KRVA
<havenwood> TheDcoder[m]: One last thought, the shebang of the asciidoctor-pdf gem might be off for some reason?
<havenwood> TheDcoder[m]: head -n1 /home/TheDcoder/.gem/ruby/2.7.0/bin/asciidoctor-pdf
<havenwood> TheDcoder[m]: If that's as expected, maybe try a: gem install asciidoctor-pdf --verbose --debug
<havenwood> TheDcoder[m]: Try moving the RubyGems bin path to the front of your PATH?
<havenwood> TheDcoder[m]: Does putting it first in PATH change anything?
<havenwood> export PATH="/home/TheDcoder/.gem/ruby/2.7.0/bin:$PATH"
<havenwood> TheDcoder[m]: I don't see anything wrong with your `gem env`, other than the possibility that the gem bin isn't in front—but I think you already established it was the right bin/asciidoctor-pdf.
<havenwood> TheDcoder[m]: I'm curious about the `--verbose --debug` output of an install attempt.
<TheDcoder[m]> Sorry, I had to be afk
<TheDcoder[m]> The shebang line: #!/usr/bin/ruby
<TheDcoder[m]> Should first uninstall the gem before installing it again?
<TheDcoder[m]> Changing the order of PATH didn't change anything
banisterfiend has quit [Ping timeout: 268 seconds]
<TheDcoder[m]> There are several Exceptions in the verbose output
<TheDcoder[m]> The output is exceeding 512 kilobytes, so no pastebin is accepting it
<TheDcoder[m]> havenwood: ^
coniptor has quit [Ping timeout: 246 seconds]
<havenwood> TheDcoder[m]: Yikes, that is a lot. I guess I should have just asked for --verbose, haha.
chouhoulis has quit [Remote host closed the connection]
<havenwood> TheDcoder[m]: Does it end in a? Successfully installed asciidoctor-pdf-1.5.3
<havenwood> 1 gem installed
coniptor has joined #ruby
maryo has joined #ruby
hiroaki has quit [Ping timeout: 240 seconds]
<TheDcoder[m]> Yup
<TheDcoder[m]> havenwood: Sorry, had to be away again
<havenwood> TheDcoder[m]: For sake of comparison, I just commented on your gist with a fresh: gem install asciidoctor-pdf --version 1.5.3 --verbose
<TheDcoder[m]> Your output is a lot cleaner
<havenwood> TheDcoder[m]: FWIW, I can't reproduce the issue with 2.7.2 on macOS.
<TheDcoder[m]> Yes, I think it might be something distro-specific
<havenwood> TheDcoder[m]: I didn't add the `--debug` flag.
<TheDcoder[m]> Ah, I see.
<havenwood> TheDcoder[m]: It does install 8 gems for me.
<havenwood> TheDcoder[m]: (And work.)
<havenwood> TheDcoder[m]: An aside, but jhass is the local archlinux expert and this is jhass's setup: https://gist.github.com/jhass/8839655bb038e829fba1
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<TheDcoder[m]> Sorry, looks like I got the count wrong, it says 18 gems installed
<TheDcoder[m]> Thanks, I will take a look
<havenwood> TheDcoder[m]: Others may spot the issue after New Years festivities. Good luck!
<TheDcoder[m]> jhass's setup seem to be geared towards developers, I just want to run asciidoctor
<havenwood> TheDcoder[m]: Ah, yeah, it is.
<havenwood> TheDcoder[m]: It should *just work* but clearly doesn't.
<TheDcoder[m]> havenwood: Thank you for the help, appreciate it, happy new year!
<havenwood> TheDcoder[m]: Happy New Year!
<TheDcoder[m]> Yeah, very strange, I'll ask around in the arch community.
drusepth has joined #ruby
<TheDcoder[m]> havenwood: Wow, I think the reinstall of the asciidoctor-pdf gem fixed the issue
<TheDcoder[m]> It is not giving me error anymore
<TheDcoder[m]> What's strange is that I tried reinstalling before but to no avail
orbyt_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
ruurd has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rudd0 has quit [Ping timeout: 246 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coniptor has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
coniptor has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
ChmEarl has quit [Quit: Leaving]
jenrzzz has joined #ruby
CoolerX has joined #ruby
<CoolerX> How do I pass a function to another function?
<CoolerX> [1, 2, 3].each(double)
<leftylink> note that using #each there, it will not be possible to mutate because integers are immutable. for the question as literally written, consider [1, 2, 3].map(&method(:double)). If it looks ugly, the block form is of course still viable
coniptor has quit [Ping timeout: 240 seconds]
<CoolerX> leftylink, I haven
<CoolerX> 't gotten that far in the tutorial
<CoolerX> what is &method ?
<CoolerX> is that getting the address of a method?
<leftylink> &ri Object#method
<leftylink> passing an argument prefixed with & means to call to_proc on it and pass it as a block
<leftylink> since context implies that it may be necessary, let me state now that the block form would potentially be [1, 2, 3].map { |x| double(x) }. preference will dictate whether that is preferable to &method(:double)
r34lp0w3r[m] has quit [Quit: Idle for 30+ days]
meinside has joined #ruby
<CoolerX> leftylink, is the last statement the return value?
<CoolerX> when you have a do end block
<CoolerX> is the last statement inside it the return value?
coniptor has joined #ruby
<leftylink> while it is true that the value of a block is the last expression evaluated, all participants are reminded that what is done with the value of a block is solely up to what calls the block - it might ignore it, use it unaltered, or do something else with it
<CoolerX> leftylink, [1, 2, 3].map { |x| double(x) } works but [1, 2, 3].map({ |x| double(x) }) doesn't work
<CoolerX> why?
<leftylink> any explanation I could give would inevitably be inferior to the documentation's explanation, so it would be immoral for me to do otherwise than to refer to the documentation. https://docs.ruby-lang.org/en/3.0.0/doc/syntax/calling_methods_rdoc.html
<CoolerX> leftylink, that says you can use paranthesis
<CoolerX> it's optional
<CoolerX> so why is this not valid? [1, 2, 3].map({ |x| double(x) })
<leftylink> great, but it also says and I quote
<leftylink> > There are three types of arguments when sending a message, the positional arguments, keyword (or named) arguments and the block argument.
<leftylink> > A block is sent to a method using do ... end or { ... }:
<leftylink> since the block is not positional arguments or keyword arguments, parentheses not valid.
<CoolerX> what message? who are we sending it to?
<CoolerX> is this about HTTP?
<CoolerX> I am talking about function calls
<leftylink> so am I
Rudd0 has joined #ruby
coniptor has quit [Ping timeout: 260 seconds]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
coniptor has joined #ruby
<phaul> There is a distinction between functions and methods. Ruby doesn't have functions, only methods (or traditional terminology - messages) sent to objects. All calls are called on an object with either the object.method syntax, or using implicit receiver which is self. so 'self.method' is the same as just 'method' (more or less). self is defined to point to an object in every context in ruby
<phaul> CoolerX: ^
jdeen_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<CoolerX> phaul, ok..
<CoolerX> are all those things methods?
<CoolerX> of Formula
<CoolerX> desc, stable, test
<CoolerX> depends_on
<phaul> they are method calls
<CoolerX> phaul, so all of those are self.test self.stable self.homepage
<CoolerX> NOT instance variables
<CoolerX> they are all methods of Formula
banisterfiend has joined #ruby
banisterfiend has quit [Changing host]
banisterfiend has joined #ruby
banisterfiend has quit [Ping timeout: 256 seconds]
coniptor has quit [Ping timeout: 264 seconds]
<phaul> that is correct. it's pretty much the same as this example:
<phaul> &>> class X; def self.foo(x); puts " - #{x} - "; end; end; class Y < X; foo 'bar'; end
<rubydoc> # => - bar -... check link for more (https://carc.in/#/r/a7ao)
<CoolerX> hmm I don't get it https://dpaste.org/KVQC
<CoolerX> changed the semicolon to comma
<CoolerX> still works exactly the same
<phaul> you are yielding 1 value on line 4. The block receives 2 arguments. (The block arguments are permissive in terms of arity, the call (line 4) and the receive (line 9) don't have to match. The second argument to the block is not filled in by the call, so it's just a new object with value nil. There is no connection with the object defined on line 7.
<CoolerX> phaul, so the semicolon is irrelvant?
<CoolerX> "You may also declare block-local arguments to a block using ; in the block arguments list. Assigning to a block-local argument will not override local arguments outside the block in the caller's scope:"
<CoolerX> hmm
<CoolerX> then why does it say to use semicolon?
coniptor has joined #ruby
<phaul> I think you first have to match the arity of the yield and the block. Then any additional local variables in the block can go after the semicolon
<phaul> That prevents accidentally using a local variable from the scope outside of the block.
<CoolerX> hmm
<CoolerX> I still don't understand why this doesn't work [1, 2, 3].map({ |x| double(x) })
<CoolerX> it works without the parenthesis
<CoolerX> [1, 2, 3].map { |x| double(x) }
<CoolerX> both cases we are passing a block argument to the map method of the array [1, 2, 3]
<phaul> it's simply a syntax thing. passing a block is special. It's not a normal thing wich can be proven by these statements: - you can only pass 1 block. - you can always pass a block regardless of the method. - the block is always passed last. etc. It's a sepcial thing not a first class value, so it makes sense that it has special syntax. thus passed outside of the parenthesis
<CoolerX> hmm
<CoolerX> phaul, this is still not working as expected https://dpaste.org/k16h
<CoolerX> it just ignores the argument "foo"
<CoolerX> is the arity still not matching?
<leftylink> well of course. you reassigned it immediately
<CoolerX> it should be 2 at both the sending and receiving end
<leftylink> so the foo is immediately overwritten with place
<leftylink> before saying "not as expected", it is customary to say what "expected" means
<CoolerX> oh right
m27frogy has joined #ruby
<leftylink> without such an act, not only can a program not be right, it cannot even be wrong
<CoolerX> wait it should have overridden the outside variable
<CoolerX> because there is no semicolon
<CoolerX> |obj, place| instead of |obj; place|
<CoolerX> why isn't it overwriting?
<leftylink> because there's a block-local variable named place?
<leftylink> it's right there in the block args list
<CoolerX> so it can never override the outside variables?
<CoolerX> then why do you need to put the semicolon? https://docs.ruby-lang.org/en/3.0.0/doc/syntax/calling_methods_rdoc.html#label-Block+Argument
<leftylink> again, I defer to that very page, which explains better than I can.
<leftylink> > Removing `; place` from the block arguments gives this result:
<CoolerX> leftylink, removing and replacing with comma right?
<leftylink> all participants are reminded not to put words in others' mouths
<CoolerX> without a comma it gives syntax error
<leftylink> to remove does not mean to remove and replace with something else
<CoolerX> |obj place| that?
<CoolerX> that gives a syntax error
<phaul> |obj| meaning: receives obj as the block argument. place when declared in the outside scope are carried over into the block or if place is not declared in the outside scope it can be declared in the block by assigning value to it.
<phaul> |obj, place| meaing: both obj and place are passed in by yield
<phaul> |obj; place| meaning: oobj is passed in by yield, place is block local even if it was declared in the outside scope
<CoolerX> phaul, I don't see the difference between |obj, place| and |obj; place|
<CoolerX> in both cases you can pass in 0, 1 or 2 arguments to yield
<CoolerX> in both cases it doesn't overwrite the outter "place" variable
dilated_dinosaur has joined #ruby
<CoolerX> actually you can pass in any number of args to yeild
<CoolerX> in both cases
<phaul> but you shouldn't Unfortunately yield is too permissive in terms of arity. But you should match the number of arguments to yield with the number of arguments to the block.
dilated_dinosaur has quit [Client Quit]
<CoolerX> phaul, sure but I am talking about the semicolon
dilated_dinosaur has joined #ruby
<CoolerX> both cases behave the same way
<CoolerX> using comma has the same effecct
<leftylink> &ri def f; yield(1, 2) end; f { |a; b| "thanks for passing me #{a}, by the way b is #{b}" }
<rubydoc> leftylink: Found no entry that matches method def
<phaul> no they don't . You just observe the same behaviour in your code
<leftylink> &>> def f; yield(1, 2) end; f { |a; b| "thanks for passing me #{a}, by the way b is #{b}" }
<rubydoc> # => "thanks for passing me 1, by the way b is " (https://carc.in/#/r/a7as)
<leftylink> makes the difference clear as day
<CoolerX> leftylink, why didn't it print 2?
<CoolerX> b is 2
<leftylink> no, if b is 2, it would have printed "b is 2"
<CoolerX> yeah
<CoolerX> why didn't it print b is 2?
<CoolerX> yield(1, 2) so you are passing in 1 as the 1st argument
<leftylink> why would it?
<CoolerX> and 2 as the 2nd argument
<CoolerX> so a = 1 and b = 2
<leftylink> but the block doens't take a second argument
<CoolerX> so why didn't it print that/
<leftylink> it takes one argument, a
<CoolerX> ?
<leftylink> there is no second argument to the block
<CoolerX> |a; b|
<CoolerX> that's 2 parameters
<leftylink> b is not an argument to the block.
<leftylink> b is a block-local variable.
<CoolerX> oh
<CoolerX> so is that same as |a| b = ''
<CoolerX> something like that?
<leftylink> I defer to an experiment-based approach, which will answer those questions far more effectively than I can
<CoolerX> {|a| b = nil ...}
<leftylink> hmm, I need to save that
pinkpandabot has joined #ruby
<leftylink> pinkpandabot: learn experiment I defer to an experiment-based approach, which will answer those questions far more effectively than I can
<pinkpandabot> Learned new fact experiment; 46 facts total
Technodrome has joined #ruby
<CoolerX> yeah it's nil
<CoolerX> line 28 is passing a keyword argument to the method depends_on of the class Formula
<CoolerX> right?
<CoolerX> we set the "gzip" key to the value :build which is a symbol
<leftylink> the function `def f(*args, **kwargs); puts "thanks for passing me the args #{args} and the kwargs #{kwargs}" end` will help you verify whether what you have said is true or not.
<CoolerX> and the depends_on method takes arbitrary keyword arguments
<CoolerX> that's why it can accept "gzip" as a key
<CoolerX> line 29 and 30 are just normal method calls with a single positional argument
<leftylink> actually I guess I was wrong. I suppose https://github.com/Homebrew/brew/blob/635ecbc58991d914f08daeac8df15452baaed21e/Library/Homebrew/formula.rb#L2562-L2564 is a better answer to that question. that is a little unfortunate for me, that I was wrong
<leftylink> in that case, the function `def f(arg); puts "thanks for passing me the arg #{arg} end` will enable the experiment-based approach to verify whether the above statements are true or false
<leftylink> ... I forgot a closing quote didn't I
<leftylink> in that case, the function `def f(arg); puts "thanks for passing me the arg #{arg}" end` will enable the experiment-based approach to verify whether the above statements are true or false
<CoolerX> is specs a global ?
<CoolerX> hmm
<CoolerX> I was expecting it to be an array since it has a .each
<CoolerX> I guess it is kind of?
<CoolerX> there's both an instance variable called specs
<CoolerX> and also a method called specs
banisterfiend has joined #ruby
_whitelogger has joined #ruby
coniptor has quit [Ping timeout: 240 seconds]
somazero has joined #ruby
coniptor has joined #ruby
banisterfiend has quit [Ping timeout: 268 seconds]
TCZ has joined #ruby
banisterfiend has joined #ruby
TCZ has quit [Client Quit]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has quit [Ping timeout: 256 seconds]
<CoolerX> don't we have to require Formula ?
<CoolerX> or require homebrew
dviola has joined #ruby
coniptor has quit [Ping timeout: 272 seconds]
ltp has quit [Ping timeout: 260 seconds]
cacheerror has quit [Quit: WeeChat 3.0]
CalimeroTeknik has quit [Ping timeout: 256 seconds]
CalimeroTeknik has joined #ruby
coniptor has joined #ruby
cd has joined #ruby
somazero has quit [Quit: Leaving]
dviola has left #ruby ["WeeChat 3.0"]
dviola has joined #ruby
banisterfiend has joined #ruby
orbyt_ has joined #ruby
Mia has quit [Read error: Connection reset by peer]
Mia has joined #ruby
Axy has joined #ruby
pwnd_sfw has quit [Ping timeout: 246 seconds]
Mia has quit [Ping timeout: 265 seconds]
pwnd_sfw has joined #ruby
storm_ has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Axy has quit [Read error: Connection reset by peer]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mia has joined #ruby
Mia has joined #ruby
GodFather has joined #ruby
GodFather_ has joined #ruby
demiurge is now known as e
ellcs has joined #ruby
ian| has joined #ruby
Technodrome has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maryo87 has joined #ruby
maryo has quit [Ping timeout: 246 seconds]
<panorain> hi :]
cow[moo] has joined #ruby
chouhoulis has joined #ruby
<phaul> hi panorain
chouhoulis has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
<adam12> panorain: morning!
roshanavand has joined #ruby
storm_ has quit [Remote host closed the connection]
storm_ has joined #ruby
al2o3-cr has quit [Quit: WeeChat 3.0]
maryo_87 has joined #ruby
banisterfiend has joined #ruby
maryo87 has quit [Ping timeout: 264 seconds]
storm_ has quit [Ping timeout: 256 seconds]
coniptor has quit [Ping timeout: 256 seconds]
TCZ has joined #ruby
elcuervo has quit [Read error: Connection reset by peer]
elcuervo has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coniptor has joined #ruby
priodev has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 264 seconds]
roshanavand1 has joined #ruby
CoolerX has quit [Ping timeout: 256 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand1 is now known as roshanavand
CoolerX has joined #ruby
ellcs has quit [Ping timeout: 268 seconds]
roshanavand has quit [Quit: roshanavand]
coniptor has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CoolerY has joined #ruby
GodFather_ has quit [Read error: Connection reset by peer]
GodFather has quit [Read error: No route to host]
CoolerX has quit [Ping timeout: 260 seconds]
CoolerZ has joined #ruby
coniptor has joined #ruby
CoolerY has quit [Ping timeout: 265 seconds]
TCZ has quit [Remote host closed the connection]
alextee has quit [Ping timeout: 240 seconds]
ellcs has joined #ruby
jidar has quit [Quit: brb, host upgrades]
GankMove has joined #ruby
alextee has joined #ruby
sgen has joined #ruby
sgen has quit [Quit: Leaving]
orbyt_ has joined #ruby
sgen has joined #ruby
ellcs has quit [Ping timeout: 258 seconds]
Fire-Dragon-DoL has joined #ruby
ChmEarl has joined #ruby
GankMove has quit [Read error: Connection reset by peer]
sgen has quit [Remote host closed the connection]
impermanence has joined #ruby
impermanence has quit [Client Quit]
impermanence has joined #ruby
storm_ has joined #ruby
maryo87 has joined #ruby
JohanP` has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maryo_87 has quit [Ping timeout: 256 seconds]
banisterfiend has joined #ruby
impermanence has quit [Quit: Connection closed]
jidar has joined #ruby
jidar has quit [Remote host closed the connection]
jidar has joined #ruby
orbyt_ has joined #ruby
JohanP has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather_ has joined #ruby
hiroaki has joined #ruby
GodFather has joined #ruby
storm_ has quit [Ping timeout: 246 seconds]
Technodrome has quit [Read error: Connection reset by peer]
bambanx has joined #ruby
fragment has joined #ruby
fragment has quit [Remote host closed the connection]
fragment has joined #ruby
BSaboia has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
brunosaboia_ has joined #ruby
brunosaboia_ has quit [Read error: Connection reset by peer]
brunosaboia_ has joined #ruby
brunosaboia_ has quit [Read error: Connection reset by peer]
brunosaboia_ has joined #ruby
brunosaboia_ has quit [Read error: Connection reset by peer]
brunosaboia_ has joined #ruby
brunosaboia_ has quit [Read error: Connection reset by peer]
brunosaboia__ has joined #ruby
brunosaboia__ has quit [Read error: Connection reset by peer]
brunosaboia__ has joined #ruby
brunosaboia__ has quit [Read error: Connection reset by peer]
brunosaboia__ has joined #ruby
coniptor has quit [Ping timeout: 256 seconds]
brunosaboia__ has quit [Read error: Connection reset by peer]
brunosaboia__ has joined #ruby
brunosaboia__ has quit [Read error: Connection reset by peer]
brunosaboia__ has joined #ruby
brunosaboia__ has quit [Read error: Connection reset by peer]
brunosaboia__ has joined #ruby
fragment has quit [Remote host closed the connection]
fragment has joined #ruby
duderonomy has joined #ruby
fragment has quit [Quit: fragment]
maryo87 has quit [Ping timeout: 265 seconds]
TCZ has joined #ruby
coniptor has joined #ruby
woodruffw has quit [Ping timeout: 256 seconds]
coniptor has quit [Read error: Connection reset by peer]
woodruffw has joined #ruby
woodruffw has quit [Changing host]
woodruffw has joined #ruby
roshanavand has joined #ruby
coniptor has joined #ruby
coniptor has quit [Ping timeout: 256 seconds]
coniptor has joined #ruby
factormystic4 has joined #ruby
factormystic has quit [Ping timeout: 268 seconds]
factormystic4 is now known as factormystic
factormystic has quit [Read error: Connection reset by peer]
factormystic has joined #ruby
woodruffw has quit [Ping timeout: 240 seconds]
woodruffw has joined #ruby
woodruffw has quit [Changing host]
woodruffw has joined #ruby
storm_ has joined #ruby
factormystic0 has joined #ruby
factormystic has quit [Ping timeout: 240 seconds]
factormystic0 is now known as factormystic
backnforth has joined #ruby
bambanx has quit [Ping timeout: 256 seconds]
backnforth has quit [Client Quit]
backnforth has joined #ruby
GankMove has joined #ruby
backnforth has quit [Quit: Connection closed]
Rudd0 has quit [Read error: Connection reset by peer]
GankMove has quit [Quit: GankMove]
woodruffw has quit [Ping timeout: 260 seconds]
woodruffw has joined #ruby
woodruffw has quit [Changing host]
woodruffw has joined #ruby
Rudd0 has joined #ruby
brunosaboia_ has joined #ruby
brunosaboia__ has quit [Ping timeout: 240 seconds]
prion has joined #ruby
coniptor has quit [Read error: Connection reset by peer]
CoolerZ has quit [Quit: Leaving]
coniptor has joined #ruby
roshanavand has quit [Ping timeout: 260 seconds]
cliluw has quit [Ping timeout: 272 seconds]
TCZ has quit [Quit: Wawel - Czujesz sie dobrze, czynisz dobrze]
brunosaboia_ has quit [Quit: This computer has gone to sleep]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
GankMove has joined #ruby
sy has joined #ruby
<sy> Hey everyone, first time dipping my toes into Ruby to install https://github.com/maxvoltar/photo-stream - struggling to get to the bundle install step, I've figured out I need a RVM and have installed it and added it to my path, then I've amended that command to be bundle install --path ~/.gem, but I'm receiving this output: https://dpaste.org/X63m
<sy> Any ideas on any extra preperation required or where I've fudged this up?
coniptor has quit [Ping timeout: 264 seconds]
coniptor has joined #ruby
<apotheon> Which command did you amend?
<apotheon> sy:
<sy> apotheon: bundle install, I added the --path flag
<apotheon> Why did you do that?
<sy> It was trying to install into the system directory, and I wanted it to be user only
<apotheon> Are you using the system Ruby or a Ruby installed by RVM?
<sy> The RVM one
impermanence has joined #ruby
<apotheon> Did you install RVM as the unprivileged user, or as root?
<sy> unprivileged
<apotheon> I haven't used RVM for a long time, but I'd expect RVM to install gems in the local RVM context instead of in a system directory.
<apotheon> Just for the sake of thoroughness . . .
<sy> Me too, not sure why it was trying to go system
<apotheon> Did you check ruby -v to see if you're using the Ruby version you think you're using?
<apotheon> (I basically switched to rbenv half a dozen years ago and didn't look back.)
dasher00 has quit [Ping timeout: 260 seconds]
<apotheon> Hmm.
<apotheon> Looking at the README leads me to believe the photo-stream devs never made sure this runs anywhere other than MacOS.
<apotheon> sy: Are you on MacOS?
<sy> Ah, nope, Alpine for me
<apotheon> I'm not sure how that would affect things when running bundle. In fact, I don't see anything in a gemfile that jumps out at me as something that would break gem installation on a Linux-based system.
<apotheon> There must be some kind of weird configuration situation with RVM, I guess.
<apotheon> Like I said, I haven't really dealt with RVM for about half a dozen years, so I'm not sure I have any help to offer at this point.
<sy> Hmm alright, I can start over
<sy> Thanks for trying anyway
<sy> And happy new year!
<apotheon> I hope you have a happy new year, too.
<sy> Thanks
postmodern has joined #ruby
storm_ has quit [Quit: Leaving]
prion has quit [Ping timeout: 265 seconds]
ian| has quit [Read error: Connection reset by peer]
ian| has joined #ruby
TCZ has joined #ruby
prion has joined #ruby
cliluw has joined #ruby