<desnudopenguino>
adam12: yeah, i got it figured out, the bcrypt dependency need updated initially, then i forgot to restart the rails server. all is well now.
Garb0 has joined #ruby
kurko_ has joined #ruby
kurko_ has quit [Client Quit]
prion has quit [Ping timeout: 246 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
gix has quit [Ping timeout: 256 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
SeepingN has joined #ruby
baojg has quit [Remote host closed the connection]
factormystic has quit [Read error: Connection reset by peer]
baojg has joined #ruby
factormystic has joined #ruby
TCZ has quit [Remote host closed the connection]
TCZ has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
Swyper has joined #ruby
Swyper has quit [Read error: Connection reset by peer]
TCZ has quit [Quit: Diabe? ogonem nakry? e?]
TCZ has joined #ruby
orbyt_ has joined #ruby
Swyper has joined #ruby
kurko_ has joined #ruby
kurko_ has quit [Client Quit]
sagax has quit [Ping timeout: 260 seconds]
postmodern has joined #ruby
SanguineAnomaly has quit [Ping timeout: 246 seconds]
kurko_ has joined #ruby
kurko_ has quit [Client Quit]
kristian_on_linu has quit [Remote host closed the connection]
aremaref has quit [Ping timeout: 256 seconds]
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
bkuhlmann has quit []
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cuerbot has quit [Read error: Connection reset by peer]
teardown_ has quit [Ping timeout: 240 seconds]
swaggboi has quit [Ping timeout: 260 seconds]
swaggboi has joined #ruby
sphex has joined #ruby
rich_coldiron has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
<rich_coldiron>
Hi there! I'm a returning hobbyist working through AoC 2020. Day 10 was tough! I, like others, first tried recursion, which, at O(2^n), would take... a long time. I googled around for a bit, and came across memoization to reduce complexity. I've never used it before, and ruby doesn't have built-in facilities for it, so I implemented it manually.
<rich_coldiron>
the README in the same directory contains the problem description if you're unfamiliar
icarus has joined #ruby
<havenwood>
rich_coldiron: Hi! Does the solution work? Looking to refactor?
<havenwood>
rich_coldiron: You can `File.read(filename)` instead of manually opening and closing the file on lines 15 and 17.
<rich_coldiron>
havenwood: It works! I'm just an "advanced novice", if you will, and I'm looking for constructive criticism - e.g., I did something that isn't "rubyish", or something like that
<rich_coldiron>
oh cool, so it'll automatically close it for me? that's neat
<havenwood>
rich_coldiron: A nice option in newer Rubies is to: File.read(filename, chomp: true).map(&:to_i)
<havenwood>
rich_coldiron: Err
<havenwood>
rich_coldiron: I meant #readlines
<havenwood>
rich_coldiron: (Since you want lines)
<havenwood>
but #read works too
<rich_coldiron>
so #readlines lets me omit .split("\n") then, that's awesome. will change it. thank you!
<rich_coldiron>
Great, thanks. so chomp strips the newlines? that's fantastic.
<havenwood>
rich_coldiron: Yup!
<havenwood>
rich_coldiron: I'd omit line 26. The assignment on line 25 already returns the value.
<havenwood>
rich_coldiron: In general, avoid explicit returns unless it's an early return.
<havenwood>
rich_coldiron: oh, sorry, i'm tired
<havenwood>
rich_coldiron: it *is* an early return
<rich_coldiron>
I did that but it doesn't like assigning to nil until it's defined
<rich_coldiron>
yaya!
<havenwood>
rich_coldiron: I'm tempted on line 39 to say use #fetch
<rich_coldiron>
just googled that, that's cool, so I could pass the code from else as a block directly to fetch rather than having the conditional at all
<havenwood>
rich_coldiron: yeah, maybe like: paths += @memo.fetch(joltage) do ...
<rich_coldiron>
sweet. i'll play aroudn with that. thanks so much for the help!
<havenwood>
rich_coldiron: Not sure that one works, since line 41.
<havenwood>
rich_coldiron: No prob, any time!
essem has joined #ruby
donofrio_ has quit [Remote host closed the connection]
al2o3-cr has quit [Ping timeout: 256 seconds]
drincruz_ has quit [Ping timeout: 256 seconds]
al2o3-cr has joined #ruby
panorain has joined #ruby
Swyper has quit [Remote host closed the connection]
aremaref has joined #ruby
aremaref has quit [Ping timeout: 256 seconds]
plujon has quit [Remote host closed the connection]
aremaref has joined #ruby
sagax has joined #ruby
rich_coldiron has quit [Remote host closed the connection]
raj has quit [Quit: No Ping reply in 180 seconds.]
hays has quit [Remote host closed the connection]
tweaks has quit [Ping timeout: 260 seconds]
Nightmare has quit [Ping timeout: 246 seconds]
jtperreault has quit [Ping timeout: 260 seconds]
aremaref has quit [Ping timeout: 260 seconds]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raj has joined #ruby
s_ has joined #ruby
icarus has quit [Ping timeout: 256 seconds]
tweaks has joined #ruby
icarus has joined #ruby
jtperreault has joined #ruby
Nightmare has joined #ruby
_whitelogger has joined #ruby
kurko_ has joined #ruby
kurko_ has quit [Client Quit]
blackmesa has joined #ruby
blackmesa1 has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
_whitelogger has joined #ruby
cd has quit [Quit: cd]
al2o3-cr has quit [Ping timeout: 256 seconds]
aremaref has joined #ruby
aremaref has quit [Ping timeout: 272 seconds]
aremaref has joined #ruby
prion has joined #ruby
ua has quit [Ping timeout: 240 seconds]
aremaref has quit [Ping timeout: 240 seconds]
akem__ has joined #ruby
ua has joined #ruby
icarus has quit [Ping timeout: 256 seconds]
akem_ has quit [Ping timeout: 272 seconds]
postmodern has quit [Quit: Leaving]
tempate has joined #ruby
<tempate>
Hello. Is there a better way of writing https://dpaste.org/rUnZ ? I tried recursion but it didn't seem to be much better.
SanguineAnomaly has joined #ruby
<tempate>
Stupid question; I didn't realize there was a count function. I ended up going with seats.flatten.count(state)
<tempate>
I don't seem to be able to access y from the second map though
aremaref has joined #ruby
aremaref has quit [Ping timeout: 240 seconds]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
Subzyro is now known as akem
_aeris_ has quit [Remote host closed the connection]
iNs has quit [Read error: Connection reset by peer]
iNs_ has joined #ruby
_aeris has joined #ruby
ruurd has quit [Ping timeout: 240 seconds]
_aeris is now known as _aeris_
Garb0 has joined #ruby
Garb0 has quit [Max SendQ exceeded]
rhe has joined #ruby
blackmesa1 has quit [Ping timeout: 246 seconds]
<tempate>
And... https://dpaste.org/Ko8y/slim now I'm getting: undefined local variable or method `' for main:Object (NameError); which makes no sense to me
lucidreamachine_ has quit [Ping timeout: 258 seconds]
blackmesa1 has joined #ruby
ruurd has joined #ruby
aremaref has joined #ruby
<tempate>
Any help is more than welcome, of course
aremaref has quit [Ping timeout: 256 seconds]
akem has quit [Quit: Leaving]
<nakilon>
wanna know a thing you didn't know?
<nakilon>
&>> "a\n\nb".split("\n")
<nakilon>
>> "a\n\nb".split("\n")
<ruby[bot]>
nakilon: I'm terribly sorry, I could not evaluate your code because of an error: JSON::ParserError:784: unexpected token at '<!DOCTYPE html>
<ruby[bot]>
<html>
<ruby[bot]>
<head>
<ruby[bot]>
<title>503 - Service Unavailable</title>
<ruby[bot]>
<p id="message">Something is missing on our end, please check back later. Take a cookie while you wait:</p>
<ruby[bot]>
<div id="cookie">🍪</div>
<surrounder>
...
<ruby[bot]>
</div>
<ruby[bot]>
<div id="contact">
<ruby[bot]>
This page won't go away? Need help? Write a <a href="mailto:me@jhass.eu">Mail</a>!
<ruby[bot]>
</div>
<ruby[bot]>
</body>
<ruby[bot]>
</html>'
<al2o3-cr>
damn!
<nakilon>
jhass
<jhass>
oh, ups
cybcypha has joined #ruby
<nakilon>
at least it automatically highlighted you actully, lol
<jhass>
better not call the bot right now :D
ruby[bot] has quit [Remote host closed the connection]
Garb0 has joined #ruby
ruby[bot] has joined #ruby
Garb0 has quit [Remote host closed the connection]
olspookishmagus has joined #ruby
<jhass>
with some luck it'll only show the first line now until I manage to fix the service
cybcypha has quit [Ping timeout: 256 seconds]
blackmesa1 has quit [Ping timeout: 264 seconds]
Rudd0 has quit [Ping timeout: 256 seconds]
<rapha>
sooo
<rapha>
oh, wait
<rapha>
what did i stumble into here? the bot is doing funny things...
<rapha>
okay, actual question...
<rapha>
if you have a character and what to know its unicode codepoint, you can use .encode
<rapha>
but what if you want to visually see that same character in a different encoding?
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
<jhass>
there should be no point as the encoding only defines the semantics of the character, a font then maps that semantic meaning to the glyph
<rapha>
hmm
<jhass>
put what you would do is just print the properly encoded string to a output configured to render things in the right encoding
<jhass>
so a html page with the right encoding tag (or http header), a terminal configured to use that particular encoding etc
<rapha>
jhass: i have a character here, ỗ (bytes: [225, 187, 151]) that i know used to be, once upon a time, a ḍ ... but how it became what it is now, i have no idea.
<rapha>
(i only know what it used to be because i happen to understand the word from its context)
* rapha
thought this would be as simple as to apply .force_encoding or so
<jhass>
mmh, my first hunch would be that it's stored as UTF-8 but interpreted as UTF-32, or something in that direction
<jhass>
nvm the encodings, but basically the string was interpreted under a different encoding than what it was stored
<rapha>
so you have to read the bytes, apply some offset, then try again, no?
<jhass>
what I tend to do to figure that out is to loop through all encodings, Encoding.list, then for each puts .force_encoding(encoding).encode("UTF-8")
<jhass>
and see for which one it looks right, if any
<rapha>
aaaah you combine the two
<jhass>
force_encoding changes the encoding of the string without touching the data, encode then maps the data from one encoding to another, using UTF-8 here so it looks alright in my terminal which expects UTF-8
<rapha>
makes sense
<rapha>
perhaps i should not try to do this with the character after it's already been extracted from a .docx file by a ruby library
<jhass>
nakilon: ^ sorry about earlier, upgraded the machine and that broke stuff in a very subtle manner
<rapha>
ah, no, you were testing the bot :)
<jhass>
yeah, sorry :)
<rapha>
all good, t'was also funny somehow :)
jl4 has joined #ruby
maryo has joined #ruby
* jl4
Ruby newbie...
<jhass>
welcome!
<jl4>
i'm working on a (planned for) 2021 Jekyll (Ruby) project ...does it makes sense to start with underlying Ruby 3 or better to stick to current 2.7 stable version ?
<tempate>
Hello. I'm trying to get https://dpaste.org/Ko8y/slim to work but I can't manage to do it. I'm getting: `apply_rules': undefined local variable or method `' for main:Object (NameError). Can someone please help me out?
* jl4
notices 2.7 v was released in october ...
<jl4>
Any hint is more than welcomed... ^^
<jl4>
thanks jhass , btw
<jhass>
jl4: usually the ruby ecosystem is pretty fast with adopting a new ruby version. But Ruby 3 features some breaking changes so it might take a little longer this time. So I would recommend you start out with 2.6 or 2.7 now (2.6 in case you get too much deprecation noise in 2.7). For a jekyll site it should be very easy to upgrade to ruby 3 once the ecosystem fully supports it
<jl4>
nice to know, jhass
<jhass>
>> "".codepoints # tempate you got some weird whitespace in your source code, that's a U+200B, ZERO WIDTH SPACE
<jhass>
eh, that didn't quite work out like I wanted to :D
maryo has quit [Quit: Leaving]
<jhass>
vim's great at displaying this stuff for clean up :)
lucidreamachine has joined #ruby
<tempate>
Marvelous
<tempate>
Thank you very much
<tempate>
It was driving me nuts
<tempate>
I'm not sure of how efficient this is, tho
<tempate>
Sorting both lists doesn't seem like a great way
<tempate>
This is a more complete version: https://dpaste.org/46nG; if you can think of a more Rubic way to do it (or a better way) don't hesitate to let me know.
<jhass>
so that's just checking if all items in seats are in new_seats now?
<jhass>
maybe .size == .size is enough?
<tempate>
Kind of. It's creating a new list of seats based on the previous one and checking if they're the same, to avoid looping through them forever
<tempate>
The problem is that all seat arrays are always going to have the same size
<jhass>
are the items uniq?
<jhass>
(within each list)
<tempate>
They are not. The array seats is actually a two dimensional array in which every cell is one of three characters.
<rapha>
jhass: found another example> "qira’at" ... again one i can understand from context; it should be "qiraʾat" (but people tend to use ` or ' instead of ʾ). seems the text is full of these. so the way it became to be like that was probably that at some point it was saved by a program that had the wrong encoding, right?
<jhass>
rapha: yes, most likely
<jhass>
if it's mixed wrong and mixed right, there's little chance of recovery. But especially if you suspect a mixup between unicode encodings (UTF-8, -16, -32), do check if it's not all wrong and only some stuff looks right because it's the same byte sequence in more than one of these encodings (especially likely with stuff that's in the first two planes, so in UTF-8 encoded as one or two bytes)
<rapha>
jhass: so it's possible information got destroyed along the way. might it be a more sensible approach, therefore, to simply make a search-and-replace-table instead of trying to mangle them back into the correct bytes?
<jhass>
hard to judge without knowing how exactly they're messed up and how much work that lookup table would be
<rapha>
jhass: unlikely that it's all wrong. i have 13718829 characters in total (non-unique) and only 34 that don't fit into either the Latin, Arabic, Greek, Hebrew, or Punctuation regex groups.
<jhass>
tempate: but each sub-array combination is uniq? so you got [['a', 'b' ‘c'], ['b', 'c', a']] but never [['a', 'b', 'c'],['a','b','c']]?
<jhass>
rapha: well, those groups do depend on the encoding too!
<jhass>
the regex engine operates on bytes, that's why regular expressions have an encoding attribute too
<rapha>
jhass: but wherever i look i can read everything (at least the Latin, Arabic and Greek parts, know too little Hebrew) and it makes sense. so stands to reason it's largel correct, right?
<rapha>
largely*
<jhass>
so the byte sequence might for example be a valid unicode codepoint in one other UTF variant than your regex
<tempate>
jhass: I'm afraid that could happen
<jhass>
tempate: okay, then I don't really have an improvement :)
<tempate>
and... can I maybe pass a variable by reference and change it in apply_rules_to_seat?
<tempate>
To detect when there's been a change
<jhass>
Ruby is entirely pass by reference, to pass a copy you would need to call .clone or .dup explicitly
<jhass>
but what you're thinking of is passing a pointer to a local variable, like it's common in C APIs for in/out parameters
<jhass>
you could achieve this with a small class that holds the value, but it's much much more common and idiomatic to instead return multiple values as an array like you do now
<jhass>
alternatively you could wrap the whole algorithm in a small short lived class that then just keeps state common to it as instance variables
<jhass>
no, you need to differentiate between value and the variable its assigned to
<jhass>
parameter passing always creates a new local variable, a new reference, to the same value
<tempate>
Hmmm
<tempate>
So how could I achieve something like it?
<tempate>
Alas, I'm afraid I have to leave
<tempate>
Thanks for everything
<jhass>
like I wrote above, by creating a value that can change its state, or better, by moving the entire algorithm into a short-lived class so you can share state using instance variables
<al2o3-cr>
If pattern is a String, then its contents are used as
<al2o3-cr>
the delimiter when splitting str. If pattern is a single
<al2o3-cr>
space, str is split on whitespace, with leading and trailing
<al2o3-cr>
whitespace and runs of contiguous whitespace characters ignored.
<al2o3-cr>
Y
aremaref has quit [Ping timeout: 246 seconds]
<nakilon>
yeah I now see it in docs
<al2o3-cr>
nakilon: it's consistent according to the docs
<nakilon>
it's a special case
<jhass>
nakilon: yeah, I think it's systemd but then downgrading it didn't help, only restoring the backup did :/ https://p.jhass.eu/9f.txt
<nakilon>
al2o3-cr I would say it's a documented inconsistency ..D
<jhass>
doesn
<jhass>
doesn't help I'm using dead software for this >.>
<nakilon>
there is an old centos on my server -- I try not to even breath on it
<al2o3-cr>
nakilon: centos dead now?
<jhass>
nakilon: this is running archlinux :D
<jhass>
I never understood the idea of CentOS
<al2o3-cr>
jhass: what kernel version?
<nakilon>
every time I update nginx config I have to run two commands about selinux that are "documented" only by two random messages on github when people somehow have figured out they help
<jhass>
I get RHEL because it's something you can buy
<jhass>
oh yeah, selinux fun...
<nakilon>
it's about adding a file to some whitelist and after you edit it you should rerun the whitelist and the more files you add the more log it prints ..D
<al2o3-cr>
nakilon: as your colon fell over?
<jhass>
al2o3-cr: 5.7.4 known working vs 5.9.13 known broken, but then I feel it's rather systemd or glibc or some of the libnss hell
<al2o3-cr>
ah, in essence still a new kernel
<jhass>
guess I'll have to upgrade package by package and see where it breaks
<jhass>
looking at the source it's getpwnam(3) that starts to fail
braincrash has quit [Read error: Connection reset by peer]
<nakilon>
jhass, idk, it was a random choice; as for today all I know is that RHEL was also an accepted choice for new server in a bank where I worked
dittonedo has joined #ruby
<nakilon>
I guess it's about codereview of something
<jhass>
haha, bank IT is basically a template of what to not do for personal or agile stuff :P
<jhass>
it's about checklists, "yes we have support contract, yes we have someone liable in case of X"
<nakilon>
it's hard to tell for sure; old technologies are old but when it's a talk about linux they tend to ask hipsters too
aremaref has joined #ruby
<nakilon>
in my team they were keeping source code in Excel instead of Git, and running it on a machine with few hundreds cores and terabytes of ram
<nakilon>
absolutely another world
braincrash has joined #ruby
<jhass>
was it in excel because the app was written in excel macros?
<nakilon>
no, the app is written in the language from 1950s and runs on some UFO architecture
<jhass>
I see
<jhass>
sounds pretty standard banking stuff
<jhass>
from what I've heard anyway, I stay away from banking and insurance :P
<nakilon>
the leading architect didn't really know even the difference between terms that mean OS, architecture, brand
<nakilon>
I had a trouble when I said: "hey, Wikipedia says..."
<jhass>
you know those concepts only really started to exist late 60s and took another decade or two to become ubiquitos
aremaref has quit [Ping timeout: 265 seconds]
dittonedo has quit [Remote host closed the connection]
blackmesa1 has joined #ruby
dittonedo has joined #ruby
<nakilon>
suddenly I see the "SGML-style" mentioned in Funge-98 specification that tells to work with space character in such way like it's one char even if it's a sequence of them
dittonedo has quit [Remote host closed the connection]
prion has joined #ruby
<prion>
hi
<prion>
how can i get pry to show documentation for methods
<al2o3-cr>
o/
<prion>
like puts
<prion>
show-doc puts doesn't work
<al2o3-cr>
prion: have you install pry-doc?
lucidreamachine has quit [Ping timeout: 264 seconds]
<prion>
hmm
<prion>
is it normal to run gem install as root
<al2o3-cr>
no
<prion>
it fails when i don't
<prion>
also does puts only add a newline when the string you pass it doesn't already end in one?
<nakilon>
macOS? use brew install rbenv
<al2o3-cr>
prion: it prepends a newline, yes.
<al2o3-cr>
*appends
<prion>
it doesn't append a newline if i write puts "Hello\n" though
<nakilon>
or do export GEM_HOME=~/.gems or something
<prion>
i'm on Ubuntu, im guesing i can get rbenv from the repositories
<prion>
oh i already have it apparently
<al2o3-cr>
prion: try `? puts`
<nakilon>
do "rbenv versions" -- you'll see if you use default ruby or rbenv's
<prion>
i only have system ruby installed
<nakilon>
maybe default one wants sudo -- just do "rbenv install <some custom version>" and it will store everything in ~/.rbenv and will never ask for root
<prion>
2.4.1 is the latest?
<prion>
or is my rbenv outdated
<nakilon>
default ruby is kind of needed only if it's a container linux or for install scripts, not something complex that needs gems
<al2o3-cr>
prion: what does `gem env` say
<nakilon>
depends on who you ask )
<al2o3-cr>
:)
<prion>
gem env says i have ruby 2.7.0 but rbenv install -l only goes up to 2.4.1
<nakilon>
I use 2.3.8 by default, some love to use modern version to have modern issues
<nakilon>
rbenv install --list-all
<al2o3-cr>
it's probably a PATH issue.
<prion>
also GEM PATHS contains a user-specific one
wnd has quit [Quit: Disconnecting from stoned server.]
<prion>
~/.gem/ruby/2.7.0
<nakilon>
I won't override GEM_PATH and similar variables if you discovered you already have rbenv
<prion>
how old is 2.4.1
lucidreamachine has joined #ruby
<nakilon>
when you do "rbenv versions" and it says you have system ruby, which version is that?
<nakilon>
Wikipedia knows how old it is; it's +0.1 per year
<prion>
nakilon: 2.7.0
blackmesa has joined #ruby
<prion>
why Ubuntu would package 2.7.0 but only have rbenv go up to 2.4.1 idk
<prion>
that seems weird
<nakilon>
"rbenv install -l" shows only versions installed in rbenv I guess, not the system one
<nakilon>
2.4.1 is what you have installed using rbenv, do the "rbenv install --list-all" to list all versions available
<prion>
yeah but why wouldn't debian/ubuntu include a newer version of ruby-build
<prion>
yeah when i list all available it stops at 2.4.1 then it's all like jruby, rbx, etc.
<prion>
well there's 2.5.0-dev
<nakilon>
yeah, weird, try to reinstall rbenv according to their github readme
<nakilon>
or ruby-build, whatever
ChmEarl has joined #ruby
<prion>
ok here we go
<prion>
thank you
al2o3-cr has quit [Quit: WeeChat 2.9]
aremaref has joined #ruby
Rudd0 has joined #ruby
aremaref has quit [Ping timeout: 260 seconds]
elcuervo has quit [Read error: Connection reset by peer]
prion has quit [Ping timeout: 246 seconds]
elcuervo has joined #ruby
prion has joined #ruby
prion has quit [Client Quit]
akem has joined #ruby
maryo has joined #ruby
impermanence has quit [Quit: Connection closed]
<jhass>
nakilon: for future reference, the lowest friction solution to "I can't install gems as root" is echo "gem: --user-install" > ~/.gemrc
<jhass>
well yeah, it doesn't play well with version managers that rely on GEM_HOME
<jhass>
but I think that's obsolete these days, bundle --path does that job better
<panorain>
Why can "Ruby just not dump/Ubuntu"?
lmc has joined #ruby
somazero has joined #ruby
somazero has quit [Quit: Leaving]
greengriminal has quit [Quit: Leaving]
<havenwood>
panorain: I don't follow. Ruby dump Ubuntu?
<havenwood>
Ah, you mean convo about --user-install on Ubuntu? Yeah, Debian and downstream packaging for Ruby hasn't been super smooth riding.
lucidreamachine has quit [Ping timeout: 264 seconds]
<panorain>
I aspologize.
<panorain>
Mainly I uh worked for the "rails".
ZeiP has joined #ruby
<ZeiP>
Hi. I have a Ruby software that has for a while now used the Ruby Dockerhub image as a basis for the application image (as well as CI tests). Recently it's started to fail because it fails to compile libv8. Does anyone have any suggestions why that is?
<havenwood>
I wish I could tell Google to point to the official docs.ruby-lang.org docs rather than ruby-doc.org...
<nakilon>
how do you know it got it wrong if ruby-lang.org docs don't go beyond 2.0? )
<havenwood>
nakilon: Because we pretend there was no pre-2.0.
<nakilon>
they are the same basically
<nakilon>
pretending is bad
<havenwood>
nakilon: I just saw you were linking 1.8. I wasn't thinking ancient Ruby. Anything before currently supported Rubies doesn't need documentation, since it's not being used. Right? Right?!?
* havenwood
glares at CentOS
<nakilon>
what's wrong with centos? ..D
<nakilon>
old versions should not be abandoned blindly -- there is still no fxri replacement
<adam12>
Perfect timing for the hundreds of machines I re-imaged from CentOS 6 to CentOS 8 :\
<havenwood>
:O
<havenwood>
I meant RHEL not RHEE, haha
<havenwood>
RedHat Enterprise EEeeeeeee
<nakilon>
no problem, RHEE made me think you know some cool stuff I didn't even hear about
<adam12>
Yo dawg, I heard you like Enterprise. So you've got Enterprise in your Enterprise.
<panorain>
Gnome 3 is really poor on output via "gnome Tweaks". Biopnic Beaver is not as nice as the real : openSuse
lightstalker has quit [Ping timeout: 260 seconds]
<panorain>
being able. mI want to program rpm and I have no frontlist.
<nakilon>
when I worked in bank our vendors gave us software for RHEL 8 while it was too new even according to the RHEL timeline in wikipedia article, and our cloud had only RHEL 7
<nakilon>
I told them it's no way and vendors should try make it work on RHEL 7 (IIRC it was something about tomcat) but our cloud platform lead said "there is no problem, we have docker! docker is magic!"
<nakilon>
I gave him a bunch of links explaining that even if the app runs it will fail if it tries to call RHEL 8 system call but he pretended that he has read that and there is no problem; I guess he just can't read English, lol
<nakilon>
sometimes it's easier to live in the world that is smaller and lacks information and knowledge about possible issues
lightstalker has joined #ruby
dionysus69 has joined #ruby
adu has quit [Quit: adu]
hramrach has joined #ruby
cd has joined #ruby
<hramrach>
hello, is there some way to iterate two files line by line?
<hramrach>
like comapare each line of two files
<hramrach>
there is each_line but it itreates only one file and you cannot access the lines of the other file while iterating the first file
<nakilon>
something like f1.each_line.zip(f2.each_line) do |line1, line2|
<apotheon>
Yeah, that's probably about as close to the canonical answer as you're likely to get.
hiroaki has joined #ruby
TomyWork has quit [Remote host closed the connection]
cliluw has joined #ruby
<adam12>
Alternatively, get a handle for both files, and in a loop, retrieve each line from `handle.each_line.next`. Need to handle EOF yourself tho.
impermanence has quit [Quit: Connection closed]
drincruz_ has quit [Ping timeout: 240 seconds]
<apotheon>
That seems like more work for no additional benefit except in edge cases.
BTRE has quit [Remote host closed the connection]
<hramrach>
I suppose you could do f1.each_line{|line1| line2=f2.each_line.next ... }, too
<hramrach>
the solution with zip looks better, though
<hramrach>
thanks
<hramrach>
and yes, this is for a case when I expect that the files have same number of lines and if they do not that's an error