balo

Activity Graph

Page 1 of 1

2019-05-28

[10:59:13] balo: what do you mean gaussblurinc1 ? do you have any special requirement?
[11:00:18] balo: in general, probably you are probably best off with the latest 2.6.x version of MRI https://www.ruby-lang.org/en/downloads/
[20:56:42] balo: depesz: do you have the same nick on github? the other day i found the postgres explain analyze stuff you made, it's priceless

2019-05-21

[06:58:57] balo: slackmare: https://www.ruby-lang.org/en/documentation/quickstart/ is a good place i think
[06:59:14] balo: you can mess with it here without installing anything https://ruby.github.io/TryRuby/

2019-05-16

[15:14:22] balo: hAns_: I read ruby under microscope book a few years ago, it's one of the best to understand the basics
[15:14:53] balo: not sure how much is up to date with the new MRI features like generational GC etc
[16:29:26] balo: heh, this error is strange indeed. tj_ you can consider downloading the file with curl/browser and place it in the folder where it misses it :/ in case you don't want to debug this specific issue... i don't even have ideas where to look on this failure after you've tried the basics
[16:33:40] balo: tj_: i guess if you download the file and place it there might work: C:/Ruby2.4.1_p111/lib/ruby/gems/2.4.0/gems/nokogiri-1.10.3/ports/archives/zlib-1.2.11.tar.gz
[16:37:54] balo: or maybe you can try to build it with `--without-zlib-dir` option 😬 not sure what are thhe consequences of thhat. maybe it's just loosing working with gzipped xmls
[16:38:24] balo: tj_: that's my assumption. but not certain, never had this issue myself. worth a try

2019-05-12

[01:48:34] balo: *.net *.split
[02:45:15] balo: has joined #RubyOnRails
[02:45:16] balo: has joined #elixir-lang
[02:45:17] balo: has joined #ruby

2019-05-09

[06:37:55] balo: has joined #RubyOnRails
[06:38:19] balo: morning everyone!
[06:38:45] balo: i am on rails 6.0rc1 and see this deprecation warning in development mode: https://github.com/rails/rails/blob/master/railties/lib/rails/application/finisher.rb#L27
[06:39:33] balo: just for a few constants, the first one is ApplicationRecord, 2 of the models inheriting from it and some module names used in those models
[06:40:17] balo: i look around initializers and everything but couldn't find the reason. where else would you look? what is the typicial case when this deprecation warning is raised?
[06:40:53] balo: i read the constants guide and i understand constant lookup better but not the root cause of the issue
[06:41:09] balo: i use zeitwek btw
[06:41:13] balo: *zeitwerk
[06:51:20] balo: ok, i figured it out
[06:51:57] balo: there was indeed an initializer doing a `require Rails.root.join("lib", "my_ext")`
[06:54:28] balo: this raises a new question, how to handle these independent libraries? according to https://edgeguides.rubyonrails.org/autoloading_and_reloading_constants.html#autoload-paths-and-eager-load-paths adding lib to `autoload_paths` is discouraged
[06:56:15] balo: need to extract it into a gem i guess?

2019-05-06

[08:33:30] balo: i wouldn't be able to tell what is this doing ^^

2019-05-03

[21:43:55] balo: *.net *.split
[22:08:04] balo: has joined #ruby
[22:08:04] balo: has joined #elixir-lang

2019-04-23

[17:19:35] balo: depesz: do you need a particular order? What's wrong with hash.each { |k,v| puts "#{k} => #{v}" }
[17:21:31] balo: so the block would be: check(k); check(v); ? does not seem too bad to me
[17:22:23] balo: it's on you. i'd put into a method and call it twice
[17:22:47] balo: it's explicit and clear what is it doing. and method calling is cheaper than generating intermediate arrays i think

2019-04-13

[16:49:46] balo: *.net *.split

2019-04-06

[20:10:22] balo: Quit: leaving
[20:17:23] balo: has joined #elixir-lang
[20:18:27] balo: has joined #ruby

2019-03-27

[09:44:56] balo: does anyone running puma in clustered mode on ruby 2.6.2 and having shutdown issues with systemd?

2019-03-15

[15:21:07] balo: valamiert a git-em felig spanyol let
[15:21:23] balo: blah. wrong window, sry
[15:21:33] balo: damn irssi splitwindow

