negev

Activity Graph

Page 1 of 1

2018-11-25

[14:29:44] negev: has joined #ruby
[14:30:37] negev: hi, i'm running a rack application with ruby 2.5.1p57 and after some hours i see an enormous number of open files in lsof listed as "ruby-time"
[14:30:41] negev: is this a known issue?
[14:48:06] negev: Quit: leaving

2018-10-24

[08:51:04] negev: has joined #ruby
[08:59:13] negev: hi, does this: https://gist.github.com/m4rkw/1dcdbb3dfe63b29b5343b70a28ce1c5b indicate a memory leak or am i misunderstanding how that should work?
[20:23:22] negev: has left #ruby: ()

2016-05-28

[12:08:14] negev: has joined #ruby
[12:22:46] negev: Ping timeout: 244 seconds

2016-05-27

[21:43:55] negev: has joined #ruby
[21:44:37] negev: hi, if i have an IO stream and the remote machine sends me an arbitrary chunk of data but doesn't disconnect, how can i determine that i've received all of it? do i have to just use a timeout?
[21:48:47] negev: shevy: why 1.1?
[22:22:46] negev: Ping timeout: 272 seconds
[22:28:36] negev: has joined #ruby
[23:13:36] negev: Ping timeout: 276 seconds

2015-09-18

[15:01:31] negev: has joined #ruby
[15:01:52] negev: hello, anyone know why the mechanize gem would return form.file_uploads => [] for this form?
[15:01:55] negev: https://gist.github.com/anonymous/5cc7e2b671a355b9bf1b
[15:17:26] negev: Quit: leaving

2015-09-10

[16:27:06] negev: has joined #ruby
[16:27:15] negev: p "/one/two/three/four.mp3".match(/\/(.*?)\z/)[1] why does non-greedy not work?
[16:38:58] negev: Quit: leaving

2015-09-09

[15:52:43] negev: has joined #ruby
[15:53:39] negev: hello, why is i always 1 in the child thread? https://gist.github.com/m4rkw/fd06bd16c584632cf943
[15:59:11] negev: can anyone tell me why variables changed outside of a Thread are then changed inside the thread? i thought fork() was supposed to take an entire clone of the current context
[15:59:36] negev: Ox0dea: leak their variables? what does that mean?
[16:01:00] negev: Ox0dea: "they"?
[16:01:21] negev: ok, i don't really understand
[16:01:41] negev: does Thread.new not create a new context with a copy of the parent's context?
[16:02:09] negev: ok well i = 1
[16:02:14] negev: Thread.new
[16:02:22] negev: is the i referenced in the thread block the same i as the parent block?
[16:03:20] negev: apparently so
[16:03:58] negev: ok so i guess that changes my question then, if i want to create n threads and pass a 0-indexed thread_id to each thread, how can i do that?
[16:09:20] negev: Ox0dea: that doesn't work, `initialize': must be called with a block (ThreadError)
[16:11:02] negev: Quit: thanks guys

2015-09-03

[18:48:32] negev: has joined #ruby
[19:02:11] negev: hi, i'm writing a simple webapp using rack. why is it that when i stream a file back to the browser, the browser hangs for a long time before downloading anything? i'm using Rack::File which i understand is an enumerate object that should chunk the file to the browser bit by bit
[19:02:22] negev: but somehow it still hangs for a long time before the browser starts downloading the file
[19:02:46] negev: s/enumerate/enumerable sorry
[19:02:47] negev: been a long day :)
[19:16:57] negev: has joined #RubyOnRails
[19:17:04] negev: hi, i'm rack to build a simple webapp. i'm not actually using rails but rails must have solved this problem - if i return a response with an enumerable object, in order to stream a large file back to the browser, it calls each on the object and iteratively retrieves chunks of the file. for some reason when i do this, the brower hangs for several seconds before it starts to download the file.
[19:17:17] negev: it feels as if some kind of output buffer isn't being flushed out until it reaches a certain length
[19:17:31] negev: s/i'm rack/i'm using rack/ sorry, it's been a long day :|
[19:43:12] negev: has left #RubyOnRails: ()
[19:43:15] negev: has left #ruby: ()

