Activity Graph

Page 1 of 1


[12:14:37] Iambchop: *.net *.split


[06:58:03] Iambchop: *.net *.split
[11:32:10] Iambchop: has joined #ruby


[15:23:58] Iambchop: ruby mjit generates and compiles c for parts of the program at runtime: https://medium.com/@k0kubun/the-method-jit-compiler-for-ruby-2-6-388ee0989c13
[15:24:52] Iambchop: to distribute a program look at things like traveling ruby or ruby packer
[15:58:49] Iambchop: headius: I've never used the newer JRuby AOT stuff, but custom jruby-complete jars (and wars) to distribute programs (internally) improved my life; thanks for that :-)
[16:02:17] Iambchop: I've used mruby to compile (simple) nagios check scripts, that's worked well
[18:45:06] Iambchop: jwr: failed to reproduce for me here https://dpaste.de/add5
[19:09:03] Iambchop: your ./bin/bundle is from bundler binstub? added rake to my Gemfile and used bundle binstub: https://dpaste.de/nqyV


[16:15:17] Iambchop: nEnvelope&network=test
[16:15:17] Iambchop: https://www.stellar.org/laboratory/#xdr-viewer?input=AAAAAFugE4m5G6atiR3UnMAowKubzTCrhbm1uRXNXElbXnIIAAAAZAACv7oAA3rJAAAAAAAAAAEAAAAQVGVzdCBUcmFuc2FjdGlvbgAAAAEAAAAAAAAAAQAAAAAMF%2FX3w8lITxPE60OCt6GzPVeEL2IVmq5Cz6%2FggDlPZAAAAAFITlkAAAAAAJyzpxsbHjlm33tVyNgwYLBOw9%2B35z5yQ%2BeiqdRkBROZAAAAAEIpQYAAAAAAAAAAAVtecggAAABA2%2B8Zm43h9NEYi2ReXwK%2Bg9ZHLvjklferCHotyXg2Tv%2BjYfqgipPTfrwdRlvXDwMwLP0YhgMReJLLF80VcYVUAQ%3D%3D&type=Transactio
[16:15:17] Iambchop: dionysus69: "are you decoding the right xdr type?" how was that message encoded?


[15:15:34] Iambchop: hrrz: this is from debian not centosm but: "clang-3.4 can't compile programs in a minimal chroot...install libgcc-4.7-dev or libgcc-4.8-dev, the problem goes away" https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754963


[12:12:08] Iambchop: leni1: https://github.com/rbenv/rbenv/issues/975


[02:07:45] Iambchop: blerrp: xp on line 22 is a local variable https://www.codinginthecrease.com/news_article/show/307337-shadowing-gotchas
[22:47:20] Iambchop: lbracher: I know it says warning not error, but it might still be fatal: "WARNING: potential privilege escalation vulnerability detected."


[21:11:46] Iambchop: Ping timeout: 268 seconds


[17:56:04] Iambchop: FrostCandy: "it doesnt work" means what? it would be helpful if you could provide the code, expected output, actual output, and any error messages: https://dpaste.de
[18:06:18] Iambchop: FrostCandy: https://github.com/rubocop-hq/ruby-style-guide/blob/master/README.md#syntax " Use :: only to reference constants...Do not use :: for regular method invocation"
[18:14:03] Iambchop: What gem and what version of ruby/rails?
[18:22:57] Iambchop: Okay, some confusion on terminology: "OpenStates::Bill.where(state: 'tx', q: 'taxi')" OpenStates is a module, OpenStates::Bill is a class
[18:24:29] Iambchop: depending where in the rails stack you are calling this from "parameters" is a defined method, that could be where you got tripped up there
[18:26:36] Iambchop: https://github.com/WideEyeLabs/ruby-openstates/blob/master/lib/openstates/models/bill.rb
[18:27:23] Iambchop: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/http/parameters.rb#L50


[21:34:39] Iambchop: Wafficus: I have LRTHW and it looks like a fine option. If its style works for you, go with it; the channel topic has a link to more book suggestions: https://goo.gl/wpGhoQ


[02:53:42] Iambchop: cnsvc: it looks like the BigDecimal warning was fixed in Rails 5.x: https://github.com/rails/rails/pull/31435 I don't know about the segfault :)


