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]
<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>
ox1eef_: Yeah, I think less sophisticated than ruby-packer but been around longer. I associate Ocra with little game deployment to Windows.
<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.
<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]