havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.2.0, 3.1.3, 3.0.5, 2.7.7: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://t.ly/9ua4 | Logs: https://libera.irclog.whitequark.org/ruby/
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
quazimodo has joined #ruby
factor has joined #ruby
factor has quit [Client Quit]
factor has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 248 seconds]
eddof13 has joined #ruby
aeris has quit [Ping timeout: 255 seconds]
aeris has joined #ruby
bovis has quit [Quit: leaving]
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 260 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 260 seconds]
agent_white has joined #ruby
gastus_ has joined #ruby
gastus has quit [Ping timeout: 252 seconds]
Petruchio has quit [Ping timeout: 268 seconds]
razetime has joined #ruby
razetime has quit [Ping timeout: 248 seconds]
ur5us has quit [Ping timeout: 252 seconds]
reset has quit [Quit: reset]
cahoots has joined #ruby
cahoots has quit [Quit: leaving]
Linux_Kerio has joined #ruby
razetime has joined #ruby
CrazyEddy has quit [Ping timeout: 255 seconds]
agent_white has quit [Remote host closed the connection]
kovital has joined #ruby
infinityfye has joined #ruby
teclator has joined #ruby
quazimodo has quit [Ping timeout: 248 seconds]
tomtmym has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
dionysus69 has joined #ruby
razetime has quit [Ping timeout: 260 seconds]
otisolsen70 has joined #ruby
razetime has joined #ruby
quazimodo has joined #ruby
Linux_Kerio has quit [Ping timeout: 248 seconds]
Linux_Kerio has joined #ruby
ur5us has joined #ruby
haxn9k has joined #ruby
moldorcoder7 has joined #ruby
kovital has quit [Ping timeout: 256 seconds]
haxn9k has quit [Quit: Best CPUs can count to infinity twice without being bugged out by zero division errors or whatnot.]
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
joto has quit [Ping timeout: 248 seconds]
joto has joined #ruby
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp has joined #ruby
moldorcoder7_ has joined #ruby
moldorcoder7 has quit [Ping timeout: 252 seconds]
otisolsen70 has quit [Quit: Leaving]
joto has quit [Ping timeout: 260 seconds]
joto has joined #ruby
joto has quit [Read error: Connection reset by peer]
joto has joined #ruby
razetime has quit [Ping timeout: 246 seconds]
ccapndave has joined #ruby
szkl has joined #ruby
otisolsen70 has joined #ruby
ccapndave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest84 has joined #ruby
<Guest84> Can I make .rb file to .exe?
<joto> native compilation, not sure
<Guest84> Is there any automated tools for that?
Guest84 has quit [Client Quit]
teclator has quit [Ping timeout: 246 seconds]
teclator has joined #ruby
<ox1eef_> Even though they left, yes you can. Usually by "packing" ruby source code into an executable, where the Ruby source code lives as data that the executable unpacks and executes when the .exe is opened. ruby-packer is one such tool that does it.
razetime has joined #ruby
gonix has joined #ruby
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
quazimodo has quit [Ping timeout: 260 seconds]
hightower3 has quit [Ping timeout: 252 seconds]
Milos has quit [Ping timeout: 260 seconds]
Milos has joined #ruby
ultralan has joined #ruby
ultralan has quit [Remote host closed the connection]
lagash_ has quit [Remote host closed the connection]
Sankalp has quit [Ping timeout: 260 seconds]
_ht has joined #ruby
lagash_ has joined #ruby
Sankalp has joined #ruby
_ht has quit [Remote host closed the connection]
Sankalp has quit [Ping timeout: 252 seconds]
Petruchio has joined #ruby
_ht has joined #ruby
Sankalp has joined #ruby
mjacob_ has quit [Remote host closed the connection]
jidar has quit [Quit: Remote host closed the connection]
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Remote host closed the connection]
reset has joined #ruby
Al2O3 has quit [Ping timeout: 252 seconds]
___nick___ has joined #ruby
Al2O3 has joined #ruby
moo has quit [Quit: moo]
moo 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
jidar has joined #ruby
slothby has quit [Quit: brb ... maybe]
razetime has quit [Remote host closed the connection]
_ht has quit [Read error: Connection reset by peer]
ht_ has joined #ruby
ht_ is now known as _ht
dionysus69 has quit [Ping timeout: 252 seconds]
hansolo has quit [Remote host closed the connection]
infinityfye has quit [Quit: Leaving]
fredlinhares has joined #ruby
_ht has quit [Quit: _ht]
ht_ has joined #ruby
ht_ is now known as _ht
teclator has quit [Ping timeout: 256 seconds]
ht_ has joined #ruby
_ht has quit [Read error: Connection reset by peer]
ht_ is now known as _ht
otisolsen70 has quit [Quit: Leaving]
jidar has quit [Quit: Remote host closed the connection]
slothby has joined #ruby
<havenwood> I've seen folk use Ocra for exe too https://github.com/larsch/ocra
<havenwood> The Natalie implementation of Ruby has a nice compile to binary, but doesn't support Windows yet. https://natalie-lang.org/
<havenwood> Artichoke Ruby may be another option in the future https://www.artichokeruby.org/
<havenwood> I believe compile to binary is on their roadmap as well.
<ox1eef_> Ocra sounds like the same idea as ruby-packer. They do the job but come with drawbacks. Something like natalie / Artichoke probably have the most potential in the long run.
_ht has quit [Read error: Connection reset by peer]
<havenwood> Artichoke does run well in the browser already :) https://artichoke.run/
<havenwood> ox1eef_: Yeah, I think less sophisticated than ruby-packer but been around longer. I associate Ocra with little game deployment to Windows.
fredlinhares has quit [Quit: WeeChat 3.8]
<havenwood> Traveling Ruby was another along the same lines but I think support has waned https://github.com/phusion/traveling-ruby
<adam12> I was going to dig into shipping my own version of this, but I _really_ hope WASM just eliminates it.
<adam12> I'm hesitant to use any of the existing tools, since they seem to die off so quickly. Natalie is the most promising, which might be fine for simple CLI apps with few deps, eventually.
<adam12> If ruby core offered hooks to provide our own VFS, it might open up a few options, without resorting to huge patchsets. I'm not familiar enough with the innards to know how much tho.
<ox1eef_> Indeed, WASM will likely impact that space in the near future but not entirely clear how yet.
<adam12> bundler --standalone without binary deps, and without the Ruby version in the path would have been a decent compromise. Pair it with Makeself and it might have worked...
teclator has joined #ruby
_ht has joined #ruby
CrazyEddy has joined #ruby
<cxl> Hi all, quick style question. If you have this code, with lots of elsif that checks whether a value is within one range or another and returns a different value; would you use a switch case or is there a hash that could also express it? Example snippet: https://dpaste.org/otnEZ
<weaksauc_> case in with ranges would be better looking imo
szkl has quit [Quit: Connection closed for inactivity]
dionysus69 has joined #ruby
<cxl> thanks
<weaksauc_> and you can drop the explicit returns if you want to
ur5us has joined #ruby
<ox1eef_> A Hash could not express < 0, otherwise, it could work.
hansolo has joined #ruby
<ox1eef_> I'm not sure 'case in' could even handle that case. If you handle == 0, and < 0 separately, then case in, a Hash, etc should open up as possible.
<ox1eef_> Probably because I yanked those gems - I guess.
<adam12> cxl: I'd totally case/when with ranges. Also, if you did stick with the comparison syntax, check out this article: http://llewellynfalco.blogspot.com/2016/02/dont-use-greater-than-sign-in.html
<adam12> ox1eef_: Indeed. I just thought it was interesting. I can generally spot your gems with the .rb ext.
<ox1eef_> :))
<adam12> I was mkdir'ing the destination path before realizing the gem was yanked, so I have some 404 releases. Need to prune.
<weaksauc_> case in could work with an infinite range ox1eef_
<weaksauc_> in ..0
<weaksauc_> works fine
<ox1eef_> Indeed !
___nick___ has quit [Ping timeout: 252 seconds]
<weaksauc_> though the one thing i dislike about ranges is the fact that .. includes the endpoint so you'd have to do ...0 .. vs ... never feels right to me
<weaksauc_> in any event it's probably a typo in the first place since < 10 covers it anyway
<ox1eef_> Yep, or ..-1
<weaksauc_> that's a good point adam12
<ox1eef_> I think I'd prefer ..9, etc, because ...10 requires a bit to unpack in my mind. I usually avoid ... altogether.
<weaksauc_> yeah same
<weaksauc_> just like unless feels rough to understand for me
_ht has quit [Read error: Connection reset by peer]
<weaksauc_> if this is not true feels more natural but maybe that's because I grew up on C
<adam12> unless outside of a postfix is no bueno for me. And if it has any type of conditional in it too, forget about it.
<weaksauc_> yeah the only acceptable time for me is as a postfix
<adam12> No energy for the mental gymnastics involved to read it. And as we know 1 thing about conditions, it is that they gather _more_ conditionals as time progresses.
<ox1eef_> Same here. It can make for some nice one-liners, sometimes.
teclator has quit [Ping timeout: 248 seconds]
___nick___ has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
szkl has joined #ruby
Linux_Kerio has quit [Ping timeout: 260 seconds]
artemon has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
<havenwood> +1 for case with beginless ranges
<havenwood> cxl: As a case statement, you can use repeated beginless ranges something like: https://gist.github.com/havenwood/b8506f5f28665a8d241268aa1cd2128a
<havenwood> Or extract a constant Hash for those pairings.
<havenwood> I dunno if your gaps were intended or off-by-one errors?
<havenwood> If intended, never mind the repeated ranges without beginnings.
quazimodo has joined #ruby
_aeris_ has joined #ruby
aeris has quit [Read error: Connection reset by peer]
_aeris_ is now known as aeris
gcd has joined #ruby
tomtmym has quit [Quit: Gone.]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
c10l has quit [Quit: See ya! o/]
c10l has joined #ruby