« Back to channel list

#ruby - 09 December 2017

« Back 1 day Forward 1 day »
[00:02:23] madprops: has joined #ruby
[00:02:41] madprops: someone is having some problem with parsing some javascript files' ` (template tags) with rake
[00:02:51] madprops: is that a common problem? would simply upgrading to a new rake fix it?
[00:03:14] workmad3: has joined #ruby
[00:03:49] jrabe: has joined #ruby
[00:04:19] chocoelho: has joined #ruby
[00:09:25] apeiros: madprops: why'd you parse javascript files with rake?
[00:09:36] apeiros: rake runs ruby scripts, not javascript
[00:11:07] madprops: apeiros, im not really sure. But someone is having trouble with it for some reason "msg.js uses the \` character, which does not work too well with
[00:11:07] mtkd: has joined #ruby
[00:11:08] madprops: diaspora’s rake. "
[00:11:31] apeiros: madprops: well, without more information, this makes no sense.
[00:13:49] dminuoso: apeiros: You should get some sleep.
[00:13:54] dminuoso: It's late in Switzerland.
[00:14:00] JinJin: has joined #ruby
[00:14:08] cdg: has joined #ruby
[00:14:09] apeiros: dminuoso: very much unlike your country? :-p
[00:15:17] GodFather: has joined #ruby
[00:15:30] blackmesa1: has joined #ruby
[00:17:56] cschneid_: has joined #ruby
[00:18:07] JinJin: does anyone here have experience with TCP connections? I have a server that accepts connections using accept. I can write to sockets when I call TCPSocket.new(), but when I try to write to a socket that I've accepted, it doesn't work. Is this behavior expected?
[00:18:38] apeiros: define "doesn't work"
[00:18:40] PaulCapestany: has joined #ruby
[00:19:08] JinJin: as in the other socket does not receive anything
[00:19:26] apeiros: ?code JinJin
[00:19:27] ruby[bot]: JinJin: We can't help you without your code, please post it to https://gist.github.com
[00:19:29] cagomez: has joined #ruby
[00:19:40] JinJin: its pretty long but alright
[00:20:35] JinJin: https://codeshare.io/5Z7Dkd
[00:20:40] apeiros: well, make a simple reproducible example from it
[00:21:11] dminuoso: JinJin: And let this be the last day you have heard about $ and global variables.
[00:21:15] dminuoso: Feel free to forget they existed.
[00:21:29] JinJin: ok thanks
[00:22:18] JinJin: If I have a = TCPServer.new someportnumber. And I receive a socket for instance: socket = a.accept. Can I write to it? As in socket.write(...)
[00:22:32] dminuoso: JinJin: Make a testcase.
[00:23:18] JinJin: I've been doing so with my code, I can only receive or establish connections. I can't write to clients that I've accepted
[00:23:20] cagomez: has joined #ruby
[00:23:37] JinJin: Unless the behavior is unexpected, then I assume I'm doing something wrong
[00:24:29] dminuoso: apeiros: do we have a testcase factoid?
[00:25:17] apeiros: moment, busy right now
[00:29:06] c0ncealed: has joined #ruby
[00:31:06] shinnya: has joined #ruby
[00:31:25] apeiros: dminuoso: a list of all factoids is live on the ruby-community.com website
[00:31:41] apeiros: JinJin: yes, you can write to a socket you created with a_tcp_server.accept
[00:32:33] JinJin: ok thanks. For whatever reason I can't
[00:34:05] apeiros: as for your code sample - yeah, no. not gonna read that much code. write a simple tcpserver, go from there.
[00:34:14] apeiros: or isolate your problem before
[00:34:22] jenrzzz: has joined #ruby
[00:34:23] jenrzzz: has joined #ruby
[00:34:35] apeiros: and +1 re globals
[00:35:00] JinJin: Thanks though!
[00:35:08] PaulCapestany: has joined #ruby
[00:38:05] ogres: has joined #ruby
[00:42:06] orbyt_: has joined #ruby
[00:43:34] GodFather: has joined #ruby
[00:49:10] apeiros: JinJin: I partially read your code. I don't see your code to create a socket actually being called.
[00:49:37] apeiros: also I don't see you writing to a socket accepted by the server except for when you receive data on it before
[00:50:07] apeiros: IMO make sure your assumptions are actually correct. that you do actually create a socket, that the server actually accepts a connection, that you actually write from the client side, etc.
[00:51:43] JinJin: yea, i saved my output to a file
[00:51:57] guardianx: has joined #ruby
[00:53:58] JinJin: apeiros: In my code on line 319, i accept incoming connections and save them on line 368. But in line 405 when I write, nodes I've accepted don't receive anything
[00:54:05] JinJin: I'll just paste my output below that
[00:56:35] Hanmac: has joined #ruby
[00:57:53] PaulCapestany: has joined #ruby
[01:01:12] dviola: has joined #ruby
[01:03:40] jenrzzz: has joined #ruby
[01:03:40] jenrzzz: has joined #ruby
[01:04:33] milardovich: has joined #ruby
[01:05:22] apeiros: JinJin: try `Thread.abort_on_exception = true` at the start of your code
[01:05:35] apeiros: I wouldn't be surprised if one of your threads just silently crashes.
[01:05:51] JinJin: apeiros: Thanks, will try that!
[01:06:06] GodFather: has joined #ruby
[01:06:23] selim: has joined #ruby
[01:08:37] GodFather: has joined #ruby
[01:09:29] BTRE: has joined #ruby
[01:10:10] milardovich: has joined #ruby
[01:12:24] eckhardt: has joined #ruby
[01:13:35] GodFather: has joined #ruby
[01:14:40] milardov_: has joined #ruby
[01:16:07] pilne: has joined #ruby
[01:19:14] jackjackdripper: has joined #ruby
[01:20:35] techn1cs: has joined #ruby
[01:20:35] techn1cs: has joined #ruby
[01:23:06] orbyt_: has joined #ruby
[01:39:42] cdg: has joined #ruby
[01:39:48] cschneid_: has joined #ruby
[01:40:03] nexustrap: has joined #ruby
[01:43:16] madprops: has left #ruby: ("Leaving")
[01:43:45] milardovich: has joined #ruby
[01:46:02] eightlimbed: has joined #ruby
[01:47:12] cschneid_: has joined #ruby
[01:49:42] psmolen: has joined #ruby
[01:51:06] Technodrome: has joined #ruby
[01:58:34] iMadper`: has joined #ruby
[02:00:25] cschneid_: has joined #ruby
[02:01:37] chocoelho: has joined #ruby
[02:03:44] workmad3: has joined #ruby
[02:09:21] mjolnird: has joined #ruby
[02:11:39] milardovich: has joined #ruby
[02:16:42] Dimik: has joined #ruby
[02:18:14] orbyt_: has joined #ruby
[02:21:06] cognoscente: has joined #ruby
[02:21:53] jtdoncas: has joined #ruby
[02:22:01] dviola: has joined #ruby
[02:27:07] mson: has joined #ruby
[02:33:32] gizmore|2: has joined #ruby
[02:34:39] jxv: has joined #ruby
[02:35:47] Asher: has joined #ruby
[02:41:18] bkxd: has joined #ruby
[02:50:39] d^sh: has joined #ruby
[02:51:12] Sammichmaker: has joined #ruby
[02:51:12] Sammichmaker: has joined #ruby
[02:52:00] jxv: has joined #ruby
[02:53:23] phenom: has joined #ruby
[02:55:19] elphe: has joined #ruby
[02:56:03] tAn: has joined #ruby
[02:56:49] mohabaks: has joined #ruby
[02:58:17] milardovich: has joined #ruby
[02:59:04] BTRE: has joined #ruby
[02:59:54] phenom: has joined #ruby
[03:00:19] cadillac_: has joined #ruby
[03:00:46] bkxd: has joined #ruby
[03:01:31] bkxd_: has joined #ruby
[03:02:53] chocoelho: has joined #ruby
[03:15:50] bkxd: has joined #ruby
[03:17:26] nadir: has joined #ruby
[03:21:42] Technodrome: has joined #ruby
[03:21:46] BuildTheRobots: has joined #ruby
[03:23:00] BuildTheRobots: good evening people. If i have an array including a negative number, how can I have a.max do the sensible thing (in this case return +7, not -10 as the largest number)
[03:23:22] BuildTheRobots: a=[1,7,-10]; puts a.max
[03:25:25] BuildTheRobots: oh, ok, a.values.max, ok, i'm an idiot :)
[03:26:15] kfpratt: has joined #ruby
[03:26:28] shinnya: has joined #ruby
[03:32:32] NeverTired: has joined #ruby
[03:33:25] nofxx1: has joined #ruby
[03:37:04] cdg: has joined #ruby
[03:37:39] milardovich: has joined #ruby
[03:38:53] bmurt: has joined #ruby
[03:43:44] jenrzzz: has joined #ruby
[03:43:45] jenrzzz: has joined #ruby
[03:57:47] jenrzzz: has joined #ruby
[03:57:48] jenrzzz: has joined #ruby
[03:59:38] jnix: has joined #ruby
[04:03:19] cadillac_: has joined #ruby
[04:04:10] workmad3: has joined #ruby
[04:11:25] jnyw: has joined #ruby
[04:12:01] bkxd: has joined #ruby
[04:12:43] cdg: has joined #ruby
[04:12:49] Hanmac1: has joined #ruby
[04:18:07] cschneid_: has joined #ruby
[04:18:11] baweaver: BuildTheRobots: as is that'd return 7
[04:18:27] baweaver: >> [1,7,-10].max
[04:18:28] ruby[bot]: baweaver: # => 7 (https://eval.in/915681)
[04:18:39] baweaver: unless you threw it through abs or something
[04:18:46] baweaver: >> [1,7,-10].max_by(&:abs)
[04:18:48] ruby[bot]: baweaver: # => -10 (https://eval.in/915682)
[04:19:18] BuildTheRobots: baweaver, i might have messed up my example, in fact i did, these are values in a hash, not an array
[04:19:37] baweaver: that would indeed complicate matters
[04:19:51] baweaver: remember that Hashes give two arguments to those functions
[04:20:09] BuildTheRobots: though i think hash.values.max did do the "correct" thing
[04:20:18] BuildTheRobots: or did what I expected, rather....
[04:20:37] baweaver: >> h = {a: 10, b: 4}; [h.max { |k,v| v}, h.max { |k,v| k }]
[04:20:38] ruby[bot]: baweaver: # => undefined method `>' for [:a, 10]:Array (NoMethodError) ...check link for more (https://eval.in/915684)
[04:20:43] BuildTheRobots: hashes give two arguments? for max_by? apologies, i've only been using ruby for a few days o.0
[04:21:05] baweaver: >> h = {a: 10, b: 4}; [h.max { |(k,v)| v}, h.max { |(k,v)| k }]
[04:21:06] ruby[bot]: baweaver: # => comparison of Symbol with 0 failed (ArgumentError) ...check link for more (https://eval.in/915685)
[04:21:23] BuildTheRobots: stupid demogods ;)
[04:21:30] baweaver: &ri Enumerable
[04:21:30] `derpy: http://ruby-doc.org/core-2.4.1/Enumerable.html
[04:21:34] baweaver: that's your best friend
[04:21:39] baweaver: also see the channel topic
[04:21:45] baweaver: I hid a book list up there a while back
[04:22:16] BuildTheRobots: ah ace, thanks you.
[04:22:25] BuildTheRobots: for contect, i got about 5 steps into a codeweavers learning ruby course and then got distracted actually tring to use it... so I'm kinda blundering forward solving adventofcode problems without yet understanding objects o.0
[04:27:11] cschneid_: has joined #ruby
[04:27:13] milardovich: has joined #ruby
[04:27:22] elphe: has joined #ruby
[04:32:54] jxv: has joined #ruby
[04:40:32] oetjenj: has joined #ruby
[04:41:35] eightlimbed: has joined #ruby
[04:41:54] dreamthese: has joined #ruby
[04:42:59] guardianx: has joined #ruby
[04:44:07] mohabaks: has joined #ruby
[04:45:47] mohabaks: has joined #ruby
[04:46:15] cognoscente: has joined #ruby
[04:47:58] eightlimbed: has joined #ruby
[04:55:23] eightlimbed: has joined #ruby
[04:56:33] bkxd: has joined #ruby
[04:56:38] baweaver: BuildTheRobots: well feel free to ask whatever
[04:56:45] baweaver: First time coding or have you tried a few languages before?
[04:58:24] BuildTheRobots: i do bits of ops, so previously have been hacking scripts in perl, but i'm the first to point out i'm not a dev. A friend is using RoR so it seemed like a good excuse to learn ruby. so far i'm quite enjoying it
[04:58:59] andrevan: has joined #ruby
[04:59:22] BuildTheRobots: not sure if you've seen http://adventofcode.com/2017 or not. last year I found it substantially harder compared to this year armed with nothing but a third of a ruby tutorial ;)
[05:01:21] DTZUZO: has joined #ruby
[05:06:06] jhill_: has joined #ruby
[05:06:43] justache_: has joined #ruby
[05:07:02] Meow-J_: has joined #ruby
[05:07:24] yokel: has joined #ruby
[05:09:01] NeverTired: has joined #ruby
[05:09:38] oz: has joined #ruby
[05:11:07] bkxd: has joined #ruby
[05:11:07] bmurt: has joined #ruby
[05:11:07] DanielShaver: has joined #ruby
[05:11:07] techn1cs: has joined #ruby
[05:11:07] c0ncealed: has joined #ruby
[05:11:07] sagax: has joined #ruby
[05:11:07] konsolebox: has joined #ruby
[05:11:07] mattp_: has joined #ruby
[05:11:07] Guest77835: has joined #ruby
[05:11:08] Takumo: has joined #ruby
[05:11:08] jxf: has joined #ruby
[05:11:08] vqrs: has joined #ruby
[05:11:08] ahrs: has joined #ruby
[05:11:08] dcluna: has joined #ruby
[05:11:08] ShekharReddy: has joined #ruby
[05:11:08] Uptime: has joined #ruby
[05:11:08] Guest9063: has joined #ruby
[05:11:08] brucebag: has joined #ruby
[05:11:08] levifig: has joined #ruby
[05:11:08] rupam123456: has joined #ruby
[05:11:08] pppktz: has joined #ruby
[05:11:08] Guest32854: has joined #ruby
[05:11:08] reu: has joined #ruby
[05:11:08] hinbody: has joined #ruby
[05:11:08] naquad: has joined #ruby
[05:11:08] Kilo`byte: has joined #ruby
[05:11:08] BackEndCoder: has joined #ruby
[05:11:08] yosafbridge: has joined #ruby
[05:11:08] CrazyEddy: has joined #ruby
[05:11:08] bronson_: has joined #ruby
[05:11:09] gil_: has joined #ruby
[05:11:09] bathtub_shark: has joined #ruby
[05:11:09] nausea-: has joined #ruby
[05:11:09] Zarthus: has joined #ruby
[05:11:09] quiller: has joined #ruby
[05:11:09] dupondje: has joined #ruby
[05:11:09] beccamorgan: has joined #ruby
[05:11:09] wnd: has joined #ruby
[05:11:09] m4rCsi: has joined #ruby
[05:11:09] Liothen: has joined #ruby
[05:11:09] lele: has joined #ruby
[05:11:09] balo: has joined #ruby
[05:11:09] veloutin: has joined #ruby
[05:11:09] chaos95: has joined #ruby
[05:11:09] TvL2386: has joined #ruby
[05:11:09] rgs: has joined #ruby
[05:11:09] nikkyjr: has joined #ruby
[05:11:09] spider-mario: has joined #ruby
[05:11:09] pabs: has joined #ruby
[05:11:09] surrounder: has joined #ruby
[05:11:10] jaredrhine: has joined #ruby
[05:11:10] bokayio: has joined #ruby
[05:12:03] BuildTheRobots: hmm, is there a fuzzy equivalent of include? eg so it returns true: a=["foobar"]; a.include? 'foo'
[05:12:08] jhill_: has joined #ruby
[05:12:08] Meow-J_: has joined #ruby
[05:12:08] justache_: has joined #ruby
[05:12:08] NeverTired: has joined #ruby
[05:12:30] Guest9063: has joined #ruby
[05:12:49] Guest9063: has joined #ruby
[05:13:09] baweaver: BuildTheRobots: ever used regex?
[05:13:12] ShekharReddy: has joined #ruby
[05:13:33] zack6849: has joined #ruby
[05:13:33] Voxxit: has joined #ruby
[05:13:53] BuildTheRobots: baweaver: i have, but only with strings
[05:13:59] BTRE: has joined #ruby
[05:13:59] tAn: has joined #ruby
[05:13:59] psmolen: has joined #ruby
[05:13:59] pragmatism: has joined #ruby
[05:13:59] nowhere_man: has joined #ruby
[05:13:59] dminuoso: has joined #ruby
[05:13:59] |ifei5g00d: has joined #ruby
[05:13:59] Barrt: has joined #ruby
[05:14:00] nchambers: has joined #ruby
[05:14:00] chromis: has joined #ruby
[05:14:00] armando: has joined #ruby
[05:14:00] Jello_Raptor: has joined #ruby
[05:14:00] mbr: has joined #ruby
[05:14:00] yxhuvud: has joined #ruby
[05:14:00] esObe: has joined #ruby
[05:14:00] miah: has joined #ruby
[05:14:00] reaVer: has joined #ruby
[05:14:00] erlend: has joined #ruby
[05:14:00] EXCHGR: has joined #ruby
[05:14:00] nathani: has joined #ruby
[05:14:00] brainslug: has joined #ruby
[05:14:00] hxegon: has joined #ruby
[05:14:00] PaulePanter: has joined #ruby
[05:14:00] chihhsin: has joined #ruby
[05:14:00] redondos: has joined #ruby
[05:14:00] seitensei: has joined #ruby
[05:14:00] chrisarcand: has joined #ruby
[05:14:00] jpterry: has joined #ruby
[05:14:00] fmccann: has joined #ruby
[05:14:00] jolamb: has joined #ruby
[05:14:00] modin: has joined #ruby
[05:14:00] kke: has joined #ruby
[05:14:01] personofinterest: has joined #ruby
[05:14:01] ryotarai: has joined #ruby
[05:14:01] ikopico: has joined #ruby
[05:14:01] NicolasHov: has joined #ruby
[05:14:01] musl_: has joined #ruby
[05:14:01] iamayam: has joined #ruby
[05:14:01] justinmrkva: has joined #ruby
[05:14:01] Nilium: has joined #ruby
[05:14:01] Keltia: has joined #ruby
[05:14:01] g3funk: has joined #ruby
[05:14:01] llua: has joined #ruby
[05:14:35] teej: has joined #ruby
[05:14:35] Hanmac1: has joined #ruby
[05:14:35] WhereIsMySpoon: has joined #ruby
[05:14:35] cpruitt: has joined #ruby
[05:14:35] oleo: has joined #ruby
[05:14:35] sonOfRa: has joined #ruby
[05:14:35] rann: has joined #ruby
[05:14:35] Nuck: has joined #ruby
[05:14:35] jnix: has joined #ruby
[05:14:35] kernelPaniq: has joined #ruby
[05:14:35] gigetoo: has joined #ruby
[05:14:35] Flonk: has joined #ruby
[05:14:35] harmaahylje: has joined #ruby
[05:14:35] ghormoon: has joined #ruby
[05:14:35] Biohazard: has joined #ruby
[05:14:35] Vashy: has joined #ruby
[05:14:35] lxsameer: has joined #ruby
[05:14:35] Cyrus: has joined #ruby
[05:14:35] rcs: has joined #ruby
[05:14:35] tris: has joined #ruby
[05:14:35] devn: has joined #ruby
[05:14:35] drbrain: has joined #ruby
[05:14:35] LoRez: has joined #ruby
[05:14:36] Prira: has joined #ruby
[05:14:36] ElderFain: has joined #ruby
[05:14:36] mjuhl: has joined #ruby
[05:14:36] Gnubie_: has joined #ruby
[05:14:36] KramerC: has joined #ruby
[05:14:36] oblique: has joined #ruby
[05:14:36] joes: has joined #ruby
[05:14:36] mclee: has joined #ruby
[05:14:36] dyyylan: has joined #ruby
[05:14:36] tsul: has joined #ruby
[05:14:36] zachary12: has joined #ruby
[05:14:36] pocketprotector: has joined #ruby
[05:14:36] Sou|cuttr: has joined #ruby
[05:14:36] bayed: has joined #ruby
[05:14:36] Koshian: has joined #ruby
[05:14:36] webhat: has joined #ruby
[05:14:38] baweaver: The top functions you want to know by heart in Ruby for Enumerable are: map, select, find, and reduce
[05:14:43] teej: has joined #ruby
[05:14:58] ghormoon: has joined #ruby
[05:15:04] d^sh: has joined #ruby
[05:15:05] dinfuehr: has joined #ruby
[05:15:07] moei: has joined #ruby
[05:15:07] SCHAAP137: has joined #ruby
[05:15:07] Technodrome: has joined #ruby
[05:15:07] Asher: has joined #ruby
[05:15:08] orbyt_: has joined #ruby
[05:15:08] iMadper`: has joined #ruby
[05:15:08] selim: has joined #ruby
[05:15:08] tcopeland: has joined #ruby
[05:15:08] spectrum: has joined #ruby
[05:15:08] minimalism: has joined #ruby
[05:15:08] Eiam: has joined #ruby
[05:15:08] Xeago: has joined #ruby
[05:15:08] mikeiniowa: has joined #ruby
[05:15:08] NL3limin4t0r: has joined #ruby
[05:15:08] chmurifree: has joined #ruby
[05:15:08] ar: has joined #ruby
[05:15:08] n13z: has joined #ruby
[05:15:08] href: has joined #ruby
[05:15:08] adaedra: has joined #ruby
[05:15:08] hahuang65: has joined #ruby
[05:15:08] MrSparkle: has joined #ruby
[05:15:08] MrBismuth: has joined #ruby
[05:15:08] Authenticator: has joined #ruby
[05:15:08] Utkarsh_: has joined #ruby
[05:15:08] dhollinger: has joined #ruby
[05:15:08] ByronJohnson: has joined #ruby
[05:15:09] Lyubo1: has joined #ruby
[05:15:09] Vircung: has joined #ruby
[05:15:09] cpallares: has joined #ruby
[05:15:09] fullstack: has joined #ruby
[05:15:09] Caius: has joined #ruby
[05:15:09] segy: has joined #ruby
[05:15:09] Dark_Arc: has joined #ruby
[05:15:09] lucas: has joined #ruby
[05:15:09] irick: has joined #ruby
[05:15:09] ged: has joined #ruby
[05:15:09] Guest29916: has joined #ruby
[05:15:09] marienz: has joined #ruby
[05:15:09] guardian: has joined #ruby
[05:15:09] djbkd: has joined #ruby
[05:15:11] baweaver: select is the one you'd normally want to use, but it turns out there's another one that's even more applicable in this specific case
[05:15:19] baweaver: amusingly named grep
[05:15:44] baweaver: >> %w(foo bar foobar).grep(/foo/)
[05:15:45] ruby[bot]: baweaver: # => ["foo", "foobar"] (https://eval.in/915694)
[05:15:52] Voxxit: has joined #ruby
[05:15:53] cadillac_: has joined #ruby
[05:15:53] shinnya: has joined #ruby
[05:15:53] eb0t: has joined #ruby
[05:15:53] reber: has joined #ruby
[05:15:53] dreamthese: has joined #ruby
[05:15:54] gizmore|2: has joined #ruby
[05:15:54] Dimik: has joined #ruby
[05:15:54] Mia: has joined #ruby
[05:15:54] veeti: has joined #ruby
[05:15:54] norm: has joined #ruby
[05:15:54] VladGh: has joined #ruby
[05:15:54] waveprop: has joined #ruby
[05:15:54] Emmanuel_Chanel: has joined #ruby
[05:15:54] faces: has joined #ruby
[05:15:54] Fraeon: has joined #ruby
[05:15:54] QualityAddict: has joined #ruby
[05:15:54] `derpy: has joined #ruby
[05:15:54] Tharbakim: has joined #ruby
[05:15:54] mniip: has joined #ruby
[05:15:54] nertzy: has joined #ruby
[05:15:54] jsaak: has joined #ruby
[05:15:54] z3uS: has joined #ruby
[05:15:54] kenichi_: has joined #ruby
[05:15:54] TheBrayn: has joined #ruby
[05:15:54] flori: has joined #ruby
[05:15:54] perry: has joined #ruby
[05:15:54] aspiers: has joined #ruby
[05:15:54] hurricanehrndz: has joined #ruby
[05:15:54] pecan: has joined #ruby
[05:15:55] shortdudey123: has joined #ruby
[05:15:55] CBebop: has joined #ruby
[05:15:55] planigan: has joined #ruby
[05:15:55] edwardly: has joined #ruby
[05:15:55] coderphive: has joined #ruby
[05:15:55] ltp: has joined #ruby
[05:15:55] cout: has joined #ruby
[05:15:55] syndikate: has joined #ruby
[05:15:55] knight-: has joined #ruby
[05:15:55] moei: has joined #ruby
[05:15:59] Uptime: has joined #ruby
[05:16:06] segy: has joined #ruby
[05:16:09] Axy: has joined #ruby
[05:16:09] Axy: has joined #ruby
[05:16:15] baweaver: man that was a nasty netsplit
[05:16:31] teej: has joined #ruby
[05:16:35] heinrich5991: has joined #ruby
[05:16:37] MrBismuth: has joined #ruby
[05:16:50] edwardly: has joined #ruby
[05:16:50] edwardly: has joined #ruby
[05:17:24] QualityAddict: has joined #ruby
[05:17:27] eblip: has joined #ruby
[05:17:44] SCHAPiE: has joined #ruby
[05:17:59] c0ncealed: has joined #ruby
[05:18:17] eckhardt: has joined #ruby
[05:18:47] nyuszika7h_: has joined #ruby
[05:19:29] roger_rabbit: has joined #ruby
[05:20:02] eightlimbed: has joined #ruby
[05:20:08] bunnypuncher: has joined #ruby
[05:20:39] yokel: has joined #ruby
[05:21:26] justache: has joined #ruby
[05:23:02] BuildTheRobots: ah, grp would probably be easier
[05:23:32] BuildTheRobots: i'm using a regex or trying to, but having issues using a variable _between_ the slashes, so as part of the match condition
[05:24:08] BuildTheRobots: is that actually possible? values.find {|e| /VARIABLE/ =~ e}
[05:26:13] baweaver: grep takes a string
[05:26:17] BuildTheRobots: i have the same problems using grep, can't use a vaeriable as the match term
[05:26:38] baweaver: (or really anything that responds to ===)
[05:26:46] baweaver: https://medium.com/rubyinside/triple-equals-black-magic-d934936a6379
[05:26:48] baweaver: Give that a read
[05:27:00] elphe: has joined #ruby
[05:28:01] BuildTheRobots: hmm, same problem. so how do I use dynamic data as the match term in a regx?
[05:28:14] baweaver: interpolation also works with regex
[05:28:26] jxv: has joined #ruby
[05:28:48] BuildTheRobots: how does that work?
[05:29:04] baweaver: >> a = 'foo'; %w(foobarbaz barbaz foobar).grep(/#{a}bar/)
[05:29:05] ruby[bot]: baweaver: # => ["foobarbaz", "foobar"] (https://eval.in/915721)
[05:29:09] baweaver: same as with a string
[05:30:49] ahrs: has joined #ruby
[05:31:30] BuildTheRobots: f = 'foo'; b = 'boo'; print success if %w(foobar).grep(/#{f}/)
[05:31:48] BuildTheRobots: >> f = 'foo'; b = 'boo'; print success if %w(foobar).grep(/#{f}/)
[05:31:49] ruby[bot]: BuildTheRobots: # => undefined local variable or method `success' for main:Object (NameError) ...check link for more (https://eval.in/915725)
[05:32:02] BuildTheRobots: >> f = 'foo'; b = 'boo'; print "success" if %w(foobar).grep(/#{f}/)
[05:32:03] ruby[bot]: BuildTheRobots: # => successnil (https://eval.in/915726)
[05:32:10] BuildTheRobots: >> f = 'foo'; b = 'boo'; print "success" if %w(foobar).grep(/#{b}/)
[05:32:11] ruby[bot]: BuildTheRobots: # => successnil (https://eval.in/915727)
[05:32:28] BuildTheRobots: b should not print success, (the second attempt) the string boo does not apear
[05:32:59] milardovich: has joined #ruby
[05:33:18] BuildTheRobots: >> f = 'foo'; b = 'boo'; print "success" if %w(foobar).grep(/foo/)
[05:33:20] ruby[bot]: BuildTheRobots: # => successnil (https://eval.in/915728)
[05:33:23] BuildTheRobots: >> f = 'foo'; b = 'boo'; print "success" if %w(foobar).grep(/boo/)
[05:33:24] ruby[bot]: BuildTheRobots: # => successnil (https://eval.in/915729)
[05:34:13] bunnypuncher: has joined #ruby
[05:34:14] BuildTheRobots: ok, so at the end of all that, i think i learn that i can't use a regex match in an if statement
[05:34:52] BuildTheRobots: so going back to the start, how can i do an `if (fuzzymatch variable against array == success) do something
[05:36:09] bunnypuncher: has left #ruby: ()
[05:39:29] elphe: has joined #ruby
[05:39:52] jrabe: has joined #ruby
[05:39:52] mcr1: has joined #ruby
[05:39:52] bradleyprice: has joined #ruby
[05:39:52] postmodern: has joined #ruby
[05:39:52] zapata: has joined #ruby
[05:39:52] scott4000: has joined #ruby
[05:39:52] cschneid: has joined #ruby
[05:39:52] DarkBushido: has joined #ruby
[05:39:52] jtperreault: has joined #ruby
[05:39:52] larissa: has joined #ruby
[05:39:52] G: has joined #ruby
[05:39:52] kent\n: has joined #ruby
[05:39:52] caw__: has joined #ruby
[05:39:52] wsmoak: has joined #ruby
[05:39:53] justizin: has joined #ruby
[05:39:53] peteretep: has joined #ruby
[05:39:53] russt: has joined #ruby
[05:39:53] endemic: has joined #ruby
[05:39:53] thinkpad: has joined #ruby
[05:39:53] swgillespie: has joined #ruby
[05:39:53] Swat2: has joined #ruby
[05:39:53] infernix: has joined #ruby
[05:39:53] kapowaz: has joined #ruby
[05:39:53] ewilliam: has joined #ruby
[05:39:53] pwillard: has joined #ruby
[05:39:53] darthThorik: has joined #ruby
[05:39:53] ablackack_: has joined #ruby
[05:39:53] Kuukunen: has joined #ruby
[05:39:53] mitchellvanw: has joined #ruby
[05:39:53] inukshuk: has joined #ruby
[05:39:53] ineb: has joined #ruby
[05:39:53] celine_: has joined #ruby
[05:39:53] Qommand0r: has joined #ruby
[05:39:53] Jicemo_: has joined #ruby
[05:39:54] j00n: has joined #ruby
[05:39:54] cajone: has joined #ruby
[05:39:54] aef_: has joined #ruby
[05:39:54] twe4ked: has joined #ruby
[05:39:54] romain_t: has joined #ruby
[05:39:54] tuelz: has joined #ruby
[05:40:09] jrabe`: has joined #ruby
[05:40:17] Kuukunen: has joined #ruby
[05:41:04] cschneid_: has joined #ruby
[05:41:45] pwillard: has joined #ruby
[05:41:53] bkxd_: has joined #ruby
[05:44:34] bokayio: has joined #ruby
[05:44:44] dinfuehr: has joined #ruby
[05:46:04] eightlimbed: has joined #ruby
[05:47:21] RickHull: has joined #ruby
[05:48:27] RickHull: what's a good approach for converting yaml into a class? or alternatively converting a class definition to yaml? just constants/data
[05:48:55] baweaver: serialization basically
[05:49:03] baweaver: to_yml / to_yaml
[05:49:06] RickHull: https://github.com/rickhull/traveller_rpg/blob/master/lib/traveller_rpg/careers.rb
[05:49:09] baweaver: just take the attributes
[05:49:25] baweaver: then shove them back into an initializer
[05:49:35] baweaver: if it takes kwargs problem solved
[05:49:37] RickHull: so I have Agent < Career. i want to put Agent: as a top level key in careers.yaml
[05:49:40] baweaver: just symbolize keys on parsing
[05:49:53] baweaver: case statements work great for forks
[05:50:07] baweaver: case type when agent ...
[05:51:23] RickHull: noteworthy: i literally want to serialize the class, not an instance
[05:51:34] RickHull: no ivars. just dealing what is now implemented as class constants
[05:52:15] baweaver: so basically template assembly?
[05:52:16] RickHull: well, I don't care about serialization. but i want to declare different careers in YAML rather than ruby classes
[05:52:29] RickHull: and I'm ok if the ruby behavior diverges from the current class-based thing
[05:52:39] RickHull: as long as it is faithful to the domain
[05:52:50] baweaver: Honestly just represent what makes it unique in the yaml
[05:53:04] RickHull: yeah, i've factored that out -- the declarative data stuff
[05:53:08] RickHull: into class constants
[05:53:48] RickHull: i'm wondering about e.g. define_class and proceeding to klass.const_set
[05:54:01] RickHull: or if i want to just make all this stuff ivars on the Career class
[05:54:38] baweaver: ever consider you might be wanting too much magic?
[05:54:54] RickHull: but the answer is no here :)
[05:54:56] baweaver: Start with the stupidest thing that works first.
[05:55:02] RickHull: agreed, done
[05:55:31] RickHull: i've factored this out to be ready for YAMLizing
[05:55:31] baweaver: you can also cheat and just make rails-like scaffold generators
[05:55:32] RickHull: just some data/config maps that distinguish different careers
[05:56:12] RickHull: so right now, Agent < Career. but I could ostensibly do: agent = Career.new(stuff: that, used: to, be: class, constants: etc)
[05:56:59] RickHull: the thing is, i am already using the instance layer for state
[05:57:16] RickHull: so -- Agent is properly a subclass, not an instance of Career
[05:57:24] RickHull: in this current approach which is useful
[05:57:47] baweaver: so just inherit and have it define the unique traits
[05:58:08] RickHull: yeah, I guess define_class (or whatever) and klass.const_set
[05:58:16] RickHull: generate the class at yaml load time
[06:00:54] RickHull: is there an analog to define_method or just Class.new?
[06:01:23] RickHull: man, where did leitz go
[06:01:30] RickHull: I want to show this off :)
[06:02:41] RickHull: looks like Class.new is the right approach
[06:04:56] workmad3: has joined #ruby
[06:06:35] Technodrome: has joined #ruby
[06:08:04] LocaMocha: has joined #ruby
[06:15:22] ozcanesen: has joined #ruby
[06:16:23] KeyJoo: has joined #ruby
[06:18:40] plexigras: has joined #ruby
[06:26:43] danielpclark: has joined #ruby
[06:27:07] bkxd: has joined #ruby
[06:28:55] cdg: has joined #ruby
[06:34:51] velu_aon[m]: has joined #ruby
[06:46:34] cognoscente: has joined #ruby
[06:51:49] astronavt: has joined #ruby
[06:56:26] hahuang65: has joined #ruby
[06:57:29] astronavt: has joined #ruby
[07:08:30] bkxd_: has joined #ruby
[07:08:55] Technodrome: has joined #ruby
[07:13:43] bkxd: has joined #ruby
[07:15:36] sepp2k: has joined #ruby
[07:15:39] jamesaxl: has joined #ruby
[07:16:49] elphe: has joined #ruby
[07:18:24] govg: has joined #ruby
[07:19:14] quobo: has joined #ruby
[07:22:39] psmolen: has joined #ruby
[07:23:46] ndrst: has joined #ruby
[07:30:09] Xiti`: has joined #ruby
[07:30:36] rippa: has joined #ruby
[07:35:30] alex``: has joined #ruby
[07:44:16] Uptime: has joined #ruby
[07:45:15] govg: has joined #ruby
[07:47:22] yosafbridge: has joined #ruby
[07:48:31] Technodrome: has joined #ruby
[07:55:16] jamesaxl: has joined #ruby
[07:56:44] mson: has joined #ruby
[07:57:25] InfinityFye: has joined #ruby
[07:57:33] dman[m]: has joined #ruby
[07:58:06] claudiuinberlin: has joined #ruby
[07:59:02] InfinityFye: has left #ruby: ()
[08:02:42] mtkd: has joined #ruby
[08:04:16] aagdbl[m]: has joined #ruby
[08:04:28] lasenna[m]: has joined #ruby
[08:05:18] Technodrome: has joined #ruby
[08:06:10] Xiti: has joined #ruby
[08:09:43] plexigras: has joined #ruby
[08:10:22] m27frogy: has joined #ruby
[08:16:02] elphe: has joined #ruby
[08:17:59] Matt[m]2: has joined #ruby
[08:18:25] vichib: has joined #ruby
[08:19:31] orbyt_: has joined #ruby
[08:26:13] djbkd: has joined #ruby
[08:27:47] apparition: has joined #ruby
[08:35:25] TinkerTyper: has joined #ruby
[08:46:56] cognoscente: has joined #ruby
[08:47:25] ozcanesen: has joined #ruby
[08:55:40] Technodrome: has joined #ruby
[08:58:54] alfiemax: has joined #ruby
[09:01:43] stealth[]: has joined #ruby
[09:03:01] simonizor: has joined #ruby
[09:04:04] bokayio: has joined #ruby
[09:05:56] uZiel: has joined #ruby
[09:06:42] Tagami[m]: has joined #ruby
[09:06:51] hurricanehrndz: has joined #ruby
[09:07:11] phenom: has joined #ruby
[09:09:10] ldepandis: has joined #ruby
[09:13:36] Technodrome: has joined #ruby
[09:14:40] ShalokShalom: has joined #ruby
[09:18:02] guille-moe: has joined #ruby
[09:18:34] bokayio: has joined #ruby
[09:19:51] djbkd: has joined #ruby
[09:20:38] marr: has joined #ruby
[09:21:05] Tagami[m]: has joined #ruby
[09:23:08] elphe: has joined #ruby
[09:25:40] Nahra: has joined #ruby
[09:36:13] blackmesa1: has joined #ruby
[09:38:57] vivsoni_: has joined #ruby
[09:45:17] quobo: has joined #ruby
[09:45:28] milardovich: has joined #ruby
[09:48:40] aviraldg: has joined #ruby
[09:48:40] Hanma[m]: has joined #ruby
[09:48:40] Giphy[m]: has joined #ruby
[09:48:40] jonjits[m]: has joined #ruby
[09:48:40] M107262[m]: has joined #ruby
[09:48:40] yana[m]: has joined #ruby
[09:48:40] torarne: has joined #ruby
[09:48:40] lasenna[m]: has joined #ruby
[09:48:41] watzon: has joined #ruby
[09:48:41] erciccione_[m]: has joined #ruby
[09:48:41] simonizor: has joined #ruby
[09:48:41] dtcristo: has joined #ruby
[09:48:41] dman[m]: has joined #ruby
[09:48:41] turt2live: has joined #ruby
[09:48:41] zalipuha[m]: has joined #ruby
[09:48:41] astronavt[m]: has joined #ruby
[09:48:41] haylon: has joined #ruby
[09:48:42] KevinMGranger: has joined #ruby
[09:48:47] aagdbl[m]: has joined #ruby
[09:48:48] kua[m]: has joined #ruby
[09:48:48] gokul_mr[m]: has joined #ruby
[09:48:49] itmerc[m]: has joined #ruby
[09:48:49] velu_aon[m]: has joined #ruby
[09:48:49] Matt[m]2: has joined #ruby
[09:57:13] guille-moe: has joined #ruby
[09:58:15] alex``: has joined #ruby
[09:58:34] GodFather: has joined #ruby
[10:05:31] workmad3: has joined #ruby
[10:07:22] mtkd: has joined #ruby
[10:15:28] Technodrome: has joined #ruby
[10:18:16] tomphp: has joined #ruby
[10:25:06] RougeT430: has joined #ruby
[10:28:57] cdg: has joined #ruby
[10:47:12] cognoscente: has joined #ruby
[10:57:15] elphe: has joined #ruby
[11:02:14] TomyLobo: has joined #ruby
[11:12:35] clemens3: has joined #ruby
[11:12:35] hfp_work: has joined #ruby
[11:17:00] RougeT430: has joined #ruby
[11:17:07] JustASlacker: has joined #ruby
[11:21:29] naprimer: has joined #ruby
[11:28:09] yeticry_: has joined #ruby
[11:28:26] Puffball: has joined #ruby
[11:33:32] guille-moe: has joined #ruby
[11:34:14] tomphp: has joined #ruby
[11:34:48] cdg: has joined #ruby
[11:36:19] sameerynho: has joined #ruby
[11:40:07] despai: has joined #ruby
[11:41:26] bkxd: has joined #ruby
[11:41:42] cschneid_: has joined #ruby
[11:46:07] cognoscente: has joined #ruby
[11:51:07] elphe: has joined #ruby
[11:56:24] alfiemax: has joined #ruby
[12:03:16] blackmesa1: has joined #ruby
[12:05:56] workmad3: has joined #ruby
[12:07:09] Dykam: has joined #ruby
[12:08:00] guille-moe: has joined #ruby
[12:12:23] Sammichmaker: has joined #ruby
[12:14:42] mikecmpbll: has joined #ruby
[12:16:58] bkxd: has joined #ruby
[12:24:33] elphe: has joined #ruby
[12:26:46] mtkd: has joined #ruby
[12:30:18] AJA4350: has joined #ruby
[12:31:28] alex``: has joined #ruby
[12:31:55] apparition: has joined #ruby
[12:32:37] guille-moe: has joined #ruby
[12:32:53] tomphp: has joined #ruby
[12:37:35] guille-moe: has joined #ruby
[12:39:53] dionysus69: has joined #ruby
[12:40:23] porfavordama: has joined #ruby
[12:40:32] porfavordama: hello everyone,
[12:40:47] porfavordama: Why I can't use the "match?" method on a string ?
[12:41:04] dminuoso: porfavordama: Because having too many methods doing the exact same thing is bad.
[12:41:38] Papierkorb: porfavordama: String#match? is a 2.4.0+ feature
[12:41:40] dminuoso: What would .match? do?
[12:41:46] porfavordama: dminuoso: but on the docs website that's what is shown . I was confused
[12:41:57] dminuoso: What website?
[12:42:05] porfavordama: https://ideone.com/XXYD6K
[12:42:36] dminuoso: porfavordama: Which documentation tells you that this would be valid?
[12:42:42] Papierkorb: [13:41] <Papierkorb> porfavordama: String#match? is a 2.4.0+ feature
[12:43:11] Papierkorb: > Ruby (ruby 2.3.3)
[12:43:17] Papierkorb: Thus not available there.
[12:43:30] porfavordama: Papierkorb: Oh then the version I am using is also old
[12:43:47] porfavordama: dminuoso: it is on ruby-doc.org
[12:44:07] dminuoso: porfavordama: Please give me a link.
[12:44:19] porfavordama: Papierkorb: Thanks! I will try to update and retry :)
[12:44:26] porfavordama: dminuoso: just a second
[12:44:46] dminuoso: Huh. So this is a 2.4 feature :)
[12:45:29] porfavordama: dminuoso: http://ruby-doc.org/core-2.4.2/String.html#method-i-match-3F
[12:46:43] Papierkorb: porfavordama: If you can, upgrade to 2.4 - If you can't, if all you need is String#match?, it's easy to implement it yourself. I'm sure there's also a backport gem which does stuff like this, but can't remember its name.
[12:48:40] porfavordama: Papierkorb: Yes, all I am looking for is to match a certain pattern from a text. :) If I can't upgrade then I will figure out somehow. Thank you for the help :)
[12:49:32] nowhere_man: has joined #ruby
[12:58:26] apeiros: porfavordama: you can also just use =~ like everybody else
[12:58:44] apeiros: >> if "string" =~ /in/ then "yes" else "no" end
[12:58:45] ruby[bot]: apeiros: # => "yes" (https://eval.in/915810)
[12:59:31] porfavordama: apeiros: Oh, right! I was just thinking to deep haha. Thank you. :)
[13:00:39] pskosinski_: has joined #ruby
[13:00:40] pskosinski_: has joined #ruby
[13:02:19] bkxd: has joined #ruby
[13:05:12] tomphp: has joined #ruby
[13:06:16] DTZUZO: has joined #ruby
[13:06:33] Papierkorb: porfavordama: While I like match? more simply because it's a method, the only semantic difference between match? and match/=~ is that match? doesn't set the $~ and $1,$2,.. fake globals
[13:06:58] Papierkorb: And match? returns truthy instead of the regex match
[13:07:45] DrCode: has joined #ruby
[13:08:33] porfavordama: Papierkorb: Yes, I just needed the truthy. So, also include? could be the answer.
[13:08:35] apeiros: s/because it's a method/because it's a named method/
[13:08:40] apeiros: since =~ is a method too
[13:09:20] Papierkorb: porfavordama: #include? only works for strings. If that's good enough for you, it's what I'd use
[13:10:19] DrCode: has joined #ruby
[13:10:24] leitz: has joined #ruby
[13:12:12] blackmesa1: has joined #ruby
[13:12:43] porfavordama: Papierkorb: Yes, it is enough for now. I just fancied using match? haha.
[13:13:40] uZiel: has joined #ruby
[13:17:16] Mia: has joined #ruby
[13:17:16] Mia: has joined #ruby
[13:22:10] AJA4351: has joined #ruby
[13:25:04] kitsunenokenja: has joined #ruby
[13:29:53] zautomata: has joined #ruby
[13:36:38] halt: has joined #ruby
[13:38:11] Dykam: has joined #ruby
[13:38:50] uZiel: has joined #ruby
[13:38:51] miskatonic: has joined #ruby
[13:40:17] AJA4350: has joined #ruby
[13:44:28] alfiemax: has joined #ruby
[13:45:07] veeti: has joined #ruby
[13:45:42] ramfjord: has joined #ruby
[13:45:47] zautomata: has joined #ruby
[13:47:29] csk157: has joined #ruby
[13:49:52] silvermine: has joined #ruby
[13:51:10] AJA4350: has joined #ruby
[13:52:40] Dykam: has joined #ruby
[13:54:01] blackmesa1: has joined #ruby
[14:04:52] Dykam: has joined #ruby
[14:06:23] workmad3: has joined #ruby
[14:08:16] cschneid_: has joined #ruby
[14:08:28] miskatonic: has joined #ruby
[14:09:37] alfiemax: has joined #ruby
[14:16:08] nadir: has joined #ruby
[14:27:35] mahlon: has joined #ruby
[14:32:20] Dykam: has joined #ruby
[14:36:16] Dykam: has joined #ruby
[14:36:44] csk157: has joined #ruby
[14:37:11] cadillac_: has joined #ruby
[14:38:43] guille-moe: has joined #ruby
[14:40:36] aScottishBoat: has joined #ruby
[14:45:29] csk157: has joined #ruby
[14:49:06] banisterfiend: has joined #ruby
[14:52:48] p0p0pr37: has joined #ruby
[14:52:57] p0p0pr37: has joined #ruby
[14:54:22] qqmash: has joined #ruby
[14:59:54] nexustrap: has joined #ruby
[15:02:45] Dykam: has joined #ruby
[15:04:33] sailfin: has joined #ruby
[15:05:21] p0p0pr37: has joined #ruby
[15:05:43] p0p0pr37: has joined #ruby
[15:07:24] sailfin: has joined #ruby
[15:08:21] mikeiniowa: has joined #ruby
[15:09:36] tsglove: has joined #ruby
[15:10:01] claudiuinberlin: has joined #ruby
[15:11:55] zautomata: has joined #ruby
[15:14:03] DLSteve: has joined #ruby
[15:16:45] Derperperd: has joined #ruby
[15:16:57] skweek: has joined #ruby
[15:18:16] Derperperd: has joined #ruby
[15:19:36] alfiemax: has joined #ruby
[15:26:01] banisterfiend: has joined #ruby
[15:26:04] uZiel: has joined #ruby
[15:26:40] Dykam: has joined #ruby
[15:32:07] quobo: has joined #ruby
[15:35:13] ltem: has joined #ruby
[15:35:55] miskatonic: has joined #ruby
[15:36:52] Dykam: has joined #ruby
[15:38:00] alex``: has joined #ruby
[15:38:03] nofxx__: has joined #ruby
[15:41:03] tAn: has joined #ruby
[15:41:57] cschneid_: has joined #ruby
[15:45:56] ramfjord: has joined #ruby
[15:53:46] jxv: has joined #ruby
[15:55:01] milardovich: has joined #ruby
[15:58:02] iMadper`: has joined #ruby
[16:02:42] tomphp: has joined #ruby
[16:03:59] Dykam: has joined #ruby
[16:05:38] sepp2k1: has joined #ruby
[16:06:45] workmad3: has joined #ruby
[16:09:47] iamarun: has joined #ruby
[16:11:25] elphe: has joined #ruby
[16:13:42] Dykam: has joined #ruby
[16:16:19] Hanmac1: has left #ruby: ()
[16:17:15] blackmesa1: has joined #ruby
[16:19:36] mtkd: has joined #ruby
[16:20:07] Barrt: has joined #ruby
[16:21:07] astronavt: has joined #ruby
[16:21:25] sepp2k: has joined #ruby
[16:22:36] JustASlacker: has joined #ruby
[16:24:01] leitz: "Free at last! Free at last! Thank God almighty I am free at last!"
[16:24:27] leitz: I've been wanting to read Russ Olsen's "Design Patterns in Ruby" for over a year.
[16:24:54] leitz: It came in the mail Tuesday but I couldn't open it until the class I'm in was done. Which it now is.
[16:25:07] tomphp: has joined #ruby
[16:25:42] leitz: I thihnk my brain will melt but the book should help me with my Character Generator.
[16:25:56] marr: has joined #ruby
[16:27:05] dminuoso: Your class bans you from reading books until they're on topic?
[16:27:42] csk157: has joined #ruby
[16:27:46] leitz: I have two brain cells; couldn't do the class justice and work on Ruby.
[16:28:05] leitz: Except where I used Ruby to solve MongoDB questions....
[16:28:22] leitz: Personal limitation.
[16:28:28] NeverTired: has joined #ruby
[16:28:51] nowhere_man: has joined #ruby
[16:33:06] chocoelho: has joined #ruby
[16:39:25] RougeT430: has joined #ruby
[16:41:09] rainmaker: has joined #ruby
[16:45:02] uZiel: has joined #ruby
[16:49:17] Keat: has joined #ruby
[16:50:06] dinfuehr_: has joined #ruby
[16:54:05] rainmaker: has joined #ruby
[16:56:17] Technodrome: has joined #ruby
[17:00:03] konsolebox: has joined #ruby
[17:00:12] _whitelogger: has joined #ruby
[17:06:59] elphe: has joined #ruby
[17:07:27] ur5us: has joined #ruby
[17:11:16] duderonomy: has joined #ruby
[17:11:30] alfiemax: has joined #ruby
[17:16:09] AJA4350: has joined #ruby
[17:17:18] chocoelho: has joined #ruby
[17:20:46] despai: has joined #ruby
[17:24:25] rainmaker: has left #ruby: ("The Lounge - https://thelounge.github.io")
[17:34:18] goyox86: has joined #ruby
[17:36:10] unreal: has joined #ruby
[17:43:35] milardovich: has joined #ruby
[17:46:09] ramfjord: has joined #ruby
[17:47:26] tomphp: has joined #ruby
[17:47:32] jxv: has joined #ruby
[17:47:34] BigRonnieRon: has joined #ruby
[17:49:29] sameerynho: has joined #ruby
[17:54:00] Technodrome: has joined #ruby
[17:56:43] ur5us: has joined #ruby
[17:57:55] dionysus69: has joined #ruby
[18:01:25] Yzguy: has joined #ruby
[18:02:30] workmad3: has joined #ruby
[18:05:30] djbkd: has joined #ruby
[18:07:06] wilbert: has joined #ruby
[18:08:06] guille-moe: has joined #ruby
[18:09:33] ur5us: has joined #ruby
[18:15:05] GodFather: has joined #ruby
[18:17:00] GodFather: has joined #ruby
[18:19:40] dviola: has joined #ruby
[18:22:04] alfiemax: has joined #ruby
[18:22:15] tsglove: has joined #ruby
[18:22:50] Xiti: has joined #ruby
[18:23:10] sailfin: has joined #ruby
[18:23:22] rabajaj: has joined #ruby
[18:24:38] RougeT430: has joined #ruby
[18:25:37] tomphp: has joined #ruby
[18:30:17] nchambers: has joined #ruby
[18:32:52] milardovich: has joined #ruby
[18:36:46] Emmanuel_Chanel: has joined #ruby
[18:41:28] alfiemax: has joined #ruby
[18:43:14] tomphp: has joined #ruby
[18:45:45] ramfjord: has joined #ruby
[18:47:21] impermanence: has joined #ruby
[18:47:28] KeyJoo: has joined #ruby
[18:47:51] Yzguy: has joined #ruby
[18:47:52] SuperLag: has joined #ruby
[18:47:58] impermanence: is there a typical way to dir structure src and tests? src/ test/ or...?
[18:49:42] cajone: has left #ruby: ()
[18:52:55] cajone: has joined #ruby
[18:53:12] leitz: impermanence, I tend to look at how gems are laid out. There's a command to build the tree but I can't remember it.
[18:55:11] elphe: has joined #ruby
[18:56:53] pilne: has joined #ruby
[18:58:25] keyjoo_: has joined #ruby
[18:59:39] orbyt_: has joined #ruby
[19:00:31] blackmesa1: has joined #ruby
[19:01:09] leitz: http://guides.rubygems.org/patterns/#consistent-naming
[19:01:42] cognoscente: has joined #ruby
[19:02:16] dminuoso: impermanence: Whatever floats your boat really.
[19:02:26] dminuoso: Do what makes sense for you.
[19:02:51] dminuoso: I've seen so many different layouts, and I had never problem navigating "strange" and "new" concepts each time.
[19:03:32] impermanence: dminuoso: true dat. I mean, like, java has some norms'n'forms so...sjust curious.
[19:04:17] dminuoso: impermanence: I found that adhering to specific layouts can be constraining. In our react app for example it took a bit of experimentation what works for us because all the "popular" schemes just felt wrong/
[19:05:00] impermanence: dminuoso: makes sense to me :)
[19:05:13] dminuoso: impermanence: Even in our rails app I started breaking common convention because the traditional rails way feels wrong for us.
[19:05:24] Keat: has left #ruby: ()
[19:06:06] dminuoso: (We are trying to port our react structure to rails)
[19:06:59] impermanence: dminuoso: ah, I see.
[19:07:05] leitz: dminuoso, I think the key is "feels wrong". As a newbie I prefer to stick with the standard. Later, maybe, I'll have enough experience to break the rule when it is good to.
[19:07:07] Akispolton: has joined #ruby
[19:07:34] dminuoso: Emphasis on "for us" even. It's really subjective.
[19:08:21] dminuoso: leitz: I agree. I didn't consider it with Rails until we demystified Rails. Now we just treat it as a ruby application.
[19:08:47] dminuoso: But that process took time. :)
[19:08:57] impermanence: as a newbie I like, tooootally just ask on irc ;)
[19:09:03] AJA4350: has joined #ruby
[19:09:45] dminuoso: impermanence: What kind of application are you writing?
[19:09:56] dminuoso: It might be useful to look at similar projects and orient yourself using their structure to get started.
[19:10:22] mtkd: has joined #ruby
[19:10:51] impermanence: dminuoso: a process monitor that reads from /proc/ and writes to ncurses or something similar.
[19:11:17] leitz: ACTION likes system tools.
[19:12:06] impermanence: yeah and this morning I was all like...wait...maybe I just have a test dir, lib dir, bin dir, etc...but didn't know if there were forms
[19:12:14] cschneid_: has joined #ruby
[19:12:23] impermanence: *should have a test dir, etc.
[19:13:18] Dark_Arc: has joined #ruby
[19:13:22] impermanence: So far I copied from the link that leitz posted: lib/ bin/ test/
[19:13:30] dminuoso: impermanence: ^- that is the common form.
[19:13:42] dminuoso: impermanence: also note if you are using `rspec` then test/ is usually called spec/
[19:14:28] impermanence: dminuoso: hm. I was putting my minitests in there...I'm...new to ruby testing, lol
[19:14:29] leitz: Ah, cool. Make a tmp directroy somewhere and then cd there. run : gem unpack json
[19:14:52] nowhere_man: has joined #ruby
[19:14:53] dminuoso: impermanence: Honestly its also fine to mix tests with your code.
[19:14:59] leitz: It unpacks the gem into the directory. You can see how it's done by others. json is an example.
[19:15:00] dminuoso: impermanence: We do that in our react app.
[19:15:14] impermanence: oh okay, right on
[19:15:23] dminuoso: impermanence: With unit testing it makes sense that if you have some api.js that you should also have an api.test.js :-)
[19:15:44] dminuoso: and it makes absolute sense they should be sitting next to each other. it also makes things like relative file access more sensible..
[19:16:12] dminuoso: Never worked with minitest, but rspec should be riggable for this.
[19:16:25] sammi`: has joined #ruby
[19:16:38] mson: has joined #ruby
[19:17:45] impermanence: dminuoso: I'm new to minitest too but spec functionality makes up about a third of its purpose
[19:17:49] armyriad: has joined #ruby
[19:18:08] impermanence: minitest: unit, spec, mock, benchmark
[19:18:35] leitz: Stepping back a second, why are you using Ruby for this?
[19:19:23] dminuoso: impermanence: rspec is just a name, it has it all. Anyway, not trying to swing you over - it's just that I cant speak for minitest =)
[19:21:02] impermanence: leitz: I'm a total ruby newb, but I find that when I write actual applications it makes me better, thas all. I am beginning to know *nix fairly well and I was recently looking at process mon tools so I figured I'd just write my own. nuffin special.
[19:21:38] leitz: impermanence, do you know other coding languages?
[19:22:14] impermanence: leitz: not really
[19:22:39] impermanence: certainly nothing with an SE competency
[19:22:50] leitz: Okay, let me make a recommendation. I have learned the basics of a few languages.
[19:23:16] Dark_Arc: has joined #ruby
[19:23:35] leitz: Ruby is, for me, the most fun. It calls me to code. I can do more in bash and some with PHP, Python, or even a little C or Go. However, Ruby is the only one that really encourages me to code.
[19:24:27] leitz: As a newbie, I recommend staying with the "standard". At least for a while. People like dminuoso know a heck of a lot more Ruby than I do, and they can step outside the standards when it's best for them.
[19:24:32] cdg: has joined #ruby
[19:24:48] leitz: Learn the rules, then you'll see where bending them is best.
[19:24:56] impermanence: leitz: that's the plan
[19:24:56] leitz: And welcome to Ruby!
[19:25:23] dminuoso: https://gist.github.com/dminuoso/8f2147d055da8830fe2eab78f60ed75f
[19:25:28] dminuoso: Works like a charm with no custom things. :)
[19:25:51] minimalism: has joined #ruby
[19:26:04] dminuoso: Well, you just set a teeny tiny setting in your .rspec and thats it.
[19:26:04] leitz: https://gist.github.com/baweaver/57a7c8296ca2c03effbd8fac1e7f6b40
[19:27:12] leitz: The spec.helper confused me when I started with rspec. Never really got it then wandered away for a bit. Using test/unit
[19:27:18] halt: has joined #ruby
[19:27:35] leitz: Will get back into rspec and cucumber when I relearn the basics.
[19:27:50] dminuoso: leitz: the name is just terrible.
[19:27:50] leitz: Working on design patterns at the moment.
[19:28:29] leitz: dminuoso, ?
[19:29:02] dminuoso: leitz: spec_helper.rb is just the initialization file. `rspec_config.rb` would have been better
[19:29:13] dminuoso: Or something along those lines.
[19:29:47] dminuoso: Especially in rails when you also have a rails_helper.rb its even more confusing..
[19:29:53] dminuoso: Which sadly it shouldn't have to be.
[19:36:13] alfiemax: has joined #ruby
[19:37:40] chocoelho: has joined #ruby
[19:37:47] dminuoso: leitz: https://gist.github.com/dminuoso/a09f39aab7a853ee14ee0556df0e555b
[19:45:44] Dimik: has joined #ruby
[19:50:56] tomphp: has joined #ruby
[19:51:22] jackjackdripper: has joined #ruby
[19:53:25] ur5us: has joined #ruby
[19:53:44] DTZUZO: has joined #ruby
[19:53:52] leitz: ACTION 's one non-ill brain cell is on Design Patterns.
[19:55:18] leitz: Acutally, I think I need to figure out how to make it a gem. That will push me to standardize a bit more.
[19:56:23] dminuoso: I wanted to push out my first gem last week.. but then I went to haskell.. :(
[19:57:23] leitz: So far Ruby does what I enjoy doing, as long as I figure out how to do it.
[19:58:05] leitz: Need to change the name of my project though, as it is no longer correct.
[19:58:59] elphe: has joined #ruby
[19:59:59] leitz: And figure out the scope, that's always an issue. :(
[20:00:46] leitz: Or scopes. This the the rabbit trail I usually get lost in.
[20:02:32] Xiti: has joined #ruby
[20:08:30] despai: has joined #ruby
[20:10:32] alfiemax: has joined #ruby
[20:11:52] uZiel: has joined #ruby
[20:14:44] drcode_: has joined #ruby
[20:22:07] RougeT430: has joined #ruby
[20:23:43] miskatonic: has joined #ruby
[20:24:07] spectrum: has joined #ruby
[20:25:05] miskatonic: has joined #ruby
[20:30:56] DTZUZO: has joined #ruby
[20:34:43] BigRonnieRon: has joined #ruby
[20:37:33] AJA4350: has joined #ruby
[20:45:52] elphe: has joined #ruby
[20:55:56] uZiel: has joined #ruby
[21:00:05] goyox86: has joined #ruby
[21:08:56] jeffci: has joined #ruby
[21:12:43] herbmillerjr: has joined #ruby
[21:13:10] mtkd: has joined #ruby
[21:16:50] elphe: has joined #ruby
[21:18:24] goyox86: has joined #ruby
[21:18:27] xsdg: has joined #ruby
[21:18:35] cschneid_: has joined #ruby
[21:19:14] Exhiled: has joined #ruby
[21:22:17] uZiel: has joined #ruby
[21:24:05] milardovich: has joined #ruby
[21:24:57] mtkd: has joined #ruby
[21:27:04] cpruitt: has joined #ruby
[21:30:21] rivalomega: has joined #ruby
[21:30:31] marr: has joined #ruby
[21:37:15] bkxd: has joined #ruby
[21:40:29] blackmesa: has joined #ruby
[21:42:17] goyox86: has joined #ruby
[21:42:52] goepsilongo: has joined #ruby
[21:43:11] Quentinius: has joined #ruby
[21:44:30] bkxd_: has joined #ruby
[21:49:07] blackmesa1: has joined #ruby
[21:54:27] cadillac_: has joined #ruby
[21:54:41] veeti: has joined #ruby
[21:55:43] daemonwrangler: has joined #ruby
[22:03:32] milardovich: has joined #ruby
[22:08:52] RougeT430: has joined #ruby
[22:22:23] bkxd: has joined #ruby
[22:29:53] tomphp: has joined #ruby
[22:33:04] guardianx: has joined #ruby
[22:39:30] selim: has joined #ruby
[22:46:43] despai: has joined #ruby
[22:46:51] c0ncealed: has joined #ruby
[22:47:13] rivalomega: has joined #ruby
[22:49:32] DTZUZO: has joined #ruby
[22:50:47] JustASlacker: has joined #ruby
[22:57:14] christiandsg: has joined #ruby
[22:59:45] drowze: has joined #ruby
[23:02:19] bazzy: has left #ruby: ()
[23:06:24] nowhere_man: has joined #ruby
[23:08:04] alfiemax: has joined #ruby
[23:12:33] tomphp: has joined #ruby
[23:14:38] elphe: has joined #ruby
[23:15:15] veeti: has joined #ruby
[23:18:25] bkxd: has joined #ruby
[23:19:17] ResidentBiscuit: has joined #ruby
[23:27:19] ResidentBiscuit: has joined #ruby
[23:32:45] guille-moe: has joined #ruby
[23:35:21] workmad3: has joined #ruby
[23:35:44] spider-mario: has joined #ruby
[23:44:08] alex``: has joined #ruby
[23:44:22] goyox86: has joined #ruby
[23:49:48] bkxd_: has joined #ruby
[23:53:43] milardovich: has joined #ruby
[23:54:46] |ifei5g00d: has joined #ruby
[23:55:43] zautomata: has joined #ruby
[23:56:40] elphe: has joined #ruby
[23:59:57] goyox86: has joined #ruby