ixti

Activity Graph

Page 1 of 4 | Next »

2019-08-14

[03:14:43] ixti: Re my error on Array#each (if anybody curious) - it was my mistake. Didn't saw that error was coming from the different place (just happened that var name was the same)
[03:19:10] ixti: Quit: WeeChat 2.3

2019-08-13

[19:14:32] ixti: has joined #ruby
[19:33:27] ixti: Hi, all! I've ran into a weird behavior of `Array#each`. Can't make a short snippet that reproduces it, but it happens regular in production for us.
[19:35:39] ixti: Sorry I thought I'll be able to describe the problem in second message before getting the reply :D
[19:44:04] ixti: If would be able to reproduce the error - most likely I would not need a help. The problem that it happens in production and I can't nail down the root cause, so I feel like I'm missing something...
[19:44:07] ixti: https://gist.github.com/ixti/32c9fabe344de46c9986228aa18de253
[19:44:31] ixti: So, we use sidekiq, and the job looks like ^^^
[19:45:27] ixti: And sometimes, it fails with *undefined local variable or method \`step_options'*
[19:45:55] ixti: (i've updated gist just now - initial upload contained a typo)
[19:46:53] ixti: In other words, somehow, under some circumstances `step_options` becomes undefined within `STEPS.each { |step_options| ... }` loop
[19:47:50] ixti: For now we solved the problem by replacing `STEPS.each` with `STEPS.dup.each`.
[19:48:05] ixti: But I would like to know if that's known behavior

2019-07-20

[00:51:22] ixti: Quit: WeeChat 2.3

2019-07-19

[00:39:13] ixti: Ping timeout: 245 seconds
[16:27:07] ixti: has joined #ruby
[17:37:08] ixti: Ping timeout: 245 seconds
[18:25:41] ixti: has joined #ruby

2019-07-18

[01:35:27] ixti: Ping timeout: 245 seconds
[10:36:34] ixti: has joined #ruby
[11:14:38] ixti: Ping timeout: 245 seconds
[15:48:10] ixti: has joined #ruby
[17:31:44] ixti: Ping timeout: 272 seconds
[23:40:59] ixti: has joined #ruby

2019-07-17

[23:50:54] ixti: has joined #ruby

2019-06-03

[02:18:01] ixti: Quit: WeeChat 2.3

2019-06-02

[22:37:35] ixti: has joined #ruby

2019-06-01

[01:06:45] ixti: has joined #ruby
[03:05:44] ixti: Quit: WeeChat 2.3
[08:35:41] ixti: has joined #ruby
[09:29:26] ixti: Quit: WeeChat 2.3

2019-05-31

[01:54:30] ixti: has joined #ruby
[15:03:50] ixti: Quit: WeeChat 2.3

2019-02-25

[14:51:25] ixti: has joined #ruby
[16:46:41] ixti: Ping timeout: 255 seconds
[17:35:15] ixti: has joined #ruby
[18:50:12] ixti: Ping timeout: 244 seconds

2019-01-30

[03:57:42] ixti: Quit: WeeChat 2.3

2019-01-29

[17:57:44] ixti: has joined #ruby
[17:59:15] ixti: Is there any nice way to unescape string (not #dump'ed) lie this one: `'[\x22foo\x22,\x22bar\\u1234\x22]'`
[17:59:51] ixti: Easiest way I found is `eval %("#{string}")`
[18:00:17] ixti: but that's not good (due to some obvious reasons).
[18:01:37] ixti: I guess the only way is to actually replace all `/\\x\h{2}` sequences manually.
[18:02:05] ixti: and `\\\\` with `\\`
[18:20:49] ixti: Ended up by using `gsub!`
[18:23:24] ixti: Hm... Gonna try that
[18:23:50] ixti: Yeah. but that was just a very dummy and stupid example
[18:24:00] ixti: real one is a JSON escaped for JS
[18:24:13] ixti: I guess I had to start from that :D
[18:25:36] ixti: and if i'm on ruby 2.5 ;))
[18:26:18] ixti: where I need this - 2.4.4
[18:26:45] ixti: I can use a shim for that (backports gem has it)
[18:29:47] ixti: Thank you for the tip
[18:30:24] ixti: Tried `undump` (on ruby 2.6) for the real string I had - works like a charm
[18:30:39] ixti: So I'm gonna add a note for myself to switch to undump once ruby is upgraded
[18:37:44] ixti: Sure. one sec.
[18:39:55] ixti: https://gist.github.com/ixti/39bdc1107891a4955394ce8cfa1688c3 -- looks like this
[18:48:11] ixti: Thanks! :D

2019-01-23

[04:53:59] ixti: Quit: WeeChat 2.3

2019-01-22

[20:59:38] ixti: has joined #ruby

2019-01-07

[03:31:51] ixti: Quit: WeeChat 2.3

2019-01-06

[14:30:22] ixti: has joined #ruby

2018-12-27

[00:39:03] ixti: has joined #ruby
[03:02:27] ixti: Quit: WeeChat 2.3

2018-12-26

[16:27:58] ixti: Ping timeout: 245 seconds
[18:13:53] ixti: has joined #ruby
[18:39:32] ixti: Quit: WeeChat 2.3

2018-12-25

[22:51:50] ixti: has joined #ruby

2018-12-22

[09:37:48] ixti: Quit: WeeChat 2.3

2018-12-21

[00:00:06] ixti: isene: where do you get `false`?
[00:00:19] ixti: basically it means `fileutils` was already required
[08:42:03] ixti: Quit: WeeChat 2.3
[21:57:12] ixti: has joined #ruby

2018-12-20

[01:03:29] ixti: has joined #ruby
[01:03:33] ixti: Client Quit
[14:09:31] ixti: has joined #ruby
[15:14:22] ixti: Quit: WeeChat 2.3
[15:16:22] ixti: has joined #ruby
[15:42:45] ixti: Read error: Connection timed out
[15:43:15] ixti: has joined #ruby
[16:20:47] ixti: Quit: WeeChat 2.3
[20:19:07] ixti: has joined #ruby
[23:37:34] ixti: jsrtr: it's not called when evaluated
[23:37:39] ixti: It's default value proc
[23:38:13] ixti: `Hash.new { 42 }[:xxx] # => 42`
[23:38:38] ixti: havenwood: from description above at the end he needs to freeze
[23:39:52] ixti: `1.upto(32)` IMO is probably the best option
[23:40:27] ixti: havenwood: it won't work forzen
[23:42:35] ixti: IMO `1.upto(32).map { |i| [i.to_s, i * 8] }.to_h.freeze` looks cleaner
[23:43:56] ixti: or: `1.upto(32).with_object({}) { |i, o| o[i.to_s] = i * 8 }.freeze` :D
[23:44:27] ixti: havenwood: no doubts, me too. I was actually going to add a shim for meself ;))
[23:46:20] ixti: `FutureIsUnwritten` module with refinements ;))

