p1k

Activity Graph

Page 1 of 4 | Next »

2017-06-08

[15:08:37] p1k: Quit: WeeChat 1.6

2017-04-30

[23:18:56] p1k: Ping timeout: 240 seconds
[23:46:17] p1k: has joined #ruby

2016-07-25

[13:28:28] p1k: does anyone know if there are some standardized guidelines on what to call additional properties that are set on an Error ? (when you inherit it and add an initialize)
[13:28:36] p1k: or is it everyone does as they please ?
[13:30:28] p1k: toretore: I tend to inherit StandardError, but sure
[13:30:52] p1k: toretore: Yes, I'm just asking if there is a convention, of calling it :erro_state, or :properties or some other key?

2016-07-22

[14:47:14] p1k: the point isn't where you put your files, it's that your project structure is consistent and other people working on it understand it

2016-06-27

[19:25:06] p1k: is there a module which has a list of http status codes as constants ?
[19:39:35] p1k: havenwood: no I mean the opposite of that, e.g. I'd prefer to write ::HTTP_ACCEPTED in my code rather than 202, it's easier for reading
[20:02:07] p1k: dminuoso: capitalized constants are standard accross C, Ruby etc. you might not like it but it's better to follow convention in this case
[20:08:44] p1k: how come dasherize doesn't un-camelize :S
[20:08:50] p1k: .underscore.dasherize just looks weird

2016-06-21

[07:27:33] p1k: _mak_: you can set cookie headers on programatic requests just as with a browser, but if you want api access to your endpoint tokens are the more correct way

2016-06-20

[08:41:51] p1k: what is the JSON method to parse a string literal ? e.g. "42"
[10:04:31] p1k: apeiros: I see, thanks

2016-05-24

[04:28:31] p1k: is there something special that needs to be done with engines to get routes->controller mapping to work correctly?
[04:29:05] p1k: I thought it would implicitly scope: <engine_module> but that doesn't seem to be the case
[08:53:17] p1k: is there a way to ignore rails complaints about assets precompile without the global `config.assets.raise_runtime_errors` ?
[08:57:01] p1k: specifically if you have files used only for testing/development they really shouldn't be in precompile ?

2016-05-23

[14:37:23] p1k: what else does my Rakefile need to load to have access to the gems installed via bundler?
[14:37:30] p1k: (it doesn't seem to by default)
[14:38:55] p1k: quazimodo: I don't remember put the quick way to check is <=% puts "\n\n#{self}\n\n" %> or add a byebug statement
[15:22:17] p1k: why aren't gems i've installed via bundler in my load path when running rake ?
[15:30:08] p1k: so apparently gem 'pry-byebug', group: [:development, :test] is working but group :development, :test do is not
[15:30:23] p1k: is this some obscure bug or caching strategy?
[15:35:52] p1k: so if my $LOAD_PATH contains /home/user/project/lib and a file exists /home/project/user/lib/x/z.rb shouldn't require 'x/z' source it ?
[15:39:53] p1k: apeiros: yeah the later was a type :) I'll take another look, they are parsed sequentially right?
[15:40:07] p1k: typo* fail -_-
[15:41:47] p1k: the paths

2016-05-22