2019-03-07

[04:53:43] balo: has joined #elixir-lang
[04:53:44] balo: has joined #ruby

2019-02-28

[17:23:21] balo: hightower3: RubyVM::InstructionSequence.compile("a = 1; b =2; a, b = b, a").disasm
[17:28:12] balo: &>> 3.times.map { |n| "n=#{n}" }
[17:29:11] balo: galaxie: it's called symbol to proc :)

2019-01-20

[09:38:06] balo: has joined #ruby

2019-01-17

[02:35:29] balo: Ping timeout: 245 seconds

2018-09-05

[09:55:59] balo: Bish: heroku?

2018-08-31

[14:13:48] balo: dostoyevsky: i havent't tried any of them https://github.com/arbox/data-science-with-ruby#visualization

2018-08-22

[09:47:31] balo: Bish: yep, 1 seems to be the minimum and default if you don't specify worker_processes in your unicorn config https://bogomips.org/unicorn.git/tree/lib/unicorn/configurator.rb#n258
[09:49:21] balo: it's a process based appserver, see also https://bogomips.org/unicorn/TUNING.html
[11:17:32] balo: Bish: nope. but you can set it to an envvar in the config file so you can run it like $ WORKERS=4 unicorn -c config/unicorn.rb
[11:18:17] balo: given you have `worker_processes ENV.fetch('WORKERS').to_i` in your config
[11:19:30] balo: my personal recommendation would be to use a different appserver. puma, phusion or some jruby based
[11:20:39] balo: but we use unicorn for now as well because of _reasons_ and it with some experimenting with server numbers and sizes you can serve quite a lot of traffic with it

2018-08-10

[14:02:32] balo: zerowaitstate: what do you mean? double('MyClass', foo: :bar) ?
[14:17:33] balo: allow_any_instance_of(MyClass).to receive(:my_factory_method).and_return(same_object)
[14:18:04] balo: in general i don't like the "allow_any_instance_of" but sometimes it's useful. and maybe you can just use allow(my_object).to receive....
[14:18:21] balo: depending on how that factory method is implemented and how do you access it
[14:18:56] balo: or it can be that i still don't get the issue :)
[14:42:00] balo: zerowaitstate: hmm, i think now i understand the issue. you rely on the consecutive return values... i've never used it, never needed it. How would you refactor your code to make it more easy to test?
[14:42:21] balo: in general, rarely a good idea to have such complicated mocking
[14:52:12] balo: ineb: you can, the problem is - if i understand it correctly that he the code relies on consecutive return values of the mock. and he feels it wrong to depend on the order and wanted to match the arguments with the return values. like passing it as a hash somehow but for the same method as input output list. https://github.com/rspec/rspec-mocks#consecutive-return-values
[15:02:08] balo: ah, yeah, that can work actually. expect(MyClass).to receive(:my_builder).with(:myarg_1).and_return(my_arg_object_1)
[15:02:43] balo: and one line for every arg-return pair?
[15:03:34] balo: yeah. anyway, for me this test case sounds a bit complicated

2018-08-09

[10:58:28] balo: gray_-_wolf: i am not familiar with refinements but refining the class method made me interested :D so i looked for it, maybe it's relevant https://stackoverflow.com/questions/27833447/do-refinements-apply-only-to-instance-methods
[10:58:37] balo: it's a bit trickier
[11:05:51] balo: sure. just for educational purposes, could you share what is your use-case to use refinements and add class methods to String?

2018-08-01

[12:48:59] balo: *.net *.split
[13:26:14] balo: has joined #ruby

2018-07-20

[00:07:26] balo: *.net *.split
[00:15:49] balo: has joined #ruby

2018-07-14

[18:48:02] balo: language pls

2018-06-18

[19:35:13] balo: na mar freenode-on is toltak az eu upload filters proposal elleni alairasgyujtest
[19:35:22] balo: damn wrong channel, sry
[19:35:44] balo: it's getting strange that the only thing i contribute here are missent messages :D
[19:36:34] balo: today i can't internet

2018-06-12

[09:09:25] balo: Ping timeout: 245 seconds
[09:09:40] balo: has joined #ruby

2018-06-05

[11:56:49] balo: has joined #ruby

2018-05-01

[15:27:35] balo: Ping timeout: 240 seconds
[15:34:47] balo: has joined #ruby

