havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.0, 2.6.5, 2.5.7: 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!
cschneid_ has joined #ruby
cschneid has quit [Ping timeout: 264 seconds]
Arkantos has joined #ruby
Arkantos has quit [Client Quit]
kinduff has quit [Quit: Ping timeout (120 seconds)]
kinduff has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
caterfxo has joined #ruby
<xco> al2o3-cr would you like to read the draft of my post before i go around making noise about it?
<xco> :)
dasher00 has quit [Ping timeout: 240 seconds]
<al2o3-cr> xco: if it contains pictures of beef curry, egg fried rice, chicken chow mien and bbq spare ribs, then i'm in :P
<xco> hahahha i'd presume those would be different Ruby objects and language constructs
<xco> then yes
<xco> got a few
<al2o3-cr> sure, why not.
<xco> sec
<xco> i'm in the middle of editing so please let me know if you spot anything that you think should be fixed :D
<apotheon> 22:54 < quarters> or can dot notation be used like in js
<apotheon> quarters: You could look at OpenStruct for some of that functionality.
<apotheon> quarters: It's not a hash, though.
ur5us has joined #ruby
<apotheon> quarters: There are also gems you could use for method call syntax when working with hashes, at your own peril. See https://rubygems.org/search?utf8=%E2%9C%93&query=hash_dot for some examples.
<apotheon> quarters: The reason JavaScript works that way is that hash-like things in JavaScript are essentially the equivalent of ruby's BasicObject, in a way. In Ruby, a hash is a particular data structure that happens to be an object (because "everything" is, in Ruby; see small print for exceptions), but most objects are not hashes.
<apotheon> quarters: A consequence of this difference is that, for instance, allowing hash elements in Ruby to be accessed using message passing syntax would interfere with stuff like hash_instance.public_methods, if you happen to name a hash key :public_methods.
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Swyper has quit []
ukd1 has joined #ruby
Azure has joined #ruby
alfiemax has joined #ruby
plutes has quit [Read error: Connection reset by peer]
alfiemax has quit [Ping timeout: 250 seconds]
markoong has quit [Ping timeout: 256 seconds]
stapler has joined #ruby
akem has quit [Quit: Leaving]
LDonoughe has joined #ruby
dviola has quit [Quit: WeeChat 2.7.1]
cschneid_ has quit [Ping timeout: 260 seconds]
cschneid_ has joined #ruby
cschneid_ has quit [Client Quit]
ReekenX has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
LDonoughe has quit [Ping timeout: 240 seconds]
titanbiscuit has quit [Quit: ZNC 1.7.4 - https://znc.in]
titanbiscuit has joined #ruby
gix has quit [Ping timeout: 252 seconds]
mainfram has quit [Quit: Leaving...]
BTRE has quit [Ping timeout: 256 seconds]
drew00 has joined #ruby
alfiemax has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
Arkantos has joined #ruby
duckpuppy has joined #ruby
duckpupp- has quit [Ping timeout: 240 seconds]
rmnull has joined #ruby
BTRE has joined #ruby
jetchisel has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
ChmEarl has quit [Quit: Leaving]
drincruz_ has joined #ruby
d3bug has quit [Quit: Connection closed for inactivity]
drincruz_ has quit [Ping timeout: 256 seconds]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cliluw has quit [Ping timeout: 264 seconds]
<quarters> apotheon: thank you
golevka has quit [Read error: Connection reset by peer]
stapler has quit [Quit: Connection closed for inactivity]
mihael_keehl has joined #ruby
<mihael_keehl> Has anyone worked with rrdtool before?
phenom_ has quit [Ping timeout: 258 seconds]
phenom has joined #ruby
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ReekenX has quit [Quit: Away...]
alfiemax has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
ur5us has quit [Ping timeout: 252 seconds]
ukd1 has quit [Quit: leaving]
djdduty has joined #ruby
dinfuehr has quit [Ping timeout: 246 seconds]
polishdub has joined #ruby
dinfuehr has joined #ruby
quarters has quit [Ping timeout: 240 seconds]
<mihael_keehl> with File.write() how do I overrite existing files?
<rmnull> u want to overwrite the content of file
<mihael_keehl> rmnull: yes, I have File.write(dump_xml, @doc), and I want to overwrite that file so it doesn't give me an error 'File exists'.
<rmnull> easy way is to open it in write mode, and overwrite. somethin like, File.open(dump_xml, 'w') { |f| f.write(@doc) }
<leftylink> perhaps my ruby version is different than yours... I don't get any problem when I overwrite with File.write
mayurvpatil has joined #ruby
<mihael_keehl> Can you take a look at my script? https://pastebin.com/9q2qpun0 It's dumping a xml file, then replacing all NaN values.
<ruby[bot]> mihael_keehl: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<leftylink> the only relevant thing I can say at this moment is that `echo a > a; ruby -e 'File.write(?a, ?b)'; cat a` gives b
<leftylink> which indicates that File.write did overwrite
<leftylink> so there must be some difference between our two setups
KeyJoo has quit [Quit: KeyJoo]
<leftylink> I'm sure it will be most enlightening to discover the difference between our two setups
<leftylink> whatever it may be
stapler has joined #ruby
_whitelogger has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
cd has quit [Quit: cd]
mayurvpatil has quit [Quit: This computer has gone to sleep]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
Arkantos has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
hbroadbent has joined #ruby
hbroadbent has left #ruby [#ruby]
hbroadbent has joined #ruby
_whitelogger has joined #ruby
mayurvpatil has joined #ruby
polishdub has quit [Quit: leaving]
lineus_ has joined #ruby
lineus has quit [Ping timeout: 240 seconds]
markopasha has joined #ruby
markopasha has quit [Max SendQ exceeded]
markopasha has joined #ruby
donofrio has quit [Remote host closed the connection]
djdduty has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akem has joined #ruby
code_zombie has quit [Quit: Leaving]
dinfuehr has quit [Ping timeout: 250 seconds]
hbroadbent has quit [Remote host closed the connection]
sergioro has quit [Quit: leaving]
dinfuehr has joined #ruby
alfiemax has joined #ruby
fercell has joined #ruby
djdduty has joined #ruby
sergioro has joined #ruby
sysh has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
hiroaki has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby
conta has joined #ruby
ur5us has joined #ruby
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xpitr has joined #ruby
djdduty has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cthu| has quit [Ping timeout: 256 seconds]
stooj has joined #ruby
arcaos has joined #ruby
hiroaki has joined #ruby
conta has quit [Ping timeout: 256 seconds]
hiroaki has quit [Ping timeout: 256 seconds]
drew00 has left #ruby ["Leaving"]
schne1der has joined #ruby
gix has joined #ruby
dionysus69 has joined #ruby
galaxie has quit [Remote host closed the connection]
galaxie has joined #ruby
elphe has quit [Ping timeout: 265 seconds]
alfiemax has quit [Remote host closed the connection]
zlogan has joined #ruby
galaxie has quit [Remote host closed the connection]
galaxie has joined #ruby
jacksop has joined #ruby
bradfordli123 has joined #ruby
<bradfordli123> trying to translate ruby into python but I am pretty new in ruby `requests.sort_by!{ |ecr| ecr.start_day }` I think what this snippet of code does is sort IN PLACE the requests array. But I am not sure of the rest of the syntax
<leftylink> that is true, that it sorts requests in place.
<bradfordli123> what does the ! do?
<bradfordli123> reverse? based on .start_day?
<leftylink> Array#sort_by creates a new array. Array#sort_by! sorts in place.
<leftylink> they are two methods with different names
<bradfordli123> ahh gotcha thank you
<yxhuvud> it is a convention signaling that the user of it should beware. In this case it warns that it is a destructive method
<bradfordli123> thanks for the tip @yxhuvud
<havenwood> bradfordli123: Another way to write it is: requests.sort_by!(&:start_day)
<bradfordli123> havenwood: thank you!
djdduty has joined #ruby
<bradfordli123> what does the `| |` notation mean? compare each element in the array and sort it by .start_day?
akem_ has joined #ruby
<leftylink> the thing between | | is/are the argument(s) to the block.
akem_ has quit [Client Quit]
<bradfordli123> leftylink: i see thank you
akem has quit [Ping timeout: 256 seconds]
djdduty has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jacksop has quit [Remote host closed the connection]
conta has joined #ruby
jacksop has joined #ruby
lurkless has quit [Ping timeout: 256 seconds]
aesthe has joined #ruby
NODE has quit [Quit: changing servers]
jacksop has quit [Ping timeout: 264 seconds]
TomyWork has joined #ruby
NODE has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
davor_ has joined #ruby
davor has quit [Ping timeout: 256 seconds]
davor_ is now known as davor
markopasha has quit [Ping timeout: 260 seconds]
akem has joined #ruby
_whitelogger has joined #ruby
mayurvpatil has quit [Quit: This computer has gone to sleep]
infinityfye has joined #ruby
conta has quit [Quit: conta]
snosk8r has joined #ruby
pandakekok9 has joined #ruby
bradfordli123 has quit [Remote host closed the connection]
elphe has joined #ruby
mayurvpatil has joined #ruby
lurkless has joined #ruby
pandakekok9 has quit [Ping timeout: 256 seconds]
astronautical has joined #ruby
pandakekok9 has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
xco has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pandakekok9 has quit [Ping timeout: 260 seconds]
jacksop has joined #ruby
jacksop has quit [Remote host closed the connection]
sergioro has quit [Ping timeout: 240 seconds]
sergioro has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.7.1]
wgw has quit [Read error: Connection reset by peer]
chamunks has quit [Quit: Don't worry I'm not gone yet.]
mayurvpatil has quit [Quit: Leaving]
al2o3-cr has joined #ruby
chamunks has joined #ruby
snosk8r has quit [Read error: Connection reset by peer]
chalkmonster has quit [Quit: WeeChat 2.7.1]
chalkmonster has joined #ruby
snosk8r has joined #ruby
vondruch has quit [Ping timeout: 264 seconds]
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
sergioro has quit [Quit: leaving]
rippa has joined #ruby
postmodern has quit [Quit: Leaving]
fercell_ has joined #ruby
markoong has joined #ruby
vondruch has joined #ruby
code_zombie has joined #ruby
markong has joined #ruby
markoong has quit [Ping timeout: 260 seconds]
kristian_on_linu has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
hiroaki has joined #ruby
drincruz_ has joined #ruby
astronautical has quit [Ping timeout: 250 seconds]
drincruz_ has quit [Ping timeout: 256 seconds]
burningserenity has joined #ruby
vondruch_ has joined #ruby
vondruch has quit [Ping timeout: 260 seconds]
vondruch_ is now known as vondruch
snosk8r has quit [Ping timeout: 240 seconds]
fercell_ has quit [Quit: WeeChat 2.7.1]
snosk8r has joined #ruby
drincruz_ has joined #ruby
gigetoo has quit [Ping timeout: 246 seconds]
gigetoo has joined #ruby
alfiemax has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
romanlevin7 has joined #ruby
romanlevin has quit [Ping timeout: 240 seconds]
romanlevin7 is now known as romanlevin
arcaos_ has joined #ruby
arcaos has quit [Ping timeout: 258 seconds]
burningserenity has quit [Remote host closed the connection]
caterfxo is now known as mrwisdom
dinfuehr has quit [Ping timeout: 258 seconds]
dinfuehr has joined #ruby
leitz has joined #ruby
jingjinghack has joined #ruby
d3bug has joined #ruby
cd has joined #ruby
Raboo_ has joined #ruby
alfiemax has quit [Ping timeout: 250 seconds]
kristian_on_linu has quit [Ping timeout: 264 seconds]
NEETzsche has quit [Ping timeout: 246 seconds]
Raboo_ is now known as Raboo
Raboo has quit [Ping timeout: 246 seconds]
chalkmonster has joined #ruby
infinityfye has quit [Quit: Leaving]
titanbiscuit has quit [Quit: ZNC 1.7.4 - https://znc.in]
titanbiscuit has joined #ruby
alfiemax has joined #ruby
_phaul has joined #ruby
kristian_on_linu has joined #ruby
phaul has quit [Ping timeout: 252 seconds]
alfiemax has quit [Ping timeout: 265 seconds]
conta1 has joined #ruby
johnny56 has joined #ruby
johnny56_ has quit [Ping timeout: 256 seconds]
conta1 has quit [Quit: conta1]
jingjinghack has quit [Quit: WeeChat 2.1]
lucasb has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
advorak has quit [Quit: Leaving]
alfiemax_ has joined #ruby
donofrio has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
ttoocs has quit [Ping timeout: 264 seconds]
Technodrome has joined #ruby
alfiemax_ has quit [Ping timeout: 256 seconds]
mjsir911 has quit [Quit: Goodbye, World!]
mjsir911 has joined #ruby
ChmEarl has joined #ruby
alfiemax has joined #ruby
LDonoughe has joined #ruby
ttoocs has joined #ruby
rkoller has joined #ruby
zlogan has quit [Ping timeout: 272 seconds]
schne1der has quit [Ping timeout: 240 seconds]
cthu| has joined #ruby
ttoocs has quit [Ping timeout: 256 seconds]
zlogan has joined #ruby
ttoocs has joined #ruby
rkoller has quit [Quit: Textual IRC Client: www.textualapp.com]
cisco has joined #ruby
Arkantos has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
rippa has quit [Read error: Connection reset by peer]
kristian_on_linu has quit [Remote host closed the connection]
fercell has quit [Quit: WeeChat 2.7.1]
cliluw has joined #ruby
akem_ has joined #ruby
djdduty has joined #ruby
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akem has quit [Ping timeout: 250 seconds]
cliluw has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
akem_ has quit [Read error: Connection reset by peer]
dinfuehr has quit [Ping timeout: 265 seconds]
akem has joined #ruby
dinfuehr has joined #ruby
frem has joined #ruby
Arkantos has joined #ruby
<xco> anyone here apart from al2o3-cr doing Lua? if so what do you use it for? i have too much time to waste hahaha
<havenwood> xco: mruby was born out of Matz's Lua envy.
<xco> so i heard
<xco> so basically you can do with Lua what you can with Ruby
djdduty has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dinfuehr has quit [Ping timeout: 258 seconds]
alfiemax has quit [Ping timeout: 258 seconds]
dinfuehr has joined #ruby
dinfuehr has quit [Ping timeout: 250 seconds]
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mniip has quit [Remote host closed the connection]
dinfuehr has joined #ruby
mniip has joined #ruby
TomyWork has quit [Remote host closed the connection]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
Tempesta has quit [Quit: See ya!]
cisco has quit [Ping timeout: 240 seconds]
arcaos_ has quit [Read error: Connection reset by peer]
Arkantos has joined #ruby
LDonoughe has quit [Ping timeout: 256 seconds]
mihael_keehl has quit [Ping timeout: 260 seconds]
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Arkantos has joined #ruby
arcaos has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
daemonwrangler has quit [Ping timeout: 256 seconds]
daemonwrangler has joined #ruby
Tempesta has joined #ruby
sagax has quit [Remote host closed the connection]
sagax has joined #ruby
fanta1 has joined #ruby
cliluw has joined #ruby
drincruz_ has quit [Read error: Connection reset by peer]
dasher00 has joined #ruby
<rmnull> xco: make luv
elphe has quit [Ping timeout: 256 seconds]
rippa has joined #ruby
SuperL4g has joined #ruby
LDonoughe has joined #ruby
SuperLag has quit [Ping timeout: 256 seconds]
SuperLag has joined #ruby
DTZUZU has quit [Ping timeout: 252 seconds]
SuperL4g has quit [Ping timeout: 240 seconds]
sergioro has joined #ruby
howdoi has joined #ruby
LDonoughe has quit [Ping timeout: 258 seconds]
SuperL4g has joined #ruby
cliluw has quit [Ping timeout: 240 seconds]
ctOS has joined #ruby
cliluw has joined #ruby
DTZUZU has joined #ruby
SuperL4g has quit [Client Quit]
SuperLag has quit [Ping timeout: 264 seconds]
SuperLag has joined #ruby
SeepingN has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
millerti has joined #ruby
fanta1 has quit [Quit: fanta1]
djdduty has joined #ruby
mn3m has joined #ruby
r3m has quit [Quit: WeeChat 2.8-dev]
r3m has joined #ruby
hiroaki has quit [Ping timeout: 240 seconds]
cisco has joined #ruby
elphe has joined #ruby
elphe has quit [Ping timeout: 240 seconds]
vondruch_ has joined #ruby
sysh has quit [Remote host closed the connection]
schne1der has joined #ruby
vondruch has quit [Ping timeout: 256 seconds]
vondruch_ is now known as vondruch
chalkmonster has joined #ruby
LDonoughe has joined #ruby
hiroaki has joined #ruby
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LDonoughe has quit [Ping timeout: 256 seconds]
sergioro has quit [Quit: leaving]
wymillerlinux has joined #ruby
minall has joined #ruby
thenori has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
<thenori> This is a very simple problem that I'm surprised I'm having trouble with.
<thenori> I've never used `case/when` before, so maybe I've made an error with that.
sergioro has joined #ruby
<_phaul> thenori: what is the task at hand descibed in human terms? My read of it would be count the number of cases where two arrays are different at the same index. But I can be wrong..
<_phaul> oh, count where left array is smaller in first part of the result, count where left array is larger in the other array of the result. Is this correct? What is your problem with the current solution?
<thenori> Each person has three scores, s1 s2 s3. Each person's score gets compared to the other's. Whoever's got a bigger score gets a point.
<thenori> It produces [0, 0] for some reason.
<_phaul> got it. I think
chalkmonster has joined #ruby
<thenori> Any ideas?
<_phaul> yes. case when works slightly differently to how you use it..
<adam12> thenori: Do you have an example of how you're running it and what value you expect in return?
<havenwood> &>> [2, 3, 1].zip([2, 2, 2]).map { |left, right| left <=> right }
<rubydoc> # => [0, 1, -1] (https://carc.in/#/r/8t8a)
<_phaul> case input checks input against each when. when is not supposed to be a boolean, but the value for the index. or you want to use case without casing on index
<_phaul> not input sorry index.
<thenori> @adam12, a=[10, 2, 8] b=[8, 3, 8] result=[1,1]
<_phaul> remove input from line 10
<thenori> @_phaul, I don't understand
<thenori> I'll just use if/elif I guess. I clearly don't understand case/when
<_phaul> there are 2 distinct ways of using case syntax and you are mixing those.
<_phaul> if you want to case on the value of index, you write case index, then on when you write when 0, when 1 etc. If you write a boolean expression on when you don't need index after case
LDonoughe has joined #ruby
<_phaul> so line 10 is just case. not case index
<_phaul> sorry again. line 10 is just case. not case _input_.
^amra has joined #ruby
<_phaul> https://www.geeksforgeeks.org/ruby-case-statement/ on this page you are mixing the way first example is done vs the last example is done. note last example doesn't have anything after case
chalkmonster has quit [Quit: WeeChat 2.7.1]
<_phaul> case 13; when 13; yay; end results in yay. case; when true; yay; end results in yay. but case 13; when true; nope; end does not result in nope
<havenwood> thenori: Another way to write it, for fun: https://gist.github.com/havenwood/de17d285e53fc88ec0328d3a588d7606
<havenwood> thenori: I updated the gist to show a way closer to what you were doing.
<havenwood> thenori: Check out the compare_triplets_again.rb gist.
<havenwood> &>> [:a, :b, :c].zip([1, 2, 3]) #=> [[:a, 1], [:b, 2], [:c, 3]]
<rubydoc> # => [[:a, 1], [:b, 2], [:c, 3]] (https://carc.in/#/r/8t8j)
rmnull has quit [Read error: Connection reset by peer]
elphe has joined #ruby
brool has joined #ruby
elphe has quit [Ping timeout: 256 seconds]
dasher00 has quit [Remote host closed the connection]
<brool> other than ActiveRecord, what might be the best db gem for use with Sinatra? i see menion of data_mapper, but it seems deprecated and the site redirects to rom-rb.org, which i'm reading up on now
<_phaul> there is sequel... it's worth checking it out
<adam12> brool: Sequel or ROM, depending on the pattern you want. ROM in some ways is the descendant of DataMapper.
Arkantos has joined #ruby
<brool> ok. i am already reading up on ROM apparently, and i will look at sequel. i'm writing a simple CRUD app for personal use so i can upload my favorite music list without using gitlab (lol) and basically make my own private cloud storage over CLI. i'm hosting on heroku so i'll need to use postrgres; should i just test & dev with pg as well or would it be worth my while to try to configure my app to
<brool> use sqlite on my local machine and use pg in production?
<CommunistWolf> what does lotusrb use? or whaever they renamed lotusrb to
<brool> lotus-model?
<brool> i just searched lotus on rubygems
<brool> looks like it changed to hanamirb
<adam12> Hanami (Lotus) wraps an older version of ROM. I think they are working to upgrade to a current ROM version but AFAIK it's built on ROM 3.
<brool> is it another web framework?
<adam12> brool: Easier to use postgres for both. Not disputing sqlite for it's use but it handles values without strictness which might cause strange bugs in production when postgres complains.
<brool> or something more specifically built around db
<adam12> brool: It's another web framework.
<brool> oic
<brool> adam12: ok i will just use pg
<brool> for some reason i had the impression that pg was "big fat overkill"
<adam12> brool: Sqlite3 is definitely great for a lot of things, but personally I wouldn't mix it with postgres because of how sqlite3 handles data. If you were using sqlite3 for all environments then there'd probably be no issue.
ctOS has quit [Quit: Connection closed for inactivity]
d3bug has quit [Quit: Connection closed for inactivity]
d3bug has joined #ruby
<brool> sequel looks ezpz
djdduty has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roadie has quit [Ping timeout: 252 seconds]
ur5us has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
roadie has joined #ruby
elphe has joined #ruby
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LDonoughe has quit [Ping timeout: 258 seconds]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
roadie has quit [Ping timeout: 258 seconds]
NODE has quit [Client Quit]
elphe has quit [Ping timeout: 250 seconds]
NODE has joined #ruby
Arkantos has joined #ruby
schne1der has quit [Ping timeout: 260 seconds]
aesthe has quit [Remote host closed the connection]
wymillerlinux has quit [Remote host closed the connection]
<dorian> hey question: anybody know of like an IO "window" proxy class, ie you put in some seekable IO thingy and it will wrap the read calls to a specific subset?
djdduty has joined #ruby
LDonoughe has joined #ruby
<dorian> like say i have a file handle and i want to get some subset of the bytes in it, but some code downstream is ignorant of the actual offsets so i just wrap the file handle in a proxy class along with the offsets
<dorian> anything like that ring a bell?
mrwisdom has quit [Ping timeout: 258 seconds]
LDonoughe has quit [Ping timeout: 250 seconds]
^amra has quit [Read error: Connection reset by peer]
roadie has joined #ruby
brendan- has quit [Read error: Connection reset by peer]
brendan- has joined #ruby
LDonoughe has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Arkantos has joined #ruby
Esa_ has joined #ruby
olddogbarks has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
elphe has joined #ruby
olddogbarks has quit [Client Quit]
elphe has quit [Ping timeout: 256 seconds]
<_phaul> 2.7.1 is out
<havenwood> _phaul: Woot!
havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.5, 2.5.7: 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!
<havenwood> dorian: I usually think of StringIO as a kind of I/O proxy, but it does't have any seek behavior built in. My first thought is just create your own class.
<dorian> yeah it totally seems like something somebody would have done already though
<havenwood> dorian: Not bothering to close I/O here, but how about something like: https://gist.github.com/havenwood/210cb16f163ddfd1de71f7ad0ff8ec59
<_phaul> well, 2.5.8 and 2.6.6 as well then https://www.ruby-lang.org/en/news/
havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.6, 2.5.8: 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!
<dorian> hmm
<havenwood> dorian: I dunno how you want to specify the offset, or if it's dynamic, but should be just a few lines to write one.
<havenwood> _phaul: And... 2.4.10 :O
<dorian> you know now that i think of it i may not actually need it
<dorian> the context is i've got a rack app and i want to make it handle the Range header
<dorian> and i have a big dispatch table that maps lambdas to various operations
<dorian> but i could just move the range handler outside those
<dorian> the idea was to just have the lambdas be as dumb as possible
<havenwood> dorian: Ahh, interesting. Neat to see `Range:` used.
<dorian> i'm putting an http frontend onto this thing: https://github.com/doriantaylor/rb-store-digest
roadie has joined #ruby
roadie has quit [Ping timeout: 256 seconds]
ritalinona has quit [Remote host closed the connection]
ritalinona has joined #ruby
jamessan has left #ruby ["WeeChat 2.7.1"]
<thenori> Is there a way to simplify this expression?
<thenori> mindex = arr.index(arr.min)
<thenori> min = arr.delete_at(mindex)
lucasb has quit [Quit: Connection closed for inactivity]
kinduff has quit [Quit: Ping timeout (120 seconds)]
kinduff has joined #ruby
elphe has joined #ruby
elphe has quit [Ping timeout: 256 seconds]
RiPuk has quit [Read error: Connection reset by peer]
roadie has joined #ruby
roadie has quit [Ping timeout: 264 seconds]
<havenwood> thenori: You can drop the intermediary local variable.
<havenwood> thenori: min = arr.delete_at arr.index arr.min
^amra has joined #ruby
cisco has quit [Ping timeout: 256 seconds]
<thenori> @havenwood, heard! ty
Technodrome has joined #ruby
patrick99e99 has joined #ruby
code_zombie has quit [Read error: Connection reset by peer]
<patrick99e99> Hi everyone.. How is the best way to create a zero padded 64 bit number?
LDonoughe has quit [Ping timeout: 264 seconds]
RiPuk has joined #ruby
TCZ has joined #ruby