[07:39:13] p1k: so if you have a GemSpec with a 'TODO' in one of the out generated fields
[07:39:27] p1k: rails refuses to run commands e.g. rails g model article will fail
[07:39:33] p1k: isn't that rather extreme?
[07:40:19] p1k: (it goes through .gem/ruby/2.2.4/gems/bundler-1.12.4/lib/bundler/rubygems_integration.rb #validate)
[07:45:09] p1k: sevenseacat: you think I shouldn't be able to rails g model 'my_model' because my gemspec.description has 'TODO' in it?
[07:45:57] p1k: sevenseacat: are you even reading what I'm saying?
[07:46:12] p1k: if you're writing a a *new gem* I can't generate a model *inside it*
[07:46:23] p1k: because the description has TODO in it
[07:46:37] p1k: which you know, you would normally add after you've written the gem..
[07:50:54] p1k: sevenseacat: I said if you have a gemspec with a 'TODO' rails g model <model> will faill - maybe I should have been explicit about this being inside of the project which includes the gemspec
[07:51:00] p1k: rather than a project requiring it
[08:59:39] p1k: so rails new plugin --mountable generates a Rakefile which depends on a lot of files which are not generated

2016-05-21

[08:52:31] p1k: barhum2013: we use https://github.com/elabs/pundit - it's quite good
[08:53:52] p1k: there is also a researcher whose built some interesting tools for ruby/rails dealing with static analysis of security/permissions: http://www.cs.berkeley.edu/~jnear/
[15:09:47] p1k: is there a directive to force Rails to scope lookup but not the route url ?
[15:10:11] p1k: sharkman: what do you mean truncates, which console are you using
[15:10:42] p1k: shortCircuit__: transaction ?
[15:46:54] p1k: jhass: yeah I found it, thanks :)

2016-05-19

[07:17:35] p1k: has joined #ruby
[07:19:48] p1k: Client Quit
[07:26:14] p1k: has joined #ruby
[07:26:26] p1k: has joined #RubyOnRails
[07:37:45] p1k: it seems to be specific to that gem
[08:00:36] p1k: so I wrote on the mailing list regarding a MemoryLeak in Rails Server and haven't really gotten any more info
[08:01:05] p1k: is it worth filing a bug? I don't know how useful such a report would be since I really don't know what to point my finger at
[09:05:18] p1k: universa1: devmode webrick
[09:06:12] p1k: universa1: it's pretty unlikely but I could try
[09:06:57] p1k: universa1: well it also might not be noticable on the scale with a new app
[09:08:14] p1k: universa1: Yeah I can reproduce it by reloading a page many times
[09:08:18] p1k: universa1: https://groups.google.com/forum/#!topic/rubyonrails-talk/UL7TUV1Uefk
[09:10:02] p1k: universa1: but I didn't get much out of object space when running it, and valgrind seems nearly impossible to get to work with ruby
[09:10:08] p1k: so idk what the next step is
[09:10:56] p1k: universa1: model parts from console? you mean mocking requests to the controller
[09:11:44] p1k: universa1: I'm 99% sure it's not controller action code
[09:11:58] p1k: universa1: that would show up in objectspace
[09:12:36] p1k: universa1: or any of XXX middleware/caching layers ?
[09:13:10] p1k: universa1: yeah...
[09:14:44] p1k: universa1: haven't, actually that's a good thing to check before I go deep into the current config
[09:15:59] p1k: but that memory profile looks pretty crazy right? https://lh3.googleusercontent.com/-jj4OTSVJPYA/VyX60Ak4oQI/AAAAAAAAAJM/t8Uq7u2YFxUu5sLvkFCNEy2xoHduZqk0QCLcB/s1600/rails_s_mem.png
[09:17:09] p1k: unicorn?
[09:31:37] p1k: it might have been webrick
[09:31:55] p1k: at least I hope so because debugging a memory leak in same native extension would be eww
[09:34:16] p1k: workmad3: haven't tried unicorn, just switched to thin
[09:34:46] p1k: I do still have some increase but that might get cleaned when there is enough gc preasure, will see
[11:58:46] p1k: is the webrick server part of ruby core ?
[12:04:25] p1k: {}..stringify_keys is in active_support ?
[12:05:15] p1k: jhass: so memory leak w/ webrick server gets reported on the ruby langs bug tracker?
[12:07:48] p1k: jhass: ugh
[12:08:16] p1k: one of these evenings I'll try
[12:08:47] p1k: it would be nice if valgrind was better supported

2016-05-17

