« Back to channel list

#ruby - 24 May 2016

« Back 1 day Forward 1 day »
[00:01:20] cjbottaro: has joined #ruby
[00:01:54] kloeri: has joined #ruby
[00:02:02] mistermocha: has joined #ruby
[00:02:46] shadeslayer: has joined #ruby
[00:03:28] roamingdog: has joined #ruby
[00:05:52] idefine: has joined #ruby
[00:09:00] roamingdog: has joined #ruby
[00:09:00] cjbottaro: has joined #ruby
[00:11:00] nettoweb: has joined #ruby
[00:13:39] sean_m: has joined #ruby
[00:16:02] whathappens: has joined #ruby
[00:19:19] blackgoat: has joined #ruby
[00:19:26] braderhart: has joined #ruby
[00:19:48] frode15243: has joined #ruby
[00:19:55] mjc_: has joined #ruby
[00:20:00] moss: has joined #ruby
[00:20:01] davidmichaelkarr: has joined #ruby
[00:20:08] ELCALOR: has joined #ruby
[00:20:19] frem_: has joined #ruby
[00:20:27] jimcroft: has joined #ruby
[00:20:32] [diecast]: has joined #ruby
[00:20:35] digitalfiz: has joined #ruby
[00:20:40] acalewin: has joined #ruby
[00:20:43] chrismytton: has joined #ruby
[00:20:45] Guest4184_______: has joined #ruby
[00:21:28] linduxed: has joined #ruby
[00:21:41] kireevco: has joined #ruby
[00:21:50] JoshGlzBrk: has joined #ruby
[00:22:06] zero7: has joined #ruby
[00:22:13] SilverKey: has joined #ruby
[00:22:27] lancetw: has joined #ruby
[00:23:00] stannard: has joined #ruby
[00:23:00] dmnd: has joined #ruby
[00:23:17] twodayslate: has joined #ruby
[00:26:02] aupadhye: has joined #ruby
[00:30:13] CloCkWeRX: has joined #ruby
[00:30:43] bronson: has joined #ruby
[00:31:36] skalfyfan: has joined #ruby
[00:31:46] Guest42826: has joined #ruby
[00:32:28] stannard: has joined #ruby
[00:33:09] hutch34: has joined #ruby
[00:34:12] skweek: has joined #ruby
[00:34:48] roamingdog: has joined #ruby
[00:38:03] johnmilton: has joined #ruby
[00:42:28] kobain: has joined #ruby
[00:44:37] helpa: has joined #ruby
[00:44:57] helpa: has joined #ruby
[00:45:26] craigp: has joined #ruby
[00:46:18] anna`: has left #ruby: ("-")
[00:50:48] swills: has joined #ruby
[00:55:48] ensyde: has joined #ruby
[00:56:15] skalfyfan: has joined #ruby
[00:56:52] Rodya_: has joined #ruby
[00:57:30] jenrzzz: has joined #ruby
[01:00:32] Cohedrin: has joined #ruby
[01:01:57] skalfyfan: has joined #ruby
[01:03:26] znz_jp: has joined #ruby
[01:07:43] lukec: has joined #ruby
[01:09:16] davids3: has joined #ruby
[01:10:31] hutch34: has joined #ruby
[01:12:39] skalfyfan: has joined #ruby
[01:13:28] davids3: Hey everyone, I'm trying to define a new class that inherits from another class and want it to maintain the parent singleton's instance variables. The only way I've discovered works for me is doing the standard `class B < A` and then running `instance_variable_get` on the parent and `instance_variable_set` on the child class each instance var
[01:13:57] davids3: Is there something that I'm just completely overlooking that can accomplish this without leaving me feeling dirty?
[01:15:44] davids3: The only other way I could accomplish similar was by doing `B = A.clone` then monkey patching B, but that leaves me without A as the superclass, so I can't call `super` on anything
[01:15:53] jhass: davids3: how about extracting that logic into a module and extend it into both?
[01:16:04] skalfyfan: has joined #ruby
[01:17:29] davids3: jhass: I don't have access to alter the source of the parent class, so I can't take that path
[01:18:11] JoshGlzBrk: has joined #ruby
[01:18:17] davids3: And the parent class has some DSL usage/other setup that sets a number of instance variables on the singleton that break the subclass if not present
[01:18:40] TheNet: has joined #ruby
[01:19:11] jhass: are you still sure subclassing it at all is your best route?
[01:19:29] TheNet: has left #ruby: ()
[01:19:29] jhass: considered wrapping it instead?
[01:19:40] jhass: for example with a SimpleDelegator subclass
[01:20:43] roamingdog: has joined #ruby
[01:21:26] RegulationD: has joined #ruby
[01:21:33] skalfyfan: has joined #ruby
[01:21:43] diegoaguilar: has joined #ruby
[01:22:00] Ropeney: has joined #ruby
[01:22:41] gtsai: has joined #ruby
[01:23:34] davids3: jhass: I'm not entirely up to speed with the DelegatorClass stuff
[01:23:53] jtdowney: has joined #ruby
[01:23:55] davids3: I'll have a look into it now and see if it helps what I'm doing
[01:23:57] skalfyfan: has joined #ruby
[01:25:11] roamingdog: has joined #ruby
[01:25:20] skalfyfan: has joined #ruby
[01:25:58] jancel: has joined #ruby
[01:27:30] davids3: jhass: From the SimpleDelegator docs, I'm not sure it will work as I may or may not have usage over the creation of instances for the class
[01:28:12] davids3: To be safe, I'm fairly certain I need the singleton's instance variables to be accessible from the beginning of the new class's defintion
[01:28:21] Vingador: has joined #ruby
[01:29:02] dkms: has joined #ruby
[01:30:50] nankyokusei: has joined #ruby
[01:31:56] roamingdog: has joined #ruby
[01:32:25] jhass: in a SimpleDelegator subclass you can simply override def initialize(*args); super(A.new(*args)); end
[01:32:55] jhass: davids3: ^
[01:33:28] davids3: jhass: Are class methods still delegated to the original singleton class? Ie. `B.perform_action` is delegated to `A.perform_action`?
[01:33:36] duckpuppy: has joined #ruby
[01:34:26] davids3: Yeah, I don't think that SimpleDelegator will be suitable then
[01:34:38] xue: has joined #ruby
[01:35:29] davids3: I still need the new class' class methods to have access to the parent class singleton's original instance variables
[01:35:36] tgeeky: man, I'm in so deep I can't see the waterline.
[01:35:49] jhass: was worth a shot, given you're so vague about your usecase it's hard to give any recommendations and I can't assess whether I agree with your judgment either
[01:35:58] tgeeky: is there a way to... how the hell do I even ask this question.
[01:36:26] ur5us: has joined #ruby
[01:36:26] jhass: tgeeky: with thinking before writing preferably ;)
[01:36:28] davids3: The use case is essentially-- we have a Rails app and have a set of engines and routes included
[01:36:46] tgeeky: is there a way to replicate the behavior of: if (...); elseif (...); elseif (...); else ...; end
[01:36:52] tgeeky: but dynamically
[01:36:53] jaguarmagenta: has joined #ruby
[01:36:58] ruby[bot]: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[01:37:11] tgeeky: i could just paste the code
[01:37:14] tgeeky: but it's really rough
[01:37:16] ruby[bot]: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[01:37:16] davids3: And we need to be able to replace controllers with versions inheriting from the original, same with models, serializers, etc.
[01:37:25] tgeeky: can I delete gists?
[01:37:31] tgeeky: i don't want to be forever embarassed by this
[01:37:52] tgeeky: evidently, yes
[01:38:05] jhass: on your account, yes. You can also make them secret. I think anonymous gists you can delete for some time, as long as you have the cookie
[01:40:03] tgeeky: https://gist.github.com/technogeeky/058224e55eba3c1338f8e665826b628d
[01:40:14] tgeeky: this appears more complicated than it is
[01:40:24] tgeeky: i have a (nested, multi) - hash at the top
[01:40:30] tgeeky: more importantly, it's ORDERED.
[01:40:52] tgeeky: for a particular field in the source database, ie: has['customer','name']
[01:41:12] tgeeky: the 3rd key is an ordered list of regular expressions
[01:41:20] tgeeky: that should be processed like the middle paste in my gist
[01:41:37] tgeeky: the (if match=(...)) ; elsif (match =(...))
[01:42:02] arescorpio: has joined #ruby
[01:42:19] tgeeky: but I don't know ahead of time how many different possible regex matches there will be, and I'm certain it won't always be the same.
[01:43:08] tgeeky: but an important component here is that the regexes must be processed in that specific order, ie, I must first test using last_first_last_first, THEN @partners
[01:43:23] tgeeky: THEN @last_first_opt_extra
[01:43:24] yude: has joined #ruby
[01:43:26] tgeeky: then a default one
[01:43:32] smathy: So iterate over them. with either an all? or any? depending on whether you want AND or OR
[01:44:13] tgeeky: smathy: but then the elsif component is broken
[01:44:37] tgeeky: basically, I need to short circuit and skip ALL further hash['customer','name'] entries after one matches
[01:44:45] davedev24: has joined #ruby
[01:45:04] jhass: sounds like .any? or .find
[01:45:08] chopin: has joined #ruby
[01:45:38] tgeeky: it actually sounds like my outermost loop (@nmm.each) can't be that.
[01:45:50] roamingdog: has joined #ruby
[01:46:14] jhass: btw I would strongly recommend to use constants for your patterns
[01:46:40] jhass: there's no reason for instance variables or reassigning them in each call of the method
[01:46:41] tgeeky: jhass: I originally did, but I switched due to something, and haven't switched back
[01:46:57] tgeeky: jhass: though to make sure we're talking about the same hting
[01:47:01] tgeeky: can you point to one wrong line?
[01:47:22] tgeeky: oh, so drop the @?
[01:47:44] jaguarmagenta: has joined #ruby
[01:47:46] tgeeky: they were originally not in that function, they were in another class. That's why they have the @ still.
[01:47:47] jhass: I'd go further and make them constants of the module/class you define that method in
[01:48:04] tgeeky: ok, constants are the allcaps things?
[01:48:09] jhass: they most likely shouldn't have been instance variables there either
[01:48:40] tgeeky: I need a different .each method. This one will never work.
[01:49:03] jhass: then next step to more readable code would be to stop using so many abbreviations
[01:49:22] tgeeky: jhass: fair warning, everything that is a string must be exactly that string
[01:49:26] tgeeky: caps and all
[01:49:38] jhass: but, @c, nmm,
[01:49:45] tgeeky: you can't even see where that comes from
[01:49:56] jhass: and you'll forget in a week
[01:50:05] tgeeky: well, k,v screams what it is to me :)
[01:50:15] tgeeky: but yes, I'll change that stuff
[01:50:30] tgeeky: what I want to avoid at all costs, is ever using eval()
[01:50:30] jhass: well here comes my third tip: avoid generic names like hash, key, value
[01:51:33] jhass: try to find names corresponding to your data
[01:52:08] tgeeky: jhass: several of these nits that you are picking are actually due to the fact that I was deciding what kind of data structure to use
[01:52:12] tgeeky: and i just named them after the data structure
[01:52:16] tgeeky: until I selected one
[01:52:25] tgeeky: but I agree with them all
[01:52:53] jhass: IME following these things from the starts makes it incredibly easier to think about the code
[01:53:09] jhass: including finding the right data structures
[01:54:28] Coldblackice_: has joined #ruby
[01:54:57] jhass: for example I have no clue how your NestedMultimap thing even works
[01:55:03] jhass: so no clue what its each yields
[01:56:33] tgeeky: jhass: it's 1 yield per line in the map; it's from yehuda katz's multimap library
[01:59:09] xlegoman: has joined #ruby
[01:59:16] kgrz: has joined #ruby
[01:59:17] jhass: I guess for https://gist.github.com/technogeeky/058224e55eba3c1338f8e665826b628d#file-database-transformator-rb-L32-L33 you want to define procs/lambda's instead that take the match
[01:59:31] jhass: 28/29 too
[01:59:42] crystal77: has joined #ruby
[02:00:17] tgeeky: jhass: yeah, I haven't even gotten to that part of the problem.
[02:00:35] tgeeky: jhass: I actually came up with somewhat of a clever solution before I even asked the question
[02:00:50] tgeeky: which is: to just reverse all of the hash['customer','name',...] lines
[02:00:56] DanKnox: has joined #ruby
[02:00:58] jhass: I would also unpack the full thing, from_table, from_column, pattern = k; to_table, to_column, template = v
[02:01:15] jhass: from_table, from_column, pattern = source; to_table, to_column, template = target
[02:01:16] tgeeky: but that won't work in general
[02:01:41] tgeeky: jhass: 1 source to many targets is allowed
[02:01:50] SilverKey: has joined #ruby
[02:02:04] jhass: but you only get one at a time, no?
[02:02:20] tgeeky: with this loop, yes; but that is exactly the problem
[02:02:54] tgeeky: with this loop, has[...,@last_first_last_first] will be executed 3 times, when it only needs to be executed once.
[02:03:02] tgeeky: ie, the regex will be matched 3 times
[02:03:15] jhass: btw I'd probably just use plain nested arrays
[02:03:32] JesseH: has joined #ruby
[02:03:37] tgeeky: perhaps I will move in that direction.
[02:03:57] jhass: [source, [target, ...]] with source and target being your 2-3 element arrays
[02:04:31] jhass: er, [[source, [target, ...]], ...] of course
[02:04:45] Dimik: has joined #ruby
[02:04:59] jhass: will work the same on your current call side and boom no more domain knowledge of some gem required
[02:05:30] jhass: and I'd argue equally readable when properly formatted
[02:06:19] chipotle: has joined #ruby
[02:10:31] rbennacer: has joined #ruby
[02:11:52] mistermocha: has joined #ruby
[02:11:59] jhass: so then you'd just use mappings.each do |source, targets| # unpack source; match = pattern.match(row[:name]); next unless match; targets.each do |target| #unpack target; contact[to_column] = case template; when nil; ...; row[:name]; when Proc; template.call(match); when String; template % match; end etc
[02:12:09] jhass: tgeeky: ^
[02:13:26] gfvcastro: has joined #ruby
[02:13:47] Seich: has joined #ruby
[02:15:36] tgeeky: jhass: inspecting that
[02:16:41] gfvcastro: has joined #ruby
[02:16:47] roamingdog: has joined #ruby
[02:19:17] CorOne: has joined #ruby
[02:19:18] jenrzzz: has joined #ruby
[02:24:15] benlieb: has joined #ruby
[02:24:34] davedev24: has joined #ruby
[02:25:05] yfeldblum: has joined #ruby
[02:25:47] yfeldblum: has joined #ruby
[02:26:26] idefine: has joined #ruby
[02:27:11] chipotle: has joined #ruby
[02:32:47] DanKnox_: has joined #ruby
[02:32:54] cstls: has joined #ruby
[02:33:06] strigonLeader: has joined #ruby
[02:33:08] roamingdog: has joined #ruby
[02:34:06] RegulationD: has joined #ruby
[02:38:35] tristanp_: has joined #ruby
[02:38:51] unreal: has joined #ruby
[02:39:30] jancel: has joined #ruby
[02:41:19] jaguarmagenta: has joined #ruby
[02:42:40] shiru: has joined #ruby
[02:50:42] tristanp: has joined #ruby
[02:51:47] skolman_: has joined #ruby
[02:53:58] e4xit: has joined #ruby
[02:57:52] Vingador: has joined #ruby
[02:58:40] Yzguy: has joined #ruby
[03:00:36] nando293921: has joined #ruby
[03:04:02] Ebok: has joined #ruby
[03:05:21] jhass: tgeeky: played a bit https://p.jhass.eu/1u.rb
[03:06:52] echosystm: has joined #ruby
[03:07:01] echosystm: i'm really confused about how binary data strings work in ruby
[03:07:30] jhass: their encoding is ASCII-8bit aka binary, that's all
[03:07:42] echosystm: if i want to send an integer over a socket, i go socket.send [variable].pack('N'), 0
[03:08:02] echosystm: how do i receive an integer?
[03:08:17] jhass: socket.read.unpack("N")
[03:08:33] jhass: well, read only that many bytes but you get it
[03:08:45] gix: has joined #ruby
[03:09:03] echosystm: yeah ive got it reading into a buffer
[03:09:09] echosystm: unpack('N') was the part i was missing
[03:09:27] jhass: note both pack and unpack can take more than one specifier in their format string
[03:09:41] jenrzzz: has joined #ruby
[03:09:51] jhass: so you can pack/unpack your whole packet to/from an array if you know all the sizes upfront
[03:10:22] echosystm: ok now how do i go from a binary string to a UTF8 stirng?
[03:10:53] jhass: if it's already UTF-8 encoded you could just .force_encoding("UTF-8")
[03:11:05] echosystm: is that bad to do?
[03:11:30] jhass: not really
[03:11:36] jhass: .unpack("U*") might work too
[03:12:19] noodle: has joined #ruby
[03:12:33] nofxx: What's the nicest fuzzy/weight text matcher around? Got like 1k products name in RAM.... "brand - four or five words product name"
[03:13:18] nofxx: it's really not going over 1k, 2k products... so I'm not considering solr/elasticsearch... no java
[03:13:23] diegoviola: has joined #ruby
[03:13:25] echosystm: awesome. thanks for your help jhass
[03:13:41] jhass: mmh, no nvm about the last one
[03:14:33] braincrash: has joined #ruby
[03:15:00] nofxx: oh, and my robot will give me "brand - four or five words product name" that are not always in the same order or is truncated, hence the weight... there's human verification later
[03:15:11] konsolebox: has joined #ruby
[03:16:34] AK-47_: has joined #ruby
[03:16:37] AK-47_: hi all for overclocking join ##securify and press f9 and for interpol channel go to ##beyondtime and for governor and UNITED NATIONS GO TO ##un.org , for SU FEDORA OS COME TO ##su.os
[03:17:12] jhass: !spam AK-47_
[03:17:13] ruby[bot]: +bbb $a:ak-47$#ruby-banned AK-47_!*@*$#ruby-banned *!*@unaffiliated/skraito-0x71$#ruby-banned
[03:17:14] ruby[bot]: ruby[bot] kicked AK-47_: is a bannable offense, see http://ruby-community.com/pages/user_rules
[03:17:15] ruby[bot]: -bbb doodlehaus!*@*$#ruby-banned cwong_on_irc*!*@*$#ruby-fix-your-connection jackcom!*@*$#ruby-banned
[03:18:12] yude: has joined #ruby
[03:18:20] jaguarmagenta: has joined #ruby
[03:19:06] moeabdol: has joined #ruby
[03:20:31] nofxx: https://github.com/seamusabshere/fuzzy_match
[03:20:51] k3rn31: has joined #ruby
[03:21:04] mistermocha: has joined #ruby
[03:23:20] Es0teric: has joined #ruby
[03:24:23] Rodya_: has joined #ruby
[03:27:42] Tharbakim: has joined #ruby
[03:31:43] nankyokusei: has joined #ruby
[03:33:12] bronson: has joined #ruby
[03:33:46] cstls: has joined #ruby
[03:33:53] jenrzzz: has joined #ruby
[03:34:44] roamingdog: has joined #ruby
[03:39:43] SilverKey: has joined #ruby
[03:40:54] jancel: has joined #ruby
[03:42:48] jgpawletko: has joined #ruby
[03:43:11] jenrzzz: has joined #ruby
[03:43:34] shiru: has joined #ruby
[03:44:39] LoneHermit: has joined #ruby
[03:45:45] braincra-: has joined #ruby
[03:47:03] jancel: has joined #ruby
[03:52:22] n0xff: has left #ruby: ()
[03:52:32] duncannz: has joined #ruby
[03:53:17] duncannz: has joined #ruby
[03:53:51] arajakul: has joined #ruby
[03:54:35] zenlot6: has joined #ruby
[03:56:00] tristanp_: has joined #ruby
[03:56:56] rbennacer: has joined #ruby
[03:58:11] Devalo: has joined #ruby
[03:59:25] rbennacer: has joined #ruby
[04:02:53] tristanp: has joined #ruby
[04:06:50] gix: has joined #ruby
[04:06:58] tristanp: has joined #ruby
[04:07:53] 7F1ABC1ZQ: has joined #ruby
[04:08:29] LoneHerm_: has joined #ruby
[04:11:16] kareeoleez: has joined #ruby
[04:14:36] Dios: has joined #ruby
[04:21:01] tristanp_: has joined #ruby
[04:22:09] sneakersec: has joined #ruby
[04:23:42] rickmasta: has joined #ruby
[04:25:16] tristanp: has joined #ruby
[04:25:56] Rodya_: has joined #ruby
[04:27:33] tildes_: has joined #ruby
[04:29:29] tristanp_: has joined #ruby
[04:31:20] moeSeth: has joined #ruby
[04:32:22] hypercube32: has joined #ruby
[04:34:29] nofxx: has joined #ruby
[04:34:32] ramfjord: has joined #ruby
[04:35:19] pawnbox: has joined #ruby
[04:36:34] zapata: has joined #ruby
[04:38:45] shortdudey123: has joined #ruby
[04:39:34] pawnbox: has joined #ruby
[04:39:54] k3rn31: has joined #ruby
[04:50:50] cyclonis_: has joined #ruby
[04:51:27] tristanp: has joined #ruby
[04:53:18] Guest63569: has joined #ruby
[04:53:18] Guest63569: has joined #ruby
[04:54:29] SuperLag: has joined #ruby
[04:57:34] pawnbox: has joined #ruby
[04:58:10] pawnbox: has joined #ruby
[04:58:34] iMadper: has joined #ruby
[05:04:15] pawnbox: has joined #ruby
[05:04:31] tristanp: has joined #ruby
[05:06:28] tristanp_: has joined #ruby
[05:07:12] craigp: has joined #ruby
[05:11:18] tristanp: has joined #ruby
[05:12:07] jud^: has joined #ruby
[05:12:59] moos3: has joined #ruby
[05:13:43] tristanp_: has joined #ruby
[05:14:25] Y_Ichiro: has joined #ruby
[05:14:25] Y_Ichiro: has joined #ruby
[05:15:06] cardoni: has joined #ruby
[05:15:14] framlinqp: has joined #ruby
[05:15:32] incomprehensibly: has joined #ruby
[05:15:36] tristanm_: has joined #ruby
[05:15:46] cstrahan: has joined #ruby
[05:16:41] Jet4Fire_: has joined #ruby
[05:17:10] veloutin_: has joined #ruby
[05:17:18] edwardly: has joined #ruby
[05:17:18] edwardly: has joined #ruby
[05:18:14] zhunting: has joined #ruby
[05:18:16] EdwardIII: has joined #ruby
[05:18:22] mgorbach: has joined #ruby
[05:18:34] iamayam: has joined #ruby
[05:18:55] Es0teric: has joined #ruby
[05:19:13] sphex: has joined #ruby
[05:19:32] spectra: has joined #ruby
[05:20:22] yfeldblum: has joined #ruby
[05:20:56] swills: has joined #ruby
[05:22:21] M-shine: has joined #ruby
[05:24:00] jaguarma_: has joined #ruby
[05:24:25] lxsameer: has joined #ruby
[05:24:29] Devalo: has joined #ruby
[05:25:49] Antiarc: has joined #ruby
[05:28:38] LoneHermit: has joined #ruby
[05:28:46] mleung: has joined #ruby
[05:31:28] jaguarmagenta: has joined #ruby
[05:32:33] Lildirt: has joined #ruby
[05:32:35] nankyokusei: has joined #ruby
[05:34:50] jancel: has joined #ruby
[05:35:36] bronson: has joined #ruby
[05:37:17] benlieb: has joined #ruby
[05:40:05] aufi: has joined #ruby
[05:44:10] elomatreb: has joined #ruby
[05:44:51] tristanp: has joined #ruby
[05:47:35] tristanp_: has joined #ruby
[05:50:59] mleung: has joined #ruby
[05:53:07] noobplayer97: has joined #ruby
[05:53:37] moeabdol: has joined #ruby
[05:54:42] noobplayer97: has joined #ruby
[05:54:54] tristanp: has joined #ruby
[05:55:07] kareeoleez: has joined #ruby
[05:58:20] moeabdol: has joined #ruby
[05:58:33] PlasmaStar: has joined #ruby
[06:01:12] yfeldblum: has joined #ruby
[06:04:39] adgtl: has joined #ruby
[06:04:39] adgtl: has joined #ruby
[06:05:42] yfeldblum: has joined #ruby
[06:08:14] gtsai_: has joined #ruby
[06:09:50] hahuang61: has joined #ruby
[06:13:47] hk238: has joined #ruby
[06:14:42] lipoqil: has joined #ruby
[06:15:01] craigp: has joined #ruby
[06:15:34] angiebadillo: has joined #ruby
[06:15:36] boxrick1: has joined #ruby
[06:16:09] akitada: has joined #ruby
[06:16:15] chromis: has joined #ruby
[06:16:25] Evans: has joined #ruby
[06:16:32] jmcc___________: has joined #ruby
[06:16:40] nadir: has joined #ruby
[06:16:42] pizzaops: has joined #ruby
[06:16:47] deimos__: has joined #ruby
[06:16:52] Majost: has joined #ruby
[06:16:56] camilasan: has joined #ruby
[06:17:13] manveru: has joined #ruby
[06:17:26] helpa: has joined #ruby
[06:17:27] swgillespie: has joined #ruby
[06:17:41] digitalfiz: has joined #ruby
[06:17:46] yfeldblum: has joined #ruby
[06:17:51] Eleeleth: has joined #ruby
[06:17:53] tristanp_: has joined #ruby
[06:17:57] spastorino: has joined #ruby
[06:18:03] troter__________: has joined #ruby
[06:18:16] DukeDave: has joined #ruby
[06:18:17] nyandoge: has joined #ruby
[06:18:25] vcoinminer: has joined #ruby
[06:18:35] S01780_: has joined #ruby
[06:18:40] zzak___: has joined #ruby
[06:18:45] Hates_: has joined #ruby
[06:18:46] rflot: has joined #ruby
[06:18:50] avdi: has joined #ruby
[06:18:57] moeSeth: has joined #ruby
[06:19:11] aphprentice: has joined #ruby
[06:19:14] nullFxn: has joined #ruby
[06:19:17] ahuman_: has joined #ruby
[06:19:17] elomatreb: has joined #ruby
[06:19:27] mroth: has joined #ruby
[06:19:43] ijij_: has joined #ruby
[06:19:49] tonini: has joined #ruby
[06:19:53] acerna_: has joined #ruby
[06:19:56] UserInneed: has joined #ruby
[06:19:58] andersh: has joined #ruby
[06:20:30] valkyr1e: has joined #ruby
[06:20:35] skmp: has joined #ruby
[06:20:36] codepete: has joined #ruby
[06:20:49] caw: has joined #ruby
[06:20:51] SilverKey: has joined #ruby
[06:21:01] meinside: has joined #ruby
[06:21:13] mrsolo: has joined #ruby
[06:21:20] passbe: has joined #ruby
[06:21:21] AlexJakeGreen: has joined #ruby
[06:21:30] ramblinpeck: has joined #ruby
[06:21:53] helpa: has joined #ruby
[06:22:24] kloeri: has joined #ruby
[06:22:36] jpinnix_______: has joined #ruby
[06:22:38] AdamMeghji__: has joined #ruby
[06:22:45] kappy: has joined #ruby
[06:22:45] irick: has joined #ruby
[06:23:30] jackjackdripper: has joined #ruby
[06:23:41] kapowaz: has joined #ruby
[06:24:02] dmnd: has joined #ruby
[06:24:13] yonatankoren: has joined #ruby
[06:24:13] amitchellbullard: has joined #ruby
[06:24:21] jlyndon: has joined #ruby
[06:24:28] pmarreck: has joined #ruby
[06:24:59] JackMc: has joined #ruby
[06:24:59] ec: has joined #ruby
[06:25:04] im0b: has joined #ruby
[06:25:12] halfdan: has joined #ruby
[06:25:21] tristanp_: has joined #ruby
[06:25:23] braderhart: has joined #ruby
[06:25:28] bjmllr: has joined #ruby
[06:25:54] mleung: has joined #ruby
[06:25:57] imanc: has joined #ruby
[06:26:26] Macaveli: has joined #ruby
[06:26:35] joaomdmoura__: has joined #ruby
[06:27:48] crystal77: has joined #ruby
[06:28:17] mitsuhiko: has joined #ruby
[06:28:17] kallisti5: has joined #ruby
[06:28:22] stannard: has joined #ruby
[06:28:26] deepak: has joined #ruby
[06:28:40] SHyx0rmZ: has joined #ruby
[06:29:37] LoneHermit: has joined #ruby
[06:30:04] fenre: has joined #ruby
[06:31:17] strongcode: has joined #ruby
[06:32:29] ckrailo: has joined #ruby
[06:34:59] devyn: has joined #ruby
[06:35:30] codecop: has joined #ruby
[06:36:18] k0n: has joined #ruby
[06:36:39] Gasher: has joined #ruby
[06:37:08] PaulCapestany: has joined #ruby
[06:38:00] dhaavhincy: has joined #ruby
[06:39:30] last_staff: has joined #ruby
[06:43:20] benlieb: has joined #ruby
[06:43:57] Oog: has joined #ruby
[06:44:00] crdpink: has joined #ruby
[06:44:27] Oog: i want to every method in my class to be wrapped in a block - how can i do it?
[06:44:50] Oog: every method that is called I want to be called inside ActiveRecord::Base.transaction { call_method }
[06:45:04] firstdayonthejob: has joined #ruby
[06:45:15] tAn: has joined #ruby
[06:47:29] sauvin: has joined #ruby
[06:48:56] taylan: has left #ruby: ("Using Circe, the loveliest of all IRC clients")
[06:49:09] chipotle: has joined #ruby
[06:49:31] Coldblackice_: has joined #ruby
[06:50:19] helpa: has joined #ruby
[06:51:57] helpa: has joined #ruby
[06:52:22] auzty: has joined #ruby
[06:53:59] tristanp: has joined #ruby
[06:55:12] gtsai: has joined #ruby
[06:55:31] lxsameer: has joined #ruby
[06:56:56] tgeeky: jhsalive still?
[06:57:11] tristanp_: has joined #ruby
[06:57:30] tgeeky: jhass: i mean you
[06:58:28] n1x-nz: has joined #ruby
[06:59:24] ksmutthu: has joined #ruby
[07:00:16] tgeeky: can anyone explain
[07:00:16] tgeeky: https://p.jhass.eu/1u.rb
[07:00:19] tgeeky: what syntax that is using
[07:00:28] tgeeky: where it goes ->(match) { }
[07:00:32] tristanp: has joined #ruby
[07:00:45] Couch: has joined #ruby
[07:00:47] BTRE: has joined #ruby
[07:00:51] tgeeky: it's a lambda
[07:00:51] elomatreb: That's a lambda, basically an inline function
[07:01:06] tgeeky: i was doing Proc.new { } there
[07:01:08] tgeeky: but it wasn't working...
[07:01:30] elomatreb: There are some subtle differences between Procs and lambda (concerning variables, iirc)
[07:01:43] tgeeky: yeah. I think I was trying to execute the proc in the context of the caller
[07:01:50] tgeeky: ie, something like eval-in-place
[07:01:53] tgeeky: which is not...smart
[07:02:22] elomatreb: That code looks... interesting btw
[07:02:35] dhaavhincy: has left #ruby: ()
[07:03:00] mark_661: has joined #ruby
[07:03:55] iMadper: has joined #ruby
[07:03:59] andikr: has joined #ruby
[07:04:22] dionysus69: has joined #ruby
[07:04:23] tgeeky: elomatreb: heh. it's an attempt at a general method of doing ETL
[07:04:29] tgeeky: but not too general to be useless
[07:05:15] tristanp_: has joined #ruby
[07:10:51] solars: has joined #ruby
[07:11:57] benlieb: has joined #ruby
[07:12:28] crystal77: has joined #ruby
[07:13:08] hahuang61: has joined #ruby
[07:14:15] zyzioziom: has joined #ruby
[07:15:10] terlar: has joined #ruby
[07:15:12] armyriad: has joined #ruby
[07:17:11] TomyWork: has joined #ruby
[07:18:20] ur5us: has joined #ruby
[07:19:07] conta: has joined #ruby
[07:19:26] gtsai: has joined #ruby
[07:20:54] armyriad: has joined #ruby
[07:21:11] hightower3: has joined #ruby
[07:21:18] biberu: has joined #ruby
[07:22:31] adac: has joined #ruby
[07:23:52] jancel: has joined #ruby
[07:27:14] EXCHGR: has joined #ruby
[07:27:33] TvL2386: has joined #ruby
[07:27:49] gtsai: has joined #ruby
[07:27:50] TvL2386: how can this be true: irb(main):018:0> IPAddr.new('10.0.0.0/32').include?(IPAddr.new('10.0.0.0/8'))
[07:28:35] mistermocha: has joined #ruby
[07:28:40] mikecmpbll: has joined #ruby
[07:32:33] iMadper: has joined #ruby
[07:33:24] nankyokusei: has joined #ruby
[07:33:45] alfie_max15: TvL2386, you are asking that because you're looking at the /32 and /8 ??
[07:33:54] TvL2386: alfie_max15, yes
[07:34:18] heftig: TvL2386: include? disregards the argument's netmask
[07:34:44] heftig: you can't ask if a subnet includes another subnet; you can just ask if a subnet includes an address
[07:34:57] alfie_max15: both the IP address are the same, and hence falls within its range
[07:35:04] tgeeky: TvL2386: yes, they are the same
[07:35:26] tgeeky: the mask is not applied for purposes of the ranges
[07:35:36] tgeeky: setting one to a, and the other to b
[07:35:39] TvL2386: I see! Not what I had expected :)
[07:37:01] KnownSyntax: has joined #ruby
[07:37:33] KnownSyntax: has joined #ruby
[07:37:36] bronson: has joined #ruby
[07:37:58] skolman_: has joined #ruby
[07:38:04] KnownSyntax: has joined #ruby
[07:38:38] KnownSyntax: has joined #ruby
[07:39:14] KnownSyntax: has joined #ruby
[07:39:48] KnownSyntax: has joined #ruby
[07:40:39] edwinvdgraaf: has joined #ruby
[07:41:20] tristanp: has joined #ruby
[07:42:08] j3r0: has joined #ruby
[07:42:43] pikajude: has joined #ruby
[07:44:07] Oog: has joined #ruby
[07:49:02] skade: has joined #ruby
[07:49:02] madgen: has joined #ruby
[07:49:42] Ch4rAss: has joined #ruby
[07:50:02] terlar: has joined #ruby
[07:50:26] benlieb: has joined #ruby
[07:51:39] GarethAdams: has joined #ruby
[07:51:41] sarlalian: has joined #ruby
[07:52:57] senayar: has joined #ruby
[07:53:20] jaruga___: has joined #ruby
[07:54:16] sdothum: has joined #ruby
[07:56:04] n1x-nz: has joined #ruby
[07:57:11] allenn: has joined #ruby
[07:57:12] troulouliou_div2: has joined #ruby
[07:57:29] alfie_max15: has joined #ruby
[07:58:46] n1x-nz: has joined #ruby
[07:58:53] araujo: has joined #ruby
[07:59:29] mikecmpbll: has joined #ruby
[08:02:16] tristanp: has joined #ruby
[08:02:21] kgrz: has joined #ruby
[08:02:24] hightower3: Hey how do I get the IP of the remote end from a TCP socket?
[08:05:40] Bugboy1028: has joined #ruby
[08:07:45] edwinvdgraaf: has joined #ruby
[08:08:18] nobitanobi: has joined #ruby
[08:08:34] tristanp_: has joined #ruby
[08:08:45] n1x-nz: has joined #ruby
[08:09:55] giz|work: has joined #ruby
[08:10:34] n1x-nz: has joined #ruby
[08:10:37] drptbl: has joined #ruby
[08:11:06] n1x-nz: has joined #ruby
[08:12:02] Dimik: has joined #ruby
[08:12:33] CROOKED^HILLARY^: has joined #ruby
[08:12:34] tristanp: has joined #ruby
[08:15:10] roamingdog: has joined #ruby
[08:15:44] roelof: has joined #ruby
[08:16:21] roelof: A very stupid beginners question . I have this : ["schilderijen"] . How do I convert this to schilderijen ?
[08:16:45] rrichardsr3: has joined #ruby
[08:17:00] baweaver: what have you tried?
[08:17:04] PaulePanter: Hi. In a YAML file there is: my_key: [/bla/]
[08:17:26] PaulePanter: Now reading it in Ruby I get ["/bla/"] back.
[08:17:33] PaulePanter: As I want to user a matcher, that’s not so nice.
[08:17:33] tristanp_: has joined #ruby
[08:17:39] PaulePanter: Any idea what I am missing.
[08:17:49] roelof: answer.to_s answer.join baweaver
[08:18:00] LoneHermit: has joined #ruby
[08:18:05] baweaver: how do arrays work?
[08:18:33] platzhirsch: has joined #ruby
[08:18:35] roelof: Normally I could do array.first but then I get no output
[08:18:53] roelof: so im a little bit confused
[08:19:02] baweaver: >> ["schilderijen"].first
[08:19:04] ruby[bot]: baweaver: # => "schilderijen" (https://eval.in/576059)
[08:19:10] baweaver: looks good to me
[08:19:33] baweaver: PaulePanter what have you tried?
[08:19:41] roelof: Can I also display it without the "
[08:20:04] baweaver: define "display"
[08:20:14] tristanp: has joined #ruby
[08:21:01] roelof: I want to print it on the screen without the "
[08:21:12] baweaver: on a console, or where?
[08:21:24] baweaver: because that's what puts is for
[08:21:26] skade: has joined #ruby
[08:21:28] roelof: in a web browser
[08:21:30] phredus: has joined #ruby
[08:21:45] edwinvdgraaf: has joined #ruby
[08:21:46] elomatreb: You're using ERb, right?
[08:21:46] Bugboy1028: has joined #ruby
[08:21:48] baweaver: you're going to have to give me way more information you know
[08:22:03] baweaver: or we can play 20 questions to find out what you're doing
[08:22:13] elomatreb: baweaver: He was asking something similar yesterday
[08:23:02] roelof: I read data from a database. I try to display that data on my webpage , baweaver . So far , clear ?
[08:23:17] marr: has joined #ruby
[08:23:22] baweaver: what's the actual code?
[08:23:30] elomatreb: What is the name of the file you're editing?
[08:24:43] tristanp_: has joined #ruby
[08:27:03] fujinuma: has joined #ruby
[08:27:17] roelof: baweaver: for printing on the screen : <p class="au-mb-3 au-pl-4 au-pr-4">Collectie : <%= @painting.collectie[2 .. -3] %></p>
[08:28:09] fujinuma: how can I eliminate the duplication in this code? https://git.io/vrrPi
[08:29:24] BTRE: has joined #ruby
[08:30:07] n1x-nz: has joined #ruby
[08:30:15] elomatreb: fujinuma: You could write a helper method that accepts a block and gives it the db object as a parameter
[08:30:27] tomphp: has joined #ruby
[08:30:38] Bugboy1028: has joined #ruby
[08:30:46] elomatreb: I'm assuming you mean the db connect/disconnect stuff
[08:31:33] fujinuma: elomatreb: that's it. I'll give it a try, thanks
[08:32:46] elomatreb: I would not be surprised if Sinatra offered a better/cleaner way of doing that, though. Something like Rails filters maybe?
[08:34:12] fujinuma: elomatreb: http://stackoverflow.com/a/16117807
[08:34:16] moeSeth: has joined #ruby
[08:34:29] tvw: has joined #ruby
[08:35:00] n1x-nz: has joined #ruby
[08:35:57] roelof: baweaver: thanks, got it working
[08:38:11] n1x-nz: has joined #ruby
[08:40:17] TvL2386: has joined #ruby
[08:40:39] Bugboy1028: has joined #ruby
[08:43:34] Pumukel: has joined #ruby
[08:43:43] n1x-nz: has joined #ruby
[08:44:02] dionysus69: has joined #ruby
[08:44:07] n1x-nz: has joined #ruby
[08:49:07] tristanp: has joined #ruby
[08:50:48] n1x-nz: has joined #ruby
[08:51:16] n1x-nz: has joined #ruby
[08:53:21] tristanp_: has joined #ruby
[08:53:22] tatran: has joined #ruby
[08:54:43] tatran: has left #ruby: ()
[08:59:10] Nice_BikeMaN: has joined #ruby
[08:59:23] tristanp_: has joined #ruby
[09:01:14] iMadper: has joined #ruby
[09:01:17] craigp: has joined #ruby
[09:01:18] SilverKey: has joined #ruby
[09:01:23] ferr: has joined #ruby
[09:01:28] joonty: has joined #ruby
[09:03:02] zyzioziom1: has joined #ruby
[09:04:08] craigp: has joined #ruby
[09:05:11] blaxter: has joined #ruby
[09:06:28] iMadper: has joined #ruby
[09:06:38] aupadhye: has joined #ruby
[09:06:48] weckl: has joined #ruby
[09:06:57] PaulePanter: >> require "yaml"; YAML.load("---\nfoo: [/test/]")
[09:06:58] ruby[bot]: PaulePanter: # => {"foo"=>["/test/"]} (https://eval.in/576082)
[09:07:18] PaulePanter: baweaver: That’s what I tried.
[09:08:48] giz|work: has joined #ruby
[09:09:03] Hanmac: i think the problem is that YAML doesnt have a regexp type, so ruby does think its a String
[09:09:42] tristanp: has joined #ruby
[09:11:40] PaulePanter: Any idea, how that can be worked around?
[09:11:50] apeiros: >> require 'yaml'; YAML.load(/foo/.to_yaml)
[09:11:51] ruby[bot]: apeiros: # => /foo/ (https://eval.in/576083)
[09:12:04] apeiros: yaml can represent regular expressions
[09:12:11] apeiros: but you have to write the yaml properly for that
[09:12:32] apeiros: >> require 'yaml'; /foo/.to_yaml
[09:12:33] ruby[bot]: apeiros: # => "--- !ruby/regexp /foo/\n...\n" (https://eval.in/576084)
[09:12:52] apeiros: iow, yaml does have a regex type. but it's not just //
[09:14:26] jhass: s/YAML/Psych/, no?
[09:14:28] anenigma: has joined #ruby
[09:14:39] PaulePanter: apeiros: Awesome. Thank you.
[09:15:17] PaulePanter: jhass: > You can choose from one of two YAML engines that ship with Ruby 1.9. By default Psych is used but the old unmaintained Syck may chosen.
[09:15:20] PaulePanter: http://ruby-doc.org/stdlib-1.9.3/libdoc/yaml/rdoc/YAML.html
[09:15:48] jhass: 1.9 is dead, Syck is dead
[09:15:58] jhass: but besides my point either way
[09:16:31] eGGshke: has joined #ruby
[09:16:55] GarethAdams: has joined #ruby
[09:16:55] ur5us: has joined #ruby
[09:17:37] mdw: has joined #ruby
[09:17:46] PaulePanter: jhass: What was your point?
[09:17:49] chipotle: has joined #ruby
[09:18:00] PaulePanter: http://ruby-doc.org/stdlib-2.1.5/libdoc/yaml/rdoc/YAML.html also says that Psych is used by default.
[09:18:02] apeiros: jhass: psych is the name of the parser (or rather libyaml wrapper) in ruby, yaml is the language. and yaml the language can have arbitrary custom types, which psych makes use of
[09:18:32] apeiros: 18>> require 'yaml'; /foo/.to_yaml # just curious how it was with syck
[09:18:33] ruby[bot]: apeiros: # => "--- !ruby/regexp /foo/\n" (https://eval.in/576086)
[09:18:41] apeiros: ok, same custom type
[09:18:46] snowy: has joined #ruby
[09:20:20] jhass: yeah, my point is that it's not YAML having "a regex type", but Psych using/supporting a custom YAML type for regexes
[09:20:46] jhass: IMO the important difference is: will break/work differently with other YAML parsers
[09:20:59] skade: has joined #ruby
[09:21:15] PaulePanter: jhass: Ah, thank you!
[09:22:17] apeiros: any yaml parser should be capable of parsing all custom types. i.e. it should not break. but it might not have a sensible representation for the custom type.
[09:22:35] alexherbo2: has joined #ruby
[09:22:50] jhass: "YAML has a regex type" just sounds like something portable to me, which it isn't
[09:23:02] apeiros: afaik there's a fallback definition, something akin getting at least a string, an array or a k/v collection. but I never tried.
[09:23:41] snowy: has joined #ruby
[09:24:06] apeiros: even languages which support regular expressions might have a different engine, so a regex may not translate 1:1. so you might not even be able to write an adapter for the custom type.
[09:26:41] iMadper`: has joined #ruby
[09:27:14] myntcake: has joined #ruby
[09:27:24] tristanp_: has joined #ruby
[09:27:27] aupadhye: has joined #ruby
[09:27:48] myntcake: Is there a sample like method applicable to hashes?
[09:29:02] skade: has joined #ruby
[09:29:48] Zarthus: Hash#keys.sample?
[09:29:57] joonty: has joined #ruby
[09:30:05] Zarthus: (the question mark there is not parth of the method)
[09:30:22] Jet4Fire: has joined #ruby
[09:31:03] kgrz_: has joined #ruby
[09:31:18] Zarthus: alternatively #values if you don't need the key
[09:34:18] nankyokusei: has joined #ruby
[09:34:31] tristanp: has joined #ruby
[09:35:47] anisha: has joined #ruby
[09:37:33] Weavel: has joined #ruby
[09:40:09] tristanp_: has joined #ruby
[09:40:47] gtsai: has joined #ruby
[09:41:23] mlehrer: has joined #ruby
[09:42:00] Devalo: has joined #ruby
[09:42:47] zyzioziom: has joined #ruby
[09:43:41] startupality: has joined #ruby
[09:44:16] mistermocha: has joined #ruby
[09:44:36] tristanp: has joined #ruby
[09:50:18] workmad3: has joined #ruby
[09:51:17] mdw7: has joined #ruby
[09:51:56] bluOxigen: has joined #ruby
[09:53:54] ocbtec: has joined #ruby
[09:58:00] vondruch_: has joined #ruby
[10:01:00] CROOKED^HILLARY^: has joined #ruby
[10:04:39] skade: has joined #ruby
[10:09:16] conta: has joined #ruby
[10:12:00] madgen: has joined #ruby
[10:12:52] Darkwater: has joined #ruby
[10:14:03] Oog: has joined #ruby
[10:15:41] tristanp: has joined #ruby
[10:16:58] jackjackdripper: has joined #ruby
[10:19:56] SirCmpwn: has joined #ruby
[10:20:20] m8: has joined #ruby
[10:20:23] andrewvos: has joined #ruby
[10:23:00] startupality: has joined #ruby
[10:23:04] staticfox: has joined #ruby
[10:23:52] User458764: has joined #ruby
[10:24:33] antgel: has joined #ruby
[10:24:38] glcx: has joined #ruby
[10:26:05] rideh: has joined #ruby
[10:26:39] stardiviner: has joined #ruby
[10:27:24] Fire-Dragon-DoL: has joined #ruby
[10:30:14] neanderslob: has joined #ruby
[10:31:07] eGGshke: has joined #ruby
[10:36:14] tristanp_: has joined #ruby
[10:38:10] tristanm_: has joined #ruby
[10:40:37] bronson: has joined #ruby
[10:42:14] Macaveli: has joined #ruby
[10:43:24] tristanp: has joined #ruby
[10:43:31] GodFather_: has joined #ruby
[10:45:15] tristanp: has joined #ruby
[10:46:16] myntcake: has joined #ruby
[10:49:17] Macaveli: has joined #ruby
[10:50:04] Ch4rAss: has joined #ruby
[10:54:00] tristanp: has joined #ruby
[10:58:56] myntcake: Is there a sample like method applicable to hashes?
[10:59:37] apeiros: hash.to_a.sample(n).to_h
[10:59:50] jancel: has joined #ruby
[11:00:28] alfie_max15: has joined #ruby
[11:00:50] jaguarmagenta: has joined #ruby
[11:01:36] sepp2k: has joined #ruby
[11:02:58] jhass: I usually keep stuff as [[a, b], ...] if that need arises though
[11:03:31] jhass: chances are big you don't need the key value lookup property of Hash at all
[11:03:39] myntcake: I'm building a 21 like game
[11:03:51] RegulationD: has joined #ruby
[11:04:01] myntcake: so i was thinking of organizing the hearts,diamonds, etc. with its 2,3,4,5,6... cards
[11:04:30] myntcake: and so make 4 keys as symbols, and the values as an array of numbers
[11:04:38] aleskandro: has joined #ruby
[11:05:03] jhass: when will you lookup all cards by its symbol?
[11:05:04] GodFather: has joined #ruby
[11:05:17] jhass: let me rephrase
[11:05:33] jhass: when will you need to fetch all cards of a color, knowing the color?
[11:05:59] myntcake: no, i would just need a card with its head
[11:06:13] myntcake: that would be randomized
[11:06:20] k3rn31: has joined #ruby
[11:06:25] GodFather_: has joined #ruby
[11:06:29] dangerousdave: has joined #ruby
[11:06:32] myntcake: so a nested array is better for that occasion?
[11:06:38] jhass: when you say type you mean color + value ?
[11:06:45] aleskandro: Hi all, i'm using the i18n gem on a rails project. In one form I have a nested form for room with fields_for (roomFeature) and the label of the fields are translated from the yaml. But when I make a validation error the field name is not translated. I receive "Roomfeatures description non puo` essere bianca". How can I set "Roomfeatures description" in the yaml?
[11:08:14] jhass: myntcake: so why not just [[:hearts, 2], [:hearts, 3], ..., [:hearts, 14], ..., [:diamonds, 5], ...]?
[11:08:31] GodFather: has joined #ruby
[11:08:46] myntcake: so a nested array is a better option?
[11:08:59] myntcake: jhass: idk.. haha i just wanted to type less
[11:09:01] jhass: probably, I don't know all your requirements to the data structure
[11:09:08] jhass: generate it
[11:09:43] myntcake: so iwas thinking CARDS=[2,3,4,5..] and deck{hearts: CARDS}
[11:09:52] jhass: colors.flat_map {|color| values.map {|value| [color, value] } }
[11:09:53] rodfersou: has joined #ruby
[11:10:15] tristanp_: has joined #ruby
[11:10:38] myntcake: is flat_map different from just map?
[11:10:52] rodfersou: has joined #ruby
[11:10:59] myntcake: it flattens the array?
[11:11:18] jhass: >> %(ab bc cd).flat_map {|s| s.chars }
[11:11:19] ruby[bot]: jhass: # => undefined method `flat_map' for "ab bc cd":String (NoMethodError) ...check link for more (https://eval.in/576137)
[11:11:25] jhass: >> %w(ab bc cd).flat_map {|s| s.chars }
[11:11:26] ruby[bot]: jhass: # => ["a", "b", "b", "c", "c", "d"] (https://eval.in/576138)
[11:11:44] jhass: >> %w(ab bc cd).flat_map {|s| [s.size, s.chars] }
[11:11:45] ruby[bot]: jhass: # => [2, ["a", "b"], 2, ["b", "c"], 2, ["c", "d"]] (https://eval.in/576139)
[11:12:04] GodFather: has joined #ruby
[11:12:04] jhass: it flattens only one level
[11:12:31] tristanp: has joined #ruby
[11:12:44] jhass: it's basically .each_with_object([]) {|item, ary| ary.concat stuff_with(item) }
[11:14:05] jhass: ?rails aleskandro
[11:14:05] ruby[bot]: aleskandro: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[11:14:21] tristanm_: has joined #ruby
[11:15:24] habitullence: has joined #ruby
[11:15:39] eGGshke: #RubyOnRails
[11:16:05] alfie_max15: eGGshke, trying to join???
[11:16:21] tristanp_: has joined #ruby
[11:17:40] GodFather: has joined #ruby
[11:19:30] GodFather_: has joined #ruby
[11:20:44] craigp: has joined #ruby
[11:20:52] johnmilton: has joined #ruby
[11:21:16] gnufied: has joined #ruby
[11:22:17] craigp: has joined #ruby
[11:22:27] ruby[bot]: -bbb DoubleMan!*@*$#ruby-banned Ashley-ny!*@*$#ruby-banned *!*@2.237.171.7$#ruby-banned
[11:22:50] tristanp_: has joined #ruby
[11:23:43] startupality: has joined #ruby
[11:24:28] Darkwater: what do the cool kids these days use for ruby doc generation?
[11:27:12] zyzioziom1: has joined #ruby
[11:27:51] workmad3: Darkwater: hand-written with beautiful caligraphy
[11:28:06] finnnnnnnnnnn: has joined #ruby
[11:28:46] mistermocha: has joined #ruby
[11:29:58] d0lph1n98: has joined #ruby
[11:30:08] doodlehaus: has joined #ruby
[11:30:08] ruby[bot]: +b doodlehaus!*@*$#ruby-banned
[11:30:08] ruby[bot]: ruby[bot] kicked doodlehaus: banned before
[11:30:34] chipotle: has joined #ruby
[11:30:45] griffindy: has joined #ruby
[11:31:06] shellie_: has joined #ruby
[11:31:07] madgen: has joined #ruby
[11:31:09] finnnnnnnnnnn: Hello! I’m trying to use an array as a reference to a location in a RecursiveOpenStruct object. It’s probably a bad idea. I’ve asked a question on stack overflow if anyone cares to have a look - http://stackoverflow.com/questions/37411889
[11:32:55] hutch34: has joined #ruby
[11:33:06] shellie_: I'm new to ruby, I'm working with rspec. I have this global variable I'm setting in a before all context, which I can't seem to use later in my describe, it goes empty (maybe nil) - any idea what I could do to be able to access it from the describe context?
[11:33:48] tobiasvl: shellie_: perhaps show some code
[11:35:07] elementaru: has joined #ruby
[11:35:11] nankyokusei: has joined #ruby
[11:36:58] shellie_: here http://codepad.org/uV4LCp7J
[11:37:02] shellie_: tobiasvl: ^
[11:37:05] skade: has joined #ruby
[11:37:34] jud: has joined #ruby
[11:39:55] Darkwater: shellie_: in that code, ruby tries to resolve @somevar before it's set by something
[11:40:42] shellie_: oh, that's because it interpretes the code, before the 'before context' gets executed?
[11:40:48] Darkwater: on like 6, you're really calling describe with the result ofsomeresource(@somevar) and a block
[11:41:04] ldnunes: has joined #ruby
[11:41:13] Darkwater: if my knowledge of rspec is ok I think you need to pass a string to describe
[11:41:29] Darkwater: describe 'some functionality' do ...
[11:41:45] Darkwater: same with it
[11:42:00] shellie_: Darkwater: oh, this is serverspec, not pure rspec, I think
[11:42:04] Darkwater: iirc it and describe are equivalent, just some semantic changes
[11:42:11] craigp: has joined #ruby
[11:42:30] Kus: has joined #ruby
[11:42:32] Darkwater: ooh I see what yuo're trying to do
[11:42:32] jhass: not quite, no
[11:42:38] c355E3B: has joined #ruby
[11:43:33] shellie_: Darkwater: what do you think the solution here could be?
[11:43:41] craigp: has joined #ruby
[11:44:09] Darkwater: I think removing the before :all block might do
[11:44:16] Darkwater: like, set @somevar directly in the describe block
[11:44:35] Darkwater: since you're using it to define the tests, instead of actually using them in the tests
[11:44:42] Darkwater: but then again I don't use rspec
[11:44:55] Darkwater: it would at least work
[11:44:59] shellie_: this is my issue. I depend on a function that does some remote execution, which I can call from within a before block, but not outside it, and I'm not too sure how to go about fixing that
[11:45:04] jhass: no need to make it an instance variable even
[11:45:18] craigp: has joined #ruby
[11:45:23] jhass: perhaps you just shouldn't call it outside
[11:45:27] Darkwater: then I think you need to look for a different approach
[11:45:56] myntcake: has joined #ruby
[11:46:17] nadir: has joined #ruby
[11:46:57] vondruch: has joined #ruby
[11:47:21] shellie_: how can I print the full name space of a given function?
[11:47:48] apeiros: functions don't have namespaces :-p
[11:48:06] apeiros: of a method - depends, do you have a Method or an UnboundMethod instance?
[11:48:10] craigp: has joined #ruby
[11:48:24] apeiros: oh, actually both support .owner
[11:48:33] shellie_: I think it is bound, but I would need some help in figuring that out :)
[11:48:35] shellie_: let me try owner
[11:48:41] apeiros: so: see Method/UnboundMethod#owner
[11:48:46] evidex: has joined #ruby
[11:48:53] Ishido: has joined #ruby
[11:48:56] jhass: and see Object#method
[11:49:05] apeiros: and Module#instance_method
[11:49:14] apeiros: though I assumed you already had gone that far.
[11:49:27] jhass: click on the paste :P
[11:50:00] apeiros: wher's ze paste?
[11:50:11] apeiros: oh, this is a follow-up question?
[11:50:13] davedev24: has joined #ruby
[11:50:20] Darkwater: why do the headers from `ri -T String` contain backspaces? is it so you can't grep them?
[11:51:44] tristanp: has joined #ruby
[11:53:38] tristanm_: has joined #ruby
[11:53:39] giz|work: Darkwater: the commit messages for this is: "Prevent Darkwater from grepping strings on 24.May.2016".... the commit is one year old though Oo
[11:53:43] LoneHermit: has joined #ruby
[11:54:46] netcho: has joined #ruby
[11:56:25] netcho: using whenever gem to create crons, it works fine if i have only one app per server. If i host multiple apps on one server i rewrites crons so only last app deployed has crons in crontab
[11:56:59] jhass: systemd timers time!
[11:57:17] strigon33: has joined #ruby
[11:57:55] jhass: netcho: run your apps as different users? probably a good idea either way
[11:58:15] netcho: not an option
[11:58:47] netcho: all apps are ran as the same user
[11:59:03] Darkwater: append to cron
[11:59:04] tristanp: has joined #ruby
[11:59:12] Darkwater: or rather replace the correct one
[11:59:21] Darkwater: as in, the corerct line(s)
[11:59:43] Hanmac: has joined #ruby
[12:00:04] |2701: has joined #ruby
[12:00:54] roamingdog: has joined #ruby
[12:01:09] tristanp_: has joined #ruby
[12:02:13] maucar: has joined #ruby
[12:03:05] tristanm_: has joined #ruby
[12:03:44] jaruga___: has joined #ruby
[12:04:42] CJKinni: has joined #ruby
[12:04:45] chouhoulis: has joined #ruby
[12:06:16] synthroid: has joined #ruby
[12:07:19] roamingdog: has joined #ruby
[12:09:42] beauby: has joined #ruby
[12:10:09] tristanp: has joined #ruby
[12:10:20] jhass: "are" != "must"
[12:12:43] umdstu: has joined #ruby
[12:14:20] Devalo: has joined #ruby
[12:16:00] hahuang61: has joined #ruby
[12:18:39] ksmutthu_: has joined #ruby
[12:18:40] Kus: has joined #ruby
[12:20:34] kgrz: has joined #ruby
[12:21:03] lxsameer: is there any alternative for redcarpet gem for jruby ?
[12:21:23] zenlot: has joined #ruby
[12:21:34] mauricar: has joined #ruby
[12:21:53] moeabdol: has joined #ruby
[12:21:55] skade: has joined #ruby
[12:22:02] eGGshke: has joined #ruby
[12:23:04] netcho: jhass: it is not my call :D
[12:23:15] netcho: how is identifier ser?
[12:23:17] netcho: how is identifier set?
[12:24:41] LoneHerm_: has joined #ruby
[12:25:21] ctp: has joined #ruby
[12:25:44] mikecmpb_: has joined #ruby
[12:26:44] Darkwater: no matter how fitting that was it was 100% an accident i swear
[12:27:30] aegis3121: has joined #ruby
[12:31:26] tristanp_: has joined #ruby
[12:31:54] nettoweb: has joined #ruby
[12:33:18] ptx0: has joined #ruby
[12:34:28] nettoweb: hey guys, is there a way to not set the full pah of this gem in order to work: :To fix a bug, Im using lie this today: WickedPdf.config = { :exe_path => '/Users/netto/.rvm/gems/
[12:35:05] tristanp: has joined #ruby
[12:35:12] nettoweb: I'd like to know if there is a variable to get the gem folder directory and dont need to pass my user folder
[12:37:01] tristanp_: has joined #ruby
[12:38:32] moeabdol: has joined #ruby
[12:38:34] veloutin: has joined #ruby
[12:38:52] tristanm_: has joined #ruby
[12:39:10] Darkwater: ENV['HOME'] . '/.rvm'?
[12:40:31] nofxx: has joined #ruby
[12:40:46] tristanp: has joined #ruby
[12:40:49] kies: has joined #ruby
[12:41:17] startupality: has joined #ruby
[12:41:23] gtsai: has joined #ruby
[12:42:52] bronson: has joined #ruby
[12:43:34] wwwbukolaycom: has joined #ruby
[12:44:35] skade: has joined #ruby
[12:45:27] mdih: has joined #ruby
[12:46:37] dreinull: !!"x" => true but generates a warning. How else should I check for true/false?
[12:47:08] iooner: has joined #ruby
[12:48:04] netcho: jhass: i set appname as identifier and update instead of write.... all good now
[12:50:21] CJKinni: has joined #ruby
[12:50:42] BTRE: has joined #ruby
[12:52:53] tobiasvl: dreinull: why do you need to check for true/false and not truthiness/falsiness?
[12:53:19] dreinull: tobiasvl I do
[12:54:12] tobiasvl: dreinull: ok. why do you need to have a string literal in the test then?
[12:54:31] tobiasvl: with a string literal you could literally (!) replace !!"x" with true
[12:54:37] tristanp: has joined #ruby
[12:54:51] tobiasvl: this is a basic XY problem if ever I saw one
[12:55:21] dreinull: tobiasvl example. I check the mapped return of method evals. Just need the true/false results to check if any enumerated value returned a negative response.
[12:55:50] johnmilton: has joined #ruby
[12:55:56] tobiasvl: dreinull: and you can't check if the enumerated value is truthy or falsy instead?
[12:57:24] dreinull: it is send to a method which returns an array. If array is sent it's true, if not it's false. So I have sth like set.map{|s|!!s.meth}.all?
[12:57:39] dreinull: which works for me
[12:57:51] tobiasvl: but that shouldn't give a warning?
[12:57:55] tobiasvl: there's no string literal there
[12:58:34] dreinull: tobiasvl I assumed the double bang would give a warning nonetheless
[12:58:56] tobiasvl: well it shouldn't
[12:59:07] dreinull: ok then. I'm happy.
[12:59:11] nobitanobi: has joined #ruby
[13:00:49] skade: has joined #ruby
[13:00:54] Biopandemic: has joined #ruby
[13:01:35] jaguarmagenta: has joined #ruby
[13:01:35] nobitanobi: has joined #ruby
[13:01:53] Cork: anyone know how to exit from Dir.chroot ?
[13:01:55] dstarh: has joined #ruby
[13:02:59] duckpuppy: has joined #ruby
[13:03:11] adaedra: Should not be possible, that's the point of chroot
[13:04:06] Cork: adaedra: not always no
[13:04:23] Cork: in this case it is cause i need to run some programs in that context
[13:04:46] workmad3: Cork: I don't believe you can... once you chroot a process you can't unjail it
[13:04:49] Cork: it takes a block
[13:05:10] tristanp_: has joined #ruby
[13:05:23] ramortegui: has joined #ruby
[13:05:27] workmad3: Cork: the idea would normally be to fork then chroot the forked process
[13:06:11] ChiefAlexander: has joined #ruby
[13:06:15] rkoller: has joined #ruby
[13:07:18] workmad3: Cork: you can do that fairly easily though... `fork { Dir.chroot "blah"; exec "whatever" }`
[13:07:40] Cork: ah, good idea
[13:07:53] Cork: but the main process won't wait for it right?
[13:08:09] dhk: has joined #ruby
[13:08:19] matp: has joined #ruby
[13:08:21] pandaant: has joined #ruby
[13:08:25] workmad3: Cork: not by default, no... but `fork` will return the PID, iirc, so you can capture that and wait for it later
[13:08:56] tristanp: has joined #ruby
[13:09:06] Cork: ya so pid = fork {}; wait(pid) right?
[13:09:23] Cork: (haven't worked much forks)
[13:09:34] jrafanie: has joined #ruby
[13:10:11] workmad3: Cork: looks about right
[13:10:15] workmad3: Cork: http://ruby-doc.org/core-2.2.0/Process.html#method-c-wait
[13:10:20] skade: has joined #ruby
[13:10:25] apeiros: Cork: https://rubygems.org/gems/fork
[13:10:28] apeiros: makes it easy
[13:10:50] apeiros: (shameless plug)
[13:11:38] Cork: hmm, it works find except it hangs for keypress...
[13:11:53] Cork: hmm, stdin hang?
[13:12:19] domgetter: has joined #ruby
[13:12:37] Cork: apeiros: ah, nice
[13:12:45] tristanp_: has joined #ruby
[13:14:25] skade: has joined #ruby
[13:15:07] jhass: dreinull: .all? does truthiness checks too, it doesn't expect true or false
[13:16:53] ldnunes: has joined #ruby
[13:16:56] hahuang61: has joined #ruby
[13:16:57] nobitanobi: has joined #ruby
[13:17:19] startupality: has joined #ruby
[13:17:31] workmad3: Cork: oh, the forked process won't be connected to your stdin...
[13:17:39] workmad3: Cork: you may need to delve into POpen for that
[13:17:58] Cork: ya, i've fiddled with that before
[13:18:03] Cork: forgotten it though >_<
[13:18:17] domgetter: (or set $stdout to a logfile in the child process and tail the log)
[13:18:41] skade: has joined #ruby
[13:19:12] domgetter: oh you said stdin. I should read more
[13:21:52] kobain: has joined #ruby
[13:23:13] maloik: has joined #ruby
[13:26:15] User458764: has joined #ruby
[13:26:55] skade: has joined #ruby
[13:27:40] nobitanobi: has joined #ruby
[13:27:51] dreinull: jhass ok, just noticed, too.
[13:28:16] jhass: dreinull: there's very few things in ruby that do
[13:28:36] jhass: so your default assumption should be to not need !! noise
[13:28:47] finnnnnnnnnnn: has joined #ruby
[13:28:57] dreinull: jhass I had a bug elsewhere :)
[13:29:05] freerobby: has joined #ruby
[13:29:53] gfvcastro: has joined #ruby
[13:30:52] Darkwater: couldn't you use set.all? { |s| s.meth }?
[13:33:03] dreinull: Darkwater even better
[13:33:24] aegis3121: set.all?(&:meth)
[13:34:06] chipotle: has joined #ruby
[13:34:59] skade: has joined #ruby
[13:36:02] nankyokusei: has joined #ruby
[13:37:21] gfvcastro: has joined #ruby
[13:40:44] tristanp: has joined #ruby
[13:41:20] evidex: has joined #ruby
[13:41:35] apeiros: naming question - how'd you call an attribute which stores whether you're "not yet born", "alive" or "deceased"?
[13:41:45] maloik56: has joined #ruby
[13:42:15] apeiros: andrewvos: does not fit, as unborn? does not not cover the distinction of alive and deceased
[13:42:19] DylanJ: Anyone here know Sequel, Postgres and used TSRANGE types? Great! How can I pass a Time range `(Time.now..Time.now+1)` directly to an instance of a Sequel::Model without wrapping it in Sequel.pg_range. I see there's an option to register types `DB.register_range_type('timerange')
[13:42:26] Darkwater: :unborn/alive/deceased
[13:42:29] apeiros: stage/status are IMO too unspecific
[13:42:30] DylanJ: ` but the function does not exist.
[13:42:42] Darkwater: life-stage/
[13:42:42] apeiros: Darkwater: those are the *values*, I ask for the name of the *property* ;-)
[13:43:01] apeiros: (and yes, "not yet alive" is indeed "unborn" in that code)
[13:43:17] zyzioziom: has joined #ruby
[13:43:29] tristanp_: has joined #ruby
[13:44:06] andrewvos: apeiros: do you need the destinction between not yet born and deceased?
[13:44:13] andrewvos: cause #alive? might do
[13:44:25] apeiros: phase_of_life, vitality, …?
[13:44:30] apeiros: andrewvos: yes, very much so :)
[13:45:02] andrewvos: if !h.alive? && age < 0
[13:45:16] apeiros: that's code. I need to store a property in a db ;-)
[13:45:25] apeiros: and now I'm looking for a good column name
[13:45:32] andrewvos: #antenatal?
[13:45:45] nobitanobi: has joined #ruby
[13:46:05] stannard: has joined #ruby
[13:46:09] jhass: constitution?
[13:46:14] chipotle: has joined #ruby
[13:46:54] andrewvos: natality -> %w{antenatal postnatal}
[13:47:09] maloik_: has joined #ruby
[13:47:11] startupality: has joined #ruby
[13:47:24] apeiros: that only seems to cover unborn/alive and misses deceased
[13:47:56] jhass: liveliness
[13:48:12] maloik: has joined #ruby
[13:48:34] maloik: hello friends
[13:48:37] apeiros: I wonder whether in 10y we'll just ask our AI assistant for that and they search their 500k vocables dict
[13:49:10] deadnull_: has joined #ruby
[13:50:03] Darkwater: no because someone has to teach the aI
[13:50:56] andrewvos: has joined #ruby
[13:51:34] davedev24: has joined #ruby
[13:51:34] maloik: I missed most of the conversation, but why not `breathing` ?
[13:51:40] maloik: as in a boolean
[13:51:45] apeiros: it's 3 state
[13:51:50] maloik: that coupled with a birth date (which I'm assuming you have) will fix that?
[13:52:17] maloik: sorry for offering suggestions not knowing full context :)
[13:52:21] andrewvos: existence => antinatal, alive, dead
[13:52:22] centrx: has joined #ruby
[13:52:29] andrewvos: also I just learned about this https://en.wikipedia.org/wiki/Antinatalism
[13:52:33] elomatreb: ... I don't think I even want to know where you would need this?
[13:52:40] apeiros: we have 3 date fields, estimated_date_of_birth, date_of_birth, date_of_death
[13:52:47] jhass: gotta love English
[13:52:52] apeiros: but while we might know somebody is deceased, we may not know when
[13:53:06] apeiros: similar wrt being unborn and alive
[13:53:28] apeiros: vivacity sounds great. let me check that against the team :D
[13:53:44] maloik: only unknown date of death kind of ruins it :(
[13:53:46] iooner: has joined #ruby
[13:53:58] maloik: you'd be able to determine alive but unborn or alive and born with the other two dates
[13:54:01] apeiros: we first had two boleans, unborn and deceased
[13:54:13] apeiros: and IMO it'd be proper to put that into a single column which is 3 state
[13:54:15] andrewvo1: has joined #ruby
[13:54:16] idefine_: has joined #ruby
[13:54:17] andrewvo1: damnit I got disconnected
[13:54:21] andrewvo1: what was the final choice?
[13:54:31] jhass: perhaps just vitality
[13:54:33] andrewvos: are you really gonna have a row for something that's unborn
[13:54:46] idefine: has joined #ruby
[13:55:09] apeiros: andrewvos: not "gonna". we have.
[13:55:13] apeiros: and we must have.
[13:55:32] andrewvos: you should choose something obviou
[13:55:32] idefine_: has joined #ruby
[13:55:36] andrewvos: don't try be too clever
[13:55:36] crystal77: has joined #ruby
[13:55:40] andrewvos: current_life_state
[13:55:43] apeiros: I try to be concise
[13:55:52] andrewvos: current_life_state [:alive, :unborn, :dead]
[13:56:02] apeiros: my current favorites are phase_of_life and vitality/vivacity
[13:56:09] andrewvos: the former is good
[13:56:13] andrewvos: the latter is irritating
[13:56:45] pawnbox: has joined #ruby
[13:56:51] crystal77: has joined #ruby
[13:58:15] crystal77: has joined #ruby
[13:59:01] stannard: has joined #ruby
[13:59:24] cdg: has joined #ruby
[13:59:39] finnnnnnnnnnn_: has joined #ruby
[14:00:34] GodFather_: has joined #ruby
[14:01:22] LoneHermit: has joined #ruby
[14:01:48] hk238: has joined #ruby
[14:02:09] cdg: has joined #ruby
[14:06:46] apeiros: sorry, got interrupted by a phone call
[14:07:08] apeiros: thanks andrewvos, jhass, maloik, Darkwater and everybody who helped me bounce :)
[14:07:21] apeiros: phase_of_life it is
[14:08:30] jhass: dunno, are in a phase of your life if you're not yet or no longer alive?
[14:09:30] jhass: physical_state?
[14:10:32] maloik: what about your soul though
[14:10:52] jhass: irrelevant to some database on earth
[14:11:02] maloik: isn't his database in the cloud?
[14:11:15] Darkwater: #alive? -> :not_yet / :yes / :not_anymore
[14:11:17] jhass: in the wrong one
[14:11:45] strigonLeader: has joined #ruby
[14:12:30] mikar: has joined #ruby
[14:14:21] strigonLeader: has joined #ruby
[14:14:28] skade: has joined #ruby
[14:19:02] apeiros: jhass: yes, that was why I didn't take it immediately. but I think it's an acceptable term, even if two states are "out of bounds" :)
[14:19:32] apeiros: incarnation_phase
[14:20:00] eL_bAmba: has joined #ruby
[14:20:02] apeiros: added states: "in_search_of_new_vessel"
[14:20:20] mauricari: has joined #ruby
[14:21:04] rbennacer: has joined #ruby
[14:21:23] maloik: I so hope you're not working on AI. That'd creep me out.
[14:21:25] jhass: spiritual_state = previous_level|earth|next_level
[14:23:31] axl_: has joined #ruby
[14:23:53] Velizar: has joined #ruby
[14:24:43] strigonLeader: has joined #ruby
[14:25:10] import_this: has joined #ruby
[14:25:19] tristanp: has joined #ruby
[14:25:19] Velizar: RubyMine 2016.1 is the latest stable version, right? Why does my RubyMine stay at 8.0.4? I'm on OS X.
[14:26:00] apeiros: maloik: no, this stuff is mostly relevant for the insurance business part
[14:26:19] import_this: go to the jet brains site directly to get the latest version
[14:26:23] import_this: it should prompt you when opened
[14:26:51] import_this: the program rather not the site, but if it doesn't just download the trial install over and use your previous key
[14:27:22] Velizar: yeah it doesn't, and I don't know why. Guess I'll do that then
[14:27:36] CROOKED^HILLARY^: has joined #ruby
[14:27:43] Velizar: 8.0.4 annoyingly flags the &. operator as an error
[14:27:57] import_this: what os are you using
[14:28:02] Velizar: OS X, latest
[14:28:56] import_this: command + , for pref, search for inspections and expand ruby, you should be able to turn that off there
[14:29:01] aharlan: has joined #ruby
[14:29:29] Velizar: huh, it asks again for the license on my Arch Linux OS. Nevermind then
[14:29:29] import_this: if you hover over it it will give you the name of the warning to turn off
[14:29:37] Velizar: guess I'll just do that
[14:29:39] import_this: no don't worry about that
[14:29:49] adaedra: has joined #ruby
[14:29:50] import_this: you can use the license even the older version it will convert to the new one
[14:29:52] tristanp_: has joined #ruby
[14:29:57] Velizar: yeah I know
[14:30:02] import_this: it will ask for your license again on both OSs
[14:30:04] Velizar: I meant I'll re-enter the license
[14:30:30] nobitanobi: has joined #ruby
[14:31:21] Juanchito: has joined #ruby
[14:31:40] SilverKey: has joined #ruby
[14:31:45] tristanp: has joined #ruby
[14:31:46] madgen: has joined #ruby
[14:33:27] startupality_: has joined #ruby
[14:33:51] strigon33: has joined #ruby
[14:34:35] B1n4r10: has joined #ruby
[14:36:32] import_this: has joined #ruby
[14:36:36] crankharder: has joined #ruby
[14:36:42] ctp: has joined #ruby
[14:38:34] hutch34_: has joined #ruby
[14:38:38] stannard: has joined #ruby
[14:39:42] eL_bAmba: has joined #ruby
[14:40:30] sean_m: has joined #ruby
[14:40:34] hutch34__: has joined #ruby
[14:40:51] skade: has joined #ruby
[14:41:17] B1n4r10: has joined #ruby
[14:41:32] cjbottaro: has joined #ruby
[14:43:28] idefine: has joined #ruby
[14:43:50] SilverKey: has joined #ruby
[14:44:28] jhack: has joined #ruby
[14:44:28] dionysus69: has joined #ruby
[14:44:40] bronson: has joined #ruby
[14:44:52] noway_: has joined #ruby
[14:45:02] mdw: has joined #ruby
[14:45:38] armyriad: has joined #ruby
[14:46:12] chouhoulis: has joined #ruby
[14:46:25] Devalo: has joined #ruby
[14:46:55] chouhoulis: has joined #ruby
[14:47:18] aries_liuxueyang: has joined #ruby
[14:48:01] gtsai: has joined #ruby
[14:48:48] ctp: has joined #ruby
[14:50:11] chouhoul_: has joined #ruby
[14:50:35] Velizar: has joined #ruby
[14:50:57] idefine: has joined #ruby
[14:51:30] M-Kodo: has joined #ruby
[14:51:36] gtsai: has joined #ruby
[14:53:50] skade: has joined #ruby
[14:56:16] fmcgeough: has joined #ruby
[14:57:47] zast: has joined #ruby
[14:58:08] brandly: has joined #ruby
[14:58:23] aegis3121: has joined #ruby
[14:59:14] flughafen_: has joined #ruby
[15:01:15] borodin: has joined #ruby
[15:03:14] anisha: has joined #ruby
[15:03:39] FooMunki: has joined #ruby
[15:03:57] tristanp: has joined #ruby
[15:04:42] smathy: has joined #ruby
[15:04:48] Yiota: has joined #ruby
[15:05:25] ljames: has joined #ruby
[15:08:00] cdg: has joined #ruby
[15:09:27] banister: has joined #ruby
[15:10:01] tristanp: has joined #ruby
[15:10:33] gfvcastro: has joined #ruby
[15:12:01] DoubleMalt: has joined #ruby
[15:14:08] lukec: has joined #ruby
[15:15:13] nobitanobi: has joined #ruby
[15:15:49] ss_much: has joined #ruby
[15:17:41] B1n4r10: has joined #ruby
[15:18:43] hahuang61: has joined #ruby
[15:19:59] SilverKey: has joined #ruby
[15:21:18] mauricar: has joined #ruby
[15:21:38] skweek: has joined #ruby
[15:22:25] yardenbar: has joined #ruby
[15:23:58] kgrz: has joined #ruby
[15:24:31] chopin: has joined #ruby
[15:26:22] diegoaguilar: has joined #ruby
[15:28:11] kareeoleez: has joined #ruby
[15:28:12] borodin: has joined #ruby
[15:29:02] isene2: has joined #ruby
[15:29:27] skade: has joined #ruby
[15:31:05] swills: has joined #ruby
[15:31:52] skade: has joined #ruby
[15:34:03] Cohedrin: has joined #ruby
[15:35:46] zyzioziom: has joined #ruby
[15:36:50] nankyokusei: has joined #ruby
[15:37:12] gfvcastro: has joined #ruby
[15:40:21] freerobby: has joined #ruby
[15:40:22] nofxx: has joined #ruby
[15:40:22] Ch4rAss: has joined #ruby
[15:40:22] sarlalian: has joined #ruby
[15:40:22] hightower3: has joined #ruby
[15:40:22] andikr: has joined #ruby
[15:40:22] Evans: has joined #ruby
[15:40:22] spectra: has joined #ruby
[15:40:22] nekomune: has joined #ruby
[15:40:22] rbr: has joined #ruby
[15:40:22] martinbjeldbak: has joined #ruby
[15:40:22] blackwell: has joined #ruby
[15:40:22] Raboo: has joined #ruby
[15:40:22] ereslibre_laptop: has joined #ruby
[15:40:22] jpterry: has joined #ruby
[15:40:22] csmb: has joined #ruby
[15:40:22] Kamilion: has joined #ruby
[15:40:22] Kruppe: has joined #ruby
[15:40:22] hadronzoo: has joined #ruby
[15:41:09] tristanp: has joined #ruby
[15:41:20] SilverKey: has joined #ruby
[15:41:23] inukshuk_: has joined #ruby
[15:41:54] User458764: has joined #ruby
[15:43:10] skolman_: has joined #ruby
[15:43:24] moeabdol: has joined #ruby
[15:44:18] Devalo: has joined #ruby
[15:45:00] dgynn: has joined #ruby
[15:45:53] dhollinger: has joined #ruby
[15:45:53] rippa: has joined #ruby
[15:45:53] centrx: has joined #ruby
[15:45:53] jrafanie: has joined #ruby
[15:45:53] umdstu: has joined #ruby
[15:45:53] myntcake: has joined #ruby
[15:45:54] habitullence: has joined #ruby
[15:45:54] GarethAdams: has joined #ruby
[15:45:54] UserInneed: has joined #ruby
[15:45:54] aphprentice: has joined #ruby
[15:45:54] aufi: has joined #ruby
[15:45:54] EdwardIII: has joined #ruby
[15:45:54] yude: has joined #ruby
[15:45:54] DanKnox_: has joined #ruby
[15:45:54] nertzy: has joined #ruby
[15:45:54] Asher: has joined #ruby
[15:45:54] ujjain: has joined #ruby
[15:45:54] joevandy1: has joined #ruby
[15:45:54] ByronJohnson: has joined #ruby
[15:45:54] Phtm: has joined #ruby
[15:45:54] mozzarella: has joined #ruby
[15:45:54] themightyabby: has joined #ruby
[15:45:54] Zackio: has joined #ruby
[15:45:54] patrick_star_3: has joined #ruby
[15:45:54] triangles2: has joined #ruby
[15:45:54] malcolmva: has joined #ruby
[15:45:54] canton7: has joined #ruby
[15:45:56] skolman: has joined #ruby
[15:46:26] myntcake: has left #ruby: ("Leaving")
[15:46:30] myntcake: has joined #ruby
[15:46:55] umdstu: idk. happens a lot. i had to disable audio notifications because its annoying AF
[15:47:17] frem_: has joined #ruby
[15:47:22] myntcake: that was weird haha
[15:47:33] umdstu: happens daily
[15:47:53] aphprentice: has joined #ruby
[15:47:53] Velizar: has left #ruby: ()
[15:47:56] [Butch]: has joined #ruby
[15:48:16] jhass: audio notifications for IRC joins? oO
[15:48:47] crystal77: has joined #ruby
[15:49:15] evidex: has joined #ruby
[15:50:39] UAS91: has joined #ruby
[15:51:07] UAS91: Hey guys, I have a quick question.
[15:51:10] synthroid: has joined #ruby
[15:51:40] skade: has joined #ruby
[15:51:53] UAS91: I'm trying to have text after a link_to in my conditional. link_to("text", path(user))
[15:52:01] UAS91: and I'm trying to add text right at the end of the link_to
[15:52:21] UAS91: It's not working if I just put a string on the next line, or at the end of this line
[15:52:31] smathy: ?rails UAS91
[15:52:31] ruby[bot]: UAS91: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[15:52:34] UAS91: And I don't want my entire string to be a link
[15:53:23] umdstu: jhass: yes… it’s on by default in Colloquy.app
[15:53:47] umdstu: is that confusing to you?
[15:54:23] ByronJohnson: has joined #ruby
[15:55:17] Coldblackice_: has joined #ruby
[15:55:35] synthroid: has joined #ruby
[15:56:26] jhass: sounds very annoying in normal use already
[15:57:21] umdstu: oh i have no doubt. but historically i had my computer muted
[15:59:21] freerobby: has joined #ruby
[16:00:15] amclain: has joined #ruby
[16:00:28] idefine: has joined #ruby
[16:00:38] norc: has joined #ruby
[16:00:52] Guest38: has joined #ruby
[16:01:16] nando293921: has joined #ruby
[16:01:42] isene2: has joined #ruby
[16:02:10] whathappens: has joined #ruby
[16:02:33] whathapp_: has joined #ruby
[16:03:05] tristanp_: has joined #ruby
[16:04:32] weemsledeux: has joined #ruby
[16:06:05] fergal_: has joined #ruby
[16:06:16] evidex: has joined #ruby
[16:06:16] myntcake: has joined #ruby
[16:06:16] dhollinger: has joined #ruby
[16:06:16] rippa: has joined #ruby
[16:06:16] centrx: has joined #ruby
[16:06:16] jrafanie: has joined #ruby
[16:06:16] umdstu: has joined #ruby
[16:06:16] habitullence: has joined #ruby
[16:06:16] GarethAdams: has joined #ruby
[16:06:16] UserInneed: has joined #ruby
[16:06:16] EdwardIII: has joined #ruby
[16:06:16] yude: has joined #ruby
[16:06:16] DanKnox_: has joined #ruby
[16:06:16] nertzy: has joined #ruby
[16:06:16] Asher: has joined #ruby
[16:06:16] ujjain: has joined #ruby
[16:06:16] joevandy1: has joined #ruby
[16:06:16] Phtm: has joined #ruby
[16:06:16] mozzarella: has joined #ruby
[16:06:16] themightyabby: has joined #ruby
[16:06:16] Zackio: has joined #ruby
[16:06:16] patrick_star_3: has joined #ruby
[16:06:17] triangles2: has joined #ruby
[16:06:17] malcolmva: has joined #ruby
[16:06:17] canton7: has joined #ruby
[16:06:45] moeabdol: has joined #ruby
[16:07:07] dionysus69: has joined #ruby
[16:07:38] fergal_: hi guys, i have a rake file within which i have a task defined to output current status to stdout, using puts. however, i have noticed that when i run the task via my build system, the output is not displayed during execution, but rather, when the task finishes, all the output is displayed at once. how can i get rake to output the status as the task is running?
[16:08:31] gizmore: has joined #ruby
[16:08:31] Alayde: has joined #ruby
[16:08:36] tristanp: has joined #ruby
[16:09:06] jmignault: has joined #ruby
[16:09:26] felipejose: has joined #ruby
[16:09:34] felipejose: someone here this need to host a site, if you send me a message I'm offering 10 acconts for free
[16:09:55] Alayde: has left #ruby: ()
[16:10:18] jmignault: has joined #ruby
[16:10:31] ksmutthu: has joined #ruby
[16:10:42] gizmore: felipejose: ssh?
[16:11:17] madgen: has joined #ruby
[16:13:03] allcentury: has joined #ruby
[16:13:26] tristanp: has joined #ruby
[16:15:24] fergal_: has left #ruby: ()
[16:16:25] import_this: has joined #ruby
[16:18:42] brendan-: has joined #ruby
[16:19:59] hutch34: has joined #ruby
[16:22:40] myntcake: felipejose: how come?
[16:24:22] nettoweb: has joined #ruby
[16:24:40] felipejose: because I'm starting now and is a way to make it known
[16:24:47] rbennacer: has joined #ruby
[16:25:13] skade: has joined #ruby
[16:25:14] norc: apeiros, got around to it. The overhead of creating a proc object bound to the functions block is really small.
[16:25:23] import_this: has joined #ruby
[16:25:44] mleung: has joined #ruby
[16:26:30] nobitanobi: has joined #ruby
[16:26:48] benlieb: has joined #ruby
[16:26:58] norc: apeiros, effectively the largest overhead is just an memory allocation - there is practically no initialization done aside from setting up flags and the class pointer.
[16:27:33] norc: So Im beginning to feel there is no real reason *not* to have a block argument, since it makes it much more explicit that you expect one.
[16:27:43] davedev24: has joined #ruby
[16:28:34] norc: asm>> Proc.new
[16:28:35] ruby[bot]: norc: I have disassembled your code, the result is at https://eval.in/576450
[16:28:47] davedev24: has joined #ruby
[16:29:33] armyriad: has joined #ruby
[16:31:18] idefine: has joined #ruby
[16:31:22] startupality: has joined #ruby
[16:31:40] psf: has left #ruby: ()
[16:32:11] agent_white: has joined #ruby
[16:33:54] B1n4r10: has joined #ruby
[16:34:54] blaxter: has joined #ruby
[16:35:41] tildes_: has joined #ruby
[16:36:17] glcx_: has joined #ruby
[16:38:00] rkoller: has joined #ruby
[16:38:44] RobertBirnie: has joined #ruby
[16:39:24] User458764: has joined #ruby
[16:40:24] tristanp: has joined #ruby
[16:40:29] lictor36: has joined #ruby
[16:41:26] ico: has joined #ruby
[16:43:18] startupality: has joined #ruby
[16:46:55] whathappens: has joined #ruby
[16:47:04] dimatteo: has joined #ruby
[16:47:57] shinnya: has joined #ruby
[16:49:24] barajasfab: has joined #ruby
[16:50:56] skolman: has joined #ruby
[16:51:21] startupality: has joined #ruby
[16:52:31] Ebok: has joined #ruby
[16:54:57] gtsai: has joined #ruby
[16:56:04] gtsai: has joined #ruby
[16:56:16] conta: has joined #ruby
[16:57:07] apeiros: norc: paraphrasing: you say foo(&block) vs. foo() has almost no overhead?
[16:57:16] gtsai: has joined #ruby
[16:58:50] norc: apeiros, yes. I didnt do any benchmarking though, but I did not see a reason this should be costly (for libraries I would still avoid it if I can)
[16:59:26] whathappens: has joined #ruby
[17:00:11] norc: Though honestly anything where performance really matters is better implemented in C anyway.
[17:00:50] aegis3121: has joined #ruby
[17:00:59] whathapp_: has joined #ruby
[17:01:25] sesquipedalian: has joined #ruby
[17:01:43] hahuang61: has joined #ruby
[17:03:33] startupality: has joined #ruby
[17:04:36] tristanp_: has joined #ruby
[17:04:56] mistermocha: has joined #ruby
[17:08:43] tristanp: has joined #ruby
[17:10:41] last_staff: has joined #ruby
[17:12:31] SilverKey: has joined #ruby
[17:13:30] tristanp_: has joined #ruby
[17:14:47] tvw: has joined #ruby
[17:14:55] kfpratt: has joined #ruby
[17:15:05] import_this: has joined #ruby
[17:15:24] startupality_: has joined #ruby
[17:17:58] rcvalle: has joined #ruby
[17:19:17] tacit7: has joined #ruby
[17:20:27] mikecmpbll: has joined #ruby
[17:20:37] RegulationD: has joined #ruby
[17:20:47] sneakersec: has joined #ruby
[17:24:23] Madplatypus: has joined #ruby
[17:25:33] pabloh: has joined #ruby
[17:26:18] Cohedrin: has joined #ruby
[17:27:07] nobitanobi: has joined #ruby
[17:27:24] B1n4r10: has joined #ruby
[17:28:46] hutch34_: has joined #ruby
[17:31:23] hahuang65: has joined #ruby
[17:32:13] LoneHerm_: has joined #ruby
[17:32:23] weemsledeux: has joined #ruby
[17:33:22] evidex: has joined #ruby
[17:33:49] tristanp: has joined #ruby
[17:34:21] flopsec: has joined #ruby
[17:35:18] jolamb: is `v == :a || v == :b` better or worse ruby than `[:a, :b].include? v` ?
[17:35:35] umdstu: i like the first myself
[17:35:40] umdstu: err second*(
[17:35:51] umdstu: include ftw!
[17:35:52] lictor36: has joined #ruby
[17:36:16] edwinvdgraaf: has joined #ruby
[17:36:18] Es0teric: has joined #ruby
[17:36:28] jhass: ?better jolamb
[17:36:28] ruby[bot]: jolamb: "Best" and "better" are subjective. Try to use a different term.
[17:36:31] tristanp_: has joined #ruby
[17:37:20] jolamb: faster when looping over 100-300 elements
[17:37:42] nankyokusei: has joined #ruby
[17:38:02] umdstu: probably the first i think
[17:38:06] GarethAdams: jolamb: what is `v` in relation to the item in the loop?
[17:39:09] jolamb: GarethAdams: just some variable containing a symbol, which may be :a or :b
[17:39:22] tristanp: has joined #ruby
[17:39:35] GarethAdams: so are you *selecting* items equal to :a or :b?
[17:41:53] qhan: has joined #ruby
[17:42:05] jolamb: GarethAdams: nope
[17:42:07] tristanp_: has joined #ruby
[17:42:19] jolamb: ok, just timed it, the first form is faster
[17:42:22] qhan: hey folks
[17:43:02] GarethAdams: jolamb: my point is, when you're iterating, the way you're iterating (what you're trying to output) often changes the best way to write the thing in the loop
[17:43:17] JoshGlzBrk: has joined #ruby
[17:43:19] GarethAdams: so whether you're `select`ing or something else might affect your question
[17:44:06] qhan: anyone know does ruby maintain key ordering when iterating a hash
[17:44:21] jolamb: GarethAdams: I understand and agree. This wasn't a question of selection though, I was just taking an action depending on some property of the current item in the set being iterated over
[17:44:32] yuung: has joined #ruby
[17:44:42] Zarthus: jolamb: it may get faster if you try ary = [:a, :b]; do the loop; ary.include? v; end
[17:44:59] codecop: has joined #ruby
[17:45:01] skade: has joined #ruby
[17:45:03] kareeoleez: has joined #ruby
[17:45:15] Zarthus: jolamb: all the same though, the or statement is probably faster regardless, just less easy to maintain in the future if it changes
[17:45:20] synthroid: has joined #ruby
[17:45:23] qhan: hey I am new here
[17:45:29] aegis3121: I don't believe hash order is guaranteed, ^ qhan
[17:45:55] GarethAdams: Hash order is guaranteed since 1.9 :)
[17:45:58] JoshGlzBrk: has joined #ruby
[17:46:03] aegis3121: or that ¯\_(ツ)_/¯
[17:46:09] jackjackdripper: has joined #ruby
[17:46:10] norc: has joined #ruby
[17:46:33] pabloh: has joined #ruby
[17:46:37] jolamb: thanks all
[17:46:52] qhan: thanks all
[17:47:20] GarethAdams: http://ruby-doc.org/core-1.9.1/Hash.html > "Hashes enumerate their values in the order that the corresponding keys were inserted"
[17:47:21] qhan: so hash order is guaranteed since 1.9, what a fantastic thing
[17:48:02] bronson: has joined #ruby
[17:48:22] synthroid: has joined #ruby
[17:49:29] SilverKey: has joined #ruby
[17:49:44] zel: has joined #ruby
[17:49:56] snockerton: has joined #ruby
[17:51:40] qhan: I am from other languages, so take sometime to get used to quirkiness about ruby, but hey, thanks for helping out!
[17:53:18] edwinvdg_: has joined #ruby
[17:56:00] ChiefAlexander: has joined #ruby
[17:57:27] edwinvdgraaf: has joined #ruby
[17:57:51] tAn: has joined #ruby
[17:58:13] User458764: has joined #ruby
[17:58:38] startupality: has joined #ruby
[17:59:05] GodFather_: has joined #ruby
[18:01:03] freerobby: has joined #ruby
[18:01:54] diegoviola: has joined #ruby
[18:02:43] tristanp: has joined #ruby
[18:03:23] nanothief: has joined #ruby
[18:03:42] diegoaguilar: has joined #ruby
[18:04:09] craigp: has joined #ruby
[18:05:25] oncall-pokemon: has joined #ruby
[18:05:33] tristanp_: has joined #ruby
[18:05:39] mwlang: has joined #ruby
[18:06:28] umdstu: was there a change in ruby 1.9.x to 2.x with respect to the Hash class, where before I could access a key with `objc.entityAuths.entity` though now that results in “undefined method `entity’ for #<Hash:…”
[18:07:25] tristanm_: has joined #ruby
[18:07:35] zenlot6: has joined #ruby
[18:07:40] apeiros: umdstu: no
[18:08:15] apeiros: either you didn't have a Hash back then, or you had a monkey patched Hash
[18:08:37] umdstu: I saw HashWithIndifferentAccess somehwere
[18:08:56] apeiros: that's from rails, and I don't think it had that either.
[18:09:08] umdstu: yea its not, that was for a config file, just checked
[18:09:32] zeroDi: has joined #ruby
[18:09:53] jackjackdripper: has joined #ruby
[18:10:51] tristanp: has joined #ruby
[18:12:12] smathy: has joined #ruby
[18:12:14] flak: has joined #ruby
[18:12:20] nertzy2: has joined #ruby
[18:12:30] triangles3: has joined #ruby
[18:12:45] jrafanie_: has joined #ruby
[18:13:09] mozzarel1: has joined #ruby
[18:13:09] yude_: has joined #ruby
[18:14:00] umdstu_: has joined #ruby
[18:14:09] last_staff1: has joined #ruby
[18:14:32] centrx_: has joined #ruby
[18:14:40] RedDwarf: has joined #ruby
[18:14:43] Channel6: has joined #ruby
[18:15:05] habitullence_: has joined #ruby
[18:16:04] mtkd: has joined #ruby
[18:16:28] roamingdog: has joined #ruby
[18:16:40] norc_: has joined #ruby
[18:17:03] patrick_star_3: has joined #ruby
[18:19:54] tristanp: has joined #ruby
[18:20:21] Asher: has joined #ruby
[18:21:24] spider-mario: has joined #ruby
[18:22:09] tvw: has joined #ruby
[18:23:42] tristanp_: has joined #ruby
[18:24:08] yfeldblum: has joined #ruby
[18:25:38] tristanm_: has joined #ruby
[18:25:55] anisha: has joined #ruby
[18:26:08] arlek_: has joined #ruby
[18:26:21] Channel6: has joined #ruby
[18:28:15] tristanp: has joined #ruby
[18:29:00] prestorium: has joined #ruby
[18:29:12] giz|work: has joined #ruby
[18:29:18] Gasher: has joined #ruby
[18:30:12] mikecmpbll: has joined #ruby
[18:32:06] tristanp_: has joined #ruby
[18:34:22] nankyokusei: has joined #ruby
[18:34:26] tristanp: has joined #ruby
[18:35:23] SilverKey: has joined #ruby
[18:36:44] vikid: has joined #ruby
[18:40:05] bmurt: has joined #ruby
[18:40:45] ibeekman: has joined #ruby
[18:40:59] jmignault: has joined #ruby
[18:44:55] wilbert: has joined #ruby
[18:45:40] tristanp_: has joined #ruby
[18:45:53] eL_bAmba: has joined #ruby
[18:46:11] JoshGlzBrk: has joined #ruby
[18:46:19] Channel6: has joined #ruby
[18:47:17] recurrence: has joined #ruby
[18:48:28] recurrence: I have a class that I want to put inside a module and submodule. Is there a way to define all that in one line? Ostensibly, is 'class ModuleA::ModuleB::ClassA' semantically the same?
[18:48:31] tristanp: has joined #ruby
[18:48:45] ibeekman: Hi guys, I have basically no ruby experience other than a few Homebrew formula contributions. I'm currently trying to fix some stuff a certain formula installs using homebrew's `inreplace` with s.gsub! but ruby regular expressions are giving me a hell of a time... I've done some googling and read up in the ruby-docs on gsub and regexps but am still a bit lost. My problem is that I want to strip off the path from the compiler and linker
[18:48:45] ibeekman: executables that get embedded in an include makefile because these point to shim scripts that are only useable during the homebrew install process... here is my current attempt: https://gist.github.com/zbeekman/339a3f07a9f540a37abcaa51aa28c840
[18:49:12] zyzioziom: has joined #ruby
[18:49:14] bronson: has joined #ruby
[18:49:26] joonty: has joined #ruby
[18:49:29] chouhoulis: has joined #ruby
[18:49:33] recurrence: Hi ibeekman , you may want to check http://rubular.com/ out :)
[18:49:52] ibeekman: This is the error that I get when I try it: https://gist.github.com/zbeekman/9ebe0dfdb7107ce3c387738f212b5ffa
[18:50:38] banister: has joined #ruby
[18:50:45] Dysp: has joined #ruby
[18:50:45] jhass: ibeekman: protip: a gist can have more than one file ;)
[18:50:51] smathy: recurrence, you need to define the "containing" modules before using them as namespaces for ClassA.
[18:51:25] alxgsv: has joined #ruby
[18:51:46] symm-: has joined #ruby
[18:51:56] jhass: ibeekman: %r{...} literals help to get rid of the \/ headaches for starters
[18:51:59] jenrzzz: has joined #ruby
[18:52:01] recurrence: Hi smathy, ah thanks!
[18:52:06] tristanp_: has joined #ruby
[18:52:21] jhass: ibeekman: [0-9.] is equivalent to . (any character)
[18:52:45] jhass: (you meant [0-9\.] most likely)
[18:53:03] chouhoul_: has joined #ruby
[18:53:06] smathy: recurrence, you're welcome.
[18:55:01] tristanp: has joined #ruby
[18:56:00] tristanp: has joined #ruby
[18:56:04] startupality: has joined #ruby
[18:58:11] blaxter: has joined #ruby
[18:58:22] jhass: ibeekman: the error says there's no nothing matching /\/usr\/local\/homebrew\/Library\/ENV\/4\.3\/clang\+\+/ in the file
[18:59:02] elomatreb: has left #ruby: ("Leaving")
[18:59:02] jhass: which seems different to the code you've shown (using [0-9.]+ instead of 4\.3)
[18:59:06] CJKinni`: has joined #ruby
[18:59:11] ibeekman: @jhass I moved the error to the same gist. re \. yes, so many different regexp dialects, and I'm not too familiar with ruby's... in sed, awk, grep etc. things taken inside [] usually don't need escaping... thanks also the %r{} is very usefull just reading up on that now... I'll perform some more
[18:59:51] ibeekman: yes, sorry, 4.3 is the simplified case I got rid of the generic portion of the regexp
[19:00:12] adac: has joined #ruby
[19:00:33] jhass: ibeekman: oh, looks like I was wrong about . needing escaping in [], sorry
[19:02:33] norc_: ibeekman, your regex always matches with a trailing dot.
[19:02:45] norc_: ibeekman, so it would match 1.2.3. rather than 1.2.3
[19:03:08] norc_: Or. It does not.
[19:03:54] smathy: Ex-Perl people be like WHA!?!
[19:04:04] tristanp: has joined #ruby
[19:04:21] norc_: My head somehow does not stop spinning.
[19:05:38] ibeekman: jhass: yes the error is complaining about not matching, but it should be matching which is why I'm confused... norc_ yes it will match those cases... i feel like it is specific enough for my application though, the rest of the REGEXP is disambiguating that there is little to no danger of 1.2.3. being encountered... although . might be a problem... scratch that I'll use a grouping to do it correctly like you suggest
[19:05:56] stannard_: has joined #ruby
[19:06:02] jhass: ibeekman: what's the real value you want to match?
[19:06:18] tristanp_: has joined #ruby
[19:06:18] nando293921: has joined #ruby
[19:06:22] jhass: and what's the error matching your code (or the code matching your error)
[19:07:40] ibeekman: Lines like `GASNETTOOLS_CXX = /usr/local/homebrew/Library/ENV/4.3/clang++` should get replaced with `GASNETTOOLS_CXX = clang++`
[19:08:03] ibeekman: jhass I don't understand your most recent question
[19:08:18] jhass: the error says your regex is /\/usr\/local\/homebrew\/Library\/ENV\/4\.3\/clang\+\+/
[19:08:33] jhass: but your code doesn't have the \/4\.3\/ part
[19:08:47] jhass: it has \/[0-9.]+\/ there instead
[19:08:50] jhass: so there's a mismatch
[19:09:02] jhass: between the code you've run to get the error
[19:09:07] jhass: and the code you've shown
[19:09:20] skade: has joined #ruby
[19:09:34] tristanp: has joined #ruby
[19:10:05] norc_: jhass, Im actually wondering what the error message really means.
[19:10:16] ibeekman: jhass yes the error is for replacing the `[0-9.]` with `4\.3`
[19:10:39] codezomb: has joined #ruby
[19:10:41] ibeekman: I think it's from homebrew's `inreplace`... maybe I should be asking over there...
[19:10:56] jhass: for what it's worth however the code in the error matches your example http://rubular.com/r/0xNjNYT3LF and so does the code you've shown http://rubular.com/r/fZZ0lVAex6
[19:11:08] jhass: ibeekman: actually, what's ENV.cc's value?
[19:11:10] norc_: ibeekman, also please make it a habit to always include a stack trace for any ruby errors. It is probably not relevant in this case, but often it is very useful information.
[19:11:37] tristanp_: has joined #ruby
[19:12:57] jhass: ibeekman: and yes the error is from there, but shows the actual regex https://github.com/Homebrew/legacy-homebrew/blob/4251efa88cc6cc3e937dd2d97cbf745a348d09e8/Library/Homebrew/extend/string.rb#L54
[19:13:07] pabloh: has joined #ruby
[19:13:44] jhass: well https://github.com/Homebrew/brew/blob/master/Library/Homebrew/extend/string.rb#L54 is the better link but still
[19:14:55] crystal77: has joined #ruby
[19:15:40] conta: has joined #ruby
[19:15:42] hutch34: has joined #ruby
[19:15:59] ibeekman: Thanks for the help guys... I think I may have found the issue: the first gsub! is matching clang++ and clang, so it is stripping out the path. Then the second gsub gets there but ther are no longer any full paths to the clang++ shim.
[19:16:49] banister: has joined #ruby
[19:16:54] gtsai: has joined #ruby
[19:17:04] jhass: yup sounds right
[19:17:31] jhass: I suspected ENV.cc might be clang++ but that's just a variant of that issue
[19:18:15] jhass: (your code will fail if ENV.cc and ENV.cxx have the same value)
[19:18:43] startupality: has joined #ruby
[19:18:50] norc_: ibeekman, note, the stack trace would then show that the offending line is the second call to gsub! there.
[19:19:04] elementaru: has joined #ruby
[19:19:33] pabloh: has joined #ruby
[19:19:37] skade: has joined #ruby
[19:19:39] ibeekman: ENV.cc is clang and ENV.cxx is clang++ so the first substitution accidentally handles the second one...
[19:19:59] ibeekman: norc_ I will make sure to remember to do it for next time, sorry I forgot it here
[19:20:09] norc_: ibeekman, use a single gsub! with a backreferences like \1 maybe?
[19:20:34] LoneHermit: has joined #ruby
[19:22:00] ibeekman: norc_ are there word boundaries? I know emacs regexp has \> for word boundary... that would let me handle the matches individually (because ENV.cc might be gcc and ENV.cxx might be g++ etc.)
[19:22:07] tristanp: has joined #ruby
[19:23:26] skol: has joined #ruby
[19:23:57] jhass: ibeekman: it is in your setup, but can you guarantee for all possible setups? ;)
[19:24:15] jhass: and yes, \b
[19:24:30] jhass: I mean $ should be fine here too
[19:24:39] jhass: but is less general of course
[19:24:53] joes: has joined #ruby
[19:26:37] chouhoulis: has joined #ruby
[19:27:05] tristanp_: has joined #ruby
[19:27:12] umdstu: *works on my machine*
[19:27:19] umdstu: ACTION closes ticket
[19:27:34] RobertBirnie: has joined #ruby
[19:27:35] whathappens: has joined #ruby
[19:28:25] symm-: has joined #ruby
[19:29:56] tristanp: has joined #ruby
[19:29:58] jancel: has joined #ruby
[19:31:35] ibeekman: umdstu are you a student at UMD?
[19:32:11] roamingdog: has joined #ruby
[19:32:31] umdstu: ibeekman: omg
[19:32:41] umdstu: first person ever to actual make the connection
[19:32:45] umdstu: actually*
[19:32:49] umdstu: …but no
[19:32:53] gtsai: has joined #ruby
[19:32:54] umdstu: not for a while at least
[19:33:05] tristanp_: has joined #ruby
[19:33:08] ibeekman: jhass I much prefer \b because there is no absolute garauntee it will be at the end of a line...
[19:33:26] ibeekman: as for the [0-9] matching I'm doing something more robust...
[19:34:06] chouhoul_: has joined #ruby
[19:34:07] ibeekman: umdstu cool when did you graduate/quit/peace out? My advisor moved there from Princeton so I'm working for her at UMD while finishing my PhD from Princeton
[19:34:50] chouhoul_: has joined #ruby
[19:38:32] umdstu: graduated ‘09
[19:38:55] ibeekman: oh cool. Ever work for UMIACS? Your ticket closing joke reminded me of a bunch of those guys
[19:39:10] umdstu: i worked for the CS department
[19:39:36] jackjackdripper: has joined #ruby
[19:39:47] umdstu: i’m super original with my usernames… when I was at virginia tech my username was…. vtechstu
[19:39:54] umdstu: ACTION drops mic
[19:40:21] anisha: has joined #ruby
[19:40:56] startupality: has joined #ruby
[19:43:04] tristanp: has joined #ruby
[19:44:14] ibeekman: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[19:46:23] kirun: has joined #ruby
[19:46:55] skade: has joined #ruby
[19:47:08] lukec: has joined #ruby
[19:47:37] stannard: has joined #ruby
[19:48:15] dhk: has joined #ruby
[19:49:38] Cohedrin: has joined #ruby
[19:50:45] skade: has joined #ruby
[19:51:48] slackbotgz: has joined #ruby
[19:52:42] Seanzie: has joined #ruby
[19:54:16] tristanp_: has joined #ruby
[19:55:01] Cohedrin: has joined #ruby
[19:55:34] rkoller: has joined #ruby
[19:57:16] tristanp: has joined #ruby
[19:58:09] gizless: has joined #ruby
[19:59:33] jenrzzz: has joined #ruby
[19:59:47] |2701: has joined #ruby
[19:59:56] glcx_: has joined #ruby
[20:00:39] gizmore|2: has joined #ruby
[20:00:48] tristanp_: has joined #ruby
[20:01:38] gizmore|3: has joined #ruby
[20:01:40] diegoviola: has joined #ruby
[20:02:39] gizmore: has joined #ruby
[20:03:01] gtsai: has joined #ruby
[20:03:47] nobitanobi: has joined #ruby
[20:04:00] tristanp: has joined #ruby
[20:05:09] jancel: has joined #ruby
[20:05:17] axl_: has joined #ruby
[20:05:26] import_this: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[20:05:57] recurrence: has joined #ruby
[20:06:11] SilverKey: has joined #ruby
[20:06:38] gizless: has joined #ruby
[20:07:14] axl_: has joined #ruby
[20:07:33] DoubleMalt: has joined #ruby
[20:08:08] gizmore|2: has joined #ruby
[20:09:00] tomphp: has joined #ruby
[20:09:07] stannard_: has joined #ruby
[20:10:01] benzrf: hey, any TH buffs here?
[20:10:37] gizmore: has joined #ruby
[20:10:38] cdg: has joined #ruby
[20:10:46] benzrf: is there a notation for $(something [| ...stuff here... |])?
[20:10:57] benzrf: like calling a lisp-style macro
[20:11:24] jhack: has joined #ruby
[20:11:25] Papierkorb: benzrf: what are you trying to do?
[20:11:41] gizmore|3: has joined #ruby
[20:11:50] benzrf: oh christ
[20:11:53] benzrf: i meant #haskell lmao
[20:11:59] dgynn_: has joined #ruby
[20:12:10] import_t_: has joined #ruby
[20:12:37] gizless: has joined #ruby
[20:12:55] import_t_: has joined #ruby
[20:13:11] gfvcastro: has joined #ruby
[20:13:40] gizmore|2: has joined #ruby
[20:13:46] skade: has joined #ruby
[20:13:53] futilegames: has joined #ruby
[20:14:32] nettoweb: has joined #ruby
[20:14:38] gizmore|4: has joined #ruby
[20:14:44] Seanzie: has joined #ruby
[20:14:49] s00pcan: has joined #ruby
[20:14:56] joes__: has joined #ruby
[20:17:04] firstdayonthejob: has joined #ruby
[20:17:20] joes__: has joined #ruby
[20:17:28] solars: has joined #ruby
[20:19:22] _joes____: has joined #ruby
[20:20:05] arthurl: has joined #ruby
[20:20:16] arthurl: can someone please help me understand why this might be happening? https://gist.github.com/alyssenko/8c745f6b54fb29dab8924a2ab80ac629
[20:20:31] arthurl: i'm attempting to install a passenger module for apache
[20:20:46] mesamoo: has joined #ruby
[20:20:52] Seanzie: has joined #ruby
[20:20:53] ReK2: has joined #ruby
[20:20:53] ReK2: has joined #ruby
[20:21:23] mtkd: has joined #ruby
[20:21:24] gtsai: has joined #ruby
[20:21:33] import_this: has joined #ruby
[20:22:38] platzhirsch: has joined #ruby
[20:24:07] jhass: arthurl: well, passenger 2.2.2 is 7 years old
[20:24:38] futilegames: has joined #ruby
[20:25:45] arthurl: jhass yes- unfortunately the dev team can't upgrade this older rails 2.x app we have so i'm trying to move an existing web server that supports this app into aws, basically trying to mirror what we currently have it's running off of passenger 2.2.2
[20:25:45] _joes____: has joined #ruby
[20:25:50] arthurl: not sure if that's a requirement
[20:25:54] arthurl: probably isn't
[20:26:55] jhass: stuck on old, likely insecure passenger, old & insecure ruby (known issues, yeah), guess you can just install a 7 years old OS while being stuck in 2009
[20:27:18] jhass: if you use the time machine, do it fully
[20:29:05] jhass: I bet on either your gcc or boost being "too new", probably both
[20:29:59] moeabdol: has joined #ruby
[20:30:07] jhass: also it looks like you're trying to compile the passenger 2.2.2 installed to your ruby-1.9.3-p551 with your ruby-1.8.7-head activated
[20:30:40] jhass: please just never connect that thing to the internet
[20:30:56] Dimik: has joined #ruby
[20:31:07] gtsai: has joined #ruby
[20:31:21] tristanp: has joined #ruby
[20:32:17] blackgoat: has joined #ruby
[20:32:46] jackjackdripper: has joined #ruby
[20:33:03] roamingdog: has joined #ruby
[20:33:13] tristanp_: has joined #ruby
[20:33:27] devwop: has joined #ruby
[20:34:44] devwop: has left #ruby: ()
[20:35:08] tristanm_: has joined #ruby
[20:36:43] snowy: has joined #ruby
[20:36:47] smathy: (or let us all know the IP if you do)
[20:37:04] swills: has joined #ruby
[20:39:00] startupality: has joined #ruby
[20:39:45] VeryBewitching: has joined #ruby
[20:41:52] tristanp: has joined #ruby
[20:42:36] tgeeky: jhass: thanks for your help last night. I ended up making use of the ->(match) { } lambda syntax
[20:44:42] hutch34_: has joined #ruby
[20:44:50] tgeeky: jhass: I actually didn't see your link until very much later
[20:45:27] finisherr: has joined #ruby
[20:46:36] jhass: well that was the least relevant part of it
[20:46:56] tgeeky: well, it was a part that was critical to me getting it to work properly
[20:47:08] jhass: you already had Proc.new?
[20:47:13] tomphp: has joined #ruby
[20:47:22] jhass: that's roughly equivalent, for this usecase anyhow
[20:47:24] tgeeky: procs didn't work right for some reason
[20:47:36] tgeeky: well, they didn't work as I tried them
[20:47:58] jhass: sure, the issue must've been elsewhere and you misinterpreted that as the cause
[20:48:03] gtsai: has joined #ruby
[20:48:10] centrx: has joined #ruby
[20:48:10] kobain: has joined #ruby
[20:48:14] tgeeky: the issue was that I was desiring the proc to be executed in the context of the caller
[20:48:22] jmignault: has joined #ruby
[20:48:28] tgeeky: and i needed to explicitly pass in something for it to work
[20:48:31] import_this: has joined #ruby
[20:49:15] kobain: has joined #ruby
[20:50:05] tgeeky: jhass: https://gist.github.com/technogeeky/f79b7021dedf174a8f01c5a615142314
[20:50:10] tgeeky: there is the code that I finally got working properly
[20:50:30] tgeeky: i am now going to make the other changes you reccomended (though I'm not moving away from nested multimap yet
[20:50:51] bronson: has joined #ruby
[20:51:28] diegoaguilar: has joined #ruby
[20:51:33] tgeeky: jhass: but this code properly mimics the if/elsif/elsif/elsif/else behavior, and reduces the number of times the regex is used to a minimum
[20:51:41] SilverKey: has joined #ruby
[20:52:07] tgeeky: jhass: I can't show you actual output, as the data is real, but it works.
[20:52:30] arthurl: jhass thank you for the insight sir- and yes no plans to have this thing ever talk to the internet :)
[20:52:35] tgeeky: jhass: anyway, your support and your code helped me in my time of need, and helped guide me in the right direction.
[20:52:46] tgeeky: aww, no karmabot
[20:52:55] arthurl: "also it looks like you're trying to compile the passenger 2.2.2 installed to your ruby-1.9.3-p551 with your ruby-1.8.7-head activated" is that necessarily a problem ?
[20:54:18] crystal77: has joined #ruby
[20:55:12] curses: has joined #ruby
[20:56:56] platzhirsch: has joined #ruby
[20:57:40] tgeeky: jhass: one thing you mentioned, and I still want to do
[20:58:00] tgeeky: jhass: how do I turn the from_table string into an actual ruby method identifying the ActiveRecord connection?
[20:58:23] tgeeky: ie, 'contact'
[20:58:32] tgeeky: (i mean to_table)
[20:59:07] jhass: idk your context enough and I'm not really up to crawl through that new mess you posted
[20:59:35] jhass: stuff to investigate is Object#public_send, Object#instance_variable_get
[20:59:38] tgeeky: jhass: it's tremendously less messy now, there is just more extra code
[20:59:47] jhass: when ((not I stop reading there
[20:59:48] tgeeky: jhass: ok thanks
[21:00:10] tristanp_: has joined #ruby
[21:00:13] workmad3: has joined #ruby
[21:00:28] tgeeky: jhass: in which case, you already read the relevant part to my question
[21:00:50] jhass: nah I scrolled around
[21:01:10] arthurl: jhass switching over via 'rvm use ruby-1.9.3-p551' made no difference unfortunately
[21:01:12] jhass: chances are you might even just be able to store the object where you store the string currently
[21:01:13] curses: has joined #ruby
[21:01:34] tgeeky: jhass: yes, I thought of that. We'll find out, I guess. I need to make a connection pool, eventually.
[21:01:35] jhass: arthurl: didn't expect it so, the issues with that would arise after successful compilation
[21:01:45] jhass: arthurl: that's still more of a gcc/boost issue
[21:02:05] jhass: tgeeky: AR has one internally
[21:02:27] tristanp: has joined #ruby
[21:02:53] tgeeky: jhass: do you know if AR cares about different classes inside transactions? ie: Contact.transaction do ... some_other_table = SomeOtherTable...
[21:03:06] tgeeky: roger, thanks.
[21:03:38] nando293921: has joined #ruby
[21:03:58] ajax0xd9: has joined #ruby
[21:05:02] recurrence: has joined #ruby
[21:05:08] tristanp_: has joined #ruby
[21:05:44] tomphp: has joined #ruby
[21:05:46] jenrzzz_: has joined #ruby
[21:06:29] import_this: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[21:07:01] nando293921: has joined #ruby
[21:09:15] startupality: has joined #ruby
[21:09:34] testing: has joined #ruby
[21:09:53] arthurl: jhass i think you're right- i'll try downgrading gcc from 4.4 to 4.1 https://svn.boost.org/trac/boost/ticket/6631
[21:10:03] Guest7245: How do I move my method out of my initializer? https://gist.github.com/stuffandthings/d2e5694d09a7a67bce71cac8fd7d123b
[21:11:45] kgrz: has joined #ruby
[21:12:42] ur5us: has joined #ruby
[21:12:51] RegulationD: has joined #ruby
[21:13:44] lukec: has joined #ruby
[21:16:55] Yiota: has joined #ruby
[21:18:39] hutch34: has joined #ruby
[21:18:47] jhass: Guest7245: how about https://p.jhass.eu/1v.rb
[21:21:01] bmurt: has joined #ruby
[21:22:57] axl_: has joined #ruby
[21:23:24] recurrence: has joined #ruby
[21:25:18] tobiasvl: hmmm is there a way to make ^ and $ match for lines using \r\n as well?
[21:25:26] tobiasvl: I'm not very well versed in those line breaks
[21:25:41] neha-: has joined #ruby
[21:25:46] jhass: don't they by default?
[21:25:53] neha-: is there a way to do a map and then a reduce in one statement?
[21:26:05] tobiasvl: jhass: not in a script I wrote two years ago
[21:26:14] tobiasvl: got a bug report on it now :P
[21:26:29] jhass: neha-: example of the two statement thing?
[21:26:35] neha-: irc.manas.ca
[21:27:13] neha-: requested_total = user_with_posts.posts.map { |p| p.requested }
[21:27:13] neha-: requested_total = requested_total.reduce(:+)
[21:27:27] neha-: i'm sure there is a better way :/
[21:28:37] jhass: neha-: user_with_posts.posts.reduce(0) {|sum, post| sum + p.requested }
[21:28:50] jhass: s/p/post/
[21:29:19] neha-: thanks although i don't get it
[21:29:23] neha-: i'll read up on reduce more
[21:29:30] tgeeky: requested_total = user_with_posts.posts.map { |p| p.requested }.reduce(:+)
[21:29:47] neha-: does that work tgeeky?
[21:29:52] neha-: that is ideal
[21:29:56] tgeeky: shrug. try it?
[21:30:22] neha-: oh it actually works
[21:30:29] tgeeky: neha-: the concept is easy for mapreduce. map takes a set of things to some other set of things. reduce takes a set of things, and repeats some operation until you only have one thing left.
[21:30:49] neha-: yeah i get that, i'm not sure of the syntax of jhass' line
[21:31:16] recurrence: has joined #ruby
[21:31:38] neha-: is 0 just the initial val and then sum the running total?
[21:31:41] whathapp_: has joined #ruby
[21:31:46] tgeeky: neha-: 0 is not the initial value, it's the default value.
[21:31:52] skade: has joined #ruby
[21:31:58] tgeeky: if you are adding a bunch of things together, 0 is the value which will have no effect
[21:32:03] tgeeky: (for multiplication, this would be 1)
[21:32:16] whathappens: has joined #ruby
[21:32:19] tgeeky: neha-: see http://ruby-doc.org/core-2.3.1/Enumerable.html#method-i-reduce
[21:32:22] tgeeky: their example is multiplication
[21:32:39] neha-: well they say initial value
[21:32:42] tgeeky: > (5..10).reduce(1) { |product, n| product * n }
[21:32:47] tgeeky: >> (5..10).reduce(1) { |product, n| product * n }
[21:32:49] ruby[bot]: tgeeky: # => 151200 (https://eval.in/576565)
[21:33:03] neha-: but i get what you mean
[21:33:05] tgeeky: neha-: well, let's see what happens when we put 2 in here
[21:33:09] tgeeky: >> (5..10).reduce(2) { |product, n| product * n }
[21:33:10] ruby[bot]: tgeeky: # => 302400 (https://eval.in/576566)
[21:33:27] tgeeky: >> (5..10).reduce(0) { |sum, n| sum + n }
[21:33:28] ruby[bot]: tgeeky: # => 45 (https://eval.in/576567)
[21:33:31] tgeeky: >> (5..10).reduce(1) { |sum, n| sum + n }
[21:33:43] tgeeky: ACTION waits
[21:33:45] startupality: has joined #ruby
[21:33:47] jhass: neha-: note it's fairly wasteful to create an array here
[21:34:07] neha-: yeah true
[21:34:10] finisherr: has joined #ruby
[21:34:10] tgeeky: neha-: jhass is vastly smarter than I am with ruby, you would be wise to do what he says
[21:34:15] tgeeky: >> (5..10).reduce(1) { |sum, n| sum + n }
[21:34:16] ruby[bot]: tgeeky: # => 46 (https://eval.in/576568)
[21:34:21] jhass: neha-: also is this active record?
[21:34:23] neha-: yeah it makess sense
[21:34:28] neha-: and yeah it is activerecord
[21:34:48] jhass: posts.sum(:requested)
[21:34:53] jhass: just let the DB do it
[21:35:33] neha-: yeah i could do that too
[21:35:52] tgeeky: neha-: when in doubt, do a microbenchmark to prove it's better :O
[21:35:59] johnmilton: has joined #ruby
[21:36:03] neha-: haha how do you do that
[21:36:57] amnan: has joined #ruby
[21:37:07] neha-: i see there are some microbenchmark frameworks :o
[21:37:31] jhass: benchmark-ips is probably the easiest still to get it fairly right
[21:38:19] tAn: has joined #ruby
[21:39:07] kith: has joined #ruby
[21:39:34] Guest7245: jhass: ahh, perfect! I haven't used each_with_object... nice
[21:40:01] tgeeky: has joined #ruby
[21:40:34] tgeeky: heh. that's a first. I somehow hit a hotkey to logout of my computer and couldn't stop it.
[21:46:06] GarethAdams: has joined #ruby
[21:46:49] tristanp: has joined #ruby
[21:48:38] tristanp_: has joined #ruby
[21:52:26] bluOxigen: has joined #ruby
[21:53:36] whathappens: has joined #ruby
[21:54:45] jenrzzz: has joined #ruby
[21:55:27] ledestin: has joined #ruby
[21:55:28] Juanchito: has joined #ruby
[21:57:45] tristanp: has joined #ruby
[22:01:36] norc_: has joined #ruby
[22:02:19] unreal: has joined #ruby
[22:02:34] jnoob22: has joined #ruby
[22:03:52] snguyen: has joined #ruby
[22:03:59] recurrence: has joined #ruby
[22:04:01] Azure: has joined #ruby
[22:04:18] gtsai_: has joined #ruby
[22:04:51] jmignault: has joined #ruby
[22:05:07] jmignault: has joined #ruby
[22:05:28] centrx: has joined #ruby
[22:05:51] chrisja: has joined #ruby
[22:05:58] Devalo: has joined #ruby
[22:06:03] whathappens: has joined #ruby
[22:06:29] snguyen: has joined #ruby
[22:06:47] whathapp_: has joined #ruby
[22:07:28] m_antis: has joined #ruby
[22:08:18] sfmk: has joined #ruby
[22:09:07] A124: has joined #ruby
[22:11:28] whathappens: has joined #ruby
[22:14:25] Cohedrin: has joined #ruby
[22:14:52] yfeldblum: has joined #ruby
[22:15:24] Sammichmaker: has joined #ruby
[22:18:09] moeabdol: has joined #ruby
[22:18:57] startupality: has joined #ruby
[22:19:35] bobbycvi: has joined #ruby
[22:22:05] whathappens: has joined #ruby
[22:22:19] tobiasvl: if I run an external program with IO.popen, which first prompts the user for something, and only when the user has input that do I want to puts to it, how do I do that?
[22:22:39] tobiasvl: or should I just gets from the user first and puts that to the IO maybe
[22:22:50] whathapp_: has joined #ruby
[22:22:54] crystal77: has joined #ruby
[22:23:04] tristanp: has joined #ruby
[22:24:08] nankyokusei: has joined #ruby
[22:24:56] pabloh: has joined #ruby
[22:25:01] tristanp_: has joined #ruby
[22:25:20] moei: has joined #ruby
[22:25:54] mtkd: has joined #ruby
[22:27:01] tristanm_: has joined #ruby
[22:27:45] gigetoo: has joined #ruby
[22:28:06] snguyen: has joined #ruby
[22:30:05] k3rn31: has joined #ruby
[22:30:41] jancel: has joined #ruby
[22:31:02] tristanp: has joined #ruby
[22:33:29] SilverKey: has joined #ruby
[22:34:38] Contigi: has joined #ruby
[22:36:22] dhk: has joined #ruby
[22:36:47] zenlot: has joined #ruby
[22:36:52] kies: has joined #ruby
[22:40:08] marr: has joined #ruby
[22:40:17] al2o3-cr: >> "monkey business" > "busy monkey"
[22:40:18] ruby[bot]: al2o3-cr: # => true (https://eval.in/576619)
[22:40:24] gfvcastro: has joined #ruby
[22:40:56] skade: has joined #ruby
[22:41:01] tristanp: has joined #ruby
[22:41:39] postmodern: has joined #ruby
[22:44:39] Synthead: has joined #ruby
[22:45:09] skade: has joined #ruby
[22:45:53] roamingdog: has joined #ruby
[22:46:26] tristanp: has joined #ruby
[22:49:15] daftdolphin: has joined #ruby
[22:49:39] weemsledeux: has joined #ruby
[22:49:54] tristanp_: has joined #ruby
[22:50:33] benlieb: has joined #ruby
[22:50:51] charliesome: has joined #ruby
[22:51:13] Elvin: has joined #ruby
[22:51:55] rbennacer: has joined #ruby
[22:52:07] nando293921: has joined #ruby
[22:53:36] tristanp: has joined #ruby
[22:54:24] davedev24: has joined #ruby
[22:56:29] tristanp: has joined #ruby
[22:57:36] centrx: has joined #ruby
[22:58:17] rbennacer: has joined #ruby
[22:58:18] platzhirsch: has joined #ruby
[22:58:47] tristanp: has joined #ruby
[23:00:30] davedev24: has joined #ruby
[23:00:33] crcastle: has joined #ruby
[23:00:52] crcastle: has left #ruby: ()
[23:01:19] startupality: has joined #ruby
[23:02:25] gtsai: has joined #ruby
[23:06:04] sfmk: is it against Ruby practice to create classes in separate files and then relative_require them in the main program?
[23:06:14] gtsai: has joined #ruby
[23:06:18] pabloh: has joined #ruby
[23:08:32] JoshGlzBrk: has joined #ruby
[23:09:00] sfmk: I know it's common practice in Java development, but I'm not sure about Ruby
[23:10:36] jancel: has joined #ruby
[23:11:04] nando293921: has joined #ruby
[23:11:07] nando294021: has joined #ruby
[23:12:37] chouhoulis: has joined #ruby
[23:13:07] |2701: I do that all the time
[23:13:31] |2701: a downside of that is that anytime you move something, you have to go change a bunch of crap
[23:14:08] sfmk: alright, awesome
[23:14:32] sfmk: yeah that's kind of a nuisance, but I don't really plan on moving anything much, so it should be fine
[23:15:41] whathappens: has joined #ruby
[23:18:51] whathapp_: has joined #ruby
[23:19:54] tacit7: has joined #ruby
[23:21:14] lictor36: has joined #ruby
[23:21:42] jancel: has joined #ruby
[23:21:54] youch: has joined #ruby
[23:23:18] blackmesa: has joined #ruby
[23:23:46] jancel_: has joined #ruby
[23:25:46] gtsai: has joined #ruby
[23:26:57] ptx0: has joined #ruby
[23:27:06] Trieste: has joined #ruby
[23:28:52] gtsai: has joined #ruby
[23:29:50] |2701: alright then
[23:30:26] smathy: has joined #ruby
[23:31:44] Obore: has joined #ruby
[23:32:46] gtsai: has joined #ruby
[23:33:19] gfvcastro: has joined #ruby
[23:33:31] cyclonis_: has joined #ruby
[23:33:57] Es0teric: has joined #ruby
[23:34:15] rkazak: has joined #ruby
[23:34:36] tristanp_: has joined #ruby
[23:35:58] gfvcastro: has joined #ruby
[23:36:22] allcentury: has joined #ruby
[23:36:31] tristanp: has joined #ruby
[23:36:50] gtsai: has joined #ruby
[23:39:09] gtsai: has joined #ruby
[23:41:15] tristanp_: has joined #ruby
[23:41:50] hahuang65: has joined #ruby
[23:42:29] dhk: has joined #ruby
[23:42:36] CloCkWeRX: has joined #ruby
[23:44:03] tristanp: has joined #ruby
[23:47:05] ctp: has joined #ruby
[23:47:58] gtsai: has joined #ruby
[23:48:18] koooge: has joined #ruby
[23:48:30] tristanp_: has joined #ruby
[23:49:34] roamingdog: has joined #ruby
[23:51:16] xlegoman: has joined #ruby
[23:52:23] lukec: has joined #ruby
[23:52:56] JoshGlzBrk: has joined #ruby
[23:58:51] gtsai_: has joined #ruby