havenwood changed the topic of #ruby to: Ruby 3.2.2, 3.1.4, 3.3.0-preview1: https://www.ruby-lang.org | Rules: https://ruby-community.com | Logs: https://libera.irclog.whitequark.org/ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 255 seconds]
markong has quit [Ping timeout: 264 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 255 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 255 seconds]
gr33n7007h has joined #ruby
zombieface_ has joined #ruby
Linux_Kerio has joined #ruby
helge has quit [Server closed connection]
helge has joined #ruby
jhass has quit [Ping timeout: 245 seconds]
jhass has joined #ruby
caedmon has joined #ruby
caedmon has quit [Ping timeout: 246 seconds]
caedmon has joined #ruby
duderonomy has quit [Ping timeout: 258 seconds]
caedmon has quit [Ping timeout: 245 seconds]
bhaak has quit [Server closed connection]
bhaak has joined #ruby
caedmon has joined #ruby
roadie has joined #ruby
caedmon has quit [Quit: caedmon]
caedmon has joined #ruby
roadie has quit [Ping timeout: 255 seconds]
Exa has quit [Server closed connection]
Exa has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 255 seconds]
grenierm has joined #ruby
_ht has joined #ruby
caedmon has quit [Ping timeout: 240 seconds]
caedmon has joined #ruby
caedmon has quit [Ping timeout: 264 seconds]
caedmon has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
caedmon has quit [Ping timeout: 246 seconds]
roadie has joined #ruby
reset has quit [Quit: reset]
roadie has quit [Ping timeout: 255 seconds]
jhass has quit [Ping timeout: 246 seconds]
jhass has joined #ruby
roadie has joined #ruby
roadie has quit [Remote host closed the connection]
_ht has quit [Quit: _ht]
Polaro has quit [Remote host closed the connection]
Polaro has joined #ruby
Polaro has quit [Remote host closed the connection]
Polaro has joined #ruby
Pixi has quit [Ping timeout: 250 seconds]
scottg489 has quit [Server closed connection]
scottg489 has joined #ruby
Pixi has joined #ruby
infinityfye has joined #ruby
zombieface_ has quit [Quit: Leaving]
grenierm has quit [Ping timeout: 246 seconds]
Polaro has quit [Quit: Best CPUs can count to infinity twice without being bugged out by zero division errors or whatnot.]
<isene> I would like to keep a registry of values used among all instances of a class - an array stored in the class itself that all instances have access to. Background: The Curses class in Ruby has an idiotic init_pair method that can hold 256 pairs of foreground/background for curses windows - out of a possible 65536 pairs. To circumvent this I have sometimes made a dirty hack to give the pair the same
<isene> number as the foreground value `init_pair(pairnumber, fg, bg)` becomes `init_pair(fg, fg, bg)`. Or use an xor of fg & bg to accommodate for both `init_pair(x, fg1, bg1)` and `init_pair(x, fg1, bg2)` - but even this gets us into color clashes where two different pairs gets the same pairnumber. So - to solve this properly, I need a common register that stores arbitrary pairs sequentally and is
<isene> accessible by all the instances. How?
taupiqueur_shiny has joined #ruby
teclator has joined #ruby
otisolsen70 has joined #ruby
<sarna> isene: possibly reopen `Curses` and stick a class variable in there, to hold all the pairs? then you could monkey-patch the methods you need to fetch it like `self.class.pairs`
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
teclator has quit [Quit: No Ping reply in 180 seconds.]
teclator has joined #ruby
taupiqueur_shiny has quit [Remote host closed the connection]
Perflosopher has quit [Ping timeout: 260 seconds]
taupiqueur_shiny has joined #ruby
cornett_ has quit [Server closed connection]
cornett_ has joined #ruby
BazzaBazaa has joined #ruby
Perflosopher has joined #ruby
gonix has joined #ruby
ruser has quit [Server closed connection]
ruser has joined #ruby
gonix has quit [Ping timeout: 246 seconds]
BazzaBazaa has quit [Remote host closed the connection]
brokkoli_origin has quit [Ping timeout: 246 seconds]
konsolebox has joined #ruby
brokkoli_origin has joined #ruby
BazzaBazaa has joined #ruby
Hercul has joined #ruby
reset has joined #ruby
znpy has quit [Read error: Connection reset by peer]
znpy has joined #ruby
Whiteh70 has joined #ruby
Hercul has quit [Ping timeout: 240 seconds]
Whiteh70 has quit [Read error: Connection reset by peer]
Mimis has joined #ruby
szkl has joined #ruby
paroxy has joined #ruby
Mimis has quit [Ping timeout: 246 seconds]
shephe55 has joined #ruby
paroxy has quit [Ping timeout: 260 seconds]
paroxy has joined #ruby
shephe55 has quit [Ping timeout: 246 seconds]
shephe55 has joined #ruby
paroxy has quit [Ping timeout: 246 seconds]
paroxy has joined #ruby
markong has joined #ruby
shephe55 has quit [Ping timeout: 246 seconds]
Mimis has joined #ruby
paroxy has quit [Ping timeout: 260 seconds]
taupiqueur_shiny has quit [Remote host closed the connection]
taupiqueur_shiny has joined #ruby
paroxy has joined #ruby
Mimis has quit [Ping timeout: 260 seconds]
shephe55 has joined #ruby
paroxy has quit [Ping timeout: 260 seconds]
konsolebox has quit [Quit: Leaving]
paroxy has joined #ruby
shephe55 has quit [Ping timeout: 250 seconds]
konsolebox has joined #ruby
BazzaBazaa has quit [Remote host closed the connection]
gr33n7007h has quit [Ping timeout: 250 seconds]
paroxy has quit [Ping timeout: 250 seconds]
gr33n7007h has joined #ruby
gabrielcsf has joined #ruby
gr33n7007h has quit [Ping timeout: 246 seconds]
gr33n7007h has joined #ruby
konsolebox has quit [Quit: Leaving]
balo has quit [Quit: leaving]
balo has joined #ruby
donofrio has quit [Read error: Connection reset by peer]
BazzaBazaa has joined #ruby
konsolebox has joined #ruby
szkl has quit [Quit: Connection closed for inactivity]
Guest86 has joined #ruby
<Guest86> hello guys i use ruby-lsp and my lsp dosent found the async lib
<Guest86> is there any hint ?
<Guest86> also i added in Gemfile and installed it with bundle
Guest86 has quit [Quit: Client closed]
markong has quit [Ping timeout: 252 seconds]
c10l has quit [Quit: See ya! o/]
c10l has joined #ruby
taupiqueur_shiny has quit [Remote host closed the connection]
taupiqueur_shiny has joined #ruby
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp has joined #ruby
BazzaBazaa has quit [Remote host closed the connection]
ruser has joined #ruby
ruser has quit [Changing host]
keypresser86 has joined #ruby
Demi has quit [Server closed connection]
Demi has joined #ruby
markong has joined #ruby
_ht has joined #ruby
roadie has joined #ruby
<ruser> ugh, what am i doing wrong? I created a project ' rails new myapp --database=postgresql' i created a role which then I set via database.yml yet, when i try to run rails db:setup i still get authentication failure (?) for the user (role) that I setup. I tried providing the pwd via config file and via environment variable. if i try connecting manually via psql and provider correct pwd it says db doesn't
<ruser> exist (makes sense it hasn't been created yet) and if i supply wrong pwd it fails authentication. so clearly the role is created and passes auth.
<ruser> it does start the server with rail server, and fails with PG::ConnectionBad: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user 'myuser'
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<ruser> db:create seems to fail with the simlar message
<ruser> Couldn't create 'myapp_development' database. Please check your configuration. Couldn't create 'instrumentlapp_development' database. Please check your configuration.
<ruser> whops, the dbs are actually names the same, bad edit :)
<ruser> rolcreatedb | rolcanlogin are both set to true
<ox1eef_> ruser Do you need PostgreSQL ? SQLite3 is an alternative that is easier to configure.
<ruser> ox1eef_: yes, i'd prefer postgre (targetting heroku)
<ox1eef_> Fair enough
<ruser> what's the best way to debug this, cause i'm stuck on basic tutorial
taupiqueur_shiny has quit [Remote host closed the connection]
Sampersand has joined #ruby
___nick___ has joined #ruby
Sampersand has quit [Quit: Client closed]
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
infinityfye has quit [Quit: Leaving]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
<havenwood> isene: From what you've said, I'm not quite sure what you're going for in terms of how you want to dedup or whatnot, but here's an example with some food for thought: https://gist.github.com/havenwood/8fd44cca7e8f9ec967c80f548db06094
<havenwood> If you want to say more about how you'll use the registry there are probably useful helper methods to add. I just showed an example of a a Singleton registry.
<havenwood> And a few sugar methods so you can `ColorRegistry.color(42)` rather than`ColorRegistry.instance.color(42)`. I did it through a bit of metaprogramming, but it's totally optional.
Sampersand has joined #ruby
<Sampersand> I'm playing around with ruby 0.49, and my gosh there's lots of little bugs that im surprised were never fixed
<havenwood> Sampersand: Earliest version I've ever found. Now you have me curious to find earlier...
<havenwood> Sampersand: Maybe we need to ask Matz...
<Sampersand> I'd be so fascinated to find earlier versions
<havenwood> 0.1 plz
<Sampersand> Here' soen of my favourite bugs—`redo`. The entire plumbing for redo exists, except he forgot to actually do the very last step: define what it means to actually hit redo
<havenwood> pre 1.0 incarnate
<Sampersand> im utterly confused. did matz implement `redo` and then just... not test it??
<Sampersand> Anyways, my goal is to fix up 0,49 without changing it, so I have four levels of changes:
<Sampersand> - required fixes: things that must be solved to have it compile on modern compilers (things like passing the correct amount of arguments to functions, not using the return value of `void` functions, etc)
<Sampersand> - 64 bit changes: thigns that need to happen if you want the code to work on 64 bit computers
<Sampersand> - critical bugfixes: bugfixes without which using 0.49 would be almost impossible (eg, calling undefined functions segfaulted)
<Sampersand> - bugfixes: bugfixes which aren't critical but I've still found (eg `Range#to_s` only worked with integers by accident, `$;` isn't defined, `def %` isn't possible, etc)
monoto has joined #ruby
markong has quit [Ping timeout: 245 seconds]
Sampersand has quit [Quit: Client closed]
monoto has quit [Quit: Best CPUs can count to infinity twice without being bugged out by zero division errors or whatnot.]
<hightower2> Hey I have installed a gem bigdecimal, version 2.0.0 and 1.3.5. Version 2.0.0 is listed as default so I can't uninstall it. How do I switch the default to 1.3.5?
John_Ivan__ has joined #ruby
John_Ivan_ has quit [Ping timeout: 260 seconds]
John_Ivan__ has quit [Ping timeout: 246 seconds]
konsolebox has quit [Quit: Leaving]
eron has joined #ruby
Shell has quit [Server closed connection]
Fridtjof_ has quit [Server closed connection]
Shell has joined #ruby
Fridtjof has joined #ruby
___nick___ has quit [Ping timeout: 246 seconds]
_ht has quit [Quit: _ht]
John_Ivan has joined #ruby
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
llua has joined #ruby
leftylink has quit [Server closed connection]
leftylink has joined #ruby
<petru> hightower2: hm, why can't you uninstall 2.0.0?
<petru> Like, gem uninstall bigdecimal --version 2.0.0
asio_ has quit [Server closed connection]
asio has joined #ruby
<ruser> well, i should have looked at postgres logs.... myappuser@postgres LOG: provided user name (myappuser) and authenticated user name (user) do not match
z4kz has quit [Server closed connection]
z4kz has joined #ruby
otisolsen70 has quit [Quit: Leaving]
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
<hightower2> petru, because as I said, it tells me it is marked as a default and thus can't be deleted
<hightower2> I solved the issue by finding all dirs in the ruby install named bigdecimal-* (to delete all versions), and then I gem installed the one I want with appropriate -v
llua has joined #ruby
<weaksauce> hightower2 https://stdgems.org/
<weaksauce> they are default gemss
<weaksauce> tied to ruby versions
<hightower2> well I deleted and installed 1.3.5 and it worked
Linux_Kerio has quit [Ping timeout: 246 seconds]
roadie has quit [Ping timeout: 255 seconds]
<ox1eef_> hightower2: gem uninstall gem -v X.X.X
<ox1eef_> where X.X.X is the new version that was installed.
<ox1eef_> Pretty sure that works because I did it a couple of days ago to fix a different problem.
markong has joined #ruby
roadie has joined #ruby
<aesthetikx> Sampersand are you documenting this anywhere / what is your goal
Guest91 has joined #ruby
Guest91 has quit [Client Quit]
polishdub has quit [Remote host closed the connection]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
<hightower2> ox1eef_, yes, I do not want to remove the new version, but the original/default version
tomtmym has quit [Quit: Gone.]
Arthur has quit [Ping timeout: 245 seconds]
Arthur has joined #ruby
roadie has quit [Ping timeout: 255 seconds]
reset has quit [Quit: reset]
eron has quit [Quit: Client closed]
keypresser86 has quit []
<ox1eef_> Ah. I see. Indeed, not possible AFAIK.
<ox1eef_> Why do you need to remove it though. The new version will be picked up anyway.
erblack has joined #ruby
dmgk has joined #ruby
oz has quit [Server closed connection]
roadie has joined #ruby
ox has joined #ruby
roadie has quit [Ping timeout: 255 seconds]