« Back to channel list

#ruby - 04 May 2017

« Back 1 day Forward 1 day »
[00:02:25] __Yiota: has joined #ruby
[00:06:55] rails4444: has joined #ruby
[00:07:22] patarr: has joined #ruby
[00:07:56] chouhoulis: has joined #ruby
[00:08:34] charliesome: has joined #ruby
[00:10:38] JeanCarloMachado: has joined #ruby
[00:11:44] Ellimist: has joined #ruby
[00:12:25] chouhoul_: has joined #ruby
[00:14:00] Polysics_: has joined #ruby
[00:19:35] yolobob: has joined #ruby
[00:19:46] sp4rrow: has joined #ruby
[00:20:47] mattwc: has joined #ruby
[00:20:49] HashNuke: has joined #ruby
[00:20:50] podman: has joined #ruby
[00:21:13] rrichardsr3: has joined #ruby
[00:21:16] Iacobus: has joined #ruby
[00:21:23] patarr: has joined #ruby
[00:21:29] gmcintire: has joined #ruby
[00:24:44] esObe_: has joined #ruby
[00:26:03] enterprisey: has joined #ruby
[00:26:26] jenrzzz: has joined #ruby
[00:26:26] jenrzzz: has joined #ruby
[00:30:22] JoshS: has joined #ruby
[00:31:55] __Yiota: has joined #ruby
[00:34:36] Guest96: has joined #ruby
[00:36:00] brent__: has joined #ruby
[00:36:48] nicesignal: has joined #ruby
[00:37:39] ahrs: has joined #ruby
[00:42:40] skade_: has joined #ruby
[00:44:16] JeanCarloMachado: has joined #ruby
[00:45:14] dcunit3d: has joined #ruby
[00:45:16] charliesome: has joined #ruby
[00:47:12] GinoMan2440: has joined #ruby
[00:48:15] MasterAsia: Is it possible for a module to have an instance variable?
[00:51:25] eljimmy: has joined #ruby
[00:57:00] excph: has joined #ruby
[00:57:21] excph: Hello ! I heard in ruby i can write bug free codes ??
[00:57:49] llua: puts 'Hello world!'
[00:58:11] PresidentBiscuit: has joined #ruby
[00:58:44] excph: I dont know much about ruby, but how can i allow semicolon after each line of code?
[01:02:50] __Yiota: has joined #ruby
[01:03:52] p0p0pr37_: has joined #ruby
[01:03:52] p0p0pr37_: has joined #ruby
[01:04:55] mjora7: has joined #ruby
[01:05:09] Channel6: has joined #ruby
[01:05:10] xco: has left #ruby: ()
[01:05:34] duderonomy: has joined #ruby
[01:05:47] PaulCape_: has joined #ruby
[01:05:57] JeanCarloMachado: has joined #ruby
[01:11:04] gbailey: has joined #ruby
[01:11:09] d^sh: has joined #ruby
[01:18:26] havenwood: masterasia: Yes, though there's only one instance of a module. If you show us how you're thinking of using them we might have better options.
[01:18:38] mjora7: has joined #ruby
[01:22:19] cschneid_: has joined #ruby
[01:22:49] PresidentBiscuit: has joined #ruby
[01:23:18] AnoHito: has joined #ruby
[01:23:25] Alina-malina: has joined #ruby
[01:23:48] Vile`: has joined #ruby
[01:29:55] duderono_: has joined #ruby
[01:33:22] BSAlb: has joined #ruby
[01:36:12] BSaboia: has joined #ruby
[01:36:26] havenwood: masterasia: It's possible what you have is more of a Singleton Class, see Singleton: https://ruby-doc.org/stdlib/libdoc/singleton/rdoc/Singleton.html
[01:36:59] MasterAsia: havenwood, thanks. I was trying to write a small memoization module
[01:37:23] MasterAsia: I wanted classes that included the module
[01:37:28] MasterAsia: to inherit the instance variables
[01:37:38] MasterAsia: so that the classes dont have to initialize it
[01:37:57] AnoHito: has joined #ruby
[01:38:09] havenwood: masterasia: If you have no state to instantiate, module. If you have one instance of state, singleton class. If you have multiple instances of state, class.
[01:38:41] havenwood: Maybe not relevant to what you're doing. Shareable code?
[01:41:01] sp4rrow: has joined #ruby
[01:44:09] skade_: has joined #ruby
[01:44:12] JeanCarloMachado: has joined #ruby
[01:46:32] iliketurtles: has joined #ruby
[01:48:25] cschneid_: has joined #ruby
[01:53:35] __Yiota: has joined #ruby
[01:53:41] gizmore|2: has joined #ruby
[02:04:31] BSAlb: has joined #ruby
[02:04:44] ahrs: has joined #ruby
[02:05:05] libastral: has joined #ruby
[02:06:00] ben_: has joined #ruby
[02:07:41] PresidentBiscuit: has joined #ruby
[02:10:53] JeanCarloMachado: has joined #ruby
[02:14:11] Jameser: has joined #ruby
[02:16:10] mim1k: has joined #ruby
[02:17:29] sp4rrow: has joined #ruby
[02:19:31] charliesome: has joined #ruby
[02:20:24] genpaku: has joined #ruby
[02:21:21] JeanCarloMachado: has joined #ruby
[02:26:12] bataii: has joined #ruby
[02:28:30] andrevan: has joined #ruby
[02:31:30] milardovich: has joined #ruby
[02:31:54] Dry_Lips: has joined #ruby
[02:31:54] Dry_Lips: has joined #ruby
[02:32:34] eljimmy: has joined #ruby
[02:33:44] eljimmy: has joined #ruby
[02:36:04] gnufied: has joined #ruby
[02:41:03] hutch34: has joined #ruby
[02:43:09] mjora7: has joined #ruby
[02:44:46] preyalone: has joined #ruby
[02:44:53] eljimmy: has joined #ruby
[02:45:41] skade_: has joined #ruby
[02:45:45] eljimmy: has joined #ruby
[02:46:31] eljimmy: has joined #ruby
[02:46:49] duderonomy: has joined #ruby
[02:47:21] eljimmy: has joined #ruby
[02:48:05] eljimmy: has joined #ruby
[02:48:42] Polysics: has joined #ruby
[02:48:56] eljimmy: has joined #ruby
[02:50:38] jenrzzz: has joined #ruby
[02:50:39] jenrzzz: has joined #ruby
[02:50:55] iliketurtles: has joined #ruby
[02:56:20] JeanCarloMachado: has joined #ruby
[02:58:47] szulak: has joined #ruby
[02:59:17] milardovich: has joined #ruby
[02:59:25] OldN0rse: has joined #ruby
[03:00:28] elsevero: has joined #ruby
[03:02:31] Komic_: has joined #ruby
[03:03:43] OldN0rse_: has joined #ruby
[03:04:20] jgnagy_: has joined #ruby
[03:04:33] charliesome_: has joined #ruby
[03:04:34] cardoni_: has joined #ruby
[03:04:56] mahlon__: has joined #ruby
[03:05:05] nopacienc3: has joined #ruby
[03:05:30] avdi_: has joined #ruby
[03:05:47] preyalone_: has joined #ruby
[03:05:50] Yxhvd: has joined #ruby
[03:05:57] kentnl: has joined #ruby
[03:06:13] pifon1: has joined #ruby
[03:06:47] TvL2386: has joined #ruby
[03:06:55] ec\_: has joined #ruby
[03:07:06] claw: has joined #ruby
[03:07:10] Rush: has joined #ruby
[03:07:35] nishiki_: has joined #ruby
[03:08:42] sp4rrow: has joined #ruby
[03:08:44] gix: has joined #ruby
[03:09:17] jcao219: has joined #ruby
[03:09:26] watersoul_: has joined #ruby
[03:10:10] skweek: has joined #ruby
[03:10:30] tekacs: has joined #ruby
[03:10:33] SuperChickeNES: has joined #ruby
[03:10:36] spk_: has joined #ruby
[03:10:42] pocketprotector-: has joined #ruby
[03:10:43] codefromhell: has joined #ruby
[03:10:44] DenSchub_: has joined #ruby
[03:10:45] ablackack: has joined #ruby
[03:11:00] justinmrkva_: has joined #ruby
[03:11:19] lele: has joined #ruby
[03:11:22] Subfusc_: has joined #ruby
[03:11:40] lel-: has joined #ruby
[03:12:36] cyberRodent: has joined #ruby
[03:13:15] soahccc: has joined #ruby
[03:13:48] mjora7: has joined #ruby
[03:14:02] csk: has joined #ruby
[03:14:56] bauruine_: has joined #ruby
[03:15:05] yeticry: has joined #ruby
[03:15:18] Hobbyboy: has joined #ruby
[03:16:29] mjora7: has joined #ruby
[03:16:47] GinoMan2440: has joined #ruby
[03:18:20] minimalism: has joined #ruby
[03:18:33] atmosx: has joined #ruby
[03:19:13] yeticry_: has joined #ruby
[03:19:17] JeanCarloMachado: has joined #ruby
[03:20:00] Sou|cutter: has joined #ruby
[03:20:10] andrevan: has joined #ruby
[03:23:22] JoshS: has joined #ruby
[03:24:27] yeticry: has joined #ruby
[03:25:31] krasnus: has joined #ruby
[03:32:05] guardianJ: has joined #ruby
[03:34:27] guardianJ: has joined #ruby
[03:37:29] JeanCarloMachado: has joined #ruby
[03:43:16] charliesome: has joined #ruby
[03:44:36] droptone: has joined #ruby
[03:47:13] skade_: has joined #ruby
[03:51:55] Vile`: has joined #ruby
[03:53:54] Jayson_Virissimo: has joined #ruby
[03:56:23] JeanCarloMachado: has joined #ruby
[03:58:15] milardovich: has joined #ruby
[04:01:26] izzimus: has joined #ruby
[04:01:28] charliesome: has joined #ruby
[04:01:40] SeanPan: has joined #ruby
[04:04:26] hutch34: has joined #ruby
[04:05:52] bitcycle: has joined #ruby
[04:06:23] gix: has joined #ruby
[04:08:28] izzimus: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[04:09:18] JeanCarloMachado: has joined #ruby
[04:09:40] claw: has joined #ruby
[04:12:01] SeanPan: has joined #ruby
[04:16:40] mim1k: has joined #ruby
[04:21:28] anisha: has joined #ruby
[04:21:30] jenrzzz: has joined #ruby
[04:21:30] jenrzzz: has joined #ruby
[04:28:24] kev1n: has joined #ruby
[04:31:28] JeanCarloMachado: has joined #ruby
[04:31:45] mjora7: has joined #ruby
[04:34:09] renchan: has joined #ruby
[04:37:02] Kevin: has joined #ruby
[04:39:46] kev1n: has joined #ruby
[04:41:14] JeanCarloMachado: has joined #ruby
[04:43:10] Ellimist: has joined #ruby
[04:45:05] hutch34: has joined #ruby
[04:46:00] milardovich: has joined #ruby
[04:48:43] skade_: has joined #ruby
[04:49:52] rkazak: has joined #ruby
[04:50:54] elsevero: has joined #ruby
[04:51:30] perniciouscaffei: has joined #ruby
[04:53:54] mooser: has joined #ruby
[04:57:25] rkellermeyer: has joined #ruby
[04:59:32] yeticry: has joined #ruby
[05:01:22] jeyraof^mbpr: has joined #ruby
[05:02:39] JeanCarloMachado: has joined #ruby
[05:03:53] DrCode: has joined #ruby
[05:05:49] PresidentBiscuit: has joined #ruby
[05:10:45] jcao219: has joined #ruby
[05:11:31] SeanPan: has joined #ruby
[05:12:01] SeanPan: has joined #ruby
[05:12:49] DrCode: has joined #ruby
[05:13:07] podman: has joined #ruby
[05:13:10] Iacobus: has joined #ruby
[05:14:38] astrobunny: has joined #ruby
[05:14:49] bataii: has joined #ruby
[05:15:35] dionysus69: has joined #ruby
[05:17:56] zenspider: has joined #ruby
[05:22:38] Bock: has joined #ruby
[05:24:27] zenspider: "I wanted classes that included the module to inherit the instance variables" == class variables
[05:24:32] zenspider: that's exactly what they're for
[05:25:57] JeanCarloMachado: has joined #ruby
[05:29:26] SeanPan: has joined #ruby
[05:29:32] esObe_: has joined #ruby
[05:29:41] SeanPan: has joined #ruby
[05:32:00] guardianJ: has joined #ruby
[05:33:15] ih8d0g: has joined #ruby
[05:34:03] PaulCapestany: has joined #ruby
[05:34:39] JeanCarloMachado: has joined #ruby
[05:36:14] bataii: has joined #ruby
[05:37:44] DrCode: has joined #ruby
[05:39:44] skade_: has joined #ruby
[05:45:50] droptone: has joined #ruby
[05:50:52] JeanCarloMachado: has joined #ruby
[05:51:59] User458764: has joined #ruby
[05:53:35] User458764: has joined #ruby
[05:55:21] iliketurtles: has joined #ruby
[05:56:57] ^mtkd: has joined #ruby
[05:59:05] Yxhvd: The number of times I've needed the distinction from constants in the class scope can be counted on one digit though.
[06:02:25] anisha: has joined #ruby
[06:04:16] jaruga: has joined #ruby
[06:04:25] guardianJ: has joined #ruby
[06:06:49] mjora7: has joined #ruby
[06:13:48] JeanCarloMachado: has joined #ruby
[06:14:12] jusa: has joined #ruby
[06:14:27] blackwind_123: has joined #ruby
[06:17:07] mim1k: has joined #ruby
[06:23:00] Mortomes|Work: has joined #ruby
[06:23:11] Cohedrin: has joined #ruby
[06:26:40] bataii: has joined #ruby
[06:27:18] JeanCarloMachado: has joined #ruby
[06:28:13] Alina-malina: has joined #ruby
[06:35:26] conta: has joined #ruby
[06:35:33] last_staff: has joined #ruby
[06:42:33] kristofferR: has joined #ruby
[06:43:11] jusa: has joined #ruby
[06:46:40] mim1k: has joined #ruby
[06:48:01] JeanCarloMachado: has joined #ruby
[06:48:30] grh: has joined #ruby
[06:49:14] bataii: has joined #ruby
[06:49:34] Polysics: has joined #ruby
[06:50:16] Pumukel: has joined #ruby
[06:51:24] jcao219: has joined #ruby
[06:51:30] User458764: has joined #ruby
[06:51:45] mtkd: has joined #ruby
[06:52:15] guardianJ: has joined #ruby
[06:52:21] rgr_: has joined #ruby
[06:53:53] andikr: has joined #ruby
[06:57:46] JeanCarloMachado: has joined #ruby
[06:58:17] jenrzzz: has joined #ruby
[06:58:17] jenrzzz: has joined #ruby
[06:59:34] burgestrand: has joined #ruby
[07:01:37] anisha: has joined #ruby
[07:02:53] xall: has joined #ruby
[07:03:58] armyriad: has joined #ruby
[07:05:01] __Raiden__: has joined #ruby
[07:10:00] JeanCarloMachado: has joined #ruby
[07:12:38] ddffg: has joined #ruby
[07:17:46] username1: has joined #ruby
[07:18:08] modin: has joined #ruby
[07:21:05] Xakotu: has joined #ruby
[07:21:30] quobo: has joined #ruby
[07:22:38] TreyG: has joined #ruby
[07:30:24] mark_66: has joined #ruby
[07:31:03] esObe_: has joined #ruby
[07:32:38] djbkd: has joined #ruby
[07:33:02] Xakotu: has joined #ruby
[07:34:53] JeanCarloMachado: has joined #ruby
[07:34:56] antgel: has joined #ruby
[07:38:25] franck_: has joined #ruby
[07:39:15] esObe_: has joined #ruby
[07:41:14] guardianJ: has joined #ruby
[07:42:44] __Raiden__: has joined #ruby
[07:45:19] JeanCarloMachado: has joined #ruby
[07:46:28] ksinkar: has joined #ruby
[07:47:09] TvL2386: has joined #ruby
[07:48:44] BTRE: has joined #ruby
[07:50:52] JeanCarloMachado: has joined #ruby
[07:51:37] ksinkar: Just read a function signature similar to `def some_function(param_a:, param_b:, param_c:)` Any idea what is the meaning of these params with a colon at the end of the identifier. In the function body they are simply being accessed as `param_a` and there seems to be nothing special about `param_a:` in the the argument list.
[07:52:42] herwin: you call it like "some_function(param_a: 'foo', param_b: 'bar')"
[07:52:57] herwin: it's great for having a bunch of optional parameters
[07:53:30] herwin: or as an illustration of the purpose of the parameter, 'foo(option1: true)' is clearer than 'foo(true)'
[07:53:39] PresidentBiscuit: has joined #ruby
[07:54:22] skade_: has joined #ruby
[07:54:39] jaruga: has joined #ruby
[07:54:46] Guest96: has joined #ruby
[07:55:12] jcao219: has joined #ruby
[07:57:07] patarr: has joined #ruby
[07:58:09] jsrn_: has joined #ruby
[07:58:49] JeanCarloMachado: has joined #ruby
[08:02:58] biberu: has joined #ruby
[08:03:25] blackmesa: has joined #ruby
[08:04:01] mikecmpbll: has joined #ruby
[08:04:14] JeanCarloMachado: has joined #ruby
[08:04:19] Silthias: has joined #ruby
[08:04:51] marr: has joined #ruby
[08:06:12] bitcycle: has joined #ruby
[08:09:20] bataii: has joined #ruby
[08:11:04] bsartek: has joined #ruby
[08:13:30] soc42: has joined #ruby
[08:15:50] DuivesteijnM: has joined #ruby
[08:15:59] JeanCarloMachado: has joined #ruby
[08:18:36] havenwood: ksinkar: Ruby 2 introduced keyword arguments. They're nice.
[08:19:25] havenwood: It's a nicer way than an options hash to have arguments like that.
[08:21:32] ksinkar: havenwood: thanks
[08:24:19] tomphp: has joined #ruby
[08:25:28] JeanCarloMachado: has joined #ruby
[08:26:04] jenrzzz: has joined #ruby
[08:29:31] hxegon: has joined #ruby
[08:29:40] leitz: has joined #ruby
[08:31:48] DrCode: has joined #ruby
[08:32:15] guardianJ: has joined #ruby
[08:34:30] TreyG: has joined #ruby
[08:36:35] JeanCarloMachado: has joined #ruby
[08:37:36] leitz: What Ruby tool do I use to simultaneously go do something on a bunch of servers? The idea is that the program can start something that takes a couple seconds but not take N * a_couple_seconds to finish.
[08:39:03] excph: has left #ruby: ()
[08:40:45] Silthias: leitz: the thing that jumps to mind is Choria/MCollective, I think they are written in Ruby (from what I recall), so you can then use it nativly within other Ruby apps/scripts.
[08:42:29] aupadhye: has joined #ruby
[08:46:14] Beams: has joined #ruby
[08:47:07] jaruga: has joined #ruby
[08:49:22] cfec0b8d: has joined #ruby
[08:51:08] KeyJoo: has joined #ruby
[08:52:10] JeanCarloMachado: has joined #ruby
[08:52:18] havenwood: leitz: When you say "go do something", what do you mean? Waiting for IO response? Computations?
[08:52:35] Mortomes|Work_: has joined #ruby
[08:52:46] ljarvis: just sounds like dispatch, so... Thread.new? :D
[08:54:28] mjora7: has joined #ruby
[08:54:40] havenwood: sounds like a job for computational parallel flows on top of GenStage, ahem, I mean... yeah, Threads. :-)
[08:55:53] havenwood: leitz: Typhoeus is one of many lovely Ruby HTTP libraries that does parallel requests particularly well: https://github.com/typhoeus/typhoeus
[08:56:18] havenwood: leitz: There are many options.
[08:56:48] Cohedrin: has joined #ruby
[08:58:48] guidos: has joined #ruby
[08:58:48] __Raiden__: has left #ruby: ("Leaving")
[08:59:01] __Raiden__: has joined #ruby
[08:59:15] __Raiden__: has left #ruby: ("Leaving")
[08:59:22] __Raiden__: has joined #ruby
[09:01:03] lxsameer: has joined #ruby
[09:03:14] leitz: We have servers that are on ntp but still going out of sync. So the idea is to give it a list of servers; for each server "time_start = <seconds_since_epoch>, time_remote = <remote_seconds_since_epoch>, time_end = <seconds_since_epoch>" As long as the remote host's time is between the start and end, we're good.
[09:04:24] leitz: I'd like to have it do all the servers "at once", realizing that "at once" isn't nanosecond "at once". I would prefer a 3 second task on 100 servers take less than 300 seconds.
[09:04:33] anisha: has joined #ruby
[09:04:53] lipoqil: has joined #ruby
[09:05:08] ovaltine1: has joined #ruby
[09:05:14] leitz: 10 seconds would be a great goal.
[09:05:21] leitz: Faster is better.
[09:07:04] AlexRussia: has joined #ruby
[09:07:23] JeanCarloMachado: has joined #ruby
[09:12:55] leitz: Hmm..."net/ssh" isn't avaialb e for 2.4.0?
[09:13:22] leitz: Or am I more confused.
[09:14:27] havenwood: leitz: gem install net-ssh
[09:14:56] leitz: Jsut found that.
[09:16:15] Daneel: has left #ruby: ("wizzzzzzz")
[09:18:02] JeanCarloMachado: has joined #ruby
[09:18:24] guardianJ: has joined #ruby
[09:21:03] vayan: has joined #ruby
[09:22:14] leitz: Hmm....exec, spawn, and system don't seem to give me what I need locally. Trying to set "time_now" to the results of "date +%s".
[09:22:40] leitz: Using the date locally ensures the same output format as the remote.
[09:23:43] bataii: has joined #ruby
[09:25:56] guardianJ_: has joined #ruby
[09:26:16] JeanCarloMachado: has joined #ruby
[09:28:48] arne: i have an array with a lot of numbers where many ( but not all ) are in order, and it's really big
[09:28:51] arne: how would i compress that?
[09:29:12] rrichardsr3: has joined #ruby
[09:29:15] arne: a.e [1,2,3,4,5,6,...,10000,10001,10002,10004,...,11000,....]
[09:29:26] arne: note the gap between 10002,10004
[09:30:04] arne: i have no chocie right, i have to read them all?
[09:30:11] canton7: what do you mean by "compress"?
[09:30:33] arne: well, i certainly could do [[start,end],[start,end]]
[09:30:45] canton7: I thought you meant come up with a representation which uses less space but contains the same information, then you said you have to read them all...
[09:31:25] arne: do i? if they're ordered and no duplicates?
[09:31:36] romank: has joined #ruby
[09:31:37] JeanCarloMachado: has joined #ruby
[09:31:38] arne: i mean, couldn't i jump 20 ahead, check if it's the number i expect it to be
[09:31:59] herwin: you could, if you want to make it more difficult
[09:32:10] canton7: so is your question "I have this array, I want to create a compressed representation, but I don't want to read each element to do so"?
[09:33:56] arne: well, not really, because if i could read every element quick. i wouldn't care.
[09:34:18] havenwood: >> [1,2,3,4,5,6,10000,10001,10002,10004].chunk_while { |before, after| before.succ == after }.map { |a| a.one? ? a.first : a.first..a.last } # arne
[09:34:19] arne: so it would be, i have an array with numbers ordered, no duplicates, not many gaps, and i want it compressed, but fast.
[09:34:19] ruby[bot]: havenwood: # => [1..6, 10000..10002, 10004] (https://eval.in/786906)
[09:34:53] canton7: you'll have to micro-benchmark, then
[09:35:08] canton7: doing something fancy will have overhead. the question is whether it's worth it. you'll need to benchmark to find out
[09:35:19] arne: ACTION googles chunck_while
[09:35:28] canton7: you'll also need to tune your binary search approach (e.g. number of entries to skip ahead), and you'll need benchmarks to guide that
[09:35:38] canton7: ... and it'll depend on the exact characteristics of your data
[09:36:30] arne: oy thats cool
[09:37:05] arne: thanks a lot havenwood
[09:39:49] guardianJ: has joined #ruby
[09:39:54] jenrzzz: has joined #ruby
[09:39:54] jenrzzz: has joined #ruby
[09:40:40] arne: chunk_while, fancy shit
[09:41:13] herwin: but it doesn't do what you asked for
[09:41:28] arne: yeah i know, it doesn't do that binary search approach
[09:42:01] arne: that would require a more sophisticated version of chunk_while i gues
[09:43:18] nadir: has joined #ruby
[09:46:39] tweezer: has joined #ruby
[09:46:42] Bish: asm>> p *[[1],[2],[3]]
[09:46:43] ruby[bot]: Bish: I have disassembled your code, the result is at https://eval.in/786935
[09:47:48] Bish: asm>> p *(3..100);p (3..100).to_a
[09:47:49] ruby[bot]: Bish: I have disassembled your code, the result is at https://eval.in/786938
[09:47:53] Bish: is splat faster than to_a?
[09:47:53] triticus: has joined #ruby
[09:49:11] leitz: Is there an easy way to uninstall recently installed gems?
[09:49:15] leitz: Besides manually?
[09:49:26] Bish: uninstall all and reinstall those u need?
[09:49:48] leitz: Not seeing that as easy.
[09:49:56] colstrom: has joined #ruby
[09:50:04] Bish: why is that not easy?
[09:50:13] Bish: gem uninstall -aIx, if i remembeer correctly
[09:50:51] Bish: no gems left, every project you work on should have a Gemfile, so you just bundle, get a cup of coffee and it works?
[09:50:57] Bish: and user docker, docker is hip.
[09:51:15] leitz: It's the "reinstall those you need" bit that requires human intervention. If gem uninstall took the entire gem name, including version, it would make finding and removing new ones easy.
[09:51:45] vali: has joined #ruby
[09:51:50] mattwc: has joined #ruby
[09:52:13] Bish: leitz: well you can uninstall certain versions
[09:52:22] Bish: to find out which have been installed "recently" is the hard part i guess
[09:52:31] leitz: Lean, Secure, and Productive are hip
[09:52:44] leitz: To me, anyway.
[09:53:14] Bish: reinstall those you need does not need human intervention.. if you have gemfiles
[09:53:27] leitz: ls -lart in the gem repo shows the gems and install dates. But the gem names have versions which gem uninstall can't use.
[09:53:34] leitz: Far as I can tell, anyway.
[09:54:05] bsartek: has joined #ruby
[09:54:55] Bish: gem uninstall rjb --version 1.1.9
[09:55:11] guardianJ: has joined #ruby
[09:55:15] Bish: http://stackoverflow.com/questions/5902488/uninstall-old-versions-of-ruby-gems
[09:56:21] xall: has joined #ruby
[09:56:26] dmnd: has joined #ruby
[09:56:36] ferr: has joined #ruby
[09:56:56] mim1k: has joined #ruby
[09:56:59] esObe: hi guys, I'm learning sinatra, now trying to build a reddit app based on the tutorial http://www.drurly.com/blog/2012/06/05/build-reddit-in-sinatra/. I cut haml snippet code from reddit.rb file and pasted to views/index.haml and now after running server I can see error 'LocalJumpError at / no block given (yield)'
[09:57:08] esObe: my gist: https://gist.github.com/anonymous/56d14f193ecb1ce18827be5d2520d9b9
[09:57:19] esObe: Can someone help me, please?
[09:57:59] patarr: has joined #ruby
[09:58:02] Iacobus: has joined #ruby
[09:58:05] ljarvis: esObe: please paste the full exception backtrace
[09:58:10] hutch34: has joined #ruby
[09:58:38] bsartek: has joined #ruby
[09:58:38] ljarvis: ah nvm it's in the title
[09:58:43] ljarvis: well, enough of it anyway
[09:58:56] ljarvis: esObe: the = yield is the problem
[09:58:59] esObe: yeah still learning
[09:59:11] ljarvis: esObe: why is that there?
[10:00:02] ljarvis: what I would recommend: adding a `layout.haml` and having line 1-14 in there, and then that yield will add the source of `index.haml`
[10:00:46] ljarvis: your individual pages (e.g. index.haml, post.haml) are not really meant to contain layout information (lines 1-14).
[10:03:16] esObe: thank you! I will do it
[10:04:45] xall: has joined #ruby
[10:06:22] gmcintire: has joined #ruby
[10:06:53] silverdust: has joined #ruby
[10:08:25] Bish: turns out, just gzipping the huge array
[10:08:28] Bish: has a big effect already
[10:10:38] zack6849: has joined #ruby
[10:10:38] zack6849: has joined #ruby
[10:15:11] AlexRussia: has joined #ruby
[10:19:05] rails4444: has joined #ruby
[10:19:38] xall: has joined #ruby
[10:20:10] roonsauce: has joined #ruby
[10:23:48] gnufied: has joined #ruby
[10:24:32] GodFather__: has joined #ruby
[10:28:19] amitchellbullard: has joined #ruby
[10:28:24] dionysus69: has joined #ruby
[10:30:35] huddy: has joined #ruby
[10:30:58] tweezer: has joined #ruby
[10:31:08] mim1k: has joined #ruby
[10:34:57] User458764: has joined #ruby
[10:35:29] User458764: has joined #ruby
[10:36:07] xall: has joined #ruby
[10:41:23] PresidentBiscuit: has joined #ruby
[10:41:42] xall: has joined #ruby
[10:44:49] hutch34: has joined #ruby
[10:46:36] mtkd: has joined #ruby
[10:48:28] herbmillerjr: has joined #ruby
[10:49:28] jaruga: has joined #ruby
[10:49:56] seanh: has joined #ruby
[10:51:12] guardianJ: has joined #ruby
[10:51:31] futilegames: has joined #ruby
[10:54:50] coredump: has joined #ruby
[10:55:14] bigkevmcd: has joined #ruby
[10:58:10] DaveTaboola: has joined #ruby
[11:01:35] Guest96: has joined #ruby
[11:02:03] Asher: has joined #ruby
[11:04:52] tvw: has joined #ruby
[11:05:47] oleo: has joined #ruby
[11:07:19] guardianJ: has joined #ruby
[11:11:18] ksinkar`: has joined #ruby
[11:11:50] hutch34: has joined #ruby
[11:11:57] DaveTaboola: has joined #ruby
[11:12:29] t-recx: has joined #ruby
[11:15:26] duckpupp1: has joined #ruby
[11:18:32] username1: has joined #ruby
[11:20:17] bataii: has joined #ruby
[11:24:10] mim1k_: has joined #ruby
[11:26:13] guardianJ: has joined #ruby
[11:31:04] hndk: has joined #ruby
[11:32:19] vondruch: has joined #ruby
[11:34:55] nobodyzxc: has joined #ruby
[11:38:42] petruff: has joined #ruby
[11:41:27] JeanCarloMachado: has joined #ruby
[11:43:06] bataii: has joined #ruby
[11:45:06] DaveTaboola: has joined #ruby
[11:50:39] mlehrer: has joined #ruby
[11:56:03] sepp2k: has joined #ruby
[11:56:04] Verity: has joined #ruby
[11:56:09] kristofferR: has joined #ruby
[11:56:15] xall: has joined #ruby
[11:56:22] ldnunes: has joined #ruby
[11:57:14] synthroid: has joined #ruby
[11:58:53] patarr: has joined #ruby
[12:00:08] blackwind_123: has joined #ruby
[12:00:23] synthroid: has joined #ruby
[12:04:35] xall: has joined #ruby
[12:06:17] GodFather__: has joined #ruby
[12:07:28] esObe: hi guys, can someone have a look on my code? I am newbie, I'm learning sinatra, building reddit app and I can't fix the problem below
[12:07:32] esObe: https://gist.github.com/anonymous/aab4f9361c29383df0edc9add95a405d
[12:08:03] esObe: I installed gem time_ago_in_words before
[12:08:57] patarr: has joined #ruby
[12:10:56] silverdust: has joined #ruby
[12:11:11] charliesome: has joined #ruby
[12:12:03] hutch34: has joined #ruby
[12:12:12] esObe: please :)
[12:13:23] nadir: has joined #ruby
[12:13:39] mnemon: esObe: with 10s look over, probably need to require the time_go_in_words gem.
[12:14:45] xall: has joined #ruby
[12:15:34] esObe: done and there is still the same problem
[12:16:23] canton7: esObe, been a while since I did sinatra... but don't you need to define a helper to make something available to templates? http://www.sinatrarb.com/intro.html#Helpers
[12:17:36] canton7: and you'll need the explicit requires in the same file as you define the helper, as shown in the time_ago_in_words readme
[12:18:36] canton7: (although, it would probably be easier to follow the Usage: "require 'time_ago_in_words'" and define your time_ago_in_words helper as 'def time_ago_in_words(time); time.ago_in_words; end'
[12:20:15] marr: has joined #ruby
[12:22:49] cschneid_: has joined #ruby
[12:22:54] thesubr00t: has joined #ruby
[12:22:55] esObe: okay thanks, let's see if it helps
[12:26:58] nertzy2: has joined #ruby
[12:27:22] thesubr00t: I have an array "a" containing all the checkpoints (points), and another array "b" containing the coupled checkpoints (x -> y). How to sort the first array in a way that no y comes after x
[12:27:44] gnufied: has joined #ruby
[12:29:26] millerti: has joined #ruby
[12:36:03] ineb: thesubr00t: you have a directed graph there and tsort is the algorithm for sorting that
[12:36:24] goldleader: has joined #ruby
[12:40:30] toretore: has joined #ruby
[12:42:30] nertzy2: has joined #ruby
[12:44:13] GodFather__: has joined #ruby
[12:44:54] jaruga: has joined #ruby
[12:45:28] vondruch: has joined #ruby
[12:46:49] thesubr00t: has joined #ruby
[12:48:16] skade_: has joined #ruby
[12:55:04] duckpupp1: has joined #ruby
[12:57:28] xall: has joined #ruby
[12:59:26] xall: has joined #ruby
[13:00:36] bataii: has joined #ruby
[13:03:54] blackmesa: has joined #ruby
[13:05:34] nertzy3: has joined #ruby
[13:06:45] rkazak: has joined #ruby
[13:08:05] jamespeach: has joined #ruby
[13:08:18] ledestin: has joined #ruby
[13:12:06] nertzy2: has joined #ruby
[13:14:59] bataii: has joined #ruby
[13:15:15] swills: has joined #ruby
[13:15:45] Silthias1: has joined #ruby
[13:17:23] Silthias2: has joined #ruby
[13:18:31] synthroid: has joined #ruby
[13:19:45] Bacta: has joined #ruby
[13:19:54] xenops: has joined #ruby
[13:20:03] rkellermeyer: has joined #ruby
[13:23:39] PresidentBiscuit: has joined #ruby
[13:24:08] synthroid: has joined #ruby
[13:25:25] Silthias: has joined #ruby
[13:28:20] Silthias1: has joined #ruby
[13:28:41] yogg-saron: has joined #ruby
[13:31:05] TreyG: has joined #ruby
[13:31:21] nertzy2: has joined #ruby
[13:31:34] apparition: has joined #ruby
[13:31:42] DuivesteijnM: has joined #ruby
[13:32:03] Jameser: has joined #ruby
[13:32:59] millerti: has joined #ruby
[13:32:59] synthroid: has joined #ruby
[13:33:17] gaucheph: has joined #ruby
[13:33:29] bataii: has joined #ruby
[13:34:59] DLSteve: has joined #ruby
[13:36:35] Bacta: How can I define my own custom operator in Ruby?
[13:37:22] ljarvis: Bacta: such as?
[13:38:38] synthroid: has joined #ruby
[13:39:45] guardianJ: has joined #ruby
[13:40:58] ljarvis: Bacta: how would you use it?
[13:41:16] Bacta: Set.new([1, 2, 3]) ∪ Set.new([1,2,3])
[13:41:27] Bacta: I can get Set.new([1, 2, 3]).∪ Set.new([1,2,3]) to work but cannot drop the period
[13:41:31] ljarvis: for union?
[13:42:05] ljarvis: you know there's already Set#| right?
[13:42:19] ljarvis: >> require "set"; Set.new([1, 2, 3]) | Set.new([1,2,3])
[13:42:20] ruby[bot]: ljarvis: # => #<Set: {1, 2, 3}> (https://eval.in/787111)
[13:42:29] Bacta: Yeah but I'm a masochist
[13:42:36] planigan: has joined #ruby
[13:42:38] guardianJ: has joined #ruby
[13:42:54] herwin: sed 's/∪/|/' *.rb
[13:42:59] ljarvis: well, the short answer is you can't
[13:43:01] herwin: thereifixedit
[13:44:24] jamespeach: has joined #ruby
[13:45:49] cpruitt: has joined #ruby
[13:47:30] mjuhl: has joined #ruby
[13:48:50] yasu: has joined #ruby
[13:50:25] synthroid: has joined #ruby
[13:53:45] nofxx: has joined #ruby
[13:57:11] haylon_: has joined #ruby
[14:00:23] Jameser`: has joined #ruby
[14:00:50] pulkit4tech: has joined #ruby
[14:02:16] jrafanie: has joined #ruby
[14:06:06] jusa: has joined #ruby
[14:10:00] pupsicle: has joined #ruby
[14:10:29] matp: has joined #ruby
[14:11:19] cpruitt: has joined #ruby
[14:15:10] cdg: has joined #ruby
[14:15:40] ddffg: has joined #ruby
[14:15:59] synthroid: has joined #ruby
[14:17:42] theunraveler: has joined #ruby
[14:17:45] synthroid: has joined #ruby
[14:22:14] randomguy: has joined #ruby
[14:23:03] rkellermeyer: has joined #ruby
[14:28:38] xall: has joined #ruby
[14:32:02] rgr_: has joined #ruby
[14:33:18] KeyJoo: has joined #ruby
[14:33:20] apparition: has joined #ruby
[14:34:51] CrazyEddy: has joined #ruby
[14:36:23] synthroid: has joined #ruby
[14:37:38] randomguy: has joined #ruby
[14:37:42] vuoto: has joined #ruby
[14:41:24] y2mq37: has joined #ruby
[14:41:36] mikecmpb_: has joined #ruby
[14:42:01] chouhoulis: has joined #ruby
[14:42:06] guardianJ: has joined #ruby
[14:42:07] rgr: has joined #ruby
[14:42:13] GodFather__: has joined #ruby
[14:42:18] patarr: has joined #ruby
[14:44:49] Cesario__: has joined #ruby
[14:46:30] xall: has joined #ruby
[14:47:08] mostlybadfly: has joined #ruby
[14:48:06] d10n-work: has joined #ruby
[14:48:25] hutch34: has joined #ruby
[14:48:38] Cesariox: has joined #ruby
[14:49:43] roonsauce: has joined #ruby
[14:51:37] jamesaxl: has joined #ruby
[14:56:15] choke: has joined #ruby
[14:58:18] polishdub: has joined #ruby
[14:59:43] misto: has joined #ruby
[14:59:50] jokke: has joined #ruby
[15:00:53] sp4rrow: has joined #ruby
[15:04:46] Xeago: has joined #ruby
[15:06:30] rippa: has joined #ruby
[15:07:29] dunk: has joined #ruby
[15:08:25] haylon_: has joined #ruby
[15:11:18] randomguy: has joined #ruby
[15:11:20] grymmjack^AFK: has joined #ruby
[15:12:14] mikecmpbll: has joined #ruby
[15:12:38] xall: has joined #ruby
[15:12:52] linetrace: has joined #ruby
[15:15:23] cschneid_: has joined #ruby
[15:16:17] eljimmy: has joined #ruby
[15:16:39] User458764: has joined #ruby
[15:17:21] blackmesa: has joined #ruby
[15:18:41] NeoMalachi: has joined #ruby
[15:19:07] TvL2386: has joined #ruby
[15:20:34] GodFather_: has joined #ruby
[15:21:04] hutch34: has joined #ruby
[15:21:20] skade_: has joined #ruby
[15:22:12] rkellermeyer: has joined #ruby
[15:24:44] xall: has joined #ruby
[15:25:09] xall: has joined #ruby
[15:28:58] haylon_: has joined #ruby
[15:31:03] djbkd: has joined #ruby
[15:31:52] skade_: has joined #ruby
[15:31:59] yqt: has joined #ruby
[15:32:41] patarr1: has joined #ruby
[15:33:44] ltd: has joined #ruby
[15:34:36] xall: has joined #ruby
[15:35:02] nofxx: has joined #ruby
[15:35:13] brent__: has joined #ruby
[15:36:31] beermouse: has joined #ruby
[15:39:19] brent__: has joined #ruby
[15:41:09] brent__: has joined #ruby
[15:44:48] mark_66: has left #ruby: ("PART #elixir-lang :PART #crystal-lang :PING 1493912689")
[15:45:02] perniciouscaffei: has joined #ruby
[15:46:11] gusrub: has joined #ruby
[15:48:28] ChiefAlexander: has joined #ruby
[15:48:38] gusrub: has joined #ruby
[15:49:32] hutch34: has joined #ruby
[15:50:28] synthroid: has joined #ruby
[15:51:22] xall: has joined #ruby
[15:51:49] omarek: has joined #ruby
[15:52:35] omarek: Hi, does Ruby string *slice* creation have O(1) time complexity ? It's O(k) in Python.
[15:53:44] omarek: One person posted his Ruby solution to a programming task, and I can't verify his solution. I get a runtime error. But my understanding of the code is he treats string slice creation as if it was in constant time.
[15:54:25] __Yiota: has joined #ruby
[15:54:57] fusta: has joined #ruby
[15:55:39] [Butch]: has joined #ruby
[15:57:30] xall_: has joined #ruby
[15:58:01] rkazak: has joined #ruby
[16:00:17] eam: @omarek: it probably depends on the character encoding of the string
[16:00:51] herwin: omarek: http://patshaughnessy.net/2012/1/18/seeing-double-how-ruby-shares-string-values
[16:01:30] thoraxe: has joined #ruby
[16:01:32] patarr: has joined #ruby
[16:01:36] eam: herwin: well, part of the problem is that indexing isn't O(1), let alone the potential copy
[16:01:41] amclain: has joined #ruby
[16:02:31] ben_: has joined #ruby
[16:02:37] Hanmac: also from the same page, ruby does store strings under 23 chars different: http://patshaughnessy.net/2012/1/4/never-create-ruby-strings-longer-than-23-characters
[16:03:17] synthroid: has joined #ruby
[16:03:56] thoolihan: has joined #ruby
[16:03:58] blackmesa: has joined #ruby
[16:05:01] sepp2k: has joined #ruby
[16:07:36] omarek: herwin: What I understood as someone who never programmed Ruby is that Ruby shares string data (the same string) as long as the slice contains both ends. But in my case it doesn't.
[16:08:12] omarek: Here's the Ruby program someone posted, and it seems to imply that 'include?' action in slices is O(1) https://dpaste.de/EtKA
[16:08:31] omarek: But I can't test it in online IDE, it has a runtime error.
[16:08:58] omarek: I actually typed that in from a screenshot (the Ruby programmer didn't know how to use <pre><code> in Disqus comments)
[16:10:23] username1: has joined #ruby
[16:10:29] herwin: I fail to see how this snippet implies include? runs in constant time
[16:10:33] mtkd: has joined #ruby
[16:12:15] omarek: The program does something like this: You get a string of nucleotides 'ACTGCCTGACCTGCC' (A:1, C: 2, G: 3, T: 4) and two arrays P, Q. For each pair of p, q in P, Q (for example P[3] and Q[3]) you have to print lowest worth letter in slice p..q
[16:13:35] omarek: Worst time complexity is O(String_length + array_length), and I achieve that with my Python solution. Can Ruby really achieve O(array_length) instead ??
[16:14:34] Hanmac: omarek first thing there is a typo in the dna hash, you need "T" => 4, otherwise you get "TypeError: no implicit conversion of Symbol into String"
[16:14:54] FastJack: has joined #ruby
[16:16:18] mim1k: has joined #ruby
[16:16:36] omarek: hanmac: Thank you, corrected. I used Python syntax. Okay, that guy's solution works, I'll check how the website evaluates its time complexity.
[16:19:01] Hanmac: omarek: ruby has {sym: value} syntax too, but that results in a Symbol which are not 100% equal to a String
[16:19:31] tomphp: has joined #ruby
[16:19:52] omarek: Okay, I tested it. Detected time complexity of the program is O(n+m), the same as Python except I wasn't able to so easily test existence in slices.
[16:20:10] omarek: Slice creation in Python is O(k), where k is slice length.
[16:21:34] Hanmac: i think the code can be optimized, like "dna.each_key do |key|" can be "dna.each do |key, value|" so that you don't need access dna[key] later
[16:22:06] havenwood: omarek: would something simpler like this suffice?: https://gist.github.com/havenwood/6e3ff1f2cb2c84469db445ef088181a0
[16:22:42] havenwood: omarek: give us example values for nucleotides, pint and quail? we can probably help you optimize it.
[16:22:59] havenwood: (what are p and q?)
[16:23:02] Hanmac: havenwood: i think the index might be wrong, but we need more testdata for that
[16:23:05] havenwood: PS - Kernel#p is a thing!
[16:23:23] havenwood: hanmac: aye
[16:23:41] devopsPrashu: has joined #ruby
[16:23:55] devopsPrashu: Hi, can anyone help me to write ChefSpec unit test for chef recipe?
[16:24:21] havenwood: the old solution returned an array as well, but select instead of find didn't seem right for what was described
[16:24:34] havenwood: example input and expected output makes it easy!
[16:24:54] havenwood: devopsPrashu: What have you tried so far? Show us a gist?
[16:25:39] Hanmac: havenwood: https://channel9.msdn.com/achievements/visualstudio/MoreThan20LongLocalAchievement
[16:26:09] bataii: has joined #ruby
[16:27:13] enterprisey: has joined #ruby
[16:28:15] bitcycle: has joined #ruby
[16:29:25] fusta: has joined #ruby
[16:35:24] dhollinger: has joined #ruby
[16:35:37] devopsPrashu: @havenwood I have tried taking help from - https://github.com/sethvargo/chefspec/tree/master/examples but it didn't work very well with my recipe.
[16:37:10] brucebag: has joined #ruby
[16:38:07] DrCode: has joined #ruby
[16:38:28] devopsPrashu: https://github.com/sethvargo/chefspec/tree/master/examples
[16:38:50] nitric: has joined #ruby
[16:39:19] colstrom: has joined #ruby
[16:39:29] Iacobus: has joined #ruby
[16:39:49] vayan: has joined #ruby
[16:40:10] dmnd: has joined #ruby
[16:40:11] amitchellbullard: has joined #ruby
[16:41:01] mattwc: has joined #ruby
[16:41:03] guidos: has joined #ruby
[16:42:36] gmcintire: has joined #ruby
[16:43:08] seanh: has joined #ruby
[16:44:44] coredump: has joined #ruby
[16:44:53] rrichardsr3: has joined #ruby
[16:45:53] Pumukel: has joined #ruby
[16:45:54] roonsauce: has joined #ruby
[16:49:48] roger_rabbit: has joined #ruby
[16:50:34] Polysics: has joined #ruby
[16:51:01] Benshiro: has joined #ruby
[16:51:03] User458764: has joined #ruby
[16:51:38] User458764: has joined #ruby
[16:52:57] lacrosse: has joined #ruby
[16:54:19] ben_: has joined #ruby
[16:58:23] u0_a170: has joined #ruby
[16:59:31] robby__: has joined #ruby
[17:00:48] otherj: has joined #ruby
[17:00:52] lizard2010: has joined #ruby
[17:03:07] rkazak: has joined #ruby
[17:04:37] NeoMalachi: has joined #ruby
[17:06:00] auxbuss: has joined #ruby
[17:06:25] jamesaxl: has joined #ruby
[17:08:16] petruff1: has joined #ruby
[17:08:48] Qer-S: has joined #ruby
[17:11:55] mim1k: has joined #ruby
[17:13:12] Qer-S: I have an hex string like this -> "\\x11\\x22\\x44\\x55" how can I pad it with N number of \x00 so that the total lenght of the string is 100: "\\x11\\x22\\x44\\x55\x00\\x00\\x00\\x00 ......"
[17:15:30] elomatreb: Qer-S: your_string.rjust 100, "\x00"
[17:16:18] Qer-S: oh thanks elomatreb :)
[17:16:34] antgel: has joined #ruby
[17:20:30] lacrosse: has left #ruby: ()
[17:21:05] skade_: has joined #ruby
[17:21:26] postmodern: has joined #ruby
[17:23:11] Mia: has joined #ruby
[17:23:11] Mia: has joined #ruby
[17:23:40] DeeJayh: has joined #ruby
[17:23:52] Benshiro: has joined #ruby
[17:24:13] solocshaw: has joined #ruby
[17:24:14] DeeJayh: How do we continue other tasks on a server while still listening for new client connections, but without relying on a new connection for other parts of the server to function?
[17:24:16] DeeJayh: https://gist.github.com/Ruined1/395d0cb0e97db750acdddd27fc8c13f2
[17:24:59] DeeJayh: would it be as simple as changing the line 5 to be an if, rather than a waiting condition?
[17:26:08] nofxx: has joined #ruby
[17:26:59] thoolihan: has joined #ruby
[17:27:06] kies^: has joined #ruby
[17:35:36] pocketprotector-: has joined #ruby
[17:35:42] DeeJayh: basically, the server is running the logic for games, it needs to accept new client connections so that new clients may authenticate and join in on the games, but games should run regardless, not rely on a new client connection to get touched
[17:36:05] Cohedrin: has joined #ruby
[17:36:14] al2o3-cr: has joined #ruby
[17:40:53] roonsauce: has joined #ruby
[17:41:05] tomphp: has joined #ruby
[17:41:44] DeeJayh: when listening in c, If there are unaccepted connections (governed by the second listen argument) accept just fetches one and it's done... Otherwise it actually waits for connections to become available before returning
[17:42:13] DeeJayh: Which this seems to be doing, but I don't want it to wait for connections, I just want it to accept connections if they're queued up
[17:46:02] Dimik: has joined #ruby
[17:47:20] u0_a170: do anyone know how to import nmap in ruby or just in python
[17:48:27] DeeJayh: third party library
[17:48:27] DeeJayh: https://github.com/sophsec/ruby-nmap
[17:48:42] DeeJayh: Features -Provides a Ruby interface for running nmap. -Provides a Parser for enumerating nmap XML scan files.
[17:50:47] velocity64: has joined #ruby
[17:50:48] DeeJayh: also I stumbled upon Celluloid::IO which I think will answer my question as well, but if anyone has any other suggestions, I'm all ass
[17:54:09] havenwood: DeeJayh: concurrent-ruby has a bunch of high quality concurrency tools as well: https://github.com/ruby-concurrency/concurrent-ruby
[17:54:40] DeeJayh: havenwood: Thank you, I'll have a look at that'
[17:54:43] enterprisey: has joined #ruby
[17:54:50] Polysics: +1 for Celluloid, it's great
[17:54:54] havenwood: DeeJayh: the nio4r behind celluloid::io is great too
[17:55:04] havenwood: https://github.com/socketry/nio4r
[17:55:43] havenwood: nio4r gem**
[17:56:27] DeeJayh: the nice thing about Celluloid though is that it's a direct dropin replacement for socket. everything is the same, but non-blocking (unless you want it to be)
[17:57:29] tomphp: has joined #ruby
[17:58:52] ddffg: has joined #ruby
[18:01:57] grh: has joined #ruby
[18:02:39] majjoha: has left #ruby: ("WeeChat 1.6")
[18:07:11] jrafanie: has joined #ruby
[18:09:51] Mia: has joined #ruby
[18:09:51] Mia: has joined #ruby
[18:10:19] cfec0b8d: has joined #ruby
[18:11:25] roonsauce: has joined #ruby
[18:13:04] ^mtkd: has joined #ruby
[18:13:28] dcunit3d: has joined #ruby
[18:14:14] Qer-S: has joined #ruby
[18:15:57] whysthatso: has joined #ruby
[18:16:52] davidmichaelkarr: has joined #ruby
[18:18:38] solocshaw: has joined #ruby
[18:19:09] User458764: has joined #ruby
[18:19:31] foli: has joined #ruby
[18:23:32] outreachdan: has joined #ruby
[18:26:55] skade_: has joined #ruby
[18:27:17] outreachdan: has joined #ruby
[18:28:14] u0_a170: has joined #ruby
[18:29:24] tercenya: has joined #ruby
[18:31:57] mrd_: has joined #ruby
[18:33:18] blackmesa: has joined #ruby
[18:36:33] AlexRussia: has joined #ruby
[18:38:39] gusrub: has joined #ruby
[18:41:39] agent_white: has joined #ruby
[18:42:19] bataii: has joined #ruby
[18:42:23] mrd_: If i understand correctly MRI 2.3 still using Global VM Lock and parallel threads are not really parallel, although they "linked" to native threads. That makes me lean toward multiprocessing instead of multithreads. But all the information i read was dated back 2012 and i can't find recent official work
[18:42:45] gusrub: has joined #ruby
[18:42:51] mrd_: could someone explain how GVL actually work and how VM switch between threads
[18:43:18] aryaching: has joined #ruby
[18:44:56] duderonomy: has joined #ruby
[18:46:24] daed: when you run "gem server -d /my/directory/", and you cp a .gem file after "gem build" into that directory.. and you add that server as a source, it should find the gem right?
[18:46:59] daed: there's no other command that you need to run to let the gem server know that there's a new gem in that directory?
[18:47:37] mrd_: 2daed: you probably want rebuild index
[18:47:38] daed: "GET /latest_specs.4.8.gz HTTP/1.1" -- i see the gem server's log showing bundler requesting data from it
[18:47:56] daed: mrD_: rebuilding an index?
[18:48:28] mrd_: 2daed: gem generate_index -d /my/directory/
[18:48:47] mrd_: 2daed: more here http://guides.rubygems.org/command-reference/#gem-generate_index
[18:49:01] daed: mrD_: interesting, i don't think any 'gem server' guides list that command anywhere
[18:49:12] thebaffoon: has joined #ruby
[18:50:12] daed: mrD_: Generating Marshal quick index gemspecs for 0 gems
[18:50:18] daed: even that doesn't find the .gem file
[18:50:54] mrd_: did you put yours .gem into /my/path/gems?
[18:51:25] daed: yup, -rw-r--r--. 1 root root 5120 May 4 18:24 new_tickets-0.0.2.gem
[18:51:35] daed: right next to the index files in the /data/repos/gems/ dir
[18:51:42] Qer-S: how can I convert a integer to a hex string. For instance I have 1368 and I want to get "\x00\x00\x05\x58" aligned to 4 bytes
[18:53:27] patarr: has joined #ruby
[18:53:28] Komic_: has joined #ruby
[18:54:28] daed: mrD_: looks like i may need to put it in /data/repos/gems/gems/*.gem
[18:55:56] skweek: has joined #ruby
[18:56:02] daed: mrD_: so now.. Generating Marshal quick index gemspecs for 1 gems, it finds the gem in /data/repos/gems/gems/*.gem on the server... but remote bundler gets index data from gem server (pointing at /data/repos/gems) and doesn't find it
[18:56:50] daed: mrD_: restarted server trying to point at /data/repos/gems/gems and still bundler doesn't find it.. strange
[18:56:56] Eindoofus: has joined #ruby
[18:57:15] mrd_: you need to point to root directory where the index lives
[18:57:20] mrd_: aka /data/repos/gems
[18:57:32] mrd_: in your case
[18:58:34] _haylon: has joined #ruby
[18:58:36] mrd_: did you add source "http://yourserver:port" to Gemfile?
[18:58:55] Eindoofus: hi, i'm a bit confused by what this syntax does: labels.map{|_| 0}
[18:59:26] hxegon: >> [1, 2, 3, 4].map {|_| 0} # eindoofus
[18:59:37] hxegon: just returns a list of 0s
[18:59:42] fusta: has joined #ruby
[18:59:43] hxegon: disregards the block input
[18:59:54] hxegon: ACTION kicks rubybot
[18:59:54] _haylon_: has joined #ruby
[19:00:09] jcao219: has joined #ruby
[19:00:24] Eindoofus: oh, so i guess it's to 0 out an error..
[19:01:00] mrd_: sooo no one here can help with understanding GVL?
[19:01:11] daed: yeah, that one didn't work
[19:01:38] daed: i added the source, bundler even says it's pulling the index from my custom source even
[19:01:50] daed: i see bundler polling my custom gem server in the gem server logs
[19:02:17] mrd_: make sure you did not misspell gem name :)
[19:02:21] mrd_: or version
[19:02:21] daed: Fetching source index from https://internal.repo
[19:02:48] daed: yeah, i have nginx reverse proxy i set up, SSL works fine
[19:03:01] daed: "GET /specs.4.8.gz HTTP/1.1" 200
[19:03:26] daed: the gem server sees the requests from bundler.. do i have to explicitly say "gem install gemname -v specific-version"? that doesn't seem right
[19:04:09] daed: nope... gem generate_index sees the gem, gem server sees requests, just .. can't gem install it from remote server
[19:04:40] mrd_: dead: does it request gem should be something like /gems/<name>-<version>.gem?
[19:05:10] daed: nope, "GET /latest_specs.4.8.gz HTTP/1.1" 200
[19:05:14] daed: that is the last request from bundler
[19:06:18] mrd_: dead could you ls <path>/gems and also add Gemfile into gist and post link here? that would be faster :)
[19:07:44] al2o3-cr: Qer-S: [1368].pack('N')
[19:08:20] mrd_: dead: and if you need just pull gems your could point your nginx to directory where you indexs lives and you can use it that way
[19:10:29] jenrzzz: has joined #ruby
[19:12:54] Cyrus: has joined #ruby
[19:14:11] JeanCarloMachado: has joined #ruby
[19:15:15] tercenya: has joined #ruby
[19:15:56] u0_a170: a is their a big difference between mac & windows coding?
[19:17:10] misto: has joined #ruby
[19:17:27] daed: mrD_: msg'd you the gist
[19:17:44] tercenya: has joined #ruby
[19:18:59] TreyG: has joined #ruby
[19:19:53] User458764: has joined #ruby
[19:20:34] User458764: has joined #ruby
[19:21:01] GodFather_: has joined #ruby
[19:23:23] dcunit3d_: has joined #ruby
[19:24:10] mooser: has joined #ruby
[19:24:31] d^sh: has joined #ruby
[19:27:42] mooser: has joined #ruby
[19:30:12] Ellimist: has joined #ruby
[19:31:52] dionysus69: has joined #ruby
[19:35:52] AndroUser2: has joined #ruby
[19:40:13] kirun: has joined #ruby
[19:41:12] MyMind: has joined #ruby
[19:42:45] Cohedrin: has joined #ruby
[19:46:31] AndroUser2: has joined #ruby
[19:56:04] cagomez: has joined #ruby
[19:56:04] grh: has joined #ruby
[19:56:57] haylon_: has joined #ruby
[20:00:15] hutch34: has joined #ruby
[20:00:16] mikecmpbll: has joined #ruby
[20:00:31] patarr: has joined #ruby
[20:02:30] u0_a170: has joined #ruby
[20:06:15] jenrzzz: has joined #ruby
[20:06:34] mrd_: has left #ruby: ()
[20:07:37] cagomez: I have an array of objects that need to be in a certain order. what's a good way to make sure they're in that order?
[20:09:01] cagomez: scratch that. I have an array of objects such that I need a subset of them (I already know which ones) to appear in a certain order. what's a good way to achieve this?
[20:10:54] nowhereman: has joined #ruby
[20:10:55] username1: has joined #ruby
[20:11:28] Scriptonaut: has joined #ruby
[20:11:44] Scriptonaut: can any one explain this behavior to me? %w(a b c).map &'Z'.method(:prepend)
[20:11:53] skweek: has joined #ruby
[20:11:54] Scriptonaut: it returns this: ["cbaZ", "cbaZ", "cbaZ"]
[20:12:18] Scriptonaut: 1) Why is the entire string being processed, and 2) Why is the string reversed?
[20:12:23] Scriptonaut: er, Array, not string
[20:14:16] Pumukel: has joined #ruby
[20:17:21] Qer-S: to convert an integer to hex string I'm using to_s(1). For instance 11111120.to_s(16) gives me "a98ad0". how can I get the number to be aliged to 4 bytes and in the the format? So I would like to get "\x00\xa9\x8a\xd0"
[20:17:33] Qer-S: *to_s(16)
[20:18:01] al2o3-cr: >> [11111120].pack('N')
[20:18:02] ruby[bot]: al2o3-cr: # => "\x00\xA9\x8A\xD0" (https://eval.in/787385)
[20:18:48] destroy``: has joined #ruby
[20:19:45] FastJack: has joined #ruby
[20:20:31] Qer-S: al2o3-cr: thanks
[20:25:10] GinoMan: has joined #ruby
[20:25:23] cdg: has joined #ruby
[20:26:07] Scriptonaut: >> %w(a b c).map &'Z'.method(:prepend)
[20:26:20] Scriptonaut: weird, didn't work
[20:26:34] Scriptonaut: has joined #ruby
[20:26:39] Scriptonaut: >> %w(a b c).map &'Z'.method(:prepend)
[20:26:41] ruby[bot]: Scriptonaut: # => ["cbaZ", "cbaZ", "cbaZ"] (https://eval.in/787386)
[20:27:13] patarr: has joined #ruby
[20:27:57] raddazong: has joined #ruby
[20:29:51] cseder: has joined #ruby
[20:31:11] __Yiota: has joined #ruby
[20:31:24] cseder: has joined #ruby
[20:31:54] Xakotu: has joined #ruby
[20:32:51] mim1k: has joined #ruby
[20:33:45] SteenJobs: has joined #ruby
[20:35:51] mjora7: has joined #ruby
[20:36:22] kegster: has joined #ruby
[20:37:23] kegster: I am using Ruby in a java environment, but one of the calls in the API returns a JAVA object or something--- how can i get this converted to a hash? i tried using this method and it didn't work: (http://stackoverflow.com/questions/5340977/bind-java-objects-to-ruby-hashes)
[20:38:11] username1: has joined #ruby
[20:39:09] Scriptonaut: has left #ruby: ()
[20:40:16] cseder: you need to post sample code kegster
[20:40:36] [Butch]: has joined #ruby
[20:40:49] cseder: kegster so this is jRuby?
[20:41:03] kegster: ahhh yes i suppose so. they say "ruby" but i imagine it
[20:41:07] kegster: s jurby haha
[20:41:25] kegster: the sample code won't help- BUT i can provide the .to_json of the java object
[20:41:30] raddazong: has joined #ruby
[20:42:17] raddazong: has joined #ruby
[20:43:29] kegster: when i output the object that contains my debug data, there's a "family" key, shown here https://gist.github.com/anonymous/af9a7705a29e08ba97e23acd05159c12
[20:44:24] Xakotu: has joined #ruby
[20:44:28] raddazong: has joined #ruby
[20:45:03] GinoMan: has joined #ruby
[20:45:38] dcunit3d: has joined #ruby
[20:46:24] GinoMan: has joined #ruby
[20:47:16] SeepingN: has joined #ruby
[20:47:40] raddazong: has joined #ruby
[20:52:46] tomphp: has joined #ruby
[20:52:57] skade_: has joined #ruby
[20:53:10] pupsicle: has joined #ruby
[20:57:59] zenspider: made to not be read at all... you should at least use the pretty output from json
[20:59:51] madhatter: has joined #ruby
[21:02:12] Guest96: has joined #ruby
[21:03:43] ledestin: has joined #ruby
[21:04:15] madhatter: has joined #ruby
[21:05:31] SeepingN: has joined #ruby
[21:05:57] goldleader: has joined #ruby
[21:07:20] JeanCarloMachado: has joined #ruby
[21:11:34] cagomez: has joined #ruby
[21:15:43] goldleader: has joined #ruby
[21:16:32] planigan: has joined #ruby
[21:17:30] goldleader: has joined #ruby
[21:18:34] maid: has joined #ruby
[21:18:38] maid: has left #ruby: ()
[21:20:33] gusrub: has joined #ruby
[21:22:21] romank: has joined #ruby
[21:24:47] gigetoo: has joined #ruby
[21:27:00] hutch34: has joined #ruby
[21:29:10] Pumukel: has joined #ruby
[21:29:36] __Yiota: has joined #ruby
[21:29:55] Pumukel: has joined #ruby
[21:30:45] Pumukel: has joined #ruby
[21:31:41] Pumukel: has joined #ruby
[21:32:21] Pumukel: has joined #ruby
[21:33:34] JeanCarloMachado: has joined #ruby
[21:34:42] kristofferR: has joined #ruby
[21:37:18] tercenya: has joined #ruby
[21:38:59] enterprisey: has joined #ruby
[21:41:33] GodFather_: has joined #ruby
[21:42:05] lxsameer: has joined #ruby
[21:43:58] tercenya: has left #ruby: ()
[21:46:12] rkellermeyer: has joined #ruby
[21:47:49] nicesignal: has joined #ruby
[21:48:06] MrBusiness: has joined #ruby
[21:49:25] tvw: has joined #ruby
[21:51:20] nofxx: has joined #ruby
[21:51:37] patarr: has joined #ruby
[21:55:52] mostlybadfly: has joined #ruby
[22:00:04] sparr: has joined #ruby
[22:01:06] sparr: has joined #ruby
[22:02:28] __Yiota: has joined #ruby
[22:02:43] jenrzzz_: has joined #ruby
[22:04:32] brent__: has joined #ruby
[22:06:07] jfk: has joined #ruby
[22:09:05] sparr: has joined #ruby
[22:09:09] sparr: has joined #ruby
[22:09:11] bronson: has joined #ruby
[22:12:05] wheatand: has joined #ruby
[22:13:28] romank: has joined #ruby
[22:13:33] axellj: has joined #ruby
[22:24:11] minimalism: has joined #ruby
[22:24:28] TreyG: has joined #ruby
[22:27:48] bataii: has joined #ruby
[22:27:53] mjora7: has joined #ruby
[22:29:47] gusrub: has joined #ruby
[22:32:39] JeanCarloMachado: has joined #ruby
[22:33:20] mim1k: has joined #ruby
[22:38:10] hutch34: has joined #ruby
[22:38:50] patr0clus: has joined #ruby
[22:48:04] enterprisey: has joined #ruby
[22:58:22] romank: has joined #ruby
[23:01:15] spicerack: has joined #ruby
[23:03:36] Ellimist: has joined #ruby
[23:03:44] Cohedrin_: has joined #ruby
[23:14:38] gaucheph: has joined #ruby
[23:15:19] cschneid_: has joined #ruby
[23:16:26] perniciouscaffei: has joined #ruby
[23:17:01] enterprisey: has joined #ruby
[23:23:52] millerti: has joined #ruby
[23:27:13] lxsameer: has joined #ruby
[23:28:34] Silthias: has joined #ruby
[23:31:29] Silthias1: has joined #ruby
[23:34:17] chouhoulis: has joined #ruby
[23:34:43] hutch34: has joined #ruby
[23:37:05] Jayson_Virissimo: has joined #ruby
[23:41:08] DLSteve: has joined #ruby
[23:41:11] skade_: has joined #ruby
[23:42:42] JeanCarloMachado: has joined #ruby
[23:45:35] milardovich: has joined #ruby
[23:49:04] VladGh: has joined #ruby
[23:49:14] duderono_: has joined #ruby
[23:51:05] VladGh: has joined #ruby
[23:51:45] amclain: has joined #ruby
[23:53:32] paparas: has joined #ruby
[23:53:49] paparas: hi I want to use if params[:controller] == 'something' inside a helper but my colleagues don't like using this coding practice any better ways?
[23:56:07] VladGh: has joined #ruby