« Back to channel list

#ruby - 13 June 2018

« Back 1 day Forward 1 day »
[00:00:02] havenwood: Kensei: Exactly.
[00:00:15] eckhardt: has joined #ruby
[00:00:30] havenwood: Kensei: You can just monkey patch for the behaviour you want, for better or worse: https://gist.github.com/havenwood/025435ccb893a86920f32820e0b50b6b
[00:00:38] chouhoul_: has joined #ruby
[00:00:50] Kensei: havenwood: good to know. thanks.
[00:00:56] havenwood: Kensei: you're welcome
[00:01:20] Kensei: too bad there isn't a Hash#dig_values :-)
[00:01:25] havenwood: Kensei: Maybe add to_json to Regexp in a refinement?
[00:01:43] havenwood: Kensei: would that give you back the keys? :-O
[00:01:45] chouhoul_: has joined #ruby
[00:02:27] Kensei: nah, i was just noodling. to handle deep structures, i gotta walk 'em myself.
[00:02:47] chouhoul_: has joined #ruby
[00:03:51] chouhoulis: has joined #ruby
[00:04:18] Kensei: that monkey patch would need a little more work to handle embedded slashes, but i could see doing it.
[00:05:01] chouhoul_: has joined #ruby
[00:06:03] chouhoul_: has joined #ruby
[00:07:16] chouhoul_: has joined #ruby
[00:07:21] cthulchu: File.read() relative?
[00:08:24] chouhoul_: has joined #ruby
[00:09:25] chouhoulis: has joined #ruby
[00:09:41] herbmillerjr: has joined #ruby
[00:10:02] cthulchu: this is why I always try to avoid FS manipulations
[00:10:14] cthulchu: it's awkward AF cuz they never create neat methods
[00:10:29] cthulchu: they consider it "low-level", so no comfortable handles
[00:10:29] chouhoul_: has joined #ruby
[00:11:36] chouhoul_: has joined #ruby
[00:12:35] aviraldg: has joined #ruby
[00:12:35] Hanma[m]: has joined #ruby
[00:12:35] bascht: has joined #ruby
[00:12:35] Giphy[m]: has joined #ruby
[00:12:36] jonjits[m]: has joined #ruby
[00:12:36] luna_x[m]: has joined #ruby
[00:12:36] iceskins[m]: has joined #ruby
[00:12:36] redlegion[m]: has joined #ruby
[00:12:36] haylon_: has joined #ruby
[00:12:36] velu_aon[m]: has joined #ruby
[00:12:36] KevinMGranger: has joined #ruby
[00:12:36] turt2live: has joined #ruby
[00:12:42] zalipuha[m]: has joined #ruby
[00:12:43] chouhoul_: has joined #ruby
[00:13:49] chouhoul_: has joined #ruby
[00:13:51] cthulchu: have to use some crap like this now: JSON.parse(File.read(File.dirname(__FILE__)+'/analytics_tests.json'))
[00:14:56] chouhoulis: has joined #ruby
[00:14:58] al2o3-cr: using json/add/* is ruby specific
[00:15:07] havenwood: &ri IO.read
[00:15:23] cthulchu: so having require_relative was important enough for implementation, but read_relative wasn't
[00:15:34] gigetoo: has joined #ruby
[00:15:56] chouhoul_: has joined #ruby
[00:15:58] cthulchu: would be cool to use require.relative and have the relative method used for all FS-related stuff
[00:16:53] al2o3-cr: no, and no.
[00:17:03] chouhoul_: has joined #ruby
[00:18:21] chouhoul_: has joined #ruby
[00:19:08] al2o3-cr: cthulchu: and use File.join also
[00:19:17] al2o3-cr: or Pathname
[00:19:19] chouhoul_: has joined #ruby
[00:20:24] chouchen_: has joined #ruby
[00:20:54] halt: has joined #ruby
[00:21:24] chouhoulis: has joined #ruby
[00:21:31] cthulchu: also, saying no with no reason is useless
[00:22:33] chouhoul_: has joined #ruby
[00:22:50] al2o3-cr: why wouldn't you. you've used the rest then use String#+ when File.join is safer
[00:23:00] ramfjord: has joined #ruby
[00:23:24] eam: cthulchu: you should use File.join because it will work on platforms where / isn't the directory separator
[00:23:31] havenwood: chamunks: ::read is already relative.
[00:23:33] eam: it's a fairly minor concern
[00:23:39] havenwood: cthulchu: File.expand_path __dir__, 'analytics_tests.json'
[00:23:44] chouhoul_: has joined #ruby
[00:24:02] havenwood: cthulchu: ::read is already relative.
[00:24:20] cthulchu: then why do I need to expand path?
[00:24:24] cthulchu: it's in this directory
[00:24:41] chouhoul_: has joined #ruby
[00:24:41] havenwood: cthulchu: You don't need to do any of this. I'm pointing out if you want a full path, that's how.
[00:24:44] eam: just add every directory on your system to $: problem solved
[00:24:46] darkhanb: has joined #ruby
[00:25:04] cthulchu: and it's not relative
[00:25:30] havenwood: cthulchu: It is. ¯\_(ツ)_/¯
[00:25:50] chouhoul_: has joined #ruby
[00:26:27] cthulchu: it may be relative to something else
[00:26:36] cthulchu: It doesn't even bother to give me the path in the error
[00:26:51] cthulchu: not to the file I try to read from
[00:27:00] chouhoulis: has joined #ruby
[00:27:19] cthulchu: it's not relative to the file I have the File.read in
[00:27:40] cthulchu: I don't run it directly though. it's been required many times before fired
[00:28:06] chouhoul_: has joined #ruby
[00:28:40] kmurphy4: has joined #ruby
[00:28:52] cthulchu: this is my error: /Users/Shared/repos/qa_automation/lib/analytics/init.rb:3:in `read': No such file or directory @ rb_sysopen - analytics_tests.json (Errno::ENOENT)
[00:29:13] chouhoul_: has joined #ruby
[00:29:16] cthulchu: and this is the 3d line: JSON.parse(File.read('analytics_tests.json'))
[00:29:55] cthulchu: this is terrible
[00:30:14] cthulchu: every language just fails to make FS handlers comfortable
[00:30:16] chouhoul_: has joined #ruby
[00:30:22] cthulchu: even errors are awkward
[00:30:33] zachk: has joined #ruby
[00:30:37] jrich523: powershell does it pretty well :D
[00:30:48] cthulchu: well it's not a language
[00:30:55] al2o3-cr: >> SystemCallError.new(Errno::ENOENT::Errno).message
[00:30:56] ruby[bot]: al2o3-cr: # => "No such file or directory" (https://eval.in/1020178)
[00:31:03] havenwood: eam: PATH="$(mdfind 'kMDItemContentType == public.folder' | tr "\n" ":")"
[00:31:16] jrich523: no more than anything else you're working with
[00:31:19] chouhoul_: has joined #ruby
[00:31:39] cthulchu: that's why I didn't want to use the awkward FS handler
[00:31:45] kt: has joined #ruby
[00:31:46] cthulchu: it's always bad with io
[00:31:58] cthulchu: end up writing wrappers around that crap
[00:32:23] sytherax: has joined #ruby
[00:32:24] chouhoulis: has joined #ruby
[00:32:25] cthulchu: anyhow, havenwood, it is NOT relative
[00:32:31] cthulchu: don't mislead peeps
[00:33:31] chouhoul_: has joined #ruby
[00:34:36] chouhoul_: has joined #ruby
[00:35:17] eam: cthulchu: read is most certainly relative
[00:35:29] eam: cmon now, we're willing to teach you ruby but be nice
[00:35:40] cthulchu: look at my paste
[00:35:48] cthulchu: it's obvious that it's not
[00:35:49] chouhoul_: has joined #ruby
[00:35:58] eam: in fact, I'm not sure ruby has access to the set of non-relative filesystem access calls on linux
[00:36:22] al2o3-cr: eam: it doesn't at all.
[00:36:36] cthulchu: I'm sure it does here
[00:36:50] chouhoul_: has joined #ruby
[00:36:51] al2o3-cr: not even on bsd
[00:37:03] eam: no, it definitely does not on a mac-- I don't think OSX even implements openat()
[00:37:56] eam: like, at least linux implements non relative calls but OSX can't do it unless you're going to do something like write your own kernel module
[00:38:00] chouhoulis: has joined #ruby
[00:38:30] al2o3-cr: neither does.
[00:39:04] chouhoul_: has joined #ruby
[00:39:05] eam: al2o3-cr: not linux?
[00:39:16] eam: or you mean inside ruby
[00:39:31] eam: linux certainly has non relative calls
[00:39:33] eam: it's openat()
[00:39:47] cthulchu: maybe it's relative to the project, not to this folder?
[00:39:50] eam: you pass an extra parameter which is the explicit relative directory
[00:39:52] cthulchu: what is it relative to?
[00:39:54] eam: useful for threads!
[00:39:58] cthulchu: where is the base folder?
[00:40:06] cthulchu: hell it's awkward
[00:40:09] chouhoul_: has joined #ruby
[00:40:09] eam: cthulchu: it's relative to your process current working directory
[00:40:27] cthulchu: it's different from require_relative
[00:40:51] cthulchu: okay, how do I make it print my current working directory?
[00:40:56] cthulchu: I want to debug it
[00:40:58] al2o3-cr: eam: corrected it does, wfm
[00:41:01] havenwood: cthulchu: I didn't mislead you, haha. I'm not that nefarious.
[00:41:06] havenwood: cthulchu: Dir.pwd
[00:41:10] chouhoul_: has joined #ruby
[00:41:28] eam: not *quite* that nefarious ... currently
[00:41:35] cthulchu: what does it mean?
[00:41:37] al2o3-cr: present working directory
[00:42:02] havenwood: cthulchu: man pwd
[00:42:20] havenwood: chamunks: echo $PWD
[00:42:23] chouhoul_: has joined #ruby
[00:42:26] havenwood: chamunks: sorry for the misstells
[00:42:29] havenwood: I can't type cthulchu
[00:42:43] havenwood: cthulchu: PWD Logical current working directory.
[00:43:23] chouhoulis: has joined #ruby
[00:44:32] al2o3-cr: little bash tip; !* reuses last command args.
[00:44:39] chouhoul_: has joined #ruby
[00:44:55] havenwood: pwd is usually in PATH or it's a builtin as well in zsh
[00:45:11] cthulchu: it's project dir
[00:45:20] cthulchu: and it prints it absolutely
[00:45:25] cthulchu: starting from /
[00:45:41] chouhoul_: has joined #ruby
[00:45:46] cthulchu: so it is different from require_relative indeed
[00:45:57] cthulchu: require_relative is this file's folder
[00:46:02] havenwood: cthulchu: compare with __dir__
[00:46:12] cthulchu: well I know __dir__
[00:46:17] cthulchu: that's what I used
[00:46:24] al2o3-cr: eg; blah -lHas; ls !*
[00:46:25] havenwood: cthulchu: nerp
[00:46:33] havenwood: cthulchu: require_relative is like:
[00:46:34] havenwood: absolute_path = File.absolute_path file, __dir__
[00:46:39] havenwood: realpath = File.realpath "#{absolute_path.chomp '.rb'}.rb"
[00:46:43] chouhoul_: has joined #ruby
[00:46:50] cthulchu: yes, __dir__ is what require_relative does
[00:46:58] havenwood: cthulchu: no, no it isn't quite
[00:47:01] havenwood: cthulchu: see above
[00:47:22] al2o3-cr: what is this shit storm
[00:47:48] sytherax: has joined #ruby
[00:47:50] chouhoul_: has joined #ruby
[00:48:06] cthulchu: Dir.pwd is: /Users/Shared/repos/qa_automation
[00:48:06] cthulchu: __dir__ is: /Users/Shared/repos/qa_automation/lib/analytics
[00:48:28] cthulchu: tbh, I don't trust .pwd
[00:48:34] cthulchu: it looks weird
[00:48:41] cthulchu: no idea where it gets .pwd from
[00:48:42] havenwood: cthulchu: Yeah, that's not surprising. Hahaha. You have trust issues!
[00:48:43] al2o3-cr: analtics is relative to lib
[00:48:54] chouhoulis: has joined #ruby
[00:49:05] havenwood: So far havenwood and pwd are liars. ¯\_(ツ)_/¯
[00:49:08] cthulchu: __dir__ seems to be a lot more reliable.
[00:49:12] al2o3-cr: simple as that.
[00:49:46] cthulchu: I'm gonna go with that, I guess. I think .pwd is project's root defined somewhere in this context.
[00:50:03] chouhoul_: has joined #ruby
[00:50:12] cthulchu: whereas __dir__ is lower
[00:50:33] havenwood: cthulchu: The current working directory and the directory of the file from where the method is called are just different things.
[00:50:42] havenwood: cthulchu: One isn't *wrong*.
[00:50:53] cthulchu: yeah, I see now
[00:51:01] cthulchu: just didn't expect it to take that by default
[00:51:14] chouhoul_: has joined #ruby
[00:51:19] cthulchu: makes no sense to me at all, especially after require_retive being so different
[00:51:41] cthulchu: so it is relative, but in a way that is not intuitive.
[00:51:46] havenwood: cthulchu: So if you're cding around doing things, when you load a file you expect it to be relative to the current working directory.
[00:51:55] al2o3-cr: cthulchu: require_relative is requiring a file realtive to where you are.
[00:52:03] havenwood: cthulchu: On the other hand, when you require a source file, you expect it to be relative to the current file.
[00:52:07] ramfjord: has joined #ruby
[00:52:11] chouhoul_: has joined #ruby
[00:52:19] cthulchu: I don't know. I kinda expect that in both cases
[00:52:24] havenwood: cthulchu: It may not seem intuitive to you, but it is sensible.
[00:52:26] cthulchu: but I guess that's just style
[00:52:42] cthulchu: thanks for clarifying that
[00:53:06] cthulchu: also it's really misleading that the error doesn't print the absolute path
[00:53:12] cthulchu: makes it really difficult to debug
[00:53:18] chouhoul_: has joined #ruby
[00:53:24] cthulchu: when you don't know what path it uses by default
[00:54:04] Nicmavr: has joined #ruby
[00:54:28] chouhoulis: has joined #ruby
[00:55:34] chouhoul_: has joined #ruby
[00:56:04] al2o3-cr: cthulchu: how helpful were we on a scale of 1..100?
[00:56:32] chouhoul_: has joined #ruby
[00:56:35] al2o3-cr: you have to answer in a ruby expression lol
[00:57:39] chouhoul_: has joined #ruby
[00:57:40] eam: >> (1..100).to_a.sample
[00:57:41] ruby[bot]: eam: # => 86 (https://eval.in/1020179)
[00:57:44] eam: not bad
[00:58:40] za1b1tsu: has joined #ruby
[00:58:45] chouhoul_: has joined #ruby
[00:59:57] chouhoulis: has joined #ruby
[01:00:53] QCF: has joined #ruby
[01:01:01] chouhoul_: has joined #ruby
[01:01:24] ruby[bot]: al2o3-cr: # => "/tmp/execpad-fd7b9df55ea1" (https://eval.in/1020180)
[01:01:39] al2o3-cr: >> __FILE__
[01:01:40] ruby[bot]: al2o3-cr: # => "/tmp/execpad-a9f03eaaa6d8/source-a9f03eaaa6d8" (https://eval.in/1020181)
[01:02:14] chouhoul_: has joined #ruby
[01:02:19] al2o3-cr: >> RUBY_VERSION
[01:02:20] ruby[bot]: al2o3-cr: # => "2.3.0" (https://eval.in/1020182)
[01:02:52] al2o3-cr: is this bot ever gonna get upgraded???
[01:03:14] chouhoul_: has joined #ruby
[01:04:12] chouhoul_: has joined #ruby
[01:04:13] al2o3-cr: >> Etc.uname
[01:04:13] ruby[bot]: al2o3-cr: # => uninitialized constant Etc (NameError) ...check link for more (https://eval.in/1020183)
[01:04:54] al2o3-cr: >> require 'etc'; Etc.uname
[01:04:55] ruby[bot]: al2o3-cr: # => {:sysname=>"Linux", :nodename=>"ev1.eval.in", :release=>"2.6.32-41-generic-pae", :version=>"#94-Ubun ...check link for more (https://eval.in/1020184)
[01:05:09] regedit: has joined #ruby
[01:05:20] al2o3-cr: that's an old kernel.
[01:05:28] chouhoulis: has joined #ruby
[01:05:56] al2o3-cr: >> require 'etc'; Etc.nprocessors
[01:05:57] ruby[bot]: al2o3-cr: # => 1 (https://eval.in/1020185)
[01:06:33] chouhoul_: has joined #ruby
[01:07:02] al2o3-cr: >> require 'etc'; Etc.sysconf Etc::SC_NPROCESSORS_ONLN
[01:07:03] ruby[bot]: al2o3-cr: # => (https://eval.in/1020186)
[01:07:38] chouhoul_: has joined #ruby
[01:08:09] al2o3-cr: forbidden access to /proc/stat so the former is a syscall.
[01:08:39] chouhoul_: has joined #ruby
[01:09:49] chouhoul_: has joined #ruby
[01:10:38] zenspider: eam: rand 1..100
[01:10:52] chouhoulis: has joined #ruby
[01:10:53] cschneid: has joined #ruby
[01:11:47] eam: oh well that's certainly shorter
[01:11:59] chouhoul_: has joined #ruby
[01:12:11] orbyt_: has joined #ruby
[01:12:38] wontruefree: has joined #ruby
[01:13:03] chouhoul_: has joined #ruby
[01:14:13] chouhoul_: has joined #ruby
[01:15:14] chouhoul_: has joined #ruby
[01:16:23] chouhoulis: has joined #ruby
[01:17:00] al2o3-cr: >> 20.times.map { srand / srand }.inject :+
[01:17:01] ruby[bot]: al2o3-cr: # => 51 (https://eval.in/1020190)
[01:17:27] chouhoul_: has joined #ruby
[01:17:40] al2o3-cr: well it's more than 50%
[01:17:45] zenspider: !fix chouhoul_
[01:18:27] zenspider: !connection chouhoul_
[01:18:27] ruby[bot]: +bbbb chouhoulis!*@*$#ruby-fix-your-connection chouhoul_!*@*$#ruby-fix-your-connection chouhou__!*@*$#ruby-fix-your-connection chouho___!*@*$#ruby-fix-your-connection
[01:18:28] ruby[bot]: +bbb chou_____!*@*$#ruby-fix-your-connection chouh____!*@*$#ruby-fix-your-connection *!*@50-207-64-46-static.hfc.comcastbusiness.net$#ruby-fix-your-connection
[01:18:28] ruby[bot]: ruby[bot] kicked chouho___: join/part detected
[01:18:29] ruby[bot]: ruby[bot] kicked chouh____: join/part detected
[01:18:29] ruby[bot]: ruby[bot] kicked chouhoulis: join/part detected
[01:18:29] ruby[bot]: ruby[bot] kicked chouhoul_: join/part detected
[01:18:52] al2o3-cr: zenspider: you been eating anything good lately?
[01:18:57] zenspider: man... you don't need 6 logins... let alone 6 BAD logins
[01:19:27] zenspider: al2o3-cr: eating? um. I've mostly been focusing on killer steaks
[01:19:42] al2o3-cr: zenspider: you like chinese?
[01:19:43] zenspider: but I also made a nice swimming rama with a impromptu peanut sauce
[01:20:13] zenspider: I don't like american chinese... but we have a couple pretty nice places here
[01:20:19] al2o3-cr: sounds nice?
[01:20:52] zenspider: this one place does their dry saute greenbeans soooo good. I can't replicate it and I think it's mostly a matter of having a million BTUs
[01:21:22] al2o3-cr: zenspider: check this guy out; https://www.youtube.com/watch?v=ni65ra6ZRLE
[01:21:23] zenspider: I've gotten close once... but their consistency is absurd
[01:21:45] al2o3-cr: this guy is awesome.
[01:21:59] al2o3-cr: uk style chippy/chinese
[01:22:44] al2o3-cr: check all is other dishes out there'll be something you'll like :)
[01:22:48] zenspider: I really REALLY miss our hakka chinese restaurant. it was one of 2 or 3 in the US
[01:23:09] chat_: has joined #ruby
[01:23:51] al2o3-cr: zenspider: do you get salt and pepper/chilli in us?
[01:24:34] al2o3-cr: really tasty.
[01:25:02] al2o3-cr: khoan is based in hull uk. amazing.
[01:25:12] zenspider: I really should get a chinese cleaver
[01:25:28] al2o3-cr: zenspider: seriously invest in one.
[01:26:15] al2o3-cr: i think it's about 13kw whatever that is in btu's
[01:26:40] zenspider: I have a gas range... I just don't have a jet engine attached to it.
[01:27:06] al2o3-cr: haha i know right, that thing boils water in seconds ;)
[01:27:08] zenspider: serious thai and chinese places here do. I'll never replicate the level of blistering they can do to a green bean
[01:27:57] al2o3-cr: zenspider: you'll like this dish then; https://www.youtube.com/watch?v=JFLD2LeOcGk
[01:29:03] karapetyan: has joined #ruby
[01:30:14] zenspider: now I'm humbry
[01:30:23] chat: has joined #ruby
[01:30:29] eam: I have a 500k BTU torch that I bet would heat a wok nicely
[01:30:38] eam: can't use it indoors though
[01:31:05] eam: my best range burner is like 20k BTU
[01:32:22] al2o3-cr: eam: how btu's you reckon that's kicking out?
[01:33:10] sytherax: has joined #ruby
[01:33:40] al2o3-cr: 45k btu wow
[01:34:19] al2o3-cr: and that torch of yours, where did you get it?
[01:34:35] eam: it's this one https://www.amazon.com/gp/product/B00282LP34/
[01:35:20] al2o3-cr: so i bet you don't braze with that then lol ;)
[01:35:37] eam: when I turn it on full it sounds like a jet engine and it lifts my hair on end and creates a huge upward draft
[01:35:53] al2o3-cr: haha no shit lol
[01:36:00] eam: I used to use it to torch weeds in my side yard but now I use it to instantly start my charcoal bbq
[01:36:10] eam: ready to use coals in about 20s
[01:36:24] al2o3-cr: i need to get one
[01:36:30] johnny56_: has joined #ruby
[01:36:32] eam: they're fantastic
[01:37:19] al2o3-cr: :( temporarily out of em
[01:38:44] eam: here's a dude using one for weed control https://www.youtube.com/watch?v=125L5E3N7wU#t=1m
[01:38:47] al2o3-cr: but that khoan vong is the best thing sliced bread, i'm addicted to watching his uploads.
[01:39:55] al2o3-cr: shit, that things insane
[01:41:10] al2o3-cr: to incinerate chlorophyl like that wow
[01:41:27] yokel: has joined #ruby
[01:43:51] SeepingN: has joined #ruby
[01:45:13] al2o3-cr: zenspider: i've tried a few of his recipies and there awesome; especially char siu pork, salt and pepper anything, szechuan chicken and black bean sauce dishes.
[01:45:38] al2o3-cr: and don't be scared of using msg.
[01:50:31] workmad3: has joined #ruby
[01:51:26] sytherax: has joined #ruby
[02:09:58] konsolebox: has joined #ruby
[02:12:15] nadir: has joined #ruby
[02:13:07] sytherax: has joined #ruby
[02:20:26] orbyt_: has joined #ruby
[02:24:44] sytherax: has joined #ruby
[02:27:08] knight33: has joined #ruby
[02:29:58] sytherax: has joined #ruby
[02:46:50] za1b1tsu: has joined #ruby
[02:55:58] sytherax: has joined #ruby
[02:57:10] sytherax: has joined #ruby
[02:59:33] WAFFLEMAKER3000: has joined #ruby
[03:00:08] cadillac_: has joined #ruby
[03:02:35] subroot: has joined #ruby
[03:09:18] braincrash: has joined #ruby
[03:09:23] ramfjord: has joined #ruby
[03:11:48] nicht: has joined #ruby
[03:12:59] Jonno_FTW: has joined #ruby
[03:13:32] Jonno_FTW: hello, I get this error when I try to install gems: ERROR: While executing gem ... (Errno::EIO) Input/output error @ fptr_finalize - /home/CSEM/mack0242/.gem/ruby/2.3.0/cache/devise-two-factor-2.0.1.gem
[03:13:55] Radar: That's a new one
[03:14:09] Jonno_FTW: my home directory is on an nfs, could this be the problem?
[03:14:28] Radar: Possibly.
[03:15:10] t0xik: has joined #ruby
[03:22:53] sytherax: has joined #ruby
[03:24:47] sytherax: has joined #ruby
[03:25:02] gravitation: has joined #ruby
[03:30:25] karapetyan: has joined #ruby
[03:34:16] darkhanb: has joined #ruby
[03:37:58] cschneid: has joined #ruby
[03:39:45] za1b1tsu: has joined #ruby
[03:39:48] sytherax: has joined #ruby
[03:51:12] workmad3: has joined #ruby
[03:57:09] QCF: has joined #ruby
[04:18:37] tdy: has joined #ruby
[04:26:59] wontruefree: has joined #ruby
[04:31:52] karapetyan: has joined #ruby
[04:43:19] Karuna: has joined #ruby
[04:45:04] drale2k_: has joined #ruby
[04:48:38] sytherax: has joined #ruby
[04:50:08] elomatreb: has joined #ruby
[04:51:49] reber: has joined #ruby
[04:56:57] sinduck: has joined #ruby
[05:04:48] cadillac_: has joined #ruby
[05:12:58] twe4ked: has joined #ruby
[05:15:10] sytherax: has joined #ruby
[05:17:18] sauvin: has joined #ruby
[05:19:41] duderonomy: has joined #ruby
[05:24:48] cadillac_: has joined #ruby
[05:25:38] za1b1tsu: has joined #ruby
[05:28:38] sytherax: has joined #ruby
[05:32:57] anisha: has joined #ruby
[05:33:19] cadillac_: has joined #ruby
[05:33:35] dionysus69: has joined #ruby
[05:40:26] wget: has joined #ruby
[05:43:07] giraffe: has joined #ruby
[05:43:55] tpendragon: has joined #ruby
[05:44:19] cadillac_: has joined #ruby
[05:51:19] KeyJoo: has joined #ruby
[05:51:50] workmad3: has joined #ruby
[05:55:10] jcarl43: has joined #ruby
[05:57:40] ur5us: has joined #ruby
[06:00:23] chat_: has joined #ruby
[06:02:05] aupadhye: has joined #ruby
[06:02:17] konsolebox: has joined #ruby
[06:04:26] cadillac_: has joined #ruby
[06:08:23] chat: has joined #ruby
[06:12:30] biberu: has joined #ruby
[06:14:41] nadir: has joined #ruby
[06:18:50] crimsontr: has joined #ruby
[06:24:35] workmad3: has joined #ruby
[06:27:24] pwnd_nsfw`: has joined #ruby
[06:30:19] umesh: has joined #ruby
[06:32:28] umesh: Hello I need help on HTTPARTY
[06:34:27] karapetyan: has joined #ruby
[06:34:36] umesh: If you can share any link or KB on HTTPARTY, I have to call an API also pass authentication before we connect to end point
[06:34:41] sytherax: has joined #ruby
[06:36:09] dminuoso: umesh: HTTP is stateless. How does your service work with authentication?
[06:36:54] Fraeon: has joined #ruby
[06:36:56] umesh: I need to parse API,
[06:37:18] umesh: Which requires Authentication
[06:37:30] dminuoso: How does it authenticate users?
[06:39:03] umesh: I don't know how authentication works on http
[06:39:26] dminuoso: umesh: HTTP comes with basic authentication, but the service may require some stateful authentication scheme.
[06:39:35] dminuoso: So Im asking *you* - what does your service require exactly?
[06:40:39] umesh: we have appliance known as infoblox where in only authenticated user is able to modify DNS records
[06:41:38] marius: has joined #ruby
[06:41:55] amar: has joined #ruby
[06:46:53] umesh: Infoblox is DNS appliance which exposes API which we can consume, I want to use CHEF to modify DNS records, I thought HTTPARTY would be best to utilise
[06:47:01] clemens3_: has joined #ruby
[06:49:15] umesh: I am new to programming, did I answered your question
[06:51:09] clemens31: has joined #ruby
[06:51:52] saTchymoto: has joined #ruby
[06:52:12] pskosinski: has joined #ruby
[06:52:53] ciscam: has joined #ruby
[06:53:14] sameerynho: has joined #ruby
[06:54:25] dminuoso: umesh: No. Authentication is the process of determining ones identity.
[06:54:47] dminuoso: I do not know how your webservice does this. Is an extra request beforehand necessary? Do you authenticate with Basic authentication? Do you pass a JWT header along?
[06:55:08] dminuoso: The latter would rather be authorization, but lets not split hairs.
[06:56:04] Nussi: has joined #ruby
[06:56:30] _aeris_: has joined #ruby
[06:59:09] umesh: It's just basic authentication
[06:59:52] Karuna: has joined #ruby
[07:00:07] dminuoso: umesh: What have you tried so far?
[07:01:36] Asher: has joined #ruby
[07:05:40] nowhere_man: has joined #ruby
[07:07:58] braindead_: has joined #ruby
[07:08:18] Mia: has joined #ruby
[07:08:18] Mia: has joined #ruby
[07:09:00] DeepIO: has joined #ruby
[07:13:22] umesh: https://www.irccloud.com/pastebin/dk6LmWf6
[07:13:23] ruby[bot]: umesh: we in #ruby do not like irccloud.com, it has no syntax highlighting, distracting formatting and loads slowly for most. Please use https://gist.github.com
[07:15:36] clemens31: has joined #ruby
[07:17:23] TomyWork: has joined #ruby
[07:18:30] dminuoso: umesh: And what problem do you have?
[07:18:52] dminuoso: umesh: Oh you cant use spaces in between the colon and the symbol name
[07:19:04] dminuoso: You have to write it { :username => ..., :password => ... }
[07:19:14] dminuoso: Or use the modern shortcut: { username: ..., password: ... }
[07:19:37] claudiuinberlin: has joined #ruby
[07:21:30] pabs: has joined #ruby
[07:26:08] sytherax: has joined #ruby
[07:30:27] umesh: Ok, thank you
[07:33:05] andikr: has joined #ruby
[07:33:13] umesh: Actually I had missed require 'httparty'
[07:34:12] umesh: @dminuoso Thanks again for Ur help
[07:34:43] j0bk: has joined #ruby
[07:34:43] j0bk: has joined #ruby
[07:35:03] iMadper: has joined #ruby
[07:38:19] ellcs: has joined #ruby
[07:38:45] za1b1tsu: has joined #ruby
[07:38:58] sytherax: has joined #ruby
[07:39:03] sysvalve: has joined #ruby
[07:39:38] sytherax: has joined #ruby
[07:40:55] umesh: I only have details of .get but how to use other verbs like post delete
[07:41:19] DarkUnicorn_: has joined #ruby
[07:43:41] TvL: has joined #ruby
[07:46:35] iMadper`: has joined #ruby
[07:52:50] Zaab1t: has joined #ruby
[07:54:24] iMadper``: has joined #ruby
[07:56:17] schleppel: has joined #ruby
[07:56:19] dionysus69: has joined #ruby
[08:00:03] nowhere_man: has joined #ruby
[08:00:37] burgestrand: has joined #ruby
[08:00:43] jrafanie_: has joined #ruby
[08:02:01] VladGh_: has joined #ruby
[08:03:26] mtkd: has joined #ruby
[08:03:36] mikecmpbll: has joined #ruby
[08:04:02] Es0teric: has joined #ruby
[08:05:37] ramfjord: has joined #ruby
[08:05:51] yohji: has joined #ruby
[08:08:24] jottr: has joined #ruby
[08:15:50] sytherax: has joined #ruby
[08:18:14] TinkerT: has joined #ruby
[08:18:24] sytherax: has joined #ruby
[08:20:40] nowhereman_: has joined #ruby
[08:22:02] dionysus69: has joined #ruby
[08:27:14] cabotto: has joined #ruby
[08:31:19] sytherax: has joined #ruby
[08:34:20] Pisuke: has joined #ruby
[08:35:59] karapetyan: has joined #ruby
[08:37:12] sytherax: has joined #ruby
[08:41:39] sytherax: has joined #ruby
[08:44:01] sytherax: has joined #ruby
[08:44:55] amar_: has joined #ruby
[08:49:17] crankharder: has joined #ruby
[08:50:44] Beams: has joined #ruby
[08:57:14] sytherax: has joined #ruby
[08:59:32] tvw: has joined #ruby
[09:00:09] WAFFLEMAKER3000: has joined #ruby
[09:01:28] dhollin3: has joined #ruby
[09:05:09] sytherax: has joined #ruby
[09:06:04] andikr: has joined #ruby
[09:13:17] sytherax: has joined #ruby
[09:25:06] mtkd: has joined #ruby
[09:38:49] ellcs: has joined #ruby
[09:47:50] Voxxit: has joined #ruby
[09:48:06] arne_: has joined #ruby
[09:48:12] arne_: is there someway to reenter a "case" ?
[09:48:25] dminuoso: arne_: Hey. Did you catch my previous messages by the way? =P
[09:48:34] arne_: dminuoso: i guess not i had to reboot :(
[09:48:53] arne_: sorry for being impolite
[09:48:58] dminuoso: No worries.
[09:49:01] dminuoso: arne_: So I have determined the stm implementation of Ruby to be beneath consideration.
[09:49:07] dminuoso: well. of concurrent-ruby
[09:49:43] arne_: that means?
[09:49:54] dminuoso: arne_: You'll be happier with a SizedQueue or manual conditional variabling yourself.
[09:50:05] arne_: :> i already used that one
[09:50:15] arne_: it's great, didn't know about that
[09:50:31] dminuoso: arne_: I keep forgetting that languages other than Haskell dont have an STM implementation worth considering.
[09:50:40] arne_: is there some neat trick to end up in multiple "when" in a case?
[09:50:44] dminuoso: Well clojure perhaps *shrugs*
[09:51:20] arne_: well, other languages lack the abstraction and you will end up with so much code managing that
[09:51:22] dminuoso: arne_: there's no fallthrough
[09:51:39] dminuoso: (which I think is a good thing))
[09:51:41] arne_: so it's not worth considering it in other languages
[09:51:52] arne_: well i have something like
[09:52:06] dminuoso: arne_: well you can implement stm in other languages - but it requires a lot of effort.
[09:52:16] dminuoso: it's more than just writing 100 lines of code and having a fully sleek and powerful transaction manager
[09:52:31] arne_: case a; when x; if b; c;end;else c;end; when y; c;
[09:52:35] arne_: and c is pretty long.
[09:52:48] arne_: that code doesnt make sense
[09:53:10] dminuoso: arne_: Sometimes it can be helpful to flip the logic around.
[09:53:13] arne_: dminuoso: you can implement everything in everything.. thats what turing-completeness describes..
[09:53:25] dminuoso: That is, dont successively try to filter out the cases you dont want, but specify conditions for the cases you do want
[09:53:39] arne_: all languages lacking abstraction counter their lack of it by using patterns
[09:54:05] dminuoso: arne_: STM basically requires a) a good type system to avoid you shooting yourself in the foot, b) good RTS support if you want it efficiently done.
[09:54:07] arne_: but it's ugly af, so you should not do it, unless you have a really good reason to
[09:54:10] dminuoso: Ruby has neither. :(
[09:55:21] tdy: has joined #ruby
[09:59:36] steerio: has left #ruby: ()
[10:00:05] RougeR: has joined #ruby
[10:00:05] RougeR: has joined #ruby
[10:00:30] crptck: has joined #ruby
[10:05:41] thinkpad: has joined #ruby
[10:06:29] ramfjord: has joined #ruby
[10:07:28] Asher: has joined #ruby
[10:08:42] arne_: good rts support, ruby barely has threads
[10:09:33] sytherax: has joined #ruby
[10:10:00] arne_: dminuoso: someone linked a paper a few days ago
[10:10:09] arne_: how hardware transactional memory could kill GIL
[10:10:19] arne_: mean i'd love that
[10:18:21] sytherax: has joined #ruby
[10:19:38] micutzu: has joined #ruby
[10:28:39] AJA4350: has joined #ruby
[10:28:51] hfp_work: has joined #ruby
[10:31:35] jrafanie: has joined #ruby
[10:32:09] lbracher: has joined #ruby
[10:37:21] Sylario: has joined #ruby
[10:37:23] karapetyan: has joined #ruby
[10:37:43] jrafanie: has joined #ruby
[10:44:49] cabotto: has joined #ruby
[10:46:10] dionysus69: has joined #ruby
[10:50:41] andikr: has joined #ruby
[10:54:59] aufi: has joined #ruby
[10:57:33] ciscam: has joined #ruby
[11:05:11] donofrio: has joined #ruby
[11:05:45] ramfjord: has joined #ruby
[11:08:57] dionysus69: has joined #ruby
[11:15:40] aupadhye: has joined #ruby
[11:15:53] burgestrand: has joined #ruby
[11:18:33] cabotto: has joined #ruby
[11:27:08] fmcgeough: has joined #ruby
[11:28:39] karapetyan: has joined #ruby
[11:28:56] ldnunes: has joined #ruby
[11:30:43] amar_: has joined #ruby
[11:36:42] claudiuinberlin: has joined #ruby
[11:37:33] aupadhye: has joined #ruby
[11:46:11] conta: has joined #ruby
[11:51:53] kapil___: has joined #ruby
[11:54:35] apparition: has joined #ruby
[11:54:41] venmx: has joined #ruby
[11:56:14] sytherax: has joined #ruby
[11:57:13] KeyJoo: has joined #ruby
[12:01:15] vondruch_: has joined #ruby
[12:01:59] fffco: has joined #ruby
[12:06:05] KeyJoo: has joined #ruby
[12:07:01] KeyJoo: has joined #ruby
[12:11:24] micutzu: has joined #ruby
[12:13:38] sytherax: has joined #ruby
[12:22:28] aupadhye: has joined #ruby
[12:23:28] belsaur: has joined #ruby
[12:23:45] belsaur: hi, I got a question. New to Ruby.
[12:23:52] belsaur: Am trying to map over an array
[12:23:54] sytherax: has joined #ruby
[12:23:58] belsaur: To remove one field
[12:24:06] belsaur: Is there a handy function?
[12:24:14] apeiros: &ri Array#map
[12:24:15] belsaur: Like, if an array of hashes are there
[12:24:25] apeiros: aaand I keep forgetting that this bot is still offline :(
[12:24:36] belsaur: And from every hash, I want to remove one field
[12:24:44] belsaur: If I do vanilla map
[12:24:51] apeiros: belsaur: https://ruby-doc.org/core-2.5.1/Array.html#method-i-map
[12:25:01] belsaur: I've to manually include all 30 fields
[12:25:09] jcalla: has joined #ruby
[12:25:29] apeiros: though, depends if you want a new array with new hashes
[12:25:34] belsaur: I just want to keep 29 fields, and remove 1 field
[12:25:39] apeiros: or the old array with the old hashes mutated
[12:25:44] belsaur: I want a new array with new hashes
[12:25:56] belsaur: No, I don't want to mutate old hashes
[12:25:57] gizmore: has joined #ruby
[12:26:11] apeiros: ok. I don't think you have to manually include the 29 fields you want.
[12:26:24] apeiros: dup the hashes and .delete the field you don't want.
[12:26:50] belsaur: hmm, makes sense
[12:26:59] belsaur: thanks apeiros
[12:31:51] Biappi: has joined #ruby
[12:32:08] bruno-: has joined #ruby
[12:33:34] burgestrand: has joined #ruby
[12:35:21] cyberg: has joined #ruby
[12:35:47] venmx: has joined #ruby
[12:38:37] aufi: has joined #ruby
[12:43:38] subroot: has joined #ruby
[12:44:01] mtkd: has joined #ruby
[12:44:04] nielsk: has joined #ruby
[12:48:23] cabotto: has joined #ruby
[12:52:00] FernandoBasso: has joined #ruby
[12:52:11] nowhereman_: has joined #ruby
[12:54:57] jidar: has joined #ruby
[12:58:18] vondruch: has joined #ruby
[12:59:05] karapetyan: has joined #ruby
[13:01:05] Asher: has joined #ruby
[13:01:51] nowhereman_: has joined #ruby
[13:06:58] ramfjord: has joined #ruby
[13:08:20] cadillac_: has joined #ruby
[13:12:10] alex``: has joined #ruby
[13:13:22] cadillac_: has joined #ruby
[13:16:26] sytherax: has joined #ruby
[13:17:37] gheegh: has joined #ruby
[13:18:37] bmurt: has joined #ruby
[13:24:29] droidburgundy: has joined #ruby
[13:25:11] droidburgundy: has joined #ruby
[13:26:49] gheegh: Hey all.. so I have this problem.. i'm using an intermediate proxy to retrieve some documents. Sometimes, the intermediate response will be passed as a GZip encoded body.. but i can't for the life of me seem to decode it.. Gzip gives a "not a gzip format" error..
[13:27:41] nowhereman_: has joined #ruby
[13:28:27] m1st3rwr0ng: has joined #ruby
[13:29:04] Asher: has joined #ruby
[13:30:54] sytherax: has joined #ruby
[13:31:47] orbyt_: has joined #ruby
[13:33:00] nowhereman_: has joined #ruby
[13:39:22] sytherax: has joined #ruby
[13:42:02] nowhereman_: has joined #ruby
[13:42:25] cadillac_: has joined #ruby
[13:47:54] cadillac_: has joined #ruby
[13:47:56] sytherax: has joined #ruby
[13:48:19] p0p0pr37: has joined #ruby
[13:48:57] nowhereman_: has joined #ruby
[13:48:59] amar_: has joined #ruby
[13:49:47] karapetyan: has joined #ruby
[13:56:17] sytherax: has joined #ruby
[13:57:54] cadillac_: has joined #ruby
[14:00:33] vondruch_: has joined #ruby
[14:04:17] reber: has joined #ruby
[14:05:36] jamesaxl: has joined #ruby
[14:08:23] desperek: has joined #ruby
[14:09:46] dminuoso: gheegh: what does `file` tell you it is?
[14:10:12] dminuoso: gheegh: Also check out the file with a text editor, as well as a hex editor.
[14:10:18] gheegh: let me figure out how to tell you the answer..
[14:10:26] sytherax: has joined #ruby
[14:11:07] havenwood: gheegh: file FILENAME
[14:11:13] havenwood: gheegh: xxd FILENAME
[14:11:18] gheegh: it's s tring in my retrieval response.. not a file
[14:11:27] gheegh: it's a string in my retrieval response.. not a file
[14:13:21] TheBetrayer: has joined #ruby
[14:14:32] havenwood: gheegh: echo string | xargs file
[14:14:38] havenwood: gheegh: echo string | xxd
[14:15:33] dminuoso: havenwood: say what? :p
[14:15:43] amar_: has joined #ruby
[14:16:23] havenwood: dminuoso: coffeetime!
[14:17:53] havenwood: ew, file doesn't handle piping very nicely
[14:18:22] havenwood: i guess its name shows its bias
[14:18:40] dminuoso: havenwood: also the authors have little humor
[14:19:00] dminuoso: file `which file`
[14:19:06] dminuoso: I somehow expected some joke about recursion.
[14:19:31] jrafanie: has joined #ruby
[14:23:46] pastorinni: has joined #ruby
[14:24:42] sytherax: has joined #ruby
[14:24:42] icy`: has joined #ruby
[14:24:47] WAFFLEMAKER3000: has joined #ruby
[14:26:33] swein: Anyone have nokojiri experience?
[14:27:08] havenwood: swein: Many do, yerp.
[14:27:27] dminuoso: ACTION usually puts some cinnamon in his nokogiri
[14:27:38] dminuoso: And a strawberry.
[14:27:55] swein: I've been reading tuts and postings but I still can't seem to scrape a div class block. anyone care to help for a second?
[14:31:42] swein: I am scraping off: https://www.nasdaq.com/symbol/ps , I want a div and it's contents that start at the key stock data (class="row overview-results relativeP")
[14:33:40] swein: reading html in with nokogiri I keep getting empty results with items = doc.css('div.row overview-results relativeP')
[14:34:22] havenwood: !unban chouhoulis
[14:34:22] ruby[bot]: -bbbb chouhoulis!*@*$#ruby-fix-your-connection chouhoul_!*@*$#ruby-fix-your-connection chouhou__!*@*$#ruby-fix-your-connection chouho___!*@*$#ruby-fix-your-connection
[14:34:22] ruby[bot]: -bbb chou_____!*@*$#ruby-fix-your-connection chouh____!*@*$#ruby-fix-your-connection *!*@50-207-64-46-static.hfc.comcastbusiness.net$#ruby-fix-your-connection
[14:36:18] chouhoulis: has joined #ruby
[14:40:05] vondruch: has joined #ruby
[14:41:21] mtkd: has joined #ruby
[14:41:59] amar_: has joined #ruby
[14:42:32] BlopMonster: has joined #ruby
[14:45:54] chouhoul_: has joined #ruby
[14:46:13] sphenxes: has joined #ruby
[14:53:07] karapetyan: has joined #ruby
[14:55:33] kmurphy4: has joined #ruby
[14:57:11] DeepIO: has joined #ruby
[14:57:18] kmurphy4: has joined #ruby
[14:57:54] dendazen: has joined #ruby
[14:58:12] amar_: has joined #ruby
[15:02:35] jrich523: so i now need to correct my script for the version it has to run on.. and dig isnt an option.. what was the method prior to dig to do that safely?
[15:02:50] gheegh: fetch(x, nil)
[15:02:57] jrich523: awesome, thanks!
[15:03:12] gheegh: or just [] and it will return a nil if there isn't a key
[15:03:21] chouhoulis: has joined #ruby
[15:03:43] jrich523: oh i could have sworn that caused an error.. hmm guess i'll double check that
[15:04:30] gheegh: well, if you do [] for example on a nil, it will
[15:04:48] gheegh: variable.try(:[], x) is also an option
[15:04:56] Biappi: has left #ruby: ()
[15:05:09] jrich523: i think try is what i had come across previously
[15:05:43] jrich523: n.dig('facts', 'kvm', 'pool', 'default', 'allocation'),
[15:06:10] jrich523: pretty sure because it was so deep try would be a pain (probably the same with fetch?)
[15:07:50] za1b1tsu: has joined #ruby
[15:08:00] ramfjord: has joined #ruby
[15:08:21] rippa: has joined #ruby
[15:08:48] jrich523: lol yeah... found the feature request for dig :)
[15:12:02] gheegh: you can also & the front of it.. variable&.dig('x')
[15:12:10] gheegh: i think that works with nil
[15:12:25] jrich523: yeah but the & is 2.3 i think, im 2.0 :(
[15:12:39] jrich523: i wrote it locally, and now im fixing for the version (ooppps)
[15:12:57] SeepingN: has joined #ruby
[15:13:03] cschneid: has joined #ruby
[15:13:05] garyserj: has joined #ruby
[15:13:42] jrich523: you are right tho, if its not a valid path, no error
[15:13:43] za1b1tsu: has joined #ruby
[15:14:18] jrich523: which i guess is ok, a nil in a field shouldnt screw anything
[15:15:54] grilix_: has joined #ruby
[15:21:19] swein: figured out my nokogiri issue doc.css('div.text here needs periods between words not spaces')
[15:22:10] sytherax: has joined #ruby
[15:29:24] bga57: has joined #ruby
[15:29:50] BlopMonster: has joined #ruby
[15:31:38] sytherax: has joined #ruby
[15:35:02] havenwood: jrich523: Use the backport_dig gem to get #dig in 2.0: https://github.com/koic/backport_dig
[15:41:30] karapetyan: has joined #ruby
[15:42:16] shinnya: has joined #ruby
[15:42:28] jrich523: oh cool, thanks havenwood
[15:43:50] jcarl43: has joined #ruby
[15:46:39] delsol: has joined #ruby
[15:50:58] ramfjord: has joined #ruby
[15:51:41] sytherax: has joined #ruby
[15:55:40] yokel: has joined #ruby
[15:56:01] cagomez: has joined #ruby
[15:56:23] ramfjord: has joined #ruby
[16:01:36] clemens31: has joined #ruby
[16:03:07] jrich523: is there a template for a bin/cmd rename? as in, a stub for the old name that says use the new name and fwds on to the new cmd?
[16:03:20] sytherax: has joined #ruby
[16:03:56] chmurifree: has joined #ruby
[16:05:19] wontruefree: has joined #ruby
[16:05:37] mzo: has joined #ruby
[16:11:20] wontruefree: has joined #ruby
[16:13:34] dar123: has joined #ruby
[16:14:08] Immune: has joined #ruby
[16:14:24] Immune: has left #ruby: ()
[16:14:51] dar123: anyone knows how to write '@obj.method?.should == true' in rspec3 expect statement
[16:16:03] darkhanb: has joined #ruby
[16:17:06] baweaver: dar123: what have you tried?
[16:17:32] baweaver: Where have you looked?
[16:18:19] dar123: 'expect(@obj.method?).to == true'
[16:18:19] sanscoeur: has joined #ruby
[16:19:05] baweaver: Close. Are you sure it's `== true`?
[16:19:25] dar123: nope i am not sure about that
[16:19:30] dar123: maybe its just 'eq'
[16:19:46] baweaver: expect(something).to eq(something_else)
[16:22:15] dar123: that works
[16:26:56] Lytol: has joined #ruby
[16:27:21] nowhereman_: has joined #ruby
[16:28:18] cthulchu: has joined #ruby
[16:31:37] Mike11: has joined #ruby
[16:32:50] biberu: has joined #ruby
[16:34:17] amar_: has joined #ruby
[16:35:28] ramfjord: has joined #ruby
[16:38:41] [Butch]: has joined #ruby
[16:39:46] nowhereman_: has joined #ruby
[16:50:03] BlopMonster: has joined #ruby
[16:51:32] za1b1tsu: has joined #ruby
[16:54:33] nowhereman_: has joined #ruby
[16:57:59] d^sh: has joined #ruby
[17:03:49] nowhereman_: has joined #ruby
[17:05:11] Azure: has joined #ruby
[17:11:00] jottr: has joined #ruby
[17:14:58] dionysus69: has joined #ruby
[17:14:59] drale2k_: has joined #ruby
[17:17:42] nowhereman_: has joined #ruby
[17:18:31] RougeR: has joined #ruby
[17:24:08] pankaj: has joined #ruby
[17:25:28] pankaj: Is their any good book on ruby. I have searched a lot but they are start with basic and also they are not well structured. I want to learn more ruby in depth but most of the books do not focus in its depth like what are other different classes how to build them and modules etc and such deep concepts.
[17:26:39] hahuang65_: has joined #ruby
[17:27:29] dminuoso: pankaj: Eloquent Ruby
[17:29:13] pankaj: dminuoso: OK
[17:30:26] pankaj: dminuoso: It happened to me that time also when I learned java. I was going throught but in every book I find that it tells you to basic and do not deal with it fully. But when I saw a boot which was for SCJP certification then it was what I wanted. I told each and every aspect of java and in depth.
[17:30:45] pankaj: dminuoso: /s/boot/book
[17:30:59] eckhardt: has joined #ruby
[17:31:17] pankaj: dminuoso: And also deal with libraries and other stuff internally going on with language. That is what i want with ruby also.
[17:32:56] eckhardt: has joined #ruby
[17:34:07] pankaj: dminuoso: Will eloquent ruby be sufficient?
[17:36:33] jrich523: oh cool, thanks havenwoodim reading it now, so far so good :)
[17:36:40] jrich523: a tad wordy, but good
[17:37:03] jrich523: the start of that msg was from before, and not shown on my console...
[17:37:17] dminuoso: pankaj: There are few good books. Eloquent Ruby is the best for "how to get things done" for more advanced readers.
[17:37:39] dminuoso: Ruby under a microscope covers a bit how ruby works internally, but it's old and will become gradually less accurate.
[17:43:42] SeepingN: has joined #ruby
[17:44:25] BH23: has joined #ruby
[17:46:39] pankaj: dminuoso: OK.
[17:46:53] pankaj: dminuoso: But I did not understood what point you made in the last statement.
[17:46:58] zachk: has joined #ruby
[17:47:58] zachk: has joined #ruby
[17:49:52] orbyt_: has joined #ruby
[17:56:07] wrkrcoop: has joined #ruby
[17:56:44] wrkrcoop: hello. i haven’t used ruby in a while, i’m trying to do something with node but it’s not working, it seems to work with ruby so i figured i’d just use sinatra
[17:56:56] wrkrcoop: i only need like one route does anyone have a sinatra skeleton that i can use?
[18:02:07] DTZUZO: has joined #ruby
[18:04:42] apeiros: wrkrcoop: just read sinatra's readme?
[18:04:59] BlopMonster: has joined #ruby
[18:06:16] dminuoso: pankaj: Its not exactly up to date anymore, and with every passing year Ruby core drifts away from the details covered in the book.
[18:11:57] sytherax: has joined #ruby
[18:15:20] ellcs: has joined #ruby
[18:15:36] pankaj: dminuoso: So, what is the best advice to keep upto date in ruby?
[18:16:18] Zarthus: what do you want to stay up to date about?
[18:21:31] eam: hang out in this irc channel, obviously
[18:22:25] nowhereman_: has joined #ruby
[18:23:10] thadtheman: has joined #ruby
[18:23:20] thadtheman: In pry how can I list lines of code?
[18:23:28] karapetyan: has joined #ruby
[18:25:49] akaiiro: pankaj when you get done with «Eloquent Ruby», try «Practical Object-Oriented Design in Ruby» http://www.poodr.com/
[18:25:56] drale2k_: has joined #ruby
[18:26:56] jenrzzz: has joined #ruby
[18:26:57] jenrzzz: has joined #ruby
[18:27:34] pankaj: akaiiro: OK. I will keep track of it so that when finished with first one I will definitely check out the second one. Thanks for that.
[18:28:44] desnudopenguino: has joined #ruby
[18:29:08] desnudopenguino: anyone have any experience working with ruby-build on openbsd?
[18:32:22] pastorinni: has joined #ruby
[18:33:09] SeepingN_: has joined #ruby
[18:36:29] agent_white: has joined #ruby
[18:39:37] mtkd: has joined #ruby
[18:41:49] conta1: has joined #ruby
[18:42:36] Asher: has joined #ruby
[18:45:48] nowhereman_: has joined #ruby
[18:58:31] za1b1tsu: has joined #ruby
[18:59:22] mikecmpbll: has joined #ruby
[19:06:25] apeiros: has joined #ruby
[19:07:46] cagomez: has joined #ruby
[19:08:27] mikecmpbll: has joined #ruby
[19:14:12] karapetyan: has joined #ruby
[19:19:22] karapetyan: has joined #ruby
[19:23:02] akkad: has joined #ruby
[19:23:17] cagomez: has joined #ruby
[19:24:26] Azure: has joined #ruby
[19:28:00] icarus_: has joined #ruby
[19:28:50] tdy: has joined #ruby
[19:34:56] nowhereman_: has joined #ruby
[19:35:21] Megamos: has joined #ruby
[19:39:07] cagomez: has joined #ruby
[19:41:19] dbugger_: has joined #ruby
[19:42:03] \void: has joined #ruby
[19:45:18] jenrzzz: has joined #ruby
[19:45:18] jenrzzz: has joined #ruby
[19:45:29] skryking: has joined #ruby
[19:47:32] Azure: has joined #ruby
[19:48:33] _aeris_: has joined #ruby
[19:49:14] Asher: has joined #ruby
[19:49:33] karapetyan: has joined #ruby
[19:49:55] redlegion: has joined #ruby
[19:51:43] redlegion: has joined #ruby
[19:54:09] jnollette: has joined #ruby
[19:58:33] dviola: has joined #ruby
[20:00:51] mmattice: has joined #ruby
[20:01:08] amatas: has joined #ruby
[20:01:26] mmattice: Is it reasonable to load a kitchen config yaml and then override something in the transport setup?
[20:02:46] DarkUnicorn: has joined #ruby
[20:02:47] dreamthese: has joined #ruby
[20:03:20] jenrzzz_: has joined #ruby
[20:06:16] workmad3: has joined #ruby
[20:06:31] za1b1tsu: has joined #ruby
[20:07:43] cagomez: has joined #ruby
[20:08:49] fffco: has joined #ruby
[20:11:14] c0ncealed2: has joined #ruby
[20:13:59] KeyJoo: has joined #ruby
[20:14:45] karapetyan: has joined #ruby
[20:15:26] wontruefree: has joined #ruby
[20:16:56] amatas: has joined #ruby
[20:17:19] zlogan2003: has joined #ruby
[20:24:43] nima_m: has joined #ruby
[20:29:30] kapil___: has joined #ruby
[20:29:41] baweaver: I can officially announce it now: https://southeastruby.com/
[20:29:41] baweaver: Speaking at Southeast Ruby in August on "Reducing Enumerable - An Illustrated Adventure". It's based loosely on this post series: https://medium.com/@baweaver/reducing-enumerable-the-basics-fa042ce6806
[20:31:24] ogres: has joined #ruby
[20:31:57] Zarthus: baweaver: When: August 2-3 2018 -- boo :P
[20:32:11] Zarthus: I don't even know how to interpret that date.
[20:32:28] Zarthus: ah, it's two days
[20:32:58] Zarthus: ACTION 's feeble european mind is not used to seeing the month notation first.
[20:33:16] regedit: has joined #ruby
[20:33:46] baweaver: They'll be recording so I'll likely post the video afterwards.
[20:33:55] baweaver: Just expect lots of lemurs and illustrations, as is my way.
[20:34:24] Zarthus: yeah, I don't think I can convince my company to ship me over to NA.
[20:35:16] KeyJoo: has joined #ruby
[20:36:19] KeyJoo: has joined #ruby
[20:36:27] bmurt: has joined #ruby
[20:37:15] baweaver: Going to gun hard to speak at RubyConf, but that's always hard to get into. Maybe pattern matching will do the trick this year.
[20:44:13] KeyJoo: has joined #ruby
[20:44:21] workmad3: has joined #ruby
[20:44:59] chat_: has joined #ruby
[20:45:11] KeyJoo: has joined #ruby
[20:48:31] pastorinni: has joined #ruby
[20:58:55] sanscoeur: has joined #ruby
[20:59:46] eckhardt: has joined #ruby
[21:02:11] t0xik: has joined #ruby
[21:08:16] KeyJoo: has joined #ruby
[21:09:24] KeyJoo: has joined #ruby
[21:10:23] kmurphy4: has joined #ruby
[21:11:42] ur5us: has joined #ruby
[21:21:35] sanscoeur: has joined #ruby
[21:21:44] tvw: has joined #ruby
[21:24:42] ellcs: has joined #ruby
[21:26:40] AJA4350: has joined #ruby
[21:26:54] BlopMonster: has joined #ruby
[21:31:56] mtkd: has joined #ruby
[21:36:13] KeyJoo: has joined #ruby
[21:37:09] KeyJoo: has joined #ruby
[21:42:10] jottr: has joined #ruby
[21:42:54] gheegh: has joined #ruby
[21:43:09] theRoUS: has joined #ruby
[21:43:38] theRoUS: has joined #ruby
[21:51:49] karapetyan: has joined #ruby
[21:52:40] wontruefree: has joined #ruby
[21:55:11] zapata: has joined #ruby
[21:56:21] amar: has joined #ruby
[21:56:35] Azure: has joined #ruby
[21:57:19] cadillac_: has joined #ruby
[22:00:22] gheegh: has joined #ruby
[22:03:20] Eiam: has joined #ruby
[22:05:02] dendazen: has joined #ruby
[22:06:49] pankaj: has joined #ruby
[22:11:24] weaksauce: has joined #ruby
[22:12:14] gheegh: has joined #ruby
[22:15:14] Nicmavr: has joined #ruby
[22:15:17] icarus: has joined #ruby
[22:22:19] mtkd: has joined #ruby
[22:24:24] sameerynho: has joined #ruby
[22:27:53] Azure: has joined #ruby
[22:42:22] BlopMonster: has joined #ruby
[22:53:35] karapetyan: has joined #ruby
[22:54:30] _insomniac: has joined #ruby
[22:55:40] nowhereman_: has joined #ruby
[22:58:50] Siarkowy: has joined #ruby
[22:58:52] pskosinski: has joined #ruby
[23:13:04] ciscam: has joined #ruby
[23:14:00] Lyubo1: has joined #ruby
[23:25:55] cthulchu: conjunction in ruby?
[23:26:28] cthulchu: omg is it double &
[23:26:44] Radar: cthulchu: example input + output please
[23:26:51] Radar: or did I mean input && output?
[23:27:23] cthulchu: looks like ruby doesn't know what & is
[23:27:29] Radar: [09:26:44] <Radar> cthulchu: example input + output please
[23:27:32] Radar: I won't ask nicely again.
[23:28:11] cthulchu: or maybe it does something else with it
[23:28:19] cthulchu: I should read a bit
[23:28:24] Radar: cthulchu: Do you want help or no?
[23:30:06] cthulchu: nah, it's ok
[23:30:16] cthulchu: I just expected single & to work as a conjunction
[23:30:18] apeiros: Radar: I think you meant input and output, even if that's not having precedence :D
[23:30:27] cthulchu: apparently, ruby has an interesting usage for it
[23:30:47] cthulchu: never seen it before
[23:31:12] cthulchu: do you guys use & to pass a... a functional block into an arbitrary method to be executed?
[23:31:12] Radar: cthulchu: If you want to have a meaningful discussion about it then we're going to need to see some code.
[23:31:43] apeiros: cthulchu: na, I use & when I want an intersection
[23:31:54] Radar: Or in map(&:method)
[23:32:11] apeiros: sometimes though I use it if I want to store a block
[23:32:35] cthulchu: okay, that's interesting. If the ampersand has multiple usage, then why not keep it in the logical operations
[23:33:01] Radar: cthulchu: Are you intentionally being obtuse or is it just because it is early morning hered>?
[23:33:05] cthulchu: for something like this to work: if type == "1" & test == "2" & step == "3"
[23:33:26] apeiros: & in that context is a method
[23:33:35] cthulchu: I thought so
[23:33:47] cthulchu: I'll just use double ampersands
[23:33:49] apeiros: so you'll have to first figure out predence
[23:33:57] apeiros: then determine lhs' class
[23:34:01] cthulchu: but generally single ampersand has its functionality
[23:34:04] apeiros: and then you'll know what & does there.
[23:34:28] cthulchu: well I mean, in C syntax
[23:34:32] apeiros: generally & is a sigil with at least 3 meanings.
[23:34:46] apeiros: we're in #ruby, not sure how C syntax matters.
[23:34:49] cthulchu: not in logical operations
[23:34:55] cthulchu: probably it doesn't
[23:35:05] cthulchu: then the usage of double ampersands is confusing
[23:35:12] apeiros: & being a method means it can do *anything*
[23:35:29] cthulchu: I actually got an answer, thanks :)
[23:35:33] apeiros: && is syntax and always logical and
[23:35:41] apeiros: same with `and` keyword.
[23:37:26] cthulchu: ok, folks, could you please glance at my class. I'm not sure where the error is, but I'm sure it's trivial
[23:37:28] thinkpad: has joined #ruby
[23:37:55] cthulchu: https://paste.ofcode.org/sgDR93Da9iVvS5MSud9pAh
[23:38:13] cthulchu: /Users/Shared/repos/qa_automation/lib/analytics/init.rb:25: syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError)
[23:38:13] apeiros: I will, if you come up with an actually useful problem description ;-)
[23:38:22] apeiros: ah, I was too impatient
[23:38:36] apeiros: line numbers match with the paste?
[23:38:59] apeiros: your… indentation is terrible. really. you should fix that first.
[23:39:18] cthulchu: I'll switch to an actual IDE later
[23:39:28] apeiros: so? atom can't do indents or what?
[23:39:39] cthulchu: that's how it does it
[23:39:56] Radar: [09:38:59] <apeiros> your… indentation is terrible. really. you should fix that first. <- strong confirm
[23:40:01] apeiros: I haven't used atom, but I doubt it did it like that on its own
[23:40:06] cthulchu: what don't you like about it?
[23:40:21] Radar: cthulchu: methods are indented one step too far
[23:40:45] cthulchu: that's me copying them from somewhere else :)
[23:40:54] Radar: You're also missing an end after line 22. The end you have there is matching the `if`, not the `def`
[23:41:01] apeiros: if you fixed your indentation, look for places where it indents or deintents multiple levels at once.
[23:41:02] cthulchu: but I don't know how to move everything to the left, so I don't bother
[23:41:06] apeiros: then you'll see your issue.
[23:41:11] cthulchu: I don't have a format all option here
[23:41:34] cthulchu: Do I need to explicitly end ifs with only one item in them?!
[23:41:37] apeiros: most text editors I know it's "select all relevant lines, hit shift-tab"
[23:41:56] cthulchu: apeiros, thanks a lot!
[23:42:04] apeiros: yes. ruby isn't C, as we've just recently noticed :)
[23:42:36] apeiros: `action if condition` if you don't want to indent. only recommended for very short code on both sides of the if.
[23:42:57] dogweather: has joined #ruby
[23:43:00] cthulchu: I guess I still can do ternaries
[23:43:08] cthulchu: Ruby motivates me to do more of them
[23:43:09] SeepingN: puts ("Analytics Test Success") if (type == "1" && test == "2" && step == "3") # 1 line
[23:43:27] rgiscard: has joined #ruby
[23:43:49] cthulchu: will it eat (type == "1" && test == "2" && step == "3")?puts ("Analytics Test Success"):null
[23:44:45] apeiros: if you want to write ugly code like that, at least do it right: `(type == "1" && test == "2" && step == "3") and puts ("Analytics Test Success")`
[23:44:56] apeiros: (perlism btw.)
[23:45:15] cthulchu: doesn't make sense
[23:45:35] apeiros: eh, you not being able to make sense of it != it not making sense.
[23:45:53] cthulchu: me not being make sense of it == it not making sense to me
[23:46:14] cthulchu: you do love to discuss irrelevant stuff
[23:46:23] apeiros: sure, just like you :-p
[23:46:33] cthulchu: will that be a ternary?
[23:46:45] cthulchu: what does it do?
[23:46:46] apeiros: that's a logical "and"
[23:46:56] apeiros: it puts if the condition is truthy
[23:47:04] cthulchu: that's very weird
[23:47:10] cthulchu: very very weird
[23:47:11] eckhardt: has joined #ruby
[23:47:21] cthulchu: I would never write anything like that
[23:47:34] cthulchu: gonna go ask node folks if they would
[23:47:41] cthulchu: it's an interesting approach though
[23:47:41] apeiros: not much weirder than (ab-)using ternary without wanting its value.
[23:47:44] roamingdog: has joined #ruby
[23:47:57] smithja: has joined #ruby
[23:48:00] cthulchu: it's negative value
[23:48:03] apeiros: as said, it's a perlism. and also as said, I consider it ugly code.
[23:48:19] apeiros: though, less ugly than the way you used the ternary :)
[23:48:34] cthulchu: I can replace that and with &&?
[23:48:40] apeiros: also, pleeeease don't put spaces before method argument parens
[23:48:43] cthulchu: it's just a synonym, right?
[23:48:50] apeiros: `puts("stuff")`, not `puts ("stuff")`
[23:49:12] apeiros: cthulchu: no, `and` and `&&` are not synonyms (or aliases)
[23:49:25] cthulchu: what's the difference
[23:49:26] apeiros: they have the same functionality, but different precedence.
[23:49:44] cthulchu: and is left to right, obviously
[23:50:16] apeiros: I think they have the same associativity direction.
[23:50:25] cthulchu: what's the difference then
[23:50:29] apeiros: but honestly, I'm not sure. I tend to make cases unambiguous.
[23:50:37] cthulchu: && has higher priority
[23:55:10] karapetyan: has joined #ruby