<havenwood>
memcorrupt: An upside ^ is it's fast. Yeah, and little code.
<havenwood>
memcorrupt: Was fun to take a stab at, in any case. Thanks for sharing the code.
<memcorrupt>
oh, thank *you* for the tip :)
gavlee has quit [Excess Flood]
sagax has joined #ruby
gavlee has joined #ruby
mossplix has quit [Remote host closed the connection]
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
chalkmonster has joined #ruby
bambanx_ has joined #ruby
SeepingN has quit [Ping timeout: 260 seconds]
memcorrupt has quit [Ping timeout: 246 seconds]
gavlee has quit [Excess Flood]
gavlee has joined #ruby
bambanx has quit [Ping timeout: 240 seconds]
bambanx_ has quit [Quit: Leaving]
konsolebox has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
bocaneri has joined #ruby
r3m has quit [Quit: WeeChat 2.9-rc1]
Furai has quit [Quit: WeeChat 2.9]
Furai has joined #ruby
r3m_ has joined #ruby
Arahael has quit [Ping timeout: 264 seconds]
schne1der has joined #ruby
baojg has quit [Remote host closed the connection]
baojg_ has joined #ruby
Arahael has joined #ruby
schne1der has quit [Quit: schne1der]
schne1der has joined #ruby
r3m_ is now known as r3m
baojg_ has quit [Remote host closed the connection]
mossplix has joined #ruby
baojg has joined #ruby
r3m has quit [Quit: WeeChat 2.9-rc1]
r3m has joined #ruby
r3m has quit [Client Quit]
r3m has joined #ruby
vondruch has joined #ruby
cd has quit [Quit: cd]
znz_jp has quit [Remote host closed the connection]
konsolebox has quit [Read error: Connection reset by peer]
znz_jp has joined #ruby
konsolebox has joined #ruby
dfucci has joined #ruby
schne1der has quit [Ping timeout: 240 seconds]
dfucci has quit [Ping timeout: 256 seconds]
arzWZM has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
TomyWork has joined #ruby
Jonopoly has joined #ruby
yxhuvud has quit [Read error: Connection reset by peer]
yxhuvud has joined #ruby
apteryx is now known as Guest4223
apteryx has joined #ruby
_aeris_ has quit [Ping timeout: 240 seconds]
Guest4223 has quit [Ping timeout: 256 seconds]
memcorrupt has joined #ruby
memcorrupt has joined #ruby
memcorrupt has quit [Changing host]
schne1der has joined #ruby
sagax has quit [Remote host closed the connection]
fanta1 has joined #ruby
giorgian has joined #ruby
Axy has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
imode has quit [Ping timeout: 256 seconds]
fercell has joined #ruby
TomyWork has quit [Ping timeout: 256 seconds]
Mia has quit [Ping timeout: 240 seconds]
fercell has quit [Ping timeout: 260 seconds]
fercell has joined #ruby
lxsameer has joined #ruby
TomyWork has joined #ruby
ur5us has joined #ruby
mossplix_ has joined #ruby
mossplix has quit [Ping timeout: 264 seconds]
TomyWork has quit [Ping timeout: 256 seconds]
TomyWork has joined #ruby
lmat has quit [Ping timeout: 260 seconds]
lmat has joined #ruby
mossplix_ has quit [Remote host closed the connection]
lesihctej has joined #ruby
oddp has joined #ruby
jetchisel has quit [Ping timeout: 240 seconds]
lmat has quit [Ping timeout: 246 seconds]
alfiemax_ has quit [Remote host closed the connection]
lmat has joined #ruby
yxhuvud has quit [Remote host closed the connection]
alfiemax has joined #ruby
lemon has joined #ruby
<lemon>
Hey guys
lesihctej has quit [Ping timeout: 258 seconds]
bodie has joined #ruby
zapata has quit [Ping timeout: 260 seconds]
<memcorrupt>
hi
_aeris_ has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
lmat has quit [Ping timeout: 258 seconds]
memcorrupt has quit [Ping timeout: 258 seconds]
lmat has joined #ruby
konsolebox has joined #ruby
yxhuvud has joined #ruby
seaef has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
lmat has quit [Ping timeout: 258 seconds]
lmat has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.9]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
arzWZM has quit [Ping timeout: 256 seconds]
arzWZM has joined #ruby
troulouliou_div2 has joined #ruby
lmat has quit [Ping timeout: 246 seconds]
<rapha>
hi lemon
DEac- has quit [Ping timeout: 264 seconds]
lmat has joined #ruby
chalkmonster has joined #ruby
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
cnmne has joined #ruby
Arkantos has quit [Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in]
seaef has quit [Quit: I am functioning within established parameters.]
TomyLobo2 has joined #ruby
TomyWork has quit [Disconnected by services]
TomyLobo2 is now known as TomyWork
TomyLobo2 has joined #ruby
bodie has quit [Quit: Leaving]
yokel has quit [Ping timeout: 256 seconds]
yokel has joined #ruby
DEac- has joined #ruby
TomyLobo2 has quit [Quit: Leaving]
chalkmonster has quit [Quit: WeeChat 2.9]
<cnmne>
Hi, I'm adding a package to guix and I'm getting a MissingSpecVersionError for a spec of ["= 0.10.0", "~> 0.10"] when I have 0.11.0; Is this not supposed to be included pessimistically ?
ur5us has quit [Ping timeout: 260 seconds]
fercell has quit [Ping timeout: 240 seconds]
akem has joined #ruby
fercell has joined #ruby
<cnmne>
update: I haven't figured it out, but I think this might be a guix issue, not ruby. thanks !
cnmne has left #ruby ["ERC (IRC client for Emacs 26.3)"]
lmat has quit [Ping timeout: 258 seconds]
purefan has joined #ruby
lmat has joined #ruby
<purefan>
Hello! I found this code in a project I recently joined (https://dpaste.org/aQeX) and I cant see where is params defined, Im new to ruby and dont know if this is somehow initialized by the language or from an initiation call
<purefan>
I mean the line with org_image_uri = URI(params[:original_image_uri].to_s).path[1..-1]
<purefan>
I found a hidden input with name "original_image_uri" which I suspect becomes a sort of global variable accessible via params
alfiemax has quit [Remote host closed the connection]
baojg has quit [Remote host closed the connection]
alfiemax has joined #ruby
baojg has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
markong has quit [Ping timeout: 240 seconds]
markoong has joined #ruby
drincruz has quit [Ping timeout: 260 seconds]
drincruz has joined #ruby
jottr has joined #ruby
jottr has quit [Client Quit]
konsolebox has quit [Read error: Connection reset by peer]
dviola has joined #ruby
konsolebox has joined #ruby
cliluw has quit [Ping timeout: 256 seconds]
baojg has quit [Remote host closed the connection]
cliluw has joined #ruby
baojg has joined #ruby
chalkmonster has joined #ruby
ChmEarl has joined #ruby
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
fanta1 has quit [Quit: fanta1]
_whitelogger has joined #ruby
schne1der has quit [Ping timeout: 258 seconds]
mossplix has joined #ruby
apteryx is now known as Guest4026
Guest4026 has quit [Killed (moon.freenode.net (Nickname regained by services))]
apteryx has joined #ruby
apteryx is now known as Guest13088
Guest13088 has quit [Killed (rajaniemi.freenode.net (Nickname regained by services))]
apteryx has joined #ruby
apteryx is now known as Guest93264
Guest93264 has quit [Killed (egan.freenode.net (Nickname regained by services))]
apteryx has joined #ruby
apteryx is now known as Guest23268
Guest23268 has quit [Killed (moon.freenode.net (Nickname regained by services))]
apteryx has joined #ruby
apteryx has quit [Killed (rajaniemi.freenode.net (Nickname regained by services))]
ellcs has joined #ruby
wymillerlinux has joined #ruby
markoong has quit [Ping timeout: 240 seconds]
chalkmonster has quit [Quit: WeeChat 2.9]
sagax has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
alfiemax has joined #ruby
ellcs has quit [Ping timeout: 260 seconds]
giorgian has quit [Ping timeout: 260 seconds]
Caerus has quit [Ping timeout: 256 seconds]
zapata has joined #ruby
alfiemax has quit [Remote host closed the connection]
mossplix has quit [Read error: Connection reset by peer]
mossplix has joined #ruby
mossplix_ has joined #ruby
mossplix has quit [Ping timeout: 246 seconds]
schne1der has joined #ruby
dviola has quit [Quit: WeeChat 2.9]
Caerus has joined #ruby
mika_ has joined #ruby
cthu| has joined #ruby
Caerus has quit [Ping timeout: 256 seconds]
Caerus has joined #ruby
mnathani_ has joined #ruby
Eiam has joined #ruby
ferche23 has joined #ruby
mnathani has quit [Ping timeout: 256 seconds]
ferche23 has quit [Client Quit]
mika_ has quit [Quit: Leaving]
chalkmonster has joined #ruby
schne1der has quit [Ping timeout: 256 seconds]
wallace_mu has joined #ruby
<wallace_mu>
any one knows anything about moving a slow query into a different database? basically, it's taking some good resource in production and want to figure a way to let it query against secondary db
<uplime>
is there a better way to test if a string is a number besides https://clbin.com/MT28z? I'd ideally like to test/convert from any arbitrary base
<uplime>
(it'd also be nice if it worked with floating point as well)
cd has joined #ruby
alfiemax has joined #ruby
<wallace_mu>
uplime: regular expression?
<uplime>
hm, i may have to go that route
<uplime>
im just hoping for something a bit easier to maintain
alfiemax has quit [Ping timeout: 240 seconds]
fercell has quit [Quit: WeeChat 2.8]
wymillerlinux has quit [Ping timeout: 240 seconds]
davispuh has joined #ruby
TomyWork has quit [Remote host closed the connection]
<adam12>
wallace_mu: If you're using Sequel you can force the database to query against. I'm not sure about Rails but the new version of ActiveRecord supports multiple databases.
<adam12>
uplime: !!Float(self) rescue false
<adam12>
uplime: Tho if I was using that in production I'd not inline rescue but actually rescue ArgumentError
TomyWork has joined #ruby
<uplime>
adam12: not a web app unfortunately :( rails/ar always has the neat toys
<uplime>
that Float thing looks good though. ill give it a try. thanks!
<adam12>
uplime: You mentioned base but didn't see you using it. You might need something else if you're supporting bases other than 10.
<al2o3-cr>
uplime: you can pass exception: keyword to float e.g !!Float(self, exception: false)
<rubydoc>
stderr: -e:4:in `<main>': undefined local variable or method `h' for main:Object (NameError)... check link for more (https://carc.in/#/r/9frp)
<leftylink>
I think the current behavior of transform_keys &h that you have just demonstrated above is also exactly what I'd expect transform_keys h to do
<al2o3-cr>
well, yeah.
<leftylink>
oho! I think I see that there will be a difference
<leftylink>
for keys not in the hash, staying the same vs becoming nil
<al2o3-cr>
leftylink: that's how i understood it too.
<leftylink>
that is interesting then
<leftylink>
I wonder why it was decided not to do the same for transform_values
<al2o3-cr>
leftylink: because Matz says so i suppose :P
alexherbo2 has quit [Ping timeout: 240 seconds]
mossplix has joined #ruby
tubbo has quit [Ping timeout: 260 seconds]
alexherbo2 has joined #ruby
gix has joined #ruby
hiroaki has joined #ruby
bocaneri has quit [Remote host closed the connection]
donofrio has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
Ai9zO5AP has joined #ruby
cnsvc has joined #ruby
rmnull has joined #ruby
rmnull has quit [Client Quit]
rmnull has joined #ruby
dionysus69 has quit [Remote host closed the connection]
<leftylink>
it's good but my editor just doesn't understand how to syntax highlight it (the portion of the outer one that comes after the inner one is no longer recognised as being in a heredoc)
<wallace_mu>
adam12: thanks for mentioning, we're using rails 3 and default active record, without sequal but would like to check sequel
FastJack has quit [Ping timeout: 246 seconds]
cthu| has quit [Read error: Connection reset by peer]
mossplix has quit [Remote host closed the connection]
cthu| has joined #ruby
VeryBewitching has joined #ruby
orbyt_ has joined #ruby
<VeryBewitching>
I'm getting a weird result with FileUtils.cp_r I'm trying to backup certain files with an absolute path to another absolute path, and all it ends up copying is the file at the end of the path.
FastJack has joined #ruby
<VeryBewitching>
So doing: FileUtils.cp_r '/home/foo/file.csv', '/Storage' results in /Storage/file.csv and not /Storage/home/foo/file.csv
<VeryBewitching>
Can anyone shed some light on this?
<rmnull>
yes that is the expected behaviour similar to `cp -r`
bukkitgerman8608 has quit [Quit: Ping timeout (120 seconds)]
<VeryBewitching>
If I did that with cp -r I'd get the whole tree
<VeryBewitching>
I know because I tried it
<VeryBewitching>
How then, in Ruby, would I be able to copy the whole tree?
bukkitgerman8608 has joined #ruby
<rmnull>
cp -r --preserve maintains the whole tree
<rmnull>
you'll have to pass preserve option i believe
<rmnull>
s/preserve/parents/
<VeryBewitching>
Preserve preserves permissions
<rmnull>
s/preserve/parents/
<VeryBewitching>
parents is not an option for FileUtils.cp_r
<rmnull>
oh, do u wish to copy all the files inside directory ? or just a single one
<VeryBewitching>
Just a single file, and it's tree
<rmnull>
ohkay, let me lookup doc
bukkitgerman8608 has quit [Ping timeout: 246 seconds]
<rmnull>
VeryBewitching: you are right, looks like there is no option to FileUtils.cp_r that emulates `cp -r --parents`
<VeryBewitching>
Well even `cp -r` will produce the effect I want
<VeryBewitching>
You don't need --parents
<VeryBewitching>
And OK, I guess I'll sort out using dirname and mkdir_p
<leftylink>
hmm, I guess your computer must be set up differently from mine
<leftylink>
mkdir -p a/b; touch a/b/x.csv; mkdir c; cp -r a/b/x.csv c; ls c
<leftylink>
that gets me x.csv
<leftylink>
so we must be different
<leftylink>
so basically if that code is going to run in different places, you might need to take that difference into account
<VeryBewitching>
Oh you're right lefty, I don't get the *whole* tree, I get the missing piece from pwd
<rmnull>
im on same page as leftylink
<VeryBewitching>
You're both right, cp -r --parents is required for the entire ancestry
BrianWGray has joined #ruby
<VeryBewitching>
But good to know about :cp_r
i9zO5AP has joined #ruby
Ai9zO5AP has quit [Ping timeout: 240 seconds]
rhiza has joined #ruby
bukkitgerman8608 has joined #ruby
<rhiza>
I'm trying to eager load a limited association in Hanami / rom-rb. A company has activities, but I want to only load the two latest activities for each company. I have a SQL query that does this, but I'm having trouble figuring out how to write this in rom-rb syntax. SQL query for reference:
bukkitgerman8608 has quit [Quit: Ping timeout (120 seconds)]
Omnilord has joined #ruby
bukkitgerman8608 has joined #ruby
rmnull has quit [Quit: WeeChat 2.9]
tbisker8 has quit [Ping timeout: 246 seconds]
BSaboia has quit [Ping timeout: 240 seconds]
titanbiscuit has joined #ruby
cthu| has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
lightstalker has quit [Ping timeout: 240 seconds]
rhiza has quit [Remote host closed the connection]
ur5us has joined #ruby
lightstalker has joined #ruby
mossplix_ has joined #ruby
mossplix_ has quit [Remote host closed the connection]
mossplix has quit [Ping timeout: 240 seconds]
bambanx has joined #ruby
Frobozz has joined #ruby
EvanR has left #ruby [#ruby]
ellcs has quit [Ping timeout: 260 seconds]
lightstalker has quit [Ping timeout: 240 seconds]
hiroaki has quit [Ping timeout: 272 seconds]
swaggboi has joined #ruby
BSaboia has joined #ruby
lightstalker has joined #ruby
BSaboia has quit [Max SendQ exceeded]
BSaboia has joined #ruby
markoong has joined #ruby
BSaboia has quit [Ping timeout: 272 seconds]
BSaboia has joined #ruby
BSaboia has quit [Ping timeout: 272 seconds]
contradictioned has quit [Remote host closed the connection]
bambanx has quit [Read error: Connection reset by peer]
TomyWork has joined #ruby
BenDover has quit [Quit: BenDover]
contradictioned has joined #ruby
shaco has joined #ruby
lightstalker has quit [Ping timeout: 256 seconds]
schne1der has joined #ruby
<shaco>
hello
VeryBewitching has quit [Quit: Konversation terminated!]
akem_ has quit [Read error: Connection reset by peer]
<shaco>
i want a good debugger
<shaco>
for sublime.text
lightstalker has joined #ruby
shaco has left #ruby [#ruby]
schne1der has quit [Ping timeout: 256 seconds]
markong has joined #ruby
markoong has quit [Ping timeout: 240 seconds]
stooj has quit [Read error: Connection reset by peer]
akem has joined #ruby
arzWZM has quit [Ping timeout: 240 seconds]
arzWZM has joined #ruby
Scriptonaut has joined #ruby
<Scriptonaut>
hey all, I had a security check of a system I manage, and the people running the check complained that the jobs in my resque queue aren't "signed" or "authenticated". Resque runs on another machine on the private network, and connects to the database and redis, getting its jobs from there. Have you guys ever heard of signing jobs before Resque picks them up?
i9zO5AP has quit [Remote host closed the connection]
<havenwood>
Scriptonaut: Usually just stunnel, in previous jobs I've had.
<havenwood>
Scriptonaut: Is it possible they mean wrapping the Redis traffic in stunnel? Or are the jobs themselves looking for signing, it sounds like?
purefan has quit [Ping timeout: 265 seconds]
<havenwood>
Scriptonaut: Maybe they've set up JWTs or some other web sig.
<havenwood>
If so, I'd expect it to be ad hoc, since I don't know of a standard redis or resque mechanism.
<Scriptonaut>
havenwood: I asked for clarification but ya it was somewhat vague. The resque server doesn't have an external IP, neither does the redis server, and the redis server is password protected. It sounds like they want the jobs themselves to be "signed" before being accepted by the queue
<Scriptonaut>
also, redis and resque are both behind firewalls, they communicate on this private network
<Scriptonaut>
hmm, stunnel could help for sure, I will bring this up, thanks
ruurd_ has quit [Read error: Connection reset by peer]
ruurd has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
troulouliou_dev has joined #ruby
joast has quit [Quit: Leaving.]
Omnilord has quit [Quit: Leaving]
TomyWork has quit [Remote host closed the connection]
joast has joined #ruby
Xiti has quit [Quit: Leaving]
markong has quit [Ping timeout: 240 seconds]
cthu| has quit [Ping timeout: 256 seconds]
drincruz has quit [Ping timeout: 240 seconds]
konsolebox has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
Secret-Fire has quit [Remote host closed the connection]
konsolebox has joined #ruby
Secret-Fire has joined #ruby
CalimeroTeknik has quit [Quit: バイバイ]
CalimeroTeknik has joined #ruby
Secret-Fire has quit [Remote host closed the connection]