« Back to channel list

#ruby - 11 July 2018

« Back 1 day Forward 1 day »
[00:01:51] RougeR: has joined #ruby
[00:01:51] RougeR: has joined #ruby
[00:04:25] yokel: has joined #ruby
[00:05:58] Guest84006: has joined #ruby
[00:06:47] pharma_joe: has joined #ruby
[00:13:44] unreal: has joined #ruby
[00:16:15] Guest84006: has joined #ruby
[00:16:40] raynold: has joined #ruby
[00:17:56] cheater: has left #ruby: ()
[00:20:29] Puffball: has joined #ruby
[00:21:08] mynameisdebian: has joined #ruby
[00:24:53] cthulchu_: has joined #ruby
[00:25:48] jhack_: has joined #ruby
[00:26:27] Guest84006: has joined #ruby
[00:27:08] tdy: has joined #ruby
[00:28:19] jhack_: has joined #ruby
[00:33:58] mynameisdebian: has joined #ruby
[00:36:16] spectra: has joined #ruby
[00:36:42] Guest84006: has joined #ruby
[00:38:35] cthu|: has joined #ruby
[00:39:00] klaas: has joined #ruby
[00:39:35] AKPWD: has joined #ruby
[00:45:53] Puffball: has joined #ruby
[00:46:58] Guest84006: has joined #ruby
[00:50:59] AKPWD: has joined #ruby
[00:54:33] Nicmavr: has joined #ruby
[00:57:16] Guest84006: has joined #ruby
[00:58:22] Puffball: has joined #ruby
[01:04:38] dinfuehr: has joined #ruby
[01:05:38] graphene: has joined #ruby
[01:07:20] Guest84006: has joined #ruby
[01:07:56] Tempesta: has joined #ruby
[01:10:39] alfiemax: has joined #ruby
[01:12:58] Fridtjof: has joined #ruby
[01:15:12] DarthGandalf: has joined #ruby
[01:17:33] Guest84006: has joined #ruby
[01:19:44] white_lilies: has joined #ruby
[01:20:14] bmurt: has joined #ruby
[01:25:29] mynameisdebian: has joined #ruby
[01:27:52] Guest84006: has joined #ruby
[01:29:16] arfy: has joined #ruby
[01:30:48] arfy: hi all... I'm having a bit of trouble finding an answer for ruby 2.5.1, I want to install ruby using the ruby installer in windows, but noted it doesn't come with any ri documentation for core ruby. is there a way to install this?
[01:35:52] bmurt: has joined #ruby
[01:37:30] graphene: has joined #ruby
[01:38:03] Guest84006: has joined #ruby
[01:43:10] Arahael: thats an old ruby, isnt it?
[01:46:19] arfy: arahael: the ruby installer? no, it's 2.5.1
[01:48:16] graphene: has joined #ruby
[01:48:17] Guest84006: has joined #ruby
[01:49:17] akkiguru_: has joined #ruby
[01:50:09] subroot: has joined #ruby
[01:51:18] Arahael: Ah, indeed. Well, why not grab the docs, then?
[01:51:42] Arahael: Eg, here: https://ruby-doc.org/stdlib-2.5.1/
[01:51:54] jhack: has joined #ruby
[01:52:26] paradisaeidae: has joined #ruby
[01:52:29] paradisaeidae_: has joined #ruby
[01:53:39] pauliesaint: has joined #ruby
[01:58:32] Guest84006: has joined #ruby
[02:00:43] gell5: has joined #ruby
[02:07:22] akkiguru_: has joined #ruby
[02:08:46] Guest84006: has joined #ruby
[02:10:48] mikeiniowa: has joined #ruby
[02:15:31] knight33: has joined #ruby
[02:16:26] bak1an: has joined #ruby
[02:17:39] MagePsycho: has joined #ruby
[02:19:02] Guest84006: has joined #ruby
[02:23:17] noobineer: has joined #ruby
[02:29:14] Guest84006: has joined #ruby
[02:30:28] hfp_work: has joined #ruby
[02:35:13] havenwood: arfy: RubyInstaller ships docs as Windows help files (CHMs).
[02:36:21] winkylocc: has joined #ruby
[02:36:47] eb0t: has joined #ruby
[02:36:49] havenwood: Actually, looks like they maybe switch to HTML docs in 2.4+. Unsure.
[02:36:53] arfy: havenwood: not now, it's just plain html :).
[02:37:02] havenwood: arfy: Aye, just saw that. :-)
[02:37:09] arfy: but yes. presumably it's generated from the same sources as ri format.
[02:37:32] havenwood: arfy: You might want to try Ruby on the WSL.
[02:37:39] havenwood: arfy: Then you get ri!
[02:37:46] arfy: yeah. I'll try that.
[02:37:52] havenwood: https://docs.microsoft.com/en-us/windows/wsl/install-win10
[02:38:01] arfy: ACTION has it installed already :)
[02:38:16] arfy: ACTION doesn't miss cygiwn. :P
[02:38:36] havenwood: arfy: https://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you
[02:39:27] Guest84006: has joined #ruby
[02:40:21] arfy: ah. there is my problem. don't use apt...
[02:49:42] Guest84006: has joined #ruby
[02:51:19] Mrgoose: has joined #ruby
[02:56:10] white_lilies: has joined #ruby
[02:59:13] eblip: has joined #ruby
[02:59:57] Guest84006: has joined #ruby
[03:00:41] mynameisdebian: has joined #ruby
[03:03:55] alfiemax: has joined #ruby
[03:09:57] braincrash: has joined #ruby
[03:10:08] Guest84006: has joined #ruby
[03:14:09] knight33: has joined #ruby
[03:18:00] lele: has joined #ruby
[03:19:10] akaiiro: has joined #ruby
[03:20:23] Guest84006: has joined #ruby
[03:23:01] arfy: havenwood: thanks! that worked, I can now use ri. :)
[03:30:33] Guest84006: has joined #ruby
[03:31:59] salasrod: has joined #ruby
[03:34:27] gix-: has joined #ruby
[03:35:40] Paraxial: has joined #ruby
[03:35:52] alex``: has joined #ruby
[03:36:11] tty: has joined #ruby
[03:40:46] Guest84006: has joined #ruby
[03:44:05] kryptoz: has joined #ruby
[03:50:58] Guest84006: has joined #ruby
[03:52:25] digimer: has joined #ruby
[03:53:07] digimer: hi all, I know very little about ruby, but I am trying to repackage an ruby RPM and hitting an error. I was wondering if anyone could help me understand it. - https://paste.fedoraproject.org/paste/U9x5ZhxIJEqLdkIb5BusWQ
[03:53:49] digimer: it's on RHEL 7 (CentOS 7)
[03:58:48] graphene: has joined #ruby
[04:00:03] cadillac_: has joined #ruby
[04:01:15] Guest84006: has joined #ruby
[04:07:21] nowhere_man: has joined #ruby
[04:08:48] Fridtjof: has joined #ruby
[04:10:50] shinnya: has joined #ruby
[04:11:28] Guest84006: has joined #ruby
[04:17:40] Joufflu_Fail: has joined #ruby
[04:20:03] Joufflu_Fail: has joined #ruby
[04:21:42] Guest84006: has joined #ruby
[04:27:16] khomesh24: has joined #ruby
[04:31:54] Guest84006: has joined #ruby
[04:41:33] alfiemax: has joined #ruby
[04:42:10] Guest84006: has joined #ruby
[04:52:35] Guest84006: has joined #ruby
[04:57:06] havenwood: digimer: Note on line 80: minitest-4.3.2
[04:58:01] ur5us: has joined #ruby
[05:00:26] SeepingN: has joined #ruby
[05:02:45] Guest84006: has joined #ruby
[05:05:12] digimer: havenwood: what does that mean, if I may ask?
[05:05:42] digimer: I'm learning packaging, and know basically nil about ruby. sorry if it's a 101 question
[05:06:14] havenwood: digimer: I just glanced over the logs, but that stood out. Everywhere else it's minitest 5. This one line it's minitest 4.
[05:06:48] digimer: odd, I grabbed the src.rpm from epel7, so it must have compiled in the past. odd
[05:07:19] digimer: huh, I see a v4 in the repo
[05:07:27] digimer: ok, this might get me going, thank you
[05:09:19] alfiemax: has joined #ruby
[05:13:00] Guest84006: has joined #ruby
[05:14:53] digimer: hmm, it was installed already
[05:15:22] sauvin: has joined #ruby
[05:22:34] howdoi: has joined #ruby
[05:23:11] Guest84006: has joined #ruby
[05:26:30] mynameisdebian: has joined #ruby
[05:27:59] akkiguru_: has joined #ruby
[05:29:09] anisha: has joined #ruby
[05:30:10] mikhael_k33hl: has joined #ruby
[05:30:40] mikhael_k33hl: regarding this file? https://gist.github.com/marzdgzmn/9d8173a0db527e54b5d2a9ec899c253c Is this wrapper gem something that wraps the export that will only be usable for ruby? I can't seem to see the exported variables in linux
[05:32:21] pharma_joe: has joined #ruby
[05:33:05] havenwood: mikhael_k33hl: When you say you can't see them in Linux, what are you trying?
[05:33:27] Guest84006: has joined #ruby
[05:33:48] havenwood: mikhael_k33hl: You can only see env vars in the process they were created or a child process. A parent process can't get env vars from its child.
[05:34:47] havenwood: mikhael_k33hl: If you haven't already, take a look at exactly what the wrapper does: cat /usr/local/rvm/gems/ruby-1.9.3-p547/wrappers/ruby
[05:35:15] mikhael_k33hl: havenwood: like `export -p` to see environment variables
[05:36:14] mikhael_k33hl: havenwood: isn't exporting making the variables an environment variables for linux itself?
[05:37:27] mikhael_k33hl: havenwood: Oh I see now, the variables were exported in the ruby environment
[05:38:35] havenwood: mikhael_k33hl: Exporting means child processes will inherit the variable. There's no way to have the child assign a variable on the parent.
[05:38:52] havenwood: mikhael_k33hl: Env vars only go downstream.
[05:40:01] mikhael_k33hl: havenwood: I see. I'm still a little bit confused about it though as I've been used to export environment variables in linux just running the export command, hehe
[05:40:13] havenwood: mikhael_k33hl: If you check in the Ruby process, you'll see the env vars are all there. If you exec or fork from the Ruby process you'll still see them.
[05:40:32] havenwood: The grandchildren process can still see them.
[05:40:38] havenwood: And the great grandchildren.
[05:40:59] mikhael_k33hl: the exports were run under the /bin/sh context though
[05:41:33] havenwood: mikhael_k33hl: The context isn't /bin/sh, it's this specific process.
[05:41:48] havenwood: mikhael_k33hl: Many sh processes can have totally different env vars.
[05:42:16] havenwood: mikhael_k33hl: Children inherit env vars, but they're not global.
[05:42:34] mikhael_k33hl: Okay, so how do you create a env var for linux?
[05:43:42] Guest84006: has joined #ruby
[05:45:10] havenwood: mikhael_k33hl: export FOO=1
[05:45:52] arfy8820: has joined #ruby
[05:46:06] havenwood: has joined #ruby
[05:46:06] havenwood: has joined #ruby
[05:46:11] mikhael_k33hl: and you will see it when you run `printenv` right? Though I'm slowly getting it. So the wrapper/ruby has exec ruby "$@" which I've read pertaing to backtraces, is that correct?
[05:46:13] banisterfiend: has joined #ruby
[05:46:22] mikhael_k33hl: Or is there another use for that that I'm now aware of?
[05:46:46] mikhael_k33hl: Cause what I'm looking for perhaps is how those exports were sent to the ruby environments? cause they are used in a rails application
[05:47:44] havenwood: mikhael_k33hl: well, this `file` shim you've shown sets a few env vars, then execs a child process that's an RVM wrapper that adds a few more env vars and runs Ruby with the arguments to the file
[05:47:53] havenwood: mikhael_k33hl: you took a look at the contents of the wrapper?
[05:48:13] havenwood: (it's just a few env vars then it runs ruby)
[05:48:20] za1b1tsu: has joined #ruby
[05:48:37] biberu: has joined #ruby
[05:48:50] mikhael_k33hl: havenwood: yep, I did it has the lines source "/usr/local/rvm/gems/ruby-1.9.3-p547/environment" ; exec ruby "$@"
[05:49:04] mikhael_k33hl: I guess that' what redirecting the exports eh?
[05:49:13] havenwood: mikhael_k33hl: cat /usr/local/rvm/gems/ruby-1.9.3-p547/environment
[05:49:41] mikhael_k33hl: havenwood: I did, and it should the lines with the exported variables
[05:49:51] arfy8820: has left #ruby: ()
[05:50:17] aupadhye: has joined #ruby
[05:50:17] smrtrnx: has joined #ruby
[05:50:41] smrtrnx: hello everyone
[05:51:21] havenwood: smrtrnx: hi
[05:51:39] smrtrnx: I am new to ruby. Using git i tried to install bootstrap using gem but it seems that I cannot locate or don't know how to install the gem file that I have downloaded
[05:51:56] smrtrnx: can anyone please guide me on what to do?
[05:52:12] smrtrnx: Hello @havenwood
[05:52:43] havenwood: smrtrnx: You're using the bootstrap gem in a Ruby app?
[05:53:16] havenwood: mikhael_k33hl: Basically the file shim and RVM wrappers do the same thing, set some env vars then pass the args on to Ruby.
[05:53:26] smrtrnx: i tried installing it using git like "gem bootstrap" command
[05:53:47] reber: has joined #ruby
[05:53:52] Guest84006: has joined #ruby
[05:53:53] havenwood: smrtrnx: Are you wanting to use this gem in an app? Does the app have a Gemfile?
[05:54:18] havenwood: smrtrnx: When you say "using git", do you mean you put it in your Gemfile and ran?: bundle
[05:54:30] mikhael_k33hl: havenwood: I see, will look more into it, thanks man
[05:54:51] havenwood: mikhael_k33hl: no prob
[05:54:58] TvL2386: has joined #ruby
[05:56:00] havenwood: smrtrnx: Happy to help, but we need context. Just sanity checking that you have an app, it has a Gemfile, you've bundled and are having trouble requiring the gem?
[05:56:31] havenwood: smrtrnx: Rails or Hanami?
[05:56:52] smrtrnx: basically i have succesfully downloaded the bootstrap gem file but i don't really know how to do the bundle install
[05:57:11] smrtrnx: ruby rails i guess havenwood
[05:57:28] smrtrnx: i installed ruby on my machine
[05:57:32] havenwood: smrtrnx: If you don't have a Rails or Hanami app, you shouldn't be using this gem.
[05:58:10] havenwood: smrtrnx: Ruby is the programming language. Rails is a popular web framework library in Ruby.
[05:58:18] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[05:58:53] rippa: has joined #ruby
[05:59:01] havenwood: smrtrnx: I wonder if you really have a Rails app? It seems like you'd know if you did.
[05:59:31] havenwood: What are you trying to use Bootstrap for?
[06:00:07] smrtrnx: i was supposed to create a wordpress theme using bootstrap sass
[06:00:08] havenwood: smrtrnx: If you just want to install the bootstrap gem, outside an app, for whatever reason: gem install bootstrap
[06:00:41] smrtrnx: should it download the latest version of bootstrap using gem install bootstrap?
[06:00:49] havenwood: smrtrnx: bootstrap-sass is an entirely different gem
[06:01:03] havenwood: smrtrnx: https://github.com/twbs/bootstrap-sass
[06:02:18] havenwood: smrtrnx: Are you sure you're doing anything relating to Ruby at all?
[06:02:26] smrtrnx: i tried following the instructions here https://github.com/twbs/bootstrap-rubygem
[06:02:39] havenwood: smrtrnx: Wordpress is a PHP library. I don't get where a gem comes into play at all.
[06:02:54] smrtrnx: using this command gem 'bootstrap', '~> 4.1.1' but i am stuck installing using the bundle install
[06:03:04] havenwood: smrtrnx: Do you have a Gemfile?
[06:03:27] havenwood: smrtrnx: What kinda Wordpress app is this that it's Ruby?!?
[06:03:36] havenwood: smrtrnx: This doesn't add up.
[06:03:41] smrtrnx: basically using some sort of this command gem 'bootstrap', '~> 4.1.1' will download the gem file
[06:03:58] smrtrnx: allow me to clarify things up
[06:04:01] havenwood: smrtrnx: What in the world are you doing with that line? Where are you puttin git?
[06:04:19] havenwood: If you don't have a Ruby app, you're barking up the wrong tree.
[06:04:24] Guest84006: has joined #ruby
[06:04:34] smrtrnx: I was just only trying to download this bootstrap version 4.1.1 on my git cmd
[06:04:57] havenwood: smrtrnx: So there's Bootstrap. Then there are various Bootstrap-related gems. These are the latter.
[06:05:02] smrtrnx: i was just wondering how to extract the gem file that I have downloaded
[06:05:14] havenwood: smrtrnx: Why are you using a gem???
[06:05:56] havenwood: smrtrnx: If you have a Ruby project, you haven't mentioned it. You seem to be using Wordpress and somehow got on a Ruby gem rather than the Bootstrap library you're searching for.
[06:06:01] smrtrnx: hhmmm i don't really have a clue I was trying to figure out how it works to download bootstrap on git cmd
[06:06:26] havenwood: smrtrnx: Since you don't have a Ruby app, or anything Ruby-related here, stay away from Ruby gems.
[06:06:42] smrtrnx: and from https://github.com/twbs/bootstrap-rubygem i just followed the instructions. that says gem 'bootstrap', '~> 4.1.1'
[06:07:14] smrtrnx: so is there any way to download bootstrap using gem?
[06:07:24] havenwood: smrtrnx: So there are bootstrap libraries in dozens of languages, that are specific to facilitating use in that language.
[06:07:56] havenwood: smrtrnx: This is the actual Bootstrap library: https://github.com/twbs/bootstrap
[06:08:45] havenwood: smrtrnx: A Rails gem isn't relevant to what you're doing any more than a Rust Cargo package or whatever else. If it says gem, it's not what you're looking for. Stop messing with Ruby gems.
[06:09:02] havenwood: smrtrnx: Though do come back and learn Ruby!
[06:09:14] havenwood: We'd be happy to show you how to use gems or create your own.
[06:10:09] akkiguru_: has joined #ruby
[06:10:46] smrtrnx: thanks havenwood. I guess I am starting to learn ruby by now
[06:11:10] smrtrnx: but i couldn't extract gem files
[06:11:19] smrtrnx: should it be extracted anyway?
[06:11:39] havenwood: smrtrnx: Are you trolling?
[06:12:17] havenwood: smrtrnx: Wordpress doesn't use gems. Gems are Ruby packages. Wordpress is not Ruby. Gems have nothing at all to do with what you're doing. Nothing.
[06:12:28] havenwood: smrtrnx: https://github.com/noahbass/sass-wordpress-bootstrap
[06:14:23] havenwood: smrtrnx: These gems are packaging bootstrap specifically for Ruby apps. You don't have a Ruby app so they're not what you're looking for.
[06:14:35] Guest84006: has joined #ruby
[06:15:12] havenwood: smrtrnx: Try that ^ repo above. It seems you're trying to find a nice Wordpress theme with Bootstrap support. I don't know how you got on Ruby gems, but abort. This is not what you're looking for.
[06:15:35] havenwood: ¯\_(ツ)_/¯
[06:22:00] schleppel: has joined #ruby
[06:24:35] Guest84006: has joined #ruby
[06:33:38] kryptoz: has joined #ruby
[06:34:42] pharma_joe: has joined #ruby
[06:34:50] Guest84006: has joined #ruby
[06:35:10] dellavg: has joined #ruby
[06:40:30] kryptoz: has joined #ruby
[06:41:51] konsolebox: has joined #ruby
[06:45:08] Guest84006: has joined #ruby
[06:45:17] aufi: has joined #ruby
[06:49:31] nowhere_man: has joined #ruby
[06:52:44] kryptoz: has joined #ruby
[06:55:20] Guest84006: has joined #ruby
[07:03:09] amar: has joined #ruby
[07:05:30] Guest84006: has joined #ruby
[07:07:20] yohji: has joined #ruby
[07:07:58] conta: has joined #ruby
[07:10:46] amar: has joined #ruby
[07:11:46] dionysus69: has joined #ruby
[07:12:08] TomyWork: has joined #ruby
[07:12:13] alem0lars: has joined #ruby
[07:12:32] clemens3: has joined #ruby
[07:15:17] beefjoe: has joined #ruby
[07:15:45] Guest84006: has joined #ruby
[07:17:22] akkiguru_: has joined #ruby
[07:19:40] smrtrnx: has joined #ruby
[07:19:56] smrtrnx: sorry @havenwood
[07:20:01] smrtrnx: i was disconnected
[07:20:13] havenwood: smrtrnx: no prob
[07:21:08] havenwood: smrtrnx: Try the noahbass/sass-wordpress-bootstrap repo I linked above. It seems you're trying to find a nice Wordpress theme with Bootstrap support (not a Ruby gem).
[07:21:12] smrtrnx: I am not trolling anyway just trying to look for some help with regards to my query
[07:21:51] smrtrnx: thanks for this i'll check it out
[07:26:01] Guest84006: has joined #ruby
[07:32:59] teclator: has joined #ruby
[07:35:45] quobo: has joined #ruby
[07:36:16] Guest84006: has joined #ruby
[07:41:59] mikecmpbll: has joined #ruby
[07:42:54] burgestrand: has joined #ruby
[07:45:11] mynameisdebian: has joined #ruby
[07:46:32] Guest84006: has joined #ruby
[07:47:15] andikr: has joined #ruby
[07:48:16] Beams: has joined #ruby
[07:48:31] jmcgnh: has joined #ruby
[07:50:02] chkhanch: has joined #ruby
[07:50:29] mikecmpbll: has joined #ruby
[07:56:49] Guest84006: has joined #ruby
[07:57:44] amar_: has joined #ruby
[07:57:54] tildes: has joined #ruby
[08:02:15] VladGh_: has joined #ruby
[08:06:43] Beams: has joined #ruby
[08:07:01] Guest84006: has joined #ruby
[08:12:13] mtkd: has joined #ruby
[08:15:36] arne: has joined #ruby
[08:16:11] Guest84006: has joined #ruby
[08:16:29] ams__: has joined #ruby
[08:17:06] guille-moe: has joined #ruby
[08:19:36] akm: has joined #ruby
[08:23:00] Technato1: has joined #ruby
[08:23:04] Beams: has joined #ruby
[08:28:11] khan_: has joined #ruby
[08:31:43] akkiguru_: has joined #ruby
[08:39:17] mynameisdebian: has joined #ruby
[08:41:00] eb0t: has joined #ruby
[08:48:14] Bish: https://lwn.net/Articles/650333/ woudln't you love ruby removing GIL with this?
[08:48:36] Bish: im guessing that's not doable, without breaking ruby
[08:49:59] wojnar: has joined #ruby
[09:01:32] dhollin3: has joined #ruby
[09:04:43] InfinityFye: has joined #ruby
[09:16:13] mynameisdebian: has joined #ruby
[09:17:56] venmx: has joined #ruby
[09:18:43] ur5us: has joined #ruby
[09:20:07] tvw: has joined #ruby
[09:27:52] ^mtkd: has joined #ruby
[09:34:35] Beams: has joined #ruby
[09:35:58] samosaphile: has joined #ruby
[09:38:48] graphene: has joined #ruby
[09:47:02] graphene: has joined #ruby
[09:49:42] pwnd_nsfw`: has joined #ruby
[09:59:03] ohcibi: when `bundle install --path foo` in a new directory with just a Gemfile in it, bundler will persist the path setting in .bundle/config in that directory. I was doing the same thing in a ruby:2.5 docker container (i.e. executing `bundle install --path foo` inside the container with just the Gemfile and Gemfile.lock in it) but the config is missing... i'm running as root inside the container but the config is not persisted. also /root/.bundle contains only the
[09:59:03] ohcibi: cache.. why is the config not persisted?
[09:59:35] ohcibi: the readme even tells that --path is not persisted and one must do so by using bundle config but why is the config persisted on my local machine thern?
[10:02:21] apeiros_: has joined #ruby
[10:03:39] amar_: has joined #ruby
[10:10:08] Beams: has joined #ruby
[10:10:17] mynameisdebian: has joined #ruby
[10:15:18] samosaphile: has joined #ruby
[10:17:20] InfinityFye: has left #ruby: ("Leaving")
[10:18:41] _aeris_: has joined #ruby
[10:22:30] psychicist__: has joined #ruby
[10:29:53] Dbugger: has joined #ruby
[10:30:29] Beams: has joined #ruby
[10:35:09] ur5us: has joined #ruby
[10:38:42] amar_: has joined #ruby
[10:39:24] khan_: has joined #ruby
[10:41:52] amarks: has joined #ruby
[10:42:43] Beams: has joined #ruby
[10:45:13] Some-body_: has joined #ruby
[10:49:34] aufi_: has joined #ruby
[11:04:26] mynameisdebian: has joined #ruby
[11:13:25] ltp: has joined #ruby
[11:17:41] mzo: has joined #ruby
[11:18:08] banisterfiend: has joined #ruby
[11:20:12] clemens3: has joined #ruby
[11:20:38] maufart__: has joined #ruby
[11:20:44] amelliaa: has joined #ruby
[11:23:13] mynameisdebian: has joined #ruby
[11:23:44] samosaphile: has joined #ruby
[11:24:34] khan_: has joined #ruby
[11:25:03] teclator_: has joined #ruby
[11:25:06] aufi_: has joined #ruby
[11:25:34] jottr: has joined #ruby
[11:28:49] noobineer: has joined #ruby
[11:30:55] shinnya: has joined #ruby
[11:34:52] donofrio: has joined #ruby
[11:36:17] jrafanie: has joined #ruby
[11:39:43] alex``: has joined #ruby
[11:40:44] bkxd: has joined #ruby
[11:43:23] Beams: has joined #ruby
[11:54:26] ldnunes: has joined #ruby
[11:56:09] maufart__: has joined #ruby
[11:56:56] apparition: has joined #ruby
[11:59:39] Beams: has joined #ruby
[12:01:59] jottr: has joined #ruby
[12:02:30] dbugger_: has joined #ruby
[12:12:13] augcesar: has joined #ruby
[12:12:40] herbmillerjr: has joined #ruby
[12:13:01] griffindy: has joined #ruby
[12:13:16] venmx: has joined #ruby
[12:14:56] Megamos: has joined #ruby
[12:15:55] ferr: has joined #ruby
[12:16:29] desperek: has joined #ruby
[12:17:16] mynameisdebian: has joined #ruby
[12:23:53] jraavis: has joined #ruby
[12:27:07] ferr: has joined #ruby
[12:28:09] Megamos: has joined #ruby
[12:33:57] banisterfiend: has joined #ruby
[12:40:32] AJA4350: has joined #ruby
[12:41:49] amar_: has joined #ruby
[12:48:08] Beams: has joined #ruby
[12:48:39] mtkd: has joined #ruby
[12:49:33] GodFather: has joined #ruby
[12:51:14] synthroid: has joined #ruby
[12:51:36] chkhanch: has joined #ruby
[12:53:47] Megamosaren: has joined #ruby
[12:55:07] ldnunes: has joined #ruby
[12:56:47] ldnunes: has joined #ruby
[12:59:20] suukim: has joined #ruby
[12:59:44] bak1an: has joined #ruby
[13:00:00] motstgo: has joined #ruby
[13:00:31] Asher: has joined #ruby
[13:03:58] akm: has joined #ruby
[13:04:46] rwb: has joined #ruby
[13:08:06] tbuehlmann: I'm dealing with a CSV file I want to read and the first line is "sep=;\n", which doesn't really play nice with headers: true. is there something in ruby's CSV library to use that first line for col_sep and kind of ignoring it for headers?
[13:10:03] akm: has joined #ruby
[13:10:07] Bish: haha, you poor fool, trying to parse csv!
[13:10:24] Bish: tbuehlmann: give liberal_parsing:true a shot?
[13:11:06] Bish: i forgot what exactly it does
[13:11:21] mynameisdebian: has joined #ruby
[13:11:53] Bish: oh wait what, your first line dfines the col seperator? no you will enver get CSV to do that
[13:11:58] Bish: why not do it yourself?
[13:12:42] tbuehlmann: I'm on it :\
[13:12:52] tbuehlmann: seems this is something coming from excel
[13:13:47] Bish: col_sep,parsed = [file_data.lines[1][/sep=(.*)/,1],CSV.new(file_data.lines[1..-1],col_sep:col_sep)]
[13:13:50] Bish: something like that?
[13:14:18] Bish: never seen excel doing that
[13:14:33] tbuehlmann: me neither. but yea, something like that
[13:14:57] clemens3: has joined #ruby
[13:16:09] mikecmpb_: has joined #ruby
[13:21:00] guille-moe: has joined #ruby
[13:22:15] tbuehlmann: thanks so far, gonna do something like this
[13:29:26] lapinferoce: has joined #ruby
[13:31:50] venmx: has joined #ruby
[13:34:03] GodFather: has joined #ruby
[13:36:34] TinkerT: has joined #ruby
[13:38:44] Beams: has joined #ruby
[13:41:36] cyberg: has joined #ruby
[13:43:27] akm: has joined #ruby
[13:45:55] nelson: has joined #ruby
[13:46:32] clemens3: has joined #ruby
[13:47:15] ferr: has joined #ruby
[13:49:49] Beams: has joined #ruby
[13:50:28] knight33: has joined #ruby
[13:52:13] graphene: has joined #ruby
[13:55:08] soniya29: has joined #ruby
[13:55:20] soniya29_: has joined #ruby
[14:00:26] Asher: has joined #ruby
[14:01:08] kryptoz: has joined #ruby
[14:03:20] alfiemax: has joined #ruby
[14:05:29] mynameisdebian: has joined #ruby
[14:06:28] Zaab1t: has joined #ruby
[14:08:16] lele: has joined #ruby
[14:08:43] GodFather: has joined #ruby
[14:11:36] Rapture: has joined #ruby
[14:13:06] jrafanie: has joined #ruby
[14:13:42] gigetoo: has joined #ruby
[14:17:16] Inline: has joined #ruby
[14:17:48] nowhere_man: has joined #ruby
[14:25:27] dionysus69: has joined #ruby
[14:38:05] graphene: has joined #ruby
[14:38:40] Mia: has joined #ruby
[14:38:40] Mia: has joined #ruby
[14:41:37] Paraxial: has joined #ruby
[14:44:38] apeiros_: has joined #ruby
[14:50:28] Mike11: has joined #ruby
[14:51:01] kryptoz: has joined #ruby
[14:52:02] n13z: has joined #ruby
[14:53:38] synthroid: has joined #ruby
[14:55:45] Megamos: has joined #ruby
[14:56:29] graphene: has joined #ruby
[14:56:48] apeiros_: has joined #ruby
[14:57:16] akm: has joined #ruby
[14:57:44] samosaphile: has joined #ruby
[14:59:36] mynameisdebian: has joined #ruby
[15:01:01] alfiemax: has joined #ruby
[15:03:34] tdy: has joined #ruby
[15:04:35] kryptoz: has joined #ruby
[15:08:19] graphene: has joined #ruby
[15:10:56] kryptoz: has joined #ruby
[15:11:21] banisterfiend: has joined #ruby
[15:14:51] Inline: has joined #ruby
[15:15:00] troys: has joined #ruby
[15:15:12] salasrod: has joined #ruby
[15:15:37] graphene: has joined #ruby
[15:15:42] ak: has joined #ruby
[15:15:58] jraavis: has joined #ruby
[15:18:22] graphene: has joined #ruby
[15:21:40] Asher: has joined #ruby
[15:24:16] ^mtkd: has joined #ruby
[15:29:18] chouhoulis: has joined #ruby
[15:31:07] chouhoulis: has joined #ruby
[15:31:51] jraavis: has joined #ruby
[15:32:31] kryptoz: has joined #ruby
[15:33:51] banisterfiend: has joined #ruby
[15:35:34] Tempesta: has joined #ruby
[15:37:02] amarks: has joined #ruby
[15:41:01] ineb: has joined #ruby
[15:41:24] aceruser: has joined #ruby
[15:41:29] ineb: wasnt there a quick way to create a subclass which was basically just a parameterized version of the superclass?
[15:42:25] ineb: class Foo < Bar.new('baz'); end
[15:42:32] graphene: has joined #ruby
[15:42:35] ineb: nah, more like Foo = Baz.new('baz')
[15:42:40] amar_: has joined #ruby
[15:42:55] apeiros_: `class Foo < expr` allows anything as expr which returns a class.
[15:43:03] bmurt: has joined #ruby
[15:43:13] apeiros_: but since SomeClass.new usually does not return a class, the way it works differs a bit from what you imagine/remember
[15:43:46] apeiros: and the way it was done by _why which served as a template to many was: `class Foo < Bar(a,b,c…)`
[15:44:00] apeiros: Bar naturally being a method, Kernel#Bar
[15:44:18] ineb: ah yes, i guess that was what i had in mind
[15:44:31] ineb: i dont like it though :)
[15:45:01] apeiros: *shrug* you asked about it. do as you please :)
[15:45:09] mynameisdebian: has joined #ruby
[15:45:46] ineb: how is Struct doing it? MyStruct = Struct.new(:foo) { def whatever; end }; MyStruct.new("baz") ?
[15:45:54] apeiros: Struct.new returns a class.
[15:46:09] cagomez: has joined #ruby
[15:46:36] apeiros: Struct is one of those nice classes which fail to uphold SomeClass.new.is_a?(SomeClass) :)
[15:47:08] yokel: has joined #ruby
[15:49:07] maufart__: has joined #ruby
[15:53:59] ivanskie: has joined #ruby
[15:56:38] mtkd: has joined #ruby
[15:58:30] ineb: apeiros: how would Kernel#Bar(a,b,c…) look like? tmp = Class.new(Object) {}; const_set("MyClass", tmp)?
[15:58:52] ineb: MyModule.const_set i guess?
[15:58:52] apeiros: you shouldn't const_set
[15:59:39] apeiros: but the other part looks about right, yes. Class.new is the way. and then you do whatever to parametrize the created class.
[15:59:51] jraavis: has joined #ruby
[16:00:10] za1b1tsu: has joined #ruby
[16:01:19] vermaneerajin[m]: has joined #ruby
[16:02:30] ineb: apeiros: can you link me this pattern somewhere? who is _why btw? ^^
[16:03:23] apeiros: _why was quite famous a while back. sadly quit the community. camping.rb was his project where you can see this pattern.
[16:03:28] khomesh24: has joined #ruby
[16:04:37] ineb: i see. thank you
[16:04:46] tdy: has joined #ruby
[16:04:49] dviola: has joined #ruby
[16:06:45] mgraf: has joined #ruby
[16:07:52] ghoti: has joined #ruby
[16:09:45] amarks: has joined #ruby
[16:10:55] howdoi: has joined #ruby
[16:12:12] banisterfiend: has joined #ruby
[16:12:45] chkhanch: has joined #ruby
[16:14:05] kryptoz: has joined #ruby
[16:15:35] amar_: has joined #ruby
[16:15:40] jcarl43: has joined #ruby
[16:16:28] DTZUZO: has joined #ruby
[16:26:03] TvL2386: has joined #ruby
[16:27:28] noobineer: has joined #ruby
[16:28:14] codymj: has joined #ruby
[16:29:57] ineb: apeiros: interesting story around _why. looks like he disappeared and deleted all his repo one day. i always wonder why people do this.
[16:29:57] mgraf: has joined #ruby
[16:31:02] sticaz: has joined #ruby
[16:31:05] ineb: i understand it when hackers remove their stuff once they receive a friendly legal note adressed at their real names ;)
[16:31:37] ineb: but OSS contributors? well. we will never know i guess
[16:32:53] ineb: maybe due to a nuisance of imperfection and the wish to start with a clean slate
[16:33:02] ineb: new game+ or something like that
[16:33:56] WA9ACE: Just speculating but, they could have died. Not everyone is Jim. My wife and a friend have dead man switch access to my password manager to start shutting off accounts in my case
[16:35:44] eb0t: has joined #ruby
[16:35:55] jraavis: has joined #ruby
[16:36:14] ineb: oh, yes ofc. not everyone is just text in the internet.
[16:42:00] apeiros: WA9ACE: as far as I know _why is not dead. somebody close to him in RL said as much. but it's still only hearsay.
[16:44:38] raggi: Ah camping
[16:44:51] raggi: It's been a long long time now
[16:45:15] raggi: ACTION reminiscing about redhanded
[16:45:41] apeiros: what're you up to?
[16:45:42] graphene: has joined #ruby
[16:45:45] mgraf: has joined #ruby
[16:46:06] raggi: I haven't read code from a flashing gif in too many years
[16:46:15] raggi: I'm working on Fuchsia
[16:46:30] eckhardt_: has joined #ruby
[16:47:26] apeiros: I only know the color
[16:47:39] apeiros: google fuchsia, OS?
[16:48:07] apeiros: you get paid to work on that? bastard! 😂
[16:48:10] apeiros: ACTION is envious
[16:48:44] knight33: has joined #ruby
[16:49:12] jaequery: has joined #ruby
[16:49:25] raggi: It's fun, also a lot of work :-)
[16:49:52] hinbody: has joined #ruby
[16:49:53] raggi: I built mruby for it, and it works
[16:50:03] hinbody: has left #ruby: ()
[16:50:08] GodFather: has joined #ruby
[16:50:32] raggi: Not using it for anything atm, but was considering using it for some repl stuff for introspection / exploration tools
[16:51:11] raggi: What are you up to these days?
[16:51:46] apeiros: not much. trying to clean up remaining tasks until jan '19
[16:52:08] apeiros: feb-april I took 3 months of unpaid vacation to follow through on some projects of mine
[16:53:21] apeiros: yeah, though I still think I should have been more greedy and asked for 6 months :-/
[16:54:22] ak: has joined #ruby
[16:54:29] jraavis: has joined #ruby
[16:54:38] jottr: has joined #ruby
[16:55:11] raggi: Yeah I hear that
[16:55:19] jraavis: has joined #ruby
[16:55:52] raggi: Working on an OS basically doubled my to-do list instantly, but I at least can get a bunch done by teams now
[16:55:58] apeiros: while I'm not sure I'll have enough time for it, I want to also learn some rust during that time. aim is to write a smallish database server from scratch.
[16:57:06] raggi: Rust is pretty interesting, but also hard work in some areas
[16:57:08] mgraf: eh, never write your own db
[16:57:22] apeiros: mgraf: it'd be my second actually :)
[16:57:27] raggi: mgraf: why?
[16:57:35] mgraf: obligtory https://medium.com/@terrycrowley/never-write-your-own-database-736f704c780
[16:57:40] apeiros: first one was in perl for the first website I built around '99
[16:58:56] chouhoulis: has joined #ruby
[16:59:13] raggi: mgraf: did you read that article?
[17:00:00] raggi: It's a story about how and why they did, and how it is fine
[17:01:11] mgraf: it describes the OneNote _team_ deciding to build a solution
[17:02:13] mgraf: maybe I'm under estimating your resources; but it seems silly to write a database and implement it in something that people are going to use
[17:03:20] apeiros: IMO if you're serious about understanding something, you have to implement it yourself.
[17:03:54] apeiros: it doesn't mean that you have to use your self built thing
[17:04:05] mgraf: I agree, as an exercise. I wouldn't implement my own database in an OS though
[17:04:33] apeiros: implement as in use? not sure I understand that last sentence :)
[17:04:56] mgraf: Sorry, english is my third language
[17:05:16] GodFather: has joined #ruby
[17:05:25] apeiros: depending on how you count, it's my 4th :D
[17:05:35] nowhere_man: has joined #ruby
[17:05:44] apeiros: (though I'm far better in it than in my 3rd)
[17:06:14] mgraf: I wouldn't feel comfortable having users (consumers?) use / rely on a database I wrote by myself
[17:06:36] mgraf: Мы говорим то же самое?
[17:06:55] apeiros: given that I feel comfortable to have users/customers use other software I wrote myself, why'd that be different with a DB?
[17:07:09] apeiros: (it's not what I intend to do with this, though - it's intended to be a learning project)
[17:07:23] mistergibson: I wrote a db system - it wasn't so bad
[17:07:29] jraavis: has joined #ruby
[17:07:36] mgraf: Show me your unit testing :)
[17:09:18] za1b1tsu: has joined #ruby
[17:09:22] raggi: I once accidentally wrote a DB for a trading platform, in ruby no less
[17:10:08] raggi: Accidentally because I wrote the ruby version as an experiment to get a rough minimum baseline for latency and write throughput while we were evaluating other storage solutions
[17:10:29] raggi: And for various reasons it was about an order of magnitude faster at the primary taks
[17:11:01] raggi: So, fast forward a few months and it had a journal and read repair and a few other such bits
[17:15:35] nfk: has joined #ruby
[17:18:41] alem0lars: has joined #ruby
[17:23:33] alem0lars: has left #ruby: ("Leaving")
[17:23:57] alem0lars: has joined #ruby
[17:24:06] chkhanch: has joined #ruby
[17:24:50] sameerynho: has joined #ruby
[17:25:37] jaequery: has joined #ruby
[17:30:47] sticaz: has joined #ruby
[17:34:49] mtkd: has joined #ruby
[17:35:31] kryptoz: has joined #ruby
[17:38:19] banisterfiend: has joined #ruby
[17:39:51] mynameisdebian: has joined #ruby
[17:39:52] sphenxes: has joined #ruby
[17:40:22] sphenxes: has joined #ruby
[17:42:57] Mike11: has joined #ruby
[17:43:33] raggi: https://viewsourcecode.org/why/redhanded/bits/theHeartOfTryRuby.html ah time travel
[17:43:49] raggi: I'm so glad this is still on the interwebs
[17:43:54] kapil___: has joined #ruby
[17:45:31] mgraf: has joined #ruby
[17:48:20] alem0lars: has joined #ruby
[17:51:29] banisterfiend: has joined #ruby
[17:52:28] dionysus69: has joined #ruby
[17:55:07] desperek: has joined #ruby
[17:59:51] bmurt: has joined #ruby
[18:00:18] fmcgeough: has joined #ruby
[18:01:27] amar: has joined #ruby
[18:03:21] mzo: has joined #ruby
[18:09:23] conta: has joined #ruby
[18:10:31] r29v: has joined #ruby
[18:10:35] mtkd: has joined #ruby
[18:13:53] mgraf: has joined #ruby
[18:15:57] jamesaxl: has joined #ruby
[18:16:27] anjen: has joined #ruby
[18:20:36] quobo: has joined #ruby
[18:21:49] guille-moe: has joined #ruby
[18:26:09] mgraf: has joined #ruby
[18:27:50] reber: has joined #ruby
[18:29:29] mgraf: has left #ruby: ()
[18:30:04] Megamosaren: has joined #ruby
[18:32:26] akaiiro: has joined #ruby
[18:36:19] Zarthus: man, a recruiter just hit me up for a rails position at SUSE, sounded kinda interesting, but nuremberg is like the middle of nowhere.
[18:36:45] MasterAsia: has joined #ruby
[18:36:46] Zarthus: I say this while currently living in the middle of nowhere, I suppose.
[18:36:56] MasterAsia: How do I create a hash from a hash?
[18:37:18] Zarthus: masterasia: like {thing2: otherhash[:thing]} ?
[18:37:46] MasterAsia: Zarthus, like a hash digest?
[18:37:53] MasterAsia: I want a string representation of the hash
[18:37:58] MasterAsia: I am not sure if I'm using the right term
[18:38:04] MasterAsia: (so I can compare hash equality)
[18:38:08] Zarthus: no, that's the right term, it's just got multiple definitions :P
[18:38:43] Zarthus: i just don't know if your question in itself makes sense
[18:38:58] MasterAsia: I am storing the json from an API in my db
[18:39:15] MasterAsia: to check if anything has changed, I want to compare the json strings
[18:39:26] MasterAsia: I figure I'd hash both json strings
[18:39:43] MasterAsia: actually rails JSON column type might actually return the json as a hash
[18:39:47] MasterAsia: same with the http library
[18:40:01] Zarthus: even just comparing the string would work
[18:40:21] MasterAsia: I'd need to make sure if the json column keeps whitespace though
[18:40:33] MasterAsia: a string-to-string comparison seems almost naive
[18:40:35] Zarthus: it wouldn't surprise me if comparing two large strings is faster than sha2ing both
[18:40:41] MasterAsia: but I guess that space would change the hash digest anyways
[18:41:06] Zarthus: hashes are intentionally rather slow
[18:41:11] Zarthus: especially cryptographic ones
[18:41:29] catbusters: has joined #ruby
[18:41:30] zachk: has joined #ruby
[18:41:34] MasterAsia: ah fair enough
[18:41:35] konsolebox: has joined #ruby
[18:41:40] jenrzzz: has joined #ruby
[18:41:40] jenrzzz: has joined #ruby
[18:41:47] Zarthus: checksum ones are fine, but it doesn't make much sense to do that here
[18:42:08] zachk: has joined #ruby
[18:42:23] catbusters: What's the best datetime library for Ruby? I'm looking for something like moment.js or arrow (python)
[18:42:47] Zarthus: catbusters: I've managed just fine with the normal time/date libraries, what functionality do you need?
[18:43:04] catbusters: Adding an subtracting hours
[18:43:43] Zarthus: Time supports Time#-
[18:43:46] MasterAsia: Zarthus, why wouldn't a checksum be okay here? for learning purposes
[18:44:24] Zarthus: masterasia: unless you store it in the db rather, checksumming both values is equal to a normal string comparison
[18:46:48] Puffball: has joined #ruby
[18:49:38] rawste: has joined #ruby
[18:52:32] rubytester: has joined #ruby
[18:52:46] spencer: has joined #ruby
[18:52:51] __goodnight__: has joined #ruby
[18:53:54] spencer: has left #ruby: ()
[18:54:03] wald0: has joined #ruby
[18:54:47] jaequery: has joined #ruby
[18:55:39] jottr: has joined #ruby
[19:08:07] beowuff: has joined #ruby
[19:21:27] claudiuinberlin: has joined #ruby
[19:22:43] graphene: has joined #ruby
[19:24:58] nowhere_man: has joined #ruby
[19:34:10] jottr: has joined #ruby
[19:42:11] _whitelogger: has joined #ruby
[19:45:22] fluxAeon: has joined #ruby
[19:47:22] ciscam: has joined #ruby
[19:48:45] Mike11: has joined #ruby
[19:49:30] Ouchy: has joined #ruby
[19:49:31] Ouchy: has joined #ruby
[19:55:28] \void: has joined #ruby
[19:56:38] SeepingN: has joined #ruby
[19:58:37] jaequery: has joined #ruby
[20:09:26] mynameisdebian: has joined #ruby
[20:10:08] jaequery: has joined #ruby
[20:17:00] klaas: has joined #ruby
[20:18:01] mtkd: has joined #ruby
[20:18:30] TvL2386_: has joined #ruby
[20:22:38] banisterfiend: has joined #ruby
[20:24:07] ellcs: has joined #ruby
[20:30:18] alex``: has joined #ruby
[20:36:04] TvL2386: has joined #ruby
[20:38:53] mtkd: has joined #ruby
[20:39:35] jenrzzz: has joined #ruby
[20:39:35] jenrzzz: has joined #ruby
[20:40:51] willthechill: has joined #ruby
[20:41:27] banisterfiend: has joined #ruby
[20:43:58] blackwind_123: has joined #ruby
[20:52:05] regedit: has joined #ruby
[20:54:08] Rapture: has joined #ruby
[21:03:19] StarSeed0000: has joined #ruby
[21:03:34] jaequery: has joined #ruby
[21:03:53] mtkd: has joined #ruby
[21:12:27] alex``: has joined #ruby
[21:12:55] rwb: has joined #ruby
[21:14:38] dionysus69: has joined #ruby
[21:15:31] ur5us: has joined #ruby
[21:16:41] al2o3-cr: would perens for rational stir shit up?
[21:18:21] ruby[bot]: elomatreb: # => (15/8) (https://eval.in/1035181)
[21:18:24] al2o3-cr: >> ((((())))) ^ (((())))
[21:18:25] ruby[bot]: al2o3-cr: # => false (https://eval.in/1035182)
[21:19:01] al2o3-cr: elomatreb: this i know, but would perens be plausable?
[21:19:35] elomatreb: Feels like a weird special case for how rarely they're used
[21:20:12] al2o3-cr: syntactically speaking, it would be nice imo
[21:20:42] alfiemax: has joined #ruby
[21:22:10] ruby[bot]: al2o3-cr: # => (1+7i) (https://eval.in/1035183)
[21:22:17] elomatreb: You'd probably have to restrict it to literals (i.e. no variables/expressions) in order to keep it at least a little unambigous
[21:23:02] al2o3-cr: elomatreb: yeah, i see your point ;)
[21:23:27] apeiros: al2o3-cr: how do you express (15/7)-2 as int division with that?
[21:24:04] al2o3-cr: apeiros: well (15/7) would be a rational.
[21:24:16] apeiros: yes, so not an int division
[21:24:26] alfiemax_: has joined #ruby
[21:24:36] apeiros: so what do I do if I do want an int division?
[21:24:56] al2o3-cr: apeiros: how do you do int div with 15/7r now?
[21:25:05] apeiros: you don't. you do 15/7
[21:25:22] al2o3-cr: i'm on about rational here ;)
[21:25:28] apeiros: you're missing the point
[21:25:33] al2o3-cr: no i'm not.
[21:25:41] apeiros: then answer my question :)
[21:26:01] al2o3-cr: you answer mine first =p
[21:26:32] apeiros: you're being dense. well, I'm off then.
[21:27:01] agent_white: has joined #ruby
[21:27:01] graphene: has joined #ruby
[21:27:15] al2o3-cr: i'm saying would a syntax of (15/8) be ok rational literals
[21:27:27] postmodern: has joined #ruby
[21:27:32] MasterAsia: if I have a url like https://google.ca/api/users, how can I strip out the https://google.ca/api
[21:27:36] MasterAsia: assuming it remains constant
[21:27:48] MasterAsia: I've looked at slice but that returns the stripped out prefix
[21:27:50] MasterAsia: and not the /users
[21:27:55] al2o3-cr: masterasia: use URI lib
[21:28:09] MasterAsia: won't that give me /api/users, al2o3-cr
[21:28:15] MasterAsia: if I ask the URI lib for the path
[21:28:21] apeiros: al2o3-cr: and I'm saying it'd be problematic and gave you an example.
[21:28:45] al2o3-cr: apeiros: yes, i see what you were saying ;)
[21:29:19] beefjoe: has joined #ruby
[21:30:32] jenrzzz_: has joined #ruby
[21:32:17] MasterAsia: al2o3-cr, ended up doing a gsub
[21:33:02] al2o3-cr: you could actually use File.split(...).first
[21:36:34] alfiemax: has joined #ruby
[21:39:04] ellcs: has joined #ruby
[21:40:56] al2o3-cr: masterasia: what gsub?
[21:42:09] MasterAsia: link = "https://google.ca/api/users"; link.gsub("https://google.ca/api", "")
[21:42:17] MasterAsia: returns /users without mutating link
[21:42:40] al2o3-cr: so you just want /users?
[21:42:54] MasterAsia: well I've solved it
[21:43:21] banisterfiend: has joined #ruby
[21:44:00] MasterAsia: I'm letting user-input sneak define which API endpoint I call, they only have limited access but could it be malicious?
[21:44:19] al2o3-cr: masterasia: just use String#sub if you're not globally subtituting.
[21:44:48] MasterAsia: link = "/users/#{params[:id]}" which is fed into http.get('https://google.ca/api/#{link}")
[21:45:01] al2o3-cr: is this sinatra?
[21:45:04] MasterAsia: I feel like there is some sort of link traversal that they can do
[21:45:05] MasterAsia: Nah this is rails
[21:45:47] al2o3-cr: this sounds iffy
[21:46:29] al2o3-cr: apeiros: no hard feelings.
[21:46:52] apeiros: hm? from my side? no worries.
[21:46:56] al2o3-cr: just on the wrong wave length
[21:50:53] al2o3-cr: >> File.relative_path('foo/bar/bax/quux', ?/
[21:50:54] ruby[bot]: al2o3-cr: # => /tmp/execpad-062b8a760887/source-062b8a760887:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/1035186)
[21:50:55] cyberg: has joined #ruby
[21:51:00] al2o3-cr: >> File.relative_path('foo/bar/bax/quux', ?/)
[21:51:01] ruby[bot]: al2o3-cr: # => undefined method `relative_path' for File:Class (NoMethodError) ...check link for more (https://eval.in/1035187)
[21:51:19] al2o3-cr: >> File.relative_paths('foo/bar/bax/quux', ?/)
[21:51:20] ruby[bot]: al2o3-cr: # => undefined method `relative_paths' for File:Class (NoMethodError) ...check link for more (https://eval.in/1035188)
[21:51:37] al2o3-cr: i've forgotten ;(
[21:52:48] al2o3-cr: ACTION little henrys have died.
[21:56:34] al2o3-cr: >> File.relative_path
[21:56:35] ruby[bot]: al2o3-cr: # => undefined method `relative_path' for File:Class (NoMethodError) ...check link for more (https://eval.in/1035189)
[21:57:28] al2o3-cr: ok, ok. it's pigging yard omg.
[21:58:13] al2o3-cr: i thought that was a singleton method on File ;(
[21:58:30] dviola: has joined #ruby
[22:03:55] AJA4350: has joined #ruby
[22:04:31] al2o3-cr: irb or pry?
[22:05:05] al2o3-cr: irb is a kitten and pry is a lion
[22:05:10] cosmopaladin: has joined #ruby
[22:06:11] al2o3-cr: >> Gem.vendor_dir
[22:06:13] ruby[bot]: al2o3-cr: # => "/execpad/interpreters/ruby-2.3.0/lib/ruby/vendor_ruby/gems/2.3.0" (https://eval.in/1035190)
[22:08:32] TvL2386_: has joined #ruby
[22:08:42] alfiemax: has joined #ruby
[22:09:15] al2o3-cr: >> Gem.install 'nyan-cat'
[22:09:16] ruby[bot]: al2o3-cr: # => (https://eval.in/1035191)
[22:09:33] mynameisdebian: has joined #ruby
[22:10:20] mynameisdebian: has joined #ruby
[22:10:56] shinnya: has joined #ruby
[22:14:28] Nicmavr: has joined #ruby
[22:24:02] TvL2386: has joined #ruby
[22:38:20] banisterfiend: has joined #ruby
[22:39:49] pharma_joe: has joined #ruby
[22:42:36] jasmith: has joined #ruby
[22:47:59] alfiemax: has joined #ruby
[22:48:06] zautomata: has joined #ruby
[22:50:27] zautomata: has joined #ruby
[22:50:52] jenrzzz: has joined #ruby
[22:50:53] jenrzzz: has joined #ruby
[22:59:08] DarthGandalf: has joined #ruby
[23:00:57] gizmore: has joined #ruby
[23:01:28] gix: has joined #ruby
[23:06:38] jenrzzz: has joined #ruby
[23:06:39] jenrzzz: has joined #ruby
[23:10:05] jamesaxl: has joined #ruby
[23:11:41] jenrzzz: has joined #ruby
[23:11:42] jenrzzz: has joined #ruby
[23:11:45] postmodern: has joined #ruby
[23:13:38] white_lilies: has joined #ruby
[23:17:03] noobineer: has joined #ruby
[23:17:36] bak1an: has joined #ruby
[23:26:30] RougeR: has joined #ruby
[23:26:31] RougeR: has joined #ruby
[23:28:14] fmcgeough: has joined #ruby
[23:28:55] venmx: has joined #ruby
[23:29:34] nickjj: has joined #ruby
[23:29:49] zugzug: has joined #ruby
[23:33:37] eb0t: has joined #ruby
[23:44:14] Azure: has joined #ruby
[23:54:40] duderonomy: has joined #ruby