[14:10:42] Iambchop: nebg: how is your ruby installed? vendor package, rvm, self compiled. etc?
[14:29:32] Iambchop: nebg: "rvm @global do gem install bundler"?
[23:02:48] Iambchop: hays: RFC2616 said that (most) redirects should keep the same request method, most browsers ignored that and switch to GET https://trac.ietf.org/trac/httpbis/ticket/160


[20:20:12] Iambchop: &>> [Time.utc('2019-01-01 00:02:57.000'), Time.utc(2019, 1, 1, 0, 2, 57)]
[20:20:21] Iambchop: streblo: https://ruby-doc.com/docs/ProgrammingRuby/html/ref_c_time.html#Time.utc
[22:44:16] Iambchop: http://www.rubyinside.com/advent2006/4-ruby-obfuscation.html
[22:53:21] Iambchop: The underhanded C contest was always good too: innocent looking code with a malicious behavior.


[05:18:40] Iambchop: domgetter, havenwood: http://dpaste.com/1Q6GMA0
[22:36:55] Iambchop: barg: compare "[0..2].each{|x| p x}" to "(0..2).each{|x| p x}"
[22:37:10] Iambchop: oh, leftylink beat me to it :-)
[22:40:51] Iambchop: depending on your actual end goal: 3.times is probably better than the range :-), map is probably even better


[19:38:35] Iambchop: &>> (?Z..?a).to_a.join


[04:04:52] Iambchop: eindoofus: the topic has a link to book recommendations
[04:11:56] Iambchop: eindoofus: https://goo.gl/wpGhoQ
[17:09:36] Iambchop: multi_io: I've never used it, but there is an rbenv gemset plugin https://github.com/jf/rbenv-gemset


[04:18:27] Iambchop: Isn't pickaxe 4th edition is 1.9 and 2.0? :-)


[17:41:34] Iambchop: DomainTools screenshot history for rubygems.com https://usercontent.irccloud-cdn.com/file/f0RF1JH5/Capture%2B_2018-12-24-12-40-35.png


[01:44:59] Iambchop: isene: I finally got around to launching an 18.10 VM and reproduced with the stock ruby package; my niece needs to work on a project, so I still won't be able to dig into it yet.
[04:52:02] Iambchop: tested gmail imap @sock.hostname in my VM successfully; tried a few times to pass an openssl context callback through the IMAP.new call, but failed (something like "Net::IMAP.new('imap.gmail.com', port: 993, ssl: {servername_cb: lambda{|sock, name| sock.hostname=name}})"); way past bed time, goodnight :-)
[13:03:21] Iambchop: yeah; I think I tried everything in the docs that was named _cb or _callback; I failed at all :)
[15:48:39] Iambchop: aha! "Cannot confirm that this affects bionic. This may be due to openssl 1.1.0 (in bionic) sending a default SNI when none is provided, whereas 1.1.1 (in cosmic) sends nothing." https://bugs.launchpad.net/ubuntu/+source/fetchmail/+bug/1798786/comments/9
[20:47:19] Iambchop: "SNI has been made mandatory to implement in TLS 1.3 but not mandatory to use. Some sites want to encourage the use of SNI and configure a default certificate that fails WebPKI authentication when the client supports TLS 1.3. This is under the assumption that if a hostname is not sent, then it means that the client does not verify the server certificate (unauthenticated opportunistic TLS). For implementation that actually don't
[20:47:20] Iambchop: send the SNI extension, but do verify the server certificate this can cause connection failures." https://wiki.openssl.org/index.php/TLS1.3#Server_Name_Indication
[20:48:50] Iambchop: isene: Net::IMAP.new "imap.gmail.com", port: 993, ssl: {ssl_version: :TLSv1_2, verify_hostname: false}}
[20:49:25] Iambchop: ^ fallback to 1.2 seems to work here


[10:50:56] Iambchop: isene: are you using ubuntu's packaged, build your own, 3rd party package? you used imap.gmail.com:993 on your s_client test? the line you said it's failing on "imap.gmail.com" isn't in the script you posted (ms[0][0] is in the script). test with just a minimal example e.g. $ ruby -r net/imap -e 'p Net::IMAP.new("imap.gmail.com", 993, ssl: true)'
[17:12:40] Iambchop: KrzaQ: when should it return val instead of first (e.g. only if array is empty, only if first is nil, only if first is falsey)?
[17:12:49] Iambchop: &>> [([1,2].first || 3), ([nil,4].first || 5)]
[17:22:55] Iambchop: https://gist.github.com/marzdgzmn/da9c0eb69a6fa9647531e8ffbeecf2eb


