ur5us has quit [Read error: Connection reset by peer]
mangold has quit [Ping timeout: 252 seconds]
mangold has joined #ruby
cschneid has quit [Ping timeout: 250 seconds]
nchambers has quit [Quit: i would have gotten away with it too if it weren't for those meddling kids and their dog]
mitt3ns is now known as agent_white
johnny56 has quit [Read error: Connection reset by peer]
chens has joined #ruby
ur5us has joined #ruby
clemens3 has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zenspider>
jayjo: often
Yxhuvud has joined #ruby
\void has quit [Quit: So long, and thanks for all the fish.]
hurricanehrndz has quit [Ping timeout: 252 seconds]
johnny56 has joined #ruby
aufi has joined #ruby
cschneid has joined #ruby
blackmesa has joined #ruby
blackmesa1 has joined #ruby
blackmesa has quit [Ping timeout: 268 seconds]
hurricanehrndz has joined #ruby
KeyJoo has joined #ruby
cschneid has quit [Ping timeout: 244 seconds]
mangold has quit [Quit: This computer has gone to sleep]
ansraliant has quit [Quit: My planet needs me]
mangold has joined #ruby
mikecmpbll has joined #ruby
roshanavand has joined #ruby
blackmesa1 has quit [Ping timeout: 260 seconds]
roshanavand has quit [Ping timeout: 250 seconds]
piks3l has joined #ruby
blackmesa1 has joined #ruby
akem has quit [Remote host closed the connection]
akem has joined #ruby
blackmesa1 has quit [Ping timeout: 272 seconds]
roshanavand has joined #ruby
<zenspider>
rawr
kapil____ has quit [Quit: Connection closed for inactivity]
quipa has joined #ruby
blackmesa1 has joined #ruby
themsay has joined #ruby
<quipa>
Hello, relatively new to Ruby been learning about it the last few weeks and enjoying it very much (I come from Python). I noticed that tk is no longer in the standard library and that the github project hasn't had many commits lately. Has it been abandoned or is it just stable enough that it doesn't get much attention from developers? Planning to develop a desktop GUI app with Ruby, shoes4 looks nice but seems to lack standard aspects like 'native' menu bars,
<quipa>
sure it seems I can emulate it in other ways but I would prefer something a bit more familiar.
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
chens has quit [Remote host closed the connection]
Freshnuts has quit [Quit: Leaving]
piks3l has quit [Quit: piks3l]
LinuxKnight has quit [Remote host closed the connection]
LinuxKnight has joined #ruby
bhaak has quit [Ping timeout: 250 seconds]
cnsvc has quit [Ping timeout: 256 seconds]
<zenspider>
quipa: afaik, it ships as a gem now but still is in the standard distro. also, not having many commits lately doesn't mean anything. Does it do what you want? then use it.
quipa has quit [Remote host closed the connection]
quipa has joined #ruby
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
hurricanehrndz has quit [Ping timeout: 244 seconds]
<Ring0`>
How can I make 0..INF.lazy.each_with_object(..) { ... }.first(5) lazy? it wont stop after 5 iterations
<Zarthus>
haven't done ruby in a while, but it sounds like you can just slice it before you .each_* over it?
<Ring0`>
I could but I simplified this example. Assume that thie 5 in .first() is a variable based on what happens in each_with_object
<Ring0`>
so the 'slice' must occur after each_with_object
blackmesa1 has quit [Ping timeout: 272 seconds]
akem has quit [Remote host closed the connection]
hurricanehrndz has joined #ruby
<leftylink>
interesting. I wonder if you could do take one elemtn, do the `each_with_object` to figure out how many mor elts to take, then get the rest of them
brandonkal has quit [Read error: Connection reset by peer]
Beams has joined #ruby
cnsvc has joined #ruby
roshanavand has quit [Ping timeout: 244 seconds]
Guest12374 has joined #ruby
gregf_ has joined #ruby
graphene has quit [Remote host closed the connection]
piks3l has joined #ruby
graphene has joined #ruby
za1b1tsu has quit [Ping timeout: 252 seconds]
dinfuehr has joined #ruby
dinfuehr_ has quit [Ping timeout: 268 seconds]
phaul has joined #ruby
cnsvc has quit [Remote host closed the connection]
<dionysus69>
jhaig: so fork 5 times and exec on last one?
<jhaig>
Also, do you need to use a system command (with exec or system) or might it be possible to do what you want in Ruby?
<dionysus69>
well I am launching an ssh tunnel so in the end it has to be a non ruby process
<dionysus69>
I am just using ruby to launch all this
<jhass>
1) why use ruby for this over a shellscript? 2) why can't the ruby process be allowed to live on? 3) fork & exec is just reimplementing system()
<jhaig>
Or could you just use system six times, with no forks or execs? Does the system not return?
<jhass>
ah right it doesn't, system -> spawn
reber has joined #ruby
<jhaig>
Unless there is more to do I would agree with jhass, that you could probably do this more easily in a simple shell script.
<dionysus69>
I use ruby because I have some secret credentials taken from the rails env, in script I would have to rely on env vars, plus I am not that good at bash
<jhass>
for this simple case it'd be just what'd you write on the commandline and tacking an & at the end, but if you need secrets okay
<jhass>
albeit if it's just one or two secret="$(ruby -ryaml -e "print YAML.load_file('config/secrets.yml')[ENV['RAILS_ENV']['secret']")" isn't too bad
<dionysus69>
so I fork 5 times and exec inside each of them and then exec from my main process too. this is so far what I came up with
<jhass>
no, use spawn
<jhass>
don't reimplement it
<dionysus69>
well, I use rails credentials Rails.credentials[:cool_hash]
<dionysus69>
ok I will look what spawn does exactly
<dionysus69>
but the result will be the same right?>
reber has quit [Remote host closed the connection]
blackmesa1 has joined #ruby
<jhass>
yeah
<jhass>
actually try if you can just spawn six times and let the parent die, I'd expect the childs to get reparented
mangold has quit [Ping timeout: 268 seconds]
roshanavand has joined #ruby
cnsvc has joined #ruby
<dionysus69>
couldnt really get how spawn works
<dionysus69>
whats wrong with if I use fork :)
blackswan has quit [Ping timeout: 268 seconds]
roshanavand has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
gregf_ has quit [Ping timeout: 256 seconds]
mostlybadfly has joined #ruby
cschneid has quit [Ping timeout: 268 seconds]
quipa has quit [Remote host closed the connection]
<dionysus69>
anyways, thanks for putting mine derailed self back on rails :P
bhaak has joined #ruby
<jhass>
spawn literally is fork & exec
<jhass>
system is fork, exec & waitpid
<jhass>
Kernel#` is fork, reopen stdout to a pipe in the parent, exec, read that pipe in the parent a& waitpid
<jhass>
and then there's the open3 stdlib giving you a shitload more wrappers and options around doing fork & exec
<jhass>
because it's actually hard to catch all the edge cases of doing it proper
roshanavand has joined #ruby
keden has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
cnsvc has quit [Ping timeout: 256 seconds]
bak1an has joined #ruby
bak1an has quit [Client Quit]
bak1an has joined #ruby
bak1an has quit [Client Quit]
GodFather has quit [Ping timeout: 250 seconds]
GodFather has joined #ruby
bak1an has joined #ruby
roshanavand has joined #ruby
aupadhye has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 250 seconds]
apparition has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
cnsvc has joined #ruby
Nicmavr has joined #ruby
crankharder has joined #ruby
cschneid has joined #ruby
eclm has joined #ruby
code_zombie has joined #ruby
paranoicsan is now known as paranoicsan[Away
paranoicsan[Away has quit [Quit: paranoicsan[Away]
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
vondruch_ has joined #ruby
rippa has joined #ruby
vondruch has quit [Ping timeout: 246 seconds]
vondruch_ is now known as vondruch
<jayjo>
I'm getting an error when trying to use commands like 'bundle install': Unknown ruby interpreter version (do not know how to handle): >=2.2,<3.0.
<jhass>
what's bundle -v?
<jayjo>
I'm using the phusion passenger docker image, actually, but not sure where this error comes from
<jhass>
maybe something for #passenger or whatever the channel was