2018-04-25

[12:26:00] balo: *.net *.split
[12:27:27] balo: has joined #ruby
[15:01:31] balo: *.net *.split
[15:03:11] balo: has joined #ruby

2018-04-22

[10:00:50] balo: passz. igazabol nekem nem is kell promise (future-rel is ugyanezt csinalja). inkabb valami task kene. van ez a dataflow cucc is barrierekkel, de overkillnek tunik erre
[10:01:10] balo: sh.t sry, wrong window 😒
[10:01:49] balo: we are all over the place :P
[10:01:52] balo: hungarian
[10:03:52] balo: if I made this noise, maybe someone knows the solution to my pain here :D https://gist.github.com/vbalazs/4d6c85d370f50ea1e8a263b3f7140e51 i am using ruby-concurrency and my promises/features are not playing well with my agent
[10:04:18] balo: i am trying to fetch API pages concurrently and collect some results into an agent. this works “in practice” but in my tests it’s flaky, mostly fails (~8/10 times). What is wrong with my approach?
[10:05:25] balo: i assume the real usage is too slow so hiding some fundamental misunderstanding
[10:05:57] balo: but the tests are too fast thus highlighting there is something wrong :|
[10:10:48] balo: or maybe the problem is that minitest mocks are not threadsafe. but the way i am using them, it should work fine i think

2018-03-26

[18:02:27] balo: cagomez: depends. do you create it once per request or once per boot? what do you think about profiling and measuring it? maybe it has overhead for you but if you have slower db queries maybe it's insignificant...
[18:03:09] balo: although it can also have some cognitive overhead for the next person who reads the code. i am sure i would ask it: why is this happening? :D
[18:03:54] balo: and before you think you write a long comment to explain it... how could you make it more explicit what and why is it happening what you call?

2018-03-16

[16:03:02] balo: *.net *.split

2018-03-06

[16:59:23] balo: Remote host closed the connection
[18:36:02] balo: has joined #ruby
[18:36:10] balo: Client Quit
[18:36:57] balo: has joined #ruby

2018-03-05

[14:57:36] balo: Ping timeout: 276 seconds
[14:57:43] balo: has joined #ruby

2018-02-04

[12:22:01] balo: Quit: leaving
[12:24:36] balo: has joined #ruby
[12:34:54] balo: Quit: leaving
[12:35:16] balo: has joined #ruby

2018-01-27

[12:58:43] balo: Quit: leaving
[13:03:13] balo: has joined #ruby

2017-12-22

[17:02:52] balo: Ping timeout: 272 seconds
[17:05:28] balo: has joined #ruby

2017-12-21

[14:18:34] balo: Quit: leaving
[14:18:55] balo: has joined #ruby
[15:33:53] balo: Ping timeout: 248 seconds
[15:34:08] balo: has joined #ruby

2017-12-09

[05:06:22] balo: *.net *.split
[05:11:09] balo: has joined #ruby

2017-12-07

[14:48:09] balo: *.net *.split
[14:54:59] balo: has joined #ruby

2017-12-06

[21:38:58] balo: *.net *.split
[22:02:07] balo: has joined #ruby

2017-12-01

[02:28:55] balo: has joined #ruby

2017-11-09

[02:51:46] balo: Ping timeout: 248 seconds
[03:00:29] balo: has joined #ruby

2017-09-17

[09:41:10] balo: Ping timeout: 255 seconds
[09:42:07] balo: has joined #ruby

2017-09-02

[00:34:10] balo: Ping timeout: 240 seconds
[00:34:22] balo: has joined #ruby

2017-09-01

[11:11:30] balo: Quit: leaving
[13:45:10] balo: has joined #ruby
[14:10:13] balo: Quit: leaving
[14:11:55] balo: has joined #ruby

2017-08-14

[23:51:35] balo: *.net *.split
[23:56:43] balo: has joined #ruby

2017-07-29

[15:27:01] balo: sorry i thought there is a bot here
[15:27:20] balo: > puts "hello"
[15:27:29] balo: come on :D
[15:28:09] balo: anyway. do you have any idea why this does not return the string "grape" as well?
[15:28:11] balo: /\[([\w-]*)\]/.match("[apple][grape]").to_a
[15:31:37] balo: indeed, thanks canton7 ... it was not that intuitive for me :D