[11:52:04] Iambchop: Rudolph: what shell are you using? https://robots.thoughtbot.com/how-to-use-arguments-in-a-rake-task


[14:52:02] Iambchop: &>> module Foo; @foo='42'; p [self, @foo]; def bar; p [self, @foo]; end; end; class Baz; include Foo; end; qux=Baz.new; qux.bar; [Foo.instance_variable_get(:@foo), qux.instance_variable_get(:@foo)]
[14:56:26] Iambchop: marz_d`ghostman: ^ @db in the module definition is not the same as @db in the method definitions; [Foo.instance_variable_get(:@foo), qux.instance_variable_get(:@foo)] => ["42", nil]; note the different "self" in each location


[17:52:16] Iambchop: Ping timeout: 264 seconds
[17:52:28] Iambchop: has joined #ruby


[05:04:32] Iambchop: Ring0`: > [1,2,3].each_with_object([0]).map{|a,n| n[0]+=a} #=> [1, 3, 6]
[05:04:32] Iambchop: Ring0`: > n=0; [1,2,3].map{|a| n+=a} => [1, 3, 6]
[05:23:55] Iambchop: one more before bed> [1,2,3].inject([0]){|a,b| a<<b+a[-1]}[1..-1] # => [1, 3, 6]
[05:24:09] Iambchop: > [1,2,3].inject([]){|a,b| a<<b+a[-1].to_i} #=> [1, 3, 6]


[03:49:52] Iambchop: lunorian: "Ruby blocks are little anonymous functions that can be passed into methods. Blocks are enclosed in a do / end statement or between brackets {}" https://www.rubyguides.com/2016/02/ruby-procs-and-lambdas/#Understanding_Ruby_Blocks
[03:55:19] Iambchop: e.g. "[1,2,3].each do |n| puts n; end" or "[1,2,3].each{|n| puts n}": the do/end (or {}) is an anonymous function passed into the each method
[04:07:26] Iambchop: I think that if it was "class Foo(a,b,c) do" the do keyword would be wasted and not provide any new info when parsing/reading the code that the class keyword didn't already provide. :)
[04:13:27] Iambchop: Oh, I meant "class Foo do" or "def bar(a,b,c) do" there but squished them together. :-)
[04:32:51] Iambchop: What do you mean by "is possible to use it"? It's not posdible; "class Foo do" errors out. (There is a way to create an anonymous class that does not use the class keyword, but does use the do keyword; I was leaving that out because I didn't want to complicate matters.)
[04:35:21] Iambchop: http://blog.jayfields.com/2008/02/ruby-creating-anonymous-classes.html
[04:40:58] Iambchop: If you've seen code that used "Class.new do" that was an anonymous class. The do keyword is used there because it's actually passing a block to the "new" method. But, "normal" methods just use the class keyword.
[04:42:37] Iambchop: of course that should read "normal *classes*" :-)


[12:20:25] Iambchop: xco: try "puts admin_link(false)" with both versions


[00:33:16] Iambchop: maslen: custom_pg_hba_entries is a Hash, entries is an Array (of Hash), compare yours to the example: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template#L833 "postgresql['custom_pg_hba_entries'] = { APP1: [ { type: example, ... }, ... ], APP2: {...}, ... }"
[00:35:12] Iambchop: (crap messed up my cut-down example punctuation there, but the real example is still good :-)
[00:36:11] Iambchop: (forgot to add the [] when I rushed to add APP2)
[01:26:20] Iambchop: https://usercontent.irccloud-cdn.com/file/QheTnE6A/20181127_202318_HDR-01.jpeg
[01:26:40] Iambchop: (oops wrong channel)
[15:56:57] Iambchop: Bish: 69.divmod(30).yield_self{|m,rd| [m]+rd.divmod(7)} #=> [2, 1, 2]
[15:57:39] Iambchop: (would look nicer with "then" in 2.6)


[00:52:40] Iambchop: has left #ruby: ()
[02:00:26] Iambchop: has joined #ruby


[02:46:02] Iambchop: Swyper: your first gist: I don't know why you were getting true, I pasted it into a fresh irb: => false; your second gist: it's returning [1,2,3] because... step through the method on paper and write down the contents of newArray at each step


[21:28:41] Iambchop: bobdobbs: you have ruby-build installed as an rbenv plugin via git? update it to get the latest version defs: cd "$(rbenv root)"/plugins/ruby-build && git pull
[21:29:40] Iambchop: 2.5.3 was added Oct. 18


[10:34:52] Iambchop: marz_d`ghostman: not "test specific", but look at StringIO?


