<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]
<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.
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
<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]