2017-07-17

[08:18:32] balo: http://net-ssh.github.io/net-ssh/Net/SSH/Connection/Session.html#method-i-process
[08:18:50] balo: i don't think you are using process correctly

2017-07-12

[12:41:59] balo: Remote host closed the connection
[12:42:05] balo: has joined #ruby

2017-07-08

2017-07-07

[08:48:19] balo: PCI is an artform itself. and to be PCI compliant, a PCI certified dev needs to be the committer. A friendly advice: keep the PCI scope as small as possible, don't mix it in your existing [probably old and big legacy] project
[08:49:18] balo: you won't find an ensure_pci_compliance gem :D so I hope you know what you are doing or ask for help otherwise

2017-06-28

[15:17:59] balo: szerintem erdemes
[15:18:04] balo: wrong window sry

2017-06-27

[13:05:49] balo: http://www.catb.org/esr/faqs/smart-questions.html#prune

2017-06-26

[09:51:16] balo: Quit: leaving
[09:52:47] balo: has joined #ruby

2017-06-20

[00:15:16] balo: Remote host closed the connection
[00:22:45] balo: has joined #ruby

2017-04-25

[11:05:53] balo: lamerz: based on a quick search https://github.com/rapid7/metasploit-framework/search?utf8=%E2%9C%93&q=%22def+symlink%22&type=
[11:06:11] balo: i guess it's lib/rex/proto/smb/client.rb#1786
[11:06:38] balo: you were lucky it was not something dynamically defined :P
[11:51:57] balo: lirammr: you are confusing two things: being able to do something (you can do anything in C) versus how easy or practical to do it
[11:54:02] balo: anything you can do in ruby it's possible to do it in every other language. but you might need to write more code or implement things differently. python also has several web frameworks which can be a good start (django or flask for example). ask in the python channel for help, really

2017-04-24

[12:44:59] balo: Cork: maybe this worth a shot, never used it myself http://ruby-doc.org/core-2.4.1/String.html#method-i-scrub

2017-04-21

[15:58:29] balo: en most meg csak gemeket kezdtem el updatelni. a fo app, amivel foglalkozom is 2.2. de mas service-ek mas verzion vannak
[15:58:34] balo: sry wrong window
[16:05:09] balo: baweaver: :D pacsi
[17:04:48] balo: irb(main):010:0> URI.parse(value).kind_of?(URI::HTTP)
[17:04:48] balo: => "http://ssh://google.com"
[17:05:04] balo: damn i should leave this channel :D
[17:05:17] balo: or just go to sleep

2017-04-18

[15:28:26] balo: haylon: you can check the file with the `od` unix command if there is some weirdness with it
[15:28:43] balo: are you trying to read the file from a local file system?
[15:29:07] balo: maybe it's worth checking your environment's encoding too
[15:30:10] balo: just ideas, never saw this issue. maybe once when i was trying to read from a host with SSL with net/http but with plain connection :D
[15:32:09] balo: trye the -c option
[15:32:50] balo: you should see if there is any weirdness but yeah maybe there is a more friendlier tool for this
[15:33:23] balo: i would bet for the environment where you are running the script, would check the file's encoding and making sure it's UTF-8
[15:33:59] balo: and also maybe you can paste it somewhere how you are trying to read and parse the file. maybe the problem lies in the code

2017-04-13

[09:19:32] balo: Quit: Lost terminal
[09:19:43] balo: has joined #ruby
[11:39:16] balo: Quit: leaving
[11:39:38] balo: has joined #ruby
[20:49:00] balo: de #ruby #erlang #elixir-lang #jruby
[20:49:15] balo: wrong window sry

2017-04-03

2017-03-29

[21:24:05] balo: has joined #ruby

2016-06-17

[19:33:34] balo: Quit: leaving

2016-06-15

[11:34:16] balo: has joined #ruby

2015-05-18

[10:14:39] balo: I'm doing a wrapper for ActiveRecord::Base objects which is inherited from SimpleDelegator. It works well in most cases but the class name becames my wrapper class name. This causes problems everywhere
[10:15:22] balo: do you know which method should I override to my delegator be more transparaent in the aspect of classname?
[10:17:16] balo: I suspect #model_name should do the trick but it's just a shot in the dark