« Back to channel list

#ruby - 20 September 2015

« Back 1 day Forward 1 day »
[00:00:29] apple12: has joined #ruby
[00:00:30] bronson: has joined #ruby
[00:01:14] Scripore: has joined #ruby
[00:02:22] cbz: has joined #ruby
[00:03:08] deject3d: has joined #ruby
[00:04:50] Yurich: has joined #ruby
[00:05:51] gambl0re: has joined #ruby
[00:06:14] hfp: has left #ruby: ()
[00:08:49] bkxd: has joined #ruby
[00:08:59] centrx: has joined #ruby
[00:09:31] _blizzy_: has joined #ruby
[00:09:44] stardiviner: has joined #ruby
[00:11:03] devoldmx: has joined #ruby
[00:13:43] Melpaws: has joined #ruby
[00:16:12] ktkh: has joined #ruby
[00:16:35] Kallis: has joined #ruby
[00:16:49] workmad3: has joined #ruby
[00:17:24] EminenceHC: has joined #ruby
[00:17:31] Encapsulation: has joined #ruby
[00:19:06] Pupeno: has joined #ruby
[00:19:47] davedev24: has joined #ruby
[00:20:00] c355E3B: has joined #ruby
[00:20:10] ragingcake: has joined #ruby
[00:20:17] einarj: has joined #ruby
[00:20:24] webguynow: has joined #ruby
[00:21:20] bkulbida: has joined #ruby
[00:22:25] hydrozen: has joined #ruby
[00:23:58] chills42: has joined #ruby
[00:24:30] Pupeno: has joined #ruby
[00:30:05] Technodrome: has joined #ruby
[00:30:18] webguynow: has joined #ruby
[00:31:29] dcarmich: has joined #ruby
[00:32:15] Rurik: has joined #ruby
[00:32:15] Rurik: has joined #ruby
[00:35:13] drewvanstone: has joined #ruby
[00:36:16] Scripore: has joined #ruby
[00:40:00] chouhoulis: has joined #ruby
[00:42:57] drewvanstone: has joined #ruby
[00:44:43] nfisher: has joined #ruby
[00:45:03] bruno-_: has joined #ruby
[00:52:08] phutchins: has joined #ruby
[00:55:11] apple12: has joined #ruby
[00:55:11] webguynow: has joined #ruby
[00:57:55] curses: has joined #ruby
[00:58:09] phreakocious: has joined #ruby
[01:01:23] michaeldeol: has joined #ruby
[01:02:42] Scripore: has joined #ruby
[01:03:08] towski_: has joined #ruby
[01:03:27] webguynow: has joined #ruby
[01:07:46] tockitj: has joined #ruby
[01:08:26] webguynow: has joined #ruby
[01:09:17] HAL2328: has joined #ruby
[01:12:37] solocshaw1: has joined #ruby
[01:13:57] bkxd: has joined #ruby
[01:14:18] ekain: has joined #ruby
[01:17:24] webguynow: has joined #ruby
[01:19:19] tockitj: has joined #ruby
[01:21:03] tubuliferous_: has joined #ruby
[01:21:16] einarj: has joined #ruby
[01:22:18] Ebok: has joined #ruby
[01:22:39] fedexo: has joined #ruby
[01:23:00] c4nc3r: has joined #ruby
[01:23:21] c4nc3r: why is programming illegal?
[01:24:57] pipework: Ebok: There may be places where it is.
[01:25:02] webguynow: has joined #ruby
[01:25:06] Ox0dea: https://en.wikipedia.org/wiki/Export_of_cryptography_from_the_United_States#U.S._export_rules
[01:25:10] Ox0dea: Some programming is illegal.
[01:25:11] comm64x: has joined #ruby
[01:25:24] c4nc3r: i've spent 6 years in prison for writing a script that traces cookies and logs credit card details
[01:25:47] Ox0dea: Congratulations?
[01:26:08] quazimodo: has joined #ruby
[01:26:10] c4nc3r: i shouldn't be the one going to jail
[01:26:12] pontiki: driving isn't illegal. but if you drive on the sidewalks you'll go to jail
[01:26:29] c4nc3r: you don't imprison the person that sold the gun
[01:26:46] pontiki: do you have a ruby question?
[01:26:47] devoldmx: has joined #ruby
[01:27:11] c4nc3r: yes why is making ruby scripts illegal
[01:27:28] pipework: c4nc3r: We can't offer legal advice here
[01:27:35] quazimodo: so I want to write a .deb & a homebrew formula for a package i've been making for our company. It's a series of scripts & git hooks, all written in ruby. I could use it as a gem (current situation) but thats' a big pain with the 6 different ruby versions we're all using
[01:27:58] quazimodo: so, is there a sane way to go about packaging?
[01:28:28] pipework: quazimodo: Look at other projects that provide debian folders in the root.
[01:28:37] quazimodo: i'm thinking I need to make it as a gem, use bundler to vendor dependencies, then export that into a tar.gz that apt and homebrew can use
[01:28:40] pipework: The homebrew stuff is fairly easy. Maybe ruby-instlal's would be good.
[01:29:07] quazimodo: pipework: I have no idea which project?
[01:29:08] comm64x: I have a quick question, simple really, on ruby. I'm reading a book on Ruby. It's going over OOP, and it says that an object is a combination of state and methods that use that state. It gives some example of what it means by state but I just need to clarify. Is state the things we use in a class to represent categories of the concept we are looking to model?
[01:29:22] pipework: quazimodo: ruby-install maybe
[01:29:36] quazimodo: pipework: oh, ok
[01:29:37] pontiki: isn't there some thing called Transparent Ruby that makes packaging and distribution easier? i probably have the wrong name...
[01:29:50] darix: you probably mean travel ruby
[01:29:52] pipework: Travelling.
[01:30:11] pontiki: that's it, thanks. maybe that might help? i dunno, i don't know anything about packaging
[01:30:13] pipework: comm64x: No, state is things like instance variables, class variables. State is a fundamental concept of OO that you can google and wikipedia.
[01:30:21] quazimodo: comm64x: i f you mean the mathematical notion of categories, kind of yeah
[01:30:37] nfisher: has joined #ruby
[01:30:40] quazimodo: but that's very vague
[01:30:50] comm64x: pipework: thats what I meant, e.g. variables, thanks
[01:31:00] pipework: comm64x: Not all variables are 'state' though.
[01:31:08] quazimodo: pipework: each state of an object *can* represent a mathematical category
[01:31:09] pipework: Like, not in an OO fashion.
[01:31:15] pipework: quazimodo: I wouldn't know.
[01:31:32] pipework: pontiki: that's more for ruby applications so you can package a ruby with the app so that the receiver doesn't need to install ruby to install your app. Though you could certainly use traveling ruby in a package that packages a gem along.
[01:31:40] pontiki: help a gal out: what's a "mathematical category" in this conversation mean?
[01:32:19] quazimodo: comm64x: it's really really simple. Imagine a chest of drawers. Each drawer holds 'something', even another chest of drawers. That's an object
[01:32:29] quazimodo: in RUBY the drawers are a lie
[01:32:48] quazimodo: they are an illusion for the actual drawers inside, hidden away (instance variables)
[01:32:55] pontiki: "Keep your drawers out of my chest!" she cried
[01:33:07] bkulbida: has joined #ruby
[01:33:24] charliesome: has joined #ruby
[01:33:42] Ox0dea: comm64x: A Vehicle class might have methods like #turn and #accelerate, and "properties" (instance variables) like @rate_of_acceleration and @top_speed.
[01:33:51] quazimodo: in ruby foo.butt is like looking at the chest of drawers called foo, telling it to open upp the butt drawer so you can get what's inside. It's actually a function that returns the @butt instance variable
[01:33:57] Ox0dea: #turn and #accelerate are behavior, the instance variables are state.
[01:34:14] webguynow: has joined #ruby
[01:34:19] quazimodo: Also theres' no good reason that an object has 'behaviour' or methods attached to it
[01:34:20] eam: can you imagine attempting to build a safe accelerator system in ruby?
[01:34:28] quazimodo: it doesn't need to. All it needns to to is hold state
[01:34:35] pontiki: will it run in a browser?
[01:35:04] Ox0dea: quazimodo: Are you being deliberately unhelpful?
[01:35:34] pontiki: i'm only hear for rather poor comic relief
[01:35:46] quazimodo: Ox0dea: too complicated for him?
[01:36:52] comm64x: okay so, if I'm getting this right, methods would be like verbs and state would be like adjectives describing the noun
[01:37:39] deject3d: i don't think trying to draw similarities like that is a good idea
[01:37:41] pipework: comm64x: Not necessarily. It's like having mutable variables that might not be accessible from the outside of the object, but it can.
[01:37:55] Ox0dea: comm64x: That's a perfectly workable first approximation, yes.
[01:38:19] pipework: Methods are functions whose implicit first argument is 'self', if you know python or that just helps you understand that they're member functions of an object.
[01:38:42] quazimodo: comm64x: sure, if you have knowledge of the entire state, that's good. But in ruby sometimes some parts of the state are hidden (for good reaso) to the outside world
[01:39:03] jhass: comm64x: I'd say good enough for now, move on, it'll become clearer as you actually try to apply those concepts (and get shown how to do it in a different or preferred way)
[01:39:52] comm64x: jhass: That's what I was looking for clarification of, just something I can run with. Thanks everyone.
[01:40:06] comm64x: I think I can get it from here :)
[01:40:07] pipework: comm64x: On the whole, state is easily observed when there are instance and class variables present.
[01:40:22] pipework: Not necessarily just in the code, but at runtime.
[01:40:46] chouhoulis: has joined #ruby
[01:40:51] Ox0dea: comm64x: Thinking of instance variables as adjectives isn't terrible, but they're really for holding what an object knows about itself, not what other objects might think of it.
[01:42:35] jhass: going back to the Vehicle, while #accelerate is influenced by @rate_of_acceleration, #chiptune might change the actual property
[01:43:43] comm64x: Ox0dea: I get what you mean. Thanks for your help.
[01:43:59] comm64x: I tend to over analyze things
[01:44:41] jhass: not a too terrible tribe for a programmer, the trick is to set yourself a border and limit the problem domain you analyze at a given point ;)
[01:45:18] comm64x: jhass: good advice
[01:45:55] nfisher: has joined #ruby
[01:47:54] cbz: has joined #ruby
[01:47:54] cbz: has joined #ruby
[01:50:00] webguynow: has joined #ruby
[01:52:18] devoldmx: has joined #ruby
[01:57:10] webguynow: has joined #ruby
[01:59:56] nfisher: has joined #ruby
[02:01:37] old1: has joined #ruby
[02:02:44] s2013: has joined #ruby
[02:04:32] Ropeney: has joined #ruby
[02:04:34] webguynow: has joined #ruby
[02:04:53] workmad3: has joined #ruby
[02:08:24] gregf: has joined #ruby
[02:09:29] Asher: has joined #ruby
[02:09:58] nfisher: has joined #ruby
[02:10:55] rickmasta: has joined #ruby
[02:12:03] kriskropd: has joined #ruby
[02:16:43] kkeuning: has joined #ruby
[02:18:35] gambl0re: has joined #ruby
[02:19:54] [k-: has joined #ruby
[02:20:02] nfisher: has joined #ruby
[02:20:21] youngbaks: has joined #ruby
[02:24:28] phutchins: has joined #ruby
[02:26:08] arescorpio: has joined #ruby
[02:28:25] webguynow: has joined #ruby
[02:29:51] joeyjones: has joined #ruby
[02:30:20] nfisher: has joined #ruby
[02:33:55] iamninja: has joined #ruby
[02:34:02] startupality: has joined #ruby
[02:34:51] benlieb: has joined #ruby
[02:35:49] charliesome: has joined #ruby
[02:36:04] umgrosscol: has joined #ruby
[02:40:03] meatherly: has joined #ruby
[02:40:11] nfisher: has joined #ruby
[02:40:56] dgutierrez1287: has joined #ruby
[02:41:34] chouhoulis: has joined #ruby
[02:43:19] PublicSubnet: has joined #ruby
[02:45:25] PublicSubnet: has joined #ruby
[02:46:23] howdoico1: has joined #ruby
[02:49:46] newtonianb: has joined #ruby
[02:50:02] nfisher: has joined #ruby
[02:50:26] newtonianb: question: I'm trying to parse a file that has content key=val into a hash. This is what I have results = config.scan(/(\w+)=(.*)$/) but it breaks when file has \r\n or \n, how could I Fix this regex to handle both cases?
[02:50:53] gregf: has joined #ruby
[02:51:26] rushed: has joined #ruby
[02:52:17] sp4rrow: has joined #ruby
[02:53:26] Technodrome: has joined #ruby
[02:54:16] webguynow: has joined #ruby
[02:55:46] elperdut: has joined #ruby
[02:56:04] drewvanstone: has joined #ruby
[02:58:11] circ-user-serfU: has joined #ruby
[02:58:35] moeabdol1: has joined #ruby
[02:58:43] comm64x: has left #ruby: ()
[03:00:05] nfisher: has joined #ruby
[03:01:07] gener1c: has joined #ruby
[03:01:23] webguynow: has joined #ruby
[03:02:54] [k-: config = File.readlines.map { |line| line.scan <regexp> }
[03:09:37] braincrash: has joined #ruby
[03:10:18] nfisher: has joined #ruby
[03:15:25] patata00101: has joined #ruby
[03:18:19] webguynow: has joined #ruby
[03:18:27] UtkarshRay: has joined #ruby
[03:20:24] nfisher: has joined #ruby
[03:21:52] badbodh: has joined #ruby
[03:21:52] badbodh: has joined #ruby
[03:22:23] amystephen: has joined #ruby
[03:25:30] webguynow: has joined #ruby
[03:31:26] Lycanii: has joined #ruby
[03:37:25] gix: has joined #ruby
[03:38:19] webguynow: has joined #ruby
[03:42:18] chouhoulis: has joined #ruby
[03:43:15] webguynow: has joined #ruby
[03:44:06] beauby: has joined #ruby
[03:44:23] Pupeno: has joined #ruby
[03:45:04] phreakocious: has joined #ruby
[03:50:32] webguynow: has joined #ruby
[03:52:23] andyrs: has joined #ruby
[03:53:04] workmad3: has joined #ruby
[03:59:41] The_Phoenix: has joined #ruby
[03:59:58] moeabdol1: has joined #ruby
[04:04:52] Coldblackice: has joined #ruby
[04:04:56] last_staff: has joined #ruby
[04:07:27] Technodrome: has joined #ruby
[04:09:14] ellisTAA: has joined #ruby
[04:09:31] ellisTAA: can anyone recommend a good source for learning how to optimize your website
[04:09:48] rushed: has joined #ruby
[04:09:51] darkf: has joined #ruby
[04:10:29] dopie: has joined #ruby
[04:11:00] [k-: use frozen strings, that's all i have!
[04:11:00] pipework: EllisTAA: https://mitpress.mit.edu/sicp/
[04:11:48] ellisTAA: pipework: thanks, can u say more about that book
[04:11:55] towski_: has joined #ruby
[04:12:21] pipework: EllisTAA: It's pretty much the only book I've ever wanted to know whale enough to never read again, but then keep reading again anyways.
[04:13:05] pipework: Go through it translating to different languages, crying because I can't find jobs where I'd be writing scheme, or just reading it to re-read it.
[04:13:09] ellisTAA: how will this help me write more efficient websites?
[04:13:30] nfisher: has joined #ruby
[04:13:45] pipework: EllisTAA: It helps you understand more, though a lot of the trouble you'll have is in measuring and finding the places where it's not good enough.
[04:13:58] ellisTAA: ok ill check it out
[04:15:00] MiW: has left #ruby: ()
[04:17:07] webguynow: has joined #ruby
[04:18:04] ItSANgo: has joined #ruby
[04:19:34] cbz: has joined #ruby
[04:22:40] drewvanstone: has joined #ruby
[04:23:55] einarj: has joined #ruby
[04:25:29] blur3d: has joined #ruby
[04:28:51] webguynow: has joined #ruby
[04:29:05] tobukiah: has joined #ruby
[04:33:56] karapetyan: has joined #ruby
[04:36:44] tobukiah: has joined #ruby
[04:37:01] youngbaks: has joined #ruby
[04:38:43] pawnbox: has joined #ruby
[04:39:19] tobukiah: has joined #ruby
[04:39:47] doritostains: has joined #ruby
[04:42:25] iamninja: has joined #ruby
[04:43:02] chouhoulis: has joined #ruby
[04:48:59] an0ma1y: has joined #ruby
[04:49:32] yfeldblum: has joined #ruby
[04:49:39] baweaver: has joined #ruby
[04:50:39] nanoz: has joined #ruby
[04:55:04] ramfjord: has joined #ruby
[04:57:04] nfisher: has joined #ruby
[04:59:05] an0ma1y: has joined #ruby
[05:03:53] nsuke: has joined #ruby
[05:07:59] dgutierrez1287: has joined #ruby
[05:08:28] an0ma1y: has joined #ruby
[05:13:07] quazimodo: has joined #ruby
[05:13:40] an0ma1y: has joined #ruby
[05:13:53] bruno-: has joined #ruby
[05:14:11] jamesaxl: has joined #ruby
[05:19:28] oitnelis: has joined #ruby
[05:20:57] slayerjain: has joined #ruby
[05:21:08] mahuebel: has joined #ruby
[05:23:33] Technodrome: has joined #ruby
[05:23:37] kgirthofer_: has joined #ruby
[05:23:42] Ox0dea: Nope, you're staying.
[05:23:55] mahuebel: has left #ruby: ()
[05:24:17] [k-: QUIT :Ox0dea
[05:24:36] Ox0dea: /part I'm taking my ball.
[05:24:38] einarj: has joined #ruby
[05:25:13] pipework: /part nopenopenope
[05:27:52] Scripore: has joined #ruby
[05:28:03] kgirthofer: has joined #ruby
[05:30:03] roxtrongo: has joined #ruby
[05:30:18] slayerjain: has joined #ruby
[05:36:24] luckyme: has joined #ruby
[05:37:53] luckyme: has joined #ruby
[05:40:17] tejasmanohar_: has joined #ruby
[05:40:49] quazimodo: possbible to bundle install --standalone without it installing development dependencies?
[05:41:05] workmad3: has joined #ruby
[05:41:11] pipework: Yeah. I think you'd use the --groups thing
[05:42:05] Ox0dea: Just `--without development`, yeah?
[05:42:15] pipework: Ah yeah, --without
[05:42:37] quazimodo: --deployment is doing weird stuff
[05:43:10] webguynow: has joined #ruby
[05:43:22] quazimodo: maybe it's bundle package?
[05:43:46] chouhoulis: has joined #ruby
[05:43:48] psye: has joined #ruby
[05:44:52] Pupeno: has joined #ruby
[05:45:20] Ox0dea: quazimodo: `--deployment`?
[05:45:36] quazimodo: Ox0dea: bundle install --deployment
[05:47:05] quazimodo: I can kind of understand bundle install --deployment. But I'm not sure I understand bundel install --standalone vs bundle package
[05:48:05] moeabdol1: has joined #ruby
[05:48:11] sulivan: has joined #ruby
[05:49:46] sulivan: has left #ruby: ()
[05:49:46] rickmasta: has joined #ruby
[05:53:55] yardenbar: has joined #ruby
[05:55:13] webguynow: has joined #ruby
[05:59:50] CrazyEddy: has joined #ruby
[06:02:29] mondayrain: has joined #ruby
[06:04:49] devoldmx: has joined #ruby
[06:09:14] dyleted: has joined #ruby
[06:10:32] tkiel: has joined #ruby
[06:11:11] moeabdol1: has joined #ruby
[06:11:43] pawnbox: has joined #ruby
[06:12:14] Ropeney: has joined #ruby
[06:13:21] mondayrain: has joined #ruby
[06:15:17] Synthead: has joined #ruby
[06:18:30] bigmac: has joined #ruby
[06:19:18] rippa: has joined #ruby
[06:25:26] einarj: has joined #ruby
[06:26:53] pawnbox_: has joined #ruby
[06:31:02] sp4rrow: has joined #ruby
[06:33:22] sp4rrow: has joined #ruby
[06:33:53] bronson: has joined #ruby
[06:35:11] nyon: has joined #ruby
[06:40:14] CloCkWeRX: has joined #ruby
[06:41:12] armyriad: has joined #ruby
[06:41:33] pawnbox: has joined #ruby
[06:42:25] arup_r: has joined #ruby
[06:42:59] eGGsha: has joined #ruby
[06:43:14] iamninja: has joined #ruby
[06:44:02] webguynow: has joined #ruby
[06:44:30] chouhoulis: has joined #ruby
[06:55:27] webguynow: has joined #ruby
[06:56:46] luckyme: has joined #ruby
[06:57:01] charliesome: has joined #ruby
[06:57:11] curses: has joined #ruby
[06:58:40] sotojuan: has joined #ruby
[07:00:44] iateadonut: has joined #ruby
[07:01:47] karapetyan: has joined #ruby
[07:03:30] amystephen: has joined #ruby
[07:08:20] webguynow: has joined #ruby
[07:08:36] karapetyan: has joined #ruby
[07:10:21] karapetyan: has joined #ruby
[07:12:12] KnownSyntax: has joined #ruby
[07:15:02] bruno-: has joined #ruby
[07:15:47] lkba: has joined #ruby
[07:17:16] Jackneill: has joined #ruby
[07:18:01] platzhirsch: has joined #ruby
[07:19:27] Pupeno: has joined #ruby
[07:22:01] ktkh: has joined #ruby
[07:23:42] moeabdol1: has joined #ruby
[07:23:42] CloCkWeRX: has joined #ruby
[07:26:12] webguynow: has joined #ruby
[07:26:27] firstdayonthejob: has joined #ruby
[07:26:57] CloCkWeRX1: has joined #ruby
[07:28:02] rickmasta: has joined #ruby
[07:28:44] CloCkWeRX: has joined #ruby
[07:29:14] workmad3: has joined #ruby
[07:29:45] chipotle: has joined #ruby
[07:29:52] pawnbox_: has joined #ruby
[07:34:57] dgutierrez1287: has joined #ruby
[07:38:32] Rurik: has joined #ruby
[07:38:49] moeabdol1: has joined #ruby
[07:38:52] araujo_: has joined #ruby
[07:39:06] codecop: has joined #ruby
[07:39:18] JohnBat26: has joined #ruby
[07:41:38] ramfjord: has joined #ruby
[07:45:14] chouhoulis: has joined #ruby
[07:46:57] Pupeno: has joined #ruby
[07:46:57] Pupeno: has joined #ruby
[07:51:19] BlackCoyote: has joined #ruby
[07:52:20] TTilus: --deployment is shorthand for --path vendor/bundle --frozen (and --local if vendor/cache exists)
[07:53:21] ndrei: has joined #ruby
[07:54:02] brandon: has joined #ruby
[07:55:51] jgt: has joined #ruby
[07:55:54] TTilus: --standalone hardcodes stuff so that bundler is not a runtime dependency, i.e. running stuff in the package doesn't require bundler
[07:56:16] TTilus: the both are platform specific
[07:57:45] TTilus: bundle package can shrink wrap enough stuff that you can install to all supported platforms (if your deps vary) and not access network in the process
[07:59:43] baweaver: few hours off there mate.
[08:00:12] stardiviner: has joined #ruby
[08:00:33] BaroMeter: has joined #ruby
[08:02:02] Mon_Ouie: has joined #ruby
[08:04:44] webguynow: has joined #ruby
[08:05:34] devoldmx: has joined #ruby
[08:06:20] TTilus: Ox0dea: replying to old stuff... yes, class(NA) => "logical" :D
[08:07:34] pawnbox: has joined #ruby
[08:08:12] Ox0dea: TTilus: I suppose it's similar enough to `nil`, but we really oughtn't treat that bastard as much like a boolean as we tend to.
[08:08:19] decoponyo: has joined #ruby
[08:08:44] stevednd: has joined #ruby
[08:12:56] voker57: has joined #ruby
[08:14:16] webguynow: has joined #ruby
[08:16:19] krz: has joined #ruby
[08:19:29] quazimodo: has joined #ruby
[08:20:12] beast: has joined #ruby
[08:20:15] jgt1: has joined #ruby
[08:20:26] moeabdol1: has joined #ruby
[08:21:22] Ropeney: has joined #ruby
[08:21:58] justin_pdx: has joined #ruby
[08:21:58] Ropeney: has joined #ruby
[08:25:34] pawnbox: has joined #ruby
[08:29:03] Aces1up: has joined #ruby
[08:29:09] Aces1up: anyone here good with nokogiri?
[08:29:27] Aces1up: i am trying to add a node right before the closing </body> tag of an html document
[08:29:34] Aces1up: example here : http://pastebin.com/w0uHHWzi
[08:29:34] ruboto: aces1up, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/949d9574059afab9e299
[08:29:34] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[08:31:21] Ox0dea: aces1up: Do you solemnly swear that you're up to no good?
[08:31:50] Ox0dea: There's probably a better way to inject your JavaScript.
[08:32:30] sanjayu: has joined #ruby
[08:33:18] webguynow: has joined #ruby
[08:35:01] apeiros: aces1up: http://www.nokogiri.org/tutorials/modifying_an_html_xml_document.html
[08:35:17] cbz: has joined #ruby
[08:38:22] roxtrongo: has joined #ruby
[08:39:40] Rurik: has joined #ruby
[08:41:41] youngbaks: has joined #ruby
[08:44:14] iamninja: has joined #ruby
[08:45:29] karapetyan: has joined #ruby
[08:46:00] chouhoulis: has joined #ruby
[08:46:27] futilegames: has joined #ruby
[08:51:02] michael_mbp: has joined #ruby
[08:53:22] Aces1up: apeiros I looked through that, doesn't seeem to show what I want.
[08:53:42] apeiros: it does. but what did you try so far?
[08:54:11] apeiros: I mean it doesn't show you a ready-recipe for your use-case, but the relevant things are there.
[08:54:56] DoubleMalt: has joined #ruby
[08:55:45] Aces1up: nothing but from reading, i do not see any functions that would do what i want, sorry if i'm not seeing it, i will read through it again.
[08:55:56] moeabdol1: has joined #ruby
[08:56:20] apeiros: aces1up: add_child is one method to do what you want
[08:57:18] Aces1up: add child would add from opening tag of whatever node i select correct?
[08:57:42] apeiros: what does "add from opening tag" mean?
[08:57:56] apeiros: it appends a child to the node you call it on
[08:58:06] moeabdol: has joined #ruby
[09:01:06] iamninja: has joined #ruby
[09:01:41] Aces1up: so i would have to traverse the whole document to detect the node right before the closing <body> so i can add a child to that node?
[09:01:41] jkladfs: has joined #ruby
[09:03:05] apeiros: aces1up: no. adding a child is not adding after. adding a child is within the node.
[09:03:41] pawnbox: has joined #ruby
[09:03:58] apeiros: after/before is a sibling relation, not child/parent
[09:10:55] Aces1up: thanks apeiros that cleared up siblings / child relationship for me
[09:11:46] devyn: has joined #ruby
[09:11:52] youngbaks: has joined #ruby
[09:13:40] lxsameer: has joined #ruby
[09:15:22] mosez: has joined #ruby
[09:17:23] workmad3: has joined #ruby
[09:17:24] Stan: has joined #ruby
[09:19:47] mosez: has joined #ruby
[09:23:08] apeiros: aces1up: still not solved?
[09:24:06] mosez: has joined #ruby
[09:24:24] ledestin: has joined #ruby
[09:25:45] moeabdol: how would someone get the attributes names of a webservice method using savon?
[09:25:52] mosez: has joined #ruby
[09:26:08] jgt1: has joined #ruby
[09:26:52] Ox0dea: moeabdol: Are you being punished?
[09:27:15] moeabdol: Ox0dea: lol...I don't get what you mean?
[09:27:40] einarj: has joined #ruby
[09:27:49] moeabdol: am I doing something wrong posting my questions here?
[09:27:50] apeiros: moeabdol: having to use a soap interface is considered punishment by some (many?)
[09:28:07] apeiros: your question is fine here
[09:28:36] lkba: has joined #ruby
[09:28:49] moeabdol: apeiros: oh thanks...I thought using soap savon is the proper way to communicate with web-services.
[09:29:07] moeabdol: apeiros: oh! and I'm not a guru by any means
[09:29:24] moeabdol: just a newbie
[09:29:34] Tempesta: has joined #ruby
[09:30:02] apeiros: moeabdol: ah it's not the choice of your tools. it's soap interfaces themselves. many consider them to be painful to use. don't mind that comment.
[09:30:47] moeabdol: apeiros: how would you personally tackle web-services?
[09:31:24] apeiros: writing one or using an existing one?
[09:32:19] moeabdol: apeiros: using an existing one
[09:32:29] apeiros: savon is a fine choice then I think
[09:32:56] devyn: has joined #ruby
[09:33:21] Tempesta: has joined #ruby
[09:33:47] moeabdol: apeiros: but then coming back to my original problem. I can't seem to successfully call the webservice. It keeps asking me for an attribute which I have provided.
[09:33:58] moeabdol: I'll share my code if you don't mind
[09:35:38] spider-mario: has joined #ruby
[09:35:59] shevy: share code, pants and house
[09:36:56] moeabdol: do you know any good sites to share ruby code? :)
[09:37:08] Ox0dea: ?gist moeabdol
[09:37:08] ruboto: moeabdol, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[09:37:19] Coldblackice: has joined #ruby
[09:37:23] Ox0dea: moeabdol: It seems like you just need to call #hash on your Savon::Response, no?
[09:37:40] stamina: has joined #ruby
[09:37:54] moeabdol: I'm calling the service using the call method
[09:38:04] Ox0dea: And getting back a Response, right?
[09:38:27] moeabdol: client.call(:get_cities_by_country, message: { country_name: "england" })
[09:39:09] stardiviner: has joined #ruby
[09:39:12] Ox0dea: moeabdol: Do you know how to check the class of an object?
[09:40:24] moeabdol: Ox0dea: object.superclass
[09:40:28] moeabdol: here is my gist
[09:40:30] moeabdol: https://gist.github.com/moeabdol/2766a650714bcc955645
[09:41:01] Ox0dea: moeabdol: Change Line 6 to `p cities_info.hash`.
[09:42:23] moeabdol: Ox0dea: same issue. the output is: 'getWCity' expects parameter @CountryName
[09:43:40] Ox0dea: Lovely. In that case, it seems the problem is you've not properly set up whatever facility this thing provides for converting from :country_name to @CountryName.
[09:43:53] Coldblackice: has joined #ruby
[09:43:56] BaroMeter: has joined #ruby
[09:44:32] Ox0dea: I saw something about there being a default converter, but maybe it's not being invoked.
[09:44:35] Ox0dea: Or something.
[09:44:58] youngbaks: has joined #ruby
[09:45:03] shevy: >> RubyVM.object_id
[09:45:04] ruboto: shevy # => 545551670 (https://eval.in/436277)
[09:45:09] shevy: >> RubyVM.object_id
[09:45:10] ruboto: shevy # => 547271990 (https://eval.in/436278)
[09:45:25] shevy: does the bot respawn a new RubyVM object?
[09:45:34] Ox0dea: It's a different Ruby process each time.
[09:45:36] karapetyan: has joined #ruby
[09:46:18] shevy: it was originally based on charliesome's code right? I am watching the wicked ruby talk
[09:46:48] chouhoulis: has joined #ruby
[09:47:08] ruboto: Ox0dea # => 11533 (https://eval.in/436279)
[09:47:09] ruboto: Ox0dea # => 11537 (https://eval.in/436280)
[09:47:14] Ox0dea: It's a new process each time.
[09:47:21] Finder: has joined #ruby
[09:47:35] Ox0dea: eval.in is still charliesome's code, as I understand it.
[09:47:46] subshad: has joined #ruby
[09:49:05] Ox0dea: I'm gonna roll. Fingers crossed for somethin' good.
[09:49:11] Ox0dea: >> [*ObjectSpace.each_object].sample 3
[09:49:12] ruboto: Ox0dea # => [Enumerator, "rdoc/stats/normal.rb", []] (https://eval.in/436281)
[09:50:15] moeabdol: Ox0dea: the convention is converting CountryName to country_name as shown in savon's site examples
[09:50:39] shevy: Ox0dea is in a lottery
[09:51:23] devoldmx: has joined #ruby
[09:51:30] Ox0dea: moeabdol: I figured as much, but that conversion doesn't seem to be taking place for you.
[09:52:08] Ox0dea: shevy: What I wonder is why, at least back when I played with it on 1.9, FrozenCore.object_id was RubyVM.object_id + 60 with remarkable consistency.
[09:52:19] Finder: has left #ruby: ()
[09:52:40] BaroMeter: has joined #ruby
[09:52:49] Ox0dea: I suspect his casting such a broad net was mostly just precaution, for lack of a better term.
[09:55:55] Juanchito: has joined #ruby
[09:56:07] tomphp: has joined #ruby
[09:56:46] nodestaff: has joined #ruby
[09:56:50] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:56:51] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:56:52] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:56:52] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:56:53] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:56:54] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:56:55] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:56:56] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:56:57] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:56:58] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:56:59] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:57:00] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:57:00] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:57:01] nodestaff: #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh #mnfh v
[09:57:03] nodestaff: has left #ruby: ()
[09:57:51] shevy: what's with those webchatters ... [nodestaff] (92b91fd6@gateway/web/freenode/ip.146.185.31.214) - http://webchat.freenode.net
[09:58:21] urrr: has joined #ruby
[09:58:39] moeabdol: Ox0dea: thanks! I'll try to figure this out and let you know :)
[09:59:23] Ox0dea: moeabdol: Apologies for not being terribly interested in digging much further. :x
[09:59:46] moeabdol: Ox0dea: you've been awesome. Thanks :)
[09:59:46] DmitryBochkarev: has joined #ruby
[09:59:54] Ox0dea: Happy to have been of some help.
[10:00:25] Ox0dea: When you do manage to get the thing to send you something back, that #hash method should show you all the attributes you were interested in in your initial question.
[10:01:08] bruno-: has joined #ruby
[10:01:53] tomphp: has joined #ruby
[10:02:17] araujo_: has joined #ruby
[10:04:05] tkuchiki: has joined #ruby
[10:04:13] aswen: has joined #ruby
[10:08:30] pecpec: has joined #ruby
[10:09:33] drewvanstone: has joined #ruby
[10:10:25] araujo: has joined #ruby
[10:12:05] [k-: has joined #ruby
[10:13:16] solocshaw: has joined #ruby
[10:14:42] A124: has joined #ruby
[10:14:42] hackeron: has joined #ruby
[10:15:05] Coldblackice: has joined #ruby
[10:17:32] apt-get: has joined #ruby
[10:20:01] Coldblackice: has joined #ruby
[10:22:45] Mon_Ouie: has joined #ruby
[10:25:14] drewvanstone: has joined #ruby
[10:27:50] MyMind: has joined #ruby
[10:28:11] karapetyan: has joined #ruby
[10:29:06] fantazo: has joined #ruby
[10:29:31] mprelude: has joined #ruby
[10:29:41] charliesome: has joined #ruby
[10:31:21] zenguy_pc: has joined #ruby
[10:33:33] tockitj: has joined #ruby
[10:33:46] tockitj: has joined #ruby
[10:34:36] startupality: has joined #ruby
[10:39:54] shevy: bot downloads on rubygems confuse me
[10:40:31] shevy: I could swear that there are more downloads for projects that were already downloaded more times than before.
[10:41:06] davedev24: has joined #ruby
[10:41:26] Ox0dea: shevy: Do you suspect some sort of collusion or something?
[10:41:29] [k-: maybe rubygems is trying to filter out bot downloads?
[10:42:59] [k-: collusion* has such a scary definition
[10:43:05] Ox0dea: !define collude
[10:43:40] [k-: collude: collaborating with someone, in the dark
[10:44:30] [k-: ynonyms:conspire,??connive,??intrigue,??be hand in glove,??plot,??participate in a conspiracy,collaborate,??scheme;??More
[10:44:30] [k-: informalbe in cahoots;
[10:44:30] [k-: raremachinate,??cabal,??complot
[10:44:30] [k-: "corrupt border officials colluded with the importers of dubious goods"
[10:44:31] shevy: Ox0dea well, no... just that the download statistics seem to be changing and I don't quite know how
[10:44:43] lulzmachine: has joined #ruby
[10:45:05] shevy: like say, you push a new gem onto rubygems
[10:45:20] shevy: ok so the first downloads in the coming ~10 minutes or so will 99,9% of the time be bots
[10:45:29] Ox0dea: Sounds about right.
[10:45:44] Ox0dea: [k-: Do you know "clandestine"?
[10:46:17] shevy: But, for a project that already has had several releases before... or for a project that perhaps is after a certain size-threshold ... there seem to be significantly more downloads, both in those early stages (like 10 minutes), but also overall... and I don't know why
[10:46:54] sanjayu: has joined #ruby
[10:46:58] shevy: I am like studying bot-architecture indirectly here
[10:47:03] Ox0dea: shevy: I think you're looking for Zipf's law.
[10:47:32] chouhoulis: has joined #ruby
[10:47:59] Ox0dea: Maybe watch this at greater than 1x, but it's got some good parts: https://www.youtube.com/watch?v=fCn8zs912OE
[10:48:37] shevy: I'd love to get some way to filter away bot downloads :(
[10:48:41] [k-: i linked that video yesterday, but you seemed to be inactive :(
[10:49:10] Ox0dea: shevy: The popularity of this video on Zipf's law took the word "quizzaciously" from having a single Google result to >300k in ~5 days.
[10:49:27] Ox0dea: I think that might have some relevance to the perceived disparity in bot downloads.
[10:49:43] allcentury: has joined #ruby
[10:50:02] [k-: clandestine is such an evil word
[10:50:07] Ox0dea: I like it a lot.
[10:50:19] [k-: you like all big words
[10:50:28] Ox0dea: No, certainly not all of them.
[10:50:42] shevy: certainty
[10:50:49] Ox0dea: That was rude.
[10:50:50] [k-: so you like evil words?!
[10:51:17] Ox0dea: I reject the premise on its face.
[10:52:16] wookiehangover: has joined #ruby
[10:52:24] unop: has joined #ruby
[10:52:50] youngbaks: has joined #ruby
[10:52:51] AndroUser2: has joined #ruby
[10:53:09] [k-: you like words that look seemingly innocent, yet harbours such evil definitions?
[10:53:26] einarj: has joined #ruby
[10:53:50] [k-: Ox0dea: i think you might like this: https://drive.google.com/file/d/0Bwc34geqbVNba2tXVVNfTzRfQms/view?usp=docslist_api
[10:54:03] [k-: a collection of words and phrases by me
[10:55:05] [k-: oh dear, it seems that clandestine is in the collection
[10:55:10] Ox0dea: has joined #ruby
[10:55:18] [k-: i went to add it in again because i didnt know...
[10:56:04] tobukiah: has joined #ruby
[11:04:37] yashinbasement: has joined #ruby
[11:05:27] workmad3: has joined #ruby
[11:06:36] apt-get_: has joined #ruby
[11:07:37] ruurd: has joined #ruby
[11:08:43] mercerist: has joined #ruby
[11:14:00] workmad3: has joined #ruby
[11:14:59] fungal: has joined #ruby
[11:16:39] riffraff: has joined #ruby
[11:19:59] k3asd`: has joined #ruby
[11:26:23] mercerist: has joined #ruby
[11:28:03] rikkipitt: has joined #ruby
[11:30:30] pwnd_nsfw: has joined #ruby
[11:31:46] workmad3: has joined #ruby
[11:36:37] riffraff: has joined #ruby
[11:37:05] devoldmx: has joined #ruby
[11:38:24] [k-_: has joined #ruby
[11:40:38] brendan-: has joined #ruby
[11:41:12] apt-get: has joined #ruby
[11:41:23] iyan: has joined #ruby
[11:42:49] tomphp: has joined #ruby
[11:43:59] SCHAAP137: has joined #ruby
[11:47:02] sdothum: has joined #ruby
[11:48:16] chouhoulis: has joined #ruby
[12:01:46] shevy: those contributors code of conducts are weird
[12:04:06] Ox0dea: Do you reckon you might have trouble abiding by them?
[12:04:29] shevy: I can't sacrifice cats
[12:05:40] Ox0dea: What is the plural of "terms of service"?
[12:05:49] Ox0dea: "Termses"?
[12:06:22] ruurd: has joined #ruby
[12:06:31] shevy: how many individual term are in a terms?
[12:07:11] Ox0dea: That doesn't seem entirely pertinent.
[12:08:07] Ox0dea: If I'm contractually bound by both Foo's and Bar's terms of service, do I not have two termses of services by which to abide?
[12:08:35] youngbaks: has joined #ruby
[12:09:19] frmendes: has joined #ruby
[12:09:41] shevy: and if they have conflicting terms, you must fulfil all of them!
[12:10:39] howdoi: has joined #ruby
[12:10:45] [k-_: excuse mua, but termses of service is obviously wrong
[12:11:02] [k-_: if you would just keep to terms of service/s/ like you did above
[12:11:14] Ox0dea: [k-_: So the plural of "terms" is "terms"?
[12:11:34] [k-_: the plural of cats is still cats
[12:11:44] [k-_: apparently i pinged someone :<
[12:11:45] Ox0dea: No, "cats" is already plural.
[12:11:53] [k-_: terms is also already plural
[12:11:55] Ox0dea: "Terms of service" is a singular phrase.
[12:12:08] [k-_: yes, because of service
[12:12:22] Ox0dea: No, because it's *a* collection.
[12:12:32] [k-_: yes, of a service
[12:12:45] Ox0dea: But we're talking about the terms?
[12:12:57] [k-_: there can be one term, or two terms
[12:13:09] Ox0dea: That has no bearing on the singularity of the collection.
[12:13:27] [k-_: terms is already plural
[12:13:42] [k-_: a term is a statement dictating how you would behave
[12:13:57] [k-_: and there are many statements in a tos
[12:14:16] [k-_: yes, of a service
[12:14:26] shevy: how about
[12:14:28] shevy: terms of cats
[12:14:30] [k-_: of **_/a/_** service
[12:14:35] shevy: term of cat
[12:14:42] Ox0dea: [k-_: Please pluralize "a tos".
[12:14:48] Ox0dea: "2 tos", then?
[12:14:52] shevy: one alot, lotsa alots
[12:15:06] [k-_: terms of services, TOS(e)s
[12:15:14] shevy: what is with the parens there :)
[12:15:31] Ox0dea: [k-_: So you think we should "double pluralize" "services" rather than "terms"?
[12:15:38] Ox0dea: It's "attorneys general", not "attorney generals".
[12:15:41] solocshaw: has joined #ruby
[12:15:56] shevy: attorneys generals
[12:16:24] Ox0dea: [k-_: Ergo, your "TOS(e)s" from above should actually be "TsOS", and since the T there is "terms", we get "termses".
[12:16:31] Ox0dea: QED, motherfacer.
[12:17:08] [k-_: what's the context here?
[12:17:09] Rurik: has joined #ruby
[12:17:16] Ox0dea: Tomfoolery at best.
[12:17:40] [k-_: terms of service of different companies?
[12:17:43] Ox0dea: I do think it's an interesting linguistic anomaly, mind.
[12:17:44] tobukiah: I do think it's an / interesting linguistic / anomaly, mind.
[12:18:06] [k-_: you have to define a context
[12:18:18] Ox0dea: [k-_: Do you agree that "terms of service" is singular, insofar as it only refers to the one collection/document?
[12:18:44] k3asd`: has joined #ruby
[12:18:46] k3asd`: has joined #ruby
[12:19:01] tomphp: has joined #ruby
[12:19:11] shevy: it could refer to a collection of work
[12:19:19] apt-get: has joined #ruby
[12:19:32] sepp2k: has joined #ruby
[12:19:49] Ox0dea: [k-_: Now, to what does "two terms of service" refer?
[12:20:31] Ox0dea: Any sensible interpretation of the thing need not introduce a second collection/document, correct?
[12:20:34] [k-_: terms of [multiple] services
[12:20:39] Ox0dea: Bollocks.
[12:20:55] [k-_: as i said, you need to define a context
[12:21:12] c355E3B: has joined #ruby
[12:21:28] Ox0dea: What phrase is available to us to unambiguously refer to two distinct terms of service in the same breath?
[12:21:55] [k-_: there cannot be two distinct terms of service if they are not from different services
[12:22:28] Ox0dea: "By fooing, you have violated no less than six t_____s of s______!"
[12:22:31] Ox0dea: Fill in the blanks.
[12:22:44] FernandoBasso: has joined #ruby
[12:22:45] Ox0dea: (And correct my grammatical error.)
[12:23:06] [k-_: terms of the service
[12:23:27] kirun: has joined #ruby
[12:23:32] [k-_: was it that difficult to provide a context?
[12:23:36] einarj: has joined #ruby
[12:24:22] wildlander: has joined #ruby
[12:24:30] Ox0dea: [k-_: I thought we'd already established that there are multiple services?
[12:25:24] bubuntu: has joined #ruby
[12:25:42] [k-_: the sentence above does not provide the neccessary context that there are multiple services
[12:26:01] [k-_: a ~ Infinity
[12:26:16] Ox0dea: > helpful to nerds like me who read Terms of Service (Termses of Service? Terms of Servii?)
[12:26:33] Ox0dea: Google says there is one other person out there who's with me on this one.
[12:26:53] [k-_: please give proper context on what you want!!!
[12:26:58] linuxboytoo: has joined #ruby
[12:27:07] Ox0dea: I'm off to the dictionary of obscure sorrows to find out what to call this feel.
[12:29:28] tomphp: has joined #ruby
[12:30:56] [k-_: By fooing, you have violated no less than six terms stated in the terms of service
[12:31:15] [k-_: By fooing, you have violated six terms of services of different companies!
[12:31:23] The_Phoenix1: has joined #ruby
[12:31:23] nfk: has joined #ruby
[12:31:40] Ox0dea: [k-_: In the first, you're referring to the terms themselves, not the document as a whole.
[12:31:55] Ox0dea: And in the latter, you're pluralizing the services, but I'm asking about the terms.
[12:32:01] [k-_: By fooingm you have violated six terms in six terms of services of different services each
[12:32:10] Ox0dea: [k-_: Yes, that one!
[12:32:15] Ox0dea: How to say that more succinctly?
[12:32:42] [k-_: you cant, or there would be ambiguity
[12:32:44] bruno-: has joined #ruby
[12:32:53] Ox0dea: Not if "termses" were acceptable.
[12:33:32] [k-_: you'd have to educate the masses on what's the difference between termses and services
[12:34:13] Scripore: has joined #ruby
[12:34:24] startupality: has joined #ruby
[12:35:22] User458764: has joined #ruby
[12:36:50] meatherly: has joined #ruby
[12:37:29] [k-_: and, i strongly object to termses
[12:37:42] [k-_: never have i seen a more uglier word
[12:37:52] Pisuke: has joined #ruby
[12:37:52] jxv: has joined #ruby
[12:39:08] Ox0dea: I shall draw a picture.
[12:39:30] Kallis: has joined #ruby
[12:39:32] Rurik: has joined #ruby
[12:39:48] freerobby: has joined #ruby
[12:40:35] solocshaw: has joined #ruby
[12:41:04] Ox0dea: Imagine a fellow with two documents plainly visible on his desk and a colleague seated opposite. "We have to follow these two terms of service, Jim," the desk-haver says to his aforementioned colleague.
[12:41:14] Ox0dea: Now, would it make sense for Jim's colleague to ask "which two?"?
[12:41:57] Ox0dea: You can take it for given that John has perfect vision.
[12:42:23] [k-_: it would not make sense
[12:42:35] [k-_: people are not that particular
[12:42:43] Ox0dea: Then you concede that "terms of service" is singular?
[12:42:57] dreadnought8971: has joined #ruby
[12:42:57] [k-_: i already said it was singular
[12:43:19] [k-_: i believe terms of services is still correct.
[12:43:35] Ropeney: has joined #ruby
[12:45:04] Ox0dea: <span style="font-size: 0.001pt;">Yeah, I suppose you're right.</span>
[12:45:08] Azure: has joined #ruby
[12:45:19] dreadnought8971: has joined #ruby
[12:46:54] codenapper: has joined #ruby
[12:47:29] leafybasil: has joined #ruby
[12:47:34] Kallis: has joined #ruby
[12:48:10] karapetyan: has joined #ruby
[12:48:53] Narzew: has joined #ruby
[12:49:02] chouhoulis: has joined #ruby
[12:49:18] Mon_Ouie: has joined #ruby
[12:50:01] stardiviner: has joined #ruby
[12:50:28] devoldmx: has joined #ruby
[12:52:13] drewvanstone: has joined #ruby
[12:53:29] petersaints: has joined #ruby
[12:54:23] [k-_: yes, it's obviously the most logical conclusion
[12:55:13] petersaints: has joined #ruby
[12:55:33] PublicSubnet: has joined #ruby
[12:56:13] workmad3: has joined #ruby
[12:56:13] Ox0dea: [k-_: I would still argue that it's irregular to pluralize the adjective and not the noun (we don't say "attorney generals", remember), but this is English.
[12:57:03] lxsameer: has joined #ruby
[12:57:03] lxsameer: has joined #ruby
[12:59:42] PublicSubnet: has joined #ruby
[13:00:11] [k-_: of course, i do not care about the classes of words
[13:00:35] [k-_: adjective? servicing terms?
[13:00:44] [k-_: general attorneys?
[13:02:09] mission712: has joined #ruby
[13:02:10] chills42: has joined #ruby
[13:02:20] [k-_: terms for service?
[13:02:41] [k-_: i would argue that service is a noun in this case
[13:02:54] Ox0dea: You skipped the "of".
[13:03:38] [k-_: yes, terms belonging to this service
[13:04:03] [k-_: terms belonging to me
[13:04:14] [k-_: terms belonging to Alfred
[13:05:58] Ox0dea: I wonder how the fellow who designed Ithkuil would weigh in on the matter.
[13:06:52] solocshaw: has joined #ruby
[13:07:22] Ox0dea: I gather he constructed the language with utmost precision foremost amongst the design goals.
[13:08:40] shevy: what is Ithkuil, the webframework of Cthulhu?
[13:08:47] Ox0dea: Close enough.
[13:09:05] Ox0dea: Ithkuil is kind of like Python.
[13:09:17] Ox0dea: "There should be one-- and preferably only one --obvious way to say it."
[13:09:41] martin_work: has joined #ruby
[13:09:41] DoubleMalt: has joined #ruby
[13:11:30] frmendes: has joined #ruby
[13:13:05] chills42: has joined #ruby
[13:13:54] gregf: has joined #ruby
[13:16:25] [k-_: this will never get accepted by programmers
[13:17:32] shevy: but python became so popular
[13:17:36] icbm: has joined #ruby
[13:18:40] platzhirsch: has joined #ruby
[13:18:52] davispuh: has joined #ruby
[13:20:05] aswen: has joined #ruby
[13:20:35] mprelude: has joined #ruby
[13:21:45] bruno-: has joined #ruby
[13:24:40] rushed: has joined #ruby
[13:25:18] jxv: has joined #ruby
[13:26:24] zapata: has joined #ruby
[13:31:40] sdothum: has joined #ruby
[13:31:42] futilegames: has joined #ruby
[13:33:29] Poussinou: has joined #ruby
[13:34:22] leafybasil: has joined #ruby
[13:35:56] krz: has joined #ruby
[13:35:58] mistnim: has joined #ruby
[13:38:58] mistnim: >> a = [[0,0,0]*3]; a[0][0] = 1; p a
[13:38:59] ruboto: mistnim # => [[1, 0, 0, 0, 0, 0, 0, 0, 0]] ...check link for more (https://eval.in/436311)
[13:39:10] arup_r: This is Rails code. But I want to refactor it, so thought lets ask here. As nothing Rails you can see, it is mostly ruby. Can you give me some tips about refactoring? https://gist.github.com/aruprakshit/49b1d37062a13ca426d2 Let me know if I am not allowed to ask this here, I will then move it to ror channel
[13:39:34] mistnim: >> a = [[0,0,0]]*3; a[0][0] = 1; p a
[13:39:35] ruboto: mistnim # => [[1, 0, 0], [1, 0, 0], [1, 0, 0]] ...check link for more (https://eval.in/436312)
[13:39:41] zenguy_pc: has joined #ruby
[13:39:53] mistnim: why does the 1 gets assigned to all the rows?
[13:40:29] arup_r: >> a = [[0,0,0]]*3; p a.map(&:object_id)
[13:40:30] ruboto: arup_r # => [541886540, 541886540, 541886540] ...check link for more (https://eval.in/436313)
[13:40:35] arup_r: this is why
[13:40:47] arup_r: mistnim: ^^
[13:40:58] [k-_: favouriteable?
[13:41:02] [k-_: favourable?
[13:41:11] arup_r: favouriteable
[13:41:23] [k-_: that isnt a word
[13:41:29] arup_r: [k-: Let me tell you the story in brief
[13:42:26] mistnim: arup_r: what is that & for?
[13:43:32] arup_r: I have some Assets -- which are Project or Folder or Videos ... And you can favourite/bookmark only asset types which are projects. Now there are 3 types of urls hits the same Rails controller action and views. And the favourite column I want to hide for all pages but not projects
[13:43:37] atomical: has joined #ruby
[13:43:45] petersaints: has joined #ruby
[13:43:51] sanjayu: has joined #ruby
[13:44:15] arup_r: That is how I am able to code it.. but if..else logic is ugly
[13:44:35] arup_r: that is why asking if can be written much better way
[13:44:52] arup_r: mistnim: Read to_proc
[13:45:23] arup_r: mistnim: You want Array.new(n) {}
[13:46:56] mistnim: arup_r: thanks
[13:47:09] Ox0dea: mistnim: Do you understand what happened?
[13:48:27] [k-_: http://stackoverflow.com/questions/1217088/what-does-mapname-mean-in-ruby
[13:48:43] [k-_: arup_r: i spy with my little eye, your involvement in this thread
[13:48:48] mistnim: Ox0dea: I guess I made an array with the same object three times
[13:48:56] Ox0dea: mistnim: That's right.
[13:49:45] chouhoulis: has joined #ruby
[13:49:50] arup_r: [k-: you are right
[13:49:52] [k-_: such ruby laziness
[13:51:35] wookiehangover: has joined #ruby
[13:52:16] contradictioned: has joined #ruby
[13:53:16] arup_r: [k-: I had a good answer on this topic on Stackoveflow.com
[13:53:26] arup_r: but not able to find it out atm :
[13:53:30] krz: has joined #ruby
[13:55:06] arup_r: I got this http://stackoverflow.com/questions/22417074/creating-matrix-with-array-newn-array-new-results-in-strange-behavior/22417092#22417092
[13:55:19] arup_r: but it is not what I was searching..
[13:55:30] arup_r: I have the exact answer what mistnim asked
[13:55:43] arup_r: anyway you can mistnim you can read that also
[13:55:56] ruurd: has joined #ruby
[13:57:16] dstarh: has joined #ruby
[14:00:46] mistnim: thanks arup_r, btw I'm reading a beginner ruby book explaining the syntax of exceptions, but I still don't understand where to use them, where not to use them, and how to use them in geneal. Can you point me to something more in depth?
[14:01:28] UtkarshRay: has joined #ruby
[14:01:35] arup_r: mistnim: I started with well grounded Rubyist it helped me a lot
[14:01:45] arup_r: writer David A Black
[14:02:46] mistnim: thanks arup_r, I'll look into it
[14:03:40] arup_r: You read the book,,You will get the sweet concept ... Gurantee :D
[14:05:04] Rurik: has joined #ruby
[14:05:21] havenwood: has joined #ruby
[14:05:27] pecpec: has joined #ruby
[14:07:04] sdr995: has joined #ruby
[14:07:43] gizmore: has joined #ruby
[14:07:56] sdr995: Hi. The regexp /\w+/ matches one or more word characters. What does the word 'matches' mean here?
[14:08:02] contradictioned: has joined #ruby
[14:08:30] shevy: it'll return non nil
[14:08:53] shevy: and if you use (), then you can grab the match itself
[14:09:22] shevy: >> "abc".match(/(\w)/)[1]
[14:09:23] ruboto: shevy # => "a" (https://eval.in/436318)
[14:09:40] Ox0dea: sdr995: With regular expressions, we "match" the patterns we'd like to extract from some text.
[14:10:25] sdr995: 0x0dea: so "match" means "find a match for"?
[14:11:50] Ox0dea: sdr995: Perhaps it'll be more illustrative to think of "match" as "extract" for the time being.
[14:12:04] Ox0dea: >> "this is a string and there's a 314-1592-653 phone number hidden inside".match /\d+-\d+-\d+/
[14:12:05] ruboto: Ox0dea # => #<MatchData "314-1592-653"> (https://eval.in/436319)
[14:12:31] tjohnson: has joined #ruby
[14:12:33] ericjphillips: has joined #ruby
[14:12:55] [k-_: "fits a pattern"
[14:13:06] saddad: has joined #ruby
[14:13:10] [k-_: "is in this form or shape"
[14:14:21] shevy: "be like water my friend" - bruce lee
[14:14:34] Ox0dea: Why would I water your friend?
[14:14:43] shevy: water your friend!
[14:14:54] Ox0dea: You asked me to water your friend.
[14:15:17] [k-_: and your friend is not "your friend" in my context
[14:15:21] shevy: your friend
[14:15:29] Ox0dea: In any case, don't water people.
[14:15:30] frmendes: has joined #ruby
[14:15:43] Ox0dea: "Let's eat Susan!" vs. "Let's eat, Susan."
[14:15:46] Ox0dea: Commas save lives.
[14:15:59] shevy: I, understand.
[14:16:27] sanjayu: has joined #ruby
[14:16:51] podman: has joined #ruby
[14:17:41] [k-_: such a powerful sentence, shevy
[14:17:55] sdr995: 0x0dea: Can we also say "314-1592-653".match(/\d{3}-\d{4}-\d{3}/) can be interpreted as "find a match for /\d{3}-\d{4}-\d{3}/ inside the string?
[14:18:09] apeiros: sdr995: yes, but s/a/the first/
[14:18:40] keen_: has joined #ruby
[14:19:03] petersaints: has joined #ruby
[14:19:58] modern: has joined #ruby
[14:20:11] [k-_: apeiros: that is not powerful
[14:20:19] sdr995: What about wildcards? When we say "? matches any single character" do we mean the "? represents any single character" or "? finds any single character"?
[14:20:31] tomphp: has joined #ruby
[14:20:44] apeiros: sdr995: uh? "?" does not match characters. ? is a quantifier for the preceding pattern.
[14:21:09] sdr995: apeiros: I mean as a wildcard, not a regexp. In the command line.
[14:21:09] apeiros: "." matches any single character (except \n if used without //m flag)
[14:21:31] apeiros: sdr995: you mean in a glob expression?
[14:21:38] sdr995: aperios: Yup.
[14:22:02] shevy: I, phone.
[14:22:27] apeiros: sdr995: what's the difference between "represents" and "finds" there?
[14:22:33] yottanami: has joined #ruby
[14:22:42] apeiros: hi yottanami
[14:22:50] Ox0dea: Phone be like: "Water my friend."
[14:23:02] shinnya: has joined #ruby
[14:23:03] sdr995: apeiros: I'm not sure. That's why I'm asking. What exactly do we mean by 'matches'? 'finds' or 'represents'?
[14:23:06] apeiros: Ox0dea: the phone's friend is a plant?
[14:23:10] Ox0dea: I be like: "But that'll damage the circuitry!"
[14:23:25] Ox0dea: Phone be like: "DILLIGAF?"
[14:23:29] symm-: has joined #ruby
[14:23:30] yottanami: I want to connect to a WSDL web API so I used savon client = Savon.client(wsdl: "http://URL") but in client.operations I got this error:
[14:23:35] apeiros: sdr995: "it fits the description"
[14:23:39] yottanami: NoMethodError: undefined method `element_children' for nil:NilClass from /home/yottanami/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/wasabi-3.5.0/lib/wasabi/parser.rb:311:in `sections'
[14:23:45] umgrosscol: has joined #ruby
[14:23:49] apeiros: "a man" matches any man in a group of people
[14:24:03] apeiros: "a man with blonde hair" matches any man with blond hair in a group of people
[14:24:16] yottanami: How should I fix it?
[14:24:34] apeiros: "any character from a-z" matches "a", "f", "z" and 23 other characters from the alphabet.
[14:24:42] sdr995: apeiros: So it just means 'is the same as' right?
[14:25:00] apeiros: "a-z" is hardly *the same* as "a"
[14:25:23] arup_r: has joined #ruby
[14:25:25] apeiros: "a" matches "a", and that would be one case where the pattern is the same as the matched value.
[14:25:37] [k-_: it fits, it falls under, it can be categorised under, classified under, is apart of, is included in
[14:25:40] apeiros: "a-z" is a pattern which differs from what it matches. it's a description.
[14:26:06] apeiros: "a man with blonde hair" is not the same as "ralph, that man which has blonde hair" (and thus matches "a man with blonde hair")
[14:27:24] Hrorek: has joined #ruby
[14:27:50] krz: has joined #ruby
[14:30:02] sdr995: apeiros: Alright.
[14:30:12] apeiros: yottanami: sounds like the url you point it at is not a a WSDL
[14:30:31] apeiros: either that or wasabi has a bug which prevents it from parsing that wsdl
[14:31:25] sdr995: What's the best book to learn Ruby?
[14:31:56] apeiros: good old "define best"
[14:32:01] tno: has joined #ruby
[14:32:06] apeiros: but I wouldn't know even with a definition :)
[14:33:11] ruboto: "Best" and "better" are subjective. Try to use a different term.
[14:33:38] sdr995: Okay... what are some good books for learning ruby?
[14:34:06] apeiros: ?books sdr995
[14:34:06] ruboto: sdr995, You can find a list of recommended books at http://ruby-community.com/pages/links
[14:34:13] yottanami: apeiros, Is any other tools to check it?
[14:34:20] apeiros: if you find other books, please open an issue and/or a pull request
[14:34:35] apeiros: yottanami: I don't know of any. I'd probably google for "web wsdl"
[14:34:54] Balzrael: has joined #ruby
[14:34:56] apeiros: +checker validator whatever
[14:34:57] sdr995: has left #ruby: ()
[14:44:17] workmad3: has joined #ruby
[14:46:13] David27: has joined #ruby
[14:46:20] rippa: has joined #ruby
[14:50:31] chouhoulis: has joined #ruby
[14:51:05] pontiki: i've got a couple of books to add
[14:51:13] devoldmx: has joined #ruby
[14:51:55] apt-get: has joined #ruby
[14:53:35] Mon_Ouie: has joined #ruby
[14:55:33] robwri32: has joined #ruby
[14:56:14] apeiros: pontiki: PR :)
[14:57:16] Guest61: has joined #ruby
[15:00:41] f4cl3y: has joined #ruby
[15:03:34] Balzrael: has joined #ruby
[15:03:56] Balzrael: has joined #ruby
[15:04:13] robwri32_: has joined #ruby
[15:04:41] freerobby: has joined #ruby
[15:05:32] solocshaw: has joined #ruby
[15:06:07] OrbitalKitten: has joined #ruby
[15:06:13] frmendes: has joined #ruby
[15:06:22] krz: has joined #ruby
[15:08:19] ekain: has joined #ruby
[15:10:18] Rurik: has joined #ruby
[15:10:18] Rurik: has joined #ruby
[15:10:36] karapetyan: has joined #ruby
[15:13:27] elperdut: has joined #ruby
[15:13:49] ericjphillips: is it practical to learn programming from a book?
[15:14:07] ericjphillips: what does a book provide that online resources don't?
[15:14:22] ArchRogem: They don't go offline when AWS goes down.
[15:14:33] adaedra: some people prefer learning with a book.
[15:14:48] atomical: has joined #ruby
[15:14:52] adaedra: you can have it by the side, quick search in it, read it without your computer.
[15:16:59] ericjphillips: do many of them include exercises to try? or are they mostly reference?
[15:17:04] eam: ericjphillips: you do not need a book
[15:18:34] shevy: ericjphillips best exercise you can do is to write as much ruby code as you can, on your own, with as many different .rb files as possible
[15:18:50] shevy: a book can help you kickstart things easier
[15:19:02] shevy: the pickaxe helped me a lot back in 2004 or 2005
[15:19:16] drewvanstone: has joined #ruby
[15:19:17] shevy: I bought the newer version in... I don't know... 2008? it did not help me anywhere near as much anymore
[15:19:41] shevy: first programming books are important; later ones usually not as much anymore, unless they would be really good
[15:19:44] pecpec: has joined #ruby
[15:19:59] ericjphillips: so I'm a cute newbie..
[15:20:11] ericjphillips: what do you mean by "as many different .rb files as possible"?
[15:21:00] adaedra: write code, different things, again, again, and again
[15:21:03] eGGsha: has joined #ruby
[15:21:25] shevy: ericjphillips well just store the ruby code in .rb files
[15:21:39] shevy: you can also try it in irb
[15:22:26] ericjphillips: so you write many, different programs
[15:22:53] EminenceHC: has joined #ruby
[15:23:02] apt-get: has joined #ruby
[15:23:54] robwri32_: has joined #ruby
[15:23:57] robwri32: has joined #ruby
[15:24:41] sanjayu: has joined #ruby
[15:24:48] pecpec: has joined #ruby
[15:25:55] str_ctf: has joined #ruby
[15:26:14] einarj: has joined #ruby
[15:26:22] str_ctf: has left #ruby: ()
[15:27:16] apt-get_: has joined #ruby
[15:28:13] decoponio: has joined #ruby
[15:30:05] ixti: has joined #ruby
[15:31:29] Rurik: has joined #ruby
[15:31:35] pontiki: apeiros: this would be a lot more fun if i'd known i'd needed PG9.4
[15:32:50] symm-: has joined #ruby
[15:36:47] JCOE: has joined #ruby
[15:37:14] CloCkWeRX: has left #ruby: ()
[15:39:20] jimeh_: has joined #ruby
[15:40:45] User458764: has joined #ruby
[15:41:26] rushed: has joined #ruby
[15:42:29] drewvanstone: has joined #ruby
[15:43:03] beast: has joined #ruby
[15:46:16] pontiki: apeiros: https://github.com/apeiros/ruby-community/pull/28
[15:46:51] rodfersou: has joined #ruby
[15:50:29] gregf: has joined #ruby
[15:51:07] tubuliferous_: has joined #ruby
[15:51:20] chouhoulis: has joined #ruby
[15:51:24] BaroMeter: has joined #ruby
[15:51:32] apeiros: pontiki: thanks, merged.
[15:51:36] allomov: has joined #ruby
[15:51:58] devoldmx: has joined #ruby
[15:52:01] bkulbida: has joined #ruby
[15:52:14] martin_work: has joined #ruby
[15:52:16] moeabdol: has joined #ruby
[15:52:23] niemcu: has joined #ruby
[15:52:30] ramfjord: has joined #ruby
[15:54:37] moeabdol: has joined #ruby
[15:55:15] havenwood: has joined #ruby
[15:56:35] karapetyan: has joined #ruby
[15:56:58] codecop: has joined #ruby
[15:57:18] jhass: PostGreSQL ?
[15:57:27] jhass: never seen that capitalization before
[15:57:51] apeiros: oh? didn't see that one
[15:58:11] adaedra: pOSTGREsql
[15:58:57] apeiros: >> "postgresql".chars.map { |c| rand < 0.5 ? c.upcase : c.downcase }.join
[15:58:58] ruboto: apeiros # => "PoSTgREsql" (https://eval.in/436330)
[16:00:20] Ox0dea: >> 'postgresql'.gsub(/./) { |c| c.send %w[upcase downcase].sample }
[16:00:21] ruboto: Ox0dea # => "PostgrESql" (https://eval.in/436331)
[16:01:34] pawnbox: has joined #ruby
[16:03:58] karapetyan: if i call return in loop loop will not continue?
[16:04:04] jimeh_: has joined #ruby
[16:04:26] shevy: LocalJumpError: unexpected return
[16:05:29] sotojuan: has joined #ruby
[16:07:26] pontiki: could be a typo
[16:08:43] Ox0dea: karapetyan: You want `break`.
[16:09:09] Ox0dea: Unless your loop is within a method definition, in which case `return` will behave as you'd expect.
[16:09:11] karapetyan: where to read what difference between return and break? break return nil ?
[16:10:42] shevy: use break to get out of a loop
[16:10:45] pontiki: apeiros: https://github.com/apeiros/ruby-community/pull/30
[16:10:58] ruurd: has joined #ruby
[16:11:43] allcentury: has joined #ruby
[16:12:14] vF3hNGxc47h8: has joined #ruby
[16:14:12] platzhirsch: has joined #ruby
[16:14:45] mahuebel: has joined #ruby
[16:16:34] krz: has joined #ruby
[16:18:08] saddad: has joined #ruby
[16:19:14] allcentury: has joined #ruby
[16:19:26] exadeci: has joined #ruby
[16:22:14] jamesaxl|2: has joined #ruby
[16:24:51] atzorvas: has joined #ruby
[16:26:55] einarj: has joined #ruby
[16:29:08] SCHAAP137: has joined #ruby
[16:29:40] nateberkopec: has joined #ruby
[16:29:46] dstarh: has joined #ruby
[16:31:00] Igorshp: has joined #ruby
[16:32:27] workmad3: has joined #ruby
[16:35:29] beauby: has joined #ruby
[16:35:34] chipotle: has joined #ruby
[16:36:26] kies: has joined #ruby
[16:37:09] elperdut: has joined #ruby
[16:39:15] niemcu: has joined #ruby
[16:42:20] n008f4g_: has joined #ruby
[16:43:55] rushed: has joined #ruby
[16:45:58] sanjayu: has joined #ruby
[16:46:25] tomphp: has joined #ruby
[16:47:25] joneshf-laptop: has joined #ruby
[16:48:01] Technodrome: has joined #ruby
[16:48:17] tkiel: has joined #ruby
[16:48:31] shevy: sundays are really sleepy days
[16:52:04] chouhoulis: has joined #ruby
[16:52:35] bkulbida: has joined #ruby
[16:52:43] devoldmx: has joined #ruby
[16:53:03] pawnbox_: has joined #ruby
[16:53:50] Alina-malina: has joined #ruby
[16:53:56] yardenbar: has joined #ruby
[16:54:11] DanielI: has joined #ruby
[16:54:32] dorei: has joined #ruby
[16:56:33] mistermocha: has joined #ruby
[16:56:36] niemcu: has joined #ruby
[16:57:11] Melpaws: has joined #ruby
[16:58:10] pawnbox: has joined #ruby
[16:58:49] justin_pdx: has joined #ruby
[16:59:55] chouhoulis: has joined #ruby
[17:05:03] crdpink2: has joined #ruby
[17:07:49] tubuliferous_: has joined #ruby
[17:09:20] naftilos76: has joined #ruby
[17:10:04] platzhirsch: has left #ruby: ()
[17:11:31] swgillespie: has joined #ruby
[17:11:32] marr: has joined #ruby
[17:11:41] banister: has joined #ruby
[17:12:16] swgillespie: has left #ruby: ()
[17:13:44] pecpec: has joined #ruby
[17:14:48] frmendes: has joined #ruby
[17:15:27] devoldmx: has joined #ruby
[17:17:21] yeticry: has joined #ruby
[17:18:02] Rodya_: has joined #ruby
[17:18:14] ruurd: has joined #ruby
[17:18:23] banjara: has joined #ruby
[17:18:57] roxtrongo: has joined #ruby
[17:19:28] dgutierrez1287: has joined #ruby
[17:21:24] rapha: has joined #ruby
[17:21:55] Hanmac: has joined #ruby
[17:23:07] nowhereFast: has joined #ruby
[17:23:30] rapha: Do you know of any library able to convert a binary blob of some sort of encoded media (i.e. "audio/mpeg", "video/ogg", "audio/wav", whatever) into "audio/ogg" given that the initial mime type is known?
[17:24:10] beauby: has joined #ruby
[17:24:34] nowhereFast: I'm looking at this example
[17:24:37] nowhereFast: IO.foreach("testfile") {|x| print "GOT ", x }
[17:24:53] nowhereFast: how would I structure it so that @arr << x
[17:25:02] nowhereFast: I'm trying to add lines to an array
[17:25:20] poguez_: has joined #ruby
[17:25:35] chills42: has joined #ruby
[17:25:41] nowhereFast: @lines = IO.readlines("test.txt")
[17:25:52] apeiros: rapha: ffmpeg
[17:26:10] nowhereFast: this works, but I get the \n at the end
[17:26:20] apeiros: nowhereFast: @arr = File.readlines(path)
[17:26:37] apeiros: ah well, if you don't want the newline: @arr = File.read(path).split("\n")
[17:27:13] apeiros: and if you'd really want to reuse the above code: String#chomp is your friend
[17:27:34] centrx: has joined #ruby
[17:27:40] einarj: has joined #ruby
[17:28:11] nowhereFast: right, so I see there's File.read and IO.read
[17:28:23] nowhereFast: what is the difference in this case?
[17:28:29] apeiros: File.read is IO.read
[17:28:38] rapha: apeiros: hmm ... so with this here? https://github.com/streamio/streamio-ffmpeg
[17:28:39] apeiros: I just prefer it as it reads better IMO
[17:28:57] yeticry: has joined #ruby
[17:29:16] nowhereFast: okay, reads better but no difference under the hood?
[17:29:40] apeiros: rapha: did you read the readme?
[17:29:46] apeiros: nowhereFast: no
[17:29:55] apeiros: >> File.method(:read).owner
[17:29:56] rapha: apeiros: trying to understand it right now.
[17:29:56] ruboto: apeiros # => #<Class:IO> (https://eval.in/436361)
[17:30:01] apeiros: nowhereFast: ^
[17:30:02] elperdut: has joined #ruby
[17:30:09] apeiros: as said, File.read *is* IO.read.
[17:30:24] rapha: apeiros: when it says "video" somewhere, I'm never sure if that means "and audio also"
[17:30:40] jimeh_: has joined #ruby
[17:30:55] apeiros: rapha: who knows, maybe it does indeed not wrap audio.
[17:30:56] nowhereFast: then strictly for my own curiosity, using the foreach method I pasted initially would I be able to do an @arr << x?
[17:31:08] apeiros: rapha: but to figure that out, I'd have to read the readme too, just like you
[17:31:17] apeiros: and I sure hope you don't need somebody to read the readme for you :-p
[17:31:30] allcentury: has joined #ruby
[17:31:38] rapha: apeiros: sorry :( ... trying it out, will tell you what I learn
[17:33:46] symm-: has joined #ruby
[17:38:02] ckuhn: has joined #ruby
[17:38:30] jimeh_: has joined #ruby
[17:39:41] rushed: has joined #ruby
[17:39:58] chills42: has joined #ruby
[17:40:11] nietzschette: has joined #ruby
[17:42:03] jxv: has joined #ruby
[17:42:22] youngbaks: has joined #ruby
[17:44:05] rapha: apeiros: okay, so even though the thing has been last updated two years ago, it still seems to be working quite nicely, and audio-only isn't a problem. the resulting files seem to be valid as far as VLC is concerned.
[17:44:25] apeiros: ?toolbox rapha
[17:44:25] ruboto: rapha, https://www.ruby-toolbox.com is a website which lists lots of gems, topically organized
[17:44:31] apeiros: in case you want to search for other libs
[17:45:05] shevy: long live ffmpeg \o/
[17:45:21] Narzew: has joined #ruby
[17:46:44] NeverDie: has joined #ruby
[17:47:11] rapha: apeiros: thank you!
[17:49:15] rikkipitt: has joined #ruby
[17:49:35] NeverDie: has joined #ruby
[17:52:01] User458764: has joined #ruby
[17:56:04] nowhereFast: has left #ruby: ()
[17:56:06] Andrey: has joined #ruby
[17:57:14] Andrey_: has joined #ruby
[17:57:28] Azure: has joined #ruby
[17:58:25] Coldblackice: has joined #ruby
[17:58:56] shmilan: has joined #ruby
[17:59:21] ckuhn: has joined #ruby
[17:59:27] Andrey: Guys, quick question. Every time I use "require" and run the file, I get "C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file --"
[17:59:59] Andrey: I have uninstalled ruby and reinstalled it, still the same error...
[18:00:28] nofxx: has joined #ruby
[18:00:28] nofxx: has joined #ruby
[18:00:29] ruurd: has joined #ruby
[18:00:46] freerobby: has joined #ruby
[18:00:52] sotojuan: has joined #ruby
[18:00:59] Andrey: But if I use "load", it works fine.
[18:01:10] Andrey: Any ideas?
[18:02:44] MeMoc: has joined #ruby
[18:02:52] banjara: has joined #ruby
[18:03:00] cbz: has joined #ruby
[18:03:07] jhass: Andrey: require what?
[18:03:24] jhass: which file?
[18:03:31] jhass: where does it come from?
[18:04:23] Andrey: any file. If I have two .rb files and I try to require one of them from the other - it gives the error. If I use "load file.rb" instead - it works.
[18:05:03] jhass: use require_relative or setup $LOAD_PATH (global inside ruby) to contain the directory that contains the file
[18:05:34] pawnbox: has joined #ruby
[18:06:23] tubbo: has joined #ruby
[18:06:28] Andrey: but they are in the same directory. I'm trying to figure why "require" throws an error. It's still a valid command in Ruby 2.1, correct? (I'm reading off of a Ruby 1.9 book)
[18:06:46] tejasmanohar: has joined #ruby
[18:06:51] jhass: yes, and its behavior didn't change between the two
[18:07:02] jhass: the current working directory is not in the $LOAD_PATH
[18:07:08] jhass: require only searches in the $LOAD_PATH
[18:07:44] Andrey: Oh, I see. How do I change the path (sorry, noob here)?
[18:07:58] jhass: it's an array, just push elements to it
[18:08:03] craysiii: has joined #ruby
[18:08:10] jhass: or invoke ruby with ruby -Ifoo/bar
[18:08:38] robwri32_: has joined #ruby
[18:08:41] robwri32: has joined #ruby
[18:09:02] nettoweb: has joined #ruby
[18:09:13] FernandoBasso: has joined #ruby
[18:09:50] EminenceHC: has joined #ruby
[18:09:59] Andrey: You mean I have to set up the global $LOAD_PATH inside the file I'm executing? Like $LOAD_PATH=C:\dir\etc?
[18:10:39] jhass: more like $LOAD_PATH << __dir__ to add the directory the current file is in for example, but yeah
[18:11:16] Kallis: has joined #ruby
[18:11:45] jhass: or as said just use require_relative
[18:11:52] Andrey: jhass: But I'm already running "ruby file2.rb" from the CLI in the same directory.
[18:12:15] ckuhn: require_relative is the easiest way
[18:12:17] jhass: and I repeat, the current working directory is _not_ in the $LOAD_PATH
[18:12:53] fr1eza: has joined #ruby
[18:13:53] skade: has joined #ruby
[18:14:32] Andrey: require_relative does work, thanks jhass (ckuhn). Another question : How do I find out which is the current working directory?
[18:14:36] atmosx_laptop: has joined #ruby
[18:14:43] shmilan: has joined #ruby
[18:14:58] jhass: Andrey: the current working directory is the directory your commandline is in when you invoke a program
[18:15:08] jhass: you can query it inside Ruby with
[18:15:09] jhass: >> Dir.pwd
[18:15:10] ruboto: jhass # => "/tmp/execpad-c910d60255f7" (https://eval.in/436370)
[18:15:17] ellisTAA: has joined #ruby
[18:16:54] Andrey: jhass, this is what I can't understand. I run "ruby my_file.rb" from the CLI in the directory where both files are in, but it still gives me error.
[18:17:12] ckuhn: The working directory isn't the dir the files are in
[18:17:26] ckuhn: It is the directory that you exec ruby
[18:17:27] jhass: yes you said that multiple times now and I said multiple times now that and why that is expected behavior
[18:18:12] jhass: I'm not sure what you expect from repeating it, the answer won't change, the ways to properly do what you want won't change
[18:19:07] Andrey: jhass, ckuhn, bare with me. Here is an example. In CLI I am in "C:\ruby" from there I run "ruby my_file.rb" and both files are in c:\ruby
[18:19:23] jhass: still expected behavior
[18:19:34] wookiehangover: has joined #ruby
[18:20:11] fungal: has joined #ruby
[18:20:20] Andrey: but you said that the pwd is the directory my CLI is in when I invoke a program, "C:\ruby", in this case. Why is "require" still throwing error?
[18:20:36] workmad3: has joined #ruby
[18:20:43] ckuhn: because that directory is not included
[18:20:56] jhass: require does look for whiles relative to $LOAD_PATH. The current working directory is not in $LOAD_PATH unless you add it yourself. Add the directory with the files you want require to find yourself either inside ruby or with the -I flag, or use require_relative
[18:20:58] elperdut: has joined #ruby
[18:21:10] jhass: I can copy paste that answer as many times as you want
[18:21:16] Melpaws1: has joined #ruby
[18:21:20] jhass: meh, for files*
[18:22:56] jhass: Andrey: maybe try rephrasing what I said three times to you now. I make that task easier by posing a question you should try to answer: Where does require look for files? How does the default value of that look like?
[18:24:10] ellisTAA: has joined #ruby
[18:24:14] rushed: has joined #ruby
[18:25:28] Andrey: jhass: From reading the book I gathered that "require" looks for files in the same directory the file is in.
[18:25:46] pipework: Andrey: It looks in the $LOAD_PATH
[18:25:49] nateberkopec: has joined #ruby
[18:26:11] pipework: require_relative doesn't look in the load path. But require can be passed a local or absolute path as well.
[18:26:11] jhass: Andrey: then your book is wrong or you misinterpreted it
[18:26:26] jhass: get over that fact, it's wrong
[18:26:38] noethics: has joined #ruby
[18:27:22] jhass: and it was never right. Back in the 1.8 it coincidentally looked that way most of the time but was subtly different even back then. But those days are long gone for good
[18:28:32] einarj: has joined #ruby
[18:29:19] Andrey: I don't think the book is wrong :) I see I got it wrong. I can't understand, however, how do I know the value of $LOAD_PATH. The examples in the book simply use "require file_name", no reference to $LOAD_PATH whatsoever.
[18:30:17] Andrey: is $LOAD_PATH created when ruby was installed?
[18:30:17] jhass: $LOAD_PATH is for the most part you care about managed by RubyGems
[18:30:30] jhass: but yes, its default value is defined at compile time
[18:31:25] tubbo: has joined #ruby
[18:31:55] Andrey: so how can I see its value (using Windows)?
[18:32:17] ckuhn: It's just an array
[18:32:18] ruurd: puts $LOAD_PATH ???
[18:32:28] ruurd: >> puts $LOAD_PATH
[18:32:29] ruboto: ruurd # => /execpad/interpreters/ruby-2.2.0/lib/ruby/site_ruby/2.2.0 ...check link for more (https://eval.in/436371)
[18:32:38] Ox0dea: ruurd: Use #p.
[18:33:10] ruurd: >> #p $LOAD_PATH
[18:33:11] ruboto: ruurd # => nil (https://eval.in/436373)
[18:33:18] ruurd: hehhehheh
[18:33:19] Ox0dea: Well, I suppose #puts is sensible enough for $LOAD_PATH, but #puts is notorious for "hiding" information from newcomers.
[18:33:27] pipework: ruurd: # denotes an instance method
[18:33:36] pipework: When followed by a method name.
[18:33:43] havenwood: Andrey: Type `irb` at the command line and: p $LOAD_PATH
[18:33:53] Ox0dea: >> method(:p)
[18:33:54] ruboto: Ox0dea # => #<Method: Object(Kernel)#p> (https://eval.in/436374)
[18:34:10] Andrey: It did give me a whole list of directories...
[18:34:10] Ox0dea: Though I suppose you were probably having a laugh.
[18:34:24] Ox0dea: Andrey: Those are all the directories #require will look in.
[18:35:17] Andrey: Ox0dea, awwww, none of them is where my files are in :)
[18:35:27] havenwood: Andrey: In irb try `$LOAD_PATH << __dir__` then check `p $LOAD_PATH` again.
[18:35:53] rickmasta: has joined #ruby
[18:37:29] last_staff: has joined #ruby
[18:38:01] Andrey: havenwood, it gives me syntax error
[18:38:12] havenwood: Andrey: What version of Ruby?
[18:39:16] havenwood: Andrey: That should work: $LOAD_PATH << __dir__
[18:39:29] drewvanstone: has joined #ruby
[18:40:01] Andrey: $LOAD_PATH<<c:/ruby
[18:40:03] Andrey: SyntaxError: (irb):4: syntax error, unexpected tLABEL
[18:40:04] Andrey: $LOAD_PATH<<c:/ruby
[18:40:17] jhass: Andrey: literally
[18:40:19] havenwood: Andrey: It's an Array of Strings.
[18:40:23] jhass: $LOAD_PATH << __dir__
[18:40:30] jhass: enter that, change nothing about it
[18:40:34] jhass: include the spaces
[18:40:49] havenwood: Andrey: $LOAD_PATH << 'c:/ruby'
[18:40:52] Andrey: got ya, lol
[18:41:17] havenwood: Andrey: http://ruby-doc.org/core/Kernel.html#method-i-__dir__
[18:41:33] chills42: has joined #ruby
[18:41:43] havenwood: Andrey: http://ruby-doc.org/core/Dir.html#method-c-pwd
[18:42:48] noethics: has joined #ruby
[18:42:57] elperdut: has joined #ruby
[18:42:58] Andrey: havenwood, I did that, but $LOAD_PATH did not change
[18:43:58] havenwood: Andrey: $LOAD_PATH << 'are' << 'you' << 'sure???'
[18:44:05] havenwood: Andrey: Look at the end of the Array.
[18:44:26] havenwood: Andrey: $LOAD_PATH
[18:44:46] newtonianb: has joined #ruby
[18:45:12] zeroDivisible: has joined #ruby
[18:45:27] krz: has joined #ruby
[18:45:28] shevy: aha havenwood is awake on a sunday!
[18:45:29] zeroDivisible: has joined #ruby
[18:45:40] Andrey: This is what I get when I run a file from c:\ruby in CLI, both before and after using $LOAD_PATH<<__dir__ in irb: https://gist.github.com/anonymous/a772bb0ce88669fe1981
[18:45:50] saddad: has joined #ruby
[18:45:58] havenwood: shevy: That reminds me it's time for coffee.
[18:46:31] stamina: has joined #ruby
[18:46:50] apt-get_: has joined #ruby
[18:47:04] havenwood: Andrey: In irb it doesn't persist past that irb session or pertain to any other irb sessions.
[18:47:05] shevy: even on non-work days??
[18:47:36] michael_mbp: has joined #ruby
[18:47:42] havenwood: Andrey: If you wanted to change the load path in a file you'd have to do it in the file.
[18:48:10] blik71: has joined #ruby
[18:48:28] Andrey: havenwood: I see. So there is no way I can change $LOAD_PATH in the future to include c:\ruby, for example?
[18:48:54] ckuhn: Why would you want to do that
[18:49:27] lkba: has joined #ruby
[18:49:31] blik71: hey guys just some quick help, for some reason this for loop is only running once and for the life of me I can't figure out why
[18:49:43] bronson: has joined #ruby
[18:49:59] blik71: which paste site is used again?
[18:50:06] shevy: you could use: loop {}
[18:50:17] shevy: or if you have a collection .each
[18:50:30] Andrey: ckuhn: well, the book examples are using "require file_name", I would like to use them verbatim, if possible
[18:50:35] blik71: i tried but it still only runs once
[18:50:37] Ox0dea: ?gist blik71
[18:50:37] ruboto: blik71, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[18:50:47] Ox0dea: You're probably doing assignment instead of equality comparison. :P
[18:51:03] pocketprotector: has joined #ruby
[18:51:23] davedev24: has joined #ruby
[18:51:33] blik71: https://gist.github.com/anonymous/bf49d9f7c974eccc7fb1
[18:51:49] blik71: i hope I am lol
[18:52:05] ckuhn: Andrey: Find a new book ;) cuz that one is wrong
[18:52:18] Ox0dea: blik71: Well, start by checking the value of `maze.size`, of course.
[18:52:21] shevy: and what is the value: maze.size
[18:52:26] shevy: it must be 1
[18:52:46] ddrmanxbxfr: has joined #ruby
[18:52:53] blik71: i checked with pry and its 4 like it should be
[18:53:09] havenwood: Andrey: I think jhass showed you how you can invoke Ruby with a load path directory specified. You could alias with the flag if you wanted but such shenanigans can be avoided by setting up $LOAD_PATH in your Ruby file.
[18:53:41] havenwood: Andrey: You can get a fairly abbreviated list of Ruby flags with: ruby -h
[18:53:59] havenwood: Or a lot more info about the flags with: man ruby
[18:54:48] Andrey: ckuhn: LOL. havenwood: I think I got the gist of jhass, I'm thinking maybe the author made a mistake using"require" instead of "require_relative"?
[18:55:03] spider-mario: has joined #ruby
[18:56:02] mahuebel: has joined #ruby
[18:56:05] havenwood: Andrey: If you're thinking about setting up load path it might be time to cut a gem. :)
[18:56:18] jhass: havenwood: maybe not.
[18:56:22] Ox0dea: Bit early.
[18:56:35] havenwood: Aye. Probably so.
[18:56:38] Ox0dea: Andrey: That said, do you know about gems?
[18:56:41] meatherly: has joined #ruby
[18:56:47] havenwood: Andrey: http://guides.rubygems.org/what-is-a-gem/
[18:57:04] Andrey: havenwood - lol, let's not get ahead of ourselves. (<Ox0dea)
[18:57:45] havenwood: Andrey: It's something to look forward to then. :) Just know there's a nice convention to land on one you understand what all is going on.
[18:57:47] Lycanii: has joined #ruby
[18:58:09] Ox0dea: Andrey: You might be thinking this pain you're experiencing with paths is ridiculous, but it's really a very sensible approach; if Ruby automagically used a matching file in the current directory without your explicitly mentioning so, you would instead experience the pain when trying to bring in a gem of the same name.
[18:58:13] Ox0dea: It's better this way.
[18:58:52] Andrey: I did a search of the Pickaxe and they talk about "require_relative" there for exactly my case. I guess the first book was wrong afterall for just using "require my_file" in the examples...
[18:59:02] Ox0dea: Could well have been.
[18:59:58] Andrey: So basically, unless I set up the $LOAD_PATH myself, I should use "require" just for gems?
[19:00:07] Ox0dea: Then again, are you sure they weren't using require './foo' to specify a relative path?
[19:00:35] Andrey: Ox0dea, nope, just "require file_name".
[19:00:45] decoponio: has joined #ruby
[19:01:06] shevy: blik71 if it is 4 then it will run exactly 4 times
[19:01:12] Denis: has joined #ruby
[19:01:32] youngbaks: has joined #ruby
[19:01:37] blik71: in pry it only runs once because i is not being incremented
[19:02:03] davedev24: has joined #ruby
[19:02:04] Coldblackice_: has joined #ruby
[19:02:07] shevy: >> 5.times { print 'Hi, ' }
[19:02:08] ruboto: shevy # => Hi, Hi, Hi, Hi, Hi, 5 (https://eval.in/436396)
[19:02:41] shevy: >> 5.times {|i| print i,' ' }
[19:02:42] ruboto: shevy # => 0 1 2 3 4 5 (https://eval.in/436397)
[19:02:51] blik71: nevermind I fixed it lol small typo in a previous statement
[19:02:51] shevy: so you can see, ruby is clear on it
[19:02:51] tobukiah: nevermind I fixed / it lol small typo in a / previous statement
[19:04:57] Ox0dea: blik71: Are you not surprised by the output of shevy's demonstration?
[19:05:10] Ox0dea: He said `5.times`, but I see six numbers; what happened?
[19:06:04] youngbaks: has joined #ruby
[19:06:40] karapetyan: has joined #ruby
[19:07:03] houhoulis: has joined #ruby
[19:07:45] ekain: has joined #ruby
[19:08:25] j4cknewt: has joined #ruby
[19:09:52] unop: has joined #ruby
[19:11:23] Technodrome: has joined #ruby
[19:11:24] apt-get: has joined #ruby
[19:12:13] Andrey: OK, guys, my mystery has been solved. Apparently up until Ruby 1.8.7 "require" did scan the current directory first, before moving to $LOAD_PATH. This book says that it covers 1.9, but apparently not all the way. Thanks to havenwood, jhass, ckuhn, and of course, Ox0dea, who is still trying to help me, despite of == lost cause :)
[19:13:25] apeiros: "did scan the current directory first, before moving to $LOAD_PATH"
[19:13:31] jhass: Andrey: I noted that. I also noted that "current directory" is the wrong and misleading way to picture it, it's the current working directory
[19:13:33] apeiros: 1.8 simply contained "." as part of $LOAD_PATH
[19:13:48] leafybas_: has joined #ruby
[19:13:51] sanjayu: has joined #ruby
[19:14:01] m8: has joined #ruby
[19:14:01] apeiros: and ., as jhass just said, is the working directory. relying on that in $LOAD_PATH is brittle at best.
[19:14:09] cbz: has joined #ruby
[19:14:09] ckuhn: has joined #ruby
[19:14:19] jhass: apeiros: scroll up, been through this like 5 times now
[19:14:29] rushed: has joined #ruby
[19:14:31] apeiros: maybe it sticks now!
[19:14:37] ellisTAA: has joined #ruby
[19:14:37] Cache_Money: has joined #ruby
[19:14:53] Andrey: jhass, you should talk to Ox0dea :). apeiros - it sure did
[19:14:53] ruurd: has joined #ruby
[19:15:08] pecpec: has joined #ruby
[19:16:30] Andrey: I don't think I'll ever forget "the whole require- $LOAD_PATH-debacle" ;)
[19:17:22] PaulCapestany: has joined #ruby
[19:17:56] Narzew_: has joined #ruby
[19:19:38] avahey: has joined #ruby
[19:22:30] fedexo: has joined #ruby
[19:24:45] yardenbar: has joined #ruby
[19:26:40] blik71: hey is there a reason pry would stop telling you values of variables of strings and ints and instead just give u the object class and address?
[19:27:48] Ox0dea: blik71: Pry invokes an object's #inspect method to decide what to show you.
[19:27:50] Narzew: has joined #ruby
[19:27:59] bronson: has joined #ruby
[19:28:26] Ox0dea: If an object doesn't have a custom definition, it defers to the default provided by Object, which results in the kind of output you're seeing.
[19:28:26] gard: has joined #ruby
[19:28:35] Ox0dea: >> Object.new
[19:28:36] ruboto: Ox0dea # => #<Object:0x4149447c> (https://eval.in/436401)
[19:28:43] pwnd_nsfw: has joined #ruby
[19:28:46] apeiros: I think you can change the way pry inspects an object
[19:28:50] Ox0dea: Well, yeah.
[19:28:58] apeiros: so that'd be another possible reason
[19:29:16] einarj: has joined #ruby
[19:29:23] dreadnought8971: has joined #ruby
[19:29:40] Ox0dea: blik71 would have had to do some intrusive tinkering to see something like #<String:0xf00>, I would think?
[19:31:17] lorn: has joined #ruby
[19:31:20] lorn: has joined #ruby
[19:31:42] blik71: i don't know what i did lol but thats what im seeing
[19:32:46] icbm: has joined #ruby
[19:33:49] workmad3: has joined #ruby
[19:35:08] radgeRayden_: has joined #ruby
[19:35:42] PaulCapestany: has joined #ruby
[19:37:19] leafybasil: has joined #ruby
[19:40:11] baweaver: has joined #ruby
[19:40:30] Lingo: has joined #ruby
[19:43:32] cbz: has joined #ruby
[19:43:55] elperdut: has joined #ruby
[19:44:44] startupality: has joined #ruby
[19:45:03] towski_: has joined #ruby
[19:46:00] art-solopov: has joined #ruby
[19:48:43] atomical: has joined #ruby
[19:49:20] accacin: has joined #ruby
[19:50:15] ckuhn: has joined #ruby
[19:51:07] davedev24: has joined #ruby
[19:52:48] solocshaw1: has joined #ruby
[19:54:23] toretore: has joined #ruby
[19:55:37] Kallis: has joined #ruby
[19:55:38] Joufflu: has joined #ruby
[19:55:40] Yzguy: has joined #ruby
[19:59:06] phutchins: has joined #ruby
[20:02:16] chipotle: has joined #ruby
[20:03:53] hectortrope: has joined #ruby
[20:03:55] Soda: has joined #ruby
[20:04:56] cbz: has joined #ruby
[20:04:56] cbz: has joined #ruby
[20:06:23] tomaz_b: has joined #ruby
[20:06:24] kobain: has joined #ruby
[20:08:16] PlasmaStar: has joined #ruby
[20:08:24] newtonianb: question: I have a ruby script that dumps out a configuration file. In my ruby script I need to specify the line ending (I'm dumping an array with line ending added to end of each element and dumping it to a file). What line ending should I be using that would be compatible across platforms? \n or \r\n ?
[20:08:27] Yzguy: has joined #ruby
[20:08:51] atmosx_laptop: Newtonianb: maybe make that config file a json or yaml
[20:09:13] Technodrome: has joined #ruby
[20:09:44] atmosx_laptop: this cmd: ip route add 10.11.0.0/24 dev tun0 src 10.11.0.10 table vpn can be system("ip", "route", "add" ... "table" "vpn") right?
[20:11:15] freerobby: has joined #ruby
[20:11:27] hectortrope: has joined #ruby
[20:12:17] hectortrope: has joined #ruby
[20:13:32] Ox0dea: ?try atmosx_laptop
[20:13:33] ruboto: atmosx_laptop, Why don't you try it and see for yourself?
[20:14:02] atmosx_laptop: Ox0dea: yeah... I'lljust go with system(" entire command #{var} ...")
[20:14:48] sdothum: has joined #ruby
[20:15:05] pocketprotector: has joined #ruby
[20:15:14] apeiros: atmosx_laptop: I'd only do that if var is not userinput
[20:15:16] tomphp: has joined #ruby
[20:15:34] apeiros: otherwise be prepared for your mandatory var = "; rm -rf /"
[20:15:49] Ox0dea: Newtonianb: Ruby provides you with the platform-specific input record separator, which is almost certainly the one you'll want to use for output fields as well.
[20:16:22] atmosx_laptop: apeiros: it's not, it's a ruby script to create a routing table for transmission
[20:16:27] Kallis: has joined #ruby
[20:16:46] atmosx_laptop: mandatory? hehe
[20:17:34] Yzguy: has joined #ruby
[20:18:24] duncannz: has joined #ruby
[20:18:54] skade: has joined #ruby
[20:19:12] newtonianb: when I do f.write("\n") should I use single or double quote? I vaguely remember somewhat it matters for this character?
[20:19:31] Ox0dea: >> '\n' == "\n" Newtonianb
[20:19:32] ruboto: Ox0dea # => /tmp/execpad-5fc17ef01ae8/source-5fc17ef01ae8:2: syntax error, unexpected tCONSTANT, expecting keywo ...check link for more (https://eval.in/436407)
[20:19:33] Ox0dea: >> '\n' == "\n" # Newtonianb
[20:19:34] ruboto: Ox0dea # => false (https://eval.in/436408)
[20:19:52] apeiros: Newtonianb: '\n' is a backslash followed by "n". "\n" is a newline.
[20:19:53] ruboto: jhass # => "\\n" (https://eval.in/436409)
[20:19:54] Ox0dea: Double quotes are necessary for special characters to take on their special meanings.
[20:22:48] segfalt: has joined #ruby
[20:23:09] cbz: has joined #ruby
[20:23:29] agent_white: has joined #ruby
[20:24:45] atmosx_laptop: Does this looks good? system("echo '1 #{table_name}' >> /etc/iproute2/rt_tables") unless system("grep #{table_name} /etc/iproute2/rt_tables")
[20:27:50] jhass: atmosx_laptop: File.read(..).include? for the second system
[20:27:51] ericjphillips: has joined #ruby
[20:28:03] jhass: you're inside Ruby, use it
[20:28:20] jhass: mmh, can File.write append?
[20:28:52] freerobby: has joined #ruby
[20:29:05] jhass: try File.write(..., "1 #{table_name}", "a") for the first system
[20:29:34] jhass: mmh, "\n1 #{table_name}\n" I guess
[20:31:02] robwri32: has joined #ruby
[20:31:07] robwri32_: has joined #ruby
[20:31:08] newtonianb: I'm trying to dump my hash to file with \n line endings but on windows when I run the script it keeps adding \r\n hash.each do |key, value| outputContent += "#{key}=#{value} \n" end then dumping the content to file using File.open(dest, 'w') { |file| file.write(content) }
[20:31:11] newtonianb: Am i doing something wrong
[20:31:20] Ox0dea: baweaver: I made one: https://gist.github.com/0x0dea/8a6a3e062094d2b327de
[20:31:21] cbz: has joined #ruby
[20:31:21] cbz: has joined #ruby
[20:31:23] Andrey: has joined #ruby
[20:31:33] Scripore: has joined #ruby
[20:32:02] umgrosscol: has joined #ruby
[20:32:13] Ox0dea: Solving it functionally is so painful. :/ I would love to be proved wrong in that conclusion.
[20:32:14] atmosx_laptop: jhass: take a look here, give me some hints if you have time https://gist.github.com/atmosx/e243aff60e86f94bd73b
[20:32:22] ckuhn: Newtonianb: What about dumping the hash to json?
[20:33:03] jhass: Newtonianb: 'wb' probably
[20:33:19] freerobby: has joined #ruby
[20:33:33] newtonianb: @jahss thanks that worked!
[20:33:36] mahuebel: has joined #ruby
[20:33:44] newtonianb: @ckuhn I don't want json though
[20:33:53] jhass: atmosx_laptop: I prefer to do things like |grep|awk in Ruby too
[20:33:54] atmosx_laptop: Newtonianb: yaml?
[20:34:21] newtonianb: I don't control the syntax it's the dotenv library that needs this format https://github.com/bkeepers/dotenv
[20:34:35] jhass: atmosx_laptop: your indentation could use some redoing :P
[20:35:13] atmosx_laptop: jhass: vim kinda messed it up, sorry hehe
[20:35:20] jhass: but otherwise probably fine, looks a bit like a bash script but the json stuff justifies using Ruby
[20:35:24] Ox0dea: atmosx_laptop: gg=G
[20:35:42] atmosx_laptop: Ox0dea: that the command that messed it up.
[20:35:45] atomical: has joined #ruby
[20:36:26] Melpaws: has joined #ruby
[20:36:42] Ox0dea: Such a stupid thing to lie about.
[20:39:57] lkba: has joined #ruby
[20:40:48] Ox0dea: atmosx_laptop: Yes?
[20:41:03] atmosx_laptop: Ox0dea: nothing, I'm too old for this.
[20:41:24] Ox0dea: You're never to old to learn to use and appreciate gg=G, bud.
[20:41:55] EminenceHC: has joined #ruby
[20:42:05] atmosx_laptop: nah, I'm too old to give a shit about what a nickname says on a screen.
[20:42:35] Ox0dea: And yet here you are, a nickname on a screen.
[20:43:02] Ox0dea: You know it's okay not to use Vim, right?
[20:43:06] Ox0dea: We don't burn heretics anymore.
[20:43:23] pawnbox: has joined #ruby
[20:45:38] pipework: At least, not publicly.
[20:46:28] Yzguy: has joined #ruby
[20:48:42] ericjphillips: i have no idea what you all are talking about.
[20:48:56] skade: has joined #ruby
[20:49:07] jhass: you're welcome
[20:49:12] saddad: has joined #ruby
[20:52:00] amoeba: has joined #ruby
[20:52:07] amoeba_: has joined #ruby
[20:56:47] camroller: has joined #ruby
[20:57:09] camroller: do you guys still remember how to add and subtract mixed and improper fractions?
[20:57:29] cndiv: has joined #ruby
[20:57:37] Ox0dea: camroller: Even some of us gals too!
[20:57:53] camroller: stop trolling please
[20:58:13] jhass: Ox0dea: your detection is broken, eh?
[20:58:41] Ox0dea: It does seem like I might need to recalibrate the thing.
[20:58:52] atmosx_laptop: I wonder can this be done in one line? https://gist.github.com/atmosx/c8b0ecf39da9b6517d83#file-trans_fix-rb-L23 (L23-24)
[20:59:17] camroller: well i would like to know because i forgot how to do that stuff since it's been a long time since i did it
[20:59:30] camroller: or are fractions not important in ruby development?
[20:59:37] Ox0dea: atmosx_laptop: Array#values_at.
[20:59:57] atmosx_laptop: Ox0dea: nice, ty
[21:00:33] ckuhn: camroller: do you mean like a Rational?
[21:00:38] ckuhn: http://ruby-doc.org/core-2.2.0/Rational.html
[21:00:41] camroller: i mean like basic arithmetic
[21:00:49] jhass: ckuhn: don't feed please
[21:00:50] ruboto: ckuhn # => 4 (https://eval.in/436412)
[21:00:57] camroller: i can't believe i forgot a lot of it
[21:01:07] Ox0dea: So go relearn it?
[21:01:22] ckuhn: jhass: thought he was srs
[21:01:24] camroller: someone just pmed me a useful channel i'll stop talking here
[21:01:35] drewvanstone: has joined #ruby
[21:01:36] camroller: i am serious, jhass is just a terrible op
[21:01:46] ckuhn: jhass: do you happen to have stake in Hass avacados?
[21:01:47] apeiros: !kick camroller good bye
[21:01:47] ruboto: ruboto kicked camroller: bye
[21:01:47] ruboto: -o ruboto
[21:02:06] jhass: ckuhn: my actual last name is Ha??, so no
[21:02:25] Ox0dea: >> '??'.upcase
[21:02:26] ruboto: Ox0dea # => "??" (https://eval.in/436413)
[21:02:38] apeiros: Ox0dea: ruby only upcases ascii
[21:02:45] Ox0dea: I know. :(
[21:05:29] ckuhn: what is the "best" ruby gui framework?
[21:05:41] pipework: shoes, probably
[21:06:02] Ox0dea: ckuhn: Opal.
[21:06:11] ckuhn: looks pretty intuitive
[21:07:46] ckuhn: Ox0dea: im confused. "Opal Ruby to JavaScript Compiler"
[21:07:52] Ox0dea: Yes, that's right.
[21:08:06] ckuhn: how is that a GUI framework
[21:08:12] Ox0dea: Because it's 2015.
[21:08:32] ckuhn: what abouts html
[21:09:18] frmendes: has joined #ruby
[21:09:35] Ox0dea: Hopefully a vestigial appendage someday.
[21:09:39] Ox0dea: A necessary evil for now.
[21:09:49] Ox0dea: For real, though: https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript
[21:09:56] Pupeno: has joined #ruby
[21:10:13] BlackCoyote: has joined #ruby
[21:10:18] Ox0dea: > the history of JavaScript... from 1995 until 2035
[21:10:46] benlieb: has joined #ruby
[21:10:51] ckuhn: I still don't understand how you generate a web interface with that
[21:11:44] Narzew: has joined #ruby
[21:13:29] VeryBewitching: has joined #ruby
[21:15:21] pecpec: has joined #ruby
[21:16:38] shevy: yeah rule of thumb - don't take Ox0dea too seriously
[21:16:52] shevy: the problem is that there are not that many GUIs in ruby :(
[21:17:07] pipework: Graphical desktop ruby tooling isn't always so great.
[21:17:08] shinnya: has joined #ruby
[21:17:16] jhass: ckuhn: ruby-gir appears worth looking at, if you can deal with Gtk that is
[21:17:23] pipework: There's gtk+ bindings, QT bindings, and shoes.
[21:17:31] shevy: and tk!!!
[21:18:53] martin_work: has joined #ruby
[21:20:20] shevy: ckuhn I guess using html/css/javascript may yield better results. I can do drag and drop via jquery or dragula really in a simple manner; in ruby-gtk it is also possible but so much more annoying
[21:21:07] pipework: There is things like electron
[21:21:21] shevy: signal_new('document_drag', GLib::Signal::RUN_FIRST,
[21:21:32] pipework: They do a lot of heavy lifting to handle a lot of things that most apps want to be able to do.
[21:21:43] jhass: (they left)
[21:22:07] workmad3: has joined #ruby
[21:22:12] Ox0dea: Another convert!
[21:23:10] Rodya_: has joined #ruby
[21:24:28] jjasonclark: has joined #ruby
[21:24:54] cbz: has joined #ruby
[21:26:16] zenguy_pc: has joined #ruby
[21:27:08] meatherly: has joined #ruby
[21:29:10] ragingcake_: has joined #ruby
[21:30:18] howdoico1: has joined #ruby
[21:30:36] Ox0dea: shevy: How many web apps do you use on a regular basis? How many native GUIs?
[21:30:44] einarj: has joined #ruby
[21:31:08] kaliwanagan: has joined #ruby
[21:31:14] ckuhn: has joined #ruby
[21:32:21] jhass: does the browser count as native gui?
[21:32:34] Ox0dea: Of course, but only once.
[21:32:39] ap4y: has joined #ruby
[21:32:43] jhass: do mobile apps count as native gui?
[21:32:49] jhass: what about games?
[21:32:52] Ox0dea: Damn! You saw through my ruse.
[21:33:03] pipework: What about each app that embeds webkit?
[21:34:11] toretore: native = not web; if they embed a web component it's a native app with a browser inside it
[21:34:21] dgutierrez1287: has joined #ruby
[21:34:42] jhass: what about the DE? does it count into the native GUIs?
[21:34:42] n008f4g_: has joined #ruby
[21:35:00] toretore: desktop env?
[21:35:14] pipework: toretore: So, one point for each?
[21:35:22] toretore: it's native
[21:35:28] pipework: I wouldn't say 'browser' but I get your point.
[21:35:28] meatherly: has joined #ruby
[21:35:34] toretore: but most users don't know/care about its existence
[21:35:37] jhass: and also Gnome3 specifically, given its UI is basically written in JS & CSS
[21:35:52] toretore: does it use html?
[21:36:06] toretore: html is what makes web based apps suck
[21:36:08] jhass: I don't think so, probably some XML descriptions though
[21:36:18] toretore: i still miss xul
[21:36:26] glennt: has joined #ruby
[21:36:29] pecpec: has joined #ruby
[21:36:32] toretore: fucking html
[21:37:02] Rodya_: has joined #ruby
[21:37:21] ekem: is it possible to use rsense across a network?
[21:37:25] toretore: and the html5 abomination that just made everything worse
[21:38:19] Ox0dea: ekem: I mean, it takes a --port argument?
[21:38:41] ekem: yeah it does, i put in --port 0.0.0.0:47637
[21:39:01] ekem: im actually sort of wondering if the atom plugin will take an ip and not just a port
[21:39:12] Ox0dea: I can't imagine why it wouldn't.
[21:39:21] shevy: Ox0dea well the web is everywhere
[21:39:34] ekem: it just has a field for default port, im trying it out but its not working as expected yet
[21:39:35] phutchins: has joined #ruby
[21:39:55] _aeris_: has joined #ruby
[21:40:00] shevy: locally I use... a browser, a pdf viewer... an editor... a torrent client... and irc client. all of these could in principle run through the browser
[21:40:20] ekem: yeah, telnet tells me nope on that one
[21:40:29] toretore: all of these could in pcinciple run through an ftp server
[21:40:34] shmilan: has joined #ruby
[21:40:35] toretore: that doesn't mean it's the best choice
[21:40:37] Ox0dea: shevy: Sure, but each of them could just as well embed a Web view, so that's essentially a moot point.
[21:40:57] martin_work: has joined #ruby
[21:41:06] karapetyan: has joined #ruby
[21:41:07] Ox0dea: The fact of the matter is that JavaScript has reached critical mass, and nothing is properly poised to slow it down.
[21:41:15] ekem: everything will be server side at some point anyway
[21:41:17] ekem: >thanks apple
[21:42:40] shevy: javascript rules the world
[21:42:49] ekem: you mean ecmascript
[21:43:04] shevy: I don't know what is ymcascript
[21:43:31] nofxx: ekem, disagree. Everything hw accelerated won't. For one example that's not gaming: photoshop
[21:43:39] darix: Ox0dea: that critical mass was reached like a few years ago when basically every browser vendor went with JS as the language for client side scripting
[21:43:52] ekem: i disagree, we will push bits fast enough to update screens
[21:43:56] ekem: just look at playstation
[21:44:07] Ox0dea: nofxx: JavaScript is fast and getting faster.
[21:44:08] ekem: they screencast games, i mean you are just sending controls on the wire
[21:44:15] darix: nofxx: there is even webgl already ... www.draw.io ... having photoshop in JS is a matter of time
[21:44:16] frmendes: has joined #ruby
[21:44:22] ekem: shevy, ecmascript is actually what javascript is
[21:44:34] pipework: JavaScript is what JavaScript does
[21:44:48] ekem: javascript is an old brand name from netscape days
[21:44:56] ekem: riding the java wave
[21:45:03] nofxx: but that's is download and run locally with hw accelerated. It's a mix. Problably will have cache so it's offline...kinda of heh
[21:45:17] nofxx: if you have or not to install it doesn't matter, it is local
[21:46:01] nofxx: Ox0dea, gem working! capkin =D
[21:46:30] toretore: hw acc will happen on the device, but it may happen as a simple set of instructions that are compiled remotely
[21:46:38] f25_pics: has joined #ruby
[21:47:40] bigmac: has joined #ruby
[21:49:37] ruby-lang709: has joined #ruby
[21:49:43] ruby-lang709: Hey, is nayone here?
[21:49:52] SCHAAP137: has joined #ruby
[21:50:06] ruby-lang709: I hope I am being nice; I just need some help with a problem.
[21:50:13] shevy: hey gateway person, long time no see
[21:50:31] ruby-lang709: Should I change my name, shevy?
[21:51:23] SkynetProgrammer: I am building a ruby gem that needs to parse a YAML file located within the lib folder
[21:51:36] SkynetProgrammer: when I run skynet.rb within the lib folder, the YAML file is parsed successfully
[21:51:49] SkynetProgrammer: But if I try to run it outside of the lib folder (like using bin/skynet)...it throws an error
[21:52:03] SkynetProgrammer: No such file or directory @ rb_sysopen - yml/characters.yml (Errno::ENOENT)
[21:52:17] ericjphillips: has joined #ruby
[21:52:25] SkynetProgrammer: I am assuming this means that Ruby thinks that it needs to find yml/characters.yml in wherever I run my program
[21:52:27] pecpec: has joined #ruby
[21:52:49] SkynetProgrammer: Uh, what code do you want?
[21:52:49] ckuhn: https://gist.github.com/
[21:52:59] ckuhn: how do you load the file
[21:53:03] Ox0dea: nofxx: Nice! It's a great name.
[21:53:40] nofxx: Ox0dea, nice that it means 'vagabond' too... taking it as 'lazy' which is exactly the point
[21:53:48] SkynetProgrammer: https://gist.github.com/tra38/c11ad345cb5467806941
[21:53:53] SkynetProgrammer: Here we go, ckuhn
[21:53:54] tubuliferous_: has joined #ruby
[21:53:55] Ox0dea: nofxx: In Russian, or?
[21:54:03] nofxx: Ox0dea, turkish iirc
[21:54:13] devbug: has joined #ruby
[21:54:17] toretore: SkynetProgrammer: which file is this?
[21:54:30] SkynetProgrammer: story_generator.rb
[21:54:39] SkynetProgrammer: which is a file that is run when I run an installed ruby gem
[21:54:48] SkynetProgrammer: (A ruby gem that I am right now creating)
[21:55:28] SkynetProgrammer: when I use my ruby gem, it runs story_generator.rb, but it fails to load those files unless I am in the folder where those files exist
[21:55:36] SkynetProgrammer: which defeats the purpose of having a ruby gem/CLI
[21:55:52] Ox0dea: SkynetProgrammer: Consider using a data directory.
[21:56:01] toretore: SkynetProgrammer: you need to create some classes
[21:56:01] SkynetProgrammer: What's a data directory?
[21:56:41] SkynetProgrammer: toretore: Yeah, I'll classify it later
[21:56:44] pipework: SkynetProgrammer: Also, for lulz, stop using sample everywhere and instead use a seed in one place and use that seed to select from the collections.
[21:57:38] toretore: SkynetProgrammer: no, it is the reason you're having problems. your lib file shouldn't know anything about file locations
[21:57:40] SkynetProgrammer: pipework: Wouldn't that mean you'll have the same words constantly selected each time I run it?
[21:58:15] tomphp: has joined #ruby
[21:58:20] toretore: it should have the necessary data fed into it from the outside
[21:58:30] SkynetProgrammer: That's...going to be odd.
[21:58:33] SkynetProgrammer: How would I do that?
[21:58:41] SkynetProgrammer: Do I stuff the yml files in the bin folder?
[21:59:02] SkynetProgrammer: of the ruby gem?
[21:59:09] aibot: has joined #ruby
[21:59:28] duncan_bayne: has joined #ruby
[21:59:28] SkynetProgrammer: Like, I need to know how to ensure that the story_generator.rb somehow gets the data from the yml fil
[21:59:38] toretore: data = YAML.load(File.read(filename)); app = MyApp.new(data: data)
[22:00:24] pipework: SkynetProgrammer: Not if the seed changes each run.
[22:00:31] duncan_bayne: Hi, quick question - are thread pools the default for JRuby 9.0.1.0? I get 'jruby: warning: unknown property jruby.thread.pooling' when I try to use thread pools with 9.0.1.0 but not with 1.7.22.
[22:00:41] pipework: SkynetProgrammer: But then you can provide a CLI option to pass in a seed so you can have reproducible output.
[22:00:48] quazimodo: has joined #ruby
[22:00:51] SkynetProgrammer: pipework: Got it
[22:00:52] duncan_bayne: I've had a look at the documentation, but it doesn't say anything about support being dropped / defaulted.
[22:01:02] toretore: duncan_bayne: in which context?
[22:01:12] SkynetProgrammer: toretore: Let me try that
[22:02:08] duncan_bayne: When I set it in JRUBY_OPTS, e.g. JRUBY_OPTS="-J-Djruby.thread.pooling=true" ruby myscript.rb
[22:02:19] duncan_bayne: No complaint from 1.7.22, but warnings with 9.0.1.0
[22:03:07] duncan_bayne: Of course it might be I'm passing in an altogether invalid option, and it's just that 1.7.22 is silent about it :)
[22:03:21] martin_work: has joined #ruby
[22:03:25] ap4y: has joined #ruby
[22:03:25] zenguy_pc: has joined #ruby
[22:04:10] workmad3: has joined #ruby
[22:04:25] opensource_ninja: has joined #ruby
[22:04:56] Vile`: has joined #ruby
[22:05:27] ap4y: has joined #ruby
[22:06:30] platzhirsch: has joined #ruby
[22:06:33] SkynetProgrammer: toretore: Trying to load the yaml file in bin/skynet is not working
[22:06:43] SkynetProgrammer: However, I kept the yaml file still inside lib/yml/
[22:07:13] SkynetProgrammer: Let me correct the path
[22:07:33] duncan_b`: has joined #ruby
[22:08:00] duncan_b`: has joined #ruby
[22:08:03] duncan_b`: has left #ruby: ()
[22:08:31] SkynetProgrammer: Alright it works!
[22:08:48] SkynetProgrammer: That being said, I am using constants to try and store the data before passing it over to the next file in line
[22:08:50] SkynetProgrammer: Is that bad ruby practice?
[22:09:44] ap4y: has joined #ruby
[22:09:57] shevy: gateway practice
[22:10:13] toretore: SkynetProgrammer: put your entire project somewhere we can see
[22:10:31] Ox0dea: SkynetProgrammer: Are you using Bundler?
[22:11:22] ap4y: has joined #ruby
[22:12:19] ap4y: has joined #ruby
[22:13:43] duncan_bayne: has joined #ruby
[22:16:01] platzhirsch: People in #java are so aggresive, after 2-3 questions forth and back one of the ops said fuck you :D
[22:16:04] cornerma1: has joined #ruby
[22:16:13] SkynetProgrammer: https://github.com/tra38/Skynet
[22:16:21] SkynetProgrammer: Here it is toretore
[22:16:28] SkynetProgrammer: I am not using Bundler
[22:18:24] lapide_viridi: has joined #ruby
[22:19:24] toretore: firstly, all your lib files should be in the skynet dir
[22:19:37] benlieb: has joined #ruby
[22:20:13] ckuhn: has joined #ruby
[22:21:01] Ox0dea: Second, all your static data should be in the data dir.
[22:21:42] toretore: you must embrace classes; 99% of your code should be inside a method that is inside a class
[22:22:04] workmad3: has joined #ruby
[22:22:06] linuxboytoo: has joined #ruby
[22:22:28] pipework: Probably more than one method though
[22:22:30] toretore: and 90+ % of those should be instance methods
[22:23:15] SkynetProgrammer: But the thing is, how would I ensure that my file will actually load the yml files in my directory
[22:23:32] SkynetProgrammer: instead of assuming that it should load yml files in the location I am currently in
[22:23:56] Ox0dea: SkynetProgrammer: Do you have me on ignore?
[22:24:19] SkynetProgrammer: No, I don't Ox0dea
[22:24:32] SkynetProgrammer: I am currently moving my files over to the data directory and the skynet directory
[22:24:37] SkynetProgrammer: I am just afraid my app will not work again
[22:24:47] toretore: SkynetProgrammer: that is not important
[22:24:56] blik71: has joined #ruby
[22:25:24] Igorshp: has joined #ruby
[22:25:27] toretore: the data will be read from the bin file and then passed into the appropriate class
[22:26:41] ndrei: has joined #ruby
[22:26:55] martin_work: has joined #ruby
[22:27:07] yosafbridge: has joined #ruby
[22:27:27] swgillespie: has joined #ruby
[22:27:55] SkynetProgrammer: toretore, the data is not being read from the bin file
[22:28:13] SkynetProgrammer: It just throws No such file or directory @ rb_sysopen - lib/data/characters.yml
[22:28:26] Azure|dc: has joined #ruby
[22:29:02] Ox0dea: SkynetProgrammer: toretore is telling you to use a path relative to your bin directory.
[22:29:13] Ox0dea: It's not the greatest idea.
[22:29:34] linuxboytoo: has joined #ruby
[22:29:36] lkba_: has joined #ruby
[22:29:50] rickmasta: has joined #ruby
[22:29:58] pipework: I'd just suggest setting a constant in your lib that provides a Pathname object to reach the yaml directory or file.
[22:30:44] SkynetProgrammer: Okay, how do you write a path relative to my bin directory
[22:31:12] SkynetProgrammer: "No such file or directory @ rb_sysopen - ../lib/data/characters.yml "
[22:31:17] SkynetProgrammer: I thought .. makes it a relative path
[22:31:21] SkynetProgrammer: but it seems like it wasn't
[22:31:56] Ox0dea: SkynetProgrammer: You get that error because you're not executing the script from within your bin directory.
[22:32:01] Vile`: has joined #ruby
[22:32:05] Ox0dea: Relative paths a shit.
[22:32:43] freerobby: has joined #ruby
[22:33:05] SkynetProgrammer: so I need to move the data folder into the bin directory right?
[22:33:20] Ox0dea: SkynetProgrammer: Is your data executable?
[22:33:59] SkynetProgrammer: It's just a yaml file
[22:34:13] zenguy_pc: has joined #ruby
[22:34:14] SkynetProgrammer: I only did it because I thought it was good practice to store data outside of a ruby file
[22:34:20] SkynetProgrammer: And now it's causing me pain
[22:34:33] Ox0dea: SkynetProgrammer: It is good practice, obviously.
[22:36:04] platzhirsch: shevy: *shakes*
[22:36:15] SkynetProgrammer: Okay, so...how do I tell Ruby to load a YAML file without typing it as a string
[22:36:30] SkynetProgrammer: and thereby causing it to try and load the file from where I currently am in the terminal
[22:37:37] michael_mbp: has joined #ruby
[22:39:31] wookiehangover: has joined #ruby
[22:39:43] Musashi007: has joined #ruby
[22:41:06] Encapsulation: has joined #ruby
[22:41:09] SkynetProgrammer: Even stuffing the yaml file directly in the bin folder isn't working.
[22:41:55] Ox0dea: SkynetProgrammer: https://gist.github.com/0x0dea/0dfbcb4379651aa2a44b
[22:42:27] Ox0dea: And then put your YAML files in data/skynet.
[22:44:29] quazimodo: is there a nicer way to restrict FileUtils operations to a directory, better than this example: https://gist.github.com/siassaj/c3636e78e17f2b142f25
[22:44:40] jgt1: has joined #ruby
[22:44:52] quazimodo: here I'm just making sure to include #{dir} to the top level of my operations, what i really want is more like a jail/chroot
[22:44:58] Ox0dea: SkynetProgrammer: You can finagle paths all sorts of ways, but it's a little silly not to just let Gem provide the facility for you.
[22:45:32] SkynetProgrammer: I didn't know that there was a method called .datadir
[22:47:17] Rodya_: has joined #ruby
[22:47:21] SkynetProgrammer: No such file or directory @ rb_sysopen - /home/tariq/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/skynet-0.1.0/data/skynet/characters.yml
[22:47:25] SkynetProgrammer: Progress at least
[22:47:51] Ox0dea: SkynetProgrammer: Did you build and install?
[22:48:18] sotojuan: has joined #ruby
[22:48:23] Ox0dea: Are you sure you didn't stick the files in data/skynet/yml?
[22:48:42] SkynetProgrammer: but why would I want to have a skynet folder
[22:48:45] SkynetProgrammer: within a data folder?
[22:48:54] Ox0dea: >> require 'json'; Gem.datadir 'json'
[22:48:55] ruboto: Ox0dea # => "/execpad/interpreters/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/json-1.8.1/data/json" (https://eval.in/436422)
[22:49:00] Ox0dea: It's just how Gem.datadir works.
[22:49:49] EminenceHC: has joined #ruby
[22:49:51] Ox0dea: I'm gonna roll. Food if I don't get all Strings.
[22:49:57] jtoy: has joined #ruby
[22:49:58] Ox0dea: >> [*ObjectSpace.each_object].sample 3
[22:49:59] ruboto: Ox0dea # => ["i686", "val", "@specification_version"] (https://eval.in/436423)
[22:50:29] Ox0dea: Excellent!
[22:50:30] SkynetProgrammer: Code no longer has that yaml error
[22:50:34] SkynetProgrammer: the Yaml file is finally being loaded
[22:50:46] SkynetProgrammer: Just so much pain though. The more pain you have, the harder it is to refactor it later
[22:50:46] Ox0dea: Wunderbar.
[22:50:48] drewvanstone: has joined #ruby
[22:51:17] Ox0dea: SkynetProgrammer: On the bright side, you should never have *this* pain ever again.
[22:51:28] chills42: has joined #ruby
[22:51:41] saddad: has joined #ruby
[22:53:05] zenguy_pc: has joined #ruby
[22:53:16] pecpec: has joined #ruby
[22:53:16] Joufflu: has joined #ruby
[22:59:11] solocshaw: has joined #ruby
[23:01:34] devbug_: has joined #ruby
[23:01:52] Scripore: has joined #ruby
[23:04:21] sanjayu: has joined #ruby
[23:04:41] startupality: has joined #ruby
[23:07:11] blik71: how would u escape parenthesis in ruby when using regular expressions?
[23:07:30] eam: blik71: with a backslach
[23:07:34] eam: backslash, even
[23:08:26] skade: has joined #ruby
[23:08:42] saddad: has joined #ruby
[23:08:46] blik71: cool thanks guys!
[23:09:06] eam: hmm, does ruby RE not support \Q...\E?
[23:09:47] Ox0dea: eam: Okay, Perl guy.
[23:09:47] eam: it appears not to support it. That's an unfortunate divergence from PCRE
[23:10:01] eam: how are you supposed to quote in a regex!?
[23:10:27] eam: (quote a literal string, not quote one char)
[23:10:51] darix: eam: %r{}?
[23:10:55] freerobby: has joined #ruby
[23:11:25] eam: well, that's to delimit a regex expression like // right?
[23:11:52] eam: this is like: /foo\Qno meta()chars in here have any effect\E/
[23:12:17] skade: has joined #ruby
[23:14:09] opensource_ninja: has joined #ruby
[23:15:00] Ox0dea: As if regular expressions weren't Turing-complete enough.
[23:15:57] benlieb: has joined #ruby
[23:16:52] bigmac: has joined #ruby
[23:17:22] justinmcp: has joined #ruby
[23:17:39] Ropeney: has joined #ruby
[23:18:44] zenguy_pc: has joined #ruby
[23:20:15] willharrison: has joined #ruby
[23:22:05] gambl0re: has joined #ruby
[23:24:19] devoldmx_: has joined #ruby
[23:25:14] Igorshp: has joined #ruby
[23:32:23] freerobby: has joined #ruby
[23:35:06] atomical: has joined #ruby
[23:36:20] diegoviola: has joined #ruby
[23:37:56] ramfjord: has joined #ruby
[23:39:02] bruno-: has joined #ruby
[23:41:26] zenguy_pc: has joined #ruby
[23:41:52] rgb-one: has joined #ruby
[23:42:01] gambl0re: has joined #ruby
[23:46:45] dreadnought8971: has joined #ruby
[23:47:20] solocshaw1: has joined #ruby
[23:48:15] swgillespie: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[23:48:53] bronson: has joined #ruby
[23:52:43] mahuebel: has joined #ruby
[23:52:56] Vile`: has joined #ruby
[23:53:11] tubuliferous_: has joined #ruby
[23:54:21] pecpec: has joined #ruby
[23:57:26] freerobby: has joined #ruby