« Back to channel list

#ruby - 09 September 2018

« Back 1 day Forward 1 day »
[00:08:39] fschuindt: has joined #ruby
[00:10:42] fschuindt: Hi there, folks. I'm just starting this project: https://github.com/fschuindt/toucan A framework for CLI applications. I hope someone find use of it. :] (Any kind of contribution is welcome!) Thank you.
[00:11:41] arescorpio: has joined #ruby
[00:31:53] bmurt: has joined #ruby
[00:32:03] DTZUZO: has joined #ruby
[00:54:11] Nicmavr: has joined #ruby
[00:54:51] tdy: has joined #ruby
[00:59:39] jdawgaz: has joined #ruby
[01:05:45] graphene: has joined #ruby
[01:11:21] orbyt_: has joined #ruby
[01:16:40] graphene: has joined #ruby
[01:27:12] _whitelogger: has joined #ruby
[01:36:10] _whitelogger: has joined #ruby
[01:38:54] pskosinski: has joined #ruby
[01:43:43] cosmopaladin: has joined #ruby
[01:53:28] postmodern: has joined #ruby
[02:06:11] minimal_life: has joined #ruby
[02:17:31] kent\n: has joined #ruby
[02:27:26] jrgifford: has joined #ruby
[02:35:21] apeiros: has joined #ruby
[02:39:48] Azure: has joined #ruby
[03:51:29] dar123: has joined #ruby
[04:21:27] Sigyn: has left #ruby: ("Leaving the channel (no spam or action taken for 30 days.) /invite Sigyn #ruby again if needed")
[04:24:17] Freshnuts: has joined #ruby
[04:36:10] _whitelogger: has joined #ruby
[04:36:58] kapil___: has joined #ruby
[04:58:56] xfbs: has joined #ruby
[04:59:56] orbyt_: has joined #ruby
[05:18:12] _whitelogger: has joined #ruby
[05:25:48] DoubleMalt: has joined #ruby
[05:27:54] TheBloke: has joined #ruby
[05:52:02] reber: has joined #ruby
[06:11:20] tty: has joined #ruby
[06:17:28] Tempesta: has joined #ruby
[06:40:29] lomex: has joined #ruby
[06:45:44] MoritaShinobu: has joined #ruby
[06:55:33] conta1: has joined #ruby
[07:13:54] doubledup: has joined #ruby
[07:34:17] Freshnuts: has joined #ruby
[07:38:03] dr3wo: has joined #ruby
[07:41:38] sameerynho: has joined #ruby
[07:54:31] jp: has joined #ruby
[07:55:47] al2o3-cr: has joined #ruby
[08:20:22] desperek: has joined #ruby
[08:23:36] rippa: has joined #ruby
[08:24:29] clemens3: has joined #ruby
[08:32:57] leitz: has joined #ruby
[09:00:58] mkroman: has joined #ruby
[09:10:06] leitz: Good morning apeiros!
[09:10:15] apeiros: moin leitz
[09:12:33] leitz: This morning's work has been to understand more of what havenwood talked about. Especially tests. https://github.com/LeamHall/ruby_namespace
[09:17:09] apeiros: good thing :)
[09:19:18] dionysus69: has joined #ruby
[09:24:11] matcouto: has joined #ruby
[09:26:07] DTZUZO: has joined #ruby
[09:30:33] apg: has joined #ruby
[09:50:46] xfbs: has joined #ruby
[09:54:11] _whitelogger: has joined #ruby
[10:27:52] dr3wo: has joined #ruby
[10:38:12] xfbs: has joined #ruby
[10:42:12] _whitelogger: has joined #ruby
[11:34:26] Nicmavr: has joined #ruby
[11:48:12] _whitelogger: has joined #ruby
[11:59:57] wojnar: has joined #ruby
[12:00:29] jdawgaz: has joined #ruby
[12:03:40] jdawgaz: has joined #ruby
[12:13:46] kotepillar_: has joined #ruby
[12:15:14] AJA4350: has joined #ruby
[12:25:51] tty: has joined #ruby
[12:27:04] xfbs: has joined #ruby
[12:29:16] wojnar: has joined #ruby
[12:48:21] thy0: has joined #ruby
[12:56:12] clemens3_: has joined #ruby
[13:02:27] dr3wo: has joined #ruby
[13:13:08] wojnar: has joined #ruby
[13:19:34] moei: has joined #ruby
[13:24:20] dar123: has joined #ruby
[13:42:43] garyserj: has joined #ruby
[13:46:59] blackmesa: has joined #ruby
[13:55:31] zapata: has joined #ruby
[14:01:03] garyserj: I notice that #rails has gone invite only
[14:01:43] garyserj: how can i make 'c' continue in pry-byebug?
[14:01:48] garyserj: why isn't it default anyway?
[14:02:25] havenwood: garyserj: Pry.commands.alias_command 'c', 'continue'
[14:03:05] apeiros: garyserj: the channel is #rubyonrails
[14:03:09] havenwood: garyserj: The single letter aliases were removed because they "... conflict with scratch variable names"
[14:03:14] apeiros: and that one isn't invite only
[14:10:54] abbruzzese: has joined #ruby
[14:14:14] abbruzzese: has joined #ruby
[14:14:48] lomex: has joined #ruby
[14:15:48] xfbs: has joined #ruby
[14:19:14] cesario: has joined #ruby
[14:20:01] apeiros__: has joined #ruby
[14:21:54] garyserjj: has joined #ruby
[14:38:35] noobineer: has joined #ruby
[14:44:18] govg: has joined #ruby
[14:47:14] jdawgaz: has joined #ruby
[15:01:09] jdawgaz: has joined #ruby
[15:02:28] apeiros__: is there a nice umbrella term for authentication, authorization, audit which isn't just the AAA abbreviation?
[15:05:06] TomyLobo: has joined #ruby
[15:05:53] havenwood: au{dit,n|z} ;-P
[15:07:55] havenwood: apeiros__: I think just AAA
[15:07:55] apeiros__: uuuuuh, no :D
[15:08:10] havenwood: yeah, I don't know of anything nicer or more descriptive
[15:08:23] apeiros: meh, I even prefer my working name over AAA (I currently use "Access")
[15:08:26] yxhuvud: audit? Accounting is more common.
[15:09:57] apeiros: for real? I always thought the last A was for Auditing. but may well be, after all I never read it from a formal source.
[15:10:06] yxhuvud: at least in telecom
[15:10:36] apeiros: though that seems to have a different meaning
[15:10:41] apeiros: seems to be accounting as in billing
[15:10:48] yxhuvud: yes. it is about producing those horrible csv files that are used for measuring usage.
[15:14:16] Azure: has joined #ruby
[15:15:46] apeiros: anyway, I think I got my umbrella term: AccessControl (and billing for me isn't part of that :D)
[15:24:44] ignazioc: has joined #ruby
[15:25:24] ignazioc: Hi there. First time on this chan.
[15:28:02] apeiros: hi ignazioc
[15:35:06] ignazioc: I have a huge dictionary in CSV format with more than 1million rows.The first column contains a word and the second one the translation. The lines are sorted.I need to find all the words that matches an input string, and show all the translation.This is not difficult, but it takes ~2sec on my machine.I'm wondering if I would have better performance
[15:35:07] ignazioc: s with a SQLIte DB.
[15:35:43] ignazioc: I cannot use the word as index, because I'm interested on words that matches the input
[15:37:26] apeiros: what's considered a match?
[15:38:15] ignazioc: I would say `start_with?` is the ideal match
[15:38:37] apeiros: "ideal" = "only way to"?
[15:38:38] ignazioc: I know that with a full match I could use a binary search
[15:38:53] apeiros: you can use binary search with prefix match too
[15:39:09] apeiros: and also database indices (not sure about sqlite, but certainly pg)
[15:39:53] ignazioc: I'm making an Alfred workflow (do you know alfred?) so I cannot have too many dependencies and it must be really fast.
[15:40:40] apeiros: I wouldn't know why your code being an alfred workflow implies not too many dependencies.
[15:40:50] apeiros: I wouldn't know either wha the threshold for "too many dependencies" would be
[15:42:46] ignazioc: alfred workflow do not have a real "installation" process. this is why dependencies are bad. Because if you wanna share it, you need to explain how to prepare the machine.
[15:42:51] ignazioc: But this is out of scope.
[15:43:25] ignazioc: you say that binary search will work also with the prefix match?
[15:43:32] apeiros: it isn't. it's part of your requirement set.
[15:43:51] apeiros: if you just leave out your actual requirements, you'll get unsuitable solutions.
[15:44:18] akem: has joined #ruby
[15:44:33] apeiros: yes. binary search is based on comparisons. those work just fine on prefixes. but you'll have the know from when on you consider it a match.
[15:44:45] apeiros: hence "what's considered a match"?
[15:45:06] apeiros: is it always the needle being the prefix of the word in the list?
[15:46:38] ignazioc: sorry I'm confused :) In a list of sorted words, I can find a specific one using binary search. this is clear.
[15:46:58] apeiros: yes. but what you want is search the boundaries.
[15:47:18] dionysus69: has joined #ruby
[15:47:29] ignazioc: but if I have a list like AAA, AAB, AAC, ABB and I'm search for "everything that starts with "AA"
[15:47:37] ignazioc: how can I apply binary search?
[15:48:15] apeiros: you compare the first 2 letters. and you use a binary search variant which gives you left & right boundary.
[15:48:35] apeiros: hm, bye? :D
[15:51:52] ignazioc: has joined #ruby
[15:52:03] ignazioc: hum, right. I can take in account only the part of the word with the same lenght of the input
[15:52:24] ignazioc: thanks, I'll try to follow this approach
[15:53:17] apeiros: basically all you need is bsearch_index + take_while
[15:58:16] akem: has joined #ruby
[15:58:25] apeiros: or alternatively (since ruby's bsearch sadly does not support a find-max mode) a reversed wordlist. then you do bsearch twice.
[15:59:18] xfbs: has joined #ruby
[16:03:23] apeiros: yeah, no. you only use ape to abbreviate my nick if you intend to offend me.
[16:03:39] ruby[bot]: pro-tip - use tab completion for nicks. avoids typos in nicks.
[16:03:59] ignazioc: @apeiros you mean, first time I get the first word that matches my criteria, then I reverse the dataset and search for the last one?
[16:04:17] ignazioc: (can you believe is my first time on IRC?)
[16:04:20] apeiros: well, I hope you don't have to load the wordlist every timeā€¦
[16:04:37] apeiros: iow, I'd keep a wordlist and a reverse-ordered wordlist in memory.
[16:05:08] apeiros: but yes. that's what I meant by "you want the boundaries". search first and last index matching your criterion
[16:05:14] ignazioc: I have to load for each search. For this reason also the parsing is important.
[16:05:28] apeiros: that sounds terrible.
[16:06:01] apeiros: https://alfredworkflow.readthedocs.io/en/latest/user-manual/background.html
[16:06:36] apeiros: seems to me like alfred provides ways to avoid that
[16:06:52] ignazioc: now it seems also to me :)
[16:07:37] ignazioc: oh man, it started this morning with a "this will be just 5 lines of Ruby" :D
[16:09:48] apeiros: it is. if you work with incomplete requirements. such as omitting "performance matters"
[16:12:31] ignazioc: I was expecting a smaller file to work with. I'm ok to wait 1 sec, but with this huge file, the performances are becoming important.
[16:12:38] ignazioc: thanks for your help!
[16:14:58] gnufied__: has joined #ruby
[16:16:11] apeiros: btw., you don't have to read the full file if you prepare the file well
[16:17:31] apeiros: or rather, if you split it up well (assuming you can deploy multiple files instead of just one)
[16:18:18] brandoncc: has joined #ruby
[16:20:35] xfbs: has joined #ruby
[16:22:39] PasNox: has left #ruby: ("Parting")
[16:24:05] xfbs: has joined #ruby
[16:25:18] conta1: has joined #ruby
[16:27:12] lomex: has joined #ruby
[16:39:16] jdawgaz: has joined #ruby
[16:41:10] _whitelogger: has joined #ruby
[16:42:55] pabs: has joined #ruby
[16:49:01] jdawgaz: has joined #ruby
[17:04:20] bak1an: has joined #ruby
[17:06:28] SeepingN: has joined #ruby
[17:08:21] roshanavand: has joined #ruby
[17:15:26] gravitation: has joined #ruby
[17:37:28] Rich_Morin_: has left #ruby: ()
[17:39:30] dinfuehr: has joined #ruby
[17:46:03] sspreitz: has joined #ruby
[17:48:35] jottr: has joined #ruby
[17:53:00] jasmith: has joined #ruby
[18:03:24] mikkel-: has joined #ruby
[18:26:03] dionysus70: has joined #ruby
[18:28:59] jdawgaz: has joined #ruby
[18:29:04] dar123: has joined #ruby
[18:48:32] guardian: has joined #ruby
[18:48:56] guardian: hello, what's the idiomatic way to use h.dig(:foo, :bar) and set it to true only if it's nil
[18:49:53] orbyt_: has joined #ruby
[18:51:12] lytol_: has joined #ruby
[19:11:25] armatechnicos: has joined #ruby
[19:14:29] jdawgaz: has joined #ruby
[19:24:54] apeiros: guardian: since dig doesn't take a block and there's no Hash/Array#bury, you'll have to do this by hand, initializing all intermediate objects if necessary.
[19:26:15] apeiros: depending on your specific situation, there may be better ways.
[19:33:33] houhoulis: has joined #ruby
[19:41:01] sspreitzer: has joined #ruby
[19:49:15] dviola: has joined #ruby
[19:54:29] nima_m: has joined #ruby
[19:58:35] bak1an: has joined #ruby
[20:28:04] bmurt: has joined #ruby
[20:52:09] eugene_b: has joined #ruby
[20:54:31] \void: has joined #ruby
[21:04:00] lembron: has joined #ruby
[21:05:08] lembron: hi, gem/bundler question - i want to have "two bundles" installed, from windows AND wsl ussage in "the same thing" - but those lockfiles collide with each other.. -- can i do smth to "make it use Gemfile.win.lock" or so?
[21:05:53] lembron: otherwise bundler refuses todo anything without install inbetween, even tho "both rubys" technically have everything installed they need
[21:08:54] mikecmpbll: has joined #ruby
[21:09:51] patr0clus: has joined #ruby
[21:12:52] Pisuke: has joined #ruby
[21:28:18] tdy: has joined #ruby
[21:46:08] AndreYuhai: has joined #ruby
[21:47:09] AndreYuhai: Hello! I wonder how this guy's "include" lines work without "require_relative" or something like that? https://github.com/eVanilla/instabot.rb/blob/master/lib/instabot/core.rb I would really like to know how
[21:47:57] nfk: has joined #ruby
[21:50:26] apeiros: AndreYuhai: by having this: https://github.com/eVanilla/instabot.rb/blob/master/lib/instabot.rb
[21:51:19] apeiros: though if they'd do it correctly, they'd require instabot in instabot/core (also they'd use require instead of require_relative, but I've given up on that)
[21:53:15] AndreYuhai: apeiros: Yes I had seen that but I couldn't understand how that file effects also core.rb . I mean if I am not mistaken he is even using "login" method inside that core.rb.
[21:58:12] apeiros: requires load files. files contain constants. constants are global.
[21:58:42] apeiros: you don't have to do the require directly in the file where you're using the constant. just somewhere in your code before you access the constant.
[21:59:28] apeiros: but it's good practice to require all files you rely on in each file you rely on. even if only via an indirection like here by requiring 'instabot' (which in turn requires everything)
[22:03:11] AndreYuhai: apeiros: well, what if I wanted to run core.rb directly? Would it work in this situation?
[22:03:46] AndreYuhai: I mean for example just below the code we could create an instance an run a method of that class which also runs that "login" method
[22:04:51] apeiros: AndreYuhai: no, it wouldn't
[22:04:56] apeiros: see 'good practice'.
[22:05:52] AndreYuhai: apeiros: Now everything is clear. Thank you. :)
[22:12:12] _whitelogger: has joined #ruby
[22:35:01] agent_white: has joined #ruby
[22:41:44] DTZUZO: has joined #ruby
[22:46:44] houhoulis: has joined #ruby
[22:48:19] lembron: guess bind mount it is *shrugs*
[22:50:37] ellcs: has joined #ruby
[22:54:52] graphene: has joined #ruby
[22:58:55] orbyt_: has joined #ruby
[23:23:10] apeiros: has joined #ruby
[23:24:47] hojuruku: has joined #ruby
[23:38:48] DTZUZO: has joined #ruby
[23:56:49] tristanp: has joined #ruby