[02:26:06] Iambchop: jayjo: helpy is a rails app, so rails docs may answer some of your questions. the db:migrate task will load all of the migration files in the directory; on subsequent runs it will skip files it has loaded before. the db:seed task runs the seeds.rb file. those are standard rails conventions. https://guides.rubyonrails.org/active_record_migrations.html


[04:36:00] Iambchop: https://www.irccloud.com/pastebin/mFAU2Ggt
[04:36:27] Iambchop: nodes.select{|n| n.sub(/\.*\Z/,'').match(hosts.to_s)}
[04:37:08] Iambchop: ["agent01.localdomain", "agent02.localdomain"]
[04:39:57] Iambchop: \Z end of whole string; $ end of any line
[04:43:40] Iambchop: jidar: upload some rspec or minitest showing desired inputs and outputs :-)
[05:28:27] Iambchop: sarink: the docs show passing the param when using Proc.new, but not passing the param when using ->
[05:28:31] Iambchop: https://github.com/rails/rails/pull/33548/files


[03:46:30] Iambchop: ivanskie: you mean like a post-install script? by design gems don't support that; depending on why it needs done perhaps the installed gem could detect the need and do it automatically on first run or include instructions in a post-install message https://stackoverflow.com/questions/14395992/how-to-execute-a-script-while-gem-installation


[17:09:33] Iambchop: inky: is 2.5.3 listed in rbenv versions? "install -l" lists what can be installed, "versions" lists what is installed


[13:52:59] Iambchop: TvL2386: "You can connect to a [MS]SQL Database using Ruby on Windows, Linux, or Mac." https://docs.microsoft.com/en-us/sql/connect/ruby/ruby-driver-for-sql-server?view=sql-server-2017
[13:54:43] Iambchop: TvL2386: If you're hitting an error post a gist.
[13:56:15] Iambchop: TvL2386: It's been years since I've tried (and don't have a Windows box to test on) but it did work the last I tried.
[13:58:18] Iambchop: jlebrech: can you post a gist of the code and full trace of the error?
[14:13:03] Iambchop: jlebrech: paste the output of "bundle show"
[14:24:50] Iambchop: jlebrech: let us know if you figure it out or still have trouble :)
[14:35:57] Iambchop: jlebrech: are you using the chromedriver-helper gem?
[14:43:27] Iambchop: jlebrech: you might be able to use headless chrome in your ci


[13:47:29] Iambchop: has joined #ruby


[03:49:37] Iambchop: Ping timeout: 256 seconds


[02:47:11] Iambchop: *.net *.split
[02:48:06] Iambchop: has joined #ruby


[20:53:24] Iambchop: *.net *.split


[12:25:37] Iambchop: *.net *.split
[12:27:10] Iambchop: has joined #ruby
[15:01:07] Iambchop: *.net *.split
[15:03:26] Iambchop: has joined #ruby


[15:00:32] Iambchop: has joined #ruby


[04:15:21] Iambchop: has joined #ruby