2018-12-19

[03:44:15] ixti: Quit: WeeChat 2.3

2018-12-18

[00:14:52] ixti: has joined #ruby
[01:36:28] ixti: Quit: WeeChat 2.3
[01:36:52] ixti: has joined #ruby
[12:33:24] ixti: Quit: WeeChat 2.3
[17:27:05] ixti: has joined #ruby

2018-11-21

[02:30:38] ixti: Quit: WeeChat 2.3

2018-11-20

[14:35:19] ixti: has joined #ruby

2018-10-25

[16:21:56] ixti: has joined #ruby
[16:37:00] ixti: Ping timeout: 246 seconds
[17:15:25] ixti: has joined #ruby
[19:14:17] ixti: Quit: WeeChat 2.3

2018-05-17

[16:26:45] ixti: has joined #ruby
[16:40:51] ixti: Quit: WeeChat 2.1
[16:41:15] ixti: has joined #ruby
[18:14:28] ixti: Quit: WeeChat 2.1

2018-03-14

[15:16:56] ixti: has joined #ruby
[22:03:36] ixti: Ping timeout: 276 seconds

2018-03-12

[02:40:46] ixti: has joined #ruby
[03:48:59] ixti: Quit: WeeChat 2.0.1

2018-03-09

[14:36:25] ixti: has joined #ruby
[15:58:43] ixti: Quit: WeeChat 2.0.1

2018-02-02

[12:26:09] ixti: has joined #ruby
[18:49:05] ixti: Quit: WeeChat 2.0.1

2017-12-09

[01:26:18] ixti: Quit: WeeChat 2.0

2017-12-08

[22:43:18] ixti: has joined #ruby

2017-11-28

[03:42:01] ixti: has joined #ruby
[03:43:40] ixti: Client Quit

2017-11-21

[19:15:41] ixti: has joined #ruby
[20:22:37] ixti: Quit: WeeChat 1.9.1

