« Back to channel list

#ruby - 12 May 2016

« Back 1 day Forward 1 day »
[00:00:27] sp4rrow: has joined #ruby
[00:00:41] snowy: has joined #ruby
[00:04:15] rbennacer: has joined #ruby
[00:06:33] zotherstupidguy: has joined #ruby
[00:14:02] rbennacer: has joined #ruby
[00:15:15] shazaum__: has joined #ruby
[00:18:13] pikajude: has joined #ruby
[00:18:13] pikajude: has joined #ruby
[00:18:25] duderonomy: has joined #ruby
[00:19:39] panpainter: has joined #ruby
[00:22:00] nankyokusei: has joined #ruby
[00:23:35] rbennacer: has joined #ruby
[00:29:25] JoshGlzBrk: has joined #ruby
[00:29:55] whathappens: has joined #ruby
[00:30:08] Biopandemic: has joined #ruby
[00:30:25] rickmasta: has joined #ruby
[00:33:41] rbennacer: has joined #ruby
[00:36:07] Vile`: has joined #ruby
[00:37:53] sp4rrow: has joined #ruby
[00:37:57] ruby-lang213: has joined #ruby
[00:38:00] ruby-lang213: hey ruby friends
[00:38:58] amincd: has joined #ruby
[00:39:05] chouhoulis: has joined #ruby
[00:39:07] ruby-lang213: I have a question, anyone here?
[00:39:09] amincd: hi, what does io_like mean her: http://ruby-doc.org/core-2.2.2/IO.html#method-c-select?
[00:39:15] ur5us: has joined #ruby
[00:41:15] pawnbox: has joined #ruby
[00:46:11] halfamind: has joined #ruby
[00:46:56] bmurt: has joined #ruby
[00:48:14] gnufied: has joined #ruby
[00:48:19] bmurt: has joined #ruby
[00:48:48] brianpWins: has joined #ruby
[00:50:40] JoshGlzBrk: has joined #ruby
[00:51:09] brianpWins_: has joined #ruby
[00:51:36] Biopandemic: has joined #ruby
[00:53:51] Biopandemic: has joined #ruby
[00:53:57] Biopandemic: has joined #ruby
[00:55:22] jaguarmagenta: has joined #ruby
[00:56:37] karmatr0n: has joined #ruby
[00:58:01] panpainter: has joined #ruby
[00:59:02] |ifei5good: has joined #ruby
[01:01:35] koooge: has joined #ruby
[01:02:30] tax: has joined #ruby
[01:05:10] smathy: amincd, it's just a variable name meant to indicate that the object must be like an IO object.
[01:05:19] ramfjord_: amincd: I'm not entirely sure, but I'm guessing it's something that implements a subset of the IO methods
[01:05:31] amincd: smathy: thanks
[01:06:03] amincd: ramfjord_: got it
[01:06:53] yfeldblum: has joined #ruby
[01:07:45] dikaio: has joined #ruby
[01:10:22] brianpWins: has joined #ruby
[01:11:07] wrkrcoop: what does it mean if someone has a class Person
[01:11:17] wrkrcoop: and then in that class there’s a line that says class << self
[01:12:42] sumobob: has joined #ruby
[01:12:48] Arcaire: wrkrcoop: anything in that class (the << self bit) will be considered a class method instead of an instance method
[01:12:59] Arcaire: so you're implicitly writing `def self.method`
[01:13:29] wrkrcoop: Arcaire: got it. and anytime u use self.method it is a class method? shoot i thought that was just was way of creating insance methods
[01:14:28] Arcaire: wrkrcoop: self.method is class
[01:14:31] Arcaire: method is instance
[01:14:44] wrkrcoop: Arcaire: thank you
[01:16:00] hahuang61: has joined #ruby
[01:17:17] jenrzzz: has joined #ruby
[01:17:17] jenrzzz: has joined #ruby
[01:18:36] ramfjord_: I've got to say, I've been using ruby for a number of years and I don't understand that syntax or the point of it
[01:18:45] Arcaire: ramfjord_: Which?
[01:19:17] ramfjord_: "class" is a reserved keyword, but AFAIK has something to do with Class.new
[01:19:36] Arcaire: class and Class aren't the same.
[01:19:48] ramfjord_: there is no << method on Class or Module though, and in any case, it would seem like you were extending a new class if that were the case, instead of the class of the current scope
[01:21:05] ramfjord_: "class A < B" is equivalent to "A = Class.new(B) do" right? so what does class mean?
[01:21:19] Arcaire: class is a keyword
[01:21:27] Arcaire: but Class is, well, a Class
[01:21:42] ramfjord_: so is "class << self" effectively a keyword on it's own right as well then?
[01:21:50] Ebok: has joined #ruby
[01:22:14] ramfjord_: why the special treatment? If we wanted to make a way of defining class methods in a short way, why not make the keyword "class methods" or something obvious?
[01:22:46] Arcaire: http://ruby-doc.org/docs/ruby-doc-bundle/Manual/man-1.4/syntax.html#scdef
[01:22:56] smathy: It's just syntax, not everything is a method.
[01:23:18] Arcaire: Apparently we call it the "shovel operator", if you were wondering at all.
[01:26:15] Ropeney: has joined #ruby
[01:30:47] impermanence: has joined #ruby
[01:33:23] minimalism: has joined #ruby
[01:35:26] chopin: has joined #ruby
[01:36:27] freerobby: has joined #ruby
[01:37:15] circa1984: has joined #ruby
[01:40:24] ramfjord_: ahh, "class <<" is the keyword, not
[01:40:27] ramfjord_: "class << self"
[01:41:00] ramfjord_: it takes an object, and adds the defined methods as methods on that
[01:41:41] ramfjord_: so you could also do "class A ; end ; class << A ; def hello ; puts "hello" ; end ; end ; A.hello"
[01:41:45] ramfjord_: >> class A ; end ; class << A ; def hello ; puts "hello" ; end ; end ; A.hello
[01:42:06] ramfjord_: isn't there a bot in this room to execute ruby code somehow?
[01:45:19] dikaio: has joined #ruby
[01:47:13] shadows: has left #ruby: ()
[01:48:45] pawnbox: has joined #ruby
[01:49:32] zast: has joined #ruby
[01:51:50] joneshf-laptop: has joined #ruby
[01:54:47] bronson_: has joined #ruby
[01:55:30] rbennacer: has joined #ruby
[01:57:37] karmatr0n: has joined #ruby
[02:00:35] raeoks: has joined #ruby
[02:03:44] elifoster: has joined #ruby
[02:04:12] Nanuq: has joined #ruby
[02:05:05] rbennacer: has joined #ruby
[02:05:32] Eiam_: has joined #ruby
[02:09:19] solocshaw: has joined #ruby
[02:09:43] JesseH: has joined #ruby
[02:10:08] rbennacer: has joined #ruby
[02:12:13] circa1984: has joined #ruby
[02:14:51] rbennacer: has joined #ruby
[02:20:25] safe: has joined #ruby
[02:21:03] skolman: has joined #ruby
[02:22:31] rbennacer: has joined #ruby
[02:22:49] nankyokusei: has joined #ruby
[02:31:37] impermanence: has joined #ruby
[02:31:54] electrostat: has joined #ruby
[02:33:16] halfamind: has joined #ruby
[02:36:07] electrostat: has joined #ruby
[02:37:09] grassass: has joined #ruby
[02:39:35] dikaio: has joined #ruby
[02:41:55] whathappens: has joined #ruby
[02:42:04] jenrzzz: has joined #ruby
[02:44:12] JoshGlzBrk: has joined #ruby
[02:44:54] d0nn1e: has joined #ruby
[02:49:20] nertzy: has joined #ruby
[02:53:09] grassass: has joined #ruby
[02:55:29] freerobby: has joined #ruby
[02:56:25] jenrzzz: has joined #ruby
[02:58:28] hobodave: has joined #ruby
[03:00:26] dikaio: has joined #ruby
[03:01:26] openstruct: has joined #ruby
[03:01:54] electrostat: has joined #ruby
[03:03:35] papachan: has joined #ruby
[03:05:52] nertzy: has joined #ruby
[03:06:29] MiniFrenchBread: has joined #ruby
[03:07:10] Trynemjoel: has joined #ruby
[03:10:58] Arahael: has left #ruby: ("WeeChat 1.0.1")
[03:11:09] senayar: has joined #ruby
[03:11:09] senayar: has joined #ruby
[03:11:13] Yiota: has joined #ruby
[03:11:37] roamingdog: has joined #ruby
[03:13:41] Parko: has joined #ruby
[03:14:03] braincrash: has joined #ruby
[03:14:17] d0lph1n98: has joined #ruby
[03:14:36] impermanence: has joined #ruby
[03:16:46] hahuang61: has joined #ruby
[03:17:36] SilverKey: has joined #ruby
[03:20:42] gix: has joined #ruby
[03:25:38] circa1984: has joined #ruby
[03:26:17] snoozelose: has joined #ruby
[03:26:29] rkazak: has joined #ruby
[03:27:49] kgrz: has joined #ruby
[03:28:42] tjbiddle: has joined #ruby
[03:31:49] dikaio: has joined #ruby
[03:34:26] jenrzzz: has joined #ruby
[03:35:55] benlieb: has joined #ruby
[03:35:59] ruby-lang151: has joined #ruby
[03:36:02] nando293921: has joined #ruby
[03:38:36] snoozelose: has joined #ruby
[03:39:37] snoozelose: has joined #ruby
[03:40:18] jdawgaz: has joined #ruby
[03:41:26] monoprotic: has joined #ruby
[03:42:04] yeticry: has joined #ruby
[03:43:17] eljimmy: has joined #ruby
[03:43:32] gregf: has joined #ruby
[03:43:37] jenrzzz: has joined #ruby
[03:43:43] CloCkWeRX: has joined #ruby
[03:44:42] yeticry: has joined #ruby
[03:44:46] snoozelose: has joined #ruby
[03:44:52] karmatr0n: has joined #ruby
[03:45:36] LoneHerm_: has joined #ruby
[03:45:46] gregf: has joined #ruby
[03:45:52] karmatr0n: has joined #ruby
[03:51:30] Caerus: hello #ruby
[03:57:35] bluOxigen: has joined #ruby
[04:00:18] nando293921: has joined #ruby
[04:01:51] agent_white: has joined #ruby
[04:02:09] tmtwd: has joined #ruby
[04:04:19] pawnbox: has joined #ruby
[04:09:01] kareeoleez: has joined #ruby
[04:14:36] CloCkWeRX: has joined #ruby
[04:16:51] djbkd: has joined #ruby
[04:20:17] idefine: has joined #ruby
[04:23:40] nankyokusei: has joined #ruby
[04:24:40] jdawgaz: has joined #ruby
[04:25:49] terlar: has joined #ruby
[04:33:43] dikaio: has joined #ruby
[04:35:39] dikaio: has joined #ruby
[04:38:28] CloCkWeRX: has joined #ruby
[04:43:38] Heaventree: has joined #ruby
[04:46:32] Heaventree: has left #ruby: ()
[04:50:23] nando293921: has joined #ruby
[04:50:29] Devalo: has joined #ruby
[04:50:36] aredridel: has joined #ruby
[04:53:29] saramic: has joined #ruby
[04:54:05] Axy: has joined #ruby
[04:55:35] d0lph1n98: has joined #ruby
[04:56:33] stardiviner: has joined #ruby
[04:56:47] bronson: has joined #ruby
[05:00:45] pawnbox: has joined #ruby
[05:04:29] Coldblackice: has joined #ruby
[05:10:14] djbkd: has joined #ruby
[05:12:50] dopie: has joined #ruby
[05:13:55] CausaMortis: has joined #ruby
[05:14:43] nando293921: has joined #ruby
[05:17:15] tAn: has joined #ruby
[05:18:04] arescorpio: has joined #ruby
[05:18:45] hahuang61: has joined #ruby
[05:19:54] tildes_: has joined #ruby
[05:23:05] nando293921: has joined #ruby
[05:24:22] isxek: has joined #ruby
[05:28:39] beatdown: has joined #ruby
[05:28:40] karmatr0n: has joined #ruby
[05:29:02] astrobunny: has joined #ruby
[05:29:08] yfeldblum: has joined #ruby
[05:29:18] haxrbyte: has joined #ruby
[05:29:51] sauvin: has joined #ruby
[05:31:21] benlieb: has joined #ruby
[05:31:58] yfeldblum: has joined #ruby
[05:32:38] impermanence: has joined #ruby
[05:39:48] hdm: has joined #ruby
[05:44:12] quakephil: has joined #ruby
[05:50:55] codecop: has joined #ruby
[05:50:58] Parko: has joined #ruby
[05:52:16] ravishankarjha: has joined #ruby
[05:52:42] astrobunny: has joined #ruby
[05:52:44] pawnbox: has joined #ruby
[05:55:05] raeoks: has joined #ruby
[05:55:27] idefine: has joined #ruby
[05:55:50] qualiaqq: has joined #ruby
[05:56:34] d0lph1n98: has joined #ruby
[05:56:50] guardian: hello, when I ask Ruby to copy a file, does it open a file handle then performs a read / write loop, having blocks of data travel from filesystem to ruby buffers -- or does it defer it to the OS keeping it low overhead ala Java NIO?
[05:57:26] skade: has joined #ruby
[05:57:48] last_staff: has joined #ruby
[05:58:50] agit0: has joined #ruby
[05:58:51] moeabdol: has joined #ruby
[05:59:24] aupadhye: has joined #ruby
[06:00:07] CloCkWeRX: has left #ruby: ()
[06:00:46] ur5us: has joined #ruby
[06:01:32] bruno-: has joined #ruby
[06:01:46] MiniFren`: has joined #ruby
[06:02:42] speakingcode: has joined #ruby
[06:02:47] Guest43: has joined #ruby
[06:05:03] kareeoleez: has joined #ruby
[06:05:27] syndikate: has joined #ruby
[06:05:42] nhhc: has joined #ruby
[06:05:42] syndikate: Hello Guys, Good day.
[06:06:19] syndikate: I am trying to write a gemfile, now I am confused as to how to convert the structure of my small program to a gemfile
[06:06:30] Arcaire: come again?
[06:06:45] astrobun_: has joined #ruby
[06:06:45] kareeoleez: has joined #ruby
[06:06:49] syndikate: I have a small command line application
[06:07:28] syndikate: Which takes user input and process and provides output, now I run the application in a infinite loop so as to keep reading user input, now I need to convert the application to a gemfile
[06:07:35] syndikate: I make use of 2-3 classes for the program
[06:07:47] Arcaire: What is your impression of what a Gemfile does?
[06:09:48] jackjackdripper: has joined #ruby
[06:10:25] syndikate: Provides portable code, so that I can package my classes and share it around
[06:10:36] syndikate: It should be readily usable out of the box
[06:13:41] Arcaire: That's a gem, not a Gemfile, but I can see why you'd mistake the two.
[06:13:52] Arcaire: A Gemfile is essentially a list of gems (libraries) to install to make your app work.
[06:14:03] duncannz: has joined #ruby
[06:14:10] Arcaire: Anyway, you may want to look at this guide: http://guides.rubygems.org/make-your-own-gem/
[06:14:17] Arcaire: It walks you through creating your own gem from the start.
[06:21:24] syndikate: Arcaire, yeah, thanks, my bad
[06:21:29] syndikate: And yeah I did go through it
[06:21:42] syndikate: though I am confused how to approach my current program
[06:22:09] syndikate: Because I have a 3 classes and a driver program (which is a loop taking input)
[06:22:15] aganov: has joined #ruby
[06:22:31] Arcaire: A gem isn't a compiled program or an out-of-the-box solution for things like that.
[06:22:31] vondruch: has joined #ruby
[06:22:34] Arcaire: It's merely a library.
[06:23:16] syndikate: So I could leave the user to use it however he wants..?
[06:23:26] syndikate: I mean, loop the input or whatever
[06:23:48] lsmola: has joined #ruby
[06:24:34] nankyokusei: has joined #ruby
[06:24:56] qualiaqq: has left #ruby: ("Leaving")
[06:26:16] djellemah_: has joined #ruby
[06:26:27] the_drow: has joined #ruby
[06:27:41] firstdayonthejob: has joined #ruby
[06:28:05] solars: hey, can anyone tell me how to use net sftp to connect with keys? (like sftp -oIdentityFile=rsa_tri s@sftp.com) I couldn't find any examples
[06:29:43] karmatr0n: has joined #ruby
[06:29:50] hdm: solars: iirc the net/ssh package just reads your ~/.ssh directory looking for id_dsa/id_rsa (maybe id_ecdsa now)
[06:30:33] hdm: we use a hacked up version in metasploit that allows you to ignore those and pass auth creds in directly, but its kind of a pain
[06:30:43] hdm: maybe the newer version of the gem supports it now
[06:31:02] solars: I don't have the keys in .ssh
[06:31:07] ur5us: has joined #ruby
[06:31:49] the_drow: has joined #ruby
[06:31:59] tAn: has joined #ruby
[06:35:24] solars: hdm, http://net-ssh.github.io/sftp/v1/faq.html
[06:35:44] solars: apparently you can piggy back it
[06:35:51] the_drow_: has joined #ruby
[06:35:55] solars: and ssh connect has a 'keys' param
[06:36:56] hdm: ah, it should be ssh's keys param them
[06:37:02] hdm: not working?
[06:38:22] Ishido: has joined #ruby
[06:39:07] codecop: has joined #ruby
[06:43:05] the_drow_: has joined #ruby
[06:43:56] eljimador: has joined #ruby
[06:43:58] stannard: has joined #ruby
[06:44:36] hays: has joined #ruby
[06:45:29] mahlon: has joined #ruby
[06:46:01] PaulCapestany: has joined #ruby
[06:46:24] jtdowney: has joined #ruby
[06:46:24] jtdowney: has joined #ruby
[06:46:35] IanMalcolm: has joined #ruby
[06:46:47] febuiles: has joined #ruby
[06:46:53] the_drow__: has joined #ruby
[06:47:31] ule: has joined #ruby
[06:48:11] solars: hdm, it seems to be working
[06:48:18] timmow: has joined #ruby
[06:49:26] solars: hdm, yes it's working
[06:50:15] karapetyan: has joined #ruby
[06:50:43] GriffinHeart: has joined #ruby
[06:51:44] syndikate: has joined #ruby
[06:52:07] ctp: has joined #ruby
[06:54:41] ferr: has joined #ruby
[06:55:13] Dimik: has joined #ruby
[06:55:28] Parko: has joined #ruby
[06:56:25] aredridel: has joined #ruby
[06:57:02] akkad: has joined #ruby
[06:57:05] stannard: has joined #ruby
[06:57:27] jtd: has joined #ruby
[06:57:27] pabs: has joined #ruby
[06:57:47] eljimmy: has joined #ruby
[06:58:06] meinside: has joined #ruby
[06:58:19] bronson: has joined #ruby
[06:58:54] the_drow: has joined #ruby
[07:00:03] Ropeney: has joined #ruby
[07:00:29] Couch: has joined #ruby
[07:00:30] nwhirschfeld: has joined #ruby
[07:00:59] polll: has joined #ruby
[07:00:59] Nanuq: has joined #ruby
[07:01:02] Ch4rAss: has joined #ruby
[07:01:09] cb`: has joined #ruby
[07:01:19] TomyWork: has joined #ruby
[07:01:22] IanMalcolm: has joined #ruby
[07:01:22] Arcaire: has joined #ruby
[07:01:46] soraher: has joined #ruby
[07:02:19] zacts: has joined #ruby
[07:02:20] SegFaultAX: has joined #ruby
[07:02:46] araujo_: has joined #ruby
[07:03:32] skade: has joined #ruby
[07:03:39] bruno-: has joined #ruby
[07:04:00] dikaio: has joined #ruby
[07:04:18] tubbo: has joined #ruby
[07:05:03] twistedpixels: has joined #ruby
[07:05:30] Junaos: has joined #ruby
[07:05:35] noService: has joined #ruby
[07:05:58] duncannz: has joined #ruby
[07:06:52] duncannz: has joined #ruby
[07:08:16] strongcode: has joined #ruby
[07:09:03] Guest41523: has joined #ruby
[07:10:40] febuiles_: has joined #ruby
[07:11:01] andikr: has joined #ruby
[07:11:02] akkad: has joined #ruby
[07:14:20] joaumg: has joined #ruby
[07:14:57] Devalo: has joined #ruby
[07:15:01] tvw: has joined #ruby
[07:16:08] pawnbox: has joined #ruby
[07:18:58] DoubleMalt: has joined #ruby
[07:19:38] hahuang61: has joined #ruby
[07:20:31] panpainter: has joined #ruby
[07:20:35] the_drow: has joined #ruby
[07:20:56] JohnBat26: has joined #ruby
[07:21:15] the_drow: has joined #ruby
[07:21:26] JohnBat26: has joined #ruby
[07:22:06] jaruga___: has joined #ruby
[07:23:03] mark_66: has joined #ruby
[07:25:26] haxrbyte: has joined #ruby
[07:25:48] rbr: has joined #ruby
[07:26:05] jgt: has joined #ruby
[07:29:39] CloCkWeRX: has joined #ruby
[07:29:54] ensyde__: has joined #ruby
[07:30:19] terlar: has joined #ruby
[07:30:30] halfamind: has joined #ruby
[07:30:44] dionysus69: has joined #ruby
[07:30:49] karmatr0n: has joined #ruby
[07:32:58] Vile`: has joined #ruby
[07:34:24] halfamind: has joined #ruby
[07:35:24] Saitama: has joined #ruby
[07:36:06] kareeoleez: Can someone help http://stackoverflow.com/questions/37180236/filter-out-tzinfotimezone-ruby-results-to-exclude ?
[07:40:18] gigetoo: has joined #ruby
[07:40:20] aufi: has joined #ruby
[07:41:56] Oog: has joined #ruby
[07:42:43] jhass: kareeoleez: Enumerable#select ? (offtopic: use a view helper, don't do it in template, but that's a #RubyOnRails discussion)
[07:43:12] ur5us: has joined #ruby
[07:43:48] toretore: has joined #ruby
[07:45:31] the_drow: has joined #ruby
[07:45:31] idefine: has joined #ruby
[07:48:21] zotherstupidguy: has joined #ruby
[07:48:47] jaguarmagenta: has joined #ruby
[07:51:16] brunto: has joined #ruby
[07:54:32] kareeoleez: jhass: is it Rails ? It seems I need to filter it in the backend somehow
[07:55:43] TvL2386: has joined #ruby
[07:57:58] jhass: whether Enumerable#select is Rails specific? no, it's a Ruby core method
[07:59:14] noobsu: has joined #ruby
[07:59:15] terlar: has joined #ruby
[08:02:54] anisha: has joined #ruby
[08:04:36] bruno-: has joined #ruby
[08:04:43] tessi_zz: has joined #ruby
[08:05:04] minimalism: has joined #ruby
[08:05:18] blingrang: has joined #ruby
[08:05:53] blingrang: has joined #ruby
[08:06:33] edwinvdgraaf: has joined #ruby
[08:13:02] the_drow: has joined #ruby
[08:14:04] the_drow: has joined #ruby
[08:16:14] startupality: has joined #ruby
[08:16:34] Devalo: has joined #ruby
[08:18:48] Ch4rAss: has joined #ruby
[08:20:24] pawnbox: has joined #ruby
[08:23:26] pawnbox: has joined #ruby
[08:24:49] AnoHito_: has joined #ruby
[08:25:26] nankyokusei: has joined #ruby
[08:26:55] senayar: has joined #ruby
[08:26:55] senayar: has joined #ruby
[08:28:43] the_drow: has joined #ruby
[08:30:15] Hanmac: shevy good that i try recent ruby build again, they broke my bindings again ... "-std=gnu99 instead of -std=c99" they did it without thinking that it might have consequences for other stuff
[08:30:55] |ifei5g00d: has joined #ruby
[08:31:11] AnoHito_: has joined #ruby
[08:31:55] Asher: has joined #ruby
[08:32:39] lxsameer: has joined #ruby
[08:34:37] hays_: has joined #ruby
[08:35:00] hinbody: has joined #ruby
[08:35:35] joneshf-laptop: has joined #ruby
[08:37:25] romain_t: has joined #ruby
[08:37:44] jwang: has joined #ruby
[08:41:17] shevy: hanmac as long as the wxwidget bindings work!
[08:41:39] Hanmac: shevy not yet, but i am currently fixing it
[08:41:41] platzhirsch: has joined #ruby
[08:45:35] brunto: has joined #ruby
[08:46:31] charliesome: has joined #ruby
[08:51:08] mitt3ns: has joined #ruby
[08:51:25] aupadhye: has joined #ruby
[08:52:25] Macaveli: has joined #ruby
[08:53:20] ajax0xd9: has joined #ruby
[08:55:04] b|ackwolf: has joined #ruby
[08:56:44] karmatr0n: has joined #ruby
[08:58:20] hahuang61: has joined #ruby
[08:58:47] zenguy_pc: has joined #ruby
[09:00:51] evidex: has joined #ruby
[09:00:54] Meow-J: has joined #ruby
[09:01:38] bruce_lee: has joined #ruby
[09:01:38] bruce_lee: has joined #ruby
[09:04:37] Timba-as: has joined #ruby
[09:05:15] howdoi: has joined #ruby
[09:06:13] startupality: has joined #ruby
[09:06:44] DaniG2k: has joined #ruby
[09:07:03] kies: has joined #ruby
[09:08:41] marr: has joined #ruby
[09:09:03] xue: has joined #ruby
[09:10:00] last_staff: has joined #ruby
[09:11:45] yfeldblum: has joined #ruby
[09:12:33] astrobunny: has joined #ruby
[09:14:13] snowy: has joined #ruby
[09:14:33] astrobun_: has joined #ruby
[09:15:07] Nice_BikeMaN: has joined #ruby
[09:15:20] dANOKELOFF: has joined #ruby
[09:15:35] Nice_BikeMaN: Where is the best place to learn Ruby
[09:16:42] Caerus: the internet, lots of sources
[09:19:23] Caerus: Nice_BikeMaN, do you have programming background? if so a very good way is to pickup a ruby book and use internet to research on subjects that might confuse you.
[09:19:26] Nice_BikeMaN: tobuasvl: Vim is wayyyyyyyyyyyy to complex and over kill for me:-)
[09:19:45] Caerus: or ask here and maybe SO(search first)
[09:20:23] Nice_BikeMaN: Caerus: I learned a little bit of Python and C++ (hardly any C++) so you could say that I am a total noob:-)
[09:22:18] Caerus: my personal point about books are that a lof of them tend to be really hard to digest for total newbies, specially the core subjects that are language agnostic
[09:22:18] shevy: Nice_BikeMaN you sorta need to have some motivation or need or goal
[09:23:05] Caerus: at least thats what I've seen in all the people I've tried to evangelize into coding so YMMV.
[09:23:36] Madmanden: has joined #ruby
[09:23:52] shevy: there are good books and then there are not so good books!
[09:24:03] Nice_BikeMaN: shevy: My goal is to be able to do task automation and write small programs (a calculator, for example)
[09:24:39] crdpink: has joined #ruby
[09:24:58] shevy: calculator sounds easy
[09:25:55] Nice_BikeMaN: shevy: Is The Ruby Programming Language (by David Flanagan) one you would recommend?
[09:26:07] shevy: never read that one, I read the pickaxe back then which was ok
[09:26:18] shevy: but the more important part is to actively write code
[09:26:33] Caerus: Nice_BikeMaN, maybe pick up a ruby book that doesn't go deep on Rails like "Ruby Monk"
[09:27:05] shevy: I once bought some rails book
[09:27:08] shevy: I never finished it :(
[09:27:26] shevy: halfway "building a webshop" I lost interest in that book... no idea if that was rails fault or the book's fault
[09:28:13] Caerus: I was on my way with agile web development with rails. found it very good but I realized I had to go back to foundations to get a better ruby grasp
[09:28:54] norc: has joined #ruby
[09:29:16] ajax0xd9: has joined #ruby
[09:29:24] shevy: hmm perhaps it was that book
[09:29:30] Caerus: maybe it was just me but I just felt I didn't know ruby enough to be messing around with rails.
[09:29:48] Nice_BikeMaN: Is Rails better than Dejango?
[09:30:03] norc: Nice_BikeMaN: Is blue better than red?
[09:30:03] shevy: Nice_BikeMaN it is more famous :)
[09:30:04] Caerus: then there's "rails 4 in action" which is very good from what i've heard.
[09:30:13] norc: >> binding.local_variable_set(:a, nil); puts a
[09:30:14] ruby[bot]: norc: # => undefined local variable or method `a' for main:Object (NameError) ...check link for more (https://eval.in/569477)
[09:30:25] norc: Being aware of why that fails, is there anyone who feels that it SHOULD work?
[09:31:27] norc: Nice_BikeMaN: Honest question. Why do you ask in #ruby whether a Ruby based web framework is better than a Python based web framework?
[09:31:35] norc: Other than trolling
[09:31:52] Nice_BikeMaN: norc: I wasn't trolling
[09:32:18] shevy: to the local variables, can it work? e. g. would you not have to then also make it possible to define local variables in other .rb files, and when pulling them in, they would be available on the toplevel scope?
[09:32:35] noServic1: has joined #ruby
[09:32:56] norc: shevy: You do not have to declare methods either.
[09:32:58] Nice_BikeMaN: Great, more IRC assholes
[09:33:17] norc: Nice_BikeMaN: The question whether A is better than B is hard to answer in most cases.
[09:33:24] norc: Almost universally the answer is: "It depends".
[09:33:41] Nice_BikeMaN: norc: OK, thanks
[09:34:20] adaedra: Nice_BikeMaN: please avoid insulting people because they're not answering like you wish they would.
[09:34:56] aupadhye: has joined #ruby
[09:34:58] shevy: well methods on toplevel will become persistent as private method for Object, local variables don't become as persistent
[09:35:25] norc: shevy: Local variables could be resolved at runtime just like method. The problem is not whether its possible.
[09:36:03] shevy: how would you get rid of persistent local variables then?
[09:36:21] Nice_BikeMaN: adaedra: I wasn't "insulting" people because they didn't answer the question they way I wanted, which was not the case. I "insulted" them because after my shitty day, I felt like they were being assholes.
[09:36:29] norc: shevy: Ruby has no notion of such "static" variables.
[09:36:51] norc: Nice_BikeMaN: So because you have a shitty day you can go about and insult other people?
[09:36:53] adaedra: Nice_BikeMaN: whatever the reason is, "asshole" is not acceptable.
[09:37:43] Nice_BikeMaN: norc: You insulted me first
[09:38:01] norc: Nice_BikeMaN: I asked you for your motivation behind that question.
[09:38:04] impermanence: has joined #ruby
[09:38:07] norc: I am quite unsure how that translates to an insult.
[09:38:28] shevy: the trolling reference
[09:38:31] Nice_BikeMaN: norc: In a rude way
[09:38:37] Caerus: Nice_BikeMaN, no way for us to tell from your questions that you had a shitty day, even so, I fail to see the asshole part, the troll statement was an 'honest question'
[09:39:32] quakephil: guys let's be friends https://www.youtube.com/watch?v=vlq9UWWqe44
[09:40:42] norc: shevy: And if you really insist, I can create short lived functions too.
[09:40:44] norc: >> binding.singleton_class.send(:define_method, :a, -> {})
[09:40:45] ruby[bot]: norc: # => :a (https://eval.in/569480)
[09:41:13] norc: (Trying to think of a reason why I would want to do that, but hey - its possible)
[09:41:22] shevy: norc how do I call the above?
[09:41:22] Nice_BikeMaN: OK, I can accept that I fucked up. I am sorry that I took my temper out on someone that was trying to help me and I do realize that how I reacted was not the right way.
[09:41:43] norc: >> binding.singleton_class.send(:define_method, :bark, -> { puts "bark" }); binding.singleton_class.bark()
[09:41:44] ruby[bot]: norc: # => undefined method `bark' for #<Class:#<Binding:0x410699b0>> (NoMethodError) ...check link for more (https://eval.in/569481)
[09:41:50] blackmes1: has joined #ruby
[09:42:27] shevy: anyway, I am all in favour of control
[09:42:40] shevy: since people can do: x = 5
[09:42:45] shevy: they should do so programmatically too!
[09:42:45] Ox0dea: Nice_BikeMaN: But are you still here to talk about Python?
[09:43:07] startupality: has joined #ruby
[09:43:48] norc: Good thing we do not have to indent in IRC.
[09:44:08] Ox0dea: norc: They don't (can't?) even have an evaluator in #python.
[09:44:09] Ebok: has joined #ruby
[09:44:16] Ox0dea: People do the strangest things.
[09:44:18] Nice_BikeMaN: 0x0dea: No. When I asked the question, I didn't think that it would be that bad to talk about Python on a Ruby IRC channel.
[09:44:32] Ox0dea: Nice_BikeMaN: Say, are you pretending to be retarded?
[09:44:43] adaedra: !qkick Ox0dea rude
[09:44:43] ruby[bot]: ruby[bot] kicked Ox0dea:
[09:45:29] modin: has joined #ruby
[09:45:40] Nice_BikeMaN: But I am not pretending to be rude, I just had a really shitty (I mean really shitty) day.
[09:46:01] adaedra: Nice_BikeMaN: That's why you got the question about trolling; this is indeed a question with no definite anwser, and here is not really the best place as we may not be the most objective people :o)
[09:46:16] adaedra: It also depends a lot on what you're trying to do, your background, etc.
[09:46:18] norc: Nice_BikeMaN: Here is another honest opinion. Maybe counselling would be a better approach.
[09:46:22] Caerus: I've been lurking here from weeks now and I have to say #ruby is a very friendly channel, living up to ruby community rep I'd say.
[09:46:40] Noxilex: has joined #ruby
[09:47:06] Caerus: *for some weeks*
[09:47:43] Nice_BikeMaN: norc: Sorry I was an ass to you in particular mate, I truly didn't mean it. I got layed off today, thats why I am shitty.
[09:48:31] adaedra: Nice_BikeMaN: that's ok, you apologised on this matter, let's not continue this.
[09:49:02] tvw: has joined #ruby
[09:49:12] Nice_BikeMaN: adaedra: Sure, sorry about the disruption
[09:52:05] haxrbyte: has joined #ruby
[09:53:18] yfeldblum: has joined #ruby
[09:53:48] jgt: has joined #ruby
[09:53:52] schickung: has joined #ruby
[09:54:34] hk238: has joined #ruby
[09:55:15] jaruga___: has joined #ruby
[09:55:53] haxrbyte_: has joined #ruby
[09:55:55] xue: has joined #ruby
[09:56:10] panpainter: has joined #ruby
[09:57:08] haxrbyte: has joined #ruby
[09:59:58] workmad3: has joined #ruby
[10:00:22] vondruch_: has joined #ruby
[10:01:25] skade: has joined #ruby
[10:01:47] GriffinHeart: has joined #ruby
[10:02:11] last_staff: has joined #ruby
[10:02:26] blaxter: has joined #ruby
[10:03:43] charliesome: has joined #ruby
[10:05:00] workmad3_: has joined #ruby
[10:12:52] duoi: has joined #ruby
[10:15:48] d0lph1n98: has joined #ruby
[10:18:23] Devalo: has joined #ruby
[10:20:13] charliesome: has joined #ruby
[10:21:19] nettoweb: has joined #ruby
[10:26:16] nankyokusei: has joined #ruby
[10:27:44] sczizzo: has joined #ruby
[10:29:00] jgt: has joined #ruby
[10:29:00] impermanence: has joined #ruby
[10:36:01] PaulCapestany: has joined #ruby
[10:36:38] greister: has joined #ruby
[10:37:12] grs: has joined #ruby
[10:37:44] dionysus69: has joined #ruby
[10:38:10] Xiti: has joined #ruby
[10:39:10] startupality: has joined #ruby
[10:39:49] ur5us: has joined #ruby
[10:40:56] tagaulap: has joined #ruby
[10:44:20] jaiks: has joined #ruby
[10:55:14] jackjackdripper: has joined #ruby
[10:55:35] giz|work: has joined #ruby
[10:55:52] gnufied: has joined #ruby
[10:56:08] millerti: has joined #ruby
[10:58:14] jackjackdripper1: has joined #ruby
[10:59:05] hahuang61: has joined #ruby
[11:00:07] bronson: has joined #ruby
[11:00:28] dvinciguerra: has joined #ruby
[11:04:11] jgt: has joined #ruby
[11:09:21] ur5us: has joined #ruby
[11:11:35] panpainter: has joined #ruby
[11:13:37] blackgoat: has joined #ruby
[11:14:30] GodFather: has joined #ruby
[11:15:02] noodle: has joined #ruby
[11:19:12] papachan: has joined #ruby
[11:20:31] idefine: has joined #ruby
[11:22:08] MyMind: has joined #ruby
[11:22:40] ravishankarjha: has joined #ruby
[11:23:23] gnufied__: has joined #ruby
[11:23:35] andromedian: has joined #ruby
[11:23:42] deadnull_: has joined #ruby
[11:24:30] bastelfreak: has joined #ruby
[11:24:50] andromedian: I have a hash = {foo: '1', bar: '2'} how can I print the key foo: ?
[11:27:00] adaedra: hash[:foo]
[11:28:29] millerti: has joined #ruby
[11:29:14] andromedian: it prints the value =>1 I want => 'foo'
[11:29:23] andromedian: is this possible adaedra?
[11:29:47] adaedra: I'm not sure to understand
[11:29:58] agit0: has joined #ruby
[11:30:00] crameth: has joined #ruby
[11:30:05] adaedra: you want to get :foo from 1?
[11:31:20] apeiros: or 'foo' from :foo?
[11:31:28] andromedian: yes 'foo' from :foo
[11:31:40] apeiros: or :foo.to_s
[11:31:48] apeiros: depending on what you actually want
[11:32:03] moeabdol: has joined #ruby
[11:32:06] apeiros: I don't understand how that's related to your hash, though.
[11:32:13] startupality: has joined #ruby
[11:32:53] andromedian: lets' say that I have image = {medium:'500px' } I want to print medium and 500px without using each
[11:33:10] andromedian: but it seems like this is not the best way to do it.
[11:33:21] rodfersou: has joined #ruby
[11:33:40] Masonn: has joined #ruby
[11:33:47] apeiros: do you know that the key is :medium?
[11:33:48] Masonn: has left #ruby: ("Leaving")
[11:33:50] Masonn: has joined #ruby
[11:33:58] apeiros: or do you only know that the hash consists of a single key/value pair?
[11:34:33] andromedian: the second option
[11:34:55] uranellus: has joined #ruby
[11:34:58] apeiros: image.first will give you a [key, value] array
[11:35:07] apeiros: so: `key, value = image.first`
[11:35:27] apeiros: but if you have single key/value hashes I wonder why you use a hash at all.
[11:35:39] uranellus: hello, I'd like to install gem onto sles 11 sp4, it comes with ruby 1.8.7.
[11:35:44] apeiros: even more so if you don't access them by key - which is the point of using a hash.
[11:35:45] uranellus: how do I proceed?
[11:36:15] apeiros: uranellus: `gem install gem-to-install`
[11:36:20] Vile`: has joined #ruby
[11:36:35] apeiros: and let me advise you that ruby 1.8.7 is outdated, unmaintained and shouldn't be used anymore.
[11:36:49] andromedian: thanks apeiros
[11:37:07] uranellus: apeiros: the gem command is not found :/
[11:37:29] uranellus: apeiros: also I know that, but it is was suse supports for sles 11 sp4
[11:37:52] apeiros: oh, 1.8.7 didn't come with rubygems bundled, right. rvm did that for me.
[11:38:00] pawnbox: has joined #ruby
[11:38:01] johnmilton: has joined #ruby
[11:38:03] ldnunes: has joined #ruby
[11:38:07] apeiros: then install rubygems first, either via your package manager or manually
[11:38:33] pawnbox: has joined #ruby
[11:38:41] rodfersou: has joined #ruby
[11:40:32] jolamb: has joined #ruby
[11:45:57] DaniG2k: has joined #ruby
[11:47:30] panpainter: has joined #ruby
[11:47:40] sinkensabe: has joined #ruby
[11:48:33] araujo: has joined #ruby
[11:49:31] sepp2k: has joined #ruby
[11:49:31] shevy: uranellus wget https://rubygems.org/rubygems/rubygems-2.6.4.tgz - I think it should work on 1.8.x too but I am not 100% sure. you can try older versions on that page though, via "versions" to see which one works
[11:49:35] brunto: has joined #ruby
[11:53:10] Ebok: has joined #ruby
[11:53:30] umdstu: has joined #ruby
[11:53:58] uranellus: shevy: apeiros: yeah, that's not going to work for me, cause I need some supported way of doing stuff for this particular client..
[11:54:09] uranellus: but thanks for your efford
[11:54:47] Caerus: that's as good as it gets if you don't want/cant use rvm
[11:55:13] jhass: uranellus: I'd imagine there's a rubygems package to install?
[11:55:44] Caerus: which shevy did point out
[11:56:05] jhass: uranellus: zypper search rubygems or whatever it was
[11:56:21] Caerus: oh you mean suse package
[11:56:44] jhass: that's what I would understand under "supported"
[11:59:24] CloCkWeRX: has joined #ruby
[12:01:10] apeiros: that'd be the "then install rubygems first, either ***via your package manager*** or manually" way (emphasis added)
[12:01:11] Caerus: my 1.8.7-head has it, I don't recall installing it so it should be bundled.
[12:02:11] uranellus: jhass: yeah, I will. Currently I cannot b/c our mirror is in maintanence .. But I'll check later, thanks for pointing me in the right direction
[12:02:51] Caerus: and boy did rvm bitch about me using 1.8.7
[12:03:26] nadir: has joined #ruby
[12:04:02] Hanmac: has joined #ruby
[12:04:34] ensyde__: has joined #ruby
[12:04:35] pwnd_nsfw: has joined #ruby
[12:04:43] jhass: again, rvm does install it along, package mangers not always
[12:05:49] uranellus: jhass: yeah, I will have to eval, wether rvm is an option. It'd need CVEs and a supported channel, to make sure updates are available.
[12:07:22] apeiros: uranellus: before you actually install rubygems - is installing gems via rubygems actually considered "supported"?
[12:07:35] Caerus: 1.8.7 is as 'unsuported' as it can get. latest 1.8.7 I got out of rvm was -head
[12:07:37] apeiros: because if not, you'll have to look whether there's a package for your package manager of that gem anyway
[12:08:06] apeiros: Caerus: yeah, supported in their case means "supported by suse sles 11 sp4"
[12:08:14] flashpoint9: has joined #ruby
[12:08:17] uranellus: apeiros: depends on the gem. if the gem supplier supports the gem, then I assume it's okay (not my call)
[12:08:20] shevy: Caerus haha why do you use 1.8.7? :)
[12:08:34] Masonn: has joined #ruby
[12:08:52] shevy: I think I can't even compile 1.8.x anymore :(
[12:08:58] Caerus: shevy, I don't anymore, I read 'Beginning Ruby' and it used 1.8.7 so I wanted to be on par with it.
[12:09:07] uranellus: Caerus: it might not be officially be support by ruby. but it is supported by suse til 2022
[12:09:18] uranellus: shevy: it's part of sles 11 sp4
[12:09:43] ctp: has joined #ruby
[12:09:58] Caerus: uranellus, yeah I misunderstood you
[12:10:01] Masonn: has joined #ruby
[12:10:26] ctp: hi folks. how to lstrip/rstrip the whitespaces in such expression: ["| a | b | c | d |", "| e | f | g | h |"].map { |arr| arr.split('|')}.map(&:strip)
[12:10:37] bruno-: has joined #ruby
[12:10:50] ctp: the .map(&:strip) is at wrong place :)
[12:11:15] uranellus: but thank you very much for your input, Caerus apeiros shevy jhass
[12:11:18] Caerus: also jhass, so it was rvm that put it in? kinda like... fine! if you're gonna use 1.8.* you at least gotta have rubygems(bundles rubygems)
[12:11:27] shevy: not sure what you want, .delete(' ') in a .map should get rid of the internal ' ' though
[12:11:56] brunto_: has joined #ruby
[12:12:10] apeiros: ctp: since you already figured that the map is in the wrong place - what deviates from your desired result?
[12:14:51] ctp: apeiros ["| a | b | c | d |", "| e | f | g | h |"].map { |arr| arr.split('|')} returns [["", " a ", " b ", " c ", " d "], ["", " e ", " f ", " g ", " h "]] so i thought i could map over this array and apply strip on all elements (which are arrays), but i get a NoMethodError: undefined method `strip' for ["", " a ", " b ", " c ", " d "]:Array
[12:15:10] gregf_: ctp: move the map(&:strip) to the block ;)
[12:15:15] apeiros: ctp: oh, I thought you had understood that the map is in the wrong place
[12:15:28] apeiros: as gregf_ says - it belongs into the block, right after the split.
[12:15:36] ctp: ah, ok !
[12:16:01] apeiros: otherwise you do ["", " a ", " b ", " c ", " d "].strip, and that does not exist, as ruby informs you
[12:16:35] ctp: yepp, i understand. thx!
[12:17:36] startupality: has joined #ruby
[12:17:46] stardiviner: has joined #ruby
[12:19:56] Devalo: has joined #ruby
[12:20:24] Pumukel: has joined #ruby
[12:20:39] apeiros: ctp: is it always | surrounded by a single space?
[12:22:02] ctp: ok, last question where i really see no way how to make it. i have now this array of arrays foo = [["", "a", "b", "c", "d"], ["", "e", "f", "g", "h"]]. how to delete an element (array) from it, where second field is "b" and third element is "c"? so afterwards foo should be [["", "e", "f", "g", "h"]]
[12:22:06] ctp: apeiros: yes
[12:22:19] jhass: Caerus: more like "ruby is useless without rubygems, so let's install that too" back then, and it just kept that support
[12:22:40] apeiros: ctp: then IMO use .map { |str| str[2..-3].split(" | ") }
[12:22:48] apeiros: that'll also get you rid of those empty elements
[12:23:25] Caerus: jhass, makes sense, very opinionated of rvm tho :o
[12:23:42] apeiros: ctp: as for your "how to delete based on a condition" question: see Array#reject
[12:24:12] apeiros: also technically with the empty element still inside, it's your third element which is "b", not the second :)
[12:24:22] ctp: apeiros: awesome! thx
[12:24:46] Gasher: has joined #ruby
[12:25:11] vaejor: has joined #ruby
[12:27:11] nankyokusei: has joined #ruby
[12:27:53] |2701: has joined #ruby
[12:28:00] DaniG2k: has joined #ruby
[12:30:16] norc: ctp: ary.delete_if.with_index { |e, i| ary[i+1] == 1 }
[12:31:23] norc: That is how I would delete an element based on a lookahead element.
[12:31:48] koderlin: has joined #ruby
[12:31:58] akem: has joined #ruby
[12:32:00] ctp: ok, i hoped something like this would work
[12:32:01] ctp: [["a", "b", "c", "d"], ["e", "f", "g", "h"]] - [["a", "b", _, _]]
[12:32:13] norc: ctp: It works..
[12:32:17] norc: Just not the way you expect it to!
[12:32:59] norc: &ri Array#-
[12:32:59] `derpy: http://ruby-doc.org/core-2.3.0/Array.html#method-i-2D
[12:33:09] sdothum: has joined #ruby
[12:34:13] norc: Think of it as: [ary1, ary2] - [ary3]
[12:34:26] norc: ary1 is obviously not the same as ary3. Neither is ary2.
[12:34:36] bigmike18: has joined #ruby
[12:35:01] karmatr0n: has joined #ruby
[12:35:14] futilegames: has joined #ruby
[12:36:16] vondruch: has joined #ruby
[12:36:54] synthroid: has joined #ruby
[12:37:16] ctp: norc: hmhm, hard to follow for me :) i usually do fp and pattern matching :)
[12:37:48] ctp: i'll try it with the delete_if
[12:38:05] norc: ctp: Well, I misunderstood your problem, so it it wont help you as it is.
[12:38:17] norc: But delete_if is still really useful if you have a way of expressing a condition when an element should be removed.
[12:38:44] Vile`: has joined #ruby
[12:39:26] ctp: so the delete_if would be the ruby'ish way to delete an element based on pattern, right?
[12:39:46] Caerus: been a pleasure hanging around here, I'm off to sleep
[12:39:49] andikr: has joined #ruby
[12:39:49] norc: ctp: Based on an expression. Not necessarily a pattern.
[12:39:52] Caerus: see ya latter everybody
[12:40:09] panpainter: has joined #ruby
[12:40:14] norc: ctp: You can also use reject which apeiros suggested. delete_if will modify the array in place, whereas reject will not.
[12:40:31] ctp: ok, gimme a try
[12:41:06] Yeomra: has joined #ruby
[12:41:30] lxsameer: has joined #ruby
[12:43:10] norc: ctp: For example: (1..10).to_a.reject { rand > 0.5 } is one of many ways to get a random set of numbers between 1 and 10.
[12:43:48] DefV: norc: why the to_a
[12:44:05] DefV: Range has reject method
[12:44:15] norc: Good point.
[12:47:02] ctp: argh, [["a", "b", "c", "d"], ["e", "f", "g", "h"]].reject { |x| x == ["a", "b", _, _] } was what i thought about, but this doesn't work. [["a", "b", "c", "d"], ["e", "f", "g", "h"]].reject { |x| x[0] == "a" && x[1] == "b" } is obviously what i'm looking for. but why doesn't the "don't care var" version work exactely?
[12:47:34] panpainter: has joined #ruby
[12:47:37] apeiros: because the "don't care" is for devs, not for ruby
[12:47:43] apeiros: ruby does not have a "don't care".
[12:47:48] apeiros: i.e. it's convention.
[12:48:12] apeiros: _ is a valid local variable name
[12:48:49] apeiros: you can simplify your code: .reject { |a,b,*| [a,b] == ["a", "b"] }
[12:51:00] schickung: has joined #ruby
[12:51:56] ctp: apeiros uuups, ok, i thought the _ has same meaning as in elixir :) now it
[12:51:59] ctp: s clear
[12:52:23] Hanmac: _ has a special meaning so you can use it multiple times
[12:52:24] ChiefAlexander: has joined #ruby
[12:52:35] apeiros: hanmac: in ruby? no
[12:52:43] apeiros: it's just a normal local variable
[12:53:26] Yiota: has joined #ruby
[12:53:34] Hanmac: >> [[1,2,3,4],[5,6,7,8]].each {|a,b, _, _| }
[12:53:36] ruby[bot]: hanmac: # => [[1, 2, 3, 4], [5, 6, 7, 8]] (https://eval.in/569666)
[12:53:42] Hanmac: >> [[1,2,3,4],[5,6,7,8]].each {|a,b, x, x| }
[12:53:43] ruby[bot]: hanmac: # => /tmp/execpad-c60c7d36d1fa/source-c60c7d36d1fa:2: duplicated argument name ...check link for more (https://eval.in/569667)
[12:54:03] Hanmac: apeiros: its not "just" a normal variable
[12:54:13] apeiros: oh, interesting. TIL. thanks.
[12:54:25] apeiros: I expected the second example to only give a warning
[12:54:48] Hanmac: hm maybe it was a warning before and was updated to an error
[12:54:57] apeiros: just tested with 2.0 and 1.9
[12:55:01] apeiros: was a syntax error back then too
[12:55:12] apeiros: I guess I never knew because I don't write code like that :o)
[12:55:42] tvw: has joined #ruby
[12:56:33] dsea: has joined #ruby
[12:57:00] ChiefAlexander: has joined #ruby
[12:57:14] dsea: what's the best way to get up to speed with ruby coming from a python background?
[12:57:27] norc: dsea: Writing code.
[12:57:45] dsea: norc: that's incredibly helpful, thank you
[12:57:53] apeiros: I think there's a "ruby from python" piece on ruby-lang. it's rather short, though.
[12:57:54] Hanmac: dsea: https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-python/
[12:58:25] apeiros: dsea: ruby koans might be useful
[12:58:25] norc: dsea: I indeed consider practice to be the best way to approach a language.
[12:59:04] dsea: hanmac apeiros Looks like a good place to start tyvm
[12:59:54] hahuang61: has joined #ruby
[13:01:48] adgtl: has joined #ruby
[13:04:25] panpainter: has joined #ruby
[13:04:44] noService: has joined #ruby
[13:05:22] marr: has joined #ruby
[13:06:33] arpegius: has joined #ruby
[13:09:42] ramortegui: has joined #ruby
[13:10:59] roamingdog: has joined #ruby
[13:11:21] aegis3121: has joined #ruby
[13:11:26] bruno-: has joined #ruby
[13:15:21] p0wn3d: has joined #ruby
[13:15:48] pawnbox: has joined #ruby
[13:16:27] malconis: has joined #ruby
[13:16:52] soc42: has joined #ruby
[13:16:56] pawnbox: has joined #ruby
[13:17:28] gnufied: has joined #ruby
[13:19:04] freerobby: has joined #ruby
[13:20:20] ChiefAlexander: has joined #ruby
[13:21:42] Masonn: has joined #ruby
[13:22:06] ChiefAlexander: has joined #ruby
[13:27:07] panpainter: has joined #ruby
[13:27:57] andromedian: has joined #ruby
[13:28:16] panpainter: has joined #ruby
[13:29:56] Timba-as: has joined #ruby
[13:30:11] mdw: has joined #ruby
[13:30:47] cdg: has joined #ruby
[13:30:50] agit0: has joined #ruby
[13:30:55] mdw: has joined #ruby
[13:33:03] brunto: has joined #ruby
[13:33:31] nimrev: has joined #ruby
[13:34:49] openstruct: has joined #ruby
[13:37:09] Tempesta: has joined #ruby
[13:39:09] stryek: has joined #ruby
[13:43:59] zenguy_pc: has joined #ruby
[13:44:14] morochena: has joined #ruby
[13:44:19] sinkensabe: has joined #ruby
[13:44:36] kgrz: exercism.io too. Similar to ruby koans, but peer reviewed mostly
[13:45:16] chouhoulis: has joined #ruby
[13:45:17] sinkensabe: has joined #ruby
[13:46:34] sinkensabe: has joined #ruby
[13:47:00] freerobby: has joined #ruby
[13:47:16] chouhoulis: has joined #ruby
[13:48:13] apeiros: kgrz: given the long lag, you probably have to ping them ;-)
[13:51:17] diegoviola: has joined #ruby
[13:51:29] synthroid: has joined #ruby
[13:54:02] safetypin: has joined #ruby
[13:55:52] jancel: has joined #ruby
[13:57:07] jaiks: has joined #ruby
[13:57:55] synthroid: has joined #ruby
[13:58:21] lacce: has joined #ruby
[13:59:04] diegoviola: has joined #ruby
[13:59:08] diegoviola: has joined #ruby
[13:59:32] rbennacer: has joined #ruby
[14:00:27] rbennacer: has joined #ruby
[14:01:00] griffindy: has joined #ruby
[14:01:13] startupality: has joined #ruby
[14:01:30] diegoviola: has joined #ruby
[14:03:04] diegoviola: has joined #ruby
[14:03:21] karmatr0n: has joined #ruby
[14:05:07] dopamean_: has joined #ruby
[14:05:30] idle_task: has joined #ruby
[14:05:59] Ch4rAss: has joined #ruby
[14:06:21] roshanavand: has joined #ruby
[14:06:57] halfamind: has joined #ruby
[14:07:23] agent_white: has joined #ruby
[14:08:15] armyriad: has joined #ruby
[14:08:21] jancel: has joined #ruby
[14:08:39] noobsu: has joined #ruby
[14:08:55] idefine: has joined #ruby
[14:09:31] armyriad: has joined #ruby
[14:09:31] weckl: has joined #ruby
[14:10:43] Madmanden: has joined #ruby
[14:11:19] bzb: has joined #ruby
[14:11:46] diegoviola: has joined #ruby
[14:12:33] bluOxigen: has joined #ruby
[14:14:06] diegoviola: has joined #ruby
[14:15:44] Madmanden: has joined #ruby
[14:16:52] zenguy_pc: has joined #ruby
[14:18:22] panpainter: has joined #ruby
[14:18:33] Biopandemic: has joined #ruby
[14:19:46] idefine: has joined #ruby
[14:21:26] Devalo: has joined #ruby
[14:23:13] Rixius: has joined #ruby
[14:24:32] bokayio: has joined #ruby
[14:25:15] kallisti5: has joined #ruby
[14:25:16] kiki_lamb: has joined #ruby
[14:25:38] hays: has joined #ruby
[14:25:49] nadir: has joined #ruby
[14:25:52] julieeharshaw: has joined #ruby
[14:26:31] sinkensabe: has joined #ruby
[14:26:45] Caerus|Away: has joined #ruby
[14:26:50] idefine_: has joined #ruby
[14:27:37] kareeoleez: has joined #ruby
[14:28:00] nankyokusei: has joined #ruby
[14:28:28] ullu: has joined #ruby
[14:29:15] ensyde: has joined #ruby
[14:29:38] idefine: has joined #ruby
[14:30:19] sinkensabe: has joined #ruby
[14:30:28] idefine: has joined #ruby
[14:30:44] tax: has joined #ruby
[14:30:51] ullu: trying to get connected to my local SQL Server via tiny_tds gem, but I'm getting "TinyTds::Error: Unable to connect: Adaptive Server is unavailable or does not exist"
[14:31:25] ullu: (I'm on a Windows 10 machine
[14:31:35] brunto: has joined #ruby
[14:33:04] raeoks: has joined #ruby
[14:34:36] diegoviola: has joined #ruby
[14:35:18] tatsuo: has joined #ruby
[14:36:06] blackmes1: has joined #ruby
[14:37:02] bruno-: has joined #ruby
[14:39:00] dhollinger: has joined #ruby
[14:40:43] grs: has joined #ruby
[14:41:17] iwmrby: has joined #ruby
[14:43:05] freerobby1: has joined #ruby
[14:43:13] [Butch]: has joined #ruby
[14:45:08] kobain: has joined #ruby
[14:45:26] armyriad: has joined #ruby
[14:45:53] afdafdafd: has joined #ruby
[14:45:54] chouhoul_: has joined #ruby
[14:46:01] Yiota: has joined #ruby
[14:46:11] davedev24: has joined #ruby
[14:46:17] kobain: has joined #ruby
[14:46:28] sinkensabe: has joined #ruby
[14:46:53] chouhoul_: has joined #ruby
[14:47:27] kobain: has joined #ruby
[14:48:38] kobain: has joined #ruby
[14:48:51] chouhoulis: has joined #ruby
[14:50:15] halfamind: has joined #ruby
[14:50:41] Callum: has joined #ruby
[14:51:20] zenguy_pc: has joined #ruby
[14:52:38] diegoviola: has joined #ruby
[14:53:44] idefine_: has joined #ruby
[14:55:03] rippa: has joined #ruby
[14:56:28] diegoviola: has joined #ruby
[14:59:29] diegoviola: has joined #ruby
[14:59:33] diegoviola: has joined #ruby
[15:00:33] hahuang61: has joined #ruby
[15:01:19] diegoviola: has joined #ruby
[15:01:38] sinkensabe: has joined #ruby
[15:01:59] bronson: has joined #ruby
[15:04:30] dikaio: has joined #ruby
[15:05:00] agentmeerkat: has joined #ruby
[15:05:23] kobain: has joined #ruby
[15:05:40] kareeoleez: has joined #ruby
[15:06:46] noService: has joined #ruby
[15:07:47] frem_: has joined #ruby
[15:09:08] chopin: has joined #ruby
[15:09:15] benlieb: has joined #ruby
[15:10:39] SilverKey: has joined #ruby
[15:10:40] diego1: has joined #ruby
[15:10:58] panpainter: has joined #ruby
[15:11:06] pandaant: has joined #ruby
[15:11:20] jancel: has joined #ruby
[15:12:44] rkazak: has joined #ruby
[15:14:56] davedev24: has joined #ruby
[15:16:20] diego1: has joined #ruby
[15:17:43] lannonbr: has joined #ruby
[15:17:58] terminal_: has joined #ruby
[15:18:17] lannonbr: has left #ruby: ()
[15:19:24] noService: has joined #ruby
[15:19:30] zenguy_pc: has joined #ruby
[15:22:33] kobain: has joined #ruby
[15:23:01] davedev24: has joined #ruby
[15:23:38] kobain: has joined #ruby
[15:24:17] synthroid: has joined #ruby
[15:24:38] kobain: has joined #ruby
[15:25:39] kobain: has joined #ruby
[15:28:08] elifoster: has joined #ruby
[15:28:40] monoprotic: has joined #ruby
[15:28:52] idefine: has joined #ruby
[15:28:59] idefine: has joined #ruby
[15:29:11] joncol: has joined #ruby
[15:31:15] The_Phoenix: has joined #ruby
[15:32:25] The_Phoenix: has joined #ruby
[15:33:55] The_Phoenix: has joined #ruby
[15:35:30] The_Phoenix: has joined #ruby
[15:36:02] kies: has joined #ruby
[15:37:02] The_Phoenix: has joined #ruby
[15:37:06] darkxploit: has joined #ruby
[15:37:33] Hanmac: has joined #ruby
[15:37:50] SilverKey: has joined #ruby
[15:37:58] nando293921: has joined #ruby
[15:39:03] cschneid_: has joined #ruby
[15:40:21] startupality: has joined #ruby
[15:40:54] diego1: has joined #ruby
[15:41:08] mosez: has joined #ruby
[15:42:07] sinkensabe: has joined #ruby
[15:43:10] theRoUS: has joined #ruby
[15:43:11] kobain: has joined #ruby
[15:43:12] theRoUS: has joined #ruby
[15:43:46] cschneid_: I am looking to find the memory size of an object I have. Looks like Objectspace.memsize_of() does it? Is there a better way?
[15:43:58] cschneid_: just the size of one example object is all I need
[15:44:12] kobain: has joined #ruby
[15:44:15] kgrz: apeiros: oh! yeah, didn't notice the timestamp there
[15:44:52] kgrz: dsea: try out exercism.io too. It's like ruby koans, but mostly peer reviewed
[15:45:22] kobain: has joined #ruby
[15:45:26] mostlybadfly: has joined #ruby
[15:46:12] cschneid_: hmm, memsize_of() doesn't recurse into subobjects. Sad.
[15:46:27] kobain: has joined #ruby
[15:46:45] idefine: has joined #ruby
[15:47:27] kobain: has joined #ruby
[15:47:52] panpainter: has joined #ruby
[15:48:27] kobain: has joined #ruby
[15:48:53] grs: has joined #ruby
[15:49:56] apeiros: cschneid_: shouldn't be hard to do a recursive one based on it
[15:50:14] cschneid_: apeiros: yeah, I just did the manual recursive algorithm myself :)
[15:50:53] startupality: has joined #ruby
[15:51:43] trajing: has joined #ruby
[15:52:01] lxsameer: has joined #ruby
[15:52:02] lxsameer: has joined #ruby
[15:52:26] jgt1: has joined #ruby
[15:54:07] jaruga___: has joined #ruby
[15:54:24] PlasmaStar: has joined #ruby
[15:54:34] last_staff: has joined #ruby
[15:54:39] isjaylee: has joined #ruby
[15:54:58] duoi: has joined #ruby
[15:54:58] duoi: has joined #ruby
[15:55:20] idefine_: has joined #ruby
[15:55:23] ruby-lang673: has joined #ruby
[15:56:18] ruby-lang673: Hello, I have execute bundler install (for my Gemfile) with root's user ... (i'm tired ...), can I change user ? Thanks very much and sorry for my bad english, I'm french :)
[15:56:26] amclain: has joined #ruby
[15:57:34] whathappens: has joined #ruby
[15:58:07] freerobby: has joined #ruby
[15:59:09] whathapp_: has joined #ruby
[15:59:13] jhass: ruby-lang673: did you use the --path or --deployment option now or in the past?
[15:59:36] smathy: has joined #ruby
[16:00:28] pietr0: has joined #ruby
[16:00:57] ruby-lang673: jhass : Mmmm ... no, i'm newbie on Gem. I just created "Gemfile" and execute "bundler install" with root's user. But now, I have this error when I execute " cap production deploy " (this is for PHP application deployement) : " LoadError: cannot load such file -- capistrano/symfony "
[16:01:21] jhass: what do you get by rerunning bundle install as your normal user?
[16:01:28] ruby-lang673: I read "Don't run Bundler as root. [...]" but it's too late ...
[16:01:43] ruby-lang673: I test, thanks
[16:02:13] hdm: whatever you do, dont gem install install
[16:02:17] hdm: ACTION runs
[16:03:18] ruby-lang673: After executer " bundler install " with normal user, I have " Bundle complete! 2 Gemfile dependencies, 12 gems now installed. ", I think it's good
[16:03:44] rkazak: has joined #ruby
[16:04:09] ruby-lang673: But I have this error again " LoadError: cannot load such file -- capistrano/symfony " when I execute " cap production deploy "
[16:04:27] Devalo: has joined #ruby
[16:04:32] halfamind1: has joined #ruby
[16:04:42] kobain: has joined #ruby
[16:04:51] horaceheaven: has joined #ruby
[16:04:58] idefine: has joined #ruby
[16:05:02] Hanmac: has joined #ruby
[16:05:42] kobain: has joined #ruby
[16:05:46] hdm: ruby-lang673: try prefixing it with "bundle exec"
[16:05:52] hdm: bundle exec cap production deploy
[16:06:16] TheCubeLord: has joined #ruby
[16:06:42] kobain: has joined #ruby
[16:06:57] jancel: has joined #ruby
[16:07:22] agentmeerkat: has joined #ruby
[16:07:29] elfuego: i’m trying to allow access to header to a client using headers 'Access-Control-Allow-Headers' => 'ETag’, but for some reason the client still doesn’t have access to the header. it this the correct way to allow access to header in sinatra?
[16:07:34] ruby-lang673: Oh sorry, it's good, I forgot require in Capfile. Thank's very much :)
[16:07:50] trajing: has joined #ruby
[16:09:45] agentmeerkat: has joined #ruby
[16:10:33] idefine_: has joined #ruby
[16:10:42] Ebok: has joined #ruby
[16:11:42] flips: has joined #ruby
[16:14:42] synthroid: has joined #ruby
[16:15:00] dfockler: has joined #ruby
[16:15:25] bronson: has joined #ruby
[16:15:41] tatsuo: has joined #ruby
[16:18:38] cajone: has left #ruby: ()
[16:18:38] stardiviner: has joined #ruby
[16:19:14] idefine: has joined #ruby
[16:19:34] Yeomra: has joined #ruby
[16:20:11] jwren: has joined #ruby
[16:21:06] isjaylee: has left #ruby: ()
[16:21:12] symm-: has joined #ruby
[16:22:35] whathappens: has joined #ruby
[16:25:19] cajone: has joined #ruby
[16:26:13] nemesit|znc: has joined #ruby
[16:27:13] malconis: has joined #ruby
[16:27:54] panpainter: has joined #ruby
[16:28:00] idefine: has joined #ruby
[16:28:49] govg: has joined #ruby
[16:28:52] nankyokusei: has joined #ruby
[16:29:19] Hanmac: has joined #ruby
[16:30:25] _biox: has joined #ruby
[16:30:37] djbkd: has joined #ruby
[16:32:26] moeabdol: has joined #ruby
[16:32:58] djbkd: has joined #ruby
[16:33:12] ferr1: has joined #ruby
[16:35:03] Don_John: has joined #ruby
[16:35:16] barajasfab: has joined #ruby
[16:35:22] dikaio: has joined #ruby
[16:35:34] arpegius: has joined #ruby
[16:36:16] sinkensabe: has joined #ruby
[16:36:56] idefine_: has joined #ruby
[16:38:26] babblebre: has joined #ruby
[16:39:14] dionysus69: has joined #ruby
[16:42:55] QORRiE: has joined #ruby
[16:43:10] idefine: has joined #ruby
[16:43:33] moeabdol: has joined #ruby
[16:45:05] gigetoo: has joined #ruby
[16:45:42] eljimmy: has joined #ruby
[16:45:58] aphprentice: has joined #ruby
[16:46:11] PlasmaStar: has joined #ruby
[16:47:08] rbennacer: has joined #ruby
[16:51:00] idefine: has joined #ruby
[16:51:32] flashpoint9: has joined #ruby
[16:52:30] skolman: has joined #ruby
[16:56:58] Hanmac: has joined #ruby
[16:57:22] synthroid: has joined #ruby
[16:58:12] idefine_: has joined #ruby
[16:58:23] edwinvdgraaf: has joined #ruby
[16:58:50] CoderPuppy: has joined #ruby
[16:59:19] gizmore: has joined #ruby
[16:59:47] panpainter: has joined #ruby
[17:01:38] George: has joined #ruby
[17:02:19] TomyLobo: has joined #ruby
[17:02:54] armyriad: has joined #ruby
[17:03:05] zacts: hi rubyists
[17:03:49] nemesit|znc: has joined #ruby
[17:03:51] zacts: I just want to say that my experience with the book Head First Ruby is really good. I'm at ch 6, almost to ch 7 now.
[17:04:12] zacts: (for a complete newbie)
[17:04:27] zacts: And I've been critical of other books in this series
[17:04:45] tildes: has joined #ruby
[17:05:03] skade: has joined #ruby
[17:05:06] havenwood: zacts: nice
[17:05:16] zacts: This one covers material in a similar way to Ovid's Beginning Perl I feel (the recommended book for newbies on #perl) (although totally different style)
[17:05:28] zacts: anyway, yeah...
[17:05:44] zacts: (It even has a ch at the end on making a simple Sinatra app)
[17:06:28] Eiam_: has joined #ruby
[17:07:56] grs: has joined #ruby
[17:09:29] cpup: has joined #ruby
[17:09:34] flashpoint9: has joined #ruby
[17:10:22] George: has left #ruby: ()
[17:10:22] toretore: has joined #ruby
[17:10:28] Cohedrin: has joined #ruby
[17:10:53] stannard: has joined #ruby
[17:11:10] trajing: has joined #ruby
[17:11:19] edwinvdgraaf: has joined #ruby
[17:12:17] apofis: has joined #ruby
[17:13:31] TreyG: has joined #ruby
[17:16:47] vdamewood: has joined #ruby
[17:17:10] Madmanden: has joined #ruby
[17:18:04] bronson: has joined #ruby
[17:18:45] Xeago: has joined #ruby
[17:19:10] rkazak: has joined #ruby
[17:20:26] skade: has joined #ruby
[17:20:40] dfockler: has joined #ruby
[17:21:57] karapetyan: has joined #ruby
[17:22:16] jancel: has joined #ruby
[17:23:47] idefine: has joined #ruby
[17:24:16] havenwood: The next in this sequence is paydirt.
[17:26:45] anisha: has joined #ruby
[17:27:08] fmcgeough: has joined #ruby
[17:27:38] ramfjord: has joined #ruby
[17:27:44] mtkd: has joined #ruby
[17:28:28] SilverKey: has joined #ruby
[17:29:15] shinnya: has joined #ruby
[17:29:42] idefine_: has joined #ruby
[17:29:45] dikaio: has joined #ruby
[17:30:39] smathy: Broke the sequence.
[17:33:21] LastWhisper____: has joined #ruby
[17:35:11] syndikate: has joined #ruby
[17:35:22] bronson: has joined #ruby
[17:36:27] zotherstupidguy: has joined #ruby
[17:38:11] ldnunes: has joined #ruby
[17:41:07] idefine: has joined #ruby
[17:41:47] agit0: has joined #ruby
[17:41:51] gigetoo: has joined #ruby
[17:42:16] umdstu: any homebrew users know how to get brew to use the homebrew version of curl for homebrew functions, not system curl?
[17:43:19] roamingdog: has joined #ruby
[17:44:01] codecop: has joined #ruby
[17:47:41] roshanavand: has joined #ruby
[17:47:48] ChiefAlexander: has joined #ruby
[17:49:09] gizless: has joined #ruby
[17:50:36] sumobob: is there anyway to override active records internal ID and force it you use a different field?
[17:51:26] hellcode: has joined #ruby
[17:52:54] smathy: ?rails sumobob
[17:52:55] ruby[bot]: sumobob: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[17:53:19] smathy: umdstu, you don't just make sure the desired curl is first in your PATH ?
[17:53:51] skolman_: has joined #ruby
[17:53:57] phredus: has joined #ruby
[17:54:06] skade: has joined #ruby
[17:54:59] _blizzy_: has joined #ruby
[17:56:29] skade: has joined #ruby
[17:57:25] idefine: has joined #ruby
[17:59:14] postmodern: has joined #ruby
[18:00:58] hahuang61: has joined #ruby
[18:01:13] umdstu: smathy: unfortunately no. it’s hardcoded in the file. programatically, it looks for ENV[‘HOMEBREW_CURL’] first though, and if it doesn’t exist uses /usr/bin/curl. in reality it appears that variable is ignored and it’s always set to /usr/local/bin
[18:01:26] noobsu_: has joined #ruby
[18:01:38] umdstu: soryr, always set to /usr/bin/curl
[18:01:39] CoderPuppy: has joined #ruby
[18:03:02] yfeldblum: has joined #ruby
[18:04:08] karapetyan: has joined #ruby
[18:04:31] SilverKey: has joined #ruby
[18:05:09] roshanavand: has joined #ruby
[18:08:01] shevy: anyone tried out http://pharo.org/ and can say how it compares to ruby?
[18:09:14] jhack: has joined #ruby
[18:12:13] edwinvdgraaf: has joined #ruby
[18:12:43] [Butch]_: has joined #ruby
[18:12:52] claw: anybody know why have these problems ? http://paste.debian.net/683617/
[18:13:14] claw: or how i can track them down
[18:13:49] Coldblackice: has joined #ruby
[18:14:03] idefine: has joined #ruby
[18:14:04] Eiam_: has joined #ruby
[18:14:27] claw: this also happens when i install to --path .gems
[18:14:44] [Butch]_: has joined #ruby
[18:14:49] shevy: gem list includes that gem?
[18:15:24] claw: shevy: yes
[18:15:38] mdw: has joined #ruby
[18:15:54] adaedra: looks like the gemfile included the gem version in the gem name.
[18:16:14] claw: adaedra: no it does not
[18:16:19] adaedra: Can you paste the gemfile?
[18:16:33] mdw: has joined #ruby
[18:16:35] claw: i updated bundler
[18:17:03] claw: it installed to .gems/2.2.0 while i actually use ruby 2.3.0
[18:17:29] jgt1: has joined #ruby
[18:17:51] Hanmac: has joined #ruby
[18:18:13] jancel: has joined #ruby
[18:19:39] Devalo: has joined #ruby
[18:20:18] flashpoint9: has joined #ruby
[18:20:34] shevy: hmm anyone knows what this "triage" thing is that gets added to issues on rubygem issue trackers?
[18:21:35] Yiota: has joined #ruby
[18:22:51] allcentury: has joined #ruby
[18:22:59] shevy: anyone knows what that is https://github.com/bronzdoc/samurai ? I assume it is vi ... but I have not seen anything similar to that before
[18:24:01] ytti: looks like vim yes
[18:24:14] sinkensabe: has joined #ruby
[18:24:22] ytti: at least 'airline' plugin installed
[18:24:38] adaedra: It's written vi in the tmux statusline twice, it's written "vim" in the project description, it's 100% VimL
[18:24:49] adaedra: No, I don't know what it can be, no idea. Emacs maybe.
[18:24:57] shevy: aha so that is tmux down there
[18:25:19] hellcode: so you can get those funky triangle delimiters with unicode? nice
[18:25:22] sumobob: just a vim color plugin i think
[18:25:40] rbennacer: has joined #ruby
[18:25:46] adaedra: hellcode: the full-height triangles need a patched font tho.
[18:26:07] shevy: hellcode I may actually look into unicode one day, if only for those fancy characters onto the screen!
[18:26:53] ytti: shevy, sadly for 'airline' you'll need customer airline font
[18:26:59] ytti: for best result
[18:27:14] ytti: https://github.com/vim-airline/vim-airline
[18:27:18] adaedra: but we're offtopicying here.
[18:27:47] symm-: has joined #ruby
[18:27:54] xall: has joined #ruby
[18:29:43] nankyokusei: has joined #ruby
[18:30:43] gizmore: has joined #ruby
[18:32:39] cpup: has joined #ruby
[18:33:53] stannard: has joined #ruby
[18:34:15] arpegius: has joined #ruby
[18:34:32] idefine: has joined #ruby
[18:34:45] anisha: has joined #ruby
[18:36:00] ctp: has joined #ruby
[18:36:05] giz|work: has joined #ruby
[18:38:15] GinoManWorks: has joined #ruby
[18:38:27] icarus: has joined #ruby
[18:40:32] pawnbox: has joined #ruby
[18:43:03] blackmesa: has joined #ruby
[18:43:41] hdm: has left #ruby: ()
[18:43:54] Trynemjoel: has joined #ruby
[18:44:25] rizzatti: has joined #ruby
[18:46:32] flips: I haven't been using Ruby for a long time, so things have changed. (I used it mostly before Rails.) I've got a new webdev project, and was thinking I should research/test if Ruby would be nice for the task. Googling a bit, I'm thinking maybe install nginx, Rack and padrino or Sinatra or something. Makes sense? :)
[18:47:44] brunto: has joined #ruby
[18:47:45] smathy: umdstu, do you need /usr/bin/curl for something? Just delete it and symlink that to your desired curl.
[18:48:10] umdstu: smathy: definitely an option!
[18:48:14] umdstu: or at least move it
[18:48:53] Yiota: has joined #ruby
[18:49:39] Yiota: has joined #ruby
[18:49:50] idefine: has joined #ruby
[18:49:58] SomeJuan: has joined #ruby
[18:50:25] kirun: has joined #ruby
[18:50:31] idefine: has joined #ruby
[18:50:50] edwinvdgraaf: has joined #ruby
[18:51:29] bronson: has joined #ruby
[18:51:36] hadronzoo: has joined #ruby
[18:51:44] jhass: flips: yup
[18:52:29] jhass: no need for nginx for a local dev setup though
[18:53:01] last_staff: has joined #ruby
[18:53:10] Kruppe: has joined #ruby
[18:54:05] sneakerhax: has joined #ruby
[18:55:20] ferr: has joined #ruby
[18:57:02] claw: anybody knows a good gem that can be used to interact with local filesystem/sftp/ftp/.... in a unified api ?
[18:57:41] roshanavand: has joined #ruby
[18:58:00] jhass: mmmh, fog kinda I guess?
[18:58:36] replay: has joined #ruby
[18:59:18] replay: has joined #ruby
[18:59:29] hellcode: I'm wondering what are rubyists thoughts on inheritance?
[19:00:22] jhass: avoid it, prefer composition and mixins
[19:01:12] hellcode: so I've heard. But the ruby system is built on inheritance isn't it?
[19:01:21] jhass: "the ruby system"?
[19:01:53] xall: has joined #ruby
[19:02:03] diego3: has joined #ruby
[19:02:04] hellcode: yeah the architecture of it's types, the underlying stuff that lets you do something like My_object.new
[19:02:05] skolman_: has joined #ruby
[19:02:23] hellcode: the whole BasicObject, Object, Class stuff behind the scenes
[19:02:27] diego3: has joined #ruby
[19:02:37] jhass: that's still pretty flat hierarchies
[19:02:55] Dimik: has joined #ruby
[19:03:00] jhass: "avoid it" != "reject its valid usecases"
[19:03:10] blaxter: has joined #ruby
[19:03:49] hellcode: so, maybe inheritance should only be used for such eh.. uncommon.. cases?
[19:03:50] jhass: if you go a bit up to the core classes, it's class Array; include Enumerable; not class Array < Collection
[19:03:58] dorje_: has joined #ruby
[19:04:26] diego3: has joined #ruby
[19:04:40] diego3: has joined #ruby
[19:05:01] Ebok: has joined #ruby
[19:05:10] CoderPuppy: has joined #ruby
[19:05:47] roshanavand: has joined #ruby
[19:06:48] ruby-lang484: has joined #ruby
[19:09:22] ruby-lang484: guys who know how i can disable GC totally in rspecs
[19:10:18] VeryBewitching: has joined #ruby
[19:10:48] eam: ruby-lang484: GC.disable
[19:10:59] synthroid: has joined #ruby
[19:11:29] panpainter: has joined #ruby
[19:12:48] oetjenj: has joined #ruby
[19:13:32] ruby-lang484: i tried - its somethimes falls with segfaults
[19:13:51] elfuego: does someone know at which version the browser gem stop supporting ruby 1.9?
[19:14:05] apofis: has joined #ruby
[19:14:52] synthroid: has joined #ruby
[19:15:45] ruby-lang484: http://pastebin.com/vWxERZba
[19:15:46] ruby[bot]: ruby-lang484: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/0c6eda6ae68f07ca2c8e027ab1b49629
[19:15:46] ruby[bot]: ruby-lang484: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[19:16:03] synthroid: has joined #ruby
[19:16:04] yqt: has joined #ruby
[19:16:07] SCHAAP137: has joined #ruby
[19:16:54] spider-mario: has joined #ruby
[19:18:33] jackjackdripper: has joined #ruby
[19:20:52] halfamind: has joined #ruby
[19:21:15] Devalo: has joined #ruby
[19:22:16] ruby-lang484: has left #ruby: ()
[19:22:43] ruby-lang834: has joined #ruby
[19:24:39] GodFather: has joined #ruby
[19:29:13] pawnbox: has joined #ruby
[19:31:57] barajasfab: has joined #ruby
[19:32:10] ruby595: has joined #ruby
[19:32:52] ruby595: i have trouble with eventmachine like https://gist.github.com/anonymous/0c6eda6ae68f07ca2c8e027ab1b49629
[19:33:18] ruby595: it can be related to garbage collector activity
[19:33:31] tubbo: ruby595: did you recently upgrade ruby?
[19:34:14] ruby595: or you mean 2.3.0 can resolve issue?
[19:34:29] Blaguvest: has joined #ruby
[19:34:50] adaedra: if you updated your ruby, try reinstalling eventmachine
[19:35:03] ruby595: its happens when rspec + knapsnack + capybara + thin
[19:35:28] ruby595: eventmachine port?
[19:36:52] ruby595: or you mean gem?
[19:38:01] ruby595: i use rvm, so, after install new ruby version i should install new gems to new gemset
[19:38:37] ruby595: btw, instance is ubuntu
[19:41:39] ChiefAlexander: has joined #ruby
[19:43:04] ruby595: its ruby back of this issue -
[19:43:05] ruby595: https://gist.github.com/sammerset/9475bda13755eddc4f37123829cdf43c
[19:43:10] Coldblackice: has joined #ruby
[19:44:00] SilverKey: has joined #ruby
[19:45:17] mdw: has joined #ruby
[19:46:22] charliesome: has joined #ruby
[19:46:30] duncannz: has joined #ruby
[19:47:50] ruby595: ruby-2.2.1/lib/libruby.so.2.2(vm_call0_body.constprop.78 - what this method do?
[19:48:19] Coldblackice: has joined #ruby
[19:51:47] edwinvdgraaf: has joined #ruby
[19:51:47] freerobby: has joined #ruby
[19:52:00] kith: has joined #ruby
[19:52:08] mooe: has joined #ruby
[19:52:09] flashpoint9: has joined #ruby
[19:52:19] ajax0xd9: has joined #ruby
[19:52:36] djbkd: has joined #ruby
[19:56:14] giz|work: has joined #ruby
[19:56:34] flashpoint9: has joined #ruby
[19:57:41] cdg: has joined #ruby
[20:00:09] dikaio: has joined #ruby
[20:00:51] hangtime21: has joined #ruby
[20:02:27] Pumukel: has joined #ruby
[20:04:09] lxsameer: has joined #ruby
[20:04:46] tubbo: ruby595: i bet 2.3.0 will not only resolve your issue but also make your program run bette
[20:06:04] Hanmac: has joined #ruby
[20:07:19] anisha: has joined #ruby
[20:09:03] pawnbox: has joined #ruby
[20:11:22] jancel: has joined #ruby
[20:12:50] sinkensabe: has joined #ruby
[20:13:06] bruno-: has joined #ruby
[20:13:49] firstdayonthejob: has joined #ruby
[20:18:40] Masonn: has joined #ruby
[20:18:49] jhack: has joined #ruby
[20:20:35] iwmrby: has joined #ruby
[20:20:59] gigetoo: has joined #ruby
[20:21:01] Trynemjoel: has joined #ruby
[20:21:25] iwmrby: People, I need help.
[20:22:38] iwmrby: Say I have a Ruby script and I get to a line that looks like Thread.new { do stuff in the new, separate thread }; more stuff; sleep 10.minutes;
[20:22:51] havenwood: iwmrby: Say more?
[20:22:55] kareeole_: has joined #ruby
[20:23:36] iwmrby: When I run sleep, does it also sleep the Thread? Is this the intended behaviour?
[20:23:48] jhass: no and it wouldn't
[20:23:50] dstarh: has joined #ruby
[20:23:56] ruby595: its anouther things
[20:24:02] djbkd: has joined #ruby
[20:24:05] iwmrby: AAAAH, but it seem to do that.
[20:24:09] iwmrby: Ok, back to debugging
[20:24:45] iwmrby: s/seem/seems
[20:25:13] djbkd: has joined #ruby
[20:26:41] jgt1: has joined #ruby
[20:27:33] iwmrby: Well, One more question. Say I have script one.rb and I want to call script two.rb with arguments U and Y as in `two.rb U Y`. What's the best way to call two.rb in a separate process? Thread.new{ system("ruby", "two.rb", Y, U) }
[20:27:55] jhass: &ri Kernel#spawn
[20:27:55] `derpy: http://ruby-doc.org/core-2.3.0/Kernel.html#method-i-spawn
[20:28:08] halfamind: has joined #ruby
[20:28:27] iwmrby: So spawn and Process.detach. Why this?
[20:28:37] jhass: though smelly to call another ruby script rather than turning it into a library and calling it from a new thread or so
[20:28:54] jhass: who said anything about Process.detach?
[20:29:13] iwmrby: Well, since I don't care about it after it starts it comes naturally.
[20:29:16] sepp2k: has joined #ruby
[20:29:39] iwmrby: it = the other script
[20:29:40] blackgoat: has joined #ruby
[20:29:55] jhass: so you want to keep it running after the current script exits?
[20:30:02] tAn: has joined #ruby
[20:30:25] catpoop: has left #ruby: ("Leaving")
[20:30:36] nankyokusei: has joined #ruby
[20:31:06] mnrmnaugh: has joined #ruby
[20:31:20] jhass: detach it is I guess
[20:31:24] aryaching: has joined #ruby
[20:31:27] jhass: or just Kernel#exec to it?
[20:31:51] ruby595: .join - we wait for end
[20:32:19] iwmrby: ruby595: I don't want to wait for it to end.
[20:32:21] jhass: spawn doesn't create a thread we could join
[20:32:54] mnrmnaugh_: has joined #ruby
[20:32:58] aryaching: has joined #ruby
[20:33:16] sinkensabe: has joined #ruby
[20:33:22] jhass: well I still say this smells like there's a huge opportunity for a library to be extracted
[20:33:56] iwmrby: jhass: I was so trying to avoid that, but it's probably what I am going to to.
[20:34:00] mnrmnaugh_: has joined #ruby
[20:34:05] iwmrby: jhass: thanks a lot for your help!
[20:34:14] jhass: it's a good thing!
[20:36:13] riobe: has joined #ruby
[20:38:48] riobe: I'm writing a simple console app to do some builds, and I want to flush $stdout before I output to $stderr in a global rescue block. I'm using both `STDOUT.sync = true` at the beginning of the program and $stdout.flush at the beginning of the rescue block and I am still seeing the error output intermixed with the normal puts output. Is there a way to fix this?
[20:39:00] safetypin: has joined #ruby
[20:39:14] ruby-lang696: has joined #ruby
[20:40:53] konsolebox: has joined #ruby
[20:41:12] bruce_lee: has joined #ruby
[20:41:15] riobe: Bah, I ask in here and then come up with the fix a minute later. @.@ Putting `STDOUT.sync = STDERR.sync = true` at the beginning of my rescue block (or program) fixes it.
[20:42:50] riobe: Nevermind...that only works sometimes. Insanity causing issue. They seem to be race conditioning (inconsistent results between runs)
[20:48:00] sinkensabe: has joined #ruby
[20:48:27] ur5us: has joined #ruby
[20:48:44] yeticry: has joined #ruby
[20:49:05] noobsu: has joined #ruby
[20:50:20] chip_: has joined #ruby
[20:50:29] tobiasvl: riobe: probably a race condition, yeah. STDOUT is buffered, so presumably even the flush is buffered
[20:50:56] tobiasvl: or well, that doesn't make much sense
[20:51:03] domgetter: has joined #ruby
[20:51:15] riobe: I thought the point of sync, and flush, is that I could know that when the flush call got done everything would be....flushed.
[20:51:22] domgetter: Is there a reason why double underscore isn't working in irb? http://ruby-doc.org/stdlib-2.2.3/libdoc/irb/rdoc/IRB.html#module-IRB-label-Session+variables
[20:51:28] tobiasvl: riobe: yeah you're right
[20:52:16] domgetter: I have IRB.conf[:SAVE_HISTORY] = 1000 in my .irbrc, so shouldn't it show the history of evaluations?
[20:52:16] riobe: tobiasv1: lol. I'm getting it working atm by putting a `sleep 1` after the `$stdout.flush` It's a build server that's running it, so if there's an extra second of you looking at the log before you get the error, no biggie. But it's frustrating to put in what feels like a hack.
[20:52:43] giz|work: has joined #ruby
[20:53:26] tobiasvl: riobe: yeah, that's ugly. and all of a sudden you have lots of iowait and it takes more than a second (OK, that's unlikely, but still) and it's broken again in a worse way
[20:53:32] tobiasvl: but I don't have an answer
[20:53:35] Guest65192: has joined #ruby
[20:53:45] riobe: Well, thanks for at least thinking about it. :)
[20:54:22] jancel: has joined #ruby
[20:54:26] tobiasvl: btw, $stdout's value is STDOUT, right?
[20:54:29] tobiasvl: I forget how they work
[20:54:30] riobe: I don't either, but I think I'll solve that after I finish the rest of the project. I only have one sleep so far in a global error handler. Hopefully I can avoid need elsewhere.
[20:54:44] tobiasvl: but you used both $stdout and STDOUT in your example above. that doesn't affect things, does it?
[20:54:59] riobe: $stdout is the global that refers to the value of the standard out. $> is an alias. STDOUT represents the initial value of $stdout
[20:55:02] jancel: has joined #ruby
[20:55:10] tobiasvl: that's how it is.
[20:55:24] riobe: I figured that STDOUT.sync = true wouldn't do anything, but it does. So I don't really completely understand the relationship
[20:55:35] riobe: I tried both that and `$stdout.sync = true`
[20:55:36] riobe: No change
[20:56:36] riobe: I can set either STDOUT or $stdout's sync to false and do some output of single characters with sleeps and see the buffering it does.
[20:57:55] jenrzzz: has joined #ruby
[20:58:34] eam: riobe: if you want your writes to be atomic, use #syswrite
[20:58:46] eam: or use #write with #sync = true
[20:59:00] eam: if you use puts or some other method you may end up performing multiple write() system calls
[20:59:21] mdw: has joined #ruby
[20:59:35] eam: (and there are potentially other constraints, like the pipe buf size if you're writing to a pipe)
[21:00:23] riobe: http://ruby-doc.org/core-2.0.0/IO.html#method-c-write This? (I'm new to ruby) Which I suppose I would use STDOUT.write() with? I don't want to go to a file though, I want to go to the console.
[21:01:01] eam: yes, you'd use STDOUT.write()
[21:01:19] eam: write goes through the rubyio layer and may be subject to write caching / flushing
[21:01:34] eam: syswrite does not -- what you send syswrite will translate directly into a write() system call
[21:02:04] riobe: I'll try converting my puts to STDOUT.syswrite and see if that works. Thanks for the idea eam
[21:02:15] eam: the particular implementation details of how writes behave past that are subject to your operating system's internals (generally you can assume POSIX behavior on a unix type system, thouhg)
[21:02:16] sinkensabe: has joined #ruby
[21:02:32] eam: as long as your writes are under 4k in size you probably won't have an issue
[21:04:50] flips: Hm, should I install gems using apt (on ubuntu), or following something like the rbenv/bundler method outlined on gorails.com?
[21:06:01] roamingdog: has joined #ruby
[21:06:20] shevy: flips I would not trust apt
[21:06:26] eam: flips: it depends. Generally, folks tend to bundle a ruby + gems with their app as it allows you to arbitrarily upgrade those components when you change your app's code
[21:06:48] eam: the system packages are more useful for smaller things
[21:07:13] flips: I haven't used ruby in a loong time. I seem to need rbenv&bundle to get the equivalent of pythons virtualenvs?
[21:07:45] nofxx: has joined #ruby
[21:07:45] nofxx: has joined #ruby
[21:08:09] riobe: eam: Putting `def puts(string='') STDOUT.syswrite string + "\n" end` at the top of my entry point file (I proved it was overriding the standard puts) still leaves stderr output using puts intermixed with stdout.
[21:08:33] eam: well, did you do the same for all STDERR bound output?
[21:08:51] eam: you have to do it for all output
[21:08:56] riobe: No, I figured it didn't matter if STDERR got buffered or went slower. But I'll try it.
[21:09:09] eam: yeah, you can't use puts() at all if you want atomicity
[21:11:03] yfeldblum: has joined #ruby
[21:11:07] riobe: eam: Ok, I put back in the puts override, then switched my 3 stderr outputs to look like this: `STDERR.syswrite "Error: #{e.message}\n"`
[21:11:12] riobe: I still get the intermixxed output.
[21:12:06] eam: riobe: you probably still have a buffered write being used somewhere. Can you post the code?
[21:13:33] sp4rrow: has joined #ruby
[21:13:34] bruno-: has joined #ruby
[21:15:14] riobe: eam: sure, I'm making it a single file script that shows the behavior, so there'll be less to paste.
[21:17:54] eam: riobe: also, what kind of system are you running this on? linux?
[21:18:28] eam: here's a simple example: ruby -e'Thread.new { loop { STDOUT.syswrite "a" * 80 + "\n" } }; loop { STDOUT.syswrite "b" * 80 + "\n" } '
[21:18:42] riobe: eam: http://pastebin.com/uGWCvdTN Windows
[21:18:43] ruby[bot]: riobe: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/b364d15d8bf61f107be102c226f74ef4
[21:18:43] ruby[bot]: riobe: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[21:18:59] eam: riobe: ah, it's possible Windows doesn't provide the same kinds of atomicity guarantees
[21:19:04] riobe: It's a build script that needs to run on a windows box (To build C# projects)
[21:19:17] lubekpl: has joined #ruby
[21:19:23] eam: the behavior of the write() system call being atomic is a thing unix specifies
[21:19:31] riobe: Good to know about the pastebin hate. o.o
[21:19:36] eam: rules on windows might be different -- you're depending on the operating system semantics at this point
[21:19:42] riobe: I see. I wish I were on a *nix system.
[21:20:54] riobe: Well, given that I might just resign to put a `sleep 1` in that rescue block. I only have the one global error handler that's like that for this project.
[21:21:02] eam: this probably isn't high performance, right? It shouldn't be too hard for you to implement your own properly serialized output system -- or just write your own puts() with a mutex to serialize it
[21:21:31] sinkensabe: has joined #ruby
[21:21:40] riobe: It's just for a build server to use to build projects for our < 10 person dev team. So no, not performance critical.
[21:21:58] riobe: Once I get done with all the basic functionality, I might just take that suggestion.
[21:22:02] roshanavand: has joined #ruby
[21:22:29] riobe: Thanks for helping. Learned some new stuff from that exercise. :)
[21:22:29] zapata: has joined #ruby
[21:25:35] dikaio: has joined #ruby
[21:30:10] ChiefAlexander: has joined #ruby
[21:34:27] mjuszczak: has joined #ruby
[21:35:17] dfockler: has joined #ruby
[21:35:23] tAn: has joined #ruby
[21:35:26] mdw: has joined #ruby
[21:35:44] gagrio: has joined #ruby
[21:36:39] minimalism: has joined #ruby
[21:36:54] bobbycvi: has joined #ruby
[21:37:01] sinkensabe: has joined #ruby
[21:40:18] d5sx43: has joined #ruby
[21:41:02] minot: has joined #ruby
[21:42:04] minot: has joined #ruby
[21:42:52] mwlang: has joined #ruby
[21:43:02] kareeoleez: has joined #ruby
[21:43:10] malconis: has joined #ruby
[21:44:18] danostrowski: has joined #ruby
[21:44:54] danostrowski: if I want to pass a block as a symbol to a method accepting params, what's the best way to do that? my_method(arg, arg2) { |i| i.do_something} works, but can't I do some sort of thing with &? What's the syntax?
[21:45:20] danostrowski: (for argument's sake, I'm keeping parens in the call.
[21:45:25] aegis3121: my_method(arg1, arg2, &block_arg); block_arg.call; end
[21:45:34] aegis3121: (I'm pretty sure)
[21:46:08] danostrowski: Right, but that's... sorry, I just want to use the & syntax to PASS the block's work that I'm doing.
[21:46:31] danostrowski: I want to do: my_method(arg1, arg2) &:do_something
[21:46:40] danostrowski: actually, lemme just irb this real fast.
[21:46:54] cpup: has joined #ruby
[21:47:09] danostrowski: yeah, that doesn't work.
[21:48:48] eljimmy: has joined #ruby
[21:48:59] sinkensabe: has joined #ruby
[21:49:16] eljimbo: has joined #ruby
[21:50:08] Jackneill: has joined #ruby
[21:50:27] panpainter: has joined #ruby
[21:50:30] aegis3121: &:method # => a Proc object of that method that expects to be called on something.
[21:50:54] aegis3121: > :to_s.to_proc.call 3
[21:51:20] ctp: hi folks. how do i split a string using a delimiter but adding some exception? "foo | bar \| bla | baz".split("|") should split by "|" but not for "\|"
[21:51:21] rickmasta: has joined #ruby
[21:51:26] d5sx43: has joined #ruby
[21:51:41] danostrowski: Yeah, I guess basically methods don't accept a Proc object instead of a block, basically. Makes sense.
[21:52:45] kareeoleez: has joined #ruby
[21:52:46] aegis3121: not totally true
[21:53:00] aegis3121: def blah(&:block); block.call 3; end; block(&:to_s)
[21:53:36] janebootydoe: has joined #ruby
[21:53:43] aegis3121: ctp I would say not necessarily an exception but explicitly you're wanting to split on ' | '
[21:55:52] boboc: has joined #ruby
[21:55:58] Azure: has joined #ruby
[21:56:19] ctp: aegis3121 hm, actually the input string is "| a | b | c \|d | e | f |". what i need as output is ["", " a ", " b ", " c \|d ", " e ", " f "]
[21:56:59] ctp: so the first "|" becomes ""
[21:57:42] ctp: so in the end split at "|" but not at "\|"
[21:57:52] Azure: has joined #ruby
[21:58:14] mlehrer: has joined #ruby
[21:59:31] zyzioziom: has joined #ruby
[21:59:46] minot: has joined #ruby
[22:00:41] braincrash: has joined #ruby
[22:01:21] panpainter: has joined #ruby
[22:01:33] djbkd: has joined #ruby
[22:01:54] nogic: has joined #ruby
[22:02:52] nogic: has joined #ruby
[22:03:04] ctp: no one has an idea?
[22:03:07] aegis3121: SO. Using single quotes will result in something different than double quotes.
[22:03:12] aegis3121: You'll want to use lookbehind in regex for sure
[22:03:16] aegis3121: (well almost for sure)
[22:03:17] mjuszczak: has joined #ruby
[22:03:32] CoderPuppy: has joined #ruby
[22:03:47] nogic: has joined #ruby
[22:03:51] bruno-: has joined #ruby
[22:04:45] sp4rrow: has joined #ruby
[22:04:56] aegis3121: >> 'blah | blah'
[22:04:57] ruby[bot]: aegis3121: # => "blah | blah" (https://eval.in/570313)
[22:05:17] aegis3121: >> "blah \| blah"
[22:05:18] ruby[bot]: aegis3121: # => "blah | blah" (https://eval.in/570314)
[22:05:22] aegis3121: >> 'blah \| blah'
[22:05:23] ruby[bot]: aegis3121: # => "blah \\| blah" (https://eval.in/570315)
[22:05:31] Masonn: has joined #ruby
[22:05:34] aegis3121: There we go. They result in different strings because of the escape sequence
[22:05:51] aegis3121: which means depending on the type of quote you use, you're evaluating a different string.
[22:07:36] impermanence: has joined #ruby
[22:07:41] ctp: aegis3121 hm, i'm sort of confused :)
[22:07:50] sinkensabe: has joined #ruby
[22:08:03] ctp: so, "| a | b | c \|d | e | f |" is my input string. i'm parsing $stuff
[22:08:39] ctp: i have no control about this input
[22:08:56] aegis3121: So you're doing something like "#{input}" ?
[22:09:45] ChiefAlexander: has joined #ruby
[22:10:06] ctp: foo = "| a | b | c \|d | e | f |"
[22:10:14] ctp: foo.split!("|")
[22:10:26] ctp: -> ["", " a ", " b ", " c ", "d ", " e ", " f "]
[22:10:39] ctp: what i need is:
[22:10:39] kareeoleez: has joined #ruby
[22:10:49] ctp: ["", " a ", " b ", " c \|d ", " e ", " f "]
[22:11:12] vaejor: >> "| a | b | c \|d | e | f |"
[22:11:13] ruby[bot]: vaejor: # => "| a | b | c |d | e | f |" (https://eval.in/570316)
[22:11:14] aegis3121: So you'll 1) need to split on a regex, 2) use lookbehind, and 3) understand what your string actually looks like
[22:11:48] bougyman: 3) is highest priority
[22:12:28] platzhirsch: has joined #ruby
[22:13:09] hahuang61: has joined #ruby
[22:13:23] mlehrer: has joined #ruby
[22:15:07] ramfjord: has joined #ruby
[22:15:14] crystal77: has joined #ruby
[22:15:17] rht: has joined #ruby
[22:15:45] aegis3121: ctp: What vaejor output here is what your String looks like to Ruby, so you can see why it's splitting on that. You'll notice in your output that you're getting the slash isn't included in the string like it would be if it were purely splitting on the pipe.
[22:15:46] johnmilton: has joined #ruby
[22:15:58] aegis3121: Splitting on the pipe as you saw it*
[22:16:02] havenwood: /(?<!\\)\|/
[22:16:21] crystal77: has joined #ruby
[22:17:10] edwinvdgraaf: has joined #ruby
[22:17:13] Eiam_: has joined #ruby
[22:17:21] ctp: ok, here's the concrete code :)
[22:17:25] ctp: ["| [[freebsd:hosts:host1|host1]] | 2.4.3 | 2015-05-12 |","| [[freebsd:hosts:host2|host2]] | 2.4.1 | 2016-09-03 |"].map { |arr| arr.split('|').map(&:strip) }
[22:17:39] ctp: returns:
[22:17:39] ctp: [["", "[[freebsd:hosts:host1", "host1]]", "2.4.3", "2015-05-12"], ["", "[[freebsd:hosts:host2", "host2]]", "2.4.1", "2016-09-03"]]
[22:17:45] aegis3121: oh please use a gist
[22:17:52] ctp: ok, mom
[22:18:17] mjuszczak: has joined #ruby
[22:18:25] kareeoleez: has joined #ruby
[22:20:04] ctp: aegis3121 https://gist.github.com/asconix/77550529e5f06ac8c26965b80b982e89
[22:21:13] cpup: has joined #ruby
[22:21:17] sp4rrow: has joined #ruby
[22:21:25] aegis3121: So again, the issue comes down to how ruby handles escape characters (like \|)
[22:21:39] ctp: the context is: it's dokuwiki syntax, pipes are used for table's vertical borders as well as for link texts in [[url|linktext]], so i use [[url\|linktext]] to distinguish
[22:21:46] aegis3121: with double quoted strings, those are interpolated and you get whatever the output of that escape character is. Single quotes preserve it.
[22:21:53] djbkd: has joined #ruby
[22:23:12] TobiG77: has joined #ruby
[22:23:43] nb_bez___: has joined #ruby
[22:24:39] ctp: yepp. i understand, but if i use single quoted strings, there's still the problem how to not split at '\|'
[22:24:40] ctp: ['| [[freebsd:hosts:host1\|host1]] | 2.4.3 | 2015-05-12 |','| [[freebsd:hosts:host2\|host2]] | 2.4.1 | 2016-09-03 |'].map { |arr| arr.split('|').map(&:strip) }
[22:24:51] aegis3121: That's simple regex that havenwood gave you
[22:25:22] ctp: ok, gimme a try :)
[22:26:31] vaejor: ctp: are the spaces around the | required as part of the dokuwiki format requirements?
[22:27:12] ctp: vaejor i don't think so, but the docs i parse autogenerated and produce them
[22:27:22] rickmasta: has joined #ruby
[22:27:25] ctp: would it help, if it wasn't?
[22:27:51] ctp: s/i parse/i parse are
[22:28:07] vaejor: ctp: it could help slightly if it were a requirement, but the regex havenwood put up works either way
[22:28:38] vaejor: ctp: so if you're unsure, catching it by \| is probably a better method at this point
[22:28:54] ctp: yepp, i see
[22:29:14] bluOxigen_: has joined #ruby
[22:31:28] nankyokusei: has joined #ruby
[22:31:39] ctp: i somehow miss the glue between the input string and the regex :) the day today was maybe a little too long ...
[22:32:18] vaejor: .split() can accept a regex as the parameter
[22:32:38] ajax0xd9: has joined #ruby
[22:33:32] ctp: aaaaaah, ok. thanks guys!
[22:33:49] ctp: was juggling with .scan etc :)
[22:33:55] zeroDi: has joined #ruby
[22:33:55] panpainter: has joined #ruby
[22:35:17] impermanence: has joined #ruby
[22:36:21] zenlot: has joined #ruby
[22:37:24] johnmilton: has joined #ruby
[22:37:38] mjuszczak: has joined #ruby
[22:39:57] ChiefAlexander: has joined #ruby
[22:41:38] solocshaw: has joined #ruby
[22:43:11] skolman_: has joined #ruby
[22:44:38] roamingdog: has joined #ruby
[22:45:58] workmad3: has joined #ruby
[22:48:08] djbkd: has joined #ruby
[22:49:05] Parko: has joined #ruby
[22:49:15] kfs: has joined #ruby
[22:49:39] bronson: has joined #ruby
[22:50:25] kfs: hi guys. i'm trying to install a ruby gem on my Mac and when i run it as my user it says permission denied to write to /Library/Ruby/Gems/2.0.0, so i installed with sudo and it worked but then when i go to run it it says i don't have the decencies.
[22:52:09] impermanence: has joined #ruby
[22:53:32] djbkd: has joined #ruby
[22:55:12] torandu: has joined #ruby
[22:55:20] rkazak: has joined #ruby
[22:55:42] impermanence: has joined #ruby
[22:56:51] impermanence: has joined #ruby
[22:58:47] startupality: has joined #ruby
[22:59:11] Rutix: has joined #ruby
[22:59:11] Rutix: has joined #ruby
[23:01:12] roamingdog: has joined #ruby
[23:02:13] panpainter: has joined #ruby
[23:03:20] CloCkWeRX: has joined #ruby
[23:04:17] cpup: has joined #ruby
[23:04:51] rkazak: has joined #ruby
[23:10:37] dikaio: has joined #ruby
[23:11:01] arescorpio: has joined #ruby
[23:12:12] sdwrage: has joined #ruby
[23:13:38] dfockler: has joined #ruby
[23:16:49] panpainter: has joined #ruby
[23:17:42] null__: has joined #ruby
[23:18:25] cooldavid: has joined #ruby
[23:18:29] mjuszczak: has joined #ruby
[23:20:13] mjuszczak: has joined #ruby
[23:21:48] cooldavid: can someone help me solve this spec? https://gist.github.com/anonymous/949d71056a8621728f1dc3a7765bfeba -- my problem is not with ruby but with the logical puzzle, the code is calling the payments_collected_in method and passing a Date object, and it expects a number, I think the trick is with the payment_day and frequency, I don't know what I have to do to match the expected number :(
[23:24:00] mjuszczak: has joined #ruby
[23:24:10] cooldavid: please kindly explain to me if you know
[23:26:03] kasisnu: has joined #ruby
[23:27:31] mjuszczak: has joined #ruby
[23:29:42] ghoti: has joined #ruby
[23:29:56] kiki_lamb: has joined #ruby
[23:30:06] gigetoo: has joined #ruby
[23:31:01] djbkd: has joined #ruby
[23:31:28] djbkd: has joined #ruby
[23:32:06] djbkd: has joined #ruby
[23:35:37] djbkd: has joined #ruby
[23:36:01] mjuszczak: has joined #ruby
[23:37:03] ghoti: has joined #ruby
[23:37:25] AnoHito: has joined #ruby
[23:37:38] JoshGlzBrk: has joined #ruby
[23:38:43] SilverKey: has joined #ruby
[23:39:02] sp4rrow: has joined #ruby
[23:42:01] dikaio: has joined #ruby
[23:43:03] kfs: has joined #ruby
[23:43:43] roshanavand: has joined #ruby
[23:44:02] bruno-: has joined #ruby
[23:44:11] stardiviner: has joined #ruby
[23:44:43] chouhoulis: has joined #ruby
[23:44:45] ramfjord: has joined #ruby
[23:46:24] Vile`: has joined #ruby
[23:46:55] mistermocha: has joined #ruby
[23:49:21] panpainter: has joined #ruby
[23:49:40] crystal77: has joined #ruby
[23:52:27] koooge: has joined #ruby
[23:54:31] nlsun: has joined #ruby
[23:55:35] n_blownapart: has joined #ruby
[23:56:11] dikaio: has joined #ruby
[23:57:36] wldcordeiro: has joined #ruby
[23:58:07] cooldavid: any clues? :|
[23:59:13] edwinvdgraaf: has joined #ruby