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`
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'
<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
<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?
<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