jenrzzz has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
poro has quit [Read error: Connection reset by peer]
poro_ has joined #ruby
duderonomy has quit [Ping timeout: 258 seconds]
<havenwood>
xco: #flat_map and #map
<havenwood>
xco: data = 1.upto(100).flat_map do
<havenwood>
xco: ...(:tag).map do |row|
<havenwood>
smccarthy: Lambda requires preselection of gems, afaik. May be a way, but dunno.
oddduck has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
<oddduck>
Is there anything like a Resource monad in ruby, maybe from the various dry-* gems? The resource would be constructed with "acquire" and "release" lambdas/blocks. When I bind or fmap, acquire would be run, result passed to function being bound, then release would be run.
<oddduck>
Actually I don't think it could be a Monad. But some standard bracket implementation basically that defers execution of acuqire and release until used, and that can be composed with other brackets easily somehow
cnsvc_ has joined #ruby
<xco>
havenwood yup!
cnsvc_ has quit [Ping timeout: 240 seconds]
<smccarthy>
havenwood: Oh, I got around it before by doing this : gems_lib = "/tmp/#{package}/vendor/bundle/ruby/2.5.0/gems/**/lib" ; load_paths = Dir[gems_lib] ; $LOAD_PATH.unshift(*load_paths) , but this failed for me for concurrent-ruby, since I needed this : $LOAD_PATH.unshift("/tmp/#{package}/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby")
<smccarthy>
I was hoping bundler inline would get me away from this hackyness of adding the gems to the $LOAD_PATH
AndreYuhai has quit [Quit: Leaving]
duderonomy has quit [Ping timeout: 256 seconds]
bsdbandit-01 has quit [Ping timeout: 265 seconds]
bsdband8 has joined #ruby
jenrzzz_ has quit [Ping timeout: 246 seconds]
kinduff has quit [Read error: Connection reset by peer]
bruce_lee has quit [Ping timeout: 256 seconds]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
kinduff has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
duderonomy has joined #ruby
jenrzzz has joined #ruby
oddduck has quit [Remote host closed the connection]
jenrzzz has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
lesha has joined #ruby
donofrio__ has quit [Remote host closed the connection]
szqdsegrhrdgdrg has joined #ruby
<szqdsegrhrdgdrg>
hi
cliluw has quit [Ping timeout: 260 seconds]
cliluw has joined #ruby
szqdsegrhrdgdrg has quit [Remote host closed the connection]
blackthor has joined #ruby
<blackthor>
hello!
shansen has quit [Quit: ZNC 1.7.4+deb0+bionic0 - https://znc.in]
shansen has joined #ruby
cd has quit [Quit: cd]
lesha has quit [Ping timeout: 265 seconds]
imode has quit [Ping timeout: 256 seconds]
drincruz has joined #ruby
drincruz has quit [Ping timeout: 258 seconds]
blackthor has quit [Read error: Connection reset by peer]
blackthor has joined #ruby
reyfi9e has quit [Ping timeout: 260 seconds]
DaniG2k has joined #ruby
dvarrui has joined #ruby
reyfi9e has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
ldepandis has joined #ruby
jaegarn has quit [Quit: Konversation terminated!]
conta has joined #ruby
conta has quit [Remote host closed the connection]
conta has joined #ruby
conta has quit [Remote host closed the connection]
conta has joined #ruby
twe4ked has quit [Ping timeout: 260 seconds]
conta has quit [Remote host closed the connection]
conta has joined #ruby
conta has quit [Remote host closed the connection]
twe4ked has joined #ruby
conta has joined #ruby
conta has quit [Client Quit]
conta has joined #ruby
DaniG2k has quit [Quit: leaving]
conta has quit [Remote host closed the connection]
conta has joined #ruby
FastJack has quit [Ping timeout: 264 seconds]
conta has quit [Remote host closed the connection]
conta has joined #ruby
conta has quit [Remote host closed the connection]
conta has joined #ruby
conta has quit [Remote host closed the connection]
conta has joined #ruby
conta has quit [Client Quit]
FastJack has joined #ruby
cnsvc_ has joined #ruby
dionysus69 has joined #ruby
dvarrui has quit [Remote host closed the connection]
cnsvc_ has quit [Ping timeout: 240 seconds]
universa1 has quit [Quit: ZNC 1.6.1+deb1~ubuntu14.04.0 - http://znc.in]
universa1 has joined #ruby
schne1der has joined #ruby
envex has quit []
cnsvc_ has joined #ruby
jenrzzz has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
conta has joined #ruby
conta has quit [Remote host closed the connection]
conta has joined #ruby
ur5us has joined #ruby
conta has quit [Remote host closed the connection]
conta has joined #ruby
prestorium has joined #ruby
cnsvc_ has joined #ruby
conta has quit [Quit: conta]
cnsvc_ has quit [Ping timeout: 240 seconds]
prestorium has quit [Quit: prestorium]
drincruz has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
cnsvc_ has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
jetchisel has joined #ruby
reyfi9e has quit [Ping timeout: 256 seconds]
reyfi9e has joined #ruby
reyfi9e has quit [Ping timeout: 256 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reyfi9e has joined #ruby
ruby[bot] has joined #ruby
donofrio has joined #ruby
_whitelogger has joined #ruby
gitter1234 has quit [Quit: Connection closed for inactivity]
jetchisel has quit [Ping timeout: 265 seconds]
jetchisel has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
ur5us has quit [Ping timeout: 260 seconds]
alexherbo2 has joined #ruby
NODE has quit []
Benett has quit [Remote host closed the connection]
Benett has joined #ruby
drincruz has joined #ruby
cnsvc_ has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
cnsvc_ has quit [Ping timeout: 240 seconds]
siery has quit [Quit: WeeChat 2.8]
drincruz has joined #ruby
NODE has joined #ruby
arooni_team_b has joined #ruby
arooni has quit [Ping timeout: 256 seconds]
dionysus69 has quit [Quit: dionysus69]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
gavlee has joined #ruby
mheld has quit [Quit: Connection closed for inactivity]
bsdbandit-01 has joined #ruby
bsdband8 has quit [Ping timeout: 260 seconds]
_whitelogger has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has joined #ruby
alexherbo2 has quit [Ping timeout: 264 seconds]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ule>
havenwood: I've been reading about the jemalloc you mentioned yesterday. Many people saying the same thing indeed
<ule>
I'm excited to trying out
drincruz has quit [Ping timeout: 265 seconds]
<xco>
i want to mimic the behavious of theh Dotenv gem and have say a .env file with some credentials that'll show as ENV variables. i've created a file called "credentials" with #!/usr/bin/env ruby in it followed by ENV['SECRET'] = 'xxx'
<xco>
i expect that when i run "credentials" i shoould have access to theh ENV in ruby but shell says "credentials" is not a command
cnsvc_ has joined #ruby
<xco>
before this i did `chmod +x credentials`
<xco>
what am i doing wrong? or what's theh best way to have credentials saved in a ruby script thaht i can gitignore the credentials file?
<xco>
sorry for typos, faulty keyboard
poro has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
<adam12>
xco: You'd need to call it with ./credentials
<adam12>
xco: But that's likely not what you really want. You probably want to just `require_relative "credentials"`
<xco>
`require_relative "credentials"` << this is what i've done in fact, but i thought i'll have an exetubale you can run so i can do more things in there than just keeping credentials
<adam12>
Unless you're talking about the dotenv _binary_, which lets' you do `dotenv somecommand`?
<xco>
adam12 i don't want to do dotenv, try to keep dependencies to 0
ldepandis has joined #ruby
<adam12>
xco: I'm not sure I follow. If you want to use it in another Ruby script, just require it. If it does more things, maybe you want something else that requires it and has the +x mode.
<xco>
adam12 yup going the require_relative path :) thanks
drincruz has joined #ruby
drincruz has quit [Ping timeout: 265 seconds]
cnsvc_ has joined #ruby
<poro>
Is there a way to constantly check for a keypress without blocking the flow of the script
<poro>
like on a separate thread I guess it would have to be
cnsvc_ has quit [Ping timeout: 240 seconds]
kinduff has quit [Read error: Connection reset by peer]
ellcs1 has joined #ruby
kinduff has joined #ruby
drincruz has joined #ruby
ellcs1 has quit [Ping timeout: 260 seconds]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
alexherbo2 has joined #ruby
drincruz has quit [Ping timeout: 246 seconds]
lesha has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
DTZUZU_ is now known as DTZUZU
DTZUZU has quit [Ping timeout: 265 seconds]
DTZUZU has joined #ruby
lucasb has joined #ruby
schne1der has quit [Ping timeout: 260 seconds]
drincruz has joined #ruby
cnsvc_ has joined #ruby
gdonald has quit [Remote host closed the connection]
lesha has quit [Ping timeout: 265 seconds]
CrazyEddy has quit [Remote host closed the connection]
lesha has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
xco has quit [Read error: Connection reset by peer]
ChmEarl has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
fuDwitc has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
fuDwitc has quit [Remote host closed the connection]
fuDwitc has joined #ruby
fuDwitc has quit [Ping timeout: 260 seconds]
funnel has quit [Ping timeout: 260 seconds]
yokel has quit [Ping timeout: 260 seconds]
poro has quit [Ping timeout: 256 seconds]
yokel has joined #ruby
funnel has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
<havenwood>
ule: :)
Esa__ has joined #ruby
<havenwood>
poro, ah, they left - was just going to say that's what irb, pry, etc do - hence you'll see their processes have two threads when you start them.
<havenwood>
jhass: I always want #hex to work in both directions: undefined method `hex' for Integer
<havenwood>
I guess it makes more sense in the String-to-Integer directions but I must have tried it the other way around a dozen times without thinking.
<jhass>
you just want people to do .hex.hex
<havenwood>
haha
Esa__ has quit []
TCZ has joined #ruby
drincruz has quit [Ping timeout: 256 seconds]
TCZ has quit [Quit: Leaving]
kinduff has quit [Quit: gg]
kinduff has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
orbyt_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs1 has quit [Ping timeout: 260 seconds]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
poro has joined #ruby
alexherbo2 has joined #ruby
ldepandis has joined #ruby
Mia has quit [Read error: Connection reset by peer]
ellcs1 has joined #ruby
poro_ has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
poro has quit [Ping timeout: 258 seconds]
gitter1234 has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
Cosmin99 has joined #ruby
<Cosmin99>
hello
<havenwood>
Cosmin99: hi
<gitter1234>
Hey guys :)
Cosmin99 has quit [Client Quit]
bsdbandit-01 has joined #ruby
hiroaki has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ruby
poro_ is now known as poro
hiroaki has joined #ruby
hiroaki has quit [Ping timeout: 265 seconds]
braj has quit []
orbyt_ has joined #ruby
envex has joined #ruby
xco has joined #ruby
troulouliou_div2 has joined #ruby
<xco>
if anyone has some time to review my code i'll be happy. i'd love comments on design and things that can be improved. i'm writing a scraper that goes through multiple levels of authentication to scrape data. reviews appreciated https://github.com/siaw23/alice
envex has quit []
envex has joined #ruby
<havenwood>
xco: You can save a method call with: gets(chomp: true)
<havenwood>
xco: I often explicitly use: $stdin.gets
<havenwood>
xco: I prefer `ENV#fetch` to `ENV#[]` when the env var is required to be present.
<havenwood>
(Blow up nicer.)
<havenwood>
xco: Note, env vars are another way to pass info to a program like options or input query or config file.
<havenwood>
or piping
<havenwood>
xco: It's a good exercise to consider whether to support config file, env vars, options, pipes, and whether you should fall back and offer more than one of the above.