[03:16:44] p1k: has joined #ruby
[03:16:52] p1k: has joined #RubyOnRails
[03:17:04] p1k: does anyone know what method sprocket goes through when compiling development assets ?
[03:18:02] p1k: helpa: My problem is that my development _footer.html.erb takes 90000ms to compile, asset:precompile takes 3.3 seconds
[03:18:25] p1k: so I'd like to log the compile times for each javascript / asset include in the footer erb but that doesn't go through the sprockets compile method
[03:19:10] p1k: Radar: +/- 10000ms, the footer is what includes all the js/scss assets
[03:21:14] p1k: Radar: yes, so I'm asking specifically which sprocket method I need to wrap to get compilation times
[03:21:34] p1k: Radar: there 100% must be
[03:22:52] p1k: Radar: the precompile gives me normal times, and since each asset is compiled individually you should be able to wrap whatever call does the former
[03:23:21] p1k: Radar: will do
[03:31:26] p1k: can I load a rendered erb template in rails console ?
[04:52:51] p1k: Ping timeout: 246 seconds
[06:17:57] p1k: has joined #RubyOnRails
[11:09:42] p1k: has joined #ruby
[11:10:29] p1k: what's a sane way to monkey-patch a class that uses alias to avoid collision
[11:10:52] p1k: e.g. I need to patch :load, but the inheriting class calls alias :load, :_load and then defines a new :load etc.
[11:12:07] p1k: yeah I need to patch the :load which will become :_load
[11:28:51] p1k: buckets of joy monkey patching someone else's library to add logging
[12:46:08] p1k: aagdbl: what are you migrating -- curious
[12:47:10] p1k: like a migrationframeworkfactoryframework ?
[12:49:11] p1k: aagdbl: I think that shouldn't be hard to write yourself -- but I don't know of an abstract one
[12:51:59] p1k: aagdbl: I've done schema where I couldn't use AR and I found that a module wrapping the versioned class with a method for obtaining / caching the correct version from the database worked well enough
[12:52:15] p1k: but it was a different use case
[13:16:03] p1k: Ping timeout: 250 seconds

2016-05-16

[02:33:30] p1k: has joined #ruby
[02:33:32] p1k: has joined #RubyOnRails
[03:03:09] p1k: Read error: Connection reset by peer
[14:17:56] p1k: has joined #ruby
[14:17:58] p1k: has joined #RubyOnRails
[17:23:07] p1k: Ping timeout: 260 seconds

2016-05-15

