« Back to channel list

#ruby - 31 August 2018

« Back 1 day Forward 1 day »
[00:10:12] akem: has joined #ruby
[00:20:39] Azure|dc: has joined #ruby
[00:21:34] Azure: has joined #ruby
[00:29:12] arescorpio: has joined #ruby
[00:30:30] Azure|dc: has joined #ruby
[00:48:51] bmurt: has joined #ruby
[00:59:02] akaiiro: has joined #ruby
[01:00:27] lxsameer: has joined #ruby
[01:08:05] ArahaelPi: has joined #ruby
[01:28:05] agent_white: has joined #ruby
[01:40:14] orbyt_: has joined #ruby
[01:48:55] dbz: has joined #ruby
[01:49:16] scrptktty: Submitted my RubyConf scholarship~~
[01:49:27] bmurt: has joined #ruby
[01:54:54] cagomez: has joined #ruby
[02:01:09] h0h0h0: has joined #ruby
[02:02:59] cagomez: has joined #ruby
[02:06:51] tdy: has joined #ruby
[02:07:44] esrse: has joined #ruby
[02:14:03] j416_: has joined #ruby
[02:19:00] bmurt: has joined #ruby
[02:32:01] akaiiro: has joined #ruby
[02:40:12] renzhi: has joined #ruby
[02:49:38] bmurt: has joined #ruby
[03:01:07] lxsameer: has joined #ruby
[03:05:08] sspreitz: has joined #ruby
[03:06:15] lemonandroid: has joined #ruby
[03:11:25] akaiiro: has joined #ruby
[03:11:36] braincrash: has joined #ruby
[03:17:01] dbugger_: has joined #ruby
[03:23:35] orbyt_: has joined #ruby
[03:36:31] kapil___: has joined #ruby
[03:37:38] cagomez: has joined #ruby
[03:39:52] MuffinPimp: has joined #ruby
[03:40:38] cagomez: has joined #ruby
[03:49:59] MuffinPimp: has joined #ruby
[04:00:33] DTZUZO: has joined #ruby
[04:12:22] jane_booty_doe: has joined #ruby
[04:12:27] cagomez: has joined #ruby
[04:13:12] cagomez: has joined #ruby
[04:23:59] cagomez: has joined #ruby
[04:38:23] cgfbee: has joined #ruby
[04:48:06] dogweather: has joined #ruby
[04:50:20] jjman: has joined #ruby
[05:05:39] dogweather: has joined #ruby
[05:15:32] jp: has joined #ruby
[05:23:17] dogweather: has joined #ruby
[05:40:38] dogweather: has joined #ruby
[05:45:07] dionysus69: has joined #ruby
[05:52:17] code_zombie: has joined #ruby
[05:57:14] bak1an: has joined #ruby
[06:00:42] orbyt_: has joined #ruby
[06:03:00] reber: has joined #ruby
[06:05:04] apeiros: has joined #ruby
[06:13:49] snickers: has joined #ruby
[06:15:34] Emmanuel_Chanel: has joined #ruby
[06:21:42] aupadhye: has joined #ruby
[06:25:07] rootsudo: has joined #ruby
[06:38:06] KevinSjoberg: has joined #ruby
[06:43:39] Azure: has joined #ruby
[06:48:50] dbz: has joined #ruby
[06:54:48] aufi: has joined #ruby
[06:59:37] dellavg_: has joined #ruby
[07:07:39] marz_d`ghostman: has joined #ruby
[07:08:00] alex``: has joined #ruby
[07:08:50] marz_d`ghostman: If I want to serve a fiel generated by ruby via apache, do I need to use some framework like sinatra or RoR or can I simply use an .rb file?
[07:10:01] yohji: has joined #ruby
[07:11:45] baweaver: I mean you _could_ if you really wanted to with CGI extensions
[07:11:53] baweaver: Though it really depends what you want to do.
[07:12:10] baweaver: Also CGI extensions can be notoriously insecure and error prone, while being hard to debug
[07:14:42] marz_d`ghostman: baweaver: can you suggest anything? I want something that would look like this: http://mirror.rise.ph/
[07:15:21] baweaver: How much do you know about programming, and why Ruby?
[07:15:35] baweaver: also, what are you intending to build?
[07:16:29] marz_d`ghostman: baweaver: not a lot when it comes to these kind of stuff. Just a webpage serving directories/files
[07:16:46] marz_d`ghostman: baweaver: cause I've been using ruby on my other scripts :)
[07:17:01] baweaver: Then why not just run Apache in a directory?
[07:17:02] baweaver: That gives you pretty much that
[07:17:05] sysvalve: has joined #ruby
[07:18:31] apeiros: marz_d`ghostman: the lowest level I'd recommend is rack. there's rack-server-pages which provides something akin to php's experience.
[07:19:03] apeiros: and as baweaver mentioned, you can always use cgi/fcgi
[07:21:25] zenspider: *cough* webrick *cough*
[07:21:39] apeiros: "via apache"?
[07:21:54] baweaver: ohai zenspider
[07:21:55] apeiros: I mean, ok, you can configure apache as a reverse-proxy :D
[07:22:19] zenspider: then you have two problems
[07:24:01] marz_d`ghostman: hmmm, maybe I'll give nodejs a try then
[07:24:35] apeiros: I'd be happy if I could trade what I have for as little as two problems πŸ˜‚
[07:25:17] apeiros: marz_d`ghostman: weird reasoning, but sure, whatever fits your bill. the situation there won't differ much, though.
[07:26:02] marz_d`ghostman: apeiros: Will it be simple to just use sinatra?
[07:26:17] zenspider: node? now you have ALL the problems :P
[07:26:32] apeiros: define "simple". but yes, using sinatra is IMO rather simple.
[07:28:27] marz_d`ghostman: I guess defining simple isn't that simple, hehe. Just require sinatra, write ruby code have it serve the files, then voila!? haha, haven't tried sinatra though so I wouldn't know what I would be going through :)
[07:29:35] ellcs: has joined #ruby
[07:31:01] baweaver: ACTION still thinks you don't need anything more than Apache directory listings
[07:38:53] za1b1tsu_: has joined #ruby
[07:45:11] akem: has joined #ruby
[07:48:15] tristanp: has joined #ruby
[07:50:23] cgfbee: has joined #ruby
[07:55:17] jp: has joined #ruby
[07:58:29] clorisu: has joined #ruby
[08:01:56] lxsameer: has joined #ruby
[08:06:48] RougeR: has joined #ruby
[08:32:25] bathtub_shark: has joined #ruby
[08:34:57] Beams: has joined #ruby
[08:40:44] bijan_: has joined #ruby
[08:41:59] bijan_: has joined #ruby
[08:59:07] TomyWork: has joined #ruby
[08:59:25] Sylario: has joined #ruby
[09:06:14] nowhere_man: has joined #ruby
[09:07:02] dionysus69: >> price / (true ? {:price=>0.2791e3}[:price].to_d : 1)
[09:07:08] ruby[bot]: dionysus69: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[09:08:01] Sigyn: has joined #ruby
[09:13:37] j416: has joined #ruby
[09:15:09] jinie: has joined #ruby
[09:17:37] desperek: has joined #ruby
[09:21:37] j416: has joined #ruby
[09:21:43] apeiros: dionysus69: converting floats to bigdecimals isn't really a good idea.
[09:21:49] apeiros: and I think I told you that before already too
[09:28:34] siaw23: has joined #ruby
[09:29:26] siaw23: hi, has Ruby got some inbuilt libary that can tell free space left on disk/cpu usage/ram usage?
[09:29:42] siaw23: if not, what’s the be external library for such things?
[09:30:11] cek: has joined #ruby
[09:32:00] sticaz: has joined #ruby
[09:34:04] cek: am I expecting too much from #unpack to support "(CSLQ)*" , that is, a repeated group?
[09:39:42] zenspider: short answer: yes
[09:39:55] zenspider: nowhere in the doco does it say anything about "()" in the syntax
[09:40:09] j416: has joined #ruby
[09:42:25] cek: i have no time to parse unpack code
[09:43:12] cek: looks like it's time to unpack libffi riffle
[09:43:41] zenspider: looks like you just need to apply the looping yourself. *shrug*
[09:43:51] Cork: has joined #ruby
[09:49:17] dionysus69: apeiros: it is already saved as a decimal, it's just insurance, I am pulling it from cache
[09:49:50] apeiros: dionysus69: what's the point of having an insurance if the insurance is broken?
[09:50:05] dionysus69: and I am not dealing with floats in any way, I do all operations in bigdecimals
[09:50:24] apeiros: that statement is false
[09:50:34] dionysus69: why is it broken? unless redis makes a storage error
[09:51:15] apeiros: why do you have it there at all?
[09:51:29] apeiros: and would you put in a random number there too?
[09:51:36] dionysus69: because I send this info to all users very often, db would burn
[09:51:43] dionysus69: actioncable here
[09:52:06] dionysus69: no it's not random number, it's a correctly calculated number 100% :D
[09:53:59] apeiros: read carefully
[09:54:28] apeiros: I did not say it was a random number. I asked whether you'd also put in a random number there instead of the float.
[09:57:29] despai: has joined #ruby
[09:58:17] dionysus69: no, I only store floats > bigdecimals
[09:59:44] dionysus69: it's basically average of like 4 big decimals, I feel like I can be 100% sure that this operation will always produce big decimals
[10:01:54] siaw23: has left #ruby: ()
[10:03:37] clorisu: has joined #ruby
[10:05:24] apeiros: *sob*, it's pointless
[10:13:50] dextrey: has joined #ruby
[10:20:56] sticaz: has joined #ruby
[10:25:25] bijan_: has joined #ruby
[10:29:38] gnufied: has joined #ruby
[10:38:12] dbz: has joined #ruby
[10:42:14] j416: has joined #ruby
[10:51:04] Puffball: has joined #ruby
[10:56:26] dogweather: has joined #ruby
[11:00:28] zapata_: has joined #ruby
[11:01:45] j416: has joined #ruby
[11:01:49] c0ncealed2: has joined #ruby
[11:02:37] drale2k_: has joined #ruby
[11:03:31] aufi: has joined #ruby
[11:06:35] zapata: has joined #ruby
[11:14:48] thy0: has joined #ruby
[11:21:27] nowhere_man: has joined #ruby
[11:22:42] Azure: has joined #ruby
[11:28:00] dogweather: has joined #ruby
[11:39:55] dogweather: has joined #ruby
[11:41:04] dbz: has joined #ruby
[11:44:07] dogweather: has joined #ruby
[11:45:11] jinie: has joined #ruby
[11:48:38] dogweather: has joined #ruby
[11:57:19] dogweather: has joined #ruby
[11:58:49] drale2k_: has joined #ruby
[11:59:17] AJA4350: has joined #ruby
[12:00:06] lemonandroid: has joined #ruby
[12:01:39] dogweather: has joined #ruby
[12:06:21] dionysus69: apeiros: it's not that bad :)
[12:09:05] jcalla: has joined #ruby
[12:10:18] dogweather: has joined #ruby
[12:16:14] akem: has joined #ruby
[12:18:22] dbz: has joined #ruby
[12:27:04] AJA4350: has joined #ruby
[12:27:39] dogweather: has joined #ruby
[12:34:34] Puffball: has joined #ruby
[12:38:16] tristanp: has joined #ruby
[12:38:38] bijan_: has joined #ruby
[12:43:46] fmcgeough: has joined #ruby
[12:44:58] dogweather: has joined #ruby
[12:49:22] jottr: has joined #ruby
[12:52:02] bijan_: has joined #ruby
[12:53:03] gnufied: has joined #ruby
[12:56:19] akem: has joined #ruby
[13:02:21] dogweather: has joined #ruby
[13:04:36] akem: has joined #ruby
[13:07:56] dogweather: has joined #ruby
[13:12:47] dogweather: has joined #ruby
[13:13:39] Inline: has joined #ruby
[13:15:36] akem: has joined #ruby
[13:16:39] sticaz: has joined #ruby
[13:17:06] dogweather: has joined #ruby
[13:22:39] bastilian: has joined #ruby
[13:22:40] Demos[m]: has joined #ruby
[13:22:40] turt2live: has joined #ruby
[13:23:27] thejs: has joined #ruby
[13:24:42] akem: has joined #ruby
[13:26:09] qolq: has joined #ruby
[13:28:01] despai: has joined #ruby
[13:28:28] bmurt: has joined #ruby
[13:29:19] aupadhye: has joined #ruby
[13:29:41] bauruine: has joined #ruby
[13:33:14] dogweather: has joined #ruby
[13:34:57] synstack: has joined #ruby
[13:35:51] RougeR: has joined #ruby
[13:37:30] dogweather: has joined #ruby
[13:41:19] bijan_: has joined #ruby
[13:41:50] dogweather: has joined #ruby
[13:46:05] dogweather: has joined #ruby
[13:46:35] aesthetikx: has joined #ruby
[13:52:33] Rapture: has joined #ruby
[13:54:33] bijan_: has joined #ruby
[14:00:41] akem: has joined #ruby
[14:09:42] dostoyevsky: has joined #ruby
[14:10:05] alex``: has joined #ruby
[14:10:38] dostoyevsky: Hi. Does jupyter have support to plot graphs etc via Ruby? I installed the Ruby kernel for jupyter, so I can use Ruby, but I am not sure how much more support there actually is
[14:11:41] bijan_: has joined #ruby
[14:13:42] kapil___: has joined #ruby
[14:13:48] balo: dostoyevsky: i havent't tried any of them https://github.com/arbox/data-science-with-ruby#visualization
[14:14:31] Nicmavr: has joined #ruby
[14:15:15] dostoyevsky: balo: Thanks!
[14:21:09] akaiiro: has joined #ruby
[14:22:07] RougeR: anyone able to help me with stubbing in mocha/minitest
[14:22:40] bijan_: has joined #ruby
[14:26:12] RougeR: this is basically metacode on line 17
[14:26:13] RougeR: https://gist.github.com/CodePint/437b2d24c9cb4596adb000174ff57d76
[14:26:21] RougeR: but i want to do something like that
[14:26:31] RougeR: line 17 of spec*
[14:29:20] bmurt: has joined #ruby
[14:34:05] bijan_: has joined #ruby
[14:41:27] joast: has joined #ruby
[14:44:41] [Butch]: has joined #ruby
[14:45:13] bijan_: has joined #ruby
[14:51:35] eddof13: has joined #ruby
[14:52:15] dogweather: has joined #ruby
[14:59:04] bijan_: has joined #ruby
[14:59:54] dogweather: has joined #ruby
[15:02:58] chouhoulis: has joined #ruby
[15:09:37] dumptruckman: has joined #ruby
[15:10:54] bijan_: has joined #ruby
[15:16:56] j416: has joined #ruby
[15:17:58] Tempesta: has joined #ruby
[15:21:00] polishdub: has joined #ruby
[15:22:20] bijan_: has joined #ruby
[15:23:56] lomex: has joined #ruby
[15:29:19] bmurt: has joined #ruby
[15:33:36] troys: has joined #ruby
[15:33:49] bijan_: has joined #ruby
[15:36:05] mroutis: has joined #ruby
[15:45:22] bijan_: has joined #ruby
[15:49:47] alex``: has joined #ruby
[15:50:09] nicesignal: has joined #ruby
[15:52:51] DTZUZO: has joined #ruby
[15:55:09] MoritaShinobu: has joined #ruby
[15:56:56] bijan_: has joined #ruby
[16:00:08] gr33n7007h: has joined #ruby
[16:00:21] MoritaShinobu: has joined #ruby
[16:01:45] jcarl43: has joined #ruby
[16:05:24] MoritaShinobu: has joined #ruby
[16:08:30] MoritaShinobu: has joined #ruby
[16:08:39] bijan_: has joined #ruby
[16:11:20] alex``: has joined #ruby
[16:12:25] eckhardt_: has joined #ruby
[16:12:46] dogweather: has joined #ruby
[16:19:38] bijan_: has joined #ruby
[16:23:04] orbyt_: has joined #ruby
[16:23:38] jane_booty_doe: has joined #ruby
[16:27:21] bijan_: has joined #ruby
[16:28:36] Nicmavr: has joined #ruby
[16:29:58] bmurt: has joined #ruby
[16:31:45] doubledup: has joined #ruby
[16:32:51] c0ncealed2: has joined #ruby
[16:57:26] ShekharReddy: has joined #ruby
[16:59:10] reber: has left #ruby: ("Leaving")
[17:08:08] dbz: has joined #ruby
[17:08:50] dbz_: has joined #ruby
[17:17:11] ShekharReddy: has joined #ruby
[17:30:02] bmurt: has joined #ruby
[17:30:56] fluxAeon: has joined #ruby
[17:32:56] kapil___: has joined #ruby
[17:37:06] sticaz: has joined #ruby
[17:37:54] nofxx: has joined #ruby
[17:39:42] lxsameer: has joined #ruby
[17:40:28] dextrey: has joined #ruby
[17:49:36] lxsameer: has joined #ruby
[17:53:19] bmurt: has joined #ruby
[17:59:47] lxsameer: has joined #ruby
[18:03:57] Rapture: has joined #ruby
[18:09:46] lxsameer: has joined #ruby
[18:19:37] lxsameer: has joined #ruby
[18:21:09] marz_d`ghostman: has joined #ruby
[18:21:39] marz_d`ghostman: How do I get the right size of a directory? File.stat(dir).size seems to return an incorrect one.
[18:22:36] apeiros: marz_d`ghostman: you'll have to sum the sizes of all files in the directory
[18:23:06] havenwood: marz_d`ghostman: You want just the files in the directory itself or also files in subdirectories?
[18:23:10] despai: has joined #ruby
[18:25:14] nowhere_man: has joined #ruby
[18:26:08] havenwood: marz_d`ghostman: Dir.each_child('.').sum &File.method(:size)
[18:26:53] apeiros: I think that won't work for anything but the cwd
[18:27:05] apeiros: at least iirc each_child yields only the filename, not the path, no?
[18:27:20] apeiros: ACTION should probably test that, but feels too lazy rn 0:-)
[18:27:46] havenwood: apeiros: good point, it's not full paths
[18:28:26] apeiros: Dir.glob would be relative, so should work. but needs a flag for dot-files
[18:29:42] lxsameer: has joined #ruby
[18:33:13] havenwood: Pathname(dir).each_child.sum &File.method(:size)
[18:33:40] havenwood: apeiros: Or the Pathname variant of #children and #each_child takes an argument that defaults to full path.
[18:33:54] apeiros: πŸ‘πŸ»
[18:34:10] jane_booty_doe: has joined #ruby
[18:35:06] marz_d`ghostman: havenwood: apeiros thanks
[18:35:54] havenwood: marz_d`ghostman: no prob. you don't need it recursive into directories then?
[18:36:37] marz_d`ghostman: havenwood: oh, also the subdirectories, I want the size of everything in the given directory
[18:37:40] fmcgeough: has joined #ruby
[18:38:10] havenwood: marz_d`ghostman: require 'find'; Find.find('.').sum { |path| File.file?(path) ? File.size(path) : 0 }
[18:38:53] havenwood: marz_d`ghostman: https://docs.ruby-lang.org/en/2.5.0/Find.html
[18:39:25] marz_d`ghostman: havenwood: just what I've searched, find module, hehe, but in ruby 2.4 https://ruby-doc.org/stdlib-2.4.0/libdoc/find/rdoc/Find.html
[18:39:52] lxsameer: has joined #ruby
[18:40:35] despai: has joined #ruby
[18:41:41] havenwood: marz_d`ghostman: Or if you want to include directory size: Find.find(dir).sum &File.method(:size)
[18:42:10] marz_d`ghostman: havenwood: isn't the directory size derived from all the files inside it?
[18:42:29] havenwood: marz_d`ghostman: For example, check: File.size('.')
[18:42:34] havenwood: marz_d`ghostman: nope
[18:43:50] marz_d`ghostman: havenwood: so a directory can have a different size of itself?
[18:45:04] havenwood: marz_d`ghostman: Directories are files too.
[18:45:40] havenwood: marz_d`ghostman: They have a file size that's a totally different thing than the cumulative size of the files in the directory.
[18:46:08] havenwood: marz_d`ghostman: So it depends on what you're trying to count.
[18:46:34] havenwood: Whether you'll want to include the file size of the directories.
[18:47:09] marz_d`ghostman: havenwood: ah I get it now, everything is a file in unix
[18:49:56] lxsameer: has joined #ruby
[18:57:42] solocshaw: has joined #ruby
[18:59:42] lxsameer: has joined #ruby
[19:03:18] lemonandroid: has joined #ruby
[19:03:28] thejs: has joined #ruby
[19:09:43] lxsameer: has joined #ruby
[19:13:40] snickers: has joined #ruby
[19:17:50] kapil___: i have `args: { qinput: [{ EntityClassIdVal1 : C.EntityClass.CustomerId}]}` in yaml file. but `C.EntityClass.CustomerId` is not a string
[19:18:50] kapil___: how to not parse it as string
[19:19:41] havenwood: kapil___: What is it supposed to be? Where'd that YAML come from?
[19:19:44] lxsameer: has joined #ruby
[19:22:07] kapil___: havenwood: its my own yaml file
[19:22:32] kapil___: i did `args = obj.dig('args')`
[19:22:42] marz_d`ghostman: havenwood: tried issuing a command on my temrinal `du -s -B1` there seems to be a difference, it says 61440, but in the browser it only has 55943
[19:22:49] kapil___: `pretty_json(args).gsub(": \"", ": ").gsub("\"}]}", "")`
[19:24:14] lemonandroid: kapil___you don't want it to be a string but it is currently a string?
[19:24:26] havenwood: marz_d`ghostman: When compared to?: Find.find('.').sum { |path| File.file?(path) ? File.size(path) : 0 }
[19:24:39] kapil___: lemonandroid: yes
[19:24:54] marz_d`ghostman: havenwood: Find.find(dir).sum &File.method(:size)
[19:24:57] lemonandroid: kapil___What do you want it to be?
[19:25:31] kapil___: its a string but without quotes
[19:25:47] bmurt: has joined #ruby
[19:26:01] lemonandroid: kapil___i don't understand
[19:26:37] kapil___: I am writing a generator, so i want to print it as without quotes
[19:26:53] havenwood: marz_d`ghostman: du doesn't count the filesize of directories themselves
[19:27:04] lemonandroid: kapil___to a file?
[19:27:12] marz_d`ghostman: havenwood: but it shows a greater size
[19:27:18] kapil___: lemonandroid: yes its javascript file
[19:27:59] havenwood: marz_d`ghostman: Maybe because?: "The du utility counts the storage used by symbolic links and not the files they reference"
[19:28:31] lemonandroid: kapil___thanks, I understand now, let me think for a while
[19:29:17] marz_d`ghostman: havenwood: that would mean the symbolic links has greater size than those files they reference. Plausible
[19:29:56] lxsameer: has joined #ruby
[19:30:38] rupam123456: has joined #ruby
[19:31:19] dogweather: has joined #ruby
[19:31:36] MoritaShinobu: has joined #ruby
[19:32:02] havenwood: marz_d`ghostman: how about du with -L flag too?
[19:32:25] lenqbit: has joined #ruby
[19:32:27] havenwood: -L, --dereference dereference all symbolic links
[19:33:00] havenwood: marz_d`ghostman: or --apparent-size
[19:33:00] marz_d`ghostman: havenwood: still the same size as before, 61440
[19:33:08] havenwood: marz_d`ghostman: how about --apparent-size?
[19:33:18] marz_d`ghostman: havenwood: that did it
[19:33:46] marz_d`ghostman: --apparent-size print apparent sizes, rather than disk usage; although the apparent size is usually smaller, it may be larger due to holes in ('sparse') files, internal fragmentation, indirect blocks, and the like
[19:33:54] havenwood: "holes in (`sparse') files, internal fragmentation, indirect blocks, and the like"
[19:34:10] marz_d`ghostman: havenwood: don't really understand that one haha
[19:34:59] havenwood: marz_d`ghostman: do you have an encrypted filesystem?
[19:35:19] marz_d`ghostman: havenwood: nope, just plan ext4
[19:36:11] lemonandroid: kapil___Is the yaml snippet you posted earlier part of a bigger yaml file?
[19:36:37] cek: has joined #ruby
[19:36:42] akem: has joined #ruby
[19:36:55] havenwood: marz_d`ghostman: https://en.wikipedia.org/wiki/Sparse_file
[19:37:27] marz_d`ghostman: havenwood: I'll give that a read, thanks for the help. I appreciate it. :)
[19:37:39] havenwood: marz_d`ghostman: you're welcome
[19:38:54] kapil___: lemonandroid: yes, its
[19:39:47] lxsameer: has joined #ruby
[19:40:57] Cthulu201: has joined #ruby
[19:41:32] lemonandroid: kapil___ how about `YAML.dump(args)`?
[19:41:58] jcarl43: has joined #ruby
[19:42:43] kapil___: lemonandroid: somewhere in the code i have `@yamlConfig = YAML.load_file(File.expand_path('config.yaml', __dir__))`
[19:43:12] lemonandroid: kapil___I mean `YAML.dump` instead of `pretty_json`
[19:43:27] kapil___: wait i try it
[19:45:42] kapil___: lemonandroid: thanks, it worked. but what it does,
[19:46:36] kapil___: lemonandroid: no its not work
[19:46:49] kapil___: it print empty {} as value
[19:47:56] knight33: has joined #ruby
[19:47:56] kapil___: it outputs `"--- {}\n"`
[19:48:41] lemonandroid: what's the associated code snippet?
[19:48:52] lemonandroid: `YAML.dump(args)`? if so, what's the value of args
[19:49:37] lxsameer: has joined #ruby
[19:49:48] dbz: has joined #ruby
[19:50:29] kapil___: `puts args` results `{"qinput"=>[{"EntityClassIdVal1"=>"C.EntityClass.CustomerId"}]}`
[19:51:04] lemonandroid: please do args.inspect
[19:51:09] lemonandroid: please do `puts args.inspect`
[19:51:13] kapil___: `YAML.dump(args)` results `"---\nqinput:\n- EntityClassIdVal1: C.EntityClass.CustomerId\n"`
[19:51:58] kapil___: `puts args.inspect
[19:51:58] kapil___: {"qinput"=>[{"EntityClassIdVal1"=>"C.EntityClass.CustomerId"}]}`
[19:52:22] lemonandroid: kapil___ok, sure, yaml wont work
[19:53:08] kapil___: lemonandroid: dump work for what other file types?
[19:53:36] lemonandroid: kapil___i was probalby hoping that it is magically working, i think yaml also supports the syntax that you need
[19:54:28] kapil___: thanks will check it later
[19:57:11] lemonandroid: kapil___have a look at this, not exactly what you want probably but will give you a head start: https://gist.github.com/lyoshenka/4680297
[19:59:52] lxsameer: has joined #ruby
[20:05:20] dogweather: has joined #ruby
[20:08:57] eckhardt_: has joined #ruby
[20:09:44] lxsameer: has joined #ruby
[20:11:23] Zaab1t: has joined #ruby
[20:12:23] graft: has joined #ruby
[20:12:51] graft: hey all, my sysadmin wants to know if there are built-in tests to validate a ruby installation after building from source
[20:13:00] graft: i'm not familiar with any such, does something like this exist?
[20:13:31] cek: yeah. run rails tests
[20:14:05] graft: rails is not ruby
[20:14:08] cek: long time ago, some ruby implementations couldn't pass them
[20:14:09] apeiros: graft: `make test`
[20:14:29] cek: and ruby is not rails?
[20:14:36] apeiros: no, ruby is not rails cek
[20:15:41] JamJam_kid: has joined #ruby
[20:16:13] graft: apeiros: make test, makes sense
[20:16:26] graft: now i just need to figure out how ruby-build does such a thing
[20:16:30] graft: might do it automatically
[20:16:33] apeiros: `make sense`, I wish that command existed for irc ;-D
[20:17:28] knight33: has joined #ruby
[20:18:15] dogweather: has joined #ruby
[20:19:13] lemonandroid: `be humble` would also be cool
[20:19:47] lxsameer: has joined #ruby
[20:31:59] orbyt_: has joined #ruby
[20:35:19] bathtub_shark: apeiros: it's not called "make" on irc, it's called "/kick" ;)
[20:35:50] apeiros: ah, but kick is overpowered for people who can't manage to make sense :)
[20:37:44] KeyJoo: has joined #ruby
[20:38:08] bathtub_shark: that depends on how persistent they are in not making sense
[20:38:52] eckhardt_: has joined #ruby
[20:42:31] ramfjord: has joined #ruby
[20:42:49] JJonah: is it possible (somehow) to get a ruby thread to start before the method which kicks it off exits? ie, i am trying to avoid the hanging, without output, I get here: https://eval.in/1052858
[20:45:38] ramfjord: JJonah: is that not printing hi for you? If you call #join (as you're doing), it will not only start but finish the thread before #join returns.
[20:46:53] JJonah: ramfjord: it will print, but only after the sleep finishes. i want the thread to start when it actually starts, and i was assuming the sleep affects only the main thread...
[20:47:49] ramfjord: JJonah: that could just be because stdout is buffered, not necessarily because the thread hasn't executed
[20:48:17] ramfjord: try `STDOUT.sync = true`
[20:48:35] ramfjord: http://ruby-doc.org/core-2.5.1/IO.html#method-i-sync-3D
[20:48:54] JJonah: ramfjord: ah! you're right. if i raise an exception it goes immediately. ty
[20:50:06] lomex: has joined #ruby
[20:53:58] thejs: has joined #ruby
[20:54:50] kspencer: has joined #ruby
[20:57:59] havenwood: JJonah: You can also: puts "hi\n"
[20:58:18] JJonah: havenwood: ty, good to know
[20:58:20] havenwood: JJonah: An explicit newline prints in the same operation as the line.
[20:59:25] dbz_: has joined #ruby
[21:02:16] dbz__: has joined #ruby
[21:05:41] ivanskie: has joined #ruby
[21:11:40] apeiros: bathtub_shark: yeah, there's some truth to that :D
[21:19:53] tdy: has joined #ruby
[21:20:20] dbz: has joined #ruby
[21:20:32] LiftLeft: has joined #ruby
[21:22:05] dbz: has joined #ruby
[21:29:24] LiftLeft2: has joined #ruby
[21:34:25] lemonandroid: kapil___did the gist help?
[21:36:06] MiLLiYEtCHi: has joined #ruby
[21:37:08] clorisu: has joined #ruby
[21:41:53] dextrey: has joined #ruby
[21:52:29] akaiiro: has joined #ruby
[21:54:18] rkoller: has joined #ruby
[22:03:11] cthulchu: what does this mean? end.parse!
[22:03:33] baweaver: cthulchu: OptParser probably
[22:03:37] baweaver: Read its docs
[22:04:12] baweaver: Has a bang because it mutates ARGV, which is why I tend to prefer ljarvis's Slop instead.
[22:06:03] Creatornator: has joined #ruby
[22:10:09] dbz: has joined #ruby
[22:10:39] eckhardt_: has joined #ruby
[22:13:09] dbz: has joined #ruby
[22:13:31] druonysus: has joined #ruby
[22:15:12] cinnamntig3r: has joined #ruby
[22:16:14] mroutis: has joined #ruby
[22:16:40] dbz: has joined #ruby
[22:18:35] Paraxial: has joined #ruby
[22:27:43] lxsameer: has joined #ruby
[22:28:02] orbyt_: has joined #ruby
[22:33:42] DTZUZO: has joined #ruby
[22:34:14] nofxx: cthulchu, something { bla }.and(foo) == something do bla end.and(foo)
[22:34:48] baweaver: (though the second is super super ugly and makes baweaver cry)
[22:37:05] nofxx: baweaver, it makes me want to buy an AR-15 or maybe steal a tank... well, same trigger, different reactions
[22:37:33] baweaver: Maybe a bit much for the channel.
[22:37:49] baweaver: Also not a fan of implied violence or jokes thereto
[22:38:23] cthulchu: nofxx, I didn't know we could do that... I don't know how it workd
[22:38:42] cthulchu: is and a method of the something?
[22:38:47] baweaver: Blocks can be delimited with `do ... end` or `{ ... }`
[22:39:00] cthulchu: how can we do . to blocks
[22:39:06] nofxx: cthulchu, a method of the block's response
[22:39:06] cthulchu: and how it works
[22:39:17] nofxx: baweaver, bah, no 'buts and ifs' on jokes
[22:39:22] cthulchu: you mean return
[22:39:39] cthulchu: a method of the block's return
[22:39:59] cthulchu: now will that thing fire on every method call?
[22:41:04] troulouliou_dev: has joined #ruby
[22:42:09] apeiros: has joined #ruby
[22:44:24] troulouliou_dev: has joined #ruby
[22:45:47] joast: has joined #ruby
[23:02:28] dbz: has joined #ruby
[23:04:05] troulouliou_dev: has joined #ruby
[23:05:18] apeiros: has joined #ruby
[23:07:01] dbz: has joined #ruby
[23:07:46] dbz: has joined #ruby
[23:10:35] canton7: has joined #ruby
[23:11:51] clorisu: whats the difference between hash and hsh?
[23:12:43] baweaver: One is missing an a
[23:12:54] baweaver: What code did you see it in?
[23:13:40] Nuru: has joined #ruby
[23:26:19] apeiros: has joined #ruby
[23:30:35] clorisu: baweaver: in the ruby docs
[23:48:19] apeiros: has joined #ruby
[23:51:36] arescorpio: has joined #ruby