« Back to channel list

#ruby - 06 October 2017

« Back 1 day Forward 1 day »
[00:02:39] cdg: has joined #ruby
[00:11:25] amirite: has joined #ruby
[00:15:01] bruno-: has joined #ruby
[00:17:27] bmurt: has joined #ruby
[00:19:46] cagomez: has joined #ruby
[00:20:00] ramfjord: has joined #ruby
[00:20:28] cagomez: has joined #ruby
[00:22:56] fmcgeough: has joined #ruby
[00:24:15] bronson: has joined #ruby
[00:25:33] orbyt_: has joined #ruby
[00:25:52] ramfjord: has joined #ruby
[00:26:03] Jameser: has joined #ruby
[00:30:42] amirite: has joined #ruby
[00:30:50] ramfjord: has joined #ruby
[00:35:58] PettanShoutaKun: has joined #ruby
[00:38:09] PettanShoutaKun: I have an array object thing.... I'm trying to iterate over it and set a variable for the number the object is in the array on the thing... I'm currently trying to do this https://gist.github.com/BustyLoli-Chan/04a38119c88df09f067d0899871bfd5a but I notice if I do a puts in the middle there it runs through each of my entries like 5 total times... as in 5 * 5 entries for 25 entries in total. Am I doing something dumb?
[00:38:23] gusrub: has joined #ruby
[00:41:17] nopolitica: has joined #ruby
[00:42:22] matthewd: PettanShoutaKun: In general, avoid `for`.. but that sounds fine at a glance
[00:44:50] PettanShoutaKun: what's the best way to loop where I can still get an index number?
[00:45:01] PettanShoutaKun: I am like super new to ruby
[00:45:15] matthewd: each_with_index
[00:45:47] cdg: has joined #ruby
[00:46:01] Jameser: has joined #ruby
[00:47:13] elomatreb: @steps.each.with_index(1) {|step, index| step.order_number = index } would be idiomatic Ruby
[00:47:24] imode: has joined #ruby
[00:47:38] fmcgeough: has joined #ruby
[00:50:13] herbmillerjr: has joined #ruby
[00:52:04] PettanShoutaKun: I thought my array had 5 things in it... but looping through it with a each_with_index I end up getting https://gist.github.com/BustyLoli-Chan/335749fafbcfb2a1b399102a504e6b1f
[00:52:27] amirite: has joined #ruby
[00:52:29] PettanShoutaKun: so does this mean I've somehow accidentally created a multi-dimensional array?
[00:52:43] jenrzzz: has joined #ruby
[00:52:43] jenrzzz: has joined #ruby
[00:52:50] matthewd: PettanShoutaKun: I think it means your debug code isn't doing what you think it is, or the whole loop is being invoked multiple times
[00:52:55] dviola: has joined #ruby
[00:53:20] matthewd: Note it keeps counting 0 to 4, not going higher
[00:53:28] matthewd: Show more code?
[00:53:31] PettanShoutaKun: the thing that throws me off is the different hex locations at the end... doesn't that mean all of those things are stored in different memory locations?
[00:54:18] matthewd: Oh, didn't notice that. Then yeah, this will be a loop somewhere much further up in your program: they're each looping over different arrays, of different elements.
[00:55:55] nicolai86: has joined #ruby
[00:56:11] PettanShoutaKun: give me a second and I'll post this code... I'm very unfamiliar with it. I'm essentially working with what I've been handed, but I do believe there is an error here
[00:56:54] milardovich: has joined #ruby
[00:58:50] coderphive: has joined #ruby
[01:02:24] PettanShoutaKun: https://gist.github.com/BustyLoli-Chan/47074b0cd1668632c9b64149d367e868 so this is working with selenium to try to get html elements of varyingly similar structure and parse them into fruit types we have test methods for
[01:02:26] Cohedrin_: has joined #ruby
[01:02:46] enterprisey: has joined #ruby
[01:03:20] PettanShoutaKun: at first I thought the recursive function thing was my problem, but I noticed that even if I changed reattempt to 3 or something it would still create a 5,5 multi-dimensional array
[01:04:55] elomatreb: Well, for starters, you apparently do the same thing twice in lines 35-39, are you sure you didn't forget to remove old code?
[01:05:18] elomatreb: Oh, you don't assign, nevermind.
[01:05:20] webnanners: has joined #ruby
[01:05:39] PettanShoutaKun: yeah, most of that is code I've recently added anyway
[01:05:50] rakm: has joined #ruby
[01:06:09] PettanShoutaKun: the assignment was the only thing I was really trying to achieve. The thing above is just me printing out the array to see if I'm insane or if this has indeed become multi dimensional
[01:07:05] elomatreb: For debugging the Kernel#p method is probably more useful than building a loop like that
[01:07:28] PettanShoutaKun: I didn't think about that to be honest.
[01:07:59] matthewd: I think you'll find configure_fruits, and thus get_fruits, is getting called a bunch (🤓) of times
[01:10:16] PettanShoutaKun: do you see where? Or does that mean you don't really see an issue with anything in the code so it must be elsewhere?
[01:10:40] matthewd: get_fruits isn't called at all here
[01:11:03] PettanShoutaKun: yeah it's called from elsewhere outside of this class
[01:11:47] matthewd: The code is overall deeply unidiomatic, so I'm not sure I'd go so far as "no issues", but I see nothing here that will loop
[01:12:05] matthewd: Add a puts at the top of get_fruits, and see how many times it gets called
[01:12:26] PettanShoutaKun: seems you are correct.... I did just that and It printed 9 times
[01:12:26] matthewd: Then find the [elsewhere] method that calls it, add one there, repeat
[01:14:06] webnanners: has joined #ruby
[01:15:53] Jameser: has joined #ruby
[01:17:19] cdg: has joined #ruby
[01:20:36] apparition: has joined #ruby
[01:21:06] webnanners: has joined #ruby
[01:21:32] juggler: has joined #ruby
[01:22:59] ozcanesen: has joined #ruby
[01:23:11] Jameser`: has joined #ruby
[01:24:03] greenbagels: has joined #ruby
[01:25:07] Fraeon: has joined #ruby
[01:25:15] flips: has joined #ruby
[01:25:16] nankyoku_: has joined #ruby
[01:25:19] wnd: has joined #ruby
[01:25:44] shaman42: has joined #ruby
[01:26:58] yxhuvud: has joined #ruby
[01:27:29] Trynemjoel: has joined #ruby
[01:27:43] byte512: has joined #ruby
[01:28:20] Didac: has joined #ruby
[01:30:40] wald0: has joined #ruby
[01:30:48] PettanShoutaKun: how do I tell an array to drop all it's contents?
[01:30:53] webnanners: has joined #ruby
[01:32:03] PettanShoutaKun: actually even if this thing loops 9 times in the get_fruits class it does @fruits = [] ...does that not purge the old array and make a new one?
[01:34:37] matthewd: Yes it does, which is why you only ever have the 5 elements
[01:34:46] PettanShoutaKun: it's just recreated 5 times
[01:34:59] PettanShoutaKun: it's not multidimensional at all
[01:35:42] PettanShoutaKun: which means something else in my for loop is jacked up because it's only ever sets fruit_number to 1
[01:35:44] PettanShoutaKun: for some reason
[01:36:27] matthewd: Change your loop to set every element to 9 (say)
[01:36:57] matthewd: i.e., is the 1 actually coming from there, or somewhere else?
[01:37:23] PettanShoutaKun: good questions! I will try it next
[01:37:53] matthewd: I'd be tracking down what's calling the whole thing more often than you expect, first, though.. just because otherwise that could be the cause of all sorts of surprises
[01:38:32] matthewd: Not least, the fact it is, as you noted, recreating and repopulating the array each time -- so any other manipulation of those elements will be lost
[01:38:32] PettanShoutaKun: that's other legacy code framework. I asked the department about to whom it may be an issue. It's certainly bizarre, but it's probably only something they would have the answer to
[01:42:16] mim1k: has joined #ruby
[01:43:00] d^sh_: has joined #ruby
[01:43:06] PettanShoutaKun: I changed my approach to "@fruits.each.with_index { |val, index| val.fruit_number = index }" and they ended up as 0 index+1 and they ended up as 1 set it to 9 and it is indeed 9....
[01:43:13] PettanShoutaKun: so why do they end up as the same number
[01:44:10] PettanShoutaKun: am I using index+1 incorrectly? or something?
[01:46:07] webnanners: has joined #ruby
[01:53:02] PettanShoutaKun: so a guy told me to add "attr_accessor :fruit_number" to my FruitElement class, which is what I thought I've been setting this whole time. I have a line in initialize that says @fruit_number = fruit_number but going through and doing puts on fruit_number @fruit_number and @fruit_number even after @fruit_number = fruit_number seems to show that fruit_number is always nil? It just doesn't print anything.
[01:53:32] webnanners: has joined #ruby
[01:53:56] PettanShoutaKun: but if I reference it elsewhere in code like in other methods as "#{@fruit_number}" works.
[01:54:22] alfiemax: has joined #ruby
[01:54:23] PettanShoutaKun: I say works... but it's still only ever one value?
[01:54:42] adam12: PettanShoutaKun: Can you show some code?
[01:54:51] adam12: Make a gist of your class and what you're working on.
[01:55:12] PettanShoutaKun: yeah, give me a little bit
[01:55:15] matthewd: ^ there's really a limit to how much we can debug by guessing
[01:55:46] gizmore|2: has joined #ruby
[01:57:19] PettanShoutaKun: I understand... this is also just a huge object oriented framework and I have to obfuscate everything, because I'm my employer would not like my handing out the source code. Even if the people on IRC are more competent than some if not most of my fellow employees e.e
[01:58:19] matthewd: I'd also note that unless the fruits are missile silos, it seems unlikely that the actual nouns from your business domain are likely to be secret-worthy.. but as long as you ensure your anonymization definitely isn't introducing/fixing any issues, it's obviously your call ¯\_(ツ)_/¯
[01:58:40] adam12: matthewd: plot twist, the software is for grocery store inventory management :P
[01:58:49] nankyokusei: has joined #ruby
[02:00:34] adam12: PettanShoutaKun: https://gist.github.com/adam12/d657913c26bf2a16b22d0941898dcea9
[02:01:21] webnanners: has joined #ruby
[02:03:29] PettanShoutaKun: so I think the thing I'm confused about is... how do I get that fruit_number and use it from inside the fruit class? I thought I would get it with like puts "#{@fruit_number}" but is that not correct?
[02:03:41] adam12: just call `fruit_number`
[02:03:48] adam12: Although `@fruit_number` should exist.
[02:04:10] PettanShoutaKun: so what is the difference between the two of those?
[02:04:47] zzak: has joined #ruby
[02:05:06] adam12: PettanShoutaKun: One's an instance variable, one's a method call defined by attr_accessor that gets the instance variable
[02:05:18] chamunks: has joined #ruby
[02:06:01] mistym: has joined #ruby
[02:06:01] mistym: has joined #ruby
[02:06:07] greenbagels: has joined #ruby
[02:06:18] PettanShoutaKun: so if I have a class that inherits Fruit will it also be able to access #{fruit_number} ?
[02:06:55] PettanShoutaKun: that took like 3 hours to figure that out. Thank you, you are a gentle(wo)man and a scholar!
[02:07:10] ircmaxell: has joined #ruby
[02:07:10] olivierjanss: has joined #ruby
[02:07:18] olblak: has joined #ruby
[02:07:29] afisher: has joined #ruby
[02:07:42] camilasan: has joined #ruby
[02:07:42] jphase: has joined #ruby
[02:07:54] lupine: has joined #ruby
[02:08:15] DEac-: has joined #ruby
[02:08:37] webnanners: has joined #ruby
[02:08:55] gf3: has joined #ruby
[02:08:58] lipoqil: has joined #ruby
[02:09:02] tsglove2: has joined #ruby
[02:09:03] peteretep_: has joined #ruby
[02:09:13] pmarreck_: has joined #ruby
[02:09:13] Guest42469_: has joined #ruby
[02:09:38] graingert_: has joined #ruby
[02:09:49] [diecast]_: has joined #ruby
[02:09:49] mattwc_: has joined #ruby
[02:09:49] wsmoak_: has joined #ruby
[02:09:54] doesntbyte_: has joined #ruby
[02:09:59] foamz__: has joined #ruby
[02:10:11] Tony-St4rk_: has joined #ruby
[02:10:22] contradictioned_: has joined #ruby
[02:10:24] cttttt_: has joined #ruby
[02:10:28] jinie: has joined #ruby
[02:10:32] bokayio: has joined #ruby
[02:10:40] elliottcable: has joined #ruby
[02:10:45] Nahra`: has joined #ruby
[02:10:46] heftig_: has joined #ruby
[02:10:54] dinfuehr: has joined #ruby
[02:10:55] kspencer-: has joined #ruby
[02:10:59] Caius: has joined #ruby
[02:10:59] Caius: has joined #ruby
[02:11:02] arvindsaik: has joined #ruby
[02:11:20] Kilo`byte: has joined #ruby
[02:11:20] davic: has joined #ruby
[02:11:21] baweaver: has joined #ruby
[02:11:24] Tatey: has joined #ruby
[02:11:34] Bilge: has joined #ruby
[02:11:52] synstack: has joined #ruby
[02:11:57] CustosLimen: has joined #ruby
[02:12:02] twe4ked: has joined #ruby
[02:12:14] gbailey: has joined #ruby
[02:12:34] pelegreno_: has joined #ruby
[02:12:37] KevinMGranger: has joined #ruby
[02:12:41] Danielss89_: has joined #ruby
[02:12:42] miah: has joined #ruby
[02:12:51] SegFaultAX: has joined #ruby
[02:13:05] lel: has joined #ruby
[02:13:11] amitchellbullard: has joined #ruby
[02:13:23] sorah___: has joined #ruby
[02:13:23] soahccc: has joined #ruby
[02:13:38] justizin: has joined #ruby
[02:13:40] russt: has joined #ruby
[02:13:43] Scient: has joined #ruby
[02:14:00] caw__: has joined #ruby
[02:14:31] ndrst: has joined #ruby
[02:14:37] fullstack: has joined #ruby
[02:14:48] Technaton: has joined #ruby
[02:14:52] ikopico: has joined #ruby
[02:14:54] dminuoso: has joined #ruby
[02:15:06] sparr: has joined #ruby
[02:15:28] eblip: has joined #ruby
[02:15:39] Matt[m]2: has joined #ruby
[02:15:59] crayfishx: has joined #ruby
[02:16:21] adaedra: has joined #ruby
[02:16:29] gremax: has joined #ruby
[02:16:39] dman[m]: has joined #ruby
[02:16:47] haylon: has joined #ruby
[02:17:32] bokayio: has joined #ruby
[02:17:32] arvindsaik: has joined #ruby
[02:18:04] bogdanteleaga: has joined #ruby
[02:18:22] webnanners: has joined #ruby
[02:18:44] ramfjord: has joined #ruby
[02:21:38] AlexRussia: has joined #ruby
[02:21:55] SCHAPiE: has joined #ruby
[02:23:27] Silthias: has joined #ruby
[02:25:32] stephenh: has joined #ruby
[02:26:44] clamstar: has joined #ruby
[02:27:45] abhi__: has joined #ruby
[02:28:48] wendinho33: has joined #ruby
[02:29:25] webnanners: has joined #ruby
[02:30:11] abhi__: i am getting syntax error with this https://gist.github.com/anonymous/8d7670dba208ffa22041e0275ca62139 i have tried to figure out what's wrong, but nothing seems to work. can anybody help me figuring out the error
[02:30:33] uneeb: has joined #ruby
[02:31:37] stephenh_: has joined #ruby
[02:33:01] ptx0_: has joined #ruby
[02:33:47] zzxc-: has joined #ruby
[02:34:31] matthewd: abhi__: That's... some unusual code layout. Why are those bits all the way over there?
[02:35:28] webnanners: has joined #ruby
[02:36:10] ryotarai_: has joined #ruby
[02:36:12] _main_: has joined #ruby
[02:36:44] abhi__: matthewd: Sorry for that, I will paste it properly. Somehow copy did not work as expected
[02:37:52] haylon: has joined #ruby
[02:38:06] matthewd: If that isn't the problem, then it would probably help to share the error too. The interpreter gives you rather a lot of information about what's going wrong.
[02:38:08] Matt[m]2: has joined #ruby
[02:38:31] cajone: has joined #ruby
[02:38:41] zacts: has joined #ruby
[02:38:42] __Yiota: has joined #ruby
[02:39:10] arvindsaik: has joined #ruby
[02:40:53] zzxc: has joined #ruby
[02:41:06] psmolen: has joined #ruby
[02:41:11] gbailey: has joined #ruby
[02:41:57] abhi__: matthewd: here it is https://ideone.com/3qgyrS
[02:42:21] Cork: has joined #ruby
[02:43:36] pelegreno_: has joined #ruby
[02:45:26] matthewd: abhi__: The line numbering shows that the newlines are missing here too. As does clicking 'fork'.
[02:45:29] webnanners: has joined #ruby
[02:46:51] abhi__: matthewd: sorry, forgot to update, it's correct now
[02:47:58] SCHAPiE: has joined #ruby
[02:48:41] ozcanesen: has joined #ruby
[02:48:45] matthewd: Have you run it again? The output doesn't seem to have changed.
[02:48:46] clamstar: has joined #ruby
[02:50:22] abhi__: No, when I run it it gives me syntax error. That's what I am trying to figure out. I can't seem to figure out what's wrong with the code
[02:53:01] matthewd: Fix the newlines in your local code, then run it, then gist me a new copy of your local code, and the error you're actually seeing
[02:57:12] bronson: has joined #ruby
[02:57:59] milardovich: has joined #ruby
[03:00:09] cadillac_: has joined #ruby
[03:00:46] abhi__: matthewd: I did fixed the indentation in the code(and ruby code shouldn't give error based on indentation, right?).Here is the code - https://gist.github.com/anonymous/8c199f0e01f9745c20613ba7d5a9e4c3 with error and proper indentation.
[03:01:58] matthewd: Well now you're lying, and I'm losing interest. The line numbers in those errors don't even slightly match the code you claim to be running.
[03:03:21] abhi__: The line numbers are from previous ideone. Sorry, if you think I am wasting your time. I will try to solve it myself then.
[03:04:21] matthewd: I said "gist me [..] the error you're actually seeing", and you chose not to. Therefore yes, you are wasting my time.
[03:04:53] emulator3: has joined #ruby
[03:09:59] A124: has joined #ruby
[03:14:56] ElDoggo: has joined #ruby
[03:20:30] webnanners: has joined #ruby
[03:22:24] zautomata: has joined #ruby
[03:23:42] gix: has joined #ruby
[03:25:28] alfiemax: has joined #ruby
[03:27:37] veeti: has joined #ruby
[03:29:30] webnanners: has joined #ruby
[03:30:29] ramfjord: has joined #ruby
[03:32:53] greenbagels: has joined #ruby
[03:33:30] jenrzzz: has joined #ruby
[03:35:00] orbyt_: has joined #ruby
[03:37:50] webnanners: has joined #ruby
[03:42:42] mim1k: has joined #ruby
[03:45:43] coderphive: has joined #ruby
[03:46:34] webnanners: has joined #ruby
[03:47:56] greenbagels: has joined #ruby
[03:50:12] spt0: has joined #ruby
[03:56:23] maxmanders: has joined #ruby
[03:56:37] nug-: has joined #ruby
[03:56:57] TheMoonMaster: has joined #ruby
[03:57:23] bronson: has joined #ruby
[03:58:20] mtkd: has joined #ruby
[04:01:04] milardovich: has joined #ruby
[04:03:58] imode: has joined #ruby
[04:04:44] meinside: has joined #ruby
[04:04:51] HashNuke: has joined #ruby
[04:06:06] maciuszek: has joined #ruby
[04:07:07] ggherdov: has joined #ruby
[04:09:15] ElDoggo: has joined #ruby
[04:10:49] ahrs: has joined #ruby
[04:12:00] cdg: has joined #ruby
[04:12:28] ramfjord: has joined #ruby
[04:18:28] bambanx: has joined #ruby
[04:24:00] ShekharReddy: has joined #ruby
[04:34:41] tamouse__: has joined #ruby
[04:39:18] amirite: has joined #ruby
[04:41:18] mim1k: has joined #ruby
[04:47:35] RushPL: has joined #ruby
[04:53:11] milardovich: has joined #ruby
[04:53:49] soyeomul: has joined #ruby
[04:54:38] neuraload: has joined #ruby
[04:56:55] soyeomul: it could put list in regexp?
[04:57:26] RickHull: how do you mean? can you paste an example? use a paste site like gist.github.com
[04:57:56] soyeomul: https://raw.githubusercontent.com/soyeomul/Gnus/MaGnus/thanks-words.py.gnus
[04:58:21] soyeomul: that was python code. i am doing remake to ruby
[04:59:27] soyeomul: currently i have ruby 1.8.7
[05:00:46] RickHull: to summarize, you have 1. file contents as a string 2. a regex and you want to get a list of matching substrings
[05:00:59] RickHull: matching, according to the regex
[05:01:10] RickHull: is that right?
[05:01:22] soyeomul: whow RickHull you are nice guy
[05:02:18] RickHull: i'm not sure of the solution off the top of my head, but look here https://ruby-doc.org/core-2.4.2/Regexp.html
[05:03:35] govg: has joined #ruby
[05:05:18] RickHull: >> /ow/.match 'how now brown cow'
[05:05:19] ruby[bot]: RickHull: # => #<MatchData "ow"> (https://eval.in/874825)
[05:05:19] rwb: has joined #ruby
[05:05:28] soyeomul: Oh RickHull there is MULTILINE as like pyhthon, thank you very much!!!
[05:05:33] RickHull: (stopped at the first match)
[05:05:42] milardovich: has joined #ruby
[05:06:06] cgfbee: has joined #ruby
[05:06:24] soyeomul: i will remark that web page. thanks RickHull
[05:06:29] RickHull: >> /.ow/.match 'how now brown cow'
[05:06:30] ruby[bot]: RickHull: # => #<MatchData "how"> (https://eval.in/874826)
[05:06:47] RickHull: not sure how to do the ruby equivalent of python's findall
[05:09:59] soyeomul: It is enough with MULTILINE, thanks RickHull
[05:12:37] tamouse__: RickHull: look at String#scan perhaps?
[05:13:18] RickHull: yes, that sounds right. but not for me, for our departed friend
[05:14:25] tamouse__: i missed most of the convo
[05:18:13] ricer2: has joined #ruby
[05:19:10] alfiemax: has joined #ruby
[05:25:29] coderphive: has joined #ruby
[05:31:04] nopolitica: has joined #ruby
[05:33:55] guardianx: has joined #ruby
[05:37:20] ndrst: has joined #ruby
[05:39:43] apparition: has joined #ruby
[05:40:41] dminuoso_: has joined #ruby
[05:41:12] jinie: has joined #ruby
[05:42:07] biberu: has joined #ruby
[05:44:32] aupadhye: has joined #ruby
[05:52:43] Bock: has joined #ruby
[05:56:24] DTZUZO: has joined #ruby
[05:58:32] bronson: has joined #ruby
[05:58:36] anisha: has joined #ruby
[05:59:49] ryandevilla: has joined #ruby
[06:03:35] snickers: has joined #ruby
[06:12:55] ramfjord: has joined #ruby
[06:15:48] neuraload: has joined #ruby
[06:16:36] DrCode: has joined #ruby
[06:16:53] rabajaj: has joined #ruby
[06:20:21] edwardly: has joined #ruby
[06:20:21] edwardly: has joined #ruby
[06:21:01] mgorbach: has joined #ruby
[06:22:14] anisha: has joined #ruby
[06:23:01] jenrzzz: has joined #ruby
[06:23:01] jenrzzz: has joined #ruby
[06:27:12] coderphive: has joined #ruby
[06:27:37] neuraload: has joined #ruby
[06:27:50] andikr: has joined #ruby
[06:29:15] jenrzzz: has joined #ruby
[06:30:00] conta: has joined #ruby
[06:31:34] ^mtkd: has joined #ruby
[06:31:43] nopolitica: has joined #ruby
[06:32:21] cyberRodent: has joined #ruby
[06:33:31] ramfjord: has joined #ruby
[06:34:12] harfangk: has joined #ruby
[06:38:08] zautomata: has joined #ruby
[06:40:26] iamdevnul: has joined #ruby
[06:41:04] danguita: has joined #ruby
[06:44:08] akkad: ok finished CL to ruby port, now to compile it to a static binary
[06:46:06] r7c: has joined #ruby
[06:52:07] burgestrand: has joined #ruby
[06:53:42] idiocrash: has joined #ruby
[06:56:52] Cohedrin_: has joined #ruby
[06:58:10] guardianx: has joined #ruby
[06:59:17] anisha: has joined #ruby
[06:59:20] RickHull: does ruby make static binaries?
[07:02:33] dionysus69: has joined #ruby
[07:03:37] giraffe: has joined #ruby
[07:04:53] tpendragon: has joined #ruby
[07:05:10] aufi: has joined #ruby
[07:09:53] alfiemax: has joined #ruby
[07:13:12] nchambers: has joined #ruby
[07:15:04] anas: has joined #ruby
[07:15:09] biberu: has joined #ruby
[07:15:19] milardovich: has joined #ruby
[07:15:29] sysvalve: has joined #ruby
[07:18:29] nir0: has joined #ruby
[07:19:05] nir0: hello guys, after upgrading to high sierra i cannot install ruby 1.9.3
[07:19:17] nir0: syntax error in syslog.h
[07:19:29] nir0: https://pastebin.com/8WHa98G2\
[07:19:31] ruby[bot]: nir0: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/47f1185e01e199f63d4c1873d7e3608e
[07:19:31] ruby[bot]: nir0: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[07:19:54] RickHull: nir0: why 1.9.3? that is dead and buried
[07:20:10] nir0: old project
[07:20:26] RickHull: i would suggest a VM
[07:20:40] RickHull: like ubuntu 12.x or something
[07:20:48] nir0: i'll try to run that project on ruby2
[07:21:01] nir0: thanks a lot
[07:23:07] vondruch: has joined #ruby
[07:24:23] claudiuinberlin: has joined #ruby
[07:26:25] ramfjord: has joined #ruby
[07:29:15] troulouliou_div2: has joined #ruby
[07:30:22] mark_66: has joined #ruby
[07:32:38] nopolitica: has joined #ruby
[07:38:41] phaul: has joined #ruby
[07:45:47] jenrzzz: has joined #ruby
[07:45:47] jenrzzz: has joined #ruby
[07:46:43] snickers: has joined #ruby
[07:51:07] pwnd_nsfw: is it possible to have, say, IntelliJ on my windows desktop, however use my ruby installation on my linux box?
[07:51:14] pwnd_nsfw: for running code, blah blah
[07:51:25] pwnd_nsfw: I already ssh to the box and run commands manually that way
[07:51:28] RickHull: i think IntelliJ runs its own interpreter
[07:51:36] RickHull: (it must, right?)
[07:51:52] RickHull: how much of the interpreting functionality do you want to happen remotely?
[07:51:57] RickHull: for like, IDE functionality?
[07:52:15] pwnd_nsfw: I want all running of ruby code to happen remotely
[07:52:19] milardovich: has joined #ruby
[07:52:22] pwnd_nsfw: as it would me running commands via SSH
[07:52:58] RickHull: keep in mind, I know nothing of IntelliJ
[07:53:06] pwnd_nsfw: I don't know how you mean "it's own interpreter" though... that wouldn't make sense for JetBrains to come up with their own ruby interpreter with the availability of the ones currently
[07:53:11] teatime: pwnd_nsfw: if intelliJ has open-remote-file-over-ssh or sshfs capability, that + also have a shell open and manually run after saving, might be easiest way
[07:53:26] RickHull: pwnd_nsfw: i mean that intellij has an embedded ruby interpreter
[07:53:31] RickHull: like MRI or whatever
[07:53:44] teatime: I don't use or know anything about intellij but would assume that what you ask for is maybe possible but a huge PITA
[07:53:57] pwnd_nsfw: word, I already use winsshfs which allows me to mimic my ssh file sharing to appear as just another drive letter on my windows install
[07:54:06] pwnd_nsfw: Yeah, I'm sure it is
[07:54:18] RickHull: your best bet is probably to use IntelliJ for what it's good at, and save your files to the remote machine
[07:54:20] pwnd_nsfw: RickHull, that would be silly too.
[07:54:23] RickHull: and just execute what you want there
[07:54:25] teatime: I mean most IDE's let you configure per-project what the "run" command does
[07:54:42] FahmeF: has joined #ruby
[07:54:46] pwnd_nsfw: IntelliJ is an IDE... which means running commands outside of the IDE would make it not being used for what it's good at lol
[07:54:52] teatime: you can just make it "ssh user@remotehost path/to/script" if you want
[07:54:53] pwnd_nsfw: being an integrated environment
[07:54:59] teatime: + have ssh key auth
[07:55:11] pwnd_nsfw: that is true
[07:55:36] teatime: this is why I like vim :)
[07:55:50] teatime: I spent all my time in remote text terminals
[07:56:02] RickHull: nah, emacs ftw
[07:56:07] teatime: yeah whichever
[07:56:10] RickHull: but yes, step 1. ssh
[07:56:17] pwnd_nsfw: In reality, it would really only enable me to not have to change windows heh
[07:56:34] quobo: has joined #ruby
[07:57:01] pwnd_nsfw: I wish I had picked up on emacs or vim earlier when I was just getting into programming
[07:57:05] teatime: pwnd_nsfw: even if my main editor is an IDE, I imagine I'd like having the separate shell
[07:57:14] pwnd_nsfw: Hell, I opted to just use notepad when doing java
[07:57:42] pwnd_nsfw: Does ruby even have proper linting yet anyways?
[07:57:58] RickHull: yet? when did you last check?
[07:58:09] pwnd_nsfw: A good while I suppose
[07:58:22] teatime: dunno what that means. for almost every language, linting is at the very least choosing one of several third-party tools
[07:58:25] RickHull: what is proper linting? do you just mean indentation conventions?
[07:58:35] pwnd_nsfw: Last I checked, there was like... some half-assed solutions
[07:58:49] RickHull: what is the test for proper linting?
[07:59:17] bronson: has joined #ruby
[07:59:24] pwnd_nsfw: nah, like... making sure you're referencing things properly, using correct functions of objects, that the method signature was correct
[07:59:34] Silthias1: has joined #ruby
[07:59:34] pwnd_nsfw: basically finding all of the pre-runtime errors
[08:00:04] RickHull: those are features of static languages. ruby is dynamic
[08:00:07] pwnd_nsfw: Which can be difficult with such a language as ruby
[08:00:20] RickHull: that is not the conventional meaning of linting, BTW
[08:00:21] pwnd_nsfw: it's also an interpreted language
[08:00:23] teatime: was gonna say, sounds like stuff that makes a lot more sense for a static-typed language
[08:00:31] matthewd: Yeah, that sounds more like a compiler than a linter
[08:00:33] pwnd_nsfw: indentation conventions is?
[08:00:44] RickHull: yeah, code formatting basically
[08:01:27] matthewd: Much as I might have Opinions about its specific choices, rubocop fits pretty well into my definition of a reasonably comprehensive linter
[08:01:58] pwnd_nsfw: Right, but having it integrated into your development environment
[08:02:09] pwnd_nsfw: like, the editor highlighting those things as you code
[08:02:19] pwnd_nsfw: as opposed to running the command each time to get the feedback
[08:02:19] matthewd: Yeah, my vim does that
[08:02:28] ramfjord: has joined #ruby
[08:03:05] pwnd_nsfw: I know that doesn't come out of the box, so what gives vim the ability to do that?
[08:03:06] RickHull: I added rubocop to one of my gems. I had to override a couple things. probably won't add it to all of my gems
[08:03:26] teatime: well vim has syntax /highlighting/ out of the box
[08:03:39] pwnd_nsfw: Right, but that's not what I'm asking
[08:03:44] teatime: presumably you're talking about more, like maybe completion, quickfix, IDE features
[08:03:59] teatime: there're plugins. I don't use a lot of them, I am happy having mostly just a text editor.
[08:04:01] RickHull: ruby defies static analysis, unlike java
[08:04:03] pwnd_nsfw: syntax highlighting is one of the most trivial functions of an editor/IDE next to opening the file... heh
[08:04:07] matthewd: The syntastic syntax-checking plugin has built-in support for rubocop (and ruby -c)
[08:04:11] pwnd_nsfw: I know it's a plugin
[08:04:12] pwnd_nsfw: I'm asking which
[08:04:17] pwnd_nsfw: there we go
[08:04:39] pwnd_nsfw: Thanks matthewd
[08:05:07] pwnd_nsfw: RickHull, where there's a will, there's a way
[08:05:43] RickHull: define_method(ENV['USER_METHOD']) do ...
[08:06:04] RickHull: i hope your IDE can keep up...
[08:06:16] pwnd_nsfw: Metaprogramming would make it harder, sure
[08:06:21] pwnd_nsfw: doesn't mean impossible lol
[08:06:30] RickHull: obj.send(ENV['USER_TEXT'])
[08:06:46] RickHull: which method did I just call?
[08:07:17] pwnd_nsfw: Most IDEs don't really pay attention to that anyways
[08:07:29] pwnd_nsfw: You're giving send a string argument
[08:07:33] pwnd_nsfw: that's all it cares about
[08:07:42] blackmesa: has joined #ruby
[08:07:47] RickHull: the problem is that send calls the method named by the string
[08:07:54] RickHull: and your IDE can't track it
[08:08:09] pwnd_nsfw: I'm wondering why all of these things are being supplied through the ENV variable. Seems pretty ... insecure really
[08:08:27] RickHull: just an example of stuff the IDE can't be aware of
[08:08:29] mim1k: has joined #ruby
[08:08:33] pwnd_nsfw: RickHull, it's not a full on debugger. It essentially just checks syntax
[08:08:53] RickHull: sorry to burst your bubble. just trying to explain things
[08:09:02] pwnd_nsfw: Explain what though?
[08:09:04] teatime: well it's a valid point; how can an IDE give you a dropdown of method calls on a variable if it has no idea what the type is of teh variable
[08:09:21] matthewd: It's not about hard calls like send. The problem is `foo.bar` -- which #bar is that?
[08:09:22] teatime: ruby is lightweight and straightforward, there's no compilation etc.; what do you really need the IDE to do for you
[08:09:29] pwnd_nsfw: Well, considering EVERYTHING in ruby is an object
[08:09:32] pwnd_nsfw: that does help
[08:09:33] ur5us: has joined #ruby
[08:09:46] teatime: I mean I try not to have a strong opinion on tools and stuff, different strokes for different folks
[08:09:47] matthewd: (unless there happens to only be one #bar defined, project-wide)
[08:10:08] mikecmpbll: has joined #ruby
[08:10:14] teatime: for me though, an editor, a command-line, various command-line tools, and API documentation in another window, works great.
[08:10:43] pwnd_nsfw: I really don't need it. It's only a convenience.
[08:10:51] Silthias: has joined #ruby
[08:11:10] RickHull: ruby is like swiss cheese. surf the cheese part as far as you can, but the holes can solve some tricky problems
[08:11:20] RickHull: but those holes make tooling difficult
[08:11:31] pwnd_nsfw: That also makes assisted refactoring difficult
[08:11:45] pwnd_nsfw: But, that's what automated tests are for
[08:12:00] RickHull: yup -- discover problems at runtime
[08:12:07] RickHull: it's a bit of a curse
[08:12:27] teatime: I'm probably limiting myself by staying unfamiliar w/ IDEs and such. it seems I rarely find use for stuff like automated refactoring.
[08:12:30] RickHull: but there are blessings in disguise
[08:12:47] RickHull: teatime: I've made a career of it :)
[08:12:48] teatime: it looks cool in demos, but I feel like I get by just fine on regexes and stuff, the rare times I do something like that
[08:13:29] RickHull: teatime: that is, remaining on the emacs/grep program; but i am leaning more towards typing these days. something like Crystal or Elixir
[08:13:58] RickHull: i think Ctags have been used to good effect in some Ruby codebases
[08:14:01] teatime: I am unfamiliar w/ both of those
[08:14:18] teatime: ctags is one of those useful PITAs, heh
[08:15:16] pwnd_nsfw: I've found it hard for me to really give two shits about programming anymore. But my life is simply complex in that my problems leave me totally unmotivated to solve someone else's problems through programming lol
[08:15:18] RickHull: in a reasonable codebase, you can probably cover 99% of the bases with grep and something like ctags. and testing covers the rest. but what about unreasonable codebases that land in your lap?
[08:15:28] pwnd_nsfw: the simple aspect of my life leaves me no problems of my own to solve
[08:15:46] RickHull: pwnd_nsfw: that seems highly improbable from here ;)
[08:16:42] RickHull: teatime: these days, I place a higher value in absolute certainty. like I **know** there are no mysteries here (e.g. with this changeset)
[08:16:43] pwnd_nsfw: Well, monitoring how much money I spend on drugs is a problem worth solving, then..
[08:17:18] RickHull: wew lad, it's late
[08:17:47] pwnd_nsfw: You've said it. 5am is the next hour to hit
[08:18:02] ramfjord: has joined #ruby
[08:18:44] pwnd_nsfw: rails has becoming boring in it's own right too
[08:18:49] pwnd_nsfw: web development in general, really.
[08:19:01] pwnd_nsfw: I think I'm more mad with the front end of things
[08:19:18] RickHull: are you kidding? what's boring about learning a brand new nodejs framework every 6 months?
[08:20:54] pwnd_nsfw: Not even that far. Even with frameworks, HTML and CSS are so unpredictable....
[08:20:58] RickHull: I'm going to stick with Angulembereactflux, once and for all
[08:21:23] pwnd_nsfw: Especially since for some reason half of my code works when I transfer it over to my rails project
[08:22:31] teatime: I don't even "know ruby", only been messing with it for a couple weeks or so
[08:22:58] RickHull: teatime: what came before ruby?
[08:23:17] teatime: I can answer 50% of questions here either by 1) googling the person's query almost verbatim, or 2) looking up the obvious documentation for whatever method they're having trouble with
[08:23:44] RickHull: teatime: well you should write a bot then ;)
[08:23:59] milardovich: has joined #ruby
[08:24:42] mim1k: has joined #ruby
[08:25:05] teatime: RickHull: immediately before Ruby and continuing to now I've been most interested in Perl6 :)
[08:26:19] teatime: in the past I've done C, portable sh, some JS but avoid it, Lua, in the distant past I knew Perl 5 very well, some Python
[08:26:42] teatime: I'm more of a *nix sysadmin than a professional developer
[08:26:50] RickHull: i've written some perl5 in anger about 15 years ago and been following perl6 since roughly then
[08:27:19] RickHull: "following"
[08:27:36] teatime: Perl 5 has been made less relevant by, well, Python and Ruby, but the hate for it is not deserved.
[08:28:15] teatime: especially for its era, it's a very nice language to work in that become cool to talk badly about.
[08:28:30] RickHull: i graduated uni in 2002 and perl5 was a relief compared to writing CGI scripts in C or whatever
[08:28:37] RickHull: doing command line programs, text processing
[08:28:53] RickHull: but it is pretty gnarly for writing nice libraries and apps
[08:29:05] RickHull: at least according to modern conventions
[08:29:28] teatime: yeah that seems pretty true to me, although I don't do any perl5 anymore
[08:29:32] RickHull: quite postmodern :)
[08:29:38] teatime: that jives with what I see from the sidelines
[08:29:49] someuser: has joined #ruby
[08:29:58] RickHull: i remember when parrotvm was going to do perl, ruby, python, php (even?)
[08:30:11] teatime: have been enjoying Ruby a lot
[08:30:23] RickHull: ruby is so much cleaner and more consistent
[08:30:28] teatime: also Ruby strikes me as a good choice for a language for teaching people programming
[08:30:32] guille-moe: has joined #ruby
[08:30:32] teatime: matthewd: any thoughts on that ^^ ?
[08:30:42] RickHull: very much so. it's programmer friendly
[08:31:01] pwnd_nsfw: when people get to strict typing though
[08:31:05] pwnd_nsfw: They'll freak out
[08:31:16] RickHull: better later than sooner
[08:31:28] pwnd_nsfw: I learned Java initially
[08:31:32] pwnd_nsfw: I think that's a good first
[08:31:34] teatime: well, like, example: it has a really straightforward syntax for objects, class variables, instance variables, no extraneous boilerplate stuff "just put this in don't worry about why" like w/ C++ or Java
[08:31:51] morfin: has joined #ruby
[08:31:53] RickHull: pwnd_nsfw: sure, you did it the hard way. everyone should do it the hard way, natch
[08:32:24] teatime: my uni taught C++ for the first 'intro to programming' CS classes; that's probably a terrible choice
[08:32:26] pwnd_nsfw: but forealz, Java lays out OOP, data types, and is p straight forward for the most part
[08:32:32] pwnd_nsfw: well, "back then" it was
[08:32:35] pwnd_nsfw: I haven't used it in years
[08:32:36] teatime: then they switched to Java, which, I have never done Java. but doubt it's much of an improvement.
[08:32:39] pwnd_nsfw: I know a lot has changed
[08:32:44] RickHull: in my mind, it takes a whole lot of context and experience to understand and appreciate the benefits of type theory
[08:32:57] morfin: i have question about testing... i have one database and upload data to it using CLI to avoid hitting code i test and then i need to query some stuff etc
[08:33:03] pwnd_nsfw: Java is much of an improvement, mostly because you dont' have to worry about managing memory so much
[08:33:03] RickHull: java is a terrible learning language IMHO
[08:33:05] morfin: any idea how do i do this?
[08:33:06] pwnd_nsfw: But there's rust now
[08:33:19] nopolitica: has joined #ruby
[08:33:23] RickHull: java is cargo cult programming, for the most part, for beginners
[08:33:28] pwnd_nsfw: so, instead of using fixtures or factories, morfin ?
[08:33:40] mikecmpbll: has joined #ruby
[08:33:46] pwnd_nsfw: testing shouldn't fux with your production database anywho
[08:33:59] morfin: it's not trivial database )
[08:34:25] pwnd_nsfw: I'm confused though.
[08:34:33] pwnd_nsfw: With your question.
[08:34:42] alfiemax: has joined #ruby
[08:34:42] RickHull: what is the question? can you rephrase?
[08:34:45] pwnd_nsfw: Maybe use.. external database manager?
[08:34:58] pwnd_nsfw: like.. phpmyadmin or some ish
[08:35:18] morfin: i need something like "fixtures" for testing
[08:35:31] pwnd_nsfw: That's where fixtures are .. in your test suite
[08:36:00] cadillac_: has joined #ruby
[08:36:08] morfin: in first test i create uid(metrics) and look for response, but in other tests i should not depend on functionality i test(it's opentsdb thing)
[08:37:32] pwnd_nsfw: I think you're looking for stubbing out
[08:37:51] pwnd_nsfw: what are you using for your testing software?
[08:38:10] pwnd_nsfw: if you don't say rspec
[08:38:13] pwnd_nsfw: I can't really help lol
[08:38:26] ramfjord: has joined #ruby
[08:38:58] morfin: i use "real" database instead of stubbing
[08:39:11] greenbagels: has joined #ruby
[08:39:31] RickHull: your tests should strive to be independent. a later test should not depend on state set up by a prior test
[08:39:41] pwnd_nsfw: which is why stubbing works
[08:39:55] pwnd_nsfw: you should try to not hit the database during tests anyways, like, as much as you can anyways
[08:40:06] morfin: well, this is very special case)
[08:40:22] RickHull: that's what they all say ;)
[08:40:50] pwnd_nsfw: I wish Atom wasn't so slow
[08:40:51] teatime: wouldn't you only want to stub things that are very hard to have just working normally? if it's easy enough to run a local database and load test data in it, for example, you wouldn't want to stub database-interaction
[08:41:13] morfin: that's a question - how i load data
[08:41:13] pwnd_nsfw: you want to stub all things that take time..
[08:41:16] matthewd: If you're qualified to determine that your needs are unique and require a unique solution, you're qualified to implement it without advice from us.
[08:42:33] teatime: I'm just saying, it's added work + added complexity = additional places for mistakes to creep in / coverage to be accidentally poor
[08:42:37] pwnd_nsfw: matthewd, that's a bit much to say lol
[08:42:43] pwnd_nsfw: morfin, seed data
[08:42:49] teatime: so avoid until needed / has significant benefits?
[08:43:13] Beams: has joined #ruby
[08:45:15] milardovich: has joined #ruby
[08:46:49] matthewd: It's XY's uglier cousin: "I'm wilfully choosing an extraordinary approach to solve my problem.. but while I've decided it's the only solution for me, I don't actually know how to do it, so please help"
[08:47:48] jenrzzz: has joined #ruby
[08:48:46] morfin: well, i need somehow load data before tests with rspec
[08:48:48] claudiuinberlin: has joined #ruby
[08:48:54] lxsameer: has joined #ruby
[08:48:57] matthewd: At least a true XY is an accidental fixation, not deliberate
[08:49:10] morfin: nothing else
[08:49:17] burgestrand: morfin there's a `before(:suite)` (:all?) option that allows you to modify to your hearts content
[08:49:44] burgestrand: morfin if you ensure that all your tests run within a transaction you can be fairly confident in that you don't leak between your tests
[08:50:11] matthewd: So, fixtures
[08:50:24] morfin: as i said i clean database before every test
[08:50:53] morfin: data + all metrics, tagk, tagv
[08:52:14] burgestrand: morfin Is the data different for every test?
[08:53:18] matthewd: Factories, then
[08:53:45] tvw: has joined #ruby
[08:53:57] morfin: but how would i load data with factories?
[08:54:06] ramfjord: has joined #ruby
[08:54:41] matthewd: You create the records you need in one of the before blocks
[08:56:25] morfin: i think i would need custom factory
[08:56:27] burgestrand: morfin there are gems to help you, I've used machinist in the past, I know factory_girl is common too
[08:58:11] greenbagels: has joined #ruby
[08:58:30] morfin: i was thinking what if i import "dump" instead since there is no need to access "separate" record
[08:58:48] matthewd: A separate dump for each spec? :/
[08:59:29] burgestrand: That's a lot of dump!
[09:00:11] burgestrand: … perhaps even a number of dumplings!
[09:00:20] alfiemax: has joined #ruby
[09:00:54] morfin: maybe i can use same data instead of different
[09:00:56] blackmesa: has joined #ruby
[09:01:40] rfoust: has joined #ruby
[09:01:44] baweaver: has joined #ruby
[09:03:10] matthewd: The key difference in the approaches is that with fixtures, you build a small but representative database, then use that content for as much of your tests as you can; with factories, each spec builds just the handful of objects it actually needs to make its assertion pass
[09:04:40] morfin: basically there is few methods to test - suggest, exp, delete, query, store, create_uid and request(raw request) and maybe some more(but mostly used are query, exp and store).
[09:07:25] GodFather: has joined #ruby
[09:08:35] marr: has joined #ruby
[09:11:25] jphase: has joined #ruby
[09:12:56] Bish: has joined #ruby
[09:13:02] Bish: why is | a special char in regex?
[09:13:20] Bish: oh its the fukin or in ()
[09:13:49] teatime: | is alternation
[09:14:22] teatime: () does grouping, which is useful for alternation; it also does capturing. you can do non-capturing grouping if you only want the grouping for | and the capturing part is messing you up.
[09:14:28] morfin: if you need just | use \|
[09:14:28] ramfjord: has joined #ruby
[09:14:36] Bish: yeah doesnt quite work, yet
[09:14:52] Bish: i want to parse
[09:15:01] Bish: x || y, and sometimes x | y
[09:15:15] Bish: /([A-z]+)(?:\s*)(|){1,2}([^|]+)/
[09:15:18] Bish: currenct aproach
[09:16:28] Bish: >> "test||yopigogagigu".scan(/([A-z]+)(?:\s*)(||)(?:\s*)(.*)/)
[09:16:41] Bish: >> "test||yopigogagigu".scan(/([A-z]+)(?:\s*)(||)(?:\s*)(.*)/)
[09:16:42] ruby[bot]: Bish: # => [["test", "", "||yopigogagigu"]] (https://eval.in/875031)
[09:16:46] teatime: you need \| is all
[09:17:01] teatime: also you probably want [A-Za-z] instead of [A-z]
[09:17:13] Bish: yes, looks like it, but the (\|){1,2} didnt work :/
[09:17:27] Bish: why doesnt it?
[09:17:34] Bish: >> "test||yopigogagigu".scan(/([A-z]+)(?:\s*)(\|){1,2}(?:\s*)(.*)/)
[09:17:35] ruby[bot]: Bish: # => [["test", "|", "yopigogagigu"]] (https://eval.in/875035)
[09:18:12] morfin: as i said if want character | use \|
[09:18:28] Bish: im doing that. as you can see
[09:18:31] matthewd: Bish: You want (\|{1,2})
[09:18:37] Bish: oh, okay.
[09:19:16] Bish: thanks, is there a difference between A-z and A-Za-z
[09:19:36] morfin: >> "test||yopigogagigu".scan(/([A-z]+)(?:\s*)(\|{1,2})(?:\s*)(.*)/)
[09:19:37] matthewd: There are a bunch of ASCII characters between Z and a, so yes
[09:19:37] ruby[bot]: morfin: # => [["test", "||", "yopigogagigu"]] (https://eval.in/875041)
[09:20:39] matthewd: You might just want something like \w though -- or use a-z and /i
[09:20:46] morfin: if i use same data but several times should i seed before every test?
[09:20:49] teatime: >> "test||yopigogagigu".match(/^(\w+)\s*(\|{1,2})\s*(\w+)$/)
[09:21:15] Bish: its not a beginning of the lin
[09:21:48] morfin: as example when i test removal of data etc i alter database
[09:21:51] teatime: ok well even so, your non-capturing groups are not doing anything just extra chars
[09:22:07] teatime: and what matthewd said about \w maybe being what you want
[09:22:29] morfin: so i will need to start over from blank test database
[09:22:45] matthewd: morfin: If you use fixtures, they should get loaded automatically, and automatically reset to the initial state for each test
[09:24:11] morfin: i do not understand how write fixtures for such database
[09:25:54] workmad3: has joined #ruby
[09:25:55] morfin: because i just need to delete everything and import dump before every test
[09:26:47] Bish: what does \w actually include
[09:26:50] Bish: "googles"
[09:27:00] matthewd: I would hope that whatever your DB interface layer is, would take care of that for you. But maybe I'm expecting too much of it :/
[09:27:15] morfin: take care of what?
[09:27:21] morfin: there is no transactions
[09:27:54] matthewd: Fixture management, however that's best implemented against the relevant datastore
[09:28:12] claudiuinberlin: has joined #ruby
[09:28:21] morfin: what i do right now: http://paste.ubuntu.com/25684917/
[09:28:22] Bish: matthewd: sorry, didnt listen, take care of what?
[09:28:47] matthewd: Bish: Sorry, that was for morfin
[09:28:57] Bish: i know, just wanted to know, ORMs are my passion
[09:29:02] Bish: because i hate sql
[09:29:44] rrichardsr3: has joined #ruby
[09:30:01] morfin: it's not SQL thing, opentsdb as i said stores timestamp, value, values are assigned to metrics, also they can has one or multiple tagk(key) and tagv(value)
[09:30:04] ramfjord: has joined #ruby
[09:30:11] matthewd: Fixtures & OpenTSDB
[09:30:34] morfin: i don't think that would work )
[09:31:04] Bish: i do not even know what that is :D
[09:31:31] matthewd: morfin: So yeah, this is the sort of thing I would hope you didn't need to do manually. But if you do, then so be it ¯\_(ツ)_/¯
[09:31:35] Bish: i see more and more russians in irc
[09:31:41] Bish: how does that come :o
[09:32:13] Bish: morfin: you are russian right?
[09:32:15] morfin: idk, i was here a long time )
[09:32:25] Bish: haha, your ) gave it away
[09:32:44] morfin: ACTION remembers somebody told me that before
[09:32:54] Bish: not even kidding smiley without )) ⇒ 99% russian
[09:33:02] Bish: without :*
[09:33:07] cdg: has joined #ruby
[09:33:25] morfin: OpenTSDB works on top of HBase
[09:33:38] Bish: gotta google that up
[09:34:09] morfin: it just provide functionality to organize values in HBase using timestamps/metrics/tags
[09:34:20] nopolitica: has joined #ruby
[09:36:42] ferr: has joined #ruby
[09:40:02] morfin: matthewd, so just load data, clean after test and that's it?
[09:40:45] matthewd: Yeah, I guess so. It's not gonna be fast, though.
[09:44:32] kies: has joined #ruby
[09:44:37] adlerdias: has joined #ruby
[09:46:33] claudiuinberlin: has joined #ruby
[09:48:06] jenrzzz: has joined #ruby
[09:50:31] ramfjord: has joined #ruby
[09:54:30] charliesome: has joined #ruby
[09:56:08] adlerdias: has left #ruby: ()
[09:57:00] bruno-: has joined #ruby
[10:00:10] bronson: has joined #ruby
[10:02:30] ta: has joined #ruby
[10:04:53] charliesome: has joined #ruby
[10:11:49] FahmeF_: has joined #ruby
[10:13:37] FahmeF: has joined #ruby
[10:13:55] rgr_: has joined #ruby
[10:19:03] dinfuehr: has joined #ruby
[10:19:29] Silthias1: has joined #ruby
[10:20:51] workmad3: has joined #ruby
[10:24:50] ta: has joined #ruby
[10:26:25] _aeris_: has joined #ruby
[10:26:33] ramfjord: has joined #ruby
[10:30:22] uZiel: has joined #ruby
[10:31:49] charliesome: has joined #ruby
[10:33:31] quobo: has joined #ruby
[10:34:46] nopolitica: has joined #ruby
[10:44:13] burgestrand: has joined #ruby
[10:47:04] ur5us: has joined #ruby
[11:02:35] ramfjord: has joined #ruby
[11:07:10] guille-moe: has joined #ruby
[11:08:32] claudiuinberlin: has joined #ruby
[11:13:46] aufi: has joined #ruby
[11:13:54] jphase: has joined #ruby
[11:18:22] charliesome: has joined #ruby
[11:23:42] apparition47: has joined #ruby
[11:24:37] Bish: ĥow would u parse something like
[11:24:55] Bish: ((1,2,3),(1,2),(3,4))
[11:25:12] Bish: n-tuples array
[11:25:20] Bish: so to say.
[11:26:17] teatime: support arbitrary nesting?
[11:27:49] shinnya: has joined #ruby
[11:28:09] GodFather_: has joined #ruby
[11:28:11] ltd: has joined #ruby
[11:35:05] ltd: has joined #ruby
[11:35:43] nopolitica: has joined #ruby
[11:36:50] ta: has joined #ruby
[11:39:38] claudiuinberlin: has joined #ruby
[11:39:42] adlerdias: has joined #ruby
[11:39:49] Jameser: has joined #ruby
[11:40:48] tcopeland: has joined #ruby
[11:40:51] adlerdias: has joined #ruby
[11:41:49] GodFather__: has joined #ruby
[11:42:32] ltd: has joined #ruby
[11:43:36] ta: has joined #ruby
[11:44:26] ldnunes: has joined #ruby
[11:45:26] ElDoggo: has joined #ruby
[11:45:41] rahul_bajaj: has joined #ruby
[11:46:01] ElDoggo: has joined #ruby
[11:46:57] ltd: has joined #ruby
[11:48:36] fmcgeough: has joined #ruby
[11:49:27] kristofferR: has joined #ruby
[11:49:29] jenrzzz: has joined #ruby
[11:49:40] jenrzzz: has joined #ruby
[11:50:07] ta: has joined #ruby
[11:51:08] TomyLobo: has joined #ruby
[11:51:46] rabajaj: has joined #ruby
[11:55:23] Bish: teatime: no it wont get more complicated than that
[11:55:25] Bish: an array of tuples
[11:55:30] Bish: n-tuples
[11:55:35] Bish: no nesting
[11:55:48] Bish: so no tuple in a tuple
[11:59:26] morfin: replace all ( with [ and ) with ] and parse JSON?
[11:59:35] morfin: *some stupid idea*
[12:00:09] greenbagels: has joined #ruby
[12:00:52] Bish: morfin: just had that idea too :D
[12:01:05] Bish: well the numbers might be strings.. that would not make it impossible to have it as json
[12:01:18] Bish: but still i wouldve to add "
[12:01:34] bronson: has joined #ruby
[12:01:52] mim1k: has joined #ruby
[12:03:56] tamouse__: something weird like pipe it out to python for interpretation as actual tuples then back in as a ruby array of arrays..... nevermind
[12:04:30] morfin: >> JSON.parse("((1,2,3), (6,7))".gsub(/[()]/, '(' => '[', ')' => ']'))
[12:04:31] ruby[bot]: morfin: # => uninitialized constant JSON (NameError) ...check link for more (https://eval.in/875214)
[12:04:43] morfin: >> require 'json'; JSON.parse("((1,2,3), (6,7))".gsub(/[()]/, '(' => '[', ')' => ']'))
[12:04:44] ruby[bot]: morfin: # => [[1, 2, 3], [6, 7]] (https://eval.in/875215)
[12:06:14] morfin: i assume you may need map over array to map over inner arrays to to_i
[12:06:17] Bish: i could write a neural network that figures out how to built ruby arrays(in memory) with brainfuck
[12:06:40] tamouse__: weekend is coming up, Bish
[12:07:09] morfin: i have 3 hours until my workday ends
[12:07:20] Bish: im a slave
[12:08:25] Bish: but i play stellaris at work
[12:08:27] Bish: so thats okay
[12:08:51] Bish: what would be another approach without json?
[12:08:58] snickers: has joined #ruby
[12:09:19] Bish: tokenize and walk over it recursively?
[12:12:31] tsglove2: has joined #ruby
[12:12:37] morfin: use LisP?
[12:13:43] tsglove3: has joined #ruby
[12:14:33] tamouse__: elegant weapons for a more civilised age
[12:14:41] jphase: has joined #ruby
[12:14:48] Bish: i like lisp but well im in ruby here.
[12:14:52] Bish: also ruby is not really a language
[12:14:57] Bish: eahh lisp
[12:15:00] Bish: its just.. brackets
[12:15:07] Bish: kinda like what i am trying to parse
[12:15:32] tamouse__: every language devolvs to lisp anyway
[12:15:54] tamouse__: might as well embrace it
[12:15:58] Bish: what do you mean "devolvs"
[12:17:03] tamouse__: i'm looking for the quote
[12:17:23] mim1k: has joined #ruby
[12:18:51] tsglove3: has joined #ruby
[12:19:02] tamouse__: greenspun's tenth rule: any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp.
[12:22:04] morfin: Bish, look at this
[12:22:13] morfin: >> "((1,2,3),(6,7))".split('),').collect{|x| x.gsub(/[()]/, '').split(',').map(&:to_i)}
[12:22:15] ruby[bot]: morfin: # => [[1, 2, 3], [6, 7]] (https://eval.in/875236)
[12:22:34] morfin: no idea how do i get rid of ( and )
[12:22:40] morfin: so i just removed them )
[12:23:59] Bish: wow thats good morfin
[12:28:01] Bish: NO ITS NOT
[12:28:02] Bish: or wait. is it?
[12:28:34] Bish: that smean
[12:28:37] Bish: i thought it was good
[12:29:02] Bish: nvm, wait what.
[12:29:42] Bish: that really works
[12:32:21] nopolitica: has joined #ruby
[12:33:55] chouhoulis: has joined #ruby
[12:33:56] mim1k: has joined #ruby
[12:34:03] truenito: has joined #ruby
[12:35:33] niklasb: has joined #ruby
[12:36:01] niklasb: has left #ruby: ()
[12:36:38] adlerdias: has left #ruby: ()
[12:37:21] claudiuinberlin: has joined #ruby
[12:39:56] tamouse__: >> "( (a, b, c), (d , e), (1, 2) ) ".scan(/\(([^\(\)]+)\)/).flatten.map{|x| x.split(/,/).map(&:strip)}
[12:39:58] ruby[bot]: tamouse__: # => [["a", "b", "c"], ["d", "e"], ["1", "2"]] (https://eval.in/875242)
[12:44:44] ShalokShalom_: has joined #ruby
[12:44:51] bmurt: has joined #ruby
[12:46:12] greenbagels: has joined #ruby
[12:46:38] guardian: has joined #ruby
[12:46:47] guardian: hello, I have a beginner question
[12:47:00] guardian: I have foo(*bars) that takes an undefined number of parameters
[12:47:11] guardian: and I found myself trying to do def foo(*bars, params = {})
[12:47:23] guardian: which obviously doesn't work
[12:47:29] guardian: what's the usual way to solve this?
[12:47:37] Bish: guardian: def foo(*bar,**s)
[12:48:02] guardian: I don't think I understand what it does
[12:48:03] Bish: you can have the named parameters in a keyword hash
[12:48:11] mson: has joined #ruby
[12:48:24] Bish: guardian: do you know the "name:" calling convention?
[12:48:38] bokayio: has joined #ruby
[12:48:39] guardian: yep starting with Ruby 2.3 right?
[12:48:48] guardian: but foo(*bar, **s) I don't get it
[12:48:50] Bish: yes, if youre using that one.. you can get an hash of those
[12:48:53] Bish: with **something
[12:48:59] Bish: just like you get *args with a single *
[12:49:20] fmcgeough: has joined #ruby
[12:49:22] Bish: and btw, why shouldnt what you do work?
[12:49:25] Bish: it does.. just tested
[12:49:30] nopoliti1: has joined #ruby
[12:50:14] guardian: SyntaxError: (irb):7: syntax error, unexpected '=', expecting ')'
[12:50:24] guardian: when trying to def foo(*bar, params = {})
[12:50:45] guardian: running ruby 2.4.2
[12:51:06] tamouse__: guardian: `def foo(*bars, **params)`
[12:51:49] tamouse__: if you don't pass any keyworded args, params ends up as {}
[12:52:10] ramfjord: has joined #ruby
[12:52:31] guardian: so def foo(*bars, **params) is the new Ruby 2.3 syntax right?
[12:53:08] guardian: and there's no way if targetting Ruby < 2.3 correct?
[12:53:12] tamouse__: there is a way to get something similar prior to that
[12:53:33] tamouse__: you check if the last *bars is a Hash, pop it off and treat it as **params
[12:54:00] guardian: I prefer the new way obviously
[12:54:12] tamouse__: so say we all
[12:54:12] guardian: so likely, post Ruby 2.3 people don't write params = {} style anymore?
[12:54:30] tamouse__: not if you're splatting args
[12:54:51] tamouse__: if you're using explicit args, you can still do that just fine
[12:55:02] claudiuinberlin: has joined #ruby
[12:56:05] Bish: guardian: i tried def z(*a,b={})
[12:56:08] Bish: and it works like a charm
[12:56:15] Bish: if i give it 1,2,3,{test:3} as parameter
[12:56:25] morfin: ruby bot can't handle PM?
[12:56:25] Bish: it just works :o
[12:57:17] Bish: oh it seems like you cannot give default values then
[12:57:33] Bish: >> def z(*a,b);p [a,b];end;z(1,2,3)
[12:57:34] ruby[bot]: Bish: # => [[1, 2], 3] ...check link for more (https://eval.in/875258)
[12:57:42] Bish: >> def z(*a,b=4);p [a,b];end;z(1,2,3)
[12:57:49] ruby[bot]: Bish: # => /tmp/execpad-92bef5413852/source-92bef5413852:2: syntax error, unexpected '=', expecting ')' ...check link for more (https://eval.in/875260)
[12:58:14] Bish: looks like you cannot have default values after *args
[12:58:22] Bish: because of the ambiguity maybe
[12:59:19] morfin: why not use syntax
[13:00:03] morfin: >> def test(*args, foo: "bar") puts *args.to_s + " " + foo end test 1,2,3
[13:00:04] ruby[bot]: morfin: # => /tmp/execpad-ad1955a36738/source-ad1955a36738:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/875272)
[13:00:23] ltd: has joined #ruby
[13:00:48] morfin: >> def test(*args, foo: "bar") puts *args.to_s + " " + foo end; test 1,2,3
[13:00:49] ruby[bot]: morfin: # => [1, 2, 3] bar ...check link for more (https://eval.in/875273)
[13:01:00] morfin: >> def test(*args, foo: "bar") puts *args.to_s + " " + foo end; test 1,2,3, foo: "baz"
[13:01:01] ruby[bot]: morfin: # => [1, 2, 3] baz ...check link for more (https://eval.in/875274)
[13:01:03] ryandevilla: has joined #ruby
[13:02:20] tamouse__: how would you do that if you didn't have explicit keywords?
[13:03:08] morfin: what do you mean?
[13:03:33] tamouse__: i think that ends up being just `def foo(*args, **keyword)`
[13:03:53] tamouse__: doesn't it?
[13:04:12] alfiemax: has joined #ruby
[13:05:55] ta: has joined #ruby
[13:06:06] tamouse__: effectively, it's something like: `def foo(args=[], keywords={})`
[13:06:31] tamouse__: just easier calling syntax
[13:07:28] cdg: has joined #ruby
[13:09:24] cdg: has joined #ruby
[13:10:25] mim1k: has joined #ruby
[13:10:54] cdg_: has joined #ruby
[13:12:52] simmaniac: has joined #ruby
[13:13:52] naftilos76: has joined #ruby
[13:17:54] greenbagels: has joined #ruby
[13:18:14] workmad3: has joined #ruby
[13:18:38] johno84: has joined #ruby
[13:18:55] ta: has joined #ruby
[13:21:41] nowhereman: has joined #ruby
[13:23:32] nowhere_man: has joined #ruby
[13:24:19] rwb: has joined #ruby
[13:30:58] mim1k: has joined #ruby
[13:31:13] DLSteve_: has joined #ruby
[13:31:39] ltd: has joined #ruby
[13:35:57] ltd: has joined #ruby
[13:36:54] ltd: has joined #ruby
[13:39:07] nofxx: has joined #ruby
[13:40:22] greenbagels: has joined #ruby
[13:43:36] ltd: has joined #ruby
[13:45:05] __Yiota: has joined #ruby
[13:46:31] mim1k: has joined #ruby
[13:46:40] yeticry_: has joined #ruby
[13:47:44] orbyt_: has joined #ruby
[13:48:48] ltd: has joined #ruby
[13:49:10] ryandevilla: has joined #ruby
[13:51:37] jenrzzz: has joined #ruby
[13:54:27] claudiuinberlin: has joined #ruby
[13:55:57] nofxx: has joined #ruby
[13:56:00] jrafanie: has joined #ruby
[13:56:07] rippa: has joined #ruby
[14:02:21] bronson: has joined #ruby
[14:03:36] Rapture: has joined #ruby
[14:05:10] smelnicki: has joined #ruby
[14:05:50] __Yiota: has joined #ruby
[14:08:32] AgentVenom: has joined #ruby
[14:09:20] ta: has joined #ruby
[14:09:30] claudiuinberlin: has joined #ruby
[14:10:42] orbyt_: has joined #ruby
[14:14:26] rfoust: has joined #ruby
[14:15:15] conta2: has joined #ruby
[14:16:22] claudiuinberlin: has joined #ruby
[14:19:07] ResidentBiscuit: has joined #ruby
[14:19:23] claudiuinberlin: has joined #ruby
[14:19:35] npgm: has joined #ruby
[14:22:14] Sylario: has joined #ruby
[14:22:30] ElDoggo: has joined #ruby
[14:23:56] mim1k: has joined #ruby
[14:29:06] coderphive: has joined #ruby
[14:29:21] cpruitt: has joined #ruby
[14:30:52] sepp2k: has joined #ruby
[14:38:43] ElDoggo: has joined #ruby
[14:39:53] Technaton: has joined #ruby
[14:41:51] ta: has joined #ruby
[14:43:36] nofxx: has joined #ruby
[14:44:43] FahmeF: has joined #ruby
[14:48:37] cdg: has joined #ruby
[14:50:40] shakes: has joined #ruby
[14:51:07] holgerdanske: has joined #ruby
[14:52:03] holgerdanske: Any of you rubyists familiar with a time clock gem that would be relatively easy to tell to populate a Quickbooks database with time stamp entries?
[14:56:44] mim1k: has joined #ruby
[14:57:40] claudiuinberlin: has joined #ruby
[14:58:34] FrostCandy: has joined #ruby
[15:00:24] phaul: has joined #ruby
[15:00:25] nofxx: has joined #ruby
[15:01:30] ElDoggo: has joined #ruby
[15:02:05] greenbagels: has joined #ruby
[15:02:17] claudiuinberlin: has joined #ruby
[15:04:45] greenbagels: has joined #ruby
[15:05:25] jinie: has joined #ruby
[15:09:24] cschneid_: has joined #ruby
[15:12:21] claudiuinberlin: has joined #ruby
[15:15:46] cagomez: has joined #ruby
[15:16:58] shakes: has joined #ruby
[15:18:11] Rapture: has joined #ruby
[15:21:47] tamouse__: has joined #ruby
[15:22:15] __Yiota: has joined #ruby
[15:24:00] spt0: has joined #ruby
[15:25:09] claudiuinberlin: has joined #ruby
[15:26:52] johno84: has joined #ruby
[15:27:17] ozcanesen: has joined #ruby
[15:29:29] simmaniac: has joined #ruby
[15:29:36] milardovich: has joined #ruby
[15:32:42] nofxx: has joined #ruby
[15:34:46] mtkd: has joined #ruby
[15:36:30] ta: has joined #ruby
[15:39:23] dreamthese: has joined #ruby
[15:40:56] minimalism: has joined #ruby
[15:41:18] rrichardsr3: has joined #ruby
[15:42:31] cdg: has joined #ruby
[15:44:36] _aeris_: has joined #ruby
[15:46:10] nofxx: has joined #ruby
[15:48:11] claudiuinberlin: has joined #ruby
[15:49:25] Neptu: has joined #ruby
[15:49:50] bwilson: has joined #ruby
[15:49:53] cdg: has joined #ruby
[15:51:28] eroux: has joined #ruby
[15:53:30] AnoHito: has joined #ruby
[15:55:28] blackmesa: has joined #ruby
[15:55:44] nankyokusei: has joined #ruby
[15:57:00] __Yiota: has joined #ruby
[15:58:52] jenrzzz: has joined #ruby
[15:58:52] jenrzzz: has joined #ruby
[15:58:59] claudiuinberlin: has joined #ruby
[16:01:22] nopoliti1: has joined #ruby
[16:02:43] claudiuinberlin: has joined #ruby
[16:03:07] nofxx: has joined #ruby
[16:03:23] bronson: has joined #ruby
[16:07:22] selim: has joined #ruby
[16:08:06] PettanShoutaKun: has joined #ruby
[16:08:22] PettanShoutaKun: is there away in ruby to do like... do_the_thing if conditional
[16:08:29] PettanShoutaKun: like with the if statement after thhe fact?
[16:08:49] SeepingN: has joined #ruby
[16:09:19] phaul: has joined #ruby
[16:11:29] orbyt_: has joined #ruby
[16:12:46] amirite: has joined #ruby
[16:16:06] thomasv314: has joined #ruby
[16:16:49] raynold: has joined #ruby
[16:17:05] therealGent: has joined #ruby
[16:20:37] gusrub: has joined #ruby
[16:23:19] mikecmpbll: has joined #ruby
[16:25:00] gusrub: has joined #ruby
[16:25:27] dionysus69: has joined #ruby
[16:27:16] chouhoulis: has joined #ruby
[16:28:01] chouhoulis: has joined #ruby
[16:29:14] troys: has joined #ruby
[16:32:11] RickHull: has joined #ruby
[16:32:40] newcoder: has joined #ruby
[16:33:16] newcoder: has left #ruby: ()
[16:34:57] agimenez: has joined #ruby
[16:37:14] nofxx: has joined #ruby
[16:37:44] milardovich: has joined #ruby
[16:42:26] emulator4: has joined #ruby
[16:46:49] Dimik: has joined #ruby
[16:47:46] moei: has joined #ruby
[16:53:26] fmcgeough: has joined #ruby
[16:58:40] dviola: has joined #ruby
[16:59:06] eckhardt: has joined #ruby
[17:00:24] jenrzzz: has joined #ruby
[17:01:47] coderphive: has joined #ruby
[17:01:54] nopoliti1: has joined #ruby
[17:10:33] rakm: has joined #ruby
[17:19:00] Sembei: has joined #ruby
[17:19:04] mim1k: has joined #ruby
[17:19:15] Guest97372: has joined #ruby
[17:19:49] blackmesa: has joined #ruby
[17:20:30] wald0: has joined #ruby
[17:20:59] Luyt_: has joined #ruby
[17:25:28] nofxx: has joined #ruby
[17:28:00] bronson: has joined #ruby
[17:29:48] dtzuzu: has joined #ruby
[17:35:11] ledestin: has joined #ruby
[17:44:56] zachk: has joined #ruby
[17:45:14] gusrub: has joined #ruby
[17:50:16] tvw: has joined #ruby
[17:50:36] amirite: has joined #ruby
[17:50:56] imode: has joined #ruby
[17:55:28] __Yiota: has joined #ruby
[17:56:20] ta: has joined #ruby
[17:57:28] ivanskie: has joined #ruby
[18:01:21] orbyt_: has joined #ruby
[18:02:34] nopoliti1: has joined #ruby
[18:04:57] simmaniac: has joined #ruby
[18:05:51] nofxx: has joined #ruby
[18:06:16] cschneid_: has joined #ruby
[18:06:41] Cohedrin_: has joined #ruby
[18:07:15] claudiuinberlin: has joined #ruby
[18:09:57] tamouse__: has joined #ruby
[18:10:51] nb_bez_______: has joined #ruby
[18:14:18] ramfjord: has joined #ruby
[18:21:50] bmurt: has joined #ruby
[18:25:40] nadir: has joined #ruby
[18:28:09] MyMind: has joined #ruby
[18:33:01] ta: has joined #ruby
[18:34:15] rakm: has joined #ruby
[18:35:20] SubaruSVX: has joined #ruby
[18:37:08] ^mtkd: has joined #ruby
[18:38:42] kies: has joined #ruby
[18:41:44] zarubin: has joined #ruby
[18:41:55] nofxx: has joined #ruby
[18:43:09] jenrzzz: has joined #ruby
[18:43:54] mtkd: has joined #ruby
[18:43:56] DTZUZO: has joined #ruby
[18:46:59] amirite: has joined #ruby
[18:47:05] ta: has joined #ruby
[18:50:23] konsolebox: has joined #ruby
[18:52:58] blackmesa: has joined #ruby
[18:56:41] blackmesa1: has joined #ruby
[18:57:09] chouhoulis: has joined #ruby
[18:57:54] chouhoulis: has joined #ruby
[19:00:19] blackmesa: has joined #ruby
[19:00:58] jphase: has joined #ruby
[19:03:19] nopoliti1: has joined #ruby
[19:03:27] nofxx: has joined #ruby
[19:04:00] cschneid_: has joined #ruby
[19:07:38] jenrzzz: has joined #ruby
[19:07:38] jenrzzz: has joined #ruby
[19:13:32] oetjenj: has joined #ruby
[19:19:07] Didac: has joined #ruby
[19:20:00] truenito: has joined #ruby
[19:21:34] cagomez: has joined #ruby
[19:23:17] workmad3: has joined #ruby
[19:25:05] oetjenj: has joined #ruby
[19:25:09] Luyt: has joined #ruby
[19:25:52] oetjenj: has joined #ruby
[19:26:38] oetjenj: has joined #ruby
[19:30:09] bak1an: has joined #ruby
[19:36:02] johno84: has joined #ruby
[19:41:10] tamouse__: has joined #ruby
[19:47:08] Danishman: has joined #ruby
[19:51:09] bronson: has joined #ruby
[19:51:23] weaksauce: has joined #ruby
[19:52:51] edward_: has joined #ruby
[19:53:44] tcopeland: has joined #ruby
[19:54:42] dionysus69: has joined #ruby
[19:58:51] mostlybadfly: has joined #ruby
[20:04:03] nopoliti1: has joined #ruby
[20:07:44] orbyt_: has joined #ruby
[20:16:33] mkali: has joined #ruby
[20:16:42] rrichardsr3: has joined #ruby
[20:16:59] kliq: has joined #ruby
[20:17:16] __Yiota: has joined #ruby
[20:17:32] phaul: has joined #ruby
[20:17:39] enterprisey: has joined #ruby
[20:19:38] mkali: has left #ruby: ()
[20:21:00] jphase: has joined #ruby
[20:22:43] agent_white: has joined #ruby
[20:23:13] rakm: has joined #ruby
[20:23:57] dinfuehr: has joined #ruby
[20:24:23] cagomez: has joined #ruby
[20:27:50] jenrzzz: has joined #ruby
[20:27:50] jenrzzz: has joined #ruby
[20:28:12] eckhardt: has joined #ruby
[20:28:25] coderphive: has joined #ruby
[20:28:43] mson: has joined #ruby
[20:29:37] jphase: has joined #ruby
[20:30:57] dinfuehr: has joined #ruby
[20:33:58] cadillac__: has joined #ruby
[20:35:40] sepp2k: has joined #ruby
[20:38:20] troulouliou_div2: has joined #ruby
[20:41:22] _aeris_: has joined #ruby
[20:42:34] kliq: has joined #ruby
[20:47:56] RickHull: soliciting feedback on https://github.com/rickhull/ballistics -- particularly if you have strong opinions regarding C extensions
[20:48:40] Joufflu: has joined #ruby
[20:51:24] teatime: RickHull: hmm, interesting for sure.
[20:52:48] RickHull: the README needs a lot of fleshing out, but poke around examples/ then lib/ and test/
[20:53:06] RickHull: oh, and ext/ of course
[20:54:52] teatime: one small question; you vendor gnu_ballistics.h, how come you don't just include whatever one is installed on the system ?
[20:55:27] RickHull: interesting question -- it's almost certainly nonexistent on any given system
[20:55:32] teatime: oh wait... is the whole library in the .h ?
[20:55:43] RickHull: yeah, i'm working on that bit -- I inherited that decision
[20:55:52] teatime: oh, well ok then
[20:56:05] teatime: I was thinking there was a .o/.so expected to be installed
[20:56:06] RickHull: my plan is to keep function declarations in the .h, along with one-liner function definitions
[20:56:44] RickHull: there are many things I don't like about the C stuff, but I'm also relatively uninformed about the proper way to do C stuff
[20:56:52] teatime: any examples?
[20:57:05] teatime: I know slightly more about C than I do about Ruby lol
[20:57:23] RickHull: it would be the blind leading the blind, I fear
[20:58:09] RickHull: what I inherited was a the C lib defined entirely in a .h file
[20:58:32] teatime: lucky for you it's only 500 lines
[20:58:59] RickHull: plus the ext portion, which is the bridge to ruby land
[20:59:26] thomasv314: has joined #ruby
[20:59:27] RickHull: interestingly, the ext portion included significant functionality, not just wrapping
[20:59:37] RickHull: and I think it was somewhat of a duplication of the underlying C lib functionality
[20:59:56] RickHull: I believe this was in order to return a ruby-like-C-object
[21:00:02] RickHull: and I'm not sure it was the right approach
[21:00:25] teatime: have you considered a pure ruby port? :)
[21:00:30] RickHull: if you go back to my first commit, it was the original ballistics gem, as copied into an empty git repo
[21:01:01] RickHull: I'm interested in a pure ruby port academically, but this is heavy maths stuff which deserves a more performant basis
[21:01:31] RickHull: I would probably use Crystal for a pure port
[21:03:33] RickHull: I'm also interested if mruby would be useful for pure port
[21:04:34] thomasv3_: has joined #ruby
[21:09:31] jenrzzz: has joined #ruby
[21:09:31] jenrzzz: has joined #ruby
[21:13:26] sparr: has joined #ruby
[21:14:50] rwb: has joined #ruby
[21:20:34] cschneid_: has joined #ruby
[21:20:47] kliq: has joined #ruby
[21:25:27] milardovich: has joined #ruby
[21:28:08] amirite: has joined #ruby
[21:32:18] mim1k: has joined #ruby
[21:37:26] cschneid_: has joined #ruby
[21:43:57] johno84: has joined #ruby
[21:46:58] ta: has joined #ruby
[21:51:37] blackmesa: has joined #ruby
[21:55:00] ycyclist: has joined #ruby
[21:56:41] nofxxx: has joined #ruby
[22:00:31] rakm: has joined #ruby
[22:05:37] nopoliti1: has joined #ruby
[22:06:59] jenrzzz: has joined #ruby
[22:08:08] iszak: has joined #ruby
[22:08:08] iszak: has joined #ruby
[22:12:23] SeepingN: has joined #ruby
[22:19:47] bronson: has joined #ruby
[22:19:58] charliesome: has joined #ruby
[22:25:56] rfoust: has joined #ruby
[22:29:51] tcopeland: has joined #ruby
[22:33:03] chouhoul_: has joined #ruby
[22:33:04] amirite: has joined #ruby
[22:38:58] alfiemax: has joined #ruby
[22:39:59] shinnya: has joined #ruby
[22:42:19] blackmesa1: has joined #ruby
[22:48:33] foxxx0: has joined #ruby
[22:51:50] thomasv314: has joined #ruby
[22:52:53] pecan_: has joined #ruby
[22:53:01] pecan_: Is it a good idea using rvm as sudo?
[22:53:14] havenwood: pecan_: No, not usually.
[22:53:22] havenwood: pecan_: What are you trying to do?
[22:53:40] pecan_: havenwood: I want to install Vagrant on Gentoo
[22:53:43] havenwood: pecan_: RVM ships a `rvmsudo` command.
[22:54:07] havenwood: Plain `sudo` will drop env and bork RVM but the `rvmsudo` command preserves RVM env
[22:55:28] pecan_: I've installed rvm and system Ruby. Is it proper?
[22:56:14] havenwood: pecan_: It's fine to have both. I don't know if you actually need both.
[22:57:12] pecan_: System Ruby is required to working some of packages.
[22:57:38] pecan_: vim uses system Ruby
[22:58:05] Paraxial: has joined #ruby
[22:59:09] matthewd: I would expect there to be a Vagrant package you could install, and completely ignore what language Vagrant is allegedly written in
[23:00:04] RickHull: yes, vagrant install should not require rvm
[23:00:06] nopoliti1: has joined #ruby
[23:00:17] pecan_: I want to install Vagrant on Gentoo
[23:00:26] RickHull: on debian it was `apt install vagrant`
[23:00:29] pecan_: Vagrant shouldn't be installed through package managers
[23:01:04] pecan_: Source: https://www.vagrantup.com/intro/getting-started/install.html
[23:01:17] jenrzzz: has joined #ruby
[23:01:17] pecan_: Look at "Caveats"
[23:01:50] pecan_: I'm unsure if compiling from sources Vagrant and installing it by "bundle install" on Gentoo is a good idea
[23:02:01] nerium: has joined #ruby
[23:02:12] RickHull: I would start with the Gentoo version of vagrant, i.e. native package
[23:02:22] RickHull: if you run into issues, doubtful, then consider the nuclear option
[23:02:50] teatime: pecan_: to answer your original question, I don't think you have any reason to want to run any of those tools as root
[23:02:53] RickHull: those caveats make sense from hashicorp's perspective -- they can't support gentoo's version
[23:02:57] matthewd: I think you want #vagrant
[23:03:17] RickHull: yeah, check with #vagrant
[23:03:57] pecan_: They supports CentOS, Debian, Mac OS X and Windows
[23:04:17] RickHull: in general, if you are installing "by hand", you would want to do all your building as non-root, then just copy the needed binaries into place with root privileges as necessary
[23:04:44] pecan_: #vagrant channel is empty
[23:04:49] RickHull: it's a mistake to run the whole build pipeline as root, just because the binaries want to live in a privileged dir
[23:04:52] teatime: RickHull: I don't think that applies in this situation at all
[23:05:06] pecan_: Nothing traffic on #vagrant
[23:05:08] matthewd: That doesn't make us any more capable of providing support for their software
[23:05:10] RickHull: teatime: i am talking about the equivalent of `make; sudo make install`
[23:05:28] thinkpad: has joined #ruby
[23:05:31] gma: has joined #ruby
[23:05:36] pecan_: I've error http://paste.asie.pl/rbN1
[23:05:39] RickHull: but yeah, I'm kind of stabbing :)
[23:05:41] teatime: RickHull: there's not build so much as 1) setup an install of a recent version of ruby, in your homedir, 2) install a bunch of gems or whatever, in your homedir / in the rvm "virtualenv" or whatever it calls it
[23:05:51] teatime: and eventually N) run the application, as your user
[23:06:04] RickHull: i don't think you need or want root at all, in that case
[23:06:13] eckhardt: has joined #ruby
[23:06:24] RickHull: but if you want vagrant installed "on your system" you do need to copy to a privileged dir
[23:06:56] RickHull: I still suggest to use Gentoo's vagrant, and only escalate from there as needed
[23:07:00] teatime: pecan_: religiously *not* running tools like rvm, gem, bundle, pip, npm, etc. is a handy way to ensure they don't bork anything about your system-installed $language, which you generally want to keep under the management of your distro's package management instead
[23:07:43] teatime: </experienced-sysadmin-but-ruby-n00b-speaking
[23:07:44] __Yiota: has joined #ruby
[23:07:58] teatime: oh + "as root"
[23:08:45] RickHull: yeah, there are 2 basic approaches: 1. build and install in unprivileged userland 2. install a package as root
[23:09:30] RickHull: these are generally reliable and uncontroversial. (1) is preferred if it meets your use case, where you don't have other system users who require the installed functionality
[23:13:18] teatime: ugh at one point I had a really nice dev environment setup that routed all of the gems, python packages, npm crap, perl libs, etc. to the correct places, in general and for per-project libs, and now I have pretty much forgotten all the details of the env vars etc. etc whatever for each tool, and will eventually have to start over on that
[23:13:43] matthewd: We support ruby developers working on ruby code. We do not, and cannot, support full applications that just happen to be written in ruby. (Just as ##c won't help you install Apache.)
[23:14:37] eckhardt: has joined #ruby
[23:17:52] teatime: pecan_: there's quite a bit of relevant stuff in the rvm documentation
[23:18:35] nopoliti1: has joined #ruby
[23:19:53] bronson: has joined #ruby
[23:21:49] pecan_: I still have error http://paste.asie.pl/rbN1
[23:21:54] pecan_: I emerged vagrant
[23:21:56] bwilson: has joined #ruby
[23:24:14] bwilson: has joined #ruby
[23:24:43] selim: has joined #ruby
[23:25:25] RickHull: the PKGBUILD (sp?) for vagrant should include that gem, checkpoint
[23:25:34] matthewd: That's probably running the other one you installed earlier. But again, we are not here to support this.
[23:26:10] RickHull: and yeah, you have to be careful about which set of ruby tools is first in PATH
[23:27:09] RickHull: or takes precedence. this can be hairy
[23:28:11] thomasv314: has joined #ruby
[23:32:03] wald0: has joined #ruby
[23:32:41] mim1k: has joined #ruby
[23:33:54] thomasv314: has joined #ruby
[23:35:35] ta: has joined #ruby
[23:36:50] MacMeep: has joined #ruby
[23:49:25] pecan_: Is it proper: ruby --version shows ruby 2.2.8p477 (2017-09-14 revision 59906) [x86_64-linux]
[23:49:39] pecan_: but I've /usr/lib64/ruby/site_ruby/2.2.0/rubygems
[23:49:51] pecan_: 2.2.0 and 2.2.8p477 - different versions
[23:53:37] serhart: has joined #ruby
[23:53:43] orbyt_: has joined #ruby
[23:56:37] eckhardt: has joined #ruby
[23:57:39] serhart: has joined #ruby
[23:58:16] dviola: has joined #ruby