« Back to channel list

#ruby - 16 June 2015

« Back 1 day Forward 1 day »
[00:00:21] tedstriker: has joined #ruby
[00:00:37] caseypat_: has joined #ruby
[00:01:00] allcentury: has joined #ruby
[00:01:29] pragmatism: has joined #ruby
[00:01:30] fabrice31: has joined #ruby
[00:02:02] al2o3-cr: name a vegetable with all the vowels? # answers in #ruby-offtopic
[00:02:30] simplyianm: has joined #ruby
[00:02:30] Senjai: al2o3-cr: I will preemptively quit
[00:02:36] serivich: has joined #ruby
[00:04:41] al2o3-cr: Senjai: spoil sport :)
[00:04:56] Ox0dea: Is orange aubergine a vegetable?
[00:06:20] Axsuul: has joined #ruby
[00:06:59] al2o3-cr: Ox0dea: color i think, hmm...
[00:07:10] Ox0dea: Fine, Jerusalem artichoke.
[00:08:03] jhooker: has joined #ruby
[00:08:18] al2o3-cr: ah, well :)
[00:08:50] al2o3-cr: still no one answered the question :)
[00:09:02] msgodf: has joined #ruby
[00:10:18] boomls: has joined #ruby
[00:10:36] beneggett: has joined #ruby
[00:10:50] pengin: has joined #ruby
[00:11:44] zipace: has joined #ruby
[00:11:56] krisquigley: has joined #ruby
[00:13:13] jpfuentes2: has joined #ruby
[00:13:17] dgutierrez1287: has joined #ruby
[00:13:27] workmad3: has joined #ruby
[00:15:30] Rollabunna: has joined #ruby
[00:18:44] dgutierrez1287: has joined #ruby
[00:18:48] pragmatism: has joined #ruby
[00:18:55] Ox0dea: > implying the Jerusalem artichoke isn't a vegetable
[00:19:06] Ox0dea: Please keep your anti-Semitism out of #ruby.
[00:19:19] hydrozen: has joined #ruby
[00:20:03] beneggett: has joined #ruby
[00:20:35] Scripore: has joined #ruby
[00:20:43] keslerm: has joined #ruby
[00:21:42] Channel6: has joined #ruby
[00:22:01] starfox_sf: has joined #ruby
[00:26:35] MatthewsFace: has joined #ruby
[00:28:11] yaw: has joined #ruby
[00:28:22] sevenseacat: has joined #ruby
[00:28:41] mrmargolis: has joined #ruby
[00:28:44] Aeyrix: Ox0dea: We lost. :<
[00:28:56] Aeyrix: Smith finally worked out how to shoot at the hoop but overall ehh / 10.
[00:29:29] Oog: has joined #ruby
[00:30:37] mrmargolis: has joined #ruby
[00:31:55] mrmargolis: has joined #ruby
[00:32:04] Marsupermammal: has joined #ruby
[00:32:51] towski_: has joined #ruby
[00:35:44] hotpancakes: has joined #ruby
[00:35:50] jenrzzz_: has joined #ruby
[00:35:51] robustus|Off: has joined #ruby
[00:36:57] tchebb: has joined #ruby
[00:36:59] bronson: has joined #ruby
[00:37:02] Ox0dea: Aeyrix: I would have been entertained had he started 2-for-2 from three only to get ejected a few minutes later.
[00:37:46] shevy: what if we could load something based on the class name itself, rather than the file position
[00:37:54] Ox0dea: shevy: Then we could have imports!
[00:38:00] shevy: so rather than: require 'foobar/bla.rb', we could do: require Foobar::Bla
[00:38:09] shevy: where Bla could be anywhere
[00:38:30] Ox0dea: tenderlove recently did a talk wherein he discussed the many-headed demon of Ruby's file loading mechanics.
[00:38:42] shevy: well, it's simple! which also means it is dumb
[00:38:43] cirn0_: has joined #ruby
[00:39:16] shevy: I really hate having to search for a file...
[00:39:38] shevy: right now, in one script, I need the class that handles aliases, which is just a hash lookup; I don't want to search for the name of the .rb file...
[00:40:08] jpfuentes2: has joined #ruby
[00:40:10] Ox0dea: al2o3-cr: A bad joke worth forgetting.
[00:40:15] swgillespie: has joined #ruby
[00:40:41] Ox0dea: shevy: Ctrl-P? ctags? Such problems are essentially solved for decent editors.
[00:41:56] Ox0dea: I mean, you've got to have a rough guess at what you're looking for, but your editor really ought to be able to help you after that.
[00:42:20] Ox0dea: Nevertheless, I agree that more granular importing would be handy.
[00:42:31] justintv90: has joined #ruby
[00:42:52] shevy: I can find what I need yes
[00:43:35] Ox0dea: Ah, sorry, it's just your wording made it seem like perhaps the search was giving you more trouble than should be necessary.
[00:43:49] al2o3-cr: shevy: why would you want to do Foo::Bar?
[00:44:06] shevy: al2o3-cr because I'd never have to find the name of the .rb file in question
[00:44:16] EasyCo: has joined #ruby
[00:44:20] al2o3-cr: shevy: that is ludicrous
[00:44:52] keslerm: has joined #ruby
[00:44:53] shevy: Ox0dea well yeah, I am extremely lazy. The only reason I use ruby is so I can be even lazier lateron
[00:45:01] apoplexy: has joined #ruby
[00:45:27] dopie: has joined #ruby
[00:46:32] EasyCo: Hey guys, is there a built-in method that will loop through an array and allow you to pass it a block with a conditional statement? If it's false, it'll stop and return false but if it iterates through all the elements successfully it'll return true.
[00:46:33] havenwood: shevy: Aye, it would be simpler to have the class/module also be the gem name and require statement rather than having all three be different: http://guides.rubygems.org/name-your-gem/
[00:47:15] GPrime: has joined #ruby
[00:47:28] Ox0dea: has joined #ruby
[00:47:37] shevy: I sort of defaulted to use _
[00:47:44] nofxx: You can use autoload for that, no need to make it horrible like python
[00:48:01] shevy: not sure if I like rdoc-data -> 'rdoc/data'
[00:48:04] nofxx: also , classify() sort of thing... activesupport I presume
[00:48:12] Ox0dea: >> [1, 2, 3].all { |x| x.even? }
[00:48:13] ruboto: Ox0dea # => undefined method `all' for [1, 2, 3]:Array (NoMethodError) ...check link for more (https://eval.in/382089)
[00:48:26] Ox0dea: >> [1, 2, 3].all? { |x| x.even? }
[00:48:27] ruboto: Ox0dea # => false (https://eval.in/382090)
[00:48:32] Ox0dea: >> [2, 4, 6].all? { |x| x.even? }
[00:48:33] ruboto: Ox0dea # => true (https://eval.in/382091)
[00:48:34] Ox0dea: EasyCo: ^
[00:48:44] pontiki: has joined #ruby
[00:49:14] nofxx: sorry.. #classify , hehe been wrting too much JS, makes life sad =/
[00:49:15] datanoise: has joined #ruby
[00:49:32] shevy: at least you feel guilty about it
[00:49:36] shevy: imagine if you were to like javascript
[00:49:38] shevy: even more than ruby
[00:49:50] cirn0: has joined #ruby
[00:50:27] EasyCo: Ox0dea: all? !!! Thanks, I just couldn't remember or find it for the life of me. Cheers.
[00:51:28] shevy: googling for all is not so easy
[00:51:36] shevy: still easier than googling for *
[00:51:51] DynamicMetaFlow: has joined #ruby
[00:51:55] pontiki: better to just read Enumerable docs again :D
[00:52:10] al2o3-cr: EasyCo: remember all?, any? and none?
[00:52:15] DynamicMetaFlow: has joined #ruby
[00:52:22] Pupeno_: has joined #ruby
[00:52:27] keslerm: has joined #ruby
[00:52:32] Renich_: has joined #ruby
[00:52:45] pontiki: we need a some? and maybe? too
[00:53:04] drbrain: some? is any?
[00:54:06] centrx: >> never!
[00:54:07] ruboto: centrx # => undefined method `never!' for main:Object (NoMethodError) ...check link for more (https://eval.in/382094)
[00:54:32] ruboto: I don't know anything about cheek
[00:54:32] Renich_: has joined #ruby
[00:54:45] Ox0dea: pontiki: What would you want #maybe? to return?
[00:55:02] pontiki: Ox0dea: the only answer possible: "it depends"
[00:55:09] Oog: has joined #ruby
[00:55:20] Ox0dea: I assumed you were going to mention monads.
[00:55:37] pontiki: i'd have to be a lot smarter
[00:55:46] Ox0dea: Do you enjoy Mexican cuisine?
[00:56:04] arescorpio: has joined #ruby
[00:57:01] Ox0dea: Monads are basically burritos is why I asked, in case the joke was missed.
[00:57:45] cirn0: has joined #ruby
[00:57:51] shevy: Maybe is easy to remember
[00:57:56] shevy: the Schroedinger cat will live. Maybe.
[00:58:11] Ox0dea: Sometimes a cat is Just a cat.
[00:58:27] al2o3-cr: Ox0dea: might be a pussy no?
[00:58:35] Ox0dea: A bad pussy?
[00:58:45] pragmatism: has joined #ruby
[00:58:50] ruboto: I don't know anything about offtopic
[00:58:59] havenwood: ruboto is always ontopic
[00:59:19] Musashi007: has joined #ruby
[00:59:21] jjasonclark: has joined #ruby
[00:59:35] Ox0dea: How do I reorder at_exit handlers?
[01:00:21] sharpmachine: has joined #ruby
[01:00:52] drewo: has joined #ruby
[01:01:32] dopie: has joined #ruby
[01:01:33] al2o3-cr: Ox0dea: how'd you mean?
[01:01:49] Akagi201: has joined #ruby
[01:02:43] Ox0dea: You can use END {} and at_exit {} to register blocks of code to execute right before the program terminates, but they're pushed onto a stack and executed in reverse order.
[01:03:08] hydrozen: has joined #ruby
[01:03:24] jcake: has joined #ruby
[01:04:29] al2o3-cr: Ox0dea: why woudn't they be pushed on the stack in reverse?
[01:04:37] mdz_: has joined #ruby
[01:05:11] al2o3-cr: thats how memory works
[01:05:47] CloCkWeRX: has joined #ruby
[01:06:07] Ox0dea: I'm not saying it doesn't make sense, but I'd nevertheless like to muck about with the order dynamically if it's possible.
[01:07:16] Renich: has joined #ruby
[01:07:21] al2o3-cr: Ox0dea: not possible afaik
[01:07:28] boomls: has joined #ruby
[01:07:53] Ox0dea: I could redefine at_exit and manage the process manually, but that feels inelegant.
[01:08:21] drbrain: you can at_exit in an at_exit
[01:08:27] drbrain: so you can always push new at_exits to run later
[01:08:32] al2o3-cr: Ox0dea: why would you want to do that? just messing?
[01:09:01] Ox0dea: Mostly just messing, but it would actually be a solution to a problem.
[01:09:08] Axsuul: has joined #ruby
[01:09:29] Ox0dea: drbrain: I wouldn't necessarily be in control of the creation of the exit handlers; that is, I'd be called after they already exist.
[01:10:09] drbrain: you could define your own exit callback method, then manage the order from your own at_exit
[01:10:11] nb_bez___: has joined #ruby
[01:10:33] jacaho0: has joined #ruby
[01:11:02] Ox0dea: Yeah, that seems like the concession I'll have to make.
[01:11:42] Aeyrix: <shevy> what if we could load something based on the class name itself, rather than the file position
[01:11:45] al2o3-cr: probably the only concession
[01:11:52] Aeyrix: I've been whining about this for like two years.
[01:14:04] JCOE: has joined #ruby
[01:14:50] pontiki: oh, like Rails autoloader?
[01:15:07] simplyianm: has joined #ruby
[01:15:22] cirn0: has joined #ruby
[01:15:57] Senjai: ActiveSupport::AutoLoad > Ruby
[01:16:28] centrx: has joined #ruby
[01:16:33] Senjai: al2o3-cr: Are you doing an insane amount of callbacks at_exit?
[01:16:50] Senjai: OH oh way. Do you start your program and then let it terminate, running your entire program in an at_exit block :O xD
[01:17:09] al2o3-cr: Senjai: ask your sensai :)
[01:17:17] Senjai: I have a sensai?
[01:17:40] Senjai: < taking applications
[01:17:47] hotpancakes: has joined #ruby
[01:18:12] amclain: has joined #ruby
[01:18:40] Senjai: I hate the code I'm writing right now
[01:18:46] al2o3-cr: hotpancakes: welcome back
[01:18:56] al2o3-cr: Senjai: then make it better :)
[01:19:04] Senjai: Business requirements are silly
[01:19:06] baweaver: aha! finally caught you online pontiki
[01:19:07] Senjai: because of some data science team
[01:19:13] shock_one: has joined #ruby
[01:19:16] pontiki: ACTION wriggles away
[01:19:21] baweaver: how'd it go?
[01:19:44] pontiki: well received. they asked good questions, and even had good answers for the questions i posed at them
[01:19:47] Yiota: has joined #ruby
[01:19:51] pontiki: so i'm happy, and ever so grateful
[01:20:00] al2o3-cr: ACTION pontiki tries to hide from baweaver
[01:20:20] baweaver: Any time, I just didn't have a chance to respond at all
[01:20:33] pontiki: oh, no worries :)
[01:20:36] baweaver: hackathons and whatnot keep me a bit busy.
[01:20:52] Senjai: al2o3-cr: https://gist.github.com/Senjai/01d3ef24ae0470cb2ab8
[01:20:57] Senjai: Slightly scrubbed
[01:21:18] Senjai: It is not a thing that needs to exist :(. Just because values have to be stored in the database for SQL peoples.
[01:22:24] al2o3-cr: Senjai: why you hate that?
[01:22:36] Senjai: al2o3-cr: I hate writing code that shouldn't need to be written
[01:22:40] Senjai: Especially when its SO important.
[01:23:03] Senjai: Eh, well not that it shouldnt be written
[01:23:11] Senjai: but it has to be given the current state of the application
[01:23:20] al2o3-cr: Senjai: just gooin to say
[01:25:01] baweaver: sanity check time!
[01:25:07] baweaver: I use AWS a lot
[01:25:08] al2o3-cr: Senjai: so what do you (like/dislike) in that code?
[01:25:15] krz: has joined #ruby
[01:25:20] baweaver: and the responses from aws have grouped items that are unsorted
[01:25:31] baweaver: meaning syncing them to rails is ever a pain
[01:25:48] baweaver: should I try and port that to the aws-sdk to sort collections?
[01:25:54] Senjai: al2o3-cr: It's rather complex. It does a lot of things. It has to use update_columns on objects outside of its domain because it would cause an infinite loop otherwise
[01:26:22] al2o3-cr: Senjai: besides that
[01:26:44] StephenOTT: has joined #ruby
[01:26:47] glcx: has joined #ruby
[01:27:01] Senjai: al2o3-cr: It has to know variants belong to a group, because the state has to be calculated relative to the group for database persistance, where it could just be done in memory on the fly instead of having to worry how values are set.
[01:27:01] baweaver: or should I see about getting rails to have something to compare collections as having the same objects?
[01:27:02] kekumu: has joined #ruby
[01:27:42] Senjai: Before the requirement of persistance, it was super simple. Of the visible variants just get the first with the highest priority.
[01:27:44] al2o3-cr: one thing i'm a fan of is individually calling private methods? anyone else?
[01:27:57] Senjai: al2o3-cr: individually?
[01:28:34] al2o3-cr: private :this, private :that
[01:28:38] Senjai: Oh god no
[01:28:53] al2o3-cr: just me then?
[01:29:02] Senjai: I mean thats a valid way of doing things
[01:29:11] Senjai: I just like to write as less code as possible while still keeping it readable
[01:29:15] baweaver: ACTION smells a java programmer
[01:29:20] Senjai: baweaver: <3
[01:29:27] pontiki: i will admit i've never seen anyone do it that way, but that doesn't mean much
[01:29:43] Senjai: And I dont like repeating myself
[01:29:43] NeverDie: has joined #ruby
[01:29:52] baweaver: everything below the first private declaration is private
[01:29:58] al2o3-cr: no, i just think is so much readable
[01:30:22] Senjai: I would rather have private do .. end before I would use individual private delcarations
[01:30:22] pontiki: al2o3-cr: if you are your most likely future reader, then it's perfectly okay
[01:30:27] al2o3-cr: each and every method defined at the bottom
[01:30:36] baweaver: If you have enough methods to justify that you have a different problem
[01:30:36] bkxd: has joined #ruby
[01:30:42] baweaver: and it's not readability
[01:30:43] pontiki: i think it creates a higher maintenance cost
[01:30:43] StephenOTT: has joined #ruby
[01:30:47] havenwood: private def sekret
[01:30:59] Senjai: I dont think it would add to maintenance
[01:31:21] pontiki: you have to name it twice
[01:31:21] baweaver: Every extra click to me is extra maintenance
[01:31:23] al2o3-cr: no, i like private :method
[01:31:37] Senjai: that is for sure extra maintenance
[01:31:46] Senjai: And I have to scroll up and down to see what is and isnt marked private
[01:31:47] baweaver: kinda nonsensical
[01:31:48] al2o3-cr: no, not at all
[01:31:54] Senjai: you'd also have private and non private methods mixed up
[01:32:00] Senjai: instead of chunked together
[01:32:02] pontiki: and you have to remember to mark it explicitly private, until you want it protected or public, and *then* you have to remember to mark it so
[01:32:06] havenwood: >> private def whee; end; send :whee
[01:32:07] baweaver: Again, if you have to scroll, you're doing something else wrong
[01:32:07] ruboto: havenwood # => nil (https://eval.in/382138)
[01:32:35] Axsuul: has joined #ruby
[01:32:47] Senjai: baweaver: You would prefer: "def thing; puts "rawr"; end; private :thing"?
[01:32:51] pontiki: it's a similar maintenance headache to me a C prototypes
[01:32:59] havenwood: now that method definitions return a symbol...
[01:33:25] al2o3-cr: ftw gotta be
[01:33:40] Ox0dea: >> private def foo; end
[01:33:41] ruboto: Ox0dea # => Object (https://eval.in/382144)
[01:33:45] Ox0dea: havenwood: ^
[01:33:49] Ox0dea: Is that a bug?
[01:33:50] Senjai: Finished in 11 minutes 55 seconds
[01:33:52] Senjai: 1817 examples, 23 failures, 2 pending
[01:33:54] Senjai: Finished in 11 minutes 55 seconds
[01:33:56] Senjai: 1817 examples, 23 failures, 2 pending
[01:33:58] Senjai: Finished in 11 minutes 55 seconds
[01:33:59] StephenOTT: has joined #ruby
[01:34:00] Senjai: 1817 examples, 23 failures, 2 pending
[01:34:02] Senjai: Finished in 11 minutes 55 seconds
[01:34:03] havenwood: >> def foo; end
[01:34:04] ruboto: havenwood # => :foo (https://eval.in/382145)
[01:34:04] Senjai: 1817 examples, 23 failures, 2 pending
[01:34:06] Senjai: Finished in 11 minutes 55 seconds
[01:34:07] Ox0dea: havenwood: I know.
[01:34:08] Senjai: 1817 examples, 23 failures, 2 pending
[01:34:10] Senjai: Finished in 11 minutes 55 seconds
[01:34:12] Senjai: 1817 examples, 23 failures, 2 pending
[01:34:15] Senjai: Finished in 11 minutes 55 seconds
[01:34:16] havenwood: Ox0dea: showing for others :P
[01:34:20] Senjai: 1817 examples, 23 failures, 2 pending
[01:34:21] ruboto: apeiros, fflush, banisterfiend, seanstickle, Mon_Ouie, zzak, Havenn, jhass, Radar, miah, sevenseacat, workmad3, Coraline, zenspider, drbrain, slyphon, rubyhacker1, Aria, ljarvis
[01:34:28] Senjai: Im going home
[01:34:43] Senjai: those failures are going to torment me
[01:34:48] baweaver: no reason to spam the channel with them
[01:34:59] Senjai: baweaver: I didn't mean to
[01:35:05] al2o3-cr: :private ftw all day long (imo)
[01:35:09] Ox0dea: private() currently returns self, but it'd make more sense to return its argument(s).
[01:35:12] Senjai: baweaver: I was scrolled up in my buffer, it didnt look like it was pasting
[01:35:17] datanoise: has joined #ruby
[01:35:27] Senjai: Apologies
[01:36:12] havenwood: Ox0dea: on first impression that makes sense to me, hem
[01:36:23] chipotle: has joined #ruby
[01:36:34] Ox0dea: >> method(:private)
[01:36:35] ruboto: Ox0dea # => #<Method: main.private> (https://eval.in/382154)
[01:36:36] jpfuentes2: has joined #ruby
[01:36:38] Ox0dea: That scares me a little.
[01:36:44] Ox0dea: I've never seen main in that position.
[01:37:02] havenwood: >> method(:private).owner
[01:37:03] ruboto: havenwood # => #<Class:#<Object:0x42022e38>> (https://eval.in/382155)
[01:38:04] al2o3-cr: same with public
[01:38:18] Ox0dea: But whose metaclass is that?!
[01:38:32] al2o3-cr: Ox0dea: self at the top level
[01:39:01] Ox0dea: >> method(:private).owner.object_id == self.object_id
[01:39:02] ruboto: Ox0dea # => false (https://eval.in/382157)
[01:39:03] eggoez: has joined #ruby
[01:39:11] Ox0dea: Erm, wait.
[01:39:30] Ox0dea: Yeah, never mind, you're right.
[01:39:53] Senjai: I love it when you $ self in pry
[01:39:56] Senjai: and see terrible monkeypatches
[01:40:21] Senjai: https://gist.github.com/Senjai/c21594137034308930cb
[01:41:25] al2o3-cr: >> [method(:private).owner, class << self; remove_method(:to_s); end]
[01:41:26] ruboto: al2o3-cr # => [#<Class:#<Object:0x4171ae44>>, #<Class:#<Object:0x4171ae44>>] (https://eval.in/382159)
[01:41:48] krowv: Hi channel. I'm new to both ruby and gtk3. Any help pointing me in the right direction would help. I'm trying to write a simple application. From the main window when a button is clicked I'd like another window opened with more buttons. Here is the code I have so far: https://gist.github.com/anonymous/58bd927178eb59699da8
[01:42:10] Senjai: anyways, night all
[01:42:18] Ox0dea: >> method(:private).owner == singleton_class
[01:42:19] ruboto: Ox0dea # => true (https://eval.in/382166)
[01:42:35] RickHull: has joined #ruby
[01:43:45] Renich: has joined #ruby
[01:44:39] yaw: has joined #ruby
[01:45:11] bgmarx: has joined #ruby
[01:48:01] jackjackdripper: has joined #ruby
[01:49:29] mcclurmc: has joined #ruby
[01:49:35] MrWharfsnort: has joined #ruby
[01:49:49] bruno-: has joined #ruby
[01:50:33] Yiota: has joined #ruby
[01:51:17] Renich: has joined #ruby
[01:52:01] MrWharfsnort: has left #ruby: ()
[01:53:02] yfeldblum: has joined #ruby
[01:53:08] Randroid: has joined #ruby
[01:53:56] mike___1234: has joined #ruby
[01:54:42] Ox0dea: havenwood: That was surprisingly easy.
[01:55:21] cirn0: has joined #ruby
[01:55:47] Renich: has joined #ruby
[01:56:33] Renich: has joined #ruby
[01:56:42] Randroid: has left #ruby: ()
[01:58:25] rbennacer: has joined #ruby
[01:59:28] al2o3-cr: Ox0dea: dude! do you teach engrish?
[01:59:29] dgutierrez1287: has joined #ruby
[02:00:08] RegulationD: has joined #ruby
[02:00:10] Renich: has joined #ruby
[02:00:32] stryek: has joined #ruby
[02:00:58] krisquigley: has joined #ruby
[02:01:19] dfockler: has joined #ruby
[02:01:33] Renich: has joined #ruby
[02:01:39] Ox0dea: al2o3-cr: Whence comes such a question?
[02:02:03] Ox0dea: I'd cleared the buffer, and you made me go and check whether I'd accidentally said "surplisingry".
[02:02:13] workmad3: has joined #ruby
[02:02:40] al2o3-cr: Ox0dea: your grammer is spot on is all :)
[02:03:03] shevy: krowv always include the error in your program. Also, I think Gtk.init is not needed
[02:03:11] shevy: "include the error in your *pastie"
[02:03:20] shevy: don't include errors in your program please :)
[02:03:46] krowv: shevy, there is no error at the moment. I just don't know what I'm doing. :)
[02:04:09] krowv: the code I pasted works.
[02:04:17] shevy: ok so you have one window with at the least a button
[02:04:21] shevy: from it you wish to open another window
[02:04:22] krowv: Now I'm trying to make clicking a button open a new window.
[02:04:39] krowv: The "exit" button works
[02:04:44] krowv: and closes the application
[02:04:50] Yiota: has joined #ruby
[02:05:06] krowv: Now I want for example the "information" button to open a new window that would contain another grid with other buttons
[02:05:11] krowv: Do I need a new class for that?
[02:05:19] shevy: krowv have a look at something like: http://ruby-gnome2.osdn.jp/de/hiki.cgi?Gtk%3A%3AColorSelection
[02:05:22] saadq: has joined #ruby
[02:05:28] shevy: this is a widget that can pop up
[02:05:42] shevy: you could have your button call a method
[02:05:47] shevy: and in that method you create that widget
[02:05:50] imperator: has joined #ruby
[02:05:55] shevy: def create_dialogue; colour_selection_dialog = ColorSelectionDialog.new("setting color")
[02:06:22] shevy: in gtk/gnome, by default, widgets tend to not be visible
[02:06:26] shevy: so you may have to call .show_all on it
[02:06:31] krowv: I think I see where that is going.
[02:06:48] shevy: in your current code you also do that too
[02:06:53] shevy: line 31, show_all
[02:07:04] shevy: let me try to find a simple example
[02:07:22] krowv: shevy, awesome. thanks.
[02:07:37] krowv: ACTION hacks on the code to see if he can make it work
[02:07:47] joaomdmoura: has joined #ruby
[02:07:51] shevy: btw I think there may be only one Gtk::Window
[02:08:04] zenguy_pc: has joined #ruby
[02:08:11] shevy: so if you tend to wish to re-use your components, it may be better to subclass from a widget that is below that hierarchy
[02:08:17] shevy: like, Gtk::HBox or Gtk::VBox
[02:08:49] shevy: I can't look at my examples right now, something does not work :\ I think I have to recompile rubygnome
[02:11:04] shevy: I have an idea krowv
[02:11:15] mary5030: has joined #ruby
[02:11:15] shevy: the rubygnome2 source archive comes with lots of .rb examples
[02:11:17] shevy: about 400 or so
[02:11:20] shevy: that is how I learned rubygnome
[02:11:32] shevy: have a look at it: wget http://sourceforge.net/projects/ruby-gnome2/files/ruby-gnome2/ruby-gnome2-2.2.5/ruby-gnome2-all-2.2.5.tar.gz
[02:11:57] shevy: you may have to go into the subdirectories; I recommend the directory gtk3/
[02:12:16] shevy: there will be a file called main.rb or demo; run that, it showcases all widgets via a demo-menu where you can pick stuff
[02:12:28] shevy: when you want to know how things work, you can look at that specific .rb file \o/
[02:12:32] krowv: In my code write now I tried creating a method and then calling it when the button is pushed
[02:12:59] Igorshp: has joined #ruby
[02:13:09] krowv: but thats now quite doing what I want. Will dig around in the ruby-gnome package
[02:13:25] shevy: upload your pastie perhaps
[02:13:29] shevy: *update your pastie perhaps
[02:13:58] krowv: I'm gonna take a better stab at it. If I get completely stuck after looking at examples I'll post something again
[02:14:23] LetErikTry: has joined #ruby
[02:14:23] LetErikTry: has joined #ruby
[02:15:10] krowv: ACTION starts wading through gtk3/sample/misc directory
[02:16:04] avahey: has joined #ruby
[02:16:06] musgravejw: has joined #ruby
[02:16:25] Rollabunna: has joined #ruby
[02:17:00] freerobby: has joined #ruby
[02:17:07] Ox0dea: What's the most sensible thing for Module#private to return if called with more than one argument?
[02:17:32] _blizzy_: has joined #ruby
[02:17:38] psye: has joined #ruby
[02:18:00] al2o3-cr: Ox0dea: hehe
[02:18:03] Ox0dea: Called with 0, you don't really care about the return value. Called with one, you want the symbol for potential decoration. But 2+?
[02:18:41] dylanhart: has joined #ruby
[02:19:45] Ox0dea: Feels like 1 is the only special case.
[02:20:30] krowv: shevy, making progress. found a dialog.rb and got a second window to open.
[02:20:41] Spami: has joined #ruby
[02:21:50] gluten_hell_: has joined #ruby
[02:22:07] al2o3-cr: Ox0dea: what would you like it to return?
[02:22:23] Ox0dea: Ruby isn't mine alone.
[02:22:48] al2o3-cr: Ox0dea: didn't say it was?
[02:23:14] x1337807x: has joined #ruby
[02:23:40] jtdoncas: has joined #ruby
[02:24:11] jtdoncas: Hello everyone! I'm creating a DSL and I wanted to know if there was a more elegant way of passing class variables along than I currently have: https://gist.github.com/anonymous/64efa3fc4c6114bba59f
[02:24:29] Ox0dea: al2o3-cr: I can't conceive of a reason to call a visibility modifier with more than one argument, but someone someday will, and I'd like for them to get the return value they expected.
[02:24:37] Ox0dea: MINASWAN and all that. :)
[02:25:14] centrx: Ox0dea, docs say it returns 'self'?
[02:25:23] Yiota: has joined #ruby
[02:25:50] Ox0dea: centrx: At present, it returns the receiver, which may be an implicit self or an expicit module.
[02:26:04] shevy: jtdoncas pretty peculiar code :)
[02:26:24] jtdoncas: shevy: is it bad?
[02:26:44] Ox0dea: jtdoncas: A more concrete example would likely improve your chances of receiving actionable advice.
[02:27:25] shevy: no real idea, it looks very unusual
[02:27:40] jtdoncas: Ox0dea: I just to know if there was another than doing @@name = self
[02:27:46] jtdoncas: which seems hack-ey
[02:28:01] shevy: I am sure you have a reason why you need to use a @@foo variable
[02:28:30] jtdoncas: shevy: So I don't have to hardcode the module name in the instance method
[02:28:53] casadei: has joined #ruby
[02:29:14] datanoise: has joined #ruby
[02:29:21] djbkd: has joined #ruby
[02:29:37] al2o3-cr: Ox0dea: you is going to deep :)
[02:30:11] al2o3-cr: Ox0dea: deep?
[02:30:27] Ox0dea: Method definition returns the method name as a symbol, which is nice for passing along to some decorator.
[02:30:29] shevy: jtdoncas can't you find out the name of the module anyway?
[02:30:37] shevy: via self.class.name and querying .ancestors
[02:30:47] Ox0dea: al2o3-cr: It seems to make sense enough that we should be able to do that with explicitly private methods as well.
[02:30:57] Ox0dea: decorate private def foo ... end
[02:31:03] fedexo: has joined #ruby
[02:31:11] Ox0dea: But what to return if somebody calls private(:foo, :bar)?
[02:31:16] shevy: private public integer <T>
[02:31:42] shevy: [:foo, :bar]
[02:31:46] shevy: pretty useless too hahaha
[02:31:52] al2o3-cr: 19>> def f; end
[02:31:53] ruboto: al2o3-cr # => nil (https://eval.in/382177)
[02:31:56] zenguy_pc: has joined #ruby
[02:31:58] al2o3-cr: >> def f; end
[02:32:00] ruboto: al2o3-cr # => :f (https://eval.in/382178)
[02:32:01] shevy: I have no idea what is going through the mind of Ox0dea
[02:32:16] al2o3-cr: shevy: me neither
[02:32:36] shevy: he is like the hybrid-mix of what you get when you combine Mon_Ouie with hanmac
[02:32:38] Ox0dea: >> def decorate m; "decorated #{m}" end; decorate def foo; end
[02:32:39] ruboto: Ox0dea # => "decorated foo" (https://eval.in/382179)
[02:32:48] Ox0dea: >> def decorate m; "decorated #{m}" end; decorate private def foo; end
[02:32:49] ruboto: Ox0dea # => "decorated Object" (https://eval.in/382180)
[02:32:56] Ox0dea: ^ Not expected.
[02:32:59] saadq: has joined #ruby
[02:33:00] xxneolithicxx: has joined #ruby
[02:33:12] Ox0dea: Does no one observe the principle of least surprise anymore?!
[02:33:16] jtdoncas: shevy: I'm not sure what you mean :(
[02:33:40] shevy: jtdoncas you said you so don't have to hardcode the module name
[02:33:42] Ox0dea: jtdoncas: Would you mind showing exactly how you'd like to be able to write a Client?
[02:33:52] shevy: but it is known when and where a module will be included into a class
[02:34:22] shevy: >> module Foo; end; class Bar; include Foo; end; Bar.ancestors
[02:34:23] ruboto: shevy # => [Bar, Foo, Object, Kernel, BasicObject] (https://eval.in/382181)
[02:34:29] cirn0: has joined #ruby
[02:35:10] al2o3-cr: you getting somewhere
[02:35:29] Ox0dea: al2o3-cr, shevy: The visibility modifiers should just be left as they are, then?
[02:35:46] auzty: has joined #ruby
[02:35:47] shevy: I wouldn't know the first thing about private
[02:35:58] shevy: to be honest, I don't even understand why it even exists
[02:36:09] Ox0dea: Someone's got some reading to do.
[02:36:13] al2o3-cr: shevy: come on
[02:36:17] shevy: no really
[02:36:19] MrWharfsnort: has joined #ruby
[02:36:21] jtdoncas: Ox0dea: https://gist.github.com/anonymous/dc0b2c8f995eeed45efd
[02:36:27] shevy: you can use .send anyway right?
[02:36:42] al2o3-cr: shevy: thats not the point though
[02:36:50] shevy: so what is the point
[02:37:02] Ox0dea: Clarity of intent.
[02:37:06] Ox0dea: Write code for humans.
[02:37:07] shevy: I have that already
[02:37:45] Ox0dea: jtdoncas: You've not demonstrated why Client should respond to #my_objects.
[02:38:53] jtdoncas: Ox0dea: I need to create the methods using item.name which I get from objects
[02:39:16] MrWharfsnort: has left #ruby: ()
[02:39:28] Scroff: has joined #ruby
[02:39:57] shevy: how many downloads on rubygems come from bots?
[02:40:10] jtdoncas: shevy: what were you saying about using self.class instead of @@foo?
[02:40:23] shevy: nono, not instead of @@fo
[02:40:24] Ox0dea: shevy: Every downloader of RubyGems is a bot except you.
[02:40:39] shevy: I meant when you wrote that you have to hardcode the module name
[02:40:59] shevy: I think the biggest problem I have is that I don't really understand what you are doing in your code
[02:41:04] drewo: has joined #ruby
[02:41:21] beneggett: has joined #ruby
[02:41:39] jtdoncas: shevy: I have a DSL module that defines DSL functions and then I want to use that DSL in the implementor and then pass in the objects created to the client
[02:41:40] krowv: shevy, here is my current attempt. https://gist.github.com/anonymous/9acb04fcafac8ff90151
[02:41:54] krowv: I'm getting a warning now when I click information Gtk-WARNING **:Attempting to add a widget with type GtkGrid to a GtkWindow, but as a GtkBin subclass a GtkWindow can only contain one widget at a time; it already contains a widget of type GtkGrid
[02:41:56] Ox0dea: jtdoncas: Way too much "what", not enough "why".
[02:42:06] krowv: Am I on the right path ya think?
[02:42:25] shevy: krowv yeah, that is why I subclass from Gtk::HBox or Gtk::VBox instead normally
[02:42:34] jtdoncas: Ox0dea: Well I'm not sure what you want me to tell you. The end goal is to make an API wrapper for a service
[02:42:42] shevy: package everything into one widget, then bind that widget into a Window parent
[02:42:56] jtdoncas: Ox0dea: the DSL is to make the client methods that map to endpoints
[02:43:11] Ox0dea: jtdoncas: Do you know all of the endpoints ahead of time?
[02:43:17] jtdoncas: Ox0dea: yes
[02:43:35] Ox0dea: Then why not just `endpoints.each { |ep| define_method(ep) { ... } }`?
[02:44:06] x1337807x: has joined #ruby
[02:44:36] jtdoncas: Ox0dea: So I can support different methods, required parameters, namespaces
[02:45:56] Ox0dea: Why do you need distinct definitions of these methods in each class that extends from your DSL module?
[02:45:59] zenguy_pc: has joined #ruby
[02:47:36] zenguy_pc: has joined #ruby
[02:47:49] krowv: shevy, trying to parse what that means... Basically is it saying I can only have one one GtkGrid per class?
[02:47:52] jtdoncas: Ox0dea: I don't, I just need them to be created in my DSLImplementation -- so I guess I should created the methods in my DSL instead of client, eh?
[02:48:46] Ox0dea: jtdoncas: Well, in what way is `Client.extend APIMethods` not sufficient?
[02:49:07] svf: has joined #ruby
[02:49:19] al2o3-cr: >> [:fail, :fail, :fail].sample
[02:49:20] ruboto: al2o3-cr # => :fail (https://eval.in/382188)
[02:49:25] ajaiswal: some help here.. i'm trying to run a if loop in which i'm running a some system commands. if the test is good it should increment the value.. https://gist.github.com/ashish1099/94ac418e28ab74ad14db
[02:49:47] ajaiswal: i'm looking for something "passed totalcount/passedtest"
[02:50:03] Ox0dea: ajaiswal: Holy shit.
[02:50:17] shevy: krowv you have Gtk::Window. This wants to have only one sub-widget. The solution is, package everything into one widget, then add that to Gtk::Window.new.add(your_widget)
[02:50:26] shevy: that is why I said I subclass from Gtk::HBox normally, or Gtk::Frame
[02:50:26] jtdoncas: Ox0dea: it is. I just need to create the methods (I guess instead of accumulating an array I just make the methods directly! )
[02:50:33] ajaiswal: Ox0dea: lol
[02:50:49] Ox0dea: jtdoncas: Well, dynamic method definition is fine as long as it's called for.
[02:51:28] shevy: krowv, here is an example: https://gist.github.com/shevegen/7bba8e50ec01cc2486e5
[02:51:38] shevy: this is the important part: class Cdripper < Gtk::Frame
[02:51:42] shevy: and then, lateron at the end:
[02:51:51] ajaiswal: Ox0dea: what w
[02:51:51] j4cknewt: has joined #ruby
[02:51:52] shevy: runner = GtkRunner.new
[02:52:02] ajaiswal: Ox0dea: what wrong i'm doing here
[02:52:04] shevy: cdripper = Cdripper.new(ARGV.first); runner.add(cdripper)
[02:52:05] Ox0dea: ajaiswal: For starters, why are you using "0" and "1"?
[02:52:15] Ox0dea: If you're wanting to do arithmetic, those should be integers.
[02:52:25] GPrime: has joined #ruby
[02:52:38] shevy: krowv GtkRunner I wrote so I don't have to deal with Gtk::Window on my own anymore (don't mind the name... I should rename it to Gtk::Runner ... but it is years since I last dealt with ruby-gnome much at all really)
[02:53:15] shevy: krowv so in your case, just subclass from something else like Gtk::Frame for now; and then add this into a Gtk::Window widget, and the above error message will go away
[02:53:16] ajaiswal: hmm $successtest is an interger... hmm
[02:53:37] jtdoncas: Ox0dea: thanks for your help, my code is a lot clearer now! I don't know why I was making that array :D
[02:53:44] gr33n7007h: has joined #ruby
[02:54:02] chinmay_dd: has joined #ruby
[02:54:09] zenguy_pc: has joined #ruby
[02:54:27] sharpmachine: has joined #ruby
[02:54:53] saaki: has joined #ruby
[02:56:36] jtdoncas: Ox0dea: actually no I needed it in the client to pass it a Curb connection... fuck
[02:56:53] al2o3-cr: ajaiswal: whats the problem?
[02:57:29] Ox0dea: jtdoncas: Well, shit...
[02:57:31] fujimura: has joined #ruby
[02:58:13] ajaiswal: al2o3-cr: hmm the output is coming like this totalcount/01.. instead of that i'm looking for totalcount/successtest
[02:58:16] krowv: shevy, ok. thanks for the tips. I'll see what I can come up with. Glad I've made it this far on my second day with ruby gtk3.
[02:58:43] happyface: has joined #ruby
[02:59:10] tkuchiki_: has joined #ruby
[02:59:12] Ox0dea: ajaiswal: In Ruby, "2" + "3" is "23", not 5.
[03:00:01] ajaiswal: Ox0dea: ok... i have removed the "0" to just 0
[03:00:07] krowv: day one was mostly getting a working environment.
[03:00:23] Ox0dea: jtdoncas: Do you know about hook methods?
[03:00:29] baweaver: has joined #ruby
[03:00:31] banister: has joined #ruby
[03:00:32] al2o3-cr: ajaiswal: totaltest = Dir.glob("/var/log/beaker/spec/reports/#{role}/#{osx}/latest/*.xml").count # is always gonna be a fixed number
[03:01:03] Ox0dea: al2o3-cr: What if there are an infinite number of matching files; is Infinity a Fixnum?
[03:02:15] al2o3-cr: successtest = "0" -> 0
[03:02:31] ajaiswal: Ox0dea: hmm.. i'm not sure about the infinity, but in my case its 38
[03:02:37] ajaiswal: al2o3-cr: yes i have changed that
[03:02:43] Ox0dea: ajaiswal: Did you change the "1"?
[03:02:55] ajaiswal: Ox0dea: yes that too
[03:03:16] ajaiswal: i have updated the gist
[03:03:26] jtdoncas: Ox0dea: yes
[03:03:38] jtdoncas: Ox0dea: line method_added, included, method_missing, etc... ?
[03:03:48] pontiki: don't worry, a filesystem will always be finite
[03:04:08] pipework: pontiki: But your mom might not be! (I'm so sorry)
[03:04:14] Ox0dea: pontiki: https://github.com/philipl/pifs
[03:04:31] Ox0dea: pipework: No man is an island... except your mom.
[03:05:00] al2o3-cr: ajaiswal: totaltest is always going to be 38
[03:05:18] pipework: Ox0dea: ho ho ho!
[03:05:27] bnagy: I am extremely unimpressed with using $? and also using the exit status of grep
[03:05:34] ajaiswal: al2o3-cr: yes.. so if the grep i success, it should increment the successtest
[03:05:36] Ox0dea: pipework: I thought I was so clever too, but somebody said it on some random forum eight years ago.
[03:05:49] ght: Question: I have an array of values I'm iterating through by myarray.each do |element|, and I'd like to split the elements via element.split("-") (as all values are a string with a dash in the middle), take that two-part array and dynamically add it to an associative array, where split element[0] is the key and split element[1] is the value.
[03:05:59] pontiki: pulling up a directory of files, though, will likely take longer than the heat-death of the universe
[03:06:12] pontiki: so it won't matter in the end
[03:06:13] bnagy: ght: Hash or to_h should help
[03:06:16] ght: Does anyone have any documentation on dynamically creating a hash like that?
[03:06:24] bnagy: >> Hash([1,2])
[03:06:26] ruboto: bnagy # => can't convert Array into Hash (TypeError) ...check link for more (https://eval.in/382197)
[03:06:30] ajaiswal: bnagy: can you point with better solution ?
[03:06:35] _seanc_: has joined #ruby
[03:06:38] bnagy: >> Hash(*[1,2])
[03:06:38] balazs: has joined #ruby
[03:06:38] ruboto: bnagy # => wrong number of arguments (2 for 1) (ArgumentError) ...check link for more (https://eval.in/382198)
[03:06:50] bnagy: dis mah rage face
[03:07:03] krz: has joined #ruby
[03:07:05] Ox0dea: >> strs = ['foo-bar', 'baz-quux']; Hash[strs.map { |s| s.split('-') }]
[03:07:05] ruboto: Ox0dea # => {"foo"=>"bar", "baz"=>"quux"} (https://eval.in/382199)
[03:07:21] bnagy: augh syntax
[03:07:43] ght: Very nice, thank you.
[03:07:43] bnagy: too much !ruby
[03:07:58] ajaiswal: al2o3-cr: hmm.. so the output which i'm expecting is totalcount/successtest
[03:08:07] zenguy_pc: has joined #ruby
[03:08:48] al2o3-cr: ajaiswal: just do successtest += 1 instead of suc = successtest += 1
[03:09:29] al2o3-cr: then change suc to sucesstest
[03:09:51] ajaiswal: al2o3-cr: yep. i did that too.. its still returning 38/01
[03:10:33] al2o3-cr: then you system command isn't right
[03:11:52] ght: Hmm, that hash statement doesn't seem to be altering anything.
[03:11:56] braincrash: has joined #ruby
[03:11:56] zenguy_pc: has joined #ruby
[03:12:03] ght: Should I be assigning a variable to that Hash[strs.map statement?
[03:13:03] bnagy: probably?
[03:13:13] bnagy: or using it immediately
[03:13:32] al2o3-cr: Ox0dea: to_h, pfft..
[03:13:41] ght: Yup, that did it.
[03:13:43] charliesome: has joined #ruby
[03:14:02] bnagy: if you're using each as you're iterating something else then it might actually be easier just to fill an existing hash
[03:14:19] ght: Awesome work, thank you Ox0dea
[03:14:25] bnagy: basically map and create a hash OR each and add to an existing one
[03:14:26] bgmarx: has joined #ruby
[03:14:26] Ox0dea: ght: Happy to help.
[03:14:37] Ox0dea: 19>> [[1, 2], [3, 4]].to_h
[03:14:37] ruboto: Ox0dea # => undefined method `to_h' for [[1, 2], [3, 4]]:Array (NoMethodError) ...check link for more (https://eval.in/382200)
[03:14:40] Ox0dea: al2o3-cr: ^
[03:17:36] gr33n7007h: has joined #ruby
[03:18:37] gr33n7007h: ajaiswal: it's 4 o'clock here :(
[03:18:38] ZOMGITSABEAR: has joined #ruby
[03:18:42] michael_mbp: has joined #ruby
[03:19:53] ZOMGITSABEAR: i'm interested in persuing a career in system administration
[03:20:27] ZOMGITSABEAR: and for that, i've read that i need to know ruby pretty well
[03:20:32] shock_one: has joined #ruby
[03:20:42] al2o3-cr: ajaiswal: put your counter out of the loop
[03:20:46] Ox0dea: ZOMGITSABEAR: We are here to teach you everything you need to know.
[03:20:56] ajaiswal: al2o3-cr: ok
[03:21:08] RickHull: including the spelling of "pursue" xD
[03:21:10] ZOMGITSABEAR: so to a person that has no experience in programming, how do i get started?
[03:21:16] Ox0dea: ajaiswal: `cat *.xml | grep -c 'failures="0"'` will give you the number of failures, and `ls *.xml | wc -l` will give you the total.
[03:21:20] Ox0dea: Use the right tool for the job.
[03:21:26] RickHull: ZOMGITSABEAR: http://pine.fm/ is a good start
[03:21:38] RickHull: oops, wrong link
[03:21:41] ZOMGITSABEAR: also i was wondering
[03:21:45] ZOMGITSABEAR: what all can i do with ruby
[03:21:49] ZOMGITSABEAR: once i learn it
[03:21:51] Ox0dea: Almost nothing.
[03:21:56] RickHull: https://pine.fm/LearnToProgram/
[03:21:59] dopie: has joined #ruby
[03:21:59] RickHull: and everything, all at once
[03:22:16] RickHull: ruby is turing complete
[03:22:27] RickHull: meaning any computation can be expressed in ruby
[03:22:48] RickHull: meaning there are no limits to what you can compute with ruby
[03:22:57] RickHull: aside from the limits of computation
[03:23:05] ZOMGITSABEAR: so i can create IRC bots in ruby if i wanted to
[03:23:07] ajaiswal: Ox0dea: i will use linux command..
[03:23:13] Ox0dea: ajaiswal: It just makes sense in this case.
[03:23:13] RickHull: ZOMGITSABEAR: indeed
[03:23:30] al2o3-cr: ajaiswal: don't need to
[03:23:40] bnagy: Ox0dea: the logic is the inverse of that though
[03:23:52] balazs: has joined #ruby
[03:23:53] Ox0dea: grep has -v.
[03:23:57] RickHull: ZOMGITSABEAR: the best way to learn a language is to start with a project -- a problem that needs solving
[03:23:58] darkf: has joined #ruby
[03:24:33] rkazak: has joined #ruby
[03:24:36] bnagy: I agree that it's better to have one line of shell than 17 lines of rubyperl though
[03:25:08] al2o3-cr: he might of wanted to learn ruby though?
[03:25:14] Ox0dea: > might of
[03:25:49] sharpmachine: has joined #ruby
[03:25:59] ajaiswal: yeah.. i would love to get it done through ruby.. but its just taking lot of time to get me working..
[03:26:16] Ox0dea: ajaiswal: If that's the case, why are you shelling out to grep?
[03:26:17] bnagy: ajaiswal: that's because you don't really understand what you're doing
[03:26:25] nobitanobi: has joined #ruby
[03:26:34] Spami: has joined #ruby
[03:26:35] Ox0dea: Ruby in 2015 is the PHP of 2005. :(
[03:26:36] bnagy: it would be easier if you wrote the code yourself, step by step
[03:26:51] ajaiswal: i would rather start small,rather then jumping directly in
[03:26:54] Ox0dea: "How did this happen? Who's to blame?"
[03:27:04] al2o3-cr: ACTION hides
[03:27:50] ajaiswal: Ox0dea: al2o3-cr bnagy thanks for the supports..
[03:28:41] al2o3-cr: ajaiswal: lets go through this in baby steps
[03:29:16] Ox0dea: Dir['*.xml'].partition { |f| File.read(f)[/failures="0"/] }.map(&:size)
[03:29:19] dopieee: has joined #ruby
[03:29:32] Ox0dea: ajaiswal: That's an "idiomatic" way to do it with pure Ruby.
[03:29:43] Ox0dea: It returns a two-element array containing the number of successes and failures, respectively.
[03:29:46] ZOMGITSABEAR: sorry, had to go do something
[03:29:51] ZOMGITSABEAR: what kind of problem?
[03:29:52] al2o3-cr: Ox0dea: did i say baby steps
[03:30:01] Ox0dea: al2o3-cr: I must've missed that part.
[03:30:43] bnagy: I want to hate it but it's not even bad. None of it is obscure ruby.
[03:30:56] bnagy: unlike $? :P
[03:31:13] Ox0dea: bnagy: I mean, at least it mirrors the shell variable?
[03:31:17] ruboto: al2o3-cr # => 10 (https://eval.in/382209)
[03:31:20] someword: has joined #ruby
[03:31:36] bnagy: Ox0dea: and yet it doesn't! Because it returns some done class instead of an int
[03:31:43] Ox0dea: Fair enough.
[03:32:01] krz: has joined #ruby
[03:32:27] ozzloy: has joined #ruby
[03:33:08] yeticry: has joined #ruby
[03:34:03] pontiki: it's analogous
[03:34:05] pontiki: not the same as
[03:34:28] ducklobster: has joined #ruby
[03:35:03] bnagy: I think the premise of "not bad because similar to a shell variable" is deeply flawed
[03:35:04] ZOMGITSABEAR: ruby's current stable is 2.2.2
[03:35:09] ZOMGITSABEAR: the tutorial is in 2.1.2
[03:35:14] Ox0dea: bnagy: Are you a Windows user?
[03:35:15] ZOMGITSABEAR: safe to download 2.2.2?
[03:35:19] Ox0dea: ZOMGITSABEAR: Use trunk.
[03:35:44] pontiki: yes, it's save to use the stable
[03:35:59] Ox0dea: It's also safe to use trunk. :)
[03:36:08] ZOMGITSABEAR: what is trunk?
[03:36:14] bnagy: Ox0dea: only for finding bugs on
[03:36:34] al2o3-cr: so 1.8 isn't the shizzle?
[03:36:47] pontiki: fo shizzle on yo mizzle
[03:37:14] al2o3-cr: pontiki: muzzle?
[03:37:29] pontiki: ACTION shuts up
[03:37:35] ZOMGITSABEAR: also, would it be useful to learn how to compile .exes?
[03:37:38] Ox0dea: bnagy: Have you ever passed arguments to a visibility modifier?
[03:38:09] bnagy: are we playing drinking games now?
[03:38:34] bruno-: has joined #ruby
[03:38:42] haxrbyte: has joined #ruby
[03:38:54] al2o3-cr: bnagy: i'll go first :)
[03:42:06] jcaho: has joined #ruby
[03:42:22] AlexRussia: has joined #ruby
[03:42:42] michael_mbp: has joined #ruby
[03:44:10] Casty: has joined #ruby
[03:44:45] bkxd: has joined #ruby
[03:44:53] shevy: drinking games
[03:44:58] shevy: you pass me the drinks
[03:44:59] shevy: and I drink!
[03:45:53] arup_r: has joined #ruby
[03:46:56] bnagy: suits me, I overdid it this weekend anyway :(
[03:47:02] bnagy: plus it's like 11am
[03:47:03] gix: has joined #ruby
[03:47:14] nobitanobi: has joined #ruby
[03:47:35] dylanhart: has joined #ruby
[03:48:47] Ox0dea: Sometimes it's not five o'clock anywhere.
[03:48:50] pepperbreath: has joined #ruby
[03:48:51] RegulationD: has joined #ruby
[03:49:22] al2o3-cr: >> [(class G; end; g = G.new; g.singleton_class), method(:inspect).owner]
[03:49:23] ruboto: al2o3-cr # => [#<Class:#<G:0x40923b88>>, #<Class:#<Object:0x4094ee3c>>] (https://eval.in/382210)
[03:49:37] Ox0dea: al2o3-cr: What are you on about?
[03:49:40] al2o3-cr: can anyone explain that to me?
[03:49:42] krisquigley: has joined #ruby
[03:49:47] attlasbot: has joined #ruby
[03:49:52] Ox0dea: You expected them to be the same?
[03:50:51] Ox0dea: To what purpose did you include main's singleton class?
[03:50:59] workmad3: has joined #ruby
[03:51:28] al2o3-cr: just want to know ?
[03:51:59] al2o3-cr: Ox0dea: you know?
[03:52:14] Ox0dea: I understand Ruby's object model, if that's what you're asking.
[03:52:30] al2o3-cr: please elaborate?
[03:52:59] Ox0dea: Let me think of a particularly illustrative example.
[03:53:06] Aeyrix: Is there a way to initiate TLS on an already established socket?
[03:53:27] Ox0dea: Aeyrix: That's askin' for trouble, innit?
[03:53:32] Aeyrix: Absolutely not.
[03:54:00] drewo: has joined #ruby
[03:54:11] dopieee: has joined #ruby
[03:54:59] kies: has joined #ruby
[03:55:27] Ox0dea: >> x = 'foo'; def x.bar; :baz end; x.bar
[03:55:28] ruboto: Ox0dea # => :baz (https://eval.in/382211)
[03:55:30] Ox0dea: >> x = 'foo'; class << x; def bar; :baz end end; x.bar
[03:55:31] bnagy: Aeyrix: as a client or a server?
[03:55:31] ruboto: Ox0dea # => :baz (https://eval.in/382212)
[03:55:37] Aeyrix: bnagy: client
[03:55:50] Ox0dea: al2o3-cr: Defining a method on an object's singleton class defines the method for that object and that object alone.
[03:56:05] jcaho: has joined #ruby
[03:56:22] bnagy: Aeyrix: ugh.. don't know offhand, but you should be able to use the same approach
[03:56:37] bnagy: http://stackoverflow.com/questions/10262676/add-ssl-to-a-connection
[03:56:38] Aeyrix: bnagy: pls explain process
[03:56:43] torpig: has joined #ruby
[03:56:43] Aeyrix: thanks dawg
[03:57:00] bnagy: the trick is the start_immediately = false
[03:57:19] drocsid: has joined #ruby
[03:58:03] al2o3-cr: Ox0dea: how did you learn rubyso well?
[03:58:20] Ox0dea: The magic of literacy, dear friend.
[03:59:11] djbkd: has joined #ruby
[03:59:12] al2o3-cr: Ox0dea: you must be older than ruby itself to learn that
[03:59:20] Ox0dea: Ruby's only twenty?
[03:59:53] al2o3-cr: wow, quick typer
[04:01:12] al2o3-cr: Ox0dea: sure you're not a bot?
[04:01:18] Ox0dea: No, I'm not sure I'm not a bot.
[04:01:57] shevy: ACTION has doubts
[04:02:05] al2o3-cr: Ox0dea: compute 45 << 2
[04:02:26] Ox0dea: It's multiplication!
[04:03:02] al2o3-cr: Ox0dea: 345**34
[04:03:24] Ox0dea: For what it's worth, I'm not convinced any of us isn't a bot.
[04:03:49] al2o3-cr: how did the bot say that?
[04:03:57] Ox0dea: NLTK is good.
[04:03:58] mike___1234: has joined #ruby
[04:04:25] al2o3-cr: got some random quotes too :)
[04:06:07] al2o3-cr: dta my friends
[04:06:09] zotherstupidguy: has joined #ruby
[04:07:25] ajaiswal: Ox0dea: its returning 28 and 10.. i got that 28 got matched, so what the other 10. ?
[04:07:31] Ox0dea: ajaiswal: Guess.
[04:07:42] ZOMGITSABEAR: if you're all bots
[04:07:42] Scroff: has joined #ruby
[04:07:47] pepperbreath1: has joined #ruby
[04:07:49] ZOMGITSABEAR: then how do i know that i'm not a bot
[04:07:58] ZOMGITSABEAR: keanuwoah.jpg
[04:08:00] al2o3-cr: ZOMGITSABEAR: you don't
[04:08:02] Ox0dea: /ignore add ZOMGITSABEAR
[04:08:18] ajaiswal: Ox0dea: i guess the inverse one ?
[04:08:39] Ox0dea: ajaiswal: It's the ones that didn't match 'failures="0"'.
[04:09:35] ajaiswal: Ox0dea: yep.. just got that..
[04:09:41] Aeyrix: bnagy: Worked it out, I think.
[04:09:44] Aeyrix: Seems easy, actually.
[04:09:50] Ox0dea: Aeyrix: We should race.
[04:09:52] Aeyrix: OpenSSL::SSL::SSLSocket.new takes an IO object.
[04:10:01] Aeyrix: ... such as Socket::TCPSocket
[04:10:07] Aeyrix: Ox0dea: Race what?
[04:10:14] Ox0dea: You're a pretty speedy typist.
[04:10:29] Ox0dea: "There's punctuation and everything!"
[04:10:31] Aeyrix: I use speech to text. :x
[04:10:39] Aeyrix: Everything I type is words out of my mouth.
[04:10:52] Aeyrix: I have a mechanical microphone using Cherry MX cones.
[04:11:01] Ox0dea: Delicious.
[04:11:11] Aeyrix: shevy: Did I stutter?
[04:11:14] Ox0dea: Did he stutter?
[04:11:31] Ox0dea: >03 mechanical microphone
[04:11:32] shevy: he types like John Cleese speaks
[04:11:41] Ox0dea: It's so good.
[04:12:04] al2o3-cr: hey, nothing wrong with a bit of cheese
[04:12:04] bnagy: Aeyrix: cool.
[04:12:18] Aeyrix: bnagy: I'm actually surprised that was that easy to be honest. :v
[04:12:18] bnagy: going down to Socket means you can't use a Context I think
[04:12:28] Aeyrix: bnagy: Come again?
[04:12:29] bnagy: which can be annoying depending what you're doing
[04:12:31] Aeyrix: I was asking for a friend, literally.
[04:12:38] Aeyrix: So if you could explain the side effects that'd be great.
[04:12:39] bgmarx: has joined #ruby
[04:12:57] bnagy: well there's an openssl thing called a Context which has assorted ssl options and config
[04:13:04] bnagy: as a client you probably don't need it
[04:13:09] theery: has joined #ruby
[04:13:18] Aeyrix: It's still an OpenSSL-wrapped object.
[04:13:25] bnagy: might want to check that verification and such is set correctly though
[04:14:08] bnagy: like you have to have a ctx internally somewhere, but I'm guessing you get one with default options
[04:14:28] bnagy: long story short, should be fine, on current ruby
[04:14:39] bnagy: they underped some options at some point
[04:14:41] ledestin: has joined #ruby
[04:15:19] Aeyrix: bnagy: https://gist.githubusercontent.com/anonymous/a06f8f2a33f84009be5c/raw/316a327f4f0731b9d9718b753ba88c04f6334f74/gistfile1.txt
[04:15:35] Aeyrix: You can pass ctx though.
[04:16:27] braincra-: has joined #ruby
[04:17:18] Rollabunna: has joined #ruby
[04:17:24] bnagy: ahhh there. OK. :)
[04:18:34] CloCkWeRX: has joined #ruby
[04:20:44] chette: has joined #ruby
[04:22:06] shevy: we here on #ruby are the most cheerful crowd
[04:22:43] al2o3-cr: we're the bomb!!!
[04:22:59] ylla: has joined #ruby
[04:23:15] bnagy: watchlist
[04:23:17] al2o3-cr: gotta go 5:22 zzzzzzzzz
[04:24:02] RickHull: al2o3-cr: i'm sorry we can't let you leave at this time. we require clarification regarding your statement about bomb possession
[04:24:51] RickHull: yes you are being detained; no you are not under arrest; no you do not have the right to consult with legal counsel
[04:25:07] al2o3-cr: bomb in my country means bail
[04:25:35] al2o3-cr: and bail mean trev
[04:25:43] al2o3-cr: work that one out
[04:26:14] phat4life: bomb means dank, or awesome
[04:26:31] balazs: has joined #ruby
[04:26:31] phat4life: often used with ass: bomb ass chicken wings
[04:26:39] Aeyrix: ass-chicken
[04:27:16] al2o3-cr: phat4life: don't mention chicken at this time in the morning :(
[04:27:32] phat4life: Aeyrix: yeah don't use a hyphen
[04:27:39] RickHull: al2o3-cr: what do your roosters say?
[04:27:49] RickHull: cock-a-doodle-doo?
[04:28:09] cirn0: has joined #ruby
[04:28:14] havenwood: this would be on-topic in #ruby-offtopic
[04:28:30] al2o3-cr: RickHull: Sriracha
[04:28:42] RickHull: havenwood: you're diminishing our cheer content
[04:29:00] tds5016: has joined #ruby
[04:29:15] Aeyrix: havenwood: I thought the general rule was "its okay if it isn't infringing on someone getting help"?
[04:29:19] Aeyrix: I mean, that's what two other ops told me.
[04:29:26] Aeyrix: Please clarify.
[04:29:44] RickHull: can we get a ruling here?
[04:29:47] al2o3-cr: why don't we all go to offtopic?
[04:30:19] havenwood: It's on-topic in offtopic. I'm not calling it against the rules.
[04:30:33] havenwood: Just looking to get some folk there. ;)
[04:30:38] gambl0r3: has joined #ruby
[04:30:44] skade: has joined #ruby
[04:30:53] tkuchiki: has joined #ruby
[04:30:59] RickHull: that's how I understood it. noting the better locus without shutting down the current locus
[04:31:03] tds5016: Speaking of people who need help :-). I have a rails project that has gems that have css...
[04:31:04] dgutierrez1287: has joined #ruby
[04:31:06] Ox0dea: Discussing offtopic is off-topic.
[04:31:12] tds5016: I want to switch to using grunt over asset pipeline....
[04:31:13] Aeyrix: tds5016: #RubyOnRails :>
[04:31:22] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[04:31:24] tds5016: is there a way to get access to those files in grunt that anyone knows of?
[04:31:27] Aeyrix: Only because #ruby contains a lot of people that don't use Rails.
[04:31:27] tds5016: oh :-/. okay.
[04:31:29] JoshGlzBrk: has joined #ruby
[04:31:38] RickHull: yup, sriracha is fine. but rails, whoah no
[04:31:40] Aeyrix: So #ror is way better in terms of quality of help
[04:31:47] Aeyrix: RickHull: It's a quality-of-assistance thing.
[04:31:55] tds5016: no worries. Thanks much.
[04:31:56] RickHull: i know, i'm being silly
[04:32:00] al2o3-cr: RickHull: which one?
[04:32:01] phat4life: tds5016: i can help maybe
[04:32:05] tds5016: I like ruby, but hate rails to be honest... lol. so there's that.
[04:32:14] datanoise: has joined #ruby
[04:32:21] RickHull: tds5016: cool, hang out here. but also get rails help in #ror
[04:32:45] tds5016: phat4life: okay, I have a few gems (select2, etc.) that provide CSS/SASS files.
[04:33:05] phat4life: ah never mind cant help
[04:33:10] phat4life: we use webpack
[04:33:10] tds5016: I have grunt currently compiling all my sass.
[04:33:11] al2o3-cr: RickHull: rooster/flying goose?
[04:33:29] RickHull: al2o3-cr: sorry, what?
[04:33:36] tds5016: lol. I've been using browserify :-) but I support the use of web pack as well :-)
[04:33:45] al2o3-cr: RickHull: rooster/flying goose?
[04:33:58] RickHull: al2o3-cr: yeah, still not sure what you're getting at
[04:34:07] phat4life: we have a rails backend, webpack react.js front end, the rest is a ruby mess
[04:34:37] RickHull: al2o3-cr: my rooster comment was poking fun at the absurdity of having a bad association with chickens and morning time
[04:34:54] dopieee: has joined #ruby
[04:34:55] RickHull: geese and ducks, fair game i suppose
[04:35:01] al2o3-cr: RickHull: i know, don't worry
[04:35:18] skysploit: has joined #ruby
[04:35:18] skysploit: has joined #ruby
[04:35:51] rbowlby: has joined #ruby
[04:36:21] RickHull: what is al2o3-cr anyway? chromium aluminum oxide?
[04:36:41] Scripore: has joined #ruby
[04:36:56] al2o3-cr: RickHull: shhh...
[04:36:59] RickHull: from my cycling experience, al is popular, as is CrMo
[04:37:23] RickHull: al2o3-cr: you know about the dangers of DHMO?
[04:37:39] RickHull: be careful, it's a scary world out there
[04:37:59] Ox0dea: I know people who literally drink the stuff!
[04:38:16] al2o3-cr: RickHull: nothing bothers me, nor should it bother others
[04:38:17] RickHull: that stuff will kill you, literally
[04:38:19] tds5016: phat4life: nice. I'm in the process of getting us over to backbone.
[04:38:25] luckyme: has joined #ruby
[04:38:58] RickHull: Ox0dea: i bet they don't inhale it or inject it, do they?
[04:39:03] [k-: has joined #ruby
[04:39:09] tds5016: for the front-end. everything 1/3 of the site is ROR server-side rendered. lol. Once I get the models working with backbone I think I'm going to be trying to get over to react for the views and just using backbone models.
[04:39:26] al2o3-cr: ruby == al2o3-cr
[04:39:32] RickHull: oh shit, right
[04:39:58] RickHull: ACTION presents noggin for impact with cluestick
[04:40:31] tds5016: has left #ruby: ()
[04:40:32] j4cknewt: has joined #ruby
[04:41:58] Oog: has joined #ruby
[04:43:17] RickHull: /o\ # could've been worse
[04:44:49] gambl0re: has joined #ruby
[04:46:33] Ox0dea: Pop quiz! Which uses more memory, the whole Gem module or the main thread?
[04:47:20] Oog: has joined #ruby
[04:47:31] shevy: the more gems the slower ruby will be
[04:47:59] RickHull: what is the main thread doing?
[04:48:08] al2o3-cr: RickHull: everyting
[04:48:23] spider-mario: has joined #ruby
[04:48:35] RickHull: then clearly it is the answer
[04:48:41] RickHull: everything > anything
[04:48:50] vdamewood: has joined #ruby
[04:49:29] al2o3-cr: anything < everything
[04:49:41] Ox0dea: >> require 'objspace'; (os=ObjectSpace).each_object.sort_by { |o| os.memsize_of o }.last(2)
[04:49:42] ruboto: Ox0dea # => [<RubyVM::InstructionSequence:<class:Specification>@/execpad/interpreters/ruby-2.2.0/lib/ruby/2.2.0/ ...check link for more (https://eval.in/382225)
[04:49:43] freerobby1: has joined #ruby
[04:49:50] Ox0dea: ruboto: Spoiler alert, mate!
[04:51:17] Ox0dea: Interesting. The second-last is Gem on my machine, but it's Gem::Specification on Charlie's server.
[04:51:41] Ox0dea: What does that mean?
[04:52:53] Ox0dea: >> require 'objspace'; (os=ObjectSpace).each_object.sort_by { |o| os.memsize_of o }.last(2).map { |o| os.memsize_of o }
[04:52:54] minmax: has joined #ruby
[04:52:55] ruboto: Ox0dea # => [27952, 525104] (https://eval.in/382231)
[04:53:29] Ox0dea: Ruby threads are so heavy. :(
[04:53:32] bb010g: has joined #ruby
[04:53:32] chette: how do I use irb without starting an irb session?
[04:53:41] Ox0dea: chette: That's not what you mean.
[04:53:49] Ox0dea: ruby -e 'ruby goes here'
[04:53:56] shevy: how do I start a car without an engine
[04:54:48] shevy: both ruby and irb.rb have help menus btw; ruby --help; irb.rb --help like --noprompt
[04:55:01] jenrzzz: has joined #ruby
[04:55:05] chette: I suppose I mean to ask what's the best method for running irb concurrently with another ruby program program
[04:55:14] freerobby: has joined #ruby
[04:55:30] chette: so that my main program isn't being prompted with the prompt
[04:55:44] Ox0dea: chette: Are you fine with shelling out?
[04:56:05] chette: currently I have a method that implements a server
[04:56:09] chette: and a client
[04:56:28] chette: but I want a cleaner way
[04:56:45] Ox0dea: You'll probably want Open3, then.
[04:57:43] lavros: has joined #ruby
[04:57:50] yfeldblum: has joined #ruby
[04:59:18] simplyianm: has joined #ruby
[04:59:36] Hanmac: has joined #ruby
[04:59:57] A205B064: has joined #ruby
[04:59:58] rkazak: has joined #ruby
[05:01:21] chette: thanks dea
[05:01:35] Oog: has joined #ruby
[05:08:45] revath: has joined #ruby
[05:09:41] Guest60: has joined #ruby
[05:09:49] rkazak: has left #ruby: ()
[05:09:53] Guest50: has joined #ruby
[05:10:22] neanderslob: has joined #ruby
[05:12:38] rbowlby: has joined #ruby
[05:13:34] krz: has joined #ruby
[05:13:49] shock_one: has joined #ruby
[05:15:14] bkxd: has joined #ruby
[05:23:57] mleung: has joined #ruby
[05:24:19] Axsuul: has joined #ruby
[05:24:52] chette: has left #ruby: ()
[05:26:54] bronson: has joined #ruby
[05:28:14] shevy: flughafen! ready for take-off?
[05:28:42] flughafen: sup havenwood shevy
[05:30:26] flughafen: i'm not ready for anything
[05:32:45] wldcordeiro_: has joined #ruby
[05:33:38] pepperbreath1: has left #ruby: ()
[05:33:46] Ox0dea: havenwood: What should private(:foo, :bar) return?
[05:34:15] tkuchiki: has joined #ruby
[05:34:23] havenwood: Ox0dea: hem
[05:34:44] rht: has joined #ruby
[05:35:01] Ox0dea: I'm think 0 and 2+ should just return the module as they do now.
[05:35:01] ruboto: al2o3-cr # => :foo (https://eval.in/382256)
[05:35:40] lxsameer: has joined #ruby
[05:35:55] allomov: has joined #ruby
[05:35:55] havenwood: Ox0dea: but then it seems consistent to just always do that
[05:36:45] Ox0dea: I'm modifying it to permit decoration of methods with explicit visibility.
[05:36:47] datanoise: has joined #ruby
[05:36:51] mleung: has joined #ruby
[05:37:42] RegulationD: has joined #ruby
[05:38:00] Ox0dea: At least, I'll be running the idea by the issue tracker.
[05:38:11] Ox0dea: >> def decorate m; "decorated #{m}" end; decorate private def foo; end
[05:38:12] ruboto: Ox0dea # => "decorated Object" (https://eval.in/382257)
[05:38:19] Ox0dea: That's a surprising result in my opinion.
[05:38:35] krisquigley: has joined #ruby
[05:38:39] towski_: has joined #ruby
[05:38:42] tagrudev: has joined #ruby
[05:39:14] al2o3-cr: Ox0dea: why is that surprising?
[05:39:33] Ox0dea: >> def decorate m; "decorated #{m}" end; decorate def foo; end
[05:39:34] ruboto: Ox0dea # => "decorated foo" (https://eval.in/382260)
[05:39:36] Ox0dea: Because that isn't.
[05:39:47] workmad3: has joined #ruby
[05:39:48] al2o3-cr: Ox0dea: it's private
[05:40:52] Ox0dea: The "subject" of an explicit visibility modification should be the method whose visibility is being modified.
[05:40:57] havenwood: Ox0dea: Then you could waffle on which you wanted: private public private def foo
[05:41:00] al2o3-cr: >> def decorate m; "decorated #{m}" end; decorate public def foo; end
[05:41:01] ruboto: al2o3-cr # => "decorated Object" (https://eval.in/382261)
[05:41:35] Ox0dea: havenwood: Aye, Ruby gives us the power to be very silly.
[05:42:35] Ox0dea: That is not, in my opinion, a point against extending the language's expressiveness.
[05:43:06] Musashi007: has joined #ruby
[05:43:35] revath: has joined #ruby
[05:43:41] shevy: havenwood haha I also used a similar statement above
[05:44:07] swgillespie: has joined #ruby
[05:44:24] al2o3-cr: some ruby voodoo
[05:44:28] shevy: krowv any progress with ruby-gtk?
[05:44:45] shevy: private public private monster <T> def foo # :nodoc
[05:45:17] al2o3-cr: mysteria lane :)
[05:46:38] pragmatism: has joined #ruby
[05:47:15] Ox0dea: shevy: The best bit? That's not a syntax error.
[05:48:10] Ox0dea: >> T, monster = 0, 0; def false.>(_) _ end; private public private monster <T> def foo; end
[05:48:11] ruboto: Ox0dea # => Object is not a symbol nor a string (TypeError) ...check link for more (https://eval.in/382266)
[05:49:03] gianlucadv: has joined #ruby
[05:51:10] shevy: I used to think that hanmac is crazy
[05:51:15] shevy: but you are even crazier than hanmac
[05:51:22] Ox0dea: What makes hanmac crazy?
[05:51:31] shevy: you seem to not know him!
[05:51:35] Ox0dea: Indeed I do not.
[05:51:45] shevy: hanmac, please explain to Ox0dea why you are considered to be crazy
[05:51:54] al2o3-cr: hanmac: is the one!
[05:51:57] shevy: I have to leave in 9 minutes, then it's 08:00
[05:53:21] revath: has joined #ruby
[05:53:51] riotjones: has joined #ruby
[05:54:06] edwinvdg_: has joined #ruby
[05:55:41] Ox0dea: shevy: The guy seems to have a thorough understanding of Ruby's string methods.
[05:55:44] Ox0dea: Why is that crazy?
[05:57:31] al2o3-cr: >> private.extend(Math); public.send :sin, (666) # exercise those demons
[05:57:32] ruboto: al2o3-cr # => -0.01764164581327013 (https://eval.in/382277)
[05:57:53] joaomdmoura: has joined #ruby
[05:59:30] zivix: has joined #ruby
[05:59:45] Ox0dea: al2o3-cr: Why the verbosity? As it stands, private and public are essentially just synonyms for self.
[06:00:03] A124: has joined #ruby
[06:00:11] al2o3-cr: you don't have to tell me
[06:00:25] Ox0dea: The question remains.
[06:00:43] al2o3-cr: verbosity my second name
[06:01:26] sinkensabe: has joined #ruby
[06:02:08] shock_one: has joined #ruby
[06:02:23] masone: has joined #ruby
[06:03:00] patrickanth0ny: has joined #ruby
[06:03:26] revath: has joined #ruby
[06:03:55] al2o3-cr: >> [*1..49].sample(6).sort # lucky lotto numbers
[06:03:56] ruboto: al2o3-cr # => [9, 10, 34, 40, 42, 47] (https://eval.in/382290)
[06:04:50] roolo: has joined #ruby
[06:05:00] segfalt: has joined #ruby
[06:07:05] emilkarl: has joined #ruby
[06:07:50] codecop: has joined #ruby
[06:08:29] Notte: has joined #ruby
[06:08:36] sigurding: has joined #ruby
[06:08:42] mister_solo: has joined #ruby
[06:09:58] chinmay_dd: has joined #ruby
[06:10:47] emilkarl: has joined #ruby
[06:11:28] last_staff: has joined #ruby
[06:12:00] bkxd: has joined #ruby
[06:14:14] michael_mbp: has joined #ruby
[06:14:44] keen_________: has joined #ruby
[06:16:20] sandstrom: has joined #ruby
[06:18:10] Rollabunna: has joined #ruby
[06:19:36] blue_deref: has joined #ruby
[06:21:35] solars: has joined #ruby
[06:22:08] andikr: has joined #ruby
[06:24:29] Mon_Ouie: has joined #ruby
[06:25:10] ramfjord: has joined #ruby
[06:25:30] solars: has joined #ruby
[06:25:56] aganov: has joined #ruby
[06:26:48] acke: has joined #ruby
[06:28:05] bruno-: has joined #ruby
[06:29:48] wildroman2: has joined #ruby
[06:30:12] mister_solo: has joined #ruby
[06:30:28] wallerdev: has joined #ruby
[06:33:19] kies: has joined #ruby
[06:37:37] Stan: has joined #ruby
[06:42:08] Xeago: has joined #ruby
[06:42:53] lxsameer: has joined #ruby
[06:45:09] konsolebox: has joined #ruby
[06:46:17] Musashi007: has joined #ruby
[06:52:44] fabrice31: has joined #ruby
[06:52:54] Oog: has joined #ruby
[06:53:18] rdark: has joined #ruby
[06:55:16] musgravejw: has joined #ruby
[06:56:23] iamninja: has joined #ruby
[06:56:26] ndrei: has joined #ruby
[06:59:44] Oog: has joined #ruby
[06:59:52] klaas: has joined #ruby
[07:00:22] michaeldeol: has joined #ruby
[07:00:52] lavros: has joined #ruby
[07:01:19] strixd: has joined #ruby
[07:02:07] fabrice31: has joined #ruby
[07:03:44] pyon: has joined #ruby
[07:03:59] theog: has joined #ruby
[07:04:38] Guest98438: has joined #ruby
[07:05:20] pyon: has joined #ruby
[07:05:56] hubcaps: has joined #ruby
[07:07:56] k3asd`: has joined #ruby
[07:09:58] systemd0wn: has joined #ruby
[07:12:47] revath: has joined #ruby
[07:13:42] haxrbyte: has joined #ruby
[07:14:15] haxrbyte_: has joined #ruby
[07:15:11] haxrbyte_: has joined #ruby
[07:19:21] stardiviner: has joined #ruby
[07:20:24] alex88: has joined #ruby
[07:20:59] troulouliou_dev: has joined #ruby
[07:21:46] RickHull: has left #ruby: ()
[07:22:34] mister_solo: has joined #ruby
[07:22:37] msgodf: has joined #ruby
[07:23:17] duderonomy: has joined #ruby
[07:25:06] al2o3-cr: how ya doin certainty ?
[07:25:25] lavros: has joined #ruby
[07:25:42] certainty: al2o3-cr: alright, starting the day
[07:25:51] pppt: has joined #ruby
[07:26:07] al2o3-cr: i'm dropping sleep ay keyboard here :(
[07:26:39] RegulationD: has joined #ruby
[07:26:51] vdamewood: has joined #ruby
[07:27:10] livathinos: has joined #ruby
[07:27:38] krisquigley: has joined #ruby
[07:27:44] edwinvdgraaf: has joined #ruby
[07:28:01] drewo: has joined #ruby
[07:28:33] workmad3: has joined #ruby
[07:28:50] al2o3-cr: i'll see you around like a walnut, i'm working on remote control and out on my legs
[07:30:15] Forgetful_Lion: has joined #ruby
[07:30:17] fabrice31_: has joined #ruby
[07:31:03] antgel: has joined #ruby
[07:31:16] dgutierrez1287: has joined #ruby
[07:32:53] datanoise: has joined #ruby
[07:33:44] fabrice31: has joined #ruby
[07:33:51] sandstrom: has joined #ruby
[07:33:51] vinleod: has joined #ruby
[07:35:43] Hounddog: has joined #ruby
[07:36:11] tkuchiki: has joined #ruby
[07:38:47] Oog: has joined #ruby
[07:39:09] torpig: has joined #ruby
[07:39:35] yorickpeterse: morning children
[07:40:05] dhjondoh: has joined #ruby
[07:40:07] ZOMGITSABEAR: morning stranger
[07:40:22] doerteDev: has joined #ruby
[07:40:45] Hounddog: has joined #ruby
[07:42:37] fabrice31_: has joined #ruby
[07:44:41] futilegames: has joined #ruby
[07:44:53] Macaveli: has joined #ruby
[07:45:25] Ox0dea: yorickpeterse: How do you feel about visibility modifiers returning their argument if called with just the one?
[07:46:26] bkxd: has joined #ruby
[07:46:26] micmus: has joined #ruby
[07:47:32] michaeldeol: has joined #ruby
[07:47:42] lkba: has joined #ruby
[07:48:50] pwnz0r: has joined #ruby
[07:50:43] livcd: what should i use for manipulating the DB in Ruby ? The dbi or is there some alternative ?
[07:51:11] Scroff: has joined #ruby
[07:51:36] maloik: the Sequel gem is pretty popular
[07:52:02] adac: has joined #ruby
[07:52:47] langlands: has joined #ruby
[07:53:27] livcd: maloik: thanks
[07:54:03] fabrice31: has joined #ruby
[07:57:01] tomphp: has joined #ruby
[07:57:03] Pupeno: has joined #ruby
[07:57:03] Pupeno: has joined #ruby
[07:58:49] bruno-: has joined #ruby
[07:59:44] senayar: has joined #ruby
[07:59:44] senayar: has joined #ruby
[08:01:56] joonty: has joined #ruby
[08:02:24] krisquigley: has joined #ruby
[08:02:56] anisha: has joined #ruby
[08:03:42] DEA7TH: has joined #ruby
[08:04:01] valkyrka: has joined #ruby
[08:04:15] dumdedum: has joined #ruby
[08:04:24] tesuji: has joined #ruby
[08:04:49] pwnz0r: has joined #ruby
[08:05:44] tedstriker: has joined #ruby
[08:06:52] intinig: has joined #ruby
[08:07:00] fabrice31: has joined #ruby
[08:07:28] alem0lars__: has joined #ruby
[08:10:11] tcarter1719: has joined #ruby
[08:11:02] denver: has joined #ruby
[08:11:53] haxrbyte: has joined #ruby
[08:12:15] gianlucadv: has joined #ruby
[08:12:22] psye: has joined #ruby
[08:12:33] haxrbyte_: has joined #ruby
[08:14:32] chinmay_dd: has joined #ruby
[08:14:50] kith_: has joined #ruby
[08:15:15] cowcow: has joined #ruby
[08:16:50] bronson: has joined #ruby
[08:17:48] RazorX: has joined #ruby
[08:17:51] haxrbyte: has joined #ruby
[08:18:46] TheHodge: has joined #ruby
[08:19:09] Rollabunna: has joined #ruby
[08:19:37] axl_: has joined #ruby
[08:19:44] Zai00: has joined #ruby
[08:20:41] surrounder: has joined #ruby
[08:21:34] surrounder: has left #ruby: ()
[08:22:37] stardiviner: the channel #ruby-lang is deprecated ?
[08:22:55] sevenseacat: it's been merged with this one.
[08:23:08] AnoHito: has joined #ruby
[08:23:29] flughafen: hey sevenseacat how is it going?
[08:23:30] alphaatom: has joined #ruby
[08:23:36] flughafen: did you make it through all of flula's vids?
[08:23:45] sevenseacat: flughafen: i am sick :( and no! no i have not yet
[08:23:45] chinmay_dd: has joined #ruby
[08:24:09] flughafen: sevenseacat: that sucks. sick with what?
[08:24:16] Igorshp: has joined #ruby
[08:24:39] sevenseacat: just a cold-type thing, I caught it at railscamp on the weekend :(
[08:24:41] marr: has joined #ruby
[08:24:44] timonv: has joined #ruby
[08:25:06] flughafen: that sucks.
[08:25:11] Liothen: has joined #ruby
[08:25:11] Liothen: has joined #ruby
[08:26:13] gluten_hell_: has joined #ruby
[08:26:24] sameerynho: has joined #ruby
[08:26:44] snapcase: has joined #ruby
[08:29:35] auzty: has joined #ruby
[08:32:41] allomov: has joined #ruby
[08:32:55] Ox0dea: yorickpeterse: Method definition returns the defined as a symbol, letting us say, for instance, "private def foo...", which is pretty nice.
[08:33:28] Ox0dea: It also lets us approximate Python's decorators: "log_calls def foo...".
[08:33:36] Ox0dea: But we can't say "log_calls private def foo...".
[08:34:39] silverdust: what's the difference between == and .eql? ?
[08:34:51] ljarvis: http://stackoverflow.com/questions/7156955/whats-the-difference-between-equal-eql-and
[08:34:55] ljarvis: first google result
[08:34:57] silverdust: I've thought of them as the same and .eql? has failed me sometimes
[08:36:29] pyon: has joined #ruby
[08:37:26] charliesome: has joined #ruby
[08:37:56] dionysus69: has joined #ruby
[08:38:37] fabrice31_: has joined #ruby
[08:39:05] skade: has joined #ruby
[08:39:06] fabrice31: has joined #ruby
[08:39:14] Ox0dea: ljarvis: Would you mind elaborating on your opposition?
[08:41:09] CrazyHorse18: has joined #ruby
[08:41:09] ta: has joined #ruby
[08:41:26] CrazyHorse18: for working with passenger would people recommend rbenv or rvm?
[08:41:45] ljarvis: Ox0dea: I think it'll lead to ugly code
[08:42:10] Ox0dea: ljarvis: We're all consenting adults.
[08:42:26] ljarvis: I'm glad you have faith
[08:42:48] yorickpeterse: Ox0dea: I never had the need for decorators like that
[08:43:00] yorickpeterse: I do think it will lead to weird looking code
[08:43:17] Ox0dea: It's certainly something of an edge case, but that it's not supported feels inconsistent.
[08:43:50] lkba_: has joined #ruby
[08:43:58] musgravejw: has joined #ruby
[08:44:12] nux443: has joined #ruby
[08:44:47] emilkarl: has joined #ruby
[08:45:00] Ox0dea: That it returns the module under modification is effectively useless, since that'll either be self or the object on which you explicitly called the modifier.
[08:46:00] workmad3: has joined #ruby
[08:46:01] chinmay_dd: has joined #ruby
[08:46:04] ljarvis: but should it return an array or a single symbol
[08:46:22] Ox0dea: I've asked that question several times now, to no avail.
[08:46:29] ljarvis: the obvious would be an array, but that might be confusing
[08:46:38] ljarvis: probably more useful than self though i agree
[08:46:46] Ox0dea: No, I think it makes sense to only special case the one-argument call.
[08:47:05] ljarvis: maybe this is why it doesn't do that :)
[08:47:14] ndrei: has joined #ruby
[08:48:07] Ox0dea: Ruby is replete with special cases, if that's the point you meant to make.
[08:48:28] Ox0dea: If you otherwise intended to imply that accounting for the change would be tricky, my patch is essentially one additional line.
[08:48:30] ljarvis: my point was that the solution isn't obvious
[08:48:50] Ox0dea: Return *argv if argc is 1, else the module.
[08:49:06] ljarvis: have you suggested it to redmine?
[08:49:20] Ox0dea: I had hoped to acquire some feedback here before doing so.
[08:50:38] ljarvis: I guess my feedback would be that I don't care about "foo(private(....))" but that the behaviour is probably more sensible than returning the module. Then again, it's not a method call..
[08:50:40] futilegames: has joined #ruby
[08:50:52] Ox0dea: It is a method call.
[08:51:37] ljarvis: right that was poorly worded. I thought it was a keyword too though
[08:51:49] yorickpeterse: honestly I feel "private" is supposed to return a Method
[08:52:01] Ox0dea: yorickpeterse: But then shouldn't method definition return a Method?
[08:52:07] yorickpeterse: e.g. in Rubinius we return a CompiledCode IIRC, allowing for more complex stuff like this
[08:52:15] slucx: has joined #ruby
[08:52:17] yorickpeterse: Ox0dea: probably
[08:52:21] Ox0dea: This has all been said before with regard to method definition.
[08:52:45] ndrei: has joined #ruby
[08:53:31] Ox0dea: That *method* visibility modifiers don't return "methods" is anomalous and counter-intuitive.
[08:54:11] jenrzzz: has joined #ruby
[08:54:29] yorickpeterse: both "def" and "private/public/protected" should in my opinion return the method object they operate on
[08:54:34] yorickpeterse: also "def" really should've been a method
[08:54:42] yorickpeterse: same goes for private/public/protected
[08:54:42] Ox0dea: Now you're in the sky.
[08:54:57] yorickpeterse: "class" can easily be made a method too
[08:55:31] Rollabunna: has joined #ruby
[08:55:43] hakunin: has joined #ruby
[08:56:32] yorickpeterse: ACTION may or may not have had too much of the Smalltalk koolaid
[08:56:46] Ox0dea: Methods are defined too frequently and their return values utilized too rarely to justify the cost of returning anything but a primitive.
[08:56:50] yorickpeterse: also hey I got an invite to the Ruby rogues podcast
[08:57:06] yorickpeterse: Ox0dea: there's exactly 0 overhead in returning a usable object
[08:57:11] yorickpeterse: because the object is already allocated anyway
[08:57:18] bkxd: has joined #ruby
[08:57:51] Ox0dea: Yes, I suppose that's the case.
[09:00:25] Ox0dea: yorickpeterse: Do you know who'll be your co-panelists?
[09:00:39] yorickpeterse: Not besides the usual suspects
[09:01:14] yorickpeterse: https://github.com/YorickPeterse/oga/issues/107#issuecomment-112270213 also yay aws-sdk v2 will support Oga
[09:01:22] yorickpeterse: seems this work might finally start to pay off
[09:01:33] yorickpeterse: now if only sferik could merge my multi_xml pull-request
[09:02:16] Ox0dea: sferik was recently seen fraternizing with the enemy.
[09:02:32] Ox0dea: (I speak, in jest, of Crystal.)
[09:02:54] yorickpeterse: oh yeah, Crystal looks interesting
[09:03:02] yorickpeterse: I'm curious though how they're doing multi-threading with a GC in LLVM
[09:03:09] yorickpeterse: since LLVM's GC support is pretty meh for GCs
[09:03:15] yorickpeterse: errrr for multi-threading
[09:03:33] Ox0dea: The project seems to pay little heed to memory consumption. :/
[09:04:14] skade: has joined #ruby
[09:05:07] Ox0dea: Still, compiled "Ruby" is such a wonderful notion; I don't understand why it's still essentially unknown.
[09:07:20] canton7: because, in the world of compiled languages, ruby's a new concept that's contending with much more established players?
[09:07:35] valkyrka: I???m having issues installing Redmine apparently because of a gem version conflict
[09:07:37] valkyrka: https://gist.github.com/anonymous/f5f4b43b9d3d7139704e
[09:07:42] valkyrka: does anyone know how to solve this?
[09:07:52] yorickpeterse: Ox0dea: a lot of the features of Ruby are very hard to translate to a compiled language
[09:08:09] canton7: valkyrka, did you try what was suggested?
[09:08:20] valkyrka: yes, but I still get the same error
[09:08:39] canton7: (the output from that shouldn't include the 'In snapshot (Gemfile.lock)' bit)
[09:08:44] mister_solo: has joined #ruby
[09:09:22] valkyrka: https://gist.github.com/anonymous/6ac9a71a219e29a65598
[09:09:29] valkyrka: I even removed the Gemfile.lock before I ran it
[09:10:08] canton7: now the output of 'rake -T' again?
[09:10:29] canton7: since now you've got i18n 0.6.11 in your Gemfile.lock, not 0.7.0
[09:11:19] yorickpeterse: Ox0dea: e.g. Object.define_method is very difficult in any compiled language
[09:11:25] yorickpeterse: or Object.eval with a String
[09:11:34] Rubie: has joined #ruby
[09:11:48] yorickpeterse: also nobody likes dealing with Ruby's encoding system
[09:12:02] valkyrka: https://gist.github.com/anonymous/981ebb04e00dbbf2a707
[09:12:13] canton7: it also pops up at a time that people are getting excited about rust and nim
[09:12:15] bayed: has joined #ruby
[09:12:38] yorickpeterse: well, Crystal has been around for a while
[09:12:47] yorickpeterse: I recall seeing stuff about it at least well over a year ago
[09:12:56] yorickpeterse: and nim only recently gotten more popular
[09:13:26] canton7: valkyrka, try 'bundle exec rake -T'
[09:13:28] senayar: has joined #ruby
[09:13:48] valkyrka: https://gist.github.com/anonymous/d82316f302fb398d9f89
[09:14:10] canton7: I came across nim shortly before I came across crystal - that's probably just me having my ear to slower news channels, but it may be more typical for a layman
[09:14:36] valkyrka: and this is the output when ran w/ trace
[09:14:38] valkyrka: https://gist.github.com/anonymous/8f3935b369cd026149c2
[09:14:52] _blizzy_: has joined #ruby
[09:15:28] RegulationD: has joined #ruby
[09:16:40] dfockler: has joined #ruby
[09:17:03] arup_r: has joined #ruby
[09:18:27] quimrstorres: has joined #ruby
[09:18:51] platzhirsch: has joined #ruby
[09:18:59] Scrofff: has joined #ruby
[09:20:11] andikr: has joined #ruby
[09:22:47] bob_f: has joined #ruby
[09:24:04] fabrice31_: has joined #ruby
[09:25:12] ndrei: has joined #ruby
[09:26:04] multi_io: has joined #ruby
[09:28:07] stardiviner: has joined #ruby
[09:28:57] pyon: has joined #ruby
[09:29:35] bruno-: has joined #ruby
[09:30:59] shortCircuit__: has joined #ruby
[09:31:19] shortCircuit__: what can be a better syntax to write https://gist.github.com/argentum47/68e74a2fc4fca3c86617
[09:31:36] startupality: has joined #ruby
[09:34:17] acarpe: has joined #ruby
[09:36:05] mechanicles: has joined #ruby
[09:37:23] revath: has joined #ruby
[09:37:38] jhass: shortCircuit__: what's current_tenant? why do you have to define the empty hashes and only fill the values for one?
[09:38:06] Ox0dea: shortCircuit__: You have several extraneous "end"s that constitute syntax errors.
[09:38:32] Darkwater: Ox0dea: where?
[09:38:37] Ox0dea: Sorry, I'm tired.
[09:38:43] Ox0dea: Gonna head off to bed now.
[09:38:56] jhass: shortCircuit__: I think you got a design problem there, you have data which you embed in your code and you'll have to touch the code when the data changes
[09:39:17] Ox0dea: Seeing "end" right before "elsif" is rare enough that it tripped me up.
[09:39:25] jhass: shortCircuit__: start by pulling these values int a DB, JSON or YAML file, that should clean the code up automatically
[09:40:26] jhass: Ox0dea: weirichs rule ftw ;D
[09:41:04] Ox0dea: Ha! I'm so glad he has a rule.
[09:42:13] Scroff: has joined #ruby
[09:48:05] yoongkang: has joined #ruby
[09:49:16] bruno-: has joined #ruby
[09:50:49] hardlin3r: has joined #ruby
[09:50:58] Scroff: has joined #ruby
[09:51:51] acarpe: has joined #ruby
[09:52:11] fabrice31: has joined #ruby
[09:54:01] wildroman2: has joined #ruby
[09:55:52] Papierkorb: has joined #ruby
[09:56:32] tkuchiki: has joined #ruby
[09:56:48] ahmetkapikiran: has joined #ruby
[09:58:55] DLSteve: has joined #ruby
[09:59:08] bob_f: has left #ruby: ()
[09:59:48] strixd: Is it possible to alias a instance method to a class method
[10:00:28] revath: has joined #ruby
[10:00:31] ljarvis: strixd: just call the class method inside your instance method
[10:00:58] ljarvis: you could add a helper method for doing it, but no there is nothing built in
[10:01:15] strixd: what is you wanted both Foo.new.bar and Foo.bar to be the same thing
[10:01:47] ljarvis: they can't be the same thing
[10:01:51] ljarvis: but one method could call another
[10:02:01] Darkwater: which mean they can do the same thing
[10:02:05] ljarvis: the way i just described
[10:02:10] strixd: can i call the instance method from the class?
[10:02:15] starfox_sf: has joined #ruby
[10:02:25] ljarvis: that doesn't really make sense
[10:02:30] Darkwater: if you have an instance, sure
[10:02:34] ljarvis: but if you instantiate a new instance, yes
[10:02:51] Darkwater: maybe we can help you better if you describe what you want
[10:02:52] strixd: nice ty I get it
[10:03:21] Soda: has joined #ruby
[10:03:30] blackmesa: has joined #ruby
[10:04:57] roshanavand: has joined #ruby
[10:05:23] roshanavand: has joined #ruby
[10:11:54] LiquidInsect: has joined #ruby
[10:13:57] Igorshp: has joined #ruby
[10:15:18] hectortrope: has joined #ruby
[10:16:28] roshanavand: has joined #ruby
[10:17:06] pontiki: has joined #ruby
[10:17:08] revath: has left #ruby: ()
[10:18:54] yorickpeterse: aww yiss, 2nd Aeron arriving this Thursday
[10:18:58] yorickpeterse: that only took over a month to ship
[10:19:30] ddfreyne: yorickpeterse: Are you so fat that you need two Aeron chairs?
[10:20:03] yorickpeterse: But no, I ordered one for my office
[10:20:52] stamina: has joined #ruby
[10:22:57] _blizzy_: has joined #ruby
[10:24:24] yorickpeterse: ugh, Delegator's source code is.....hmrpf
[10:25:01] yorickpeterse: e.g. it extends BasicObject, duplicates Kernel, undefs a bunch of methods and then includes said dup
[10:25:08] fabrice31: has joined #ruby
[10:25:28] yorickpeterse: though at least it does that upon loading the class and not during runtime
[10:26:13] yorickpeterse: https://github.com/ruby/ruby/blob/trunk/lib/delegate.rb#L89 wtf
[10:26:32] emilkarl: has joined #ruby
[10:26:38] yorickpeterse: what the hell does that even do
[10:26:39] jesterfraud: has joined #ruby
[10:27:43] yorickpeterse: oh what the, that patches an error backtrace
[10:27:46] apeiros: yorickpeterse: "clean" the backtrace
[10:32:27] tkuchiki: has joined #ruby
[10:32:31] hedgecore_: has joined #ruby
[10:32:38] lavros: has joined #ruby
[10:33:15] unshadow: has joined #ruby
[10:36:29] Jackneill: has joined #ruby
[10:37:16] jesterfraud: so do people have a lot of success with non-rails web frameworks in Ruby?
[10:37:29] jesterfraud: interested in broadening horizons
[10:37:36] quimrstorres: has joined #ruby
[10:38:02] hedgecore: has joined #ruby
[10:38:09] CrazyHorse18: has joined #ruby
[10:38:13] pontiki: how would you measure success, jesterfraud ?
[10:38:46] jesterfraud: pontiki, has been successfully used in production sounds reasonable?
[10:38:54] valkyrka: http://pastebin.com/xsSyBkme - why does it complain about that?
[10:38:55] ruboto: valkyrka, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/17f59008344c745d7e02
[10:38:55] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[10:39:25] futilegames: has joined #ruby
[10:39:32] valkyrka: https://gist.github.com/anonymous/83fe32aa1daada8d73be is showing when I try to install a Redmine plugin
[10:39:45] valkyrka: the 3rd line of /var/www/html/redmine/config/application.rb looks like this
[10:39:54] valkyrka: require 'rails/all'
[10:40:17] valkyrka: what should I be installing? I am guessing it doesn???t like the fact that it doesn???t specify a version?
[10:40:56] pontiki: jesterfraud: there are certainly far fewer production apps running sinatra than there are of rails, but there are some really solid ones
[10:40:56] jesterfraud: it's not that, it's just that it can't find the rails gem, at a guess
[10:41:24] jesterfraud: pontiki, Sinatra is good, but I find I just try to rebuild Rails in it. Any other popular ones?
[10:42:15] alem0lars__: has joined #ruby
[10:42:22] pontiki: volt looks promising
[10:42:24] allcentury: has joined #ruby
[10:42:26] valkyrka: I???m running irb
[10:42:30] valkyrka: and it was able to load it it seems
[10:42:37] jhass: valkyrka: bundle exec irb too?
[10:42:38] valkyrka: irb(main):003:0> require 'rails/all' => true
[10:42:40] jenrzzz: has joined #ruby
[10:42:41] arup_r: has joined #ruby
[10:43:16] valkyrka: https://gist.github.com/anonymous/ab44150e75108b6faaa0
[10:43:21] quimrsto_: has joined #ruby
[10:43:24] jesterfraud: pontiki, I'm more a fan of the SPA <-> API Server approach, personally.
[10:43:26] valkyrka: you???re right
[10:43:32] valkyrka: it gives out the same error, but why?
[10:43:33] jhass: valkyrka: bundle install went through without errors?
[10:43:39] Igorshp: has joined #ruby
[10:43:45] mathie: has joined #ruby
[10:43:46] jhass: gem -v, bundle -v ?
[10:43:49] pontiki: jesterfraud: can i assume you've looked at rails-api ?
[10:43:56] jesterfraud: pontiki, you can indeed
[10:44:07] jesterfraud: doesn't suit things like Doorkeeper though, as an aside
[10:44:11] valkyrka: https://gist.github.com/anonymous/3d8f8e2a1fc0ccaa9996
[10:44:17] jesterfraud: because it assumes non-api app :(
[10:44:21] decoponio: has joined #ruby
[10:44:28] jhass: valkyrka: uh, your Gemfile doesn't list rails
[10:44:36] Azure: has joined #ruby
[10:44:41] jhass: valkyrka: that seems to be a very short Gemfile for something like Redmine
[10:44:44] jhass: did you mess with it?
[10:45:30] jesterfraud: valkyrka, the original Gemfile includes a LOT more: https://raw.githubusercontent.com/redmine/redmine/master/Gemfile
[10:45:31] ixti: has joined #ruby
[10:45:38] valkyrka: no, I just added the rake gem
[10:45:42] valkyrka: because it was missing
[10:45:45] valkyrka: well, that???s for a plugin
[10:45:49] valkyrka: it???s not for the whole redmine install
[10:45:51] jesterfraud: are you in the root folder of the app?
[10:46:06] jesterfraud: so the directory at the base of Redmine?
[10:47:03] jhass: valkyrka: fact is that you're trying to load Rails without having it in your Gemfile, that this fails is completely expected
[10:47:59] joonty: has joined #ruby
[10:48:07] valkyrka: I am in the plugin folder
[10:48:50] phutchins: has joined #ruby
[10:49:11] jhass: this seems to get very specific to developing redmine plugins, did you try #redmine ?
[10:49:14] valkyrka: http://www.redminecrm.com/projects/crm/pages/2
[10:49:57] jhass: that doesn't state "cd into the just extracted folder"
[10:50:07] jhass: try the commands at redmines root
[10:50:24] DoubleMalt: has joined #ruby
[10:50:44] valkyrka: that was it!
[10:51:26] Darryl___: has joined #ruby
[10:51:48] ta: has joined #ruby
[10:51:56] blackmesa: has joined #ruby
[10:52:42] revath1: has joined #ruby
[10:53:28] valkyrka: thanks a million guys, sorry for the confusion
[10:53:32] valkyrka: guess I was overthinking it
[10:54:01] fabrice31: has joined #ruby
[10:54:27] lkba: has joined #ruby
[10:54:28] jhass: yeah, could've just watched the video :P
[10:54:54] nonparfumee: has joined #ruby
[10:55:11] sarkyniin: has joined #ruby
[10:56:00] sarkyniin: has joined #ruby
[10:56:07] langlands: has joined #ruby
[10:56:58] sarkyniin: has joined #ruby
[11:00:23] langlands: has joined #ruby
[11:00:29] chinmay_dd: has joined #ruby
[11:02:57] ndrei: has joined #ruby
[11:03:17] sarkyniin: has joined #ruby
[11:03:34] CloCkWeRX: has joined #ruby
[11:03:45] tkuchiki: has joined #ruby
[11:03:49] rodfersou: has joined #ruby
[11:04:09] tkuchiki_: has joined #ruby
[11:04:23] RegulationD: has joined #ruby
[11:05:03] dgutierrez1287: has joined #ruby
[11:05:26] volty: has joined #ruby
[11:06:47] emilkarl: has joined #ruby
[11:07:48] n008f4g_: has joined #ruby
[11:08:13] sarkyniin: has joined #ruby
[11:09:43] bruno-: has joined #ruby
[11:10:47] bennyhallett: has joined #ruby
[11:11:09] AugustoCesar: has joined #ruby
[11:11:23] haxrbyte: has joined #ruby
[11:11:41] hoov: has joined #ruby
[11:11:53] sarkyniin: has joined #ruby
[11:12:03] konieczkow: has joined #ruby
[11:13:01] sigurding: has joined #ruby
[11:13:36] AugustoCesar: has left #ruby: ()
[11:15:10] haxrbyte_: has joined #ruby
[11:15:54] edwinvdgraaf: has joined #ruby
[11:17:12] psmolen: has joined #ruby
[11:19:17] skade: has joined #ruby
[11:19:56] sdegutis: has joined #ruby
[11:20:06] sdegutis: Is Ruby a decent language for parsing an HTML file?
[11:20:45] jhass: nokogiri is a decent libxml2 binding, so probably yes
[11:20:59] j4cknewt: has joined #ruby
[11:20:59] rodfersou: has joined #ruby
[11:21:02] sdegutis: It's not *that* well structured.
[11:21:19] sdegutis: For example I need to delete everything before the first <h1>
[11:21:49] CloCkWeRX: has joined #ruby
[11:22:20] quazimodo: has joined #ruby
[11:23:03] sdegutis: How do you do that without resorting to regex?
[11:23:34] jhass: I'd try a xpath that selects them and .remove or .each(&:remove) or something
[11:23:35] sdegutis: Ideally I'd use this line if it were possible: string.delete_up_to('<h1>')
[11:23:36] hedgecore: has joined #ruby
[11:24:53] jhass: do you have some examples?
[11:25:01] volty: h1 is inside what ?
[11:25:49] acke: has joined #ruby
[11:25:58] GarethAdams: sdegutis: so you want to delete the opening <body> tag but not the closing </body> tag?
[11:26:02] haxrbyte: has joined #ruby
[11:26:19] volty: what is before h1 is either a node (same level tag) or attributes, or cdata, so iterate till h1 and delete what is before, or export the rest
[11:26:25] sdegutis: GarethAdams: well later I also want to delete everything starting at <div class="pub"> which includes the closing body tag
[11:26:46] jhass: sdegutis: so you want to extract a fragment
[11:26:47] sdegutis: jhass: yeah: http://www.newadvent.org/fathers/01281.htm
[11:26:48] jhass: that's much simpler
[11:26:57] sdegutis: Basically I want to get all this text and turn it into LaTex
[11:27:05] sdegutis: Programmatically.
[11:27:23] givello: has joined #ruby
[11:27:29] sdegutis: It's.... terrifying.
[11:27:37] bmalum: has joined #ruby
[11:27:46] sdegutis: I talked to the guy who runs this website. He said /there are no source files/.
[11:27:55] tsvenson: has joined #ruby
[11:27:55] sdegutis: He just edits a bunch of .htm files, and has for 20 years.
[11:28:02] sdegutis: For an entire encyclopedia worth of text.
[11:28:07] sdegutis: ACTION facepalmed hard
[11:28:14] adaedra: html to latex?
[11:28:17] volty: you'll better study nokogiri (and parsing xml in general)
[11:28:18] adaedra: maybe pandoc does it
[11:28:19] banister: has joined #ruby
[11:28:21] givello: Hey there, I'm kind of a beginner with ruby and here's a quick question: I've got a class A that I want to be able to initialize from either a String or another object of type A. How can I overload initialize ?
[11:28:29] sdegutis: adaedra: no I want to customize the LaTeX that comes out
[11:28:50] sdegutis: volty: I trust nokigiri just fine, it's this source code I'm not sure I trust to have balanced HTML
[11:28:52] jhass: require "open-uri"; require "nokogiri"; doc = Nokogiri::HTML(open("http://www.newadvent.org/fathers/01281.htm", &:read)); File.write("extracted", doc.css("#springfield2").children.to_s)
[11:29:00] jhass: feed to pandoc
[11:29:14] sdegutis: jhass: actually I may try that
[11:29:33] volty: givello: def initialize ... case arg.class; when String ...; when A .... end --- something like that
[11:29:41] sdegutis: If only because I want to see how awful pandoc does it so I know what problems to avoid myself
[11:30:17] jhass: volty: givello no need for the .class; just case arg; when String; ... when A; ... end
[11:30:19] Abhijit: has joined #ruby
[11:30:29] givello: volty: good idea
[11:30:39] volty: jhass is right
[11:31:04] givello: Thank you both :)
[11:31:09] jhass: givello: though you may want to copy with dup instead and define initialize_copy
[11:31:18] givello: So no method overloading in ruby then
[11:31:20] volty: me was wrong, if you go with case arg.class you need to_s ( that's wrongheading)
[11:31:37] givello: jhass: I'll look into that
[11:31:42] ahmetkapikiran: has joined #ruby
[11:33:50] qwertme: has joined #ruby
[11:34:09] acke: has joined #ruby
[11:36:25] Cust0sLim3n: has joined #ruby
[11:38:25] volty: Some with sxperience in mixing c++ & ruby? 1. the interpreter (on rb_eval_string....) does not autoload gems, so have to require rubygems. And I am curious how it goes / should go 2. on require 'nokogiri', I have undefined Encoding: UTF-7 exception
[11:38:48] but3k4: has joined #ruby
[11:39:22] jhass: maybe just shell out... :P
[11:41:03] volty: jhass: no way, I need it from inside. I have (I want) to mix c++ qt and qtbindings calls (do on the gui from the both sides)
[11:41:41] yorickpeterse: volty: you can use rb_require() to load any Gems you might need
[11:42:00] aapole: has joined #ruby
[11:43:06] quimrstorres: has joined #ruby
[11:44:04] nickjj: has joined #ruby
[11:44:39] volty: yorickpeterse: most requries are inside ruby source. Moving them out over-complicates. But it's ok since require 'rubygems' works (for now). I was just curious. As for the nokogiri, there are other problems too ??? no way to use it with qtbindings, must be something with name collision
[11:45:22] yorickpeterse: volty: what the heck are you trying to do?
[11:45:36] negev: has joined #ruby
[11:45:37] cosmicexplorer: has joined #ruby
[11:45:50] nateberkopec: has joined #ruby
[11:46:30] negev: hi, using erubis to run ruby as a cgi, how do you include another .erb file as a kind of partial view? when i do: puts Erubis::FastEruby.new(File.read('menu.erb')).result(binding()) it nukes any html that was in the original index.erb before the call
[11:46:30] Aeyrix: volty: ...
[11:48:03] volty: mixing calls from qtbindgins and c++ qt ??? or, in general, moving (some parts) towards c++. Done starting the qt from the ruby side, but now I have to go the other way (and hook qtbindings to alreay initialized appliction from c++).
[11:48:56] yorickpeterse: That makes no sense
[11:49:16] arup_r: has joined #ruby
[11:49:39] yorickpeterse: As in, the way that was written
[11:50:27] knikolov: has left #ruby: ("WeeChat 1.3-dev")
[11:50:37] sdegutis: has left #ruby: ()
[11:51:03] starfox_sf: has joined #ruby
[11:51:41] k3asd`: has joined #ruby
[11:52:10] arup_r: has joined #ruby
[11:53:02] yorickpeterse: For one, MRI has no decent embed API so that's already going to be a nightmare
[11:53:16] yorickpeterse: Second, replacing Ruby "require" calls with rb_require() isn't going to yield you any real performance benefits
[11:53:20] volty: myEdit.new(); myEdit.show() ??? ruby side; myEdit is implemented in c++; accessed (findWidget by name) and used from the ruby side // now think of vise versa
[11:53:25] yorickpeterse: It's far easier to keep the Ruby code as Ruby and just run it
[11:53:41] sdothum: has joined #ruby
[11:53:42] hedgecore: has joined #ruby
[11:53:49] yorickpeterse: It's also far easier to expose C/C++ to Ruby and not the other way around
[11:54:09] volty: easier? not at all, not stable enough
[11:54:12] yorickpeterse: e.g. the GC will make your life miserable
[11:54:31] volty: as for the what is easier to expose I (as stated) already know that (because I have done it)
[11:54:42] yorickpeterse: "not stable enough"?
[11:54:46] yorickpeterse: what does that even mean?
[11:54:51] volty: qtbindings isn't stable enough
[11:54:53] bronson: has joined #ruby
[11:55:28] yorickpeterse: ...ehm, how does calling the same Ruby code from C++ make any difference?
[11:55:38] yorickpeterse: Are you writing your own Qt bindings?
[11:56:10] volty: and there are some speed problems (e.g. syntax highlighter). Anyway I want to try this. It's done if I succeed to hook to the Qt::Application from the ruby side.
[11:56:30] RazorX: has joined #ruby
[11:56:35] yorickpeterse: You're literally making absolutely zero sense
[11:56:47] volty: I'd prefer reimplenting ruby using (base) qt libraries
[11:57:06] yorickpeterse: I hope you have a few years for that
[11:57:23] volty: lol, little honey. Go your own way and leave me going my own.
[11:57:53] yorickpeterse: In that case I suggest not asking questions in here
[11:57:54] jcaho: has joined #ruby
[11:58:09] volty: You are small coin. You argue without knowing about what.
[11:58:25] yorickpeterse: I'm pretty familiar with the C API
[11:58:41] yorickpeterse: Having written my fair share of code for it, working on implementing it in Rubinius, etc
[11:58:44] volty: live with your familiarity
[11:59:00] Darkwater: what is advice from someone experienced
[11:59:00] acarpe: has joined #ruby
[11:59:13] yorickpeterse: Darkwater: yeah, clearly they know better
[11:59:31] yorickpeterse: volty: start by formulating a proper question because so far they've been too cryptic
[11:59:36] yorickpeterse: Maybe then somebody can answer you properly
[11:59:47] yorickpeterse: Because right now it sounds like you're trying to implement Ruby using C++/Qt, which is _a lot_ of work
[11:59:49] yorickpeterse: As in, years of work
[11:59:52] jhass: volty: yorickpeterse don't get ad hominem, I don't want to have remove either of you
[11:59:54] fujimura: has joined #ruby
[12:00:22] volty: the problem is too complex if you don't know the inners of qtbindings. Its you that starting questioning
[12:00:42] volty: I would have remained at my exposing of the initial question
[12:00:43] yorickpeterse: I'm well aware of what qtbindings does
[12:00:52] jhass: also I'd suggest you drop the metadiscussion, neither of you will gain anything from it
[12:00:54] yorickpeterse: I've looked into it in the past pretty extensively, hence I said it's a pain to do
[12:01:14] volty: but you don't know how qt works, how qtbindings programmatically allow you to locate your widgets
[12:01:18] yorickpeterse: Either way, calling back to Ruby from C++ is hard because the API doesn't expose anything remotely C++ like
[12:01:21] Akagi201: has joined #ruby
[12:01:22] ddv: litle honey :-)
[12:01:35] yorickpeterse: volty: I suggest to stop making these assumptions
[12:01:54] volty: It was you that begin questioning.
[12:02:00] ldnunes: has joined #ruby
[12:02:11] yorickpeterse: Yes, because your questions made no sense
[12:02:16] yorickpeterse: So I was asking what you're trying to achieve
[12:02:27] yorickpeterse: But you answer with only more cryptic answers
[12:02:36] yorickpeterse: also meeting, bbl
[12:02:48] volty: I answered. And you could limit yourself to simple advice, without posing as carapace.
[12:02:59] jmignault: has joined #ruby
[12:03:14] volty: the prob.. is too complex to answer in a clearer way. honey
[12:03:17] jhass: volty: seriously, last warning
[12:03:55] skade: has joined #ruby
[12:04:05] volty: jhass: as you please, since you didn't warned yorickpeterse's breaking eggs
[12:04:31] jhass: I did warn both of you
[12:04:34] senayar: has joined #ruby
[12:05:17] negev: has left #ruby: ()
[12:05:34] pwnz0r: has joined #ruby
[12:07:21] serivich: has joined #ruby
[12:07:25] jesterfraud: someone remind me why I voluntarily joined this profession? :)
[12:07:52] allcentury: has joined #ruby
[12:08:08] jesterfraud: ddv, hasn't worked that well thus far
[12:08:11] jhass: being praised like an artist?
[12:08:13] dorei: has joined #ruby
[12:08:15] jesterfraud: though, funnily enough, playing with that gem right now
[12:08:15] jhass: ACTION coughs
[12:08:35] ddv: most will steal your code
[12:08:35] jesterfraud: Yeah. Praise. That's what my clients/bosses do. :)
[12:10:21] yoongkang: has joined #ruby
[12:10:23] diegoviola: has joined #ruby
[12:10:31] acovrig: has joined #ruby
[12:10:48] ccooke: Hmm. Is there a working mmap gem for any recent Ruby?
[12:10:58] ccooke: the only one I can find hasn't been updated in years
[12:11:05] ddv: then no
[12:12:01] ccooke: Damn. Wonder how hard it would be to port to 2.2
[12:12:33] jesterfraud: one way to find out!
[12:13:41] Igorshp: has joined #ruby
[12:14:49] j4cknewt: has joined #ruby
[12:14:53] quimrstorres: has joined #ruby
[12:15:05] banister: has joined #ruby
[12:15:13] volty: just now: http://pastebin.com/hvEzWydk
[12:15:13] ruboto: volty, as I told you already, please use https://gist.github.com
[12:15:32] volty: and it works
[12:17:18] malconis: has joined #ruby
[12:18:15] Bunnycat: has joined #ruby
[12:18:32] Bunnycat: anyone lurking around?
[12:19:27] Bunnycat: Hi Darkwater
[12:19:32] spyderman4g63: has joined #ruby
[12:19:46] Darkwater: jesterfraud: I don't think you voluntarily joined this profession
[12:19:49] Bunnycat: does anyone have experience with having both pry-debugger and pry-byebug?
[12:19:51] Darkwater: the profession consumed you
[12:20:00] Darkwater: not me, sorry
[12:20:00] ruboto: Just ask your question, if anyone has or can, they will respond.
[12:20:15] jesterfraud: Darkwater, I think that's about right
[12:20:23] volty: Small, not useful, but sufficient to start with. And if it breaks somewhere, I will stop with it. I need only one thread. I need this only to move some pieces from ruby to c++, and start the app from c++. I hope that now I was quite clear. Thank you. :)
[12:20:25] aryaching: has joined #ruby
[12:21:47] Bunnycat: I have a Ruby2.0.0p0 environment, which cannot be changed at the moment due to legacy support of some of our scripts. We use pry to debug our ruby scripts. The problem is, if the pry-debugger and pry-byebug gems are installed, even if you specifically require only one of them in the code, binding.pry crashes
[12:21:49] Darkwater: volty: I don't understand what you're saying
[12:21:50] jesterfraud: Bunnycat, not specifically, but I have used gdb a tiny bit before (and used that knowledge to use bye-bug successfully a time or two)
[12:22:10] jesterfraud: Bunnycat, are both in the Gemfile?
[12:22:13] volty: Darkwater: have you done gui?
[12:22:25] jesterfraud: if so, do you have require: false on both of them?
[12:22:31] Darkwater: hm, not yet
[12:22:49] bennyhallett: has left #ruby: ()
[12:22:51] volty: ok. you'll get it when you start :)
[12:22:51] Bunnycat: we don't use gemfiles to manage our projects. Is there a master gemfile where the gems are preloaded before running any scripts?
[12:22:53] jhass: Bunnycat: why are both installed anyway? you should have debugger installed for 1.9 only and byebug for 2.0+ only
[12:23:00] Bunnycat: jesterfraud: yes
[12:23:14] hoov: has joined #ruby
[12:23:22] jesterfraud: Bunnycat, no, if you don't have a gemfile, then it wouldn't be that...
[12:23:24] symbol: has joined #ruby
[12:23:27] jhass: well, maybe you should look into using Bundler
[12:23:32] apt-get_: has joined #ruby
[12:23:43] jhass: it's there to prevent issues like this
[12:24:08] Bunnycat: I'd happilly switch to byebug completely, problem is - we have scripts which have been frozen and use pry-debugger. pry-debugger is deprecated for anything post Ruby 2 and pry-byebug should take over
[12:24:28] Bunnycat: so we have stuff like
[12:24:36] Bunnycat: require 'pry'
[12:24:41] Bunnycat: require 'pry-debugger'
[12:24:42] jhass: if you have to use pry-debugger you can't use Ruby 2.0
[12:24:44] jhass: simple as that
[12:24:45] Bunnycat: require 'pry-rescue'
[12:24:58] Bunnycat: pry-debugger still works for ruby 2.0
[12:25:05] sgambino: has joined #ruby
[12:25:06] jhass: but let me say that this policy is insanely stupid
[12:25:10] Bunnycat: it won't work for anything later
[12:25:22] diegoviola: this company I am working for is awful, the boss ask their team members to "clean" shit at the office, what the hell is that? lol
[12:25:32] rkazak: has joined #ruby
[12:25:39] jhass: diegoviola: #ruby-offtopic ;)
[12:25:44] Bunnycat: For now we had to uninstall pry-byebug and fallback to pry-debugger
[12:26:06] jesterfraud: Bunnycat, are you using rvm/rbenv/chruby?
[12:26:23] jesterfraud: that might be the best way to handle 'frozen' scripts that expect requirements of a certain version
[12:26:25] dorei: diegoviola: i used to work for a company that had a nazi cleaning lady, she terrorized everyone to keep their desks clean :D
[12:26:34] quimrstorres: has joined #ruby
[12:26:40] diegoviola: dorei: I don't think they were referring about the desk
[12:26:45] Bunnycat: we use module to manage ruby versions
[12:26:49] Igorshp: has joined #ruby
[12:26:56] jhass: what's "module"?
[12:27:06] Bunnycat: we load ruby as a module
[12:27:28] Bunnycat: so we can do "module unload [ruby-version]"
[12:27:33] jhass: what's "module"?
[12:27:43] Bunnycat: and then "module load [ruby-version]
[12:27:46] jhass: what's "module"?
[12:27:53] jhass: I'll keep doing that
[12:28:13] yeticry: has joined #ruby
[12:28:15] ddv: loop { puts "what's module?" }
[12:28:27] Bunnycat: http://modules.sourceforge.net/ this
[12:28:47] Darkwater: $<.each_line { puts "what's module?" }
[12:28:55] Darkwater: (late but w/e)
[12:29:04] jesterfraud: that... seems like overkill
[12:29:09] jesterfraud: and a nightmare to manage across developers
[12:29:27] jhass: and it seems abandoned
[12:29:27] Bunnycat: we use module to load many other development toolchains since we have several versions
[12:29:31] jhass: doubt many people use it
[12:29:50] Bunnycat: I don't manage this place, so can't really say much about it :D
[12:29:58] Darkwater: by the way, slightly relevant, note that sourceforge is now a scam site, try to avoid it if you can
[12:30:03] dorei: i'm pretty shocked that at least one people is using it
[12:30:17] Bunnycat: is there a way to avoid pre-loading a gem on running a ruby script?
[12:30:24] jhass: my suggestion stands, sidestep that stuff and use Gemfile's and ideally bundle install --deployment for each application
[12:30:31] jesterfraud: Bunnycat, it shouldn't load them by default.
[12:30:42] rkazak: has left #ruby: ()
[12:30:48] jesterfraud: However, your dependency management sounds like a minefield
[12:30:48] jhass: it's pry that loads all plugins that it can find
[12:30:57] jesterfraud: did not know that
[12:31:12] denver: has joined #ruby
[12:31:15] jhass: bundle exec is a effective way to limit what it can see
[12:31:17] Bunnycat: is there a way to tell pry to not pre-load pry-debugger or pry-byebug?
[12:31:20] jesterfraud: jhass, I'm actually surprised by that :/
[12:31:25] nonparfumee: has joined #ruby
[12:31:46] but3k4: has joined #ruby
[12:31:46] jesterfraud: Bunnycat, would recommend bundler, it's pretty much standard
[12:32:17] Bunnycat: but will bundler help with legacy scripts?
[12:33:00] jhass: if you can modify their invocation, yes
[12:33:09] Bunnycat: ok, I'll look into it
[12:33:13] Bunnycat: thanks a bunch!
[12:34:00] mujou: has joined #ruby
[12:34:10] jesterfraud: This profession - people actually thank me for telling them they've done it wrong. Sometimes.
[12:34:12] ringarin: has joined #ruby
[12:34:23] Bunnycat: one more question
[12:34:38] Bunnycat: bundler seems to handle gem installation, no?
[12:34:43] justintv90: has joined #ruby
[12:34:58] jhass: it can and is very often used to, but it's not required
[12:35:21] Bunnycat: we can't install/uninstall gems ourselves
[12:35:38] Bunnycat: we have to have our CAD team do that for us, since the ruby environment is global for everyone
[12:35:47] jhass: with bundler you could since you can choose an arbitrary location
[12:35:55] Bunnycat: so you can do it locally?
[12:36:07] caseypatrickdris: has joined #ruby
[12:36:09] jhass: bundle install --deployment for example would default to installing them to ./vendor/bundle
[12:36:13] jhass: (relative to the Gemfile)
[12:36:34] fabrice31: has joined #ruby
[12:36:40] jhass: but it can reuse globally installed ones too
[12:36:50] jhass: it just limits what your application/script sees then
[12:37:03] Akagi201: has joined #ruby
[12:37:06] Bunnycat: sounds lovely
[12:38:07] bruno-_: has joined #ruby
[12:38:08] fabrice31: has joined #ruby
[12:38:42] davec_: has joined #ruby
[12:39:08] droidburgundy: has joined #ruby
[12:40:39] Xeago: has joined #ruby
[12:40:54] aryaching: has joined #ruby
[12:41:23] gluten_hell_: has joined #ruby
[12:41:44] chinmay_dd: has joined #ruby
[12:43:38] haxrbyte: has joined #ruby
[12:43:39] endash: has joined #ruby
[12:46:11] haxrbyte_: has joined #ruby
[12:46:32] denver: has joined #ruby
[12:47:42] centrx: has joined #ruby
[12:48:19] rbennacer: has joined #ruby
[12:48:57] haxrbyte: has joined #ruby
[12:48:59] Rollabun_: has joined #ruby
[12:49:13] vudew: has joined #ruby
[12:49:24] Rubie: has joined #ruby
[12:49:30] startupality: has joined #ruby
[12:50:46] vudew: /window new
[12:51:23] haxrbyte_: has joined #ruby
[12:51:39] dopie: has joined #ruby
[12:51:45] mujou: has joined #ruby
[12:52:13] malconis: has joined #ruby
[12:52:16] yardenbar: has joined #ruby
[12:52:51] jesterfraud: oh, that reminds me of the time when someone sent a private message about not engaging the troll, but put a space in front of it
[12:53:15] RegulationD: has joined #ruby
[12:53:16] haxrbyte_: has joined #ruby
[12:53:41] mello: has joined #ruby
[12:54:49] haxrbyte_: has joined #ruby
[12:55:14] bwicklund: has joined #ruby
[12:55:43] alphaatom: has joined #ruby
[12:55:56] Darkwater: /msg nickserv identify hunter1
[12:55:58] apt-get__: has joined #ruby
[12:56:11] mister_solo: has joined #ruby
[12:56:25] mujou: has joined #ruby
[12:56:36] malconis: has joined #ruby
[12:57:33] jesterfraud: ACTION gets that reference
[12:58:53] mujou: has joined #ruby
[12:59:30] bwicklund: has left #ruby: ()
[12:59:39] krisquigley: Slack or IRC?
[12:59:42] zotherstupidguy: has joined #ruby
[13:00:00] krisquigley: Which are you loyal to?
[13:00:02] bwicklund: has joined #ruby
[13:00:09] jesterfraud: depends what I'm doing
[13:00:19] jesterfraud: haven't found a good Slack team for outside of work
[13:00:23] jesterfraud: hence why I'm here
[13:00:36] krisquigley: theres a rails and ruby slack team
[13:00:42] bkxd: has joined #ruby
[13:00:49] krisquigley: good thing about IRC is that anyone can join
[13:00:55] krisquigley: slack is invite only
[13:01:00] jesterfraud: it has a lot of good (and bad) things
[13:01:08] fujimura: has joined #ruby
[13:01:20] krisquigley: that's what /kick and /ban is for though
[13:01:53] wjlroe: has joined #ruby
[13:01:55] krisquigley: Slack is pretty awesome though
[13:01:56] jesterfraud: I was more talking from a technical perspective
[13:02:01] jesterfraud: it has its uses
[13:02:03] krisquigley: Yeah, that's true
[13:02:17] jesterfraud: I'd still prefer an updated IRC protocol that doesn't make me weep when I consider writing an IRC client
[13:02:18] krisquigley: IRC can be daunting for newbies, especially less tech-savvy users
[13:02:47] krisquigley: one for activecable!
[13:04:01] Rubie: has joined #ruby
[13:04:04] Darkwater: you can use irc with a telnet client though
[13:04:04] melter: has joined #ruby
[13:04:06] Darkwater: which is cool
[13:04:12] Darkwater: I made a bot in bash using netcat
[13:04:53] bougyman: gawk with raw sockets ftw
[13:04:54] coderhs: has joined #ruby
[13:05:33] skyrocker: has joined #ruby
[13:05:42] sarkyniin: has joined #ruby
[13:05:57] sanguisdex: has joined #ruby
[13:06:16] mdz_: has joined #ruby
[13:06:34] rbennacer: has joined #ruby
[13:06:34] jesterfraud: cat /dev/random >> /dev/irc
[13:06:36] gluten_hell_: has joined #ruby
[13:07:00] griffindy: has joined #ruby
[13:08:54] thelastinuit: has joined #ruby
[13:09:08] Muhannad: has joined #ruby
[13:09:11] micmus: has joined #ruby
[13:09:19] Marsupermammal: has joined #ruby
[13:09:33] mrmargolis: has joined #ruby
[13:09:44] JoshL: has joined #ruby
[13:09:48] segfalt: has joined #ruby
[13:10:23] InternetFriend: has joined #ruby
[13:10:42] mechanicles: has joined #ruby
[13:13:13] corehook: has joined #ruby
[13:13:20] konieczkow: has joined #ruby
[13:13:46] bkxd: has joined #ruby
[13:15:18] infoget: has joined #ruby
[13:17:33] marsjaninzmarsa: has joined #ruby
[13:18:46] yorickpeterse: https://github.com/yb66/oga/commit/dc457796f43f95b6de82781b56175aec2c7a81da oooh the saltyness
[13:19:00] dblessing: has joined #ruby
[13:20:27] jhass: haha, seriously
[13:20:29] jesterfraud: ACTION makes popcorn
[13:20:53] adaedra: what did I miss?
[13:21:09] yorickpeterse: https://github.com/YorickPeterse/oga/pull/111
[13:22:04] someword: has joined #ruby
[13:22:43] jhass: https://github.com/YorickPeterse/oga/compare/master...yb66:master gives a nice view too
[13:23:11] yorickpeterse: it's a shame the MPL doesn't forbid the use of my name though
[13:23:16] yorickpeterse: unless I can trademark my name
[13:23:44] CloCkWeRX: has joined #ruby
[13:24:22] centrx: I already trademarked it sorry
[13:24:38] yqt: has joined #ruby
[13:25:01] adaedra: yorickpeterse???
[13:25:09] hinbody: has joined #ruby
[13:25:16] yorickpeterse: centrx: do you have a .ly domain already?
[13:25:28] yorickpeterse: shit, I should probably register yorickpeterse.sexy
[13:25:37] jesterfraud: yorickpeter.sexy
[13:25:38] hectortrope: has joined #ruby
[13:26:10] symbol: has joined #ruby
[13:26:41] yorickpeterse: jesterfraud: yorick.peterse.sexy
[13:26:46] yorickpeterse: del.ici.us style
[13:26:54] yorickpeterse: errr del.icio.us
[13:27:01] jhass: so they didn't even realize you released af7f2674 in 1.0.3? :D
[13:27:08] ndrei: has joined #ruby
[13:27:28] Scripore: has joined #ruby
[13:27:59] mary5030: has joined #ruby
[13:28:20] Muhannad: has joined #ruby
[13:28:49] allcentury: has joined #ruby
[13:28:57] startupality_: has joined #ruby
[13:29:08] lkba: has joined #ruby
[13:29:33] yorickpeterse: No idea, I blocked them
[13:29:50] yorickpeterse: (I think you can still read issues and such then)
[13:30:04] CloCkWeRX: has left #ruby: ()
[13:30:04] adaedra: People are so wonderful
[13:32:18] ziprar: has joined #ruby
[13:32:18] ziprar: has joined #ruby
[13:33:17] infoget: has joined #ruby
[13:35:11] Parker0: has joined #ruby
[13:36:08] devdazed: has joined #ruby
[13:36:15] freerobby: has joined #ruby
[13:36:50] senayar: has joined #ruby
[13:36:50] senayar: has joined #ruby
[13:37:33] pyroar: has joined #ruby
[13:37:39] corehook: has joined #ruby
[13:37:54] ndrei: has joined #ruby
[13:38:58] diegoviola: has joined #ruby
[13:39:05] granthatcher: has joined #ruby
[13:39:48] starfox_sf: has joined #ruby
[13:42:03] northfurr: has joined #ruby
[13:42:28] thalassa: has joined #ruby
[13:44:14] yorickpeterse: If it wasn't for some of the wonderful people I've come across I probably would've (??????????)?????? ????????? and become a gardener instead
[13:44:17] exadeci: has joined #ruby
[13:46:17] JEG2: has joined #ruby
[13:46:20] darkf: has joined #ruby
[13:46:25] jesterfraud: has joined #ruby
[13:46:42] livathinos: has joined #ruby
[13:47:10] Ropeney: has joined #ruby
[13:48:11] quazimodo: do we have a super light weight object for holding onto larger collections of relatively dumb objects?
[13:48:23] quazimodo: sorry, to be elements of a collection
[13:48:30] yorickpeterse: You mean an array?
[13:48:37] quazimodo: It's late and i'm retarded
[13:48:41] quimrstorres: has joined #ruby
[13:48:43] quazimodo: i want lots (millions) of objects
[13:48:45] adaedra: Don't say that
[13:48:50] quazimodo: they have limited functionality
[13:48:52] ljarvis: sounds like you want an array
[13:48:55] quazimodo: what's the best objcet to use for tha
[13:49:01] CrazyHorse18: has joined #ruby
[13:49:02] yorickpeterse: quazimodo: your own class
[13:49:09] quazimodo: an array of what kind of objects though
[13:49:23] yorickpeterse: quazimodo: do you want to have some object for every thing, or one object to store all things in?
[13:49:24] adaedra: an array of your dumb objects?
[13:49:45] quazimodo: now does ruby have a notion of a 'dumb' object
[13:49:57] ljarvis: i dont even
[13:49:57] quazimodo: something that takes less memory and has less infrastructure ?
[13:50:06] adaedra: what do you call a dumb object
[13:50:10] ljarvis: quazimodo: just use a class with the attributes you want
[13:50:16] Kricir: has joined #ruby
[13:50:23] adaedra: if you just need attributes, look at Struct
[13:50:28] yorickpeterse: quazimodo: the methods and what not in an object don't directly dictate how heavy they are
[13:50:36] quazimodo: yorickpeterse: sure
[13:50:50] yorickpeterse: So just use your own class
[13:50:56] quazimodo: yorickpeterse: i thought perhaps theres a ruby object that is ... some sort of abstraction of a very light c structure
[13:51:14] umgrosscol: has joined #ruby
[13:51:23] yorickpeterse: Struct is probably closest, but it's not really any more lightweight than a regular class
[13:51:31] msnyon: has joined #ruby
[13:51:50] quazimodo: actually, i know very little about what Struct is for
[13:51:53] quazimodo: i know what it can do
[13:51:58] sarkyniin: has joined #ruby
[13:52:02] quazimodo: but no idea what problem it was invented to solve
[13:52:19] quazimodo: ACTION googlse
[13:52:23] adaedra: Struct is a short way to have a class with only public rw attributes
[13:52:30] yorickpeterse: https://eval.in/382588 yay got my basic serializer thing
[13:52:36] yorickpeterse: now I need to decide if I actually want this in the first place
[13:52:42] yorickpeterse: because I cbf testing/maintaining/etc this
[13:53:29] evanjs: has joined #ruby
[13:53:33] sarkyniin: has joined #ruby
[13:54:03] havenwood: has joined #ruby
[13:54:04] RegulationD: has joined #ruby
[13:54:14] alphaatom: has joined #ruby
[13:54:43] quimrsto_: has joined #ruby
[13:54:43] sandelius: has joined #ruby
[13:55:03] hinbody: has joined #ruby
[13:55:27] alphaatom: has joined #ruby
[13:55:29] jnormandeau: Hello everyone, I have been getting intermittent timeouts from rubygems.org when installing gems. According to the uptime section of the site everything seems to be working fine. Has anyone else been having issues?
[13:55:49] skyrocker: has joined #ruby
[13:55:55] skyrocker: has left #ruby: ()
[13:56:05] adaedra: Check your RJ45 cable
[13:56:50] quimrsto_: has joined #ruby
[13:57:02] quazimodo: class Address < FFI::Struct
[13:57:05] jnormandeau: All the networking on my end has been thoroughly checked
[13:57:09] quazimodo: that's incredibly interesting
[13:57:28] jnormandeau: I get : Errno::ETIMEDOUT: Connection timed out - connect(2) (http://rubygems.org/latest_specs.4.8.gz) but if I open it in my browser there is no problem
[13:57:29] Rubie: has joined #ruby
[13:58:14] adaedra: why are you in FFI quazimodo
[13:58:22] adaedra: You do C interfacing?
[13:58:34] alphaatom|pc: has joined #ruby
[13:58:50] dorei: has joined #ruby
[13:59:23] caseypatrickdris: has joined #ruby
[14:00:52] jhass: jnormandeau: run mtr rubygems.org for a while, check where it breaks
[14:01:25] Zai00: has joined #ruby
[14:01:45] alphaatom: has joined #ruby
[14:03:03] dstarh: has joined #ruby
[14:05:01] acovrig: has joined #ruby
[14:05:16] Xeago: has joined #ruby
[14:06:47] sinkensabe: has joined #ruby
[14:06:51] jonathanwallace: has joined #ruby
[14:07:12] emilkarl: has joined #ruby
[14:07:12] rbennacer: has joined #ruby
[14:08:23] paulcsmith: has joined #ruby
[14:08:50] Scroff: has joined #ruby
[14:08:53] quazimodo: adaedra: curiosity :)
[14:09:05] tvw: has joined #ruby
[14:09:26] adaedra: quazimodo: I was talking about Struct in stdlib, not FFI. FFI::Struct is aimed at C interfacing.
[14:09:37] quazimodo: adaedra: i know :)
[14:09:57] jhass: FFI::Struct will be more expensive than a normal class
[14:10:38] davedev24_: has joined #ruby
[14:11:00] patrickanth0ny: has joined #ruby
[14:11:12] j4cknewt: has joined #ruby
[14:11:39] hoov: has joined #ruby
[14:11:39] quazimodo: jhass: it's cool, all I'm doing atm is learning
[14:12:03] druznek: has joined #ruby
[14:13:08] Cust0sLim3n: has joined #ruby
[14:13:43] quazimodo: for super awesome ness if i was to make an FFI::Struct with strings i think I need to malloc a space for a char array and return a pointer ... or someting
[14:13:49] bmalum: has joined #ruby
[14:14:00] joaomdmoura: has joined #ruby
[14:14:06] yorickpeterse: quazimodo: sounds a bit like you're overcomplicating things
[14:14:21] jpfuentes2: has joined #ruby
[14:14:26] jhass: quazimodo: so you're not doing anything business critical?
[14:14:37] musgravejw: has joined #ruby
[14:15:00] quazimodo: nah not at all
[14:15:03] musgravejw: has joined #ruby
[14:15:04] quazimodo: i'm playing :)
[14:15:19] quazimodo: i wouldn't do any of this in client code
[14:15:22] ruby-lang768: has joined #ruby
[14:15:24] jhass: check crystal which lets you explore low level memory access and structuring with a familiar ruby like syntax
[14:15:24] emilkarl: has joined #ruby
[14:15:35] dopie: has joined #ruby
[14:15:37] quazimodo: i'd either whack my data into an in memory db or just use classes :)
[14:15:58] acovrig_: has joined #ruby
[14:16:34] jnormandeau: jhass: I have been running mtr for a few minutes and getting a ~80% loss from ae-2-52.edge2.Seattle1.Level3.net and the last entry is ??? with 100% loss
[14:16:38] yorickpeterse: Memory wise moving things to FFI wouldn't make a huge difference
[14:16:50] yorickpeterse: You'd still need to allocate FII::Struct objects
[14:16:56] msnyon: has joined #ruby
[14:16:56] jhass: jnormandeau: which IP does rubygems.org resolve to for you?
[14:16:58] quazimodo: yorickpeterse: sure
[14:17:13] jnormandeau:
[14:17:15] InternetFriend: has joined #ruby
[14:17:44] fabrice31_: has joined #ruby
[14:17:48] jhass: mmh, same
[14:18:15] jhass: mmh, yeah looks like the host drops icmp traffic or something
[14:18:17] byprdct: has joined #ruby
[14:18:33] jhass: but the 80% loss on the level3 router aren't good
[14:18:45] fabrice31_: has joined #ruby
[14:19:34] jhass: I get a route far into amazons network here
[14:19:43] jhass: coming in via telia
[14:19:58] casadei: has joined #ruby
[14:20:03] jhass: so I guess amazon has some troubles on its level3 link in seattle
[14:20:27] mleung: has joined #ruby
[14:20:44] jnormandeau: jhass: Are you also getting 80% packet loss from ae-2-52.edge2.Seattle1.Level3.net
[14:20:59] jhass: my route doesn't even touch that, as said I'm coming in via telia
[14:21:07] revath: has joined #ruby
[14:21:38] Abhijit: has joined #ruby
[14:21:53] jenrzzz: has joined #ruby
[14:22:07] JakFrist: has joined #ruby
[14:22:28] jhass: so you can try to contact level 3 or try to tell amazon or your ISP to do that
[14:22:46] adaedra: TIL about mtr
[14:22:53] jhass: but given it's level 3 and amazon, I'd expect that issue to resolve itself in a couple of hours
[14:23:00] veinofstars: has joined #ruby
[14:23:16] jnormandeau: jhass: Thanks a lot for the help, its been happening since yesterday. I will try to change my route
[14:23:37] datanoise: has joined #ruby
[14:24:20] quazimodo: will the gc dealloc these structs?
[14:25:08] volty: has joined #ruby
[14:25:22] jhass: hi Abhijit
[14:25:55] timonv: has joined #ruby
[14:26:33] Kricir: has joined #ruby
[14:27:23] kies: has joined #ruby
[14:28:13] someword: has joined #ruby
[14:29:13] sharpmachine: has joined #ruby
[14:29:40] fusillicode: has joined #ruby
[14:29:45] fusillicode: has left #ruby: ()
[14:30:01] CrazyHorse18: has joined #ruby
[14:30:08] nonparfumee: has joined #ruby
[14:31:22] Spami: has joined #ruby
[14:32:16] Scroff: has joined #ruby
[14:32:38] nofxx: has joined #ruby
[14:32:38] nofxx: has joined #ruby
[14:32:49] langlands: has joined #ruby
[14:33:17] startupality: has joined #ruby
[14:33:45] dudedudeman: morning folks
[14:33:50] segfalt_: has joined #ruby
[14:34:44] quazimodo: ffi::struct almost crashed my system when i tried to build a million of them
[14:34:52] mleung: has joined #ruby
[14:35:25] quazimodo: i guess it makes sense though
[14:35:27] havenwood: quazimodo: Does ten million get rid of the "almost" part?
[14:35:47] yorickpeterse: quazimodo: You have to manually free FFI::Struct objects by calling "free" on them IIRC
[14:35:51] quazimodo: all the other crap 'wrapping' up the c structs and varios pointers etc would add immense amount of crud
[14:35:59] yorickpeterse: I don't think FFI defines any finalizers for them
[14:36:00] quazimodo: yorickpeterse: i killed the process XD
[14:36:05] yorickpeterse: Ah, that works too
[14:36:08] InternetFriend: has joined #ruby
[14:37:11] adaedra: Array.new(1000000) { Object.new } works fine though.
[14:37:12] Scroff: has joined #ruby
[14:37:16] aryaching: has joined #ruby
[14:38:43] GPrime: has joined #ruby
[14:39:23] symm-: has joined #ruby
[14:39:31] treehug88: has joined #ruby
[14:39:32] alphaatom: has joined #ruby
[14:40:13] adaedra: (Still, I wonder what you need 1'000'000 objects for.)
[14:40:27] skade: has joined #ruby
[14:41:23] mikecmpbll: has joined #ruby
[14:42:00] jhass: gotta get the big into the data!
[14:42:51] dfockler: has joined #ruby
[14:42:58] drewo: has joined #ruby
[14:43:04] quazimodo: adaedra: why do I need to have a need for them?
[14:43:10] quazimodo: why can't I just do it for the fun of it?
[14:43:23] yorickpeterse: no fun allowed
[14:43:30] quazimodo: yeah i guess
[14:43:42] adaedra: ACTION shrugs
[14:44:00] quazimodo: crystal is like
[14:44:06] quazimodo: "ruby but with c"
[14:44:14] quazimodo: and that sounds like haskell :Y
[14:44:20] freerobby: has joined #ruby
[14:44:36] mcclurmc_: has joined #ruby
[14:44:37] yorickpeterse: I'm a bit surprised it has a nil though
[14:44:39] ZYPP: has joined #ruby
[14:44:47] yorickpeterse: but at least the compiler detects it I believe
[14:44:59] JakFrist: has joined #ruby
[14:45:12] GPrime: has joined #ruby
[14:45:29] jhass: yorickpeterse: yeah, not a special property of nil though
[14:45:49] quazimodo: I think the guys at haskell got it rigth
[14:45:50] jhass: it just won't let you call stuff that "looks like it could be a String or nil"
[14:46:05] yorickpeterse: jhass: well yeah
[14:46:06] jhass: when just one of them has the method that is
[14:46:13] Ray`: has joined #ruby
[14:46:15] yorickpeterse: but that begs the question: why not use an Option/Maybe/whatever
[14:46:38] jhass: it still may happen
[14:46:39] yorickpeterse: maybe I've been doing too much Rust though
[14:47:08] jhass: it started by resembling Ruby as much as possible and then looking into where it needs to derive in order to work/make sense as a compiled language
[14:47:19] acovrig: has joined #ruby
[14:47:23] acovrig: I???m installing ruby and am getting ???~/.rvm/scripts/cli: line 855: 18651 Killed "$rvm_scripts_path/set" "$rvm_action" "${rvm_ruby_args[@]}?????? when running ???curl -L get.rvm.io | bash -s stable --rails??? any ideas?
[14:47:39] jhass: wild guess: you ran out of memory
[14:47:53] adaedra: yeah, look into system logs, processes are not killed for fun
[14:47:57] dmolina: has joined #ruby
[14:48:14] Rubie: has joined #ruby
[14:48:23] enebo: has joined #ruby
[14:49:45] fujimura: has joined #ruby
[14:49:54] jhass: yorickpeterse: https://news.ycombinator.com/item?id=9669562
[14:51:15] yorickpeterse: jhass: oh yeah, I've read the page before
[14:51:23] yorickpeterse: However, they make one mistake
[14:51:28] yorickpeterse: a nill error is not a null pointer exception
[14:51:31] yorickpeterse: The two are very different
[14:51:50] ogpastaling: has joined #ruby
[14:52:34] volty: the meaning of nil depends upon context
[14:52:36] hotpancakes: has joined #ruby
[14:52:45] ogpastaling: has joined #ruby
[14:52:49] jhass: yes the semantics differ but I think the generalization is okay there since the frustration point is essentially the same
[14:53:16] hal_9000: i think the underlying ???deep semantics??? are the same
[14:54:05] yorickpeterse: Well yeah, the result is still the same: stuff doesn't work
[14:54:05] gambl0re: has joined #ruby
[14:54:19] rippa: has joined #ruby
[14:54:23] yorickpeterse: But NULL is really just 0x0 or void memory, nil is just an object you can't do much with
[14:54:27] Polysics: has joined #ruby
[14:54:35] yorickpeterse: e.g. you usually can't do something like `if NULL.respond_to?(...)`
[14:54:44] yorickpeterse: but `if nil.respond_to?(...)` works fine
[14:54:50] yorickpeterse: It doesn't really help that sometimes people mix the two names
[14:55:01] bigkevmcd: has joined #ruby
[14:55:34] yorickpeterse: You can actually very easily fix all your nil problems in Ruby
[14:55:43] yorickpeterse: >> class NilClass; def method_missing(*); nil; end; end
[14:55:45] ruboto: yorickpeterse # => :method_missing (https://eval.in/382596)
[14:55:49] yorickpeterse: >> class NilClass; def method_missing(*); nil; end; end; nil.lol
[14:55:50] ruboto: yorickpeterse # => nil (https://eval.in/382597)
[14:55:53] jhass: you could do the same in crystal :P
[14:56:05] adaedra: Obj-C style
[14:56:25] jhass: anyway, "fix", I think that just replaces runtime with logic bugs
[14:56:38] jhass: you didn't expect to have nil there but you got it
[14:56:56] jhass: crystal forces you to handle it before you can run your program at least
[14:57:41] tomphp: has joined #ruby
[14:58:10] yorickpeterse: jhass: that's the beauty of it, nil can be coerced to most other objects
[14:58:16] yorickpeterse: although you have to explicitly do so
[14:58:27] yorickpeterse: Granted it _is_ better to prevent a nothingness "thing" from originating in the first place
[14:59:00] Soda: has joined #ruby
[15:00:09] alphaatom: has joined #ruby
[15:00:13] RegulationD: has joined #ruby
[15:00:20] _seanc_: has joined #ruby
[15:00:34] volty: with ruby's nil we have everything, with haskell's skill we are overcomplicating
[15:00:36] joaomdmoura: has joined #ruby
[15:02:03] jmignault: has joined #ruby
[15:02:32] centrx: crazy beatniks
[15:02:59] yqt: has joined #ruby
[15:04:53] kekumu: has joined #ruby
[15:04:54] Jimtemp: has joined #ruby
[15:05:23] kahuna_: has joined #ruby
[15:06:43] volty: One day I went to (try to) parse html with one of haskell's libraries (very beginner's parsing, of course). There I found the proof that this elegant language was good just for impressive fibonacci generators (and other infinite structures, of course). They defined so many operators - pretending to impress or to make you believe the parsing is easier using operators instead of simple meaningful verbs
[15:08:10] yalue: has joined #ruby
[15:08:33] segfalt: has joined #ruby
[15:09:57] quazimodo: sql is really interesting
[15:10:07] quazimodo: the whole 'set theory' stuff involved
[15:10:08] Cust0sLim3n: has joined #ruby
[15:10:12] kobain: has joined #ruby
[15:10:16] Scroff: has joined #ruby
[15:10:58] rbennacer: has joined #ruby
[15:10:59] quazimodo: anyone heard of a gem that brings the language of relational data stores to more abstract objects, not necessarily table rows
[15:11:19] hotpancakes: has joined #ruby
[15:11:26] wasamasa: guess what's using it
[15:11:52] allcentury: has joined #ruby
[15:11:57] quazimodo: yeah but that's about database stuff
[15:12:02] quazimodo: it builds sql that gets sent to a db
[15:12:06] quazimodo: what if we have no db at all
[15:12:24] quazimodo: just a collection of collections of objets
[15:12:37] quazimodo: and we wanted to do things like 'where' clauses to reduce the number of records down
[15:12:43] yorickpeterse: quazimodo: https://github.com/rom-rb/rom
[15:12:57] yorickpeterse: They have some stuff for relational algebra that works on non database objects
[15:13:05] quazimodo: yorickpeterse: relational algebra *yay*
[15:13:16] volty: I do not believe so. The non-table data is too specific for a generalization.
[15:13:29] roolo: Hey guys, i a bit ashamed to ask, but what am I doing wrong? When i call method from method_missing the method gots nothing/nil -- https://github.com/roolo/mind_meister_client/blob/master/lib/mind_meister_client.rb#L58
[15:13:30] quazimodo: volty: whatcha mean?
[15:13:33] rcvalle: has joined #ruby
[15:13:46] roolo: Am i using some reserved words, or what?
[15:13:54] roolo: Reproducible via running specs
[15:13:55] quazimodo: roolo: ashamed? have you seen the questions that I ask??
[15:14:04] konieczkow: has joined #ruby
[15:14:17] volty: I remember a prolog lib used to store its asserts into a db and use them transparently.
[15:14:34] apoplexy: has joined #ruby
[15:14:36] quazimodo: what's a prolog assert
[15:14:41] jhass: roolo: for starters add a call to super in the else branch
[15:14:43] bashusr: has joined #ruby
[15:14:46] yorickpeterse: quazimodo: https://github.com/rom-rb/rom#synopsis actually has an example without databases
[15:14:46] roolo: quazimodo: I kinda do not get what are you asking about :)
[15:14:53] wasamasa: kids, don't you ever forget the term rdbms
[15:14:56] Narzew: has joined #ruby
[15:15:17] Scroff: has joined #ruby
[15:15:29] wasamasa: I'm getting sort of upset over the misusage of "database" for it
[15:15:39] quazimodo: wasamasa: why?
[15:15:42] quimrstorres: has joined #ruby
[15:15:45] volty: quazimodo: facts & rules
[15:15:48] wasamasa: quazimodo: a csv file is a database, that's why
[15:15:48] nikhgupta: has joined #ruby
[15:15:54] quazimodo: sure there are other databases, but when the world has rdbms
[15:16:07] wasamasa: quazimodo: so is /etc/passwd
[15:16:15] sluukkonen: has joined #ruby
[15:16:16] quazimodo: i think the ubiquitousness of rdmbs has lead to that
[15:16:26] quazimodo: also the enchanting elegance of it
[15:16:30] alphaatom: has joined #ruby
[15:16:38] wasamasa: clearly you've never looked at their architecture then
[15:16:49] quazimodo: i like the maths
[15:16:56] balazs: has joined #ruby
[15:16:57] quazimodo: the implementation details escape me, a lot
[15:17:07] wasamasa: the math is a whole lot simpler than what's actually implemented
[15:17:15] wasamasa: http://perspectives.mvdirona.com/content/binary/ArchitectureOfDatabaseSystem.pdf
[15:17:18] quazimodo: unsurprising
[15:17:24] wasamasa: scroll down to figure 1.1
[15:17:33] veinofstars: has joined #ruby
[15:17:41] quazimodo: i always wanted to know how
[15:17:48] yorickpeterse: Surely a database is just a matter of writing to /dev/null
[15:17:54] jhass: roolo: https://github.com/roolo/mind_meister_client/blob/master/lib/mind_meister_client.rb#L92 you don't return anything in the success case
[15:18:06] wasamasa: yorickpeterse: sounds webscale
[15:18:06] yorickpeterse: that's like how half of the NoSQL databases work anyway
[15:18:12] roolo: jhass: Now it makes even less sense. It is complaining about undefined variable in method_missing, which is used in the prepare_api_method :/
[15:18:13] jhass: >> def foo; if false; true; end; end; foo # roolo
[15:18:14] ruboto: jhass # => nil (https://eval.in/382602)
[15:18:27] shinnya: has joined #ruby
[15:18:42] quazimodo: looks like the stuff involved in actually doing the maths is only very small
[15:18:54] quazimodo: the rest is about resource management, access and query parsing/building
[15:18:58] wasamasa: quazimodo: the reason why it's recommended to use a RDBMS is because these things have a boatload of features and are the best studied systems to store your data in and to optimize
[15:19:13] jhass: https://github.com/roolo/mind_meister_client/blob/master/lib/mind_meister_client.rb#L117-L118 ?
[15:19:24] jhass: if it's commented out that's quite expected
[15:19:35] wallace1: has joined #ruby
[15:19:39] wasamasa: heck, sometimes it's as simple as just adding indexes and using EXPLAIN judiciously to find out why
[15:19:40] k3asd`: has joined #ruby
[15:19:48] roolo: jhass: I am not that far yet. Right now i want to make the call, then i'll solve what to do with it
[15:19:55] wasamasa: or making the queries your ORM generates more specific
[15:20:13] roolo: What i've forgot to say, it is wip
[15:20:16] quimrstorres: has joined #ruby
[15:20:21] quazimodo: wasamasa: i've been bitten by prematurely moving to document stores
[15:20:24] pipework: wip it good
[15:20:31] roolo: So some things should be erased and some are missing
[15:20:33] quazimodo: structured relational data should go into postgres :P
[15:20:38] jhass: roolo: so, the again, what exactly is your issue?
[15:20:44] bashusr: has joined #ruby
[15:20:58] workmad3: quazimodo: unstructured data should probably also go in postgres too ;) JSON and JSONB column types FTW!
[15:21:22] volty: I think that we are condemned to think in terms of tables. When we need higher abstractions we not only use tables, but also have to resort to tables if some problem (out of complexity) arises out. Similar to xml ??? human readable, in case we get lost, but you can project an entire plane using it.
[15:21:26] quazimodo: ACTION wishes the publishing world had a law, first edit = remove 30% of words. Second edit removes another 10-20%. Publish
[15:21:42] volty: (use tables beneath, I mean)
[15:21:43] roolo: jhass: When it come to `api_method_name = prepare_api_method what_was_called` the prepare_api_method get nil for what_was_called
[15:21:48] quazimodo: workmad3: lol yeah can you believe how bad they smash mongo
[15:21:51] quazimodo: stupid mongo
[15:21:54] yorickpeterse: I wish papers were written in plain English
[15:22:05] yorickpeterse: it certainly would've made things a lot easier
[15:22:20] roolo: (recently what_was_called was ruby_method_name, but i thought i am messing with some reserved words)
[15:22:27] quazimodo: mongo is proof that a stupid thing + massive, excessive, drowning deafening nerd hype + *stupid* js developers = relatively successful brain virus
[15:22:31] yorickpeterse: also I really dislike the 2 column layout they usually use
[15:22:47] ChanServ: -b g0rx!*@*
[15:22:56] quazimodo: roolo: i use
[15:22:58] volty: agree ??? too much ??missed poetry writers?? out there :)
[15:23:26] quazimodo: def method_missing(mid, *args)
[15:23:29] jhass: roolo: I kinda doubt that's actually happening in the code that's on github
[15:23:44] aapole: has joined #ruby
[15:23:52] quazimodo: because openstruct uses mid or some reason
[15:23:56] revath: has joined #ruby
[15:23:58] quazimodo: message_id? i dno
[15:24:16] ZOMGITSABEAR: from a complete nob with no programming experience, how soon should i expect to grasp ruby enough to the point to where i'm writing my own programs?
[15:24:41] volty: it all depends on your talent :)
[15:24:43] yorickpeterse: ZOMGITSABEAR: depends on the time you invest in it
[15:24:46] kinduff: has joined #ruby
[15:24:47] centrx: ZOMGITSABEAR, Hello World is a program, so you can start quickly
[15:25:04] erts: has joined #ruby
[15:25:17] ZOMGITSABEAR: i hardly consider Hello World a program :p
[15:25:23] Scrofff: has joined #ruby
[15:25:38] volty: ZOMGITSABEAR: state an example. A program of yours to do what?
[15:26:09] ZOMGITSABEAR: idk.. irc bot
[15:26:24] volty: that's too easy :)
[15:26:24] dzejrou: has joined #ruby
[15:26:28] roolo: jhass: Aaaaa, so ruby was right and i am asshole. I am really using rrong variable name in that method :)
[15:26:28] yorickpeterse: depending on the IRC bot library you'd use
[15:26:39] ertse: has joined #ruby
[15:26:39] volty: without library
[15:26:44] quazimodo: ZOMGITSABEAR: from a beautiful magestic man, not long
[15:26:47] quazimodo: ruby's easy
[15:26:48] volty: I guess and suggest
[15:26:49] yorickpeterse: ZOMGITSABEAR: for Ruby there's https://github.com/cinchrb/cinch
[15:26:57] jhass: roolo: don't be so self derogating
[15:27:03] yorickpeterse: Also IRC without a library is anything but easy, you'd have to understand the IRC protocol
[15:27:09] ZOMGITSABEAR: but what does the library do in terms of irc bot creation
[15:27:09] yorickpeterse: Which, for somebody new to programming, is a lot to take in
[15:27:11] quazimodo: i learnt ruby/rails by looking in gumtree(craigslist) for someone who wanted cheap software made
[15:27:17] quazimodo: then i made it for him via rails project
[15:27:23] roolo: jhass: But still ty. The else branch in method_missing pointed me to that
[15:27:24] yorickpeterse: ZOMGITSABEAR: all of the boring work such as connecting, handling what's needed to join a channel, etc
[15:27:24] quazimodo: i learnt and got paid a bit
[15:27:35] ccooke: IRC is not, at least, a seriously difficult protocol
[15:27:43] granthatcher_: has joined #ruby
[15:27:48] sepp2k: has joined #ruby
[15:27:50] volty: a good library should do everything, so, on your part, you have only to command it.
[15:27:52] quazimodo: good benefit o having to handle a stupid customer that's cheap, deadlines to learn and act etc
[15:27:53] lake: has joined #ruby
[15:27:54] apoplexy_da_boss: has joined #ruby
[15:27:59] roolo: jhass: What is derogating?
[15:28:02] ZOMGITSABEAR: ok, so let's say we're talking about a plug.dj bot
[15:28:05] Channel6: has joined #ruby
[15:28:10] quazimodo: ZOMGITSABEAR: go find a client
[15:28:13] roolo: jhass: The translation i've found does not make much sense
[15:28:22] workmad3: roolo: I think he meant derogatory
[15:28:23] ZOMGITSABEAR: or paid client?
[15:28:24] tomphp_: has joined #ruby
[15:28:25] quazimodo: someone who wants software made
[15:28:31] starfox_sf: has joined #ruby
[15:28:32] quazimodo: get him to pay you to do it
[15:28:39] NeverDie: has joined #ruby
[15:28:43] yorickpeterse: ZOMGITSABEAR: are you 100% new to programming?
[15:28:43] michael_mbp: has joined #ruby
[15:28:46] quazimodo: really, really sped up my learning speed
[15:28:51] ZOMGITSABEAR: i don't even know the syntax
[15:28:55] jhass: workmad3: roolo eh, yes
[15:28:55] ZOMGITSABEAR: thats how new i am
[15:28:57] quazimodo: neither did i !
[15:29:09] volty: he is virgin, already said :)
[15:29:15] yorickpeterse: ZOMGITSABEAR: http://railsgirls.com/materials good start
[15:29:15] ZOMGITSABEAR: does everyone here agree with quazimodo?
[15:29:22] quazimodo: ZOMGITSABEAR: they probably don't
[15:29:25] workmad3: jhass: or maybe self-deprecating?
[15:29:26] yorickpeterse: https://rubymonk.com/ is also a good start
[15:29:36] jhass: workmad3: ssh, I don't know :P
[15:29:39] yorickpeterse: Take small steps, don't instantly try to climb a mountain
[15:29:45] quazimodo: ZOMGITSABEAR: i figure, always get someone else to pay or you to learn
[15:29:51] roolo: jhass workmad3: Ah, the translation makes just a bit more sense, but i think i've got your thought ;)
[15:29:54] ZOMGITSABEAR: i was told to start with pine.fm
[15:29:57] jackjackdripper: has joined #ruby
[15:30:13] ZOMGITSABEAR: here in this channel last night
[15:30:17] Cache_Money: has joined #ruby
[15:30:17] senayar: has joined #ruby
[15:30:34] ZOMGITSABEAR: it's a website by some dude called pine or something
[15:30:38] ZOMGITSABEAR: and it has a tutorial on it
[15:30:47] jhass: Learn to program by Chris Pine ;)
[15:31:33] bwicklund: http://www.amazon.com/Ruby-Programming-Language-David-Flanagan/dp/0596516177/ref=sr_1_1?s=books&ie=UTF8&qid=1434468666&sr=1-1&keywords=the+ruby+programming+language
[15:31:39] quazimodo: jhass and chris pine had a romantic relationship
[15:31:40] skade: has joined #ruby
[15:31:40] ZOMGITSABEAR: so where do i go to find clients
[15:31:46] quazimodo: craigslist :D
[15:31:51] ZOMGITSABEAR: if it'll speed up my learning, might as well go for it
[15:32:14] momomomomo: has joined #ruby
[15:32:16] yorickpeterse: ZOMGITSABEAR: honestly just take it slow
[15:32:21] yorickpeterse: clients will introduce stress, deadlines, etc
[15:32:27] quazimodo: ZOMGITSABEAR: do some initial discovery etc
[15:32:30] centrx: clients? You've gone from "never programmed before" to founding a consultancy in 10 minutes?
[15:32:30] quazimodo: get a basic feel
[15:32:31] yorickpeterse: plus you have to maintain whatever you make (likely)
[15:32:33] quazimodo: then decide :D
[15:32:41] volty: my receipt: 1) start with exchanging messages (two apps) using a file 2) switch to drb 3) switch to tcp 4) then other, higher, protocols
[15:33:35] volty: as for the speed I agree with yorickpeterse ??? our neurals need time to organize (WELL) the new information & paradigms
[15:33:39] quazimodo: I actually did maintain for a year
[15:33:43] ZOMGITSABEAR: centrx, i'm just doing what quazimodo said would speed up my learning
[15:33:45] quazimodo: then i fucked the guy off
[15:33:50] JimBurns83: has joined #ruby
[15:33:55] maxshelley: has joined #ruby
[15:34:12] centrx: ZOMGITSABEAR, he sounds like a lunatic!
[15:34:18] bwicklund: At least learn the syntax first then you can start reading other peoples code
[15:34:34] volty: or, ZOMGITSABEAR, you can invest a few month asking around what could speed you up :)
[15:34:47] quazimodo: the thing i wrote for him takes a 3 hour process to about 1.5 hours each day with about 17 workers + himself. Thats like 24 hours a day of productivity
[15:34:51] GPrime: ZOMGITSABEAR if you're coming completely new to ruby, i recommend http://learnrubythehardway.org
[15:34:53] quazimodo: took me 8 weeks to write that thing
[15:34:58] quazimodo: i got abut 3k out of it
[15:35:16] quazimodo: it's worth 38 * 6 * 24 * 24
[15:35:20] quazimodo: per year to the guy
[15:35:43] langlands: has joined #ruby
[15:35:54] jhass: -1 to the hard way, the used style is not very idiomatic Ruby
[15:36:11] quazimodo: cheap skate is still trying to suck free features/maintenance from me
[15:36:11] leekme: has joined #ruby
[15:36:22] quazimodo: i told him, for me to turn my brain on for the project would be $400
[15:36:25] leekme: Hey guys, could someone explain me what I miss understand in begin / rescue blocks ? -> https://gist.github.com/anonymous/54773c9f197254727414 Thanks
[15:36:34] k3asd`_: has joined #ruby
[15:36:38] quazimodo: ZOMGITSABEAR: always remember, you sell a service not a product
[15:36:48] volty: time to absorb ??? there are ppl that need more time, there are others that need less. monkeys grow faster but stop sooner
[15:36:58] ZOMGITSABEAR: quazimodo: that feels a bit like common sense
[15:37:31] Mon_Ouie: leekme: 'rescue' without a class name is rescue StandardError, it only rescues exceptions that are instances of subclasses of StandardError
[15:37:38] sharpmachine: has joined #ruby
[15:37:39] paulcsmith: has joined #ruby
[15:37:42] GPrime: jhass Oh i guess that's true
[15:37:46] quazimodo: ZOMGITSABEAR: we have an eternal tug of war with clients over that very concept
[15:37:55] Darkwater: well adaedra
[15:37:59] Darkwater: I finally got ruby-ed to work
[15:38:00] GPrime: jhass what site would you recommend?
[15:38:04] granthatcher: has joined #ruby
[15:38:09] adaedra: Darkwater: nice
[15:38:10] Darkwater: the main issue was sed being buffered -.-"
[15:38:11] paulcsmith_: has joined #ruby
[15:38:21] Darkwater: so output wasn't sent immediately
[15:38:25] leekme: Mon_Ouie: Thank's ;) Is there a way to rescue any kinds of exceptions ?
[15:38:36] Darkwater: but yeah, it's all set now
[15:38:42] jhass: GPrime: Pine's seems generally recommended and I haven't heard many complaints about it
[15:38:47] granthatcher: has joined #ruby
[15:38:47] momomomomo: has joined #ruby
[15:38:49] Marsupermammal: has joined #ruby
[15:39:13] mdw: has joined #ruby
[15:39:17] kekumu: has joined #ruby
[15:39:25] Mon_Ouie: leekme: Explicitly 'rescue Exception'
[15:39:29] granthatcher: has joined #ruby
[15:40:03] volty: There are a number of stories about Euclid which may or may not be founded on truth. When King Ptolemy I of Egypt asked him for a short course in Geometry, he is reported to have replied that "there is no royal road to Geometry." Another story concerns a student who asked what was the use of learning Geometry. Euclid did not reply but instructed his servant to give the student a few coins since he must profit from all that
[15:40:05] volty: he learns.
[15:40:09] granthatcher: has joined #ruby
[15:40:18] leekme: Mon_Ouie: Thanks for your help, I will try this
[15:40:23] Mon_Ouie: (notice that in real code you should be as specific as you can be about what exceptions you rescue, and not catch all of them like that)
[15:40:30] phat4life: http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/0321490452 is this book worth getting?
[15:40:34] Darkwater: undeadaedra: it might not be a very smart idea to use apt-get over irc :v
[15:40:48] granthatcher: has joined #ruby
[15:40:55] snockerton: has joined #ruby
[15:41:03] undeadaedra: Darkwater: I don't see what you mean. What could go wrong? :v
[15:41:19] Darkwater: maybe the files will be asciified?
[15:41:29] granthatcher: has joined #ruby
[15:42:12] granthatcher: has joined #ruby
[15:42:31] BanzaiJoe: has joined #ruby
[15:42:35] Darkwater: undeadaedra: you should join me
[15:42:46] undeadaedra: where are you again?
[15:42:51] Darkwater: actually if anyone feels like rubying over irc
[15:42:51] granthatcher: has joined #ruby
[15:43:06] undeadaedra: you saw nothing
[15:43:11] Soda: has joined #ruby
[15:44:20] ZOMGITSABEAR: If you do not know how to use??PowerShell??on Windows,??Terminal??on OS X, or??bash??on Linux then you need to go learn that first. You should do the exercises in Appendix A first before continuing with these exercises.
[15:44:32] ZOMGITSABEAR: should i stop learning ruby and go learn powershell?
[15:44:36] Scroff: has joined #ruby
[15:44:45] ljarvis: everyone should learn powershell
[15:44:54] ljarvis: how do you even programwithout knowing it
[15:45:06] GPrime: my opinion is you can learn it as you go
[15:45:09] ljarvis: ZOMGITSABEAR: im kidding dont do that
[15:45:26] ZOMGITSABEAR: so i should just keep going?
[15:45:27] ljarvis: ZOMGITSABEAR: are you on windows?
[15:45:41] quazimodo: ZOMGITSABEAR: no
[15:45:49] undeadaedra: Learn to use your shell for basic things
[15:45:58] undeadaedra: change directories, run programs
[15:46:02] ljarvis: i'd keep going, if you get stuck then you can check out powershell docs but you should have a basic idea of how it works
[15:46:10] ZOMGITSABEAR: i can use cmd well enough
[15:46:12] quazimodo: ZOMGITSABEAR: your environment (windows, mac, linux{yay!}) is part of your toolset
[15:46:16] ZOMGITSABEAR: i know how to change directories and run programs
[15:46:17] quazimodo: you develop that as you go too
[15:46:24] nofxx: wtf is powershell?
[15:46:28] ljarvis: then you're good to go
[15:46:32] ljarvis: nofxx: windows
[15:46:45] fedexo: has joined #ruby
[15:47:03] ljarvis: ZOMGITSABEAR: also, you should totally sack off windows
[15:47:06] ljarvis: just sayin
[15:48:26] nofxx: ljarvis, ahh... as in windows 95? I remember, I have some (bad) memories.
[15:49:08] ljarvis: nofxx: no, powershell is built on .net I think. So Windows XP and later
[15:49:30] quazimodo: it's some piece of crap
[15:49:38] The_Phoenix: has joined #ruby
[15:49:41] ljarvis: nofxx: you're probably just thinking of cmd.exe
[15:49:44] quazimodo: ZOMGITSABEAR: you'll have the best time programming in a linux
[15:49:46] nofxx: ljarvis, joking about windows... hehe sadly that's not true... still need it to play asseto corsa =P
[15:49:53] quazimodo: macs come pretty close too
[15:50:08] quazimodo: but not all the way
[15:50:08] _seanc_: has joined #ruby
[15:50:10] ljarvis: nofxx: aye it's good for playing :)
[15:50:11] quazimodo: although they do look nice
[15:51:36] quazimodo: making half a million regular classes is faster than BasicObject
[15:51:52] _seanc_1: has joined #ruby
[15:52:30] ZOMGITSABEAR: when i'm opening a .txt file from powershell, what is the proper method?
[15:52:47] ZOMGITSABEAR: if i'm in the directory, don't i just type the name of the file?
[15:52:48] skysploit: has joined #ruby
[15:53:23] nonparfumee: has joined #ruby
[15:53:28] nikhgupta: has joined #ruby
[15:54:06] ljarvis: ZOMGITSABEAR: no that's for running executables, you'd need to run a command to open the file ie in a specific program
[15:54:09] quimrsto_: has joined #ruby
[15:54:19] sandstrom: has joined #ruby
[15:54:27] ljarvis: I think you can use the start command
[15:54:31] ZOMGITSABEAR: wait, i figured it out
[15:54:37] ljarvis: i.e start textedit c:\path\etc
[15:54:45] JakFrist: has joined #ruby
[15:54:55] ZOMGITSABEAR: "if you trust the program, instead type .\<fileneame>
[15:56:09] ZOMGITSABEAR: so what are array functions?
[15:56:27] yoongkang: has joined #ruby
[15:56:27] ljarvis: ZOMGITSABEAR: could you elaborate?
[15:56:50] ZOMGITSABEAR: Thanks to search engines such as Google you can easily find anything I tell you to find. If I say, "search online for the ruby array functions" then you simply do this:Go to??http://google.com/Type:??ruby array functionsRead the websites listed to find the best answer.
[15:56:52] ahmetkapikiran: has joined #ruby
[15:57:00] ZOMGITSABEAR: in the book that was suggested i read here
[15:57:10] ljarvis: what book is this?
[15:57:16] ZOMGITSABEAR: learn ruby the hard way
[15:57:23] ljarvis: it says "array functions"?
[15:57:28] startupality: has joined #ruby
[15:57:30] spider-mario: has joined #ruby
[15:57:36] BanzaiJoe: where's my hand? where's my face?
[15:57:44] BanzaiJoe: let's put the two together!
[15:57:53] Rubie: has joined #ruby
[15:58:00] BanzaiJoe: in Ruby Arrays are objects
[15:58:08] apeiros: there are no functions in ruby
[15:58:15] ljarvis: ZOMGITSABEAR: everything in Ruby is an Object, so there are no functions
[15:58:28] InternetFriend: has joined #ruby
[15:58:41] Abhijit: if everything is object then who is class?
[15:58:53] volty: a special object
[15:58:56] jhass: Abhijit: an instance of Class
[15:58:56] sharpmachine: has joined #ruby
[15:59:10] jhass: and yes, Class too is an instance of Class
[15:59:15] ljarvis: they're methods, and they all have receivers unless they're unbound
[15:59:22] undeadaedra: >> Class.class
[15:59:24] ruboto: undeadaedra # => Class (https://eval.in/382606)
[15:59:32] BanzaiJoe: oh yea, ruby baby
[15:59:52] quazimodo: building a million regular classes is 4 times quicker than structs
[16:00:09] towski_: has joined #ruby
[16:00:09] volty: >> Class.ancestors
[16:00:10] ruboto: volty # => [Class, Module, Object, Kernel, BasicObject] (https://eval.in/382607)
[16:00:30] quazimodo: to rephrase, a milion instances of regular classes is 4 times faster than a million instances of Struct
[16:00:40] BanzaiJoe: quazimodo but where's the sugar in that ;)
[16:00:54] ljarvis: you know what Struct does right?
[16:01:06] ljarvis: it's for convenience, not speed
[16:02:15] yorickpeterse: for real speed you should use OpenStruct
[16:02:16] undeadaedra: If you need speed at any price, go do C
[16:02:17] workmad3: quazimodo: could be worse... you could be using OpenStruct :D
[16:03:02] workmad3: OpenStruct - for people who think method caches are for wusses
[16:03:10] nikhgupta: has joined #ruby
[16:03:25] ljarvis: give me a cold method cache any day
[16:03:45] pontiki: has joined #ruby
[16:03:47] phat4life: what do you mean by method cache?
[16:03:51] yorickpeterse: IIRC it wrecked more than your method cache
[16:03:58] yorickpeterse: but I can't remember what it was
[16:04:22] yorickpeterse: phat4life: Ruby will remember where a method originated form when called
[16:04:24] volty: what should I use if I want something like ??ordered hash?? behavior ?
[16:04:29] quazimodo: using def initialize(args = {}) is like 2.5 x slower than def initialize(arg1, arg2, etc...)
[16:04:31] yorickpeterse: That way the next time it doesn't have to go through the pain of finding that out
[16:04:34] ljarvis: hashes aren't ordered
[16:04:42] yorickpeterse: volty: Ruby 1.9 has ordered hash keys
[16:04:42] phat4life: yorickpeterse: ah, so low level mri stuff?
[16:04:45] yorickpeterse: phat4life: yes
[16:04:52] ljarvis: yorickpeterse: stahp
[16:05:05] mleung: has joined #ruby
[16:05:19] ljarvis: loaded gun
[16:05:26] volty: thx, good to know
[16:05:37] ljarvis: see what you did
[16:05:47] volty: never mind, nothing critical
[16:05:53] phat4life: ljarvis: wait, so whats the deal with OpenStruct and method cache?
[16:06:30] yorickpeterse: ljarvis: honestly I don't really see the problem with depending on hash keys being ordered
[16:06:35] alphaatom: has joined #ruby
[16:06:44] k3asd`: has joined #ruby
[16:06:53] yorickpeterse: phat4life: OpenStruct clears a method cache upon every instance created
[16:07:08] yorickpeterse: errr as in, I think it clears the entire method cache
[16:07:13] yorickpeterse: but I haven't really kept up with it
[16:07:50] alphaatom: has joined #ruby
[16:07:57] Rubie: has joined #ruby
[16:08:28] quazimodo: I like openstruct or some things
[16:08:37] quazimodo: pretty nice for a flexible coniguration data type
[16:08:52] justintv90: has joined #ruby
[16:09:02] alphaatom: has joined #ruby
[16:09:16] apeiros: yorickpeterse: I think newer rubies improved somewhat in that regard
[16:09:21] dopie: has joined #ruby
[16:09:25] apeiros: but I think OS still leaks memory
[16:09:36] pengin: has joined #ruby
[16:09:37] michaeldeol: has joined #ruby
[16:10:02] apeiros: i.e. there was a "benchmark" somewhere where OS vs. Hash was like 80MB in difference in a real world application over a short period of time.
[16:10:38] quazimodo: OS leaks memory?
[16:10:41] volty: I like the hash syntax. I need it for fast assigning to various vars to be iterated over (for gui dialogs) . I need a tree-like structure that can preserve that order of inserting. That's all, for now.
[16:10:55] dfockler: has joined #ruby
[16:11:00] volty: s/that/the/
[16:11:08] yorickpeterse: https://gist.github.com/YorickPeterse/d2cc45fc7e9117bb8886 nuff said
[16:11:32] yorickpeterse: oh hm wait, I can actually test better if it still wrecks caches
[16:11:39] n1x: has joined #ruby
[16:11:52] opalraava: has joined #ruby
[16:12:09] apeiros: yorickpeterse: iirc (and not sure I do) it's code does not get GCed
[16:12:15] jenrzzz: has joined #ruby
[16:12:28] neanderslob: has joined #ruby
[16:13:45] apeiros: structs are quite fast and memory efficient
[16:14:06] platzhirsch: has left #ruby: ()
[16:15:09] datanoise: has joined #ruby
[16:15:28] AustinMatherne: has joined #ruby
[16:15:55] jxpx777: has joined #ruby
[16:16:13] michael_mbp: has joined #ruby
[16:16:30] musgravejw: has joined #ruby
[16:17:01] simplyianm: has joined #ruby
[16:17:49] tercenya_: has joined #ruby
[16:19:40] nobitanobi: has joined #ruby
[16:19:43] mrmargolis: has joined #ruby
[16:20:41] acovrig: undeadaedra: is that a reference to Barnhurst???s ???wat??? video?
[16:21:04] undeadaedra: acovrig: I was reacting to yorickpeterse's gist, ask him
[16:22:11] acovrig: OK, there is a talk titled ???wat??? that pokes a JavaScript and has a plug for Ruby.
[16:22:15] BanzaiJoe: is there some old school *nix thing to have IRC nicks in lowercase? many more people use lower case names
[16:22:44] acovrig: probably because it???s simple(r)
[16:22:44] JakFrist: has joined #ruby
[16:22:46] s2013: has joined #ruby
[16:23:40] BanzaiJoe: I couldn't even finish "/nick banza" before I thought, "that doesn't look right"
[16:24:12] jhass: people are lazy
[16:24:15] jhass: less shift = less work
[16:24:30] balazs: has joined #ruby
[16:25:11] BanzaiJoe: I get that for 10 hours of coding, but we're talking about humans and communication and maybe a couple dozen a day. /shrug
[16:25:38] nikhgupta: has joined #ruby
[16:26:19] drewo: has joined #ruby
[16:26:29] atomical_: has joined #ruby
[16:26:44] failshell: has joined #ruby
[16:26:58] bricker: has joined #ruby
[16:28:11] allomov: has joined #ruby
[16:28:22] bmalum: has joined #ruby
[16:28:27] sdwrage: has joined #ruby
[16:28:44] paulcsmith_: has joined #ruby
[16:29:12] T3: has joined #ruby
[16:29:42] RobertBirnie: has joined #ruby
[16:29:53] bruno-: has joined #ruby
[16:30:01] _seanc_: has joined #ruby
[16:31:21] towski_: has joined #ruby
[16:31:30] denver: has joined #ruby
[16:32:15] nikhgupta: has joined #ruby
[16:34:16] elev: has joined #ruby
[16:36:06] kk33: I want to make a game with ruby, how can I do that?
[16:36:14] kk33: an very easy game, with grapics
[16:36:22] simplyianm: has joined #ruby
[16:36:34] bnagy: hard work and practice, probably
[16:36:44] kk33: but like I have a game
[16:36:46] kk33: rand 100
[16:36:52] kk33: and I want it into an app or a program
[16:36:55] kk33: how can I do that?
[16:37:08] mrsolo: has joined #ruby
[16:37:11] volty: get qtbindings and study qt, for example
[16:37:11] dfockler: kk33: you can try gosu, it's a game dev library for ruby
[16:37:11] bnagy: maybe check out Shoes
[16:37:15] n1x: has joined #ruby
[16:37:19] undeadaedra: kk33: https://www.ruby-toolbox.com/categories/game_libraries
[16:37:31] pietr0: has joined #ruby
[16:38:17] kk33: When I am installing gosu
[16:38:21] kk33: I get this error:
[16:38:21] kk33: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
[16:38:27] InternetFriend: has joined #ruby
[16:38:29] kk33: what should I do? and how? I am very bad with mac
[16:38:29] fujimura: has joined #ruby
[16:38:40] starfox_sf: has joined #ruby
[16:39:00] Agoldfish: has joined #ruby
[16:39:07] bmalum: has joined #ruby
[16:39:13] pdev_lifer: has joined #ruby
[16:39:46] undeadaedra: I guess you need sudo to install gems with default ruby
[16:39:53] undeadaedra: or use --user-install
[16:40:06] dfockler: kk33: https://github.com/gosu/gosu/wiki/Getting-Started-on-OS-X
[16:40:12] kk33: so whats the command code in terminal?
[16:40:16] dfockler: try this tutorial to get started
[16:40:24] kk33: but I cant download it
[16:40:31] pengin: has joined #ruby
[16:41:09] Zai00: has joined #ruby
[16:41:19] aeze: has joined #ruby
[16:41:43] skade: has joined #ruby
[16:41:44] kk33: worked with sudo, thanks
[16:43:47] BanzaiJoe: sudo...Mac...terminal...OS-X... my brain hurts everytime I consider that
[16:44:25] dfockler: BanzaiJoe: You're worse than the windows haters
[16:44:32] datanoise: has joined #ruby
[16:44:37] dfockler: Also Homebrew is quite nice
[16:44:49] konieczkow: has joined #ruby
[16:44:54] kent\n: has joined #ruby
[16:44:56] undeadaedra: Anyway, time to leave, see y'all
[16:45:19] bgmarx: has joined #ruby
[16:45:32] jhass: yeah, great package manager not even supporting package renames m(
[16:45:32] deric_skibotn: has joined #ruby
[16:45:54] xcesariox: has joined #ruby
[16:46:34] bootstrappm: has joined #ruby
[16:46:40] havenwood: jhass: that was... irksome
[16:46:41] BanzaiJoe: dfockler maybe you misunderstand, on the one hand we have FOSS and then high-margin Mac over the top. Then in the middle is WinTel.
[16:47:54] pppt: has joined #ruby
[16:47:54] tomphp: has joined #ruby
[16:47:59] BanzaiJoe: If it is a validation of FOSS then there should be more Apple like successes, if it's an anamoly, it's a very successful one
[16:47:59] gianlucadv: has joined #ruby
[16:48:02] BanzaiJoe: bootstrappm morning
[16:48:04] havenwood: Though pkgsrc does work with OS X now. :)
[16:48:07] havenwood: https://gist.github.com/havenwood/d25276ec38fc6ac03685
[16:48:17] BanzaiJoe: dfockler btw, I'm a pseudo-Windows fan
[16:48:17] havenwood: http://pkgsrc.joyent.com/install-on-osx/
[16:48:40] lkba_: has joined #ruby
[16:49:00] bootstrappm: as we're talking about OSes / manufacturers, I want to start something like system76! :D
[16:49:10] havenwood: If I can convince any other OS X user to install pkgin and Ruby with that gist ^ I'd love to get feedback.
[16:49:21] havenwood: It plays nice alongside Brew if that's your thing.
[16:49:24] bootstrappm: but with elementary os instead of ubuntu
[16:49:30] BanzaiJoe: bootstrappm you do realize what a difficult moving(!) target to hit that is, right?
[16:49:34] zipace: has joined #ruby
[16:49:41] bootstrappm: no I don't :(
[16:49:47] bootstrappm: how difficult? how moving?
[16:49:49] BanzaiJoe: have you seen the Yoga 3 implemenations?
[16:50:16] Xiti: has joined #ruby
[16:50:18] bootstrappm: I had a yoga 2 then sold it ... let me look up the yoga 3 real quick
[16:50:29] gianlucadv: has joined #ruby
[16:50:34] bmalum_: has joined #ruby
[16:50:42] fabrice31: has joined #ruby
[16:50:44] Scroff: has joined #ruby
[16:51:31] codecop: has joined #ruby
[16:51:38] GPrime: has joined #ruby
[16:51:42] volty: k/join #qt
[16:51:48] bootstrappm: looks pretty much same just beefier. I guess system76 was a bad example, I want to build desktops. I'm in Guatemala, those still sell a lot in LatAm
[16:51:49] alphaatom: has joined #ruby
[16:51:51] cndiv: has joined #ruby
[16:51:53] BanzaiJoe: I don't know much about elementary os, yoga 3 with ubuntu and system76 are linux laptops, you're talking about changing hardware and change operating systems. laptop hardware is actually very dynamic
[16:52:25] bootstrappm: there was a sale on the Fractal Design r4 yesterday (awesome case for $60) that I missed :'(
[16:52:47] BanzaiJoe: what about NUCs?
[16:52:48] gianlucadv: has joined #ruby
[16:53:30] MatthewsFace: has joined #ruby
[16:53:49] BanzaiJoe: http://topo-sordo.blogspot.com.es/2013/06/elementary-os-xbmc-en-intel-nuc-celeron.html
[16:54:16] BanzaiJoe: even that is an old article, I bet there are more variations already
[16:54:23] drocsid: has joined #ruby
[16:54:25] nofxx: has joined #ruby
[16:54:47] Deck`: has joined #ruby
[16:55:24] BanzaiJoe: http://www.intel.com/content/www/us/en/nuc/overview.html
[16:55:26] fusillicode: has joined #ruby
[16:55:27] fusillicode: has left #ruby: ()
[16:55:28] bootstrappm: that looks cool
[16:55:59] dfockler: it's like a mac mini
[16:55:59] bootstrappm: didn't even know about NUC - thanks!
[16:56:17] slackbotgz: has joined #ruby
[16:56:25] bgmarx: has joined #ruby
[16:57:29] dorei: nuc is the future
[16:57:33] dorei: check ubuntu orange box :D
[16:59:33] BanzaiJoe: I do wonder about Chromebooks, kids will have more and more access to them before Win or Mac. If ever there was a need to get computer literacy and exposure to programming it will likely be through Chromebooks. I don't know what that will look like but that's my bet.
[16:59:40] mleung: has joined #ruby
[17:00:01] Deck`: https://dpaste.de/xTNP is it possible to get variables created in class evaluation ?
[17:00:43] langlands: has joined #ruby
[17:01:17] dfockler: BanzaiJoe: Is OLPC still a thing? That was a cool idea
[17:01:29] bootstrappm: Deck`: mmm I've only seen what you're trying to do with a done with instance variables
[17:01:52] simplyianm: has joined #ruby
[17:02:27] bootstrappm: which are set in a method, not in the class eval. If you create @a in the class eval its a class instance variable I believe which is not the same thing
[17:02:31] snockerton1: has joined #ruby
[17:02:37] bootstrappm: check it: http://stackoverflow.com/questions/15773552/ruby-class-instance-variable-vs-class-variable
[17:02:46] JoshL: has joined #ruby
[17:02:55] jhass: Deck`: what's your goal? I mean in that example you could just write 5 in the method
[17:03:09] jhass: extract magic values? share data?
[17:03:15] jhass: try to show your real code
[17:03:25] bootstrappm: isn't there a shortcut for that ...
[17:03:29] ruboto: Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
[17:03:50] Marsupermammal: has joined #ruby
[17:04:21] Scroff: has joined #ruby
[17:04:25] bootstrappm: Deck`: if you want want the variable to be available before assigning anything to it look up attr_accessor. Then use it as instance.a, for example; that'll return nil if you haven't set @a to anything
[17:04:47] BanzaiJoe: dfockler short answer no, but I do think it achieved some of it's goals of cost reduction in areas that allow for others to follow up.
[17:05:11] Deck`: jhass, I have a function which creates Context class and return it. I want to make it possible to have nested context.
[17:05:14] jxpx777: has joined #ruby
[17:05:21] Deck`: sorry, Context object
[17:05:48] havenwood: Deck`: Can you Gist the code?
[17:06:16] rbowlby: has joined #ruby
[17:07:01] platzhirsch: has joined #ruby
[17:07:20] elev: has joined #ruby
[17:07:28] elev: I downloaded gosu, but I dont know if it worked, how can I check it?
[17:07:44] elev: when I typed gosu --version nothing came up
[17:07:49] pyon: has joined #ruby
[17:08:09] jhass: does gem list show gosu?
[17:08:13] msgodf: has joined #ruby
[17:08:15] wasamasa: >> require 'gosu'
[17:08:16] ruboto: wasamasa # => cannot load such file -- gosu (LoadError) ...check link for more (https://eval.in/382625)
[17:08:26] Xeago: havenwood: we use pkgin at $JOB
[17:08:32] elev: how can I find gem list jhass?
[17:08:35] atomical: has joined #ruby
[17:09:11] roolo_: has joined #ruby
[17:09:12] jhass: it's a command you run
[17:09:17] Master44: what command?
[17:09:29] havenwood: Xeago: nice, what's your impression of it?
[17:09:53] Master44: gosu (0.9.2)
[17:09:53] Master44: io-console (0.4.2)
[17:09:54] Master44: json (1.8.2, 1.7.7)
[17:09:54] Master44: libxml-ruby (2.6.0)
[17:09:54] Master44: minitest (4.3.2)
[17:09:54] jhass: Deck`: so no code? this is hard with words :(
[17:09:56] Master44: nokogiri (1.5.6)
[17:09:58] Master44: psych (2.0.0)
[17:10:00] jhass: !kick master44 Please use https://gist.github.com
[17:10:00] helpa: jhass: No.
[17:10:00] ruboto: ruboto kicked master44: use https://gist.github.com
[17:10:00] ruboto: -o ruboto
[17:10:02] x1337807x: has joined #ruby
[17:10:03] hsps_: has joined #ruby
[17:10:04] startupality: has joined #ruby
[17:10:06] Deck`: jhass, I'm writing the example right nw
[17:10:21] sarkyniin: has joined #ruby
[17:10:32] Master44: has joined #ruby
[17:10:35] Master44: sorry jhass
[17:10:37] eam: Master44: ruby -rgosu -e'Gosu::Window.new 640, 480, false; sleep 10'
[17:10:40] Master44: never happen again
[17:10:43] eam: does that open a blank window?
[17:10:56] Master44: jhass I forgot, I am sorry wont happen again
[17:10:58] bruno-: has joined #ruby
[17:11:12] Deck`: jhass, havenwood https://dpaste.de/3Ujy
[17:11:20] skade: has joined #ruby
[17:11:33] towski_: has joined #ruby
[17:11:53] n1x: has joined #ruby
[17:12:43] hotpancakes: has joined #ruby
[17:12:46] beneggett: has joined #ruby
[17:13:18] jhass: Deck`: class Context; def thing(&block); @context = Context.new; ...; end; def run; @context.run if @context; ...; end; end;
[17:13:32] mdz_: has joined #ruby
[17:13:49] jhass: maybe name it @child_context or even make it an array if multiple are a possibility
[17:14:11] nobitanobi: has joined #ruby
[17:14:34] djbkd: has joined #ruby
[17:14:51] jhass: but basically recreate your DSL in the Context class, perhaps extracting the common parts into a module you can include into both the toplevel and Context
[17:15:26] wallerdev: has joined #ruby
[17:15:41] Deck`: jhass, actually I try to implement something like context or describe methods in rspec.
[17:16:01] jhass: yup, I recognized
[17:16:33] platzhirsch: has joined #ruby
[17:16:57] luckyme: has joined #ruby
[17:18:48] DrShoggoth: has joined #ruby
[17:18:49] jenrzzz: has joined #ruby
[17:19:24] platzhirsch1: has joined #ruby
[17:20:20] nonparfumee: has joined #ruby
[17:21:38] ottlikg: has joined #ruby
[17:22:51] sanguisdex: has joined #ruby
[17:24:07] kobain: has joined #ruby
[17:25:08] krisquigley: has joined #ruby
[17:25:19] musgravejw: has joined #ruby
[17:25:24] Spami: has joined #ruby
[17:25:42] maxshelley: has joined #ruby
[17:25:45] Azure: has joined #ruby
[17:26:10] someword: has joined #ruby
[17:29:28] nixmaniack: has joined #ruby
[17:29:30] sanguisdex: has joined #ruby
[17:29:33] mrmargol_: has joined #ruby
[17:29:55] CBke: has joined #ruby
[17:29:55] fantazo: has joined #ruby
[17:30:13] quimrstorres: has joined #ruby
[17:30:52] Deck`: jhass, actually it supports lazy evaluation. I mean that contexts are created in any level but they should be evaluated when the root context is run only
[17:31:56] djbkd: has joined #ruby
[17:32:00] jhass: Deck`: my solution should do that
[17:32:14] jhass: just check @context after running
[17:32:23] kirun: has joined #ruby
[17:32:31] alem0lars___: has joined #ruby
[17:33:05] jhass: it'll harm full example randomization but I can't think of any lazy evaluation approach that doesn't
[17:33:08] tcarter1719: has joined #ruby
[17:33:36] elev: has joined #ruby
[17:34:03] mikecmpbll: has joined #ruby
[17:34:40] Notte: has joined #ruby
[17:34:44] baweaver: has joined #ruby
[17:35:03] snockerton: has joined #ruby
[17:36:18] RegulationD: has joined #ruby
[17:36:54] Rollabunna: has joined #ruby
[17:37:10] sandstrom: has joined #ruby
[17:37:54] aaeron: has joined #ruby
[17:38:19] quimrsto_: has joined #ruby
[17:39:27] gaboesquivel: has joined #ruby
[17:40:08] kekumu: has joined #ruby
[17:40:23] Master44: filename = ARGV.first
[17:40:23] Master44: txt = open(filename)
[17:40:23] Master44: puts "Here's your file #{filename}:"
[17:40:23] Master44: print txt.read
[17:40:23] Master44: print "Type the filename again: "
[17:40:25] Master44: file_again = $stdin.gets.chomp
[17:40:28] Master44: txt_again = open(file_again)
[17:40:33] Master44: I copy something else
[17:40:36] joevandyk: has joined #ruby
[17:40:42] Master44: https://gist.github.com/AnonymousWS/7d6d34535ff95ff97161
[17:40:43] BanzaiJoe: master44, and you're still here...
[17:40:45] Master44: there we go
[17:41:01] BanzaiJoe: careful, there's an automatic rate check
[17:41:10] ElChoppo: has joined #ruby
[17:41:22] Master44: in the gisthub is the code correct? still works?
[17:41:46] corehook: has joined #ruby
[17:42:41] pingveno: has joined #ruby
[17:43:41] pingveno: I'm not sure if this is the right channel for this, but... Is there a way to convert a Ruby File to a Java InputStream in JRuby? My search skills are failing me.
[17:44:20] sdwrage: has joined #ruby
[17:44:23] Adran: has joined #ruby
[17:45:05] maxshelley: has joined #ruby
[17:45:34] konieczkow: has joined #ruby
[17:46:40] nixmaniack: has joined #ruby
[17:46:45] jhass: pingveno: might have more luck in #jruby
[17:46:58] lkba: has joined #ruby
[17:47:07] Master44: https://gist.github.com/AnonymousWS/7d6d34535ff95ff97161
[17:47:17] Master44: is this still the correct way to read a file in ruby=
[17:47:26] jhass: you tell me, does it work?
[17:47:40] Master44: well I dont quite understand the code
[17:47:45] Master44: at the 3 line
[17:47:58] Master44: is it open filename, the variable? or like the file name
[17:48:04] Sdwrage_: has joined #ruby
[17:48:13] edwinvdgraaf: has joined #ruby
[17:48:35] jhass: you checked the docs? http://ruby-doc.org/core-2.2.2/Kernel.html#method-i-open
[17:48:42] Deck`: jhass, I managed to do what I want, thank you very much
[17:49:07] jhass: Deck`: cool, did you went with basically my approach or did you find something else?
[17:50:06] Scroff: has joined #ruby
[17:50:31] Deck`: jhass, your approach, but instead of having @child_context I set @child_contexts = [] and calling run on each instances to make it possible to have several child contexts
[17:50:52] jhass: k, cool, just curious ;)
[17:50:56] platzhirsch1: has left #ruby: ()
[17:51:01] bgmarx: has joined #ruby
[17:51:07] sarkyniin: has joined #ruby
[17:51:10] blackmesa: has joined #ruby
[17:51:22] Master44: jhass the rdoc doesnt show good about files
[17:51:36] Master44: jk found it now :P
[17:51:53] araujo: has joined #ruby
[17:51:53] araujo: has joined #ruby
[17:52:07] pandaant: has joined #ruby
[17:52:12] svoop: has joined #ruby
[17:52:46] InternetFriend: has joined #ruby
[17:53:02] Master44: nope, jhass doesnt say anything about how the program can read a file
[17:53:28] jhass: Examples:
[17:53:31] jhass: Reading from ???testfile???:
[17:53:48] atomical: has joined #ruby
[17:54:35] mesamoo: has joined #ruby
[17:55:41] jhass: in my link
[17:56:16] sinkensabe: has joined #ruby
[17:56:16] flughafen_: has joined #ruby
[17:56:18] yardenbar: has joined #ruby
[17:56:25] edwinvdgraaf: has joined #ruby
[17:56:33] tercenya: has joined #ruby
[17:57:16] tlarevo: has joined #ruby
[17:57:20] Master44: so thats just print all the things that is in the file
[17:57:25] momomomomo: has joined #ruby
[17:57:43] jpfuentes2: has joined #ruby
[17:57:51] DaniG2k: has joined #ruby
[17:58:34] bmalum: has joined #ruby
[17:59:08] Master44: jhass how can I print all of the file? not just one line?
[17:59:39] jhass: what makes you say you don't?
[17:59:56] Master44: but without gets nothing happend
[18:00:13] jhass: your example doesn't use gets
[18:00:25] jhass: the one in the docs does
[18:00:49] Master44: you mean my example?
[18:00:58] Master44: I am using your example from rdoc
[18:02:06] bgmarx_: has joined #ruby
[18:02:22] bootstrappm: has joined #ruby
[18:02:45] aaeron: has joined #ruby
[18:02:46] Master44: I understand what you mean now I try :P
[18:04:00] Master44: still doesnt work
[18:04:13] segfalt: has joined #ruby
[18:06:37] mattbillock: has joined #ruby
[18:06:47] quimrstorres: has joined #ruby
[18:07:27] Master44: I found the game.. thanks
[18:08:04] swills: has joined #ruby
[18:08:38] Master44: has left #ruby: ()
[18:11:10] postmodern: has joined #ruby
[18:11:23] MEATCHICKEN: has joined #ruby
[18:11:32] alex88: has joined #ruby
[18:11:37] MEATCHICKEN: Point 2 -> http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates
[18:11:50] MEATCHICKEN: Would it work if I just substitute the sql functions with ruby methods?
[18:12:27] Cust0sLim3n: has joined #ruby
[18:12:41] nobitano_: has joined #ruby
[18:12:51] pontiki: has joined #ruby
[18:13:28] dseitz: has joined #ruby
[18:13:55] banister: has joined #ruby
[18:14:15] noethics: has joined #ruby
[18:15:01] mattbillock: has joined #ruby
[18:15:10] Carnage\: has joined #ruby
[18:16:49] [H]unt3r: has joined #ruby
[18:18:24] Polysics: has joined #ruby
[18:18:51] beneggett: has joined #ruby
[18:20:12] ramfjord: has joined #ruby
[18:20:30] baweaver: has joined #ruby
[18:24:40] sinkensabe: has joined #ruby
[18:24:55] hotpancakes: has joined #ruby
[18:27:02] workmad3: has joined #ruby
[18:27:16] fujimura: has joined #ruby
[18:28:00] ramfjord: has joined #ruby
[18:29:00] djbkd: has joined #ruby
[18:29:21] psye: has joined #ruby
[18:29:55] torpig: has joined #ruby
[18:32:12] hakunin: has joined #ruby
[18:32:13] sinkensabe: has joined #ruby
[18:32:20] RegulationD: has joined #ruby
[18:32:52] towski_: has joined #ruby
[18:33:12] prettiestPony11: has joined #ruby
[18:33:23] sonOfRa: has joined #ruby
[18:33:28] prettiestPony11: hi all! more of a python user, but heard you can end multiple blocks in ruby with ennd ennnd.. is that true?
[18:33:36] prettiestPony11: couldn't find it in the docs
[18:34:29] pontiki: no, but you can use ]
[18:34:29] jhass: sounds like a hoax
[18:34:49] jhass: pontiki: huh?
[18:35:08] hahuang65: has joined #ruby
[18:35:09] pontiki: jhass: another hoax
[18:35:38] prettiestPony11: pontiki: do you know where that operator lives in the ruby lang docs? i couldn't find anything on that.
[18:35:44] pontiki: where that did work was on UT Lisp to close off multiple open parens, tho
[18:36:12] Ox0dea: pontiki: How could that work?
[18:36:28] nullwarp: has joined #ruby
[18:36:30] pontiki: Ox0dea: bear in mind this is pre-CL and pre-Scheme
[18:36:30] bgmarx: has joined #ruby
[18:36:50] Ox0dea: I just mean from the standpoint of disambiguation.
[18:37:02] pontiki: you'd just put a closing square bracket and it would close up all the open parens
[18:37:10] Ox0dea: Oh, right.
[18:37:30] pontiki: if you wanted to bound it, you could start a s-exp with [ and it would close up all the open parens inside that
[18:38:07] fabrice31: has joined #ruby
[18:38:27] jhass: prettiestPony11: in case it's not clear yet, pontiki tried to be funny
[18:38:42] swgillespie: has joined #ruby
[18:38:49] hal_9000: prettiestPony11: yes :) there???s no way to do this in Ruby
[18:38:57] pontiki: i'm not clear that's not just a troll
[18:39:00] prettiestPony11: hm a friend told me you could
[18:39:01] prettiestPony11: https://bugs.ruby-lang.org/issues/5054
[18:39:06] prettiestPony11: trying in irb right now
[18:39:08] pontiki: because python: no ends at all
[18:39:13] elev: has joined #ruby
[18:39:23] atomical: has joined #ruby
[18:39:24] Master44: is it possible to give a method a name?
[18:39:34] Master44: like the whole loop?
[18:39:55] Guest250: has joined #ruby
[18:40:07] hal_9000: question is unclear
[18:40:11] Master44: https://gist.github.com/AnonymousWS/8c819fd9957294cc0cbe
[18:40:16] sdwrage: has joined #ruby
[18:40:19] Master44: is it possible to make all of one code into a variable?
[18:40:32] Master44: like I dont need to write the same thing many times, if I want it to run many times
[18:40:56] ljarvis: master44: you want a method
[18:41:06] Master44: no not exacly
[18:41:13] hal_9000: a proc maybe?
[18:41:15] Master44: I give a new example here
[18:41:30] Master44: while true do puts "You are cool!" end
[18:41:42] Master44: and every time I type in m that loop will run
[18:41:47] Master44: are that possible?
[18:41:54] ljarvis: "type in m"
[18:41:58] ljarvis: what does that mean?
[18:41:59] jhass: prettiestPony11: note that the proposal was rejected
[18:42:06] Master44: like instead of typing all of that
[18:42:09] Master44: I can jsut type m
[18:42:12] ljarvis: you want a method
[18:42:19] Master44: like I set all of that code == to a variabe
[18:42:27] prettiestPony11: right.. was surprised because a rubyist friend told me about it as if it were real
[18:42:32] prettiestPony11: but, guess not!
[18:42:37] jhass: as said, hoax ;)
[18:42:45] jhass: but that issue is probably the origin
[18:42:52] sandstrom: has joined #ruby
[18:43:01] hal_9000: m = proc { loop { sleep 1; puts "Hello!" } }
[18:43:01] jhass: I think I also saw a gem ones that implements it as a preprocessor, but can't find it
[18:43:02] djbkd: has joined #ruby
[18:43:14] Axsuul: has joined #ruby
[18:43:16] ljarvis: that's no different to a method
[18:43:21] ljarvis: (in this case)
[18:43:25] Master44: so i can do it with everything?
[18:43:37] Scripore: has joined #ruby
[18:43:46] Master44: I just google ruby procs thanks, bye :D
[18:43:51] hal_9000: actually there is a difference with scope, but that???s all
[18:44:11] Master44: has left #ruby: ()
[18:44:17] hal_9000: depending on how/where the method is defined
[18:44:24] towski_: has joined #ruby
[18:44:26] hal_9000: but the OP is gone anyway :)
[18:44:44] baweaver: closures :D
[18:45:22] platzhirsch: has joined #ruby
[18:46:03] Frem: has joined #ruby
[18:46:03] hahuang65: has joined #ruby
[18:47:13] hahuang65: has joined #ruby
[18:47:43] jackjackdripper1: has joined #ruby
[18:47:55] flughafen_: has joined #ruby
[18:48:12] jenrzzz: has joined #ruby
[18:48:51] jackjackdripper: has joined #ruby
[18:50:55] workmad3: has joined #ruby
[18:51:33] torpig: has joined #ruby
[18:52:10] hakunin: has joined #ruby
[18:52:19] gregf: has joined #ruby
[18:53:18] sinkensabe: has joined #ruby
[18:54:01] konieczkow: has joined #ruby
[18:54:28] corehook: has joined #ruby
[18:54:31] Ox0dea: if an mehtod is calling with not a block like asdf(1,2){} is it posiblei can do block_given? be false
[18:54:41] cirn0: has joined #ruby
[18:54:56] undeadaedra: {} is a block
[18:54:57] ljarvis: it's still given a block
[18:55:13] Ox0dea: how can it make it be false tho
[18:55:16] ljarvis: if you want to check the return value is nil you'll have to call it
[18:55:22] undeadaedra: >> def f(&blk); blk; end; f
[18:55:24] ruboto: undeadaedra # => nil (https://eval.in/382648)
[18:55:34] ljarvis: well, don't send a block if you want it to be false :D
[18:55:34] InternetFriend: has joined #ruby
[18:55:43] undeadaedra: >> def f(&blk); blk; end; f {}
[18:55:44] ruboto: undeadaedra # => #<Proc:0x40a0f448@/tmp/execpad-6183db53f072/source-6183db53f072:2> (https://eval.in/382649)
[18:55:51] Ox0dea: ljarvis: user might send empty block
[18:56:01] ljarvis: Ox0dea: sounds like a bad API
[18:56:06] Ox0dea: long story
[18:56:10] stamina: has joined #ruby
[18:56:15] Ox0dea: is a syntax hax
[18:56:23] undeadaedra: If it sends an empty block it sends a block, it can also send no block
[18:56:23] ljarvis: you can't call it to tell?
[18:56:32] Ox0dea: real block might return nil?
[18:56:46] ljarvis: then yep, you're stuck :)
[18:57:06] Ox0dea: just not sure how to use RubyVM::InstructionSequence.of(foo) to determine empty block
[18:57:07] undeadaedra: what do you want to do
[18:57:10] workmad3: has joined #ruby
[18:58:23] simplyianm: has joined #ruby
[18:58:52] uris: has joined #ruby
[19:00:43] erts: has joined #ruby
[19:01:10] Ox0dea: >> def foo; 'empty' if block_given? && RubyVM::InstructionSequence.of(proc).to_a[13][3] == 0 end; [foo, foo{}, foo{nil}]
[19:01:10] ruboto: Ox0dea # => [nil, "empty", nil] (https://eval.in/382659)
[19:01:15] Ox0dea: But there must be a better way.
[19:01:16] Scrofff: has joined #ruby
[19:01:41] infoget: has joined #ruby
[19:02:04] undeadaedra: <ljarvis> Ox0dea: sounds like a bad API
[19:02:31] Hanmac: Ox0dea: i tested it too and foo{} and {nil} are different procs, even if they are similar enough
[19:02:50] Ox0dea: hanmac: Right, the iseqs are quite different.
[19:03:05] griffindy: has joined #ruby
[19:03:14] Ox0dea: But I don't know what this 0 at [13][3] indicates and whether or not it might be there in other circumstances.
[19:03:44] platzhirsch: has joined #ruby
[19:04:24] cirn0: has joined #ruby
[19:04:42] Hanmac: yeah lets make a freature request for Proc#empty? ;P
[19:04:57] Ox0dea: That would be so handy right about meow.
[19:05:53] Cust0sLim3n: has joined #ruby
[19:05:59] undeadaedra: Also, your solution seems to be MRI only
[19:06:03] chinmay_dd: has joined #ruby
[19:06:06] alphaatom: has joined #ruby
[19:06:24] deric_skibotn: has joined #ruby
[19:06:43] undeadaedra: so what are you trying to do in the first place?
[19:07:31] CrazyHorse18: has joined #ruby
[19:08:17] GPrime: has joined #ruby
[19:08:19] Ox0dea: I'm constructing a DSL for writing extremely terse lambda expressions in Ruby.
[19:08:38] StephenOTT: has joined #ruby
[19:09:10] Sweeper: aka job security
[19:09:29] micmus: has joined #ruby
[19:10:56] finisherr: has joined #ruby
[19:12:28] zenguy_pc: has joined #ruby
[19:12:45] drocsid: has joined #ruby
[19:13:20] cirn0: has joined #ruby
[19:13:23] apt-get_: has joined #ruby
[19:13:41] tubuliferous_: has joined #ruby
[19:14:07] krisquigley: has joined #ruby
[19:14:35] hakunin: has joined #ruby
[19:15:17] ljarvis: why would a user supply a block without any contents?
[19:15:29] ljarvis: and what is "a user"? who's consuming this?
[19:16:05] corehook: has joined #ruby
[19:16:25] Ox0dea: ljarvis: Y'got me. I was only pretending.
[19:16:40] BanzaiJoe: a user creates programs ;)
[19:16:50] Rager: is there a way to make bundler STFU about which version bundled an app?
[19:16:51] BanzaiJoe: they take down the MCP
[19:17:10] Rager: because it's getting annoying not to be able to change branches without checkout out Gemfile.lock
[19:17:22] edwinvdgraaf: has joined #ruby
[19:17:50] nertzy2: has joined #ruby
[19:17:53] ljarvis: Rager: your branches are using different versions?
[19:18:13] cirn0: has joined #ruby
[19:19:01] phat4life: Rager: i had that same issue
[19:19:21] phat4life: but it was because people on my team had different versions of bundler
[19:19:30] phat4life: or that is what i think at least
[19:19:34] Rager: ljarvis: not my branches
[19:19:36] Rager: my developers
[19:19:40] Rager: one guy's on 1.9
[19:19:45] Rager: one guy's on gods know what
[19:19:46] Rager: I'm on 1.10
[19:19:58] Rager: so their bundlers keep reverting my bundler's versioning
[19:19:59] BanzaiJoe: you're on 1.1?
[19:20:02] blue_deref: has joined #ruby
[19:20:11] Igorshp: has joined #ruby
[19:20:12] Rager: BanzaiJoe: no, 1.10
[19:20:32] Rager: these are symbols, not numbers
[19:20:44] Rager: they just happen to be made of numbers
[19:21:10] BanzaiJoe: gotcha (sorta)
[19:21:54] phat4life: do you specifiy bundler in yoru gem file?
[19:21:57] dagda1: has joined #ruby
[19:22:20] Rager: bundler is putting the version of bundler into Gemfile.lock: https://github.com/bundler/bundler/issues/3697
[19:22:24] Rager: and it's not cool
[19:22:52] bigkevmcd: has joined #ruby
[19:23:03] lavros: has joined #ruby
[19:23:44] hakunin: has joined #ruby
[19:24:27] sinkensabe: has joined #ruby
[19:25:16] davedev24: has joined #ruby
[19:26:21] cirn0: has joined #ruby
[19:26:46] Ox0dea: ACTION rings the bell.
[19:27:47] Ox0dea: It was just the one ding.
[19:27:58] Ox0dea: After every three "shame"s.
[19:28:06] podman: has joined #ruby
[19:29:40] jxpx777: has joined #ruby
[19:30:19] Ox0dea: https://eval.in/382680
[19:30:30] Ox0dea: Is it possible to determine that the Module really has absolutely no methods left?
[19:30:58] sigurding: has joined #ruby
[19:31:25] alex88: has joined #ruby
[19:32:17] hakunin: has joined #ruby
[19:32:28] infoget: has left #ruby: ()
[19:32:45] alphaatom: has joined #ruby
[19:33:51] alphaatom: has joined #ruby
[19:34:12] pontiki: "Module full. Please empty and start over."
[19:34:22] balazs: has joined #ruby
[19:35:07] elev: has joined #ruby
[19:35:14] elev: I guess all of you have heard about the random 100 game
[19:35:16] balazs: has joined #ruby
[19:35:18] alphaatom: has joined #ruby
[19:35:20] Ox0dea: /ignore add elev
[19:35:21] aapole: has joined #ruby
[19:35:47] Master44: 0x0dea why?
[19:36:42] Master44: https://gist.github.com/AnonymousWS/1036b75c56b01f8a721b
[19:36:53] autrilla: has joined #ruby
[19:37:00] Master44: I want to make it like it counts every time you type something in
[19:37:32] Master44: and at the end it go: You used attemps good job
[19:37:41] Master44: someone knows?
[19:37:49] Rollabunna: has joined #ruby
[19:38:10] RazorX: has joined #ruby
[19:38:33] lavros: has joined #ruby
[19:39:27] Master44: someone can help me?
[19:39:37] sdothum: has joined #ruby
[19:39:39] cirn0_: has joined #ruby
[19:39:47] hakunin: has joined #ruby
[19:39:54] jalcine: for every letter?
[19:40:19] Master44: every time they type a number it will count
[19:40:52] symm-: has joined #ruby
[19:41:08] Ox0dea: master44: The $. variable holds your answer.
[19:41:19] Ox0dea: Just print its value at the end of your program.
[19:41:26] RazorX_: has joined #ruby
[19:41:33] Master44: the $ variable?
[19:41:36] Master44: what is that?
[19:41:39] Ox0dea: No, the $. variable.
[19:41:44] Master44: what is that
[19:41:50] Ox0dea: puts "You used #$. attempts."
[19:41:55] Ox0dea: Put that at the end of your program.
[19:42:00] Ox0dea: You know you want to.
[19:42:08] Master44: yes I will but I have to understand why
[19:42:11] Master44: I try to learn ruby lol
[19:42:18] Ox0dea: Clearly not?
[19:42:22] alphaatom: has joined #ruby
[19:43:32] InternetFriend: has joined #ruby
[19:44:16] Master44: if you just tell me what to do I dont learn bro..
[19:45:37] fusillicode: has joined #ruby
[19:45:42] momomomomo: has joined #ruby
[19:45:53] fusillicode: has left #ruby: ()
[19:46:07] rb4637: has joined #ruby
[19:46:19] rb4637: How do I introduce a new "artificial" scope in Ruby code?
[19:46:21] rb4637: like { } in C
[19:46:24] alphaatom: has joined #ruby
[19:46:43] Ox0dea: master44: You really ought to know how to add 1 to a variable's value at this stage in your learning.
[19:46:51] arup_r: has joined #ruby
[19:46:53] rb4637: purpose is to make variables only accessible to that scope and not later in the code.
[19:46:54] yorickpeterse: rb4637: there's no real way of doing that
[19:47:18] Ox0dea: rb4637: Erm, does a Proc not suffice?
[19:47:26] rb4637: Ox0dea: what do you mean?
[19:47:35] Master44: so the #$ just counts every type you click something?
[19:47:46] Master44: can you use it every where?
[19:47:57] Ox0dea: > every type you click
[19:48:01] cirn0: has joined #ruby
[19:48:11] Master44: every time you enter?
[19:48:11] yorickpeterse: Ox0dea: that does more than just introducing a scope
[19:48:20] yorickpeterse: if also requires you to invoke "call" on every proc
[19:48:38] Ox0dea: IIFEs to the rescue!
[19:49:32] qwertme: has joined #ruby
[19:49:51] eggoez: has joined #ruby
[19:50:22] klaas: has joined #ruby
[19:50:38] Ox0dea: >> a, b = 1, 2; (-> { c = a + b })[] # c doesn't exist out here
[19:50:39] ruboto: Ox0dea # => 3 (https://eval.in/382683)
[19:50:40] Ox0dea: rb4637: ^
[19:50:54] Master44: the #$ happens every time you click but what if I just want it to add to spesific things
[19:50:59] jhass: master44: btw why don't you leave your client running?
[19:51:10] Master44: what you mean jhass?
[19:51:27] jhass: you very often close and reopen your client
[19:51:28] Master44: how can I do that?
[19:51:35] Master44: I use terminal on macbook
[19:51:36] jhass: you just leave it running
[19:51:46] jhass: by not closing it
[19:51:49] Master44: it just happens I dont do anything
[19:51:55] Master44: when I go to facebook 5 minutes
[19:51:57] Master44: and come back
[19:52:01] Master44: it automaticly reconnects
[19:52:04] jhass: bullshit, it happens if you're satisfied with an answer
[19:52:05] Master44: I dont leave never
[19:52:10] ndrei: has joined #ruby
[19:52:20] Master44: sometimes yes but not always
[19:52:22] jaycee: has joined #ruby
[19:52:27] Master44: like 3 min ago
[19:52:34] Master44: I was going to toilet and when I came back it reconnect
[19:52:43] jhass: I've been watching it, it's not like that
[19:52:56] Master44: I will just leave it open and see
[19:52:57] Ox0dea: You should've stayed in the toilet.
[19:53:42] Master44: what if I want it to add only when you press spesific things?
[19:53:43] alphaatom: has joined #ruby
[19:54:47] deric_skibotn: has joined #ruby
[19:54:52] alphaatom: has joined #ruby
[19:55:15] flughafe1: has joined #ruby
[19:55:42] _seanc_: has joined #ruby
[19:55:48] balazs: has joined #ruby
[19:55:57] chris613: has joined #ruby
[19:56:03] Rubie: has joined #ruby
[19:56:03] Ox0dea: master44: Incrementing a counter is way beyond my current level of Ruby knowledge, I'm afraid.
[19:56:18] beneggett: has joined #ruby
[19:56:22] Master44: dude why are you that way man
[19:56:30] Master44: why you hate me?
[19:56:43] Ox0dea: I hate what you are, not who you are.
[19:56:49] chris613: Can someone explain to me why a = var || raise "var must be set" gives me a syntax error, whereas a = var || raise("var must be set") does not?
[19:56:58] Master44: I am a 13 year old boy with autism who want to try to learn ruby
[19:57:29] baweaver: has joined #ruby
[19:57:33] Master44: I got a type of autism so I am not that good social but pls dont be mean to me
[19:57:43] segfalt: has joined #ruby
[19:58:55] cirn0: has joined #ruby
[19:59:06] Master44: and btw I did it without you gets.chomp += 1
[19:59:26] Master44: I dont even want to get help from you, jhass how can I ignore a user?
[20:00:26] jhass: chris613: because the || binds stronger than the method argument (yes, raise is a method call)
[20:00:26] Master44: he is so mean all time
[20:00:47] allomov: has joined #ruby
[20:00:57] corehook: has joined #ruby
[20:01:00] ramfjord: has joined #ruby
[20:01:01] wildroman2: has joined #ruby
[20:01:10] chris613: jhass: Thanks!
[20:01:22] jhass: chris613: a = var or raise "var must be set" would be valid too, but I'd encourage you to just do it on two lines
[20:01:39] quimrstorres: has joined #ruby
[20:01:45] Ox0dea: >> nil || p 1
[20:01:46] ruboto: Ox0dea # => /tmp/execpad-9a0ffbf4218a/source-9a0ffbf4218a:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/382685)
[20:01:50] Ox0dea: chris613: ^ Just to clarify.
[20:01:57] baweaver: has joined #ruby
[20:02:05] rb4637: Is this code synchronous in Ruby? open('myfile.out', 'a') { |f| f.puts "Hello, world." }
[20:02:16] rb4637: in other words, does the append file complete before moving to the line below open?
[20:02:25] rb4637: are you sure?
[20:02:38] bash33: has joined #ruby
[20:02:48] rb4637: ok thanks
[20:03:02] phat4life: >> "1.#{'1'*1000000000000000}".to_f
[20:03:03] ruboto: phat4life # => bignum too big to convert into `long' (RangeError) ...check link for more (https://eval.in/382686)
[20:03:07] kadoppe: has joined #ruby
[20:03:14] chris613: has left #ruby: ()
[20:03:50] phat4life: >> "1.#{'1'*10000000000000}".to_f
[20:03:51] ruboto: phat4life # => bignum too big to convert into `long' (RangeError) ...check link for more (https://eval.in/382687)
[20:03:56] Master44: jhass do you own this channel?
[20:04:12] phat4life: that bit of ruby, my computer doesnt like it
[20:04:16] yorickpeterse: No, he just polices it :D
[20:04:26] Master44: haha ok xD :D
[20:04:48] havenwood: master44: http://ruby-community.com/pages/irc_staff
[20:04:56] phat4life: yeah "1.#{'1'*10000000000000}".to_f will crash my mac
[20:05:02] phat4life: on ruby 2.2.0
[20:06:23] mleung: has joined #ruby
[20:06:32] Master44: thanks havenwood :)
[20:06:39] postmodern: is there some reason that Set has no #to_json method?
[20:06:58] yorickpeterse: phat4life: works fine here
[20:07:01] pdoherty: has joined #ruby
[20:07:04] postmodern: one would think Set would be coerced to an Array and dumped as Array#to_json
[20:07:11] havenwood: postmodern: I swear I recently saw something about addition of Set#to_json.
[20:07:19] BanzaiJoe: phones down company wide, time to call BanzaiJoe!!! ta-daaa!
[20:07:33] Ox0dea: havenwood: You did.
[20:07:50] phat4life: yorickpeterse: it causes my mac to run out of memory
[20:07:54] phat4life: if i let it run
[20:08:14] corehook: has joined #ruby
[20:08:28] yorickpeterse: it just outputs 1.1 for me
[20:08:45] drocsid: has joined #ruby
[20:08:54] yorickpeterse: $ ruby --version
[20:08:55] yorickpeterse: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
[20:09:10] yorickpeterse: maybe it's because I'm using a superior operating system
[20:09:38] bmalum: has joined #ruby
[20:09:59] InternetFriend: has joined #ruby
[20:10:03] hakunin: has joined #ruby
[20:10:13] Ox0dea: havenwood: https://bugs.ruby-lang.org/issues/11241
[20:10:36] havenwood: Ox0dea: Aye, that's the one, thanks. Couldn't find it.
[20:10:41] havenwood: postmodern: ^
[20:10:52] bgmarx: has joined #ruby
[20:11:33] postmodern: sweet! ruby delivers
[20:11:34] bgmarx_: has joined #ruby
[20:11:39] havenwood: https://github.com/flori/json/pull/192
[20:11:49] j4cknewt: has joined #ruby
[20:13:03] cirn0_: has joined #ruby
[20:13:15] lavros: has joined #ruby
[20:15:28] ogpastaling: has joined #ruby
[20:16:00] fujimura: has joined #ruby
[20:17:05] cvtsx: has joined #ruby
[20:17:06] tjbiddle: has joined #ruby
[20:17:12] _seanc_: has joined #ruby
[20:17:48] hakunin: has joined #ruby
[20:18:17] rbennacer: has joined #ruby
[20:18:58] jhass: Rager: fyi bundler 1.10.4 just got released with a workaround https://github.com/bundler/bundler/blob/1-10-stable/CHANGELOG.md
[20:19:29] jhass: to at least reduce the biggest pain point
[20:19:45] jenrzzz_: has joined #ruby
[20:20:20] nonparfumee: has joined #ruby
[20:21:16] yfeldblum: has joined #ruby
[20:23:35] ogpastal_: has joined #ruby
[20:24:58] fabrice31: has joined #ruby
[20:25:48] MatthewsFace: has joined #ruby
[20:25:51] rbowlby: has joined #ruby
[20:26:35] lavros: has joined #ruby
[20:26:38] jenrzzz: has joined #ruby
[20:28:10] revath: has joined #ruby
[20:28:28] revath: has left #ruby: ()
[20:28:43] sinkensabe: has joined #ruby
[20:28:55] JoshL_: has joined #ruby
[20:32:27] x1337807x: has joined #ruby
[20:33:00] rb4637: File.open('file.txt', 'wb') do |f|
[20:33:00] rb4637: f.write('foo')
[20:33:01] rb4637: f.write('bar')
[20:33:10] rb4637: Does the second .write append "bar" to the file?
[20:33:13] rb4637: or overwrite the whole file?
[20:33:14] cbz: has joined #ruby
[20:33:14] cbz: has joined #ruby
[20:33:23] undeadaedra: try it and cat the file ;)
[20:34:18] rbowlby_: has joined #ruby
[20:35:03] jenrzzz: has joined #ruby
[20:35:14] pontiki: has joined #ruby
[20:35:15] Akagi201_: has joined #ruby
[20:35:24] wallerdev: has joined #ruby
[20:35:38] djbkd: has joined #ruby
[20:36:29] djbkd: has joined #ruby
[20:37:59] toretore: has joined #ruby
[20:39:27] jgpawletko: has joined #ruby
[20:41:11] baweaver: has joined #ruby
[20:41:40] momomomomo: has joined #ruby
[20:44:33] __butch__: has joined #ruby
[20:45:01] yorickpeterse: rb4637: you'll end up with "foobar"
[20:45:08] rb4637: yeah, thanks
[20:45:56] workmad3: has joined #ruby
[20:46:04] lavros: has joined #ruby
[20:46:59] solars: has joined #ruby
[20:48:07] DLSteve: has joined #ruby
[20:50:36] yorickpeterse: oh boy, seems this week I finally get to write code that converts XPath to Ruby
[20:51:20] balazs: has joined #ruby
[20:51:50] Rager: why do that?
[20:53:47] k3asd`: has joined #ruby
[20:55:03] yorickpeterse: Right, so the background is: Oga (https://github.com/YorickPeterse/oga) has support for XPath queries but it's rather slow (due to a bunch of reasons)
[20:55:21] yorickpeterse: The idea I had is to throw away everything it currently uses for evaluating XPath queries and instead generate Ruby code based on an XPath query
[20:55:32] jenrzzz: has joined #ruby
[20:55:33] yorickpeterse: Said Ruby code would do what it takes to get the right stuff out of a document
[20:55:39] yorickpeterse: But without having to write a fully fledged interpreter
[20:56:00] yorickpeterse: One of the benefits is that you can generate very specific snippets of code, cache these and have them JIT compiled (in case of JRuby/Rubinius)
[20:56:05] bronson: has joined #ruby
[20:56:19] yorickpeterse: https://github.com/YorickPeterse/oga/blob/master/lib/oga/xpath/evaluator.rb this is what it uses right now to evaluate XPath
[20:56:21] yorickpeterse: quite the beast
[20:56:24] allomov: has joined #ruby
[20:56:38] yorickpeterse: most expressions can probably be done in less than 50 lines of dedicated Ruby code
[20:57:12] yorickpeterse: I did some rough benchmarking and I had some code which IIRC was already 2x faster
[20:58:52] mrmargolis: has joined #ruby
[21:00:47] GPrime: has joined #ruby
[21:00:53] y0da: has joined #ruby
[21:02:00] nym: has joined #ruby
[21:02:55] krisquigley: has joined #ruby
[21:03:24] undeadaedra: what about oga-without-the-wimpiness? :3
[21:04:57] s2013: has joined #ruby
[21:05:27] blackmesa: has joined #ruby
[21:06:47] mdw: has joined #ruby
[21:08:10] ozialien: has joined #ruby
[21:08:49] wallerdev: has joined #ruby
[21:09:04] aaeron: has joined #ruby
[21:10:10] baweaver: has joined #ruby
[21:11:43] workmad3: has joined #ruby
[21:12:35] baweaver: has joined #ruby
[21:13:30] mrmargol_: has joined #ruby
[21:13:32] aaeron: has joined #ruby
[21:13:54] spyderman4g63: has joined #ruby
[21:14:00] but3k4: has joined #ruby
[21:15:03] pietr0: has joined #ruby
[21:15:22] fusillicode: has joined #ruby
[21:15:26] fusillicode: has left #ruby: ()
[21:16:18] iamninja: has joined #ruby
[21:23:18] otherj: has joined #ruby
[21:23:42] Zai00: has joined #ruby
[21:23:45] yorickpeterse: I think ljarvis once had the perfect quote for all this
[21:24:09] mdw: has joined #ruby
[21:24:23] yorickpeterse: but ofc I can't find it
[21:24:29] segfalt: has joined #ruby
[21:25:13] nikhgupta: has joined #ruby
[21:25:19] Scroff: has joined #ruby
[21:25:29] sharpmachine: has joined #ruby
[21:26:56] mike___1234: has joined #ruby
[21:27:43] rcvalle: has joined #ruby
[21:29:27] sdegutis: has joined #ruby
[21:29:47] Squarepy: has joined #ruby
[21:29:59] sdegutis: Help, what's the name of the thing I need to use within Nokogiri if I want to just replace all <b>foo</b> with **foo** ?
[21:30:12] renier: has joined #ruby
[21:30:14] sdegutis: A regex won't cut it that's why I need Nokogiri.
[21:30:17] ljarvis: yorickpeterse: quote for what?
[21:30:21] sdegutis: But I can't figure out how to use Nokogiri to do it.
[21:30:31] yorickpeterse: ljarvis: to describe what I'm doing
[21:30:46] yfeldblum: has joined #ruby
[21:31:09] ljarvis: yorickpeterse: are you making a mess?
[21:31:27] yorickpeterse: 2013-06-18 13:48:49injektdo you just wake up in the morning and think, "what kind of weird ass shit can i do today?"
[21:31:31] yorickpeterse: that took a lot of grepping
[21:32:09] yorickpeterse: sdegutis: can't remember how to do it with Nokogiri, but I do know how to do it with https://github.com/YorickPeterse/oga
[21:32:11] ljarvis: im let down with my own quote
[21:32:12] lkba: has joined #ruby
[21:32:17] theery: has joined #ruby
[21:33:01] alphaatom: has joined #ruby
[21:33:32] ljarvis: yorickpeterse: is that file generated?
[21:34:14] alphaatom: has joined #ruby
[21:34:53] yorickpeterse: ljarvis: what file?
[21:35:19] ljarvis: yorickpeterse: xpath/evaluator
[21:35:35] yorickpeterse: sdegutis: https://gist.github.com/YorickPeterse/33943bdd98c7474e4993
[21:35:39] yorickpeterse: written by hand
[21:35:54] sdegutis: Think I found it
[21:36:12] sdegutis: https://gist.github.com/sdegutis/dd2f2c40f2ccb9c8956f
[21:36:29] ljarvis: yorickpeterse: nice code
[21:36:31] rbennacer: has joined #ruby
[21:36:43] yorickpeterse: sdegutis: ah yeah, that's pretty similar
[21:36:50] yorickpeterse: ljarvis: meh, it's ok
[21:37:30] _seanc_: has joined #ruby
[21:37:31] simplyianm: has joined #ruby
[21:37:47] ljarvis: ok it's bed time
[21:38:41] Rollabunna: has joined #ruby
[21:39:11] sdegutis: Now I just need to delete everything in @doc up until and including the first <h1> match.
[21:39:13] sdegutis: Is that hard?
[21:39:44] dmolina: has joined #ruby
[21:40:55] yorickpeterse: you'll need to iterate over all nodes for that
[21:40:57] baweaver: side note, regex is a very bad answer for anything html/xml
[21:40:57] yorickpeterse: something like
[21:41:11] dagda1: has joined #ruby
[21:41:18] yorickpeterse: document.every_node_in_document_thing { |node| if node.name == 'h1'; break; else; node.remove; end }
[21:41:31] shock_one: has joined #ruby
[21:41:33] Axy: has joined #ruby
[21:42:28] shock_one: has joined #ruby
[21:42:43] sdegutis: I thought it'd be more like i = @doc.index('h1') and @doc.remove(1..i)
[21:42:54] kalusn: has joined #ruby
[21:43:36] yorickpeterse: IIRC Nokogiri has no way to get the "index" of an element
[21:43:45] yorickpeterse: which doesn't really work to begin with since HTML is a tree, not a list
[21:43:46] bigkevmcd: has joined #ruby
[21:43:57] sdegutis: well then @doc.keep_until('h1').delete
[21:44:08] ZOMGITSABEAR: if you planted html in the ground, what would sprout? a tree?
[21:44:20] sdegutis: btw good joke.
[21:44:36] ZOMGITSABEAR: i'm chock full of 'em
[21:44:56] yorickpeterse: again in Oga this is pretty simple :P
[21:45:01] ledestin: has joined #ruby
[21:45:28] s2013: has joined #ruby
[21:46:41] yorickpeterse: https://gist.github.com/YorickPeterse/6f21c0069c3bc89f2f7b
[21:47:08] yorickpeterse: err that leaves the first h1 though
[21:47:21] yorickpeterse: but if you'd move the "node.remove" before the if statement that would solve it
[21:47:35] workmad3: has joined #ruby
[21:47:42] sdegutis: yorickpeterse: why do you hate nokogiri so much that you made oga btw?
[21:47:46] GPrime: has joined #ruby
[21:47:55] yorickpeterse: https://github.com/YorickPeterse/oga#why-another-htmlxml-parser
[21:47:56] AndroidLoverInSF: has joined #ruby
[21:48:17] scottschecter: has joined #ruby
[21:48:23] sdegutis: yorickpeterse: also im working with *really badly* formatted html with all sorts of badnesses in it
[21:48:36] sdegutis: yorickpeterse: so im gonna put my foot in nokogiris bucket because its tried/true even if badly implemented
[21:48:40] yfeldblum: has joined #ruby
[21:48:50] yorickpeterse: Oga supports fucked up HTML just fine
[21:49:00] blackmesa: has joined #ruby
[21:49:15] sdegutis: yorickpeterse: well *maybe* i might use yours
[21:49:22] musgravejw: has joined #ruby
[21:49:26] sdegutis: yorickpeterse: but if i do, and if it works, know this: i will thank the crap out of you
[21:49:33] centrx: has joined #ruby
[21:49:35] yorickpeterse: Not suggesting you'd move now of course, that might be too costly, just saying that in general document modifications are a bit of a PITA in Nokogiri
[21:49:51] GPrime: has joined #ruby
[21:50:10] sdegutis: yorickpeterse: costly? this is my script bruh: https://gist.github.com/sdegutis/1bb16d82df774a52554a
[21:50:10] yorickpeterse: e.g. to create an element you do Nokogiri::XML::Element.new('name here', document)
[21:50:18] yorickpeterse: in oga it's just Oga::XML::Element.new(:name => 'name here')
[21:50:33] yorickpeterse: sdegutis: ah ok, I thought this might've been an entire app
[21:50:47] griffindy: has joined #ruby
[21:50:48] sdegutis: im seriously head scratching at this guy who wrote these html files. he wrote them 20 years ago, and he's been editing them FOR 20 YEARS with no source files, just the htm files
[21:50:59] sdegutis: shared headers, everything!
[21:51:09] yorickpeterse: replace Nokogiri::HTML() with Oga.parse_html(), replace //* in the XPath with descendant-or-self::* (//* sucks for performance, like really badly)
[21:51:24] sdegutis: yorickpeterse: hahaha noted
[21:51:27] yorickpeterse: Oga doesn't have a "replace" method, so you need to use the "before" method in the above gist
[21:51:31] sdegutis: brb gem installing oga
[21:51:37] yorickpeterse: then you should be set
[21:51:45] sdegutis: yorickpeterse: add #replace plz
[21:51:58] sdegutis: or ill monkey patch it (a threat, not a promise)
[21:52:00] segfalt: has joined #ruby
[21:52:13] yorickpeterse: I'll add it as a ticket since it is sorta useful
[21:52:50] casadei: has joined #ruby
[21:52:52] sdegutis: replace = self.before(new_node) && self.remove
[21:53:22] sdegutis: the thought "i wish i just knew haskell" is happening more often every month
[21:53:27] benanne: has joined #ruby
[21:53:33] sdegutis: who knows what the haskell version of this would be
[21:54:01] yorickpeterse: Probably too long to fit on 10 lines
[21:54:20] sdegutis: maybe parsec would help :P
[21:54:40] baweaver: ReplaceHTML :: [String] -> [String]
[21:54:42] yorickpeterse: sdegutis: https://github.com/YorickPeterse/oga/issues/115
[21:54:54] sdegutis: yorickpeterse: how do i print the result afterwards?
[21:55:01] sdegutis: yorickpeterse: im literally turning this thing into markdown
[21:55:07] yorickpeterse: sdegutis: puts doc.to_xml
[21:55:10] baweaver: ReplaceHTML = SomeHTMLParser.substitute(pattern, with)
[21:55:18] sdegutis: yorickpeterse: but itll all just be text in the end
[21:55:22] sdegutis: all text elements.
[21:55:22] baweaver: ignore my bad psuedo-Haskell
[21:55:28] sdegutis: baweaver: done before you even asked
[21:55:33] aaeron: has joined #ruby
[21:55:39] yorickpeterse: sdegutis: not sure if I'm following
[21:56:38] zotherstupidguy: has joined #ruby
[21:56:54] sdegutis: yorickpeterse: im turning this "<h2>foo</h2> \n <strong>bar</strong>" into "#foo \n **bar**"
[21:57:02] sdegutis: (extra spaces only added here for readability)
[21:57:30] yorickpeterse: Yes, and what is the problem exactly with calling to_xml on the resulting document?
[21:57:47] rbowlby: has joined #ruby
[21:57:47] yorickpeterse: Oga doesn't inject things like <html> elements and such, so that should be fine
[21:57:57] LMity: has joined #ruby
[21:58:07] bgmarx: has joined #ruby
[21:58:24] skade: has joined #ruby
[21:58:34] aeze: has joined #ruby
[21:58:39] sdegutis: oh it works
[21:58:43] undeadaedra: you're just trying to have Markdown from HTML?
[21:58:53] ledestin: has joined #ruby
[21:59:23] sdegutis: undeadaedra: im also trying to strip away before/after html that i dont want -- only everything inside the #springfield2 element
[21:59:53] sdegutis: undeadaedra: and i will eventually to do custom things with the transformation that arent technically markdown -- like turn it into LaTeX
[22:00:09] undeadaedra: AH, I remember this
[22:00:13] sdegutis: undeadaedra: what
[22:00:28] duderonomy: has joined #ruby
[22:00:39] undeadaedra: You talked about this before here, no?
[22:01:01] sdegutis: yeah like a few hours ago or something?
[22:01:19] sdegutis: im just trying to grab the important stuff out of http://www.newadvent.org/fathers/01281.htm
[22:01:20] Channel6: has joined #ruby
[22:01:21] badhatter: has joined #ruby
[22:01:42] undeadaedra: so I should already have said that there are already tools for these kind of transformations
[22:01:44] allcentury: has joined #ruby
[22:01:55] failshell: has joined #ruby
[22:02:17] jhass: sdegutis: that's easy, just two characters: ""
[22:02:31] sdegutis: jhass: --------->
[22:03:13] undeadaedra: that's an arrow
[22:03:45] yorickpeterse: -===??? ????????? ???????????? ????????? ????????????
[22:04:01] undeadaedra: congrats, you killed me
[22:04:01] Darkwater: ^and that's why you don't +c a channel
[22:04:05] simplyianm: has joined #ruby
[22:04:09] Musashi007: has joined #ruby
[22:04:15] sdegutis: undeadaedra: no its like me pointing at the door
[22:04:21] sdegutis: undeadaedra: with this face :|
[22:04:31] jhass: Darkwater: +Ccnt
[22:04:34] yorickpeterse: get a better client if it doesn't like unicode
[22:04:47] fujimura: has joined #ruby
[22:05:02] jgpawletko: has joined #ruby
[22:05:16] undeadaedra: 11:28 <adaedra> maybe pandoc does it
[22:05:20] undeadaedra: yep, been there
[22:05:29] undeadaedra: yorickpeterse: I think problems is colors
[22:05:41] yorickpeterse: ehm, my stuff isn't using colors
[22:05:46] jhass: sdegutis: heh, if you don't want that your stuff is made fun of (especially for religion), better not put it into the internet ;)
[22:05:57] undeadaedra: so no problems \o/
[22:05:58] sdegutis: jhass: haahahhahahahahahahaa
[22:05:59] yorickpeterse: I have a plugin which can do it, but thankfully most channels have it disabled
[22:06:08] sdegutis: jhass: hahahahahahhahahahahahahahahhahaha wink
[22:06:21] sdegutis: yorickpeterse: it broke
[22:06:32] sdegutis: yorickpeterse: lemme try again, maybe i messed itup
[22:07:29] yorickpeterse: 4h '/35, I 4??50 h4\/3 7hi5 |*??|_|6i|\|
[22:07:35] yorickpeterse: ^ plugin called leet.py
[22:07:46] Zen-Zen: has joined #ruby
[22:07:48] yorickpeterse: but wait, there's more!
[22:07:52] undeadaedra: I liked the rainbow.ext
[22:07:53] jhass: /prism is still the best
[22:07:58] undeadaedra: prism, here it is
[22:07:59] northfurr: has joined #ruby
[22:08:00] yorickpeterse: jhass: have that
[22:08:08] sdegutis: yorickpeterse: hey how do i strip out the top level element somehow?
[22:08:11] undeadaedra: ACTION searches his memory
[22:08:12] yorickpeterse: ACTION likes slapping people and randomly picks yorickpeterse to slap
[22:08:15] sdegutis: yorickpeterse: like technically i know thats not a possible thing
[22:08:28] sdegutis: yorickpeterse: i mean i just want to combine all the children nodes into text (they are all text nodes afaik)
[22:08:34] yorickpeterse: sdegutis: you can just move its contents up, or only to_xml it
[22:08:35] undeadaedra: Channel is color-protected, can't rainbow :(
[22:09:04] jhass: yorickpeterse: we can try in #ruby-offtopic how long it takes until apeiros would put +c back in ;D
[22:09:06] yorickpeterse: sdegutis: you can do something like...
[22:09:30] yorickpeterse: document = Oga.parse_html('...'); document.children = document.children[0]
[22:09:39] sdegutis: yorickpeterse: uhhhhh
[22:09:44] undeadaedra: oh, it's past midnight
[22:09:47] yorickpeterse: document = Oga.parse_html('...'); document.children = Oga::XML::NodeSet.new([document.children[0]])
[22:09:48] undeadaedra: good night everyone
[22:10:09] sdegutis: haha undeadaedra
[22:10:23] jhass: night undeadaedra
[22:10:37] undeadaedra: ok, going to bed seems to be funny :(
[22:10:46] yorickpeterse: sdegutis: you can also just take whatever root element you want and serialize that back to XML
[22:10:48] jgpawletko: has joined #ruby
[22:10:53] yorickpeterse: to_xml can be called on any node, not just the document itself
[22:10:56] casadei: has joined #ruby
[22:11:21] simplyianm: has joined #ruby
[22:11:23] sdegutis: yorickpeterse: im just trying to make it stop printing <div id="springfield2"> at the top of my output
[22:11:30] simplyianm: has joined #ruby
[22:11:43] jhass: undeadaedra: perhaps because you're undead?
[22:12:14] deric_skibotn: has joined #ruby
[22:12:52] yorickpeterse: sdegutis: oh hmmm
[22:13:12] yorickpeterse: sdegutis: it might be easier to copy over Markdown to a String instead of modifying the document
[22:13:21] sdegutis: oh yeah maybe
[22:13:22] yorickpeterse: so you iterate over all nodes, find their replacements, append them to a separate String in order
[22:13:48] fabrice31: has joined #ruby
[22:13:49] sdegutis: yorickpeterse: thats tricky for nested nodes though, like string/em/a/blockquote nested inside p
[22:13:54] sdegutis: or sometimes blockquote nested inside p
[22:13:58] sdegutis: cuz you know, html
[22:14:49] sdegutis: (that was my first attempt btw)
[22:14:53] simplyianm: has joined #ruby
[22:14:57] sdegutis: (to enumerate rather than transform)
[22:14:59] sdegutis: (but its hard)
[22:15:32] rbennacer: has joined #ruby
[22:16:08] Luyt__: has joined #ruby
[22:16:15] nitenq: has joined #ruby
[22:16:27] nitenq: what is the keyword ???ok??? in ruby ?
[22:16:40] sdegutis: nitenq: haha there is no ok
[22:16:57] mdz_: has joined #ruby
[22:17:18] nitenq: http://pastebin.com/6AxR54zY
[22:17:18] ruboto: nitenq, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/246cebcc809f0ff43d34
[22:17:18] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[22:17:50] kriskropd: has joined #ruby
[22:17:57] lkba: has joined #ruby
[22:18:03] nitenq: output : test 42 1434493071
[22:18:32] yorickpeterse: nitenq: that's probably a method defined in Sensu::Plugin::Metric::CLI::Graphite or somewhere else
[22:18:48] yorickpeterse: There's no actual "ok" keyword
[22:19:14] nitenq: all right thanks
[22:20:33] evanjs: has joined #ruby
[22:20:51] sharpmachine: has joined #ruby
[22:21:02] cbz: has joined #ruby
[22:22:03] qwertme: has joined #ruby
[22:22:12] Rubie: has joined #ruby
[22:22:22] CpuID: has joined #ruby
[22:23:06] CpuID: has joined #ruby
[22:23:17] djbkd: has joined #ruby
[22:25:46] zenguy_pc: has joined #ruby
[22:26:42] hefest: has joined #ruby
[22:27:07] sharpmachine: has joined #ruby
[22:27:08] Rubie: has joined #ruby
[22:27:42] yfeldblum: has joined #ruby
[22:28:14] simplyianm: has joined #ruby
[22:28:40] malconis: has joined #ruby
[22:30:13] pragmatism: has joined #ruby
[22:30:24] EasyCo: Say you're using a gem, and you initialise the gem's class with arguments. How would you expect those arguments to be validated? On instantiation and throw and exception? On instantiation and return nil but have an #errors method (a-la Rails)? Manually run a #valid? method on instance after and get a list of #errors.
[22:30:45] evanjs: has joined #ruby
[22:32:58] simplyianm: has joined #ruby
[22:33:50] realDAB: has joined #ruby
[22:36:26] havenwood: EasyCo: I'd expect duck typing and that it'd blow up wherever it stops quacking.
[22:36:44] havenwood: NoMethodError: undefined method `quack' for nil:NilClass
[22:37:17] bruno-: has joined #ruby
[22:38:51] mikecmpbll: has joined #ruby
[22:39:53] _seanc_1: has joined #ruby
[22:40:15] centrx: That means it's not a duck
[22:40:17] pragmati_: has joined #ruby
[22:40:54] MEATCHICKEN: Anyone familiar with lat/lng math here?
[22:41:25] northfurr: has joined #ruby
[22:41:27] MEATCHICKEN: I have a point(lat/lng) and a distance. I need to figure out if another point is within the "circle"
[22:41:55] EasyCo: havenwood: Unfortunately in this instance duck typing wouldn't work because the gem takes information and outputs a parsed plain text file. So the user could really give it whatever value they want as long as it's a string within a certain max length. I'm just undecided of the best way to deal with that validation.
[22:42:40] Ox0dea: has joined #ruby
[22:42:43] someword: has left #ruby: ()
[22:43:15] Rager: meatchicken: define: "the \"circle\""
[22:43:21] jhass: meatchicken: figure out in which projection your coordinates are, digging up the right formula with projection within radius / within range as search term should be easy
[22:43:50] MEATCHICKEN: jhass, slow down there please -> projection?
[22:43:58] jhass: if you don't know it's probably wgs84
[22:43:58] centrx: meatchicken, isn't itsqrt((x1 - x0)^2 + (y1 - y0)^2)
[22:44:18] MEATCHICKEN: Rager, Well the base point(lat/lng) and the distance => make a "circle" of coverage
[22:44:23] jhass: centrx: if a broad approximation is okay
[22:44:23] Rager: centrx: on a cartesian plane, sure
[22:44:45] volty: has joined #ruby
[22:44:54] Rager: looks like a gem for you: https://github.com/djberg96/gis-distance
[22:45:02] Rager: sounds like GIS work
[22:45:07] Rager: even if it's simple GIS
[22:45:17] MEATCHICKEN: What search terms to read up about this? you guys know what you're talking about
[22:45:26] MEATCHICKEN: centrx, what is that formula called? I recognize it from math classes lol
[22:45:44] centrx: probably called 'the distance formula'
[22:45:48] centrx: it's just a triangle
[22:46:12] MEATCHICKEN: centrx, isn't that a square?
[22:46:15] MEATCHICKEN: it was 4 points lol
[22:46:15] centrx: but the map is not the territory
[22:46:28] simplyianm: has joined #ruby
[22:46:36] skade: has joined #ruby
[22:46:44] centrx: the main proof of the Pythagorean theorem is with squares yes IIRC
[22:47:07] centrx: but a square is just a triangle with four sides
[22:47:22] centrx: some call it a 'rectangle'
[22:47:39] centrx: Are you a quadriped?
[22:48:06] nobitanobi: has joined #ruby
[22:48:55] MEATCHICKEN: no a chicken is a two-legged animal
[22:49:19] volty: a triangle has, implied by its name, three angles
[22:49:38] dfockler: a biangle is a two angled line
[22:49:44] centrx: Plato says that a featherless chicken is a man
[22:49:51] MEATCHICKEN: wot is going on here
[22:49:52] Rager: what makes birds not quadrupeds?
[22:49:59] Rager: they use all four limbs for locomotion, after all
[22:50:13] centrx: ped means foot not wing
[22:50:19] havenwood: the unoangle is no angle at all
[22:50:26] Rager: or is quadrupedal locomotion actually formally defined as motion with four ground-touching apendages?
[22:50:46] MEATCHICKEN: Rager, Is there a way to figure out without the 2nd lat/lng?
[22:50:49] swgillespie: has joined #ruby
[22:50:52] volty: what are the angles of a biangle ?
[22:51:14] MEATCHICKEN: nvm. I'll think it over
[22:51:16] volty: (the sum too)
[22:51:24] Rager: meatchicken: you're trying to find out of point 2 is within some given distance of point 1
[22:51:35] dfockler: it's technically one angle, but at the same point and arc
[22:51:53] krisquigley: has joined #ruby
[22:52:01] havenwood: biangles, digons and hoshedrons--oh my
[22:52:07] baweaver: has joined #ruby
[22:52:26] havenwood: hosohedrons*
[22:52:29] MEATCHICKEN: Rager, yes. But I don't have access to point 2. I need to think on this more. thank you
[22:52:38] Rager: another gis kinda gem: https://github.com/rgeo/rgeo
[22:52:43] MEATCHICKEN: Idk what I started here, but pls be nice to chickens
[22:52:54] Rager: I eat chicken nearly every day
[22:53:51] Lexun: has joined #ruby
[22:53:53] dfockler: This is what happens when no one has a ruby question
[22:54:30] centrx: I wonder why rubyists weren't named rubes
[22:54:45] havenwood: Hmm, what can we do that's nice for chickens with Ruby...
[22:55:08] eam: anyone know of any ruby that segvs on a current interpreter?
[22:55:12] dfockler: pythonista + rubyist = pubyist
[22:55:43] jhass: how are php people called actually?
[22:56:07] eam: we just try not to talk about it
[22:56:12] eam: don't make eye contact
[22:56:47] Musashi007: has joined #ruby
[22:57:01] simplyianm: has joined #ruby
[22:58:03] jhass: ACTION is tempted to search for php hipster on youtube
[22:58:05] Ox0dea: eam: Whose day are you trying to ruin?
[22:58:39] dfockler: I wish I was better at Ruby, but there is only so much I can know
[22:59:11] Rager: I think we mostly call them "employed"
[22:59:23] eam: Ox0dea: oh, I don't need anything like that, for that
[22:59:32] Ox0dea: Well, why are you wanting to crash Ruby?
[22:59:35] havenwood: Here, quick script to choose eggs from farms that treats chickens right: https://gist.github.com/havenwood/8f5433c21b65e798d6b9
[22:59:36] alex88: has joined #ruby
[22:59:44] eam: Ox0dea: find bug fix bug
[23:00:01] eam: there's probably still a ton in Regexp
[23:00:02] havenwood: Green eggs are good.
[23:00:05] Ox0dea: >> require 'fiddle'; Fiddle::Pointer.new(1)[0]
[23:00:06] ruboto: Ox0dea # => /tmp/execpad-4041a7a48552/source-4041a7a48552:2: [BUG] Segmentation fault at 0x000001 ...check link for more (https://eval.in/382726)
[23:00:14] Ox0dea: That's not a bug, though.
[23:00:15] havenwood: Helping chickens with ruby, check.
[23:00:30] eam: oh haha, the eval bot has a FFI gem loaded?
[23:00:40] Ox0dea: Fiddle is part of the standard library.
[23:00:50] eam: is ffi deprecated?
[23:00:54] Ox0dea: I'd imagine so.
[23:01:21] eam: wow fiddle has been around for a while
[23:01:38] eam: it doesn't do jruby though, does it
[23:01:43] Ox0dea: No, of course not.
[23:01:49] eam: why "of course?"
[23:01:50] eam: ffi does
[23:02:01] paulcsmith_: has joined #ruby
[23:02:42] eam: looks like ffi is still current, just core vs supplementary?
[23:03:29] hahuang65: has joined #ruby
[23:03:30] dfockler: Do any of the other ruby implementations have better performance in general than MRI?
[23:03:44] eam: jruby does for some workloads, and doesn't for others
[23:04:07] dfockler: I know jruby has real threads
[23:04:53] eam: mri has real threads too
[23:05:01] dfockler: it just has the GIL
[23:05:23] eam: yes, which synchronizes across the real threads :)
[23:05:58] eam: as distinct from say green threads
[23:07:19] dfockler: so if you want parallelism you shouldn't use MRI?
[23:07:40] x1337807x: has joined #ruby
[23:07:46] baweaver: If you want parallelism you shouldn't use Ruby
[23:07:51] eam: depends what kind of parallelism, i/o or interpreter/cpu
[23:08:00] eam: baweaver: or just don't use threads (fork is fine)
[23:08:23] baweaver: fine fine, but honestly this is Erlang/Elixir's crowning feature
[23:08:48] dfockler: Elixir is starting to get popular
[23:08:52] baweaver: what I'm getting at is use the right tool for it, and those are far better for it.
[23:09:07] dfockler: baweaver: that makes good sense
[23:10:23] eam: >> Regexp.new ("[" * (2**20)) + "a" + ("]" * (2**20))
[23:10:24] ruboto: eam, I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
[23:10:29] eam: there's one
[23:10:35] Rager: if you want parallelism in ruby, you can usually get away with background jobs
[23:10:37] eam: that wasn't hard
[23:11:09] eam: oh wait, it's just a SystemStackError in 2.2, sigh
[23:11:57] dfockler: Rager: That's what I'm using now
[23:12:05] havenwood: dfockler: JRuby+Truffle on Graal has very, very impressive performance. It's just lately able to run Rack. No RubyGems or Rails yet.
[23:12:33] dfockler: havenwood: I read about that, it sounds pretty cool
[23:12:52] havenwood: https://github.com/jruby/jruby-truffle-stack
[23:14:08] mister_solo: has joined #ruby
[23:14:30] dfockler: It's so cool that languages are now just an interface to a computation engine, I guess they always were
[23:14:30] havenwood: dfockler: If you haven't already, check out these benchmarks: http://jruby.org/bench9000/
[23:14:42] eam: I mean honestly, if there's any kind of performance aspect for a task you probably don't want ruby
[23:14:54] Ropeney: has joined #ruby
[23:15:02] havenwood: truffle-graal really stands out from the pack
[23:15:53] aryaching: has joined #ruby
[23:16:56] havenwood: dfockler: Some great reading on other things it makes possible: http://www.chrisseaton.com/rubytruffle/modularity15/rubyextensions.pdf
[23:17:17] platzhirsch: has left #ruby: ()
[23:17:42] zenspider: you don't use ruby because it is fast. you use ruby because it is fast enough and MUCH better to implement in / maintain
[23:18:40] zenspider: which one is topaz?
[23:18:58] havenwood: zenspider: rpython proof of concept for speedy dynamic lang
[23:19:30] havenwood: zenspider: like pypy for ruby but they stopped development as soon as they proved they could do it
[23:19:30] zenspider: POC meaning it doesn't run real things (eg rails) yet?
[23:19:54] zenspider: kk. then headius' critique applies. They haven't added all the cases that'll slow it down
[23:20:02] havenwood: they claimed they did
[23:21:25] podman: has joined #ruby
[23:22:38] CBke: has joined #ruby
[23:24:18] havenwood: zenspider: There was a rogues episode with the lead topaz dev a while back: http://devchat.tv/ruby-rogues/096-rr-topaz-with-alex-gaynor
[23:24:22] dgutierrez1287: has joined #ruby
[23:24:41] evanjs: has joined #ruby
[23:24:54] havenwood: two years ago, time flies..
[23:25:02] zenspider: I can't / won't do rogues
[23:25:48] nitenq: how can I get the output of a shell comand with ruby ?
[23:26:00] jhass: nitenq: Kernel#`
[23:26:07] ruboto: jhass # => (https://eval.in/382735)
[23:26:12] jhass: in theory
[23:26:15] centrx: >> :bravo
[23:26:16] ruboto: centrx # => :bravo (https://eval.in/382736)
[23:26:16] baweaver: has joined #ruby
[23:26:58] Silent__: has joined #ruby
[23:27:11] davedev24_: has joined #ruby
[23:27:32] nitenq: ok thanks
[23:27:33] jcaho: has joined #ruby
[23:27:41] towski__: has joined #ruby
[23:29:19] startupality: has joined #ruby
[23:29:57] crdpink: has joined #ruby
[23:32:57] mdz_: has joined #ruby
[23:33:26] zenspider: havenwood: I can't skim audio and I _really_ can't listen to rogues... tons of rambling bullshit
[23:33:59] zenspider: nitenq: depends on what you want to do... you might want to look at popen
[23:34:19] nitenq: it???s ok it works perfectly with `` :)
[23:35:43] Spami: has joined #ruby
[23:37:11] diegoviola: has joined #ruby
[23:37:15] A205B064: has joined #ruby
[23:37:37] helpa: has joined #ruby
[23:39:17] Ox0dea: >> [].lazy.map.with_index
[23:39:18] ruboto: Ox0dea # => tried to call lazy map without a block (ArgumentError) ...check link for more (https://eval.in/382739)
[23:39:42] Rollabunna: has joined #ruby
[23:39:45] Ox0dea: Having to reverse the calls to #map and #with_index feels leaky.
[23:40:55] veinofstars: has joined #ruby
[23:41:00] kfpratt: has joined #ruby
[23:41:10] Ox0dea: All the standard Enumerable methods are special-cased on lazy ones to fail when not provided with a block, and I can't quite see why that should be.
[23:42:01] gluten_hell_: has joined #ruby
[23:42:40] Ox0dea: Good question.
[23:43:02] chrisseaton: zenspider: even speaking as a competitor to Topaz (I do the Truffle implementation) I think they did actually solve most of the hard parts of Ruby by the time they stopped - they weren't complete but they tackled most things that might be problematic
[23:43:20] zenspider: oh hey! how goes chrisseaton ?
[23:43:31] chrisseaton: good thanks - writing up my PhD on Truffle right now
[23:43:38] zenspider: I'm... sorry?
[23:43:47] chrisseaton: yeah it's not fun
[23:43:47] cirn0: has joined #ruby
[23:43:57] chrisseaton: well actually it is, it's just hard
[23:44:24] zenspider: I've enjoyed following your work (tho, admittedly, it isn't much... my nerd fetishes are currently falling on the PLT camp, and then viewpoints research institute)
[23:44:57] shock_one: has joined #ruby
[23:45:06] arescorpio: has joined #ruby
[23:45:19] ItSANgo: has joined #ruby
[23:45:34] chrisseaton: this is our latest paper (open access) http://delivery.acm.org/10.1145/2740000/2737963/p545-marr.pdf?ip=
[23:45:52] baweaver: ACTION whistles at url length
[23:46:03] eggoez: has joined #ruby
[23:46:17] zenspider: yeah... something is bad in that url... prolly the token
[23:46:29] zenspider: god I hate what the acm has done to open academia
[23:46:47] baweaver: considering all the escaped chars in there
[23:47:13] centrx: An error occurred while processing your request.
[23:47:25] centrx: This is going to be my new phrase instead of "No comment"
[23:47:34] ItSANgo: has joined #ruby
[23:47:36] zenspider: oh. the IP address is in there, so it probably borks on that against the token
[23:48:17] chrisseaton: http://conf.researchr.org/track/pldi2015/pldi2015-papers#Proceedings
[23:48:25] chrisseaton: search seaton on that and I think the link works from there
[23:48:35] chrisseaton: it's open access, as long as you have the right referral header I think!
[23:48:52] havenwood: chrisseaton: Yup, that worked. :)
[23:49:08] zenspider: ah. I forgot that you're working w/ Ducasse on this
[23:49:13] workmad3: has joined #ruby
[23:49:24] ItSANgo: has joined #ruby
[23:50:23] segfalt: has joined #ruby
[23:50:25] zenspider: chrisseaton: was there a similar paper ~6 mo back?
[23:50:32] zenspider: I don't remember the timeframe, tbh
[23:51:03] Rager: question on what the common practice is
[23:51:09] Rager: wait... wrong channel
[23:51:17] chrisseaton: zenspider: there was a blog post that was similar before we got the paper
[23:51:24] chrisseaton: papers are about six months behind what we're doing
[23:51:38] GnuYawk: has joined #ruby
[23:51:38] GnuYawk: has joined #ruby
[23:51:42] zenspider: that's probably it
[23:52:19] ItSANgo: has joined #ruby
[23:52:28] zenspider: I'll queue this up for a read. interesting that there's only one ungar ref...
[23:53:24] zenspider: hrm... looks like I want to read "A Domain-Specific Language for Building Self-Optimizing AST Interpreters."
[23:53:30] djbkd: has joined #ruby
[23:53:32] fujimura: has joined #ruby
[23:53:45] RegulationD: has joined #ruby
[23:53:53] zenspider: yay. found it outside of the acm paywall
[23:54:20] ndrei: has joined #ruby
[23:55:28] zenspider: chrisseaton: oh. that's also about truffle?
[23:55:29] InternetFriend: has joined #ruby
[23:55:50] chrisseaton: yeah that's how we represent Ruby objects
[23:56:05] chrisseaton: oh sorry - misread - that's the DSL that we use to build JRuby+Truffle
[23:56:24] drewo: has joined #ruby
[23:57:09] jgpawletko: has joined #ruby
[23:57:34] nitenq: I want to catch the aggrb value from this file. All is in a string ???cmd??? so I tried to do something like this http://pastebin.com/XjgMtV9h and it works for value[1] = ???60317??? but value[2] is not = ???60222???
[23:57:35] ruboto: nitenq, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/5a9f171f5ea6e761ab30
[23:57:35] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[23:58:32] zenspider: nitenq: you're splitting on that regexp
[23:58:56] zenspider: that's treating the text you're interested in as the delimiter
[23:59:01] zenspider: you probably want scan?
[23:59:23] nitenq: what do you mean ?
[23:59:26] sevenseacat: has joined #ruby
[23:59:26] zenspider: >> "a b c".scan(/\w+/)
[23:59:27] ruboto: zenspider # => ["a", "b", "c"] (https://eval.in/382744)
[23:59:31] zenspider: >> "a b c".split(/\w+/)
[23:59:32] ruboto: zenspider # => ["", " ", " "] (https://eval.in/382745)
[23:59:33] Cust0sLim3n: has joined #ruby