<random-jellyfish>
how can I delete elements from an array given a list of indexes? e.g. l=[1,2,3,4,5] and the list of indexes idxs=[1,3] I want to get [1,3,5]
<nakilon>
maybe something like idxs.reverse_each &l.method(:delete_at)
<nakilon>
or idxs.reverse_each{ |i| l.delete_at i }
Cork has quit [Quit: .]
<rg>
i prefer sth like: l.reject.with_index { idxs.include?(_2) }
Cork has joined #ruby
<nakilon>
so bad JSON does not support Array as a key -- looks like I have to deparse it additionally on JS side
<nakilon>
*parse
<jhass[m]>
you'd be doing something[[1, 2, 3]]? If never I'd argue for [[[1, 2,3], "foo"], [[2, 3, 4], "bar"], ...]
Oxfuxxx_ has quit [Ping timeout: 258 seconds]
aesthetikx has joined #ruby
Oxfuxxx has joined #ruby
lucasb has joined #ruby
Oxfuxxx has quit [Ping timeout: 248 seconds]
Oxfuxxx has joined #ruby
<nakilon>
I want to store data with YAML::Store so I just call transaction{} and it writes the file for me and finds the key I need
<nakilon>
hmmm though maybe I won't need key lookups
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
lessless has joined #ruby
jwr has joined #ruby
dhollinger has joined #ruby
coffeejunk has joined #ruby
neshpion has joined #ruby
flooose has joined #ruby
<random-jellyfish>
is it possible to somehow bundle a webapp with a ruby/sinatra backend and some html/css/js frontend into an adroid app?
<adam12>
random-jellyfish: you'd probably be on your own almost always tho. I don't know if it has much adoption.
<random-jellyfish>
adam12: the default possibility is to install Termux and then run the app from there, or create an app with termux as a template...but the apk size would be too large
<random-jellyfish>
it would have to include a full ruby+gems installation
<random-jellyfish>
plus whatever Termux has
random-jellyfish has quit [Ping timeout: 246 seconds]
<jwr>
I'm building a container in which i install git and some other dependencies and then run `bundle install`, and bundle is complaining that git isn't installed. Anybody know what's going on with this? https://pastebin.com/raw/r73nEGPa
<aesthetikx>
looks like the error might be earlier jwr, /root is not writeable
<aesthetikx>
i think its not saying git is installed, but rather git cannot clone to /app
<aesthetikx>
well maybe not
<jwr>
aesthetikx: that /root is not writable thing stuck out to me as well. the weird thing though is that root is indeed writable. https://pastebin.com/raw/qJ13mTec
<aesthetikx>
in between steps 15 and 20 do you change USERs ?
<aesthetikx>
also the people over in #docker helped me out this morning, they may be of assistance too
<jwr>
aesthetikx: there's no change of USER. it's a multi-stage docker build where i'm building the gems and then later copying them out to another container, so in this build everything runs as root.
roadt has joined #ruby
<weaksauce>
is /app writable?
dka_ has quit [Quit: My Ex-Girlfriend once told me: I'm not a slut, I'm just popular]
<jwr>
it seems to be because i'm able to copy my Gemfile into it, and `bundle install` knows that one of my gems is in github.
<weaksauce>
idk maybe post your dockerfile
Guest7145 has joined #ruby
Guest7145 is now known as random-jellyfish
random-jellyfish has quit [Changing host]
random-jellyfish has joined #ruby
random-jellyfish has quit [Quit: Client closed]
orbyt has joined #ruby
dka has joined #ruby
MalkbabY has quit [Remote host closed the connection]
<nakilon>
side note: I always say there is no difference between "server error" and "client error"
<nakilon>
there is this trivia question that people sometimes ask on interview "which http errors are server and what are client" and want to hear from you the "server errors are 5**, client are 4**" but this is neither useful nor true
<nakilon>
the http response code barely correlates with neither "on which side the problem occured" nor with "which side should check if they do anything wrong"
<nakilon>
in practice
ur5us__ has joined #ruby
flooose has quit [Ping timeout: 258 seconds]
<jhass[m]>
424 is a great example
<jhass[m]>
definitely not a client error
roadie has joined #ruby
roadie has quit [Ping timeout: 272 seconds]
qunzhong_luxian has quit [Ping timeout: 268 seconds]
lunarkitty has quit [Quit: Connection closed for inactivity]
ua_ has quit [Ping timeout: 258 seconds]
qunzhong_luxian has joined #ruby
xelkarin has quit [Quit: WeeChat 3.1]
qunzhong_luxian has quit [Ping timeout: 272 seconds]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
qunzhong_luxian has joined #ruby
qunzhong_luxian has quit [Ping timeout: 248 seconds]
jwr has quit [Remote host closed the connection]
roadie has joined #ruby
roadie has quit [Ping timeout: 268 seconds]
qunzhong_luxian has joined #ruby
qunzhong_luxian has quit [Ping timeout: 268 seconds]
qunzhong_luxian has joined #ruby
qunzhong_luxian has quit [Ping timeout: 248 seconds]
qunzhong_luxian has joined #ruby
qunzhong_luxian has quit [Ping timeout: 248 seconds]