« Back to channel list

#ruby - 17 November 2017

« Back 1 day Forward 1 day »
[00:00:22] bambanx: am sorry i accidentally closed my irc client baweaver
[00:00:42] RickHull: metaprogramming is often used with reflection, e.g.
[00:00:50] havenwood: Tiny lemurs inside the lemur's head.
[00:00:50] bambanx: but i am reading all
[00:00:58] RickHull: >> Object.const_get("String").new('foo').send("reverse")
[00:00:59] ruby[bot]: RickHull: # => "oof" (https://eval.in/901917)
[00:01:06] baweaver: bambanx: http://logs.ryanbigg.com/ruby?date=2017-11-16#6660085
[00:01:13] baweaver: There's some logs for you
[00:01:18] baweaver: well off I go for now, cheers
[00:01:54] cschneid_: has joined #ruby
[00:02:06] al2o3-cr: bambanx: here an example of meta
[00:02:10] al2o3-cr: https://eval.in/901918
[00:02:11] bambanx: When u said above "the coder writes code that writes/manipulates the code that will get executed" it means the code modificate the code files too?
[00:02:46] al2o3-cr: the most simple yet to understand
[00:02:47] hutch34: has joined #ruby
[00:02:54] heftig: has joined #ruby
[00:03:31] bambanx: al2o3-cr, i am not pro in ruby, for me looks like a class with a function
[00:04:29] al2o3-cr: bambanx: all explained here; https://www.youtube.com/watch?v=io34q2G4eOU
[00:04:30] bambanx: object oriented is a type of meta programming?
[00:04:49] al2o3-cr: bambanx: watch and you'll soon learn :)
[00:05:02] bambanx: ok al2o3-cr thanks you
[00:05:09] scientes: how do i turn "Identifier: Contents-deb" into {"Identifier" => "Contents-deb"}
[00:05:30] al2o3-cr: scientes: split on : then to_h
[00:07:33] al2o3-cr: >> ["Identifier: Contents-deb".split(':')].to_h
[00:07:34] ruby[bot]: al2o3-cr: # => {"Identifier"=>" Contents-deb"} (https://eval.in/901919)
[00:07:48] scientes: MetaKey: contrib/Contents-arm64
[00:07:48] scientes: ShortDesc: Contents-arm64
[00:07:48] scientes: Description: http://ftp.us.debian.org/debian experimental/contrib arm64 Contents (deb)
[00:07:48] scientes: URI: http://ftp.us.debian.org/debian/dists/experimental/contrib/Contents-arm64
[00:07:48] scientes: Filename: /var/lib/apt/lists/ftp.us.debian.org_debian_dists_experimental_contrib_Contents-arm64.lz4
[00:07:48] scientes: Optional: yes
[00:07:50] scientes: KeepCompressed: yes
[00:07:52] scientes: Codename: experimental
[00:07:54] scientes: has left #ruby: ("Leaving")
[00:07:54] al2o3-cr: >> ["Identifier: Contents-deb".split(': ')].to_h
[00:07:56] ruby[bot]: al2o3-cr: # => {"Identifier"=>"Contents-deb"} (https://eval.in/901920)
[00:08:24] scientes: has joined #ruby
[00:08:36] RickHull: use a paste site scientes
[00:08:36] scientes: sorry about that. here is the data: https://gist.github.com/shawnl/90dfefa06370c60430ae723be83867a2
[00:08:58] scientes: you need an auto-kick bot like #C has
[00:09:10] scientes: I just copy-and-pasted into the paste site
[00:09:14] scientes: so it was still in my buffer
[00:09:39] RickHull: ha, no worries
[00:10:31] shazbotmcnasty: RickHull: thanks man, I got it working
[00:10:40] havenwood: scientes: You angered the bot but not enough for it to lash out.
[00:11:56] alveric2: has joined #ruby
[00:11:56] havenwood: >> "Identifier: Contents-deb\nanother: yerp".lines(chomp: true).map { |line| line.split(/:\s+/) }.to_h
[00:11:57] ruby[bot]: havenwood: # => no implicit conversion of Hash into String (TypeError) ...check link for more (https://eval.in/901921)
[00:12:17] havenwood: #=> {"Identifier"=>"Contents-deb", "another"=>"yerp"}
[00:12:42] havenwood: (`chomp: true` needs Ruby 2.4)
[00:13:07] havenwood: >> "Identifier: Contents-deb\nanother: yerp".lines.map { |line| line.chomp.split(/:\s+/) }.to_h
[00:13:08] ruby[bot]: havenwood: # => {"Identifier"=>"Contents-deb", "another"=>"yerp"} (https://eval.in/901922)
[00:13:15] Devalo: has joined #ruby
[00:13:19] havenwood: scientes: ^
[00:15:22] conta2: has joined #ruby
[00:19:56] imode: has joined #ruby
[00:20:09] UserOO7: has joined #ruby
[00:21:56] tacoboy: has joined #ruby
[00:24:00] shazbotmcnasty: ugh more dependancy issues
[00:24:06] shazbotmcnasty: https://pastebin.com/X8E6akUd
[00:24:06] ruby[bot]: shazbotmcnasty: as I told you already, please use https://gist.github.com
[00:24:36] milardovich: has joined #ruby
[00:25:26] RickHull: shazbotmcnasty: are you using ruby 2.4 now?
[00:25:51] RickHull: don't worry about the 2.4.0 part, that's the convention for library paths
[00:26:37] RickHull: dunno - /opt/zammad/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require': incompatible library version - /opt/zammad/vendor/bundle/ruby/2.4.0/gems/http_parser.rb-0.6.0/lib/ruby_http_parser.so (LoadError)
[00:28:03] shazbotmcnasty: yeah i saw it but i don't know where to start on fixing it
[00:28:11] RickHull: what happens with `ruby -rhttp_parser -e'exit'`
[00:28:44] RickHull: confirm `ruby --version`
[00:29:30] RickHull: easier: `ruby -r http_parser -e exit`
[00:30:26] shazbotmcnasty: >ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
[00:31:52] shazbotmcnasty: https://gist.github.com/anonymous/0e507ae07471f69124585bbd0ac35f60
[00:31:52] elphe: has joined #ruby
[00:32:02] shazbotmcnasty: THERE ruby[bot] jeez
[00:32:11] ruby[bot]: nomnomnomnom
[00:32:45] RickHull: shazbotmcnasty: try `gem install http_parser`
[00:32:58] RickHull: and then again `ruby -r http_parser -e exit`
[00:33:24] RickHull: also, do you have a rails console?
[00:33:34] RickHull: it might not load properly yet due to this error, not sure
[00:33:43] RickHull: also, you can check with #rubyonrails
[00:34:26] selim: has joined #ruby
[00:34:38] shazbotmcnasty: yeah same error after install http_parser
[00:35:00] RickHull: so `gem install http_parser` fails?
[00:35:09] RickHull: or `ruby -r http_parser -e exit` fails?
[00:35:24] shazbotmcnasty: gem install worked
[00:35:31] RickHull: what do you get for `gem list http_parser`
[00:36:00] allcentury: has joined #ruby
[00:36:08] shazbotmcnasty: *** LOCAL GEMS ***
[00:36:35] RickHull: ok -- then `gem install http_parser` must have failed. can you try again, and paste the output
[00:42:11] shazbotmcnasty: https://gist.github.com/anonymous/6fd78cb37e0dfd04c63d639ea1fbc6ec
[00:43:07] al2o3-cr: shazbotmcnasty: dont use sudo
[00:43:37] nowhere_man: has joined #ruby
[00:46:05] lupine: has joined #ruby
[00:49:49] shazbotmcnasty: al2o3-cr: 'you don't have write permissions for the /usr/local/rvm/gems/ruby......'
[00:49:54] shazbotmcnasty: if i don't sudo
[00:50:31] RickHull: that can make sense, but generally it's better to run an rvm environment with user permissions
[00:50:54] RickHull: try `sudo ruby -r http_parser -e exit`
[00:51:43] RickHull: not sure if that will use the sudo'd gems
[00:52:57] duckpuppy: has joined #ruby
[00:53:07] RickHull: does this setup use bundler? how did rails get installed?
[00:53:49] eckhardt: has joined #ruby
[00:54:10] al2o3-cr: shazbotmcnasty: for one you shouldn't be using sudo with rvm
[00:55:06] al2o3-cr: we'll have to creep back to the beginning
[00:55:46] shazbotmcnasty: yeah i feel like I'm going to have to set up ruby all over again - this feels like a mess
[00:56:45] al2o3-cr: shazbotmcnasty: what does `rvm list` show?
[01:04:41] shazbotmcnasty: I have to go, i'll have to pick this back up tomorrow. I'm on overtime and they won't like that.
[01:07:14] hutch34: has joined #ruby
[01:13:35] kitsunenokenja: has joined #ruby
[01:14:27] milardovich: has joined #ruby
[01:26:20] charliesome: has joined #ruby
[01:28:11] orbyt_: has joined #ruby
[01:30:29] plexigras: has joined #ruby
[01:32:08] bambanx: any nice scraper gem?
[01:42:08] mjolnird: has joined #ruby
[01:47:46] AnoHito_: has joined #ruby
[01:49:20] shazbotmcnasty: has joined #ruby
[01:50:29] workmad3: has joined #ruby
[01:54:25] shinnya: has joined #ruby
[01:55:05] guardianx: has joined #ruby
[01:55:46] milardovich: has joined #ruby
[02:01:37] guacamole: has joined #ruby
[02:12:30] konsolebox: has joined #ruby
[02:14:44] Azure: has joined #ruby
[02:14:49] scientes: has joined #ruby
[02:14:49] scientes: has joined #ruby
[02:15:00] veeti: has joined #ruby
[02:17:56] Jameser: has joined #ruby
[02:21:11] GodFather: has joined #ruby
[02:24:16] drowze: has joined #ruby
[02:25:09] oetjenj: has joined #ruby
[02:27:00] konsolebox: has joined #ruby
[02:27:27] nicesignal: has joined #ruby
[02:29:07] orbyt_: has joined #ruby
[02:31:26] cagomez: has joined #ruby
[02:34:51] aroaminggeek: has joined #ruby
[02:37:08] aroaminggeek: has joined #ruby
[02:40:14] podlech: has joined #ruby
[02:42:23] milardovich: has joined #ruby
[02:45:04] konsolebox: has joined #ruby
[02:48:12] statelesscode: has joined #ruby
[02:49:11] scientes: has joined #ruby
[02:49:12] scientes: has joined #ruby
[02:50:01] hutch34: has joined #ruby
[02:53:03] statelesscode: has joined #ruby
[02:53:09] d^sh: has joined #ruby
[02:53:30] kryptoz: has joined #ruby
[02:53:33] konsolebox: has joined #ruby
[02:55:37] gizmore|2: has joined #ruby
[03:05:11] cdg: has joined #ruby
[03:05:36] cagomez: has joined #ruby
[03:11:04] konsolebox: has joined #ruby
[03:17:04] hutch34: has joined #ruby
[03:17:54] roshanavand: has joined #ruby
[03:19:08] sammi`: has joined #ruby
[03:20:01] uZiel: has joined #ruby
[03:24:43] konsolebox: has joined #ruby
[03:26:37] AnoHito: has joined #ruby
[03:29:17] milardovich: has joined #ruby
[03:31:48] enterprisey: has joined #ruby
[03:35:52] duncan_bayne: has joined #ruby
[03:37:11] duncan_bayne: Hey :) We've just upgraded a Rails 4 project from MRI 2.2.2 -> 2.4.2, and we're seeing some odd behaviour in some of our specs. Specifically, assertions that kept failing until Timeout#timeout gave up no longer raise Timeout::Error, and thus no longer time out.
[03:37:37] duncan_bayne: Are there are any known issues w/ Timeout in 2.4.2? Did the usual Googling for issues, etc., but couldn't find anything.
[03:39:17] guardianx: has joined #ruby
[03:42:05] Radar: duncan_bayne: This sounds awfully familiar.
[03:42:14] Radar: as in: I just heard this exact story at lunch time.
[03:42:34] Radar: do you work with Milewski?
[03:43:22] duncan_bayne: Radar: LOL yes :)
[03:43:44] Radar: Did he tell you that I suggested that he should try the latest Ruby and see if that fixes the issue?
[03:43:50] Radar: Also: do you see the issue on 2.3.x?
[03:43:56] konsolebox: has joined #ruby
[03:44:05] Radar: And if ruby-head works then he owes me lunch. So I have a somewhat vested interest.
[03:44:32] duncan_bayne: We're busy bisecting Ruby versions in an attempt to narrow it down
[03:45:30] duncan_bayne: Radar: all of us in the office are having a laugh at this :)
[03:45:40] alan_w: has joined #ruby
[03:47:15] Radar: Looks like very little has changed for timeout.rb between v2_2_2 and trunk.
[03:48:58] duncan_bayne: Also I still need to bring my rspec electrocution rig to Melbourne Ruby and hook you up to it :)
[03:49:12] Radar: Yeah you never did follow through with that particular thread.
[03:49:12] duncan_bayne: If you place the little patches right you can provoke involuntary muscle spasms when your tests fail
[03:49:31] duncan_bayne: Ended up having a third child which took up a lot of capacity
[03:49:46] Radar: I've already got one of those spasms under my right eye and that's enough spasming tyvm
[03:50:38] Radar: duncan_bayne: Do you have an MCVE for this issue you're seeing? https://stackoverflow.com/help/mcve
[03:50:46] konsolebox: has joined #ruby
[03:50:50] veeti: has joined #ruby
[03:51:24] duncan_bayne: Not unless you count 'run a particular spec in our suite that does not seem to be different to any others' as M
[03:51:30] duncan_bayne: Seriously, it's _odd_
[03:52:19] duncan_bayne: Also, it doesn't always fail
[03:52:41] duncan_bayne: When it 'works', the debug trace shows a Timeout::Error being raised (eventually) after successive expectation failures
[03:52:58] duncan_bayne: When it doesn't, you see the expectation failure, but it just keeps trying forever (well, until CI or an operator kills it)
[03:54:47] anisha: has joined #ruby
[03:55:17] RickHull: wasn't a fatwa issued against Timeout.timeout (particularly with concurrency)?
[03:56:22] duncan_bayne: RickHull: yeah we don't use it directly, it's the https://github.com/laserlemon/rspec-wait gem
[03:57:04] Radar: duncan_bayne: do you use it in a capybara spec?
[03:57:06] konsolebox: has joined #ruby
[03:57:15] Radar: Because Capybara has built-in waiting things like this.
[03:59:22] duncan_bayne: Radar: Pez isn't a fan of those; he wanted greater flexibility around matchers, IIRC.
[03:59:31] duncan_bayne: Hence rspec-wait ...
[04:00:01] Radar: Pez is probably right in that case. Well, if you do find whatever's causing it then please let me know :)
[04:00:18] Radar: the issue _definitely_ doesn't happen on 2.2.2 and sorta-kinda-always happens on 2.4.2?
[04:00:58] sneep: Do you two work at the same company?
[04:01:10] Radar: sneep: Same city, different companies.
[04:01:33] kryptoz: has joined #ruby
[04:01:36] duncan_bayne: sneep: Same company for the time being; Pez' outfit is a client of ours
[04:01:36] Radar: last time duncan_bayne and I spoke in person he threatened to electrocute me. And since then he's apparently been _allowed_ to have another kid. They'll let anyone do it these days.
[04:01:47] duncan_bayne: Best. Behaved. Kids. Ever.
[04:01:51] Radar: duncan_bayne: our answers are incongruent.
[04:02:07] Radar: duncan_bayne works at the same company as "Pez" (Perryn), I work at a different company.
[04:02:26] duncan_bayne: This is more confusing than the bloody Ruby bug ;)
[04:02:44] Radar: yup. As soon as people get involved with anything it leads to confusion.
[04:03:13] scientes: has joined #ruby
[04:03:21] duncan_bayne: So, yeah, _definitely_ not 2.2.2, and usefully reproducible in 2.4.2
[04:03:59] cagomez: has joined #ruby
[04:04:13] Radar: duncan_bayne: what about 2.3?
[04:04:17] Radar: Could help narrow things down.
[04:04:21] Radar: And ruby-head.
[04:04:33] duncan_bayne: Radar: trying that right now
[04:09:36] RickHull: duncan_bayne: I'll have a patch up that may be worth trying :)
[04:10:38] milardovich: has joined #ruby
[04:12:52] mjolnird: has joined #ruby
[04:12:54] duncan_bayne: RickHull: you mean a PR on MRI?
[04:13:07] RickHull: no, ripping Timeout from rspec-wait
[04:14:46] ramfjord: has joined #ruby
[04:15:36] duncan_bayne: RickHull: I like the way you roll
[04:16:01] RickHull: it's trickier than it looked at first glance but doesn't look too tough
[04:16:11] RickHull: good test suite, not passing it yet
[04:17:38] diego2: has joined #ruby
[04:17:58] diego2: has joined #ruby
[04:21:17] RickHull: ooh, I see -- I'm not timing out if the block itself stalls out
[04:24:11] allcentury: has joined #ruby
[04:24:36] gix-: has joined #ruby
[04:25:15] govg: has joined #ruby
[04:25:37] jeanlinux: has joined #ruby
[04:28:43] hutch34: has joined #ruby
[04:31:09] BTRE: has joined #ruby
[04:33:53] _the_blackadder: has joined #ruby
[04:35:14] duncan_bayne: RickHull: let me know how you go, would be interested to try your fork against our test suite
[04:35:28] duncan_bayne: Meanwhile, have persuaded rbenv to install HEAD, & retesting
[04:35:45] duncan_bayne: ACTION eagerly anticipates PM beer
[04:36:36] sspreitz: has joined #ruby
[04:38:06] uZiel: has joined #ruby
[04:39:10] ramfjord: has joined #ruby
[04:41:04] pars: has joined #ruby
[04:41:50] duncan_bayne: Radar: confirmed; 2.2.2 definitely works, 2.2.3 definitely doesn't
[04:41:56] hutch34: has joined #ruby
[04:41:58] duncan_bayne: Still waiting on a result from HEAD
[04:42:08] Radar: duncan_bayne: There's a regression in 2.2.3?!
[04:42:12] konsolebox: has joined #ruby
[04:42:46] duncan_bayne: Radar: Looks that way
[04:42:58] duncan_bayne: And it must be subtle, because it works in most cases
[04:43:05] duncan_bayne: "The compiler is broken"
[04:43:17] duncan_bayne: ACTION continues testing, skeptically
[04:44:13] RickHull: duncan_bayne: the main difference is that an rspec-wait TimeoutError is never raised -- since I can't interrupt the block; an ExpectationNotMet error fires when the block completes unmet
[04:44:41] guardianx: has joined #ruby
[04:45:34] RickHull: so if you have some long-running blocks that you want interrupted with a TimeoutError, that won't happen here. i think that could be fixed a couple ways
[04:46:15] RickHull: also, I think there is an unnecessary loop in the handler, but I'm probably wrong on that
[04:46:27] RickHull: so maybe keeping timeout and fixing the loop helps
[04:46:48] Technodrome: has joined #ruby
[04:47:18] d^sh: has joined #ruby
[04:47:28] pars: what we doing?
[04:48:55] coolguy123123: has joined #ruby
[04:49:22] duncan_bayne: pars: Speaking for myself, trying to work out why Timeout#timeout ... isn't ... but only in one of our specs, and only since 2.2.2
[04:50:22] pars: duncan_bayne: i don't understand
[04:52:23] rabajaj: has joined #ruby
[04:53:47] RickHull: duncan_bayne: https://github.com/rickhull/rspec-wait/commit/985aa88dfe4ade70d290aa5c61e57d3872e6b7fc
[04:55:10] RickHull: Radar: duncan_bayne: et al: notice the outer loop in the original -- I don't think it is necessary; never iterates more than once
[04:55:33] RickHull: the retry for ExpectationNotMet is the only looping behavior needed, and it does that
[04:55:49] MrBusiness: has joined #ruby
[04:56:30] RickHull: my HAX line makes some tests pass that otherwise wouldn't
[04:57:20] RickHull: interrupting the block is the main reason to even consider Timeout.timeout here -- and I doubt it is problematic in the way mperham is concerned about: http://www.mikeperham.com/2015/05/08/timeout-rubys-most-dangerous-api/
[04:57:31] milardovich: has joined #ruby
[04:57:50] RickHull: it might be that the bug goes away with a tighter Timeout.timeout block
[04:58:02] RickHull: or you could use any other watchdog technique, like spinning up a thread
[04:58:08] duncan_bayne: RickHull: ta, I'll take a look
[04:58:15] aroaminggeek: has joined #ruby
[04:58:16] duncan_bayne: pars: neither do I, neither do I :-/
[04:58:45] konsolebox: has joined #ruby
[05:00:44] RickHull: "like spinning up a thread" -- heh, this is pretty much what Timeout.timeout does
[05:01:01] cagomez: has joined #ruby
[05:04:22] duncan_bayne: Thanks for the suggestions folks; I'm off home
[05:04:48] duncan_bayne: Will definitely let you know how we get on; milewski reports that the first test run on 2.4 HEAD didn't repro the problem. But it is intermittent ...
[05:04:59] duncan_bayne: has left #ruby: ("beer time")
[05:05:47] duncan_bayne: has joined #ruby
[05:05:55] duncan_bayne: Well that was quick - failed the second time out
[05:06:00] duncan_bayne: Fails on 2.5 preview as well
[05:06:09] Radar: Boo, hiss, etc.
[05:06:13] Radar: I was looking forward to my free lunch.
[05:06:21] RickHull: duncan_bayne: i'm going to move this work to different branches, if you check it out later
[05:06:24] RickHull: my previous link may 404
[05:06:43] duncan_bayne: Radar: Def. boo. Time for MCVE + bisect I think
[05:07:17] konsolebox: has joined #ruby
[05:07:24] duncan_bayne: Well, actually, time for beer, and MVCE + bisect on Monday
[05:07:26] duncan_bayne: has left #ruby: ()
[05:09:55] scientes: has joined #ruby
[05:11:08] veeti: has joined #ruby
[05:11:19] guardianx: https://pragmaticintegrator.wordpress.com/2012/12/13/assign-a-fixed-ip-to-aws-ec2-instance/
[05:11:30] guardianx: sorry ignore that
[05:12:32] Radar: ignore what
[05:13:07] mozzarella: you're very good at it Radar
[05:13:15] Radar: was someone talking to me?
[05:13:31] mozzarella: are you still Australian?
[05:13:47] RickHull: must be selective interference
[05:14:12] RickHull: btw ripped the loop out of the wait_handler; tests pass \o/
[05:14:40] mozzarella: speaking of Australians
[05:14:47] mozzarella: what happened to sevenseacat
[05:14:57] qqmash: has joined #ruby
[05:15:01] RickHull: https://github.com/laserlemon/rspec-wait/compare/master...rickhull:unloop?expand=1
[05:15:02] mozzarella: is she no longer coming here
[05:16:15] RickHull: submitted https://github.com/laserlemon/rspec-wait/pull/22
[05:17:51] mozzarella: she really tied the room together
[05:20:44] konsolebox: has joined #ruby
[05:28:38] iamarun: has joined #ruby
[05:32:19] hutch34: has joined #ruby
[05:32:32] mkroman: has joined #ruby
[05:33:50] k3rn31_: has joined #ruby
[05:34:30] RickHull: Radar: this is for duncan to try -- doubtful it helps but it's something different: https://github.com/rickhull/rspec-wait/tree/tighter_timeout
[05:38:03] RickHull: https://jvns.ca/blog/2015/11/27/why-rubys-timeout-is-dangerous-and-thread-dot-raise-is-terrifying/ "The whole premise of a general timeout method that will interrupt an arbitrary block of code like this is flawed."
[05:38:10] kryptoz: has joined #ruby
[05:38:50] milardovich: has joined #ruby
[05:39:07] RickHull: here's the one that does not interrupt an arbitrary block of code: https://github.com/rickhull/rspec-wait/tree/rip_timeout
[05:44:15] konsolebox: has joined #ruby
[05:44:53] pars: i want to commit suicic
[05:44:58] pars: suicide*
[05:45:27] mozzarella: /join #python
[05:47:27] pars: all afk?
[05:47:49] apeiros: pars: if this is a joke, it's not funny. if it's not - please seek help. f.ex. call a suicide hotline. this channel is not the right place.
[05:48:31] pars: this not a joke
[05:48:51] pars: i want to die
[05:49:54] RickHull: pars: please join us in #ruby-offtopic :)
[05:50:18] pars: ok goodbye
[05:50:24] scientes: has joined #ruby
[05:50:44] Hexafox[I]: has joined #ruby
[05:50:54] workmad3: has joined #ruby
[05:53:34] dionysus69: has joined #ruby
[06:00:49] konsolebox: has joined #ruby
[06:05:33] apeiros: has joined #ruby
[06:06:47] konsolebox: has joined #ruby
[06:07:59] charliesome: has joined #ruby
[06:11:06] Puffball: has joined #ruby
[06:13:44] Devalo: has joined #ruby
[06:15:44] armyriad: has joined #ruby
[06:16:17] duncan_bayne: has joined #ruby
[06:16:34] duncan_bayne: RickHull: pez has asked me to let you know that he's commented on https://github.com/rickhull/rspec-wait/commit/985aa88dfe4ade70d290aa5c61e57d3872e6b7fc
[06:16:43] duncan_bayne: ACTION enables SlackToIRCProxyMode
[06:16:59] duncan_bayne: I suggested that if he used Emacs he'd have a built in IRC client
[06:17:05] scientes: has joined #ruby
[06:17:05] scientes: has joined #ruby
[06:18:51] RickHull: oh cool, I just responded
[06:19:35] jeanlinux: has joined #ruby
[06:22:06] duncan_bayne: RickHull: Ta :)
[06:22:54] konsolebox: has joined #ruby
[06:23:00] duncan_bayne: has left #ruby: ("ERC (IRC client for Emacs 25.3.1)")
[06:23:28] LocaMocha: has joined #ruby
[06:27:40] kies: has joined #ruby
[06:29:04] jeanlinux: has joined #ruby
[06:29:43] jamesaxl: has joined #ruby
[06:34:05] ramfjord: has joined #ruby
[06:34:13] reber: has joined #ruby
[06:35:58] memo1: has joined #ruby
[06:37:22] biberu: has joined #ruby
[06:39:52] konsolebox: has joined #ruby
[06:45:26] harfangk: has joined #ruby
[06:56:33] dionysus69: has joined #ruby
[06:57:41] guacamole: has joined #ruby
[06:59:20] konsolebox: has joined #ruby
[06:59:56] allcentury: has joined #ruby
[07:03:10] rippa: has joined #ruby
[07:04:51] apeiros: has joined #ruby
[07:05:56] iamarun: has joined #ruby
[07:06:22] konsolebox: has joined #ruby
[07:07:01] hemangpatel: has joined #ruby
[07:07:59] hemangpatel: Hello, Anyone has experience in Openproject or know where can I get help ?
[07:21:29] dinfuehr: has joined #ruby
[07:22:24] konsolebox: has joined #ruby
[07:29:25] konsolebox: has joined #ruby
[07:33:43] jenrzzz: has joined #ruby
[07:33:44] jenrzzz: has joined #ruby
[07:35:29] pars: has joined #ruby
[07:37:27] mjolnird: has joined #ruby
[07:39:09] statelesscode: has joined #ruby
[07:39:11] m27frogy: has joined #ruby
[07:39:42] pars: has joined #ruby
[07:41:22] aroaminggeek: has joined #ruby
[07:42:19] ddffg: has joined #ruby
[07:45:20] cdg: has joined #ruby
[07:48:34] eckhardt: has joined #ruby
[07:51:17] workmad3: has joined #ruby
[07:51:24] konsolebox: has joined #ruby
[07:51:31] tAn: has joined #ruby
[07:53:17] guardianx: has joined #ruby
[07:57:52] quobo: has joined #ruby
[08:00:16] m27frogy: has joined #ruby
[08:07:14] konsolebox: has joined #ruby
[08:14:26] konsolebox: has joined #ruby
[08:19:51] Yzguy: has joined #ruby
[08:22:05] jeanlinux: has joined #ruby
[08:22:06] reber: has joined #ruby
[08:23:26] konsolebox: has joined #ruby
[08:26:16] pars: has joined #ruby
[08:30:22] apeiros: hi again, pars
[08:32:14] TomyWork: has joined #ruby
[08:32:24] guille-moe: has joined #ruby
[08:39:42] aupadhye: has joined #ruby
[08:40:17] jeanlinux: has joined #ruby
[08:42:13] tomphp: has joined #ruby
[08:42:19] conta: has joined #ruby
[08:51:34] claudiuinberlin: has joined #ruby
[08:51:59] AnoHito: has joined #ruby
[08:52:29] marr: has joined #ruby
[08:53:30] mikecmpbll: has joined #ruby
[08:56:39] jenrzzz: has joined #ruby
[08:56:39] jenrzzz: has joined #ruby
[09:02:20] guille-moe: has joined #ruby
[09:02:44] uZiel: has joined #ruby
[09:03:45] jeanlinux: has joined #ruby
[09:05:08] chmurifree: has joined #ruby
[09:05:32] burgestrand: has joined #ruby
[09:08:14] iamarun: has joined #ruby
[09:08:20] jeanlinux: has joined #ruby
[09:12:56] jeanlinux: has joined #ruby
[09:14:35] jottr: has joined #ruby
[09:19:31] jeanlinux: has joined #ruby
[09:19:41] Lytol: has joined #ruby
[09:20:40] admwrd: has left #ruby: ()
[09:20:43] uZiel: has joined #ruby
[09:20:46] pars: has joined #ruby
[09:20:50] admwrd: has joined #ruby
[09:21:12] pars: who here?
[09:21:32] admwrd: has left #ruby: ()
[09:22:13] BTRE: has joined #ruby
[09:22:24] pars: heelp i now die
[09:22:41] jeanlinux: has joined #ruby
[09:23:50] apeiros: +b pars!*@*#ruby-offtopic
[09:23:52] ruby[bot]: -b+b pars!*@*#ruby-offtopic pars!*@*#ruby-offtopic$#ruby-banned
[09:24:47] apeiros: -b+b pars!*@*#ruby-offtopic$#ruby-banned pars!*@*#ruby-offtopic
[09:25:02] ruby[bot]: -b+b pars!*@*#ruby-offtopic pars!*@*#ruby-offtopic$#ruby-banned
[09:29:36] mim1k: has joined #ruby
[09:34:22] jeanlinux: has joined #ruby
[09:36:44] TheBrayn: has joined #ruby
[09:37:48] Serpent7776: has joined #ruby
[09:44:14] apeiros: -b pars!*@*#ruby-offtopic$#ruby-banned
[09:45:21] Bish: mozzarella: oh jesus that was a good one
[09:46:47] apeiros: +b pars!*@*$#ruby-offtopic
[09:47:52] Bish: whats wrong with people, i wish i had that much time?
[09:47:56] Bish: i want to die, whelp i die..
[09:48:04] Bish: he gotta make his mind up
[09:48:39] apeiros: Bish: it's no laughing matter.
[09:48:59] Bish: ofcourse it is not, but i doubt like very much that this was serious
[09:49:04] Beams: has joined #ruby
[09:49:42] jeanlinux: has joined #ruby
[09:49:52] cagomez: has joined #ruby
[09:49:55] apeiros: and you base that doubt on what knowledge? really, unless you're a psychiatrist, IMO you better don't judge the situation.
[09:50:08] apeiros: also -> #ruby-offtopic
[09:51:35] workmad3: has joined #ruby
[09:52:41] Bish: banning him certainly helped :o
[09:53:18] apeiros: you should read the ban and understand it
[09:53:31] apeiros: I redirected them to #ruby-offtopic
[09:53:39] gigetoo: has joined #ruby
[09:53:39] Bish: uh you can do that?
[09:53:41] Bish: that's cool
[09:53:44] apeiros: yes I can do that
[09:53:53] Bish: i mean didn't know irc offered that
[09:54:05] Bish: looks like a hack though, with the $?
[09:54:12] apeiros: it may well be a freenode specific extension. and again -> #ruby-offtopic
[09:54:28] apeiros: -o apeiros
[09:56:20] jeanlinux: has joined #ruby
[09:56:45] dcluna: has joined #ruby
[10:02:28] jeanlinux: has joined #ruby
[10:02:52] hutch34: has joined #ruby
[10:05:04] octomancer: has joined #ruby
[10:06:19] larcara: has joined #ruby
[10:09:14] konsolebox: has joined #ruby
[10:10:08] rouge: has joined #ruby
[10:11:40] andikr: has joined #ruby
[10:13:27] guille-moe: has joined #ruby
[10:21:38] rgr: has joined #ruby
[10:26:09] snickers: has joined #ruby
[10:26:46] tvw: has joined #ruby
[10:33:25] BioSpider: has joined #ruby
[10:36:43] howdoi: has joined #ruby
[10:42:55] charliesome: has joined #ruby
[10:46:32] burgestrand: has joined #ruby
[10:46:45] gregf_: has joined #ruby
[10:47:19] ledestin: has joined #ruby
[10:51:17] larcara: has joined #ruby
[10:51:42] Psybur: has joined #ruby
[10:52:08] ferr: has joined #ruby
[10:54:00] ferr: has left #ruby: ()
[10:55:17] stoffus: has joined #ruby
[11:00:24] scientes: has joined #ruby
[11:00:24] scientes: has joined #ruby
[11:01:43] frerich: has joined #ruby
[11:02:55] frerich: Hi all! Is this a good place to ask questions about the Ruby C API? I'm fighting a bit with the lifetime of Ruby 'VALUE' values - in particular, I have a function defined in terms of rb_enc_str_new() to which I would like to add some memoization such that instead of generating a new string every time, it tries to reuse previously generated string VALUEs.
[11:03:42] frerich: Alas, simply storing the generated VALUEs in some hash and then reusing them causes the interpreter to crash. I suppose this is because of ownership (i.e. my cached VALUE is destroyed behind my back). So I tried using rb_obj_clone() or rb_obj_dup() but to no avail.
[11:03:57] frerich: In other languages, I'd typically just increase a reference count, but I suppose in Ruby there is a different way?
[11:05:51] dminuoso: frerich: You must tag it with rb_global_variable if the VALUE persists outside the Ruby world.
[11:06:46] frerich: dminuoso: Ah, I see - that keeps it from getting GC'ed. That's all there is to it, i.e. no clone or dup is needed?
[11:07:28] dminuoso: frerich: Or you have to rb_gc_mark it, it kind of depends on what situation you are in.
[11:10:33] dminuoso: frerich: Yeah just rg_gc_mark those. rb_global_variable is for a different scenario.
[11:10:57] dminuoso: frerich: https://silverhammermba.github.io/emberb/c/#marking
[11:12:10] hutch34: has joined #ruby
[11:12:37] plexigras: has joined #ruby
[11:15:58] frerich: dminuoso: rb_gc_mark seems to be just what I need, thanks a lot! :-)
[11:23:39] frerich: dminuoso: Hm, I hoped I had fixed my issue by simply calling rb_gc_mark on the VALUE before I store it in my cache (my cache is really just a std::map<Foo, VALUE>) but now I see that it eventually causes 'Assertion failed: (OBJ_FROZEN(shared)), function str_replace, file string.c, line 1145.'. Hm!
[11:24:18] ldnunes: has joined #ruby
[11:28:27] GodFather: has joined #ruby
[11:32:56] uZiel: has joined #ruby
[11:35:12] mostlybadfly: has joined #ruby
[11:43:04] jeanlinux: has joined #ruby
[11:44:03] tAn: has joined #ruby
[11:45:46] cdg: has joined #ruby
[11:51:52] workmad3: has joined #ruby
[11:55:30] Jameser: has joined #ruby
[11:55:37] roshanavand: has joined #ruby
[11:58:15] zanoni: has joined #ruby
[11:58:24] bkxd: has joined #ruby
[12:00:28] allcentury: has joined #ruby
[12:02:12] tAn: has joined #ruby
[12:03:33] bkxd_: has joined #ruby
[12:06:51] cdg: has joined #ruby
[12:06:53] duckpuppy: has joined #ruby
[12:15:13] cavallari37: has joined #ruby
[12:15:56] p0s1x: has joined #ruby
[12:16:46] konsolebox: has joined #ruby
[12:18:07] bkxd: has joined #ruby
[12:18:40] DTZUZO: has joined #ruby
[12:20:58] contradictioned: has joined #ruby
[12:28:53] tsglove: has joined #ruby
[12:29:46] larcara: has joined #ruby
[12:32:11] banisterfiend: has joined #ruby
[12:32:38] Jameser: has joined #ruby
[12:33:16] konsolebox: has joined #ruby
[12:39:16] bkxd: has joined #ruby
[12:39:45] kryptoz: has joined #ruby
[12:40:06] rgr_: has joined #ruby
[12:42:44] banisterfiend: has joined #ruby
[12:43:04] rouge: has joined #ruby
[12:55:46] ldnunes: has joined #ruby
[12:56:06] hemangpatel: has joined #ruby
[12:56:18] tAn: has joined #ruby
[12:58:11] tcopeland: has joined #ruby
[12:59:14] gr33n7007h: has joined #ruby
[13:01:20] konsolebox: has joined #ruby
[13:02:01] synthroid: has joined #ruby
[13:06:55] Cool_Fire: has joined #ruby
[13:08:16] Cool_Fire: Hello, I'm wondering if someone can tell me if this is a bug or intended behavior: https://pastebin.com/dFJcP1Fv
[13:08:18] ruby[bot]: Cool_Fire: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/5b4070fed6acf19cc367e356e1f0dc66
[13:08:18] ruby[bot]: Cool_Fire: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[13:09:15] Cool_Fire: It seems te assignment condition is dependant on the value (or existance of a declared) variable
[13:09:53] Cool_Fire: in one instance it functions as if it's : if false; 1; else; nil; end
[13:09:59] konsolebox: has joined #ruby
[13:10:14] Cool_Fire: in the other it's more like : if false; 1; else; break; end
[13:10:40] Cool_Fire: It just seems odd to me that the result of a conditional should depend on the variable it is being assigned to
[13:10:51] Cool_Fire: So in short; should I file a bugreport for this?
[13:11:17] al2o3-cr: Cool_Fire: no bug report needed :)
[13:12:32] Cool_Fire: Would you care to elaborate on that? :P
[13:13:37] al2o3-cr: the second foo and bar already hold truthy values
[13:13:52] banisterfiend: has joined #ruby
[13:13:54] banisterfiend: has joined #ruby
[13:14:08] al2o3-cr: thus foo = 2 if false is still 1
[13:14:43] Cool_Fire: Well, I'm not saying I don't understand the behavior in either case. But the two together seem inconsistent
[13:14:56] al2o3-cr: no they don't
[13:15:39] apeiros: has joined #ruby
[13:15:56] konsolebox: has joined #ruby
[13:17:38] bmurt: has joined #ruby
[13:18:22] Cool_Fire: "1 if false" does actually return "nil" though? At least, irb seems to suggest this.
[13:18:37] Cool_Fire: or is this a case of a sort of "return value vs. exit code" deal?
[13:19:30] zautomata: whats the ruby sourcecode followed C style?
[13:19:38] Cool_Fire: and it doesn't actually return nil, but nil is still the result
[13:19:39] Bish: hm, in docker ruby things the terminal encoding is ASCII
[13:19:41] Bish: how can i change thath
[13:20:08] Bish: Cool_Fire: it does, because the actual "then" will never be executed
[13:20:54] Bish: it's not actually a "return value" it's rather a return value of the line, and if does not have one, except when the condition is true
[13:20:57] Bish: for things like
[13:21:03] tAn: has joined #ruby
[13:21:22] Bish: >> a = if false;1;else; 2;end;
[13:21:24] ruby[bot]: Bish: # => 2 (https://eval.in/902323)
[13:21:28] Bish: >> a = if true;1;else; 2;end;
[13:21:29] ruby[bot]: Bish: # => 1 (https://eval.in/902324)
[13:21:55] Bish: if you have a long if elsif else block, u certainly want to know if there has been anything "hit"
[13:22:09] Bish: otherwise you would lose that information
[13:23:19] al2o3-cr: well explained Bish :)
[13:24:46] Cool_Fire: is "bar" being "nil" then just a `coincidence` of ruby creating the variable, regardless of if it will assign something to it?
[13:25:07] frerich: dminuoso: Thanks alot once more for your feedback, I think you're right on track with suspecting that the crashes are related to the GC but I just can't seem to beat it into submission. I now decided to ask about it on StackOverflow, at ps://stackoverflow.com/questions/47351589 -- maybe someone else has an idea.
[13:25:28] Bish: if you assign to a variable in an if block
[13:25:40] Bish: ruby actually does an implicit bar = nil
[13:25:43] frerich: dminuoso: Alas, I failed to create a small, self-contained example which reproduces the issues - even after introducing some rb_gc_start() calls. I suspect I didn't really understand the problem yet. :-/
[13:25:47] Bish: at the begin of the block
[13:26:15] Bish: otherwise you would get "blablabla is not defined" errors
[13:26:25] Bish: it's one of the few unexpected behaviours of ruby
[13:26:33] Bish: but useful ones
[13:27:00] Bish: beware of scopes though, if you do
[13:27:25] Bish: >> proc{if true;a=3;end;}.call();a;
[13:27:26] ruby[bot]: Bish: # => undefined local variable or method `a' for main:Object (NameError) ...check link for more (https://eval.in/902332)
[13:27:33] Bish: you still have that problem
[13:27:45] Cool_Fire: Well, realistically the actual code is probably something you shouldn't write like that to begin with
[13:28:17] Bish: yes, but you could fall into that trap easily
[13:28:24] Bish: if you rely on that implicit a = nil
[13:28:50] Cool_Fire: I imagine rubocop might hound me mercilessly if I did :P
[13:28:56] Cool_Fire: But thanks for clearing that up
[13:28:57] konsolebox: has joined #ruby
[13:29:09] Bish: ehhe, rubocop that's a nice name
[13:29:15] Bish: is it a code checker? i don't know it
[13:29:45] banisterfiend: has joined #ruby
[13:29:45] Cool_Fire: yes, it is. Does linting and checks if you're following the ruby style guide
[13:31:32] Bish: i am such a hater of code-style guides, might make me mad to look into that
[13:32:09] jeanlinux: has joined #ruby
[13:32:12] banisterfiend: has joined #ruby
[13:32:17] Cool_Fire: In the end my code usually looks better when I do follow it
[13:32:51] Cool_Fire: and it enforces a lot of best practice stuff
[13:33:43] Cool_Fire: like "dostuff() if someting()" vs if something(); dostuff(); end
[13:34:24] Bish: the good old matz itself considering it a mistake
[13:34:30] Bish: including that style
[13:36:30] zautomata: has joined #ruby
[13:37:15] Defenestrate: has joined #ruby
[13:37:16] Defenestrate: has joined #ruby
[13:37:18] Cool_Fire: But yeah, code style guides are always a matter of debate
[13:37:42] Siyfion: has joined #ruby
[13:37:46] Bish: and i debate they all SUCK
[13:37:51] Bish: no, they don't but sometimes.
[13:38:08] Bish: there was this javascript styleguide
[13:38:23] Bish: said i had to write var vm = this; at the beginning of every function
[13:38:34] Bish: i ended up insulting people
[13:38:47] uZiel: has joined #ruby
[13:39:13] Cool_Fire: I think it usually depends on how neat and readable your code naturally is if it's helpful (really odd style guide advice like that not withstanding.)
[13:41:00] Bish: well they defended that one to the grave
[13:41:10] oleo: has joined #ruby
[13:41:14] Bish: i was lucky to found a better solution, which is standard now
[13:41:35] Cool_Fire: Nicely done tehn
[13:42:24] Bish: costed me 3 days, though
[13:43:53] Bish: (the reason i insulted people)
[13:44:10] shinnya: has joined #ruby
[13:47:06] aScottishBoat: has joined #ruby
[13:49:05] Cool_Fire: mercifully rubocop comes with a built-in "I disagree" feature to make it shut up about specific violations or completely disregar some style rules :p
[13:49:33] uneeb: has joined #ruby
[13:50:38] john__: has joined #ruby
[13:50:49] Bish: oh that's nice
[13:50:55] im0nde: has joined #ruby
[13:55:09] cronolio: has joined #ruby
[13:55:48] cronolio: has left #ruby: ()
[13:58:42] tcopeland: has joined #ruby
[13:59:26] apeiros: I find having a style guide important. which style in particular doesn't matter IMO. it's just a matter of getting used to.
[13:59:45] apeiros: but it helps being able to get used to a style, hence having one is still important :)
[14:03:47] uZiel: has joined #ruby
[14:04:21] nofxx1: has joined #ruby
[14:08:20] cdg: has joined #ruby
[14:08:35] cdg: has joined #ruby
[14:13:55] kryptoz: has joined #ruby
[14:17:02] cdg_: has joined #ruby
[14:17:05] roshanavand: has joined #ruby
[14:20:47] al2o3-cr: has joined #ruby
[14:22:48] mniip: has joined #ruby
[14:23:55] mson: has joined #ruby
[14:26:27] gauravgoyal: has joined #ruby
[14:36:56] DLSteve_: has joined #ruby
[14:37:08] safetypin: has joined #ruby
[14:38:21] allcentury: has joined #ruby
[14:39:30] c0ncealed: has joined #ruby
[14:40:11] tAn: has joined #ruby
[14:41:18] morfin: has joined #ruby
[14:44:11] morfin: how you'd implement specific API client?
[14:44:15] tAn: has joined #ruby
[14:45:15] morfin: i use faraday + httpclient for HTTP, question is would you implement all API methods and then in your code wrap that class to get certain data/
[14:45:47] kryptoz: has joined #ruby
[14:46:33] Rapture: has joined #ruby
[14:51:53] jottr: has joined #ruby
[14:52:08] saslam: has joined #ruby
[14:52:21] troys: has joined #ruby
[14:53:20] Jameser: has joined #ruby
[14:55:32] dviola: has joined #ruby
[14:56:57] ahrs: has joined #ruby
[14:57:55] hutch34: has joined #ruby
[15:02:26] yokel: has joined #ruby
[15:02:55] guille-moe: has joined #ruby
[15:05:50] kanobt61: has joined #ruby
[15:08:39] wald0: has joined #ruby
[15:15:50] larcara: has joined #ruby
[15:22:23] safetypin: has joined #ruby
[15:27:18] banisterfiend: has joined #ruby
[15:27:36] tomphp: has joined #ruby
[15:30:25] sepp2k: has joined #ruby
[15:32:56] Cool_Fire: has left #ruby: ()
[15:33:32] memo1: has joined #ruby
[15:34:11] polishdub: has joined #ruby
[15:34:39] polishdub: has left #ruby: ()
[15:39:02] allcentury: has joined #ruby
[15:39:17] duckpupp1: has joined #ruby
[15:41:50] cdg: has joined #ruby
[15:45:30] cdg_: has joined #ruby
[15:46:46] cdg__: has joined #ruby
[15:48:55] Technodrome: has joined #ruby
[15:50:09] drowze: has joined #ruby
[15:50:36] cschneid_: has joined #ruby
[15:50:50] cschneid_: has joined #ruby
[15:52:32] workmad3: has joined #ruby
[15:54:55] jenrzzz: has joined #ruby
[15:54:55] jenrzzz: has joined #ruby
[15:55:24] larcara: has joined #ruby
[15:57:09] apeiros_: has joined #ruby
[15:59:14] cdg: has joined #ruby
[16:02:46] cschneid_: has joined #ruby
[16:03:58] raynold: has joined #ruby
[16:06:43] veeti: has joined #ruby
[16:08:10] apparition: has joined #ruby
[16:08:33] guacamole: has joined #ruby
[16:10:09] banisterfiend: has joined #ruby
[16:11:07] mim1k: has joined #ruby
[16:18:00] techn1cs: has joined #ruby
[16:18:01] techn1cs: has joined #ruby
[16:22:32] snickers: has joined #ruby
[16:23:08] john__: has left #ruby: ("Систем политик аметзит, крэтин щй ваи д ел.")
[16:23:39] urk187: has joined #ruby
[16:23:40] john__: has joined #ruby
[16:24:23] john__: has left #ruby: ()
[16:24:25] Itzbernoulli: has joined #ruby
[16:25:05] LBRapid: has joined #ruby
[16:28:44] synthroid: has joined #ruby
[16:29:26] nowhere_man: has joined #ruby
[16:30:26] LBRapid: has joined #ruby
[16:31:30] jackjackdripper: has joined #ruby
[16:32:07] LBRapid: has joined #ruby
[16:33:20] LBRapid: has joined #ruby
[16:34:17] LBRapid: has joined #ruby
[16:36:36] cagomez: has joined #ruby
[16:36:48] bmurt: has joined #ruby
[16:38:15] cagomez: has joined #ruby
[16:39:06] ldnunes: has joined #ruby
[16:40:07] kapil___: has joined #ruby
[16:40:52] cdg: has joined #ruby
[16:41:42] cdg_: has joined #ruby
[16:41:57] LBRapid: has joined #ruby
[16:45:45] millerti: has joined #ruby
[16:54:24] nchambers: has joined #ruby
[17:00:49] LBRapid: has joined #ruby
[17:01:41] mcr1: has joined #ruby
[17:02:04] mcr1: the C function, rb_define_class_under defines a class under some module (or class). Can this class be a subclass of another class?
[17:02:45] arashb: has joined #ruby
[17:03:13] mcr1: okay, so do I need to declare this in C somehow, or do I do that in ruby?
[17:03:40] apeiros: that's up to you
[17:04:08] Asher: has joined #ruby
[17:04:38] mcr1: oh, I see the third argument, "rb_cObject" is really the superclass.
[17:06:31] mcr1: what happens if there is disagreement between C and Ruby definitions? (I don't intend to do that, but I'm curious)
[17:06:39] tomphp: has joined #ruby
[17:06:42] polishdub: has joined #ruby
[17:06:45] Exhiled: has joined #ruby
[17:06:46] apeiros: pretty sure the same thing as in ruby, you get an exception
[17:07:10] apeiros: >> class X; end; class Y; end; class Y < X; end; class
[17:07:11] ruby[bot]: apeiros: # => /tmp/execpad-1394f33700ec/source-1394f33700ec:3: syntax error, unexpected modifier_rescue ...check link for more (https://eval.in/902429)
[17:07:17] apeiros: >> class X; end; class Y; end; class Y < X; end;
[17:07:18] ruby[bot]: apeiros: # => superclass mismatch for class Y (TypeError) ...check link for more (https://eval.in/902430)
[17:09:20] veeti: has joined #ruby
[17:09:51] polishdub: has left #ruby: ()
[17:09:57] jamiejackson: has joined #ruby
[17:10:04] shazbotmcnasty: has joined #ruby
[17:10:05] Dimik: has joined #ruby
[17:10:19] jamiejackson: where' s the documentation for ruby's yaml?
[17:10:45] `derpy: http://ruby-doc.org/stdlib-2.4.1/libdoc/rubygems/rdoc/YAML.html
[17:10:48] apeiros: ^ jamiejackson
[17:10:57] apeiros: also in your console, via the `ri` tool
[17:11:25] elomatreb: If you installed it, that is
[17:12:08] dionysus69: has joined #ruby
[17:13:15] jamiejackson: apeiros, i don't see anything in that URL's body. where should i be looking on that page?
[17:14:27] `derpy: http://ruby-doc.org/stdlib-2.4.1/libdoc/psych/rdoc/Psych.html
[17:14:33] havenwood: jamiejackson: ^
[17:14:56] adaedra: Ah, I removed the YAML to Psych alias? My bad
[17:15:20] tAn: has joined #ruby
[17:15:38] apeiros: oh, interesting
[17:16:04] jamiejackson: okay, do i require 'psych' or 'yaml'?
[17:16:37] adaedra: Yaml is actually just an alias for Psych; it's a trick to transparently replace the Yaml engine if needed without compatibility problems
[17:17:01] adaedra: But do use 'yaml' and YAML, don't reference Psych directly
[17:22:19] UserOO7: has joined #ruby
[17:29:54] larcara: has joined #ruby
[17:30:31] eckhardt: has joined #ruby
[17:31:25] jeanlinux: has joined #ruby
[17:32:27] orbyt_: has joined #ruby
[17:33:34] hutch34: has joined #ruby
[17:34:50] Technodrome: has joined #ruby
[17:42:14] bougyman: % perl -e 'print -1>>8;'
[17:42:15] bougyman: 72057594037927935%
[17:42:20] bougyman: ruby -e 'puts -1>>8'
[17:45:52] apeiros: because -1 is 0b1111111…
[17:46:06] apeiros: iow, an infinite number of ones
[17:46:27] cloaked1: has joined #ruby
[17:47:27] jamiejackson: what's the right way to use the squiggly HEREDOC? i've got it wrong: https://gist.github.com/jamiejackson/4a9e81b77d6f69e9da31de5e88040362
[17:47:45] tAn: has joined #ruby
[17:48:36] RickHull: the closeing HEREDOC should be with no whitespace prepended
[17:48:45] RickHull: (in most cases, at least)
[17:48:58] shazbotmcnasty: has joined #ruby
[17:48:59] RickHull: maybe squiggly allows it?
[17:49:12] elomatreb: All types should allow it
[17:49:28] elomatreb: jamiejackson: What's the problem, specifically?
[17:49:49] RickHull: <<EOF does not allow prepended whitespace
[17:49:49] jamiejackson: elomatreb `ansible_vault_helper.rb:40: syntax error, unexpected keyword_end, expecting end-of-input`
[17:50:22] elomatreb: Does your ruby support the sqiggly heredocs? They were added after the other types in some semi-recent version
[17:51:14] jamiejackson: elomatreb. i think so. i'm using the latest Vagrant, and i think it uses 2.4
[17:51:41] jamiejackson: from what i can tell: /opt/vagrant/embedded/include/ruby-2.4.0/ruby
[17:51:58] RickHull: I do see that <<~EOF allows prepended whitespace to the closing tag
[17:52:54] workmad3: has joined #ruby
[17:53:31] ivanskie: has joined #ruby
[17:54:15] tacoboy: has joined #ruby
[17:55:36] RickHull: jamiejackson: you can confirm with `ruby --version` FYI
[17:57:12] apeiros: bougyman: sorry, was interrupted. in other words, perl uses fixed 64 bits for the shift, while ruby uses "infinite" bits
[17:57:25] apeiros: if you want perls behavior, you have to limit the value to 64 bits
[17:57:27] apeiros: >> (-1 & ((1<<64)-1)) >> 8
[17:57:28] RickHull: jamiejackson: I can run a synthetic version of your `if not yml` with no issue on ruby 2.4
[17:57:28] ruby[bot]: apeiros: # => 72057594037927935 (https://eval.in/902526)
[17:57:40] apeiros: bougyman: hth
[17:58:23] RickHull: jamiejackson: https://gist.github.com/rickhull/ae058cd98ede8c79aa4e4fe665540598
[17:59:07] jamiejackson: thanks RickHull. i'm trying to see if something else is going on in my file. brb
[18:06:36] br0d1n: has joined #ruby
[18:07:37] larcara: has joined #ruby
[18:07:57] hutch34: has joined #ruby
[18:08:29] nofxx1: has joined #ruby
[18:09:46] the_f0ster: has joined #ruby
[18:10:39] the_f0ster: does anyone know a way I can profile DB pooling usage / info to optimize it? with active record connection adapter
[18:10:55] tAn: has joined #ruby
[18:11:07] apeiros: ?rails the_f0ster
[18:11:08] ruby[bot]: the_f0ster: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[18:15:34] michael3: has joined #ruby
[18:16:32] Gabemo: has joined #ruby
[18:18:29] imode: has joined #ruby
[18:19:42] the_f0ster: apeiros: my apologies, I asked there as well. I just assume smarter people are in interested in ruby over just rails.. it seemed maybe not application specific
[18:19:45] shazbotmcnasty: has joined #ruby
[18:21:41] Exhiled: has joined #ruby
[18:22:21] guacamole: has joined #ruby
[18:24:19] cagomez: has joined #ruby
[18:25:14] kies: has joined #ruby
[18:25:32] enterprisey: has joined #ruby
[18:26:27] cabotto: has joined #ruby
[18:28:12] eckhardt: has joined #ruby
[18:30:43] tcopeland: has joined #ruby
[18:31:10] chmurifree: has joined #ruby
[18:32:01] larcara: has joined #ruby
[18:32:57] bvcosta: has joined #ruby
[18:36:47] _sfiguser: has joined #ruby
[18:38:32] ramfjord: has joined #ruby
[18:39:47] cdg: has joined #ruby
[18:39:57] ramortegui: has joined #ruby
[18:40:42] kickr: has joined #ruby
[18:42:36] cdg: has joined #ruby
[18:43:33] shazbotmcnasty: alrighty - back to it. So, I think I broke ruby entirely by installing everything incorrectly - some with sudo, some without. I'm trying to run an admin console in rails but am currently unable. Here are the errors: https://gist.github.com/anonymous/7dc8f5c931a77cb217277a6a534ece4a - anyone up to the task of assisting me?
[18:48:37] lunarkitty7: has joined #ruby
[18:50:27] tAn: has joined #ruby
[18:53:55] claudiuinberlin: has joined #ruby
[18:53:59] naprimer: has joined #ruby
[18:54:12] conta1: has joined #ruby
[18:54:56] guacamole: has joined #ruby
[18:58:47] tomphp: has joined #ruby
[19:00:00] cagomez: has joined #ruby
[19:00:43] Exhiled: has joined #ruby
[19:04:13] rouge: has joined #ruby
[19:05:49] UserOO7: has joined #ruby
[19:06:35] Asher: has joined #ruby
[19:06:53] guacamole: has joined #ruby
[19:07:09] truenito: has joined #ruby
[19:08:13] jottr: has joined #ruby
[19:09:46] sriehl: has joined #ruby
[19:10:15] mikecmpbll: has joined #ruby
[19:11:27] Defenestrate: has joined #ruby
[19:11:35] _sfiguser: has joined #ruby
[19:13:02] Defenestrate: has joined #ruby
[19:13:40] Defenestrate: has joined #ruby
[19:13:41] Defenestrate: has joined #ruby
[19:14:19] Rapture: has joined #ruby
[19:17:01] larcara: has joined #ruby
[19:19:04] ivanskie_work: has joined #ruby
[19:22:16] guacamole: has joined #ruby
[19:22:23] shazbotmcnasty: has joined #ruby
[19:24:01] zautomata1: has joined #ruby
[19:24:36] ivanskie: has joined #ruby
[19:24:39] bmurt: has joined #ruby
[19:26:28] larcara: has joined #ruby
[19:28:37] danielpclark: has joined #ruby
[19:29:08] tAn: has joined #ruby
[19:31:51] snickers: has joined #ruby
[19:34:14] milardovich: has joined #ruby
[19:35:35] tomphp: has joined #ruby
[19:36:37] nadir: has joined #ruby
[19:37:36] ramfjord: has joined #ruby
[19:41:29] Hexafox[I]: has joined #ruby
[19:42:35] LBRapid: has joined #ruby
[19:44:05] jamesaxl: has joined #ruby
[19:45:23] jamiejackson: RickHull, would you expect https://gist.github.com/rickhull/ae058cd98ede8c79aa4e4fe665540598 to preserve the newlines between chunks? it does for me, and i was hoping that wouldn't happen.
[19:46:59] RickHull: yes, that is an explicit goal of heredocs, to preserve the newlines
[19:47:12] RickHull: modulo some other variation that I'm not thinking of
[19:47:24] larcara: has joined #ruby
[19:47:25] jottr: has joined #ruby
[19:47:41] tAn: has joined #ruby
[19:50:35] ShalokShalom: has joined #ruby
[19:51:30] mtkd: has joined #ruby
[19:53:08] workmad3: has joined #ruby
[19:53:42] Bish: has joined #ruby
[19:56:06] tsglove: has joined #ruby
[20:00:33] larcara: has joined #ruby
[20:06:07] mtkd: has joined #ruby
[20:06:41] enterprisey: has joined #ruby
[20:08:00] jottr_: has joined #ruby
[20:09:13] troulouliou_dev: has joined #ruby
[20:16:02] bmurt: has joined #ruby
[20:19:00] GodFather: has joined #ruby
[20:19:26] workmad3: has joined #ruby
[20:23:10] cdg: has joined #ruby
[20:23:30] postmodern: has joined #ruby
[20:24:09] SeepingN: has joined #ruby
[20:26:13] Exhiled: has joined #ruby
[20:26:20] BioSpider_: has joined #ruby
[20:27:48] shazbotmcnasty: has joined #ruby
[20:27:49] BioSpider_: has joined #ruby
[20:28:47] akryll: has joined #ruby
[20:29:13] Macrobiotic: has joined #ruby
[20:32:11] ur5us: has joined #ruby
[20:36:01] zapata: has joined #ruby
[20:37:20] workmad3: has joined #ruby
[20:38:08] Ouchy: has joined #ruby
[20:38:09] Ouchy: has joined #ruby
[20:38:24] millerti: has joined #ruby
[20:39:27] jenrzzz: has joined #ruby
[20:39:27] jenrzzz: has joined #ruby
[20:41:51] cdg_: has joined #ruby
[20:43:33] scientes: has joined #ruby
[20:43:33] scientes: has joined #ruby
[20:48:31] Defenestrate: has joined #ruby
[20:49:18] Defenestrate: has joined #ruby
[20:50:06] Defenestrate: has joined #ruby
[20:50:45] Defenestrate: has joined #ruby
[20:51:34] Defenestrate: has joined #ruby
[20:51:34] Defenestrate: has joined #ruby
[20:52:07] michael_mbp: has joined #ruby
[20:52:30] Defenestrate: has joined #ruby
[20:53:20] griffindy: has joined #ruby
[20:56:08] jeanlinux: has joined #ruby
[21:05:42] jottr: has joined #ruby
[21:06:50] akryll: has left #ruby: ()
[21:13:46] eckhardt: has joined #ruby
[21:18:38] tomphp: has joined #ruby
[21:20:31] sepp2k1: has joined #ruby
[21:20:34] bmurt: has joined #ruby
[21:22:10] MrBusiness: has joined #ruby
[21:23:14] larcara: has joined #ruby
[21:27:00] ni291187: has joined #ruby
[21:27:12] ni291187: has left #ruby: ()
[21:28:26] nomenkun: has joined #ruby
[21:31:25] cagomez: has joined #ruby
[21:34:28] zapata: has joined #ruby
[21:38:27] jottr_: has joined #ruby
[21:39:02] jeanlinux: has joined #ruby
[21:40:28] eputnam: has left #ruby: ("Leaving...")
[21:40:29] enterprisey: has joined #ruby
[21:44:43] mson: has joined #ruby
[21:44:53] Nitrodist: has joined #ruby
[21:45:16] Nitrodist: anyone have any experience with the pg gem and switching databases with a connection?
[21:46:05] Nitrodist: eh, nm, I'm just going to re-create connections to each database.
[21:46:38] bmurt: has joined #ruby
[21:47:12] kitsunenokenja: has joined #ruby
[21:47:30] br0d1n: has joined #ruby
[21:48:23] jenrzzz: has joined #ruby
[21:48:24] jenrzzz: has joined #ruby
[21:50:07] cloaked1: has joined #ruby
[21:53:38] banisterfiend: has joined #ruby
[21:55:23] aroaminggeek: has joined #ruby
[21:55:31] al2o3-cr: has joined #ruby
[21:58:59] jottr: has joined #ruby
[21:59:17] aScottishBoat: has joined #ruby
[22:05:11] bkxd: has joined #ruby
[22:07:33] banisterfiend: has joined #ruby
[22:12:50] guacamole: has joined #ruby
[22:15:49] bmurt: has joined #ruby
[22:17:49] cognoscente: has joined #ruby
[22:18:06] pilne: has joined #ruby
[22:19:50] eckhardt_: has joined #ruby
[22:20:19] weathermaker: has joined #ruby
[22:21:57] apeiros: has joined #ruby
[22:23:16] orbyt_: has joined #ruby
[22:25:39] scientes: has joined #ruby
[22:25:39] scientes: has joined #ruby
[22:30:04] GodFather: has joined #ruby
[22:32:24] ahtapot: has joined #ruby
[22:32:36] ptx0: has joined #ruby
[22:32:37] cdg: has joined #ruby
[22:37:19] pilne: has joined #ruby
[22:39:44] banisterfiend: has joined #ruby
[22:39:54] rfoust: has joined #ruby
[22:40:11] morfin60: has joined #ruby
[22:41:20] apeiros: has joined #ruby
[22:42:54] allcentury: has joined #ruby
[22:44:13] cdg: has joined #ruby
[22:44:32] Exhiled: has joined #ruby
[22:47:19] ptx0_: has joined #ruby
[22:47:57] kitsunenokenja: has joined #ruby
[22:55:23] apeiros: has joined #ruby
[22:56:50] char_var[buffer]: has joined #ruby
[22:57:04] selim: has joined #ruby
[22:58:15] Exhiled: has joined #ruby
[22:58:17] aScottishBoat: has joined #ruby
[22:58:55] eightlimbed: has joined #ruby
[23:05:28] thinkpad: has joined #ruby
[23:05:37] hutch34: has joined #ruby
[23:05:56] impermanence: has joined #ruby
[23:06:29] impermanence: Does anyone have experience using elasticsearch-py?
[23:08:34] RickHull: after `gem install foo` -- is there a good way to execute foo's rake tasks?
[23:09:35] RickHull: one way is to look at `gem which foo` to find its Rakefile
[23:09:47] lexruee: has joined #ruby
[23:21:28] minimalism: has joined #ruby
[23:22:26] Exhiled: has joined #ruby
[23:23:56] Iarfen: has joined #ruby
[23:24:26] Iarfen: what's the channel for ruby on rails?
[23:24:35] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[23:24:52] apeiros: has joined #ruby
[23:26:37] larcara: has joined #ruby
[23:32:49] hutch34: has joined #ruby
[23:35:15] tcopeland: has joined #ruby
[23:35:40] nowhere_man: has joined #ruby
[23:36:40] bkxd: has joined #ruby
[23:37:01] apeiros: has joined #ruby
[23:41:51] hutch34: has joined #ruby
[23:47:29] Technodrome: has joined #ruby
[23:50:53] hutch34: has joined #ruby
[23:51:25] Puffball: has joined #ruby
[23:59:54] hutch34: has joined #ruby