havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.6, 3.0.0-preview-1: 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!
elxbarbosa has joined #ruby
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
chouhoulis has quit [Remote host closed the connection]
Rudd0 has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
TCZ has quit [Quit: Leaving]
KnownSyntax has quit [Ping timeout: 240 seconds]
JayDoubleu has quit [Read error: Connection reset by peer]
KnownSyntax has joined #ruby
JayDoubleu has joined #ruby
bamdad_ has quit [Remote host closed the connection]
nyuszika7h_ has joined #ruby
nyuszika7h has quit [Killed (adams.freenode.net (Nickname regained by services))]
nyuszika7h_ is now known as nyuszika7h
claw23 has joined #ruby
netwoodle has joined #ruby
alexherbo2 has quit [Ping timeout: 264 seconds]
elxbarbosa has quit [Remote host closed the connection]
Net has quit [Ping timeout: 256 seconds]
Fusl has quit [*.net *.split]
Rush__ has quit [*.net *.split]
Querens_ has quit [*.net *.split]
noodle has quit [*.net *.split]
ghormoon_ has quit [*.net *.split]
Tuor has quit [*.net *.split]
Kilo`byte has quit [*.net *.split]
claw has quit [*.net *.split]
spectra has quit [*.net *.split]
netwoodle is now known as noodle
Net has joined #ruby
Fusl has joined #ruby
impermanence has quit [Quit: Connection closed]
duderonomy has joined #ruby
trevoke has quit [Quit: ERC (IRC client for Emacs 27.1)]
shoshin has joined #ruby
budonyc has joined #ruby
ChmEarl has quit [Quit: Leaving]
CrazyEddy has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
_whitelogger has joined #ruby
szechyjs has joined #ruby
budonyc has quit [Quit: Leaving]
_whitelogger has joined #ruby
Rudd0 has joined #ruby
elcuervo has quit [Read error: Connection reset by peer]
szechyjs has left #ruby ["Textual IRC Client: www.textualapp.com"]
elcuervo has joined #ruby
ur5us has joined #ruby
ruby-lang294 has joined #ruby
ruby-lang294 has quit [Client Quit]
davispuhh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
znz_jp has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
howdoi has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
_whitelogger has joined #ruby
mnathani_ has joined #ruby
mnathani has quit [Ping timeout: 240 seconds]
mnathani has joined #ruby
cd has quit [Quit: cd]
mnathani_ has quit [Ping timeout: 240 seconds]
mnathani_ has joined #ruby
mnathani has quit [Ping timeout: 264 seconds]
mnathani has joined #ruby
mnathani_ has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
kozowu has quit [Ping timeout: 240 seconds]
afisher has quit [Ping timeout: 256 seconds]
r3my has quit [Read error: Connection reset by peer]
kozowu has joined #ruby
r3my has joined #ruby
afisher has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
ur5us has joined #ruby
Mia has joined #ruby
chouhoulis has quit [Remote host closed the connection]
akem has quit [Quit: Leaving]
Tuor has joined #ruby
Rush__ has joined #ruby
ghormoon_ has joined #ruby
Querens_ has joined #ruby
spectra has joined #ruby
Kilo`byte has joined #ruby
ghormoon_ has quit [Max SendQ exceeded]
ghormoon has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
BSaboia has joined #ruby
akem has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zapata has quit [Quit: WeeChat 2.9]
cnsvc has quit [Ping timeout: 240 seconds]
Rudd0 has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 244 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rudd0 has joined #ruby
Technodrome has joined #ruby
shwouchk has joined #ruby
markin has quit [Read error: Connection reset by peer]
markin has joined #ruby
schne1der has joined #ruby
fowl has quit [Read error: Connection reset by peer]
d0liver has quit [Read error: Connection reset by peer]
timwis has quit [Ping timeout: 258 seconds]
fowl has joined #ruby
imode has quit [Ping timeout: 272 seconds]
timwis has joined #ruby
d0liver has joined #ruby
alexherbo24 has joined #ruby
chouhoulis has joined #ruby
alexherbo24 is now known as alexherbo2
chouhoulis has quit [Ping timeout: 260 seconds]
markin has quit [Ping timeout: 240 seconds]
Mutsuhito has quit [Ping timeout: 272 seconds]
markin has joined #ruby
Mutsuhito has joined #ruby
itok has quit [Ping timeout: 272 seconds]
schne1der has quit [Ping timeout: 260 seconds]
itok has joined #ruby
markin has quit [Ping timeout: 272 seconds]
coffeejunk has quit [Ping timeout: 272 seconds]
maxmanders has quit [Ping timeout: 246 seconds]
en10n has quit [Ping timeout: 272 seconds]
coffeejunk has joined #ruby
markin has joined #ruby
maxmanders has joined #ruby
en10n has joined #ruby
banisterfiend has joined #ruby
alfiemax has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
TCZ has joined #ruby
lxsameer has joined #ruby
schne1der has joined #ruby
LtHummus has quit [Ping timeout: 272 seconds]
cd has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Remote host closed the connection]
duderonomy has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has joined #ruby
shwouchk has quit [Quit: Connection closed for inactivity]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
TCZ has quit [Quit: Leaving]
akem has quit [Ping timeout: 258 seconds]
banisterfiend has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
queip has joined #ruby
chouhoulis has joined #ruby
akem has joined #ruby
alexherbo2 has quit [Ping timeout: 246 seconds]
brunosaboia_ has joined #ruby
BSaboia has quit [Ping timeout: 246 seconds]
brunosaboia_ has quit [Quit: Leaving]
gitter1234 has joined #ruby
<gitter1234> Hi, my Rails project has a seeds.rb file that loads other seed files: `Dir[File.join(Rails.root, "db", "seeds", "*.rb")].sort.each { |seed| load seed }`
<gitter1234> However `rails db:seed` also seems to be running my one and only Rake task (`rails import:data`). Does this seeds.rb file look like the culprit?
banisterfiend has joined #ruby
yxhuvud has quit [Remote host closed the connection]
<gitter1234> Nvm, deleting the Rake task doesn't seem to make any difference. Strange.
alexherbo2 has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yxhuvud has joined #ruby
<gitter1234> The seeds.rb seems to be the culprit after all. Combining all the db/seeds/* files into db/seeds.rb fixes the issue after all. Whether or not the lib/tasks file is present or not. Even stranger!
BTRE has quit [Remote host closed the connection]
<gitter1234> Nvm, huge misunderstanding. Sorry!
TCZ has joined #ruby
LtHummus has joined #ruby
BTRE has joined #ruby
ChmEarl has joined #ruby
yokel has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
TCZ has quit [Quit: Leaving]
thisirs has joined #ruby
Rudd0 has quit [Ping timeout: 264 seconds]
Mikaela has quit [Quit: Mikaela]
Mikaela has joined #ruby
zapata has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
Rudd0 has joined #ruby
gitter1234 has quit [Quit: Connection closed for inactivity]
va5c0 has joined #ruby
va5c0 has quit [Client Quit]
elcuervo has quit [Ping timeout: 240 seconds]
mozzarella has quit [Read error: Connection reset by peer]
elcuervo has joined #ruby
cuerbot has joined #ruby
elcuervo has quit [Read error: Connection reset by peer]
Rudd0^ has joined #ruby
Rudd0 has quit [Ping timeout: 240 seconds]
va5c0 has joined #ruby
Guest89 has joined #ruby
<Guest89> https://vidtomp3.download for free mp3 downloads from youtube
Guest89 has left #ruby [#ruby]
Rudd0^ has quit [Ping timeout: 256 seconds]
Rudd0 has joined #ruby
va5c0 has quit [Quit: WeeChat 2.9]
Rudd0^ has joined #ruby
Rudd0 has quit [Ping timeout: 246 seconds]
<havenwood> !spam Guest89
yokel has joined #ruby
scrote has joined #ruby
<scrote> hi
<havenwood> scrote: hi
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<scrote> Why is a fresh install of a gem being tmuxinator looking for an old version of ruby? http://codepad.org/AtkbJpyT
<havenwood> scrote: What's the correct shebang there?: command -v ruby
<havenwood> scrote: You could probably bypass the issue by using `/usr/bin/env ruby` with: gem install tmuxinator --env-shebang
<scrote> ruby -v --> ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux] # Is that what you're asking?
<havenwood> scrote: No, I mean: command -v ruby
<havenwood> scrote: (The location of the `ruby` binary.)
<scrote> /usr/bin/ruby
<havenwood> scrote: Ah, so it's the 24 suffix borking things
<havenwood> scrote: gem install tmuxinator --env-shebang
<havenwood> scrote: Good question why the Ruby binary path has an errant `24` on the end for gem shebang lines.
<havenwood> scrote: Using `--eng-shebang` is one soluiton, or create a symbolic link with `ln -s` so `ruby24` points to `ruby`.
<havenwood> scrote: You can set `gem: --env-shebang` in your .gemrc to save the setting.
<havenwood> ~/.gemrc
Rudd0^ has quit [Ping timeout: 240 seconds]
gix- has quit [Ping timeout: 256 seconds]
gix has joined #ruby
<havenwood> scrote: Did that work?
<scrote> --env-shebang didn't work, but I just changed the shebang in /usr/local/bin/tmuxinator
<scrote> but thanks for the insight
<scrote> I don't have a ~/.gemrc
<scrote> thank you
imode has joined #ruby
thisirs has quit [Ping timeout: 272 seconds]
ellcs1 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Remote host closed the connection]
Swyper has quit []
alexherbo28 has joined #ruby
alexherbo2 has quit [Ping timeout: 256 seconds]
alexherbo28 is now known as alexherbo2
iamnix has joined #ruby
orbyt_ has joined #ruby
iamnix has quit [Client Quit]
lxsameer has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
_whitelogger has joined #ruby
stonerl has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
alexherbo2 has quit [Ping timeout: 240 seconds]
stonerl has joined #ruby
TCZ has joined #ruby
ur5us has joined #ruby
elxbarbosa has joined #ruby
smotchkkiss has joined #ruby
jenrzzz has joined #ruby
ellcs1 has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
alfiemax has joined #ruby
elxbarbosa has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
dualfade has quit [Ping timeout: 256 seconds]
elcontrastador has joined #ruby
vqrs has quit [Ping timeout: 240 seconds]
dualfade has joined #ruby
vqrs has joined #ruby
smotchkkiss has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nsaunders has joined #ruby
nsaunders has left #ruby [#ruby]
smotchkkiss has joined #ruby
TCZ has quit [Quit: Leaving]
smotchkkiss has quit [Ping timeout: 272 seconds]
Technodrome has joined #ruby
BTRE has quit [Ping timeout: 256 seconds]
BTRE has joined #ruby
howdoi has joined #ruby
TCZ has joined #ruby
Swyper has joined #ruby
jenrzzz has joined #ruby
Rudd0 has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
WQX has joined #ruby
^Sauvin^ is now known as Sauvin
dviola has joined #ruby
elxbarbosa has joined #ruby
<WQX> Hello, could someone please answer me a question, I'm implementing Simpson's adptative method to numerically calculate the erf(x) function, but I'm having problems implementing a recursive call counter, every time I use the counter in the code it induces an error in the response, but for some reason removing the recursive call counter the code returns the correct value of erf(x), the code is attached http://pastie.org/p/1m3ZLmt0aw1sh4Q6dX9
<WQX> DYM
akem_ has joined #ruby
akem has quit [Ping timeout: 240 seconds]
<leftylink> sha256sum 50cbecf0607a15b8b707c42b891a9728492ff0c32ffd9755be1dbc66c1421743
<leftylink> change line 40 to just `p simpson_adaptief(a, b, 0)` and you'll see a big problem.
<leftylink> or another way I would phrase this problem is "a strictly-typed langauge would have questions for you about how you did simpson_adaptief"
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
<leftylink> you have made a necessary change in a few places to add what is presumably a counter, but didn't make the same change elsewhere
<WQX> sorry I did not understand? is that I'm still new to ruby
<leftylink> what was the result of you running the experiment I asked you to do.
<leftylink> I said to change line 40 to `p simpson_adaptief(a, b, 0)`. what happens when you do that?
<leftylink> you will easily see a big problem.
<WQX> yes, I saw
<leftylink> so hopefully you see what isn't expected about that result. so now is the time to figure out how that happened
<WQX> this error appears: "undefined local variable or method `count' for main:Object (NameError)"
<leftylink> no, don't care about that
<leftylink> I care about the result of `simpson_adaptief(a, b, 0)`.
<leftylink> fine, if you care about that, leave line 40 as is, and ADD a line that says `p simpson_adaptief(a, b, 0)`
<WQX> right, what would be the next step? and what does this p mean before the simpson_adaptief function (a, b, 0)?
<leftylink> &ri Kernel#p
<leftylink> so, you look at the output of `p simpson_adaptief(a, b, 0)`, and you see how it doesn't match your expectations.
<WQX> right
<WQX> so how do i get the real value of recursive calls? I was thinking there were 10 but actually it is a much larger number
<WQX> thanks rubydoc
<leftylink> okay, we can talk about that instead too. if additionally you have specific questions about the result of the `p simpson_adaptief(a, b, 0)`, such as "I expected the result to have property X, but instead it has property Y", I would answer those as well
<leftylink> so supposedly the current strategy is passing in the counter that starts at 0 and each callee reports to its caller how many calls it's made
<leftylink> oh wait, no, I phrased that wrong
<WQX> I also don't understand what is inducing such a big difference between the real and the estimated resolution?
<leftylink> we are talking about the total number of calls, not the depth of the call stack?
<leftylink> yes, there is a big difference. I already said that `p simpson_adaptief(a, b, 0)` will show you something completely unexpected, but you ahve yet to articulate that, so I really can't proceed until I get an answer on that
<WQX> total number of calls
<WQX> I understand, is that I still can't find a way to solve this, I'm a newbie in ruby ​​so I don't know how to proceed
<WQX> but I know that if I remove the recursive call the result is right
<leftylink> so that narrows down where the problem could be coming from
<WQX> the problem is on line 34?
jenrzzz has joined #ruby
<leftylink> well. although it's certainly true that removing the `, i` from line 34 will cause the computed result to be correct, I think the premise is that the intent is for the code to operate correctly even with that particular addition to line 34. So then we ask ourselves. which other lines have to deal with that addition to line 34. there's line 40. and there's line ... ?
<WQX> 32?
<leftylink> so, how does line 32 handle line 34.
jenrzzz has quit [Ping timeout: 240 seconds]
<WQX> "i" it is incremented each time the simpson_adaptief (a, b, i) function is called
<WQX> function simpson_adaptief(a, b, i) expand the function simpson(a, b, n) in tree shape, I think
<WQX> it's the only relationship I can imagine
ur5us has quit [Ping timeout: 240 seconds]
<leftylink> what does simpson_adaptief return, and how will line 32 handle that? feel free to use `puts simpson_adaptief(a, b, 0).class` to answer this question.
<WQX> I think I understand, line 32 should receive two numbers, but in fact it is generating an array with much more than two parameters
<leftylink> &ri Array#+
schne1der has quit [Ping timeout: 272 seconds]
<WQX> in this case, in line 32 am I concatenating 2 matrices?
elxbarbosa has quit [Ping timeout: 272 seconds]
<leftylink> a reminder that `puts simpson_adaptief(a, b, 0).class` (or variants of using Object#class) will help answer that question.