cek

Activity Graph

Page 1 of 5 | Next »

2019-06-26

[11:27:48] cek: has joined #ruby
[11:30:13] cek: has left #ruby: ()
[18:57:08] cek: has joined #RubyOnRails
[19:06:58] cek: has left #RubyOnRails: ()

2019-06-24

[15:18:05] cek: has joined #ruby
[20:47:49] cek: Quit: Connection closed for inactivity

2019-06-19

[13:25:52] cek: has joined #ruby
[13:27:43] cek: is there a shorthand for {a: a, b:b } in newer ruby versions?
[14:39:22] cek: yeah, it's strange js managed to be up to date on dev requests
[20:45:33] cek: Quit: Connection closed for inactivity

2019-06-13

[14:20:13] cek: has joined #ruby
[17:59:24] cek: has left #ruby: ()

2019-06-12

[11:08:47] cek: has joined #ruby
[11:19:38] cek: /usr/include/features.h:330:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp] # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
[11:19:49] cek: but: * optflags: -O3 -fno-fast-math
[11:19:58] cek: and also somehow CFLAGS = -O0 -ggdb
[11:20:09] cek: wtf is going on with ruby build process
[11:20:40] cek: so the question is what are the actual flags used
[11:23:58] cek: trying to understand why 2.4.3, which is higher than r43439 , doesn't experience https://redmine.ruby-lang.org/issues/12950 , but 2.4.4 and higher do
[16:13:05] cek: Quit: Connection closed for inactivity

2019-06-03

[15:50:53] cek: How would you get current page uri under Turbolinks?
[15:50:53] cek: has joined #RubyOnRails
[15:51:18] cek: How would you get current page uri under Turbolinks?

2019-05-30

[11:42:32] cek: has joined #RubyOnRails
[11:43:15] cek: Is there any way to de-compose the aliased attributes/records when doing arel with eager loading and joins? those AS t0_r0, AS t0_r1 columns, I need them mapped back to model
[16:01:15] cek: Quit: Connection closed for inactivity

2019-05-29

[12:14:29] cek: has joined #RubyOnRails
[12:16:15] cek: How do I get associated model object via class method?
[12:17:19] cek: `Child.arel.parent.model_object` so that I get a `Parent `
[12:17:46] cek: most answers from internets relate to rails 3 way of doing things
[12:29:30] cek: `reflections['parent'].klass` it seems, am I right?
[14:22:37] cek: has left #RubyOnRails: ()

2019-05-16

[20:22:30] cek: has joined #RubyOnRails
[20:30:38] cek: has left #RubyOnRails: ()

2019-05-13

[11:53:22] cek: has joined #RubyOnRails
[12:58:59] cek: Ping timeout: 250 seconds
[12:59:12] cek: has joined #RubyOnRails
[17:22:58] cek: Quit: Connection closed for inactivity

2019-05-10

[00:11:32] cek: Quit: Connection closed for inactivity

2019-05-09

[13:43:50] cek: has joined #RubyOnRails
[13:55:34] cek: Hi. I'm having troubles with responding on proper content type. First of all, request coming with `Accept: application/json` header isn't "translated" to JSON. It shows as `Processing by xx#yy as ` . No JSON or HTML, just an empty space -- why?
[13:56:11] cek: Secondly, when I'm doing `respond_to {|f| f.json { render json: blah } }`, it's throwing `ActionController::UnknownFormat`. why?
[13:58:35] cek: I admit using `defaults: {format: [:html, :json]}` in the route. But the only reason is that I just wanted to set a default type when there's no `Accept` supplied by client
[14:06:43] cek: well fuck https://blog.bigbinary.com/2010/11/23/mime-type-resolution-in-rails.html
[16:22:25] cek: Quit: Connection closed for inactivity
[18:22:35] cek: has joined #RubyOnRails
[18:31:48] cek: Hi. Why would no prefix be generated for a parameterized constrained route?

2019-05-04

[09:20:23] cek: has joined #ruby
[09:22:23] cek: has left #ruby: ()

2019-05-03

[18:08:45] cek: has joined #ruby
[18:09:17] cek: anyone good with Mail lib?
[18:12:22] cek: ok, tell me why the header is empty - `Mail.new(body: 'xx', to: 'boy band:;')[:to].to_s`
[18:18:11] cek: >> require 'mail'; Mail.new(body: 'xx', to: 'boy band:;')[:to].to_s
[21:26:06] cek: Quit: Connection closed for inactivity

2019-04-23

[19:02:32] cek: has joined #RubyOnRails
[19:04:00] cek: getting `LoadError (Unable to autoload constant Clients::InventoryController, expected xx/app/controllers/clients/inventory_controller.rb to define it`, but it's in there!
[19:14:16] cek: the error was related to unknown method being called from within the class context of inheriting class. bummer.
[19:14:29] cek: has left #RubyOnRails: ()

