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
coniptor has quit [Ping timeout: 260 seconds]
coniptor has joined #ruby
ur5us has joined #ruby
kenichi has quit [Remote host closed the connection]
kenichi has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
cthu| has quit [Ping timeout: 246 seconds]
neonloop has quit [Quit: Bridge terminating on SIGTERM]
rzjian has joined #ruby
V[excess] is now known as ^
m27frogy_ has joined #ruby
roshanavand1 has joined #ruby
neonloop has joined #ruby
gdonald has quit [Quit: leaving]
roshanavand has quit [Read error: Connection reset by peer]
m27frogy has quit [Ping timeout: 256 seconds]
roshanavand1 is now known as roshanavand
gueorgui_ has quit [Ping timeout: 256 seconds]
gueorgui_ has joined #ruby
prepend has quit [Ping timeout: 256 seconds]
gdonald has joined #ruby
Rudd0 has quit [Ping timeout: 260 seconds]
Gizmokid2005 has joined #ruby
<Gizmokid2005> I'm trying to track down a weird ruby issue if anyone has any ideas. Today on multiple machines and different distros (centos and ubuntu via wsl), I've started getting a very cryptic SSL error with ruby and so far haven't been able to track it down. Any suggestions would be appreciated. https://i.imgur.com/ssXpZGZ.png -- the code I'm calling is pretty simple, here: https://github.com/Gizmokid2005/
<Gizmokid2005> https://github.com/Gizmokid2005/swissircbot/blob/master/plugins/shorten.rb <-- got cut off whoops. Running Ruby 2.6.6
hassox has quit [Quit: Leaving...]
coniptor has quit [Ping timeout: 246 seconds]
hassox has joined #ruby
roshanavand has quit [Ping timeout: 265 seconds]
coniptor has joined #ruby
ur5us has joined #ruby
weaksauce has joined #ruby
pwnd_sfw8 has joined #ruby
baojg has joined #ruby
pwnd_sfw has quit [Ping timeout: 265 seconds]
pwnd_sfw8 is now known as pwnd_sfw
Gizmokid2005 has quit [Quit: Uh-oh!! The Gizmo is gone!!!! Good Riddance.]
Gizmokid2005 has joined #ruby
roshanavand has joined #ruby
evdubs has joined #ruby
<quazimodo> havenwood: how's the tooling, does it identify type issues pretty well?
<havenwood> quazimodo: I'd say the tooling is nice but not there yet. I think typeprof seems promising and the interactive site is super cool, but it doesn't handle everything yet. I do like steep a ton, but also a work in progress and needs more docs and examples.
* havenwood quazimodo: Have you tried? https://mame.github.io/typeprof-playground/
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Mia has quit [Ping timeout: 246 seconds]
elcuervo has joined #ruby
roshanavand has quit [Ping timeout: 264 seconds]
cuerbot has quit [Ping timeout: 264 seconds]
FizzyTidus has joined #ruby
FizzyTidus has quit [Read error: Connection reset by peer]
<quazimodo> havenwood: haven't had a chance. I'm actually super curious to see how it handles things like immutable types (even if the data is implemented in a mutable way) and also higher order types, generics, etc
<quazimodo> i never want to work with untyped business code again
maryo_87 has joined #ruby
akem has joined #ruby
akem has quit [Remote host closed the connection]
akem has joined #ruby
Scient has joined #ruby
xco has joined #ruby
ur5us_ has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
Technodrome has joined #ruby
duderonomy has joined #ruby
baojg has quit [Remote host closed the connection]
Rudd0 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
viporli has joined #ruby
akem has quit [Ping timeout: 260 seconds]
viporli has quit [Remote host closed the connection]
Nahra has joined #ruby
ChmEarl has quit [Quit: Leaving]
gix- has joined #ruby
gix has quit [Disconnected by services]
Rounin has joined #ruby
akem has joined #ruby
coniptor has quit [Ping timeout: 240 seconds]
rzjian has quit [Ping timeout: 256 seconds]
rzjian has joined #ruby
coniptor has joined #ruby
m27frogy_ has quit [Ping timeout: 260 seconds]
Nahra has quit [Quit: leaving]
rf` is now known as envex
maryo87 has joined #ruby
viporli has joined #ruby
akem has quit [Read error: Connection reset by peer]
Mia has joined #ruby
maryo_87 has quit [Ping timeout: 256 seconds]
Axy has quit [Ping timeout: 256 seconds]
rzjian has quit [Ping timeout: 265 seconds]
xco has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
xco has joined #ruby
Mia has quit [Read error: Connection reset by peer]
Mia has joined #ruby
rzjian has joined #ruby
Mia has quit [Read error: Connection reset by peer]
alexherbo2 has quit [Ping timeout: 260 seconds]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
baojg has joined #ruby
viporli has quit [Quit: Leaving]
akem has joined #ruby
_whitelogger has joined #ruby
jenrzzz has joined #ruby
maryo_87 has joined #ruby
GodFather has quit [Ping timeout: 264 seconds]
maryo87 has quit [Ping timeout: 256 seconds]
GodFather has joined #ruby
coniptor has quit [Ping timeout: 264 seconds]
ur5us_ has quit [Ping timeout: 256 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coniptor has joined #ruby
nofxx__ has quit [Read error: Connection reset by peer]
nofxx__ has joined #ruby
Spectari has joined #ruby
Spectari has quit [Quit: Leaving]
ua has quit [Ping timeout: 256 seconds]
ua has joined #ruby
ua has quit [Max SendQ exceeded]
coniptor has quit [Ping timeout: 265 seconds]
coniptor has joined #ruby
schaerli_ has joined #ruby
teclator has quit [Remote host closed the connection]
lxneef has joined #ruby
teclator has joined #ruby
teclator has quit [Ping timeout: 256 seconds]
teclator has joined #ruby
fercell has joined #ruby
vondruch has joined #ruby
jinie has quit [Quit: ZNC 1.8.2 - https://znc.in]
jinie has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
Glumetu has joined #ruby
lightstalker has quit [Ping timeout: 272 seconds]
lightstalker has joined #ruby
Azure has quit [Ping timeout: 256 seconds]
memcorrupt has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
gix has joined #ruby
schne1der has joined #ruby
pwnd_sfw4 has joined #ruby
memcorrupt has quit [Client Quit]
jenrzzz has joined #ruby
jinie_ has joined #ruby
Scientz has joined #ruby
dinfuehr_ has joined #ruby
Azure has joined #ruby
jinie has quit [Ping timeout: 256 seconds]
gix- has quit [Ping timeout: 256 seconds]
Scient has quit [Ping timeout: 256 seconds]
moldorcoder7 has quit [Ping timeout: 256 seconds]
dinfuehr has quit [Ping timeout: 256 seconds]
pwnd_sfw has quit [Read error: Connection reset by peer]
Rudd0 has quit [Ping timeout: 256 seconds]
Scientz is now known as Scient
pwnd_sfw4 is now known as pwnd_sfw
xco has quit [Ping timeout: 256 seconds]
dhollinger has quit [Ping timeout: 256 seconds]
moldorcoder7 has joined #ruby
Rudd0 has joined #ruby
dhollinger has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
Guest60400 is now known as balo
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
kristian_on_linu has joined #ruby
jenrzzz has joined #ruby
ua has joined #ruby
phaul has quit [Ping timeout: 246 seconds]
rubydoc has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
phaul has joined #ruby
rubydoc has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
universa1 has quit [Quit: ZNC 1.6.1+deb1~ubuntu14.04.0 - http://znc.in]
jenrzzz has joined #ruby
universa1 has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
baojg has quit [Remote host closed the connection]
coniptor has quit [Ping timeout: 265 seconds]
baojg has joined #ruby
viporli has joined #ruby
fulf has joined #ruby
coniptor has joined #ruby
akem has quit [Ping timeout: 272 seconds]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
jl4 has joined #ruby
duderonomy has joined #ruby
gix has quit [Ping timeout: 265 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kristian_on_linu has quit [Remote host closed the connection]
yogeshs has joined #ruby
rzjian has quit [Ping timeout: 265 seconds]
<yogeshs> in ruby how to pass argument to function by reference
<yogeshs> ?
<yogeshs> @Azure
<yogeshs> Anybody pls?
fulf has quit [Quit: Ping timeout (120 seconds)]
fulf has joined #ruby
<yogeshs> hello
<surrounder> yogeshs: if someone knows you'll get an answer, be patient
<yogeshs> ok @surrounder
<leftylink> as far as I know, *everything* is passed by reference. of course, some objects are immutable so this doesn't help, and also you have no power to change to bindings if your caller, but you can mutate any mutable objects passed to you.
<leftylink> ugh
<leftylink> s/change to bindings if/change the bindings of/
Technodrome has joined #ruby
<leftylink> > you have no power to change the bindings of your caller
<leftylink> well... unless you do something particularly nasty
<leftylink> &>> def a(&b); p b.binding.local_variable_set(:x, 777) end; x = 555; a{}; x
<rubydoc> # => 777... check link for more (https://carc.in/#/r/aa40)
<leftylink> and then suddenly you changed the bindings of your caller
<leftylink> only a little nasty
<leftylink> oh wait, I did an extra p didn't I
<leftylink> &>> def a(&b);b.binding.local_variable_set(:x, 777) end; x = 555; a{}; x
<rubydoc> # => 777 (https://carc.in/#/r/aa41)
Nahra has joined #ruby
aphel has quit []
aphel has joined #ruby
<leftylink> as I noted, without something nasty like that you have no power to change the bindings of your caller, so it is safest to say that all arguments are references that are passed by value.
<leftylink> if one wishes to achieve a certain goal, one should state what that goal is without presuming what the mechanism to achieve that goal is (e.g. if that goal is to be achieved by passing by reference)
jenrzzz has quit [Ping timeout: 246 seconds]
<leftylink> hmm I just realised, this is the first timee I've seen that particular syntax ambiguity... when one sees the code a {}, has that passed an empty hash or a do-nothing block? from the behaviour of the above we now know it's the latter, but how could Ruby know? I guess it just has to pick one
<leftylink> weird huh!
vondruch has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
TomyWork has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
baojg has quit [Remote host closed the connection]
jl4 has quit [Ping timeout: 240 seconds]
jl4 has joined #ruby
linoge has joined #ruby
m27frogy has joined #ruby
linoge has quit [Read error: Connection reset by peer]
linoge has joined #ruby
jl4 has quit [Ping timeout: 240 seconds]
tw1sted_ has quit [Ping timeout: 240 seconds]
schaerli_ has quit [Ping timeout: 265 seconds]
tw1sted has joined #ruby
schaerli has joined #ruby
BSaboia has joined #ruby
cd has joined #ruby
Guest11553 has quit [Remote host closed the connection]
<pwnd_sfw> You can probably look to see
<pwnd_sfw> Thinking about it, I wouldn't know where to start lol
yogeshs has quit [Quit: Leaving]
fercell has quit [Ping timeout: 246 seconds]
<prion> what's a good symbol for the number of arguments of the currently executing function
<prion> that's always in scope
<prion> like $# or something
vondruch has joined #ruby
<prion> oops wrong channel
jenrzzz has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
rzjian has joined #ruby
ua has quit [Ping timeout: 256 seconds]
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
jeromelanteri has joined #ruby
ua has joined #ruby
weaksauce has quit [Remote host closed the connection]
viporli has quit [Ping timeout: 272 seconds]
fulf has quit [Quit: Ping timeout (120 seconds)]
vondruch has quit [Ping timeout: 256 seconds]
wald0 has joined #ruby
<wald0> this maybe is not so related to bash, but how i can convert a number into steps? like if i have get the result 127, transform it to 130, or 124 to 120
stryek has joined #ruby
elcuervo has quit [Read error: Connection reset by peer]
elcuervo has joined #ruby
maryo_87 has quit [Ping timeout: 272 seconds]
xf3rno has quit [Quit: WeeChat 2.8]
Technodrome has joined #ruby
<leftylink> perhaps such a thing might be achieved in three steps. divide, round, multiply
<al2o3-cr> &>> [127, 124].map { |n| n.round(-1) } # wald0 nearest 10; -2 nearest 100 and so on
<rubydoc> # => [130, 120] (https://carc.in/#/r/aa4z)
FizzyTidus has joined #ruby
akem has joined #ruby
ruurd has quit [Quit: bye folks]
duderonomy has joined #ruby
akem has quit [Ping timeout: 265 seconds]
FizzyTidus has quit [Ping timeout: 256 seconds]
akem has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jinie_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
jinie has joined #ruby
CrazyEddy has joined #ruby
totoro2021 has quit [Read error: Connection reset by peer]
totoro2021 has joined #ruby
<nyuszika7h> I'm getting an error with a Rails migration that is making no sense
<nyuszika7h> ActiveRecord::MismatchedForeignKey: Column `user_id` on table `tasks` does not match column `id` on `users`, which has type `int(11)`. To resolve this issue, change the type of the `user_id` column on `tasks` to be :integer. (For example `t.integer :user_id`).
<nyuszika7h> both of the keys are int(11), and the same migration worked fine before, but refuses to work in a new environment with the same Ruby and Rails version
<nyuszika7h> t.references :user, :type => 'int(11)', :foreign_key => true, :null => false
<nyuszika7h> full error: https://pastebin.com/raw/1UHpQRup
<ruby[bot]> nyuszika7h: 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
<nyuszika7h> go away bot I used raw
akem has quit [Remote host closed the connection]
BSaboia has quit [Quit: This computer has gone to sleep]
akem has joined #ruby
schaerli_ has joined #ruby
maryo_87 has joined #ruby
maryo_87 has quit [Max SendQ exceeded]
maryo_87 has joined #ruby
schaerli has quit [Ping timeout: 246 seconds]
maryo_87 has quit [Max SendQ exceeded]
maryo_87 has joined #ruby
jenrzzz has joined #ruby
maryo_87 has quit [Max SendQ exceeded]
maryo_87 has joined #ruby
<nyuszika7h> yep, found the issue
<nyuszika7h> already in meantime
<nyuszika7h> that's exactly it
<nyuszika7h> responsibilities table didn't exist in my case
jenrzzz has quit [Ping timeout: 265 seconds]
vondruch has joined #ruby
BSaboia has joined #ruby
<nyuszika7h> I see Rails 5.x is security fix only, no idea if they fixed that in Rails 6 but we aren't ready to update another major version in production rn
<nyuszika7h> but anyway I fixed the migrations and it's working fine now
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akem has quit [Remote host closed the connection]
akem has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
dfucci has joined #ruby
wald0 has quit [Quit: Lost terminal]
jl4 has joined #ruby
Glumetu has left #ruby [#ruby]
ChmEarl has joined #ruby
rzjian has quit [Ping timeout: 256 seconds]
cthu| has joined #ruby
schaerli_ has quit [Ping timeout: 265 seconds]
dfucci has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
akem has quit [Remote host closed the connection]
akem has joined #ruby
pwnd_sfw has quit [Ping timeout: 240 seconds]
moldorcoder7 has quit [Quit: %bye mirc%]
moldorcoder7 has joined #ruby
pwnd_sfw has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
coniptor has quit [Ping timeout: 256 seconds]
schne1der has quit [Quit: schne1der]
coniptor has joined #ruby
weaksauce has joined #ruby
dfucci has joined #ruby
Technodrome has joined #ruby
dfucci has quit [Ping timeout: 265 seconds]
jl4 has quit [Ping timeout: 246 seconds]
jl4 has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 260 seconds]
roshanavand has joined #ruby
TomyWork has quit [Remote host closed the connection]
bvdw has quit [Quit: The Lounge - https://thelounge.chat]
bvdw has joined #ruby
dfucci has joined #ruby
maryo87 has joined #ruby
maryo87 has quit [Max SendQ exceeded]
maryo87 has joined #ruby
maryo_87 has quit [Ping timeout: 265 seconds]
dfucci has quit [Ping timeout: 256 seconds]
coniptor has quit [Ping timeout: 246 seconds]
coniptor has joined #ruby
maryo87 has quit [Read error: Connection reset by peer]
maryo87 has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
summerisle has quit [Quit: In my vision, I was on the veranda of a vast estate, a palazzo of some fantastic proportion.]
summerisle has joined #ruby
jl4 has quit [Ping timeout: 256 seconds]
maryo87 has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
Emmanuel_Chanel has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 256 seconds]
al2o3-cr has quit [Ping timeout: 256 seconds]
Deesl has joined #ruby
Rudd0 has quit [Ping timeout: 265 seconds]
Deesl has quit [Quit: Textual IRC Client: www.textualapp.com]
gix has joined #ruby
FastJack has quit [Ping timeout: 246 seconds]
FastJack has joined #ruby
pwnd_sfw5 has joined #ruby
pwnd_sfw has quit [Ping timeout: 240 seconds]
pwnd_sfw5 is now known as pwnd_sfw
dfucci has joined #ruby
ur5us_ has joined #ruby
dfucci has quit [Ping timeout: 265 seconds]
pwnd_sfw has quit [Ping timeout: 256 seconds]
pwnd_sfw has joined #ruby
kinduff[m] has joined #ruby
duderonomy has joined #ruby
coniptor has quit [Read error: Connection reset by peer]
jl4 has joined #ruby
coniptor has joined #ruby
jl4 has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
jerome___ has joined #ruby
cuerbot has joined #ruby
elcuervo has quit [Ping timeout: 256 seconds]
totoro2021 has quit [Ping timeout: 256 seconds]
roshanavand has joined #ruby
totoro2021 has joined #ruby
jeromelanteri has quit [Ping timeout: 256 seconds]
jl4 has joined #ruby
jl4 has quit [Ping timeout: 246 seconds]
al2o3-cr has joined #ruby
GodFather has quit [Ping timeout: 256 seconds]
linoge has quit [Remote host closed the connection]
coniptor has quit [Ping timeout: 246 seconds]
dhollinger has quit [Read error: Connection reset by peer]
dhollinger has joined #ruby
coniptor has joined #ruby
dfucci has joined #ruby
Rounin has quit [Ping timeout: 265 seconds]
prestorium has joined #ruby
Rudd0 has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
dnadev2 has joined #ruby
al2o3-cr-tmp has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
<dnadev2> hi - question about updating certain attributes on the fly, ie: foo.[something ~dynamic here] https://dpaste.org/Fvok
chouhoulis has quit [Remote host closed the connection]
dfucci has joined #ruby
<havenwood> dnadev2: What do you mean this to do?: foo."#{i[0]}" = i[1]
<havenwood> dnadev2: Do you mean to dynamically call a method?: foo.public_send("#{i[0]}=", i[1])
<havenwood> dnadev2: Ruby doesn't have macros, but it does have metaprogramming. So you can't `foo."bar"` but you can `foo.send "bar"` instead.
dfucci has quit [Ping timeout: 256 seconds]
sagax has quit [Ping timeout: 272 seconds]
<havenwood> dnadev2: Yes, you can check if `foo.respond_to? "bar"` then `foo.public_send "bar"`.
<havenwood> dnadev2: Or rather: foo.respond_to? "bar="
<havenwood> dnadev2: Or grab foo's attributes and check them at once. There are many ways. Definitely can be done.
<dnadev2> havenwood, thanks. basically want to update certain attributes of foo. i don't know which attributes, but i do know they will be columns on the foo model.
<havenwood> dnadev2: Take a look at #update and #assign_attributes to set your attributes all at once rather than iterating.
<Cubixusin[m]> what is difference `env` vs `ENV` ?
<havenwood> Cubixusin[m]: The former is a local variable or method. The latter is a core class.
jenrzzz has quit [Ping timeout: 240 seconds]
<Cubixusin[m]> Thank you!
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
jenrzzz has joined #ruby
GodFather has joined #ruby
napcae- has quit [Quit: %bye%]
napcae has joined #ruby
ua has quit [Excess Flood]
ua has joined #ruby
cliluw has joined #ruby
coniptor has quit [Ping timeout: 265 seconds]
Emmanuel_Chanel has joined #ruby
ur5us_ has quit [Ping timeout: 264 seconds]
akem has quit [Ping timeout: 265 seconds]
coniptor has joined #ruby
cthulchu has joined #ruby
akem has joined #ruby
akem has quit [Client Quit]
akem has joined #ruby
lightstalker has quit [Ping timeout: 265 seconds]
cthu| has quit [Ping timeout: 265 seconds]
Nahra has quit [Quit: leaving]
znz_jp has quit [Ping timeout: 264 seconds]