* jla
on the Ruby Koans .... ' is_a?' such a neat expression, oh
jenrzzz has joined #ruby
vondruch has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
robotbee has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
nofxx_ has joined #ruby
jenrzzz has joined #ruby
nofxx__ has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
ruurd has joined #ruby
gearnode has joined #ruby
jenrzzz has joined #ruby
jetchisel has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
nertzy_ has joined #ruby
nertzy__ has quit [Ping timeout: 240 seconds]
TrufflePump has joined #ruby
jenrzzz has joined #ruby
TrufflePump has quit [Ping timeout: 258 seconds]
jetchisel has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
ruurd has quit [Ping timeout: 260 seconds]
actuallybatman has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
Qchmqs has quit [Ping timeout: 252 seconds]
dpl has joined #ruby
jla has quit [Ping timeout: 252 seconds]
helpa-bot has joined #ruby
helpa has quit [Read error: Connection reset by peer]
wnd has quit [Read error: Connection reset by peer]
wnd-trans has joined #ruby
helpa-bot has quit [Remote host closed the connection]
helpa has joined #ruby
jla has joined #ruby
supercoven has joined #ruby
wnd-trans is now known as wnd
al2o3-cr has quit [Ping timeout: 260 seconds]
jackiiilong has joined #ruby
<jackiiilong>
Does ruby support native threads
TrufflePump has joined #ruby
TrufflePump has quit [Ping timeout: 258 seconds]
<ccooke>
jackiiilong: Technically yes. However, like a lot of scripting-style languages it has a global lock so only one thread can execute ruby code at a time. You can still get improved performance with threaded IO.
<ccooke>
jackiiilong: In ruby 3, there is a new model for multiprocessing that should get full performance (although possibly not quite yet; it's still new), but requires some specific program design
<ccooke>
I mean that you can have multiple threads handling IO and gain efficiency from that, because most of them will be blocking at any one time
fernando-basso has joined #ruby
TrufflePump has joined #ruby
postmodern has quit [Quit: Leaving]
stdedos has joined #ruby
TrufflePump has quit [Ping timeout: 258 seconds]
kinduff7 has joined #ruby
kinduff has quit [Ping timeout: 265 seconds]
kinduff7 is now known as kinduff
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Mia has quit [Ping timeout: 240 seconds]
Mia has joined #ruby
Axy has quit [Ping timeout: 268 seconds]
Mia has quit [Ping timeout: 240 seconds]
vondruch has quit [Ping timeout: 252 seconds]
jackiiilong_ has joined #ruby
al2o3-cr has joined #ruby
jackiiilong has quit [Ping timeout: 252 seconds]
Technodrome has joined #ruby
jackiiilong_ is now known as jackiiilong
m27frogy has joined #ruby
herbert__ has joined #ruby
<herbert__>
I am on an ubuntu machine using ruby 2.3.1 and gems 2.5.2 and when I want to install any gem "I get Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)" The webz says I should update my versions ant that would solve it but unfortunately I
<herbert__>
am boxed to these versions for now. How can I still install these gems?
<herbert__>
weirdly the ruby 2.0 and gem 2.0 setup on my centos works
<herbert__>
can I somehow download the gem source and then install it from the local file?
blackmesa has joined #ruby
<adam12>
herbert__: Yes. There’s a Download button on rubygems.org, and then you can `gem install somefile.gem`
<adam12>
herbert__: Another option might be to manually add certificates for rubygems.org. I believe there’s a help article about it somewhere, if it’s an option for you.
jla has quit [Ping timeout: 268 seconds]
jla has joined #ruby
TrufflePump has joined #ruby
TrufflePump has quit [Ping timeout: 258 seconds]
evdubs_ has joined #ruby
evdubs has quit [Ping timeout: 260 seconds]
jla has quit [Ping timeout: 252 seconds]
<herbert__>
adam12 yeah, I would actually prefer to have the certificates :)
<herbert__>
there is no explanation for linux though...
<adam12>
herbert__: That’s the one.
<herbert__>
i will try to follow the macos instructions
nertzy__ has joined #ruby
nofxx__ has joined #ruby
nofxx_ has quit [Read error: Connection reset by peer]
whysthatso has quit [Ping timeout: 252 seconds]
evdubs__ has joined #ruby
nertzy_ has quit [Ping timeout: 250 seconds]
whysthatso has joined #ruby
evdubs_ has quit [Ping timeout: 260 seconds]
konsolebox has quit [Ping timeout: 252 seconds]
konsolebox has joined #ruby
jackiiilong_ has joined #ruby
jackiiilong__ has joined #ruby
jackiiilong has quit [Disconnected by services]
jackiiilong__ is now known as jackiiilong
jackiiilong_ has quit [Ping timeout: 265 seconds]
herbert__ has quit [Quit: Connection closed]
neozor has joined #ruby
vondruch has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
pabs3 has joined #ruby
<pabs3>
is there a way to (temporarily) override the print/puts functions so that they output to STDERR instead of STDOUT?
<neozor>
Hi! Do you know any documentation or article where i can read about the right scenarios for when to use instance variables or accessors? I've read this discussion https://forum.upcase.com/t/using-instance-variables-vs-attribute-accessors/1788 and are pretty good points on both sides. I'm also looking at existent source code just to catch idea and usage in general. Just want to know if I'm missing something that i have no
<neozor>
t found in terms of good practices. Thanks!
<jackiiilong>
how to read large size file with ruby
nofxx_ has joined #ruby
<rapha>
line by line?
nofxx__ has quit [Ping timeout: 252 seconds]
<rapha>
huh
pabs3 has left #ruby ["Don't rest until the streets are paved in poems."]
<rapha>
$ jruby -S jbundle install
<rapha>
Bundler::LockfileError: You must use Bundler 2 or greater with this lockfile.
<rapha>
$ jruby -S bundler --version
<rapha>
Bundler version 2.2.16
<rapha>
?! ... help
roadie has quit [Ping timeout: 260 seconds]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
lucasb has joined #ruby
shokohsc68 has quit [Ping timeout: 260 seconds]
shokohsc68 has joined #ruby
cadeskywalker has quit [Ping timeout: 240 seconds]
cuerbot has joined #ruby
elcuervo has quit [Ping timeout: 240 seconds]
cadeskywalker has joined #ruby
<jackiiilong>
what is jruby
harlin has quit [Quit: Leaving]
Mrgoose has quit [Ping timeout: 240 seconds]
konsolebox has quit [Max SendQ exceeded]
konsolebox has joined #ruby
jimms has joined #ruby
TrufflePump has joined #ruby
robotbee has joined #ruby
TrufflePump has quit [Ping timeout: 258 seconds]
roadie has joined #ruby
<Cork>
anyone know if it is possible to get pry to input complete global variables like irb does?
howdoi has joined #ruby
roadie has quit [Remote host closed the connection]
roadie has joined #ruby
roadie has quit [Remote host closed the connection]
ChmEarl has joined #ruby
neozor has quit [Remote host closed the connection]
dhollin3 is now known as dhollinger
rubydoc has quit [Ping timeout: 260 seconds]
phaul has quit [Ping timeout: 260 seconds]
phaul has joined #ruby
rubydoc has joined #ruby
jla has joined #ruby
Mrgoose has joined #ruby
blackmesa has quit [Quit: WeeChat 3.1]
<adam12>
pabs: You could try re-assigning the global $stdout then put it back. The constants should be used only to restore originals. ie. $stdout = $stderr; puts “I should go to stderr now”; $stdout = STDOUT.
BSaboia has quit [Quit: This computer has gone to sleep]
explorier has joined #ruby
explorie1 has joined #ruby
gix has joined #ruby
Rudd0 has quit [Ping timeout: 240 seconds]
jetchisel has joined #ruby
jess has joined #ruby
cd has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jimms has joined #ruby
<fernandobasso>
I need a new job too! Where do I sign?
<fernandobasso>
Will work for love, even.
Hess has joined #ruby
Hess has quit [Client Quit]
evdubs__ has joined #ruby
FastJack has quit [Ping timeout: 246 seconds]
evdubs_ has quit [Ping timeout: 240 seconds]
FastJack has joined #ruby
Technodrome has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
dpl has joined #ruby
explorier has quit [*.net *.split]
explorie1 has quit [*.net *.split]
actuallybatman has quit [*.net *.split]
rubydoc has quit [*.net *.split]
ChmEarl has quit [*.net *.split]
cuerbot has quit [*.net *.split]
stdedos has quit [*.net *.split]
NightMonkey has quit [*.net *.split]
gdonald has quit [*.net *.split]
ua has quit [*.net *.split]
umjisus has quit [*.net *.split]
rheddry has quit [*.net *.split]
johnny56 has quit [*.net *.split]
weaksauce has quit [*.net *.split]
arooni has quit [*.net *.split]
woodruffw has quit [*.net *.split]
DEac-_ has quit [*.net *.split]
phenom has quit [*.net *.split]
joast has quit [*.net *.split]
Milos has quit [*.net *.split]
ua has joined #ruby
cuerbot has joined #ruby
explorier has joined #ruby
jenrzzz has joined #ruby
johnny56 has joined #ruby
weaksauce has joined #ruby
woodruffw has joined #ruby
DEac-_ has joined #ruby
arooni has joined #ruby
Milos has joined #ruby
joast has joined #ruby
stdedos has joined #ruby
ChmEarl has joined #ruby
umjisus has joined #ruby
NightMonkey has joined #ruby
rheddry has joined #ruby
gdonald has joined #ruby
rubydoc has joined #ruby
explorie1 has joined #ruby
actuallybatman has joined #ruby
phenom has joined #ruby
coniptor has quit [Ping timeout: 268 seconds]
<adam12>
O_O
evdubs__ is now known as evdubs
jimms has quit [Quit: Leaving]
<sphex>
hey anyone else getting a SIGSEGV with this on 2.7? ruby -e 'case 1; when 2r; 3; end'
orbyt_ has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
coniptor has joined #ruby
<adam12>
sphex: No SIGSEGV but something definitely strange. I had to run it in a container tho.
Hess has joined #ruby
<adam12>
Seems fine in 2.6.
mtkd has quit [Read error: Connection reset by peer]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sphex>
adam12: how strange? and yeah it works on 2.4 and 2.6 for me too.
Hess has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 240 seconds]
<havenwood>
sphex: I'm seeing `[BUG] Illegal instruction` starting with 2.6 then also in 2.7, 3.0 and nightly.
<havenwood>
adam12: Breaks for me in 2.6 but works in 2.5.
<havenwood>
It's fine in TruffleRuby, JRuby, and MRuby.
<sphex>
ok yeah I was wrong, I thought it worked in 2.6 but it was just 2.4.
<adam12>
sphex: For me, 2.7 never finishes; just sits there spinning. I cant’ strace it in that container but could if you really needed me to.
jenrzzz has joined #ruby
<sphex>
adam12: I started trying to debug it and I got a coredump with debug symbols but I can't make too much sense of it yet.
supercoven has quit [Ping timeout: 268 seconds]
<sphex>
I think it craps out when trying to optimize the case expression into a "cdhash" lookup. maybe the node isn't properly parsed and the problem is before that. there's something weird with it. really not too sure though.
<sphex>
well at least now I know the problem isn't just on my side
<Iambchop>
spex: that seems ok here on ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [aarch64-linux-musl]
jimms has joined #ruby
jimms has quit [Client Quit]
<sphex>
Iambchop: does it work if you do this? ruby -e 'puts case 2r; when 2r; "ok"; end'
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
sphex: It does look like the grammar may be parsing that differently based on yydebug of: case 0 when 1r; end
<havenwood>
sphex: odd bug!
<havenwood>
sphex: Works without the r literal: case 0 when Rational(1); end
yuesbeez has joined #ruby
<Iambchop>
sphex: yes, prints ok and returns 0
Hess has joined #ruby
<havenwood>
sphex: I just tried on Fedora and it works...
<havenwood>
Ruby 3.0.1 no prob.
<havenwood>
Iambchop: Linux?
<havenwood>
Is it a BSD bug?
<Iambchop>
yes, alpine-based (pinephone)
<havenwood>
sphex: Which OS/distro?
<sphex>
havenwood: I only triggered it on FreeBSD so far. I tried on Ubuntu and it works with 2.7.0.
<sphex>
uh oh if this is OS-dependent this is gonna be hell to debug
<havenwood>
sphex: I suspect a BSD-specific bug since we can trigger it on FreeBSD and macOS.
<havenwood>
But not on any Linux distro.
<Iambchop>
sphex: base, ports, or self-compile?
<sphex>
what the hell could it be? does ruby use the system's yacc?
<havenwood>
sphex: yes
<havenwood>
sphex: bison
<sphex>
Iambchop: packages and then ports to enable debugging
<havenwood>
sphex: yeah, I'm suspicious of the grammar
<sphex>
something must have changed. this script was working fine like.. a month or so ago. maybe 2 months. not sure.
hiroaki has quit [Ping timeout: 260 seconds]
MalkbabY has quit [Remote host closed the connection]
<havenwood>
I can see a rule change just looking at: ruby -yydebug -e 'case 0 when 1r; end'
<havenwood>
sphex: I haven't had a chance to check parse.y and see what those rules correspond with.
MalkbabY has joined #ruby
<havenwood>
Ripper sexp is the same.
<havenwood>
InstructionSequence also triggers the bug.
<Iambchop>
April 6 was the port update to 2.7.3
<havenwood>
Seems like BSDs run into issues starting with 2.6.
cthulchu_ has quit [Ping timeout: 265 seconds]
<havenwood>
Good ole yydebug.
<havenwood>
I saw something about it being retired and was every-so-slightly sad.
jenrzzz has quit [Read error: Connection reset by peer]
<sphex>
havenwood: it must have been working on 2.6 for a while for me. I have a script with a rational in a case expression like that that had been working fine for years and now it segfaults. I must have been running it on 2.6 before. the problem might have appeared with a minor 2.6.x revision.
<weaksauce>
has anything new come out from that basecamp exodus
<sphex>
or an update to some library that ruby uses. or bison.
<havenwood>
sphex: There's another grammar change between 2.5 and 2.6. Unsure if it's related.
<havenwood>
sphex: Yeah, I'm suspicious of bison but I dunno!
<havenwood>
weaksauce: we're recruiting :P
jenrzzz has joined #ruby
jenrzzz has quit [Remote host closed the connection]
<havenwood>
weaksauce: I haven't heard much since the mass exodus.
<weaksauce>
haha where is here?
<havenwood>
weaksauce: Square :)
<weaksauce>
ah nice
<Iambchop>
sphex: ruby26 port updated to 2.6.7 april 6; you had it working on an older version of the ruby26 pkg?
hiroaki has joined #ruby
<sphex>
Iambchop: yes. I'm almost certain. but kind of hard to pinpoint when exactly.
<sphex>
havenwood: I tried to compare the yydebug output between linux and freebsd by stripping the line numbers and the rule numbers that they're hitting are different. but one of them is 2.7.0 and the other 2.7.3 so maybe this means absolutely nothing. :/
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
Rudd0 has joined #ruby
coniptor has joined #ruby
Pseudo-Coffee has joined #ruby
Cork has quit [Ping timeout: 260 seconds]
harlin has quit [Quit: Leaving]
harlin has joined #ruby
robotbee has quit [Ping timeout: 260 seconds]
Pseudo-Coffee has quit [Read error: Connection reset by peer]
robotbee has joined #ruby
cliluw has joined #ruby
evdubs_ has joined #ruby
shortdudey123 has quit [Ping timeout: 260 seconds]
robotbee has quit [Ping timeout: 265 seconds]
dpl has quit [Read error: Connection reset by peer]
evdubs has quit [Ping timeout: 240 seconds]
dpl has joined #ruby
gearnode has quit [Ping timeout: 248 seconds]
shortdudey123 has joined #ruby
gearnode has joined #ruby
mic_e has quit [Quit: No Ping reply in 180 seconds.]
Technodrome has joined #ruby
<sphex>
havenwood: problem goes away when compiling ruby with gcc. and with clang -O0 it turns into this: -e: can't add a new key into hash during iteration (RuntimeError)
explorie1 has quit [Ping timeout: 252 seconds]
explorier has quit [Ping timeout: 252 seconds]
explorier has joined #ruby
explorie1 has joined #ruby
BTRE has quit [Quit: Leaving]
BTRE has joined #ruby
stryek has quit [Quit: Connection closed for inactivity]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]