2019-04-19

[13:49:19] cek: has joined #RubyOnRails
[16:18:57] cek: Quit: Connection closed for inactivity

2019-04-17

[19:34:02] cek: has joined #RubyOnRails
[21:53:41] cek: Quit: Connection closed for inactivity

2019-04-15

[09:18:17] cek: has joined #RubyOnRails
[09:18:27] cek: has left #RubyOnRails: ()
[12:13:29] cek: has joined #RubyOnRails
[13:34:21] cek: Trying to define a helper method in a module that's being included into controller
[13:34:54] cek: What's the current way of including helpers? I see there's a #helper method, but old `include` works too as I see
[22:57:00] cek: Quit: Connection closed for inactivity

2019-04-12

[00:30:57] cek: Quit: Connection closed for inactivity
[09:45:06] cek: has joined #RubyOnRails
[12:26:57] cek: Quit: Connection closed for inactivity
[16:45:38] cek: has joined #RubyOnRails
[17:34:04] cek: Something's up with turbolinks:load handler, it doesn't get triggered when navigating to a page that includes a JS that hooks on it
[19:08:27] cek: anyone able to help with turbolinks? I don't get how it works.
[19:09:04] cek: I'm hooking up on` turbolinks:load` in a JS script sourced in a layout loaded via turbolinks
[19:09:09] cek: the event doesn't trigger
[22:55:13] cek: Quit: Connection closed for inactivity

2019-04-11

[13:39:15] cek: has joined #RubyOnRails
[13:40:15] cek: Why is everyone suggesting to append(xhr.responseText) in `ajax:success` cb while the event.detail[0] already contains necessary preparsed response?
[13:40:50] cek: also, what's the best way to append that response to an element as it's a `document`?
[16:48:54] cek: Quit: Connection closed for inactivity
[21:31:34] cek: has joined #RubyOnRails

2019-03-28

[13:54:17] cek: has joined #RubyOnRails
[13:55:04] cek: has joined #ruby
[13:56:37] cek: has left #ruby: ()
[16:03:45] cek: Quit: Connection closed for inactivity
[17:21:35] cek: has joined #RubyOnRails
[19:27:00] cek: has left #RubyOnRails: ()

2019-03-26

[12:15:02] cek: has joined #RubyOnRails
[12:15:51] cek: `javascript_include_tag 'application'` in `app/views/layouts/application.html.haml` , but instead of using `app/assets/javascripts/application.js`, it's using `app/assets/javascripts/a1/application.js`. Why is that?
[12:16:30] cek: I didn't ask it to look inside the subdirectory, I want the top file
[22:04:42] cek: Quit: Connection closed for inactivity

2019-03-15

[15:01:27] cek: has joined #RubyOnRails
[15:02:08] cek: What's the current way of sending http requests to external entities?
[15:02:17] cek: I used to use restclient
[19:20:56] cek: Quit: Connection closed for inactivity

2019-03-14

[12:05:40] cek: has joined #RubyOnRails
[12:08:19] cek: what do you think the proper upgrade path from 3.2 to 5.1 be? `rails new`?
[15:09:43] cek: getting segfaults on mysql2 @ ruby 2.4.5
[15:09:52] cek: clean `rails new`
[15:13:13] cek: reinstalled mysql2 , all's fine now :/
[19:15:09] cek: Quit: Connection closed for inactivity

2019-01-30

[18:10:16] cek: has joined #ruby
[18:16:35] cek: what entry function is executed for a compiled module? When a lib is required, its main file gets evaluated, but what happens in C?
[18:18:57] cek: bruce_lee?
[18:36:17] cek: has left #ruby: ()

2018-09-14

[19:54:56] cek: has joined #ruby
[19:55:16] cek: has left #ruby: ()

2018-09-06

[18:13:33] cek: has joined #ruby
[18:14:10] cek: > (GIL). It's a lock around the execution of Ruby code.
[18:14:48] cek: often see this around on internets. But why the heck would it be related to ruby code only, isn't GIL locking C functions/extensions , too?
[18:15:34] cek: best thing they often use to describe is Array#<< , but it's a C, not ruby code.
[21:02:09] cek: Ping timeout: 252 seconds
[21:03:29] cek: has joined #ruby
[21:13:49] cek: Quit: Connection closed for inactivity

2018-09-03

[15:07:21] cek: has joined #ruby
[17:11:48] cek: has left #ruby: ()

2018-08-31