[06:25:51] p1k: has joined #ruby
[06:26:21] p1k: how correctly preserve a grep command in a ruby string ?
[06:27:02] p1k: e.g. grep -R "[\"']" will become escaped as "grep -R \"[\"']\""
[06:27:08] p1k: which cannot be executed correctly after that
[06:29:26] p1k: I guess gsub('\', '\\') but that can have unwanted consequences..
[06:40:05] p1k: simple commas ?
[06:41:29] p1k: did you mean single quote e.g. grep -R '["\']' ?
[07:04:57] p1k: pabloh: but the <<-SCRIPT <script> SCRIPT syntax breaks the single quote escaping =/
[07:07:19] p1k: pabloh: but you won't be able to use an unscaped double quote in a regular string
[07:07:34] p1k: pabloh: I just used .gsub('\', '\\') but I was wondering if there was a more consistent way
[09:05:51] p1k: has joined #RubyOnRails
[09:06:07] p1k: so is there anyting I can do for tracing all called ruby functions by a process ?
[09:08:30] p1k: jhass: ty
[09:25:36] p1k: what's the name of the feature that let's you scope changes to a class on a module level ?
[09:30:12] p1k: Mon_Ouie: that was it, thanks
[09:30:25] p1k: it's odd that google searches don't give me that =/
[09:57:34] p1k: Ping timeout: 240 seconds
[12:31:26] p1k: has joined #RubyOnRails
[12:31:26] p1k: has joined #ruby
[15:00:14] p1k: underlying representation aside, they have a completely different use type
[15:00:45] p1k: (although hashes where the keys are used as string values hide this in places)
[15:08:22] p1k: for the same reason you wouldn't do stuff like :archived + :active
[15:09:01] p1k: raz: if strings are immutable you get about half-way
[15:09:19] p1k: but for example in python where this the case it's not uncommon to define constants to mimic c-style enums
[15:09:44] p1k: e.g. ACTIVE = 0; ARCHIVED = 1 etc.
[15:10:44] p1k: raz: what's the benefit?
[15:11:26] p1k: raz: but I think this is just because a lot of people use enums where they are going to later use them as strings
[15:11:52] p1k: raz: which {foo:1} being easier to write then { "foo" => 1} kind of promotes
[15:12:05] p1k: esp. { "foo".freeze => 1 }
[15:12:47] p1k: raz: I just thing the hash case is intermingled
[15:13:12] p1k: ENUM's make plenty of sense to me, but that's not something you usually string interpolate
[15:14:43] p1k: where as with a hash you might say |k,v| "#{k} is set to {v}" (or something of that sort <a href=v>k</a> )
[15:16:01] p1k: I mean that some key's you use as literals which is that intermingled frozen string usecase you are speaking of
[15:16:36] p1k: I think e.g. enum use type is usually not for interpolation but representation of state
[15:17:13] p1k: raz: that's 50% of why I'd define ENUM in postgres rather than varchar
[15:18:46] p1k: the other reason being constraints
[15:20:54] p1k: apeiros: when do you actually delete values from enums though? :o
[15:22:33] p1k: apeiros: oh, I've never used enum for things like that I guess
[15:24:52] p1k: apeiros: meh, once a year, shouldn't be that expensive to update alter type on the column?
[15:25:35] p1k: I mean drop value might be nice, but if it literally map's to a c enum they'd have to have a different structure to handle drop
[15:27:14] p1k: I think it's still not on Rails anyways =/
[18:02:59] p1k: Ping timeout: 250 seconds

2016-05-14

[07:59:25] p1k: has joined #RubyOnRails
[08:00:15] p1k: does anyone know if there is any database specific escape() method for handling regexes?
[08:12:32] p1k: Ping timeout: 260 seconds

2016-05-02

[12:59:13] p1k: has joined #RubyOnRails
[12:59:13] p1k: has joined #ruby
[13:41:49] p1k: Ping timeout: 260 seconds

2016-05-01

[12:35:36] p1k: has joined #ruby
[12:35:41] p1k: has joined #RubyOnRails
[13:06:43] p1k: does anyone have experience compiling ruby for use with valgrind ?
[13:07:35] p1k: I'm having some issues identifying the source of a pretty severe memory leak -- I've described it here https://groups.google.com/forum/#!topic/rubyonrails-talk/UL7TUV1Uefk
[15:16:42] p1k: Ping timeout: 244 seconds

2016-04-30

[01:42:27] p1k: has joined #ruby
[02:12:17] p1k: I have rails server taking up 1.5gb -- ideas for detecting memory leaks ?
[02:38:08] p1k: has joined #RubyOnRails
[03:02:34] p1k: Ping timeout: 260 seconds
[07:11:45] p1k: has joined #ruby
[07:11:48] p1k: has joined #RubyOnRails
[08:51:10] p1k: objspace memsize is in bytes ?
[09:11:16] p1k: so objspace is causing my rails application to segfault...
[09:49:07] p1k: so objectspace doesn't give me anything ..
[09:49:34] p1k: according to objectspace the runtime is ~240mb -- in reality it's 1.2gb
[10:09:51] p1k: Ping timeout: 244 seconds

2016-04-29

[06:33:27] p1k: has joined #ruby
[06:33:38] p1k: has joined #RubyOnRails
[08:28:25] p1k: Ping timeout: 250 seconds

2016-04-28

[01:14:50] p1k: has joined #ruby
[01:18:52] p1k: does anyone have experience with custom ruby-build scripts using rbenv?
[01:33:06] p1k: what are the options other than valgrind for debugging memory-leaks?
[02:08:33] p1k: Ping timeout: 240 seconds
[02:28:12] p1k: has joined #RubyOnRails
[02:28:14] p1k: has joined #ruby
[02:29:06] p1k: Remote host closed the connection
[02:29:26] p1k: has joined #RubyOnRails
[02:29:28] p1k: has joined #ruby
[04:57:50] p1k: has left #ruby: ("Leaving")
[05:16:12] p1k: Ping timeout: 276 seconds
[05:18:45] p1k: has joined #RubyOnRails
[05:41:54] p1k: Ping timeout: 260 seconds
[06:32:35] p1k: has joined #RubyOnRails
[07:33:08] p1k: has joined #ruby
[07:33:19] p1k: does anyone have experience running valgrind with ruby?
[07:44:17] p1k: norc: I'm having some issues with the max-stackframe and a few others (like using an rbenv ruby since those are shimmed and exec'd via bash)
[07:44:31] p1k: if you know how to handle some of these things that would be super helpful
[07:53:11] p1k: norc: managing ruby versions yourself also creates problems - no? but that aside I can setup the paths manually in this case
[07:54:26] p1k: I'll check it out
[08:11:20] p1k: norc: I have huge amounts of definetly lost blocks -- I'm guessing there is some false positives
[08:11:56] p1k: or are the heuristic checks that are going to be cruby 2.2.0+ speific which valgrind isn't covering by default
[08:19:37] p1k: Ping timeout: 260 seconds
[10:59:34] p1k: has joined #ruby
[10:59:44] p1k: has joined #RubyOnRails
[12:05:59] p1k: so anyone have an idea how to get valgrind to work w/ ruby 2.2+
[12:06:23] p1k: I've compiled with -g -O0 --with-valgrind but the output is a mass of false positives for lost reference / probably lost reference
[13:43:33] p1k: any idea what this is from? `<module:RbConfig>': ruby lib version (2.4.0) doesn't match executable version (2.2.4)
[13:45:45] p1k: I don't
[13:47:40] p1k: I see https://bugs.ruby-lang.org/issues/11944 but I'm trying to compile 1.9.3 so that patch wouldn't even seem to apply
[13:48:08] p1k: do you actually need ruby to compile ruby O_o ?
[13:48:36] p1k: adaedra: because I can't get valgrind to work on 2.2.4 and according to old obscure resources it did work at one point, so I'd like to at least see if that's the case
[13:49:03] p1k: yes there is a --with-valgrind flag, but no it's not enough
[13:49:50] p1k: adaedra: oh I missed that, yeah that shouldn't be relevant
[13:58:48] p1k: Ping timeout: 276 seconds
[13:59:21] p1k: has joined #ruby
[13:59:33] p1k: has joined #RubyOnRails
[15:18:48] p1k: Ping timeout: 246 seconds
[16:08:30] p1k: has joined #ruby
[16:08:40] p1k: has joined #RubyOnRails
[16:19:42] p1k: Ping timeout: 260 seconds
[19:34:17] p1k: has joined #ruby
[19:34:30] p1k: has joined #RubyOnRails
[19:44:29] p1k: Ping timeout: 244 seconds

2016-04-27

[02:52:13] p1k: has joined #ruby
[02:52:16] p1k: has joined #RubyOnRails
[05:15:30] p1k: Ping timeout: 246 seconds
[11:43:30] p1k: has joined #ruby
[11:55:12] p1k: Ping timeout: 246 seconds
[12:57:25] p1k: has joined #RubyOnRails
[12:57:27] p1k: has joined #ruby
[14:11:33] p1k: Ping timeout: 240 seconds
[14:13:04] p1k: has joined #ruby
[14:13:20] p1k: has joined #RubyOnRails
[15:48:32] p1k: Ping timeout: 260 seconds

2016-04-26

[13:59:06] p1k: has joined #ruby
[13:59:08] p1k: has joined #RubyOnRails
[15:16:07] p1k: Ping timeout: 252 seconds