« Back to channel list

#ruby - 12 March 2016

« Back 1 day Forward 1 day »
[00:00:54] DonOtreply: has joined #ruby
[00:01:06] hahuang61: has joined #ruby
[00:02:34] cdg: has joined #ruby
[00:02:34] davedev24: has joined #ruby
[00:03:02] jenrzzz: has joined #ruby
[00:04:27] SCHAAP137: has joined #ruby
[00:05:27] fullofcaffeine: has joined #ruby
[00:05:50] rmulligan: has joined #ruby
[00:06:39] charliesome: has joined #ruby
[00:07:09] Vingador: has joined #ruby
[00:07:23] anton1x: has joined #ruby
[00:08:38] neanderslob: has joined #ruby
[00:13:08] rrrepsaj: has joined #ruby
[00:13:15] hahuang65: has joined #ruby
[00:14:23] Xeago: has joined #ruby
[00:16:40] `tim`: has joined #ruby
[00:17:13] elifoster: has joined #ruby
[00:17:29] charliesome: has joined #ruby
[00:18:54] kies: has joined #ruby
[00:20:30] pawnbox: has joined #ruby
[00:21:38] charliesome: has joined #ruby
[00:22:16] ebbflowgo: has joined #ruby
[00:24:41] psmolen: has joined #ruby
[00:25:26] dopamean_: has joined #ruby
[00:25:58] gregf: has joined #ruby
[00:29:28] phredus: has joined #ruby
[00:33:07] jackjackdripper: has joined #ruby
[00:33:08] uglybandersnatch: has joined #ruby
[00:36:02] johnmilton: has joined #ruby
[00:37:06] pzula: has joined #ruby
[00:37:39] mallu: has joined #ruby
[00:39:19] shazaum_: has joined #ruby
[00:39:57] Spami: has joined #ruby
[00:40:16] yatish27: has joined #ruby
[00:41:01] Guest34101: has joined #ruby
[00:41:57] jamil: has joined #ruby
[00:42:54] platzhirsch: has left #ruby: ()
[00:43:59] bronson: has joined #ruby
[00:47:42] B1n4r10: has joined #ruby
[00:52:12] joonty: has joined #ruby
[00:53:43] cajone: has left #ruby: ()
[00:56:49] cajone: has joined #ruby
[00:57:08] rmulligan: has joined #ruby
[00:57:50] devbug: has joined #ruby
[00:59:57] baweaver: has joined #ruby
[01:00:10] johnmilton: has joined #ruby
[01:03:23] kirillzh: has joined #ruby
[01:05:18] eregi: has joined #ruby
[01:11:19] bjpenn: has joined #ruby
[01:13:36] lewis1711: has joined #ruby
[01:14:49] lewis1711: http://ruby-doc.org/stdlib-2.2.0/libdoc/matrix/rdoc/Matrix.html#method-c-columns when I type that line into IRB my output does not look like that at all. it just looks like " => Matrix[[25, -1], [93, 66]] ". why?
[01:15:16] Ox0dea: lewis1711: I think that's just a demonstration.
[01:15:32] Ox0dea: I concede that it's unnecessary and confusing.
[01:15:58] lewis1711: damn. I want nice matrix formatting. oh well i can do it myself
[01:17:10] wldcordeiro: has joined #ruby
[01:23:05] statelesscode: has joined #ruby
[01:23:43] CloCkWeRX: has joined #ruby
[01:23:58] mrd_: has joined #ruby
[01:25:39] htmldrum: has joined #ruby
[01:27:01] unreal: has joined #ruby
[01:28:10] mrd_: has joined #ruby
[01:31:49] mistermocha: has joined #ruby
[01:32:05] vikaton: has joined #ruby
[01:32:29] `tim`: has joined #ruby
[01:33:30] tAn: has joined #ruby
[01:34:50] ur5us: has joined #ruby
[01:35:51] pawnbox: has joined #ruby
[01:36:45] achamian: has joined #ruby
[01:38:59] bjpenn: has joined #ruby
[01:39:07] reaVer: has joined #ruby
[01:40:54] Moosashi: has joined #ruby
[01:40:59] Contigi: has joined #ruby
[01:41:06] charliesome: has joined #ruby
[01:44:33] Prominent: has joined #ruby
[01:45:32] darix: has joined #ruby
[01:45:41] uglybandersnatch: has joined #ruby
[01:46:16] bronson: has joined #ruby
[01:47:13] Spami: has joined #ruby
[01:49:37] Dimik: has joined #ruby
[01:51:55] P4Titan: has joined #ruby
[01:53:26] fckyoufreenode: has joined #ruby
[01:54:15] davedev24: has joined #ruby
[01:54:26] rkazak: has joined #ruby
[01:55:36] Rubie: has joined #ruby
[01:56:02] Dimik: has joined #ruby
[01:56:10] rmulligan: has joined #ruby
[01:56:27] P4Titan: Hello all. If I have many instances of a derived class, will instance variables in the base class be the same throughout all derived classes or can they differ?
[01:58:05] fckyoufreenode: has joined #ruby
[01:58:24] Ox0dea: P4Titan: An instance variable is only ever "owned" by a single instance; that's how it got its name.
[01:59:38] htmldrum: has joined #ruby
[01:59:39] fullofcaffeine: has joined #ruby
[01:59:40] charliesome: has joined #ruby
[02:00:37] eregi: has joined #ruby
[02:01:08] P4Titan: so does each derived class create its own instances of base classes?
[02:01:34] Abrin_AWAY: has joined #ruby
[02:02:55] Karunamon: has left #ruby: ("WeeChat 0.4.2")
[02:05:55] pawnbox: has joined #ruby
[02:06:40] arescorpio: has joined #ruby
[02:06:51] Ox0dea: P4Titan: https://eval.in/535212
[02:07:27] safe: has joined #ruby
[02:11:19] sucks: has joined #ruby
[02:11:37] Dimik: has joined #ruby
[02:12:29] bjpenn: has joined #ruby
[02:13:40] duckpuppy: has joined #ruby
[02:16:21] Rubie: has joined #ruby
[02:20:16] fullofca_: has joined #ruby
[02:22:11] gbgdev: has joined #ruby
[02:22:31] P4Titan: Ox0dea: Thank you super much!
[02:22:38] Ox0dea: P4Titan: Happy to help. :)
[02:23:40] P4Titan: How does D get C's @v inside initialize
[02:24:04] duncannz: has joined #ruby
[02:25:32] Ox0dea: P4Titan: https://eval.in/535221
[02:25:51] Ox0dea: A derived class defaults to using the #initialize of the base class.
[02:26:10] Jameser: has joined #ruby
[02:26:56] HowardwLo: has joined #ruby
[02:26:57] Ox0dea: That's essentially true of all methods, of course, and largely the point of object orientation. :P
[02:27:00] HowardwLo: has left #ruby: ()
[02:27:24] DmitryBochkarev: has joined #ruby
[02:28:19] Jameser: has joined #ruby
[02:28:20] P4Titan: so in the blank initialize function of D, if you called super's initialize, would D have access to @v
[02:29:56] Ox0dea: Placing a `super` in D#initialize is essentially like pasting the contents of C#initialize there, so yes.
[02:30:22] Ox0dea: It would be *instances* of D that had access to @v, mind, not D itself.
[02:30:49] P4Titan: so are all instance variables inherited usually?
[02:31:01] P4Titan: minus the Class class ones?
[02:31:39] Ox0dea: It's situational, really. Most of the time, you subclass, invoke `super` to get the original behavior, and then add code to do whatever additional thing made you decide to subclass.
[02:32:42] P4Titan: so if C had another function that set an instance variable @temp, and then D called that function, could D access @temp?
[02:42:41] jamil: has joined #ruby
[02:44:41] speaking1ode: has joined #ruby
[02:45:30] Ox0dea: P4Titan: Sounds like a great experiment. :)
[02:45:37] mnrmnaugh: has joined #ruby
[02:45:42] hinbody: has joined #ruby
[02:45:49] pawnbox: has joined #ruby
[02:46:16] s00pcan_: has joined #ruby
[02:46:33] Ox0dea: Be advised that there's a pretty crucial distinction to be made between C and an instance thereof.
[02:49:40] baweaver: has joined #ruby
[02:50:13] rmulligan: has joined #ruby
[02:51:01] houhoulis: has joined #ruby
[02:52:32] johnmilton: has joined #ruby
[02:54:36] joonty: has joined #ruby
[02:55:07] _blizzy_: has joined #ruby
[02:55:23] achamian: has joined #ruby
[02:58:10] elifoster: has joined #ruby
[03:08:40] ur5us: has joined #ruby
[03:11:23] fullofcaffeine: has joined #ruby
[03:13:22] lewis1711: with unicode characters, some characters take up double width when displayed. is there anyway to get this info from a string, or is that related to the font itself?
[03:15:35] moos3: has joined #ruby
[03:17:57] Ox0dea: lewis1711: A font can indeed display a glyph however it pleases, but this might give you a springboard for doing it programmatically: http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt
[03:18:14] i8igmac: has joined #ruby
[03:19:29] Ox0dea: Here's what N, A, H, W, and F mean: http://www.unicode.org/reports/tr11/images/tr11.h1.jpg
[03:20:49] lewis1711: that's the proper way to do it, but a bit over kill, I am only dealing with 36 characters, so that's easy to enumerate over
[03:22:48] Ox0dea: >> [*?A..?Z, *0..9].size
[03:22:51] ruby[bot]: Ox0dea: # => 36 (https://eval.in/535229)
[03:22:51] Ox0dea: Coincidence? I think not.
[03:23:38] SCHAAP137: has joined #ruby
[03:24:50] lewis1711: Ox0dea, no it was my bad counting
[03:24:51] lewis1711: https://en.wikipedia.org/wiki/Bopomofo
[03:25:42] pawnbox: has joined #ruby
[03:26:53] Ox0dea: lewis1711: Ah, I was way off, then.
[03:26:57] Ox0dea: As best I can tell, they're all wide.
[03:27:06] snguyen: has joined #ruby
[03:27:16] lewis1711: Ox0dea, yeah they are all wide. except for the accent marks
[03:27:37] lewis1711: or tone marks I should say, ˇ ˋ ˊ ˙
[03:27:56] lewis1711: makes sense that the rendering is up to the font though
[03:28:28] marcdel: has joined #ruby
[03:29:33] jyaworski: has joined #ruby
[03:31:56] LoneHerm_: has joined #ruby
[03:35:04] marcdel: has joined #ruby
[03:37:01] Guest34101: has joined #ruby
[03:37:03] ponga: has joined #ruby
[03:37:23] B1n4r10: has joined #ruby
[03:38:10] noodle: has joined #ruby
[03:38:53] mistermocha: has joined #ruby
[03:39:05] stardiviner: has joined #ruby
[03:39:06] dextertzu: has joined #ruby
[03:39:16] chipotle: has joined #ruby
[03:44:25] rmulligan: has joined #ruby
[03:44:40] noodle: has joined #ruby
[03:45:09] h3lper: has joined #ruby
[03:48:28] bronson: has joined #ruby
[03:48:50] CloCkWeRX: has joined #ruby
[03:50:22] devbug_: has joined #ruby
[03:50:48] Musashi007: has joined #ruby
[03:51:32] noodle: has joined #ruby
[03:51:40] Musashi007: happy friday all
[03:53:06] swedishfish: has joined #ruby
[03:56:08] pawnbox: has joined #ruby
[03:56:38] ensyde_: has joined #ruby
[04:00:14] nando293921: has joined #ruby
[04:01:28] hk238: has joined #ruby
[04:06:44] charliesome: has joined #ruby
[04:07:22] mistermocha: has joined #ruby
[04:08:57] Rubie: has joined #ruby
[04:09:52] jayc0b0: has joined #ruby
[04:11:24] Asher: has joined #ruby
[04:13:42] tercenya_: has joined #ruby
[04:13:46] braincrash: has joined #ruby
[04:15:13] duckpuppy: has joined #ruby
[04:16:13] zast: has joined #ruby
[04:17:02] bry4n_: has joined #ruby
[04:18:20] dopie: has joined #ruby
[04:21:28] Musashi007: has joined #ruby
[04:23:30] ramfjord: has joined #ruby
[04:27:45] LoneHerm_: has joined #ruby
[04:29:49] swedishfish: has joined #ruby
[04:30:25] mistermocha: has joined #ruby
[04:32:16] uglybandersnatch: has joined #ruby
[04:33:06] chagel: has joined #ruby
[04:34:33] treaki__: has joined #ruby
[04:38:19] chagel: has joined #ruby
[04:38:33] rmulligan: has joined #ruby
[04:39:36] RegulationD: has joined #ruby
[04:39:40] snguyen: has joined #ruby
[04:40:22] achamian: has joined #ruby
[04:41:40] mistermocha: has joined #ruby
[04:42:04] IrishGringo: has joined #ruby
[04:44:19] bricker: has joined #ruby
[04:45:46] pawnbox: has joined #ruby
[04:50:30] merida: has joined #ruby
[04:50:46] Guest38: has joined #ruby
[04:52:38] The_Phoenix: has joined #ruby
[04:53:51] mistermocha: has joined #ruby
[04:54:21] mostlybadfly: has joined #ruby
[04:55:13] joonty: has joined #ruby
[04:56:32] dionysus69: has joined #ruby
[05:01:20] yatish27: has joined #ruby
[05:01:36] OnePunchMan: has joined #ruby
[05:01:39] darkxploit: has joined #ruby
[05:02:36] gix: has joined #ruby
[05:03:42] moos3: has joined #ruby
[05:04:55] pawnbox: has joined #ruby
[05:05:23] Musashi007: has joined #ruby
[05:08:04] mistermocha: has joined #ruby
[05:08:50] cpup: has joined #ruby
[05:10:36] htmldrum: has joined #ruby
[05:11:32] bry4n_: has joined #ruby
[05:13:53] baweaver: has joined #ruby
[05:15:35] graffix: has joined #ruby
[05:15:52] baweaver: has joined #ruby
[05:16:15] unreal: has joined #ruby
[05:16:18] cunpetst: has joined #ruby
[05:16:53] cunpetst: there is nothing more that I hate than NÌGGÉRs
[05:17:39] vdamewood: has joined #ruby
[05:18:42] pawnbox: has joined #ruby
[05:18:54] trifling-jest: has joined #ruby
[05:20:10] rlpowell: has joined #ruby
[05:21:21] rlpowell: private method `tap' called for "":String -- I got that from a library call in a script, where I had "def tap" at the top level. Why would a top-level def cause a private method to appear on String??
[05:22:19] merida: has joined #ruby
[05:22:42] rmulligan: has joined #ruby
[05:24:13] Ox0dea: rlpowell: Top-level methods become private methods on Object.
[05:25:48] aupadhye: has joined #ruby
[05:27:22] cunpetst: your nigger parents are private methods
[05:29:13] merida: has joined #ruby
[05:32:54] rlpowell: Ox0dea: ... Wow, OK. So what's the idiom for write a simple one-off script when I don't want that?
[05:33:35] Ox0dea: rlpowell: I'm not sure how you mean. You shouldn't run into this problem if you don't recycle core method names.
[05:34:00] Xeago: has joined #ruby
[05:34:12] Ox0dea: Object#tap already exists as a public method, to clarify.
[05:34:47] rlpowell: I assumed there was some simple idiom to scope things more sanely, like I dunno wrap it in Module or something. -_-
[05:34:51] rlpowell: But yeah, that works too I guess.
[05:35:05] Ox0dea: I mean, you can certainly do that, and indeed probably should.
[05:35:40] Ox0dea: But if you don't want to explicitly qualify your methods (YourModule.foo), you'd have to do something like `include YourModule`, and you'd be in the same quandary.
[05:36:24] mistermocha: has joined #ruby
[05:37:50] BiHi: has joined #ruby
[05:38:47] Moosashi: has joined #ruby
[05:41:44] vikas027: has joined #ruby
[05:45:55] whippythellama_: has joined #ruby
[05:48:17] graffix: has joined #ruby
[05:50:13] bronson: has joined #ruby
[05:51:57] fullofca_: has joined #ruby
[05:59:58] norc_: has joined #ruby
[06:00:16] eregi: has joined #ruby
[06:02:14] chipotle: has joined #ruby
[06:05:02] dikaio: has joined #ruby
[06:06:00] Musashi007: has joined #ruby
[06:08:33] sauvin: has joined #ruby
[06:14:32] darkxploit: has joined #ruby
[06:15:59] duckpuppy: has joined #ruby
[06:17:16] LoneHerm_: has joined #ruby
[06:17:20] jamil: has joined #ruby
[06:17:32] rmulligan: has joined #ruby
[06:18:09] fexilal: has joined #ruby
[06:19:10] Trynemjoel: has joined #ruby
[06:19:58] Moosashi: has joined #ruby
[06:21:14] merida: has joined #ruby
[06:21:57] stardiviner: has joined #ruby
[06:24:21] vdamewood: has joined #ruby
[06:25:16] fullofca_: has joined #ruby
[06:26:34] jehoesefat: has joined #ruby
[06:29:03] mistermocha: has joined #ruby
[06:30:03] bronson: has joined #ruby
[06:30:34] WizJin: has joined #ruby
[06:40:52] bricker: has joined #ruby
[06:43:31] The_Phoenix: has joined #ruby
[06:43:55] adgtl: has joined #ruby
[06:47:08] hakunin: has joined #ruby
[06:50:19] sneakerhax: has joined #ruby
[06:51:49] hxegon: has joined #ruby
[06:51:49] moos3: has joined #ruby
[06:52:01] adgtl_: has joined #ruby
[06:53:49] Moosashi: has joined #ruby
[06:55:13] darkxploit: has joined #ruby
[06:58:27] terlar: has joined #ruby
[06:59:27] graffix: has joined #ruby
[07:00:17] A124: has joined #ruby
[07:01:01] eregi: has joined #ruby
[07:02:06] trifling-jest: has joined #ruby
[07:03:45] joonty: has joined #ruby
[07:08:20] BtcBen: has joined #ruby
[07:10:19] howdoi: has joined #ruby
[07:11:08] djbkd: has joined #ruby
[07:11:39] rmulligan: has joined #ruby
[07:11:47] htmldrum: has joined #ruby
[07:12:25] rippa: has joined #ruby
[07:14:36] aryaching: has joined #ruby
[07:14:37] chagel: has joined #ruby
[07:18:15] LoneHermit: has joined #ruby
[07:19:22] trifling-jest: has joined #ruby
[07:20:03] lxsameer: has joined #ruby
[07:24:06] Guest34101: has joined #ruby
[07:25:49] Moosashi: has joined #ruby
[07:30:27] darkxploit: has joined #ruby
[07:32:14] davee_: has joined #ruby
[07:36:49] trifling-jest: has joined #ruby
[07:37:00] solocshaw: has joined #ruby
[07:37:43] Moosashi: has joined #ruby
[07:42:28] devbug: has joined #ruby
[07:44:42] hakunin: has joined #ruby
[07:47:41] JohnBat26: has joined #ruby
[07:54:18] trifling-jest: has joined #ruby
[07:55:09] JohnBat26: has joined #ruby
[07:55:15] pawnbox: has joined #ruby
[08:01:47] eregi: has joined #ruby
[08:05:23] moeabdol3: has joined #ruby
[08:05:46] rmulligan: has joined #ruby
[08:06:57] bjpenn: has joined #ruby
[08:07:02] amincd: has joined #ruby
[08:08:24] eregi: has joined #ruby
[08:09:42] amincd: this Ruby reference says that you can access a value from a Hash using the following syntax: hash.[key]: http://www.tutorialspoint.com/ruby/ruby_hashes.htm But I can't get it to work. Is this obsolete?
[08:10:08] apeiros: that one is certainly wrong
[08:10:17] apeiros: they either mean hash[], or hash.()
[08:10:55] apeiros: and the latter doesn't even work, as it'd call Hash#call, which does not exist
[08:11:24] Ox0dea: I suspect they meant `hash.[](key)`.
[08:11:26] amincd: apeiros: hash.(key) doesn't work just tried it
[08:11:39] apeiros: I assume it's just badly written. they mean to say hash[] and hash[]= a bit further down
[08:12:07] apeiros: amincd: yes, as I told you too :)
[08:12:55] apeiros: you could also just read the official documentation.
[08:12:57] ruby[bot]: you can use http://ruby-doc.org or the command line tool "ri" which should be installed along with your ruby to access documentation. Ri example: "ri Array#length"
[08:15:02] Ox0dea: Hey, why didn't Hash#call become an alias for #[] when Hash got #to_proc?
[08:15:14] steffkes: has joined #ruby
[08:15:15] bricker: has joined #ruby
[08:15:46] apeiros: I have no idea
[08:15:58] apeiros: I somewhat expected it to exist
[08:16:12] Ox0dea: It certainly seems appropriate.
[08:16:12] the_drow: has joined #ruby
[08:16:14] apeiros: that's why I even mentioned it (then tried it and amended what I said with that it wouldn't work)
[08:16:19] nwhirschfeld: has joined #ruby
[08:16:44] duckpuppy: has joined #ruby
[08:17:53] bry4n_: has joined #ruby
[08:18:24] Noxilex: has joined #ruby
[08:18:42] codecop: has joined #ruby
[08:18:45] amincd: has joined #ruby
[08:19:29] amincd: For the default value of a Hash, I thought the way you access it is hash["some_key_that_doesn't_exist"]..?
[08:19:53] Ox0dea: Yeah, that'd do it.
[08:20:09] j3r0: has joined #ruby
[08:20:43] Dragooon: has joined #ruby
[08:21:39] tercenya: has joined #ruby
[08:24:06] anton1x: has joined #ruby
[08:24:13] nwhirschfeld: has joined #ruby
[08:32:49] ledestin: has joined #ruby
[08:33:44] JohnBat26: has joined #ruby
[08:35:02] darkxploit: has joined #ruby
[08:36:09] mistermocha: has joined #ruby
[08:36:43] Dragooon: has joined #ruby
[08:36:55] graffix: has joined #ruby
[08:37:35] amincd: has joined #ruby
[08:37:36] hgl: has joined #ruby
[08:38:12] chipotle: has joined #ruby
[08:38:14] amincd: with regard to the default value of a Hash, I can get it to output by calling a non-existent key, but not if I have already populated the Hash with some key - value pairs. Is there any particular reason for that?
[08:38:19] Dragooon: has joined #ruby
[08:38:43] tvw: has joined #ruby
[08:38:43] nerium: has joined #ruby
[08:39:01] dionysus69: has joined #ruby
[08:40:03] moos3: has joined #ruby
[08:40:28] shevy: some key?
[08:41:00] amincd: for example: months = Hash.new("unknown"); puts months[1]; works, but not months = Hash.new("unknown"); months = {2 => "February", 3 => "March"}; puts months[1];
[08:41:09] amincd: ^ to output the default 'unknown'
[08:41:26] Ox0dea: amincd: You're re-assigning the variable.
[08:42:15] amincd: Ox0dea: oh I see
[08:42:23] Ox0dea: >> h = Hash.new(42); h[:a] = 1; [h[:a], h[:b]] # amincd
[08:42:25] ruby[bot]: Ox0dea: # => [1, 42] (https://eval.in/535335)
[08:44:05] uglybandersnatch: has joined #ruby
[08:44:10] amincd: Ox0dea: off topic, but any way to add multiple key => value pairs at the same time without reassigning the variable?
[08:44:59] Ox0dea: &ri Hash#update amincd
[08:45:00] `derpy: amincd: http://ruby-doc.org/core-2.3.0/Hash.html#method-i-update
[08:45:10] Ox0dea: Sure thing.
[08:45:20] Ox0dea: I do wish there were some syntactic sugar for it, but alas.
[08:45:27] hgl: has joined #ruby
[08:45:33] sandstrom: has joined #ruby
[08:45:52] Guest13710: has joined #ruby
[08:48:57] apeiros: IMO it should have been Hash.new(default, initial_values)
[08:49:11] apeiros: and Hash.new(initial_values, &default_block)
[08:49:43] Jackneill: has joined #ruby
[08:50:39] firstdayonthejob: has joined #ruby
[08:57:04] phredus: has joined #ruby
[08:57:28] mburns: has joined #ruby
[08:58:11] bjpenn: has joined #ruby
[08:59:27] amincd: has joined #ruby
[08:59:53] amincd: apeiros: yea I agree that would have been a nice syntactic feature to have
[08:59:59] rmulligan: has joined #ruby
[09:00:12] amincd: though I know next to nothing about ruby, so this is not an informed opinion on the subject
[09:01:55] Sigma00: you can always define `+` for hashes yourself :p
[09:02:00] apeiros: amincd: well, now you'll do just slightly different
[09:02:11] apeiros: either: Hash.new(default).merge(initial_values)
[09:02:19] apeiros: or: h = initial_value; h.default = default
[09:03:36] amincd: apeiros: yea that works
[09:03:41] amincd: (just tried it)
[09:04:13] helpa: has joined #ruby
[09:04:48] vikas027: has joined #ruby
[09:05:08] mistermocha: has joined #ruby
[09:05:35] amincd: interestingly hash.merge! works, but not hash.update!
[09:06:00] Ox0dea: amincd: Hash#merge! exists only because #merge also does.
[09:06:09] Ox0dea: That #update modifies the Hash in-place is implied in the name.
[09:06:30] LoneHermit: has joined #ruby
[09:08:44] JohnBat26: has joined #ruby
[09:09:44] solars: has joined #ruby
[09:10:04] amincd: Ox0dea: oh I see, merge doesn't modify the Hash in-place. I assumed it did because Hash.new("default val").merge(initial_values) worked
[09:10:45] Ox0dea: >> h = {a: 1}; h.merge(b: 2); h.merge!(c: 3); h # amincd
[09:10:46] ruby[bot]: Ox0dea: # => {:a=>1, :c=>3} (https://eval.in/535337)
[09:11:41] bronson: has joined #ruby
[09:12:41] htmldrum: has joined #ruby
[09:14:34] anton1x: has joined #ruby
[09:16:20] amincd: it's interesting that .merge doesn't assign the hash calling it when it immediately follows the hash (e.g. hash.merge), but does assign the hash generated by the expression that generates that hash
[09:17:05] tvw: has joined #ruby
[09:17:08] amincd: *does assign the hash generated by the expression that calls merge
[09:17:39] Ox0dea: Hash#merge doesn't really have anything to do with assignment.
[09:18:07] Ox0dea: There's a crucial distinction to observe between re-assignment of an identifier and in-place modification of an object.
[09:18:09] amincd: Ox0dea: yes, the . syntactic feature
[09:18:23] hgl: has joined #ruby
[09:20:57] blackmesa: has joined #ruby
[09:22:00] marr: has joined #ruby
[09:24:36] achamian: has joined #ruby
[09:24:37] Ox0dea: amincd: https://eval.in/535338
[09:25:18] amincd: I can use 'p' as shorthand for 'puts'!?
[09:25:53] adgtl: has joined #ruby
[09:25:54] Ox0dea: `p foo` == `puts foo.inspect`, so it's even better!
[09:26:02] Guest34101: has joined #ruby
[09:26:14] Ox0dea: For debug-printing, anyway.
[09:26:25] Ox0dea: Ruby loves you and wants you to be happy. :)
[09:27:04] amincd: with respect to the code: I was aware of how in place modification works. I was just surprised that hash.new(default_val).merge(initial_vals) worked on hash, without the ! in-place modifier
[09:27:22] amincd: it's a subtle distinction
[09:27:40] amincd: Ox0dea: seems beautiful in its efficiency so far
[09:28:17] Ox0dea: amincd: It's beautiful in so many subtle ways, most of which I hope you chance upon on your journey.
[09:28:34] amincd: Ox0dea: thank you
[09:30:46] graffix: has joined #ruby
[09:31:08] mistermocha: has joined #ruby
[09:31:13] phatypus: has joined #ruby
[09:31:49] amincd_: has joined #ruby
[09:32:23] baweaver: has joined #ruby
[09:32:26] Ishido: has joined #ruby
[09:34:03] The_Phoenix1: has joined #ruby
[09:38:17] chagel: has joined #ruby
[09:38:41] roshanavand: has joined #ruby
[09:41:36] toretore: has joined #ruby
[09:42:17] shevy: #ruby-preaching and #ruby-poetry are in the house!
[09:43:43] Guest34101: has joined #ruby
[09:44:59] bjpenn: has joined #ruby
[09:47:35] JamieD: has joined #ruby
[09:48:21] Guest13710: has joined #ruby
[09:48:54] Mon_Ouie: has joined #ruby
[09:49:15] b|ackwolf: has joined #ruby
[09:49:34] dmr8: has joined #ruby
[09:49:41] zeroDivisible: has joined #ruby
[09:51:01] dgncn: has joined #ruby
[09:51:25] Jameser`: has joined #ruby
[09:52:14] mistermocha: has joined #ruby
[09:54:10] rmulligan: has joined #ruby
[09:54:15] jameser``: has joined #ruby
[09:54:37] bjpenn: has joined #ruby
[09:55:01] eregi: has joined #ruby
[09:56:05] solars: I came across the foreman gem looking for a gem that simplifies daemons. But it seems outdated - does anyone know if there are maintained alternatives?
[09:57:21] sandstrom: has joined #ruby
[09:58:55] zeroXten: has joined #ruby
[09:59:54] zeroXten: Hi. This is hopefully a simple question. I've got a sinatra app that makes outbound calls using https.request. If one of those calls fails, it seems to blow up the whole sinatra app. I was hoping to check the response.code etc, but any failure seems to break the app. Is there an obvious fix? Cheers
[10:00:12] adgtl_: has joined #ruby
[10:02:08] adgtl__: has joined #ruby
[10:02:33] shevy: solars I think there are... but I don't remember which one it was. If nobody here knows, you could lateron ask on the rails channel, I remember that a lot of those reloading-thingies happened in the rails land
[10:03:20] DmitryBochkarev: has joined #ruby
[10:03:36] adgtl: has joined #ruby
[10:03:42] adgtl: has joined #ruby
[10:03:49] graffix: has joined #ruby
[10:06:28] norc_: solars, this might be a bit obvious.. but.. what about the `daemons` gem?
[10:06:35] mistermocha: has joined #ruby
[10:07:43] norc_: zeroXten, you might want to try #sinatra for that question.
[10:07:50] opencard: has joined #ruby
[10:07:54] solars: shevy, norc_ hm according to rubytoolbox foreman seems to be still quite popular
[10:08:05] solars: benefits are that it automatically hooks into systemd etc
[10:08:47] zeroXten: norc_: ok, cheers
[10:10:11] merqlove: has joined #ruby
[10:11:46] gigetoo: has joined #ruby
[10:11:50] norc_: solars, last commit was 10 months ago though as you have probably noticed.
[10:12:03] norc_: Though if you consider it to be a really useful tool, why not contribute and help maintain yourself?
[10:12:20] bricker: has joined #ruby
[10:13:00] Vingador: has joined #ruby
[10:14:21] zeroXten: maybe just some sort of try/catch could work
[10:14:35] zeroXten: well, begin/rescue
[10:14:36] norc_: solars, honestly things like this is why I moved away from apache/nginx for my rails applications.
[10:14:47] norc_: Its just disgusting to deal with.
[10:15:17] Radar: what do you use instead of apache or nginx?
[10:15:32] norc_: Plain unicorn, but then again I have the advantage of not caring about scalability.
[10:15:46] adgtl: has joined #ruby
[10:15:46] JohnBat26: has joined #ruby
[10:16:58] solars: norc_, I consider many tools as useful, but my time is limited :)
[10:17:29] duckpuppy: has joined #ruby
[10:18:15] helpa: has joined #ruby
[10:18:39] bry4n_: has joined #ruby
[10:18:45] zeroXten: heh. that did the job
[10:19:17] chipotle: has joined #ruby
[10:20:03] norc_: solars, it does not look completely dead though, pull requests still have been regularly accepted for a while, there just havent been any releases for a year now.
[10:20:21] solars: norc_, yeah I thought so as well, I will use it for now I think
[10:20:35] Prominent: has joined #ruby
[10:20:48] solars: thought it might be outdated because there is a build error on github and commits seemed rather old
[10:22:01] sandstrom: has joined #ruby
[10:24:09] JohnBat26: has joined #ruby
[10:25:10] sandstrom: has joined #ruby
[10:25:38] achamian: has joined #ruby
[10:26:01] norc_: solars, wait I looked wrong, pull requests have not been accepted for a year!
[10:26:38] norc_: Last commit was 11 months ago, if pull requests had been accepted you would see merge commits. ;-)
[10:28:07] solars: yeah 30 open requests
[10:28:12] moos3: has joined #ruby
[10:28:57] norc_: A perfect repository to fork and take over maintenance. :-)
[10:30:52] shevy: yeah sometimes you gotta take over unmaintained dead things that still hold promise
[10:32:01] User458764: has joined #ruby
[10:32:43] User458764: has joined #ruby
[10:33:08] mistermocha: has joined #ruby
[10:33:14] solars: shevy, so we have a volunteer? :)
[10:33:27] shevy: I say let foreman die
[10:33:52] snguyen: has joined #ruby
[10:34:08] moeabdol3: has joined #ruby
[10:34:33] norc_: Ox0dea, funny. So for the first time I read some bison documentation - now I actually understand some of the weird symbols in parse.y :-)
[10:34:46] gbgdev: has joined #ruby
[10:35:49] Ox0dea: norc_: What's with the /*%%%*/ comments?
[10:36:05] Ox0dea: I know the stuff between /*% and %*/ is for Ripper.
[10:36:44] hkumar: has joined #ruby
[10:38:09] spider-mario: has joined #ruby
[10:38:43] FooMunki: has joined #ruby
[10:39:54] JohnBat26: has joined #ruby
[10:40:03] pawnbox: has joined #ruby
[10:41:14] norc_: Ox0dea, all three are just delimiters for ext/ripper/tools/preproc.rb to identify which part should be used.
[10:41:34] RegulationD: has joined #ruby
[10:42:09] norc_: The other bit is.. one second.
[10:43:06] norc_: Ox0dea, cant find it from the top off my head, but basically ruby and ripper comment the other part out before compiling.
[10:43:35] Ox0dea: norc_: Yep, I knew that much; I just always thought those /*%%%*/ bits were superfluous.
[10:44:02] norc_: Ox0dea, you kind of have to tell the preprocessor where the non-ripper part begins?
[10:44:05] Ox0dea: No sense making it harder than necessary to parse the parser, I guess.
[10:44:21] Ox0dea: norc_: Well, sure, but the brackets are balanced?
[10:44:46] norc_: Ox0dea, that would require parsing the grammar first. Running a simple preprocessor with regular expressions is far simpler.
[10:46:02] mistermocha: has joined #ruby
[10:46:15] Ox0dea: norc_: Granted, but the meta-ness of parsing a parser is far more amusing.
[10:46:29] JohnBat26: has joined #ruby
[10:47:24] Guest13710: has joined #ruby
[10:47:59] norc_: Ox0dea, https://github.com/ruby/ruby/blob/trunk/parse.y#L701-L707
[10:48:12] rmulligan: has joined #ruby
[10:48:15] norc_: So at some point they realized they could do it all far more obvious and cleanlz...
[10:48:48] Ox0dea: It makes good sense, of course.
[10:49:57] norc_: To have two completely different conventions (one based on C macros, and the other based on preprocessing) to cherry pick the semantic action for a production rule?
[10:50:06] norc_: Only in Ruby.
[10:50:13] gnufied: has joined #ruby
[10:50:21] norc_: Well. Technically both is based on preprocessing...
[10:51:08] norc_: Though I think ifndef_ripper is just a shorthand hack for the `op' production rule.
[10:51:22] norc_: Well and keyword_variable
[10:52:04] JohnBat26: has joined #ruby
[10:52:50] Prominent: has joined #ruby
[10:58:34] User458764: has joined #ruby
[10:59:15] shevy: norc_ cleanlz ... do you use an english keyboard as a german native speaker or the other way around :-)
[11:01:12] graffix: has joined #ruby
[11:07:27] norc_: shevy, I switch between German and English keyboard fairly often that sometimes its difficult to keep track. :)
[11:07:39] tomphp: has joined #ruby
[11:08:34] dionysus69: has joined #ruby
[11:09:01] norc_: Im willing to bet that MySQL in its standard configuration does some collation where y and z are considered the same character.
[11:10:21] melter: has joined #ruby
[11:11:56] shinnya: has joined #ruby
[11:12:10] bronson: has joined #ruby
[11:12:26] pecpec: has joined #ruby
[11:13:20] xpt: norc_: I'm using colemak to avoid switching my kbd. It has a learning curve but it's nice to be able to write in more than one language without switching keyboards
[11:13:40] The_Phoenix: has joined #ruby
[11:13:45] htmldrum: has joined #ruby
[11:14:00] shanemcd_: has joined #ruby
[11:14:03] dmr8: has joined #ruby
[11:14:06] dikaio: has joined #ruby
[11:14:30] ebbflowgo: has joined #ruby
[11:15:00] BtcBen: has joined #ruby
[11:15:18] norc_: xpt, usually I just type in English layout though. Its just that at times I need special German characters. :/
[11:15:38] norc_: And then I also have a MacBook so I have a slightly different layout there too.
[11:16:13] The_Phoenix1: has joined #ruby
[11:19:03] stardiviner: has joined #ruby
[11:19:51] xpt: I do use Polish and English equally so I need Polish characters quite often. And I'm learning swedish so I have additional 3 chars that I need to know how to type, so for my use-case multilingual keyboard seems the best choice.
[11:20:02] shanemcd: has joined #ruby
[11:20:34] merida: has joined #ruby
[11:25:11] hk238: has joined #ruby
[11:27:14] achamian: has joined #ruby
[11:27:59] graffix: has joined #ruby
[11:31:26] snguyen: has joined #ruby
[11:32:02] rooose: has joined #ruby
[11:32:07] achamian_: has joined #ruby
[11:34:38] swedishfish: has joined #ruby
[11:34:47] htmldrum: has joined #ruby
[11:34:55] blackmesa: has joined #ruby
[11:37:50] gbgdev: has joined #ruby
[11:38:36] gbgdev_: has joined #ruby
[11:39:25] jolts: has joined #ruby
[11:40:42] trifling-jest: has joined #ruby
[11:40:48] jolts: has joined #ruby
[11:41:05] sandstrom: has joined #ruby
[11:42:10] devbug: has joined #ruby
[11:42:27] rmulligan: has joined #ruby
[11:42:36] RegulationD: has joined #ruby
[11:43:02] eregi: has joined #ruby
[11:43:08] trifling-jest: has joined #ruby
[11:45:51] ur5us: has joined #ruby
[11:46:03] eurialo: has joined #ruby
[11:47:51] jenrzzz: has joined #ruby
[11:49:59] sdothum: has joined #ruby
[11:53:42] eregi: has joined #ruby
[11:54:32] mistermocha: has joined #ruby
[11:55:07] pawnbox: has joined #ruby
[11:55:34] LoneHermit: has joined #ruby
[11:58:06] Spami: has joined #ruby
[11:58:09] JohnBat26: has joined #ruby
[11:59:24] OrbitalKitten: has joined #ruby
[12:03:26] tknz: has joined #ruby
[12:03:44] JohnBat26: has joined #ruby
[12:03:57] firstdayonthejob: has joined #ruby
[12:06:40] vMon: has joined #ruby
[12:07:18] Azure: has joined #ruby
[12:08:32] vikas027: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[12:10:14] JohnBat26: has joined #ruby
[12:11:26] vMon: hey guys does anyone know how Sinatra registers an apps routes when Sinatra runs as a loop above all of the route definitions in the code?
[12:12:13] n008f4g_: has joined #ruby
[12:13:02] adaedra: I'm not sure to follow
[12:14:34] mistermocha: has joined #ruby
[12:15:56] roshanavand: has joined #ruby
[12:16:26] moos3: has joined #ruby
[12:18:01] tomphp: has joined #ruby
[12:18:13] duckpuppy: has joined #ruby
[12:18:34] JohnBat26: has joined #ruby
[12:19:23] bry4n_: has joined #ruby
[12:22:20] nofxx: has joined #ruby
[12:22:20] nofxx: has joined #ruby
[12:28:45] JohnBat26: has joined #ruby
[12:28:47] kirun: has joined #ruby
[12:30:31] dgncn: has joined #ruby
[12:33:50] Musashi007: has joined #ruby
[12:35:13] mistermocha: has joined #ruby
[12:36:32] rmulligan: has joined #ruby
[12:37:40] jenrzzz: has joined #ruby
[12:38:26] chipotle: has joined #ruby
[12:39:09] tomphp: has joined #ruby
[12:39:09] mdw: has joined #ruby
[12:40:15] sandstrom: has joined #ruby
[12:40:22] SCHAAP137: has joined #ruby
[12:40:44] shanemcd: has joined #ruby
[12:41:38] flopsec: has joined #ruby
[12:43:18] nerium: has joined #ruby
[12:45:02] trinaldi: has joined #ruby
[12:45:02] gizmore: has joined #ruby
[12:45:15] jenrzzz: has joined #ruby
[12:45:54] uglybandersnatch: has joined #ruby
[12:48:04] trinaldi: has joined #ruby
[12:49:17] Spami: has joined #ruby
[12:49:39] graffix: has joined #ruby
[12:52:38] User458764: has joined #ruby
[12:57:01] chagel: has joined #ruby
[12:58:31] mistermocha: has joined #ruby
[12:59:10] platzhirsch: has joined #ruby
[13:03:19] roshanavand: has joined #ruby
[13:03:42] platzhirsch: has left #ruby: ()
[13:04:05] WizJin: has joined #ruby
[13:04:07] Drakevr: has joined #ruby
[13:04:12] p0p0pr37: has joined #ruby
[13:05:29] achamian: has joined #ruby
[13:08:33] snguyen_: has joined #ruby
[13:11:35] Neo--: has joined #ruby
[13:11:55] Neo--: any1 alive?
[13:12:02] Neo--: I am new here!
[13:12:41] Neo--: Are you ruby programmeR?
[13:13:17] adaedra: No need to PM me
[13:13:52] Neo--: well.. Evryone here is professional?
[13:13:57] Neo--: with ruby>?
[13:14:24] Azure: has joined #ruby
[13:14:29] adaedra: We all know Ruby, more or less.
[13:14:42] apeiros: unlikely that all 1000 people in here professionally use ruby.
[13:14:42] Neo--: What advice do you give to beginners?
[13:14:43] adaedra: Well, most of us, I guess, at least.
[13:14:49] bronson: has joined #ruby
[13:15:06] adaedra: Advice to beginners? Don't go too fast.
[13:15:18] Neo--: that's all?
[13:15:29] alexherbo2: has joined #ruby
[13:16:01] Neo--: how about a beginner in programming? Should he start with Ruby?
[13:16:16] shevy: start with php
[13:16:27] Neo--: if he would like to major in web development later on?
[13:16:27] adaedra: They start with what they like to start with
[13:16:35] adaedra: shevy: -_-
[13:16:41] Abrin_AWAY: has joined #ruby
[13:17:05] Neo--: I thought you guys were ruby supporters?
[13:17:11] apeiros: ruby is a good starting choice for web development
[13:17:17] apeiros: no. we guys are ruby *users*
[13:17:26] Neo--: and where should tht beginner start?
[13:17:26] apeiros: as well as the gals
[13:17:51] adaedra: ?links Neo__
[13:17:52] ruby[bot]: Neo__: http://ruby-community.com/pages/links
[13:18:15] Neo--: No books or any tutorial which is a must?
[13:18:21] Neo--: nothing like that?
[13:19:10] infernix: has joined #ruby
[13:19:13] ramfjord: has joined #ruby
[13:19:30] bjpenn: has joined #ruby
[13:20:09] bry4n_: has joined #ruby
[13:20:13] shevy: Neo__ ruby is superior to php but a newbie has to first learn how to not do things, so php is perfect
[13:20:33] Neo--: oh.. and where do I start with php
[13:20:39] Neo--: I am complete new..
[13:21:00] shevy: did you not want to major in web development
[13:21:04] Neo--: and someone recommended to work on ruby on rails if i aim for web design
[13:21:05] shevy: and now you say that you have no idea why
[13:21:23] Neo--: by major I mean.. my field..
[13:22:10] Neo--: I don't knw where those paths may lead.. atleast now.. I put it as a goal!
[13:22:14] Neo--: later I may not like it..
[13:22:40] blaxter: has joined #ruby
[13:22:45] shevy: already sounds like an awful plan
[13:22:59] Neo--: thne recommmend me an awesome plan?
[13:23:24] shevy: perhaps become a carpenter
[13:23:37] Neo--: But I don't like manual labour..
[13:23:43] Neo--: not advicable to me doctor says
[13:23:51] shevy: then how about poetry
[13:24:02] Neo--: My literary skills are good for nothing..
[13:24:04] achamian: has joined #ruby
[13:24:13] Neo--: at this rate i' won't be able to earn money for my famil
[13:24:17] adaedra: Can we focus back to ruby?
[13:24:19] skade: has joined #ruby
[13:24:54] Neo--: What do you suggest adaedra?
[13:25:10] adaedra: About what, beginning with ruby?
[13:25:25] adaedra: Look at the resources linked, there's surely something for you to start with in them.
[13:25:46] Neo--: then.. i'll strt digging from the link you gave
[13:26:47] skade: has joined #ruby
[13:27:03] krz: has joined #ruby
[13:28:03] skade: has joined #ruby
[13:28:33] gigetoo: has joined #ruby
[13:28:35] Neo--: Thanks... I'll come back here! if any situation arises
[13:29:09] Neo--: hope to find undead people..
[13:30:09] adaedra: This is IRC, we're not all always looking. Just ask your question and wait if you have one.
[13:30:40] rmulligan: has joined #ruby
[13:31:08] dionysus69: has joined #ruby
[13:32:09] eregi: has joined #ruby
[13:33:09] Neo--: 1 more question
[13:34:05] Neo--: How much time will it take a beginner to start working within Rails?
[13:34:11] baweaver: has joined #ruby
[13:34:59] fexilal: you can start working in a few hours
[13:35:03] BtcBen: has joined #ruby
[13:35:03] Neo--: on the beginner's understanding!
[13:35:25] Neo--: average tym?
[13:35:41] fexilal: then you travel the long road to proficiency
[13:35:50] Zarthus: programming is so big it takes between 0 and a lifetime years
[13:36:16] Neo--: good to hear that!
[13:37:43] rippa: has joined #ruby
[13:38:17] B4daBing73: has joined #ruby
[13:39:16] B4daBing73: Does anyone know a good Ruby-Linter/Checker for NPM that can be installed globally to be used in Vim Syntastic?
[13:39:32] charliesome: has joined #ruby
[13:39:36] Zarthus: I've only used rubocop, but that's not for npm afaik
[13:39:56] apeiros: B4daBing73: npm is in another channel. this is #ruby.
[13:40:39] Neo--: What are Ruby Gems?
[13:40:43] apeiros: oh dear, and a crossposter too…
[13:40:47] apeiros: ?crosspost B4daBing73
[13:40:47] ruby[bot]: B4daBing73: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[13:41:00] apeiros: Neo__: packages of ruby code and/or executables
[13:41:31] apeiros: Neo__: http://guides.rubygems.org
[13:41:47] Neo--: yah... I saw htt
[13:41:53] AlexRussia: has joined #ruby
[13:42:51] fexilal: Neo__: Just wondering, do you know the difference between web design and web development?
[13:46:54] tomphp: has joined #ruby
[13:47:33] aryaching: has joined #ruby
[13:48:39] bricker: has joined #ruby
[13:48:53] bluOxigen: has joined #ruby
[13:52:46] davedev24: has joined #ruby
[13:54:41] intrigueD: has joined #ruby
[13:56:01] JohnBat26: has joined #ruby
[13:56:01] duckpuppy: has joined #ruby
[13:56:17] pwnd_nsfw: has joined #ruby
[13:56:36] Spami: has joined #ruby
[14:01:09] Guest34101: has joined #ruby
[14:01:12] y2mq37: has joined #ruby
[14:02:46] htmldrum: has joined #ruby
[14:04:31] moos3: has joined #ruby
[14:07:33] d0nn1e: has joined #ruby
[14:08:36] shevy: what style would you prefer:
[14:08:42] shevy: string.gsub!(/^foo/,'')
[14:08:44] shevy: string.gsub!(/^foo/, '')
[14:08:55] apeiros: I like my space after the ,
[14:10:36] IrishGringo: has joined #ruby
[14:10:56] freerobby: has joined #ruby
[14:11:44] zotherstupidguy: has joined #ruby
[14:13:26] shevy: yeah that is weird
[14:13:37] shevy: I thought I preferred the first variant until just now.... now I am unsure :(
[14:14:15] shevy: what would then trouble me is inconsistency... like half methods use a ' ' after the , and the other methods don't ...
[14:15:25] JohnBat26: has joined #ruby
[14:16:39] troulouliou_dev: has joined #ruby
[14:16:56] charliesome: has joined #ruby
[14:18:10] sepp2k: has joined #ruby
[14:18:45] troulouliou_dev: has joined #ruby
[14:18:57] roshanavand: has joined #ruby
[14:19:59] troulouliou_dev: has joined #ruby
[14:20:19] troulouliou_dev: has joined #ruby
[14:23:24] graffix: has joined #ruby
[14:24:08] dcunit3d: has joined #ruby
[14:24:44] rmulligan: has joined #ruby
[14:24:46] achamian: has joined #ruby
[14:26:09] Xeago: has joined #ruby
[14:26:15] bricker: has joined #ruby
[14:26:52] P4Titan`: has joined #ruby
[14:28:25] JohnBat26: has joined #ruby
[14:29:59] adgtl: has joined #ruby
[14:30:05] WizJin: has joined #ruby
[14:31:35] mack25: has joined #ruby
[14:31:44] swills: has joined #ruby
[14:32:31] DJTrey: has joined #ruby
[14:33:06] xpt: shevy: I like to write it witout space
[14:33:17] xpt: but I dislike reading it witout space.
[14:33:51] biberu: has joined #ruby
[14:34:11] adgtl: has joined #ruby
[14:34:11] adgtl: has joined #ruby
[14:34:51] Guest34101: has joined #ruby
[14:35:20] P4Titan`: has joined #ruby
[14:35:28] mrmortondk: has joined #ruby
[14:36:35] futilegames: has joined #ruby
[14:37:45] last_staff: has joined #ruby
[14:38:40] gizmore: shevy: just stop using monospace fonts
[14:38:56] minimalism: has joined #ruby
[14:40:52] steffkes: has joined #ruby
[14:40:52] steffkes: has joined #ruby
[14:41:49] Neo--: fexilal nah!.. I thought it's the same
[14:41:57] Neo--: Develop a website
[14:42:29] Neo--: Or maybe acc. to you design means more about graphical and where to put things..
[14:43:05] WizJin: has joined #ruby
[14:43:14] Neo--: fexilal: u there?
[14:44:58] tomatoes: has joined #ruby
[14:45:36] graffix: has joined #ruby
[14:45:45] shevy: gizmore :(
[14:45:58] shevy: xpt how odd haha
[14:46:04] pzula: has joined #ruby
[14:47:03] achamian: has joined #ruby
[14:48:33] Jardayn: has joined #ruby
[14:49:14] Rubie: has joined #ruby
[14:50:06] Deck`: has joined #ruby
[14:50:25] Neo--: How do you stay connected to this IRC through android smartphone?
[14:50:35] Neo--: any app in particular?
[14:50:40] ebbflowgo: has joined #ruby
[14:50:54] bry4n_: has joined #ruby
[14:51:46] Deck`: is there a way to uniq an array by merging some attribute in the resulting array. Like: [[:a, 1]. [:a, 1], [:b, 3]] => [[:a, 1+1], [:b, 3]] ?
[14:51:57] arthropododo: has joined #ruby
[14:54:35] aryaching: has joined #ruby
[14:55:41] davedev24: has joined #ruby
[14:58:47] stardiviner: has joined #ruby
[14:58:53] RegulationD: has joined #ruby
[14:59:18] notme: has joined #ruby
[15:05:06] duckpuppy: has joined #ruby
[15:07:05] JohnBat26: has joined #ruby
[15:07:10] Sidoniuns: has joined #ruby
[15:09:10] johnmilton: has joined #ruby
[15:09:25] chridal: I'll give it a go here. I'm really interested in figuring out how much memory, cpu cycles things are taking in Ruby and in general. What sort of books should I be looking into?
[15:10:05] chridal: I'd love to understand how much time different operations end up taking and why they're taking so long
[15:10:20] chridal: Is there any way of learning this other than learning C performance characteristics and reading the source of Ruby?
[15:11:09] chridal: You'd think it'd be easy searching for books on these kinds of topics but I can't seem to find the right keywords.
[15:11:19] havenwood: chridal: http://patshaughnessy.net/ruby-under-a-microscope
[15:12:35] x77686d: has joined #ruby
[15:13:10] bjpenn: has joined #ruby
[15:13:40] zotherstupidguy: has joined #ruby
[15:14:09] chridal: havenwood: Yea, I have that book actually but it seems to be more about the instructions that are ran rather than the performance characteristics
[15:17:04] bronson: has joined #ruby
[15:17:09] shevy: Neo__ go back to oldschool, good old desktop computers!
[15:17:33] steffkes: has joined #ruby
[15:17:46] shevy: chridal you can find a few snippets here and there on different blogs, a few video talks too
[15:18:14] shevy: and you can always ask norc_ and Ox0dea here about the demons in the parser and the C files of ruby
[15:18:51] rmulligan: has joined #ruby
[15:19:19] aryaching: has joined #ruby
[15:19:34] chridal: Neo__: Do you mean stay connected as in persistent connection even when you close the app?
[15:19:45] User458764: has joined #ruby
[15:19:58] brendan-: has joined #ruby
[15:20:17] eregi: has joined #ruby
[15:20:19] Chau: has joined #ruby
[15:20:31] brendan-: has joined #ruby
[15:20:37] chridal: In that case you have a couple of different options. www.irccloud.com might be interesting
[15:21:30] chridal: But you could also set up a bouncer (such as ZNC). A bouncer will remain connected to IRC on your behalf, and you will then connect to the bouncer to get updates. http://znc.in
[15:22:57] davee_: has joined #ruby
[15:23:00] chridal: If you've got yourself a linux server somewhere you could set up weechat on it (which is the worlds best IRC client imo) and use http://www.glowing-bear.org/ as a frontend to it, which you can connect to from your phone.
[15:23:27] nettoweb: has joined #ruby
[15:23:32] jehoesefat: has joined #ruby
[15:23:40] chridal: shevy: yea, but what about in general btw? What kinds of books should I get into to get down and dirty with the CPU cycles and memory usage of different operations
[15:23:48] crowell: has joined #ruby
[15:26:29] Tempesta_: has joined #ruby
[15:26:38] norc-2: has joined #ruby
[15:27:04] cpruitt_: has joined #ruby
[15:27:24] qhp_: has joined #ruby
[15:27:25] havenn: has joined #ruby
[15:27:35] sandstrom: has joined #ruby
[15:27:37] rlpowell_: has joined #ruby
[15:28:07] intrigue_: has joined #ruby
[15:28:50] last_staff: has joined #ruby
[15:28:51] htmldrum: has joined #ruby
[15:29:14] m4rCsi_: has joined #ruby
[15:29:26] FooMunki: has joined #ruby
[15:30:30] mic_e: has joined #ruby
[15:30:40] dmr8: has joined #ruby
[15:30:56] Billias: has joined #ruby
[15:31:05] sarbs: has joined #ruby
[15:31:07] shaman42: has joined #ruby
[15:31:26] speakingcode: has joined #ruby
[15:31:27] bhaak: has joined #ruby
[15:31:35] jolts: has joined #ruby
[15:31:37] LoneHerm_: has joined #ruby
[15:31:48] s00pcan_: has joined #ruby
[15:32:08] jolts: has joined #ruby
[15:32:38] nhhc_: has joined #ruby
[15:33:11] jolts: has joined #ruby
[15:33:27] julieeharshaw: has joined #ruby
[15:34:13] mdw: has joined #ruby
[15:34:53] segy: has joined #ruby
[15:35:03] creat: has joined #ruby
[15:35:12] brainslug: has joined #ruby
[15:35:29] Shidash: has joined #ruby
[15:35:47] baweaver: has joined #ruby
[15:36:03] jolts: has joined #ruby
[15:36:05] moos3: has joined #ruby
[15:36:35] jolts: has joined #ruby
[15:37:39] jolts: has joined #ruby
[15:38:01] nettoweb: has joined #ruby
[15:38:14] mrmortondk: has joined #ruby
[15:38:48] bjpenn: has joined #ruby
[15:39:04] sneep: has joined #ruby
[15:39:11] rkoller: has joined #ruby
[15:39:21] graffix: has joined #ruby
[15:40:53] sneep: Is the standard coding style in Ruby more EAFP or LBYL?
[15:41:01] jolts: has joined #ruby
[15:41:37] DonOtreply: has joined #ruby
[15:42:25] davee_: has joined #ruby
[15:42:30] mclee: has joined #ruby
[15:42:37] kp666: has joined #ruby
[15:42:43] coyo: has joined #ruby
[15:42:43] coyo: has joined #ruby
[15:42:56] i8igmac: has joined #ruby
[15:43:10] lujan: has joined #ruby
[15:43:50] DoubleMalt: has joined #ruby
[15:46:21] havenwood: hmm, the European Association of Fish Pathologists
[15:47:06] jam: has joined #ruby
[15:47:20] havenwood: sneep: we generally avoid rescuing errors for flow control when there are nicer ways
[15:47:58] Sidoniuns: has joined #ruby
[15:48:06] gbgdev: has joined #ruby
[15:48:09] mdw: has joined #ruby
[15:48:58] al2o3-cr: has joined #ruby
[15:49:12] shevy: chridal not sure, I guess one has to know C very well to make sense of all of that
[15:49:15] sneep: I see. Thanks!
[15:49:20] shevy: havenwood lol
[15:49:26] gbgdev: has joined #ruby
[15:49:31] dgncn: has joined #ruby
[15:50:21] chridal: So that's what I have to do then. Working in this field not knowing the ms of a memory read is killing me.
[15:50:35] shevy: that reminds me ... whatever happened to pontiki?
[15:50:47] chridal: I feel like I can't make proper decisions about when to store a key in Redis and when to store it in Postgres. Etc. etc.
[15:51:01] chridal: When something should use a threading model, or a pre-forking model
[15:51:03] chridal: and the list goes on
[15:54:37] merida: has joined #ruby
[15:56:13] shevy: what I learned is that posgresql is simply faster than sqlite!
[15:56:30] dn5: has joined #ruby
[15:56:54] Guest13710: has joined #ruby
[16:03:45] d0nn1e: has joined #ruby
[16:03:54] pawnbox: has joined #ruby
[16:04:05] hxegon: has joined #ruby
[16:07:17] tao_: has joined #ruby
[16:08:02] watersoul_: has joined #ruby
[16:08:29] bjpenn: has joined #ruby
[16:08:34] Mr0: has joined #ruby
[16:09:04] dmarr_: has joined #ruby
[16:09:17] houhoulis: has joined #ruby
[16:10:08] Prominent: has joined #ruby
[16:10:09] skydiver_: has joined #ruby
[16:10:13] nlsun: has joined #ruby
[16:10:17] zenlot6: has joined #ruby
[16:10:22] djbkd: has joined #ruby
[16:10:27] swgillespie_: has joined #ruby
[16:11:29] ramblinpeck_: has joined #ruby
[16:11:36] _musl_: has joined #ruby
[16:11:42] Plas: has joined #ruby
[16:11:43] mando_: has joined #ruby
[16:11:52] Expanse_: has joined #ruby
[16:12:10] pabst: has joined #ruby
[16:12:10] kappy_: has joined #ruby
[16:12:11] Freijo: has joined #ruby
[16:12:11] admin2: has joined #ruby
[16:12:15] MalcolmReynolds: has joined #ruby
[16:12:15] dukedave__: has joined #ruby
[16:12:17] icey_: has joined #ruby
[16:12:20] artmann: has joined #ruby
[16:12:21] trajing: has joined #ruby
[16:12:21] pragmatism_: has joined #ruby
[16:12:30] daxroc1: has joined #ruby
[16:12:31] DenSchub: has joined #ruby
[16:12:36] beawesomeinstead: has joined #ruby
[16:12:45] matt_d_: has joined #ruby
[16:12:45] ElderFain-: has joined #ruby
[16:12:45] PaulCape_: has joined #ruby
[16:12:53] ElderFain: has joined #ruby
[16:12:54] irick: has joined #ruby
[16:13:03] Olipro_: has joined #ruby
[16:13:07] fourq: has joined #ruby
[16:13:08] bitemyapp: has joined #ruby
[16:13:14] shevy: has joined #ruby
[16:13:16] brixen_: has joined #ruby
[16:13:21] r4z3r: has joined #ruby
[16:13:32] ikonia: has joined #ruby
[16:13:41] lsmola: has joined #ruby
[16:13:56] Mekkis: has joined #ruby
[16:13:57] crayfishx: has joined #ruby
[16:15:00] bestie: has joined #ruby
[16:15:36] deeprave: has joined #ruby
[16:15:45] Lloyd: has joined #ruby
[16:15:57] adaedra: * freenode is now known as downnode
[16:16:23] daemonwrangler: has joined #ruby
[16:16:26] Guest4184______: has joined #ruby
[16:16:45] spastorino: has joined #ruby
[16:16:46] B1n4r10: has joined #ruby
[16:16:46] HashNuke: has joined #ruby
[16:16:49] halfdan: has joined #ruby
[16:17:58] mclee: has joined #ruby
[16:18:00] twodayslate: has joined #ruby
[16:18:03] amitchellbullard: has joined #ruby
[16:19:39] nhhc: has joined #ruby
[16:21:32] chagel: has joined #ruby
[16:23:01] snguyen: has joined #ruby
[16:23:41] shevy: undeadnode for undeadra
[16:23:50] cpup: has joined #ruby
[16:24:30] adgtl: has joined #ruby
[16:24:30] adgtl: has joined #ruby
[16:26:02] Authenticator: has joined #ruby
[16:26:18] Rubie: has joined #ruby
[16:26:19] shevy: I am looking at code written by someone else and I see:
[16:26:21] shevy: alias :say :print
[16:26:21] Synthead: has joined #ruby
[16:26:29] shevy: is this technically the same as: alias say print ?
[16:30:39] mdw: has joined #ruby
[16:30:52] nhhc: has joined #ruby
[16:34:06] mdw: has joined #ruby
[16:35:23] havenwood: shevy: technically, there are two colons added :P
[16:36:07] havenwood: shevy: but yeah, it's an keyword so use the bareword :)
[16:37:56] shevy: how peculiar
[16:38:04] bjpenn: has joined #ruby
[16:38:54] Hanmac: hm wasnt there a rubybot command where you can have it explain the code?
[16:39:30] pawnbox: has joined #ruby
[16:40:10] adaedra: ast>> puts "test"
[16:40:11] ruby[bot]: adaedra: I have parsed your code, the result is at https://eval.in/535441
[16:40:16] adaedra: hanmac: this?
[16:40:27] Hanmac: adaedra: yeah that is want i mean
[16:40:41] Hanmac: shevy: i tested it, and its only syntax sugar
[16:41:16] Guest13710: has joined #ruby
[16:42:15] dionysus69: has joined #ruby
[16:42:29] poerror: has joined #ruby
[16:44:50] Neo--: shevy: why u hate me?
[16:47:28] moos3: has joined #ruby
[16:47:48] uglybandersnatch: has joined #ruby
[16:47:59] felltir: has joined #ruby
[16:49:19] d0nn1e: has joined #ruby
[16:50:07] LiquidInsect: has joined #ruby
[16:55:50] yardenbar: has joined #ruby
[16:59:56] RegulationD: has joined #ruby
[16:59:59] sonOfRa: has joined #ruby
[17:01:57] Guest34101: has joined #ruby
[17:02:13] Guest38: has joined #ruby
[17:03:27] SCHAAP137: has joined #ruby
[17:03:43] SCHAAP137: has joined #ruby
[17:03:55] Guest13710: has joined #ruby
[17:04:16] fedexo: has joined #ruby
[17:04:38] shevy: Neo__ huh?
[17:04:48] shevy: hanmac yeah, really weird
[17:05:52] Neo--: just kiddin
[17:05:55] duckpuppy: has joined #ruby
[17:06:52] iwmrby: has joined #ruby
[17:06:55] Hanmac: shevy i think the only more weird thing is that alias works with $global variables oO
[17:07:25] rmulligan: has joined #ruby
[17:07:40] adgtl: has joined #ruby
[17:07:42] shevy: alias :foo :bar
[17:07:45] shevy: alias $foo $bar
[17:07:49] shevy: it all looks weird to me
[17:08:25] eregi: has joined #ruby
[17:08:40] Jet4Fire: has joined #ruby
[17:11:10] DoubleMalt: has joined #ruby
[17:11:57] Freeaqingme: has left #ruby: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[17:15:11] zeroDivisible: has joined #ruby
[17:16:02] poerror: has joined #ruby
[17:16:04] shunya: has joined #ruby
[17:16:11] dikaio: has joined #ruby
[17:16:27] jpfuentes2: has joined #ruby
[17:16:45] swein: has joined #ruby
[17:16:48] shevy: did this work in old ruby versions too?
[17:17:11] Hanmac: shevy: i think yes i think that already did work on 1.8 and below
[17:17:25] Hanmac: shevy checkout this:
[17:17:25] Hanmac: >> $x = 4; alias $y $x; $y = 5; $x
[17:17:26] ruby[bot]: hanmac: # => 5 (https://eval.in/535449)
[17:18:44] bronson: has joined #ruby
[17:21:17] statelesscode: has joined #ruby
[17:21:46] Neo--: has left #ruby: ()
[17:22:01] shevy: hanmac hmm
[17:22:04] edwinvdgraaf: has joined #ruby
[17:22:08] shevy: can you still invoke ruby[bot] with a specific ruby version?
[17:22:09] Channel6: has joined #ruby
[17:22:22] swein: has anyone created an IRC biot in ruby?
[17:22:36] havenwood: 10>> print 'hi shevy'
[17:22:37] ruby[bot]: havenwood: # => hi shevynil (https://eval.in/535451)
[17:23:25] swein: 10>> print '+k havenwood'
[17:24:51] Limix: has joined #ruby
[17:25:02] Hanmac: swein: the bot doesnt like the way you think and does not talk to you
[17:25:04] woodruffw: has joined #ruby
[17:25:34] woodruffw: has joined #ruby
[17:26:03] nettoweb: has joined #ruby
[17:27:21] freerobby: has joined #ruby
[17:29:56] mrgrieves: has joined #ruby
[17:30:04] eljimador: has joined #ruby
[17:30:04] sandstrom: has joined #ruby
[17:31:24] dionysus69: has joined #ruby
[17:34:57] symm-: has joined #ruby
[17:35:18] adgtl: has joined #ruby
[17:37:26] bjpenn: has joined #ruby
[17:37:35] jackjackdripper: has joined #ruby
[17:39:36] shevy: havenwood lol
[17:40:00] shevy: 1.8>> print 'hi'
[17:40:06] shevy: I hate the bot!
[17:41:15] merida_: has joined #ruby
[17:41:43] shanemcd: has left #ruby: ()
[17:42:57] b|ackwolf: why thos doesn't work? 'a,b,c,d'.split(',') { |char| puts char }
[17:44:40] mrgrieves: has joined #ruby
[17:45:16] tobiasvl: b|ackwolf: because split doesn't take a block as an argument?
[17:45:37] tobiasvl: b|ackwolf: 'a,b,c,d'.split(',').each { |char| puts char }
[17:45:41] shevy: b|ackwolf did you forget an .each
[17:46:25] Guest836: has left #ruby: ("twip")
[17:51:46] The_Phoenix: has joined #ruby
[17:51:54] b|ackwolf: tobiasvl, the argument list and the code block are separate
[17:52:05] tobiasvl: b|ackwolf: what do you mean?
[17:52:13] b|ackwolf: tobiasvl, am I wrong?
[17:52:22] tobiasvl: I don't know because I'm not sure what you mean
[17:52:41] tobiasvl: why did you think your first example would work exactly?
[17:52:54] Hanmac: b|ackwolf: puts does work without a block:
[17:52:54] Hanmac: >> puts 'a,b,c,d'.split(',')
[17:52:56] ruby[bot]: hanmac: # => a ...check link for more (https://eval.in/535466)
[17:53:04] musl: has joined #ruby
[17:53:24] b|ackwolf: tobiasvl, some methods are written so they’ll at least do something, whether you pass them a code block or not.
[17:53:50] fullofcaffeine: has joined #ruby
[17:54:07] tobiasvl: well... most methods do something, I agree with you there. some even take a block
[17:54:15] shevy: b|ackwolf yeah but every method can accept a block, it is like an extra argument. by default it will be ignored unless you use yield or .call via & syntax
[17:54:50] Jet4Fire: has joined #ruby
[17:54:52] alexherbo2: How get unicode value?
[17:55:08] alexherbo2: from ✓ to U2713
[17:55:31] Blaguvest: has joined #ruby
[17:55:34] Outlastsheep: has joined #ruby
[17:55:35] poerror: has joined #ruby
[17:55:43] skade: has joined #ruby
[17:56:11] tobiasvl: >> '✓'.ord.to_s(16)
[17:56:12] ruby[bot]: tobiasvl: # => "2713" (https://eval.in/535467)
[17:56:19] tobiasvl: alexherbo2: ^
[17:57:29] skade: has joined #ruby
[17:59:41] alexherbo2: tobiasvl: Thanks :O
[17:59:50] alexherbo2: What means 16?
[18:00:09] bluOxigen_: has joined #ruby
[18:00:20] tobiasvl: alexherbo2: it's the base. base 16 is hexadecimal
[18:00:25] havenwood: >> '2713'.hex
[18:00:26] ruby[bot]: havenwood: # => 10003 (https://eval.in/535468)
[18:00:39] havenwood: dtordable: hi
[18:00:42] dtordable: Iron Ruby is usable?
[18:00:51] dtordable: for devel in Windows, I mean
[18:00:53] havenwood: dtordable: It's not maintaind.
[18:01:02] havenwood: dtordable: afaik
[18:01:12] dtordable: installed Ruby Installer
[18:01:18] dtordable: from an exe
[18:01:19] rmulligan: has joined #ruby
[18:01:38] dtordable: did gem upgrade
[18:01:46] dtordable: Ruby 2.2 or so
[18:02:13] havenwood: dtordable: I think the RubyInstaller folk still recommend Ruby 2.1 32-bit but that should do.
[18:02:38] dtordable: havenwood: o learn the language serves :)
[18:02:44] havenwood: dtordable: (Just to be clear, we're now talking the reference implementation of Ruby, CRuby.)
[18:03:18] dtordable: that's matz ruby?
[18:04:03] havenwood: dtordable: Yeah, MRI (Matz' Ruby Interpreter) up to Ruby 1.8 was replaced with YARV (Yet Another Ruby VM) in Ruby 1.9.
[18:04:21] havenwood: dtordable: So CRuby went from an interpreter to a VM.
[18:04:32] Mutter: has joined #ruby
[18:04:35] dtordable: and what about jruby?
[18:04:37] havenwood: (Written by Koichi Sasada.)
[18:04:45] dtordable: plain to think in java for a moment
[18:05:01] havenwood: dtordable: JRuby is a top notch implementation of Ruby on the JVM.
[18:05:21] eljimmy: has joined #ruby
[18:05:23] dtordable: heard that got to be fast
[18:05:52] dtordable: and last question
[18:06:06] dtordable: a book in the language just for learn?
[18:06:24] dtordable: will buy it ASAP
[18:06:34] fexilal: www.railstutorial.org
[18:06:51] dtordable: fexilal: not talking about rails...
[18:07:15] dtordable: first the language
[18:07:24] dtordable: then thinking about rails, please
[18:07:25] havenwood: dtordable: http://ruby-community.com/pages/links
[18:07:27] fexilal: it's got ruby in it
[18:07:28] havenwood: dtordable: https://www.ruby-lang.org/en/documentation/
[18:07:50] fexilal: the official ruby docs are pretty good
[18:07:52] havenwood: dtordable: The Second Edition of the Well-Grounded Rubyist is a good overview.
[18:08:00] fexilal: much better than the jillion tutorial sites out there
[18:08:12] havenwood: Or the links on the Ruby Community or Ruby Documentation pages above.
[18:08:16] dtordable: need to sleep with a book
[18:08:55] havenwood: The Ruby Programming Language is good, but hasn't been updated in years. The Well-Grounded Rubyist got a fairly recent update for Ruby 2.
[18:09:15] morfin60: has joined #ruby
[18:09:22] dtordable: so after all what do I choose?
[18:09:43] fexilal: roll up yo sleeves and get coding
[18:10:03] dtordable: fexilal: I'm a bit shy about that lol
[18:10:20] havenwood: dtordable: The red-covered Well-Grounded Rubyist, second edition.
[18:10:37] havenwood: dtordable: Or start with the links above right away.
[18:10:37] dtordable: havenwood: from zero to code well is that?
[18:11:14] havenwood: dtordable: No, it more assumes you have some programming experience. A Ruby-based book that's recommended for beginners is Learn to Program by Chris Pine.
[18:11:22] tomphp: has joined #ruby
[18:11:25] havenwood: dtordable: https://pine.fm/LearnToProgram/
[18:12:08] havenwood: dtordable: Starting from scratch one could go from Learn to Program to the Well-Grounded Rubyist, in that order.
[18:12:29] fexilal: dtordable : I'm sure you know this already, but you can't learn to drive a car by reading a book .. same goes for writing code in Roobay
[18:12:46] bluOxigen: has joined #ruby
[18:12:49] havenwood: The Ruby Programming Language starts with a Sudoku solver. :)
[18:13:01] havenwood: The Sparrow.
[18:13:30] dtordable: there was another bookç
[18:13:37] dtordable: with minery cover or so
[18:13:49] havenwood: The Pickaxe
[18:14:03] akkad: has joined #ruby
[18:14:06] dtordable: have it on pdf already
[18:14:45] dtordable: let's say that I have amnesia, so programming skills are zero
[18:15:29] baweaver: has joined #ruby
[18:15:53] dtordable: so the Pickaxe is a good book then?
[18:15:58] fexilal: you're better of trying your best with your existing resources, instead of just keep on looking for that 'perfect book'
[18:16:14] dtordable: there is no perfect book
[18:16:32] dtordable: ACTION likes getting erratas from every book lol
[18:16:34] fexilal: 'good book' then
[18:16:47] dtordable: also fexilal :)
[18:17:56] vdamewood: has joined #ruby
[18:18:01] bjpenn: has joined #ruby
[18:19:30] The_Phoenix1: has joined #ruby
[18:20:02] SenpaiSilver: has joined #ruby
[18:22:16] j416: has left #ruby: ("o/")
[18:23:57] ljames: what could cause $m[i] to not get updated with the map's value, while l is assigned the correct, non-nul, non-empty array value? in this example: m={}; l = $m[i] =|| x.map{|a| something.new(*a)}
[18:24:35] havenwood: ljames: $m or m? gist a paste of the code?
[18:25:21] ljames: erm, I meant $m = {}
[18:25:57] ljames: for some reason when I run it, l has the right value, but $m[i] becomes []
[18:26:25] ljames: program works fine if I just remove the caching part with = $m[i] =||
[18:28:06] blackmesa: has joined #ruby
[18:28:19] ljames: in other cases where I just have a = $cache[i] = func(...), it works fine, but for some reason the .map breaks it, I'm thinking I typo'd something somewhere, or some syntax weirdness
[18:28:54] thegunbuster: has joined #ruby
[18:28:54] dtordable: havenwood: bought the pickaxe :)
[18:29:54] dtordable: this is the best buy did in my life
[18:30:46] dikaio: has joined #ruby
[18:30:46] ramfjord: has joined #ruby
[18:31:02] Hanmac: ljames: map does return a new Hash/Array, i think you want map!
[18:32:05] ljames: but I don't want to modify the value of x, basically I have x = [1,2,3], and I want an array like [SomeObj.new(1),SomeObj.new(2),SomeObj.new(3)]?
[18:32:15] ljames: and I want that array stored in $m[i]
[18:32:30] bjpenn: has joined #ruby
[18:32:32] thegunbuster: hey, I'm trying to write a C extension. The build succeeds and I have by .so object which loads alright when I step into IRB / Pry.
[18:32:56] thegunbuster: But it fails with "ruby: symbol lookup error: /home/ubuntu/workspace/pcg_random/lib/pcg_random/pcg_random.so: undefined symbol: entropy_getbytes"
[18:33:11] thegunbuster: when I try to access a module function I just defined
[18:33:31] thegunbuster: Is it because I'm linking it wrong ?
[18:33:48] pwnd_nsfw: who knows without code
[18:33:52] thegunbuster: I'm sorry. I have very limited experience with building C beyond single file programs
[18:33:58] thegunbuster: sure, I can give that
[18:34:17] thegunbuster: Here: https://github.com/vaibhav-y/pcg-random
[18:34:22] User458764: has joined #ruby
[18:34:35] dtordable: thegunbuster: build every .c then link them together. References are resolved
[18:34:52] dtordable: in case of missing something linker will say
[18:34:59] thegunbuster: does mkmf not take care of that ?
[18:35:15] dtordable: thegunbuster: ask that to #gcc :)
[18:35:18] thegunbuster: I don't get any linking errors
[18:35:33] thegunbuster: when I try to run it in IRB / PRy
[18:35:49] thegunbuster: I get that message. as if it never even included my include/entropy.h
[18:36:07] thegunbuster: this is the main file: https://github.com/vaibhav-y/pcg-random/blob/master/ext/pcg_random/pcg_random.c
[18:36:33] thegunbuster: And this is file which I suspect never shows up: https://github.com/vaibhav-y/pcg-random/blob/master/ext/pcg_random/include/entropy.h
[18:36:54] thegunbuster: It's a "ruby: symbol lookup error" at Runtime
[18:39:35] WizJin: has joined #ruby
[18:39:38] tomphp: has joined #ruby
[18:43:17] S1kx: has joined #ruby
[18:43:38] poerror: has joined #ruby
[18:43:47] fullofcaffeine: has joined #ruby
[18:46:45] Rubie: has joined #ruby
[18:47:06] rkoller: has joined #ruby
[18:47:42] bjpenn: has joined #ruby
[18:48:56] edwinvdgraaf: has joined #ruby
[18:51:56] dikaio: has joined #ruby
[18:52:35] `tim`: has joined #ruby
[18:52:51] slackbotgz: has joined #ruby
[18:53:10] quaristice: has joined #ruby
[18:55:24] rmulligan: has joined #ruby
[18:56:31] eregi: has joined #ruby
[18:57:15] The_Phoenix: has joined #ruby
[18:57:43] Guest13710: has joined #ruby
[18:59:15] finisherr: has joined #ruby
[19:00:37] finisherr: has left #ruby: ()
[19:01:22] The_Phoenix1: has joined #ruby
[19:01:43] blackmesa: has joined #ruby
[19:02:17] bjpenn: has joined #ruby
[19:02:31] ohaibbq: has joined #ruby
[19:02:40] vikaton: has joined #ruby
[19:02:49] morfin60: has joined #ruby
[19:02:56] futilegames: has joined #ruby
[19:04:44] fourq: has joined #ruby
[19:05:14] mostlybadfly: has joined #ruby
[19:06:29] _blizzy_: has joined #ruby
[19:07:04] intrigueD: has joined #ruby
[19:07:57] Cohedrin: has joined #ruby
[19:08:04] firstdayonthejob: has joined #ruby
[19:08:16] dionysus69: has joined #ruby
[19:08:30] The_Phoenix: has joined #ruby
[19:10:12] floatingpoint: has joined #ruby
[19:10:31] The_Phoenix: has joined #ruby
[19:10:39] fschuindt: has joined #ruby
[19:11:28] davee_: has joined #ruby
[19:12:40] The_Phoenix: has joined #ruby
[19:13:03] fschuindt: There's any other free Ruby Interpreter service like the hackerearth.com or repl.it? Or a gem that eval ruby safely, like a virtual machine; Once $SAFE = 4 is deprecated.
[19:14:26] The_Phoenix1: has joined #ruby
[19:14:57] User458764: has joined #ruby
[19:16:15] The_Phoenix1: has joined #ruby
[19:16:19] thegunbuster: Make a workspace (VM) and do what you wish
[19:16:58] thegunbuster: has left #ruby: ()
[19:17:45] The_Phoenix1: has joined #ruby
[19:19:18] The_Phoenix: has joined #ruby
[19:20:43] bronson: has joined #ruby
[19:20:51] floatingpoint: has joined #ruby
[19:21:51] Vingador: has joined #ruby
[19:24:01] Guest34101: has joined #ruby
[19:26:00] eregi: has joined #ruby
[19:27:22] ljames: hanmac, I ended up figuring out what the bug was. I was .pop'ing from that array afterwards without realizing the cache was being modified too, and that's why I ended up with empty arrays at the end. doing a = a.dup, solved the problem
[19:30:11] tomatoes: has joined #ruby
[19:31:56] bjpenn: has joined #ruby
[19:34:35] WizJin: has joined #ruby
[19:35:58] crackerjacktown: has joined #ruby
[19:37:25] roshanavand: has joined #ruby
[19:38:41] JohnBat26: has joined #ruby
[19:38:50] dikaio: has joined #ruby
[19:41:28] camilasan: has joined #ruby
[19:41:48] Guest13710: has joined #ruby
[19:42:10] darkf: has joined #ruby
[19:44:17] ariel_17: has joined #ruby
[19:45:14] JohnBat26: has joined #ruby
[19:47:33] BTRE: has joined #ruby
[19:49:30] rmulligan: has joined #ruby
[19:49:59] gbgdev: has joined #ruby
[19:50:36] yqt: has joined #ruby
[19:52:09] safe: has joined #ruby
[19:52:34] LoneHermit: has joined #ruby
[19:53:08] Dimik: has joined #ruby
[19:54:12] dikaio: has joined #ruby
[19:58:09] dopamean_: has joined #ruby
[19:58:20] kspencer: has joined #ruby
[19:59:15] n008f4g_: has joined #ruby
[20:00:56] Spami: has joined #ruby
[20:01:33] bjpenn: has joined #ruby
[20:02:36] huyderman: has joined #ruby
[20:02:43] jamil: has joined #ruby
[20:02:45] JohnBat26: has joined #ruby
[20:03:06] bry4n_: has joined #ruby
[20:05:48] Guest13710: has joined #ruby
[20:07:49] LoneHerm_: has joined #ruby
[20:08:36] poerror: has joined #ruby
[20:12:55] PaulCapestany: has joined #ruby
[20:14:35] LoneHerm_: has joined #ruby
[20:16:24] AlexRussia: has joined #ruby
[20:20:25] jyaworski: has joined #ruby
[20:24:32] Stany: has joined #ruby
[20:25:13] lictor36: has joined #ruby
[20:25:24] arlek: has joined #ruby
[20:25:30] DmitryBochkarev: has joined #ruby
[20:27:31] bry4n: has joined #ruby
[20:28:09] chagel: has joined #ruby
[20:28:34] elifoster: has joined #ruby
[20:29:54] gregf: has joined #ruby
[20:30:17] nando293921: has joined #ruby
[20:31:50] LoneHerm_: has joined #ruby
[20:34:06] Abrin_AWAY: has joined #ruby
[20:34:12] djbkd: has joined #ruby
[20:34:49] rmulligan: has joined #ruby
[20:38:40] bronson: has joined #ruby
[20:39:43] hololeap: has joined #ruby
[20:40:19] hololeap: does the frozen_string_literal header need to be set on every ruby file where i want that to be enabled, or just the first ruby file that is loaded?
[20:41:24] adaedra: Everyone, I think. So you can progressively migrate a big project if you want to.
[20:47:45] JohnBat26: has joined #ruby
[20:49:18] Guest34101: has joined #ruby
[20:49:43] uglybandersnatch: has joined #ruby
[20:50:54] shredding: has joined #ruby
[20:51:35] dtordable: has joined #ruby
[20:52:14] ohaibbq: has joined #ruby
[20:53:47] poerror: has joined #ruby
[20:56:21] hololeap: it looks like its per-file
[20:56:59] SCHAAP137: has joined #ruby
[20:57:58] unreal_: has joined #ruby
[21:00:24] dikaio: has joined #ruby
[21:00:54] tomphp: has joined #ruby
[21:01:14] jyaworski: has joined #ruby
[21:04:25] mrgrieves: has joined #ruby
[21:05:31] Guest13710: has joined #ruby
[21:06:09] Xeago: has joined #ruby
[21:07:02] devbug: has joined #ruby
[21:07:24] duckpuppy: has joined #ruby
[21:11:19] dsuper7: has joined #ruby
[21:11:20] dikaio: has joined #ruby
[21:11:57] LoneHermit: has joined #ruby
[21:12:46] malconis: has joined #ruby
[21:16:47] htmldrum: has joined #ruby
[21:20:04] crackerjacktown: has joined #ruby
[21:20:47] dikaio: has joined #ruby
[21:21:51] _grill: has joined #ruby
[21:22:08] _grill: what's the easiest way to move all diles and directories WITHIN a directory to another directory?
[21:24:15] skydiver_: has joined #ruby
[21:27:11] poerror: has joined #ruby
[21:31:19] tobiasvl: _grill: http://ruby-doc.org/stdlib-1.9.3/libdoc/fileutils/rdoc/FileUtils.html#method-c-mv
[21:31:45] _grill: wait a second
[21:32:06] _grill: are you telling me there's documentation for ruby? like, all of these methods are documented?
[21:32:24] _grill: this is nuts! a language with documentation? this is next level shit!
[21:32:45] tobiasvl: haha. yes it is quite a revolution
[21:33:27] _grill: i've already read the documentation. it doesn't address how to move files within directories to another file. I need to do something like mv /some/dir/* /some/other/dir/
[21:35:09] LoneHerm_: has joined #ruby
[21:35:19] tobiasvl: did this not work? FileUtils.mv Dir.glob('/some/dir/*'), '/some/other/dir'
[21:36:13] dsuper7: has joined #ruby
[21:38:41] dsuper7: has joined #ruby
[21:40:02] dn5: has joined #ruby
[21:41:08] SCHAAP137: has joined #ruby
[21:41:09] SCHAAP137: has joined #ruby
[21:41:24] postmodern: has joined #ruby
[21:43:08] guardian: has joined #ruby
[21:43:37] dikaio: has joined #ruby
[21:45:04] huyderman: has joined #ruby
[21:45:24] cdg: has joined #ruby
[21:46:39] _grill: looks like that might work
[21:46:45] shevy: are you not entertained!
[21:46:47] _grill: but won't that glob pattern miss some stuff?
[21:47:02] tobiasvl: _grill: no idea, you were the one who wrote it
[21:47:11] mistermocha: has joined #ruby
[21:47:14] _grill: I *think* it needs ot be **/*
[21:47:26] manveru: if you move a directory, it moves its contents too
[21:47:36] _grill: i just want to move the contents
[21:47:52] manveru: without making new directories?
[21:48:06] _grill: no. the directories already exist
[21:48:22] manveru: what about hidden files?
[21:48:37] _grill: i want to move EVERYTHING.gif
[21:48:54] manveru: well, * doesn't find those
[21:48:58] _grill: oh wait, no. that's EVERYONE.gif
[21:49:26] _grill: https://www.youtube.com/watch?v=MrTsuvykUZk
[21:49:39] _grill: ok, but **/* will, right?
[21:50:06] tobiasvl: **/* will descend into all subdirectories, yes
[21:50:18] tobiasvl: so **/*.gif then I guess
[21:50:20] _grill: and it'd get the hidden files?
[21:50:47] manveru: more like '{.,}**/{.,}*'
[21:50:58] tobiasvl: or pass File::FNM_DOTMATCH
[21:51:15] manveru: so it'd work on windows too :)
[21:53:37] gizless: has joined #ruby
[21:54:16] bronson: has joined #ruby
[21:54:38] nettoweb: has joined #ruby
[21:55:35] _grill: that doesn't work because the directory where the files need to be moved to already exists
[21:56:32] manveru: well, it might not be sexy, but you can always use glob{|path|} and do it one by one
[21:56:45] tobiasvl: add a trailing slash?
[21:56:49] tobiasvl: if you used my example
[21:57:28] tobiasvl: to the destination dir, that is
[21:57:59] idletask: has joined #ruby
[21:59:07] Ox0dea: has joined #ruby
[22:01:46] _grill: tobiasvl the weird part is, I did add a trailing slash
[22:01:49] rmulligan: has joined #ruby
[22:02:07] roshanavand: has joined #ruby
[22:02:12] moeabdol: has joined #ruby
[22:03:45] bry4n_: has joined #ruby
[22:03:54] n008f4g_: has joined #ruby
[22:04:23] dikaio: has joined #ruby
[22:04:52] intrigueD: has joined #ruby
[22:10:55] SaintAardvark: has joined #ruby
[22:11:28] nofxx: has joined #ruby
[22:11:28] nofxx: has joined #ruby
[22:17:11] pawnbox: has joined #ruby
[22:19:02] myntcake: has joined #ruby
[22:19:38] mistermo_: has joined #ruby
[22:21:41] mistermo_: has joined #ruby
[22:26:03] MuffinPimp: has joined #ruby
[22:27:46] ramfjord: has joined #ruby
[22:27:50] symm-: has joined #ruby
[22:29:48] Musashi007: has joined #ruby
[22:33:52] A124: has joined #ruby
[22:35:11] swills: has joined #ruby
[22:35:30] shevy: _grill you could also do a recursive copy via FileUtils.cp_r and remove the start directory lateron - that's sorta equivalent to a move action :>
[22:37:05] al2o3-cr: I believe you can add source/. if you don't want to copy the dir itself
[22:37:52] al2o3-cr: but i maybe wrong
[22:39:17] BSaboia: has joined #ruby
[22:39:30] last_staff: has joined #ruby
[22:39:34] dikaio: has joined #ruby
[22:40:37] AlexRussia: has joined #ruby
[22:40:38] zenlot: has joined #ruby
[22:41:07] _grill: what's the best way to copy a directory's attributes to another directoy
[22:48:46] pwnd_nsfw: has joined #ruby
[22:49:02] sandstrom: has joined #ruby
[22:49:32] Azure: has joined #ruby
[22:52:42] htmldrum: has joined #ruby
[22:55:44] djbkd: has joined #ruby
[22:55:46] dikaio: has joined #ruby
[22:55:56] rmulligan: has joined #ruby
[22:56:34] BtcBen: has joined #ruby
[23:00:29] solocshaw: has joined #ruby
[23:03:16] al2o3-cr: has joined #ruby
[23:04:28] moos3: has joined #ruby
[23:04:51] Ox0dea: This man needs mouth-to-mouth resuscitation!
[23:08:11] duckpuppy: has joined #ruby
[23:08:17] tekk: has joined #ruby
[23:11:14] j0n3: has joined #ruby
[23:13:51] dikaio: has joined #ruby
[23:14:03] tjohnson: has joined #ruby
[23:15:36] SCHAAP137: has joined #ruby
[23:18:26] nettoweb: has joined #ruby
[23:18:45] roger_rabbit: has joined #ruby
[23:19:03] roger_rabbit: has joined #ruby
[23:21:42] Don_John: has joined #ruby
[23:23:11] blackmesa: has joined #ruby
[23:23:12] hxegon: has joined #ruby
[23:24:40] tomphp: has joined #ruby
[23:25:06] dikaio: has joined #ruby
[23:29:16] dnewkerk: has joined #ruby
[23:29:55] rmulligan: has joined #ruby
[23:31:43] mallu: has joined #ruby
[23:32:05] bjpenn: has joined #ruby
[23:32:19] mallu: has joined #ruby
[23:35:50] dikaio: has joined #ruby
[23:40:45] dikaio: has joined #ruby
[23:40:58] Ox0dea: shevy: How do you have String#last?
[23:42:35] edwinvdgraaf: has joined #ruby
[23:42:51] djbkd: has joined #ruby
[23:45:45] dikaio: has joined #ruby
[23:46:37] tvon: has joined #ruby
[23:47:26] toretore: has joined #ruby
[23:47:45] s00pcan_: has joined #ruby
[23:51:46] fullofcaffeine: has joined #ruby
[23:52:26] Cohedrin_: has joined #ruby
[23:52:58] anton1x: has joined #ruby
[23:53:08] davee_: has joined #ruby
[23:53:32] sandstrom: has joined #ruby
[23:54:49] bronson: has joined #ruby
[23:55:36] quazimodo: has joined #ruby
[23:56:48] sandstrom: has joined #ruby
[23:58:20] djbkd: has joined #ruby