« Back to channel list

#ruby - 11 April 2016

« Back 1 day Forward 1 day »
[00:02:20] diegoaguilar: has joined #ruby
[00:05:27] stupidystupid: has joined #ruby
[00:06:03] darkf: has joined #ruby
[00:07:03] Suntzu: has joined #ruby
[00:10:20] kung: has joined #ruby
[00:13:51] duckpuppy: has joined #ruby
[00:15:37] flashpoint9: has joined #ruby
[00:16:02] Rubie: has joined #ruby
[00:17:10] pawnbox: has joined #ruby
[00:18:22] Nawn: has joined #ruby
[00:20:12] duckpuppy: has joined #ruby
[00:20:15] rahult_: has joined #ruby
[00:21:34] karapetyan: has joined #ruby
[00:22:31] nettoweb: has joined #ruby
[00:23:43] tAn: has joined #ruby
[00:24:10] bb010g: has joined #ruby
[00:32:13] RahulT: has joined #ruby
[00:33:23] RyanMcCoskrie: has joined #ruby
[00:38:33] xcesariox: has joined #ruby
[00:42:24] ur5us: has joined #ruby
[00:46:12] stupidystupid: has joined #ruby
[00:47:31] sarbs: has joined #ruby
[00:48:10] stupidystupid: has joined #ruby
[00:52:29] dc4: has joined #ruby
[00:52:43] stupidystupid: has joined #ruby
[00:52:54] william3: has joined #ruby
[00:53:35] kung_: has joined #ruby
[00:54:06] idletask: has joined #ruby
[00:54:10] cpup: has joined #ruby
[00:54:19] hakunin: has joined #ruby
[00:54:48] stupidys_: has joined #ruby
[00:55:55] AckZ: has joined #ruby
[01:01:21] IrishGringo: has joined #ruby
[01:02:00] Xeago: has joined #ruby
[01:06:43] pawnbox: has joined #ruby
[01:08:59] baweaver: has joined #ruby
[01:14:09] stupidys_: has joined #ruby
[01:14:26] nettoweb: has joined #ruby
[01:15:21] EdwardIII: has joined #ruby
[01:17:36] freerobby: has joined #ruby
[01:18:56] skweek: has joined #ruby
[01:21:33] chosen1_: has joined #ruby
[01:21:54] stupidys_: has joined #ruby
[01:22:39] ekinmur: has joined #ruby
[01:23:38] arlek: has joined #ruby
[01:23:56] eljimbo: has joined #ruby
[01:24:13] bronson: has joined #ruby
[01:25:13] yfeldblum: has joined #ruby
[01:26:18] finisherr: has joined #ruby
[01:28:48] tristanp: has joined #ruby
[01:29:11] stupidystupid: has joined #ruby
[01:29:26] stupidys_: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[01:32:00] william3: has joined #ruby
[01:35:09] kung_: is their some nicer way to get the port of a socket? like someSocket.port, instead of someSocket.addr[1] (magic number stuff)
[01:41:56] flashpoint9: has joined #ruby
[01:41:56] ramortegui: has joined #ruby
[01:46:46] pawnbox: has joined #ruby
[01:48:43] chosen1x: has joined #ruby
[01:52:23] djbkd: has joined #ruby
[01:56:16] eskatonic: has joined #ruby
[01:57:37] Cooooo: has joined #ruby
[02:01:02] Rubie: has joined #ruby
[02:01:13] nhhc: has joined #ruby
[02:01:44] mistermocha: has joined #ruby
[02:02:25] arescorpio: has joined #ruby
[02:03:17] rht: has joined #ruby
[02:04:58] najam: has joined #ruby
[02:05:07] A124: has joined #ruby
[02:07:01] finisherr: has joined #ruby
[02:07:06] william3: has joined #ruby
[02:08:11] najam: has joined #ruby
[02:10:05] ramortegui: has joined #ruby
[02:10:26] karapetyan: has joined #ruby
[02:10:31] rahult_: has joined #ruby
[02:11:14] duderonomy: has joined #ruby
[02:11:29] shevy: kung_ don't think so but if you dislike the API, perhaps you can suggest a better one to the ruby core team at: https://bugs.ruby-lang.org/projects/ruby-trunk
[02:12:31] baweaver: has joined #ruby
[02:12:48] kung_: shevy, nah thanks, im happy when I get my little udp proxy working :D
[02:12:55] kung_: (first time using ruby)
[02:14:09] chagel: has joined #ruby
[02:14:27] ekinmur: has joined #ruby
[02:16:50] pawnbox: has joined #ruby
[02:17:10] BTRE: has joined #ruby
[02:21:35] dfockler: has joined #ruby
[02:24:13] adgtl: has joined #ruby
[02:24:13] adgtl: has joined #ruby
[02:24:57] tAn: has joined #ruby
[02:26:31] Contigi: has joined #ruby
[02:29:37] najam: has joined #ruby
[02:31:31] noService: has joined #ruby
[02:32:28] nettoweb: has joined #ruby
[02:34:11] rbennacer: has joined #ruby
[02:36:50] ur5us: has joined #ruby
[02:38:20] bronson: has joined #ruby
[02:38:27] nando293921: has joined #ruby
[02:41:02] Suntzu: has joined #ruby
[02:42:20] william3: has joined #ruby
[02:46:27] ur5us: has joined #ruby
[02:46:54] pawnbox: has joined #ruby
[02:47:07] diego1: has joined #ruby
[02:47:08] CloCkWeRX: has joined #ruby
[02:47:35] diego1: has joined #ruby
[02:52:26] LoneHerm_: has joined #ruby
[02:55:18] kung_: there is no windows .exe download installer? oO
[02:55:37] kung_: https://www.ruby-lang.org/de/downloads/
[02:55:43] kung_: just links to the sourcecode lol
[02:55:48] kung_: and to the license
[02:56:03] s00pcan: has joined #ruby
[02:56:32] kung_: aha i had to follow three links
[02:56:39] kung_: to get to the rubyinstaller
[02:56:55] kung_: > wondering why ruby isnt used by more ppl
[03:01:00] bougyman: it's too easy
[03:01:08] bougyman: many people prefer Hard
[03:05:06] mr_roboto: has joined #ruby
[03:05:48] elifoster: has joined #ruby
[03:07:34] shayan: has joined #ruby
[03:07:42] Chagel_: has joined #ruby
[03:08:07] PaulCapestany: has joined #ruby
[03:12:34] william3: has joined #ruby
[03:14:11] crameth: has joined #ruby
[03:14:16] goodroot: has joined #ruby
[03:14:32] kadoppe: has joined #ruby
[03:15:37] shayan: “Write a method that will take a string as input, and return a new string with the same letters in reverse order.”
[03:15:39] shayan: I am very new to programming and have difficulty trying to solve this. Any guidance towards solving this would be immensely appreciated.
[03:16:17] cryptomancer: has joined #ruby
[03:17:03] goodroot: has joined #ruby
[03:17:41] braincras: has joined #ruby
[03:18:20] Radar: shayan: Does Ruby have a reverse method?
[03:18:57] astrobunny: has joined #ruby
[03:19:17] shayan: @Radar: I suppose, however, I have been told “Don't use String's reverse method; that would be too simple.”
[03:19:38] Radar: indeed it would be too simple.
[03:20:41] Ox0dea: shayan: How do you reverse a string of length fewer than 2?
[03:21:55] shayan: idx = ab - 1
[03:22:01] stupidys_: has joined #ruby
[03:22:32] shayan: idx = ab.length - 1
[03:22:33] shayan: while idx >= 0
[03:22:34] shayan: puts(ab[idx])
[03:22:35] shayan: idx = idx - 1
[03:22:56] shayan: Hmm. My apologies.
[03:23:37] Jameser: has joined #ruby
[03:26:00] Ox0dea: shayan: You can do it "the C way" by iterating from 0 up to half the length of the string, swapping the characters at `i` and `size - i - 1` as you go, but that's pretty inelegant.
[03:26:22] mr_roboto: has joined #ruby
[03:26:29] gix: has joined #ruby
[03:26:32] Ox0dea: A nifty recursive solution presents itself, with the base case being that reversing a string of length fewer than 2 is a no-op.
[03:28:47] A124: has joined #ruby
[03:29:57] RegulationD: has joined #ruby
[03:30:43] mr_roboto: has joined #ruby
[03:34:11] stupidystupid: has joined #ruby
[03:36:22] postmodern: has joined #ruby
[03:39:50] RahulT: has joined #ruby
[03:43:04] Channel6: has joined #ruby
[03:43:09] idletask: has joined #ruby
[03:44:41] william3: has joined #ruby
[03:45:29] nofxx: has joined #ruby
[03:52:23] noService: has joined #ruby
[03:53:57] kobain: has joined #ruby
[03:57:21] gooodroot: has joined #ruby
[03:57:41] hinbody: has joined #ruby
[03:58:47] baweaver: has joined #ruby
[03:58:52] pawnbox: has joined #ruby
[03:59:01] treaki_: has joined #ruby
[04:02:34] goooodroot: has joined #ruby
[04:07:59] kareeoleez: has joined #ruby
[04:08:12] mistermocha: has joined #ruby
[04:11:40] sandelius: has joined #ruby
[04:11:48] gooooodroot: has joined #ruby
[04:17:29] CloCkWeRX: has joined #ruby
[04:17:52] rkazak: has joined #ruby
[04:19:31] snoobydoo: has joined #ruby
[04:20:02] goodroot: has joined #ruby
[04:23:04] devbug: has joined #ruby
[04:26:32] skweek: has joined #ruby
[04:33:54] nhhc: has joined #ruby
[04:34:01] blackwell: has joined #ruby
[04:37:53] IrishGringo: has joined #ruby
[04:38:46] rbennacer: has joined #ruby
[04:39:34] rbennacer: has joined #ruby
[04:40:24] rbennacer: has joined #ruby
[04:41:12] rbennacer: has joined #ruby
[04:44:48] Devalo: has joined #ruby
[04:48:44] hk238: has joined #ruby
[04:49:01] mhenrixon: has joined #ruby
[05:01:48] krz: has joined #ruby
[05:03:49] postmodern: has joined #ruby
[05:03:58] snoobydo1: has joined #ruby
[05:05:57] tonini: has joined #ruby
[05:07:29] pawnbox_: has joined #ruby
[05:08:02] william3: has joined #ruby
[05:12:55] p0p0pre7: has joined #ruby
[05:14:42] bruno-: has joined #ruby
[05:15:43] paradisaeidae_: has joined #ruby
[05:15:53] djbkd: has joined #ruby
[05:17:16] gooodroot: has joined #ruby
[05:17:56] ctarx: has joined #ruby
[05:20:07] merida: has joined #ruby
[05:21:33] rolha: has joined #ruby
[05:21:51] bronson: has joined #ruby
[05:22:01] raeoks: has joined #ruby
[05:24:57] djbkd: has joined #ruby
[05:25:52] mistermocha: has joined #ruby
[05:28:14] mistermocha: has joined #ruby
[05:29:32] william3: has joined #ruby
[05:32:06] p0p0pre7: has joined #ruby
[05:34:59] chagel: has joined #ruby
[05:35:10] idefine: has joined #ruby
[05:38:38] paradisaeidae: has joined #ruby
[05:38:49] LoneHerm_: has joined #ruby
[05:40:32] raeoks: has joined #ruby
[05:41:11] codecop: has joined #ruby
[05:42:04] dionysus69: has joined #ruby
[05:42:54] nanoz: has joined #ruby
[05:43:20] tmtwd_: has joined #ruby
[05:43:24] diegoaguilar: has joined #ruby
[05:44:45] chagel: has joined #ruby
[05:44:56] kadoppe: has joined #ruby
[05:44:58] astrobunny: has joined #ruby
[05:45:49] rbennacer: has joined #ruby
[05:47:27] sandelius: has joined #ruby
[05:49:07] william3: has joined #ruby
[05:49:46] norc: has joined #ruby
[05:50:38] Chagel_: has joined #ruby
[05:50:44] norc: Good morning #ruby.
[05:50:56] mr_roboto: has joined #ruby
[05:51:11] Ropeney: good afternoon norc
[05:52:22] pawnbox: has joined #ruby
[05:52:34] merida: has joined #ruby
[05:55:53] NightMonkey: has joined #ruby
[05:56:19] Ox0dea: norc: Do you reckon it'd be okay to just shove "VALUE" into `types` here? https://git.io/vVHxN
[05:56:28] flashpoint9: has joined #ruby
[05:57:44] zapata: has joined #ruby
[05:59:42] rbennacer: has joined #ruby
[05:59:56] norc: Ox0dea: Don't see why not.
[06:00:26] futilegames: has joined #ruby
[06:01:45] norc: Ox0dea: Though if INT is among these types that would be a bit moot.
[06:02:20] Ox0dea: norc: How's that?
[06:02:40] rkazak: has joined #ruby
[06:03:51] RahulT: has joined #ruby
[06:03:57] edwinvdgraaf: has joined #ruby
[06:04:52] norc: Ox0dea: Strike that, wrong thought entered my head.
[06:07:50] bluOxigen: has joined #ruby
[06:09:30] chouhoulis: has joined #ruby
[06:10:05] kareeoleez: has joined #ruby
[06:13:51] rbennacer: has joined #ruby
[06:14:27] william3: has joined #ruby
[06:15:50] kareeole_: has joined #ruby
[06:16:43] bruno-: has joined #ruby
[06:17:46] x77686d: has joined #ruby
[06:20:16] bluOxigen: has left #ruby: ()
[06:20:54] Dimik: has joined #ruby
[06:21:23] aganov: has joined #ruby
[06:22:55] Sammichmaker: has joined #ruby
[06:23:52] tAn: has joined #ruby
[06:26:43] arup_r: has joined #ruby
[06:27:07] last_staff: has joined #ruby
[06:28:48] aufi: has joined #ruby
[06:29:09] LoneHermit: has joined #ruby
[06:30:01] solars: has joined #ruby
[06:36:38] arup_r: Hi, I am writing a code to read the output of the command `last`, and then do some analysis on this. Like print how many times a user logged in, number of logins per day etc. So, I see how can I capture the output of the `last` command using http://ruby-doc.org/core-2.3.0/IO.html#method-c-popen. Then I am thinking to split each line on whitespace, but date output itself has whitespace, so splitting it on whitespace is not seems like a good idea.
[06:36:38] arup_r: Because date will be splitted. So any more control way to read this shell command output?
[06:39:07] arup_r: 1 min let me show 1 ouput.
[06:39:24] CausaMortis: has joined #ruby
[06:40:42] arup_r: https://gist.github.com/aruprakshit/26209f242e146d232b8877a8f1c4c0c1 is small code I have now.. So what I want to know from you, how should I split the data, so that I can build the report correctly.
[06:41:01] arup_r: let me know if my question is not clear.
[06:41:32] PedramT: has joined #ruby
[06:42:41] william3: has joined #ruby
[06:45:34] sergey_makagon: has joined #ruby
[06:46:47] karapetyan: has joined #ruby
[06:47:41] Ox0dea: arup_r: I'd recommend using `last -R` to drop the hostname column, which makes parsing it as easy as `line.split(/ +/, 3)`.
[06:48:03] mozzarella: arup_r: what about using "last --time-format=iso"?
[06:48:27] bmf: has joined #ruby
[06:48:40] arup_r: ok. I didn't know the options you are saying. Let me run them first and see. how they look like.
[06:49:16] arup_r: I want to build a report for *Frequency of Usernames:*, *Frequency of IP Addresses:*, *Number of logins per day:*..
[06:49:31] saltsa_: arup_r: or just join the fields? The first username, 2nd tty, 3rd day, 4th month, 5th time, 6th- status
[06:49:42] arup_r: so if I am able to parse these data, is enough,. rest I don't need
[06:49:51] rbennacer: has joined #ruby
[06:50:06] madgen: has joined #ruby
[06:50:33] dn`: has joined #ruby
[06:50:46] arup_r: if run arup@ror ~ $ last --time-format=iso gives error as "last: illegal option -- -" .. I am osX .. do I need some extra settings?
[06:51:02] saltsa_: arup_r: like this: p line.first.split()[6..-1].join(" ")
[06:54:37] vdamewood: has joined #ruby
[06:55:02] rbennacer: has joined #ruby
[06:57:40] andikr: has joined #ruby
[06:57:45] vdamewood: has joined #ruby
[06:58:45] arup_r: I did `man last` and it don't support the options mozzarella and Ox0dea said. :/
[07:02:16] TomyWork: has joined #ruby
[07:02:19] Ox0dea: arup_r: Well, the fields are always separated by at least two spaces. It's a shame you can't set the delimiter, but that should help.
[07:02:37] Ox0dea: String#split supports an optional second argument that tells it when to stop splitting, and that might come in handy as well.
[07:03:14] pawnbox: has joined #ruby
[07:03:44] Ox0dea: As long as all your entries have the same number of columns, that should suffice.
[07:04:09] rbennacer: has joined #ruby
[07:04:13] Ox0dea: `who, where, ip, date = line.split(/ +/, 4)` or some such.
[07:04:56] biberu: has joined #ruby
[07:05:18] ur5us: has joined #ruby
[07:05:19] arup_r: ok. I am checking how can I enable the all options with `last`. Otherwise, how would I test the code.
[07:07:50] agent_white: has joined #ruby
[07:08:37] PedramT: has joined #ruby
[07:09:45] SCHAAP137: has joined #ruby
[07:09:57] jxs_: has joined #ruby
[07:10:13] clauswitt: has joined #ruby
[07:10:59] pandaant: has joined #ruby
[07:11:37] chouhoulis: has joined #ruby
[07:13:23] rbennacer: has joined #ruby
[07:14:37] clauswitt: has joined #ruby
[07:14:56] raeoks: has joined #ruby
[07:16:19] mark3: has joined #ruby
[07:17:51] the_drow: has joined #ruby
[07:18:14] bruno-: has joined #ruby
[07:20:53] anisha: has joined #ruby
[07:22:40] futilegames: has joined #ruby
[07:23:44] PedramT: has joined #ruby
[07:24:38] valetudo: has joined #ruby
[07:26:27] PedramT: has joined #ruby
[07:27:09] rbennacer: has joined #ruby
[07:27:46] antgel: has joined #ruby
[07:29:18] PedramT: has joined #ruby
[07:31:17] flughafen: has joined #ruby
[07:31:26] RegulationD: has joined #ruby
[07:31:32] blackms: has joined #ruby
[07:32:53] kits: has joined #ruby
[07:33:10] neanderslob_: has joined #ruby
[07:33:22] Macaveli: has joined #ruby
[07:33:44] mikecmpbll: has joined #ruby
[07:34:02] petertretyakov: has joined #ruby
[07:34:06] Suntzu: has joined #ruby
[07:34:16] sepp2k: has joined #ruby
[07:36:10] rbennacer: has joined #ruby
[07:37:09] mr_roboto: has joined #ruby
[07:37:51] bronson: has joined #ruby
[07:38:02] jaruga__: has joined #ruby
[07:39:48] ur5us: has joined #ruby
[07:40:05] krz: has joined #ruby
[07:42:22] madgen: has joined #ruby
[07:43:00] jxs_: has joined #ruby
[07:43:27] petertretyakov: has joined #ruby
[07:45:58] futilegames: has joined #ruby
[07:48:02] Balzrael: has joined #ruby
[07:48:24] chagel: has joined #ruby
[07:49:55] DoubleMalt: has joined #ruby
[07:50:41] dionysus69: has joined #ruby
[07:51:53] karapetyan: has joined #ruby
[07:53:36] El3k0n: has joined #ruby
[07:54:12] rbennacer: has joined #ruby
[07:54:17] sandelius: has joined #ruby
[07:56:39] skade: has joined #ruby
[07:57:18] lacrosse: has joined #ruby
[07:57:43] czerasz: has joined #ruby
[07:59:01] ramfjord: has joined #ruby
[07:59:53] ferr: has joined #ruby
[07:59:59] jxs_: has joined #ruby
[08:01:15] mikecmpbll: has joined #ruby
[08:01:29] goooodroot: has joined #ruby
[08:01:44] baweaver: has joined #ruby
[08:03:41] Blaze_Boy: has joined #ruby
[08:03:50] vondruch: has joined #ruby
[08:03:50] drptbl: has joined #ruby
[08:03:55] rbennacer: has joined #ruby
[08:11:53] lyro: has joined #ruby
[08:12:36] chouhoulis: has joined #ruby
[08:12:49] ocbtec: has joined #ruby
[08:13:49] blackmesa: has joined #ruby
[08:14:26] Pumukel: has joined #ruby
[08:15:42] gooooodroot: has joined #ruby
[08:15:48] william3: has joined #ruby
[08:17:11] LoneHermit: has joined #ruby
[08:17:26] rbennacer: has joined #ruby
[08:20:29] DanielJack: should i use "not obj.nil?" or "obj != nil"?
[08:21:05] al2o3-cr: their opposites
[08:21:05] Ox0dea: DanielJack: Just `obj`.
[08:22:13] DanielJack: but if obj = false then it would trigger too
[08:22:21] DanielJack: i mean not trigger
[08:22:50] norc: DanielJack: !obj.nil?
[08:23:19] norc: DanielJack: not not obj
[08:23:32] norc: DanielJack: Its a quick way of obtaining the truthy value of an object.
[08:23:45] tobiasvl: won't help if you want to discern false from nil
[08:23:53] tobiasvl: use whatever you want which makes the distinction clear
[08:23:56] mrgrieves: has joined #ruby
[08:24:02] norc: DanielJack: the most elegant way of simply checking whether its not nil is just !obj.nil?
[08:24:12] norc: or unless obj.nil?
[08:24:26] norc: Though personally I avoid "unless"
[08:25:01] tobiasvl: yeah I've done ruby for years and unless still trips me up
[08:25:16] early90spants: has left #ruby: ()
[08:25:32] al2o3-cr: DanielJack: `unless` is basically `if not`
[08:25:47] Ox0dea: Except that it's not a method call.
[08:26:07] tobiasvl: good point Ox0dea
[08:26:10] norc: al2o3-cr: unless is just if, but with the two blocks being swapped around.
[08:26:40] norc: al2o3-cr: and if you wonder about "two", Ruby automatically inserts an "null" node if you do not supply one.
[08:26:55] al2o3-cr: yeah, just inveresed
[08:27:07] n008f4g_: has joined #ruby
[08:27:30] norc: Although its not entirely true.
[08:27:54] norc: I regularly use modifier_unless, since its way more expressive than the modifier_if variant in some cases.
[08:28:12] al2o3-cr: going down to C level, no.
[08:28:15] tobiasvl: DanielJack: you don't need to pay attention anymore if you don't want to ;)
[08:28:15] norc: >> a = ""; puts a unless a.nil?
[08:28:16] ruby[bot]: norc: # => ...check link for more (https://eval.in/551008)
[08:28:21] norc: al2o3-cr: bytecode level.
[08:29:11] DanielJack: i cant decide if i want to use 'not' or !
[08:29:14] shevy: al2o3-cr let us master C together!
[08:29:26] al2o3-cr: DanielJack: use !
[08:29:36] shevy: DanielJack use 'not'
[08:29:45] al2o3-cr: noooooo....
[08:29:51] shevy: I agree with al2o3-cr
[08:29:55] DanielJack: you are just like the voices in my heda
[08:30:16] shevy: but if the question is 'and' or &&
[08:30:34] tobiasvl: https://github.com/bbatsov/ruby-style-guide#bang-not-not
[08:31:08] marr: has joined #ruby
[08:31:13] DanielJack: shevy: yeah what about them?
[08:31:21] shevy: DanielJack then I would use 'and' :)
[08:31:24] DanielJack: should I use equal instead of == and unequal instead of !=
[08:31:30] william3: has joined #ruby
[08:32:01] shevy: I think in many cases it depends on how you can make the code more readable / logical
[08:32:14] shevy: you could reverse, like: if ! foo .... unless foo
[08:32:23] DanielJack: the logic doesn't change
[08:32:34] DanielJack: 'and' and '&&' are logically equal
[08:32:36] shevy: yeah but which tokens are better!
[08:32:50] shevy: && should have slightly higher precedence than 'and'
[08:33:15] DanielJack: you wanna tell me that if i do (a and b && c) then b and c will be evaluated first?
[08:33:27] shevy: http://ruby-doc.org/core-2.2.0/doc/syntax/precedence_rdoc.html
[08:33:37] shevy: 'and' etc... are quite low on the table
[08:33:49] Ox0dea: DanielJack: Ruby's `and` and `or` aren't meant to be used for logic.
[08:33:57] shevy: !, ~, unary + <--- the WINNERS!
[08:34:13] Ox0dea: DanielJack: http://devblog.avdi.org/2014/08/26/how-to-use-rubys-english-andor-operators-without-going-nuts/
[08:34:27] shevy: lol aptly named page
[08:34:34] Ox0dea: They're for "sequencing", more or less.
[08:34:41] tobiasvl: most style guides say to use ! instead of not. some say to use and/or for control flow and &&/|| for logical operations, others say to use &&/|| exclusively to avoid any pitfalls.
[08:34:43] norc: DanielJack: and/or are for control flow, very much like if/unless
[08:35:00] tobiasvl: ultimately it's up to you though, as long as you know what you're doing
[08:35:45] norc: tobiasvl: The best rule is this: The variant where you do not have to add paranthesis to correct precedence is the one you want to use.
[08:36:19] antgel: has joined #ruby
[08:36:24] norc: (Or the other way around, if you have to add parens, chances are you are using the wrong one)
[08:37:10] shevy: DanielJack matz uses 'and' too https://github.com/mruby/mruby/blob/master/mrblib/compar.rb#L82
[08:37:20] DanielJack: I have this shotgun which shoots both forward and backward simultaneously, of course i know what i'm doing!
[08:37:44] shevy: yeah, zombie-covering shotguns... you never know where they are coming fom next
[08:38:01] DanielJack: shevy: i think it would confuse people if one would use and/or together with &&/|| in the same statement
[08:38:22] norc: Ox0dea: Funny story, during my implementation of my own parsers over the past few weeks, I began to understand why Ruby is so packed with macros in the bison part.
[08:38:26] nobitanobi: has joined #ruby
[08:38:55] DanielJack: are you creating a parser for ruby?
[08:39:24] dc4: has joined #ruby
[08:39:28] norc: DanielJack: Different language, though a Ruby parser has come to mind.
[08:39:37] DanielJack: what languagE?
[08:39:45] shevy: DanielJack yeah... I actually can not recall instances where I see both applied at the same time
[08:39:50] Ox0dea: norc: The "X macros" are interesting.
[08:40:21] norc: Ox0dea: The real problem is C. Its that hilarious attempt to dry up code when you do not have templated classes and dynamic_cast at your disposal.
[08:40:27] rbennacer: has joined #ruby
[08:40:31] Ox0dea: You're not wrong.
[08:40:47] Ox0dea: I'm not sure "problem" is quite right, though.
[08:41:03] norc: "Cause" fits better I suppose.
[08:41:15] DanielJack: shevy: probably a good target to introduce hidden bugs that one can exploit
[08:42:14] norc: Ox0dea: I started out in C, and just for semantic actions I started writing code along the lines of $$ = new_ast_node(ast_node_type_operator, $1, $3, $5, AST_NULL_NODE);
[08:42:29] auzty: has joined #ruby
[08:42:53] norc: Ox0dea: So that quickly became $$ = NEW_NODE(OPERATOR, $1, $3, $5, N_NULL), which became $$ = NEW_OPERATOR ... and suddenly I realized how the Ruby parser came to be.
[08:43:12] Ox0dea: norc: I reckon that's about the size of it.
[08:50:06] madgen: has joined #ruby
[08:51:49] merida: has joined #ruby
[08:53:11] chagel: has joined #ruby
[08:54:11] rbennacer: has joined #ruby
[08:57:15] snowy: has joined #ruby
[08:57:37] william3: has joined #ruby
[08:58:22] pabs: has joined #ruby
[08:59:02] akkmaxon: has joined #ruby
[09:00:38] Xeago: has joined #ruby
[09:02:34] jxs_: has joined #ruby
[09:02:50] araujo: has joined #ruby
[09:02:50] araujo: has joined #ruby
[09:04:41] RubyJedi-ing_: has joined #ruby
[09:07:43] rbennacer: has joined #ruby
[09:07:50] Chagel_: has joined #ruby
[09:11:36] jtoy: has joined #ruby
[09:11:38] skislak: has joined #ruby
[09:13:23] chouhoulis: has joined #ruby
[09:15:29] dgncn: has joined #ruby
[09:16:45] rolha: has joined #ruby
[09:17:16] rbennacer: has joined #ruby
[09:19:19] bruno-: has joined #ruby
[09:19:47] pawnbox: has joined #ruby
[09:20:13] Couch: has joined #ruby
[09:20:15] jxs_: has joined #ruby
[09:21:02] dc4: has joined #ruby
[09:22:00] Macaveli: has joined #ruby
[09:22:15] shayan: has joined #ruby
[09:23:23] d0nn1e: has joined #ruby
[09:25:10] duoi: has joined #ruby
[09:27:33] Mon_Ouie: has joined #ruby
[09:29:54] karapetyan: has joined #ruby
[09:30:20] araujo: has joined #ruby
[09:31:08] william3: has joined #ruby
[09:32:13] RegulationD: has joined #ruby
[09:32:19] workmad3: has joined #ruby
[09:32:39] sandelius: has joined #ruby
[09:32:49] nettoweb: has joined #ruby
[09:34:39] senayar: has joined #ruby
[09:35:00] norc: Ox0dea: Do you recall your dvar hack?
[09:35:26] bmf: has joined #ruby
[09:36:12] Ox0dea: norc: Er, nothing immediately springs to mind.
[09:37:04] norc: Ox0dea: You had some ruby extension that allowed for user defined dynamic variables (think $1) that executed Ruby code when being referenced.
[09:37:17] djellemah: has joined #ruby
[09:37:46] rippa: has joined #ruby
[09:37:53] Ox0dea: norc: Ah, yes, I remember. I took to calling them "vvars".
[09:38:26] apeiros: ACTION still thinks it was a bad idea to hide methods behind "globals"
[09:38:51] apeiros: but I guess that was a performance optimization, back when method call overhead was even worse
[09:38:57] Ox0dea: Would you have been okay with a different sigil?
[09:39:35] apeiros: I don't see the need for another sigil
[09:39:46] apeiros: just make them methods
[09:39:47] blackmesa: has joined #ruby
[09:40:12] Ox0dea: On Kernel?
[09:40:22] norc: Ox0dea makes a good point there.
[09:40:39] Phage: has left #ruby: ("WeeChat 1.4")
[09:40:50] norc: Though honestly name resolution is cluttered whether you have dvars in global scope or methods on Kernel either way.
[09:40:51] yfeldblum: has joined #ruby
[09:41:01] apeiros: Ox0dea: no. IMO ruby puts a lot of stuff into Kernel for which I'd provide a proper namespace.
[09:41:17] Ox0dea: apeiros: Hm... like what?
[09:41:20] apeiros: since those variables cover a wide range, it wouldn't be a single namespace
[09:41:23] pawnbox: has joined #ruby
[09:41:34] Xeago: Ox0dea: `puts`, `gets`
[09:41:46] norc: Ox0dea: puts, printf are two that immediately come to mind that simply do not belong there.
[09:41:46] apeiros: the $1-$n I'd probably put on Regexp.
[09:42:00] norc: They belong to IO. Not Kernel.
[09:42:01] apeiros: $:, $" etc. I'd probably have a module Ruby
[09:42:11] Xeago: what are $: $"?
[09:42:16] Ox0dea: Xeago: You don't want to be able to call those from anywhere?
[09:42:19] Xeago: (they're hard to google for)
[09:42:22] apeiros: Xeago: $LOAD_PATH, $LOADED_FEATURES
[09:42:26] Ox0dea: ?quickref Xeago
[09:42:26] ruby[bot]: Xeago: http://www.zenspider.com/Languages/Ruby/QuickRef.html
[09:42:27] Xeago: Ox0dea: I'd want those to be namespaced
[09:42:41] Ox0dea: Xeago: You can invoke them directly on $stdin, if that takes your fancy.
[09:42:57] Ox0dea: And $stdout as well. :P
[09:43:02] apeiros: I'm not sure where I'd put stuff like ARGV, ARGF, ENV etc., but those I'd probably also stuff away into a namespace.
[09:44:02] apeiros: though, $" and $: are not actually functions :)
[09:44:12] Ox0dea: I can fix that. :P
[09:44:26] apeiros: you and I - we have a different definition for "fix" :-p
[09:44:36] norc: Ox0dea: Or all these $_ shortcuts that exist just to make Ruby look like got the Copy-Paste treatment from Perl.
[09:44:57] norc: (chomp, gets, sub, gsub)
[09:45:02] norc: Dont tell me you ever use them.
[09:45:17] Ox0dea: I do use those?
[09:45:31] Ox0dea: I'm A-okay with Ruby being a (much) better Perl.
[09:45:33] norc: On Kernel?
[09:45:45] Ox0dea: Oh, I see how you meant.
[09:45:52] Ox0dea: No, I don't do that, and it is kinda weird.
[09:46:35] adaedra: Ox0dea finding something weird? Weird.
[09:47:09] Ox0dea: Well, it's just that `ruby -pe` as a stream editor gets out of hand rather quickly.
[09:47:18] chagel: has joined #ruby
[09:48:19] Ox0dea: norc: I'm sure $_ and its associated functionality were intended to entice Perlers of the time to make the switch.
[09:48:56] goodroot: has joined #ruby
[09:49:40] evidex: has joined #ruby
[09:49:52] Ox0dea: apeiros: What'd you mean about $" and $: not being functions?
[09:49:52] norc: Ox0dea: Its okay. We got them hooked, now we can ditch it away. ;-)
[09:50:11] Ox0dea: norc: Ruby 3 is unlikely to be a purge. :P
[09:51:14] norc: Ox0dea: By the way, since you seem to fancy obfuscation from time to time, were you aware that q = q was legal in Ruby?
[09:51:16] Xeago: has joined #ruby
[09:51:32] Ox0dea: norc: We've certainly discussed this.
[09:51:37] norc: We have?
[09:51:44] Ox0dea: I feel we must've?
[09:52:12] norc: Well I discussed it here, but I am fairly certain that you were not around at the time.
[09:53:29] Ox0dea: Ah, well, it's certainly made the rounds by now.
[09:54:01] Marsupermammal: has joined #ruby
[09:54:01] norc: Ox0dea: The curious thing is that if you disassemble that, it shows that Ruby initializes lvars for you if you do not do it yourself.
[09:54:26] norc: Or rather the lack of any bytecode is a strong indicator.
[09:56:40] Ox0dea: norc: Aye, it must do, since the `getlocal` happens before the `setlocal`.
[09:57:56] pawnbox: has joined #ruby
[09:58:55] chris2: ACTION likes using puts instead of System::STDOUT.puts :P
[10:00:23] Xeago: has joined #ruby
[10:01:33] Ox0dea: I prefer `$><<`. ^_^
[10:01:53] Ox0dea: >> $> << 'foo'
[10:01:54] ruby[bot]: Ox0dea: # => foo#<IO:<STDOUT>> (https://eval.in/551065)
[10:02:13] Ox0dea: $> is $stdout, IO#<< is #write.
[10:02:35] terlar: has joined #ruby
[10:02:37] Ox0dea: It only hurts if you poke it.
[10:04:19] norc: Ox0dea: Help me explain something.. throw this into your pry $><<(_=_)
[10:04:29] norc: Why does _ now point at STDOUT?
[10:04:54] Ox0dea: norc: Pry uses `_` for the last evaluation, just like irb.
[10:05:29] LoneHerm_: has joined #ruby
[10:05:36] william3: has joined #ruby
[10:05:46] norc: Ox0dea: Seems like __ is special too then.
[10:06:00] norc: The confusion that just happened in my head was unreal.
[10:06:53] Ox0dea: norc: What's special about `__`?
[10:07:15] norc: Ox0dea: Either it also points at the last evaluation, or it has some other meaning.
[10:07:41] Ox0dea: norc: Ah, it's just second-back.
[10:09:02] waxxy: has joined #ruby
[10:09:29] Rixius: has joined #ruby
[10:09:41] Ox0dea: https://git.io/vVQAj
[10:10:30] norc: That reminds me, I still have to write a patch for pry.
[10:10:38] Ox0dea: Alas, "extra sticky" is not an intensifier.
[10:11:14] frankier: has joined #ruby
[10:11:47] valetudo: has joined #ruby
[10:12:21] unshadow: has joined #ruby
[10:12:21] norc: Ox0dea: Im sure at some point the author was just tired and could not be bothered to come up with a sensible name for encapsulating it. :)
[10:13:23] norc: Ox0dea: I mean if you look closely enough, pry has some bizarre quirks.. wtf??!?!?!?!?!??!! is just the tip of the iceberg. ;-)
[10:13:56] Ox0dea: norc: I just meant that the "extra" there means "additional" rather than "extremely".
[10:14:34] El3k0n: has joined #ruby
[10:15:52] shayan: Why is this giving me an error?:
[10:15:57] shayan: puts "What is your favorite number?"
[10:15:57] ruby[bot]: Radar: I don't know anything about 8ball
[10:15:57] shayan: num = gets.chomp
[10:15:59] shayan: if num > 0
[10:16:00] shayan: puts "Wow, that is a pretty number!"
[10:16:00] Ox0dea: norc: It's rare enough, but tab-completing methods on String literals is still wonky.
[10:16:05] Radar: shayan: ?gist
[10:16:09] Radar: ?gist shayan
[10:16:09] ruby[bot]: shayan: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[10:16:20] Radar: shayan: because num is not a number, it would be a string.
[10:16:26] Radar: shayan: gets returns a string
[10:16:37] Ox0dea: Or `nil`.
[10:17:16] norc: Ox0dea: tab completion on paths without explicitely requiring strscan on your pryrc still crashes pry. ;-)
[10:17:21] Xeago: has joined #ruby
[10:17:26] Ox0dea: norc: Ah, yeah, that was the one.
[10:17:40] norc: Ox0dea: That was the bug I referred to earlier, Im going to patch that I think.
[10:18:08] shayan: Radar: Ah, that certainly makes sense to me now.
[10:18:57] shayan: Radar: What is the correct method in this case?
[10:19:15] william3: has joined #ruby
[10:19:19] norc: shayan: Note though, instead of asking why it gives an error, next time try asking "What does this error message mean?"
[10:19:23] Radar: shayan: what have you tried?
[10:19:37] norc: shayan: Because the error message you would get is quite descriptive already.
[10:19:53] shayan: norc: Thank you, I will remember that for next time
[10:20:06] clauswitt: has joined #ruby
[10:20:29] bruno-: has joined #ruby
[10:22:41] shayan: I solved this — I just had to convert the num to an integer (num.to_i)
[10:22:44] Outlastsheep: has joined #ruby
[10:23:15] gooodroot: has joined #ruby
[10:23:37] merida: has joined #ruby
[10:24:04] jgt4: has joined #ruby
[10:24:26] freerobby: has joined #ruby
[10:24:53] platzhirsch: has joined #ruby
[10:30:27] senayar: has joined #ruby
[10:31:47] rbennacer: has joined #ruby
[10:31:56] sandelius: has joined #ruby
[10:34:13] blackmesa: has joined #ruby
[10:35:03] hk238: has joined #ruby
[10:35:15] Ropeney: has joined #ruby
[10:38:36] william3: has joined #ruby
[10:39:06] cajone: has left #ruby: ()
[10:42:28] cajone: has joined #ruby
[10:44:06] chouhoulis: has joined #ruby
[10:44:28] goooodroot: has joined #ruby
[10:44:33] Azure: has joined #ruby
[10:45:24] FooMunki: has joined #ruby
[10:45:28] GodFather: has joined #ruby
[10:48:45] bmf: has joined #ruby
[10:52:50] karapetyan: has joined #ruby
[10:55:04] leftpad: has joined #ruby
[10:56:02] dvinciguerra_: has joined #ruby
[10:57:42] gooooodroot: has joined #ruby
[10:58:26] Guest97976: has joined #ruby
[10:58:56] Mon_Ouie: has joined #ruby
[11:01:52] Gasher: has joined #ruby
[11:06:24] Skelz0r: has joined #ruby
[11:07:09] apeiros: Ox0dea: aren't they plain arrays and just assignment to those vars is blocked?
[11:08:08] Ropeney: has joined #ruby
[11:08:51] nofxx: has joined #ruby
[11:09:15] Ox0dea: apeiros: Nah, they're "hooked" virtual variables.
[11:09:37] apeiros: ah ok. I assumed their functionality was simple enough that that wasn't necessary
[11:10:15] johnmilton: has joined #ruby
[11:10:28] Hanmac: yeah virtual variables are funky xD
[11:13:38] gregf: has joined #ruby
[11:13:53] william3: has joined #ruby
[11:15:25] william3: has joined #ruby
[11:16:12] DoubleMalt: has joined #ruby
[11:16:13] pawnbox: has joined #ruby
[11:16:18] william3: has joined #ruby
[11:16:23] voodo: has joined #ruby
[11:16:40] skade: has joined #ruby
[11:18:10] trinaldi: has joined #ruby
[11:18:42] Skelz0r: has joined #ruby
[11:18:50] platzhirsch: has joined #ruby
[11:19:13] freerobby: has joined #ruby
[11:24:30] GG: has joined #ruby
[11:25:55] madgen: has joined #ruby
[11:26:11] ruby-lang078: has joined #ruby
[11:28:32] william3: has joined #ruby
[11:28:52] petertretyakov: has joined #ruby
[11:29:02] RubyJedi-ing: has joined #ruby
[11:30:31] Xeago: has joined #ruby
[11:31:47] nando293921: has joined #ruby
[11:32:01] Skelz0r: has joined #ruby
[11:32:26] blaxter: has joined #ruby
[11:36:25] gnufied: has joined #ruby
[11:37:04] ldnunes: has joined #ruby
[11:37:13] rbennacer: has joined #ruby
[11:37:25] senayar: has joined #ruby
[11:38:12] mtkd: has joined #ruby
[11:38:21] norc: Ox0dea: Can you give me a link to your $ magic source code?
[11:39:49] sepp2k: has joined #ruby
[11:39:57] kadoppe: has joined #ruby
[11:40:01] goodroot: has joined #ruby
[11:40:09] william3: has joined #ruby
[11:41:36] magic: has joined #ruby
[11:44:29] snoobydoo: has joined #ruby
[11:44:40] chouhoulis: has joined #ruby
[11:45:13] Ox0dea: norc: https://github.com/0x0dea/viva/blob/master/ext/viva/core.c
[11:45:36] Ox0dea: The only wonky bit is the valid identifier check.
[11:45:54] Ox0dea: I remember finding something interesting to do with rb_is_junk_id(), but I forgot to note it.
[11:46:19] Ox0dea: I think it might've been that it doesn't consider the empty identifer to be "junk", but I didn't play with it like I should've.
[11:46:19] rbennacer: has joined #ruby
[11:50:44] nfk|laptop: has joined #ruby
[11:51:03] dravine: has joined #ruby
[11:53:10] william3: has joined #ruby
[11:53:36] LoneHerm_: has joined #ruby
[11:54:16] decoponio: has joined #ruby
[11:55:39] snoobydo1: has joined #ruby
[11:55:40] rbennacer: has joined #ruby
[11:56:30] norc: Ox0dea: Appreciate it.
[11:58:38] Skelz0r: has joined #ruby
[12:00:21] rbennacer: has joined #ruby
[12:01:10] szulak: has joined #ruby
[12:03:21] tvw: has joined #ruby
[12:03:37] Ox0dea: norc: No worries. Is your language gonna have dvars? :)
[12:03:47] gagrio: has joined #ruby
[12:04:23] Icey: has joined #ruby
[12:07:51] norc: Ox0dea: No, Im not particularly interested in the actual language, but some theoretical stuff about IR and optimization passes.
[12:08:22] ffgghhj: has joined #ruby
[12:09:13] dANOKELOFF: has joined #ruby
[12:09:22] Ox0dea: norc: I suspect you're familiar, but in case not: https://gcc.gnu.org/onlinedocs/gccint/GIMPLE.html
[12:10:26] norc: Ox0dea: It is quite interesting because even GIMPLE has 2 levels of abstraction, and afterwards there is another representation (RTL) which is still used for more aggressive low level optimization.
[12:11:21] Icey: has joined #ruby
[12:11:49] norc: Ox0dea: In my first step Ill just translate directly to LLVM though.
[12:11:59] Ox0dea: norc: Yeah, makes good sense.
[12:13:07] tesuji: has joined #ruby
[12:13:18] eljimbo: has joined #ruby
[12:13:24] Hanmac: has joined #ruby
[12:13:33] aegis3121: has joined #ruby
[12:13:53] norc: Ox0dea: Im still so sad, that there is no suitable parser generator for C++ :(
[12:14:41] Ox0dea: norc: What explains that?
[12:15:17] Ox0dea: The curse of good enough, I suppose. :/
[12:16:02] Icey: has joined #ruby
[12:16:22] norc: ANTLR is probably the closest thing, but I do not have much love for waiting 2s every time I just want to fire up the JVM...
[12:17:20] szulak: has joined #ruby
[12:17:22] diegoaguilar: has joined #ruby
[12:17:45] Xeago: How do I read a single character, not putting the terminal in raw mode?
[12:18:26] _blizzy_: has joined #ruby
[12:18:51] rbennacer: has joined #ruby
[12:19:04] norc: Xeago: STDIN.getc ?
[12:19:19] Zai00: has joined #ruby
[12:20:09] norc: Xeago: And likewise, if you want to read it in raw mode, STDIN.raw { |stdin| stdin.getc }
[12:20:13] thistle: has joined #ruby
[12:21:06] snowy: has joined #ruby
[12:24:09] najam: has joined #ruby
[12:25:38] Xeago: norc: thanks, I was looking at getch, which puts it in raw
[12:26:18] norc: Xeago: Ah! That explains your peculiar question then
[12:28:04] _stu_: has joined #ruby
[12:28:23] william3: has joined #ruby
[12:31:46] Xeago: can https://gist.github.com/Xeago/affc40abbe9af240da87d05a69b310d4 be written more concise?
[12:31:51] Xeago: Simple loop to prompt for y/n
[12:32:00] GG: has joined #ruby
[12:32:03] Xeago: Feels unruby like to while true
[12:32:15] rbennacer: has joined #ruby
[12:32:36] Xeago: Ideally the condition to exit the loop is actually specified at the `while`, and not some arbitrary `if` with a `return`
[12:32:40] Xeago: tobiasvl: no
[12:34:38] Ox0dea: Xeago: Be advised that you're leaving data in the input stream for the next read, which is probably not what you want.
[12:36:22] Xeago: Ox0dea: how would I get around that?
[12:36:57] Ox0dea: Xeago: You could just use #gets and grab only the first character for comparison.
[12:37:08] dvinciguerra: has joined #ruby
[12:37:29] sdothum: has joined #ruby
[12:38:18] Xeago: Ox0dea: I'm making a program with rapid fire questions and answers, I want to get rid of the enter-press
[12:38:33] Ox0dea: Xeago: Then you want #getch.
[12:39:05] Xeago: that puts it in raw mode though
[12:39:24] Xeago: I don't want to handle my own SIGINT and other signals :<
[12:40:31] Ox0dea: Well, #getc doesn't get rid of the Enter press.
[12:40:38] karapetyan: has joined #ruby
[12:40:56] aupadhye: has joined #ruby
[12:41:47] rbennacer: has joined #ruby
[12:42:12] flashpoint9: has joined #ruby
[12:42:19] johnmilton: has joined #ruby
[12:42:37] bruno-: has joined #ruby
[12:42:43] IrishGringo: has joined #ruby
[12:43:51] Xeago: has joined #ruby
[12:44:05] madgen: has joined #ruby
[12:44:08] Marsupermammal: has joined #ruby
[12:45:26] chouhoulis: has joined #ruby
[12:48:00] tubuliferous: has joined #ruby
[12:48:40] RegulationD: has joined #ruby
[12:50:24] johnmilton: has joined #ruby
[12:51:31] Patrezze: has joined #ruby
[12:54:11] kadoppe: has joined #ruby
[12:54:12] william3: has joined #ruby
[12:55:37] johnmilton: has joined #ruby
[12:55:46] Patrezze: has left #ruby: ("Saindo")
[12:56:10] terlar: has joined #ruby
[12:57:53] ChiefAlexander: has joined #ruby
[12:58:22] YaknotiS: has joined #ruby
[12:59:38] rbennacer: has joined #ruby
[12:59:58] ramortegui: has joined #ruby
[13:00:36] kareeoleez: has joined #ruby
[13:03:25] madgen: has joined #ruby
[13:03:55] bruno-: has joined #ruby
[13:04:47] cdg: has joined #ruby
[13:06:50] djcp: has joined #ruby
[13:08:56] duckpuppy: has joined #ruby
[13:09:44] aresela: has joined #ruby
[13:11:19] roelof: has joined #ruby
[13:11:55] Xeago: has joined #ruby
[13:12:20] roelof: How can I make this work : https://gist.github.com/rwobben/4cea76c1125889b8192e4bc39e4b8f7a
[13:12:59] roelof: I know instance_eval uses Strings so that is why I used .to_i . but no luck
[13:13:22] huddy: has joined #ruby
[13:13:50] tobiasvl: what is the exercise exactly?
[13:14:17] roelof: All I know its in the paste, tobiasvl
[13:14:35] tobiasvl: roelof: there's no exercise text apart from what it says up top?
[13:14:39] william3: has joined #ruby
[13:14:58] tobiasvl: you say you know that instance_eval uses Strings, but there are two instance_eval. one uses a block. the exercise tells you to use a block
[13:15:07] gnufied: has joined #ruby
[13:15:18] roelof: tobiasvl: this is all that is stated on the rubymonk page where this exercise can be found
[13:15:20] ChiefAlexander: has joined #ruby
[13:15:27] tobiasvl: and overriding initialize with that doesn't make sense
[13:15:49] tobiasvl: roelof: it really says nothing more than "Solve this simple exercise"? what is "this simple exercise"? I don't get it
[13:15:54] ekinmur: has joined #ruby
[13:15:54] Ox0dea: tobiasvl: https://rubymonk.com/learning/books/5-metaprogramming-ruby-ascent/chapters/24-eval/lessons/67-instance-eval
[13:16:03] Ox0dea: I don't know why this fella's so set on making it hard to help him. :/
[13:16:21] Xeago: has joined #ruby
[13:16:55] tobiasvl: roelof: if you see directly above the exercise it says "Unlike eval, instance_eval can also accept a block instead of a string."
[13:17:02] tobiasvl: so I don't think you're supposed to use a string.
[13:18:02] roelof: oke, I will try to find a example with a block and instance_eval
[13:18:21] atparrington: has joined #ruby
[13:18:33] tobiasvl: it's literally directly above the exercise
[13:18:36] tobiasvl: in the example code
[13:18:54] pawnbox: has joined #ruby
[13:19:29] jhass: roelof: also press run to see which expectations the exercise has
[13:19:50] tobiasvl: and it is unclear what the exercise is, actually, but I assume they mean that you should solve the previous exercise (defining a class method 'sum') using a block?
[13:20:27] jhass: tobiasvl: no, press run too ;)
[13:20:38] roelof: I expected to see 43 where instance_eval is now returning 42
[13:20:44] terlar: has joined #ruby
[13:20:49] tobiasvl: ah look at that
[13:21:05] abyx: has joined #ruby
[13:21:51] tax: has joined #ruby
[13:22:13] freerobby: has joined #ruby
[13:22:45] roelof: tobiasvl: oke, I think the problem is that I do not have a clue if 42 is a number/string or a object
[13:23:16] roelof: I tried to do instance_eval { @zen }.to_i but then a syntax error
[13:23:19] jerohm: has joined #ruby
[13:23:38] Ox0dea: That's not a syntax error.
[13:23:57] tobiasvl: roelof: everything is an object in ruby
[13:24:11] kareeole_: has joined #ruby
[13:24:32] abyx: has joined #ruby
[13:24:35] aresela: has left #ruby: ()
[13:24:54] Stan: has joined #ruby
[13:25:13] Ox0dea: roelof: It really seems like you're trying to "win" RubyMonk rather than learn Ruby. :<
[13:25:31] gagrio-mtg: has joined #ruby
[13:25:39] Ox0dea: You're rushing through the exercises without retaining much of anything.
[13:25:53] roelof: no, I try to learn ruby by using rubymonk as the course tells me to do
[13:26:30] norc: tobiasvl: methods are not. :(
[13:26:34] kfpratt: has joined #ruby
[13:26:36] merida: has joined #ruby
[13:26:54] gagrio: has joined #ruby
[13:27:04] tobiasvl: true. but they can be turned into an object!
[13:27:57] norc: tobiasvl: Though my prime counter argument whenever I hear this is still the same:
[13:28:06] bruno-: has joined #ruby
[13:29:28] tobiasvl: roelof: so walk us through your thought process. you don't have a clue whether 42 is a number/string or an object. I told you everything is an object (although I lied, numbers and strings are both objects). strings have quotes around them.
[13:29:43] NinjaPanzer: has joined #ruby
[13:29:53] roelof: tobiasvl: oke, I try
[13:30:30] roelof: when I do this : m.instance_eval {@ zen } I get 42 as expected
[13:31:37] sgambino: has joined #ruby
[13:31:49] roelof: but I cannot "convert" it to a integer with .to_i because I see a error message like this : syntax error, unexpected $undefined
[13:32:14] roelof: so I wonder what 42 is then
[13:32:31] roelof: I know everything is a object in ruby
[13:33:24] tobiasvl: roelof: you were trying to convert the block, not @zen
[13:33:32] tobiasvl: and 42 is an int already so you don't have to convert it
[13:33:34] pawnbox: has joined #ruby
[13:33:59] roelof: no, I do not know how I can add 1 to it
[13:34:11] roelof: just doing @zen + 1 does not change anything
[13:34:25] norc: roelof: Do me a favour, open up "irb", and type 42.class
[13:34:33] ellen_: has joined #ruby
[13:34:35] norc: roelof: Then Ruby will tell you immediately what 42 is.
[13:34:44] conta: has joined #ruby
[13:34:56] Ox0dea: roelof: Why would doing `@zen + 1` change anything?
[13:35:02] Ox0dea: >> x = 42; x + 1; x
[13:35:03] ruby[bot]: Ox0dea: # => 42 (https://eval.in/551242)
[13:35:09] william3: has joined #ruby
[13:35:40] apeiros: 1+1 # now all one's are 2!
[13:35:44] roelof: norc: 42 is a FixNum
[13:35:56] conta: I wrote a little article how to use pronto with TravisCI and CircleCI ;]
[13:35:57] norc: roelof: Beautiful. So that answers your question of "I wonder what 42 is then".
[13:35:59] conta: https://hovancik.net/blog/2016/04/11/free-automated-code-reviews-using-pronto.html
[13:36:19] norc: roelof: Whenever you want to figure out what something is, call ".class" on it.
[13:36:27] norc: Since we have established that everything is an object, this will always work.
[13:36:35] Ox0dea: >> BasicObject.new.class
[13:36:36] ruby[bot]: Ox0dea: # => undefined method `class' for #<BasicObject:0x40749c54> (NoMethodError) ...check link for more (https://eval.in/551243)
[13:36:39] Ox0dea: Well, shit.
[13:36:42] norc: Ox0dea: Shush.
[13:36:44] norc: Go away.
[13:36:47] Ox0dea: has left #ruby: ("WeeChat 1.5-dev")
[13:37:12] roelof: norc: now the problem is how to add 1 to it . Normally you can do something like this x += 1
[13:38:05] roelof: but @zen += 1 does not change @zen
[13:38:06] Waqas: has joined #ruby
[13:38:25] apeiros: it does not?
[13:38:34] apeiros: >> @zen = 2; @zen += 1; @zen
[13:38:35] ruby[bot]: apeiros: # => 3 (https://eval.in/551244)
[13:38:36] roelof: wierd, now Rubymonk says it's allright
[13:38:41] apeiros: dunno, seems it does…
[13:38:53] roelof: I think the site is not always running good
[13:38:57] apeiros: note: it changes the variable, not the object
[13:39:08] mustmodify: has left #ruby: ()
[13:39:40] GodFather: has joined #ruby
[13:39:47] bronson: has joined #ruby
[13:41:16] roelof: apeiros: I know. For this challenge I think it's not a problem
[13:41:30] banister: has joined #ruby
[13:41:37] chouhoulis: has joined #ruby
[13:41:48] apeiros: since you can't change Fixnums (they're immutable), that's probably better this way :)
[13:42:44] mtkd: has joined #ruby
[13:42:57] loechel: has joined #ruby
[13:42:58] norc: apeiros: You are lucky Ox0dea has left, otherwise he would have sent you a gist right into your face.
[13:44:04] stannard: has joined #ruby
[13:45:24] madgen: has joined #ruby
[13:45:27] stannard: has joined #ruby
[13:47:16] platzhirsch: has joined #ruby
[13:48:15] malconis: has joined #ruby
[13:48:32] griffindy: has joined #ruby
[13:50:30] roelof: thanks for the help and have a nice day
[13:51:59] sondr3: has joined #ruby
[13:54:18] Marsupermammal: has joined #ruby
[13:56:32] agent_white: has joined #ruby
[13:56:55] platzhirsch: has left #ruby: ()
[13:58:19] karmatr0n: has joined #ruby
[14:00:46] Nahra: has joined #ruby
[14:02:01] dANOKELOFF: has joined #ruby
[14:03:55] jmignault: has joined #ruby
[14:05:08] rbennacer: has joined #ruby
[14:07:16] AlexJakeGreen: has joined #ruby
[14:07:31] rbennacer: has joined #ruby
[14:08:37] rbennacer: has joined #ruby
[14:09:02] chouhoulis: has joined #ruby
[14:09:27] rbennacer: has joined #ruby
[14:10:05] Guest64052: has joined #ruby
[14:10:24] rbennacer: has joined #ruby
[14:10:54] swills: has joined #ruby
[14:11:17] rbennacer: has joined #ruby
[14:11:45] madgen: has joined #ruby
[14:12:50] CloCkWeRX: has joined #ruby
[14:12:56] roelof: has left #ruby: ()
[14:13:39] karmatr0n: has joined #ruby
[14:14:03] rbennacer: has joined #ruby
[14:15:03] jpotter1992: has joined #ruby
[14:15:16] jpotter1992: has left #ruby: ()
[14:15:49] JakFrist: has joined #ruby
[14:16:22] Karix: has joined #ruby
[14:18:30] freerobby: has joined #ruby
[14:19:02] Xeago: has joined #ruby
[14:19:54] al2o3-cr: has joined #ruby
[14:20:47] mwlang: has joined #ruby
[14:21:23] timmyBsd: has joined #ruby
[14:22:07] timmyBsd: heyho, is there any possibilty to enable a shared ssl cached which is available for each openssl sslcontext?
[14:22:46] n008f4g_: has joined #ruby
[14:22:55] Frem: has joined #ruby
[14:22:58] timmyBsd: i want to built a api client, which needes ~200ms to open a strong ssl connection
[14:23:34] timmyBsd: is there any possibility to cache this, like the browsers it does
[14:25:13] droidburgundy: has joined #ruby
[14:26:35] kies: has joined #ruby
[14:26:42] jhass: timmyBsd: you could look into typhoeus' hydra if you need to make a lot of calls fast, that uses libcurl in the background
[14:26:51] smathy: has joined #ruby
[14:27:05] noService: has joined #ruby
[14:28:29] karapetyan: has joined #ruby
[14:29:32] karmatr0n: has joined #ruby
[14:29:47] william3: has joined #ruby
[14:29:56] kappy: has joined #ruby
[14:30:11] jhack: has joined #ruby
[14:32:17] troulouliou_div2: has joined #ruby
[14:34:00] thistle: has joined #ruby
[14:35:23] teoric: has joined #ruby
[14:35:41] timmyBsd: jhass: thanks a lot ;)
[14:35:50] Xeago: has joined #ruby
[14:37:20] minimalism: has joined #ruby
[14:37:37] idletask: has joined #ruby
[14:41:22] lightheaded: has joined #ruby
[14:41:31] skade: has joined #ruby
[14:41:53] kadoppe: has joined #ruby
[14:43:02] Xeago: has joined #ruby
[14:43:44] failshell: has joined #ruby
[14:44:33] jhack: has joined #ruby
[14:45:24] siaW: has joined #ruby
[14:45:43] ekinmur: has joined #ruby
[14:46:18] krz: has joined #ruby
[14:46:36] bronson: has joined #ruby
[14:47:04] pandaant: has joined #ruby
[14:49:34] failshell: im trying to use the Aws::Signers::V4 class and its sign method to generate a proper signature to auth against the RDS REST API. anyone ever got that to work? i could use some help/code review
[14:49:42] failshell: https://gist.github.com/failshell/09e492492e65f440d5837ff9fcdf1104
[14:49:53] Jet4Fire: has joined #ruby
[14:49:57] failshell: i keep getting an error saying the canonical string is wrong
[14:51:16] abyx: has joined #ruby
[14:52:09] jhack: has joined #ruby
[14:52:49] agent_white: has joined #ruby
[14:52:50] kirun: has joined #ruby
[14:53:46] bruno-: has joined #ruby
[14:54:18] JakFrist: has joined #ruby
[14:56:07] Xeago: has joined #ruby
[14:59:08] Begi: has joined #ruby
[14:59:28] Begi: has left #ruby: ()
[14:59:52] madgen: has joined #ruby
[15:01:46] bruno-: has joined #ruby
[15:01:51] Guest38_: has joined #ruby
[15:02:26] dopie2: has joined #ruby
[15:02:30] aegis3121: has joined #ruby
[15:02:32] tvw: has joined #ruby
[15:03:00] tax: has joined #ruby
[15:03:50] skade: has joined #ruby
[15:05:19] mtkd: has joined #ruby
[15:07:18] i: has joined #ruby
[15:08:25] mark3: has joined #ruby
[15:08:28] RegulationD: has joined #ruby
[15:09:21] diegoaguilar: has joined #ruby
[15:10:48] bronson: has joined #ruby
[15:11:04] elifoster: has joined #ruby
[15:11:06] polishdub: has joined #ruby
[15:11:12] rkazak: has joined #ruby
[15:12:06] x77686d: has joined #ruby
[15:12:21] agentmeerkat: has joined #ruby
[15:13:10] JakFrist: has joined #ruby
[15:14:14] noway_: has joined #ruby
[15:15:27] i: has joined #ruby
[15:16:19] kareeoleez: has joined #ruby
[15:16:48] ChiefAlexander: has joined #ruby
[15:17:05] merida_: has joined #ruby
[15:17:39] lightheaded: has joined #ruby
[15:18:33] william3: has joined #ruby
[15:19:44] p0p0pre7: has joined #ruby
[15:21:07] Devalo: has joined #ruby
[15:23:34] kadoppe: has joined #ruby
[15:25:31] blackwell: has joined #ruby
[15:25:47] baweaver: has joined #ruby
[15:28:47] shadeslayer: has joined #ruby
[15:28:57] skade: has joined #ruby
[15:29:03] B4daBing73: has joined #ruby
[15:29:03] B4daBing73: has joined #ruby
[15:29:42] platzhirsch: has joined #ruby
[15:29:42] LoneHerm_: has joined #ruby
[15:31:45] agentmee1kat: has joined #ruby
[15:32:40] davedev24: has joined #ruby
[15:33:15] william3: has joined #ruby
[15:33:20] snowy: has joined #ruby
[15:34:08] ljames: has joined #ruby
[15:34:35] skade: has joined #ruby
[15:36:21] GG: has joined #ruby
[15:37:13] skade: has joined #ruby
[15:37:32] nofacade: has joined #ruby
[15:37:53] KensoDev: has joined #ruby
[15:39:30] sandelius: has joined #ruby
[15:40:28] ssiris: has joined #ruby
[15:41:37] s00pcan_: has joined #ruby
[15:41:46] madgen: has joined #ruby
[15:42:33] blackmesa: has joined #ruby
[15:44:18] tagaulap: has joined #ruby
[15:44:36] marxarelli: has joined #ruby
[15:44:41] ChiefAlexander: has joined #ruby
[15:45:47] platzhirsch: has left #ruby: ()
[15:46:26] thisirs: has joined #ruby
[15:46:34] [Butch]: has joined #ruby
[15:47:13] kristofferR: has joined #ruby
[15:49:14] davedev24: has joined #ruby
[15:49:19] flashpoint9: has joined #ruby
[15:49:43] william3: has joined #ruby
[15:49:46] heyjim: has joined #ruby
[15:49:53] shadeslayer: has joined #ruby
[15:51:11] CoderPuppy: has joined #ruby
[15:52:30] skade: has joined #ruby
[15:52:51] macsteps: has joined #ruby
[15:54:26] nobitanobi: has joined #ruby
[15:55:01] bronson: has joined #ruby
[15:56:26] hinbody_: has joined #ruby
[15:57:49] mostlybadfly: has joined #ruby
[15:58:02] iamarobot: has joined #ruby
[15:59:12] blackmesa: has joined #ruby
[15:59:14] iamarobot: I have a string "Primary IP address: 192.168.0.1\nSecondary IP address: 192.168.0.2". What's the nicest way to extract the IP address into two strings, ip1 and ip2?
[15:59:33] apeiros: iamarobot: what have you tried so far?
[16:00:22] apeiros: (weird amount of spaces btw. - doesn't align, but has more than one)
[16:00:22] baweaver: iamarobot: read: http://code.tutsplus.com/tutorials/ruby-for-newbies-regular-expressions--net-19812
[16:01:19] amclain: has joined #ruby
[16:01:27] iamarobot: apeiros: I'm afraid I've only had a few abortive attempts. I'll read baweaver's link (thanks!)
[16:02:00] apeiros: iamarobot: that's fine too. gist the one you considered to be the most promising
[16:02:40] iamarobot: apeiros: well, I got an IPv4 regex: "^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}$"
[16:03:05] the_drow: has joined #ruby
[16:03:23] iamarobot: And I was doing something like: "string1 =~ <thatregex>"
[16:03:28] apeiros: ok. and how did you apply it? (note that // is the regexp delimiter in ruby, and in //, it'd be \d, not \\d)
[16:03:30] baweaver: now look into string methods
[16:03:46] apeiros: >> Regexp.new("^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}$")
[16:03:47] ruby[bot]: apeiros: # => /^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/ (https://eval.in/551354)
[16:03:59] apeiros: ^ iamarobot - comparison of regex literal and string representing a regex
[16:04:31] baweaver: &ri String#scan
[16:04:31] `derpy: http://ruby-doc.org/core-2.3.0/String.html#method-i-scan
[16:04:32] apeiros: the =~ method will only tell you whether an ipv4 is found in the string (+ the offset)
[16:04:43] bougyman: why does this need regex?
[16:04:45] apeiros: and baweaver was a bit faster to point out String#scan :)
[16:05:05] iamarobot: aha, if it doesn't need regex, all the better.
[16:05:08] mistermocha: has joined #ruby
[16:05:18] nchambers: where is a good place to start learning ruby?
[16:05:21] iamarobot: I confess, I'm not a ruby programmer, but I find myself needing to use it at present.
[16:05:31] apeiros: if it'd align… but without it aligning, I wonder about bougyman's regex-free solution :)
[16:05:33] KensoDev: has joined #ruby
[16:05:35] iamarobot: I'll look into string scan, thanks!
[16:05:47] bougyman: ruby -na -e 'case $F[0];when /^(Primary|Secondary)/;puts $F.last;end' /tmp/foo
[16:06:10] baweaver: string.lines.split(/: +/).map { |(_,last)| last.strip }
[16:06:14] bruno-: has joined #ruby
[16:06:17] nobitanobi: has joined #ruby
[16:06:17] apeiros: those are both using a regex?
[16:06:18] dionysus69: has joined #ruby
[16:06:20] binaryplease1: has joined #ruby
[16:06:22] baweaver: psst, bougyman, that looks like regexen
[16:06:25] bougyman: apeiros: ok, well, I guess so.
[16:06:47] snowy: has joined #ruby
[16:06:50] apeiros: I have an 11 char solution ;-)
[16:07:01] apeiros: (not counting the `string.` part)
[16:07:15] tagaulap: has joined #ruby
[16:07:16] tagaulap: has joined #ruby
[16:07:18] iamarobot: I hate all this regex stuff. It's so bloody unreadable :P
[16:07:20] OTORelic: has joined #ruby
[16:07:31] baweaver: str.scan(/(\d{,3}.{3}\d{,3})/) ?
[16:07:32] iamarobot: Perhaps just because I'm not used to reading it
[16:07:33] apeiros: iamarobot: only a matter of getting used to
[16:07:38] ruby484: has joined #ruby
[16:07:50] apeiros: baweaver: .scan(/\S+$/)
[16:08:04] bougyman: not a space
[16:08:06] apeiros: non-whitespace
[16:08:21] william3: has joined #ruby
[16:08:30] baweaver: but that doesn't extract only IPs
[16:08:39] mistermo_: has joined #ruby
[16:08:42] ruby484: does irc support code blocks
[16:08:43] apeiros: in the given example, it does
[16:09:06] baweaver: fine fine, so mine's more generic then
[16:09:10] baweaver: ACTION needs coffee
[16:09:21] apeiros: you mean, yours is more specific?
[16:09:38] apeiros: or more precise? not sure :D
[16:09:45] baweaver: generic in that it works on anything with IPs in it
[16:09:46] ruby484: I'm trying to convert ruby to haml and I have an odd even table inside a form.
[16:09:52] ruby484: I'm trying to figure out the right syntax to do this
[16:09:55] Xeago: has joined #ruby
[16:09:56] bluOxigen_: has joined #ruby
[16:09:57] apeiros: baweaver: ah, yes
[16:10:10] baweaver: well, not the patch regex, the full IPv4, but you get the point
[16:10:18] apeiros: yupp, I did
[16:10:42] ruby484: does anyone here know much about haml
[16:10:46] baweaver: nchambers: Eloquent Ruby, Ruby the Hard Way, The Well Grounded Rubyist, Ruby Monk
[16:10:47] apeiros: regexen don't free you from having to figure what precisely you want to match and what you don't want to match under which conditions :D
[16:10:54] apeiros: ?links nchambers
[16:10:54] ruby[bot]: nchambers: http://ruby-community.com/pages/links
[16:11:06] baweaver: you and your fancy links
[16:11:16] apeiros: ruby484: "an even/odd table" doesn't really tell me what problem you run into
[16:11:18] iamarobot: baweaver, how would I use yours to assign the IP addresses? primary, secondary = string.lines.split(/: +/).map { |(_,last)| last.strip } doesn't work for me
[16:11:31] apeiros: ruby484: I do those in css, and haml won't give any additional problems with that…
[16:12:18] malconis: has joined #ruby
[16:12:48] nodejunkie: has joined #ruby
[16:12:50] baweaver: >> "Primary IP address: 192.168.0.1\nSecondary IP address: 192.168.0.2".lines.map { |line| line.split(/: */).last.chomp }
[16:12:52] ruby[bot]: baweaver: # => ["192.168.0.1", "192.168.0.2"] (https://eval.in/551362)
[16:13:03] baweaver: ACTION *really* needs coffee
[16:13:28] iamarobot: baweaver: thanks!
[16:13:29] bmf: has joined #ruby
[16:13:37] baweaver: well off I go, be back later.
[16:13:42] iamarobot: thanks for your help, baweaver and apeiros. Very much appreciated. I'll go read up on this stuff
[16:13:50] malconis: has joined #ruby
[16:13:59] apeiros: ?coffee baweaver
[16:13:59] ruby[bot]: baweaver: here's a coffee, you seem to need it: ☕
[16:14:03] edwinvdgraaf: has joined #ruby
[16:14:08] baweaver: of course you do
[16:14:19] nettoweb: has joined #ruby
[16:14:42] baweaver: ?cookie baweaver
[16:14:42] ruby[bot]: baweaver: here's your cookie: 🍪
[16:14:49] baweaver: and with that I'm off
[16:18:58] william3: has joined #ruby
[16:20:08] nofacade: has joined #ruby
[16:20:43] szulak: has joined #ruby
[16:21:10] diegoviola: has joined #ruby
[16:22:25] Xeago: has joined #ruby
[16:23:45] idletask: has joined #ruby
[16:24:04] marens: has joined #ruby
[16:25:44] mistermocha: has joined #ruby
[16:27:15] mistermocha: has joined #ruby
[16:29:53] gigetoo: has joined #ruby
[16:30:00] Alayde: has joined #ruby
[16:30:30] cabargas: has joined #ruby
[16:31:17] Mon_Ouie: has joined #ruby
[16:31:18] perlgod: has joined #ruby
[16:31:48] SCHAAP137: has joined #ruby
[16:32:32] perlgod: has joined #ruby
[16:32:35] ramfjord: has joined #ruby
[16:32:53] perlgod: has joined #ruby
[16:32:58] rclsilver: has joined #ruby
[16:33:17] PedramT: has joined #ruby
[16:33:18] Guest56641: has joined #ruby
[16:33:42] rclsilver: hllo, i've an array of dicts, and i would like to get items which respects this condition: v["environments"].empty?
[16:33:49] rclsilver: what is the best way to achieve this?
[16:35:08] mr_robot_: has joined #ruby
[16:35:42] OTORelic: has joined #ruby
[16:36:37] yxhuvud: rclsilver, some_array.select(&:empty?)
[16:37:03] rclsilver: ununsed_versions = all_versions.collect! { |v| v if v["environment_ids"].empty? } # if found this, and it works. this is a good way?
[16:37:20] yxhuvud: or some_array.select {|v| v['environments'].empty? }
[16:37:52] yxhuvud: a bit redundant, but sure.
[16:38:48] rclsilver: select needs to have "true" to keep it in array, then, select! { |v| v["environment_ids"].empty? } should also works
[16:39:04] noService: has joined #ruby
[16:42:04] dhollinger: has joined #ruby
[16:45:15] babblebre: has joined #ruby
[16:49:08] CausaMortis: has joined #ruby
[16:49:49] symm-: has joined #ruby
[16:50:13] anisha: has joined #ruby
[16:50:19] e4xit: has joined #ruby
[16:51:03] bronson: has joined #ruby
[16:51:09] Infra-Red: has joined #ruby
[16:51:27] Marsupermammal: has joined #ruby
[16:53:25] drptbl_: has joined #ruby
[16:53:53] petertretyakov: has joined #ruby
[16:54:11] tomchapin: has joined #ruby
[16:55:02] rodfersou: has joined #ruby
[16:56:27] treehug88: has joined #ruby
[16:58:15] pawnbox: has joined #ruby
[17:02:48] davedev24: has joined #ruby
[17:03:40] evidex: has joined #ruby
[17:04:11] VeryBewitching: has joined #ruby
[17:05:48] svkurowski: has joined #ruby
[17:06:34] ChiefAlexander: has joined #ruby
[17:07:20] agentmeerkat: has joined #ruby
[17:11:29] zacts: hi rubyists
[17:12:01] rodferso1: has joined #ruby
[17:12:15] shinnya: has joined #ruby
[17:12:33] Zarthus: has joined #ruby
[17:13:46] st1gma: has joined #ruby
[17:13:57] Kilo`byte: has joined #ruby
[17:15:25] codecop: has joined #ruby
[17:15:35] baweaver: has joined #ruby
[17:16:10] aegis3121: has joined #ruby
[17:16:11] dbohdan: has joined #ruby
[17:16:14] edwinvdgraaf: has joined #ruby
[17:17:56] LoneHermit: has joined #ruby
[17:18:10] PedramT: has joined #ruby
[17:18:11] finisherr: has joined #ruby
[17:19:39] karapetyan: has joined #ruby
[17:20:59] Diabolik: has joined #ruby
[17:22:38] spider-mario: has joined #ruby
[17:22:38] merida: has joined #ruby
[17:22:38] [Butch]_: has joined #ruby
[17:23:15] mikecmpbll: has joined #ruby
[17:23:22] dbohdan: has joined #ruby
[17:27:22] Regulati_: has joined #ruby
[17:28:49] ChiefAlexander: has joined #ruby
[17:29:01] dbohdan: has joined #ruby
[17:29:24] hollywood: has joined #ruby
[17:29:34] svkurowski: has joined #ruby
[17:29:53] funnel: has joined #ruby
[17:30:22] dopie: has joined #ruby
[17:30:27] Diabolik: has joined #ruby
[17:30:59] Zarthus: has joined #ruby
[17:31:01] Kilo`byte: has joined #ruby
[17:31:49] chouhoulis: has joined #ruby
[17:33:41] thisirs: has joined #ruby
[17:33:57] Elysia: has joined #ruby
[17:34:34] lomex: has joined #ruby
[17:34:42] Xeago: has joined #ruby
[17:35:05] baweaver: has joined #ruby
[17:35:26] william3: has joined #ruby
[17:35:28] Devalo: has joined #ruby
[17:35:42] st1gma: has joined #ruby
[17:35:46] blackmesa: has joined #ruby
[17:35:56] evie_hammond: has joined #ruby
[17:36:17] Gasher: has joined #ruby
[17:36:36] Zai00: has joined #ruby
[17:36:41] PedramT: has joined #ruby
[17:37:13] JakFrist: has joined #ruby
[17:37:30] cabargas: has joined #ruby
[17:38:51] Ishido: has joined #ruby
[17:39:00] Mia: has joined #ruby
[17:39:01] Mia: has joined #ruby
[17:42:46] Cooooo: has joined #ruby
[17:45:31] blandflakes_: has joined #ruby
[17:46:02] baweaver: has joined #ruby
[17:46:07] bruno-: has joined #ruby
[17:46:47] Cohedrin: has joined #ruby
[17:48:14] st1gma: has joined #ruby
[17:49:02] ascarter: has joined #ruby
[17:50:48] ascarter: has joined #ruby
[17:51:44] Marsupermammal: has joined #ruby
[17:52:43] chouhoulis: has joined #ruby
[17:53:10] firstdayonthejob: has joined #ruby
[17:53:11] kobain: has joined #ruby
[17:54:18] karapetyan: has joined #ruby
[17:58:59] skade: has joined #ruby
[18:00:02] Devbuenuel: has joined #ruby
[18:00:40] akkmaxon: has joined #ruby
[18:01:24] Devalo: has joined #ruby
[18:01:24] infernix: has joined #ruby
[18:02:32] kadoppe: has joined #ruby
[18:03:54] niftylettuce: has joined #ruby
[18:07:08] dmr8: has joined #ruby
[18:07:14] duckpupp1: has joined #ruby
[18:07:34] MagePsycho: has joined #ruby
[18:07:34] snowy: has joined #ruby
[18:07:45] shadowjack: has joined #ruby
[18:07:54] Eiam_: has joined #ruby
[18:07:58] jtoy: has joined #ruby
[18:08:24] cwenner: has joined #ruby
[18:08:46] mikecmpbll: has joined #ruby
[18:10:46] baweaver: has joined #ruby
[18:12:54] leftpad: has joined #ruby
[18:14:28] jaruga__: has joined #ruby
[18:14:58] yfeldblum: has joined #ruby
[18:15:59] ramfjord: has joined #ruby
[18:17:52] statelesscode: has joined #ruby
[18:19:54] Es0teric: has joined #ruby
[18:20:53] matp: has joined #ruby
[18:22:16] Marsupermammal: has joined #ruby
[18:22:50] mdih: has joined #ruby
[18:23:17] CausaMortis_: has joined #ruby
[18:23:30] rbennacer: has joined #ruby
[18:24:20] nofxx: has joined #ruby
[18:24:20] nofxx: has joined #ruby
[18:25:12] jerohm: has joined #ruby
[18:28:15] Cohedrin: has joined #ruby
[18:28:42] RegulationD: has joined #ruby
[18:29:27] Infra-Red: has joined #ruby
[18:30:49] blackmesa: has joined #ruby
[18:31:18] finisherr: has joined #ruby
[18:32:21] sandelius: has joined #ruby
[18:33:10] LastWhisper____: has joined #ruby
[18:33:12] platzhirsch: has joined #ruby
[18:34:13] djbkd: has joined #ruby
[18:35:27] siaW: has left #ruby: ()
[18:37:18] goglosh: has joined #ruby
[18:38:31] idletask: has joined #ruby
[18:38:51] NinjaPanzer: has joined #ruby
[18:40:06] goglosh: I noticed some functional things are awkward in ruby
[18:40:21] goglosh: like recursion! (at least, recursion on lists(arrays))
[18:41:42] Papierkorb: recursion is generally not too great on MRI. But .. what's wrong with #map?
[18:41:47] LaT0rtue: has joined #ruby
[18:42:10] bronson: has joined #ruby
[18:42:53] gigetoo: has joined #ruby
[18:42:54] terlar: has joined #ruby
[18:43:29] abyx: has joined #ruby
[18:43:31] Infra-Red: has joined #ruby
[18:43:59] platzhirsch: has left #ruby: ()
[18:44:16] goglosh: I needed something different
[18:44:51] goglosh: [1, 1, 2, 3, 3, 3].chunk #=> [[1, 1], [2], [3, 3, 3]]
[18:45:02] goglosh: i had to rewrite it in a stateful fashion
[18:45:10] pawnbox: has joined #ruby
[18:45:19] goglosh: I'm wondering if there's a cleaner (more idiomatic) way to do that
[18:45:34] Papierkorb: "stateful fashion"?
[18:45:50] goglosh: lemme find the code
[18:46:05] djbkd: has joined #ruby
[18:46:06] bruno-: has joined #ruby
[18:46:46] Papierkorb: >> [1,1,2,3,3,3].group_by{|a| a}.values
[18:46:48] ruby[bot]: Papierkorb: # => [[1, 1], [2], [3, 3, 3]] (https://eval.in/551574)
[18:46:49] Cohedrin: has joined #ruby
[18:46:52] goglosh: https://gist.github.com/anonymous/6bf24fd0e8536dc0935c8feba8c4461c
[18:47:01] blaxter: has joined #ruby
[18:47:10] goglosh: Papierkorb: MAN! exactly like that
[18:47:28] djbkd: has joined #ruby
[18:47:29] Papierkorb: Happy to help
[18:47:38] goglosh: I mean look at what I did
[18:47:40] goglosh: messy stuff
[18:48:02] goglosh: well not messy but, like, a waste of silicon
[18:48:08] blandflakes: has joined #ruby
[18:48:14] Papierkorb: goglosh: I didn't look too much at your gist, but beware that [1,2,1] will give you [[1,1], [2]]
[18:49:27] Papierkorb: goglosh: What do you need that array for? Do you want to know how many each item appears in the array?
[18:49:46] Infra-Red: has joined #ruby
[18:50:34] goglosh: Papierkorb: well the problem was 'finding the longest sequence of repeated elements in an array'
[18:50:55] Papierkorb: >> [1,3,1,2,3,3].group_by{|a| a}.values
[18:50:56] ruby[bot]: Papierkorb: # => [[1, 1], [3, 3, 3], [2]] (https://eval.in/551579)
[18:50:57] djbkd: has joined #ruby
[18:51:02] Papierkorb: goglosh: I take ^ is not what you want then?
[18:51:14] goglosh: yeah, it doesn't work for the problem
[18:51:24] goglosh: I come from functional land
[18:51:31] goglosh: it's my first time with OOP actually
[18:51:33] karapetyan: has joined #ruby
[18:51:47] goglosh: so maybe my approach of breaking it down into smaller problems is not exactly
[18:51:58] goglosh: is not as good here
[18:52:32] Papierkorb: goglosh: Is this an educational thing for you or what's the ulterior purpose?
[18:52:48] goglosh: it's didactic yeah
[18:52:57] goglosh: I'm learning the language
[18:52:58] adaedra: >> [1, 2, 2, 3, 3, 3].slice_when { |a, b| a != b }.to_a
[18:52:59] ruby[bot]: adaedra: # => [[1], [2, 2], [3, 3, 3]] (https://eval.in/551581)
[18:53:32] cpruitt: has joined #ruby
[18:53:43] adaedra: Fun fact: I just learned about slice_when :p
[18:53:45] goglosh: [1, 2, 1].slice_when { |a, b| a != b }.to_a
[18:53:55] goglosh: >> [1, 2, 1].slice_when { |a, b| a != b }.to_a
[18:53:56] ruby[bot]: goglosh: # => [[1], [2], [1]] (https://eval.in/551582)
[18:54:07] goglosh: adaedra: that's great
[18:54:09] Papierkorb: >> [1,3,1,2,3,3].chunk{|a| a}.map{|item, list| [ item, list.size ]}
[18:54:10] ruby[bot]: Papierkorb: # => [[1, 1], [3, 1], [1, 1], [2, 1], [3, 2]] (https://eval.in/551583)
[18:54:23] goglosh: like, sometimes, it's hard to find EXACTLY what you were looking for
[18:54:46] adaedra: There's sometimes a bit too many methods in Ruby to keep track of all of them.
[18:54:59] adaedra: &ri Array#slice_when
[18:54:59] `derpy: http://ruby-doc.org/core-2.3.0/Enumerable.html#method-i-slice_when
[18:55:00] karmatr0n: has joined #ruby
[18:55:03] goglosh: even though you know it MUST be there
[18:55:12] goglosh: oh my ri is broken
[18:55:25] Papierkorb: goglosh: http://ruby-doc.org/core-2.3.0/Enumerable.html and http://ruby-doc.org/core-2.3.0/Array.html and if you can't find what you're looking for, just ask
[18:55:42] adaedra: fix your ri? what's the problem?
[18:55:52] goglosh: 'nothing known about Array'
[18:56:08] adaedra: ACTION feeds some more documentation to `derpy 
[18:56:15] adaedra: pacman -S ruby-doc # iirc
[18:56:31] `derpy: om nom nom
[18:56:57] goglosh: I feel dumbnow
[18:57:08] goglosh: I was all over google and stackoverflow and even installed rvm
[18:57:11] Papierkorb: goglosh: Are you using ruby from Arch? I don't have that package installed and ri works just fine for me..
[18:57:23] adaedra: Ah, if you're using rvm, it's another story
[18:57:32] goglosh: no I'm not
[18:57:42] cpruitt: has joined #ruby
[18:57:52] goglosh: I got rvm because all answers were about rvm
[18:58:08] goglosh: and tried rvm docs generate and it said "it doesn't work with non-rvm rubies"
[18:58:10] Infra-Red: has joined #ruby
[18:58:23] goglosh: okay then, I wiped the ruby package and used rvm install ruby-head
[18:58:26] Papierkorb: goglosh: on Arch, if you just want to have the latest ruby, just use ruby from the arch repo
[18:58:45] goglosh: ping! here's your fresh ruby install, to generate docs run rvm docs generate
[18:58:57] goglosh: okay I did, and again 'doesn't work with non-rvm rubies'
[18:59:02] goglosh: I went full autist and wiped it
[18:59:08] adaedra: Because you didn't rvm use, I'd say.
[18:59:26] Papierkorb: reloaded your shell and everything? RVM does some funky stuff
[18:59:33] goglosh: anyway ri works now as expected!
[18:59:41] goglosh: Papierkorb: oh... no
[18:59:50] goglosh: anyway, now it's all good and well thanks to
[18:59:52] adaedra: you're using the same database as `derpy does now, congrats!
[19:00:20] goglosh: I'm kind of a mess with computers tbh
[19:00:34] adaedra: yet you successfully installed an Arch Linux.
[19:00:46] ascarter: has joined #ruby
[19:01:16] Papierkorb: Means that at if nothing else, you can read documentation and thus you'll be perfectly fine
[19:03:03] goglosh: anyway, thanks guys
[19:03:38] noService: has joined #ruby
[19:03:43] noService: has joined #ruby
[19:05:51] infernix: has joined #ruby
[19:06:11] davedev24: has joined #ruby
[19:07:56] ctarx: has joined #ruby
[19:08:13] whathapp_: has joined #ruby
[19:09:35] whathappens: has joined #ruby
[19:09:45] solars: has joined #ruby
[19:10:25] davedev24: has joined #ruby
[19:10:35] Cohedrin_: has joined #ruby
[19:10:39] Gasher: hello, I've used RVM but I've heard I shouldn't and it began not to work, so I tried ruby-install, but there is no such command as "use". does it ONLY install select Ruby versions? is there another thing like this in which I can choose my Ruby version?
[19:11:33] perlgod_: has joined #ruby
[19:11:54] aegis3121: has joined #ruby
[19:12:31] smathy: Gasher, chruby or rbenv
[19:12:53] perlgod_: has joined #ruby
[19:13:55] Gasher: well someone told me those two, I found ruby-install and confused it with chruby
[19:14:01] Gasher: they are very similar in their readmes
[19:15:09] anisha: has joined #ruby
[19:15:17] freerobby: has joined #ruby
[19:16:43] failshell: has joined #ruby
[19:17:22] Marsupermammal: has joined #ruby
[19:17:23] Gasher: chruby requires ruby-install and it doesn't work, trying rbenv
[19:17:29] smathy: You need ruby-install too.
[19:17:43] havenwood: Gasher: chruby doesn't require ruby-install
[19:18:05] Cohedrin: has joined #ruby
[19:18:28] havenwood: Gasher: chruby can switch between any Rubies, no matter how you've installed them
[19:18:47] havenwood: Gasher: ruby-install can install Rubies for chruby, RVM, rbenv or with no switcher at all
[19:18:51] Gasher: I have ruby-install at the moment, but I can't use chruby, the only command I have in the shell is chruby-exec
[19:18:51] yxhuvud: gasher: ruby-install *only* installs rubies, and chruby *only* changes between installed rubies.
[19:19:09] baweaver: has joined #ruby
[19:19:17] perlgod: has joined #ruby
[19:19:23] Gasher: I don't see the point of that
[19:19:32] Gasher: does rbenv both things?
[19:19:59] blackmesa: has joined #ruby
[19:21:02] adaedra: rbenv is, like chruby, a tool to switch versions.
[19:21:21] Gasher: can I get a thing that just does both? Jeez
[19:21:26] adaedra: because you have, one some systems (example: Arch and AUR, OS X and homebrew) other ways to install different ruby versions.
[19:22:17] adaedra: chruby's not difficult to install though.
[19:22:54] idletask: has joined #ruby
[19:23:50] Gasher: I couldn't care less about them, they can use their own thing if they want
[19:24:25] yqt: has joined #ruby
[19:24:44] adaedra: Ok, see you when you'll be calm.
[19:25:46] shadoi: has joined #ruby
[19:25:53] Gasher: I am calm, it's just the way I express myself
[19:26:02] Gasher: just stating a fact
[19:26:34] BTRE: has joined #ruby
[19:27:21] mg^: has joined #ruby
[19:27:32] jpfuentes2: has joined #ruby
[19:31:06] schemanic: has joined #ruby
[19:31:23] karapetyan: has joined #ruby
[19:31:51] naftilos76: has joined #ruby
[19:32:44] dionysus69: has joined #ruby
[19:33:17] schemanic: Hey, I'm trying to make a boolean option with -o in this gist: https://gist.github.com/anonymous/2911cff2ecd1cccb0b53512cf11f415b. I keep getting "`[]=': no implicit conversion of Symbol into Integer (TypeError)
[19:33:37] karapetyan: has joined #ruby
[19:33:40] schemanic: i've written it in other ruby files the same way and got it to work but I cant find out what's wrong
[19:33:45] baweaver: has joined #ruby
[19:34:16] GodFather: has joined #ruby
[19:35:08] adaedra: I don't see a -o switch in your code.
[19:35:37] schemanic: I'm sorry adaedra. It's -C now.
[19:35:42] schemanic: It was -o before
[19:35:48] jenrzzz: has joined #ruby
[19:35:48] jenrzzz: has joined #ruby
[19:36:40] pawnbox: has joined #ruby
[19:37:06] n008f4g_: has joined #ruby
[19:37:17] blackmesa: has joined #ruby
[19:37:50] adaedra: shadeslayer: it looks like you're trying to access something as a hash when it's actually an array.
[19:37:56] adaedra: schemanic: ^
[19:38:23] schemanic: right but the object is most definitely a hash
[19:38:29] nando293921: has joined #ruby
[19:38:34] schemanic: also I'm not trying to access something, I'm trying to add a new key
[19:38:43] schemanic: as a subkey of a key that exists
[19:39:10] jaequery: has joined #ruby
[19:39:16] adaedra: from what I see
[19:39:26] adaedra: config[:assets][:custom_file_directory] would be the culprit
[19:40:19] schemanic: the value of that key is a path
[19:40:26] schemanic: as in 'x/y/z'
[19:40:29] baweaver: has joined #ruby
[19:40:32] adaedra: Ah, it's a string.
[19:40:37] adaedra: So close, yet so far.
[19:40:41] akkmaxon: has joined #ruby
[19:40:57] nobitanobi: has joined #ruby
[19:41:07] schemanic: adaedra, so whats the issue then? I don't understand
[19:41:28] schemanic: Am I not allowed to have a key with it's own value, and then have subkeys of it?
[19:41:30] adaedra: >> "you"[:cant] = "do that"
[19:41:31] ruby[bot]: adaedra: # => no implicit conversion of Symbol into Integer (TypeError) ...check link for more (https://eval.in/551623)
[19:41:42] karapetyan: has joined #ruby
[19:41:57] schemanic: I see, so to have subkeys, I cant have parent keys with values
[19:42:11] schemanic: makes sense
[19:42:19] adaedra: because you don't really have "subkeys" – the value of the parent is a hash.
[19:46:05] dionysus69: has joined #ruby
[19:47:09] edwinvdgraaf: has joined #ruby
[19:47:13] schemanic: That makes it much clearer thanks!
[19:49:02] FooMunki: has joined #ruby
[19:51:24] stannard: has joined #ruby
[19:51:52] rodfersou: has joined #ruby
[19:53:03] djbkd: has joined #ruby
[19:53:34] ur5us: has joined #ruby
[19:54:57] yfeldblum: has joined #ruby
[19:55:53] tomchapin: has joined #ruby
[19:55:55] dc4: has joined #ruby
[19:56:29] ascarter: has joined #ruby
[20:00:50] aeterne: has joined #ruby
[20:01:21] bruno-: has joined #ruby
[20:01:29] dopie: has joined #ruby
[20:01:32] PedramT: has joined #ruby
[20:02:43] Musashi007: has joined #ruby
[20:03:54] dopie: has joined #ruby
[20:06:31] elusiveother: does ruby assume pass by reference?
[20:10:27] xaxisx: has joined #ruby
[20:11:57] Es0teric: has joined #ruby
[20:12:38] banister: has joined #ruby
[20:12:40] finisherr: has joined #ruby
[20:12:58] rbennacer: has joined #ruby
[20:13:34] Cohedrin_: has joined #ruby
[20:14:26] Rutix: has joined #ruby
[20:14:26] Rutix: has joined #ruby
[20:14:26] hahuang61: has joined #ruby
[20:14:29] mozzarella: you shouldn't think of it this way
[20:14:33] failshell: has joined #ruby
[20:14:36] Macaveli: has joined #ruby
[20:15:30] mozzarella: they're references to objects, not references to variables, if that makes sense to you
[20:16:59] baweaver: has joined #ruby
[20:17:08] elusiveother: essentially the same thing
[20:17:09] n008f4g_: has joined #ruby
[20:17:34] elusiveother: i was just wanting to know if a = 1, and b = a, if i edit b, will a be edited too?
[20:17:43] elusiveother: and it does appear so
[20:18:03] tvw: has joined #ruby
[20:18:10] eam: elusiveother: what do you mean "edit?"
[20:18:15] mozzarella: you can't edit it
[20:18:23] eam: with integers as you've just used in your example -- you cannot change them
[20:18:26] elusiveother: modify, reassign a value to, etc
[20:18:31] cdg: has joined #ruby
[20:18:55] elusiveother: so ruby is "sometimes" pass by value
[20:19:11] elusiveother: depending on what data type the object is
[20:19:13] cdg: has joined #ruby
[20:19:13] mozzarella: that's not even what it means
[20:19:15] aegis3121: not really.
[20:19:19] elusiveother: which kindof voids the whole everything is an object
[20:19:31] mozzarella: "pass by" is used when refering to functions
[20:19:45] eam: elusiveother: all variables are references
[20:19:52] eam: when you assign you change the reference
[20:20:06] eam: you will never modify an object with =
[20:20:15] mozzarella: if you want to mutate an object, you need to call methods on it
[20:20:45] elusiveother: so how does ruby handle storing strings?
[20:20:59] eam: elusiveother: the object representing the integer 1 is going to confuse you a bit because it's a singleton
[20:21:04] eam: and it's immutable
[20:21:18] mozzarella: strings are mutable
[20:21:38] eam: accordingly, Fixnum has no methods which mutate
[20:21:57] polishdub: has joined #ruby
[20:22:19] millerti: has joined #ruby
[20:22:32] elusiveother: http://pastebin.com/raw/AaK9P3GT
[20:22:32] ruby[bot]: elusiveother: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[20:22:38] elusiveother: is what was confusing me
[20:23:13] eam: elusiveother: assignment always changes the reference, it's not a method on the object and will not mutate anything
[20:23:24] eam: << is a method on String and will mutate the object
[20:23:26] banister: has joined #ruby
[20:23:47] rkazak: has joined #ruby
[20:23:49] PedramT: has joined #ruby
[20:24:50] elusiveother: so all variables are just references to objects where it depends on the data type of the object if that object will be changed or if the variable will simply point to a new object
[20:24:51] DroidBur_: has joined #ruby
[20:25:12] eam: "where it depends" -> if you're talking about = then it never depends
[20:25:31] elusiveother: what of integers though?
[20:25:34] eam: if you're talking about methods, they can mutate their receiver / self
[20:26:03] eam: well, a class can simply not define any methods that mutate self, right?
[20:26:24] eam: 1.next returns a new object 2, but there is no 1.next!
[20:26:40] eam: which we might imagine would modify self, like the C ++ increment operator
[20:27:19] eam: x << "str" mutates x, but x += "str" which is the same as x = x + "str" does not mutate x
[20:28:35] eam: elusiveother: one reason integers don't allow mutation of self is to allow a more efficient internal storage of their object type
[20:28:49] karapetyan: has joined #ruby
[20:29:34] dopie: has joined #ruby
[20:30:33] gigetoo: has joined #ruby
[20:31:28] thistle: has joined #ruby
[20:31:36] Disavowed: has joined #ruby
[20:31:41] Madplatypus: has joined #ruby
[20:31:46] Silox|: has joined #ruby
[20:32:21] idletask: has joined #ruby
[20:32:44] Disavowed: Evening all. Does Ruby use a peephole optimiser for compiling bytecode?
[20:33:16] ekinmur: has joined #ruby
[20:33:43] eam: Disavowed: well, jruby can!
[20:33:55] Disavowed: eam: It can?!
[20:34:02] Disavowed: I've some googling to do!
[20:34:06] eam: provided it's running on a jvm that does it, sure
[20:34:36] dopie: has joined #ruby
[20:34:38] kadoppe: has joined #ruby
[20:34:51] Disavowed: eam: Fascinating! Thank you!
[20:35:02] Disavowed: eam: Can I infer from that answer that CRuby doesn't?
[20:35:20] Infra-Red: has joined #ruby
[20:35:28] eam: I don't believe it does, but I'm very far from an authority on those parts of the internals
[20:36:33] _stu_: has joined #ruby
[20:38:07] Disavowed: eam: No that's fine, you've been great! You wouldn't happen to know if there's anything in Ruby's standard library to access Abstract Syntax Trees or bytecode would you?
[20:38:41] Disavowed: It looks like I have to get a gem called AST for the former, but it feels like something that's probably native and I'm just too new to know about it!
[20:39:40] ChiefAlexander: has joined #ruby
[20:42:00] stannard: has joined #ruby
[20:42:17] eam: Disavowed: the only thing I've played with is ripper, and I'm not sure that's what you're after
[20:43:21] eam: see: ruby -rpp -rripper -e'pp Ripper.sexp "[1,2,3]"'
[20:43:58] Sn0wy: has joined #ruby
[20:44:08] CausaMortis_: has joined #ruby
[20:44:08] CausaMortis: has joined #ruby
[20:44:12] baweaver: has joined #ruby
[20:44:47] Disavowed: eam: This looks exactly what I'm after! Thank you so much!
[20:45:19] PedramT: has joined #ruby
[20:51:21] eam: happy to help
[20:52:15] thistle: has joined #ruby
[20:53:46] n008f4g_: has joined #ruby
[20:54:13] LoneHerm_: has joined #ruby
[20:55:19] Asher: has joined #ruby
[20:55:35] nobitanobi: has joined #ruby
[20:55:43] bronson: has joined #ruby
[20:55:58] stannard: has joined #ruby
[20:56:37] al2o3-cr: has joined #ruby
[20:58:25] dcunit3d: has joined #ruby
[20:59:34] johnmilton: has joined #ruby
[21:00:51] siaW: has joined #ruby
[21:01:06] siaW: has left #ruby: ()
[21:02:50] Gasher^: has joined #ruby
[21:04:06] karapetyan: has joined #ruby
[21:04:48] jhack: has joined #ruby
[21:08:59] madgen: has joined #ruby
[21:09:02] flughafen: has joined #ruby
[21:12:02] Eiam_: has joined #ruby
[21:12:32] finisherr: has joined #ruby
[21:13:56] Cohedrin: has joined #ruby
[21:14:26] blackgoat: has joined #ruby
[21:14:35] Zai00: has joined #ruby
[21:20:18] skade: has joined #ruby
[21:20:44] Don_John: has joined #ruby
[21:21:11] diegoaguilar: has joined #ruby
[21:22:37] idletask: has joined #ruby
[21:27:34] Icey: has joined #ruby
[21:30:11] terminalrecluse: has joined #ruby
[21:30:32] william3: has joined #ruby
[21:31:51] stannard: has joined #ruby
[21:35:34] Begi: has joined #ruby
[21:36:17] Dimik: has joined #ruby
[21:36:43] czerasz: has joined #ruby
[21:37:45] flashpoint9: has joined #ruby
[21:38:47] william3: has joined #ruby
[21:43:08] Es0teric: has joined #ruby
[21:45:09] lkba: has joined #ruby
[21:46:22] banister: has joined #ruby
[21:48:44] Icey: has joined #ruby
[21:50:04] cloaked1: has joined #ruby
[21:50:05] cloaked1: has joined #ruby
[21:50:50] yfeldblum: has joined #ruby
[21:54:07] skade: has joined #ruby
[21:54:09] flashpoint9: has joined #ruby
[22:01:11] baweaver: has joined #ruby
[22:01:53] Xeago: has joined #ruby
[22:02:25] bruno-: has joined #ruby
[22:03:41] dvinciguerra_: has joined #ruby
[22:08:50] baweaver: has joined #ruby
[22:09:35] tax: has joined #ruby
[22:11:49] Keltia: has joined #ruby
[22:16:35] nando293921: has joined #ruby
[22:16:44] freerobby: has joined #ruby
[22:17:05] Es0teric: has joined #ruby
[22:17:47] Es0teric: has joined #ruby
[22:18:27] Es0teric: has joined #ruby
[22:19:39] charliesome_: has joined #ruby
[22:20:43] d5sx43: has joined #ruby
[22:21:01] fowl: has joined #ruby
[22:21:36] fowl: I sshed into my computer from my phone, what do I do next
[22:23:41] d0nn1e: has joined #ruby
[22:23:57] devbug: has joined #ruby
[22:24:49] fowl: It says commandment not found
[22:25:00] jaequery: has joined #ruby
[22:25:26] fowl: This is templeos support channel right
[22:26:16] jaequery: has joined #ruby
[22:26:54] Radar: fowl: no.
[22:26:56] IrishGringo: has joined #ruby
[22:27:10] Radar: !ban fowl
[22:27:10] ruby[bot]: +bbb $a:fowlmouth$#ruby-banned fowl!*@*$#ruby-banned *!*@unaffiliated/fowlmouth$#ruby-banned
[22:27:10] ruby[bot]: ruby[bot] kicked fowl: offense, see http://ruby-community.com/pages/user_rules
[22:27:25] jaequery: has joined #ruby
[22:32:04] daivyk: has joined #ruby
[22:32:38] ChiefAlexander: has joined #ruby
[22:33:03] edwinvdgraaf: has joined #ruby
[22:33:25] dopie: has joined #ruby
[22:35:09] ChiefAlexander_: has joined #ruby
[22:36:49] Gasher: has joined #ruby
[22:38:37] zenlot6: has joined #ruby
[22:39:09] percussionoid: has joined #ruby
[22:40:20] william3: has joined #ruby
[22:43:49] S1kx: has joined #ruby
[22:47:20] Sn0wy: has joined #ruby
[22:48:25] najam: has joined #ruby
[22:55:40] LoneHerm_: has joined #ruby
[22:56:07] najam: has joined #ruby
[22:56:44] Ox0dea: has joined #ruby
[22:59:30] jtoy: has joined #ruby
[22:59:59] ChiefAlexander: has joined #ruby
[23:00:44] skweek: has joined #ruby
[23:01:08] mistermo_: has joined #ruby
[23:01:30] solocshaw: has joined #ruby
[23:02:00] bruno-: has joined #ruby
[23:02:08] NinjaPanzer: has joined #ruby
[23:02:11] mistermo_: has joined #ruby
[23:03:51] jaequery: has joined #ruby
[23:04:57] freerobby: has joined #ruby
[23:06:05] hinbody: has joined #ruby
[23:07:06] flashpoint9: has joined #ruby
[23:15:32] _stu_: has joined #ruby
[23:17:21] jtoy: has joined #ruby
[23:18:15] DLSteve: has joined #ruby
[23:19:01] htmldrum: has joined #ruby
[23:19:30] ur5us: has joined #ruby
[23:20:24] Sn0wy: has joined #ruby
[23:25:28] gnufied: has joined #ruby
[23:26:19] freerobby1: has joined #ruby
[23:28:28] baweaver: has joined #ruby
[23:29:09] ekinmur: has joined #ruby
[23:31:25] tomchapin: has joined #ruby
[23:34:12] RahulT: has joined #ruby
[23:34:43] jhack: has joined #ruby
[23:39:07] darkf: has joined #ruby
[23:40:27] zenlot: has joined #ruby
[23:41:51] william3: has joined #ruby
[23:43:07] flashpoint9: has joined #ruby
[23:43:28] rkazak: has joined #ruby
[23:46:16] mistermocha: has joined #ruby
[23:50:00] diegoaguilar: has joined #ruby
[23:51:24] CloCkWeRX: has joined #ruby
[23:52:01] AmiMoench: has joined #ruby
[23:52:15] Ropeney: has joined #ruby
[23:52:48] swills: has joined #ruby
[23:55:30] daytime: has joined #ruby
[23:56:32] wolffles: has joined #ruby
[23:59:10] banister: has joined #ruby