2015-08-25

[07:42:29] negev: has joined #ruby
[07:42:44] negev: hello, why do class variables on child classes behave like this? http://pastebin.com/Wa80B9nL
[07:49:15] negev: Quit: leaving

2015-08-20

[14:20:47] negev: has joined #ruby
[14:49:53] negev: can anyone tell me why Rack::File hangs for several seconds before serving a large-ish file?
[15:11:00] negev: Quit: leaving

2015-06-26

[10:13:53] negev: has joined #ruby
[10:15:15] negev: hi, i've built a small rack application and for some reason all POST requests get redirected to GET. this is what i'm doing to run rackup: http://pastebin.com/Jjgu9XZ3 WebApp.call() is never called with a POST request, it's always redirected first.
[10:17:56] negev: nm fixed it
[10:17:58] negev: Client Quit
[15:47:50] negev: has joined #ruby
[16:06:13] negev: Quit: leaving

2015-06-25

[06:44:35] negev: has joined #ruby
[06:45:28] negev: hi, i'm writing a non-rails application using rack. looking at this page: http://www.rubydoc.info/github/rack/rack/Rack/Static it seems to suggest that i can do: use Rack::Static, :urls => ["/media"] to handle static content automatically, but i can't see where to put this. does my main application class need to extend one of the rack classes in order to make the use method available?
[06:53:24] negev: Ping timeout: 272 seconds

2015-06-24

[11:20:25] negev: has joined #ruby
[11:28:44] negev: Quit: leaving

2015-06-22

[08:38:16] negev: has joined #ruby
[08:38:52] negev: hi, i'm going crazy trying to figure out how to include subtemplates using Erubis. can anyone help? i'm doing this in a cgi wrapper: puts Erubis::FastEruby.new(File.read(ENV["PATH_TRANSLATED"])).result(binding()) but then within the .erb script that it's loading, there's no way i can see to include a subtemplate
[08:39:18] negev: for example, in index.erb if i do: puts ERB.new(File.read('menu.erb')).result(binding)
[08:39:28] negev: it will render it immediately, at the top of the output
[08:39:44] negev: is there a buffer i can append to or something?
[08:43:32] negev: there must be a way to use subtemplates with erubis
[08:44:19] negev: either i just need it to work
[08:44:32] negev: i'm using Erubis to render the initial template
[08:44:40] negev: yeah i think that's just because i was trying solutions i found online
[08:44:48] negev: they seem to do similar things
[09:05:03] negev: adaedra: oh yeah that does work, thanks :)
[09:08:40] negev: Quit: leaving

2015-06-17

[08:45:26] negev: has joined #ruby
[08:46:56] negev: hi, i want to run ruby via apache. doesn't seem like there's a clean way to do this. don't want to run rails as my app is very very simple and rails is needless bloat. i'm currently using Erubis to execute the ruby scripts as cgi's, but struggling with basic issues like being able to pull in other scripts as subtemplates. can anyone point me at a more elegant solution?
[09:06:33] negev: Quit: leaving

2015-06-16

[11:45:36] negev: has joined #ruby
[11:46:30] negev: hi, using erubis to run ruby as a cgi, how do you include another .erb file as a kind of partial view? when i do: puts Erubis::FastEruby.new(File.read('menu.erb')).result(binding()) it nukes any html that was in the original index.erb before the call
[12:05:17] negev: has left #ruby: ()

2015-05-20

[09:04:49] negev: how do you reference global variables with the name of the variable in another variable? eg a = "foo" ; b = get_global[a] === $foo

2015-05-13

[10:58:13] negev: hi, i'm using erubis as a very basic CGI handler. how can i access the POST data?