« Back to channel list

#ruby - 01 May 2016

« Back 1 day Forward 1 day »
[00:00:09] pwnd_nsfw`: has joined #ruby
[00:01:43] marahin: apeiros: and then extending the array *should* not raise the namespace error?
[00:02:07] apeiros: marahin: correct
[00:02:07] marahin: also no idea how to use the map really, and how would it be beneficient for the amount of data it's used right there
[00:02:53] apeiros: marahin: maybe read the docs of map? what you do with your each_with_object in multithreaded_each is precisely what map does. but with less code and less overhead.
[00:03:30] marahin: apeiros: I see. Well, the module itself is a SO snippet I found somewhere *some time ago*, back when I started fiddling with the bot :)
[00:03:33] RegulationD: has joined #ruby
[00:03:39] marahin: thank you greatly for explanation
[00:03:51] apeiros: I don't really need the reason why your code ended up like it is
[00:04:08] Ox0dea: marahin: It can become `map { |e| Thread.new { yield e } }.each(&:join)`.
[00:05:50] Moosashi: has joined #ruby
[00:05:53] r0bby_: has joined #ruby
[00:08:22] kareeoleez: has joined #ruby
[00:09:43] PaulCapestany: has joined #ruby
[00:11:51] moeabdol: has joined #ruby
[00:17:09] SilverKey: has joined #ruby
[00:17:49] marahin: has left #ruby: ("WeeChat 1.4")
[00:18:07] htmldrum: has joined #ruby
[00:24:43] ismaelga: has joined #ruby
[00:26:27] stannard: has joined #ruby
[00:28:42] pibby: has joined #ruby
[00:29:34] diegoviola: has joined #ruby
[00:30:47] dramagods: has joined #ruby
[00:31:26] bronson: has joined #ruby
[00:35:40] Ebok: has joined #ruby
[00:37:25] Madplatypus: has joined #ruby
[00:38:32] PaulCape_: has joined #ruby
[00:45:38] finisherr: has joined #ruby
[00:46:13] flashpoint9: has joined #ruby
[00:47:45] babykosh: has joined #ruby
[00:47:45] sgambino: has joined #ruby
[00:48:13] Icey: has joined #ruby
[00:48:40] flashpoint9: Im learning about using nokigiri for scarping sites, im working on a scraper that get a stock price from yahoo based on ticker information. When I hardcode the selector it works but if I try and make it dynamic by passing the ticker to it it returns nothing https://gist.github.com/JosephLeon/6b421790b3bd353945f80f31c687f34a
[00:49:28] flashpoint9: line 18 works
[00:49:36] flashpoint9: but line 19 doesnt
[00:51:52] Ox0dea: flashpoint9: The element's id contains a lowercase L, not a digit 1.
[00:52:16] Ox0dea: Consider using a font that makes the distinction more apparent.
[00:52:45] babykosh: has joined #ruby
[00:53:06] chipotle: has joined #ruby
[00:53:20] flashpoint9: Ox0dea: ah wow, total nub mistake on my part
[00:53:30] aghalarp: has joined #ruby
[00:59:27] zacts: has joined #ruby
[01:03:21] PaulCapestany: has joined #ruby
[01:09:31] jordanm: has joined #ruby
[01:13:22] p0p0pr37: has joined #ruby
[01:17:56] Vlat-: has joined #ruby
[01:22:19] Eaven: has joined #ruby
[01:25:29] zacstewart: has joined #ruby
[01:25:43] Eaven: Hello. I am trying to run a where query in rails 4.2 and when I run DateTime.current I am given "Sat, 30 Apr 2016 18:22:55 -0700" which is correct.. but when I use DateTime.current the query is being given Post Load (0.3ms) SELECT `posts`.* FROM `posts` WHERE (`posts`.`post_at` BETWEEN '2016-05-01 01:22:51' AND '2016-05-01 01:17:51')
[01:25:47] Eaven: I'm not sure why it's searching for tomorrows records when it outputs todays date when I test DateTime.current
[01:25:50] Eaven: this is all local
[01:25:51] Eaven: https://gist.github.com/Eaven/7f159584db8b1c813a83b0b2156baa1c
[01:26:26] apeiros: um, yeah, rails is that way:
[01:26:28] apeiros: ?rails eaven
[01:26:28] ruby[bot]: eaven: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[01:26:33] Eaven: yea, rails
[01:26:42] Eaven: I am identified
[01:26:49] Ox0dea: Eaven: This is #ruby.
[01:26:52] unreal: has joined #ruby
[01:27:25] Eaven: well I know that. figured someone might know as they kinda go hand in hand
[01:27:40] Eaven: but i was joining #rails which wasnt working so yea now im in RoR
[01:28:13] bazz_: if I have a class "A::B::C" and another class "A::B::D::E" -- where A,B,D are modules and C,E are classes ... is there anyway to write "relatively" `class E < A::B::D::E` ? I'm hoping to do something close to `class E < D::E`
[01:29:14] bazz_: In other words, if you want to access the parent namespace, can you do so relatively ... must it be absolute?
[01:29:34] apeiros: bazz_: constant lookup depends on how you built your lexical context. if you have `module A; module B; C; end; end` then C will be searched in A::B::C, A::C and ::C
[01:30:00] apeiros: if you have `module A::B; C; end`, then only A::B::C and ::C are searched
[01:30:01] bazz_: OK I understand you!
[01:30:11] bazz_: I will try it
[01:30:14] PaulCape_: has joined #ruby
[01:30:48] apeiros: and iirc it goes inside out. when in doubt, `p Module.nesting` will show you what's being searched at the point you execute that statement.
[01:32:57] nando293921: has joined #ruby
[01:33:42] bazz_: Thank apeiros
[01:34:08] Ox0dea: apeiros: Thank you.
[01:34:36] hfp: has joined #ruby
[01:34:37] apeiros: you're both welcome. even if Ox0dea's came unexpected
[01:34:46] crystal77: has joined #ruby
[01:35:06] hfp_work: has joined #ruby
[01:35:19] Ox0dea: I thought we were playing Simon Says.
[01:35:28] Ox0dea: (Which I apparently don't know how to play.)
[01:35:53] apeiros: you can play "keep talking and nobody explodes", it's got a "simon says" module…
[01:36:31] Moosashi: has joined #ruby
[01:37:15] dramagods: has joined #ruby
[01:38:05] PlasmaStar: has joined #ruby
[01:38:38] Ox0dea: apeiros: I suspect you've seen this, but in case not: https://www.youtube.com/watch?v=psiyI6jVpKI
[01:39:12] apeiros: haven't. only watched humans play. was fun.
[01:41:34] Vlat-: has joined #ruby
[01:43:58] mlakewood: has joined #ruby
[01:50:33] nerium: has joined #ruby
[01:50:43] madgen: has joined #ruby
[01:50:52] dramagods: has joined #ruby
[01:52:06] tristanp: has joined #ruby
[01:53:28] tristanp: has joined #ruby
[01:56:34] PaulCapestany: has joined #ruby
[01:57:11] gizless: has joined #ruby
[01:58:09] billy12: has joined #ruby
[01:58:53] stannard: has joined #ruby
[01:59:54] moeabdol: has joined #ruby
[02:04:25] RegulationD: has joined #ruby
[02:05:52] bazz_: is it possible to "template" a parent class's class variables such that classes that extend from it can somehow provide input to the class variables. and I can elaborate
[02:07:20] Ox0dea: bazz_: You have to use a Proc to defer evaluation.
[02:07:41] bazz_: I don't think so (going to create an experiment)
[02:11:25] bazz_: I didn't have to :)
[02:11:29] bazz_: would you like to see my test?
[02:13:07] aghalarp: has joined #ruby
[02:14:58] bazz_: https://gist.github.com/bazzinotti/150814227ef8a5344e835f68c1cb24f0
[02:16:02] yfeldblum: has joined #ruby
[02:16:05] bazz_: wait a second
[02:16:09] Ox0dea: bazz_: As long as you're aware that #prepend is destructive, go for it.
[02:16:18] bazz_: not quite what I'm after ...
[02:16:26] bazz_: try adding the following to the source :
[02:16:36] bazz_: `p Cinch::Plugins::WordGames::WordGame.const_get :Lock_str`
[02:16:41] bazz_: without the backticks
[02:16:43] tristanp: has joined #ruby
[02:16:58] bazz_: they are identical ... I suppose I will need class variables to differentiate them (@@)
[02:17:14] Liothen: has joined #ruby
[02:17:48] Ox0dea: bazz_: They're identical because #prepend mutates the receiver.
[02:17:56] Ox0dea: >> s = 'bar'; s.prepend 'foo'; s
[02:17:58] ruby[bot]: Ox0dea: # => "foobar" (https://eval.in/562938)
[02:18:11] Ox0dea: Class variables won't change that.
[02:18:26] noService: has joined #ruby
[02:18:34] bazz_: I'll try a non-destructive prepend (addition?)
[02:18:55] Liothen: has joined #ruby
[02:18:56] Ox0dea: Yeah, that'd do.
[02:19:05] bazz_: :) yay it works as desired now
[02:19:30] opus_: has joined #ruby
[02:20:58] chipotle: has joined #ruby
[02:23:16] ismaelga: has joined #ruby
[02:23:22] johnmilton: has joined #ruby
[02:23:51] PaulCape_: has joined #ruby
[02:23:56] bazz_: now if I can only find a way to automate the creation of the altered constant (subclass)
[02:24:10] bazz_: given the input string to prepend somehow
[02:25:11] bazz_: I could probably figure a way to do it using the `inherited` hook
[02:29:34] bazz_: but that would require turning some stuff into a module and I cannot simple fathom the mixture
[02:30:36] bazz_: ideally I specify the prepend_str as in the subclass definition, which creates constants automatically based on parent class constants prepended with the subclass prepend_str
[02:31:44] solocshaw: has joined #ruby
[02:32:23] Ox0dea: bazz_: #inherited is for Class; why do you think you'd need to switch to a Module?
[02:32:50] bazz_: yeah I just learned this .. need to use self.inherited and not just `inherited` (which I assume is for modules)
[02:33:18] bronson: has joined #ruby
[02:33:30] bazz_: still I am having issues assigning the sub-class constant based on a sub-class constant .. this could be because the subclass is not fully defined at the time of hook execution?
[02:33:51] bazz_: I can create another gist to show it in full
[02:33:59] Ox0dea: Go for it.
[02:35:30] bazz_: wait.. almost got it...
[02:35:34] bazz_: (solving on my own)
[02:36:33] bazz_: what's the proper way to externally modify class const?? Must I create an attr_writer ??
[02:36:43] bazz_: I doubt that
[02:36:54] scott_o: has joined #ruby
[02:37:11] Ox0dea: bazz_: #const_set is a thing.
[02:37:32] bazz_: ugh heheh :]
[02:38:24] CloCkWeRX: has joined #ruby
[02:39:05] bazz_: oh no.. I can't get the const form the child from inside `inherited` :[
[02:39:43] bazz_: uninitialized constant :[
[02:39:45] elifoster: has joined #ruby
[02:39:55] Ox0dea: Er, do you need to?
[02:40:28] terminalrecluse: has joined #ruby
[02:41:17] mlakewood: has joined #ruby
[02:41:31] dopie: has joined #ruby
[02:41:36] binaryplease1: has joined #ruby
[02:42:16] bazz_: that's the whole idea .. the whole idea is to create alterations of parent-class const/var based on a sub-class const/variable -- and they will belong to the subclass
[02:43:18] Ox0dea: bazz_: Ah, well, you won't be able to do it with plain-old inheritance, then.
[02:43:27] Spami: has joined #ruby
[02:43:57] dopie: has joined #ruby
[02:48:12] hdm: has joined #ruby
[02:48:59] hdm: what are folks using these days to build bog-standard signup/register/verify portals? rails + devise?
[02:49:48] bazz_: Ox0dea, are there any hooks I can place in the subclass?
[02:50:00] theshrike: has joined #ruby
[02:50:18] Ox0dea: bazz_: Afraid not. The only thing that comes to mind just now is setting up a TracePoint for the :end event, but that's disgusting.
[02:50:43] Ox0dea: You'll just have to invoke some method at the end of your class body if you really want to do it this way. :/
[02:51:01] bazz_: Ox0dea, sorry what I said to you last night -- I just see Ruby has some sort of `prepended` hook ... not sure what it would do .. never heard of that sort of thing before in other OOP languages
[02:51:20] Ox0dea: bazz_: Ruby *doesn't* have a #prepended hook (yet).
[02:51:33] Ox0dea: Which is anomalous given the existence of #included and #extended.
[02:52:04] bazz_: not according to http://www.sitepoint.com/rubys-important-hook-methods/
[02:52:50] Ox0dea: Welp, not sure how I missed that.
[02:53:09] Ox0dea: It's `using` for which there isn't yet a hook.
[02:54:15] Ox0dea: The refinements mechanism still has a few kinks to be ironed out, and I forget the one use case I'd've had for Module#used or the like, but I still think it should exist for the sake of symmetry.
[02:56:09] Ox0dea: bazz_: Module#prepend sticks its argument at the very front of the receiver's ancestor chain, ensuring that it gets first dibs at method resolution.
[02:56:20] bazz_: I understand
[02:57:01] dramagods: has joined #ruby
[02:58:08] bazz_: is there any equivalent of the desired self.initialize ??
[02:58:25] Ox0dea: I'm not sure I follow.
[02:58:40] Ox0dea: #initialize is an instance method unless you're doing something weird.
[02:58:50] bazz_: exactly .. I want a class equivalent ..
[02:59:14] bazz_: as "class initialized or defined.. run this code now!!"
[02:59:17] rbennacer: has joined #ruby
[02:59:26] Ox0dea: bazz_: That'd be the TracePoint option.
[02:59:44] Ox0dea: There's no way to hook the end of a class body, only the beginning.
[02:59:59] Ox0dea: But TracePoint allows you to watch for just that kind of event and respond however you will.
[03:00:06] bazz_: sounds dirty as you said
[03:00:08] P_R_Deltoid: has joined #ruby
[03:00:36] bazz_: I guess I'll have to add a function call in the middle of the class definition :|
[03:00:43] bazz_: there's gotta be a better way
[03:01:36] Ox0dea: If you want dynamic constants based on existing constants, those latter constants simply have to exist before you can get started...
[03:03:03] dopie: has joined #ruby
[03:04:52] elgatorapido: has joined #ruby
[03:06:32] 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
[03:08:04] Ox0dea: bazz_: It's crazy, but it does the thing: https://eval.in/562945
[03:08:16] zacstewart: has joined #ruby
[03:09:48] bazz_: Crazy is my middle name *puts shades on*
[03:10:09] Ox0dea: I mean, it only runs as long as it needs to, so egregious resource consumption isn't a problem.
[03:10:17] Ox0dea: Wiring it all up to be halfway sane is a tall order, though.
[03:11:05] Ox0dea: Thankfully(?), the #inherited hook fires before the :end event.
[03:13:34] bazz_: before I show you my current code .. I'd like to ask you -- what is @tp .. is it like acting as @@tp?
[03:13:57] bazz_: I haven't yet understood what exactly are "@" variables that are defined directly in a class
[03:14:37] Ox0dea: That's just a plain-old instance variable.
[03:14:49] Ox0dea: It just so happens to live on a Class, but those are just Objects.
[03:16:37] braincrash: has joined #ruby
[03:16:57] d0lph1n98: has joined #ruby
[03:18:40] Ox0dea: bazz_: Prepare for the Holy Trinity of Ruby.
[03:18:41] lxsameer: has joined #ruby
[03:18:47] Ox0dea: >> [Class.is_a?(Module), Class.is_a?(Object), Module.is_a?(Class), Module.is_a?(Object), Object.is_a?(Class), Object.is_a?(Module)]
[03:18:48] ruby[bot]: Ox0dea: # => [true, true, true, true, true, true] (https://eval.in/562946)
[03:19:28] moeabdol: has joined #ruby
[03:20:13] bazz_: so then let me get this straight - with the context of my question in mind - is that instance variable .. what is its scope ? and "access-point" ?
[03:20:37] Ox0dea: It belongs to C.
[03:20:44] Ox0dea: It is directly accessibly only by C.
[03:21:03] Ox0dea: There's #instance_variable_get for poking around in the guts of any Object, though.
[03:21:08] bazz_: and what's the difference between @tp and if it was `@@tp` instead
[03:21:38] Ox0dea: If it were the latter, it'd be directly accessible (and modifiable!) by subclasses.
[03:22:57] Ox0dea: Honestly, it probably should've been a constant, but let's not take that monstrosity too seriously. :P
[03:23:15] hdm: has left #ruby: ()
[03:24:15] chipotle: has joined #ruby
[03:26:50] Ox0dea: TracePoints themselves aren't scoped in any meaningful sense, so it's almost disingenuous to not just stick them in a global.
[03:29:38] theshrike: has joined #ruby
[03:31:24] gix: has joined #ruby
[03:32:56] eljimmy: has joined #ruby
[03:38:36] htmldrum: has joined #ruby
[03:39:24] sgambino: has joined #ruby
[03:45:11] ensyde: has joined #ruby
[03:45:36] scarygelatin: has joined #ruby
[03:48:04] LoneHerm_: has joined #ruby
[03:48:53] stardiviner: has joined #ruby
[03:50:29] Nanuq: has joined #ruby
[03:51:12] dh64: has joined #ruby
[03:51:50] bazz_: is it normal to reassign variables that were formerly "new objects" ?? I need not "free" those objects or anything?
[03:52:09] Radar: bazz_: Do you have an example?
[03:52:11] bazz_: garbage collector will take care of it?
[03:52:20] bazz_: yeah sure ..
[03:52:27] Ox0dea: As long as you don't have mysterious references keeping the object alive, yeah.
[03:52:45] bazz_: oh gawd I hope I don't
[03:53:17] devbug: has joined #ruby
[03:54:50] zzak: has joined #ruby
[03:57:17] augustomna2010: has joined #ruby
[03:59:22] Eaven: has left #ruby: ()
[03:59:45] chosen1: has joined #ruby
[03:59:57] dramagods: has joined #ruby
[04:00:21] stannard: has joined #ruby
[04:02:58] x77686d: has joined #ruby
[04:03:35] Ox0dea: bazz_: https://eval.in/562952
[04:04:18] rbennacer: has joined #ruby
[04:05:01] gizless: Is 'The Last Unicorn' for girls only?!
[04:05:03] RegulationD: has joined #ruby
[04:09:21] PedramT: has joined #ruby
[04:11:18] brianpWins: has joined #ruby
[04:12:56] The_Phoenix: has joined #ruby
[04:13:56] The_Phoenix: has joined #ruby
[04:14:59] noService: has joined #ruby
[04:15:31] The_Phoenix: has joined #ruby
[04:16:03] augustomna2010: has joined #ruby
[04:16:46] The_Phoenix: has joined #ruby
[04:17:48] Spami: has joined #ruby
[04:17:56] The_Phoenix: has joined #ruby
[04:27:45] bazz_: is there a "scalable" way to check if a file has a trailing newline?
[04:27:55] chouhoulis: has joined #ruby
[04:29:04] hk238: has joined #ruby
[04:29:37] hagarelvikingo: has joined #ruby
[04:30:25] tlolczyk: has joined #ruby
[04:35:41] bronson: has joined #ruby
[04:36:09] LoneHermit: has joined #ruby
[04:40:26] arescorpio: has joined #ruby
[04:43:54] jenrzzz: has joined #ruby
[04:43:55] jenrzzz: has joined #ruby
[04:48:46] statelesscode: has joined #ruby
[04:53:03] dramagods: has joined #ruby
[04:53:13] fedexo: has joined #ruby
[04:54:44] nofxxxx: bazz_, iirc you can read only a few bytes of a file, and offset this to parallelize
[04:55:38] yokel: has joined #ruby
[04:55:38] nofxxxx: but... couldn;t you just delegate that issue to ag? (silver searcher)
[04:56:48] genpaku: has joined #ruby
[04:57:21] zacstewart: has joined #ruby
[04:57:27] gigetoo: has joined #ruby
[04:57:45] bazz_: I think maybe I'm taking the issue too seriously .. i just am dealing with dictionary files in the < 10 MB range .. and it's just a personal project ..
[04:58:01] bazz_: need to check if the last byte is a newline .. or must manually append it proper
[04:58:19] bazz_: I'll just file File.open and IO seek -1 (will try anyways)
[04:58:38] nofxxxx: bazz_, yeah... you fallen into the "early optimization root of all evil stuff"
[04:58:55] bazz_: yeah and I'm even conscious of premature optimization!! It's hard for me :|
[04:59:23] nofxxxx: also, if it fits in ram it'll be fast... don't worry
[05:01:31] bazz_: ok and furthermore .. is it possible to read and append to file in a single block?
[05:03:47] bronson: has joined #ruby
[05:04:28] bazz_: sorry, I can RTFM :)
[05:04:34] bazz_: `a+` it is
[05:04:41] nofxxxx: bazz_, guess so... check the options, there's 'r', 'w'... 'r+'... file I/O is something I always need the... you beat me to it
[05:05:27] nofxxxx: bazz_, yeah, append! if it's always the ending it's perfect for you
[05:05:40] htmldrum: has joined #ruby
[05:06:15] bazz_: heh I've been appending ;) -- but if the file does not have a trailing new line, I wind up appending to the last pre-existing line
[05:06:17] nofxxxx: bazz_, and it doesn't need to be in the same block, if you don't use any block
[05:06:21] nofxxxx: file will remain open
[05:06:35] nofxxxx: eg f = File.open(....
[05:06:43] bazz_: well a+ will give me read/write block anyways
[05:06:44] Vlat-: has joined #ruby
[05:11:07] moeabdol: has joined #ruby
[05:13:45] fullstack: has joined #ruby
[05:13:47] moeabdol: has joined #ruby
[05:14:07] twe4ked: has joined #ruby
[05:14:42] Voxxit: has joined #ruby
[05:15:44] aredridel: has joined #ruby
[05:17:44] bazz_: nofxxxx, and finally : https://gist.github.com/bazzinotti/8814fc29e841a021a38276146fbdd9ce
[05:19:21] tristanp: has joined #ruby
[05:20:30] bazz_: I"m going to bed. Thanks for your help
[05:22:26] solocshaw: has joined #ruby
[05:22:36] Moosashi: has joined #ruby
[05:24:23] konsolebox: has joined #ruby
[05:24:34] ReK2: has joined #ruby
[05:24:35] ReK2: has joined #ruby
[05:30:02] chouhoulis: has joined #ruby
[05:31:50] aghalarp: has joined #ruby
[05:35:16] d0lph1n98: has joined #ruby
[05:39:00] devbug: has joined #ruby
[05:39:18] berserk_ren: has joined #ruby
[05:40:43] duderonomy: has joined #ruby
[05:41:27] bobbycvi: has joined #ruby
[05:41:56] tristanp: has joined #ruby
[05:43:02] emilford: has joined #ruby
[05:43:45] gizmore: has joined #ruby
[05:44:49] gizmore|2: has joined #ruby
[05:47:34] PedramT: has joined #ruby
[05:48:06] PedramT: has joined #ruby
[05:48:40] PedramT: has joined #ruby
[05:48:41] Nanuq: has joined #ruby
[05:49:32] chipotle: has joined #ruby
[05:52:07] PaulCapestany: has joined #ruby
[05:57:39] isxek: has joined #ruby
[06:01:53] stannard: has joined #ruby
[06:02:30] roadt_: has joined #ruby
[06:03:54] roadt_: has joined #ruby
[06:04:01] karapetyan: has joined #ruby
[06:04:58] roadt_: has joined #ruby
[06:05:55] RegulationD: has joined #ruby
[06:05:59] roadt_: has joined #ruby
[06:08:26] nanoz: has joined #ruby
[06:11:07] n8183: has joined #ruby
[06:11:26] bazz_: if a variable is used in a class definition without `@` -- what is the difference?
[06:11:53] baweaver: method call or local variabl
[06:12:01] nobitanobi: has joined #ruby
[06:12:16] baweaver: attr_* methods make methods on the class
[06:12:31] baweaver: so you can use them "without the @"
[06:13:30] ReK2: has joined #ruby
[06:13:31] ReK2: has joined #ruby
[06:15:27] benlieb: has joined #ruby
[06:15:58] LoneHermit: has joined #ruby
[06:19:50] triangles: has joined #ruby
[06:21:46] bazz_: baweaver, but I am able to use class variables with or without `@` internally.. what's the difference?
[06:21:58] bazz_: (at the class level)
[06:22:11] bazz_: I'll make an example
[06:22:21] dudepare: has joined #ruby
[06:22:36] karapetyan: has joined #ruby
[06:23:21] tristanp_: has joined #ruby
[06:23:42] bazz_: baweaver, https://eval.in/562973
[06:27:00] duckpuppy: has joined #ruby
[06:28:30] kareeoleez: has joined #ruby
[06:31:02] chouhoulis: has joined #ruby
[06:31:34] dionysus69: has joined #ruby
[06:32:57] Utilisateur: has joined #ruby
[06:34:21] tubuliferous: has joined #ruby
[06:38:53] bazz_: baweaver, I've figured it out -- https://eval.in/562977
[06:40:13] bazz_: local variables are lexically scoped (even in re-opening the same class), instance variables in a class definition are available across re-opening of the class .. and are not available to subclasses ... and then finally class variables are available "across the board" (nested inheritance applicable)
[06:41:04] bazz_: to be clearer, local variables are not available across re-opening of the same class (cause they are lexically scoped)
[06:43:12] akem: has joined #ruby
[06:43:43] emilford: has joined #ruby
[06:44:23] lxsameer: when is the last stage before generating bytecode from AST in source code ?
[06:45:39] zacstewart: has joined #ruby
[06:45:43] tubuliferous: has joined #ruby
[06:47:24] antgel: has joined #ruby
[06:50:14] shevy: so difficult questions :)
[06:52:00] pawnbox: has joined #ruby
[06:53:40] phredus: has joined #ruby
[06:55:32] benlieb: has joined #ruby
[07:00:26] pawnbox: has joined #ruby
[07:02:13] PedramT: has joined #ruby
[07:03:31] lxsameer: shevy: I see, there was a function which process the AST and generated the byte code but i can't remember what it was
[07:03:33] idefine: has joined #ruby
[07:04:00] al2o3-cr: lxsameer: ripper?
[07:04:14] lxsameer: al2o3-cr: no I meant the C function
[07:07:50] idefine: has joined #ruby
[07:08:39] PedramT_: has joined #ruby
[07:08:54] firstdayonthejob: has joined #ruby
[07:11:33] Devalo: has joined #ruby
[07:13:12] PaulCape_: has joined #ruby
[07:17:03] LoneHermit: has joined #ruby
[07:19:05] toretore: has joined #ruby
[07:22:53] The_Phoenix: has joined #ruby
[07:23:21] tAn: has joined #ruby
[07:24:21] PedramT: has joined #ruby
[07:25:44] cu9t: has joined #ruby
[07:25:45] cu9t: how would you filter from two arrays and only show the value that's not in one of the arrays
[07:27:50] gizmore: has joined #ruby
[07:28:41] futilegames: has joined #ruby
[07:29:30] PedramT: has joined #ruby
[07:31:46] chouhoulis: has joined #ruby
[07:36:43] akem: has joined #ruby
[07:38:47] lxsameer: FYI: it's iseq_compile_each function in compile.c
[07:39:49] iaglium: has joined #ruby
[07:42:53] futilegames: has joined #ruby
[07:44:27] emilford: has joined #ruby
[07:44:39] ramfjord: has joined #ruby
[07:45:32] karapetyan: has joined #ruby
[07:45:54] nofxxxx: has joined #ruby
[07:46:31] bazz_: Ox0dea, I converted to a module and was able to bypass need for TestPoint
[07:46:44] noService: has joined #ruby
[07:47:26] bazz_: https://gist.github.com/bazzinotti/8852856d7117669204298a0e130250d8
[07:48:31] bazz_: unfortunately I have a compartment for "WordGames" -- but one of the games is called "WordGame" xD
[07:48:39] PedramT: has joined #ruby
[07:49:54] johnDoe111: has joined #ruby
[07:52:53] nofxx: has joined #ruby
[07:53:54] PedramT: has joined #ruby
[08:01:21] webus: has joined #ruby
[08:03:27] stannard: has joined #ruby
[08:04:08] tildes: has joined #ruby
[08:05:07] tubuliferous: has joined #ruby
[08:05:15] lxsameer: is there any ctag or gtags task for ruby around ?
[08:05:24] Moosashi: has joined #ruby
[08:06:07] bronson: has joined #ruby
[08:06:20] wuyin: has joined #ruby
[08:06:34] PaulCapestany: has joined #ruby
[08:06:34] RegulationD: has joined #ruby
[08:06:37] shibly: has joined #ruby
[08:08:16] shibly: Why can't i join #ruby-lang ?
[08:08:20] shibly: It's invite only?
[08:08:27] shibly: How can i be invited?
[08:08:32] shibly: Who will invite me?
[08:09:18] shibly: has left #ruby: ()
[08:09:22] shibly: has joined #ruby
[08:10:42] moeabdol: has joined #ruby
[08:12:17] LoneHermit: has joined #ruby
[08:13:37] Caerus: shibly, hi, if you need help with ruby then this is the place to be, #ruby-lang is not the public channel list
[08:14:14] Caerus: if you have rails questions there is #RubyOnRails too
[08:14:28] Ropeney: has joined #ruby
[08:14:51] shibly: has left #ruby: ("Leaving")
[08:15:07] PedramT: has joined #ruby
[08:15:07] aghalarp: has joined #ruby
[08:16:15] kareeoleez: has joined #ruby
[08:18:58] d0lph1n98: has joined #ruby
[08:19:41] firstdayonthejob: has joined #ruby
[08:20:05] kareeoleez: has joined #ruby
[08:20:45] PedramT: has joined #ruby
[08:25:18] PedramT_: has joined #ruby
[08:26:30] siaW: has joined #ruby
[08:29:06] PedramT: has joined #ruby
[08:32:31] chouhoulis: has joined #ruby
[08:33:49] harry111: has joined #ruby
[08:33:58] hk238: has joined #ruby
[08:34:44] rippa: has joined #ruby
[08:36:26] pawnbox: has joined #ruby
[08:41:12] SCHAAP137: has joined #ruby
[08:45:12] emilford: has joined #ruby
[08:47:42] PedramT: has joined #ruby
[08:49:27] Gasher: has joined #ruby
[08:53:23] johnDoe111^: has joined #ruby
[08:54:03] Jackneill: has joined #ruby
[08:55:02] shibly: has joined #ruby
[08:55:05] shibly: has left #ruby: ()
[08:56:47] siaW: has joined #ruby
[08:57:59] cu9t: https://www.youtube.com/watch?v=TxpIsep4160
[09:02:57] PedramT: has joined #ruby
[09:03:48] PedramT_: has joined #ruby
[09:04:20] n008f4g_: has joined #ruby
[09:08:10] j0n3: has joined #ruby
[09:11:33] nobitanobi: has joined #ruby
[09:14:13] banister: has joined #ruby
[09:14:37] moeabdol: has joined #ruby
[09:15:28] FooMunki: has joined #ruby
[09:20:42] PedramT: has joined #ruby
[09:22:41] PedramT_: has joined #ruby
[09:23:21] Moosashi: has joined #ruby
[09:23:56] triangles: has joined #ruby
[09:27:03] chipotle: has joined #ruby
[09:28:33] PedramT: has joined #ruby
[09:29:32] antgel: has joined #ruby
[09:31:56] CausaMortis: has joined #ruby
[09:32:11] skade: has joined #ruby
[09:33:18] chouhoulis: has joined #ruby
[09:40:36] m_abdelfattah: has joined #ruby
[09:44:44] PedramT: has joined #ruby
[09:47:17] emilford: has joined #ruby
[09:50:13] akem: has joined #ruby
[09:50:17] ruby870: has joined #ruby
[09:50:53] stoodfarback: has joined #ruby
[09:51:23] ruby-lang000: has joined #ruby
[09:54:36] shevy: yo harry111
[09:57:20] stoodfarback: Hello all. I'm looking for the name of an algorithm (or ruby gem). I have a background task that does a ton of things in sequence (say, 20k). Some are near-instant, some take a while. I want to show updates to the user ("234/20,000: it.jpg") and also want to limit the updates to about 1 per second, since in some cases, hundreds can complete in seconds.
[09:57:39] PedramT: has joined #ruby
[09:57:54] Meow-J: has joined #ruby
[09:57:57] stoodfarback: I need the part that limits it to one per second, everything else already works.
[09:58:47] d0lph1n98: has joined #ruby
[09:59:50] Zarthus: stoodfarback: are you sure showing completion in percentage is not more efficient?
[10:00:23] dramagods: has joined #ruby
[10:00:44] tildes: has joined #ruby
[10:01:05] stoodfarback: Zarthus: Yep, fairly sure. If it takes a long time on a specific item/step, I want it to be showing what item/step that is.
[10:02:00] robbyoconnor: has joined #ruby
[10:02:01] Zarthus: well I'm a bit confused on how you say "limit the updates to about 1 per second", if there's 20,000 entries, that'd take 20000 seconds
[10:02:10] stoodfarback: Which is the reason I can't just store the time since last message and discard any more if it hasn't been a second. It would show the incorrect item if it takes a long time after a burst.
[10:02:52] stoodfarback: Zarthus: The items take different amounts of time to complete. Some can be done in 0.00001 seconds, some take minutes.
[10:03:52] Zarthus: sounds to me like you just want two different things. one of them is the completion meter, the other is a list of completed items your interface loops through every second
[10:04:22] Zarthus: that's how I'd go about making sure every entry (although that will still take a very long time) is shown to the user
[10:04:47] Zarthus: personally, I don't see the value in it and showing it in realtime would be better (users tend to get confused easily regardless)
[10:05:02] stannard: has joined #ruby
[10:05:25] stoodfarback: That's the thing, Zarthus. I don't want to show 1000 items if they completed. I want to show what it's working on now.
[10:05:51] Zarthus: but you also don't want to skip the remainder 999 if they all complete very fast?
[10:06:03] stoodfarback: No, skip them.
[10:06:20] Zarthus: ACTION is very confused.
[10:07:25] RegulationD: has joined #ruby
[10:07:34] stoodfarback: Here's the general idea: I want to save the "current" state to the db, without saving to db 1000 times if the state changed 1000 times in a second.
[10:07:35] blaxter: has joined #ruby
[10:07:58] mikecmpbll: has joined #ruby
[10:08:20] bronson: has joined #ruby
[10:10:45] skade: has joined #ruby
[10:10:47] marius: has joined #ruby
[10:11:05] roshanavand: has joined #ruby
[10:12:14] blackgoat: has joined #ruby
[10:12:30] Zarthus: I'd personally look into threading, I'm not sure if it is your best solution but I would need to see how your code works before giving better solutions
[10:12:53] Zarthus: the other solution I can think of is to show an item from in the future instead of the current one
[10:19:21] cpup: has joined #ruby
[10:21:41] lomex: has joined #ruby
[10:21:43] TomyLobo: has joined #ruby
[10:21:49] kareeoleez: has joined #ruby
[10:22:21] a143753: has joined #ruby
[10:23:50] toretore: stoodfarback: so you have a series of events at various intervals, sometimes less than and sometimes more than 1 second, and you want to basically sample the stream every second and display the event if it's different from the last?
[10:24:48] stoodfarback: toretore: Yep.
[10:24:52] roshanavand: has joined #ruby
[10:25:10] ReK2: has joined #ruby
[10:25:39] PedramT: has joined #ruby
[10:25:47] toretore: stoodfarback: and how is this implemented right now?
[10:26:08] stoodfarback: toretore: Saving to db every time the state changes.
[10:26:14] nobitanobi: has joined #ruby
[10:26:21] toretore: how do you know when the state changes?
[10:27:05] stoodfarback: Every second, grab the value in the db.
[10:28:09] toretore: which sounds like it should work fine? is the issue that you want to filter the events before the db write?
[10:29:43] dangerousdave: has joined #ruby
[10:29:48] stoodfarback: Nah, that works. The issue is, some things take a small fraction of a second, and writing to the db each time is slowing it down a lot. Without saving state to db, it can do thousands per second, with saving state each time it's much slower.
[10:30:56] duckpuppy: has joined #ruby
[10:31:04] toretore: so you need to put a filter in between the work loop and the db write
[10:31:19] PedramT: has joined #ruby
[10:31:19] toretore: that keeps track of time and the last state
[10:31:21] nanoz: has joined #ruby
[10:32:00] Devalo: has joined #ruby
[10:32:57] toretore: something like `t, s = Time.now, nil; write = ->(state){ if state != s && Time.now > (t+1); write_to_db; end }`
[10:34:00] chouhoulis: has joined #ruby
[10:34:34] stoodfarback: Yep, that's the straigtforward solution. But, it would cause the incorrect state to be displayed if it ever slows down (it does). Ie. it will discard the latest state, which is the only important one.
[10:35:36] toretore: how so? it won't write the state unless it changes
[10:35:52] toretore: and it's been >1s since the last write
[10:37:44] stoodfarback: Hmm... example: [0.001s: one] [0.002s: two] [40.0s three]. If it's sampled at second 5, it will show "one", and it needs to show what's actually taking so long, which is "two".
[10:38:18] shevy: what is that... a hash or array?
[10:39:18] toretore: ok so you have to always keep the current event in memory and then query that for the write
[10:40:10] roshanavand: has joined #ruby
[10:40:14] toretore: but then you have to implement something that runs every second regardless of events
[10:43:07] skade: has joined #ruby
[10:44:11] domgetter: has joined #ruby
[10:44:19] toretore: event = nil; Thread.new{ cur = event; loop{ write_to_db(event) if event != cur; cur = event; sleep 1 } }; loop{ event = sleep rand }
[10:44:28] toretore: with some locking, probably
[10:44:29] johnDoe111: has joined #ruby
[10:44:30] johnDoe111^: has joined #ruby
[10:44:35] harry111: has joined #ruby
[10:48:03] emilford: has joined #ruby
[10:48:21] stoodfarback: Yeah, seems like something like that should work. However, I am honestly not very good with concurrency, and would prefer to avoid writing it myself if possible. This seems like a fairly basic/standard application of concurrency, so I was hoping that there was a name/gem for it.
[10:49:09] lxsameer: has joined #ruby
[10:49:22] PedramT: has joined #ruby
[10:51:42] toretore: unfortunately, generic abstractions for concurrency are not very common.. it kind of seeps through everywhere to the point that you have to understand the details to make use of it
[10:58:55] Devalo: has joined #ruby
[10:59:07] Mia: has joined #ruby
[10:59:07] Mia: has joined #ruby
[11:01:38] Caerus: stoodfarback, why not simply have a job check on the state of the event every second? if it's stuck @ one of those 40s tasks it would take 1 second to update
[11:03:09] scepticulous: has joined #ruby
[11:04:51] stoodfarback: Caerus: That's roughly the same thing toretore proposed. Same problem: dealing with threads/concurrency, which I am not good with.
[11:04:55] skade: has joined #ruby
[11:05:48] nfk: has joined #ruby
[11:05:58] Caerus: oh, nvm I missread his reply
[11:07:19] karapetyan: has joined #ruby
[11:08:08] isxek: has joined #ruby
[11:08:13] stoodfarback: Thank you all for the help though. I'll probably just bite the bullet and fumble around until the threads mostly do what I want, like usual.
[11:09:17] lkba: has joined #ruby
[11:11:46] roshanavand: has joined #ruby
[11:12:16] nofxx: has joined #ruby
[11:12:51] shevy: threads can be really annoying
[11:13:02] Caerus: I wonder if you can process it to something like redis (memory is really fast) then do a bulk write to db or rollback redis writes lol
[11:13:07] PedramT: has joined #ruby
[11:13:50] shevy: in ruby-gtk, I had a script that constantly changes the main buffer of a text-view widget; ascii animations. But there was a bug and I did not know where... that's when I found Thread.abort_on_exception = true which actually helped. But I did not know that before
[11:15:20] johnDoe111^: has joined #ruby
[11:15:25] Caerus: shevy, was it you that linked some history about a guy fighting his way into finally finding a ruby bug with threads?
[11:15:39] spider-mario: has joined #ruby
[11:16:03] Devalo: has joined #ruby
[11:16:12] johnDoe111^: has joined #ruby
[11:17:02] nfk: what's a good alternative to capistrano?
[11:17:05] johnDoe111^^: has joined #ruby
[11:17:20] nfk: i have almost gotten it working but i'm not sure i can push through with it to really working
[11:18:40] Caerus: nfk, Ansible maybe?
[11:19:02] shevy: Caerus hmm not sure... I think it sounds familiar but it was probably someone else here... I vaguely remember that discussion though, or a similar one hmm
[11:19:18] shevy: a blog entry it was I think
[11:19:24] Caerus: yeah i remember
[11:19:33] Caerus: an actual bug on ruby
[11:19:35] shevy: haha yeah... I forgot which one it was though :)
[11:19:51] Caerus: child process dying and parent not catching up
[11:20:00] Caerus: things slowing down
[11:20:49] d0lph1n98: has joined #ruby
[11:22:10] PedramT: has joined #ruby
[11:22:51] kareeoleez: has joined #ruby
[11:27:10] triangles2: has joined #ruby
[11:28:35] johnmilton: has joined #ruby
[11:29:07] PedramT: has joined #ruby
[11:31:09] FooMunki: has joined #ruby
[11:32:00] stoodfarback: Did I miss anything obvious here? https://gist.github.com/stoodfarback/826a49410f8f1add96014f72452285e3
[11:34:25] Caerus: shouldnt " if task = @state[:scheduled_task] " be if task == @state[:scheduled_task] ??
[11:34:44] chouhoulis: has joined #ruby
[11:36:57] Caerus: stoodfarback, = assign operator, == compare operator(returns true or false)
[11:36:59] stoodfarback: That's checking if `@state[:scheduled_task]` is set, and also assigning it to the local variable `task` for later.
[11:39:58] awer: has joined #ruby
[11:39:58] stoodfarback: I do think it's against common style guides for that exact confusion, but that's how it is in the code I spent the most time with.
[11:40:35] Bugboy1028: has joined #ruby
[11:41:30] Caerus: well, if there is an scenario where if task = @state[:scheduled_task] could fail then i suppose it makes sense to use that
[11:41:53] Caerus: I would put it between ( ) tho
[11:42:53] stoodfarback: Yeah, looks like parens are the way to go. https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
[11:48:12] tlaxkit: has joined #ruby
[11:48:44] emilford: has joined #ruby
[11:49:07] johnmilton: has joined #ruby
[11:49:48] Caerus: also, your 2 conditionals return true, is that intended?
[11:51:43] scorphus: has joined #ruby
[11:51:51] mikecmpbll: has joined #ruby
[11:53:52] Caerus: those are the 2 things obvious to me
[11:54:01] moeabdol: has joined #ruby
[11:54:07] FooMunki: has joined #ruby
[11:54:24] sarbs: has joined #ruby
[11:55:38] Stan: has joined #ruby
[11:56:27] stoodfarback: I'm not sure what you mean.
[11:56:46] Nuck: has joined #ruby
[11:57:02] nanoz: has joined #ruby
[11:57:10] Caerus: you have 2 if statements that return need_to_schedule_task = true
[11:57:16] ule: has joined #ruby
[11:57:21] snguyen: has joined #ruby
[11:57:49] stoodfarback: Ah. That needs to be true if there is no task, or if the task is not pending (ie, done or in progress).
[11:57:51] Caerus: so basically whatever the case that you're checking for would end up with need_to_schedule_task = true
[11:58:20] stoodfarback: It will be false if the task is pending.
[11:58:28] Caerus: so i guess its default state is false
[11:58:44] Caerus: because if its not then you might have a problem there
[11:59:14] stoodfarback: That is indeed it's starting value.
[11:59:25] Caerus: nvm its right before the block
[11:59:40] Caerus: ACTION should go to bed
[12:00:20] Gasher: has joined #ruby
[12:01:23] solars: has joined #ruby
[12:01:47] LoneHerm_: has joined #ruby
[12:04:37] stoodfarback: You are right that it can be simplified. That was an artifact of a more complicated solution that I had before.
[12:05:19] PaulCape_: has joined #ruby
[12:06:29] stannard: has joined #ruby
[12:07:41] madgen: has joined #ruby
[12:08:15] RegulationD: has joined #ruby
[12:09:10] skade: has joined #ruby
[12:09:25] sepp2k: has joined #ruby
[12:10:00] zacstewart: has joined #ruby
[12:10:19] bronson: has joined #ruby
[12:11:22] dangerousdave: has joined #ruby
[12:13:51] lkba_: has joined #ruby
[12:17:28] Devalo: has joined #ruby
[12:17:42] crameth: has joined #ruby
[12:18:32] crameth: has joined #ruby
[12:19:33] shibly: has joined #ruby
[12:19:41] shibly: has left #ruby: ()
[12:30:02] mrmortondk: has joined #ruby
[12:31:35] lomex: has joined #ruby
[12:32:07] Caerus: see ya later #ruby
[12:32:24] Ox0dea: Bon voyage, Caerus.
[12:35:28] skade: has joined #ruby
[12:35:36] p1k: has joined #ruby
[12:35:50] chouhoulis: has joined #ruby
[12:45:16] idefine: has joined #ruby
[12:45:40] banister: has joined #ruby
[12:45:44] rbennacer: has joined #ruby
[12:48:30] PedramT: has joined #ruby
[12:49:30] emilford: has joined #ruby
[12:49:44] mikecmpbll: has joined #ruby
[12:50:04] PedramT: has joined #ruby
[12:50:48] askhat: has joined #ruby
[12:50:48] PedramT_: has joined #ruby
[12:52:04] Devalo: has joined #ruby
[12:54:04] sdothum: has joined #ruby
[12:55:47] PedramT: has joined #ruby
[12:56:54] Elysia: has joined #ruby
[12:58:41] PedramT: has joined #ruby
[12:58:46] dionysus69: has joined #ruby
[12:59:05] awer: hi im receiving an error when im running my code. i wonder if csomeone mught be able to point me in the rigth direction? https://paste.ee/p/1Nipr
[12:59:44] awer: i want to run a curl command with a set of useragents to be run from a file one by one. nothing special
[13:00:31] tildes: has joined #ruby
[13:00:46] Ox0dea: awer: File.open with a block is already giving you lines; why are you using #gets?
[13:01:29] awer: Ox0dea: just trying doffernt ideas
[13:02:03] awer: Ox0dea: i dont need the #gets part at all?
[13:02:35] Ox0dea: awer: Er, sorry, you'll need File.each_line rather than File.open, but no, you don't need to obtain lines from standard input if you're already getting them from the input file.
[13:03:03] awer: Ox0dea: could you possibly modify it on my ehalf so i can see what you mean exactly please?
[13:04:06] Ox0dea: awer: I'm sorry, Dave. I'm afraid I can't do that.
[13:04:42] awer: Ox0dea: if i change File.open to File.each_line and re run it i get - ./1.rb:4:in `<main>': undefined method `each_line' for File:Class (NoMethodError)
[13:05:34] Ox0dea: awer: Derp. Make that File.foreach, and you should be golden.
[13:06:41] PedramT: has joined #ruby
[13:06:43] p1k: does anyone have experience compiling ruby for use with valgrind ?
[13:11:09] banister: has joined #ruby
[13:13:07] moeabdol: has joined #ruby
[13:18:40] awer: Ox0dea: thanks for your help
[13:19:50] Ox0dea: awer: No worries.
[13:20:31] Ox0dea: awer: Be advised that it'd probably be better to just accept a filename as a command-line argument; then you could just use the `while line = gets` idiom.
[13:23:18] awer: Ox0dea: thanks for the advice but that means absolutley nothing to me :-) im sure it will latter on down the line though
[13:24:52] thesheff17: has joined #ruby
[13:27:35] flashpoint9: has joined #ruby
[13:27:52] skade: has joined #ruby
[13:28:27] moeabdol: has joined #ruby
[13:29:43] kareeoleez: has joined #ruby
[13:32:47] n008f4g_: has joined #ruby
[13:33:45] godzillaenlacasa: has joined #ruby
[13:35:36] mwlang: has joined #ruby
[13:36:34] gregf: has joined #ruby
[13:36:36] chouhoulis: has joined #ruby
[13:37:15] skade: has joined #ruby
[13:38:07] PedramT: has joined #ruby
[13:38:35] nobitanobi: has joined #ruby
[13:38:44] Macaveli: has joined #ruby
[13:39:58] gizless: has joined #ruby
[13:41:44] PedramT: has joined #ruby
[13:43:29] elgatorapido: has joined #ruby
[13:44:31] FooMunki: has joined #ruby
[13:44:58] roadt_: has joined #ruby
[13:50:14] LoneHermit: has joined #ruby
[13:50:15] emilford: has joined #ruby
[13:55:45] silentpost: has joined #ruby
[13:58:04] zacstewart: has joined #ruby
[13:58:05] Guest49: has joined #ruby
[14:01:30] awer: has joined #ruby
[14:04:34] bobbycvi: has joined #ruby
[14:05:14] idle_task: has joined #ruby
[14:06:22] bobbycvi: has joined #ruby
[14:08:05] stannard: has joined #ruby
[14:09:00] RegulationD: has joined #ruby
[14:09:18] bobbycvi: has joined #ruby
[14:13:13] kareeoleez: has joined #ruby
[14:14:17] zacstewart: has joined #ruby
[14:16:06] nobitanobi: has joined #ruby
[14:16:56] awer: has joined #ruby
[14:17:18] PedramT: has joined #ruby
[14:18:15] PedramT_: has joined #ruby
[14:19:11] triangles: has joined #ruby
[14:22:09] qba73: has joined #ruby
[14:22:13] statelesscode: has joined #ruby
[14:23:06] solocshaw: has joined #ruby
[14:24:47] nhhc: has joined #ruby
[14:27:54] nando293921: has joined #ruby
[14:28:26] Guest49: has joined #ruby
[14:28:46] ex0ns: has joined #ruby
[14:28:56] yardenbar: has joined #ruby
[14:30:51] Ebok: has joined #ruby
[14:32:14] biberu: has joined #ruby
[14:34:26] Devalo: has joined #ruby
[14:36:35] nobitanobi: has joined #ruby
[14:37:20] chouhoulis: has joined #ruby
[14:42:05] terminalrecluse: has joined #ruby
[14:42:21] SilverKey: has joined #ruby
[14:46:02] banister: has joined #ruby
[14:47:08] idefine: has joined #ruby
[14:51:01] emilford: has joined #ruby
[14:53:02] mwlang: has joined #ruby
[14:54:39] kareeoleez: has joined #ruby
[15:01:46] elgatorapido: has joined #ruby
[15:02:53] Elvin: has joined #ruby
[15:07:11] last_staff: has joined #ruby
[15:08:24] FooMunki: has joined #ruby
[15:12:31] bronson: has joined #ruby
[15:13:05] x77686d: has joined #ruby
[15:13:47] Elvin: has joined #ruby
[15:13:59] Pumukel: has joined #ruby
[15:14:39] dmr8: has joined #ruby
[15:14:40] dionysus69: is there a browser with ruby instead of js ?
[15:14:54] dionysus69: even experimental
[15:15:01] Ox0dea: No, but Opal is a thing.
[15:15:21] zacstewart: has joined #ruby
[15:16:29] dionysus69: and that is reliable?
[15:16:47] Ox0dea: It's not clear what you're asking.
[15:17:04] dionysus69: does it work in all scenarios or it has some bugs
[15:17:04] awer: has joined #ruby
[15:17:57] Ox0dea: It's a "transpiled" language like CoffeeScript.
[15:18:22] dionysus69: sounds tough to transpile ruby to js haha
[15:18:40] dionysus69: even the first example on the opal site is scary
[15:18:59] mwlang: has joined #ruby
[15:19:06] CausaMortis: has joined #ruby
[15:19:42] Stazer: has joined #ruby
[15:19:48] dionysus69: I was looking for ruby front end frameworks and there is one hehe
[15:19:51] kareeole_: has joined #ruby
[15:22:27] shevy: yeah things should be smoother and easier
[15:23:28] mwlang: has joined #ruby
[15:23:59] kareeoleez: has joined #ruby
[15:24:08] pawnbox: has joined #ruby
[15:24:34] dionysus69: what do you mean shevy?
[15:24:53] dmr8: has joined #ruby
[15:25:40] shevy: dionysus69 for things like opal
[15:26:01] sdothum: has joined #ruby
[15:26:40] dionysus69: but imagine a browser addon that added a native ruby support
[15:26:49] LoneHerm_: has joined #ruby
[15:27:00] dionysus69: that doesn't sound more complex than opal
[15:28:35] shevy: go write one :)
[15:29:03] dionysus69: I cant alone but I could help
[15:29:23] kareeoleez: has joined #ruby
[15:29:39] mwlang: has joined #ruby
[15:29:41] dionysus69: world would be a better place with ruby instead of js
[15:29:41] Ox0dea: dionysus69: https://en.wikipedia.org/wiki/Google_Native_Client#PPAPI
[15:30:22] moeabdol: has joined #ruby
[15:30:51] SilverKey: has joined #ruby
[15:32:08] shevy: empire building by google
[15:32:21] IrishGringo: has joined #ruby
[15:32:44] zast: has joined #ruby
[15:33:24] emilford: has joined #ruby
[15:34:40] jtd: has joined #ruby
[15:36:26] ensyde: has joined #ruby
[15:37:24] mustmodify: has joined #ruby
[15:37:40] mustmodify: man, when you don't care about the long-term health of an app, you can start to do all kinds of crazy things to your repo.
[15:38:01] karapetyan: has joined #ruby
[15:38:03] chouhoulis: has joined #ruby
[15:38:52] benlieb: has joined #ruby
[15:40:23] shevy: like switch to cvs!
[15:44:43] Elvin: has joined #ruby
[15:49:55] madgen: has joined #ruby
[15:52:06] moeabdol: has joined #ruby
[15:52:07] tubuliferous: has joined #ruby
[15:54:33] moeabdol: has joined #ruby
[15:55:58] _aeris_: has left #ruby: ("Konversation terminated!")
[15:56:35] stannard: has joined #ruby
[15:57:00] stannard: has joined #ruby
[16:00:01] rbennacer: has joined #ruby
[16:01:01] shibly: has joined #ruby
[16:01:08] shibly: has left #ruby: ()
[16:01:10] yos7ph: has joined #ruby
[16:05:15] PaulCapestany: has joined #ruby
[16:06:08] chouhoulis: has joined #ruby
[16:06:36] chouhoulis: has joined #ruby
[16:11:57] sharkman: has joined #ruby
[16:12:20] sharkman: when i scrape with nokogiri, what port does the computer use to load the web pages
[16:19:41] apeiros: sharkman: nokogiri doesn't do http
[16:20:14] sharkman: oh yeah i was guessing thats why google wont give me any hits when i search "nokogiri port"
[16:25:00] thang: has joined #ruby
[16:27:04] davedev24: has joined #ruby
[16:28:59] SCHAAP137: has joined #ruby
[16:30:49] PaulCape_: has joined #ruby
[16:34:43] idefine: has joined #ruby
[16:37:24] Didac: has joined #ruby
[16:37:54] cthulh: has joined #ruby
[16:38:40] skweek: has joined #ruby
[16:41:26] KrzaQ: What is the correct way to add ruby gem /bin to my path? I used to use export PATH=$PATH:~/.gem/ruby/`ruby -e 'puts RUBY_VERSION'`/bin but after the last update RUBY_VERSION is 2.3.1, yet gems are in the 2.3.0 folder
[16:42:47] shevy: KrzaQ what is the absolute path? it may be the correct directory path for backwards compatibility for the 2.3.x family of ruby version
[16:43:07] KrzaQ: /home/krzaq/.gem/ruby/2.3.0/bin
[16:43:35] KrzaQ: it probably is, shevy, but I want to be able to type pry to get my repl
[16:44:47] ebbflowgo: has joined #ruby
[16:46:19] chipotle: has joined #ruby
[16:46:50] kareeoleez: has joined #ruby
[16:46:56] KrzaQ: I hoped that there was some canonical way to get this
[16:47:35] djbkd: has joined #ruby
[16:47:41] KrzaQ: gem environment gempath returns /home/krzaq/.gem/ruby/2.3.0:/usr/lib/ruby/gems/2.3.0, but it's missing /bin on those
[16:47:49] terminalrecluse: has joined #ruby
[16:48:51] shevy: yeah... "gem environment gempath" returns /Programs/Ruby/2.3.1/lib/ruby/gems/2.3.0 for me here; I am using ruby 2.3.1
[16:50:07] CausaMortis: has joined #ruby
[16:52:43] madgen: has joined #ruby
[16:53:25] FooMunki: has joined #ruby
[16:53:39] KrzaQ: soo, the best I came with was ruby -e 'puts RUBY_VERSION.gsub(/\d+$/, "0")'
[16:54:42] macscam1: has joined #ruby
[16:55:10] maxscam1: has joined #ruby
[16:55:40] maxscam1: is there a way to run benchmark without it printing the output? I just want to save it to a variable
[16:56:20] Devalo: has joined #ruby
[16:57:39] tlolczyk: This is an example of tsort. https://gist.github.com/anonymous/bbf1bc9c77f222e3718b599323514782 I can't figure out why the last line isn't giving properly connected components.
[16:57:42] madgen: has joined #ruby
[16:57:49] mlakewood: has joined #ruby
[16:58:08] PaulCapestany: has joined #ruby
[17:01:53] sepp2k1: has joined #ruby
[17:02:57] adaedra: KrzaQ: $(ruby -rubygems -e "puts Gem.user_dir")/bin
[17:03:42] mustmodify: has left #ruby: ()
[17:05:34] ramfjord: has joined #ruby
[17:05:41] guardian: has joined #ruby
[17:06:55] fedexo: has joined #ruby
[17:08:37] benlieb: has joined #ruby
[17:10:26] RegulationD: has joined #ruby
[17:11:12] Xeago: has joined #ruby
[17:12:15] lkba: has joined #ruby
[17:12:19] diegoviola: has joined #ruby
[17:14:09] ljames: has joined #ruby
[17:14:51] F4G: has joined #ruby
[17:19:22] Elvin: has joined #ruby
[17:22:43] GodFather: has joined #ruby
[17:23:03] Cohedrin: has joined #ruby
[17:25:09] rbennacer: has joined #ruby
[17:26:11] diegoaguilar: has joined #ruby
[17:26:15] PaulCape_: has joined #ruby
[17:26:25] auxbuss: has joined #ruby
[17:27:08] karapetyan: has joined #ruby
[17:27:45] chouhoulis: has joined #ruby
[17:28:02] Cohedrin_: has joined #ruby
[17:29:04] crystal77: has joined #ruby
[17:33:12] al2o3-cr: has joined #ruby
[17:33:44] lxsameer: has joined #ruby
[17:34:13] Devalo: has joined #ruby
[17:39:12] tildes: has joined #ruby
[17:40:28] PedramT: has joined #ruby
[17:42:12] tubuliferous: has joined #ruby
[17:44:14] nhhc: has joined #ruby
[17:44:50] berserk_ren: has joined #ruby
[17:47:07] Xeago: has joined #ruby
[17:47:10] Dimik: has joined #ruby
[17:48:31] random: has joined #ruby
[17:48:43] smathy: has joined #ruby
[17:49:02] PaulCapestany: has joined #ruby
[17:50:52] hakunin_: has joined #ruby
[17:50:55] rippa: has joined #ruby
[17:52:39] Polysics: has joined #ruby
[17:52:55] CausaMortis: has joined #ruby
[17:54:23] tubuliferous: has joined #ruby
[17:57:09] Azure: has joined #ruby
[17:58:28] JesseH: has joined #ruby
[17:58:35] mhib: has joined #ruby
[18:00:31] sgambino: has joined #ruby
[18:02:10] johnny56_: has joined #ruby
[18:03:42] Nanuq: has joined #ruby
[18:07:14] jottr: has joined #ruby
[18:07:51] JesseH2: has joined #ruby
[18:10:06] awer: has joined #ruby
[18:12:27] augustomna2010: has joined #ruby
[18:13:46] tAn: has joined #ruby
[18:13:54] Cohedrin: has joined #ruby
[18:15:35] bronson: has joined #ruby
[18:16:32] bluOxigen: has joined #ruby
[18:18:01] ferr: has joined #ruby
[18:18:46] statelesscode: has joined #ruby
[18:19:48] PaulCape_: has joined #ruby
[18:20:13] agit0: has joined #ruby
[18:20:32] kareeoleez: has joined #ruby
[18:20:50] LoneHerm_: has joined #ruby
[18:21:34] LoneHermit: has joined #ruby
[18:23:17] Xeago: has joined #ruby
[18:24:25] tubuliferous: has joined #ruby
[18:24:30] dan: has joined #ruby
[18:24:40] Xeago: has joined #ruby
[18:24:58] skade: has joined #ruby
[18:27:34] silentpost: has joined #ruby
[18:27:39] berserk_ren: has joined #ruby
[18:27:51] zacts: has joined #ruby
[18:29:09] devbug: has joined #ruby
[18:32:34] terminalrecluse: has joined #ruby
[18:34:17] phoo1234567: has joined #ruby
[18:39:19] PedramT: has joined #ruby
[18:40:03] Devalo: has joined #ruby
[18:40:06] `tim`: has joined #ruby
[18:43:18] pawnbox: has joined #ruby
[18:44:34] PaulCapestany: has joined #ruby
[18:52:04] pawnbox: has joined #ruby
[18:52:48] futilegames: has joined #ruby
[18:52:52] elifoster: has joined #ruby
[18:53:33] ebbflowgo: has joined #ruby
[18:55:09] ramfjord: has joined #ruby
[18:55:12] Ebok: has joined #ruby
[18:55:39] kareeoleez: has joined #ruby
[19:08:37] yqt: has joined #ruby
[19:08:45] Gasher: have any of you used rubocop?
[19:09:42] shevy: it's autocorrect option is cool
[19:09:48] ruby-lang691: has joined #ruby
[19:10:02] Gasher: I just discovered it
[19:10:05] Gasher: and I'm just like WTF
[19:10:28] Gasher: it tells me to use single quotes if I'm not using interpolation at the moment, wuut
[19:10:37] PaulCape_: has joined #ruby
[19:10:47] Gasher: and doesn't "let" me concatenate strings with +
[19:10:56] kareeoleez: has joined #ruby
[19:11:08] Ox0dea: Gasher: Why are you using it?
[19:11:13] RegulationD: has joined #ruby
[19:11:18] Gasher: what Ox0dea ?
[19:12:11] madgen: has joined #ruby
[19:12:23] mustmodify: has joined #ruby
[19:13:21] Gasher: Ox0dea; why I'm using rubocop, why I'm using double quotes, why I'm using + to concatenate
[19:13:33] Gasher: lots of options m8
[19:13:37] mustmodify: has left #ruby: ()
[19:13:48] Gasher: I'm guessing I won't answer your question then
[19:13:48] statelesscode: has joined #ruby
[19:13:54] Moosashi: has joined #ruby
[19:14:38] havenwood: Gasher: Do as instructed. Follow the orders of your robotic overlords.
[19:15:07] Gasher: havenwood; alright, it looks like Skynet is rising :D
[19:15:07] havenwood: Gasher: When you use single quotes without interpolation it makes it clear that that String doesn't have interpolation. It's for the reader.
[19:15:14] hosttor: has joined #ruby
[19:15:22] havenwood: Gasher: Using `+` to concatenate creates multiple Strings.
[19:15:59] yfeldblum: has joined #ruby
[19:16:11] havenwood: Gasher: TIMTOWTDI though and you can tweak the rubocop settings to your liking if you care to.
[19:16:13] Gasher: havenwood; I have a string with some instructions to an external program, I'm using interpolation or not depending on the use case
[19:16:38] Gasher: yes + does, but it looks way cleaner
[19:17:15] tAn: has joined #ruby
[19:17:34] emilford: has joined #ruby
[19:21:47] robbyoconnor: has joined #ruby
[19:22:42] rbennacer: has joined #ruby
[19:24:09] Gasher: is there a better way to write "if ARGV.length != 3 && ARGV.length != 4"?
[19:24:21] iaglium: has joined #ruby
[19:24:59] Ox0dea: You should probably be using `case`.
[19:25:32] bluOxigen_: has joined #ruby
[19:25:44] Gasher: nope, it's only one if
[19:25:55] Gasher: I just want to check if ARGV is either 3 or 4
[19:26:30] Gasher: I'm being primitive with them, but that's ok
[19:27:12] LoneHermit: has joined #ruby
[19:27:12] Ox0dea: You could say `unless [3, 4].include? ARGV.length`.
[19:27:30] JeremyRedhead: has joined #ruby
[19:27:47] Gasher: good one, thanks
[19:27:52] Ox0dea: It's not "better", just shorter.
[19:28:12] Gasher: in the world of programming, shorter is usually better
[19:28:35] Gasher: which is different than with other aspects of life :p
[19:32:16] adaedra: but no, shorter and better don't really have a bond in programming
[19:32:40] adaedra: except that they both match /ter\b/, but that's irrelevant.
[19:33:37] futilegames: has joined #ruby
[19:34:33] tubuliferous: has joined #ruby
[19:34:39] smathy: (3..4) === ARGV.length
[19:35:13] adaedra: using === is usually frowned upon I think.
[19:35:29] Ox0dea: Which is a shame.
[19:35:41] smathy: ACTION is usually frowned upon too
[19:35:50] tristanp: has joined #ruby
[19:36:14] adaedra: there's more readable equivalents.
[19:36:17] smathy: I feel free to use all features of a language without concern for frowning ;)
[19:36:20] zacstewart: has joined #ruby
[19:36:27] PaulCapestany: has joined #ruby
[19:40:34] karapetyan: has joined #ruby
[19:42:24] nofxx: well, this ain't OT on any language... almost like regex. Tip if you need ssl on any project: cacert.org , very nice, now it's green on ffox and chrome too =D
[19:42:28] emilford: has joined #ruby
[19:42:45] Devalo: has joined #ruby
[19:46:55] moeabdol: has joined #ruby
[19:46:57] skweek: has joined #ruby
[19:48:34] bluOxigen: has joined #ruby
[19:49:32] kareeoleez: has joined #ruby
[19:49:35] robbyoconnor: has joined #ruby
[19:54:59] xlegoman: has joined #ruby
[19:57:21] pontiki: has joined #ruby
[20:00:25] dfinninger: has joined #ruby
[20:02:18] karapetyan: has joined #ruby
[20:04:16] PaulCape_: has joined #ruby
[20:04:23] gigetoo: has joined #ruby
[20:05:00] n008f4g_: has joined #ruby
[20:06:28] benzrf: or, yknow, letsencrypt
[20:07:46] Polysics: has joined #ruby
[20:07:57] roshanavand: has joined #ruby
[20:08:38] Elvin: has joined #ruby
[20:14:37] emilford: has joined #ruby
[20:17:18] dangerousdave: has joined #ruby
[20:17:36] bronson: has joined #ruby
[20:18:09] frankieleef: has joined #ruby
[20:18:15] frankieleef: has left #ruby: ()
[20:18:19] banister: has joined #ruby
[20:19:47] benlieb: has joined #ruby
[20:20:36] flashpoint9: has joined #ruby
[20:20:40] tAn: has joined #ruby
[20:25:12] s00pcan: has joined #ruby
[20:26:30] Billias: has joined #ruby
[20:30:45] Devalo: has joined #ruby
[20:31:41] bluOxigen: has left #ruby: ()
[20:32:47] s00pcan: has joined #ruby
[20:33:04] CausaMortis_: has joined #ruby
[20:34:02] roshanavand: has joined #ruby
[20:35:45] lomex: has joined #ruby
[20:36:37] tubuliferous: has joined #ruby
[20:36:45] emilford: has joined #ruby
[20:40:39] agit0: has joined #ruby
[20:41:19] tAn: has joined #ruby
[20:42:17] ledestin: has joined #ruby
[20:43:22] palms: has joined #ruby
[20:44:23] Limix: has joined #ruby
[20:45:33] tAn: has joined #ruby
[20:47:11] dionysus69: has joined #ruby
[20:47:44] GodFather: has joined #ruby
[20:51:34] aeterne: has joined #ruby
[20:52:32] ebbflowgo: has joined #ruby
[20:52:42] tubuliferous: has joined #ruby
[20:58:53] elgatorapido: has joined #ruby
[21:02:46] Azure: has joined #ruby
[21:06:18] sp4rrow: has joined #ruby
[21:06:46] Ispira: has joined #ruby
[21:07:10] Ispira: I'm back guys
[21:07:14] Ispira: Django let me down
[21:09:50] roshanavand: has joined #ruby
[21:13:00] scarygelatin: has left #ruby: ("Leaving")
[21:14:12] banister: has joined #ruby
[21:14:20] ruby-lang837: has joined #ruby
[21:17:53] freerobby: has joined #ruby
[21:18:15] sp4rrow: has joined #ruby
[21:24:38] rbennacer: has joined #ruby
[21:26:33] emilford: has joined #ruby
[21:26:33] flashpoint9: has joined #ruby
[21:29:23] Azure: has joined #ruby
[21:33:45] crystal77: has joined #ruby
[21:34:09] dramagods: has joined #ruby
[21:35:02] moeabdol: has joined #ruby
[21:38:20] emilford: has joined #ruby
[21:38:38] rbennacer: has joined #ruby
[21:43:34] Trynemjoel: has joined #ruby
[21:46:48] workmad3: has joined #ruby
[21:47:42] roshanavand: has joined #ruby
[21:48:56] benlieb: has joined #ruby
[21:50:23] agent_white: has joined #ruby
[21:51:39] karapetyan: has joined #ruby
[21:52:02] rbennacer: has joined #ruby
[21:55:18] tao_: has joined #ruby
[21:55:40] kareeoleez: has joined #ruby
[21:56:00] Trynemjoel: has joined #ruby
[21:57:02] roshanavand: has joined #ruby
[21:57:32] nofxx: django is free now
[21:59:28] Xeago: has joined #ruby
[21:59:40] Ebok: has joined #ruby
[22:00:33] hakunin: has joined #ruby
[22:00:35] Trynemjoel: has joined #ruby
[22:00:40] devbug: has joined #ruby
[22:02:44] jottr_: has joined #ruby
[22:04:05] gregf: has joined #ruby
[22:05:33] croberts: has joined #ruby
[22:08:01] solocshaw1: has joined #ruby
[22:09:28] last_staff: has joined #ruby
[22:10:39] `tim`: has joined #ruby
[22:10:43] rbennacer: has joined #ruby
[22:11:02] Trynemjoel: has joined #ruby
[22:12:28] roshanavand: has joined #ruby
[22:15:54] emilford: has joined #ruby
[22:16:50] sp4rrow: has joined #ruby
[22:19:24] bronson: has joined #ruby
[22:20:41] framling: has joined #ruby
[22:21:08] Moosashi: has joined #ruby
[22:21:16] tubuliferous: has joined #ruby
[22:24:01] AnoHito: has joined #ruby
[22:24:07] Trynemjoel: has joined #ruby
[22:27:26] tAn: has joined #ruby
[22:29:50] Asher: has joined #ruby
[22:31:11] flashpoint9: has joined #ruby
[22:34:01] cpup: has joined #ruby
[22:34:29] crystal77: has joined #ruby
[22:35:07] mlakewood: has joined #ruby
[22:36:49] zenlot: has joined #ruby
[22:37:32] crystal77: has joined #ruby
[22:41:24] n008f4g_: has joined #ruby
[22:41:49] tAn: has joined #ruby
[22:42:51] Eiam_: has joined #ruby
[22:43:13] crystal77: has joined #ruby
[22:44:31] statelesscode: has joined #ruby
[22:44:52] hagarelvikingo: has joined #ruby
[22:46:20] ismaelga: has joined #ruby
[22:47:04] crystal77: has joined #ruby
[22:47:23] JeremyRedhead: has joined #ruby
[22:47:41] Radar: good morning
[22:48:18] JeremyRedhead: So, I hate to be asking what's probably a very dumb question, but I can't seem to find any information on it...
[22:49:15] JeremyRedhead: Why does .to_i! (or .to_f!, .to_sym!, etc...) not work?
[22:49:23] Radar: On what object?
[22:49:43] Radar: and where did you see these to_i! to_f! and to_sym! methods?
[22:51:07] JeremyRedhead: What I mean is if I want to 'permanently' change some var, why can't I use var.to_i! instead of var=var.to_i ?
[22:51:28] diegoaguilar: has joined #ruby
[22:53:50] Radar: That kind of mutation can have unintended side-effects and so it is not encouraged.
[22:54:35] apeiros: it's not possible
[22:54:46] apeiros: ruby is strongly typed, that means an object can't change its type
[22:54:47] diegoaguilar: has joined #ruby
[22:55:18] apeiros: remember, methods are about the objects, not about variables.
[22:55:25] Arahael: JeremyRedhead: also, the exclaimation mark is a mere... convention.
[22:56:04] Arahael: JeremyRedhead: those methods don't work because they don't exist nor have they been written. apeiros explains how they could not be written.
[22:57:19] Arahael: JeremyRedhead: though... you could define a 'to_i!' method yourself if you wanted to. but you won't be able to mutate the type itself so the method name will be confusing... to say the least.
[22:57:51] elifoster: has joined #ruby
[22:57:55] sp4rrow_: has joined #ruby
[22:58:09] JeremyRedhead: ...so what exactly actually happens when I type var=var.to_i ?
[22:59:52] apeiros: `var.to_i` -> 1 "get the object referenced by var", 2 "send the message `to_i` to it"
[23:00:14] apeiros: `var = …` -> 3 "assign the return value of the to_i message to var"
[23:00:14] Arahael: JeremyRedhead: you invoke the method "to_i", on the object indicated by 'var', causing it's implementation to run, returnig a result. you then re-assign this to 'var'
[23:00:42] RegulationD: has joined #ruby
[23:00:55] apeiros: what to_i itself does depends entirely on the object referenced by var. but usually it'll return an Integer representation of the object
[23:02:10] FooMunki: has joined #ruby
[23:02:39] LoneHerm_: has joined #ruby
[23:03:43] dudepare: has joined #ruby
[23:06:39] roshanavand: has joined #ruby
[23:08:24] dudepare: has joined #ruby
[23:09:06] pawnbox: has joined #ruby
[23:09:47] ruid: has joined #ruby
[23:13:06] davedev24: has joined #ruby
[23:14:17] Ebok: has joined #ruby
[23:16:23] zacstewart: has joined #ruby
[23:20:28] GodFather: has joined #ruby
[23:23:07] moeabdol: has joined #ruby
[23:27:08] htmldrum: has joined #ruby
[23:28:48] davedev24: has joined #ruby
[23:29:02] tlolczyk: This is an example of tsort. https://gist.github.com/anonymous/bbf1bc9c77f222e3718b599323514782 I can't figure out why the last line isn't giving properly connected components.
[23:31:55] stannard: has joined #ruby
[23:35:35] vrish: has joined #ruby
[23:35:38] GinoMan2440: has joined #ruby
[23:36:22] sauvin: has joined #ruby
[23:36:36] duoi: has joined #ruby
[23:37:30] dramagods: has joined #ruby
[23:38:55] sgambino: has joined #ruby
[23:39:15] tAn: has joined #ruby
[23:51:01] LoneHerm_: has joined #ruby
[23:52:18] roshanavand: has joined #ruby
[23:52:55] terminalrecluse: has joined #ruby
[23:53:25] stardiviner: has joined #ruby