yeticry has quit [Read error: Connection reset by peer]
gusrub has quit [Ping timeout: 268 seconds]
bturker has quit [Ping timeout: 256 seconds]
omphe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta_ has quit [Ping timeout: 260 seconds]
Derderderd has quit [Ping timeout: 260 seconds]
kareelee has joined #ruby
gry has joined #ruby
s2013 has joined #ruby
gusrub has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
railssmith has joined #ruby
yeticry has joined #ruby
plujon has joined #ruby
Madplatypus has joined #ruby
kareelee has quit [Ping timeout: 245 seconds]
sneakers has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
yeticry has quit [Ping timeout: 260 seconds]
yeticry has joined #ruby
nettoweb has quit [Client Quit]
ta_ has joined #ruby
<adam12>
Rich_Morin: That's the one I meant - stdlib Logger.
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_whitelogger has joined #ruby
kareelee has joined #ruby
aryaching has joined #ruby
<Radar>
I've got an issue here where a delayed_job worker is killed during a deploy. The worker is running a really long running job (think 10s of minutes) and it's important that it doesn't get killed. Similarly, it's important that deploys are not blocked because one of these workers is running.
<Radar>
I was thinking about moving the working part out to a separate script that is invoked via a Rake task, which is invoked via Cron.
<Radar>
That way then it's outside of the delayed job queue entirely.
<mikecmpbll>
Radar : does your deploy restart DJ? and how?
<Radar>
Is that a sensible thing to do?
<Radar>
mikecmpbll: yes
aryaching_ has quit [Ping timeout: 246 seconds]
<Radar>
mikecmpbll: not sure how... checking
<mikecmpbll>
can't say i'm massively familiar with restarting dj even though i use it (😅) but it feels like it shouldn't affect any running jobs
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Radar>
It absolutely does affect it.
<Radar>
The jobs are given X seconds to finish running and if they don't finish in that time then they're forcefully terminated.
kareelee has quit [Ping timeout: 258 seconds]
ta_ has quit [Ping timeout: 256 seconds]
firstdayonthejob has quit [Ping timeout: 250 seconds]
<mikecmpbll>
oic. hmm
bturker has joined #ruby
s2013 has joined #ruby
agent_white has quit [Quit: backinnabit]
Derderderd has joined #ruby
dnicole has joined #ruby
kareelee has joined #ruby
MrSamuel has joined #ruby
<centrx>
Radar: If you can be absolutely sure that the spun-out job will finish, and you don't need to monitor it, seems like a not too bad solution
<mikecmpbll>
Radar : what happens to the job after the restart anyways, does it remain in the table?
<centrx>
Could also split the long job into parts
<Radar>
mikecmpbll: job does not restart because it has a status called "processing"
<mikecmpbll>
ah, so it just gets stuck there.
<Radar>
jobs that are tagged as "processing" do not have their process resumed
bturker has quit [Ping timeout: 256 seconds]
enterprisey has joined #ruby
<mikecmpbll>
maybe you can catch whatever signal gets sent to the process and do something graceful :/
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar>
like "wait two hours for the job to finish"? :
sp4rrow_ has quit [Quit: The Internet needs a break and I need a cookie]
<Radar>
:P
blackmesa has quit [Ping timeout: 265 seconds]
<Radar>
centrx: Yeah splitting it into multiple parts seems like another sensible option too.
<mikecmpbll>
:D idk. maybe stop the job properly and reschedule it
<c-c>
Radar: so is this "worker" a process or a thread?
<Radar>
c-c: process
<c-c>
Radar: so, did you fork it someplace or?
<Radar>
c-c: It's a delayed_job worker
riskish has joined #ruby
<c-c>
thats from which lib/gem?
<Radar>
delayed_job.
<Radar>
It's ran with `bundle exec rake jobs:work`
<c-c>
well I've just been rehashing process control on linux with ruby
<c-c>
so this is interesting
dikaio has quit [Quit: Lost terminal]
<c-c>
but, this gem is not familiar to me, plus its rails
Dobler has joined #ruby
<c-c>
generally to ensure your process runs until it finishes, you fork, then detach from parent process: fork do; Process.detach; end
kareelee has joined #ruby
<c-c>
Radar: did you look at job parameters
<Radar>
c-c: "job parameters"?
<c-c>
Delayed:Worker.max_run_time
<Radar>
I think that setting is used to terminate a job if it runs for too long.
<c-c>
github for delayed_job says default is 4 hours, but perhaps you set it someplace
<mikecmpbll>
yeah, that's an option for dj to kill long running jobs itself, afaik
alexar has quit []
kareelee has quit [Ping timeout: 245 seconds]
nettoweb has joined #ruby
<centrx>
Radar: You could also just anticipate deploys and prevent the job from running before deploys
ta_ has joined #ruby
<centrx>
s/running/starting
<Radar>
centrx: not how this org works
<Radar>
centrx: customer service team are doing the data uploads for this job and they don't tell us when they're running it
<Radar>
similarly, we don't give them warning we're doing a deploy
<centrx>
sounds like one big happy family
<Radar>
It's hard coordinating over a hundred people to play nice on a monolith :P
ta_ has quit [Read error: Connection reset by peer]
davidt_ has joined #ruby
ta_ has joined #ruby
montanonic has joined #ruby
kareelee has joined #ruby
davidt has quit [Ping timeout: 245 seconds]
kareelee has quit [Ping timeout: 258 seconds]
h1fuelcell has joined #ruby
Madper|AFK has quit [Remote host closed the connection]
gregor3005 has joined #ruby
agent_white has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
marr has quit [Ping timeout: 250 seconds]
gloscombe has quit [Quit: gloscombe]
beilabs_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 260 seconds]
leitz has joined #ruby
<leitz>
If I do a short test case on Linux and run it under an old Ruby, it shows me the tests. If I do the same thing under a new Ruby on Windows, it shows nothing. Is that Windows, new Ruby, or operator error?
<leitz>
I'm in chapter 1 of Greg Brown's Ruby Best Practices, page 17.
jeffaustin81 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
kareelee has joined #ruby
<zenspider>
leitz: probably windows. how are you running?
arescorpio has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
<leitz>
zenspider, just "ruby tc_MyClass.rb"
<leitz>
I think I duplicated the process on my CentOS box at home, but I'm old and the memory fades...
<leitz>
At home I get the dots and Finished, number of tests, etc.
<leitz>
On Winderz I get zip.
kareelee has quit [Ping timeout: 265 seconds]
<leitz>
Which is kind of a bummer since the entire first chapter is on testing. :(
plujon has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
<leitz>
Okay, nappy time for me. I've had some Ruby fun this evening.
leitz has quit [Quit: Nappy time]
<zenspider>
hrm... you SHOULD get output that way. As long as it really is the same code. I'd guess that you're not requiring "minitest/autorun" (or equivalent) on the windows side
gusrub has quit [Remote host closed the connection]
<zenspider>
MOST windows problems come from people double clicking a file and the terminal disappears as soon as it is done running. so it DOES run, but you don't see anything if it is really fast
<zenspider>
but in your case...
<zenspider>
try running via rubymine or other editor w/ test integration?
cibs has quit [Ping timeout: 268 seconds]
cibs has joined #ruby
kareelee has joined #ruby
SteenJobs has joined #ruby
millerti has joined #ruby
gusrub has joined #ruby
h1fuelce_ has joined #ruby
kareelee has quit [Ping timeout: 248 seconds]
edwardly has quit [Ping timeout: 248 seconds]
h1fuelcell has quit [Ping timeout: 260 seconds]
enterprisey has quit [Remote host closed the connection]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
x77686d has joined #ruby
chopin has joined #ruby
kareelee has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
saneax is now known as saneax-_-|AFK
jenrzzz has quit [Ping timeout: 245 seconds]
chopin_ has quit [Ping timeout: 260 seconds]
blackbom1 has joined #ruby
kareelee has quit [Ping timeout: 246 seconds]
MrSamuel has quit [Quit: Leaving]
bmurt has joined #ruby
blackwind_123 has quit [Ping timeout: 258 seconds]
blackbombay has quit [Ping timeout: 260 seconds]
sdothum has quit [Ping timeout: 260 seconds]
davidt has joined #ruby
h1fuelce_ has quit [Remote host closed the connection]
davidt_ has quit [Ping timeout: 245 seconds]
bmurt has quit [Ping timeout: 256 seconds]
bmurt has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
jaguarmagenta has quit [Remote host closed the connection]
chouhoulis has joined #ruby
shinnya has joined #ruby
astrobunny has quit [Ping timeout: 258 seconds]
astrobunny has joined #ruby
Anonymoose2 has joined #ruby
chouhoul_ has quit [Ping timeout: 256 seconds]
chouhoulis has quit [Ping timeout: 250 seconds]
kareelee has joined #ruby
jhack has quit [Quit: jhack]
reverberations has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
tvw has quit [Ping timeout: 250 seconds]
ixti has quit [Quit: WeeChat 1.6]
Anonymoose2 has quit [Ping timeout: 248 seconds]
h1fuelcell has joined #ruby
kareelee has quit [Ping timeout: 260 seconds]
GodFather has quit [Ping timeout: 246 seconds]
jeyraof has joined #ruby
ResidentBiscuit has joined #ruby
astrobunny has quit [Remote host closed the connection]
h1fuelcell has quit [Ping timeout: 248 seconds]
solocshaw has joined #ruby
GodFather has joined #ruby
cdg_ has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
h1fuelcell has joined #ruby
sdwrage has quit [Quit: Leaving]
jhack has joined #ruby
kareelee has joined #ruby
jhack has quit [Client Quit]
jhack has joined #ruby
kareelee has quit [Ping timeout: 244 seconds]
reverberations has joined #ruby
h1fuelcell has quit [Ping timeout: 246 seconds]
tau has quit [Remote host closed the connection]
solocshaw has quit [Ping timeout: 246 seconds]
Channel6 has joined #ruby
kareelee has joined #ruby
ghr has quit [Ping timeout: 268 seconds]
kareelee has quit [Read error: Connection reset by peer]
bonhoeffer has joined #ruby
kareelee_ has joined #ruby
adavia has quit [Ping timeout: 245 seconds]
<bonhoeffer>
i'm trying to understand "9\x9C\xBB\xA8J\x1F\xBC\xE21\xEE\x066" -- this is just a String -- but as bytes -- but what is that 9 at the start
f4 has joined #ruby
ghr has joined #ruby
<bonhoeffer>
a[0] => 9, a[1] => \x9c
<centrx>
Looks like it might be a 9
<bonhoeffer>
or maybe 0x09
<bonhoeffer>
?
<bonhoeffer>
or \x09 in that syntax
gusrub has quit [Remote host closed the connection]
<bonhoeffer>
ruby just doesn't bore you with extra digits
jeyraof has quit [Quit: This computer has gone to sleep]
SesMan has quit [Remote host closed the connection]
symm-_ has quit [Quit: Leaving...]
SesMan has joined #ruby
symm- has joined #ruby
awc has joined #ruby
SesMan has quit [Remote host closed the connection]
rodfersou has joined #ruby
SesMan has joined #ruby
awc has quit [Client Quit]
nixmaniack has joined #ruby
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
jaguarmagenta has quit [Remote host closed the connection]
stoffus_ has joined #ruby
stoffus has quit [Ping timeout: 265 seconds]
SpiffTR has quit [Quit: Leaving.]
jenrzzz has quit [Ping timeout: 245 seconds]
ishe_ua has joined #ruby
aryaching has joined #ruby
SpiffTR has joined #ruby
koooge has quit [Quit: Leaving...]
xall has joined #ruby
aryaching_ has joined #ruby
SesMan has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 260 seconds]
minimalism has quit [Quit: minimalism]
SesMan has joined #ruby
lenwood has quit [Ping timeout: 260 seconds]
aryaching has quit [Ping timeout: 244 seconds]
lenwood has joined #ruby
jaguarmagenta has joined #ruby
SesMan has quit [Remote host closed the connection]
AlexRussia_ has quit [Ping timeout: 268 seconds]
SesMan has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
axsuul has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
Joufflu has quit [Quit: Leaving]
hutch34 has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
stoffus_ has quit [Quit: leaving]
ta__ has quit [Read error: Connection reset by peer]
SesMan has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 245 seconds]
SesMan has joined #ruby
lenwood has quit [Quit: Konversation terminated!]
lenwood has joined #ruby
sarlalian_ has quit [Ping timeout: 246 seconds]
minimalism has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
SesMan has quit [Remote host closed the connection]
h1fuelcell has joined #ruby
ta_ has joined #ruby
SesMan has joined #ruby
xberg has quit []
blackmesa has joined #ruby
cyphase_eviltwin has joined #ruby
sarlalian has joined #ruby
h1fuelcell has quit [Ping timeout: 260 seconds]
x77686d has joined #ruby
h1fuelcell has joined #ruby
gregf_ has joined #ruby
minimalism has quit [Quit: minimalism]
lenwood has quit [Ping timeout: 250 seconds]
x77686d has quit [Quit: x77686d]
h1fuelcell has quit [Ping timeout: 248 seconds]
cyphase_eviltwin is now known as cyphase
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
minimalism has joined #ruby
gbgdev has joined #ruby
jaguarmagenta has joined #ruby
ta__ has joined #ruby
RedFromage has joined #ruby
jtdoncas_ has joined #ruby
ta__ has quit [Read error: Connection reset by peer]
RedFromage has quit [Remote host closed the connection]
ta_ has quit [Read error: Connection reset by peer]
ishe_ua` has joined #ruby
ta_ has joined #ruby
RedFromage has joined #ruby
h1fuelcell has joined #ruby
RedFromage has quit [Remote host closed the connection]
jgnagy has joined #ruby
SesMan has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
ishe_ua has quit [Ping timeout: 250 seconds]
RedFromage has joined #ruby
jaguarmagenta has quit [Ping timeout: 248 seconds]
jtdoncas_ has quit [Ping timeout: 258 seconds]
RedFromage has quit [Client Quit]
<shadeslayer>
is there something in the stdlib that would allow me to process new lines in a file when it gets written to?
h1fuelcell has quit [Ping timeout: 246 seconds]
jgnagy has quit [Ping timeout: 248 seconds]
ta_ has quit [Ping timeout: 265 seconds]
lele has quit [Ping timeout: 260 seconds]
maattdd has quit [Ping timeout: 256 seconds]
<apeiros>
shadeslayer: IO.select
* shadeslayer
looks
<shadeslayer>
ah thanks, of course select will do what I want
<apeiros>
i.e. you open the file, pass the handle to IO.select, which then waits until there's something which can be read from the file
<shadeslayer>
right
<apeiros>
you want to do something like tail?
<apeiros>
or rather, tail -f
<shadeslayer>
yes
lele has joined #ruby
ruby352 has joined #ruby
<ruby352>
hello could somebody help me what's the easiest way to create an object which responds to method :call
<shadeslayer>
I basically have to read the file and process it on file write, and print some statistics at a set interval ( like bytes written in the past 10 seconds )
<apeiros>
ruby352: proc{}
<ruby352>
loop_call = l.respond_to?(:call)
<shadeslayer>
latter I'm planning to write as a thread.new do whatever; sleep 10 end
<shadeslayer>
apeiros: won't work I think because if IO happens at x-1 seconds and processing could take longer than a second ...
<shadeslayer>
then the stat call could get delayed
<apeiros>
shadeslayer: not sure I follow
shinnya has quit [Ping timeout: 260 seconds]
<shadeslayer>
apeiros: when I read the new lines coming in via readlines, I have to parse them first, which could take y (milli)seconds, if the IO happens right before the timeout value ( such that y > x - time remaining in the timeout value ), this would cause a problem
lenwood has joined #ruby
<apeiros>
I a) don't see why that'd cause a problem and b) how sleep would solve that problem
blackmesa has quit [Ping timeout: 246 seconds]
gbgdev has quit [Remote host closed the connection]
<apeiros>
seems to me like classic producer/consumer system
<apeiros>
i.e. you read in one thread and push it on a work queue, your consumer (or consumers?) waits on the work queue and processes as fast as possible.
<apeiros>
but then again, I don't know why you want to sleep at all
<apeiros>
or is that a "I hope none of the processing will ever take >10s" approach?
hutch34 has joined #ruby
nadir has joined #ruby
bustizz has joined #ruby
Burgestrand has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shadeslayer>
apeiros: what I'm sayng is that the total time spent on IO.select + parsing could be > 10s
<shadeslayer>
so it could be for eg 11s , but I need to print stats every 10s
jiraphee has joined #ruby
<ruby352>
I'm really struggling the documentation does not give an example
jiraphee has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 260 seconds]
deadnull has joined #ruby
ferr1 has joined #ruby
deadnull has quit [Client Quit]
<apeiros>
shadeslayer: sleep(10) won't help you with that… with sleep(10) you'll guaranteed have >10s loop times. because it means it's always the 10s from sleep + processing time…
deadnull has joined #ruby
nankyokusei has joined #ruby
<shadeslayer>
apeiros: my thought was to have 2 separate threads, one for stat and one for processing, but then I'll need some sort of priority thread scheduling where it always prioritizes the stat thtread above other things
<shadeslayer>
but that's getting pretty complicated
emptyflask has joined #ruby
jtdoncas has joined #ruby
blackbom1 has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
jiraphee has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
jiraphee has quit [Remote host closed the connection]
emptyflask has quit [Ping timeout: 245 seconds]
jiraphee has joined #ruby
jtdoncas has quit [Ping timeout: 256 seconds]
xorgnak has joined #ruby
xorgnak has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
<apeiros>
yes, timing requirements usually are. how hard they are depends on how hard the requirements are :)
jiraphee has quit [Remote host closed the connection]
Beams has quit [Quit: .]
jiraphee has joined #ruby
SpiffTR has quit [Quit: Leaving.]
<shadeslayer>
apeiros: :)
wugy has joined #ruby
stan has quit [Quit: Leaving]
<apeiros>
if they aren't too hard, you'll have 3 (or 2 + N) threads:
<apeiros>
1 reader
<apeiros>
1 (or N) processing threads
<apeiros>
1 thread which wakes up all 10 seconds printing current result
<apeiros>
ruby's scheduler doesn't make any guarantees about the precision regarding those 10s, though. and I'd do an adjusted sleep anyway (i.e. not sleep(10), but sleep(remaining_time))
SesMan has joined #ruby
SesMan has quit [Remote host closed the connection]
SesMan has joined #ruby
symm- has quit [Ping timeout: 246 seconds]
workmad3 has quit [Quit: Lost terminal]
workmad3 has joined #ruby
SpiffTR has joined #ruby
Silthias1 has quit [Ping timeout: 268 seconds]
Silthias has joined #ruby
ruby352 has quit [Ping timeout: 260 seconds]
fmcgeough has quit [Quit: fmcgeough]
nixmaniack has quit [Remote host closed the connection]
x77686d has joined #ruby
faces has quit [Ping timeout: 244 seconds]
jiraphee has quit [Remote host closed the connection]
gbgdev has joined #ruby
jiraphee has joined #ruby
x77686d has quit [Quit: x77686d]
face has joined #ruby
howdoi has quit []
howdoi has joined #ruby
jiraphee has quit [Read error: Connection reset by peer]
grh has quit [Ping timeout: 250 seconds]
Burgestrand has joined #ruby
nettoweb has quit [Ping timeout: 265 seconds]
nettoweb has joined #ruby
maattdd has joined #ruby
pmarreck has quit []
pmarreck has joined #ruby
gbgdev has quit [Remote host closed the connection]
<shadeslayer>
apeiros: ok, then how do I tell ruby that the print thread needs to run every 10s no matter what
OTORelic1 has joined #ruby
<apeiros>
Thread.new do print stuff; sleep(calculate_remaining_time_to_next_10s); end
<apeiros>
errr, add in a `loop do … end`
SpiffTR has quit [Ping timeout: 248 seconds]
<apeiros>
as said, no guarantees about the precision. but doing a custom solution won't increase precision.
SpiffTR has joined #ruby
<shadeslayer>
oh so ruby doesn't need to be told to wake up the print thread, it does it automatically when the sleep call gets over even though the processing thread might be executing?
<apeiros>
if you do a custom solution, you can just as well just do a single thread.
gbgdev has quit [Remote host closed the connection]
<apeiros>
yes. that's the point of threads.
<shadeslayer>
ahhh cool
rwb has quit [Ping timeout: 260 seconds]
<apeiros>
they run concurrently
<c-c>
Lately I've been forking a lot. To achieve the same. pid = for do; Process.daemon(); #do stuff; sleep(10); end
<apeiros>
not parallely in MRI, but concurrently.
<shadeslayer>
I understand now :D
gbgdev has joined #ruby
<c-c>
Perhaps for more accuracy one could have a ruby process thats started via system command via cron
<apeiros>
unless you have a realtime OS, you will never have guarantees about accuracy.
<shadeslayer>
c-c: nah I think that's overkill
<apeiros>
your whole process might be blocked by the OS
<shadeslayer>
I think what apeiros is suggesting is good enough for the task
antoniobeyah has joined #ruby
<c-c>
I would assume all the mentioned approaches would be "off" from the exact 10 second interval by 10's to 100's of milliseconds
zero7 has quit []
zero7 has joined #ruby
<apeiros>
depends on the OS and whether the processing involves things which block the scheduler. but I think you can get ms accuracy.
ShummmardeNIK has joined #ruby
<shadeslayer>
c-c: I think that is acceptable since it's mostly meant as a thing to be seen by the user
jaguarmagenta has joined #ruby
OTORelic1 has quit [Ping timeout: 258 seconds]
x77686d has joined #ruby
<c-c>
I implemented a concurrent base for my game project via multiprocess approach.
antoniobeyah has quit [Client Quit]
<c-c>
It's
johnmilton has joined #ruby
<c-c>
rather nice, on linux, aside from the forking process going through hoops of two processes for each daemon
JoiF has joined #ruby
shelling__ has quit []
shelling__ has joined #ruby
minimalism has quit [Quit: minimalism]
hutch34 has joined #ruby
synthroid has joined #ruby
twodayslate has quit []
twodayslate has joined #ruby
machty has quit []
<JoiF>
Hi! I got a legacy Windows-based-system written in Ruby thrown into my lap (has to be compatible with 1.6+) and I need to do some tweaks here and there to make it run properly on Linux. Does my approach make any sense? (it works, but I have no idea if my usage of symbols is stupid or not?) http://pastebin.com/2zkZ17RW
<ruby[bot]>
JoiF: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
machty has joined #ruby
deadnull is now known as _deadnull
_deadnull is now known as deadnull
nikivi has joined #ruby
lenwood has quit [Ping timeout: 258 seconds]
omphe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has quit [Ping timeout: 260 seconds]
<c-c>
JoiF: you should really consider rewriting for 2.0
<c-c>
well, 2.3 if poss
<toretore>
if you are rewriting you may as well aim for the newest
<JoiF>
Not going to happen :)
<JoiF>
It'
<toretore>
JoiF: to answer your question we need more information
<JoiF>
Does my usage of symbols make sense?
<toretore>
gist as much code as you can, then explain what its purpose is
SteenJobs has joined #ruby
<JoiF>
The purpose is to get different versions of a string depending on if you're running the script on Linux or not
yo61 has quit []
<c-c>
well, I can't really tell from the example
<JoiF>
Should I index my Hash differently?
endbringer has joined #ruby
<c-c>
Does it output what you need?
<JoiF>
Yes.
<JoiF>
It works, but I have no idea if this is how you do stuff in Ruby
yo61 has joined #ruby
<c-c>
Sounds like its done, if its a duck and quacks.
<JoiF>
haha
<JoiF>
True
jaguarmagenta has quit [Remote host closed the connection]
<toretore>
JoiF: it does what you think it does. whether it's the right way to do it is another thing..
Humdai has quit [Ping timeout: 258 seconds]
<JoiF>
But I'm not completely familiar with how symbols work. i.e. if they should be used in the manner I'm using them, where I'm simply using a symbol as an index to a Hash, or of symbols are something that's supposed to be set (once or just a few times) globally and then used all over the place?
<toretore>
JoiF: the way you're using them is fine
<JoiF>
Yay! :D
<JoiF>
Thanks!
eb0t has quit [Quit: WeeChat 1.4]
eb0t has joined #ruby
<c-c>
gl!
<JoiF>
So, my predecessor decided it would be a really good idea to roll his own build-system in Ruby. Reason I'm not rewriting for 2.x is that I'm going to be replacing this system with a proper one ASAP. But I need the current one to run on Linux first to have a baseline when integrating the new one.
SesMan has quit [Remote host closed the connection]
fmcgeough has joined #ruby
SesMan has joined #ruby
SpiffTR has quit [Quit: Leaving.]
GodFather has quit [Remote host closed the connection]
pandaant has quit [Remote host closed the connection]
AckZ has quit []
AckZ has joined #ruby
JoiF has left #ruby [#ruby]
SesMan has quit [Ping timeout: 246 seconds]
Bacta has joined #ruby
pokui has joined #ruby
maximus has joined #ruby
<Bacta>
Is it possible to define a 2d array setter, ex: def [][]= ?
<toretore>
that doesn't make any sense
<toretore>
a 2d array is an array whose values are other arrays, meaning they are different objects
hutch34 has joined #ruby
<Bacta>
so you can do def []=(k, v)
<toretore>
you can define a method [] which takes two values and then manipulates the sub-arrays
<Bacta>
Can you do def [][]=(k, k2, v) ?
<maximus>
Hello. Need some help to install ruby on rails. I got ubuntu 14.04 .. But not sure which is the right path. Since all tutorials and gem files looks so many varieties of installation . And it's confusing.
<toretore>
Bacta: no
<ruby[bot]>
maximus: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<toretore>
?rails maximus
GodFather has joined #ruby
<maximus>
yes toretore
<toretore>
Bacta: you should explain what it is you're trying to do instead of asking about a specific solution you have in mind
<c-c>
Bacta you can just do arrays of arrays for 2D
<manveru>
but you can use the singleton instance, see the sample
<elomatreb>
I think I'd prefer such an argument over weird stubs/mocks, but you're also right
<tau>
apeiros well, i want to integrate completion for ruby in vy(my vim-like in python) so i was wondering of using rsense but it seems to not be under development anymore.
<tau>
apeiros so i was wondering whether that is something worth to use.
<manveru>
tau: maybe take a look at the neovim gem
<tau>
hmm
<tau>
manveru rsense seems good because it runs a server and it gives a nice json structure for completions. i wonder whether there is something like that but that is actively being developed.
benlieb has joined #ruby
<manveru>
well, neovim plugins work the same way, just with msgpack instead of json
<tau>
i see.
mark_66 has quit [Remote host closed the connection]
<manveru>
that said, i haven't actually tried ruby completion with it, should do that now :)
<manveru>
before i say stupid stuff
nankyoku_ has joined #ruby
<tau>
manveru me neither.
<tau>
manveru do you think rsense is outdated?
<tau>
are you familiar to it?
tvw has joined #ruby
<manveru>
well, i looked at it... it's got a ton of open issues and no commit for 3 years
<tau>
yea
<shadeslayer>
manveru: do you what I'm possibly doing wrong? I required minitest/speck but : Error: test_add_events(TestEventMonitor): NoMethodError: undefined method `stub' for DateTime:Class
c355e3b has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
<manveru>
what ruby version?
<shadeslayer>
2.3.1
jhack has quit [Ping timeout: 265 seconds]
beilabs_ has quit [Remote host closed the connection]
beilabs has quit [Remote host closed the connection]
astrobunny has joined #ruby
johnny56 has quit [Ping timeout: 246 seconds]
Humdai has quit [Ping timeout: 250 seconds]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rodfersou has quit [Ping timeout: 256 seconds]
maattdd has joined #ruby
johnny56 has joined #ruby
Asher has joined #ruby
solocshaw has joined #ruby
jtdoncas has quit [Ping timeout: 240 seconds]
beilabs has joined #ruby
rodfersou has joined #ruby
jphase has quit [Remote host closed the connection]
jcao219 has quit [Ping timeout: 245 seconds]
conta has joined #ruby
jphase has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
mordocai has joined #ruby
nankyoku_ has quit [Remote host closed the connection]
Snowy has quit [Remote host closed the connection]
nankyokusei has joined #ruby
Snowy has joined #ruby
bruce_lee has quit [Ping timeout: 245 seconds]
Burgestrand has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mordocai>
I want to write a script that will run certain system commands concurrently with basically a dependency graph(so run A and B then C and D then run E) while doing something intelligent with the output (logs or nicely formatted to stdout). Are there any gems that will make this easy and quick or do I need to deal with it myself?
amclain has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
rippa has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
teclator has quit [Ping timeout: 260 seconds]
<baweaver>
Basically sounds like a Promises implementation
teclator_ has joined #ruby
conta has quit [Ping timeout: 260 seconds]
xlegoman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mordocai>
Hmm... yeah, I could see promises helping. Would still need the "Run system commands concurrently and handle their output intelligently" but that might be relatively easy...
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
antoniobeyah has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 260 seconds]
<mordocai>
FWIW this doesn't need to be general at all. The commands are going to be pretty static and not change often.
Snowy has quit [Ping timeout: 258 seconds]
solocshaw has quit [Ping timeout: 258 seconds]
s2013 has joined #ruby
marxarelli has joined #ruby
Chair has quit [Quit: Ex-Chat]
flying has quit []
Chair has joined #ruby
Rodya_ has joined #ruby
bmurt has joined #ruby
maattdd has quit [Ping timeout: 246 seconds]
Chair has quit [Ping timeout: 258 seconds]
claudiuinberlin has quit []
JakFrist[WVU] has joined #ruby
jcao219 has joined #ruby
Dimik has joined #ruby
symm- has joined #ruby
tomphp has joined #ruby
kuSuSE has joined #ruby
h1fuelce_ has quit [Remote host closed the connection]
[Butch] has joined #ruby
s1kx has quit [Ping timeout: 248 seconds]
* mordocai
realized this actually isn't that hard to make with threads.
astrobunny has quit [Remote host closed the connection]
<havenwood>
mordocai: Promise = Thread # ship it
astrobunny has joined #ruby
tomphp has quit [Ping timeout: 258 seconds]
jsrn_ has quit [Quit: Leaving]
frozengeek has quit [Quit: frozengeek]
astrobunny has quit [Ping timeout: 265 seconds]
jtdoncas_ has joined #ruby
nowz has joined #ruby
dionysus69 has joined #ruby
hutch34 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
Ishido has quit [Read error: Connection reset by peer]
byte512 has joined #ruby
zacts has quit [Quit: WeeChat 1.6]
enterprisey has joined #ruby
<mordocai>
Chdir doesn't work with multiple threads(it'll error) per docs. Is there a method to have a thread-local chdir? Currently just doing the cd in the command but that's somewhat annoying.
tomphp_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
omphe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has joined #ruby
astrobunny has joined #ruby
reverberations has joined #ruby
Uranio has quit [Quit: while you read this, a kitty dies]
Anonymoose2 has joined #ruby
sp4rrow has joined #ruby
enterprisey has quit [Remote host closed the connection]
chouhoul_ has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
reverberations has quit [Ping timeout: 265 seconds]
Anonymoose2 has quit [Ping timeout: 265 seconds]
reverberations has joined #ruby
jshjsh has joined #ruby
benlieb has quit [Quit: benlieb]
Anonymoose2 has joined #ruby
SpiffTR has quit [Quit: Leaving.]
nikivi has quit [Quit: irc]
JoshS has quit [Ping timeout: 268 seconds]
reverberations has quit [Ping timeout: 265 seconds]
nankyokusei has joined #ruby
jcao219 has quit [Ping timeout: 256 seconds]
prestorium has quit [Quit: Leaving]
djellemah_ has joined #ruby
KnownSyntax has quit [Quit: No Ping reply in 180 seconds.]
jcao219 has joined #ruby
<mustmodify>
antoniobeyah: ok thanks!
benlieb has joined #ruby
mustmodify has left #ruby [#ruby]
djellemah_ has quit [Ping timeout: 250 seconds]
omphe has joined #ruby
benlieb has quit [Client Quit]
rwb has quit [Ping timeout: 268 seconds]
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
nankyoku_ has joined #ruby
Jackneill_ has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 264 seconds]
gheegh has quit [Ping timeout: 268 seconds]
boombox_ has joined #ruby
dhollinger has quit [Ping timeout: 252 seconds]
omphe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dhollinger has joined #ruby
GodFather has quit [Ping timeout: 250 seconds]
boombox_ has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 244 seconds]
fmcgeough has quit [Quit: fmcgeough]
harai has joined #ruby
bturker has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
brent__ has quit [Quit: Connection closed for inactivity]
benlieb has joined #ruby
nankyoku_ has quit [Ping timeout: 240 seconds]
bturker has quit [Ping timeout: 256 seconds]
blackmesa has joined #ruby
darix has quit [Quit: may the packets be with you...]
GodFather has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
lxsameer has quit [Quit: WeeChat 1.6]
Derderderd has quit [Ping timeout: 260 seconds]
aryaching has quit [Ping timeout: 245 seconds]
synthroid has joined #ruby
minimalism has quit [Quit: minimalism]
kayzon has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
f4 has quit [Ping timeout: 244 seconds]
Derderderd has joined #ruby
jokke has quit [Ping timeout: 244 seconds]
synthroi_ has quit [Ping timeout: 250 seconds]
f4 has joined #ruby
harai has quit [Ping timeout: 240 seconds]
<zenspider>
I need a windows user... I need a confirmation whether IO.pipe does or doesn't work on windows
<zenspider>
I thought it hasn't since day 1, and that's part of the reason for spawn
jtdoncas has quit [Ping timeout: 264 seconds]
SpiffTR has joined #ruby
<matthewd>
zenspider: tenderlove and I looked at it recently for something, and noted it had some very Windows-sounding implementation.. but I can't confirm whether said implementation achieves its apparent aim :)
Derderderd has quit [Ping timeout: 264 seconds]
<tenderlove>
ya, I remember seeing windows related code in there
<tenderlove>
but I have no idea if it actually works
synthroid has quit []
s2013 has joined #ruby
jokke has joined #ruby
montanonic has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
astrobunny has joined #ruby
Madplatypus has joined #ruby
JoshS has joined #ruby
AckZ has quit []
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
astrobunny has quit [Ping timeout: 240 seconds]
jshjsh has quit [Ping timeout: 260 seconds]
aryaching has joined #ruby
DoubleMalt has quit [Ping timeout: 246 seconds]
reverberations has joined #ruby
dn`_ has joined #ruby
djbkd has quit [Remote host closed the connection]
<adam12>
Anybody in here regularly use bundler alternative? dep or something. Just curious.
djbkd has joined #ruby
dn` has quit [Ping timeout: 268 seconds]
dn`_ is now known as dn`
lubekpl has joined #ruby
<tau>
i managed to get rsense working, it works with built in objects but when i do stuff like require 'matrix'; x = Matrix[[1]]; x.
<tau>
it fails to complete.
<tau>
it seems that it is not recognizing the require thing.
<havenwood>
adam12: I regularly use RubyGem's built-in Gem dependency resolver. You can `gem install -g` to build a Gemfile.lock from a Gemfile and set RUBYGEMS_GEMDEPS=- to run in the context of the Gemfile.lock gems.
<zenspider>
I tweeted it as a question as well ... maybe someone in the know will chime in
<zenspider>
I still use isolate... but I think I'm the ONLY person who does now :)
rwb has joined #ruby
<adam12>
I'm just being curious. I've used the Rubygem -g option before, which works. I ran across dep a few days ago (again) and wondered what the eco-system outside bundler looked like today.
<adam12>
I believe there were some dependency resolving issues in the past with `gem install -g` so I don't think it's a good go-to yet.
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Derderderd has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
<hanmac>
i am not 100% sure about the current state, but rubygems did absorb bundler
<adam12>
Cool. I'm gonna keep my eye on it.
buglessdr has quit [Quit: Leaving]
<adam12>
I kind of wish ruby-toolbox didn't feel so abandoned.
frozengeek has joined #ruby
Derderderd has quit [Ping timeout: 246 seconds]
jtdoncas_ has joined #ruby
davidt_ has quit []
JeanCarloMachado has joined #ruby
jenrzzz has joined #ruby
zacts has joined #ruby
JoshS has quit [Quit: Leaving]
moei has quit [Quit: Leaving...]
jtdoncas_ has quit [Ping timeout: 260 seconds]
nowz has quit [Quit: Leaving]
roychri has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
Anonymoose2 has joined #ruby
ramfjord has joined #ruby
enterprisey has joined #ruby
reverberations has quit [Ping timeout: 240 seconds]
antoniobeyah has quit [Quit: antoniobeyah]
heftig has quit [Read error: Connection reset by peer]
yeticry has quit [Ping timeout: 250 seconds]
adavia has quit [Ping timeout: 258 seconds]
tyang_ has quit [Read error: Connection reset by peer]
heftig has joined #ruby
jottr has joined #ruby
yeticry has joined #ruby
dopamean_ has quit [Ping timeout: 260 seconds]
lubekpl has quit [Ping timeout: 245 seconds]
gbgdev has joined #ruby
<manveru>
adam12: i use nix for my gems
<adam12>
manveru: nix like nixos?
<manveru>
also on macos, but yeah
<manveru>
and back in the old days i used rvm gemsets
<manveru>
i suspect that might still work today
<adam12>
Yeah - not really concerned about gemsets as much as just installing deps for projects.
<adam12>
I'd probably use gem_home for "gemsets".
<manveru>
aye
<manveru>
we use a combination of nix and direnv, so when you cd into a new project, all your deps are setup
swills has quit [Read error: Connection reset by peer]
bustizz has quit [Remote host closed the connection]
swills has joined #ruby
bustizz has joined #ruby
cdg_ has quit [Remote host closed the connection]
lubekpl has joined #ruby
nickjj has quit [Read error: Connection reset by peer]
hahuang62 has joined #ruby
<tau>
manveru was it you who said earlier to have written an auto completion lib for ruby?
hahuang61 has quit [Read error: Connection reset by peer]
claudiuinberlin has quit []
<manveru>
i think there was YouCompleteMe and neocomplete
<tau>
yes. but i want to integrate ruby autocompletion with vy.
<manveru>
i think that one also can be used by any other editor
<tau>
hmm
benlieb has quit [Quit: benlieb]
<manveru>
i guess it's java and probably not very small
jottr_ has joined #ruby
hahuang65 has joined #ruby
<tau>
i see.
<zenspider>
for gemsets I use ohmygems
mg^ has joined #ruby
_djbkd has quit [Remote host closed the connection]
SeepingN has joined #ruby
djbkd has joined #ruby
ReK2 has joined #ruby
ReK2 has joined #ruby
ReK2 has quit [Changing host]
ByronJohnson has joined #ruby
minimalism has joined #ruby
NightMonkey has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
SpiffTR has quit [Quit: Leaving.]
ramfjord has joined #ruby
mahlon has quit [Quit: nine foot long outhouse ladle]
armando has joined #ruby
polishdub has quit [Quit: Leaving]
centrx has quit []
csk has quit [Quit: Bye]
<adam12>
I havent' had a need for gemsets in a long time, but maybe that's Bundler doing all the work for me ;)
__main__ has joined #ruby
djbkd has quit [Ping timeout: 246 seconds]
_djbkd has joined #ruby
<manveru>
yeah, same thing basically
<manveru>
we replaced bundler because it doesn't handle native deps, same issue as npm
<manveru>
so you need to make sure everyone has the same libzmq, libxml, libpg, etc... and two projects may conflict
A124 is now known as A124_
A124_ is now known as A124
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
emptyflask has quit [Remote host closed the connection]
A124 has quit [Quit: '']
[Butch] has quit [Quit: I'm out . . .]
gbgdev has quit []
threh has joined #ruby
A124 has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
xlegoman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dopamean_ has joined #ruby
<zenspider>
adam12: if you ever use `bundle exec`, then gemsets are a benefit
<adam12>
Never do. direnv adds bin/ as a PATH prefix.
nankyokusei has joined #ruby
<zenspider>
bundle_require is really slow too. I _hate_ that wycats thought that autorequire was a good idea. worst thing to happen to ruby development, probably ever...
GodFather has quit [Quit: Ex-Chat]
<zenspider>
I tried to remove it from my client's code, but maaaaan... it was hard
GodFather has joined #ruby
<zenspider>
(they had HUNDREDS of gems tho)
ramfjord has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
dopamean1 has joined #ruby
dopamean1 has quit [Client Quit]
AlexRussia_ has quit [Ping timeout: 260 seconds]
dopamean1 has joined #ruby
claw has quit [Ping timeout: 256 seconds]
dopamean_ has quit [Ping timeout: 260 seconds]
dopamean1 is now known as dopamean_
lubekpl has quit [Ping timeout: 258 seconds]
Derderderd has joined #ruby
h1fuelcell has joined #ruby
claw has joined #ruby
gheegh has joined #ruby
DarthGandalf has joined #ruby
_chazu has joined #ruby
jottr has joined #ruby
_chazu has left #ruby [#ruby]
nankyoku_ has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
Snowy has joined #ruby
h1fuelcell has quit [Ping timeout: 244 seconds]
bturker has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
jottr_ has quit [Ping timeout: 260 seconds]
Derderderd has quit [Ping timeout: 264 seconds]
enterprisey has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
dionysus69 has quit [Ping timeout: 245 seconds]
Snowy has quit [Client Quit]
sdwrage has quit [Quit: This computer has gone to sleep]
DarthGandalf has quit [Ping timeout: 260 seconds]
bturker has quit [Ping timeout: 256 seconds]
AlexRussia_ has joined #ruby
DarthGandalf has joined #ruby
blackmesa has quit [Quit: WeeChat 1.5]
kayzon has quit [Remote host closed the connection]
JesseH has joined #ruby
antoniobeyah has joined #ruby
benlieb has joined #ruby
benlieb has quit [Client Quit]
aryaching has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
DarthGandalf has quit [Ping timeout: 256 seconds]
neminis has quit [Quit: Lost terminal]
bonhoeffer has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bonhoeffer>
how do i understand what this encoding is: "\xE1\x06\vc;\x00"
<bonhoeffer>
looks hex, encoding is ASCII-8BIT -- but i can't write that string to match
<bonhoeffer>
it is the result of cipher.random_key
millerti has joined #ruby
nickjj has joined #ruby
<apeiros>
it's binary
<apeiros>
and \xE1 is a single byte
<apeiros>
i.e. the hex is because you're looking at an inspect. that's meant for you to be readable.
<sonOfRa>
bonhoeffer: there isn't any real encoding here. random_key should just return a random "string" consisting of raw bytes
|RicharD| has quit [Quit: Sto andando via]
<sonOfRa>
Popular representation, if you really need to print it to somewhere, is base64
<bonhoeffer>
apeiros: ahhh. . . ok -- so a = cipher.random_key -- if I type a in the console -- it shows me the bytes as a string, but they are really raw bytes