« Back to channel list

#ruby - 25 January 2018

« Back 1 day Forward 1 day »
[00:00:34] pwnd_nsfw: has joined #ruby
[00:01:00] rrutkowski: has joined #ruby
[00:05:49] rrutkowski: has joined #ruby
[00:12:03] randomstrangerb: has joined #ruby
[00:13:50] dstrunk: has joined #ruby
[00:14:58] guardianx: has joined #ruby
[00:17:11] darix: weaksauce: 1.9.3 is lacking a lot and i mean a lot of security fixes
[00:17:18] darix: weaksauce: you do not want to use it anymore
[00:17:43] darix: distros backport fixes for older versions. but source install lacks all those backports
[00:17:59] weaksauce: I don't actually use it but the client is not paying me to upgrade it
[00:18:17] weaksauce: it's going to heroku and i assume they use a patched version
[00:20:53] darix: heroku is really still offering 1.9????
[00:22:43] dogweather: has joined #ruby
[00:22:50] weaksauce: seeing as how the push worked and the changes look good, yeah they still do
[00:30:24] havenwood: "When a Ruby version reaches EOL security patches will no longer be available. We highly recommend running on a version of Ruby that is actively supported by Ruby core." ~Heroku
[00:30:57] havenwood: "Ruby ... 1.9.3 [has] reached EOL. While you can still run [it] on cedar-14 stack, security patches are not be applied."
[00:31:24] havenwood: weaksauce: It's not patched. It's vulnerable. FWIW
[00:31:29] darix: weaksauce: it actually will be more work for you to use 1.9.3
[00:31:33] darix: than a recent version ;)
[00:31:36] havenwood: They do a great job of patching supported Rubies.
[00:33:03] pwnd_nsfw`: has joined #ruby
[00:33:06] weaksauce: yeah. it's vulnerable but it's not a high traffic site and doesn't have anything of real value on the server and doesn't run a database or anything like that. it's not my call anyway
[00:33:40] weaksauce: but yeah I appreciate the heads up. I use recent rubies for my stuff.
[00:34:01] havenwood: heroku stack:set heroku-16
[00:34:39] havenwood: ^ that and a Ruby version bump to 2.3 might be relatively painless
[00:35:09] havenwood: but yeah, I suppose you'd have to be paid to do it ;-P
[00:36:24] havenwood: I wonder what this means...: "Matz: I have a rough idea to use backtick as a namespace separator."
[00:36:36] guille-moe: has joined #ruby
[00:36:55] havenwood: I wonder what that would look like?
[00:38:21] tcopeland: has joined #ruby
[00:38:43] tipyn: has joined #ruby
[00:39:17] milardovich: has joined #ruby
[00:39:40] cdg: has joined #ruby
[00:40:42] havenwood: Does he mean like Net`HTTP and Digest`MD5? Hrm.
[00:41:03] havenwood: I do think that's what's meant. Mmm.
[00:41:30] wilbert: has joined #ruby
[00:41:38] cdg: has joined #ruby
[00:45:27] nowhere_man: has joined #ruby
[00:47:36] nowhereman_: has joined #ruby
[00:50:50] darix: havenwood: that wont screw with things like `shell command`
[00:51:00] havenwood: darix: deprecated
[00:51:09] darix: havenwood: I find it ugly even in shell scripts
[00:51:23] darix: ACTION is a strong believer in $(shell command)
[00:51:27] havenwood: https://bugs.ruby-lang.org/issues/14385
[00:51:44] guacamole: has joined #ruby
[00:51:45] guacamole: has joined #ruby
[00:57:37] bronson: has joined #ruby
[01:05:14] belmoussaoui: has joined #ruby
[01:06:31] justinfaler: has joined #ruby
[01:06:39] camfowler: has joined #ruby
[01:08:21] jottr_: has joined #ruby
[01:12:13] rrutkowski: has joined #ruby
[01:21:02] milardovich: has joined #ruby
[01:23:38] AJA4350: has joined #ruby
[01:24:07] s3nd1v0g1us: has joined #ruby
[01:25:10] rrutkowski: has left #ruby: ()
[01:25:11] nowhere_man: has joined #ruby
[01:27:50] cdg: has joined #ruby
[01:28:59] guacamole: has joined #ruby
[01:29:00] guacamole: has joined #ruby
[01:29:04] mtkd: has joined #ruby
[01:29:31] kryptoz: has joined #ruby
[01:30:51] pwnd_nsfw: has joined #ruby
[01:31:11] milardovich: has joined #ruby
[01:33:02] nowhere_man: has joined #ruby
[01:35:53] nowhereman_: has joined #ruby
[01:39:40] nowhereman_: has joined #ruby
[01:41:27] justinfaler: has joined #ruby
[01:48:57] DTZUZO: has joined #ruby
[01:51:55] nowhereman_: has joined #ruby
[01:52:29] veduardo_: has joined #ruby
[01:56:24] nowhere_man: has joined #ruby
[01:56:56] rrutkowski: has joined #ruby
[02:00:17] rrutkowski: has joined #ruby
[02:00:54] dstrunk: has joined #ruby
[02:03:26] alfiemax: has joined #ruby
[02:03:28] jottr_: has joined #ruby
[02:05:03] rrutkowski: has joined #ruby
[02:08:23] sans: has joined #ruby
[02:09:11] sans: Hi, I'm trying to install the gem json, version it's trying to install is 1.7.7, version of ruby is *apparently* 2.6.0-dev but the issue exists in 2.3.0 as well, issue is, it doesn't work, and I'm losing it
[02:09:32] sans: can anyone perhaps tell me if there's a better version of json than 1.7.7, or is that it
[02:10:29] sans: Also, I'm so sorry in advance if this is in the wrong channel, I'm new to managing Ruby apps.
[02:18:02] vondruch_: has joined #ruby
[02:22:24] vondruch: has joined #ruby
[02:30:46] bmurt: has joined #ruby
[02:37:55] dogweather: has joined #ruby
[02:41:40] gizmore|2: has joined #ruby
[02:44:45] guacamole: has joined #ruby
[02:44:46] guacamole: has joined #ruby
[02:46:54] dstrunk: has joined #ruby
[02:49:10] darix: Sans: there is 1.8 available
[02:51:28] darix: actually 2.1 is out
[02:53:18] drowze: has joined #ruby
[02:55:15] cdg: has joined #ruby
[02:57:40] jottr_: has joined #ruby
[02:58:48] bronson: has joined #ruby
[03:02:21] aguestuser: has joined #ruby
[03:03:45] rexb0t: has joined #ruby
[03:06:06] cdg: has joined #ruby
[03:06:14] aupadhye: has joined #ruby
[03:07:04] cdg_: has joined #ruby
[03:09:01] crankharder: has joined #ruby
[03:10:31] sspreitz: has joined #ruby
[03:12:00] ahrs: has joined #ruby
[03:12:05] ShekharReddy: has joined #ruby
[03:17:13] dstrunk: has joined #ruby
[03:17:32] JBrickley: has joined #ruby
[03:17:55] darkhanb: has joined #ruby
[03:19:24] guacamole: has joined #ruby
[03:19:25] guacamole: has joined #ruby
[03:21:18] dstrunk: has joined #ruby
[03:22:35] jottr_: has joined #ruby
[03:30:17] pwnd_nsfw`: has joined #ruby
[03:34:08] mtkd: has joined #ruby
[03:35:42] kryptoz: has joined #ruby
[03:41:13] kryptoz: has joined #ruby
[03:43:03] meesles: has joined #ruby
[03:45:02] dogweather: has joined #ruby
[03:46:57] kryptoz: has joined #ruby
[03:48:13] LastWhisper____: has joined #ruby
[03:48:49] nso95: has joined #ruby
[03:49:02] nso95: has left #ruby: ()
[03:50:34] gnufied: has joined #ruby
[03:50:35] workmad3: has joined #ruby
[03:50:48] Nathan`: has joined #ruby
[03:52:17] ramfjord: has joined #ruby
[03:53:30] crankharder: has joined #ruby
[03:54:10] jottr_: has joined #ruby
[03:55:18] govg: has joined #ruby
[03:55:32] havenwood: heh, here's a 13M macOS binary Pry I compiled with ruby-packer: https://www.dropbox.com/s/norpr9ke1d50jna/pry?dl=1
[03:56:34] havenwood: You don't need Ruby installed to use it. It's Pry 0.11.3 on Ruby 2.4.1.
[03:56:54] havenwood: It's pretty amazing that ruby-packer actually works...
[03:57:04] jnyw: has joined #ruby
[03:57:10] havenwood: 13M is tiny.
[03:57:31] havenwood: https://github.com/pmq20/ruby-packer
[03:57:32] havenwood: I'm impressed.
[03:57:54] bawNg: that's much better than the only options for packaging ruby apps for distribution a few years ago
[03:58:08] bawNg: I haven't needed to package anything for distribution recently
[03:58:34] havenwood: The binary starts faster than Pry with full Ruby. ¯\_(ツ)_/¯
[03:59:08] havenwood: It shaves more than a second off of coolline Pry startup time.
[03:59:19] bawNg: that's probably mostly rubygems fault
[03:59:34] bronson: has joined #ruby
[03:59:40] bawNg: I think rubygems accounts for the vast majority of start up time, the actual ruby boot up is something like 50ms
[04:01:08] havenwood: time ruby --disable-gems -e 'exit' #>> ruby --disable-gems -e 'exit' 0.01s user 0.01s system 88% cpu 0.015 total
[04:01:26] kryptoz: has joined #ruby
[04:01:31] havenwood: time ruby -e 'exit' #>> ruby -e 'exit' 0.05s user 0.01s system 94% cpu 0.061 total
[04:01:37] havenwood: bawNg: Yeah, it's quite fast without RubyGems. Not too bad with.
[04:02:11] kryptoz: has joined #ruby
[04:02:59] kryptoz: has joined #ruby
[04:03:46] kryptoz: has joined #ruby
[04:04:28] kryptoz: has joined #ruby
[04:05:04] sans: darix: hey, yeah I know, unfortunately it was forcing 1.7.7?? I got t to work somehow, not sure how, I’m just damn glad it’s working.
[04:09:38] bawNg: seems rubygems is a lot faster than it used to be, but you're also not requiring any gems in that benchmark
[04:13:40] GodFather: has joined #ruby
[04:14:59] JJonah: Is there a good way to remove the repetition here while keeping the behavior the same (required args, conversion of port to int, format of to_json):
[04:15:04] JJonah: https://www.irccloud.com/pastebin/XCY9df4V/
[04:15:04] ruby[bot]: JJonah: as I told you already, please use https://gist.github.com
[04:17:19] banisterfiend: has joined #ruby
[04:17:55] JJonah: wow ruby bot is snippy. ok, ok: https://gist.github.com/anonymous/82ee2c5ecd0e739b9051fd203cfb5ddb
[04:20:07] JJonah: ignore commas in the assignments, those are a bad cut n paste
[04:25:09] careta: has joined #ruby
[04:32:43] gix-: has joined #ruby
[04:34:18] pwnd_nsfw: has joined #ruby
[04:34:49] LocaMocha: has joined #ruby
[04:37:29] dankeast: has joined #ruby
[04:39:57] jottr_: has joined #ruby
[04:44:42] cdg: has joined #ruby
[04:46:58] thejamespinto: has joined #ruby
[04:48:13] jackjackdripper: has joined #ruby
[04:54:12] jamesaxl: has joined #ruby
[04:55:16] bawNg: JJonah: you could write a class method that generates that based on the attributes given
[05:00:51] oleo: has joined #ruby
[05:03:52] dogweather: has joined #ruby
[05:05:00] jamesaxl: has joined #ruby
[05:10:09] knightnc: has joined #ruby
[05:10:48] knightnc: I'm trying to use Net::HTTP to post a form for logging in, but the post itself seems to redirect to the sign in page. Any ideas?
[05:11:30] JusticeFries: has joined #ruby
[05:12:08] jenrzzz: has joined #ruby
[05:12:08] jenrzzz: has joined #ruby
[05:12:44] c-c: knight__: missing header
[05:13:14] c-c: ACTION estimates 87% probability
[05:14:01] c-c: knight__: test login from browser, copy the post from browser dev tools network-tab and compare to the ones you sent
[05:16:19] alfiemax: has joined #ruby
[05:17:37] jamesaxl: has joined #ruby
[05:17:48] crankharder: has joined #ruby
[05:19:33] dogweather: has joined #ruby
[05:23:07] dreamthese: has joined #ruby
[05:23:10] xuyuheng: has joined #ruby
[05:24:13] jackjackdripper: has joined #ruby
[05:24:44] alfiemax: has joined #ruby
[05:24:45] xuyuheng: has joined #ruby
[05:26:32] xuyuheng: has joined #ruby
[05:29:04] dogweather: has joined #ruby
[05:33:58] jottr_: has joined #ruby
[05:36:32] alfiemax_: has joined #ruby
[05:42:16] careta: has joined #ruby
[05:42:17] Guest6096: has joined #ruby
[05:44:03] Guest6096: has left #ruby: ()
[05:51:03] xuyuheng: has joined #ruby
[05:51:26] workmad3: has joined #ruby
[05:51:44] djbkd: has joined #ruby
[06:00:11] rrichardsr3: has joined #ruby
[06:00:37] bronson: has joined #ruby
[06:01:42] GodFather: has joined #ruby
[06:03:12] dogweather: has joined #ruby
[06:08:04] pwnd_nsfw`: has joined #ruby
[06:11:29] Dimik: has joined #ruby
[06:11:57] jottr_: has joined #ruby
[06:14:30] xuyuheng_: has joined #ruby
[06:15:07] cdg: has joined #ruby
[06:17:12] RougeR: has joined #ruby
[06:18:36] alfiemax: has joined #ruby
[06:20:07] Axsuul: has joined #ruby
[06:20:55] naprimer: has joined #ruby
[06:24:16] dogweather: has joined #ruby
[06:27:16] darkhanb: has joined #ruby
[06:28:28] Xiti: has joined #ruby
[06:30:22] shaman42: has joined #ruby
[06:31:53] conta: has joined #ruby
[06:32:36] KeyJoo: has joined #ruby
[06:35:17] dogweather: has joined #ruby
[06:40:42] darkhanb: has joined #ruby
[06:43:09] sammi`: has joined #ruby
[06:48:10] s2013: has joined #ruby
[06:56:33] rabajaj: has joined #ruby
[06:57:57] roshanavand: has joined #ruby
[06:59:07] xpt: has joined #ruby
[06:59:29] darkhanb: has joined #ruby
[07:05:12] dogweather: has joined #ruby
[07:06:01] jottr_: has joined #ruby
[07:06:57] xuyuheng_: has joined #ruby
[07:16:11] cdg: has joined #ruby
[07:17:16] istrasci1: has joined #ruby
[07:18:40] istrasci1: If I call a rake task programmatically, how do I pass an environment variable to it? Calling Rake::Task["db:drop RAILS_ENV=test"] doesn't work.
[07:19:36] jottr_: has joined #ruby
[07:19:42] claudiuinberlin: has joined #ruby
[07:21:09] xfbs: has joined #ruby
[07:25:11] noocx: has joined #ruby
[07:25:17] noocx: ERROR: Loading command: install (LoadError)
[07:25:17] noocx: cannot load such file -- zlib
[07:25:36] noocx: i get this on aws ec2 while trying to install bundler(gem install bundler)
[07:25:49] noocx: installed ruby with rvm
[07:26:07] noocx: zlib and zlib-devel is installed
[07:26:22] noocx: have you got any idea?
[07:26:39] c-c: inukshuk: you need to set the env var in the shell, I suppose
[07:26:46] jetpack_joe: has joined #ruby
[07:27:02] baweaver: noocx https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/aws/nginx/oss/install_language_runtime.html
[07:27:24] baweaver: Also make sure you're using a somewhat recent version of AWS Linux.
[07:27:33] noocx: thanks checking
[07:27:38] noocx: its amazon 2 ami
[07:27:44] c-c: inukshuk: also see https://github.com/thoughtbot/paperclip/blob/master/lib/tasks/paperclip.rake
[07:27:44] noocx: so the newest i think
[07:31:22] dogweather: has joined #ruby
[07:32:03] jenrzzz: has joined #ruby
[07:34:14] noocx: baweaver: yes i did this, rvm and ruby is installed fine, i think all of the required packages installed too, but i still get this error when i try to install bundler
[07:34:19] istrasci1: has left #ruby: ()
[07:35:08] noocx: gem install bundler --no-rdoc --no-r
[07:35:08] noocx: ERROR: Loading command: install (LoadError)
[07:35:08] noocx: cannot load such file -- zlib
[07:35:08] noocx: ERROR: While executing gem ... (NoMethodError)
[07:35:09] noocx: undefined method `invoke_with_build_args' for nil:NilClass
[07:35:39] noocx: with --no-ri too:)
[07:36:14] conta: has joined #ruby
[07:41:11] tAn: has joined #ruby
[07:41:46] noocx: maybe this will be my problem when i install ruby the installer says to install these packages: Install: build-essential libreadline zlib1g libyaml libc6 libgdbm ncurses
[07:41:55] noocx: but there is no zlib1g on amazon linux?
[07:43:01] mtkd: has joined #ruby
[07:43:46] kryptoz: has joined #ruby
[07:47:45] andikr: has joined #ruby
[07:48:26] cdg: has joined #ruby
[07:50:57] xfbs: has joined #ruby
[07:52:09] noocx: ok working now
[07:52:10] noocx: needed to recompile ruby after zlib install
[07:52:15] workmad3: has joined #ruby
[07:56:40] dogweather: has joined #ruby
[07:58:28] jaruga: has joined #ruby
[07:59:44] coderobe: has joined #ruby
[08:00:39] coderobe: is there any working dbus gem besides "ruby-dbus"? ruby-dbus has some issues that prevent me from using it
[08:01:14] coderobe: i only need dbus client features
[08:01:27] jottr_: has joined #ruby
[08:01:33] bronson: has joined #ruby
[08:05:00] careta: has joined #ruby
[08:10:40] amatas: has joined #ruby
[08:15:13] coderobe: to be precise, it does this https://tmp.codero.be/DulcetYellowWhale2.txt when trying to do https://tmp.codero.be/AwfulYellowBaboon0.txt - the last line is where the traceback starts
[08:15:20] coderobe: i'm really not sure what's happening
[08:16:06] loveablelobster: has joined #ruby
[08:18:37] ramfjord: has joined #ruby
[08:18:54] aufi: has joined #ruby
[08:22:34] dogweather: has joined #ruby
[08:24:21] c-c: pardon my german, wrong win
[08:26:43] claudiuinberlin: has joined #ruby
[08:32:21] jud: has joined #ruby
[08:33:03] mark_66: has joined #ruby
[08:41:23] dogweather: has joined #ruby
[08:42:12] Stan: has joined #ruby
[08:46:59] jenrzzz: has joined #ruby
[08:46:59] jenrzzz: has joined #ruby
[08:49:04] cdg: has joined #ruby
[08:50:11] dogweather: has joined #ruby
[08:50:39] burgestrand: has joined #ruby
[08:55:25] jottr_: has joined #ruby
[08:59:25] yohji: has joined #ruby
[09:00:36] alex``: has joined #ruby
[09:04:42] noocx: have you got any idea why i cant bind webrick to a public iface at aws?:)
[09:05:22] noocx: ok my bad
[09:05:23] dminuoso: ACTION sighs
[09:05:30] dminuoso: noocx: You know what Im getting at?
[09:05:34] noocx: Errno::EADDRNOTAVAIL
[09:05:39] noocx: dminuoso: ?
[09:06:19] noocx: dminuoso: no
[09:06:40] dminuoso: noocx: Okay well maybe its the wrong factoid anyway.
[09:06:48] dminuoso: noocx: Gist your code, and the full stack trace of your error.
[09:06:55] dminuoso: Rather than asking "why I cant bind webrick to a public iface at aws"
[09:07:15] dminuoso: Because it's implying that what you are trying to do is impossible, which is implying that your cost must be infallable.
[09:07:41] noocx: dminuoso: ok you are right, but solved it sorry
[09:08:01] dminuoso: noocx: No sweat. :)
[09:09:30] dminuoso: >> puts "where are you bot"
[09:09:45] dminuoso: ACTION pokes apeiros with a coalgebra of a costate comonad
[09:10:52] bkxd: has joined #ruby
[09:11:32] noocx: do you use redmine?
[09:11:46] noocx: with what webserver?
[09:11:50] BuildTheRobots: has joined #ruby
[09:13:26] dminuoso: But apeiros does
[09:13:28] jenrzzz: has joined #ruby
[09:14:40] burgestrand: has joined #ruby
[09:15:38] Ishido: has joined #ruby
[09:16:12] tbuehlmann: I'm looking for a neat way to find the next number that is a multiplicative of 10_000 for a given integer. so foo(1) # => 10_000, foo(10_000) # => 10_000, foo(10_001) # => 20_000
[09:17:07] aufi: has joined #ruby
[09:18:11] xuyuheng_: has joined #ruby
[09:19:00] tbuehlmann: is there a clever method I could use or do I have to manually ceil/round/floor/whatever?
[09:19:52] cdg: has joined #ruby
[09:20:20] dminuoso: tbuehlmann: ->(n) { n.step.lazy.select { |a| a % 10000 == 0 }.first }
[09:20:37] dminuoso: I think or no,..
[09:21:19] dminuoso: (Or put into method if you prefer)
[09:21:48] guille-moe: has joined #ruby
[09:22:53] dminuoso: Functional programming for the win!
[09:23:03] dminuoso: By the way, Im in Han right now :D
[09:23:47] c-c: Its great if you are a student
[09:24:13] dminuoso: Or a coffee junkie.
[09:25:04] tobiasvl: def foo(n); (10_000 * (1 + ((n - 1) / 10_000))); end
[09:25:24] dminuoso: But... lazy enumerators!
[09:25:45] c-c: tbuehlmann: so, are you focusing on 10k literally or seeking to generalize this?
[09:26:41] dminuoso: .ceil(-4) is likely the shortest way though.
[09:26:47] tbuehlmann: it could be any integer > 0
[09:26:47] dminuoso: And probably the fastest too.
[09:26:51] havenwood: >> def foo target; 0.step(by: 10_000).find { |n| target <= n }; end; [foo(1), foo(10_000), foo(10_001)]
[09:26:52] ruby[bot]: havenwood: # => [10000, 10000, 20000] (https://eval.in/941829)
[09:26:55] tbuehlmann: thanks for the suggestions so far *tips hat*
[09:27:01] dminuoso: havenwood: neato!
[09:27:29] ur5us: has joined #ruby
[09:27:46] tbuehlmann: I like that as well, thanks!
[09:28:14] dminuoso: tbuehlmann: But if you wanted an efficient solution, .ceil(-4) is still your best bet ;)
[09:28:56] c-c: I don't quite see where the problem is, I need more coffee
[09:29:20] tbuehlmann: I'd use that, but I fear the number changes :)
[09:29:59] dminuoso: I'd go for havenwoods solution then. :)
[09:30:23] dminuoso: My solution is a bit heavy because of the modulo.
[09:30:43] s2013: has joined #ruby
[09:31:15] za1b1tsu: has joined #ruby
[09:32:15] Beams: has joined #ruby
[09:34:18] alfiemax: has joined #ruby
[09:37:52] plexigras: has joined #ruby
[09:45:50] qba73: has joined #ruby
[09:46:48] qba73: has joined #ruby
[09:51:59] jottr_: has joined #ruby
[09:52:02] qba73: has joined #ruby
[09:53:09] workmad3: has joined #ruby
[09:54:18] Serpent7776: has joined #ruby
[09:54:45] cdg: has joined #ruby
[09:57:25] drewmcmillan: has joined #ruby
[09:57:42] anisha: has joined #ruby
[09:58:00] noocx: which webserver should i use for redmine?
[09:58:18] noocx: puma + apache?
[09:58:21] ramfjord: has joined #ruby
[09:59:05] dminuoso: People need to stop using Apache seriously.
[09:59:25] tobiasvl: yes why not nginx
[09:59:44] noocx: ok nginx then
[09:59:51] noocx: whats yourproblem with apache?:D
[10:00:12] tobiasvl: noocx: let's turn it around, why did you automatically suggest apache? :P
[10:00:13] noocx: or for 20 ppl puma is just enough?
[10:00:18] noocx: or do i need to use nginx?
[10:00:30] bawNg: nginx is great, unicorn is good for a blocking ruby web server, thin is great for an eventmachine based one
[10:00:34] dminuoso: Only if you want TLS.
[10:00:34] dminuoso: Or do some other shenanigans.
[10:00:59] dminuoso: noocx: The configuration is inconsistent, annoying and totally weird. Apache is also slow. And meh.
[10:01:07] dminuoso: nginx is just a better Apache.
[10:01:09] bkxd_: has joined #ruby
[10:01:28] noocx: i saw some statistic and in some thigns apache was better
[10:01:30] dminuoso: But ultimately it depends on your environment. If you have apache everywhere, stick to apache.
[10:01:34] noocx: maybe with static files dont remember
[10:01:54] bawNg: nginx is a non-blocking reactor based server, it can handle hundreds of thousands of requests in a single thread, which is way more efficient than apache's threaded design
[10:02:04] bawNg: there is no reason to use apache for anything
[10:02:13] noocx: you use nginx with nodejs too?
[10:02:39] dminuoso: bawNg: well there is one reason: consistency.
[10:02:50] bawNg: you can use nginx for anything, it's a reverse proxy server, you put it in front of all your services and have it serve static files and proxy dynamic requests to your services
[10:03:06] dminuoso: bawNg: If for some reason you already have apache everywhere with people used to it, and dont need the performance benefits or benefits of a much more consistent configuration - then you might as well stick to Apache.
[10:03:08] bronson: has joined #ruby
[10:03:15] bawNg: I'd recommend anyone who uses apache looks at migrating to nginx
[10:03:21] bawNg: apache is horrible for so many reasons
[10:03:33] dminuoso: Configuring Apache is quirky and totally weird.
[10:03:36] noocx: its a fresh ec2, so i can use nginx too:)
[10:03:43] dminuoso: With random directives lfet and right..
[10:04:19] s2013: has joined #ruby
[10:04:21] bawNg: Unicorn is a great blocking ruby web server, designed very efficiently using a forking process model instead of threads, just like nginx
[10:04:44] bawNg: postgres is a great SQL database for the same reason, it is also based on forking processes
[10:05:53] mlehrer: has joined #ruby
[10:05:59] tvw: has joined #ruby
[10:06:29] tvw: has joined #ruby
[10:07:09] bkxd: has joined #ruby
[10:07:26] xuyuheng_: has joined #ruby
[10:08:12] anisha: has joined #ruby
[10:10:22] marr: has joined #ruby
[10:12:49] qba73: has joined #ruby
[10:13:42] stoffus: has joined #ruby
[10:18:00] Ishido: has joined #ruby
[10:25:41] funnel: has joined #ruby
[10:28:25] xuyuheng_: has joined #ruby
[10:29:13] kapil___: has joined #ruby
[10:29:48] Cavallari: has joined #ruby
[10:31:43] etehtsea: has joined #ruby
[10:35:13] belmoussaoui: has joined #ruby
[10:35:24] ldnunes: has joined #ruby
[10:36:39] fumk: has joined #ruby
[10:37:37] bkxd_: has joined #ruby
[10:43:29] xuyuheng_: has joined #ruby
[10:46:11] jottr_: has joined #ruby
[10:47:13] careta: has joined #ruby
[10:48:58] qba73: has joined #ruby
[10:49:45] InfinityFye: has joined #ruby
[10:52:21] InfinityFye: has left #ruby: ()
[10:55:08] burgestrand: has joined #ruby
[10:55:48] cdg: has joined #ruby
[10:56:12] make: has joined #ruby
[11:00:18] bkxd: has joined #ruby
[11:01:11] darix: bawNg: for webservers event based works really well
[11:01:25] darix: I prefer puma as ruby app server
[11:02:50] bawNg: for any IO-bound application, async event based is the most efficient and ideal implementation
[11:03:11] bawNg: the vast majority of ruby applications that I've always built are eventmachine based
[11:03:27] noocx: how fast is that compared to nodejs?
[11:03:58] alfiemax: has joined #ruby
[11:04:12] noocx: cause i cant decide to build my app with nodejs or ruby
[11:04:13] bawNg: darix: why would you prefer puma over unicorn?
[11:04:45] darix: bawNg: seems to use a little less memory
[11:05:14] bawNg: nodejs is a bit faster than ruby due to the very optimized V8 runtime which has a very good JIT, but most applications don't need to scale to the point that the difference really matters
[11:06:12] bawNg: the advantages of being able to use ruby outweight the performance benefit of using JS for server-side applications, at least for me
[11:06:47] bawNg: darix: well it's based on threads, not forked processes, so it will use less memory if CoW is not great
[11:07:14] bawNg: new ruby versions should have better CoW support, but it also depends on the implementation of your application
[11:07:44] bawNg: Unicorn's forked processes will give considerably better performance than puma's threads
[11:08:21] bawNg: threading in ruby is not very useful since the GVL means that only one thread can call into the ruby API or extensions at a time
[11:08:30] loveablelobster: has joined #ruby
[11:08:40] bawNg: so there are very few cases where multiple threads can even execute at the same time
[11:08:56] darix: bawNg: discourse on puma. and unicorn for gitlab
[11:08:58] darix: currently
[11:09:31] make: has joined #ruby
[11:10:26] bawNg: I use unicorn to serve haml and slim pages very fast, nginx to serve static files, and then do long polling or websockets to an eventmachine based backend for everything after the page is loaded
[11:11:02] noocx: what framework do you use with ruby?
[11:11:59] bawNg: I use sinatra for web requests and roll almost everything else from scratch myself
[11:12:36] bawNg: if you want a nodejs alternative, look at eventmachine
[11:12:45] bawNg: for any IO-bound application, it is ideal
[11:12:48] mistym: has joined #ruby
[11:12:48] mistym: has joined #ruby
[11:12:50] noocx: thanks, i will
[11:13:16] _aeris_: has joined #ruby
[11:13:56] darix: maybe celluloid?
[11:14:27] bawNg: personally not a fan, but it would work too
[11:14:52] bawNg: you'll probably want to do some research and see what libraries that you need are supported by eventmachine and celluloid, and decide based on that
[11:15:26] bawNg: I end up writing my own eventmachine based libraries from scratch most of the time, or I monkeypatch blocking gems to be EM-based
[11:16:01] bawNg: there are a lot of EM libraries available, but most of the time they don't suit my needs for various reasons
[11:17:27] xuyuheng_: has joined #ruby
[11:18:05] meinside: has joined #ruby
[11:18:09] nicosmaris: has joined #ruby
[11:19:11] jottr_: has joined #ruby
[11:19:41] noocx: https://www.youtube.com/watch?v=WWuDiwr30SI
[11:20:52] lunarkitty7: has joined #ruby
[11:24:00] etehtsea: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[11:27:55] dinfuehr: has joined #ruby
[11:28:21] ur5us: has joined #ruby
[11:32:42] qba73: has joined #ruby
[11:34:28] noocx: has joined #ruby
[11:34:52] dogweather: has joined #ruby
[11:38:22] burgestrand: has joined #ruby
[11:39:50] konsolebox: has joined #ruby
[11:41:19] apparition: has joined #ruby
[11:50:21] konsolebox: has joined #ruby
[11:53:56] workmad3: has joined #ruby
[11:56:19] cdg: has joined #ruby
[11:57:31] stormpack: has joined #ruby
[11:58:09] cdg_: has joined #ruby
[12:01:30] alfiemax: has joined #ruby
[12:03:22] AJA4350: has joined #ruby
[12:04:00] noocx: https://www.youtube.com/watch?v=m0EB4m3EvO8
[12:04:05] bronson: has joined #ruby
[12:06:21] konsolebox: has joined #ruby
[12:08:30] jottr_: has joined #ruby
[12:10:25] xhoy: has joined #ruby
[12:10:40] Psybur__: has joined #ruby
[12:11:03] cdg: has joined #ruby
[12:13:27] dogweather: has joined #ruby
[12:14:08] Ishido: has joined #ruby
[12:15:23] konsolebox: has joined #ruby
[12:17:03] stormpack_: has joined #ruby
[12:17:40] za1b1tsu: has joined #ruby
[12:21:41] mtkd: has joined #ruby
[12:23:34] apparition: has joined #ruby
[12:23:53] soniya29: has joined #ruby
[12:24:57] nicosmaris|2: has joined #ruby
[12:25:45] alfiemax: has joined #ruby
[12:26:25] dogweather: has joined #ruby
[12:28:08] soniya29: Hi, everyone. Is any girl interested for participation in RGSoC 2018?
[12:31:04] konsolebox: has joined #ruby
[12:32:21] careta: has joined #ruby
[12:35:44] soniya29: Hi all, Is anyone interested for participation in RGSoC 2018 ?
[12:35:47] jeffreylevesque: has joined #ruby
[12:36:41] alfiemax: has joined #ruby
[12:36:43] c-c: soniya29: whats that and where is it?
[12:36:53] za1b1tsu: what book I should buy clean ruby or design patterns in ruby?
[12:37:11] nicosmaris|2: has joined #ruby
[12:37:43] John_Ivan: has joined #ruby
[12:37:43] John_Ivan: has joined #ruby
[12:39:11] soniya29: c-c:It's an initiative taken for encouragement of girls participation in opensource-community
[12:39:22] dogweather: has joined #ruby
[12:39:39] alfiemax_: has joined #ruby
[12:40:26] nicosmaris|2: has joined #ruby
[12:41:13] malsagxulo: has joined #ruby
[12:41:24] soniya29: za1b1tsu: online resources are quite good if you prefer them
[12:42:07] ledestin: has joined #ruby
[12:43:01] za1b1tsu: soniya29: true, but I use online resources for a particular problems
[12:43:22] qba73: has joined #ruby
[12:43:53] za1b1tsu: soniya: I love books when I'm interested in a wider subject. Since you dont need 20 tabs with 3 instances of the web broswer opened
[12:44:22] soniya29: za1b1tsu: online resources can be used for just anything.Give it a try and see if you find them useful
[12:45:13] soniya29: za1b1tsu: Ruby-monk and Ruby documentation are awesome infact.
[12:46:01] za1b1tsu: soniya29: thanks
[12:47:14] coderobe: has left #ruby: ()
[12:47:32] soniya29: If anyone wish to participate for RGSoC please do ping me.
[12:48:34] c-c: soniya29: that sounds like a great much needed initiative!
[12:48:55] konsolebox: has joined #ruby
[12:49:16] soniya29: c-c: what I didn't get your point?
[12:50:40] c-c: - open source projects mostly by males
[12:51:55] amatas_: has joined #ruby
[12:53:34] darix: za1b1tsu: both!
[12:54:02] banisterfiend: has joined #ruby
[12:54:10] sepp2k: has joined #ruby
[12:54:42] c-c: soniya29: but you didn't tell me where it is?
[12:55:13] apeiros: has joined #ruby
[12:55:38] VladGh: has joined #ruby
[12:56:03] darix: c-c: probably similar to GSoC?
[12:56:13] Prutheus: has joined #ruby
[12:56:38] Prutheus: Hello. I am in a Rails application with a model which has columns: main, subcat
[12:57:05] c-c: Ok so its a coding camp during the summer
[12:57:21] Prutheus: the data looks like: main, subcat: car, ferrari car, bmw car, porsche food, apple food, banana
[12:57:43] soniya29: c-c: Just go through this,https://railsgirlssummerofcode.org/students/application/
[12:58:19] Prutheus: I want to convert a array of these model data into a hash like: {'car'=>['ferrari', 'bmw', 'porsche'], 'food'=>['apple', 'banana']}
[12:58:22] c-c: heh thanks but I'm kinda past coding camps
[12:58:23] Prutheus: how could I do this?
[12:58:30] soniya29: c-c: quite similar to GSoC
[12:58:41] c-c: soniya29: Ok, was simply curious
[12:59:27] yohji: has joined #ruby
[12:59:36] soniya29: c-c : That's great.
[13:00:47] dogweather: has joined #ruby
[13:02:04] nicosmaris_: has joined #ruby
[13:02:55] c-c: I guess this channel and people like sepp2k and apeiros were my coding camp! B)
[13:06:09] synthroid: has joined #ruby
[13:06:24] amatas_: has joined #ruby
[13:07:08] za1b1tsu: prutheus, everything is hard to read. Put everything in a gist.github.com please
[13:07:11] sergio_101: has joined #ruby
[13:07:42] leitz: has joined #ruby
[13:08:46] alfiemax: has joined #ruby
[13:13:48] dogweather: has joined #ruby
[13:14:06] alfiemax: has joined #ruby
[13:15:18] guille-moe: has joined #ruby
[13:17:54] alfiemax: has joined #ruby
[13:19:49] za1b1tsu: prutheus: https://gist.github.com/bbtdev/6791c7c1fb7ab6b7b1fae3631365c652 I am noob as well, but this seems to work
[13:20:11] s2013: has joined #ruby
[13:20:26] za1b1tsu: oops in pluck have the argument start with *
[13:20:37] za1b1tsu: pluck(*%i[..
[13:21:17] za1b1tsu: there is probably a more efficient way to make the hash
[13:23:48] qba73: has joined #ruby
[13:26:41] burgestrand: has joined #ruby
[13:28:45] careta: has joined #ruby
[13:29:12] ur5us: has joined #ruby
[13:29:22] Cavallari1: has joined #ruby
[13:33:43] shinnya: has joined #ruby
[13:34:49] minastirid1: has joined #ruby
[13:35:23] za1b1tsu: %i[car food].zip(Model.all.pluck(%i[car food]).transpose).to_h
[13:36:06] za1b1tsu: I love this language :)
[13:36:43] darix: za1b1tsu: and now i add another type to the data file. :P
[13:37:13] darix: za1b1tsu: how would you solve it so it can handle any type found in the data file?
[13:37:51] za1b1tsu: hmm let me test
[13:37:56] za1b1tsu: so this works only on ...?
[13:38:05] za1b1tsu: transpose only works with integers?
[13:40:54] za1b1tsu: darix, i tested with string and integer. I don't seem to understand the problem. Can you explain?
[13:42:05] darix: za1b1tsu: new data: car, ferrari car, bmw car, porsche food, apple food, banana pet, bear bet, wolf
[13:42:26] darix: how would this work with your %i[car food].zip(Model.all.pluck(%i[car food]).transpose).to_h ?
[13:42:50] za1b1tsu: attr = %i[attr attr attr]
[13:43:06] za1b1tsu: %i[attr].zip(Model.all.pluck(attr).transpose).to_h
[13:43:14] darix: za1b1tsu: what if you dont know the list of attr up front?
[13:43:33] minastirid1: has left #ruby: ()
[13:44:58] za1b1tsu: darix, I don't know
[13:45:35] za1b1tsu: use pluck_to_hash from a gem
[13:45:43] za1b1tsu: get the keys
[13:46:12] za1b1tsu: darix, could you show me how?
[13:46:57] darix: easiest would be a loop ;)
[13:47:24] bmurt: has joined #ruby
[13:48:24] darix: i havent written it yet.
[13:48:36] darix: My point was more that your code is doing a lot of assumptions
[13:49:48] za1b1tsu: Ok. The person asked on a specific data example, and also when you want a hash, shouldn't you know the keys?
[13:50:54] za1b1tsu: What's the point of a hash
[13:51:39] jaruga: has joined #ruby
[13:52:15] cdg: has joined #ruby
[13:52:46] jeffreylevesque: has joined #ruby
[13:53:22] za1b1tsu: if he wants all they keys, he could to attr = Model.column_names
[13:53:44] DTZUZO: has joined #ruby
[13:54:47] workmad3: has joined #ruby
[13:55:02] darix: za1b1tsu: https://gist.github.com/darix/5bf312167f4bdda7708be4ffba253a2c
[13:56:12] za1b1tsu: wow, some new stuff to read about :D
[13:56:52] alfiemax: has joined #ruby
[13:57:47] madhatter: has joined #ruby
[13:59:12] cdg: has joined #ruby
[14:00:20] alfiemax: has joined #ruby
[14:05:00] bronson: has joined #ruby
[14:06:53] dogweather: has joined #ruby
[14:08:21] Prutheus: hey za1b1tsu thanks for you suggestion but this is not working. the problem is, taht i dont know the main categories yet. here a bpaste of the data: https://bpaste.net/show/cca898ae8a85 I want to get a hash with main as keys and subcats in arrays as values of them.
[14:14:51] darix: prutheus: 1. use the CSV module to parse it. 2. use a loop like https://gist.github.com/darix/5bf312167f4bdda7708be4ffba253a2c to generate your hash
[14:16:33] TomyWork: has joined #ruby
[14:16:39] JusticeFries: has joined #ruby
[14:16:42] guille-moe: has joined #ruby
[14:18:55] aScottishBoat: has joined #ruby
[14:20:15] rwb: has joined #ruby
[14:20:20] tbuehlmann: prutheus, like this? [['Antiques', 'Antiquities'], ['Antiques', 'Architectural & Garden']].each_with_object(Hash.new { |hash, key| hash[key] = [] }) { |array, hash| hash[array.first] << array.last }
[14:21:43] mikkelsen: has joined #ruby
[14:22:04] konsolebox: has joined #ruby
[14:23:57] qba73: has joined #ruby
[14:26:43] mikkelsen: has joined #ruby
[14:26:55] mtkd: has joined #ruby
[14:32:57] burgestrand: has joined #ruby
[14:33:17] apeiros: has joined #ruby
[14:33:55] jaruga: has joined #ruby
[14:34:19] dogweather: has joined #ruby
[14:49:56] apparition: has joined #ruby
[14:53:29] oleo: has joined #ruby
[14:55:58] malsagxulo: has joined #ruby
[14:57:44] pastorinni: has joined #ruby
[14:58:39] Rapture: has joined #ruby
[14:58:47] trautwein: has joined #ruby
[14:58:56] al2o3-cr: has joined #ruby
[14:58:57] moei: has joined #ruby
[15:01:26] yohji: has joined #ruby
[15:02:25] JusticeFries: has joined #ruby
[15:02:32] rippa: has joined #ruby
[15:02:48] qba73: has joined #ruby
[15:04:32] dogweather: has joined #ruby
[15:07:24] guille-moe: has joined #ruby
[15:07:31] Prutheus: tbuehlmann: yeah, great, but how to access the hash now? which variable is it? the variable hash is undefined
[15:14:04] ahrs: has joined #ruby
[15:15:19] alfiemax: has joined #ruby
[15:18:23] bmurt: has joined #ruby
[15:18:27] thejamespinto: has joined #ruby
[15:19:30] c0ncealed: has joined #ruby
[15:19:37] alfiemax_: has joined #ruby
[15:21:01] alfiemax: has joined #ruby
[15:24:43] alfiemax_: has joined #ruby
[15:25:11] gloscombe: has joined #ruby
[15:27:19] ur5us: has joined #ruby
[15:30:29] bmurt: has joined #ruby
[15:33:17] rrutkowski: has joined #ruby
[15:33:38] thejamespinto: has joined #ruby
[15:34:46] ddavisdev: has joined #ruby
[15:35:23] za1b1tsu: has joined #ruby
[15:37:25] lapinferoce: has joined #ruby
[15:40:22] hays: has joined #ruby
[15:40:22] hays: has joined #ruby
[15:40:54] hays: is there a way to use optparse in such a way that it lets me have arguments that are negative?
[15:41:13] hays: foo -a arg1 -5432
[15:41:43] dogweather: has joined #ruby
[15:42:53] Psybur_: has joined #ruby
[15:43:30] rikkipitt: has joined #ruby
[15:45:43] Raffy: has joined #ruby
[15:45:56] nadir: has joined #ruby
[15:46:02] Raffy: has joined #ruby
[15:48:28] mordof: has joined #ruby
[15:49:16] alex``: has joined #ruby
[15:53:23] cdg: has joined #ruby
[15:55:35] workmad3: has joined #ruby
[15:56:58] alfiemax: has joined #ruby
[15:57:47] OyoKooN: has joined #ruby
[15:59:02] dogweather: has joined #ruby
[16:01:45] illsorted: has joined #ruby
[16:03:38] jackjackdripper: has joined #ruby
[16:06:30] bronson: has joined #ruby
[16:08:12] qba73: has joined #ruby
[16:08:31] Emmanuel_Chanel: has joined #ruby
[16:08:47] jottr_: has joined #ruby
[16:13:55] tAn: has joined #ruby
[16:14:01] alex``: has joined #ruby
[16:15:52] kapil___: has joined #ruby
[16:15:58] rikkipitt: has joined #ruby
[16:16:24] John_Ivan: has joined #ruby
[16:16:24] John_Ivan: has joined #ruby
[16:16:29] dogweather: has joined #ruby
[16:16:45] rikkipitt: has joined #ruby
[16:17:37] rikkipitt: has joined #ruby
[16:18:20] rikkipitt: has joined #ruby
[16:18:55] baroquebobcat: has joined #ruby
[16:19:10] rikkipitt: has joined #ruby
[16:20:09] stormpack: has joined #ruby
[16:23:10] baroquebobcat: has joined #ruby
[16:24:48] troys: has joined #ruby
[16:27:42] rabajaj: has joined #ruby
[16:29:00] rikkipitt: has joined #ruby
[16:29:04] soniya29: has joined #ruby
[16:29:19] dogweather: has joined #ruby
[16:30:05] Ishido: has joined #ruby
[16:31:03] rikkipitt: has joined #ruby
[16:33:16] layer8problem: has left #ruby: ("Leaving")
[16:33:52] synthroid: has joined #ruby
[16:34:18] mark_66: has left #ruby: ("PART #elixir-lang :PART #crystal-lang :PONG :leguin.freenode.net")
[16:34:19] alfiemax: has joined #ruby
[16:37:08] plexigras: has joined #ruby
[16:39:02] dionysus69: has joined #ruby
[16:39:13] DTZUZO: has joined #ruby
[16:41:59] dogweather: has joined #ruby
[16:43:18] jetpack_joe: has joined #ruby
[16:47:08] [Butch]: has joined #ruby
[16:48:44] dviola: has joined #ruby
[16:50:17] raynold: has joined #ruby
[16:50:24] roshanavand: has joined #ruby
[16:51:52] Raffy: has joined #ruby
[16:52:41] Axsuul: has joined #ruby
[16:53:01] Raffy: has joined #ruby
[16:55:05] dogweather: has joined #ruby
[16:55:40] soniya29: has joined #ruby
[16:57:46] zipace: has joined #ruby
[17:02:44] jottr_: has joined #ruby
[17:03:19] belmoussaoui: has joined #ruby
[17:07:49] belmoussaoui: has joined #ruby
[17:11:07] cgfbee: has joined #ruby
[17:20:53] dogweather: has joined #ruby
[17:21:57] deathwishdave: has joined #ruby
[17:24:12] alfiemax: has joined #ruby
[17:24:13] guacamole: has joined #ruby
[17:24:13] guacamole: has joined #ruby
[17:28:03] claudiuinberlin: has joined #ruby
[17:30:17] dogweather: has joined #ruby
[17:33:04] yohji: has joined #ruby
[17:33:18] cdg: has joined #ruby
[17:33:30] za1b1tsu: if you had a function that archives data or "unarchives" data depending if it archived or not how would you name it?
[17:33:43] orbyt_: has joined #ruby
[17:34:19] darkhanb: has joined #ruby
[17:38:02] aruns: has joined #ruby
[17:38:29] aruns: Hi, can anyone recommend Ruby version managers for Windows (that do not require Bash on Ubuntu for Windows or Cygwin)?
[17:38:55] aruns: I tend to use RVM but I won't be able to run that without using either of the two.
[17:41:30] justinfaler: has joined #ruby
[17:43:16] Lytol: has joined #ruby
[17:43:22] dogweather: has joined #ruby
[17:48:41] Ishido: has joined #ruby
[17:49:02] qba73: has joined #ruby
[17:49:27] havenwood: aruns: pik is the traditional choice but I'd probably use uru: https://bitbucket.org/jonforums/uru
[17:50:35] havenwood: aruns: though there are some issues with it, I think the Windows Subsystem for LInux (WSL) is the best option on Windows
[17:51:09] havenwood: aruns: https://docs.microsoft.com/en-us/windows/wsl/install-win10
[17:51:35] havenwood: aruns: then you can use RVM since you'd have bash on a native ubuntu kernel
[17:53:16] guille-moe: has joined #ruby
[17:56:25] workmad3: has joined #ruby
[17:56:44] jottr_: has joined #ruby
[17:58:18] guacamole: za1b1tsu toggle_archived
[17:58:46] troulouliou_div2: has joined #ruby
[17:59:37] Ishido: has joined #ruby
[18:00:35] za1b1tsu: guacamole toggle... that is the word I was looking for, lol
[18:00:53] guacamole: za1b1tsu :)
[18:02:22] SeepingN: has joined #ruby
[18:07:02] helpa-bot: has joined #ruby
[18:07:21] bronson: has joined #ruby
[18:07:48] MrBismuth: has joined #ruby
[18:08:40] mozzarella: has joined #ruby
[18:09:01] helpa: has joined #ruby
[18:09:19] dogweather: has joined #ruby
[18:13:21] knightnc: c-c: Thanks, looking into that now. (Sorry for delay in responding)
[18:14:40] jackjackdripper: has joined #ruby
[18:15:16] eckhardt: has joined #ruby
[18:16:51] baroquebobcat: has joined #ruby
[18:21:27] TomyLobo: has joined #ruby
[18:23:46] sanscoeur: has joined #ruby
[18:27:52] dstrunk: has joined #ruby
[18:29:43] kies: has joined #ruby
[18:32:55] jottr_: has joined #ruby
[18:35:25] dogweather: has joined #ruby
[18:36:20] dreamthese: has joined #ruby
[18:36:20] workmad3: has joined #ruby
[18:36:33] dinfuehr: has joined #ruby
[18:41:42] raynold: ahh it's a wonderful day
[18:42:18] dstrunk: has joined #ruby
[18:43:38] desperek: has joined #ruby
[18:48:33] workmad3: has joined #ruby
[18:48:54] Hanmac: has joined #ruby
[18:50:13] levifig: has joined #ruby
[18:52:22] dogweather: has joined #ruby
[18:54:46] s2013: has joined #ruby
[18:55:53] Axsuul: has joined #ruby
[18:56:50] dogweather: has joined #ruby
[18:58:25] jackrandom: has joined #ruby
[19:00:09] nchambers: in a class method, is there any reason why the first arugment can't have a default value?
[19:03:09] Success: has joined #ruby
[19:04:19] darix: nchambers: example?
[19:04:43] nchambers: darix: actually, playing around in irb I figured out the answer to that, but now I have a new question. writing up the example for it now
[19:05:06] inanepenguin: has joined #ruby
[19:06:29] Axsuul: has joined #ruby
[19:06:56] Success: i love ruby <#
[19:06:56] inanepenguin: Should predicate methods be expected/designed to return true/false, or truthiness/falsiness?
[19:07:45] Success: like i never use ruby but i love the ecosystem and stdlib
[19:08:09] darix: nchambers: it works for me tbh
[19:08:15] nchambers: darix: http://ix.io/EFM my question is how to get bar3 to work
[19:08:54] tomphp: has joined #ruby
[19:09:28] audy: has joined #ruby
[19:10:33] darix: that arent class methods
[19:10:42] nchambers: what do you mean?
[19:12:00] nchambers: http://ix.io/EFO looks like one to me
[19:13:47] darix: instance method
[19:13:53] nchambers: oh sorry, instance method
[19:13:57] nchambers: my question still stands though
[19:15:56] jottr_: has joined #ruby
[19:17:21] dogweather: has joined #ruby
[19:18:00] alfiemax: has joined #ruby
[19:19:31] Axsuul: has joined #ruby
[19:23:01] belmoussaoui: has joined #ruby
[19:24:16] Dimik: has joined #ruby
[19:27:55] dogweather: has joined #ruby
[19:28:26] jackrandom: has joined #ruby
[19:28:26] JusticeFries: has joined #ruby
[19:29:25] belmoussaoui: has joined #ruby
[19:30:48] jottr_: has joined #ruby
[19:31:30] darix: nchambers: works for me https://gist.github.com/anonymous/8ae3e773823a74cb6565878af598e363
[19:32:14] mtkd: has joined #ruby
[19:32:28] nchambers: darix: great. my question still stands
[19:32:28] ikopico: has joined #ruby
[19:32:52] darix: nchambers: did you look at the gist?
[19:33:01] darix: try to run it
[19:33:06] randomstrangerb: has joined #ruby
[19:33:19] belmoussaoui: has joined #ruby
[19:33:21] nchambers: yep that works
[19:34:08] nchambers: but that still doesn't explain why mine doesnt' work
[19:34:09] guacamole: nchamers: give the 2nd argument a default value too
[19:34:18] nchambers: guacamole: why is that needed
[19:37:00] guacamole: something about arity and required arguments?
[19:37:27] wilbert: has joined #ruby
[19:37:34] belmoussaoui: has joined #ruby
[19:37:43] void9: has joined #ruby
[19:37:58] nchambers: hmm ok... I'll just use another default argument then. thanks guacamole and darix
[19:37:59] guacamole: it would work if you put the required argument(not supplying a default) after the optional arguments
[19:38:00] conta: has joined #ruby
[19:38:19] void9: total noob here, trying to install spree from their github guide:
[19:38:27] void9: sgm@bittrip:~$ gem 'spree', '~> 3.4.4'
[19:38:29] nchambers: as in, bar(command, *args, arg1=true) ?
[19:38:39] void9: ERROR: While executing gem ... (Gem::CommandLineError)
[19:38:41] void9: Unknown command spree,
[19:38:42] sagax: has joined #ruby
[19:38:43] void9: what am I doing wrong?
[19:39:04] guacamole: nchambers as in bar(arg1=true, *args, command)
[19:39:33] Raffy: void9: put that in your rails gemfile
[19:39:35] nchambers: I'd rather keep command before args, so I'll just keep the extra default argument
[19:39:45] guacamole: np, wish i had better explanations for you
[19:39:53] void9: ohhh, so it's not a command. where would that file be located?
[19:40:11] nchambers: np. its mostly cosmetic anyways, since command will never not have a value
[19:40:27] Raffy: have you created a rails project ?
[19:42:30] baweaver: void9: You might want to go through a Rails or Ruby tutorial
[19:42:43] baweaver: they'll introduce Gemfile among other items you'll need
[19:42:46] Success: has joined #ruby
[19:42:53] baweaver: See the channel topic for the Ruby book list
[19:43:13] baweaver: The rails list was: http://goo.gl/SGklzh
[19:46:56] void9: baweaver: sorry but i don't have a full day to spend on this. just want the 2 commands that will get me going with this app
[19:46:59] Ishido: has joined #ruby
[19:47:06] camilasan: has joined #ruby
[19:47:25] void9: I have installed ruby, and ran gem install rails, it's ruby 2.4 and rails 5.1 on ubuntu
[19:48:59] void9: Add Spree gems to your Gemfile: gem 'spree', '~> 3.4.4'
[19:49:18] void9: is this the project's (from github) Gemfile ?
[19:49:42] baweaver: Look at the Gemfile of a new rails project
[19:50:08] baweaver: or have you made a Rails app yet?
[19:50:52] void9: I have no idea. I just installed ruby, rails, and cloned https://github.com/spree/spree
[19:50:54] tvw: has joined #ruby
[19:51:15] baweaver: you don't need to clone the project
[19:51:51] baroquebobcat: has joined #ruby
[19:51:53] Success: has joined #ruby
[19:52:03] belmoussaoui: has joined #ruby
[19:52:08] baweaver: you're going to balk, but read a Rails tutorial. It'll get you a foundation going to know what you're doing there
[19:52:18] Raffy: i told you
[19:52:21] baweaver: Rails isn't something you can just "give me the two commands" and you'll figure that out over the next hour or two trying.
[19:52:22] Raffy: void9: put that in your rails gemfile
[19:52:41] baweaver: Raffy: they don't know how to make a new rails app, so that won't help quite yet.
[19:52:49] Raffy: I agree with baweaver, i'm sorry but i won't spend hours to explain you
[19:53:15] baweaver: Read the tutorial: http://guides.rubyonrails.org/getting_started.html
[19:54:08] baweaver: you can spend a few hours on that, or a few weeks trying to get commands piecemeal. Trust me when I say you want to read through a tutorial first, it'll save you a lot of headaches.
[19:54:09] baweaver: anyways, off I go.
[19:55:00] Raffy: once rails installed, type rails new app-name that will create you rails project, inside this project there is a file named gemfile
[19:59:25] jaruga: has joined #ruby
[19:59:54] void9: Raffy: thanks, I think I get it now
[20:00:21] bmurt: has joined #ruby
[20:02:28] graft: has joined #ruby
[20:02:28] graft: has joined #ruby
[20:03:52] Success: has joined #ruby
[20:04:25] sergio_101: has joined #ruby
[20:06:32] acovrig: has joined #ruby
[20:07:22] belmoussaoui: has joined #ruby
[20:08:06] bronson: has joined #ruby
[20:08:33] acovrig: I’m trying to encrypt a string with GPGME, when I encrypt I get a strange string, hex maybe? (\x8C\r\x04\x03 for example) - I’d like a string that I’d get from gpg like "-----BEGIN PGP MESSAGE-----“, should I use a different gem?
[20:09:42] jottr_: has joined #ruby
[20:12:30] ur5us: has joined #ruby
[20:15:30] jackjackdripper: has joined #ruby
[20:15:37] guacamole: has joined #ruby
[20:15:37] guacamole: has joined #ruby
[20:16:18] ur5us: has joined #ruby
[20:16:32] mtkd: has joined #ruby
[20:16:43] graft: anyone familiar with Rack::Test? I'm trying to figure out how i can peer into the cookie jar it keeps across requests, to no avail
[20:19:35] GodFather: has joined #ruby
[20:21:16] graft: acovrig: are you using github:ueno/ruby-gpgme?
[20:21:50] acovrig: graft: yes
[20:22:08] belmoussaoui: has joined #ruby
[20:26:22] graft: acovrig: how are you encrypting your string? can you show some code?
[20:26:26] apeiros: has joined #ruby
[20:27:00] acovrig: graft: I tried https://stackoverflow.com/a/17142403 but the file just contains \x**\x**… text, if I dump it to a file, `file` says “PGP RSA encrypted session key” - I’d like a BEGIN PGP MESSAGE … END PGP MESSAGE sorta string I can copy/paste through `gpg --decrypt`
[20:27:58] graft: acovrig: yeah just do GPGME::Crypto.new(armor: true) and it should do it
[20:28:01] shinnya: has joined #ruby
[20:29:21] acovrig: graft: that did it, thanks :D
[20:32:21] baroquebobcat: has joined #ruby
[20:37:27] zanoni: has joined #ruby
[20:37:29] jottr_: has joined #ruby
[20:38:38] sameerynho: has joined #ruby
[20:39:16] orbyt_: has joined #ruby
[20:40:19] alfiemax: has joined #ruby
[20:40:33] inanepenguin: has joined #ruby
[20:43:00] graft: to answer my own question, if anyone is interested, you can get the cookie with rack_mock_session.cookie_jar
[20:43:00] jackjackdripper1: has joined #ruby
[20:43:28] jenrzzz: has joined #ruby
[20:43:28] jenrzzz: has joined #ruby
[20:44:15] belmoussaoui: has joined #ruby
[20:46:53] s3nd1v0g1us: has joined #ruby
[20:52:31] jetpack_joe: has joined #ruby
[20:55:22] pastorinni: has joined #ruby
[20:56:37] za1b1tsu: has joined #ruby
[20:57:56] apeiros: has joined #ruby
[20:59:46] Success: has joined #ruby
[21:01:02] myarta: has joined #ruby
[21:02:07] alfiemax: has joined #ruby
[21:04:11] camilasann: has joined #ruby
[21:04:22] myarta: #join ruby-lang
[21:05:10] myarta: has joined #ruby
[21:05:51] myarta: I'm having a hard time figuring out how to split a string that is returned from Mysql2 gem with \n in it as two literal characters. Tried different combinations of escaping but can't see to get it to recognise: http://dpaste.com/0D3182W
[21:05:56] myarta: any ideas? thanks in advance
[21:07:29] belmoussaoui: has joined #ruby
[21:08:09] apeiros: myarta: not quite sure I follow. you want e.g. from "foo\nbar" to get ["foo", "bar"]?
[21:08:14] jottr_: has joined #ruby
[21:08:23] apeiros: also #ruby-lang no longer exists, it's just #ruby now ;-)
[21:09:05] myarta: apeiros that is correct
[21:09:09] bronson: has joined #ruby
[21:09:18] apeiros: >> "foo\nbar".split("\n")
[21:09:19] ruby[bot]: apeiros: # => ["foo", "bar"] (https://eval.in/942188)
[21:09:20] myarta: hah thanks. i realized i both did my command for that wrong....and that the warning to do that was from 2009
[21:11:16] pastorin_: has joined #ruby
[21:12:21] myarta: apeiros AHA. That was it. Double quotes not single quotes and don't escape the backslash
[21:12:57] apeiros: yeah, '\n' == "\\n", as in, literal backslash followed by the character "n" :)
[21:14:09] lcarlson: has joined #ruby
[21:14:15] jottr_: has joined #ruby
[21:15:13] baweaver: either that or string.lines
[21:15:22] baweaver: >> "foo\nbar".lines
[21:15:23] ruby[bot]: baweaver: # => ["foo\n", "bar"] (https://eval.in/942189)
[21:15:25] myarta: +apeiros Thank you, Basileus Pyrrhos :)
[21:15:37] baweaver: though that leaves newlines in there
[21:16:02] cdg: has joined #ruby
[21:16:39] al2o3-cr: has joined #ruby
[21:17:01] apeiros: my greek is rather limited, but those two seem to be names?
[21:17:24] Success: has joined #ruby
[21:19:50] nowhere_man: has joined #ruby
[21:20:18] myarta: apeiros Oh, so is mine. I thought your name was the ancient form of the greek kingdom of the Epirotes, a rival of Rome during the war that gives us the phrase Pyrric Victory
[21:20:50] apeiros: ah no, it's supposed to be the male form of apeiron. the original matter from which everything was created.
[21:20:51] myarta: apeiros So I was just saying aha, I see your obscure reference and appreciate it! Except I think I read one into it that wasn't there.
[21:20:57] apeiros: (of course it also has its own meanings)
[21:21:27] apeiros: that nick is now >20y old. I'm old.
[21:21:32] apeiros: ACTION sobs silently into the night
[21:21:53] baweaver: apeiros: want me to drive in the knife?
[21:22:08] apeiros: et tu, baweavere?
[21:22:11] baweaver: That nick isn't much older than I am
[21:22:18] belmoussaoui: has joined #ruby
[21:22:19] apeiros: (what the heck is the vocative of baweaver?)
[21:22:56] baweaver: (close enough)
[21:23:28] myarta: ah yeah something different then. same spelling
[21:24:26] spartacus: has joined #ruby
[21:24:35] spartacus: No, I AM Spartacus
[21:25:31] eckhardt: has joined #ruby
[21:26:11] Rapture: has joined #ruby
[21:26:21] tvw: has joined #ruby
[21:26:56] JakeP: has joined #ruby
[21:27:58] apeiros: awkward silence
[21:30:50] tejasvi5: has joined #ruby
[21:35:56] jenrzzz: has joined #ruby
[21:35:56] jenrzzz: has joined #ruby
[21:37:29] tejasvi5: Hello, everyone. I'm new around here.
[21:38:23] tejasvi5: Trying to figure how this works and what the channel is about
[21:38:40] apeiros: it's about the ruby programming language
[21:38:41] tejasvi5: Could anyone please help
[21:39:02] guacamole: ask ruby questions here, or provide ruby answers here
[21:39:09] JakeP: has joined #ruby
[21:39:47] apeiros: tejasvi5: with what specifically do you need help?
[21:40:40] tejasvi5: @guacamole Thank you
[21:41:13] pastorinni: has joined #ruby
[21:41:35] tejasvi5: I do not need help with anything specific. Just exploring, trying to know how these work
[21:43:04] Raffy: https://www.ruby-lang.org/en/documentation/quickstart/
[21:43:55] tejasvi5: Although I would like some pointers on how to start contributing to FOSS. If this is the right place for such guidance. I am unsure.
[21:45:46] tejasvi5: Hello? Is anyone there?
[21:47:33] guacamole: tejasvi5 https://opensource.guide/how-to-contribute/
[21:48:37] tomphp: has joined #ruby
[21:51:19] klaas: has joined #ruby
[21:52:23] tejasvi5: Thank you, again
[21:52:55] tejasvi5: That was a lot to take at once but sure helps
[21:54:28] guacamole: tejasvi5 a lot of open source projects will have a contributing guide, or guidelines, so check if the project you want to work on has one
[21:55:23] tejasvi5: Oh. All right.
[21:55:52] tejasvi5: I'm unsure about which one to pick or which one I can contribute to
[21:56:03] SCHAPiE: has joined #ruby
[21:56:33] tejasvi5: Do you any where beginners can do good?
[21:56:46] guacamole: tejasvi5 pick one that is interesting to you! maybe that aligns with a hobby you have
[21:57:56] guacamole: tejasvi5 a lot of people get started contributing with writing documentation
[21:58:31] tejasvi5: That should be boring, no?
[21:58:51] LocaMocha: has joined #ruby
[22:02:00] jottr_: has joined #ruby
[22:02:23] guacamole: maybe, maybe not. either way its super helpful. most of my open source contributions are clarifying docs
[22:02:48] guacamole: if nothing else it'll teach you how to fork a project and make a PR etc.
[22:02:54] guacamole: you can learn the "flow"
[22:07:54] Raffy: and by writing doc you learn the language and you can then contribute to it ;)
[22:10:05] bronson: has joined #ruby
[22:12:49] belmoussaoui: has joined #ruby
[22:13:14] jottr_: has joined #ruby
[22:13:49] weaksauce: tejasvi5 i added a feature to firefox because it scratched an itch. that's pretty much the way it works. find something you desire to have or a bug that needs fixing and fix it
[22:14:26] Azure: has joined #ruby
[22:14:52] LastWhisper____: has joined #ruby
[22:19:50] Flashynuff: has joined #ruby
[22:21:18] mtkd: has joined #ruby
[22:22:53] Success: has joined #ruby
[22:25:23] tejasvi5: Thank you so much. weak Sauce, Raffy and guacamole
[22:25:41] rwb: has joined #ruby
[22:25:55] tejasvi5: And sorry, I'm so noob I don't even know how to tag the nicks.
[22:27:07] Asher: has joined #ruby
[22:30:46] jenrzzz_: has joined #ruby
[22:32:03] belmoussaoui: has joined #ruby
[22:33:12] kapil___: has joined #ruby
[22:37:07] bawNg: tejasvi5: just like that
[22:38:29] tejasvi5: bawNg: like this?
[22:39:01] bawNg: yes, it's up to each person to setup their IRC client to highlight their name
[22:40:06] knight_: has joined #ruby
[22:42:20] knightnc: has joined #ruby
[22:43:04] knight-: has joined #ruby
[22:44:24] bkxd: has joined #ruby
[22:44:39] bawNg: wait, how does my actuator gem have 492 downloads already after less than 3 days on rubygems? I'd expect very few people to even have a use case for it, and out of those none would have even know that it exists yet
[22:44:52] hahuang65: has joined #ruby
[22:45:25] bkxd: has joined #ruby
[22:46:02] guacamole: bawNg there are bots that download them all
[22:46:14] bawNg: that's a lot of bots
[22:46:28] bkxd: has joined #ruby
[22:47:29] bkxd: has joined #ruby
[22:48:06] guacamole: bots love gems
[22:48:18] bkxd: has joined #ruby
[22:48:36] DTZUZO: has joined #ruby
[22:49:38] bkxd: has joined #ruby
[22:50:59] jenrzzz: has joined #ruby
[22:50:59] jenrzzz: has joined #ruby
[22:54:13] hipertracker: has joined #ruby
[22:57:04] hipertracker: If minitest is a part of Ruby standard library, why it has been removed from the list? It can be found for Ruby 2.1 https://ruby-doc.org/stdlib-2.1.0/, but not for Ruby 2.2, 2.3, or 2.5 https://ruby-doc.org/stdlib-2.5.0/. Why?
[22:57:58] havenwood: hipertracker: Yes, it
[22:58:28] havenwood: is part of the stdlib, it just has been gemified.
[22:59:09] havenwood: hipertracker: It's a "bundled" gem (no relation to bundler). So it ships with Ruby but you can uninstall it unlike most of the sdtlib.
[22:59:13] guacamole: hipertracker https://redmine.ruby-lang.org/projects/ruby/wiki/StdlibGem
[22:59:17] havenwood: hipertracker: https://stdgems.org/
[22:59:31] a1ph4g33k: has joined #ruby
[22:59:32] randomstrangerb: has joined #ruby
[22:59:48] hipertracker: I see. Thanks
[23:00:10] camfowler: has joined #ruby
[23:01:50] camfowler: has joined #ruby
[23:04:46] pastorin_: has joined #ruby
[23:10:42] eckhardt: has joined #ruby
[23:10:46] bronson: has joined #ruby
[23:13:34] jottr_: has joined #ruby
[23:15:45] Success: has joined #ruby
[23:18:20] cdg: has joined #ruby
[23:18:22] guardianx: has joined #ruby
[23:19:03] alfiemax: has joined #ruby
[23:21:34] jenrzzz: has joined #ruby
[23:25:45] bkxd_: has joined #ruby
[23:27:45] bkxd_: has joined #ruby
[23:28:41] jenrzzz: has joined #ruby
[23:28:41] jenrzzz: has joined #ruby
[23:30:25] alfiemax: has joined #ruby
[23:35:49] Ishido: has joined #ruby
[23:38:44] wilbert: has joined #ruby
[23:39:45] rrutkowski: has joined #ruby
[23:41:22] guacamole: has joined #ruby
[23:43:24] rrutkowski: has joined #ruby
[23:45:51] bkxd: has joined #ruby
[23:53:45] Asher: has joined #ruby
[23:56:24] BTRE: has joined #ruby