[09:30:11] cek: has joined #ruby
[09:34:04] cek: am I expecting too much from #unpack to support "(CSLQ)*" , that is, a repeated group?
[09:42:25] cek: i have no time to parse unpack code
[09:43:12] cek: looks like it's time to unpack libffi riffle
[13:37:52] cek: Quit: Connection closed for inactivity
[19:36:37] cek: has joined #ruby
[20:13:31] cek: yeah. run rails tests
[20:14:08] cek: long time ago, some ruby implementations couldn't pass them
[20:14:29] cek: and ruby is not rails?
[22:26:20] cek: Quit: Connection closed for inactivity

2018-06-05

[19:21:30] cek: has joined #ruby
[19:23:36] cek: What's the link to docs on latest yaml hooks framework? https://ruby-doc.org/stdlib-2.5.1/libdoc/yaml/rdoc/YAML.html is useless.
[19:43:19] cek: has left #ruby: ()

2018-05-18

[17:00:23] cek: has joined #ruby
[17:18:59] cek: has left #ruby: ()

2018-04-17

[20:04:57] cek: has joined #ruby
[20:12:03] cek: has left #ruby: ()

2018-02-02

[11:03:17] cek: has joined #ruby
[20:12:46] cek: has left #ruby: ()

2018-01-17

[15:26:32] cek: has joined #ruby
[15:36:01] cek: has left #ruby: ()

2018-01-16

[11:46:49] cek: has joined #ruby
[11:47:21] cek: is there a release&support schedule for ruby? much like http://php.net/supported-versions.php
[20:36:28] cek: Quit: Connection closed for inactivity

2017-11-22

[09:43:58] cek: has joined #ruby
[09:45:28] cek: ask weechat about tiananmen square , you'll get wonderful results
[09:47:02] cek: ok, my question: how do you get an intersection of arrays a and b so that you get full b in case a is empty? can't think a solution without a conditional
[09:50:42] cek: a & b or a , but so that it actually works
[12:11:06] cek: Quit: Connection closed for inactivity
[15:50:34] cek: has joined #ruby
[15:51:47] cek: has left #ruby: ()

2017-05-25

[10:02:54] cek: has joined #RubyOnRails
[10:24:36] cek: how do I override activejob logging?
[10:25:07] cek: seems like it's doing ActiveJob::Logging::LogSubscriber.attach_to :active_job right after logsub definition, which give me less options to hack it
[13:28:01] cek: has joined #ruby
[13:28:47] cek: find me a shorter way to do Hash[hsh.keys.map{|x| [x, []]}])
[13:29:25] cek: cjohnson: same as with !
[13:29:47] cek: buy a ruby book
[13:33:34] cek: much better, but what about map{} chunk, maybe reduce of some sort
[13:34:33] cek: apeiros: who are you?
[13:35:05] cek: stop bullying people
[17:21:54] cek: has left #RubyOnRails: ()

2017-05-24

[19:26:18] cek: >> dev m; yield; end; m(&proc{})
[19:26:48] cek: >> def m; yield; end; m(&proc{})
[19:26:53] cek: >> def m; yield; end; m(&lambda{})
[19:27:03] cek: >> def m; yield; end; m(&->{})
[19:27:34] cek: it seems i got out of my mind
[19:30:47] cek: to illustrate: https://gist.github.com/celesteking/f18d5c30322486c50cd069016de84d71
[19:37:51] cek: nah, I thought it's mm that's throwing the error, not yielded lambda
[19:38:43] cek: i'm well aware of differences
[19:39:16] cek: yea, the arity and the control statements
[19:48:44] cek: >> yield next
[19:48:52] cek: >> yield &proc
[19:48:59] cek: funny, isn't it
[19:49:21] cek: has left #ruby: ()
[20:31:56] cek: has joined #RubyOnRails
[20:32:11] cek: I'm looking for a way to hackup rails console and have my own methods available
[20:32:59] cek: somethinlk like ~/.irbrc but for rails console only
[20:35:08] cek: one specific. I'm able to load console via Rails::CommandsTasks.new(ARGV).run_command!('console') , but that doesn't get me far.
[20:44:10] cek: was able to hack it together.
[20:45:50] cek: has left #RubyOnRails: ()

2017-05-23

[12:43:00] cek: has joined #ruby
[12:46:14] cek: help me with enums, please. I'm being stupid today. Want to implement an enum for a looper that returns bulk objects: each=->{ get_bulk(count){|array| yield(array) } } . so for meh.take(1) it returns array and not array.take(1).
[12:47:29] cek: i'm in control of get_bulk, but not in control of its underlying method. that method is returning array objects, in varying count
[12:48:03] cek: Just don't tell me I'll have to implement my owne enumerable class
[12:56:06] cek: to illustrate, https://repl.it/IMzr
[13:01:35] cek: https://repl.it/IMzr/1 , rather

2017-05-17