2017-11-20

[16:41:55] ixti: has joined #ruby
[16:50:04] ixti: Quit: WeeChat 1.9.1

2017-10-23

[02:44:11] ixti: has joined #ruby
[04:10:22] ixti: Read error: No route to host

2017-10-10

[03:40:06] ixti: Quit: WeeChat 1.9.1

2017-10-09

[18:07:32] ixti: has joined #ruby

2017-09-10

[17:04:23] ixti: has joined #ruby
[18:31:22] ixti: Quit: WeeChat 1.9

2017-09-08

[01:35:18] ixti: has joined #ruby
[01:37:26] ixti: Client Quit

2017-08-28

[00:55:37] ixti: Ping timeout: 276 seconds

2017-08-27

[16:11:43] ixti: has joined #ruby
[16:44:55] ixti: Quit: WeeChat 1.9
[20:12:43] ixti: has joined #ruby

2017-08-26

[11:57:31] ixti: Ping timeout: 255 seconds

2017-08-25

[10:36:49] ixti: Ping timeout: 248 seconds

2017-08-04

[02:00:27] ixti: Quit: WeeChat 1.9

2017-08-03

[22:50:52] ixti: has joined #ruby

2017-08-01

[01:04:15] ixti: Quit: WeeChat 1.9

2017-07-31

[21:12:04] ixti: has joined #ruby

2017-07-14

[01:34:26] ixti: has joined #ruby
[01:34:42] ixti: Client Quit
[01:35:41] ixti: has joined #ruby
[10:19:21] ixti: Ping timeout: 268 seconds

2017-07-13

[18:40:30] ixti: has joined #ruby
[19:57:36] ixti: Quit: WeeChat 1.9

2017-07-01

[11:10:48] ixti: Ping timeout: 240 seconds

2017-06-30

