« Back to channel list

#ruby - 17 August 2015

« Back 1 day Forward 1 day »
[00:00:16] Radar: Well, helpa doesn't have access there so that's not going to be helpful.
[00:00:18] baweaver: Ox0dea: just has to be close enough to score.
[00:04:01] keen_____: has joined #ruby
[00:04:14] Scripore: has joined #ruby
[00:04:39] helpa: has joined #ruby
[00:06:15] helpa: has joined #ruby
[00:06:17] Radar: Not with this particular troll it doesn't.
[00:06:18] Aeyrix: Also we've known that ruboto has been closed source forever, haven't we?
[00:06:50] ishahnaz: has joined #ruby
[00:06:53] Radar: All I want to be able to do if ruboto is open sourced is to submit patches to ruboto to improve it
[00:06:57] Radar: Just like people do with helpa
[00:07:18] Aeyrix: There's only upsides to open sourcing something like an IRC bot tbh.
[00:07:22] Radar: https://github.com/radar/railsbot/commit/5c225fc335ca71ae2a3f51a81a469405a19038fb <- and now helpa will PM me when it sees the naughty word.
[00:07:47] Aeyrix: privmsg("#{sender[:nick]} said #{bad_word} in #{channel}", "Radar")
[00:07:51] gilest: has joined #ruby
[00:08:13] Aeyrix: channel_message isn't called when helpa sends a message, does it?
[00:08:16] Aeyrix: is it ? *
[00:08:50] Mon_Ouie: IRC doesn't send the messages that you sent back to you
[00:08:57] Mon_Ouie: So probably not
[00:09:22] Radar: And in my testing of the feature it didn't, so it's alright.
[00:13:00] dgutierrez1287: has joined #ruby
[00:14:14] skade: has joined #ruby
[00:16:02] scottschecter: has joined #ruby
[00:16:46] rbennacer: has joined #ruby
[00:18:16] al2o3-cr: has joined #ruby
[00:19:27] lannonbr: has joined #ruby
[00:19:29] al2o3-cr: has joined #ruby
[00:20:11] CloCkWeRX: has joined #ruby
[00:21:38] axl_: has joined #ruby
[00:22:49] dr3w: has joined #ruby
[00:23:17] skade: has joined #ruby
[00:24:15] roolo: has joined #ruby
[00:27:39] Cache_Money: has joined #ruby
[00:27:56] Gribo: has joined #ruby
[00:27:59] djbkd: has joined #ruby
[00:29:03] rbennacer: has joined #ruby
[00:29:11] blandflakes: has joined #ruby
[00:29:53] tmtwd: has joined #ruby
[00:30:11] christiandsg: has joined #ruby
[00:30:49] ofdtrinity: has joined #ruby
[00:33:52] northfurr: has joined #ruby
[00:34:25] j4cknewt: has joined #ruby
[00:39:25] Oog: has joined #ruby
[00:40:12] Oog: has joined #ruby
[00:41:13] sevenseacat: has joined #ruby
[00:41:22] Yzguy: has joined #ruby
[00:42:14] Aeyrix: I'm trying to convince my work to use Slack.
[00:42:25] Aeyrix: Unfortunately I work in an infosec consultancy, so we're all IRC users.
[00:42:48] Darkwater: slack supports irc kind of
[00:42:52] Darkwater: might make the transition easier
[00:43:57] fluffykat: it supports irc?
[00:44:06] JFlash_: has joined #ruby
[00:44:18] Aeyrix: "supports"
[00:44:25] Darkwater: there's probably limitations
[00:44:31] Darkwater: but at least you can chat
[00:44:40] Darkwater: slack is really just irc with more features anyway
[00:44:42] JFlash_: hi. I'm studing python and I want to know if ruby would be a good second still for a pythonista
[00:44:50] Aeyrix: JFlash_: It'd be a good first. :^)
[00:45:00] Darkwater: second, in his case
[00:45:16] Darkwater: but yeah ruby isn't hard to learn
[00:45:38] Radar: JFlash_: You'll find lots of similarities between Ruby and Python.
[00:45:43] lucyinthesky: has joined #ruby
[00:45:48] fluffykat: problem is no linux app
[00:45:57] Aeyrix: Come again?
[00:46:16] Aeyrix: Oh, for Slack?
[00:46:17] JFlash_: I was also said to hear that few ppl are using Sinatra as their main backend framework, (as opposed to just smaller projects)
[00:46:18] Darkwater: the web interface is fine
[00:46:19] Aeyrix: >web client
[00:46:26] JFlash_: .. because I don't plan to learn Rails
[00:46:35] Aeyrix: JFlash_: So wait, what's your question?
[00:46:45] Aeyrix: "People are using technology I don't want to learn. Why?"
[00:46:55] Darkwater: sinatra is cool as well
[00:47:07] fluffykat: web interface is ok... what would be great is if i could connect to slack using an irc client like hexchat or something
[00:47:14] Aeyrix: FluffyKat: You can.
[00:47:19] Aeyrix: We just discussed that.
[00:47:22] JFlash_: Aeyrix, question already answered above , thanks
[00:47:37] mcpherrin: has left #ruby: ()
[00:48:54] JFlash_: has left #ruby: ("Leaving")
[00:53:10] Frem: has joined #ruby
[00:54:11] sarkyniin: has joined #ruby
[00:54:40] workmad3: has joined #ruby
[00:55:05] CanTonic: has joined #ruby
[00:56:09] n_blownapart: has joined #ruby
[00:58:13] iateadonut: has joined #ruby
[00:59:21] EminenceHC: has joined #ruby
[00:59:23] Guest37: has joined #ruby
[01:00:10] gilest: has joined #ruby
[01:00:51] Guest37: has left #ruby: ()
[01:03:05] havenwood: has joined #ruby
[01:03:21] RahulT: has joined #ruby
[01:06:06] Guest74305: has joined #ruby
[01:08:48] Vile`: has joined #ruby
[01:10:06] bhaak: has joined #ruby
[01:10:32] josh4: has joined #ruby
[01:10:47] postmodern: has joined #ruby
[01:10:53] ctalr: has joined #ruby
[01:11:07] eshy: has joined #ruby
[01:13:02] eshy: has joined #ruby
[01:14:45] chipotle: has joined #ruby
[01:17:11] tmtwd: has joined #ruby
[01:18:06] leafybasil: has joined #ruby
[01:21:22] charliesome: has joined #ruby
[01:23:04] erts: has joined #ruby
[01:24:01] hydrozen: has joined #ruby
[01:25:11] ivanf: has joined #ruby
[01:26:35] hobodave: has joined #ruby
[01:26:45] patteh: has joined #ruby
[01:29:17] mabjpj: has joined #ruby
[01:30:17] bruno-: has joined #ruby
[01:30:22] pocketprotector: has joined #ruby
[01:33:55] np0: has joined #ruby
[01:35:49] ohaibbq: has joined #ruby
[01:36:02] northfurr: has joined #ruby
[01:37:06] gh: has joined #ruby
[01:38:11] absolutejam: has joined #ruby
[01:42:09] Rubie: has joined #ruby
[01:43:24] andrewx10: has joined #ruby
[01:43:43] frozen3: has joined #ruby
[01:43:48] tkuchiki: has joined #ruby
[01:45:03] np0: has joined #ruby
[01:46:59] AustinMatherne: has joined #ruby
[01:49:11] cornerma1: has joined #ruby
[01:51:58] ertse: has joined #ruby
[01:52:02] np0: has joined #ruby
[01:53:37] bffff_: has joined #ruby
[01:54:44] christiandsg: has joined #ruby
[01:55:07] skade: has joined #ruby
[01:55:11] lake: has joined #ruby
[01:57:10] erts: has joined #ruby
[01:57:53] Oog: has joined #ruby
[01:58:26] moss: has joined #ruby
[01:59:21] dimasg: has joined #ruby
[02:05:42] bronson: has joined #ruby
[02:08:36] rakm: has joined #ruby
[02:09:54] arta82: has joined #ruby
[02:12:21] roolo: has joined #ruby
[02:16:58] CpuID: has joined #ruby
[02:17:48] lwu: has joined #ruby
[02:18:46] j4cknewt: has joined #ruby
[02:21:49] tkuchiki: has joined #ruby
[02:23:09] arescorpio: has joined #ruby
[02:24:31] j4cknewt: has joined #ruby
[02:31:28] nertzy: has joined #ruby
[02:32:50] devbug_: has joined #ruby
[02:33:03] KensoDev: has joined #ruby
[02:34:19] casadei_: has joined #ruby
[02:34:43] Roa: has joined #ruby
[02:39:19] casadei_: has joined #ruby
[02:40:04] cibs_: has joined #ruby
[02:41:43] siemprefresco: has joined #ruby
[02:43:02] patteh: has joined #ruby
[02:43:09] MrButh: has joined #ruby
[02:43:11] bruno-: has joined #ruby
[02:43:19] workmad3: has joined #ruby
[02:44:35] jeadr: has joined #ruby
[02:44:36] michael_mbp: has joined #ruby
[02:45:59] cibs: has joined #ruby
[02:46:20] rakm: has joined #ruby
[02:47:22] opensource_nija: has joined #ruby
[02:47:58] yayfoxes: has joined #ruby
[02:48:25] yayfoxes: Hi, I'm hyy. Gotta ask, what cool things have people done with ruby?
[02:48:42] yayfoxes: I want to write a Wayland system compositor when I get good
[02:48:46] christiandsg: has joined #ruby
[02:49:36] shevy: you know C?
[02:49:49] yayfoxes: sitting before me is Chris Pine's Learn to Program, Second Edition
[02:49:55] shevy: what ruby would need most are super-ambitious C hackers who'd help with bindings
[02:50:02] opensource_nija: Currently using ruby as the back end to my forex trading platform
[02:50:10] shevy: yeah that book is good but you will have it worked through in less than an hour
[02:50:18] opensource_nija: has left #ruby: ()
[02:50:25] segy: has joined #ruby
[02:50:27] sevenseacat: that'll teach you the very basics
[02:50:58] yayfoxes: I'm going to read it :)
[02:52:16] yayfoxes: ACTION is going to sa
[02:54:18] havenwood: has joined #ruby
[02:54:39] opensource_ninja: has joined #ruby
[02:54:42] mistermocha: has joined #ruby
[02:54:47] Me1: has joined #ruby
[02:55:23] swgillespie: has joined #ruby
[02:57:05] s2013: has joined #ruby
[02:58:17] Mia: has joined #ruby
[02:58:42] thecoldwinternig: has joined #ruby
[03:01:57] shevy: sa! san antonio!
[03:02:22] skydiver: has joined #ruby
[03:02:54] Aeyrix: Wait Forex is a real thing?
[03:03:26] haraoka: has joined #ruby
[03:04:55] devoldmx: has joined #ruby
[03:05:22] shevy: erm, dunno
[03:05:25] shevy: when it is coded by a nija
[03:06:00] n_blownapart: has joined #ruby
[03:06:03] Psi-Jack: Hmmm... em-http-request isn't part of EM::Connection, is it?
[03:06:44] sevvie: has joined #ruby
[03:06:58] Psi-Jack: And EM::HttpConnection I suppose could handle http event queuing?
[03:08:06] Psi-Jack: Trying to find a similar queuing method as EM::Connection to handle stuffing new objects into a queue to be handled by EventMachine. heh
[03:11:01] renderful: has joined #ruby
[03:11:41] braincrash: has joined #ruby
[03:12:16] mephistophocles: has joined #ruby
[03:12:19] mistermocha: has joined #ruby
[03:13:06] dgutierrez1287: has joined #ruby
[03:14:49] cornerma1: has joined #ruby
[03:15:12] RahulT: has joined #ruby
[03:17:10] pocketprotector: has joined #ruby
[03:17:27] ReK2: has joined #ruby
[03:17:27] ReK2: has joined #ruby
[03:18:22] darkf: has joined #ruby
[03:18:47] jeadr: has joined #ruby
[03:21:27] wookiehangover: has joined #ruby
[03:21:33] mistermocha: has joined #ruby
[03:21:49] Cache_Money: has joined #ruby
[03:21:57] RahulT: has joined #ruby
[03:23:19] hololeap: has joined #ruby
[03:24:09] Chau: has joined #ruby
[03:27:16] mephistophocles: has joined #ruby
[03:27:25] diego2: has joined #ruby
[03:27:45] dopie: has joined #ruby
[03:30:48] chihhsin: has joined #ruby
[03:32:43] swgillespie: has joined #ruby
[03:32:49] finisherr: has joined #ruby
[03:34:00] northfurr: has joined #ruby
[03:34:53] mistermocha: has joined #ruby
[03:37:19] Ropeney: has joined #ruby
[03:37:53] charliesome: has joined #ruby
[03:38:14] existensil: Having issues writing a simple method to block on asynchronous code: https://gist.github.com/carlzulauf/9c9346f1144d36bcc327
[03:39:18] existensil: Would like `async` run the block passed to it in a seperate thread and wait until a callback yielded to the block is called
[03:39:22] existensil: but its not working
[03:41:57] mistermo_: has joined #ruby
[03:42:00] s2013: has joined #ruby
[03:42:02] ryanMmhmm: has joined #ruby
[03:45:09] existensil: nevermind... made the example work and updated the gist
[03:45:24] existensil: hopefully it works on real asynchronous code
[03:45:27] khebbie: has joined #ruby
[03:46:13] mistermocha: has joined #ruby
[03:46:43] mjburgess: has joined #ruby
[03:49:33] christiandsg: has joined #ruby
[03:49:38] jeadr: has joined #ruby
[03:56:21] lxsameer: has joined #ruby
[03:56:21] lxsameer: has joined #ruby
[03:56:23] fedexo: has joined #ruby
[03:56:38] mistermocha: has joined #ruby
[03:58:05] gix: has joined #ruby
[03:58:48] djbkd: has joined #ruby
[03:59:58] kachi8: has joined #ruby
[04:00:35] jeadr: has joined #ruby
[04:00:45] roolo: has joined #ruby
[04:01:07] Oog: has joined #ruby
[04:05:35] bb010g: has joined #ruby
[04:11:34] thecoldwinternig: has left #ruby: ()
[04:13:15] skydiver: has joined #ruby
[04:13:28] decaff: has joined #ruby
[04:14:16] braincra-: has joined #ruby
[04:14:50] kachi8: has joined #ruby
[04:16:57] _blizzy_: has joined #ruby
[04:17:34] KensoDev: has joined #ruby
[04:19:30] renderful: has joined #ruby
[04:20:11] dimasg: has joined #ruby
[04:23:12] The_Phoenix: has joined #ruby
[04:25:22] _blizzy_: has joined #ruby
[04:26:04] Cache_Money: has joined #ruby
[04:27:20] baweaver_: has joined #ruby
[04:27:47] Musashi007: has joined #ruby
[04:28:48] RahulT: has joined #ruby
[04:32:05] workmad3: has joined #ruby
[04:32:38] Dopagod: has joined #ruby
[04:33:35] jeadr: has joined #ruby
[04:37:09] AlexRussia: has joined #ruby
[04:45:22] ponga: has joined #ruby
[04:46:18] ascarter: has joined #ruby
[04:46:43] RahulT: has joined #ruby
[04:46:57] christiandsg: has joined #ruby
[04:48:56] ReK2GnULinuX: has joined #ruby
[04:53:37] ellisTAA: has joined #ruby
[04:55:13] tkuchiki_: has joined #ruby
[04:55:42] jeadr: has joined #ruby
[04:57:04] kp666: has joined #ruby
[04:57:46] abhishekverma: has joined #ruby
[04:58:10] abhishekverma: hello everyone,
[04:58:28] abhishekverma: a newbie to ruby , i am .
[05:00:40] RahulT: has joined #ruby
[05:01:20] sinkensabe: has joined #ruby
[05:03:55] tyl: has joined #ruby
[05:04:30] ellisTAA: what is the ruby off topic channel?
[05:04:45] Aeyrix: #ruby-offtopic?
[05:05:08] RobertBirnie: has joined #ruby
[05:05:11] ekleog: ACTION just discovered that ruby classes are open
[05:05:11] ekleog: ACTION will be able to throw away 21 lines of *_eval black magic
[05:05:11] ekleog: ACTION is happy :)
[05:07:01] tyl: Hi, how do save a method chain and use it on a model ? something like this http://pastie.org/10355940
[05:07:16] Musashi007: has joined #ruby
[05:11:02] qiukun: has joined #ruby
[05:12:19] yardenbar: has joined #ruby
[05:12:30] dhjondoh: has joined #ruby
[05:12:38] abhishekverma: has left #ruby: ()
[05:13:34] n008f4g_: has joined #ruby
[05:14:23] tyl: i mean on a class
[05:15:37] ekleog: tyl: Is that what you want? http://pastie.org/10355952
[05:15:50] RahulT: has joined #ruby
[05:16:00] tyl: ekleog yeah something like that
[05:16:16] pawnbox: has joined #ruby
[05:16:20] Aeyrix: that would work
[05:17:17] ranchodev: has joined #ruby
[05:18:08] Aeyrix: https://eval.in/417540
[05:18:27] Aeyrix: lol fuck I called a class a model
[05:18:41] baweaver_: Too much Rails there skippy?
[05:20:12] Sembei: has joined #ruby
[05:20:32] EminenceHC: has joined #ruby
[05:20:51] Aeyrix: way too much
[05:21:01] Aeyrix: Also I say 'lad' too much. I called the guy who made my subway today it.
[05:21:07] Aeyrix: "Thanks lad'
[05:21:52] jpfuentes2: has joined #ruby
[05:22:11] jacyzon: has joined #ruby
[05:22:36] skydiver: has joined #ruby
[05:22:48] baweaver_: I tend to default to mate myself.
[05:23:29] Aeyrix: 'lad' is a v. british thing
[05:23:36] CloCkWeRX: has left #ruby: ()
[05:23:42] baweaver: I pretty well have to tell new people metaprogramming is not a thing
[05:24:03] baweaver: They get carried away
[05:24:08] baweaver: and make an unmaintainable mess
[05:24:11] mistermocha: has joined #ruby
[05:24:17] baweaver: when it wasn't necessary to use it in the first place
[05:24:21] baweaver: When you have a hammer....
[05:26:12] aganov: has joined #ruby
[05:27:16] sevenseacat: baweaver: we'll make an aussie out of you yet!
[05:27:36] havenwood: has joined #ruby
[05:28:32] baweaver: I'll visit eventually.
[05:29:00] tyl: ekleog how about joining chains like this ? http://pastie.org/10355962
[05:29:04] ekleog: Is there a "standard" way to write a noop lambda? Would you be shocked by reading "lambda {}"?
[05:29:57] ekleog: tyl: You could place generalMethod2 just like generalMethod1 in the previous example, but in the class that generalMethod1 returns ;)
[05:31:15] tyl: ekleog which means there would be no way to chain without getting a result product for each of the combined method chains
[05:31:50] tyl: basically generalMethod1 must produce a product for generalMethod2 to work upon?
[05:32:32] ekleog: Indeed, when you write "a.foo.bar", foo must return something so that bar can be called upon it
[05:33:31] ekleog: Some convoluted way to do this would be to use a class wrapper that provides the wanted methods and wraps the underlying object
[05:35:08] Oog: has joined #ruby
[05:35:41] ekleog: tyl: Something like that: http://pastie.org/10355969
[05:36:12] ekleog: (whoops, forgot to delete the "Model" class addendum in this paste)
[05:36:18] astrobunny: has joined #ruby
[05:38:20] qiukun: has joined #ruby
[05:39:12] last_staff: has joined #ruby
[05:39:26] riotjones: has joined #ruby
[05:40:05] dgutierrez1287: has joined #ruby
[05:40:46] djbkd: has joined #ruby
[05:41:02] tyl: ekleog THANKS
[05:42:03] ekleog: You're welcome :)
[05:45:35] kachi8: has joined #ruby
[05:48:45] roolo: has joined #ruby
[05:51:44] jpfuente_: has joined #ruby
[05:57:17] NeverDie: has joined #ruby
[06:01:06] nimf: has joined #ruby
[06:01:51] NeverDie_: has joined #ruby
[06:03:26] charliesome: has joined #ruby
[06:03:35] christiandsg: has joined #ruby
[06:03:59] NeverDie_: has joined #ruby
[06:04:01] lampshades: has joined #ruby
[06:04:35] codecop: has joined #ruby
[06:04:47] greg: has joined #ruby
[06:04:51] lampshades: has joined #ruby
[06:05:01] Pupp3tm4st3r: has joined #ruby
[06:05:12] greg: hello is there any open source project for naive?
[06:06:39] pawnbox_: has joined #ruby
[06:06:39] ferhaty: has joined #ruby
[06:10:31] baweaver: you're going to need to clarify that greg
[06:11:02] baweaver: (they switched nicks)
[06:12:50] lsmola: has joined #ruby
[06:12:50] Rollabunna: has joined #ruby
[06:14:09] bnagy: I thought you typed your google search into the #
[06:14:17] bnagy: it's ok, we don't judge
[06:14:28] bnagy: we don't all judge
[06:14:29] baweaver: aeyrix does
[06:15:30] baweaver: I just stare in amused bewilderment half the time
[06:18:22] knu: has joined #ruby
[06:18:49] f4cl3y: has joined #ruby
[06:19:09] eGGsha: has joined #ruby
[06:20:25] christiandsg: has joined #ruby
[06:20:53] workmad3: has joined #ruby
[06:22:28] nkts: has joined #ruby
[06:22:29] khebbie: has joined #ruby
[06:24:27] rht: has joined #ruby
[06:25:30] khebbie: has joined #ruby
[06:25:34] tvw: has joined #ruby
[06:26:36] mistermocha: has joined #ruby
[06:27:03] demonlove: has left #ruby: ("Leaving")
[06:30:29] roolo: has joined #ruby
[06:30:36] blandflakes: has joined #ruby
[06:30:47] Radar: Does anyone here speak German and can give me the English translation of Artikelstammnummer?
[06:30:52] Me1: has joined #ruby
[06:31:02] sevenseacat: article something number?
[06:32:07] Radar: I think it means "item number"
[06:32:21] sevenseacat: original article number, google says
[06:32:32] Aeyrix: Article serial number, ish.
[06:33:47] ekleog: Is there a clean way to make { foo: "bar" }.foo return "bar"?
[06:35:30] ekleog: nvm, just found method_missing
[06:35:38] haxrbyte: has joined #ruby
[06:35:39] bnagy: just don't
[06:35:49] Aeyrix: >just found method missing
[06:35:51] bnagy: or, if you must, use ostruct
[06:36:06] Aeyrix: https://www.youtube.com/watch?v=_X6VoFBCE9k
[06:36:10] bnagy: which is all that rap but written "properly"
[06:36:29] sevenseacat: ostruct is nice.
[06:36:51] bnagy: we hates it precious
[06:37:10] haxrbyte: has joined #ruby
[06:37:24] ekleog: ostruct = OpenStruct? Looks like exactly what I was trying to do :)
[06:37:27] bubbys: has joined #ruby
[06:38:07] bnagy: ekleog: the thing with naive method missing approach is that people get tripped by by keys that are actually methods, so they don't get dispatched
[06:38:26] bnagy: so you have to use basicobject or whatever
[06:38:32] bnagy: or ideally Just Don't ;)
[06:38:39] bnagy: cause it's slow
[06:40:18] Ox0dea: bnagy: Adaptive #method_missing is best #method_missing.
[06:40:58] bnagy: I don't know what that is
[06:41:15] lucyinthesky: has joined #ruby
[06:41:28] pawnbox: has joined #ruby
[06:41:45] ejnahc: has joined #ruby
[06:42:32] howdoi: has joined #ruby
[06:42:43] Ox0dea: Generating "real" methods from within #method_missing.
[06:43:24] Ox0dea: It doesn't fit every use case, but it's a decent way to combat the performance hit.
[06:43:40] bnagy: oic. I've done stuff like that, but you have to be pretty sure it's going to get called a few times, right?
[06:43:43] haxrbyte: has joined #ruby
[06:43:47] Ox0dea: Well, sure.
[06:44:13] bnagy: it would be good to see benchmarks on ostruct though :)
[06:44:31] bruno-: has joined #ruby
[06:44:39] bnagy: I don't know how much define_method costs
[06:45:32] bnagy: I did it with some FFI stuff where creating the FFI methods was quite expensive, so I created them lazily
[06:45:57] lucyinthesky: has left #ruby: ("Leaving")
[06:46:02] bnagy: was quite a big win, but the FFI stuff is kinda slow to start
[06:47:13] Macaveli: has joined #ruby
[06:47:14] sevenseacat: I saw one that said ostruct is significantly slower than plain old normal struct
[06:47:56] bnagy: isn't Struct just a fussy Hash?
[06:49:16] sevenseacat: kinda like ostruct :P
[06:49:36] bnagy: ostruct is a lazy hash
[06:50:30] bnagy: I guess it's no lazier than a hash tbh :/
[06:50:38] bnagy: just dumb syntax
[06:51:05] ekleog: Unrelated: Is there a way to deny creation, except for static methods on the class?
[06:51:18] Ox0dea: bnagy: A cursory reading of struct.c indicates that Structs essentially store their members in a linked list.
[06:51:31] Ox0dea: Which is then attached to instances via a "secret" instance variable.
[06:51:35] sevenseacat: 'deny creation'?
[06:51:53] bnagy: Ox0dea: o_0
[06:51:53] sevenseacat: ekleog: what kind of bastardization of ruby are you trying to do
[06:51:53] ekleog: Like "'Blah.new' should fail"
[06:52:07] ekleog: (just trying to enforce usage of factory methods)
[06:52:17] djbkd: has joined #ruby
[06:52:17] Oog: has joined #ruby
[06:53:20] Ox0dea: ekleog: Would it not suffice to make the #new class method private?
[06:53:24] ekleog: I found private_class_method, but if I understood correctly, private in ruby means private including to other objects of the same class, so I guess it'd be private for static methods
[06:53:48] sevenseacat: well `new` is a class method, so that seems to fall inside your 'except for static methods' misnomer
[06:54:41] Pupp3tm4st3r: has joined #ruby
[06:54:43] pyon: has joined #ruby
[06:55:22] greenarrow: has joined #ruby
[06:56:26] Ox0dea: ekleog: How about `alias initialize raise`?
[06:56:32] havenwood: ekleog: Why? Do you want only one instance of the Class? Does something happen that means it can't be instantiated any longer?
[06:56:33] Stan: has joined #ruby
[06:56:35] jeadr: has joined #ruby
[06:56:56] sevenseacat: private in ruby means 'cannot be called with an explicit receiver other than self'
[06:57:11] Rollabunna: has joined #ruby
[06:57:52] havenwood: elaptics: If you don't need even one instance just use a Module.
[06:57:57] havenwood: elaptics: oops, mt
[06:59:38] dionysus69: has joined #ruby
[07:00:09] Ox0dea: sevenseacat: Not yet: https://bugs.ruby-lang.org/issues/11297
[07:00:16] havenwood: Oh, "factory methods," I missed that.
[07:00:43] sevenseacat: Ox0dea: ooooh so no explicit receiver at all? ah hah
[07:00:46] ramfjord: has joined #ruby
[07:01:00] havenwood: I think when I see "factory" my brain goes blank for a few seconds.
[07:01:40] rdark: has joined #ruby
[07:03:11] ekleog: sevenseacat: I was about to say I'm unable to call new from a static method. Then I saw Ox0dea's answer and tried without the class name in front and it worked. Thanks all!
[07:03:20] knu: has joined #ruby
[07:03:27] Ox0dea: Wait, what?
[07:03:35] sevenseacat: I have no idea whats going on anymore.
[07:03:37] Ox0dea: I don't recall offering any good advice on this matter.
[07:03:52] sevenseacat: ACTION goes back to poking Rails app
[07:04:50] hololeap: has joined #ruby
[07:05:49] ekleog: Well, I tried using private_class_method and to do MyClass.new inside the factory functions and it didn't work. Then I saw the feature request, and I tried using only "new", which worked :)
[07:06:04] ekleog: s/to do/doing/
[07:06:18] BTRE: has joined #ruby
[07:07:22] ledestin: there was a gem making calling of external processes a breeze
[07:07:52] Pupp3tm4st3r: has joined #ruby
[07:08:21] havenwood: ledestin: Say more?
[07:08:24] hs366: has joined #ruby
[07:08:38] ledestin: havenwood maybe even pipes made easy
[07:08:50] ledestin: I saw it maybe on Ruby Weekly
[07:09:31] havenwood: ledestin: Wild guess?: https://github.com/jarib/childprocess#readme
[07:10:18] ledestin: havenwood no :(
[07:10:42] anisha: has joined #ruby
[07:10:45] havenwood: ledestin: Like interprocess communication? Or shelling out?
[07:10:54] havenwood: ledestin: What is it you want to do?
[07:10:56] radgeRayden: has joined #ruby
[07:11:06] ledestin: havenwood write a bash script in Ruby
[07:11:17] ledestin: lots of external processes
[07:11:31] havenwood: that's like writing a Spanish poem in English
[07:11:33] sameerynho: has joined #ruby
[07:11:34] havenwood: I don't know how
[07:11:37] alphaatom: has joined #ruby
[07:11:46] freezevee: has joined #ruby
[07:12:04] ledestin: well, it's usually cumbersome
[07:12:10] ledestin: that gem made it easy
[07:12:42] Ox0dea: ledestin: I know exactly the one you mean.
[07:12:49] havenwood: ledestin: Ah, Is it like facter?
[07:12:58] sevenseacat: this is like playing guess who
[07:13:00] ledestin: Ox0dea lucky!
[07:13:01] havenwood: Something with an F?
[07:13:04] sevenseacat: ledestin: did it have a mustache?
[07:13:16] ledestin: sevenseacat no, but a hat
[07:13:32] sevenseacat: ACTION clicks a bunch of gems down
[07:13:42] ledestin: havenwood just joking
[07:13:52] bzf: has left #ruby: ()
[07:13:55] ledestin: Ox0dea tell me!
[07:14:35] havenwood: ledestin: http://ruby-doc.org/stdlib/libdoc/shell/rdoc/Shell.html
[07:14:35] Ox0dea: ledestin: https://github.com/pazdera/scriptster
[07:14:52] havenwood: Ox0dea: Haven't seen this.
[07:14:56] vidbina: has joined #ruby
[07:15:00] Ox0dea: It's neat.
[07:15:38] ledestin: Ox0dea looks like it, cheers!
[07:16:24] sevenseacat: ACTION awards Ox0dea with the Psychic award
[07:17:19] ledestin: reading Ruby Weekly paid off finally
[07:19:15] yfeldblum: has joined #ruby
[07:19:46] matcouto: has joined #ruby
[07:19:55] DoubleMalt: has joined #ruby
[07:20:13] khebbie: has joined #ruby
[07:20:14] lxsameer_: has joined #ruby
[07:22:41] vondruch: has joined #ruby
[07:23:24] ledestin: havenwood thanks for helping
[07:23:37] dseitz: has joined #ruby
[07:24:44] episage: has joined #ruby
[07:25:32] sameerynho: has joined #ruby
[07:25:39] Oog: has joined #ruby
[07:25:51] ledestin: wow, Shell is really cool
[07:27:25] havenwood: ledestin: Just for fun, here's a mimic of the FizzBuzz example from Matz' Streem-lang with Shell: https://gist.github.com/havenwood/979fbe4b0c07a627c05a
[07:27:57] terlar: has joined #ruby
[07:29:53] lxsameer_: has joined #ruby
[07:30:19] techsethi: has joined #ruby
[07:31:51] Oog: has joined #ruby
[07:32:29] havenwood: I don't see it used much but Shell has some interesting stuff.
[07:35:11] ndrei: has joined #ruby
[07:35:51] LJT: has joined #ruby
[07:36:49] Thermatix: has joined #ruby
[07:39:18] nuttermb: has joined #ruby
[07:39:22] Ox0dea: Seeing ?c in the wild gives me warmfuzzies.
[07:40:09] Sp4rKy: has joined #ruby
[07:43:41] Oog: has joined #ruby
[07:44:33] aperios: has joined #ruby
[07:44:38] charliesome: has joined #ruby
[07:45:10] charliesome: has joined #ruby
[07:47:55] blue_deref: has joined #ruby
[07:47:57] Musashi007: has joined #ruby
[07:48:43] exadeci: has joined #ruby
[07:49:39] krz: has joined #ruby
[07:50:07] shellox: has joined #ruby
[07:51:01] shellox: shopify's api returns a json in this format and i'd like to print that as readable html https://gist.githubusercontent.com/pbehrisch/17d518c65c24c325593c/raw/d1f7b14ad80986d0aa7b069ff410808cfafb9489/gistfile1.txt
[07:51:12] shellox: how would one do that?
[07:51:43] solars: has joined #ruby
[07:51:43] Oog: has joined #ruby
[07:52:42] Ox0dea: shellox: Well, they're escaping \ to \\/ and special characters to \\u00XX, where the XX is the ordinal value of the character in hexadecimal.
[07:52:47] Ox0dea: #gsub should suffice.
[07:53:04] Ox0dea: *escaping /
[07:53:20] leat: has joined #ruby
[07:54:20] Ox0dea: Actually, they're only escaping < and >, but #gsub is still probably the cleanest approach.
[07:55:00] shellox: i tried str.decode("UTF-8")
[07:55:13] shellox: but but it returns NoMethodError: undefined method `decode' for #<String:0x007ffcd448f390>
[07:55:25] shellox: uhm, i just try to get "normal" html" out
[07:55:27] Ox0dea: It's not encoded; it's escaped.
[07:55:31] Ox0dea: You have to unescape it.
[07:55:57] shellox: ic. so what would your approach be to unescape all \u chars?
[07:56:03] Ox0dea: See above?
[07:56:06] shellox: gsub means i need to replace them one by one?
[07:56:07] terlar: has joined #ruby
[07:56:35] shellox: do you know a library which can detect all of them and unescape?
[07:56:42] Ox0dea: I know of a method which can do so.
[07:56:53] shellox: that's also fine, would you mind sharing it?
[07:57:17] shellox: but that means i need to replace one by one right?
[07:57:24] Ox0dea: Of course not.
[07:57:35] Ox0dea: The "g" in #gsub is "global".
[07:58:19] shellox: i mean for different ones \u003c, \u003e etc.
[07:59:07] pawnbox: has joined #ruby
[07:59:21] opensource_ninja: has joined #ruby
[07:59:28] Ox0dea: #gsub takes an optional block in which you can muck with matches to your heart's content.
[07:59:36] symm-: has joined #ruby
[07:59:59] apeiros: ACTION thinks the resulting output might also be a consequence of improper processing beforehand
[08:00:12] Ox0dea: >> '3c3d3e'.gsub(/../) { |m| m.hex.chr } # shellox
[08:00:13] ruboto: Ox0dea # => "<=>" (https://eval.in/417610)
[08:00:47] Ox0dea: apeiros: Aye, the double backslashes are suspect.
[08:00:47] shellox: aperios: i didn't process it at all
[08:01:00] shellox: it's the json output of shopify
[08:01:04] apeiros: I'm not aperios
[08:01:11] Ox0dea: shellox: Which method did you use to print this output?
[08:03:15] dmolina: has joined #ruby
[08:03:21] shellox: Ox0dea: puts json['smart_collections'][0]['body_html'] :p
[08:04:37] Ox0dea: shellox: Okay, then you do in fact have double backslashes in the string.
[08:04:57] blackmesa: has joined #ruby
[08:05:34] Ox0dea: (Which is kind of weird.)
[08:06:41] Newbie0086: has joined #ruby
[08:07:03] dgutierrez1287: has joined #ruby
[08:07:07] Ox0dea: shellox: Did that #gsub example help clarify how you might approach this, then?
[08:09:02] conor_: has joined #ruby
[08:09:05] pawnbox: has joined #ruby
[08:09:07] charliesome: has joined #ruby
[08:09:35] workmad3: has joined #ruby
[08:10:00] closer: has joined #ruby
[08:10:39] shellox: Ox0dea: yep, think i got it. thanks
[08:11:32] Ox0dea: shellox: If it's the case that you *don't* actually have double backslashes (on which I think apeiros' judgment was sound), you should be able to just pass the string through CGI.unescape.
[08:11:48] Ox0dea: >> require 'cgi'; CGI.unescape '\u003c'
[08:11:49] ruboto: Ox0dea # => "\\u003c" (https://eval.in/417612)
[08:12:18] Ox0dea: Maybe not.
[08:12:26] darkf_: has joined #ruby
[08:13:26] charliesome: has joined #ruby
[08:13:35] ndrei: has joined #ruby
[08:14:42] dumdedum: has joined #ruby
[08:14:44] conor_: has joined #ruby
[08:15:07] matcouto: has joined #ruby
[08:15:59] icarus: has joined #ruby
[08:16:17] TheHodge: has joined #ruby
[08:17:06] joonty: has joined #ruby
[08:19:54] leafybasil: has joined #ruby
[08:20:44] ndrei: has joined #ruby
[08:21:46] sameerynho: has joined #ruby
[08:22:28] Hounddog: has joined #ruby
[08:23:27] devoldmx: has joined #ruby
[08:24:11] roolo: has joined #ruby
[08:24:47] bweston92: has joined #ruby
[08:26:17] knu: has left #ruby: ()
[08:27:05] Hounddog: has joined #ruby
[08:27:19] conor_: has joined #ruby
[08:27:44] shredding: has joined #ruby
[08:27:58] Pupp3tm4st3r: has joined #ruby
[08:28:20] vidbina: has joined #ruby
[08:28:36] ferhaty: has joined #ruby
[08:29:36] livathinos: has joined #ruby
[08:32:16] mistermocha: has joined #ruby
[08:32:17] ght: has joined #ruby
[08:34:26] mistermocha: has joined #ruby
[08:34:44] mandarinkin: has joined #ruby
[08:35:43] astrobunny: has joined #ruby
[08:36:13] duncannz: has joined #ruby
[08:37:14] ashleyhindle: Where can I look to find out why 'rake test' is just hanging?
[08:37:33] bumbar_: has joined #ruby
[08:38:54] Ox0dea: ashleyhindle: How about `lsof -p`?
[08:39:12] elaptics: ashleyhindle: use --trace to get verbose output and see if that shows anything
[08:41:26] ishahnaz: has joined #ruby
[08:41:27] chthon: has joined #ruby
[08:43:48] ndrei: has joined #ruby
[08:45:19] jeadr: has joined #ruby
[08:50:00] ishahnaz: has joined #ruby
[08:51:09] bodgix1: has joined #ruby
[08:53:41] tomphp: has joined #ruby
[08:54:15] ashleyhindle: rake test is hanging after 'Execute test:run' :( https://gist.githubusercontent.com/ashleyhindle/d680a5592b40647a9eb9/raw/b898a42ce242fbe11b73bc5e0ecf63e7672b0dd4/rake%2520test%2520hanging
[08:54:23] ashleyhindle: Is that stuck in active_record migration?
[08:54:25] einarj: has joined #ruby
[08:55:26] Ox0dea: ashleyhindle: Something is calling #gets.
[08:55:35] lxsameer_: has joined #ruby
[08:56:14] Ox0dea: ashleyhindle: https://github.com/rails/spring/blob/master/lib/spring/client/run.rb#L98
[08:56:29] Ox0dea: That line waits for input.
[08:56:30] kirun: has joined #ruby
[08:56:31] charliesome: has joined #ruby
[08:56:45] arta82: has joined #ruby
[08:56:52] ashleyhindle: Hmm - I presume it starts the server required?
[08:57:00] ashleyhindle: It worked last week
[08:57:15] mikecmpbll: has joined #ruby
[08:57:49] Hexdecimal: has joined #ruby
[08:57:59] Hexdecimal: hey everyone :)
[08:58:50] cibs_: has joined #ruby
[08:59:37] blackmesa: has joined #ruby
[08:59:56] marr: has joined #ruby
[09:00:38] Ox0dea: >> ['4865792c20486578646563696d616c2e'].pack 'H*'
[09:00:39] ruboto: Ox0dea # => "Hey, Hexdecimal." (https://eval.in/417622)
[09:04:17] hexadecimal: has joined #ruby
[09:04:33] hexadecimal: your link just crashed everything on my computer...
[09:05:08] Spami: has joined #ruby
[09:05:12] jhass: uh, get a better one?
[09:05:25] hexadecimal: ohh its fine..
[09:05:48] hexadecimal: the link had a dns error then crashed all of my browsers
[09:06:02] hexadecimal: (https://eval.in/417622)
[09:06:47] apeiros: it's 2015. this is normal :<
[09:07:29] hexadecimal: was really getting to dark side of the moon haha
[09:08:44] sameerynho: has joined #ruby
[09:12:07] hexadecimal: when does someone know they are ready to start programming as a profession without a qualification ? just curious
[09:13:48] codecop: has joined #ruby
[09:14:28] Oog: has joined #ruby
[09:14:29] sameerynho: has joined #ruby
[09:17:00] LJT: has joined #ruby
[09:17:42] pawnbox: has joined #ruby
[09:18:50] tuor: has left #ruby: ("WeeChat 1.1.1")
[09:18:57] duoi: has joined #ruby
[09:19:15] wasamasa: that's like asking how you can know whether you're in love
[09:19:18] wasamasa: you just do it, duh
[09:23:14] pengin: has joined #ruby
[09:23:46] yorickpeterse: well, knowing whether you're in love or not is pretty easy to figure out
[09:25:26] lxsameer_: has joined #ruby
[09:25:51] gregf_: hexadecimal: not trying to deter you :/, but qualifications are now being used to filter candidates :/. so why not study and work .. prolly the open uni ;)
[09:26:21] pen-soldier: has joined #ruby
[09:26:32] RahulT: has joined #ruby
[09:26:42] yorickpeterse: There might be some jobs where a degree is preferred, or required, but it certainly isn't the norm
[09:27:57] hexadecimal: so do you guys believe a degree is essential to get a career as a programmer. im at uni atm but just interested
[09:28:14] gregf_: hexadecimal: no . no really
[09:28:54] yorickpeterse: hexadecimal: depends on your field
[09:28:54] gregf_: s/no/not/
[09:29:07] yorickpeterse: e.g. if you're heading to the medical or financial sector, maybe
[09:29:21] five27: has joined #ruby
[09:30:02] gregf_: hexadecimal: to get a job as a doctor or a solicitor you 'surely' need a degree in the specific field. not so in computer science. but yeah, if you have a numerical/computing degree it sure does help
[09:30:52] wasamasa: hexadecimal: it helps
[09:31:07] gregf_: yorickpeterse: finance sector, not really. i've started of in Investment banking and no not everyone in IT 'has' a degree
[09:31:38] yorickpeterse: hence I said "maybe"
[09:33:19] Karpah: has joined #ruby
[09:35:04] pawnbox: has joined #ruby
[09:35:07] np0: has joined #ruby
[09:35:35] astrobunny: has joined #ruby
[09:36:18] mistermocha: has joined #ruby
[09:36:31] gregf_: hexadecimal: for working on PHP you dont need even need brains :/
[09:37:08] jhass: you mean having a brain would be harmful in achieving anything
[09:37:11] gregf_: haha, cuz some of the php dudes think they know so much, their brains would fall off from the middle :/ srsly
[09:37:42] apeiros: can we have the bashing in #ruby-offtopic?
[09:38:36] gregf_: apeiros: ;), sorry about that
[09:40:36] vidbina: has joined #ruby
[09:43:14] EminenceHC: has joined #ruby
[09:45:22] sideshowcoder: has joined #ruby
[09:46:21] c0m0: has joined #ruby
[09:47:17] hexadecimal: im quite new to ruby and programming... would i be better off learning ruby before rails ?
[09:48:07] Me1: has joined #ruby
[09:48:44] sevenseacat: most definitely.
[09:49:09] workmad3: has joined #ruby
[09:51:02] oivoodoo: has joined #ruby
[09:51:14] Oog: has joined #ruby
[09:52:30] oivoodoo: Hi everyone. Could someone help me to understand WeakRef and when we should use it? Lets say I am having sidekiq process where I am loading for processing about 100mb file I want to make sure that GC free the memory at the end. Could I use WeakRef to wrap `content`(100mb) and then make GC.start at the end of the sidekiq process?
[09:52:44] Kero: has joined #ruby
[09:53:00] oivoodoo: Is it possible to have in MRI GC.start in the middle of the processing 100mb data in the sidekiq process?
[09:53:18] oivoodoo: content = WeakRef.new(content); process(content) ; GC.start
[09:54:19] Mon_Ouie: Why do you think a weak reference would be beneficial here?
[09:54:34] oivoodoo: 1. yes. is it benefit to use WeakRef?
[09:54:47] oivoodoo: 2. Is it possible to get GC.start in the middle of process(content) method call?
[09:55:04] bnizzle: has left #ruby: ()
[09:55:29] Ox0dea: hexadecimal: This is what happens when you try to learn Rails before you know Ruby: https://www.youtube.com/watch?v=TRqGmmCy8aU
[09:55:53] Mon_Ouie: As far as I can see from this, that example will simply fail if the GC claims 'content' while you're still using it (which can happen, if you only have a weak reference to it)
[09:55:54] oivoodoo: :) I don't think so. I worked with Ruby a lot of years but I haven't used WeakRef )
[09:56:11] vidbina_: has joined #ruby
[09:56:30] Mon_Ouie: I just don't know what you're trying to achieve
[09:57:12] oivoodoo: ok. do you know the examples when it's possible to use WeakRef? Lets say in my example probably it's better to leave as it is
[09:58:24] Shoutsid: has joined #ruby
[09:58:26] Pupp3tm4st3r: has joined #ruby
[09:58:43] RahulT: has joined #ruby
[09:59:07] Mon_Ouie: I don't know of many practical uses for them, no. Debugging tools may benefit from holding on to an object as long as it is alive without preventing it from being collected.
[09:59:17] _blizzy_: has joined #ruby
[10:01:15] oivoodoo: thank you! it looks like it's overhead in my situation.
[10:01:51] Oog: has joined #ruby
[10:02:28] dgutierrez1287: has joined #ruby
[10:05:04] chipotle: has joined #ruby
[10:06:24] pawnbox: has joined #ruby
[10:07:21] Gmi: has joined #ruby
[10:07:26] bnizzle: has joined #ruby
[10:07:48] _blizzy_: has joined #ruby
[10:09:30] bronson: has joined #ruby
[10:12:17] roolo: has joined #ruby
[10:15:46] techsethi: has joined #ruby
[10:19:06] michael_mbp: has joined #ruby
[10:20:10] stamina: has joined #ruby
[10:20:24] rickmasta: has joined #ruby
[10:21:55] ashleyhindle: I fixed rake test hanging by running 'spring stop'
[10:22:56] sevenseacat: fucking spring
[10:23:03] sdothum: has joined #ruby
[10:24:11] devoldmx: has joined #ruby
[10:24:56] ndrei: has joined #ruby
[10:25:11] oddalot: has joined #ruby
[10:25:23] oddalot: anyone know the rails channel name?
[10:25:45] oddalot: i tried to join #rails and it sent me to some namespace channel.
[10:25:53] sameerynho: has joined #ruby
[10:25:54] Ox0dea: ?rails oddalot
[10:25:54] ruboto: oddalot, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[10:26:45] oddalot: ahhh, thanks
[10:26:54] Ox0dea: Sure thing.
[10:30:12] platzhirsch: has joined #ruby
[10:30:20] sarkyniin: has joined #ruby
[10:30:33] Thermatix: why is every other ruby channel so dead?
[10:30:44] hexadecimal: cause this one is the best
[10:30:51] platzhirsch: This is the ONE
[10:30:57] Thermatix: rubyonrails, siantra, opal, etc
[10:30:58] leafybasil: has joined #ruby
[10:31:04] Thermatix: I ask a question and I get no response
[10:31:07] ljarvis: because of the time of day
[10:31:14] hexadecimal: ruby on rails is pretty active ?
[10:31:38] Thermatix: does any one know how to use opalrb?
[10:31:45] ruboto: Just ask your question, if anyone has or can, they will respond.
[10:31:49] hexadecimal: whats the coolest thing everyone has programmed ?
[10:32:16] ljarvis: hexadecimal: that's broad enough to be in #ruby-offtopic I think
[10:32:18] Thermatix: @ruboto I have, and no one responded they jsut ignored my question
[10:32:26] Ox0dea: > @ruboto
[10:32:28] oddalot: never heard of opalrb, don't know why you would want to convert ruby to javascript
[10:32:31] jhass: ?justabot
[10:32:31] ruboto: I'm just a bot. You don't need to address me.
[10:32:44] oddalot: why not just write out javascript lol
[10:32:53] ljarvis: because javascript
[10:32:57] Thermatix: becuase I like ruby and I don't like javascript
[10:32:58] oddalot: good point
[10:33:03] Ox0dea: thermatix: Why's that?
[10:33:11] RahulT: has joined #ruby
[10:33:16] Ox0dea: Lemme guess: surface syntax?
[10:33:32] Thermatix: it's the whole
[10:33:34] oddalot: doesn't matter if you don't like it though, languages are very well optomized for translation
[10:33:40] Ox0dea: The whole... what?
[10:33:44] oddalot: are NOT* very well
[10:33:56] Thermatix: functions arn't just functions but objects and other stuff at the same time
[10:34:26] Gmi: has joined #ruby
[10:34:28] Thermatix: I mean sure it means you can pass a function as an argument (for things like callbacks)
[10:34:43] oddalot: it's seriously seems like trying to force a square peg in a round hole
[10:34:45] Thermatix: But I'd just use a yield or a proc.call
[10:34:47] eGGsha: has joined #ruby
[10:34:53] oddalot: just learn to embrace the circle
[10:35:11] Thermatix: the circle?
[10:35:14] ljarvis: first-class functions are the one thing that i *wish* was in Ruby; that's an odd thing to prefer Ruby with
[10:35:42] oddalot: the circle of life
[10:35:47] ljarvis: I'll take my parens any day
[10:35:54] ljarvis: i aint afraid()
[10:36:00] bhaak: of all the shitty things in javascript, you pick the one that isn't :)
[10:36:19] Thermatix: I just don't like it
[10:36:28] bhaak: you could have just said '==' to show what madness reigns in js
[10:36:37] oddalot: (function () { console.log("javascript ain't that bad"); }());
[10:36:37] towski_: has joined #ruby
[10:36:40] Pupp3tm4st3r: has joined #ruby
[10:36:44] Thermatix: I like having a class that I can then use to instantiate objects
[10:36:57] apeiros: thermatix: you can do that in js
[10:37:01] ljarvis: javascript has that too. Anyway, we're getting off topic
[10:37:14] Thermatix: any one know opalrb?
[10:37:17] oddalot: JavaScript has multiple ways to do that in fact.
[10:37:20] ljarvis: ?anyone thermatix
[10:37:20] ruboto: thermatix, Just ask your question, if anyone has or can, they will respond.
[10:38:17] lxsameer_: has joined #ruby
[10:38:20] _blizzy_: has joined #ruby
[10:38:54] bhaak: http://opalrb.org/try/
[10:39:15] apeiros: ljarvis: what about sigils instead of explicit parens? i.e. in my toy language, .foo -> call the method "foo", :foo -> retrieve the method instance
[10:39:19] user1138: has joined #ruby
[10:42:03] jgt: has joined #ruby
[10:43:27] ljarvis: apeiros: Interesting. I think that's nice, though I would still prefer the latter myself.
[10:43:34] sameerynho: has joined #ruby
[10:43:45] apeiros: "the latter" = explicit parens?
[10:44:27] apeiros: the one thing I learned when working on my toy language: avoiding sigil noise is *very* difficult
[10:44:41] apeiros: you always sacrifice something
[10:46:02] yorickpeterse: eh, it's not too hard
[10:46:38] _blizzy_: has joined #ruby
[10:47:04] hexadecimal: http://pastebin.com/RbbT1VrV
[10:47:04] ruboto: hexadecimal, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/e58da980f0b7102fe083
[10:47:05] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[10:47:22] apeiros: hexadecimal: ARGV
[10:48:34] apeiros: yorickpeterse: only if sacrificing is not hard ;-)
[10:51:33] arup_r: has joined #ruby
[10:52:22] jgt: has joined #ruby
[10:55:01] phutchins1: has joined #ruby
[10:55:38] vidbina: has joined #ruby
[10:55:58] Oog: has joined #ruby
[10:57:55] techsethi: has joined #ruby
[10:58:41] The_Phoenix: has joined #ruby
[10:59:12] allcentury: has joined #ruby
[11:00:11] The_Phoenix: has joined #ruby
[11:00:35] mikecmpbll: ACTION cries out of frustration
[11:00:55] mikecmpbll: openssl s_client can connect to a server, but I can't with ruby's openssl
[11:01:23] The_Phoenix: has joined #ruby
[11:01:37] mikecmpbll: (and net/http)
[11:01:42] [k-: has joined #ruby
[11:01:56] matti: ACTION hugs mikecmpbll 
[11:02:11] matti: mikecmpbll: What's the code/error?
[11:02:24] matti: mikecmpbll: https://github.com/augustl/ruby-openssl-cheat-sheet
[11:02:31] mikecmpbll: unable to get local issuer certificate
[11:02:49] lxsameer_: has joined #ruby
[11:02:59] matti: http://notetoself.vrensk.com/2008/09/verified-https-in-ruby/
[11:03:04] matti: http://findingscience.com/ruby/ssl/2013/01/13/reading-an-ssl-cert-in-ruby.html
[11:03:08] matti: http://www.rubyinside.com/nethttp-cheat-sheet-2940.html
[11:03:12] matti: https://devnotcorp.wordpress.com/2012/08/21/usage-examples-of-rubys-openssl-lib/
[11:03:13] The_Phoenix: has joined #ruby
[11:03:13] The_Phoenix: has joined #ruby
[11:03:46] davedev24: has joined #ruby
[11:03:55] mikecmpbll: i'm using this to test: https://github.com/mislav/ssl-tools/blob/8b3dec4/doctor.rb and getting this result: https://gist.github.com/mikecmpbll/5bf9860fe97091c0a3e2
[11:04:13] pawnbox: has joined #ruby
[11:05:15] matti: mikecmpbll: Chain correct? root correct?
[11:05:28] mikecmpbll: according to ssllabs there's no chain issues
[11:05:41] mikecmpbll: https://www.ssllabs.com/ssltest/analyze.html?d=old-trafford.uk.arbor.sc&s=54.77.6.203
[11:05:57] Oog: has joined #ruby
[11:06:31] matti: mikecmpbll: Add -showcerts and see if you are missing something.
[11:06:33] rodfersou: has joined #ruby
[11:06:39] matti: mikecmpbll: To openssl s_client
[11:06:42] matti: I wonder.
[11:06:53] dhjondoh: has joined #ruby
[11:06:54] _blizzy_: has joined #ruby
[11:06:56] matti: On the box you are running doctor.rb from.
[11:07:30] techsethi: has joined #ruby
[11:07:31] matti: You might need to drop root/complete chain on the box itself.
[11:07:45] mikecmpbll: ok done, shows the rapidssl, geotrust, and equifax certs
[11:07:55] matti: Nothing missing?
[11:08:01] Encapsulation: has joined #ruby
[11:08:06] mikecmpbll: dunno whether that means that those were sent or found locally
[11:09:08] matti: And you get no "verify error:num=20:unable to get local issuer certificate" in the output?
[11:09:28] mikecmpbll: nope i get Verify return code: 0 (ok)
[11:10:07] matti: I guess the doctor.rb is not loading something.
[11:10:29] astrobunny: has joined #ruby
[11:10:44] mikecmpbll: according to googling, the set_default_paths (https://github.com/mislav/ssl-tools/blob/8b3dec4/doctor.rb#L37) is meant to load the same certs as openssl uses
[11:11:14] mikecmpbll: but there doesn't seem to be a way to look at the cert paths that an instance of OpenSSL::X509::Store is using :/
[11:11:33] mikecmpbll: and the C source code is a bit difficult to trace for me to work out what exactly set_default_paths does
[11:11:56] rickmasta: has joined #ruby
[11:11:58] jhass: mikecmpbll: what are the values for ca_file and ca_path?
[11:12:12] jhass: that doesn't sound good
[11:12:22] jhass: you're on os x?
[11:12:25] mikecmpbll: jhass: i know, i thought it was odd, but the doctor script works for any other ssl domain
[11:13:19] jhass: rvm provided openssl?
[11:13:32] mikecmpbll: not that I know of
[11:13:52] jhass: uhm, now onto remembering where openssl.so is in a RVM install...
[11:13:52] sameerynho: has joined #ruby
[11:15:01] _blizzy_: has joined #ruby
[11:15:09] troulouliou_div2: has joined #ruby
[11:15:55] ndrei: has joined #ruby
[11:16:10] joonty: has joined #ruby
[11:16:10] jhass: I'd be curious about your ldd ~/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/*/openssl.so
[11:16:55] lxsameer_: has joined #ruby
[11:17:15] yardenbar: has joined #ruby
[11:18:15] txdv: has joined #ruby
[11:18:28] slani: has joined #ruby
[11:20:13] jhass: or .dynlib or something on os x I guess
[11:20:28] mikecmpbll: dunno what i'm doing :d
[11:20:46] ruurd: has joined #ruby
[11:21:07] jhass: finding the libssl your ruby links against :P
[11:21:34] jhass: I know shit about os x so I can only give rough pointers
[11:23:12] mikecmpbll: that's cool, i'll have a dig
[11:23:16] apeiros: .bundle or .dylib on osx usually
[11:23:21] bruno-: has joined #ruby
[11:23:25] lkba: has joined #ruby
[11:23:34] jhass: for what it's worth my Ruby has no trouble connecting to that host
[11:23:48] mikecmpbll: jhass: hmpf. how did you test?
[11:24:03] jhass: cloning that doctor.rb to make sure
[11:24:16] mikecmpbll: cool. i suspect it's a local issue so that doesn't surprise me
[11:24:36] al2o3-cr: has joined #ruby
[11:25:01] jhass: yeah, my main suspicion atm is that it links against some openssl that doesn't have access to a (valid) cert store for whatever reason
[11:25:33] jhass: so actually we can verify that or you just get the curl bundle right away and patch your stuff to explicitly use that
[11:25:48] jhass: http://curl.haxx.se/docs/caextract.html
[11:26:36] mikecmpbll: i'd rather figure out why it's behaving funny, just not sure how to find which openssl it's using atm
[11:27:34] livcd: has joined #ruby
[11:29:26] troulouliou_div2: has joined #ruby
[11:29:33] chills42: has joined #ruby
[11:29:34] multiscan: has joined #ruby
[11:29:35] Janice: has joined #ruby
[11:29:36] Oka: has joined #ruby
[11:30:26] jhass: run ldd on Ruby's openssl ext
[11:30:34] jhass: the path should be roughly right, look around
[11:30:41] qiukun: has joined #ruby
[11:31:09] Janice: has left #ruby: ()
[11:32:01] abdoudjanifresh: has joined #ruby
[11:32:18] josh4: has joined #ruby
[11:34:03] quie: has joined #ruby
[11:34:16] mikecmpbll: i don't know what ldd is, it's not in my PATH anyway
[11:34:18] Narzew: has joined #ruby
[11:34:40] BackEndCoder: has joined #ruby
[11:34:41] jhass: ugh, really?
[11:34:57] apeiros: yeah, I think it's a different tool on osx
[11:35:15] jhass: otool -L apparently
[11:35:23] apeiros: heh, you googled quicker than I :)
[11:35:30] apeiros: yeah, otool -L also fits my memory
[11:35:42] mikecmpbll: oh lala, one sec then!
[11:35:55] quie: ldd == love you great
[11:35:58] apeiros: oh, interesting: http://bhami.com/rosetta.html
[11:36:16] apeiros: though, that seems deprecated
[11:36:18] terlar: has joined #ruby
[11:36:22] apeiros: still lists NetInfo Manager for osx
[11:36:26] jhass: and also unreadable...
[11:36:30] Me1: has joined #ruby
[11:37:12] mikecmpbll: find $MY_RUBY_HOME -name openssl.bundle returns nothing :|
[11:37:26] pawnbox_: has joined #ruby
[11:38:08] Quex: has joined #ruby
[11:38:18] apeiros: jhass: I have to admit, I prefer difficult to read over non-existent :-/
[11:38:35] jeadr: has joined #ruby
[11:38:41] Quex: i have a folder full of gems is there a chance to install them all at once without descibing each time something like gem install ./gems/*
[11:38:45] jhass: mikecmpbll: dylib then?
[11:39:27] mikecmpbll: find $MY_RUBY_HOME -name openssl*
[11:39:39] jhass: que_: that doesn't work? fallback to some simple shellscript then: for name in ./gems/*; gem install $name; done
[11:39:43] jhass: + missing do
[11:39:55] Quex: jhass: no other way to do it ?
[11:39:59] mikecmpbll: oh, multiline paste didn't work. it only finds openssl.rb
[11:40:03] porfa: has joined #ruby
[11:40:13] jhass: que_: if your first try doesn't work I'm not seeing how
[11:40:31] Quex: it is still thinking :P
[11:41:20] jhass: mikecmpbll: anything nicer in ruby -ropenssl -e 'p $LOADED_FEATURES.grep(/openssl/)' ?
[11:41:56] Quex: ok the * thing works
[11:42:57] mikecmpbll: jhass: ["openssl.so", "/Users/mike.campbell/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/openssl/bn.rb", "/Users/mike.campbell/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/openssl/cipher.rb", "/Users/mike.campbell/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/openssl/config.rb", "/Users/mike.campbell/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/openssl/digest.rb", "/Users/mike.campbell/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/openssl/x509.rb", "/Users/mike.c
[11:42:57] mikecmpbll: ampbell/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/openssl/buffering.rb", "/Users/mike.campbell/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/openssl/ssl.rb", "/Users/mike.campbell/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/openssl.rb"]
[11:43:15] jhass: that's a bit big for channel paste ;)
[11:43:19] suchness: has joined #ruby
[11:43:24] mikecmpbll: didn't look that big in my terminal :p
[11:43:37] jhass: sigh, "openssl.so"
[11:43:40] mikecmpbll: anyways, not >3 lines of text, rules abided by!
[11:43:41] Me1: has joined #ruby
[11:43:41] jhass: for me it's a full path
[11:43:56] BackEndCoder: has joined #ruby
[11:44:01] mikecmpbll: so that file exists somewhere on my system, i should be able to find it
[11:44:07] jhass: but anyway, looks like ruby sticks to the .so extension
[11:44:16] suchness: Does anyone know of some gems that add before and after hooks to instance methods?
[11:44:44] suchness: I just finished one, but I am curious to look at other implementations now.
[11:45:13] apeiros: I thought $" by now only contained full paths anymore? :-O
[11:45:19] mistermocha: has joined #ruby
[11:45:24] apeiros: s/full/absolute/
[11:45:35] apeiros: annoying that there's obviously still exceptions
[11:45:38] ldnunes: has joined #ruby
[11:46:05] jhass: ?crosspost suchness
[11:46:05] ruboto: suchness, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[11:46:12] s00pcan: has joined #ruby
[11:46:30] Norelec: has joined #ruby
[11:47:02] apeiros: mikecmpbll: hm, odd, I'm on osx too (rvm ruby) and I get openssl.bundle with absolute path
[11:47:04] bruno-: has joined #ruby
[11:47:43] mikecmpbll: apeiros: seems like something's fucked up doesn't it? just testing other rubies now, 1 sec
[11:47:44] jhass: RVM \o/ because consistent environments!
[11:47:47] apeiros: mikecmpbll: oh, ruby 2.1 I get openssl.so too
[11:47:55] apeiros: interesting.
[11:48:03] quie: has left #ruby: ()
[11:48:12] jhass: "/opt/ruby2.1/lib/ruby/2.1.0/x86_64-linux/openssl.so"
[11:48:16] jhass: get a sane OS ;P
[11:48:18] tmtwd: has joined #ruby
[11:48:27] apeiros: mikecmpbll: but the path for 2.2 is ~/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/x86_64-darwin13/openssl.bundle
[11:48:30] apeiros: might be similar in 2.1
[11:49:02] northfurr: has joined #ruby
[11:49:28] dgutierrez1287: has joined #ruby
[11:49:39] apeiros: hm, nope. nothing here to see :(
[11:49:54] [k-_: has joined #ruby
[11:51:14] sdothum: has joined #ruby
[11:52:24] ferhaty: has joined #ruby
[11:53:31] porfa: can anyone help me out figuring out why this ain't working? https://gist.github.com/anonymous/460c6319b327c86e3a0f
[11:54:03] suchness: Porfa: No, not with that info.
[11:54:25] porfa: hmm what's missing/what do you need to help me out?
[11:54:27] suchness: Porfa: "Not working" is a pretty broad thing.
[11:54:42] jeadr: has joined #ruby
[11:55:02] suchness: Porfa: Maybe "what" isn't working. Maybe an error of some sort? Maybe some syntax highlighting.
[11:56:35] multiscan: has joined #ruby
[11:56:35] porfa: the source site is a basic form that needs to be filled with a date on that format (YYYY-MM-SS), Priority (1,2,3,4,???) and a product number.
[11:56:39] nofxx: Porfa, if you got the form on the form = .... line, what are you still calling [0] everytime? Just call form['foo']
[11:56:41] chills42: has joined #ruby
[11:57:03] porfa: the thing is, i run the script, i go and check my db and everything is empty(no form was submited)
[11:57:07] nofxx: also, not 100% sure but mechanize you need to use field.value = foo, to fill html forms
[11:57:27] nofxx: that [0] thing you're doing is problably changing the object itself
[11:57:38] sepp2k: has joined #ruby
[11:57:57] porfa: thanks for the tips, ill try and fix that and see if it works
[11:58:02] nofxx: also, don't you need just a simple POST Porfa ? you could just httparty or something like that, no need for mechanize
[11:58:08] Pupp3tm4st3r: has joined #ruby
[11:58:35] porfa: nofxx: sure, but in the future I'm sure i'll need mechanize, that's why I'm doing this simple form filling first
[11:58:49] nofxx: Porfa, cool
[12:00:27] roolo: has joined #ruby
[12:00:41] greenarrow: has joined #ruby
[12:00:51] pawnbox: has joined #ruby
[12:00:59] porfa: hmmm issue whats going on, when i hit the submit command, it shows me all the forms from the site, but their alue are empty
[12:01:35] nofxx: Porfa, this is how I'm running a mechanize script: https://gist.github.com/nofxx/75495370bce003d40ddc
[12:01:49] rbennacer: has joined #ruby
[12:02:07] Ropeney: has joined #ruby
[12:02:07] porfa: so clean, thank you
[12:02:24] wprice: has joined #ruby
[12:03:23] skydiver: has joined #ruby
[12:04:44] porfa: nofxx: where can i post a screenshot?
[12:05:29] casadei_: has joined #ruby
[12:05:37] porfa: well, i've managed to fill the forms the same way as you but when i submit, they get emptied?
[12:05:38] porfa: https://gist.github.com/anonymous/96ca6654f22c95eff15c
[12:09:51] [k-_: could it be that they are just representing the "new" form on the page?
[12:09:56] devoldmx: has joined #ruby
[12:10:10] [k-_: afaik, form fields are reset when you submit them
[12:10:32] [k-_: you can try doing it in the browser
[12:11:05] porfa: i've done it in the browser, the data is inserted into the db :(
[12:11:06] jerius: has joined #ruby
[12:11:46] astrobunny: has joined #ruby
[12:12:11] but3k4: has joined #ruby
[12:14:09] d10n-work: has joined #ruby
[12:15:48] [k-_: i thought you were wondering why the fields are emptied for the instance returned by Mechanize o_O
[12:16:31] millerti: has joined #ruby
[12:16:37] porfa: na, I'm wondering why the fields are empty in the database, if i manually fill the forms using the page mentioned in the script, they work just fine :)
[12:16:51] Pathfinder: has joined #ruby
[12:17:47] mjburgess: has joined #ruby
[12:18:06] sameerynho: has joined #ruby
[12:18:50] porfa: here, more simple??? :) it's not working, i can't understand why
[12:18:51] porfa: https://gist.github.com/anonymous/23fd6907871aa9a9a487
[12:18:54] bigkevmcd: has joined #ruby
[12:19:42] LJT: has joined #ruby
[12:20:11] gagrio: has joined #ruby
[12:20:47] Oog: has joined #ruby
[12:20:50] tkuchiki: has joined #ruby
[12:20:59] hinbody: has joined #ruby
[12:21:05] jhass: Porfa: if everything else fails get mitmproxy and compare the requests
[12:21:28] porfa: jhass: whats everything else? (looking into that mitmproxy )
[12:21:33] zenguy_pc: has joined #ruby
[12:21:46] jhass: idk, ideas others might have :P
[12:21:47] hahuang65: has joined #ruby
[12:21:57] porfa: did you look into the script?
[12:22:18] jhass: I'm not much of a mechanize expert
[12:22:28] porfa: because as a first time mechanizing this is a pain, because i can't understand if I'm doing something word, or if it's something else that's stoping the data to get though
[12:22:33] porfa: through* ok
[12:23:34] robh71: has joined #ruby
[12:23:44] mikecmpbll: is it your own site that you're using mechanize against?
[12:23:44] northfurr: has joined #ruby
[12:24:11] blackmesa: has joined #ruby
[12:24:20] mikecmpbll: apeiros, jhass: fwiw, there's no openssl.so file on my whole macbook so not sure why it was reporting that
[12:24:26] mikecmpbll: i'm just gunna try reinstall that ruby now.
[12:24:39] apeiros: I wonder whether it's directly compiled with it
[12:24:46] apeiros: enumerable.so worked that way
[12:24:49] JoshL: has joined #ruby
[12:24:49] apeiros: was listed in $"
[12:24:53] apeiros: but was loaded with ruby itself
[12:25:24] apeiros: hm, nope. not loaded at boot.
[12:25:31] IceyEC: has joined #ruby
[12:25:33] jhass: then otool -L $(which ruby) should list a link against openssl I guess
[12:25:35] apeiros: errr, enumerator.so
[12:25:57] kr3ssh: has joined #ruby
[12:26:10] ljarvis: Porfa: print the form object before you submit it, it'll show you the values
[12:26:42] northfurr: has joined #ruby
[12:26:49] porfa: mikecmpbll: yes it is
[12:27:07] porfa: ljarvis: how to print the form?
[12:27:09] mikecmpbll: Porfa: then just debug from the server side? what request is being received, with what params?
[12:27:17] ljarvis: Porfa: puts form.inspect
[12:27:24] allcentury: has joined #ruby
[12:27:38] yorickpeterse: or just `p form`
[12:27:42] lordkryss: has joined #ruby
[12:27:53] amystephen: has joined #ruby
[12:28:33] pawnbox: has joined #ruby
[12:28:52] Macaveli: has joined #ruby
[12:29:33] porfa: if i puts form.inspect, it's empty
[12:29:43] ljarvis: Porfa: I said before you submit it
[12:30:15] porfa: oh.. it's not empty, it contains the values i want
[12:30:40] ljarvis: can you paste it?
[12:32:14] blackmesa: has joined #ruby
[12:32:54] Macaveli: has joined #ruby
[12:33:51] lannonbr: has joined #ruby
[12:35:21] m8: has joined #ruby
[12:36:21] lxsameer_: has joined #ruby
[12:36:40] porfa: https://gist.github.com/anonymous/954bf21180050c499653 ljarvis
[12:38:06] me2: has joined #ruby
[12:38:11] [k-_: im on a mac now (10.10.4), i can try certain stuff, although i do not really know anything
[12:38:25] sonOfRa: has joined #ruby
[12:38:32] adaedra: I thought 10.10.5 was out
[12:38:49] [k-_: i only updated last week :/
[12:38:50] adaedra: "You know nothing, John [k-_"
[12:38:52] sameerynho: has joined #ruby
[12:39:32] [k-_: i dont have time to experiment this kind of stuff, im writing a report!
[12:39:48] [k-_: and i have tests the entire week :/
[12:39:56] oivoodoo: has joined #ruby
[12:40:43] ljarvis: Porfa: again, I'd like to know what you form looks like BEFORE you submit it
[12:40:56] ljarvis: Porfa: which means, not doing .submit
[12:41:19] decaff: has joined #ruby
[12:41:44] lxsameer: has joined #ruby
[12:43:22] AxonetBE: has joined #ruby
[12:43:42] sameerynho: has joined #ruby
[12:43:44] AxonetBE: I use strftime with %Y but it returns me 0017 and in the database it is saved as 2017
[12:44:27] jhass: >> require "date"; Date.today.strftime("%Y")
[12:44:28] ruboto: jhass # => "2015" (https://eval.in/417759)
[12:44:32] bigkevmcd: has joined #ruby
[12:44:37] jhass: we'll need something more to reproduce
[12:45:16] pawnbox: has joined #ruby
[12:45:28] porfa: ljarvis: I'm sorry, here https://gist.github.com/anonymous/e31fe4899bbebe1e7d2c
[12:45:33] porfa: it looks filled to me
[12:45:39] jeremy04: has joined #ruby
[12:45:59] AxonetBE: mm strange, in my db I have 05 Aug 0017 13:18:06 LMT +00:17
[12:46:10] AxonetBE: seems that my admin tool upmin is saving it differently
[12:46:20] nuttermb: has joined #ruby
[12:46:40] thang: has joined #ruby
[12:46:55] jgt: has joined #ruby
[12:47:07] ishahnaz: has joined #ruby
[12:47:27] j3r0: has joined #ruby
[12:47:57] dhjondoh: has joined #ruby
[12:47:57] mistermocha: has joined #ruby
[12:48:04] decoponio: has joined #ruby
[12:48:25] jhass: AxonetBE: you know you provided zero context so far ?
[12:48:35] djcp: has joined #ruby
[12:48:57] thantos: has joined #ruby
[12:49:24] RahulT: has joined #ruby
[12:50:05] apeiros: jhass: well, they just said "in my db I have 05 Aug 0017"
[12:50:19] apeiros: so if it's 0017 in the db already, I guess there's nothing left to say :)
[12:50:39] apeiros: (and yeah, contradicts a previous statement)
[12:50:51] leat: has joined #ruby
[12:51:20] tkuchiki: has joined #ruby
[12:52:18] chills42: has joined #ruby
[12:52:28] B5X: has joined #ruby
[12:52:50] rdark: has joined #ruby
[12:52:57] lxsameer_: has joined #ruby
[12:54:14] Pupp3tm4st3r: has joined #ruby
[12:57:07] tkuchiki_: has joined #ruby
[12:58:17] bmurt: has joined #ruby
[13:00:29] Guest50: has joined #ruby
[13:02:22] gagrio: has joined #ruby
[13:02:52] multiscan: has joined #ruby
[13:03:42] sgambino: has joined #ruby
[13:05:20] nanoz: has joined #ruby
[13:05:41] ferhaty: has joined #ruby
[13:06:51] unver: has joined #ruby
[13:08:51] shevy: webrick is pretty verbose on the commandline
[13:09:04] shevy: localhost - - [17/Aug/2015:15:08:19 CEST] "GET /img/pfeil.png HTTP/1.1" 200 294
[13:09:23] adaedra: that's Rack::CommonLogger, iirc
[13:10:00] adaedra: It's automatically inserted by ruby servers
[13:10:16] bougyman: it's middleware in many ruby frameworks.
[13:10:35] neohunter: has joined #ruby
[13:11:22] adaedra: I know you have -q to disable it in puma, surely it's the same in other servers
[13:12:02] victortyau: has joined #ruby
[13:12:32] juanpaucar: has joined #ruby
[13:13:45] jgt: has joined #ruby
[13:13:46] mwlang: has joined #ruby
[13:14:07] nettoweb: has joined #ruby
[13:15:20] umgrosscol: has joined #ruby
[13:17:08] dblessing: has joined #ruby
[13:21:19] m1lt0n: has joined #ruby
[13:21:34] casadei_: has joined #ruby
[13:22:07] jbw: has joined #ruby
[13:22:54] ndrei: has joined #ruby
[13:25:50] shevy: I just tried to use the same port
[13:25:53] shevy: socket.rb:206:in `bind': Address already in use - bind(2) for [::]:2002 (Errno::EADDRINUSE)
[13:26:08] shevy: I assume I can rescue that error, but is there a way to query, through ruby, if an address is already in use before?
[13:27:26] chills42: has joined #ruby
[13:27:41] robh71: has joined #ruby
[13:27:46] dimasg: has joined #ruby
[13:28:42] shevy: guess I'll just rescue and add +1 to the port!
[13:28:57] apeiros: shevy: if you actually want to bind to that address, just binding and rescuing the exception is the correct approach.
[13:30:08] chills42: has joined #ruby
[13:31:17] Oka: has joined #ruby
[13:33:55] tmtwd: has joined #ruby
[13:38:14] devdazed: has joined #ruby
[13:38:38] dostoyevsky: hmmmm.. my gem installs gems under /usr/local/lib64 but when I use ruby the require only looks in /usr/lib64/ ...
[13:38:53] chouhoulis: has joined #ruby
[13:39:09] jhass: check your gem env for odd things
[13:39:21] jhass: `gem env` is a command that is
[13:39:25] mikecmpbll: fwiw i think ruby maybe have been using openssl from homebrew
[13:40:42] livcd: mm not related to ruby but...can i create a directory remotely via wget ?
[13:40:43] The_Phoenix: has joined #ruby
[13:41:12] mikecmpbll: https://gist.github.com/mikecmpbll/355808bdec418fcdbb6f
[13:41:23] The_Phoenix: has joined #ruby
[13:41:34] sameerynho: has joined #ruby
[13:42:09] adaedra: livcd: what do you mean? With what kind of access?
[13:42:14] dopamean_: has joined #ruby
[13:42:29] chills42: has joined #ruby
[13:42:33] The_Phoenix: has joined #ruby
[13:42:41] whippythellama: has joined #ruby
[13:42:48] [k-_: ?ot livcd
[13:42:49] ruboto: livcd, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[13:42:52] allcentury: has joined #ruby
[13:43:16] dostoyevsky: jhass: gem19 env | grep lib -> /usr/local/lib64/ruby/gems/1.9.1, /usr/lib64/ruby/gems/1.9.1 ; ruby -e 'puts $:' | grep local -> 0 hits .. ruby -v : 1.9.3
[13:43:23] The_Phoenix: has joined #ruby
[13:44:21] jhass: that version is EOL btw
[13:44:22] shevy: livcd via ruby ftp you could
[13:44:33] jhass: why is it gem19 but not ruby19?
[13:44:55] The_Phoenix: has joined #ruby
[13:45:58] dostoyevsky: jhass: just checked, ruby and gem are the same binaries as ruby19 and gem19... i'd say that's just because potentially gentoo can have several versions of ruby installed
[13:46:17] chills42: has joined #ruby
[13:46:24] The_Phoenix: has joined #ruby
[13:46:36] beef-wellington: has joined #ruby
[13:46:36] jhass: I think you might want to take this to #gentoo, sounds like something distro specific gone wrong
[13:46:48] rmrrn: has joined #ruby
[13:46:53] chills42: has joined #ruby
[13:47:32] chills42: has joined #ruby
[13:47:46] gagrio: has joined #ruby
[13:47:51] [k-_: i read: "sounds like something disastrous specific gone wrong" :o
[13:48:39] rbennacer: has joined #ruby
[13:48:46] roolo: has joined #ruby
[13:49:25] Oog: has joined #ruby
[13:50:36] mistermocha: has joined #ruby
[13:51:37] skydiver: has joined #ruby
[13:52:07] Pupp3tm4st3r: has joined #ruby
[13:52:12] shevy: versioning in executables makes me sad
[13:54:00] jbw: has joined #ruby
[13:54:30] darkf: has joined #ruby
[13:55:26] dostoyevsky: shevy: very useful with python, as python27 and e.g. python3 are very different... so that helps a lot when running old or new scripts
[13:56:25] casadei_: has joined #ruby
[13:58:15] foureight84_: has joined #ruby
[13:58:57] shevy: dostoyevsky nope, absolutely useless - see gobolinux how to do it proper for all programs
[14:00:10] mleung: has joined #ruby
[14:00:14] mary5030: has joined #ruby
[14:01:02] ddv: well they just make a million symlinks :p
[14:01:43] shevy: not so many alternatives possible though
[14:02:15] shevy: debian has it for some in /etc/alternatives/
[14:02:20] shevy: gentoo has eselect
[14:02:39] adaedra: freebsd's default can be set in /etc/make.conf for ports
[14:02:59] shevy: perhaps one could do it via fusefs/unionfs, I think then you could avoid the symlinks altogether but I am not sure
[14:03:39] adaedra: the short while I was under Solaris, there was the module system
[14:03:48] yalue: has joined #ruby
[14:03:59] shevy: what is that? is there a ruby module?
[14:04:21] adaedra: that was weird
[14:04:31] shevy: at work I used a module-loader thing, it loaded ruby into userspace and set up everything for it, and if one does no longer need it, one could unload that ruby module again
[14:05:17] adaedra: that was something like that
[14:07:19] colli5ion: has joined #ruby
[14:08:07] jeremy04: has joined #ruby
[14:08:22] dgutierrez1287: has joined #ruby
[14:08:37] Guest63296: has joined #ruby
[14:09:11] bruno-: has joined #ruby
[14:09:58] axl_: has joined #ruby
[14:10:41] porfa: good afternoon
[14:10:43] devoldmx: has joined #ruby
[14:11:07] porfa: i need some help understanding and fixing a simple form fill script I'm trying to do, ruby + mechanize
[14:11:17] porfa: i guess the form isn't being submitted by some reason
[14:11:19] ruboto: Please add more context to your question, what are you doing, why are you doing it, which libraries are involved. Post some code to gist if it clarifies your question.
[14:11:46] porfa: https://gist.github.com/anonymous/954bf21180050c499653
[14:12:01] porfa: the form I'm trying to fill is mine/myhost
[14:12:08] shinnya: has joined #ruby
[14:12:16] moshee: has joined #ruby
[14:12:23] Guest63296: has joined #ruby
[14:12:32] terlar: has joined #ruby
[14:12:34] porfa: to old? haha
[14:12:58] adaedra: 1.9.3 is EOL
[14:13:56] porfa: but is that related to my problem?
[14:14:01] porfa: i can update later if it isnt
[14:14:13] shevy: is there no error when you .submit ?
[14:14:18] RegulationD: has joined #ruby
[14:14:38] adaedra: Porfa: should not, but good to keep in mind :)
[14:15:02] porfa: adaedra: thank you
[14:15:07] pawnbox: has joined #ruby
[14:15:39] porfa: shevy: the behavior is that it shows me the forms from the page, all over again, empty. (natural behavior no?)
[14:16:09] rbennacer: has joined #ruby
[14:16:17] shevy: dunno, never seen that behaviour; I use a separate .submit() call though, I dislike end.something
[14:16:31] shevy: it's been a while since I last used mechanize though, I am struggling with it a lot as well
[14:16:59] lannonbr: has joined #ruby
[14:17:59] mhib: has joined #ruby
[14:18:10] [H]unt3r: has joined #ruby
[14:18:58] Pupp3tm4st3r: has joined #ruby
[14:19:38] atomical: has joined #ruby
[14:21:24] foureight84__: has joined #ruby
[14:23:20] ljarvis: https://github.com/nobu/ruby/commit/ffcf0563e7c814225cf20f5540303e5b3c80a22f heh
[14:24:55] Kallis: has joined #ruby
[14:25:21] kies: has joined #ruby
[14:27:00] msnyon: has joined #ruby
[14:27:28] dopie: has joined #ruby
[14:30:02] mutuma: has joined #ruby
[14:31:42] yorickpeterse: optparse finally catching up to the rest of the world
[14:32:08] Rico: has joined #ruby
[14:32:29] Rico: I'm trying to install rails for ruby 1.8.7 (no comment)
[14:33:18] mutuma: Rico: Why 1.8.7?
[14:33:20] chills42: has joined #ruby
[14:33:20] jhass: doing some archaeology, eh?
[14:33:32] mutuma: jhass: Hahahhahahaha
[14:33:48] Rico: mutuma: prerequisite for a client (migration test platform)
[14:33:55] Rico: jhass: h??h??
[14:34:15] tkuchiki: has joined #ruby
[14:34:59] Rico: is there a way to do that ?
[14:35:14] jhass: gem install rails -v 3.2 or whatever?
[14:35:35] _blizzy_: has joined #ruby
[14:36:08] mutuma: gem install rails -v=VERSION
[14:36:17] Rico: MuffinPimp: ok thanks a lot, jhass too
[14:36:22] mutuma: but rails 4 does not support 1.8
[14:36:25] Rico: s/ MuffinPimp / mutuma
[14:37:00] bernardio: has joined #ruby
[14:37:53] JakFrist: has joined #ruby
[14:38:40] Pathfinder: Rico: Use rails 3.2
[14:38:56] Rico: Pathfinder: I'll try
[14:39:16] AxonetBE: has joined #ruby
[14:39:23] chills42: has joined #ruby
[14:39:33] porfa: ljarvis: hey i submitted the gist with now "submit" before, can you comment if you have the time?
[14:40:14] Pathfinder: Porfa: What???s up?
[14:40:59] porfa: i need to fill and submit a form, the form is mine, and hosted in my server. i think I'm doing everything fine with mechanize but still.. the form isn't getting uploaded to the DB
[14:41:12] siempref_: has joined #ruby
[14:41:58] porfa: https://gist.github.com/anonymous/a581db5091118c96d827 Pathfinder this
[14:42:34] _tpavel: has joined #ruby
[14:43:11] symm-: has joined #ruby
[14:43:37] _blizzy_: has joined #ruby
[14:44:47] riotjones: has joined #ruby
[14:45:08] jeadr: has joined #ruby
[14:45:50] jtdowney: has joined #ruby
[14:45:50] jtdowney: has joined #ruby
[14:46:37] jtdoncas: has joined #ruby
[14:47:58] Pathfinder: Porfa: Are you sure those are the valid names of the form
[14:47:59] conor_: has joined #ruby
[14:48:05] j4cknewt: has joined #ruby
[14:48:16] porfa: Pathfinder: according to the html yes
[14:49:59] M-mistake: has joined #ruby
[14:49:59] M-prosodyContext: has joined #ruby
[14:51:34] Pathfinder: Porfa: How about you do f.DATAHORA = ???2342???
[14:51:38] bweston92: I have a quick deployment script which needs to listen to a web hook, what's the smallest library that would allow me to listen to http requests?
[14:51:48] Axy: has joined #ruby
[14:52:46] lapide_viridi: has joined #ruby
[14:52:52] ruurd: has joined #ruby
[14:52:57] Pathfinder: bweston92: https://www.ruby-toolbox.com/categories/http_clients
[14:52:57] rippa: has joined #ruby
[14:53:07] jhass: Pathfinder: he wants a serve
[14:53:21] Pathfinder: jhass: Yeah???just noticed
[14:53:46] bweston92: Pathfinder: forgot about the gems site don't normally use ruby sorry
[14:53:56] porfa: Pathfinder: what do you mean? :)
[14:54:51] arup_r: has joined #ruby
[14:55:28] mistermocha: has joined #ruby
[14:55:39] whiteline: has joined #ruby
[14:57:35] jeadr: has joined #ruby
[14:57:59] northfurr: has joined #ruby
[14:58:51] blackmesa: has joined #ruby
[15:00:10] bernardio: has joined #ruby
[15:00:41] Pupp3tm4st3r: has joined #ruby
[15:02:14] jtdoncas: has joined #ruby
[15:02:24] Pathfinder: Porfa: That url returns a 404
[15:02:35] Pathfinder: The url on your gist
[15:03:37] [k-_: 404 here too o_O
[15:05:12] juanpaucar: has joined #ruby
[15:05:35] User458764: has joined #ruby
[15:05:46] porfa: Pathfinder: its http://www.pouparbem.com/alqapps/ruby.php
[15:05:48] Pathfinder: has left #ruby: ()
[15:06:01] porfa: i changed it, because i changed the form names to more simple ones so i wouldn't make a typo sorry
[15:06:32] christiandsg: has joined #ruby
[15:07:09] porfa: https://gist.github.com/anonymous/ec6713c5db113425ca5c here
[15:07:30] ljarvis: Porfa: STOP USING end.submit
[15:07:35] ljarvis: for the 100th time
[15:07:47] porfa: ljarvis: i didn't use for the gist you asked me
[15:08:06] ljarvis: every gist since still uses it, and it's incredibly easy for bugs to sneak in using that
[15:08:08] DexterLB: has joined #ruby
[15:08:24] ljarvis: because form = form.submit doesn't do what you think
[15:08:33] bweston92: https://gist.github.com/bweston92/d4d9dd87bcc5e9d09db6 why would this say unexpected return on line 5? :s
[15:08:53] porfa: https://gist.github.com/anonymous/2a069a84a913b3599f9b ljarvis better?
[15:08:59] porfa: is this what you wanted before?
[15:09:04] terlar: has joined #ruby
[15:09:18] shevy: where is the .submit
[15:10:04] EminenceHC: has joined #ruby
[15:10:11] jhass: bweston92: use == not ===, == is the stronger version in Ruby
[15:10:30] bweston92: Oh ok and that is why?
[15:10:30] jhass: bweston92: and you can't use return inside a Proc, just make that an if / else
[15:10:57] bweston92: because surly it returns anyway?
[15:11:11] okay: has joined #ruby
[15:12:12] porfa: shevy: i've added a form.submit but the end of the loop, it just "reloads" the page
[15:12:13] jhass: return is for methods, you're passing a block to Proc.new, return returns from the method defining the block (none here, hence illegal), break returns from the method calling the block and next returns from the block
[15:12:37] whiteline: has joined #ruby
[15:13:16] shevy: Porfa hmm
[15:13:29] Thermatix: has joined #ruby
[15:13:41] atmosx: How would you go about for measuring the uptime (internet connection actually) of an ADSL machine? Write a script that ping's every 1 minute or so, collect the log file and gather data...?
[15:13:56] bweston92: jhass: Last real question, anyway I can start a new process within that request but don't wait for it to finish and return that 200?
[15:14:11] jhass: Yes, Kernel#spawn
[15:14:30] hobodave: has joined #ruby
[15:14:34] porfa: atmosx: id get into the router and check the connection uptime
[15:14:57] kristofferR: has joined #ruby
[15:15:08] atmosx: Porfa: hm, you mean login into the router via cli and get the uptime?
[15:15:41] atmosx: yeah but the router works fine, it's the ADSL connection that sucks big time
[15:15:48] porfa: if it's possible??? if its not, id probably use the time difference between IP changed to account that as a "internet reset" dunno if you have dynamic or static ups though..
[15:16:07] porfa: but the router has a "DIAL UP" confg thing, because ADSL still needs dial up
[15:16:08] nuttermb: has joined #ruby
[15:16:21] atmosx: it has a pppoe interface
[15:16:45] Psi-Jack: Eh? ADSL doesn't "dial" anything.
[15:16:56] Psi-Jack: It's PPPoE over ATM switches.
[15:17:10] atmosx: Psi-Jack: seriously?
[15:17:19] atmosx: Psi-Jack: you sure?
[15:17:31] porfa: I'm sorry, it's just that every time i used adsl form difernte providers here in this country, you need to dial up a USERNAME + password
[15:17:35] porfa: to make a connection
[15:17:42] atmosx: Porfa: I know
[15:17:44] porfa: now these days, the modem does that on it's own
[15:17:52] mephistophocles: has joined #ruby
[15:18:03] atmosx: it's the same everywhere. I use PPPoE, the ISP's router acts as a bridge
[15:18:10] porfa: Modem/router and in the page where you have the "user + password" there's usually a uptime there ;)
[15:18:16] ght: Question: Anyone familiar with what the syntax might be for utilizing the |response, request, result, &block| format with RestClient in Ruby on POST or PUT statements?
[15:18:27] ght: It's working fine when using on GET, and there are dozens of examples when using GET
[15:18:33] Psi-Jack: PPPoE of course can do authentication, but there's no "dialing", no DTE.
[15:18:35] ght: but I can't determine the syntax for POST or PUT
[15:18:42] atmosx: Porfa: Yeah, I get that too, but I wanna generate graphics.
[15:18:49] thmzlt: has joined #ruby
[15:18:59] atmosx: come to think of it, openwrt should have some sort of package for this
[15:19:06] ght: And because of this RestClient is throwing exceptions with 4XX HTTP codes on POST, and I could encase the entire thing in a Begin Rescue block
[15:19:50] michaeldeol: has joined #ruby
[15:20:31] pauly_oc: has joined #ruby
[15:21:48] atmosx: Psi-Jack: okay
[15:22:15] umgrosscol: has joined #ruby
[15:22:31] dfockler: has joined #ruby
[15:23:21] cschneid_: has joined #ruby
[15:24:31] psye: has joined #ruby
[15:24:55] porfa: i've noticed something in my mech a script??? when it refreshes the page, it displays the page as empty, it shouldn't.. it should say "frm entered successfully"
[15:25:01] porfa: it doesnt??? hmm
[15:25:10] banister: has joined #ruby
[15:25:37] flou: has joined #ruby
[15:30:18] pawnbox: has joined #ruby
[15:30:36] symm-: has joined #ruby
[15:30:50] jds: has joined #ruby
[15:30:56] ndrei: has joined #ruby
[15:31:16] shevy: Porfa perhaps you need to send some identifier in your header
[15:31:21] Cache_Money: has joined #ruby
[15:31:24] pdoherty: has joined #ruby
[15:31:40] devdazed: when including a module, is it possible to have the class it is getting included in evaluated first? the module I am including does an "alias_method" and the methods it is aliasing have yet to exist. I can put the call in the bottom of the class but that really looks awkward
[15:31:52] devdazed: basically, the pattern is "include Instrumenter" then "instrument :somemethod"
[15:32:04] devdazed: the "instrument" method is the one doing the aliasing
[15:32:06] devdazed: it aliases the method getting instrumented to "old_method_name" and calls out to it in the wrapped instrumented method
[15:32:50] shevy: devdazed not sure if this is possible, perhaps someone else here knows, but I think include adds on top of the hierarchy chain, so it gets a superclass, which I think always has to get evaluated first. there are some hooks though, inheritance-hooks
[15:33:11] shevy: that one looks similar https://www.ruby-forum.com/topic/182034
[15:33:31] shevy: .inherited would be one hook
[15:33:38] mabjpj: has joined #ruby
[15:33:53] bernardio: has joined #ruby
[15:34:45] dopamean1: has joined #ruby
[15:34:55] troulouliou_div2: has joined #ruby
[15:35:28] devdazed: shevy: ill give that a shot, thanks
[15:35:37] s2013: has joined #ruby
[15:36:09] northfurr: has joined #ruby
[15:36:15] vidbina: has joined #ruby
[15:36:45] roolo: has joined #ruby
[15:36:57] shevy: I think there may also be include hooks
[15:37:40] shevy: .inherited probably applies to both include and < ?
[15:38:00] devdazed: it looks like this isfor inheritance and net really mixing, or am i wrong?
[15:38:19] havenwood: has joined #ruby
[15:38:52] shevy: hmm I thought mixing is inheritance as well
[15:39:15] shevy: >> module Foo; end; class Bar; include Foo; end; Bar.ancestors
[15:39:18] devdazed: i think the chain looks different with mixins
[15:39:26] ruboto: shevy # => [Bar, Foo, Object, Kernel, BasicObject] (https://eval.in/417842)
[15:39:38] shevy: >> class Foo; end; class Bar < Foo; end; Bar.ancestors
[15:39:40] ruboto: shevy # => [Bar, Foo, Object, Kernel, BasicObject] (https://eval.in/417843)
[15:39:52] skydiver: has joined #ruby
[15:40:11] blackjid: has joined #ruby
[15:40:31] shevy: devdazed I am sure there has to be a way, rails + activerecord make use of a lot of meta-programming
[15:41:32] symm-: has joined #ruby
[15:43:39] tkuchiki: has joined #ruby
[15:43:42] blackjid: has joined #ruby
[15:44:54] AlexAltea: has joined #ruby
[15:45:22] ruurd: has joined #ruby
[15:47:12] blackjid: has joined #ruby
[15:47:14] ndrei: has joined #ruby
[15:47:35] fantasticsid: has joined #ruby
[15:48:01] kies: has joined #ruby
[15:48:22] renderful: has joined #ruby
[15:49:31] dorei: has joined #ruby
[15:49:33] jmhmccr: has joined #ruby
[15:50:22] baroquebobcat: has joined #ruby
[15:50:33] jhass: devdazed: you could hook method_added, but there's no real point where the definition of a class is finished
[15:51:25] fantasticsid: has joined #ruby
[15:51:35] jeadr: has joined #ruby
[15:51:54] luckyme: has joined #ruby
[15:51:57] dopamean_: has joined #ruby
[15:52:12] rehat: has joined #ruby
[15:53:11] TomyLobo: has joined #ruby
[15:53:15] shevy: there are quite some old projects by ruby hackers that do not seem to be maintained
[15:53:49] jhass: fork and maintain them
[15:53:57] shevy: nor are these on rubygems I think ... like http://www.druby.org/ilikeruby/div.en.html
[15:54:15] shevy: jhass I find it hard to read other people's ruby code
[15:54:38] fantasticsid: has joined #ruby
[15:54:42] shevy: I tried to update http://www.erikveen.dds.nl/rubywebdialogs/ but I was unable to
[15:54:43] jhass: that looks awful
[15:54:44] bluOxigen: has joined #ruby
[15:54:50] shevy: a lot of old ruby code is!
[15:54:53] jhass: I can understand why nobody wants to maintain it
[15:55:04] shevy: well what I meant was something else actually
[15:55:15] shevy: I wonder what happened to these people
[15:55:37] shevy: the projects on rubygems.org are usually in a better state - ok, many are abandoned, but many others are still maintained
[15:55:41] pragmatism: has joined #ruby
[15:55:58] jhass: any point you're going to make?
[15:56:14] shevy: where are they?
[15:57:14] Torrieri: has joined #ruby
[15:58:00] ariwibowo: has joined #ruby
[15:58:05] accacin: has joined #ruby
[15:59:21] dr3w: has joined #ruby
[15:59:41] speakingcode: has joined #ruby
[15:59:52] mistermocha: has joined #ruby
[16:00:05] AlexRussia: has joined #ruby
[16:00:16] Maletor: has joined #ruby
[16:00:25] jhass: interests shift, time is limited
[16:00:31] droidburgundy: has joined #ruby
[16:01:13] hobodave_: has joined #ruby
[16:01:30] cornerma1: has joined #ruby
[16:02:35] Chau: has joined #ruby
[16:02:46] bruno-: has joined #ruby
[16:04:08] whiteline: has joined #ruby
[16:07:54] Chau: has joined #ruby
[16:08:07] fantasticsid: has joined #ruby
[16:08:47] droidburgundy: has joined #ruby
[16:09:25] mephistophocles: has joined #ruby
[16:10:57] ruurd: has joined #ruby
[16:11:27] devoldmx: has joined #ruby
[16:11:33] j5s7: has joined #ruby
[16:11:35] finisherr: has joined #ruby
[16:11:54] tubbo: gonna welcome myself to about 15 mins ago and say maintenence is only as necessary as the usage
[16:11:55] [spoiler]: We should have a readability/niceness score for ruby code, and I don't mean using *flog*
[16:12:06] tubbo: [spoiler]: what do you propose?
[16:12:24] tubbo: how else can you statically analyze ruby code?
[16:12:27] bronson: has joined #ruby
[16:13:23] shevy: [spoiler] we need to apply some metric for that
[16:13:32] shevy: ruboto complains a lot about my code
[16:13:37] marr: has joined #ruby
[16:14:22] michaeldeol: has joined #ruby
[16:14:31] [spoiler]: tools like flog aren't aware of the problem domain your code, and sometimes a few if-s are better than some obscure logic which won't trigger flog
[16:14:46] [spoiler]: flog... I forgot what I was gonna say
[16:16:08] choppington: has joined #ruby
[16:16:33] markserver: has joined #ruby
[16:16:42] mephistophocles: has joined #ruby
[16:16:48] rakm: has joined #ruby
[16:16:51] dr3w: has joined #ruby
[16:17:00] dr3w: has joined #ruby
[16:17:17] accacin: has joined #ruby
[16:17:25] slash_nick: [spoiler]: i think that'd be tough...there's plenty of room for variation in good looking ruby, as long as a given library is consistent (and nice), it's nice.
[16:17:25] [spoiler]: tubbo: I don't have a solution, short of "humans should decide," but even then, there's things I consider complex that you don't and vice-versa
[16:17:56] eam: has joined #ruby
[16:17:56] banister: has joined #ruby
[16:18:02] [spoiler]: slash_nick: I know, I was joking when I suggested it
[16:18:09] slash_nick: [spoiler]: you'd want to classify the different styles and measure adherance to each... consistently defines methods with/without parentheses? check
[16:18:42] shevy: well you could try to list or unifiy on the "most common idioms"
[16:19:08] shevy: I always use: def foo(bar) style, many others use: def foo bar
[16:19:24] slash_nick: shevy: i'd just look for consistency within a given library
[16:19:28] thmzlt: has left #ruby: ()
[16:19:40] ramfjord: has joined #ruby
[16:19:50] slash_nick: try to point out anomalies
[16:20:40] tubbo: [spoiler]: i like rubocop because it can be configured and appended to. so if you need to add style checks to the linter, or customize/remove checks that the linter sends, you can configure that in .rubocop.yml
[16:21:48] tubbo: it also has an --auto-gen-config tool that can automatically generate a "todo list" for your app. i find a few of these, like Style/StringLiterals, i keep disabled...others i simply exclude for different dirs (like Style/Documentation in spec/**/*...who needs docs in your tests? :))
[16:21:50] [spoiler]: tubbo: I am not opposed to rubocop and I don't mind projects that use it, but I think it's a somewhat useless tool, to be honest
[16:22:40] markserver: Hello, i'm realising a CLI app in ruby, for one operation i need to verify if an account id exist, i need to execute a mysql query for this, but i have to store the method in the account object and use already created object for logged in user or create a new object and use a validation query in the constructor? Thanks for opinion
[16:22:59] tubbo: it's really hard to automate eyeballs :)
[16:22:59] slash_nick: tubbo: i'd like a rubocop that looked at my library and made decisions on how to config rubocop for me... ie: "you tend to use double quotes, let's make the 'double quotes unless special chars' be cop your quote style cop"... that's the kind of tool i think [spoiler] is talking about
[16:23:16] Hanmac: has joined #ruby
[16:23:21] f0ster: has joined #ruby
[16:23:28] shevy: a meta rubocop!
[16:23:41] [spoiler]: slash_nick: yes a consistency checker would be nice
[16:23:49] jeadr: has joined #ruby
[16:24:05] tubbo: slash_nick: agreed, that would be fun. i think you could build it into the existing --auto-gen-config feature that made smarter decisions about the code analysis, rather than simply applying the base ruby style guide across the entire codebase
[16:24:12] slash_nick: [spoiler]: with rubocop, you have a consistency checker... just not a dynamic consistency checker -- it has to know your preference (doesn't infer it)
[16:24:13] sanguisdex: has joined #ruby
[16:24:19] jhass: markserver: some code might make your question clearer
[16:24:25] slash_nick: tubbo: yeah yeah!
[16:25:00] last_staff: has joined #ruby
[16:25:39] tubbo: not sure about you guys, but all of our app/plugin templates at my job contain configuration for lint checking that maps to everyone's style preferences
[16:25:49] tubbo: it's just automatic so i barely even think about configuring rubocop anymore
[16:25:52] [spoiler]: ?guys tubbo
[16:25:52] ruboto: tubbo, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[16:26:05] livathinos: has joined #ruby
[16:26:12] tubbo: s/guys/fellow humanoids
[16:26:17] Exuma: has joined #ruby
[16:26:21] techsethi: has joined #ruby
[16:26:22] tubbo: or y'all :)
[16:26:44] AlexRussia_: has joined #ruby
[16:26:48] shevy: well [spoiler] actually has made another good point
[16:26:52] benlieb: has joined #ruby
[16:27:08] shevy: because I always was so lazy to adjust ruboto ... I want it to auto-adjust! so that would be the library-checking part
[16:27:53] jhass: shevy: it's rubocop
[16:28:17] [spoiler]: jhass: it was probably a typo :P
[16:28:43] [spoiler]: jhass: I have a better streak than 2
[16:28:56] slash_nick: tubbo: that's a tough one for me... i've always caught myself s/yall/you guys/ because "don't announce to the world you're from south alabama"... but i'd rather reveal something like that than offend a fellow rubyist
[16:29:36] towski_: has joined #ruby
[16:29:52] [spoiler]: slash_nick: I am from Croatia and I y'all the f... out of everyone
[16:29:52] shevy: jhass yeah now I am mixing the rub* up
[16:29:54] rideh: has joined #ruby
[16:30:10] arooni-mobile: has joined #ruby
[16:30:22] shevy: ruboto is constantly in our face, hard to avoid it
[16:30:23] arooni-mobile: has joined #ruby
[16:30:45] robh71: has joined #ruby
[16:31:15] RobertBirnie: has joined #ruby
[16:31:42] rehat: has joined #ruby
[16:32:13] [Butch]: has joined #ruby
[16:32:33] jbw: has joined #ruby
[16:33:01] [spoiler]: damn that took long to type (due to typos)
[16:33:24] jtdoncas: has joined #ruby
[16:33:30] markserver: jhass: Here's my code https://gist.github.com/anonymous/f7567e43c817ffb5542f , there's even an accurate version of the question THANKS
[16:34:23] jhass: markserver: you're asking a question about code organization and show a single method...
[16:35:05] ndrei: has joined #ruby
[16:35:05] shevy: dfockler was your figure tortured there :P
[16:35:59] [spoiler]: shevy: LOL I didn't want to ask because I have no idea why his figure had two forearms and a detached leg
[16:36:05] sarkyniin: has joined #ruby
[16:36:07] bricker: has joined #ruby
[16:36:16] jhass: markserver: I'd go for name_by_account_id for the method name, we generally leave of get_, set_ and is_ prefixes in Ruby
[16:36:17] gregf_: markserver: should you not throw an exception if the user is not found?
[16:36:32] ferhaty: has joined #ruby
[16:38:07] renderful: has joined #ruby
[16:38:10] ivanskie: has joined #ruby
[16:38:44] kwerle: has joined #ruby
[16:39:38] pengin: has joined #ruby
[16:39:58] jpfuentes2: has joined #ruby
[16:39:59] yqt: has joined #ruby
[16:40:07] [spoiler]: gregf_: No, lie and invent an user
[16:40:20] [spoiler]: gregf_: it's what linked.in does, innit?
[16:40:24] kwerle: I???m looking for a clever way to segregate an array. set1, set2 = parent_set.segregate{ |e| e.belongs_in_set1? } that would yield set1 with the appropriate elements and set2 with all the elements that were not appropraite. Does such a thing exist and I don???t konw about it?
[16:40:27] KensoDev: has joined #ruby
[16:40:44] dfockler: shevy: that's supposed to be his midsection, didn't work out very well
[16:40:56] skydiver: has joined #ruby
[16:40:58] tenderlove: has joined #ruby
[16:40:59] solars: has joined #ruby
[16:41:22] [spoiler]: kwerle: I don't think there's something that does that (could be wrong)
[16:41:43] jhass: kwerle: #partition ?
[16:42:13] rakm: has joined #ruby
[16:42:16] kwerle: Partition! That???s it.
[16:42:23] kwerle: Figured someone had done it before me. Thanks!
[16:42:33] ruurd: has joined #ruby
[16:43:07] mikecmpbll: has joined #ruby
[16:43:25] oleksandriuzikov: has joined #ruby
[16:45:10] whiteline: has joined #ruby
[16:45:16] pawnbox: has joined #ruby
[16:46:24] lwu: has joined #ruby
[16:46:31] blue_deref: has joined #ruby
[16:46:34] [spoiler]: jhass: partition is nice! I didn't know about it
[16:47:46] adaedra: There's also his little brother, rpartition
[16:48:09] jhass: On String only iirc
[16:48:20] timonv: has joined #ruby
[16:48:43] adaedra: &ri String#rpartition, Array#rpartition
[16:48:43] `derpy: http://www.rubydoc.info/stdlib/core/String#rpartition-instance_method
[16:48:55] jhass: no idea what it would do on Enumerable anyway
[16:49:20] nitenq: has joined #ruby
[16:49:26] j3r0: has joined #ruby
[16:55:10] einarj: has joined #ruby
[16:55:30] bitri: has joined #ruby
[16:56:01] bitri: has joined #ruby
[16:56:13] djbkd: has joined #ruby
[16:56:17] clarkenciel: has joined #ruby
[16:57:10] markserver: has joined #ruby
[16:57:51] howdoico1: has joined #ruby
[16:57:52] RobertBirnie: has joined #ruby
[16:57:56] gizmore: has joined #ruby
[17:01:00] jeremy04: has joined #ruby
[17:01:20] kitfox: has joined #ruby
[17:01:29] ascarter: has joined #ruby
[17:01:36] j_mcnally: has joined #ruby
[17:01:42] markserver: jhass: This is the complete app code, thanks: https://gist.github.com/markserver/280e1bf00e5f223de535
[17:02:09] whiteline: has joined #ruby
[17:02:10] rbennacer: has joined #ruby
[17:02:15] Mia: has joined #ruby
[17:02:49] markserver: gregf_: Is this needed? If the user fail to input i'm restarting the menu loop
[17:03:24] mistermocha: has joined #ruby
[17:03:34] mwlang: has joined #ruby
[17:03:53] kies: has joined #ruby
[17:05:19] jhass: markserver: you probably should use a simple ORM and an association between User and Account
[17:05:24] mleung: has joined #ruby
[17:06:09] jhass: markserver: for example Sequel::Model http://www.rubydoc.info/gems/sequel#Sequel_Models
[17:06:49] ruurd: has joined #ruby
[17:07:19] pawnbox: has joined #ruby
[17:08:00] timonv: has joined #ruby
[17:08:19] gregf_: markserver: nope, but assuming you're displaying a message to the user
[17:08:21] elepedus: has joined #ruby
[17:08:41] jhass: markserver: if you want to keep it manual, make the DB connection global (for example by assigning it to a constant) and pass the user instance an account belongs to to its initializer and store it in Account
[17:08:51] jhass: so you can for example do @user.name to get the name
[17:09:09] saddad: has joined #ruby
[17:09:19] jgpawletko: has joined #ruby
[17:09:55] conor_: has joined #ruby
[17:12:07] einarj: has joined #ruby
[17:12:36] shevy: hmm anyone remembers the name of the ruby windowmanager?
[17:13:41] bruno-: has joined #ruby
[17:14:14] conor_: has joined #ruby
[17:15:36] shevy: >> Process.setsid
[17:15:37] ruboto: shevy # => (https://eval.in/417861)
[17:16:02] shevy: cool... "Forbidden syscall setsid"
[17:16:09] lampd1: has joined #ruby
[17:16:35] jhack: has joined #ruby
[17:16:35] jhack: has joined #ruby
[17:17:03] Apocalypse: has joined #ruby
[17:17:03] Apocalypse: has joined #ruby
[17:18:20] obiwandev: has joined #ruby
[17:18:21] robh71: has joined #ruby
[17:18:25] tmtwd: has joined #ruby
[17:18:44] lucianopc: has joined #ruby
[17:18:49] Xoro: has joined #ruby
[17:19:24] wookiehangover: has joined #ruby
[17:19:39] msnyon: has joined #ruby
[17:19:46] conor_: has joined #ruby
[17:19:51] Xoro: has joined #ruby
[17:21:08] einarj: has joined #ruby
[17:21:08] Rubie: has joined #ruby
[17:21:22] northfurr: has joined #ruby
[17:21:53] maia: has joined #ruby
[17:22:27] markserver: has joined #ruby
[17:23:02] shevy: hmm I think I have a problem http://ruby-doc.org/stdlib-2.0.0/libdoc/webrick/rdoc/WEBrick/Daemon.html
[17:23:13] shevy: if you click at the source ... it has: exit!(0) if fork
[17:23:26] shevy: now I am not sure if this can be rescued
[17:23:31] conor_: has joined #ruby
[17:23:51] Jackneill: has joined #ruby
[17:24:16] [spoiler]: shevy: what do you wanna rescue?
[17:24:33] drbrain: exit! can't be rescued
[17:24:51] roolo: has joined #ruby
[17:25:31] tomphp: has joined #ruby
[17:25:53] shevy: [spoiler] I start webrick from another program that reads user input; it exits when I add WEBrick::Daemon.start
[17:25:55] Rubie: has joined #ruby
[17:26:26] jalcine: has joined #ruby
[17:26:47] jgt: has joined #ruby
[17:27:43] poguez_: has joined #ruby
[17:28:10] conor_: has joined #ruby
[17:28:11] [spoiler]: Yeah you won't be able to do it like that
[17:30:09] christiandsg: has joined #ruby
[17:30:27] jeremy04: has joined #ruby
[17:31:10] tomphp: has joined #ruby
[17:31:54] einarj: has joined #ruby
[17:32:38] obiwandev: has joined #ruby
[17:32:56] bruno-: has joined #ruby
[17:33:05] conor_: has joined #ruby
[17:33:45] obiwandev: has joined #ruby
[17:34:30] Antiarc: shevy: window manager, do you mean shoes?
[17:34:37] obiwandev: has joined #ruby
[17:34:54] Antiarc: Also, in general, I don't believe in daemonizing stuff anymore, just run it under supervisord or something :)
[17:35:04] Antiarc: The cognitive overhead goes waaaaaaaaaay down.
[17:35:52] obiwandev: has joined #ruby
[17:36:05] shevy: Antiarc hmm there was some window manager that could be controlled via ruby code but I can't for the sake of myself remember the name :\
[17:36:14] shevy: back then I think I was using 1.8.x still
[17:37:51] northfurr: has joined #ruby
[17:38:54] riotjones: has joined #ruby
[17:39:28] robh71: has joined #ruby
[17:40:31] ishahnaz: has joined #ruby
[17:40:36] yfeldblum: has joined #ruby
[17:40:55] einarj_: has joined #ruby
[17:41:24] obiwandev: has joined #ruby
[17:41:32] lucianopc: has left #ruby: ()
[17:41:34] BTRE: has joined #ruby
[17:41:36] postmodern: has joined #ruby
[17:42:05] Anon_: has joined #ruby
[17:42:05] shevy: the source code to webrick-daemon is interesting. exit!(0) optionally, then Process::setsid, then exit!(0) again optionally, a chdir to root via Dir::chdir("/"), then a File::umask, and three .reopen() to STDIN, STDOUT, STDERR
[17:42:22] paulcsmith: has joined #ruby
[17:43:02] toretore: has joined #ruby
[17:43:24] baweaver: has joined #ruby
[17:43:33] Anon_: im getting an "ERROR: Failed to build gem native extension" after running "gem install ruby-debug"
[17:43:49] jhass: anon_: use byebug for Ruby 2.0+
[17:43:57] Anon_: im using ruby 1.9.2
[17:44:03] jhass: that's EOL
[17:44:05] Gabrr: has joined #ruby
[17:44:22] Anon_: can't do anything baou tit
[17:44:27] Anon_: about it*
[17:44:28] Norelec: has left #ruby: ("Leaving")
[17:44:32] Gabrr: Hi, i would like to use bundle with ruby 2.1, but it doesnt seem to be working.
[17:44:52] Gabrr: With bundle env, it sais: Ruby 2.0.0p645
[17:44:54] Anon_: code is written in 1.9.2
[17:45:13] jhass: anon_: The differences with 2.2 aren't that big, worth porting
[17:45:35] Gabrr: Im using gentoo, and i installed ruby 2.1, also, set environment variables to use ruby 2.1, but i dont know whats the problem.
[17:45:51] shevy: anon_ you have to try and find out what particular part failed
[17:45:59] chinmay_dd: has joined #ruby
[17:46:05] baweaver: has joined #ruby
[17:46:10] Gabrr: When i just create an empty Gemfile, it also sais "Ruby: 2.0.0..." with bundle env.
[17:46:21] Anon_: jhass: my linux system is setup with local repos and 1.9.2 is all i am allowed to install
[17:46:30] jhass: Gabrr: I guess your bundle's hashbang points to that
[17:46:35] jhass: command -v bundle
[17:46:49] Anon_: Can't handle 1.9.x yet
[17:46:49] Anon_: *** extconf.rb failed ***
[17:46:55] jhass: anon_: that's rather insane
[17:47:06] IceyEC: has joined #ruby
[17:47:25] Anon_: i just want to step through some ruby code in eclipse
[17:47:35] shevy: anon_ I looked into the gem ruby-debug
[17:47:35] Anon_: this can't be that hard.
[17:48:03] shevy: I don't see any extension, no extconf.rb and also no possibility for a "failed to build gem native extension". are you sure that the error you got there has anything to do with the gem ruby-debug?
[17:48:53] Anon_: shevy: http://pastebin.com/1D6pJeDE
[17:48:54] ruboto: anon_, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/8bbdc0dc319022e31bbb
[17:48:54] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[17:49:24] Anon_: pastebin loads slowly? seriously?
[17:49:40] Gabrr: jhass: Yes, the first line is #!/usr/bin/ruby20
[17:49:54] jhass: Gabrr: then that's your issue
[17:49:56] bougyman: compared to < 2s for the gist.
[17:50:18] jhass: anon_: you'll need linecache19
[17:50:34] arup_r: has joined #ruby
[17:50:34] shevy: ok the error says "ERROR: Error installing ruby-debug-base"
[17:50:40] Gabrr: jhass: Well, now i dont really know how to get it to use ruby21, i cant just edit this, maybe there are other things i have to edit for this.
[17:50:42] dr3w: has joined #ruby
[17:50:48] conor_: has joined #ruby
[17:51:09] Anon_: ya i tried debase after
[17:51:26] Anon_: error look the same
[17:51:31] jhass: anon_: all this stuff is 5+ years old, you won't get much support for it anymore
[17:51:51] Anon_: ok how can i setup eclipse so i can step through code?
[17:51:54] jhass: anon_: a good modern debugging environment is pry + pry-byebug + pry-stack_explorer + pry-rescue
[17:51:56] Anon_: thats all i want
[17:52:08] autrilla: has joined #ruby
[17:52:14] dgutierrez1287: has joined #ruby
[17:52:20] jhass: using Ruby with Eclipse is also rather uncommon
[17:52:22] Anon_: command line?
[17:52:38] jhass: and no, not inferior in any way
[17:53:21] mwlang: Is there a gem to extend bacon with ???let????
[17:53:21] Anon_: didn't say it was. im just stuck in a linux inside a vm
[17:53:44] BraddPitt: how can I make this more ruby-like? https://gist.github.com/anonymous/7e7bca4e5275230a1a25
[17:53:47] BraddPitt: it seems ugly to me
[17:53:48] mwlang: all I can find is ???Let there be Bacon??? BBQ guys
[17:53:48] BraddPitt: and incorrect
[17:53:53] jhass: I guess in 1.9 days the go to tool instead of pry-byebug was pry-debugger
[17:54:17] j4cknewt: has joined #ruby
[17:54:28] jhass: BraddPitt: def initialize(db_name=Settings::DB_NAME)
[17:54:46] Anon_: jhass: ok all installed
[17:54:46] mwlang: @db_name = db_name || Settings::DB_NAME
[17:54:54] Anon_: good links as to how to use these?
[17:55:07] Antiarc: def initialize(db_name = Settings::DB_NAME); @db_name = db_name
[17:55:12] sarkyniin: has joined #ruby
[17:55:13] jhass: anon_: now add require "pry"; binding.pry in your code where you want to break and run it
[17:55:13] BraddPitt: oh, thanks jhass
[17:55:33] jhass: anon_: that should drop you into a repl, run help for the available commands
[17:55:37] doodleha_: has joined #ruby
[17:56:00] mwlang: adding the default in the arguments list makes that argument optional???which is generally desirable (but not always)
[17:56:10] devdazed: shevy: Antiarc: I was able to accomplish what i needed using ruby's new prepend
[17:56:27] spider-mario: has joined #ruby
[17:57:14] devoldmx: has joined #ruby
[17:58:06] oddjob001: has joined #ruby
[17:59:16] Xoro: has joined #ruby
[18:00:12] Xoro: has joined #ruby
[18:00:45] shevy: it sounds scary so I better don't ask how it works :D
[18:01:46] deol: has joined #ruby
[18:02:17] oddjob001: can someone help me understand how to regex or match a line from each_line? It seems to do nothing. I can do a simple line.chomp! and it will remove the /n, but attempting to remove (or capture) any other information doesnt work. - https://gist.github.com/tek0011/f00e4f7de76de70a1857
[18:02:18] devdazed: shevy: instead of aliasing the method, I override it and prepend the mixin so it comes first in the ancestor chain
[18:02:35] BraddPitt: does the ruby postgres gem accept a certain type of schema file for building the db?
[18:02:58] jhass: oddjob001: what's your actual goal?
[18:03:14] djbkd: has joined #ruby
[18:03:27] drbrain: BraddPitt: how do you mean?
[18:03:30] markserver: Hello, can anyone help me with this error..Thanks : C:/Ruby22-x64/lib/ruby/2.2.0/erb.rb:863:in `eval': (erb):1: unterminated string meets end of file (SyntaxError) (erb):1: syntax error, unexpected end-of-input, expecting ')' ...ut.force_encoding(__ENCODING__)
[18:03:30] jhass: oddjob001: remove all elements that have a space?
[18:03:42] oddjob001: jhass: to basically get 10:00:00:90:fa:73:36:3a (the wwn) from each line. I will be passing that back into another command
[18:03:42] conor_: has joined #ruby
[18:03:56] drbrain: BraddPitt: it sends SQL commands to a postgres server, so the schema must be a format postgres understands
[18:04:07] BraddPitt: right, im trying to find out what that format is
[18:04:28] jhass: oddjob001: wwn = line.split(":").last.strip
[18:04:29] BraddPitt: like, can I send it as a YAML file or should it just be SQL statements in a text file?
[18:05:12] drbrain: AFAIK psql doesn't translate YAML to SQL
[18:05:24] oddjob001: jhass: giving it a try
[18:05:48] jhass: markserver: look for a missing " or '
[18:06:01] jhass: or one that isn't escaped properly
[18:06:10] livathinos: has joined #ruby
[18:06:12] BraddPitt: drbrain should it just be raw SQL commands in a text file and load that?
[18:06:30] oddjob001: jhass: that actually only captures the last two characters after the final : on each line
[18:06:46] jhass: oddjob001: derp, right, missed a , 2)
[18:06:47] oddjob001: jhass: added space.. woops
[18:06:58] jhass: .split(":", 2)
[18:07:14] oddjob001: yours is even better. still learning :P
[18:07:41] jhass: I guess String#partition would work too, but I somehow like split better
[18:07:47] whiteline: has joined #ruby
[18:07:50] oddjob001: i couldnt get parititon to work for the life of me
[18:08:13] oddjob001: only outside of the each_line/each_with_index
[18:08:36] drbrain: BraddPitt: I think something like the #execute method lets you do that, yes
[18:08:36] conor_: has joined #ruby
[18:08:56] drbrain: BraddPitt: it's not much different than using `psql`
[18:08:56] BraddPitt: ok, ill do that then
[18:09:07] chouhoulis: has joined #ruby
[18:10:02] chouhoulis: has joined #ruby
[18:11:03] conor_: has joined #ruby
[18:12:30] oddjob001: thanks jhass that worked. now I will stay in this channel because im sure Ill have questions again soon :P
[18:13:53] elepedus: has joined #ruby
[18:14:32] pawnbox: has joined #ruby
[18:14:35] jeadr: has joined #ruby
[18:15:46] oivoodoo: has joined #ruby
[18:15:51] Embly: has joined #ruby
[18:16:00] conor_: has joined #ruby
[18:16:01] Embly: has left #ruby: ()
[18:16:02] ramfjord: has joined #ruby
[18:19:20] renderful: has joined #ruby
[18:20:39] conor_: has joined #ruby
[18:21:04] tomphp_: has joined #ruby
[18:21:24] baweaver: has joined #ruby
[18:21:40] northfurr: has joined #ruby
[18:23:50] hfp: Hey all, I'm having a bit of an issue with testing... This is what I have: https://gist.github.com/Coaxial/1029fd2549e187ec662f. But the test fails, because it says subject never receives the :answer message. I am using a ruby framework called Adhearsion for this code but I'm hoping this is irrelevant and can be figured with plain ruby. Is there anything that looks odd in the gist?
[18:24:22] Musashi007: has joined #ruby
[18:25:30] Mon_Ouie: hfp: You're never calling #run as far as I can tell.
[18:25:45] DLSteve: has joined #ruby
[18:25:49] RegulationD: has joined #ruby
[18:26:15] hfp: Mon_Ouie: In a normal setting, the framework calls it when it runs every controller. Was I wrong to assume it would do it too within a test?
[18:26:28] Papierkorb: has joined #ruby
[18:27:01] Antiarc: You'd be well-served to check out of adhearsion has any particular testing facilities; it's likely that you aren't actually invoking whatever calls your controllers' #run methods
[18:27:06] bruno-: has joined #ruby
[18:27:08] JakFrist: has joined #ruby
[18:27:25] Papierkorb: Hi, i'm currently looking at rubocop. Why does rubocop by default tell you to use fail instead of raise?
[18:27:59] Antiarc: Because it's the opinion that the Rubocop maintainers configured. You can change it if your codebase opines otherwise :)
[18:28:03] Mon_Ouie: Your testing framework (whichever that is) can't know to call #run if you don't tell it to somehow
[18:28:06] skydiver: has joined #ruby
[18:28:23] hfp: Mon_Ouie, Antiarc: That makes sense, thanks
[18:28:31] Papierkorb: Antiarc: just looks weird. for one, I didn't knew about fail, and then, no tutorial/howto code I've seen ever used fail
[18:28:45] gamename: has joined #ruby
[18:29:09] northfurr: has joined #ruby
[18:29:52] Papierkorb: Antiarc: but thanks, thought it had some other reason
[18:29:54] Antiarc: Papierkorb: yeah, I learned to use "raise", too. Personally I just reconfigure rubocop to look for "raise" rather than "fail"
[18:30:02] Antiarc: IIRC fail and raise are aliases
[18:30:06] Antiarc: The only difference would be semantic
[18:30:14] pragmatism: has joined #ruby
[18:30:40] Antiarc: "because I use exceptions to indicate failures, I almost always use the ???fail??? keyword rather than the ???raise??? keyword in Ruby. Fail and raise are synonyms so there is no difference except that ???fail??? more clearly communcates that the method has failed. The only time I use ???raise??? is when I am catching an exception and re-raising it, because here I???m *not* failing, but explicitly and purposefully raising an exception. This is
[18:30:41] Antiarc: a stylistic issue I follow, but I doubt many other people do"
[18:30:44] Antiarc: From Jim Weirich
[18:30:50] Antiarc: So that's probably about as clear a reason as any
[18:30:54] baroquebobcat: has joined #ruby
[18:30:54] christiandsg: has joined #ruby
[18:30:55] choke: has joined #ruby
[18:30:59] Thermatix: has joined #ruby
[18:31:28] baroquebobcat: has joined #ruby
[18:31:36] Antiarc: "the idea is that by combining fail and raise you're quickly able to discern whether you have an exceptional condition or are simply re-raising an exception"
[18:31:42] pipework: That's an interesting though. I've used fail before, but didn't really consider using it like that.
[18:31:56] Antiarc: But it's just semantics in the end. Use whichever makes your code and intent the most clear.
[18:31:58] shevy: well he is right in the stylistic part, fail() sounds different to raise()
[18:32:16] shevy: fail makes me much more nervous too, I start to bite on my finger nails
[18:33:21] nuttermb: has joined #ruby
[18:33:48] yfeldblum: has joined #ruby
[18:33:52] Gabbr_: has joined #ruby
[18:33:53] northfurr: has joined #ruby
[18:34:09] Gabbr_: I still cant use rubygems with ruby21.
[18:34:21] Gabbr_: How to setup rubygems so that it uses ruby21?
[18:34:45] j3r0: has joined #ruby
[18:36:42] pipework: Gabbr_: how are you installing ruby?
[18:36:54] djbkd: has joined #ruby
[18:38:33] benlieb: has joined #ruby
[18:38:49] kristofferR: has joined #ruby
[18:39:07] jackjackdripper: has joined #ruby
[18:39:16] n008f4g_: has joined #ruby
[18:39:42] platzhirsch: has left #ruby: ()
[18:39:45] stef1a: has joined #ruby
[18:39:56] Gabbr_: pipework: gentoo, with RUBY_VERSION ruby21, and eselect ruby ruby21
[18:40:08] pipework: Gabbr_: is this a production machine?
[18:40:12] Gabbr_: installation with package manager: emerge ruby
[18:40:25] miah: what is your error?
[18:40:26] Gabbr_: pipework: Its my own computer.
[18:40:39] ruboto: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[18:40:42] pipework: My guess is that it's an issue with the package manager's way of installing ruby.
[18:41:22] miah: how are you trying to use rubygems, what error are you getting?
[18:41:26] pipework: Gabbr_: I use one system ruby installed by my package manager (the latest stable for that package manager with stable and trustable repos) and then chruby + ruby-install
[18:41:31] oddjob001: jhass: can i pick your brain one more time - https://gist.github.com/tek0011/2b6eecaa8863b91d20c8
[18:41:34] Papierkorb: Again to rubocop, I don't understand the Metrics configuration. So, eg. Metrics/ClassLength: Max: 100 - So, is the maximum 100 lines, or something else?
[18:41:35] lannonbr: has joined #ruby
[18:41:45] stef1a: I would like to create the nested directories ./a/b/c, and I don't know whether they exist. How can I create them all, regardless of whether parts of the directory structure already exist? (e.g., if ./a/ exists, I still want to be able to create b/c/ within ./a/)
[18:41:47] oddjob001: how come the output of new_emodels after the split, doesnt actually seem to split the string
[18:41:52] miah: pipework: thats not required in gentoo as its rolling release and has a usable default ruby installation
[18:42:22] jhass: oddjob001: .split doesn't change the receiver
[18:42:29] DexterLB: has joined #ruby
[18:42:33] pipework: miah: I'm not sure what you mean. I'm just suggesting to use the system package manager's default way of installing ruby without anything remotely custom.
[18:42:35] jhass: oddjob001: think about it, split turns a string into an array of strings
[18:42:39] Gabbr_: miah: just a second.
[18:42:52] miah: pipework: they are using the systems package manager
[18:43:02] jhass: oddjob001: how could it turn an instance of String into an instance of Array? It can only return a new one
[18:43:04] dstarh: has joined #ruby
[18:43:11] jackjackdripper: has joined #ruby
[18:43:18] pipework: miah: I'm aware, and I mentioned first that the issue may just be with how they package it and possibly how the user installed it. :)
[18:43:34] Gabbr_: miah: I dont understand ruby at all, i just need it to run something. I need to run bundle, but it currently sais: bundle env, and the response: /usr/lib64/ruby/2.0.0/rubygems.rb:15:in `require': cannot load such file
[18:43:36] jhass: oddjob001: that said, .split "\n" -> .lines
[18:43:44] oddjob001: jhass: i do not know. I am ~ 6 hours in to ruby, my first language. Well BASIC was my first, but my first since then :P
[18:44:09] miah: what file are you trying to run in ruby that is giving you this require error?
[18:44:20] Ox0dea: stef1a: FileUtils.mkdir_p is the method you're after.
[18:44:21] pipework: `bundle env` I think
[18:44:24] miah: once ruby is installed, you'll need to 'gem install bundler'
[18:44:37] miah: pipework: ah ya i misread
[18:44:50] pipework: miah: Nah, it was kinda hard for me to find too.
[18:45:04] dostoyevsky: is it common that some gems can't be required by their gem name? ruby-odbc is such a case... require 'ruby-odbc' will not work
[18:45:11] miah: i saw this error before
[18:45:12] Adran: has joined #ruby
[18:45:21] jhass: dostoyevsky: sadly yes, it's violating conventions though
[18:45:23] stef1a: Ox0dea: is that equivalent to `mkdir -p 'a/b/c'` run on the command line?
[18:45:41] Gabbr_: Yes, still, after gem install bundler, the same error message
[18:45:43] miah: Gabbr_: try 'gem update --system && gem update'
[18:45:44] Ox0dea: stef1a: It'd be very strange if it weren't, wouldn't you say?
[18:45:49] pipework: dostoyevsky: The name of the gem doesn't necessarily reflect the available paths for requiring, unfortunately
[18:46:10] jhass: dostoyevsky: http://guides.rubygems.org/name-your-gem/ if you need some backing in persuading somebody to fix it
[18:46:38] Gabbr_: miah: Ok, doing it right now.
[18:46:38] stef1a: Ox0dea: thanks :-)
[18:46:43] Ox0dea: Happy to help.
[18:46:50] dostoyevsky: jhass: yeah, that was the ruby19 gentoo problem i had earlier... turns out I just didn't do require 'odbc' to use the ruby-odbc gem :)
[18:46:55] oddjob001: hmmm still dont get it
[18:47:38] jhass: oddjob001: .split (and .lines which you should use for this case too) returns a new object, you need to assign (a = b) it to something
[18:48:00] Gabbr_: miah: Still, the same error message.
[18:48:10] Gabbr_: I asked this on gentoo irc too, noone said anything.
[18:48:17] oddjob001: jhass: ah ok. let me play. thanks.
[18:48:48] miah: Gabbr_: what does `bundle --version` show?
[18:49:08] Gabbr_: miah: The same error message. Wait, i try something.
[18:49:36] Ox0dea: Are there any languages wherein in-place mutation can cross class boundaries?
[18:49:37] benlieb: has joined #ruby
[18:49:58] Ox0dea: It'd be interesting if `foo.split!` turned `foo` into an Array, but also pretty terrible.
[18:50:48] Gabbr_: Now i dont have ruby20, but when i install it (as im doing it right now), bundler works, just with
[18:51:10] shevy: ruby2000!
[18:51:20] jhass: Gabbr_: edit the hashbang to use /usr/bin/env ruby ?
[18:52:23] apeiros: Ox0dea: that'd require weak typing
[18:52:37] Gabbr_: jhass: With bundler, isnt it too intrusive? I could do that, but im afraid it will break something.
[18:52:43] Ox0dea: apeiros: Let's do it!
[18:52:55] apeiros: uh, no thanks. not a fan of that idea :)
[18:52:56] Gabbr_: It should be some option or selection from something, not editing files?
[18:53:10] jhass: Gabbr_: idk what you're using and what Gentoo's doing, so I can't say how intrusive it would be
[18:53:11] Papierkorb: Ox0dea: Java btw. In fact, isn't that quite a common thing with many languages?
[18:53:19] Ox0dea: Papierkorb: No, not at all.
[18:53:32] Ox0dea: >> {}.replace [] rescue $!
[18:53:33] ruboto: Ox0dea # => #<TypeError: no implicit conversion of Array into Hash> (https://eval.in/417877)
[18:53:40] Ox0dea: Is there nowhere I can define that implicit conversion?
[18:53:48] existensil: has joined #ruby
[18:54:07] apeiros: Ox0dea: don't know for hash, but for "to array" it's defining to_ary
[18:54:17] tmtwd: has joined #ruby
[18:54:19] Gabbr_: usr/local/bin/bundler has this first line: #!/usr/bin/ruby20
[18:54:21] apeiros: (and for "to integer" it's to_int)
[18:54:26] Papierkorb: Ox0dea: void foo(ArrayList<String> foo){ foo.add("123"); } - 'final' won't save you. The only languages I know which do have proper support for that are C and C++
[18:54:36] Ox0dea: apeiros: I know about the coercion methods; this is a little different, I think.
[18:54:40] jhass: Gabbr_: the Ruby version managers maintain their own bin/'s and patch $PATH accordingly on version switch, most distributions shipping multiple ruby versions also version binstubs for them, ruby21 -> bundle21 and such
[18:54:43] Gabbr_: But i dont want to edit this, it sais: # This file was generated by RubyGems.
[18:54:54] apeiros: Ox0dea: no, that's precisely that
[18:55:06] jhass: for package installed gems that is of course
[18:55:10] apeiros: Ox0dea: it tries to convert your [] to a hash which could be used in Hash#replace
[18:55:19] northfurr: has joined #ruby
[18:55:42] Ox0dea: Huh, so it does.
[18:55:54] Ox0dea: #to_hash, by the way.
[18:55:59] Gabbr_: jhass: In theory, gentoo uses ruby_version_ruby21 USE flag for that, so i could use ruby21 with rubygems and bundle and such... But in practice something went wrong.
[18:56:10] oddjob001: jhass: thanks again. got it to work and lurned gud
[18:56:16] jhass: Gabbr_: my guess is your /usr/local/bin/bundler was installed by sudo gem install while it used ruby20
[18:56:59] yqt: has joined #ruby
[18:57:22] mephistophocles: has joined #ruby
[18:57:50] dr3w: has joined #ruby
[18:58:04] platzhirsch: has joined #ruby
[18:58:06] platzhirsch: has left #ruby: ()
[18:58:09] Gabbr_: Now, as ive installed ruby20, bundle --version sais 1.10.6
[18:58:25] unver: How do I get epoch Ruby Time? I need a date that will always sort last
[18:58:37] bb010g: has joined #ruby
[18:59:40] jhass: >> Time.at(0)
[18:59:41] ruboto: jhass # => 1970-01-01 00:00:00 +0000 (https://eval.in/417878)
[19:00:09] speakingcode: has joined #ruby
[19:00:19] unver: jhass: thank you
[19:00:21] jhass: >> Time.new(0)
[19:00:22] ruboto: jhass # => 0000-01-01 00:00:00 +0000 (https://eval.in/417879)
[19:00:28] bronson: has joined #ruby
[19:00:46] jhass: >> Time.new(-100)
[19:00:47] ruboto: jhass # => -0100-01-01 00:00:00 +0000 (https://eval.in/417880)
[19:00:50] stef1a: is there a way to rescue from errors that occur while executing a terminal command from a ruby script?
[19:00:55] michaeldeol: has joined #ruby
[19:01:17] ascarter: has joined #ruby
[19:01:56] ramfjord: has joined #ruby
[19:01:57] ruurd: has joined #ruby
[19:02:01] kaikazou: >> puts "jhass needs a computer with a ruby interpreter, or to query ruboto ;o"
[19:02:01] ruboto: kaikazou # => jhass needs a computer with a ruby interpreter, or to query ruboto ;o ...check link for more (https://eval.in/417881)
[19:02:05] jhass: Gabbr_: since you're not elaborating on what you need all this for, maybe just sudo gem install bundler again with ruby21 active and overwrite the binstub
[19:02:28] jhass: Gabbr_: I think I'd still recommend a env hashbang though
[19:02:33] michaeldeol: has joined #ruby
[19:02:45] JoshL: has joined #ruby
[19:02:45] jhass: kaikazou: nope, that was meant as demos :P
[19:02:45] rbennacer: has joined #ruby
[19:02:58] havenwood: has joined #ruby
[19:03:00] kaikazou: jhass, can't I have this moment? :(
[19:03:03] radgeRayden: has joined #ruby
[19:03:06] jhass: kaikazou: I just demonstrated that epoch isn't the oldest date Ruby can represent
[19:03:17] Gabbr_: jhass: I need this for openproject.
[19:03:21] whiteline: has joined #ruby
[19:03:32] jhass: Gabbr_: I mean rather if you need ruby20 still etc.
[19:03:39] reset: has joined #ruby
[19:04:15] mwlang: why the heck would anyone do this?? ???@item = item ||=@item???
[19:04:36] jhass: because it's syntactically valid?
[19:04:41] pipework: mwlang: So item isn't ever falsy?
[19:05:03] pipework: Or rather, it can only be set falsy initially and never again
[19:05:23] jhass: I think it's keep the old value of @item if item isn't present
[19:05:31] CorySimmons: has joined #ruby
[19:05:32] jhass: @item = item if item
[19:05:35] benlieb: has joined #ruby
[19:05:43] mwlang: why not @item ||= item
[19:05:51] mwlang: same thing, right?
[19:06:06] Mon_Ouie: Nope, that wouldn't set item to something
[19:06:06] pipework: jhass: Isn't that what I said?
[19:06:17] jackjackdripper: has joined #ruby
[19:06:18] jhass: no, that's conditional on @item's falsiness, not item's
[19:06:29] pipework: Maybe it wasn't the easiest english to understand.
[19:06:33] j4cknewt: has joined #ruby
[19:06:36] unver: does it string together @item=item=@item ?
[19:06:40] mwlang: oh, wait???so they???re setting ???item??? to something non-falsy rather than @item.
[19:06:51] mwlang: the odd thing is they only reference @item below that line.
[19:07:03] jhass: what's item, where does it come from?
[19:07:13] jackjackdripper: has joined #ruby
[19:07:16] jhass: I still think @item = item if item is the intention
[19:07:40] jhass: pipework: mmh, I guess
[19:07:47] Mon_Ouie: It's the same as 'item ||= @item; @item = item'
[19:08:26] kadoppe: has joined #ruby
[19:09:19] Papierkorb: Wow. After tuning rubocop it's actually really useful. from 70 offenses down to now 4, then to 0 in two minutes. I think that was quite worth it
[19:09:27] Ox0dea: stef1a: If the command didn't exist, you'll get an Errno::ENOENT exception, which can of course be rescued.
[19:09:39] Ox0dea: Otherwise, you'll probably want to use Kernel.system and check its return value.
[19:09:47] jackjackdripper: has joined #ruby
[19:10:00] baroquebobcat: has joined #ruby
[19:11:35] speakingcode: has joined #ruby
[19:11:37] mistermocha: has joined #ruby
[19:12:07] Ox0dea: >> raise Errno::EDOOFUS rescue $!
[19:12:08] ruboto: Ox0dea # => #<Errno::NOERROR: Success> (https://eval.in/417883)
[19:12:15] AxonetBE: has joined #ruby
[19:12:23] Ox0dea: It's like some kind of Windows error.
[19:12:26] jhass: stop braking Ruby :(
[19:12:58] yardenbar: has joined #ruby
[19:12:58] devoldmx: has joined #ruby
[19:13:04] roolo: has joined #ruby
[19:13:22] failshell: has joined #ruby
[19:14:01] pengin: has joined #ruby
[19:15:36] wldcordeiro: has joined #ruby
[19:16:28] northfurr: has joined #ruby
[19:16:30] radgeRayden_: has joined #ruby
[19:17:13] shevy: rubocop... ruboto ... rubocop... botocopo
[19:18:18] hololeap: has joined #ruby
[19:18:51] Ox0dea: Copa Rubana.
[19:18:52] slash_nick: shevy: i miss evelyn
[19:19:02] slash_nick: shevy: whoops...eval-in
[19:19:49] AxonetBE: has joined #ruby
[19:22:43] speaking1ode: has joined #ruby
[19:23:45] Shoutsid: has joined #ruby
[19:25:45] EminenceHC: has joined #ruby
[19:26:28] mwlang: sorry, had to step away for a bit??????item??? is a local variable to the partial.
[19:27:00] mwlang: so it doubly makes little sense to do @item = item ||= @item
[19:27:40] mwlang: either you have an item or you don???t and that line???s not gonna make one bit of difference to the partial???s point of view.
[19:27:51] jeremy04: has joined #ruby
[19:27:56] hal_9000: item = 5 unless item == 5 # ;)
[19:27:59] speakingcode: has joined #ruby
[19:28:01] bweston: has joined #ruby
[19:28:52] Gabbr_: has joined #ruby
[19:29:18] mwlang: hal_9000: that???s pretty much the gist of it, IMO
[19:29:33] ivanskie: has joined #ruby
[19:29:48] paulcsmith: has joined #ruby
[19:29:53] tmtwd: has joined #ruby
[19:30:00] solars: has joined #ruby
[19:30:14] sreggin: has joined #ruby
[19:30:32] jackjackdripper: has joined #ruby
[19:30:54] Gabbr_: I have two different bundles.
[19:31:04] Gabbr_: One is in /usr/local/bin
[19:31:10] sreggin: does anyone know a good private tracker for elearning torrents?
[19:31:11] Gabbr_: and on is in /usr/bin
[19:31:19] jhass: ?ot sreggin
[19:31:19] ruboto: sreggin, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[19:31:29] Gabbr_: And the one in /usr/bin uses ruby21, the other ruby20...
[19:31:37] Gabbr_: Where does the gem install store its files?
[19:31:38] jhass: Gabbr_: so get rid of the latter?
[19:31:46] gambl0re: has joined #ruby
[19:32:03] Gabbr_: jhass: I will, but i want to know where does the other come from so i can clean the system from the wrong files.
[19:32:22] mistermocha: has joined #ruby
[19:32:23] jhass: Gabbr_: as said, prolly sudo gem install bundler while ruby20 was active
[19:32:38] Gabbr_: jhass: Probably.
[19:32:38] jhass: gem env shows where it'll install stuff
[19:32:44] kristofferR: has joined #ruby
[19:32:45] Gabbr_: jhass: Thanks.
[19:33:41] obiwandev: has joined #ruby
[19:34:00] choke: has joined #ruby
[19:34:39] Gabbr_: jhass: Interestingly, none of the directories is the /usr/local/bin, only the SHELL PATH.
[19:35:06] banister: has joined #ruby
[19:35:08] jhass: I guess that was different with ruby20 active (and possibly another rubygems version back then)
[19:35:21] robh71: has joined #ruby
[19:35:34] ivanskie: has joined #ruby
[19:35:49] Gabbr_: Yes, well, i will do some test installs to find it out.
[19:37:46] rbennacer: has joined #ruby
[19:37:51] jackjackdripper: has joined #ruby
[19:38:02] juanpaucar: has joined #ruby
[19:38:26] juanpaucar: has joined #ruby
[19:38:32] jhass: !ban sreggin !T 1w offensive nick
[19:38:33] ChanServ: +b sreggin!*@*
[19:38:33] ChanServ: ChanServ kicked sreggin: offensive nick
[19:39:50] Gabbr_: That was a bit harsh in my opinion.
[19:40:06] jhass: Gabbr_: there was a warning over in #ruby-offtopic
[19:40:31] Mon_Ouie: That's also ban evasion anyway
[19:40:32] einarj: has joined #ruby
[19:40:54] JakFrist: has joined #ruby
[19:41:02] Gabbr_: I still dont understand. I know its not a ruby problem now, so its unnecessary for me to say this, but
[19:41:23] jhass: you mean why? read it backwards
[19:41:47] Gabbr_: the /usr/local/bin/bundle created half an hour ago, and dont know what created it.
[19:41:50] baweaver: has joined #ruby
[19:41:59] Gabbr_: jhass: No, i get that. Im talking about my problem.
[19:42:10] jhass: ah well, no idea
[19:44:01] akurilin2: question: is it possible to get something like the $@ variable in ruby scdripts?
[19:44:05] rafaelfranca: has joined #ruby
[19:44:05] Frem: has joined #ruby
[19:44:54] da3mian: has joined #ruby
[19:45:24] danman: has joined #ruby
[19:45:33] gambl0re: www.github.com
[19:45:40] jackjackdripper: has joined #ruby
[19:45:50] jhass: I think most of us know that site, but thanks
[19:46:04] Ox0dea: akurilin2: If you're on Linux, you can use File.read('/proc/self/cmdline').split(?\0).
[19:46:09] sdothum: has joined #ruby
[19:46:09] Ox0dea: Otherwise, you're outta luck. :(
[19:46:45] akurilin2: I'm basically trying to pass the params AS IS to a bash script I'm invoking inside
[19:46:46] jhass: sure they don't just want ARGV?
[19:47:04] jhass: system("/bin/bash", "script", *ARGV)
[19:47:22] cschneid_: I have a dozen or so http calls I'd like to do in parallel, is there a low-ceremony way to wrap them up in futures/promises? Ideally I'd fire them all off then call .result on them to collect up the answer. anybody know of a convenient gem?
[19:47:32] Ox0dea: jhass: ARGV is a myth.
[19:48:06] da3mian: has joined #ruby
[19:48:11] slash_nick: cschneid_: concurrent-ruby
[19:48:50] rafaelfranca: has left #ruby: ()
[19:48:56] polpak: has joined #ruby
[19:49:39] jackjackdripper: has joined #ruby
[19:49:48] cschneid_: slash_nick: fancy. This doesn't need any weird dependencies (event machine or similar)?
[19:49:54] slash_nick: cschneid_: something like this... change lookup to some http call: https://gist.github.com/rthbound/224b795040ae2dcb593a
[19:50:03] diegoviola: has joined #ruby
[19:50:19] akurilin2: I'll try those approaches you guys suggested, thank you. Never heard of /proc/self/cmdline, that's awesome
[19:50:35] Gabbr_: I found out what created those bad bundle files.
[19:50:44] cschneid_: slash_nick: cool, I'll give this a shot
[19:50:44] baweaver: has joined #ruby
[19:50:52] Deion: has joined #ruby
[19:51:04] jhass: ?guys akurilin2
[19:51:04] ruboto: akurilin2, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[19:51:33] Gabbr_: Its a bit funny how i could only use the bundle with ruby20, because the old gem created a file in /usr/local/bin, and i couldnt use it, but the newer version of bundle in /usr/bin was there.
[19:51:44] Gabbr_: So how do i get gem to uninstall all the gems?
[19:52:44] jhass: Gabbr_: mmh, don't think there's anything to uninstall all. make sure to uninstall anything that might be installed via your package manager and then you could try to script something parsing gem list and feeding it into gem uninstall
[19:52:45] haylon: has joined #ruby
[19:52:48] dorei: I want to have a POST route that adds some data into my db. From what I understand so far, when everything goes ok I should respond with either 200 or 201, what should my POST return in case of data insertion failure?
[19:53:22] haylon: Why would I not be able to use a .split inside of a each_line loop? I keep getting undefined method 'split' for nil:NilClass (NoMethodError)
[19:53:27] jhass: dorei: depends on the failure a bit, just 500 if unsure
[19:53:35] jeadr: has joined #ruby
[19:53:39] Coraline: dorei: or 422 if it's an input problem
[19:53:43] Gabbr_: jhass: Ok, thats what i will do then.
[19:53:57] jhass: ?code haylon
[19:53:57] ruboto: haylon, We can't help you without your code, please post it to https://gist.github.com
[19:54:31] dorei: Coraline: i want to avoid to have duplicate data, i guess duplicate data is an input problem, right?
[19:54:51] binaryplease: has joined #ruby
[19:54:55] Coraline: That could be argued as such, yeah
[19:55:06] jhass: dorei: if the submitter can know it's a duplicate yeah
[19:55:09] stef_204: has joined #ruby
[19:55:15] haylon: https://gist.github.com/predatorian3/b43563ec90704b375c67
[19:55:19] jhass: dorei: if the caller can't know and maybe doesn't even need to know I
[19:55:21] skade: has joined #ruby
[19:55:25] jhass: 'd even go as far as ignore it and 200
[19:55:39] AnoHito: has joined #ruby
[19:56:03] jhass: that is if you don't expect resubmission with something changed either
[19:56:11] benlieb: has joined #ruby
[19:56:23] haylon: jhass: https://gist.github.com/predatorian3/b43563ec90704b375c67 My appologies.
[19:56:30] howdoico1: has joined #ruby
[19:56:43] jhass: haylon: result will be nil if the regex doesn't match
[19:56:52] jhass: maybe you meant to next unless ... ?
[19:57:58] haylon: If I don't do the .split(/\s+/) it'll print all the matches just fine though
[19:58:15] Musashi007: has joined #ruby
[19:58:38] kidoz: has joined #ruby
[19:58:39] jhass: and all non-matches too
[19:59:05] mrtg9970: has joined #ruby
[20:00:19] haylon: jhass: it shouldn't.
[20:00:33] jhass: you mean you don't want it to
[20:01:02] haylon: when I change it be puts line if line =~ /Handling Logon/ it just prints what I want. But I want to capture the line I want, then take that line and split the string and print certain parts of that string.
[20:01:10] haylon: I've done it before, but for whatever reason, its not working now
[20:01:17] jhass: well, then the puts is inside the conditional of course
[20:01:36] jhass: >> foo = "bar" if false; foo
[20:01:37] ruboto: jhass # => nil (https://eval.in/417892)
[20:01:41] jhass: >> foo = "bar" if false; foo.split
[20:01:41] ruboto: jhass # => undefined method `split' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/417893)
[20:01:49] jhass: that's happening
[20:02:34] haylon: I just updated the Gist with what works with me in other scripts as well
[20:03:20] Axsuul: has joined #ruby
[20:03:21] Coldblackice: has joined #ruby
[20:03:27] opensource_ninja: has joined #ruby
[20:03:27] jhass: haylon: there you're relying on that there's at least one match and only process the last match
[20:03:56] roolo: has joined #ruby
[20:04:06] jeremy04: has joined #ruby
[20:04:08] haylon: that's why I was placing the split in the each_line loop. or at least that makes sense to me
[20:04:38] Axsuul: has joined #ruby
[20:04:47] phutchins1: has joined #ruby
[20:05:16] jhass: I start to wonder if you even try to understand what's happening or if you keep insisting that your code must work and Ruby is at fault for giving you an error...
[20:05:40] binaryplease: has joined #ruby
[20:05:45] radgeRayden_: has joined #ruby
[20:05:51] haylon: I'm thinking on it. your examples aren't making sense to me. My apologies.
[20:06:00] Axsuul: has joined #ruby
[20:06:10] jhass: anyway, put all your code into the conditional or skip non-matches which results into the same
[20:06:44] platzhirsch: has joined #ruby
[20:07:14] jhass: can you tell me the difference between: a if condition; b; and if condition; a; b; end; ?
[20:07:24] Swappticon: has joined #ruby
[20:08:23] haylon: I can't think of the word, but is it something like, use a if it matches, otherwise use b for the first one.
[20:08:38] jhass: replace ; with newlines
[20:08:48] jhass: that's just for brevity in IRC here
[20:08:55] jackjackdripper: has joined #ruby
[20:09:02] jhass: ternary would be condition ? a : b
[20:09:57] haylon: its not clicking right off.
[20:10:22] tmtwd: has joined #ruby
[20:10:31] jhass: http://paste.mrzyx.de/pb8vtmoac with newlines
[20:10:44] rideh: has joined #ruby
[20:11:09] dr3w: has joined #ruby
[20:11:26] haylon: The second one has the end to the if. the second is not using it, like python.
[20:11:47] jhass: there's no implicit end's in Ruby
[20:12:18] ascarter: has joined #ruby
[20:12:28] jhass: and it doesn't care about indentation at all
[20:12:50] bruno-: has joined #ruby
[20:13:08] jhass: let's call a and b statements, can you tell me which statements will be executed for which values of condition (true/false) in both examples?
[20:13:53] haylon: if a is true, then b will be executed, and if true, both a and b will be executed.
[20:14:41] speaking1ode: has joined #ruby
[20:14:42] jhass: try again, we call the examples 1 and 2, a and b are the statements that can be executed and condition is what can be true or false
[20:14:57] jpfuentes2: has joined #ruby
[20:15:59] jhass: "in example 1, if condition is X then a will (not) be executed and b will (not) be executed"
[20:16:15] skydiver: has joined #ruby
[20:16:34] jhass: make me four such sentences to answer all cases
[20:16:52] pengin: has joined #ruby
[20:18:27] Ox0dea: "Drop and give me four."
[20:19:07] haylon: if condition is x, then a will be executed and b will be executed; if condition ix x then a will not be executed and b will be executed; if condition is x then a will be executed and b will not be executed; if condition is x a will not be executed and b will be executed.
[20:19:40] christiandsg: has joined #ruby
[20:20:02] Ox0dea: haylon: You were supposed to replace those Xs, mate.
[20:22:16] benlieb: has joined #ruby
[20:23:23] haylon: jhass, I'll have to come to you later, I'm just not comprehending this stuff right now. I need to think on it.
[20:24:03] jhass: haylon: maybe read up on what modifier-if is
[20:25:24] nkts: has joined #ruby
[20:25:51] haylon: One last stab at it, otherwise I'm gonna have to take a break for a sec.
[20:26:04] da3mian: has joined #ruby
[20:26:22] kies: has joined #ruby
[20:27:07] haylon: a is executed if the condition on the right is true. Then execute b for example 1. the second example is a normal if condition is true, execute the code inside of the if block.
[20:27:48] jhass: now do you see what the issue in result = line if line =~ /.../; result.split is ?
[20:28:19] jhass: result = line is a; result.split is b; but for b to work it depends on a being run
[20:28:22] haylon: I htink so
[20:28:40] haylon: regardless of if =~ matches anything, split is going to split nothing if it loops through
[20:29:32] momomomomo: has joined #ruby
[20:29:35] haylon: Ok, that makes sense.
[20:29:55] haylon: Would you suggest nesting another if inside of that then?
[20:30:22] hololeap: has joined #ruby
[20:30:48] jhass: either don't use the modifier-if, put the conditional around all statements that depend on it being true, or skip the line with next if you don't want to process it
[20:31:05] jhass: which basically results in the same control flow
[20:31:21] jhass: run all or none statements depending on the condition
[20:31:25] haylon: I've never used the `next` statement before
[20:31:28] Averna: has joined #ruby
[20:31:35] jhass: it's like return for blocks
[20:31:40] Ox0dea: Not quite.
[20:31:52] haylon: where would I put that in the modifier-if?
[20:31:58] al2o3-cr: it's like continue in other languages
[20:32:03] obiwandev: has joined #ruby
[20:32:15] jhass: in usage/effect
[20:32:21] jhass: but it returns from the block
[20:32:29] obiwandev: has joined #ruby
[20:33:04] Ox0dea: Aye, I suppose that's a fair enough analogy given that you can supply it with arguments.
[20:33:10] jhass: haylon: the next variant would be next unless lines =~ /.../ as the first line of the block
[20:33:41] tmtwd: has joined #ruby
[20:34:02] Rubie: has joined #ruby
[20:34:05] Ox0dea: >> [1, 2, 3].map { |i| next 'even' if i.even?; 'odd' }
[20:34:06] ruboto: Ox0dea # => ["odd", "even", "odd"] (https://eval.in/417895)
[20:34:35] woobywoob: has joined #ruby
[20:34:41] AxonetBE: has joined #ruby
[20:34:46] jhass: >> def foo; a = yield; a + 1; end; foo { next 2 }
[20:34:47] ruboto: jhass # => 3 (https://eval.in/417896)
[20:34:47] woobywoob: im getting "ERROR: Failed to build gem native extension" when trying to get puma
[20:34:52] jhass: >> def foo; a = yield; a + 1; end; foo { break 2 }
[20:34:53] ruboto: jhass # => 2 (https://eval.in/417897)
[20:35:01] woobywoob: and i already have openssl from homebrew
[20:35:12] Ox0dea: ?gist woobywoob
[20:35:12] ruboto: woobywoob, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[20:35:17] Ox0dea: Please provide us with a bit more detail.
[20:35:28] jhass: mmh, I guess we could have an ?error
[20:35:31] jeremy04: has joined #ruby
[20:35:57] woobywoob: http://pastebin.com/XWif8z8m
[20:35:57] ruboto: woobywoob, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/eb19db2eda9c0dd56f28
[20:35:58] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[20:36:01] Ox0dea: This guy.
[20:36:10] jalcine: has joined #ruby
[20:36:21] blackmesa: has joined #ruby
[20:36:40] jbw: has joined #ruby
[20:37:07] haylon: Thanks for all your help jhass, 0x0dea and al2o3-cr
[20:38:34] woobywoob: ox0dea to give you more info i have the xcode command line tools installed and use rbenv
[20:38:37] Kallis: has joined #ruby
[20:38:55] vdamewood: has joined #ruby
[20:39:10] segy: has joined #ruby
[20:39:16] choke: has joined #ruby
[20:39:39] jackjackdripper: has joined #ruby
[20:39:42] Ox0dea: woobywoob: I can be of no immediate assistance in this matter, but the problem seems to stem from Apple using their own crypto thingy.
[20:39:46] helpa-bot: has joined #ruby
[20:40:04] jeremy04_: has joined #ruby
[20:40:16] Ox0dea: I love what you've done with the garden, by the way.
[20:40:19] woobywoob: hmm is there a way for me to change this?
[20:40:25] gambl0re: has joined #ruby
[20:41:19] np0: has joined #ruby
[20:41:20] einarj: has joined #ruby
[20:41:48] woobywoob: could you point me to the right direction
[20:41:51] kfpratt: has joined #ruby
[20:42:27] helpa-bot: has joined #ruby
[20:43:44] jenrzzz: has joined #ruby
[20:43:53] pipework: woobywoob: I personally use chruby and ruby-install installed via homebrew. I'm not familiar with minissl personally.
[20:44:14] woobywoob: pipework it's fine i fixed it
[20:44:21] woobywoob: i had to force link with brew
[20:45:38] helpa: has joined #ruby
[20:46:00] pipework: woobywoob: Huh, interesting. I'd probably consider making sure everything's all in order otherwise with `brew doctor`
[20:46:14] ivanskie: has joined #ruby
[20:46:22] dr3w: has joined #ruby
[20:46:39] woobywoob: yea brew tells me i may want to unlink it
[20:46:53] pipework: Are you using a brewed openssl?
[20:47:09] woobywoob: brew openssl yes
[20:47:32] pipework: I'd unlink it and just use it only for ruby or things you compile and want that openssl, probably.
[20:47:56] pipework: But the worse that'll happen is things don't compile or they do and don't work, which isn't all that bad. :D
[20:48:35] lele: has joined #ruby
[20:49:11] helpa-bot: has joined #ruby
[20:49:16] Ox0dea: "It fails 1% of the time every time."
[20:50:21] helpa-bot: has joined #ruby
[20:50:56] rbennacer: has joined #ruby
[20:51:14] woobywoob: yea unlinked and just linked to my ruby-build
[20:52:27] dgutierrez1287: has joined #ruby
[20:53:35] Xiti: has joined #ruby
[20:53:59] rbowlby: has joined #ruby
[20:54:28] icarus: has joined #ruby
[20:55:33] pipework: woobywoob: Probably a good decision. I sometimes make those kinds of decisions where I don't link it with only the things I care about and then something comes up later and I totally forget that I made that decision and I waste a lot of time until I recall or find what my past self decided.
[20:55:40] pipework: It's always future self's fault.
[20:56:27] phutchins1: has joined #ruby
[20:56:41] chipotle: has joined #ruby
[20:58:49] dionysus69: has joined #ruby
[20:59:35] jeadr: has joined #ruby
[21:00:01] bronson: has joined #ruby
[21:01:35] yeticry: has joined #ruby
[21:04:34] stef_204: has joined #ruby
[21:06:36] yeticry: has joined #ruby
[21:06:51] woobywoob: i forgot my password on #rubyonrails
[21:07:26] pipework: woobywoob: #freenode can help you
[21:07:27] yorickpeterse: woobywoob: you can trigger a reset via nickserv
[21:07:35] that1guy: has joined #ruby
[21:07:36] zenspider: Do I even want to know what openssl/bio.h is?
[21:07:42] pipework: Assuming you have an email address set, nickserv can help.
[21:07:55] pipework: zenspider: biometric secure sockets layer, obvs
[21:08:16] zenspider: bleed for your encryption?
[21:08:31] EminenceHC: has joined #ruby
[21:09:37] pipework: zenspider: I'm too sober to not take this somewhere it ought not to go.
[21:11:27] benlieb: has joined #ruby
[21:11:33] Asher: has joined #ruby
[21:12:56] ruby-lang459: has joined #ruby
[21:13:08] duderonomy: has joined #ruby
[21:13:37] bruno-: has joined #ruby
[21:13:44] devoldmx: has joined #ruby
[21:14:29] bubbys: has joined #ruby
[21:16:39] einarj: has joined #ruby
[21:17:03] tmtwd: has joined #ruby
[21:19:22] araujo: has joined #ruby
[21:21:35] jeadr: has joined #ruby
[21:22:49] northfurr: has joined #ruby
[21:22:54] shmilan: has joined #ruby
[21:23:45] amclain: has joined #ruby
[21:23:56] einarj: has joined #ruby
[21:24:54] Skelz0r: has joined #ruby
[21:25:20] j3r0: has joined #ruby
[21:28:08] dr3w: has joined #ruby
[21:31:10] howdoico1: has joined #ruby
[21:31:15] skade: has joined #ruby
[21:32:40] jeadr: has joined #ruby
[21:32:55] Averna: has joined #ruby
[21:34:13] gambl0re: has joined #ruby
[21:35:17] _blizzy_: has joined #ruby
[21:35:45] yashinbasement: has joined #ruby
[21:38:44] Ox0dea: http://linux.die.net/man/3/bio
[21:38:45] allcentu1: has joined #ruby
[21:38:49] Ox0dea: What does the damned B signify?
[21:40:15] bruno-: has joined #ruby
[21:40:39] ivanskie: has joined #ruby
[21:42:35] darix: Ox0dea: you really expect openssl internals to make sense?
[21:42:36] mistermocha: has joined #ruby
[21:42:46] Ox0dea: The acronym, if nothing else.
[21:43:48] yasha0x80: has joined #ruby
[21:44:07] pipework: Ox0dea: http://stackoverflow.com/questions/11496189/what-does-the-b-in-bio-stand-for
[21:44:11] pipework: google is fantastic.
[21:44:21] yqt: has joined #ruby
[21:44:59] tmtwd: has joined #ruby
[21:46:18] Ox0dea: I don't buy it.
[21:46:33] jgt: has joined #ruby
[21:46:58] pipework: It's not for sale.
[21:47:17] einarj: has joined #ruby
[21:47:51] tubbo: sure it is
[21:48:02] tubbo: https://www.google.com/finance?q=GOOG
[21:49:24] michaeldeol: has joined #ruby
[21:51:33] NeverDie: has joined #ruby
[21:51:47] _lovehandle_: has joined #ruby
[21:53:45] shevy: this is too simple for Ox0dea he expects are mystical name
[21:53:58] Ox0dea: Just something more reasonable, really.
[21:53:59] edwinvdgraaf: has joined #ruby
[21:54:07] Ox0dea: "Buffer" seems more or less fitting, but also redundant.
[21:54:17] shevy: how about Butter
[21:54:24] Ox0dea: Brobdingnagian.
[21:54:36] jeadr: has joined #ruby
[21:54:48] pipework: Basic not good enough for you?
[21:54:53] pipework: Is it too... basic?
[21:54:54] Ox0dea: It's... not basic?
[21:55:19] pipework: It isn't? I thought you didn't know what it was.
[21:55:41] shevy: you both don't know anyway!
[21:55:50] pipework: Even python mirrors that in its documentation.
[21:55:55] Ox0dea: pipework: I mean that "basic" does not accurately represent what the library provides.
[21:55:56] pipework: Shit, I said the python word.
[21:56:12] pipework: Ox0dea: Neither did the "secure" part multiple times in history. So what
[21:56:34] Ox0dea: Is BIO an *attempt* at basic IO, then?
[21:56:40] pipework: Just accept that people smarter than both of us consider it basic.
[21:56:51] darix: Ox0dea: it is there wrapper to cover different platforms
[21:56:53] pipework: I'm going back to playing with legos.
[21:56:54] Ox0dea: Sounds like tyranny.
[21:57:25] Ox0dea: darix: Yes, it seems to do all sorts of nice things which remove it from under the umbrella of "basic", in my estimation.
[21:57:59] darix: Ox0dea: from a crypto guy that stuff is basic stuff;)
[21:58:05] darix: the hard parts are elsewhere
[21:58:29] Ox0dea: Still, C for "comprehensive" or some such would be more appropriate.
[21:58:46] einarj_: has joined #ruby
[21:58:50] finisherr: has joined #ruby
[21:59:14] baweaver: has joined #ruby
[21:59:19] diegoviola: has joined #ruby
[22:00:57] Rubie: has joined #ruby
[22:01:28] Thermatix: has joined #ruby
[22:01:36] decoponio: has joined #ruby
[22:02:12] pengin: has joined #ruby
[22:03:22] IceyEC: has joined #ruby
[22:03:45] astrobunny: has joined #ruby
[22:04:24] skydiver: has joined #ruby
[22:05:32] klaas_: has joined #ruby
[22:06:15] radgeRayden_: has joined #ruby
[22:07:42] art-solopov: has joined #ruby
[22:08:24] christiandsg: has joined #ruby
[22:08:57] Anon_: trying to step through a ruby file with pry.
[22:09:14] Anon_: how can i just run the file and step through starting with the first line
[22:09:24] Anon_: which is a require statement
[22:10:38] choke: has joined #ruby
[22:10:54] Anon_: i did pry ./myRubyFile.rb
[22:11:41] choke: has joined #ruby
[22:11:50] skade: has joined #ruby
[22:12:11] Azure: has joined #ruby
[22:13:41] toretore: has joined #ruby
[22:14:04] Contigi: has joined #ruby
[22:14:15] Rubie: has joined #ruby
[22:14:19] crdpink: has joined #ruby
[22:14:32] pawnbox: has joined #ruby
[22:16:17] nitenq: has joined #ruby
[22:18:02] robh71: has joined #ruby
[22:18:08] ledestin: has joined #ruby
[22:18:26] stef204: has joined #ruby
[22:18:46] stef204: has joined #ruby
[22:18:52] djbkd: has joined #ruby
[22:18:54] choke: has joined #ruby
[22:20:59] dfockler: has joined #ruby
[22:21:16] TheNet: has joined #ruby
[22:21:21] michaeldeol: has joined #ruby
[22:22:17] Swappticon: has joined #ruby
[22:23:35] Ox0dea: anon_: You probably want pry-byebug.
[22:24:10] platzhirsch: has left #ruby: ()
[22:24:27] howdoico1: has joined #ruby
[22:27:04] IceyEC: has joined #ruby
[22:29:29] uptownhr: has joined #ruby
[22:32:26] choke: has joined #ruby
[22:33:52] djbkd: has joined #ruby
[22:35:58] baweaver: has joined #ruby
[22:36:51] helpa: has joined #ruby
[22:38:28] vF3hNGxc47h8: has joined #ruby
[22:40:41] shevy: Ox0dea have you played with mruby?
[22:40:49] hs366: has joined #ruby
[22:41:15] helpa: has joined #ruby
[22:41:47] Cust0sLim3n: has joined #ruby
[22:43:20] n_blownapart: has joined #ruby
[22:44:05] sepp2k: has joined #ruby
[22:45:12] mistermocha: has joined #ruby
[22:45:28] ellisTAA_: has joined #ruby
[22:45:56] _lovehandle_: has joined #ruby
[22:46:42] _lovehandle_: has joined #ruby
[22:47:33] baweaver: has joined #ruby
[22:47:53] _lovehandle_: has joined #ruby
[22:48:52] _lovehandle_: has joined #ruby
[22:49:16] AnoHito: has joined #ruby
[22:49:40] uptownhr: has joined #ruby
[22:50:06] sdothum: has joined #ruby
[22:50:52] _lovehan1le_: has joined #ruby
[22:51:27] _lovehandle_: has joined #ruby
[22:53:09] choke: has joined #ruby
[22:55:15] casadei_: has joined #ruby
[22:55:48] Ox0dea: shevy: I've not. Is it great?
[22:57:11] paradoja: has joined #ruby
[22:57:48] crack_user: has joined #ruby
[22:58:07] ruboto: fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, sevenseacat, miah, workmad3, Coraline, drbrain, zenspider, slyphon, Aria, rubyhacker1, ljarvis
[22:58:18] paradoja: has left #ruby: ()
[22:58:22] Axsuul: has joined #ruby
[22:58:45] drbrain: go Radar go
[22:58:45] Radar: !ban crack_user !T 1D
[22:58:46] ChanServ: +b crack_user!*@*
[22:58:46] ChanServ: ChanServ kicked crack_user: is banned from this channel
[22:59:10] TheNet: has joined #ruby
[22:59:25] Axsuul: has joined #ruby
[22:59:26] Radar: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[22:59:30] Radar: has joined #ruby
[22:59:45] ChanServ: -b crack_user!*@*
[22:59:46] shevy: Ox0dea I haven't either. I am slowly getting to the point finally where I can write less ruby, and dig into C
[23:00:07] crack_user: has joined #ruby
[23:00:10] rcvalle: has joined #ruby
[23:00:19] Axsuul: has joined #ruby
[23:00:22] crack_user: regex question here
[23:00:23] bronson: has joined #ruby
[23:00:27] Ox0dea: shevy: Oh, nice! C is pretty great.
[23:00:29] Radar: crack_user: sorry about that, was a bit of a hair trigger
[23:00:37] Radar: Ox0dea: crack_user is a regular user of the channel
[23:00:41] Radar: http://logs.ryanbigg.com/p/crack_user
[23:00:46] Radar: Consult logs if unsure next time plz
[23:00:51] Ox0dea: My apologies.
[23:01:11] crack_user: regex question here
[23:01:13] Ox0dea: The nick + "guys" was a doubly unpleasant combination.
[23:01:55] shevy: crack_user there is one dude stalking #ruby
[23:01:57] crack_user: what use to crack my softwares
[23:02:06] shevy: * ChanServ has kicked sreggin from #ruby (Banned: offensive nick)
[23:02:34] shevy: he always uses a certain "hidden" word in his nick, and usually uses webchat
[23:02:47] crack_user: I don't know the rules about the nick names
[23:03:06] Ox0dea: But surely you observe the potential innuendo in your own?
[23:03:09] michaeldeol: has joined #ruby
[23:03:23] shevy: hey! Ox0dea might be offensive... it's some hidden code!
[23:03:29] Aeyrix: It is offensive.
[23:03:36] Aeyrix: I'm offended daily by it.
[23:03:44] pipework: I use cracks all the time.
[23:03:50] Ox0dea: The O is pretty shit. :/
[23:03:51] shevy: I read it as Oxf0rd
[23:03:59] pipework: But where I'm from, we call them doors.
[23:04:18] Ox0dea: Nothing is really touching; it's "cracks" all the way down.
[23:04:18] shevy: oh so this is the nick... a pipe to smoke!
[23:04:20] crack_user: yes, I already said, I use to crack my softwares, especially the games
[23:04:38] shevy: crack_user welcome to the 1990ies!
[23:04:51] Ox0dea: crack_user: And you feel that to be sufficiently representative of your character?
[23:05:25] robh71: has joined #ruby
[23:06:22] crack_user: dunno, just want to procedure with my question
[23:06:26] Musashi007: has joined #ruby
[23:07:23] dr3w: has joined #ruby
[23:07:32] rakm: has joined #ruby
[23:08:33] shevy: what question
[23:08:54] workmad3_: has joined #ruby
[23:09:11] christiandsg: has joined #ruby
[23:10:54] shevy: problem solved
[23:11:00] crack_user: I just want to replace all pipes(|) in {quote:tabular:(.*)} in this string "|ok| {quote:tabular:|c|X|c|c|} |ok|"
[23:11:32] iWaffles: has joined #ruby
[23:12:01] bootstrappm: has joined #ruby
[23:12:34] kies: has joined #ruby
[23:12:39] Kallis: has joined #ruby
[23:12:43] Axsuul: has joined #ruby
[23:13:43] shevy: replace with what
[23:13:53] Ropeney: has joined #ruby
[23:14:00] shevy: >> "|ok| {quote:tabular:|c|X|c|c|} |ok|".gsub(/\|/,'_')
[23:14:01] ruboto: shevy # => "_ok_ {quote:tabular:_c_X_c_c_} _ok_" (https://eval.in/417914)
[23:14:31] devoldmx: has joined #ruby
[23:15:07] Ox0dea: Well, that didn't work.
[23:15:29] crack_user: I think u dont get de ideia
[23:15:39] choppington: has joined #ruby
[23:15:39] shevy: all pipes are gone
[23:15:58] Ox0dea: crack_user needs to keep a few pipes.
[23:16:00] crack_user: I just want to replace the bars inside the parentesis {quote:tabular:(|c|X|c|c|)}
[23:16:25] bootstrappm: hahaha crack user needs to keep a few pipes
[23:16:37] crack_user: Ox0dea: indeed
[23:17:29] apeiros: >> "|ok| {quote:tabular:|c|X|c|c|} |ok|".gsub(/\{[^}]*}/) { |m| m.tr('|', '_') }
[23:17:30] ruboto: apeiros # => "|ok| {quote:tabular:_c_X_c_c_} |ok|" (https://eval.in/417915)
[23:19:26] Ox0dea: Needs more lookbehind.
[23:19:27] dgutierrez1287: has joined #ruby
[23:19:35] stef204: has joined #ruby
[23:21:51] vidbina: has joined #ruby
[23:22:32] shevy: he hardcoded it!
[23:22:47] hydrozen: has joined #ruby
[23:22:48] Motoservo: has joined #ruby
[23:22:51] shevy: oh no wait I was looking at the left side
[23:24:17] crack_user: I think that's it
[23:25:07] average: has joined #ruby
[23:25:08] average: has left #ruby: ()
[23:25:19] lwu: has joined #ruby
[23:26:28] pipework: shevy: To the left! To the left!
[23:26:51] mrtg9970: has joined #ruby
[23:28:38] linuxboytoo: has joined #ruby
[23:29:59] gilest: has joined #ruby
[23:30:19] lwu: has joined #ruby
[23:32:46] nfk: has joined #ruby
[23:32:52] shevy: one has to look at the regex!
[23:32:54] jtdoncas: has joined #ruby
[23:32:54] binaryplease1: has joined #ruby
[23:34:57] pleiosaur: has joined #ruby
[23:38:34] elfuego: has joined #ruby
[23:40:21] RahulT: has joined #ruby
[23:40:51] ght: How's it going?
[23:41:20] ght: FYI, if any of the guys who were working with me on manual GC utilization last night, I implemented it on an old Ruby 2.0.x app that normally uses quite a bit of RAM.
[23:41:44] ght: It has a throttling engine, I set it so that it runs GC.start on throttle implementation, so it only runs after X number of API calls
[23:41:54] ght: And the RAM usage has shown dramatic improvement.
[23:42:00] ght: So thank you, that was great advice.
[23:42:30] LiquidInsect: has joined #ruby
[23:42:38] IceyEC: has joined #ruby
[23:43:02] shevy: ruby is getting faster and faster
[23:43:53] drbrain: ght: I'm sure this was discussed, but if you can, upgrading to 2.2 should show further improvements due to generational GC
[23:43:55] blackmesa: has joined #ruby
[23:44:25] veduardo: has joined #ruby
[23:45:04] havenwood: RubyConf registrations are up, yay! http://rubyconf.org
[23:45:36] shevy: didn't rubyconf already happen in 2015
[23:45:41] GnuYawk: has joined #ruby
[23:47:58] havenwood: shevy RailsConf did.
[23:48:14] mistermocha: has joined #ruby
[23:49:10] charliesome: has joined #ruby
[23:49:11] shevy: they talked so much about ruby that I didn't even know it was a railsconf!
[23:49:37] charliesome: has joined #ruby
[23:50:00] pipework: God forbid.
[23:52:08] tmtwd: has joined #ruby
[23:52:34] skydiver: has joined #ruby
[23:52:56] umgrosscol: has joined #ruby
[23:53:55] howdoico1: has joined #ruby
[23:54:07] MyMind: has joined #ruby
[23:54:47] jgt1: has joined #ruby
[23:57:12] saddad: has joined #ruby
[23:57:58] gambl0re: has joined #ruby
[23:58:24] j_mcnally: has joined #ruby