[18:27:26] cek: has joined #ruby
[18:27:53] cek: Looking for a way to access an element of range for the given index in shortest possible way
[18:28:20] cek: actually, for shortest possible code
[18:29:04] cek: well, not #to_a, but something along #find_with_index
[19:35:36] cek: no, why, he's right. ('a'..'x').each_with_index.find {|e, i| i == 2 }
[19:37:01] cek: have forgotten each_with_index can return an enum
[19:38:22] cek: because (1..10**29)
[19:39:11] cek: (slightly exaggerating)
[19:44:04] cek: no, i already got the answer, thanks.
[19:44:31] cek: has left #ruby: ()

2017-05-15

[16:39:13] cek: has joined #RubyOnRails
[16:39:30] cek: How do I add a local gem path that i'm developing into rails autoload?
[16:44:27] cek: reload! won't make it reload
[16:45:18] cek: config.autoload_paths is frozen
[16:45:30] cek: I'm developing the gem
[17:46:50] cek: well, added gem path to autoload_paths , but it still won't reload
[17:48:04] cek: it doesn't.
[17:49:22] cek: config.autoload_paths in config/application.rb , as per guide. const hash remains the same, model hash changing. So it's definitely either not picking it up or i don't know what else.
[17:50:00] cek: ActiveSupport::Dependencies.autoload_paths lists the path i added.
[18:12:04] cek: it worked once I removed it from Gemfile.
[18:12:13] cek: has left #RubyOnRails: ()
[19:27:32] cek: has joined #ruby
[19:28:16] cek: wondering if there's a includee callback that would be invoked when includer scope closes.
[19:36:15] cek: thanks, that really helped.
[19:39:40] cek: other than trace func
[19:39:58] cek: has left #ruby: ()

2017-05-11

[15:22:09] cek: has joined #RubyOnRails
[15:22:41] cek: getting ActiveRecord::StatementInvalid: when I Model.where('attr > 123') . When attr taken into backticks, it works. WTF
[15:25:12] cek: yes, indeed. thanks.
[15:28:01] cek: has left #RubyOnRails: ()
[19:29:45] cek: has joined #ruby
[19:30:42] cek: >> Time.now - Time.now
[19:46:56] cek: >> loop {}
[19:48:02] cek: has left #ruby: ()

2017-05-08

[12:42:40] cek: has joined #RubyOnRails
[12:43:08] cek: any ideas on how to apply rails app config in activejob definition?
[12:44:46] cek: configure rails environment, but for a job.
[12:48:53] cek: class TestJob < ApplicationJob; Rails.application.configure { config.some_setting = :blah }; end
[12:59:55] cek: I just want to have a separate config for jobs. I guess I'll have to create another env setting.
[14:25:45] cek: reconnect: true not working, still saying mysql gone after mysqld restart
[14:39:36] cek: has left #RubyOnRails: ()
[19:55:00] cek: has joined #ruby
[19:55:23] cek: wondering why is Numberic#% faster than Numeric#modulo ?
[19:56:56] cek: yeah. be my guest.
[19:59:41] cek: next q. How do I optimize %? I'm looking for numbers having 0 mods for a specific number.
[20:04:15] cek: >> Benchmark.measure { i=0; max = 10**7; while i<max do i % 128 == 0 ; i+=1; end }
[20:04:29] cek: >> require 'benchmark; print Benchmark.measure { i=0; max = 10**7; while i<max do i % 128 == 0 ; i+=1; end }
[20:04:35] cek: >> require 'benchmark'; print Benchmark.measure { i=0; max = 10**7; while i<max do i % 128 == 0 ; i+=1; end }
[20:04:48] cek: >> require 'benchmark'; print Benchmark.measure { i=0; max = 10**7; while i<max do i.modulo(128) == 0 ; i+=1; end }
[20:35:42] cek: has left #ruby: ()

2017-05-05

[18:38:49] cek: How do I skip only selected validations on #save ?
[18:39:14] cek: for ex., skip specific belongs_to rel , but keep others
[18:41:03] cek: other than hacks like this https://richonrails.com/articles/skipping-validations-in-ruby-on-rails
[19:14:05] cek: has left #RubyOnRails: ()

2017-04-27

[15:17:39] cek: guys wtf happening with #to_s in Array. print calls it, puts doesn't
[15:20:36] cek: so you say it splats it?
[15:23:00] cek: if (rb_exec_recursive(io_puts_ary, argv[i], out)) { -- yeah i see now
[15:23:10] cek: what a nonsense exception
[15:27:58] cek: JSON.parse(ohai)
[15:33:03] cek: JSON.parse(`ohai`)
[15:34:45] cek: has left #ruby: ()

2017-04-25

[14:14:48] cek: Hi. How do I define an updater for a model that would work for a relation, like update_all, but with my things.

2017-04-24

[20:05:02] cek: Even the job class having a different object_id!
[20:07:12] cek: what's interesting is that I see a list of class vars defined in parent, but they're nil.