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
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
neshpion has quit [Quit: neshpion]
keypresser86 has quit [Ping timeout: 246 seconds]
keypresser86 has joined #ruby
keypresser86 has quit [Read error: Connection reset by peer]
leah2 has quit [Ping timeout: 258 seconds]
duderonomy has joined #ruby
keypresser86 has joined #ruby
keypresser86 has quit [Ping timeout: 260 seconds]
caedmon has joined #ruby
m_antis has quit [Ping timeout: 260 seconds]
<mooff> isene: Javascript has some strong virtual terminal libraries if looking for inspiration
markong has quit [Ping timeout: 260 seconds]
<mooff> other terms "terminal ui" ("tui"), "ecma-48" (the name of the standard that codified the ansi sequences supported by DEC VT100 & VT220 terminals and others)
caedmon has quit [Ping timeout: 246 seconds]
caedmon has joined #ruby
<mooff> read the source for io/console
caedmon has quit [Ping timeout: 245 seconds]
caedmon has joined #ruby
MalusVulgaris has joined #ruby
caedmon has quit [Ping timeout: 246 seconds]
reset has joined #ruby
caedmon has joined #ruby
caedmon has quit [Ping timeout: 245 seconds]
eddof13 has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
caedmon has joined #ruby
caedmon has quit [Client Quit]
eddof13 has joined #ruby
trillp has joined #ruby
_ht has joined #ruby
trillp has left #ruby [WeeChat 3.8]
Linux_Kerio has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leah2 has joined #ruby
Pixi` has joined #ruby
Pixi has quit [Ping timeout: 246 seconds]
grenierm has joined #ruby
_ht has quit [Quit: _ht]
TomyWork has joined #ruby
teclator has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
TomyWork has quit [Remote host closed the connection]
grenierm has quit [Quit: Client closed]
infinityfye has joined #ruby
grenierm has joined #ruby
Sobinec has joined #ruby
Sobinec has quit [Read error: Connection reset by peer]
Sobi has joined #ruby
Sobi is now known as Sobinec
compos has joined #ruby
<isene> mooff: Thanks 😊
compos has quit [Remote host closed the connection]
Linux_Kerio has quit [Ping timeout: 246 seconds]
jmjl has quit [Ping timeout: 260 seconds]
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
grenierm has quit [Ping timeout: 246 seconds]
hightower2 has joined #ruby
havenwood3 has joined #ruby
Liothen has quit [Ping timeout: 246 seconds]
havenwood has quit [Ping timeout: 246 seconds]
havenwood3 is now known as havenwood
Liothen has joined #ruby
jmjl has joined #ruby
MalusVulgaris has quit [Ping timeout: 246 seconds]
TheCatCollective has quit [Quit: Meow Meow Meow Meow Meow Meow Meow Meow]
Sankalp has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
TheCatCollective has joined #ruby
Sankalp has joined #ruby
roshanavand has joined #ruby
emotio has joined #ruby
emotio has quit [Remote host closed the connection]
MalusVulgaris has joined #ruby
theref has joined #ruby
theref has quit [Quit: Best CPUs can count to infinity twice without being bugged out by zero division errors or whatnot.]
markong has joined #ruby
CesarMarinhoRJ has joined #ruby
simpli16 has joined #ruby
markong has quit [Ping timeout: 245 seconds]
markong has joined #ruby
Sobinec has quit [Read error: Connection reset by peer]
roshanavand_ has joined #ruby
simpli16 has quit [Remote host closed the connection]
simpli16 has joined #ruby
Dooky has joined #ruby
dviola has quit [Quit: WeeChat 4.0.1]
dviola has joined #ruby
hightower2 has quit [Ping timeout: 245 seconds]
gr33n7007h has quit [Ping timeout: 246 seconds]
gr33n7007h has joined #ruby
gr33n7007h has quit [Ping timeout: 245 seconds]
gr33n7007h has joined #ruby
simpli16 has quit [Remote host closed the connection]
Sankalp has quit [Ping timeout: 245 seconds]
MalusVulgaris has quit [Quit: MalusVulgaris]
<adam12> Hmm. If you are a TTY user, and you say `NO_COLOR=1` or `--no-colors` (to a command), and you see _bold_ characters. Would you consider that a colour? I feel like the spec is kinda vague on this.
<adam12> https://no-color.org states ANSI _color_ escape codes.
tomtmym has quit [Quit: Gone.]
Sankalp has joined #ruby
<mooff> i can't disambiguate what it should do, but many programs turn off all formatting, i think
hightower2 has joined #ruby
<adam12> I'd presume the same.
<ox1eef_> Same. Because in a terminal that can't render bold text, it would look like garbage.
<adam12> Yep. That's exactly my issue.
<adam12> Neovim :!command doesn't render colours, which is fine. The one command I call supports a --no-colors option, but it still does bold :(
<adam12> So it still looks a little bit like garbage.
<leah2> ansi bold or overprinting?
finalblast has joined #ruby
<adam12> leah2: Not sure. See next line.
<adam12> RUNNING HOOK: ^[[1mpre-commit^[[0
<leah2> yeah that is not
<adam12> I think that matches up to CSI 1 m
<adam12> tbh, I put most of this out of my head like 1995 once I stopped using Aciddraw and Renegade.
borax has joined #ruby
<finalblast> has anyone experience with ruby on mac m1s?
<adam12> finalblast: every day
<finalblast> had everything set up and working with rvm now im getting seg faults with rosetta runtimes errors
<adam12> finalblast: Sounds like something very rotten in your configuration, since Rosetta should not be involved at all.
graywolf has joined #ruby
<adam12> https://github.com/evilmartians/lefthook/pull/515 for my bold issue, tho I noticed that errors are still colored. oh well.
<adam12> finalblast: This is going to sound horrible, but I suggest blowing rvm away and starting over. Did you follow a specific tutorial?
<finalblast> adam12 didnt change config
<adam12> finalblast: What's the output of `which ruby`
<finalblast> i changed to rbenv same thing, format the whole thing and again same error
<finalblast> .rvm/gems/ruby-2.7.3/gems/listen-3.1.5/lib/listen/record.rb:18: [BUG] Bus Error at 0x000000010b550aa4
<finalblast> ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-darwin22]
<adam12> finalblast: I figured, but just to confirm, what's the output of `file $(which ruby)`
<finalblast> zsh: no such file or directory: /Users/username/.rvm/rubies/ruby-2.7.3/bin/ruby:
<adam12> Weird. How about `file /Users/username/.rvm/rubies/ruby-2.7.3/bin/ruby`
<adam12> brb
<finalblast> same output
<finalblast> dunno if some gem compiled with a wrong ruby version already did all the gem clean work and nothing also
<adam12> How did you install rvm?
dmgk has left #ruby [#ruby]
<finalblast> the curl script they have on their website
Dooky has quit [Quit: Textual IRC Client: www.textualapp.com]
svdasein has joined #ruby
borax has quit [Remote host closed the connection]
borax has joined #ruby
Linux_Kerio has joined #ruby
<adam12> finalblast: You're running zsh?
<adam12> finalblast: What's the output of `file $(which zsh)`
<adam12> Actually, even better: `file $(which $SHELL)`
<finalblast> y zsh with ohmyzsh
<finalblast> zsh: no such file or directory: /bin/zsh:
<adam12> Something is horribly broken.
<adam12> You should see something like this: /bin/zsh: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
<adam12> How about `stat /bin/zsh`?
<finalblast> 16777229 1152921500312434778 -rwxr-xr-x 1 root wheel 0 1377520 "Jun 15 11:08:29 2023" "Jun 15 11:08:29 2023" "Jun 15 11:08:29 2023" "Jun 15 11:08:29 2023" 4096 1472 0x80020 /bin/zsh
<adam12> Hmph.
<finalblast> ok my bad
<finalblast> bin/zsh: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
<finalblast> bin/zsh (for architecture x86_64):    Mach-O 64-bit executable x86_64
<finalblast> bin/zsh (for architecture arm64e):    Mach-O 64-bit executable arm64e
<adam12> OK. That looks correct.
<adam12> And the output of `arch`?
<finalblast> i386
<adam12> That's not correct. Hmm.
<adam12> What terminal are you running?
<adam12> Built-in Terminal.app or something else?
<finalblast> iterm with use rosetta setting on
<adam12> Ooh. OK, that explains it a little bit. Why Rosetta on?
<finalblast> something to do with m1 build problems
<finalblast> most tuts say to do it
<finalblast> guys on my dev dev also did it
<finalblast> and when this was working that setting was always on also
<finalblast> dev team*
<adam12> IMHO, it's bad advice and likely causing you more harm than good.
<adam12> Maybe good advice in 2019/2020 when the M1 launched, but most apps are caught up now.
<adam12> Anyways, let's go back to beginning.
<adam12> What's the original segfault?
<adam12> The listen gem?
<finalblast> dunno if rails install succeeds otherwise its a old version of ruby
<finalblast> y listen gem after i open localhost on the browser
<adam12> Are you using bundler?
<finalblast> ruby install
<finalblast> y
<adam12> Maybe try `bundle pristine`
<finalblast> dunno if homebrew also as something to do with it had some openssl version problems when installing
<adam12> Installing Ruby?
gr33n7007h has quit [Ping timeout: 246 seconds]
<finalblast> the gems with bundle install
<adam12> I'm not sure if rvm works around this, but rbenv definitely does. If you use homebrew+rbenv, rbenv will install ruby for you with it's own version of openssl that works with that Ruby.
<finalblast> ruby 2.7.3 requires openssl1.1
<adam12> or rather, rbenv+whatever plugin they suggest to install ruby, which is I think ruby-install
<finalblast> i managed to configure the project with rbenv after an rvm implode and still got this error
gr33n7007h has joined #ruby
<finalblast> last night i formated the pc and still no hope
<adam12> That makes me think that your gem's were compiled/linked to the wrong Ruby version possibly.
<adam12> Too many things going on, unfortunately.
<finalblast> yeah thats my suspicion also
<finalblast> would it be the listem gem?
<adam12> It's likely because the listen gem uses a FFI (Foreign Function Interface) to another library. Because of that, it's more prone to linking issues.
<finalblast> y thats a dependency
<adam12> But it's not usually the gem at fault, just that you might be sharing that gem install between Ruby versions.
<adam12> example: you `rbenv use 2.7` and then `bundle install --path vendor/bundle`. Inside `vendor/bundle` now has gems compiled for Ruby 2.7.
<adam12> If you `rbenv use 3.1` and then `bundle rails server`, you're using gems compiled for 2.7 on 3.1. This can and likely will cause segfaults.
<adam12> You need to be careful that you don't mix and match installed gems across Ruby versions, which could be happening here.
<ox1eef_> listen is troublesome, because it will install OS-specific libs (eg kqueue) and so someone on a different OS can't install it. Maybe there's a solution but I didn't find it.
<adam12> IMHO, strip out every bit of evidence of rvm. That means removing $HOME/.rvm and the `eval` line from your .zshrc or .zprofile.
<finalblast> should i try rbenv with rosetta option off?
<adam12> Install rbenv + the plugin for installing ruby. It should handle openssl versions for you, unless you go too far back (like Ruby 2.2 or something very problematic).
<adam12> IMHO, Rosetta is probably hurting you. I haven't ran it in _years_.
<adam12> But it's likely infected your entire system now.
<adam12> Homebrew will have had some binaries compiled x86.
<adam12> You could get away without a re-install by just uninstalling homebrew and then re-installing.
<finalblast> gonna try it ive got no options left
<adam12> finalblast: LOL. You've got this.
<adam12> finalblast: Dump existing rvm/rbenv installs. Dump homebrew. Re-install homebrew. Install rbenv+ruby-install plugin. Install your version of Ruby that you want. `bundle install`. If that fails you, we should confirm that you're not re-using old gems from a previous attempt.
<adam12> Make sure you're not using iTerm + Rosetta.
CesarMarinhoRJ has quit [Quit: Client closed]
<finalblast> adam12 will do it with rosetta off thanks for the help
<adam12> finalblast: Cheers.
borax has quit [Remote host closed the connection]
borax has joined #ruby
eddof13 has joined #ruby
brokkoli_origin has quit [Ping timeout: 246 seconds]
brokkoli_origin has joined #ruby
<finalblast> adam12 i want to kiss you on the mouth my friend
<finalblast> it worked!!!
<adam12> finalblast: WOOHOO
<adam12> Time to code!
<adam12> Heh.
<finalblast> yeah for real
<finalblast> luck most of the office is on vacation
<adam12> Nice.
<finalblast> thanks mate i was getting desperate
<adam12> your welcome! glad it worked.
ufi has joined #ruby
<finalblast> yeah so prob some apple update messed with rosetta fragile rvm install
<adam12> There's a good chance of that.
<adam12> The way the C extension libraries are linked can be finicky, and if they cross Ruby versions it becomes a bit hectic. Definitely a sharp edge.
roadie has joined #ruby
hightower2 has quit [Ping timeout: 264 seconds]
<mooff> is a terminal that can't print bold text really a terminal?
<adam12> mooff: ¯\_(ツ)_/¯
<mooff> what it means to be a tty is to support control sequences like formatting, screen manipulation, etc
<adam12> Technically this could be the TTY detection that is being used when Neovim opens a subprocess, I guess. I'm not really sure where the underlying issue is.
<adam12> Does neovim present a TTY when it shouldn't?
<adam12> I shipped a PR to fix my issue so good enough.
<mooff> possibly, yes
_ht has joined #ruby
<mooff> unless the Ruby program didn't care that it was not a tty
r3m has quit [Quit: WeeChat 4.0.0-rc1]
<mooff> isene: maybe you could try this approach.. "write the documentation first"
finalblast has quit [Quit: Client closed]
<mooff> > When Sam Littlewood designed BRender, he didn’t write the code. And then document it.
<mooff> > First, he wrote the manual. The full documentation
<mooff> > That served as the spec. Then the coding started.
r3m has joined #ruby
<isene> In the spirit of Leo Brodi in Thinking Forth
hightower2 has joined #ruby
roshanavand_ has quit [Ping timeout: 252 seconds]
roshanavand has quit [Ping timeout: 245 seconds]
tomtmym has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
desnudopenguino has joined #ruby
trillp has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
ufi has quit [Quit: Leaving]
trillp has left #ruby [WeeChat 3.8]
<mooff> getting my head around programming scrolling regions was difficult
<mooff> I don't think I managed it
m_antis has joined #ruby
<mooff> this will be a journey
markong has quit [Ping timeout: 246 seconds]
dostoyevsky2 has quit [Ping timeout: 260 seconds]
<ox1eef_> README-driven development.
<ox1eef_> Tried it recently. Definitely helps.
roadie has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.0.92)]
___nick___ has joined #ruby
m_antis is now known as alexical
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
caedmon has joined #ruby
<leah2> anyone see how the latest mastodon hole works?
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
dostoyevsky2 has joined #ruby
rvalue has quit [Ping timeout: 240 seconds]
___nick___ has joined #ruby
<newton> leah2, is there more context in an issue/web about it?
___nick___ has quit [Client Quit]
<leah2> i think the problem is that before, the file was first validated and then renamed
<leah2> and now it's first renamed and then validated
<newton> thx. surprised they're still using paperclip
<leah2> they use some fork
rvalue has joined #ruby
<weaksauc_> kt-paperclip is still active
<weaksauc_> which is what they use
___nick___ has joined #ruby
<leah2> yes
borax has quit [Ping timeout: 240 seconds]
___nick___ has quit [Ping timeout: 245 seconds]
didi79 has joined #ruby
humani has joined #ruby
graywolf has quit [Quit: WeeChat 3.8]
weaksauc_ has quit [Quit: Textual IRC Client: www.textualapp.com]
weaksauce has joined #ruby
infinityfye has quit [Quit: Leaving]
_ht has quit [Remote host closed the connection]
desnudopenguino1 has joined #ruby
desnudopenguino has quit [Ping timeout: 245 seconds]
desnudopenguino1 is now known as desnudopenguino
didi79 has quit [Quit: Client closed]
kokoro has quit [Ping timeout: 250 seconds]
<mooff> this should be possible in Ruby
<mooff> you can use libraries like unparser to get method source code (for procs, I think another library needs to be combined with unparser)
caedmon has quit [Ping timeout: 245 seconds]
Guest26nakilon has joined #ruby
<Guest26nakilon> > 1+@
<Guest26nakilon> & 1+2
<Guest26nakilon> what was the bot command? anyway
<adam12> Guest26nakilon: >>, like a basic IRB prompt
<Guest26nakilon> I suppose my irb is old )
<Guest26nakilon> >> [nil, 0, 1, nil, 2, nil, nil, nil, 4].drop(1).map.with_index(1).to_a
<Guest26nakilon> >> [nil, 0, 1, nil, 2, nil, nil, nil, 4].drop(1).map.with_index(1).chunk(&:first).to_a
<Guest26nakilon> I don't get why the latter skips the nil chunks
<Guest26nakilon> applying the &:first before the .with_index should case some error and it does not so I suppose it sees the tuples but why it shows only those that are predicate positive?
<Guest26nakilon> *cause
<Guest26nakilon> same on ruby 2.5 and 3.0
<Guest26nakilon> oh, is it because "nil and :_separator specifies that the elements should be dropped."
<weaksauce> correct it looks like
<Guest26nakilon> .chunk{|_,|!_} *sigh*
<adam12> >> true
<ruby[bot]> adam12: # => true (https://carc.in/#/r/ff1g)
<adam12> Hmph.
kokoro has joined #ruby
<Guest26nakilon> >> false
<Guest26nakilon> because I'm not identified?
<weaksauce> >> true
<ruby[bot]> weaksauce: # => true (https://carc.in/#/r/ff1h)
<weaksauce> probably
<mooff> = true
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
ruby-eval has joined #ruby
<mooff> = [nil, 0, 1].map { ! _1 }
<ruby-eval> => [true, false, false]
eddof13 has joined #ruby
markong has joined #ruby
tomtmym has quit [Quit: Gone.]
<havenwood> = [nil, 0, 1].map(&:!@)
<ruby-eval> => [true, false, false]
ua_ has quit [Ping timeout: 245 seconds]
sagax has quit [Ping timeout: 240 seconds]
Linux_Kerio has quit [Ping timeout: 246 seconds]
Guest26nakilon has quit [Quit: Client closed]
Sankalp has quit [Ping timeout: 264 seconds]
Sankalp has joined #ruby
humani has quit [Remote host closed the connection]
ufi has joined #ruby