[19:52:35] ixti: has joined #ruby
[19:52:53] ixti: Hi all! Is it normal practice to manually call `GC.start`?
[19:53:36] ixti: I'm processing a lot of CSV files (around 11K files). Each contains different amount of rows, 10 rows smallest one, 300-500K big ones...
[19:54:16] ixti: Seems like without calling GC.start after each 10K rows - RSS jsut keeps growing until process OOM killed ;((
[20:09:00] ixti: Yxhuvud: not horribly old. 2.3.0
[20:11:40] ixti: Yeah. But, by some reason withou GC.start RSS grows like crazy :((
[20:16:12] ixti: havenwood: trying to find the way of doing that now ;D
[20:17:19] ixti: havenwood: the problem is not installing new ruby (i'm on gentoo linux with chruby - and have all latest rubies) - it's just data is on production server ;))
[20:19:51] ixti: Hm. Good point. I guess, if I'll figure out that latest ruby behaves the same for me as 2.3.0 - then I'll think on tuning default behavior.
[21:30:32] ixti: havenwood: 2.3.4 behaves same as 2.3.0 for m :((

2017-06-03

[09:52:09] ixti: has joined #ruby
[11:59:34] ixti: Quit: WeeChat 1.8
[12:00:00] ixti: has joined #ruby
[12:01:49] ixti: Client Quit
[12:02:06] ixti: has joined #ruby
[13:57:35] ixti: Ping timeout: 255 seconds

2017-05-23

[00:17:48] ixti: Ping timeout: 240 seconds
[00:20:56] ixti: has joined #ruby
[02:32:02] ixti: Ping timeout: 246 seconds

2017-05-22

[21:57:03] ixti: has joined #ruby
[21:57:08] ixti: Client Quit
[21:57:23] ixti: has joined #ruby
[21:59:59] ixti: Client Quit
[22:00:18] ixti: has joined #ruby
[22:02:52] ixti: Client Quit
[22:03:45] ixti: has joined #ruby

2017-05-08

[11:40:52] ixti: has joined #ruby
[14:33:56] ixti: Ping timeout: 272 seconds
[15:14:41] ixti: has joined #ruby
[15:14:45] ixti: Client Quit

2017-04-18

[02:28:48] ixti: Ping timeout: 260 seconds

2017-04-17

[10:49:14] ixti: has joined #ruby

2017-04-12

[11:08:53] ixti: Read error: Connection reset by peer

2017-04-11

[11:25:04] ixti: has joined #ruby

2017-04-05

[03:21:37] ixti: Quit: WeeChat 1.7

2017-04-04

[15:29:56] ixti: has joined #ruby

2017-04-03

[17:34:25] ixti: has joined #ruby
[23:13:24] ixti: Quit: WeeChat 1.7

2017-03-29

[01:06:15] ixti: has joined #ruby
[03:21:00] ixti: Quit: WeeChat 1.7

2017-03-26

[12:06:00] ixti: has joined #ruby
[14:45:22] ixti: Ping timeout: 264 seconds
[18:44:09] ixti: has joined #ruby
[19:02:27] ixti: Quit: WeeChat 1.7

2016-07-26

[17:38:48] ixti: has joined #ruby
[21:15:00] ixti: Quit: WeeChat 1.5

2016-07-22

[14:28:22] ixti: has joined #ruby
[14:28:40] ixti: Client Quit
[14:42:09] ixti: has joined #ruby
[14:42:17] ixti: Client Quit

2016-07-19

[08:43:38] ixti: has joined #ruby
[08:44:24] ixti: Client Quit
[12:13:14] ixti: has joined #ruby
[12:13:31] ixti: Client Quit

2016-06-14

[00:16:39] ixti: Quit: WeeChat 1.5

2016-06-13

[17:21:34] ixti: has joined #ruby

2016-06-10

[00:44:45] ixti: has joined #ruby
[09:34:34] ixti: Quit: WeeChat 1.5

2016-06-01

[00:09:54] ixti: Quit: WeeChat 1.5

2016-05-31

[17:33:26] ixti: has joined #ruby

2016-05-30

[23:28:29] ixti: Quit: WeeChat 1.5

2016-05-27

[18:00:08] ixti: has joined #ruby

2016-05-26

[00:14:20] ixti: Quit: WeeChat 1.5

2016-05-25

[21:16:10] ixti: has joined #ruby

2016-05-22

[02:12:33] ixti: Quit: WeeChat 1.5
[02:12:53] ixti: has joined #ruby
[02:14:10] ixti: Client Quit

2016-05-21

[00:39:55] ixti: Quit: WeeChat 1.5
[11:14:28] ixti: has joined #ruby

2016-05-20

[14:52:28] ixti: has joined #RubyOnRails
[14:53:03] ixti: Is there a way to define default constraints in routes
[14:53:23] ixti: I mean I have lots of routes that share some `.../:part/...`
[14:53:42] ixti: And I want to set constrain on `:part` for all of the URLs
[14:53:52] ixti: Rather then setting it for each of them
[14:56:35] ixti: if your gem's main require requires that dependency, then it willl be required
[14:57:01] ixti: in other words, your rails app will auto-require only waht you have in Gemfile
[15:00:13] ixti: kareeoleez: developmen_dependencies won't be bundled
[15:00:37] ixti: Let me explain a little bit
[15:01:17] ixti: `Gemfile` is kind of a manifest of your app's dependencies, that is handled by bundler
[15:01:45] ixti: bundler will install all gems listed there (unless you will exculde some groups) and their runtime dependencies
[15:02:25] ixti: so, it won't install anything listed in `add_development_depenency`
[15:03:07] ixti: that means that if you will put `require "..."` in your `/lib/gemname/gemname.rb` it will fail with "file is not in load path"
[15:03:28] ixti: kareeoleez: so, there are two ways to achieve what you want:
[15:03:37] ixti: 1. add necessary gem into Gemfile
[15:04:08] ixti: or 2. add it to gem's runtime dependencies and require it in main gem's require path (gem-name)
[15:06:10] ixti: kareeoleez: when you have `gem "foo-bar"` in your Gemfile, bundler will install `foo-bar` gem and will try to `require "foo-bar"` if fail then will try to `require "foo/bar"` if fail will silently skip that
[15:06:27] ixti: Also, bundler will install all runtime dependencies of `foo-bar`
[15:07:21] ixti: So, if you will add that dependency in gemspec as: `add_dependency` or `add_runtime_dependency`, and then will add `require "depname"` in `lib/foo/bar.rb` your rails app will auto-require that dependency
[15:07:55] ixti: kareeoleez: does it makes sense?
[15:09:35] ixti: So, to recap: development dependencies of gemspecs are not installed by bundler, only runtime dependencies are; bundler does not auto-requires dependencies.
[15:10:08] ixti: bundler auto-requires only dependencies you specify in your app's Gemfile.
[15:10:25] ixti: dependencies of those dependnecies are not handled by bundler
[15:10:46] ixti: i mean bundler will not try to require whole graph of dependencies ;D