havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 2.7.2, 2.6.6, 3.0.0-preview1: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3 | Can't talk? Register/identify with NickServ
drincruz has quit [Ping timeout: 246 seconds]
<leftylink> well, it was pony, and I was wrong, they do have precedence: unary > binary. https://tutorial.ponylang.io/expressions/ops.html#precedence
<leftylink> missed that
jenrzzz has joined #ruby
ur5us_ has joined #ruby
<riceandbeans> I think ponylang is the one where foo/0 isn't undef
<leftylink> now that you mention it, I think I remember something of the sort
<leftylink> interesting
jenrzzz has quit [Ping timeout: 265 seconds]
<riceandbeans> I once interviewed at a place that had a large usage of ponylang in production
<riceandbeans> I couldn't hang when they gave me a coding challenge
stryek has quit [Quit: Connection closed for inactivity]
<riceandbeans> jhass: I think looking back I can't say what you said, I think I have to use decimal on the right
<riceandbeans> expect((File.stat('/etc/rc.conf').mode & 0o700) >> 6).to be >= 4
<riceandbeans> not
<riceandbeans> expect((File.stat('/etc/rc.conf').mode & 0o700) >> 6).to be >= 0o400
<riceandbeans> I end up getting got 6, expected 256
<leftylink> well. one has to be consistent
<leftylink> either one should shift by 6 and expect either 4 in any representation (0x4, 0o4, 4, etc.), or one should not shift at all and expect 256 in any representation (0o400, 0x100, 256)
<leftylink> pinkpandabot: rb 256 >> 6
<pinkpandabot> 4 - https://carc.in/#/r/9zpz
<leftylink> whether one uses decimal, hexadecimal, octal, or binary is absolutely immaterial since they're all the same number
BH23 has quit [Quit: Connection closed for inactivity]
<riceandbeans> So if I wanted to ensure it was 0755, would it be better to say it like that too?
<riceandbeans> expect((File.stat('/etc/rc.conf').mode & 0o777)).to eq(493)
<riceandbeans> I don't know
<riceandbeans> My current is .mode.to_s(8)[2,4]).to eq('755')
<riceandbeans> I guess I should have 0o755 on the other end?
<riceandbeans> Yeah, that works
<nakilon> weird literal 0o400
<nakilon> why not 0400
tpanarch1st has quit [Ping timeout: 264 seconds]
<nakilon> I mean I didn't even know you can write like that
<al2o3-cr> the optional 'o'/'O' is not needed. the same way 0d42 or 0D42 is not needed.
akem_ has joined #ruby
akem has quit [Ping timeout: 246 seconds]
Tempesta has quit [Quit: See ya!]
ChmEarl has quit [Quit: Leaving]
jenrzzz has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 265 seconds]
nofxx has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
Azure|dc has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
Azure|dc has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lucasb has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 256 seconds]
madper has joined #ruby
ruurd has quit [Quit: bye folks]
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
gix has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
al2o3-cr-tmp has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
phaul has quit [Ping timeout: 240 seconds]
phaul has joined #ruby
al2o3-cr-tmp is now known as al2o3-cr
jenrzzz has quit [Ping timeout: 240 seconds]
duderonomy has quit [Ping timeout: 260 seconds]
_whitelogger has joined #ruby
Tempesta has joined #ruby
adu has joined #ruby
duderonomy has joined #ruby
skyikot has joined #ruby
ur5us_ has quit [Ping timeout: 264 seconds]
dviola has quit [Quit: WeeChat 2.9]
al2o3-cr has quit [Quit: WeeChat 2.9]
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
cloud69 has joined #ruby
cthu| has joined #ruby
akem__ has joined #ruby
akem_ has quit [Remote host closed the connection]
cthulchu_ has quit [Ping timeout: 240 seconds]
phaul has quit [Ping timeout: 260 seconds]
nofxx has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
_whitelogger has joined #ruby
phaul has joined #ruby
supercoven has joined #ruby
supercoven has quit [Max SendQ exceeded]
supercoven has joined #ruby
donofrio has quit [Remote host closed the connection]
ur5us_ has joined #ruby
jenrzzz has joined #ruby
dfucci has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
dfucci has quit [Ping timeout: 240 seconds]
donofrio has joined #ruby
_whitelogger has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
madper has quit [Remote host closed the connection]
_whitelogger has joined #ruby
ur5us_ has quit [Ping timeout: 264 seconds]
cthu| has quit [Ping timeout: 256 seconds]
skyikot has quit [Ping timeout: 240 seconds]
sonne has quit [Quit: ZNC - http://znc.in]
sonne has joined #ruby
cloud69 has quit [Quit: Connection closed for inactivity]
Rudd0 has quit [Ping timeout: 240 seconds]
adu has quit [Quit: adu]
jenrzzz has joined #ruby
claudiuinberlin has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
<Tuor> Hi, is `@hashes[hash] = Duplicate.new unless @hashes.key?(hash)` the same as `@hashes[hash] ||= Duplicate.new`?
phage has joined #ruby
<havenwood> Tuor: Nope, that's not the same.
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> Tuor: The latter ||= one is like: @hashes[hash] || @hashes[hash] = Duplicate.new
<havenwood> Tuor: So: @hashes[hash] = Duplicate.new unless @hashes[hash]
<havenwood> Tuor: The key may be set but have a falsey value.
dfucci has joined #ruby
<Tuor> OK. In my case, a falsey value is not a wanted state. So unless @hashes[hash] or ||= is more what I want. :)
<Tuor> I was worried about @hashes not having the key, but then @hashes[hash] would just return nil and this is a flasey value and it would be set.
<Tuor> Thank you.
infernix has quit [Quit: ZNC - http://znc.sourceforge.net]
infernix has joined #ruby
ur5us_ has joined #ruby
<jhass> leftylink: nakilon: I like the 0o prefix, just a leading 0 is easy to misinterpret IMO (in Crystal we only support 0o due to this)
claudiuinberlin has quit [Ping timeout: 260 seconds]
BenDover has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
phage has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akem__ is now known as akem
phage has joined #ruby
daemonwrangler has quit [Ping timeout: 246 seconds]
vondruch has joined #ruby
ur5us_ has quit [Ping timeout: 264 seconds]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
johnny56_ has quit [Quit: johnny56_]
Rudd0 has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
Raul` has joined #ruby
Raul` has quit [Quit: ERC (IRC client for Emacs 27.1)]
Raul has joined #ruby
Raul is now known as Guest92453
Guest92453 is now known as Raul`
Raul` is now known as Nawn
Nawn has quit [Read error: Connection reset by peer]
Nawn has joined #ruby
<Nawn> ^_^
Nawn has left #ruby [#ruby]
phage has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rippa has joined #ruby
adu has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
phage has joined #ruby
phaul has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
vondruch has quit [Ping timeout: 260 seconds]
sjums has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
Rudd0 has quit [Remote host closed the connection]
arkinor has joined #ruby
akem has quit [Ping timeout: 265 seconds]
akem has joined #ruby
baojg has quit [Remote host closed the connection]
jenrzzz has joined #ruby
baojg has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
adu has quit [Quit: adu]
DylanJ has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
arkinor has quit [Ping timeout: 264 seconds]
roshanavand has quit [Ping timeout: 264 seconds]
adu has joined #ruby
akem has quit [Ping timeout: 240 seconds]
drincruz has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
cow[moo] has quit [Quit: Textual IRC Client: www.textualapp.com]
plant_enjoyer has joined #ruby
roshanavand has joined #ruby
vondruch has joined #ruby
<plant_enjoyer> hey, which vim plugins are y'all using? I'm using LanguageClient-neovim with Ale and completeopt, but it's kinda sluggish
drincruz has quit [Ping timeout: 240 seconds]
<plant_enjoyer> I tried VSCode and it has broken vim emulation, completion in Emacs doesn't work at all :V
<Tuor> I'm not using vim, but RubyMine for ruby and I love it!
<plant_enjoyer> it's not free :(
DaRock has joined #ruby
<Tuor> Intellij community version with ruby plugin? But I don't know if it's similar.
cow[moo] has joined #ruby
<plant_enjoyer> oh, and it can even be used for commercial development. thanks Tuor, I'll check it out
akem has joined #ruby
<Tuor> I don't regrett paying every year for my IDE, I really love it for ruby (and git!).
<plant_enjoyer> well, a yearly license would cost like half of my monthly salary lol
<Tuor> :(
<plant_enjoyer> and I'm using ruby for my own tools, my employer sadly won't buy me an IDE for that :P
<plant_enjoyer> alright, it's downloading. let's see how bad those scary IDEs are
al2o3-cr has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Jonopoly has joined #ruby
<plant_enjoyer> damn, there's no ruby plugin, haha. uninstalling :D
<Tuor> Oh sorry! :(
<plant_enjoyer> no worries!
drincruz has joined #ruby
impermanence has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.9]
al2o3-cr has joined #ruby
blackmesa has joined #ruby
<Tuor> plant_enjoyer: Google gives other suggestions I did never hear of, tryed those?
<Tuor> I used Atom in the past, but no idea how well it does with ruby.
<plant_enjoyer> Tuor: atom is pretty dead IIRC. honestly I'd prefer if Emacs just worked, but it just.. doesn't
<Tuor> maybe there is a #emacs channel that can help you solve the problem. ;)
<plant_enjoyer> setting up environments for dynamic languages has always been a pain for me
<plant_enjoyer> yeah there is, but stuff is plugin-specific :P so I'd have to open some issues etc
<Tuor> plant_enjoyer: maybe you should open them, because maybe they get fixed. ;)
akem_ has joined #ruby
<plant_enjoyer> Tuor: true, for now maybe I'll get back to work so I don't get yelled at :D
<Tuor> ^^ probably doesn't have every feature you like, but: https://github.com/vim-ruby/vim-ruby
akem has quit [Ping timeout: 256 seconds]
akem_ has quit [Max SendQ exceeded]
akem_ has joined #ruby
<plant_enjoyer> the vim setup I have *works*, but it's slow :P I'll just live with the slowness for now
phage has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
phage has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
<adam12> plant_enjoyer: I use vscode+vim integration and it's not bad.
<adam12> plant_enjoyer: Once the nvim integration improves a bit I might go back to it, because it worked especially well.
<plant_enjoyer> adam12: I had vscode wreck my entire file when I used undo and redo a couple times :/
<plant_enjoyer> with vim bindings I mean
<adam12> plant_enjoyer: Weird
<plant_enjoyer> adam12: yeah, and it wasn't a one-time freak accident, it happened a couple of times lol
<adam12> I have had near zero issues
<adam12> Maybe a bug randomly every few months, but nothing recently.
fercell has joined #ruby
<adam12> And I'm in it 10+ hours a day, 5 days a week.
dviola has joined #ruby
charrit69 has joined #ruby
kurko_ has joined #ruby
baojg has quit [Remote host closed the connection]
<plant_enjoyer> yeah well, I could get unlucky :P
plant_enjoyer has quit [Quit: Leaving]
baojg has joined #ruby
moldorcoder7 has quit [Ping timeout: 264 seconds]
phage has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
impermanence has quit [Quit: Connection closed]
skyikot has joined #ruby
moldorcoder7 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
DaRock has quit [Ping timeout: 256 seconds]
ChmEarl has joined #ruby
blackmesa has quit [Quit: WeeChat 3.0]
phaul has quit [Ping timeout: 240 seconds]
phaul has joined #ruby
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kurko_ has joined #ruby
Rudd0 has joined #ruby
Jonopoly has quit [Read error: Connection reset by peer]
cloud69 has joined #ruby
orbyt_ has joined #ruby
charrit69 has quit [Quit: Konversation terminated!]
Rooff has joined #ruby
<Rooff> Good day brothers ;) im just want to start learning ruby then rails and react its my plans for future. Just ask to tell me one or two good ruby starts books which u thing will be not time loose
Rooff has quit [Remote host closed the connection]
phaul has quit [Ping timeout: 240 seconds]
BH23 has joined #ruby
BH23 has quit [Client Quit]
BH23 has joined #ruby
cthu| has joined #ruby
phaul has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
phaul has quit [Ping timeout: 256 seconds]
phaul has joined #ruby
fercell has quit [Quit: WeeChat 2.9]
silviu29 has quit [Ping timeout: 244 seconds]
silviu has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
cloud69 has quit []
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix has joined #ruby
cloud69 has joined #ruby
htmnc has joined #ruby
<htmnc> I was peeling back under the hood using ruby-doc and pry, so I was trying to check out how yield is run, I can run ``show-doc Proc#call`` but that shows that call was stubbed out in proc
<htmnc> looking at the proc.c @ tag v2_5_1 on the source tree I can see that it's commented out with an #if 0 macro, too. question is under what scope would I find ``yield`` instead, since I assume that's what is run instead when Proc#call is executed in this ver
<htmnc> so, with that said, tl;dr for my qs: (1) proc#call just aliases to yield now, no? since there used to be performance differences years ago
<htmnc> and (2) where might I find the source of the ``yield`` keyword or whatever else is actually run when Proc#call is executed now?
<htmnc> thank you for your time
roshanavand has quit [Quit: Quitting...]
roshanavand has joined #ruby
<riceandbeans> When did Ruby add sets?
roshanavand_ has joined #ruby
<jhass> so looong ago
roshanavand has quit [Ping timeout: 265 seconds]
roshanavand_ is now known as roshanavand
<riceandbeans> Huh, I guess I just never noticed them until i was in Python on the regular
<riceandbeans> I thought of it as sort of a Python thing really
phage has joined #ruby
phage has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
teclator has quit [Ping timeout: 240 seconds]
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cliluw has joined #ruby
cnsvc has joined #ruby
kurko_ has joined #ruby
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
roshanavand_ is now known as roshanavand
TCZ has joined #ruby
BH23 has quit [Quit: Connection closed for inactivity]
kurko_ has quit [Ping timeout: 264 seconds]
fercell has joined #ruby
sh7d has quit [Quit: meh]
fercell has quit [Client Quit]
sh7d has joined #ruby
fercell has joined #ruby
fercell has quit [Client Quit]
adu has quit [Quit: adu]
ta has quit [Ping timeout: 240 seconds]
rubydoc has joined #ruby
orbyt_ has joined #ruby
adu has joined #ruby
baojg has quit [Remote host closed the connection]
GodFather has quit [Ping timeout: 240 seconds]
baojg has joined #ruby
GodFather_ has quit [Ping timeout: 268 seconds]
howdoi has joined #ruby
ur5us_ has joined #ruby
teclator has joined #ruby
pwl has joined #ruby
GodFather_ has joined #ruby
GodFather has joined #ruby
pxl_ has joined #ruby
supercoven has quit [Ping timeout: 240 seconds]
skyikot has quit [Ping timeout: 240 seconds]
dfucci has quit [Ping timeout: 272 seconds]
ta has joined #ruby
cloud69 has quit [Quit: Connection closed for inactivity]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pwl has quit [Remote host closed the connection]
pxl_ has quit [Remote host closed the connection]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
jcalla has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 260 seconds]
GodFather has quit [Remote host closed the connection]
GodFather_ has quit [Remote host closed the connection]
cisco has joined #ruby
BenDover has quit [Quit: BenDover]
GodFather has joined #ruby
dfucci has joined #ruby
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
<nakilon> is .uniq collision safe?
<nakilon> I mean, for example, .uniq{ |_| [something_returning_integer[_], something_returning_string[_]] }
GodFather has quit [Remote host closed the connection]
GodFather has joined #ruby
htmnc has quit [Quit: Leaving]
hassox has joined #ruby
hassox has quit [Client Quit]
cisco has quit [Ping timeout: 246 seconds]
ruurd has joined #ruby
<ruurd> Yes well we get into trouble if we want to know what 0133 is... Is that 0o133 or is it 0x133?
advorak has joined #ruby
<advorak> I'm trying to use a gem called cupsffi .. is anybody familiar with a more recent gem to, say, print pdf data directly to a printer? My other option is to directly pipe the pdf data to the 'lp' command, but I am having trouble finding how to pipe data to an external command?
adu has quit [Quit: adu]
moldorcoder7 has quit [Ping timeout: 240 seconds]
GodFather has quit [Remote host closed the connection]
moldorcoder7 has joined #ruby
<ruurd> pipe?
<advorak> echo "pdfdata" | lp -d PRINTERNAME
<ruurd> Scratch that. Just use popen or popen3
<advorak> I'm hoping ruby can handle the "randomstringofdata" and pipe it to the command lp -d PRINTERNAME
GodFather has joined #ruby
<ruurd> Yes well you always could resort to dumping your stuff in a tempfile and feed that to lp in a popen
<ruurd> IO.popen("lp") {lp_io| lp_io.write blob}
<ruurd> Will print to your default printer as far as I know
adu has joined #ruby
<advorak> thank you.. I'm experimenting right now with IO.popen..
Nahra has joined #ruby
<advorak> got it. IO.popen("lp",'w') {|io| io.write 'hello world' } # I think it defaults to read-only unless i specify the 'w' .. It works now! :-)
adu has quit [Quit: adu]
<advorak> thank you so much!
blender_ has joined #ruby
blender has quit [Ping timeout: 260 seconds]
evdubs has quit [Quit: Leaving]
<ruurd> No problem.
<ruurd> you might want to have a look at the options of lp, Otherwise you can use lpr which is roughly the same but different :-)
ur5us_ has quit [Remote host closed the connection]
Nahra has quit [Ping timeout: 246 seconds]
ur5us_ has joined #ruby
evdubs has joined #ruby
kent\n has quit [Quit: No Ping reply in 180 seconds.]
kent\n has joined #ruby
ruurd has quit [Quit: bye folks]
<advorak> yeah I had the options for lp down for the purpose I needed, but I didn't know how to pipe things to it from ruby..
<advorak> and I was able to do some nifty things using 'cupsffi' but I couldn't figure out how to engage the 'fit-to-page' scaling option so I gave up and opted for something like IO.pipe ..