« Back to channel list

#ruby - 27 August 2017

« Back 1 day Forward 1 day »
[00:00:36] jaequery: has joined #ruby
[00:00:39] jrabe: has joined #ruby
[00:00:54] code_zombie: has joined #ruby
[00:05:25] carnegie: has joined #ruby
[00:07:44] orbyt_: has joined #ruby
[00:12:45] ShalokShalom: Is there any project known, which can convert Ruby code into Crystal code?
[00:12:51] Bock: has joined #ruby
[00:15:41] balazs: has joined #ruby
[00:15:48] wmoxam: ShalokShalom: no
[00:16:11] ShalokShalom: is it so hard?
[00:16:13] wmoxam: in a lot of cases it's easy to convert
[00:16:28] ShalokShalom: and i some specific..
[00:17:59] wmoxam: cases where I've had difficulty are where hashes are the primary method of passing data around
[00:18:11] boombox_: has joined #ruby
[00:18:16] ShalokShalom: so you tried?
[00:18:22] ShalokShalom: is there a source code?
[00:18:33] ShalokShalom: did you talk to them?
[00:18:40] ShalokShalom: about this case
[00:19:38] wmoxam: ShalokShalom: I have a port of Liquid that mostly works
[00:19:55] wmoxam: https://github.com/wmoxam/liquid-crystal
[00:21:22] _sfiguser: has joined #ruby
[00:22:01] ShalokShalom: how much covers liquid?
[00:22:45] wmoxam: I'm not sure what you mean
[00:23:20] bmurt: has joined #ruby
[00:24:28] ShalokShalom: Probably since i seem to have troubles to understand what liquid is
[00:24:40] ShalokShalom: i thought something like a subset of Ruby
[00:25:29] ShalokShalom: hnn, so your work cant be reused?
[00:25:39] ShalokShalom: in order to provide a transpiler?
[00:26:31] wmoxam: ah, Liquid is a templating language used by many CMS's
[00:26:38] wmoxam: originally writting in Ruby
[00:31:00] michael1: has joined #ruby
[00:39:06] Al3xG0: has joined #ruby
[00:39:07] Al3xG0: has joined #ruby
[00:46:38] AxelAlex: has joined #ruby
[00:58:44] ResidentBiscuit: has joined #ruby
[01:07:02] gizmore|2: has joined #ruby
[01:11:39] d^sh: has joined #ruby
[01:24:40] nofxx: has joined #ruby
[01:25:01] emilford: has joined #ruby
[01:30:58] Xeago: has joined #ruby
[01:36:37] nofxx: has joined #ruby
[01:37:06] michael1: has joined #ruby
[01:41:45] bmurt: has joined #ruby
[01:44:55] kapil___: has joined #ruby
[01:45:13] nofxx: has joined #ruby
[01:45:22] imode: has joined #ruby
[01:54:15] michael1: has joined #ruby
[01:54:40] mong: has joined #ruby
[01:55:45] bronson: has joined #ruby
[01:57:29] bronson: has joined #ruby
[01:58:53] orbyt_: has joined #ruby
[02:01:18] nofxx: has joined #ruby
[02:01:54] harai: has joined #ruby
[02:02:13] __Yiota: has joined #ruby
[02:20:37] nofxx: has joined #ruby
[02:32:49] carnegie: has joined #ruby
[02:39:08] mjolnird: has joined #ruby
[02:45:05] jackjackdripper: has joined #ruby
[02:46:13] jinie: has joined #ruby
[02:48:28] harai: has joined #ruby
[02:50:21] carnegie: has joined #ruby
[03:00:08] cadillac_: has joined #ruby
[03:00:33] jaequery: has joined #ruby
[03:10:38] jaequery: has joined #ruby
[03:33:20] pwnd_nsfw`: has joined #ruby
[03:34:25] gothicsouth: has joined #ruby
[03:38:37] apparition47: has joined #ruby
[03:45:00] xuanrui: has joined #ruby
[03:50:39] psychicist__: has joined #ruby
[03:58:22] bronson: has joined #ruby
[04:01:15] gix: has joined #ruby
[04:10:52] kies: has joined #ruby
[04:17:28] high_fiver: has joined #ruby
[04:18:43] gr33n7007h: has joined #ruby
[04:20:05] ZeroByteZ: has joined #ruby
[04:20:38] shimshamshao_: has joined #ruby
[04:21:53] ZeroByteZ: Any ideas what I should code?
[04:23:17] pancutan: has joined #ruby
[04:28:22] gothicsouth: has joined #ruby
[04:29:47] banisterfiend: has joined #ruby
[04:30:38] bkxd: has joined #ruby
[04:37:34] naprimer2: has joined #ruby
[04:39:19] shimshamshao_: i have a good ruby question! can anoyone helo?
[04:40:40] ZeroByteZ: depends on what it is?
[04:41:15] shimshamshao_: i am wondering how to create an instance where I can gets.chomp to loop to infinity
[04:41:20] shimshamshao_: until a command is run
[04:41:25] shimshamshao_: i will keep the tags in the code
[04:41:58] shimshamshao_: i know it involves if then statements but I am alittle confused from there
[04:42:05] ZeroByteZ: wym until a command is done?
[04:42:43] ZeroByteZ: what do you mean?
[04:43:14] ZeroByteZ: so like another thread finishes working then another thread can continue?
[04:45:55] xuanrui: has joined #ruby
[04:46:15] ZeroByteZ: @shimshamshao_
[04:47:16] waveprop: has joined #ruby
[04:51:59] shimshamshao_: what is a ruby thread?
[04:53:40] nobitanobi: has joined #ruby
[04:53:53] ZeroByteZ: a thread allows you to run 2+ different commands at once
[04:55:58] waveprop: has joined #ruby
[04:55:59] yeticry: has joined #ruby
[05:08:31] thinkpad: has joined #ruby
[05:09:45] nadir: has joined #ruby
[05:09:46] sspreitz: has joined #ruby
[05:13:11] cjohnson: has joined #ruby
[05:15:24] Prutheus: has joined #ruby
[05:15:53] ShalokShalom: ZeroByteZ: Still bored? ;)
[05:17:35] bkxd_: has joined #ruby
[05:17:40] ShekharReddy: has joined #ruby
[05:21:57] shimshamshao_: that is exactly what i am looking for 3+ commands at once
[05:22:34] shimshamshao_: sorry just mildy distracted still here
[05:22:38] bkxd: has joined #ruby
[05:24:44] carnegie: has joined #ruby
[05:26:17] ShalokShalom: ZeroByteZ: I thought on a Crystal <> Ruby transpiler. So the result will be something like: Interpret Crystal and compile Ruby. :)
[05:26:55] shimshamshao_: that's a little beyond my skill set currently but thanks for the help i think i'll just get it done in python
[05:27:16] ShalokShalom: So long as it works for you.
[05:28:33] shimshamshao_: it should thanks for the information
[05:42:58] ZeroByteZ: ShalokShalom: What is that?
[05:46:49] ShalokShalom: you wrote before, that you feel bored and like an idea for a new project
[05:51:50] fredflinstone: crystal becomes less like ruby every week, so you might have your work cut out for you. even a simple subset of ruby being transpiled to crystal would be nice to have
[05:53:03] fredflinstone: i dont think i like crystal a lot as a language. i mean, it's hard to say fairly because i always use ruby as a reference when judging it, but many of the dynamic freedoms ruby has are gone and continue to go
[05:54:38] anisha: has joined #ruby
[05:54:41] ShalokShalom: other languages solve it to create transpilers, who are less similar to this language, just think on Opal and dozens of other JS transpiler, its just a question of the amount of work and yes, probably will it be a challange :)
[05:56:05] ShalokShalom: fredflinstone: and your argument is an argument for this project ;)
[05:56:10] fredflinstone: sure. could be right. typescript comes to mind but that's going the other way (static => dynamic). but yeah sounds like could work
[05:57:01] fredflinstone: sounds tough too
[05:57:25] fredflinstone: probably ruby_parser/ripper would be good start
[05:58:29] ShalokShalom: Nim, Kotlin, Scala.js, Bucklescript and so on are also staticly typed
[05:58:51] ShalokShalom: ah you mean that way around
[05:58:57] ShalokShalom: yes, possible
[05:59:06] ShalokShalom: that this might make issues
[05:59:37] ShalokShalom: Matz spend 500$ on Crystal from what i heard ;)
[06:00:06] bronson: has joined #ruby
[06:00:19] fredflinstone: yea. could be cool. i stopped following it a while ago
[06:01:12] fredflinstone: so i've lost interest.
[06:03:12] waveprop: has joined #ruby
[06:03:16] ShalokShalom: Crystal develops Qt bindings, as an example
[06:03:41] ShalokShalom: https://github.com/Papierkorb/qt5.cr
[06:04:43] yeticry: has joined #ruby
[06:05:00] fredflinstone: yeah. followed for months. i know some of the ecosystem it has.
[06:05:23] bkxd: has joined #ruby
[06:06:33] paradisaeidae: has joined #ruby
[06:06:41] paradisaeidae_: has joined #ruby
[06:07:45] fredflinstone: shards: sinatra clones. re-adaptions of rails/framework solutions, & C bindings is what i remember most. all very cool. the issue i see is that i don't think it will be able to solve the harder problems, like concurrency, and a memory model, exceptionally well or different than other languages.
[06:08:37] fredflinstone: boehm GC as an example.
[06:11:15] synstack: has joined #ruby
[06:11:15] synstack: has joined #ruby
[06:18:57] tvw: has joined #ruby
[06:20:08] mong: has joined #ruby
[06:30:23] wnd: has joined #ruby
[06:31:09] djbkd: has joined #ruby
[06:33:56] rayleigh415: has joined #ruby
[06:38:59] carnegie: has joined #ruby
[06:42:10] _whitelogger: has joined #ruby
[06:51:19] Mia: has joined #ruby
[07:00:07] Cope: has joined #ruby
[07:06:10] _whitelogger: has joined #ruby
[07:11:40] dionysus70: has joined #ruby
[07:16:02] alfiemax: has joined #ruby
[07:32:49] uZiel: how do I do exponentiation of big numbers (like for crypto)
[07:33:34] uZiel: "x.to_bn ** y.to_bn" takes very very long and never finishes
[07:34:27] uZiel: x is 1024 bits and y is 256 bits
[07:47:37] alex``: has joined #ruby
[07:49:37] Guest40: has joined #ruby
[07:49:38] uZiel: ok, got it, "x.to_bn.mod_exp(y, n)CCC
[07:58:26] waveprop: has joined #ruby
[08:00:24] Nicmavr: has joined #ruby
[08:01:24] _main_: has joined #ruby
[08:01:40] bronson: has joined #ruby
[08:02:24] _main_: has joined #ruby
[08:03:31] bronson: has joined #ruby
[08:05:16] romain_t: has joined #ruby
[08:10:29] Guest53741: has joined #ruby
[08:14:10] marr: has joined #ruby
[08:14:44] nofxxx: has joined #ruby
[08:15:08] lxsameer: has joined #ruby
[08:28:55] weez17_: has joined #ruby
[08:39:38] Jakaria: has joined #ruby
[08:40:23] Jakaria: hi, I need a contributor for my gem... anyone is welcome...
[08:40:56] carnegie: has joined #ruby
[08:43:41] carnegie: has joined #ruby
[08:44:56] Jakaria: anyone interested?
[08:46:11] ShalokShalom: show us your project?
[08:51:00] Jakaria: https://github.com/JakariaBlaine/str_sanitizer
[08:51:23] Jakaria: it's a very small project.... I just started it some weeks ago...
[08:58:55] apparition47: has joined #ruby
[09:03:25] kapil___: has joined #ruby
[09:06:31] cabotto: has joined #ruby
[09:11:20] Stickwalker: has joined #ruby
[09:13:56] pugcs: has joined #ruby
[09:17:54] charliesome: has joined #ruby
[09:24:13] pandaant: has joined #ruby
[09:35:44] kreantos: has joined #ruby
[09:38:51] MarkBilk_: has joined #ruby
[09:42:28] cabotto: has joined #ruby
[09:44:11] waveprop: has joined #ruby
[09:46:53] kreantos: has joined #ruby
[09:52:35] cabotto: has joined #ruby
[09:52:56] guille-moe: has joined #ruby
[09:55:00] Jakaria: has joined #ruby
[09:55:17] roshanavand: has joined #ruby
[09:55:32] bruno-: has joined #ruby
[09:56:00] sepp2k: has joined #ruby
[10:04:01] bronson: has joined #ruby
[10:11:54] noe: has joined #ruby
[10:18:11] _whitelogger: has joined #ruby
[10:27:36] cadillac_: has joined #ruby
[10:29:10] dviola: has joined #ruby
[10:34:01] p0s1x: has joined #ruby
[10:39:02] p0s1x: has joined #ruby
[10:39:52] ShalokShalom: has joined #ruby
[10:44:17] cabotto: has joined #ruby
[10:44:21] noe: has joined #ruby
[10:48:45] wnd: has joined #ruby
[10:48:48] jinie: has joined #ruby
[10:53:08] frozengeek: has joined #ruby
[10:59:33] apparition47: has joined #ruby
[11:03:50] shimshamshao_: has joined #ruby
[11:05:34] roshanavand: has joined #ruby
[11:13:08] pugcs: has joined #ruby
[11:14:07] aria1: has joined #ruby
[11:14:38] __Yiota: has joined #ruby
[11:17:32] Cope: has joined #ruby
[11:25:04] mikecmpbll: has joined #ruby
[11:32:43] Prutheus: trying to install talib_ruby on windows ... installed ruby version tested: 2.3.3 and 2.4.1 .... both same error: https://bpaste.net/show/fcdb30488749 ... I have no idea where the problem is ... I've downloaded ta-lib, extracted it to C:/ and yeah, .... that's it. In my bpaste-post is also the command with which I want to install via gem the talib_ruby package
[11:32:48] Prutheus: any idea what I could do to get it working?
[11:33:12] rapha: has joined #ruby
[11:42:33] michael1: has joined #ruby
[11:50:20] Mon_Ouie: has joined #ruby
[12:00:37] pugcs: has joined #ruby
[12:04:52] shimshamshao_: has joined #ruby
[12:05:57] bronson: has joined #ruby
[12:15:08] p0s1x: has joined #ruby
[12:16:25] darix: Prutheus: 1. are you sure you have the right ta-lib version installed? 2. is the lib installed into the search path of your build?
[12:16:28] darix: checking for TA_Initialize() in -lta_lib... no
[12:17:14] mikecmpbll: has joined #ruby
[12:17:51] darix: doesnt sound promising tbh
[12:20:27] Asher: has joined #ruby
[12:22:57] cjohnson: has joined #ruby
[12:24:18] InfinityFye: has joined #ruby
[12:29:30] Prutheus: darix: so what I should I do now? I mean yeah, I have ta-lib and it was generating at C:/ta-lib/c/ the folder include and lib ...
[12:32:34] apparition47: has joined #ruby
[12:40:00] GodFather: has joined #ruby
[12:47:00] nadir: has joined #ruby
[12:47:17] Prutheus: darix: what do you mean is not correct?
[12:48:32] _sfiguser: has joined #ruby
[12:49:58] darix: Prutheus: that extconf.rb check should probably not report "no" for this check
[12:50:18] mikeiniowa: has joined #ruby
[12:50:35] Prutheus: yes ok but I do not understand what that means to me
[12:51:10] Prutheus: could you guide me how to install ruby, ta-lib on a fresh szstem so it will work?
[12:52:26] darix: Prutheus: sorry. i dont really know much for ruby on windows.
[12:53:15] FastJack: has joined #ruby
[12:54:54] Prutheus: yeah me too
[12:54:59] Prutheus: this is really stupid ...
[12:55:07] Prutheus: I don't know what I should do now
[12:55:53] guille-moe: has joined #ruby
[12:57:00] Hanmac: has left #ruby: ()
[12:58:12] carnegie: has joined #ruby
[12:59:55] darix: Prutheus: install linux :p
[13:02:20] Prutheus: i have linux
[13:02:24] Prutheus: and i always work on linux
[13:02:37] Prutheus: but i need to deliver my ruby program as exe for a windows client
[13:02:54] Prutheus: so i wanted to use ocra, but i can only compile the exe on windows or not?
[13:02:55] charliesome: has joined #ruby
[13:04:35] guille-moe: has joined #ruby
[13:05:41] shimshamshao_: has joined #ruby
[13:10:53] fowl: has joined #ruby
[13:10:53] ChanServ: ChanServ kicked fowl: Obsessive troll, see http://logs.ryanbigg.com/p/fowl
[13:12:54] chmurifree: has joined #ruby
[13:16:19] pika_pika: has joined #ruby
[13:17:59] yaroslav: has joined #ruby
[13:24:24] knight33: has joined #ruby
[13:25:13] minimalism: has joined #ruby
[13:26:36] Al3xG0: has joined #ruby
[13:26:37] Al3xG0: has joined #ruby
[13:30:43] mikecmpbll: has joined #ruby
[13:33:59] eroux: has joined #ruby
[13:35:07] xlegoman: has joined #ruby
[13:36:21] __Yiota: has joined #ruby
[13:38:37] dachi: has joined #ruby
[13:40:06] dachi: hi. i have an instance method in model that accepts request as arguments. do you know how can I get request object in model spec?
[13:47:38] dachi: nm. i created a fake request object
[13:49:10] maryo: has joined #ruby
[13:57:35] oleo: has joined #ruby
[14:08:01] bronson: has joined #ruby
[14:21:34] houhoulis: has joined #ruby
[14:24:20] michael2: has joined #ruby
[14:24:42] hnanon: has joined #ruby
[14:26:41] hnanon_: has joined #ruby
[14:26:53] ski7777: has joined #ruby
[14:27:13] hnanon_: I have a series of variables like: a = 26, b = 25, c = 24, etc. (the values are actually different).
[14:27:37] hnanon_: I want to loop through a array of letters and replace each element with the corresponding variable value.
[14:27:52] hnanon_: So, I suppose I could do something like:
[14:28:29] Papierkorb: hnanon_: You should use a Hash instead to store these values. What's your use-case?
[14:30:05] hnanon_: Papierkorb: I'm receiving a list of amino acids, those amino acids have a certain numeric property, I want to ultimately do math on each numeric value of the aa.
[14:30:38] hnanon_: I was going to use .map and a bunch if if/else.
[14:31:14] Papierkorb: hnanon_: The cleanest way will be quickly build the array yourself by simply doing `[ a, b, c ]` in your method
[14:34:08] hnanon_: Papierkorb: I'm not following. I have an array sequence = ["a", "b", "c"]. I initially planned on doing sequence.map { |aa| if aa == "a" aa = 1, if aa == "b", aa = 2}
[14:34:15] hnanon_: Something like that.
[14:34:57] __Yiota: has joined #ruby
[14:35:00] hnanon_: But I also have a list of variables: a = 1, b = 2, etc.
[14:35:21] hnanon_: So I thought there might be a simpler way using the predefined variables.
[14:36:30] Papierkorb: As this is Ruby, there is a way, but it's hacky of course. You can access local variables through the `binding` method.
[14:36:35] psmolen: has joined #ruby
[14:38:11] hnanon_: Papierkorb: Would a bunch of if/else (22 or so of them) be the more simpler or "ruby" way?
[14:38:45] hnanon_: What if the I had an array of hashes?
[14:38:54] Papierkorb: Neither of them is certainly nice.
[14:39:12] Papierkorb: Then that'd be much simpler and portable (as in, doesn't break by tomorrows ruby)
[14:39:17] hnanon_: [{"a": 1}, {"b":2}]
[14:39:46] hnanon_: How could I use that to replace the values in the sequence (or create a new sequence, actually).
[14:39:55] Papierkorb: If you only have a single member per hash, then just use a hash for all, or an array of array-tuples
[14:40:05] Papierkorb: Enumerable#map and such
[14:41:56] hnanon_: Papierkorb: This looks like it solves it: https://stackoverflow.com/questions/42593939/ruby-on-rails-replace-values-in-array-with-hash-values-from-database-model
[14:44:05] RedNifre: How do I find the last element in an array that satisfied a given predicate?
[14:44:24] RedNifre: (I want to find the last Time in an ordered array that is before Time.now)
[14:44:55] gixxer1k: has joined #ruby
[14:48:41] brian_penguin: has joined #ruby
[14:48:41] sepp2k: has joined #ruby
[14:48:57] RedNifre: weird, find works but I couldn't find it in the docs
[14:52:31] Guest40: has joined #ruby
[14:53:34] oleo: has joined #ruby
[14:55:17] dionysus69: has joined #ruby
[14:58:31] KeyJoo: has joined #ruby
[15:00:31] RedNifre: I'm not sure about the scoping, if I define a variable in a block and then define a method in that block, why can't the method see the variable?
[15:01:52] Papierkorb: RedNifre: Please gist that code so we can help you better
[15:02:04] Guest40: has joined #ruby
[15:04:27] Mon_Ouie: def foo; …; end does not close over the scope where it is defined, but define_method(:foo) do … end does
[15:04:48] ShalokShalom: has joined #ruby
[15:04:51] moei: has joined #ruby
[15:10:21] clemens3: has joined #ruby
[15:12:38] hnanon_: Papierkorb: I now have this: https://gist.github.com/anonymous/0c3814d360852d8a027ff4b4298a6c9d
[15:12:59] hnanon_: But .map is returning nil for each element in the array.
[15:13:16] hnanon_: In other words, the hash lookup is not working.
[15:13:23] t-recx: has joined #ruby
[15:14:15] Papierkorb: hnanon_: I'm not sure what that code intended to do. What output did you expect?
[15:15:17] hnanon_: Papierkorb: [1, 2, 3]
[15:15:58] hnanon_: Line 5 should be values[:aa]
[15:17:08] Guest40: has joined #ruby
[15:17:12] Papierkorb: 1) your hash uses symbol keys, but your array uses strings (They're not the same). I'd prefer symbols for this. 2) The block argument from map is the current item you're supposed to operate on. `:aa` is a symbol, `aa` is a variable. You can't interchange them
[15:18:50] lizard2010: has joined #ruby
[15:20:43] ShekharReddy: has joined #ruby
[15:20:47] dn`: has joined #ruby
[15:21:05] hnanon_: Papierkorb: Thank you.
[15:21:10] hnanon_: It's working now.
[15:22:46] carnegie: has joined #ruby
[15:27:26] elcontrastador: has joined #ruby
[15:30:15] ych: has joined #ruby
[15:30:29] xcesariox: has joined #ruby
[15:38:03] brian_penguin: has joined #ruby
[15:43:55] RedNifre: has joined #ruby
[15:43:58] rwb: has joined #ruby
[15:45:13] dviola: has joined #ruby
[15:46:18] InfinityFye: has joined #ruby
[15:54:34] PaulCapestany: has joined #ruby
[16:00:38] brian_penguin: has joined #ruby
[16:01:41] kapil___: has joined #ruby
[16:01:59] otherj: has joined #ruby
[16:04:10] jackjackdripper: has joined #ruby
[16:06:36] orbyt_: has joined #ruby
[16:07:03] rippa: has joined #ruby
[16:08:40] Mon_Ouie: has joined #ruby
[16:10:36] bronson: has joined #ruby
[16:11:43] ixti: has joined #ruby
[16:12:20] txr: has joined #ruby
[16:13:46] txr: has left #ruby: ()
[16:14:45] pancutan: has joined #ruby
[16:20:06] jaequery: has joined #ruby
[16:27:50] _sfiguser: has joined #ruby
[16:32:34] knight33: has joined #ruby
[16:33:49] __Yiota: has joined #ruby
[16:47:59] xlegoman: has joined #ruby
[16:49:42] raynold: has joined #ruby
[16:50:26] jaequery: has joined #ruby
[16:53:32] DrCode: has joined #ruby
[16:54:37] sagax: has joined #ruby
[16:57:37] tomphp: has joined #ruby
[16:57:55] carnegie: has joined #ruby
[17:01:42] nobitanobi: has joined #ruby
[17:12:47] nowhere_man: has joined #ruby
[17:17:11] neo95: has joined #ruby
[17:25:03] dtzuzu: has joined #ruby
[17:25:50] DrCode: has joined #ruby
[17:31:18] jaequery: has joined #ruby
[17:34:46] Guest46284: has joined #ruby
[17:36:14] RedNifre: Alright, let's gem!
[17:36:43] RedNifre: ACTION begins writing his first gem.
[17:49:25] harfangk: has joined #ruby
[17:51:08] haylon: has joined #ruby
[17:56:26] chmurifree: has joined #ruby
[17:57:06] mikecmpbll: has joined #ruby
[17:58:16] lexruee: has joined #ruby
[18:01:23] imode: has joined #ruby
[18:11:29] conta: has joined #ruby
[18:12:25] bronson: has joined #ruby
[18:16:54] mtkd: has joined #ruby
[18:17:10] high_fiver: has joined #ruby
[18:20:05] wogi: has joined #ruby
[18:26:45] ledestin: has joined #ruby
[18:26:46] alex``: has joined #ruby
[18:27:09] alfiemax: has joined #ruby
[18:30:27] futilegames: has joined #ruby
[18:37:37] enterprisey: has joined #ruby
[18:39:39] brian_penguin: has joined #ruby
[18:45:10] ascarter: has joined #ruby
[18:46:01] Vile`: has joined #ruby
[18:47:57] ascarter_: has joined #ruby
[18:51:19] Rodya_: has joined #ruby
[18:52:01] futilegames: has joined #ruby
[18:54:14] ascarter: has joined #ruby
[18:57:13] SeepingN: has joined #ruby
[19:20:13] Danishman: has joined #ruby
[19:22:00] armyriad: has joined #ruby
[19:23:23] m27frogy: has joined #ruby
[19:24:54] Northop: has joined #ruby
[19:30:08] houhoulis: has joined #ruby
[19:37:03] Rodya_: has joined #ruby
[19:41:41] balazs: has joined #ruby
[19:42:22] MrBusiness: has joined #ruby
[19:42:40] cdg: has joined #ruby
[19:46:30] carnegie: has joined #ruby
[19:47:46] emilford: has joined #ruby
[19:48:32] KeyJoo: has joined #ruby
[19:48:39] pancutan: has joined #ruby
[19:56:48] pika_pika: has joined #ruby
[20:00:04] gusrub: has joined #ruby
[20:00:38] RedNifre: has joined #ruby
[20:03:06] Immune: has joined #ruby
[20:09:08] claudiuinberlin: has joined #ruby
[20:09:30] Rodya_: has joined #ruby
[20:12:43] ixti: has joined #ruby
[20:14:22] bronson: has joined #ruby
[20:15:50] bronson: has joined #ruby
[20:16:09] Lyubo1: has joined #ruby
[20:16:15] neo95: has joined #ruby
[20:16:44] DanKnox: has joined #ruby
[20:18:07] claudiuinberlin: has joined #ruby
[20:24:18] Immune: has joined #ruby
[20:25:50] dionysus69: has joined #ruby
[20:30:07] ncthom91: has joined #ruby
[20:31:54] Guest94730: Should gems be named like-this or like_this ?
[20:32:21] konsolebox: i'll prefer like-this
[20:32:32] elomatreb: Both have a special meaning
[20:32:38] t-recx: has joined #ruby
[20:32:46] elomatreb: See http://guides.rubygems.org/name-your-gem/
[20:33:06] Guest94730: Ah, guess I'll read the guide then.
[20:34:11] elomatreb: Those aren't formal rules, but good convetions
[20:36:05] imode: gotta say, I've just very recently had the pleasure of using Ruby for a project, and I am absolutely disappointed I didn't try the language earlier.
[20:36:50] cdg: has joined #ruby
[20:37:41] KeyJoo: has joined #ruby
[20:39:06] cdg: has joined #ruby
[20:46:30] KeyJoo: has joined #ruby
[20:48:21] t-recx: has joined #ruby
[20:51:11] clemens3: has joined #ruby
[20:53:50] KeyJoo: has joined #ruby
[20:57:26] RedNifre: I guess I can call README README.md instead, huh? Is markdown okay in gem Readmes?
[20:57:51] claudiuinberlin: has joined #ruby
[20:58:18] havenwood: RedNifre: Yeah, no problem with Markdown in a Gem readme. Some use Rdoc but Markdown looks nice on Github. Your call.
[20:58:24] elomatreb: The README is technically just another file, rubygems.org and Github both render markdown though
[20:58:36] elomatreb: I.e. it has no special significance to gem itself
[20:58:47] havenwood: imode: nice
[20:59:14] RedNifre: "Many people use Bundler" should I use bundler?
[21:00:09] elomatreb: Probably, as gem itself does nothing to ensure you get the correct versions of gems in a project
[21:00:47] elomatreb: The Gemfile originally was a bundler thing
[21:01:42] RedNifre: What's the best way to learn how to release a gem? The official rubygems.org docs? The bundler docs? Something else?
[21:03:07] elomatreb: The rubygems.org guides effectively go over everything important, it's not a terribly complicated process. You just push them to rubygems.org and then everyone can install them
[21:05:35] bruno-: has joined #ruby
[21:16:34] Asher: has joined #ruby
[21:16:37] roshanavand: has joined #ruby
[21:16:45] Asher: has joined #ruby
[21:24:44] ur5us: has joined #ruby
[21:27:40] kotedo100: has joined #ruby
[21:27:44] jwr: has joined #ruby
[21:28:36] RedNifre: has joined #ruby
[21:29:33] jwr: I'm trying to get the last two digits of an integer, 73766409. but `73766409 % 100` is only returning '9'. how am i doing this wrong?
[21:30:45] kotedo100: I have a gem that has some loose code in files; meaning just a def method ... end thing without a module or class around it ... How can I tame this and put this into meaningful context without breaking existing code when I put a module and/or class around it? I tried something to the effect of alias_method ... but I got nowhere with that approach. Thoughts anyone?
[21:31:29] elomatreb: jwr: If you're on Ruby 2.4 there's Integer#digits
[21:31:30] knight33: has joined #ruby
[21:31:43] jwr: 2.3, sadly.
[21:32:33] elomatreb: To answer your question: You're not doing anything wrong, it's just that 09 == 9 (and also == 009, etc)
[21:32:58] elomatreb: If you want "09", you could .to_s the number and use a substring operation
[21:33:07] ruby[bot]: dminuoso: # => /tmp/execpad-3b3835297576/source-3b3835297576:2: Invalid octal digit ...check link for more (https://eval.in/850884)
[21:33:12] dminuoso: Liar liar pants on fire!
[21:33:27] elomatreb: #RemoveOctalLiterals2017
[21:34:22] runescape07rsps: has joined #ruby
[21:35:01] Rodya_: has joined #ruby
[21:35:04] kotedo100: @jwr 123456789.to_s.slice(-2, 2)
[21:35:58] jwr: kotedo100: works great. thanks.
[21:35:59] havenwood: another option:
[21:35:59] havenwood: n = 73766409; ones = n.modulo(10); tens = (n - ones).modulo(100) / 10; [tens, ones]
[21:36:28] kotedo100: jwr: You're welcome
[21:36:29] jwr: i'm glad i just happened to use '09' as my test case, otherwise this would've bitten me in some weird way.
[21:37:37] apeiros: ACTION hands havenwood a divmod
[21:37:45] havenwood: ACTION forgets things
[21:39:16] havenwood: >> remainder, ones = 73766419.divmod(10); tens = remainder.modulo(10); [tens, ones]
[21:39:18] ruby[bot]: havenwood: # => [1, 9] (https://eval.in/850889)
[21:39:25] havenwood: apeiros: yerp, nicer
[21:40:39] havenwood: also nicer to make recursive if you want each digit
[21:44:00] dminuoso: havenwood, boy that reminds me about quot, rem, div, mod in haskell. Still cant keep them apart. :|
[21:44:07] cschneid_: has joined #ruby
[21:46:01] enterprisey: has joined #ruby
[21:47:50] kreantos: has joined #ruby
[21:53:26] knight33: has joined #ruby
[21:54:37] gothicsouth: has joined #ruby
[21:55:37] jinie: has joined #ruby
[21:55:41] nopolitica: has joined #ruby
[22:00:40] kotedo100: Anyone any thoughts on these gem issues above?
[22:01:48] cschneid_: has joined #ruby
[22:16:18] bronson: has joined #ruby
[22:29:22] cadillac_: has joined #ruby
[22:34:22] fredflinstone: the best way to release a gem? pushing to the mothership known as rubygems.org. Bundler allows for distribution via git, so can be de-centralised, esp if you don't jive with rubygems policies (once you push your code there, you can never delete it - f ex)
[22:36:14] fredflinstone: woops sorry wrong -_- sorry. your question has a few answers to maintain backwards compat, but adding top-level methods in a rubygem is usually dis-tasteful
[22:36:46] fredflinstone: so maybe better to not maintain backwards compat at all
[22:38:38] fredflinstone: there's `include` and `extend` for applying instance methods of a module, so you can write: include FooBar, to get the old top-level behaviour back.
[22:47:13] s3nd1v0g1us: has joined #ruby
[22:47:14] Papierko-: has joined #ruby
[22:53:05] nofxx: has joined #ruby
[22:54:03] s3nd1v0g1us: has joined #ruby
[22:57:12] Cope: has joined #ruby
[23:01:44] bkxd: has joined #ruby
[23:02:07] sepp2k: has joined #ruby
[23:03:28] jackjackdripper: has joined #ruby
[23:04:12] kn-928: has joined #ruby
[23:04:19] GodFather: has joined #ruby
[23:12:22] kotedo100: has joined #ruby
[23:12:59] Mon_Ouie: has joined #ruby
[23:18:31] kapil___: has joined #ruby
[23:19:23] ascarter: has joined #ruby
[23:20:26] joelroa: has joined #ruby
[23:20:50] ascarter: has joined #ruby
[23:24:03] nobitanobi: has joined #ruby
[23:24:11] cschneid_: has joined #ruby
[23:25:31] __Yiota: has joined #ruby
[23:26:49] nexi: has joined #ruby
[23:29:44] cdg: has joined #ruby
[23:29:56] nexi: has left #ruby: ("ERC (IRC client for Emacs 25.2.1)")
[23:33:50] cdg: has joined #ruby
[23:37:38] mostlybadfly: has joined #ruby
[23:38:16] Immune_: has joined #ruby
[23:40:44] jackjackdripper: has joined #ruby
[23:43:08] enterprisey: has joined #ruby
[23:44:48] gusrub: has joined #ruby
[23:51:42] gusrub: has joined #ruby
[23:52:53] haylon: has joined #ruby
[23:56:30] alveric2: has joined #ruby