[03:24:26] Iambchop: keithy: https://github.com/capistrano/sshkit
[03:25:07] Iambchop: (I haven't used sshkit; I have used net-ssh)
[03:31:59] Iambchop: I've also seen, but not used: https://github.com/duke-automation/net-ssh-telnet
[03:35:36] Iambchop: The SyncShell service allows you to execute commands on the shell and block until they finish https://net-ssh.github.io/ssh/v1/chapter-5.html#s4
[03:36:34] Iambchop: (oh that's an old version docs though)
[03:39:12] Iambchop: if you have a little use case to demonstrate, you can post a gist here later
[03:41:29] Iambchop: updated docs: http://net-ssh.github.io/net-ssh/Net/SSH/Connection/Session.html#method-i-exec-21 exec!() Same as exec, except this will block until the command finishes.
[03:56:24] Iambchop: keithy: for future reference https://gist.github.com/Iambchop/5e4b30c874f1ed62eb1c3b4388fd85c2
[03:57:29] Iambchop: dessm: can you post a simple gist with sample pre/post data?
[04:31:01] Iambchop: memo1: http://blog.luckyus.net/2008/05/14/auto-indent-in-irb/ ?
[04:31:24] Iambchop: http://tagaholic.me/2009/05/29/exploring-how-to-configure-irb.html
[13:18:34] Iambchop: phaul: share a gist of your code and issues?


[23:23:43] Iambchop: Ping timeout: 265 seconds
[23:25:30] Iambchop: has joined #ruby


[03:46:19] Iambchop: Guest35375: maybe I'm looking at the wrong things; but looks like rush doesn't use net::ssh but directly runs ssh commands, but rye does take a key parameter
[03:46:23] Iambchop: https://github.com/delano/rye/blob/master/lib/rye/box.rb
[03:46:34] Iambchop: https://github.com/adamwiggins/rush/blob/master/lib/rush/ssh_tunnel.rb
[03:47:16] Iambchop: could maybe use .ssh/config to configure the underlying ssh for rush?


[15:36:00] Iambchop: Ping timeout: 248 seconds
[17:36:01] Iambchop: has joined #ruby


[02:07:17] Iambchop: *.net *.split
[02:17:38] Iambchop: has joined #ruby
[06:26:10] Iambchop: *.net *.split
[06:31:48] Iambchop: has joined #ruby
[06:48:29] Iambchop: *.net *.split
[07:26:21] Iambchop: has joined #ruby


[22:49:45] Iambchop: mynameisdebian: I've used roo but never ran into file locking problem
[22:50:52] Iambchop: you could copy to a tempfile and operate on that?
[22:51:29] Iambchop: you could copy to a tempfile and operate on that?
[22:51:51] Iambchop: oops double post :-(
[22:52:06] Iambchop: mynameisdebian: post a gist?
[22:53:41] Iambchop: what platform are you on? local or remote filesystem?
[23:00:08] Iambchop: https://gist.github.com/ paste the code snippet and console output into the big text area and hit "create public"
[23:08:19] Iambchop: (and then paste the resulting url here :-)


[02:53:52] Iambchop: sioux: "gems/activerecord-5.1.2" but redmine 3.4 should be rails 4.2: http://www.redmine.org/projects/redmine/wiki/redmineinstall
[02:54:44] Iambchop: sioux: (alias_method_chain was deprecated then removed in rails 5.x)
[02:56:50] Iambchop: sioux: bundle exec rake redmine:plugins:migrate RAILS_ENV=production http://www.redmine.org/projects/redmine/wiki/Plugins
[02:59:18] Iambchop: sioux: I would think the redmine Gemfile would specify rails 4.2
[03:00:29] Iambchop: yes https://github.com/redmine/redmine/blob/3.4-stable/Gemfile gem "rails", "4.2.8"
[03:01:14] Iambchop: sioux: are you running bundle exec from the redmine directory root?
[03:13:29] Iambchop: from that link 3.4 is compatible with ruby ruby 1.9.3, 2.0.0, 2.1, 2.2, 2.3, 2.4 so your ruby should be ok
[03:14:45] Iambchop: then the bundle install should get the right version of rails
[12:50:56] Iambchop: sioux: looks like you're in "/opt/redmine/plugins" but should be in "/opt/redmine" e.g. https://www.redmineup.com/pages/plugins/agile/installation


[02:29:22] Iambchop: axisys: there is a newer package for ruby in the scl repos: https://www.softwarecollections.org/en/scls/rhscl/rh-ruby23/
[16:56:10] Iambchop: dalitom: an example of using net-ssh to run a command with sudo and provide the password when prompted: https://irb.rocks/execute-sudo-commands-with-net-ssh/
[17:01:10] Iambchop: dalitom: if you have trouble, upload a gist of your code and ask for more help here :)
[17:18:06] Iambchop: dalitom: do you have some code you tried?
[17:23:47] Iambchop: dalitom: "/n" instead of "\n" do you need to interact with the commands or just run them? capture output?
[17:49:30] Iambchop: dalitom: https://gist.github.com/Iambchop/6b8b2c09dfc7fb2765953ffe7080c5a7


[01:32:26] Iambchop: mrgordon: https://gist.github.com/anonymous/6200ced02171f4686cdc20eafaffae7d


[00:19:00] Iambchop: has joined #RubyOnRails


[02:55:48] Iambchop: has joined #ruby