havenwood changed the topic of #ruby to: Ruby 3.3.6 (3.4.0-preview2) https://www.ruby-lang.org | Log https://libera.irclog.whitequark.org/ruby
c10l has quit [Remote host closed the connection]
Sampersand has quit [Quit: Client closed]
Sampersand has joined #ruby
kludger has quit [Quit: kludger]
kludger has joined #ruby
johnjaye has quit [Ping timeout: 248 seconds]
aesthetikx has joined #ruby
Sampersand has quit [Quit: Client closed]
__DuBPiRaTe__ has quit [Quit: Leaving]
johnjaye has joined #ruby
johnjaye has quit [Ping timeout: 264 seconds]
johnjaye has joined #ruby
kludger has quit [Quit: kludger]
kludger has joined #ruby
ih8u has quit [Read error: Connection reset by peer]
kludger_ has joined #ruby
powersurge360 has quit [Ping timeout: 246 seconds]
kludger has quit [Ping timeout: 252 seconds]
powersurge360 has joined #ruby
powersurge3604 has joined #ruby
powersurge360 has quit [Read error: Connection reset by peer]
powersurge3604 is now known as powersurge360
powersurge360 has quit [Client Quit]
powersurge3604 has joined #ruby
powersurge3604 has quit [Client Quit]
powersurge3604 has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
cappy has quit [Quit: Leaving]
powersurge3604 has quit [Ping timeout: 260 seconds]
kludger_ has quit [Quit: kludger_]
jhass has quit [Remote host closed the connection]
jhass has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
brokkoli_origin has quit [Ping timeout: 252 seconds]
brokkoli_origin has joined #ruby
hightower4 has joined #ruby
hightower3 has quit [Ping timeout: 255 seconds]
hwpplayer1 has joined #ruby
gr33n7007h has quit [Ping timeout: 260 seconds]
gr33n7007h has joined #ruby
sympt has joined #ruby
roger_rabbit has joined #ruby
ua_ has quit [Ping timeout: 248 seconds]
Sampersand has joined #ruby
weaksauce has quit [Read error: Connection reset by peer]
weaksauc_ has joined #ruby
ua_ has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
ih8u has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
weaksauc_ has quit [Ping timeout: 252 seconds]
Sampersand has quit [Ping timeout: 256 seconds]
grenierm has joined #ruby
sandra has quit [Remote host closed the connection]
sandra has joined #ruby
hwpplayer1 has quit [Read error: Connection reset by peer]
hwpplayer1 has joined #ruby
phryk has quit [Remote host closed the connection]
phryk has joined #ruby
___nick___ has joined #ruby
kludger has joined #ruby
hwpplayer1 has quit [Quit: I'll be back later]
grenierm has quit [Ping timeout: 256 seconds]
grenierm has joined #ruby
brokkoli_origin has quit [Ping timeout: 252 seconds]
crivic has joined #ruby
brokkoli_origin has joined #ruby
kludger has quit [Quit: kludger]
kludger has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
weaksauce has joined #ruby
royo25 has joined #ruby
Linux_Kerio has joined #ruby
crivic is now known as crivic-away
sleetdrop has joined #ruby
crivic-away has quit [Quit: crivic was here]
ftajhii has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
grenierm has quit [Quit: Client closed]
sleetdrop has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
donofrio_ has joined #ruby
dminuoso has quit [Ping timeout: 264 seconds]
__DuBPiRaTe__ has joined #ruby
donofrio_ has quit [Read error: Connection reset by peer]
donofrio__ has joined #ruby
donofrio__ has quit [Ping timeout: 252 seconds]
graaff has quit [Quit: Leaving]
graaff has joined #ruby
donofrio__ has joined #ruby
kludger has quit [Quit: kludger]
user71 has joined #ruby
FetidToot2 has joined #ruby
rvalue- has joined #ruby
FetidToot has quit [Ping timeout: 272 seconds]
FetidToot2 is now known as FetidToot
rvalue has quit [Ping timeout: 265 seconds]
rvalue- is now known as rvalue
Munto has quit [Ping timeout: 276 seconds]
hwpplayer1 has joined #ruby
TomyWork has joined #ruby
ua_ has quit [Read error: Connection reset by peer]
ua_ has joined #ruby
ftajhii has joined #ruby
donofrio__ has quit [Ping timeout: 245 seconds]
donofrio__ has joined #ruby
aesthetikx has quit [Ping timeout: 252 seconds]
aesthetikx has joined #ruby
powersurge3604 has joined #ruby
royo25 has quit [Quit: Goodbye cruel world]
centurion has quit [Quit: Lost terminal]
___nick___ has quit [Ping timeout: 260 seconds]
kludger has joined #ruby
___nick___ has joined #ruby
Munto has joined #ruby
kludger has quit [Quit: kludger]
Sampersand has joined #ruby
Sampersand77 has joined #ruby
Sampersand has quit [Ping timeout: 256 seconds]
hwpplayer1 has quit [Remote host closed the connection]
kludger has joined #ruby
___nick___ has quit [Ping timeout: 252 seconds]
___nick___ has joined #ruby
desnudopenguino has quit [Read error: Connection reset by peer]
desnudopenguino has joined #ruby
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
<isene> havenwood: rcurses are getting fuctional - but there's a snag that I cannot get my wits around. I added `rcurses_example.rb` in rcurses_example.rb. When I run it, I get this error (as if io/console was not pulled in - but it is, otherwise I will get another error on .raw in another place); rcurses.rb:144:in `getchr': undefined method `ready?' for #<IO:<STDIN>>
<isene> ... or anyone else in here that wants to check this out...
<isene> It should be noted that running the content of rcurses_example.rb in irb works just fine
<Sampersand77> isene `ruby -e 'p $stdin.ready?'` also fails
<Sampersand77> `ready?` might just be for stdout?
<Sampersand77> hm`ready?` might just be for stdout?
<Sampersand77> nope, t's in `io/wait`
<Sampersand77> isene `ruby -rio/wait -I./lib rcurses_example.rb` works; you should add `require 'io/wait'`
<isene> Damn, that was the one. Thanks.
<isene> How did you find it?
Linux_Kerio has quit [Ping timeout: 260 seconds]
<Sampersand77> cd'd to the ruby repo on my computer and did `rg '\bready\?' .` . It told me it was in `./ext/io/wait/wait.c`, so i tried `-rio/wait` and it worked
crysbot has joined #ruby
crysbot has quit [Client Quit]
<Sampersand77> also isene, you should make a `csi` and `esc` functions, so you can `def scroll_down = esc('N')`
<Sampersand77> and on line 174 and co did you literally type in the character `\x01` lol
<isene> That I didn't understand. Could we try Swahili?
<Sampersand77> which part
<isene> csi/esc
<Sampersand77> ah. ignore it, i was just being silly
<Sampersand77> Something more important is that ruby actually has escape sequences for control: `"\C-A"` is actually the same as `"\1"`
<Sampersand77> so you can `when "\C-A" then chr = "C-A"`
<Sampersand77> ruby also has `\M` so you can `"\M-\C-A` if you really want to lol
tuxcrafter78 has quit [Ping timeout: 256 seconds]
<o0x1eef> Hey adam12 ! Congrats: https://github.com/rubygems/rubygems/pull/8267
bovis has joined #ruby
<bovis> If I 'gem install rack', should I expect to see a rack binary? I see 'rackup'. Is there a gem command to view all associated files with an installed gem?
hightower3 has joined #ruby
<o0x1eef> rackup is no longer part of rack.
<o0x1eef> 'gem which rack' might help, that'll show you the unpacked gem, and you can see what files are included
hightower4 has quit [Ping timeout: 252 seconds]
polishdub has quit [Remote host closed the connection]
<bovis> o0x1eef: I'm having an issue with nginx unit being unable to load rack. https://bpa.st/NXJA 'rackup' seems to run fine on its own. Just trying to get to the heart of the problem.
<o0x1eef> Do you have a config.ru file ? Are you using Bundler ? Maybe you need to activate Bundler first ?
<o0x1eef> You can do that with "require 'bundler/setup'"
kludger has quit [Quit: kludger]
<o0x1eef> Btw nginx unit looks cool indeed
___nick___ has quit [Ping timeout: 252 seconds]
<bovis> o0x1eef: https://unit.nginx.org/howto/samples/#ruby I'm trying that config.ru. What I'm getting is the error in the paste above. Adding the require 'bundler/setup' doesn't get me any different result.
<o0x1eef> does 'gem list' include rack ?
kludger has joined #ruby
<bovis> Yes. Rack, rack-session, rack-test, and rackup
<o0x1eef> It does not look like bundler is used in that example. Your system gems should be used. Are your gems installed local to a user or for all users ? What user runs nginx unit ? How does 'gem list' look for that user ?
user71 has quit [Quit: Leaving]
kludger has quit [Ping timeout: 252 seconds]
<bovis> o0x1eef: Gems are installed locally. There's only one non-privileged user, which I'm running these attempts as. Unit has its own user 'unit'.
<bovis> 'su unit' asks for a password. That's not something I've set up... any attempt fails.
<o0x1eef> Did you install the gems as root ? Or as an unprivileged user ? If done as root then they should be available to all users, 'unit' included
<o0x1eef> If rbenv or chruby or similar is being used, then you might need to adjust the approach. Those tools usually isolate installs to one user.
<adam12> o0x1eef: Thanks :) I feel like the global variable Oprah lately. https://github.com/Shopify/ruby-lsp/pull/2514
<o0x1eef> Nice!
<bovis> Gems are installed as my user 'bovis'. No use of version control. Ruby is installed from the Alpine repo.
<bovis> Changing the chown unit:unit to the config.ru doesn't change the result.
<adam12> bovis: You have a Gemfile in that folder I'm assuming?
<adam12> (Gemfile and Gemfile.lock?)
<o0x1eef> The problem is that you have installed gems as boris, and those gems are isolated to that user. That's my guess with everything you said so far.
<adam12> bovis: Can you share your nginx config?
<adam12> Oh. Unless the only thing you have is a `config.ru`?
<adam12> (the example at the top of that Unit docs page)
<o0x1eef> This is the example we're working with: https://unit.nginx.org/howto/samples/#ruby - no bundler, etc, afaict.
<bovis> adam12: No Gemfile for my attempts with https://unit.nginx.org/howto/samples/#ruby. I'm trying to narrow down a wider use of Rails where Unit won't upload a config, and I'm receiving the broader '/usr/bin/ruby No file or directory' even though it's definitely installed.
<adam12> bovis: How'd you install nginx unit? and what distro?
<bovis> adam12: Alpine linux. Nginx Unit and the Ruby module are both from the repo.
kludger has joined #ruby
<adam12> So you've installed unit-ruby?
<bovis> adam12: Yes
kludger has quit [Ping timeout: 252 seconds]
<bovis> o0x1eef: If it's a user isolation issue, then I guess I'm unsure about how to give Unit access to my gems.
<bovis> 'gem env gemdir' => /usr/lib/ruby/gems/3.3.0
<bovis> Looks like Unit looks to that path... which would be wrong.
kludger has joined #ruby
<o0x1eef> You should investigate where 'boris' installs their gems. My guess is that their installation is unique to them. /usr/lib would require root access to write - at leaat typically.
<o0x1eef> And solving that problem is a challenge in itself. Ideally you would not install gems as root. Bundler might help.
<bovis> o0x1eef: I'll see if changing environment variables like this will help. https://github.com/nginx/unit/issues/91#issuecomment-654307728
<bovis> Later, though. Thanks for now. I appreciate the help.
<o0x1eef> No worries
bovis has quit [Quit: leaving]
<isene> So, rcurses is now tested and fully functional as far as I can see. I just may start porting my curses programs to this new library (astropanel, telescope, rtfm, imdb, etc.). Editing text in panes is now much smoother than with ruby-ncurses and the code is a lot less. Any and all suggestions for functionality or improvements are highly welcome. (https://github.com/isene/rcurses)
<o0x1eef> Thanks isene
Sampersand has joined #ruby
Sampersand77 has quit [Quit: Client closed]
<isene> Sampersand: How does Ruby get Ctrl-Alt-Shift-PgUp as escape code? Is there a complete list of codes somewhere? This could simplify rcurses a lot...
<Sampersand> is that even soemthign ruby _Can_ capture?
<isene> Well, the problem is it's multi-character, hence my Rinput part of rcurses. But if I could somehow simplify that, it would be nice...
mange has joined #ruby
<Sampersand> not sure, i only jsut started learning about escape sequences actually
donofrio__ has quit [Read error: Connection reset by peer]
donofrio__ has joined #ruby
kludger has quit [Read error: Connection reset by peer]
kludger has joined #ruby
<johnjaye> hmm. how do i require dl?
<johnjaye> was it removed in ruby 2.x maybe?
<johnjaye> i'm trying to call a windll on this machine
<o0x1eef> You probably want Fiddle
donofrio__ has quit [Ping timeout: 265 seconds]
<johnjaye> ok. is win32api a thing or is that a gem
<o0x1eef> My memory is rusty on that. There's at least this: https://docs.ruby-lang.org/en/master/WIN32OLE.html
<johnjaye> it says args=[user32["LockWorkStation"],[],TYPE_VOID] is giving an error since TYPE_VOID doesn't exist
<johnjaye> ok i got it working somehow. i had to type Fiddle::Function and Fiddle::TYPE_VOID
<johnjaye> why do i need that if I required fiddle already?
<johnjaye> frankly i'm amazed this works at all. all the examples are for linux and the *sole* example for windows is here and not really commented well
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
<o0x1eef> I used Fiddle a little bit for interfacing with capsicum(4) and it was a very positive experience. I enjoyed it more than writing C extensions, but it's not always easier. Depends. Still definitely worth exploring imo
desnudopenguino has quit [Read error: Connection reset by peer]
weyhmueller has quit [Ping timeout: 272 seconds]
weyhmueller has joined #ruby
cappy has joined #ruby