baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
sameerynho has quit [Ping timeout: 272 seconds]
fschuindt has joined #ruby
<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.
DTZUZO has quit [Ping timeout: 246 seconds]
arescorpio has joined #ruby
Turnikov has quit [Quit: Leaving]
Azure has quit [Ping timeout: 245 seconds]
tty has quit [Quit: tty]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
DTZUZO has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
tdy has joined #ruby
jdawgaz has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
orbyt_ has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
_whitelogger has joined #ruby
_whitelogger has joined #ruby
pskosinski has quit [Ping timeout: 240 seconds]
pskosinski has joined #ruby
cosmopaladin has joined #ruby
kent\n has quit [Quit: Quitting]
postmodern has joined #ruby
AJA4350 has quit [Remote host closed the connection]
cosmopaladin has quit [Quit: Leaving]
apeiros has quit [Ping timeout: 240 seconds]
minimal_life has joined #ruby
arescorpio has quit [Quit: Leaving.]
kent\n has joined #ruby
jrgifford has joined #ruby
apeiros has joined #ruby
Azure has joined #ruby
minimal_life has quit [Quit: I am functioning within established parameters.]
braincrash has quit [Quit: bye bye]
fschuindt has quit [Quit: WeeChat 2.2]
thy0 has quit [Quit: TTFN]
dar123 has joined #ruby
brandoncc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patr0clus has quit [Read error: Connection reset by peer]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sigyn has left #ruby ["Leaving the channel (no spam or action taken for 30 days.) /invite Sigyn #ruby again if needed"]
Freshnuts has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_whitelogger has joined #ruby
kapil___ has joined #ruby
wojnar has quit [Remote host closed the connection]
xfbs has joined #ruby
orbyt_ has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_whitelogger has joined #ruby
TheBloke has quit [Ping timeout: 244 seconds]
DoubleMalt has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
TheBloke has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reber has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tty has joined #ruby
Tempesta has joined #ruby
jp has quit [Ping timeout: 252 seconds]
Freshnuts has quit [Quit: Leaving]
moei has quit [Ping timeout: 260 seconds]
lomex has joined #ruby
MoritaShinobu has joined #ruby
conta1 has joined #ruby
jamesaxl has quit [Quit: WeeChat 2.2]
doubledup has joined #ruby
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Freshnuts has joined #ruby
dr3w_ has quit [Ping timeout: 244 seconds]
dr3w_ has joined #ruby
sameerynho has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
jp has joined #ruby
al2o3-cr has joined #ruby
xfbs has quit [Quit: afk]
desperek has joined #ruby
rippa has joined #ruby
clemens3 has joined #ruby
tty has quit [Quit: tty]
leitz has joined #ruby
dviola has quit [Quit: WeeChat 2.2]
DTZUZO has quit [Ping timeout: 244 seconds]
al2o3-cr has quit [Ping timeout: 272 seconds]
mkroman has joined #ruby
<leitz> Good morning apeiros!
<apeiros> moin leitz
<leitz> This morning's work has been to understand more of what havenwood talked about. Especially tests. https://github.com/LeamHall/ruby_namespace
<apeiros> good thing :)
dionysus69 has joined #ruby
matcouto has joined #ruby
DTZUZO has joined #ruby
apg has joined #ruby
xfbs has joined #ruby
_whitelogger has joined #ruby
apg has quit [Ping timeout: 244 seconds]
xfbs has quit [Quit: afk]
matcouto has quit [Quit: This computer has gone to sleep]
dr3w_ has joined #ruby
xfbs has joined #ruby
_whitelogger has joined #ruby
segy has quit [Read error: Connection reset by peer]
Azure has quit [Ping timeout: 240 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
_whitelogger has joined #ruby
wojnar has joined #ruby
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
DTZUZO has quit [Ping timeout: 272 seconds]
leitz has quit [Quit: Leaving]
kotepillar_ has joined #ruby
AJA4350 has joined #ruby
conta1 has quit [Quit: conta1]
xfbs has quit [Quit: afk]
tty has joined #ruby
xfbs has joined #ruby
wojnar has quit [Read error: Connection reset by peer]
wojnar has joined #ruby
thy0 has joined #ruby
clemens3 has quit [Ping timeout: 240 seconds]
clemens3_ has joined #ruby
dr3w_ has joined #ruby
postmodern has quit [Quit: Leaving]
wojnar has quit [Read error: Connection reset by peer]
wojnar has joined #ruby
moei has joined #ruby
dar123 has joined #ruby
kotepillar_ has quit [Quit: kotepillar_]
garyserj has joined #ruby
blackmesa has joined #ruby
blackmesa has quit [Client Quit]
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
<garyserj> I notice that #rails has gone invite only
<garyserj> how can i make 'c' continue in pry-byebug?
<garyserj> why isn't it default anyway?
<havenwood> garyserj: Pry.commands.alias_command 'c', 'continue'
<apeiros> garyserj: the channel is #rubyonrails
<havenwood> garyserj: The single letter aliases were removed because they "... conflict with scratch variable names"
<apeiros> and that one isn't invite only
<garyserj> thanks
abbruzzese has joined #ruby
abbruzzese has quit [Quit: Leaving]
xfbs has quit [Quit: afk]
abbruzzese has joined #ruby
lomex has joined #ruby
xfbs has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cesario has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
apeiros__ has joined #ruby
gnufied__ has quit [Ping timeout: 244 seconds]
garyserjj has joined #ruby
nicesignal has quit [Quit: WeeChat 1.9.1]
<garyserjj> exit
garyserjj has quit [Quit: leaving]
GodFather_ has quit [Quit: Ex-Chat]
tdy has quit [Ping timeout: 272 seconds]
GodFather has quit [Ping timeout: 252 seconds]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 246 seconds]
noobineer has joined #ruby
abbruzzese has quit [Quit: Leaving]
govg has joined #ruby
jdawgaz has joined #ruby
garyserj has quit [Ping timeout: 252 seconds]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros__> is there a nice umbrella term for authentication, authorization, audit which isn't just the AAA abbreviation?
xfbs has quit [Quit: afk]
TomyLobo has joined #ruby
<havenwood> au{dit,n|z} ;-P
<havenwood> apeiros__: I think just AAA
<apeiros__> uuuuuh, no :D
apeiros__ is now known as apeiros
<havenwood> yeah, I don't know of anything nicer or more descriptive
<apeiros> meh, I even prefer my working name over AAA (I currently use "Access")
<Yxhuvud> audit? Accounting is more common.
<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.
<Yxhuvud> at least in telecom
<apeiros> hm
<apeiros> though that seems to have a different meaning
<apeiros> seems to be accounting as in billing
<apeiros> no?
<Yxhuvud> yes. it is about producing those horrible csv files that are used for measuring usage.
Azure has joined #ruby
<apeiros> anyway, I think I got my umbrella term: AccessControl (and billing for me isn't part of that :D)
doubledup has quit [Quit: Leaving]
ignazioc has joined #ruby
<ignazioc> Hi there. First time on this chan.
<apeiros> hi ignazioc
<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
<ignazioc> s with a SQLIte DB.
<ignazioc> I cannot use the word as index, because I'm interested on words that matches the input
<apeiros> what's considered a match?
<ignazioc> I would say `start_with?` is the ideal match
<apeiros> "ideal" = "only way to"?
<ignazioc> I know that with a full match I could use a binary search
<apeiros> you can use binary search with prefix match too
<apeiros> and also database indices (not sure about sqlite, but certainly pg)
<ignazioc> I'm making an Alfred workflow (do you know alfred?) so I cannot have too many dependencies and it must be really fast.
<apeiros> I wouldn't know why your code being an alfred workflow implies not too many dependencies.
<apeiros> I wouldn't know either wha the threshold for "too many dependencies" would be
<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.
<ignazioc> But this is out of scope.
<ignazioc> you say that binary search will work also with the prefix match?
<apeiros> it isn't. it's part of your requirement set.
<apeiros> if you just leave out your actual requirements, you'll get unsuitable solutions.
akem has quit [Remote host closed the connection]
akem has joined #ruby
<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.
<apeiros> hence "what's considered a match"?
<apeiros> is it always the needle being the prefix of the word in the list?
<ignazioc> sorry I'm confused :) In a list of sorted words, I can find a specific one using binary search. this is clear.
<apeiros> yes. but what you want is search the boundaries.
dionysus69 has joined #ruby
<ignazioc> but if I have a list like AAA, AAB, AAC, ABB and I'm search for "everything that starts with "AA"
<ignazioc> how can I apply binary search?
<apeiros> you compare the first 2 letters. and you use a binary search variant which gives you left & right boundary.
ignazioc has quit [Remote host closed the connection]
<apeiros> hm, bye? :D
ignazioc has joined #ruby
<ignazioc> hum, right. I can take in account only the part of the word with the same lenght of the input
<ignazioc> thanks, I'll try to follow this approach
<ignazioc> (y)
<apeiros> basically all you need is bsearch_index + take_while
akem has quit [Remote host closed the connection]
akem has joined #ruby
<apeiros> or alternatively (since ruby's bsearch sadly does not support a find-max mode) a reversed wordlist. then you do bsearch twice.
xfbs has joined #ruby
xfbs has quit [Client Quit]
<ignazioc> @ape
<apeiros> yeah, no. you only use ape to abbreviate my nick if you intend to offend me.
<apeiros> ?tabnick
<ruby[bot]> pro-tip - use tab completion for nicks. avoids typos in nicks.
<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?
<ignazioc> (can you believe is my first time on IRC?)
<apeiros> well, I hope you don't have to load the wordlist every time…
<apeiros> iow, I'd keep a wordlist and a reverse-ordered wordlist in memory.
<apeiros> but yes. that's what I meant by "you want the boundaries". search first and last index matching your criterion
<ignazioc> I have to load for each search. For this reason also the parsing is important.
<apeiros> that sounds terrible.
<apeiros> seems to me like alfred provides ways to avoid that
<ignazioc> now it seems also to me :)
<ignazioc> oh man, it started this morning with a "this will be just 5 lines of Ruby" :D
<apeiros> it is. if you work with incomplete requirements. such as omitting "performance matters"
<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.
<ignazioc> thanks for your help!
gnufied__ has joined #ruby
gnufied__ has quit [Client Quit]
<apeiros> btw., you don't have to read the full file if you prepare the file well
<apeiros> or rather, if you split it up well (assuming you can deploy multiple files instead of just one)
brandoncc has joined #ruby
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
xfbs has joined #ruby
cesario has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
PasNox has left #ruby ["Parting"]
xfbs has quit [Client Quit]
xfbs has joined #ruby
conta1 has joined #ruby
lomex has joined #ruby
_whitelogger has joined #ruby
Puffball has quit [Remote host closed the connection]
pabs has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
mrush has quit [Quit: leaving]
bak1an has joined #ruby
SeepingN has joined #ruby
ignazioc has quit [Ping timeout: 245 seconds]
roshanavand has joined #ruby
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gravitation has joined #ruby
gravitation has quit [Client Quit]
Rich_Morin_ has left #ruby [#ruby]
dinfuehr has quit [Ping timeout: 245 seconds]
dinfuehr has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sspreitz has quit [Quit: ZNC 1.6.2 - http://znc.in]
sspreitz has joined #ruby
jottr has joined #ruby
jasmith has joined #ruby
mikkel- has joined #ruby
dionysus70 has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 252 seconds]
dionysus70 is now known as dionysus69
jdawgaz has joined #ruby
dar123 has joined #ruby
guardian has joined #ruby
<guardian> hello, what's the idiomatic way to use h.dig(:foo, :bar) and set it to true only if it's nil
orbyt_ has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
lytol_ has joined #ruby
MoritaShinobu has quit [Quit: Leaving]
conta1 has quit [Quit: conta1]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand has quit [Quit: leaving]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
armatechnicos has joined #ruby
jdawgaz has joined #ruby
armatechnicos has quit [Read error: Connection reset by peer]
<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.
<apeiros> depending on your specific situation, there may be better ways.
houhoulis has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
sspreitz has quit [Ping timeout: 252 seconds]
sspreitzer has joined #ruby
dviola has joined #ruby
nima_m has joined #ruby
bak1an has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 252 seconds]
bmurt has joined #ruby
bmurt has quit [Ping timeout: 245 seconds]
lytol_ has quit [Remote host closed the connection]
reber has quit [Remote host closed the connection]
eugene_b has joined #ruby
\void has joined #ruby
lembron has joined #ruby
<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?
<lembron> otherwise bundler refuses todo anything without install inbetween, even tho "both rubys" technically have everything installed they need
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
desperek has quit [Quit: xoxo]
mikecmpbll has joined #ruby
patr0clus has joined #ruby
Pisuke has quit [Excess Flood]
Pisuke has joined #ruby
xfbs has quit [Quit: afk]
mikecmpbll has quit [Quit: inabit. zz.]
tdy has joined #ruby
govg has quit [Ping timeout: 244 seconds]
AndreYuhai has joined #ruby
<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
nfk has joined #ruby
<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)
<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.
<apeiros> requires load files. files contain constants. constants are global.
<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.
<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)
<AndreYuhai> apeiros: well, what if I wanted to run core.rb directly? Would it work in this situation?
<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
nima_m has quit [Quit: Connection closed for inactivity]
<AndreYuhai> and run*
<apeiros> AndreYuhai: no, it wouldn't
<apeiros> see 'good practice'.
<AndreYuhai> apeiros: Now everything is clear. Thank you. :)
<apeiros> yw
clemens3_ has quit [Ping timeout: 244 seconds]
_whitelogger has joined #ruby
AndreYuhai has quit [Quit: Page closed]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
houhoulis has quit []
agent_white has joined #ruby
TomyLobo has quit [Read error: Connection reset by peer]
DTZUZO has joined #ruby
houhoulis has joined #ruby
<lembron> guess bind mount it is *shrugs*
ellcs has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
r3m is now known as Pascal
Pascal is now known as r3m
orbyt_ has joined #ruby
DTZUZO has quit [Ping timeout: 245 seconds]
druonysus has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
apeiros has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
hojuruku has joined #ruby
sameerynho has quit [Ping timeout: 252 seconds]
ellcs has quit [Ping timeout: 240 seconds]
DTZUZO has joined #ruby
patr0clus has quit [Quit: WeeChat 2.1]
houhoulis has quit []
tristanp has joined #ruby