havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 2.7.2, 2.6.6, 3.0.0-preview1: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
<adam12> lmat: If that doesn't work, maybe split_comments doesn't look how you expect? You might need to move further up the chain.
burgestrand has joined #ruby
burgestrand has quit [Client Quit]
Lyubo1 has joined #ruby
<havenwood> lmat: Or if the treatment is different enough, just separate them up front.
<havenwood> first_comment, *comments = split_comments
<havenwood> lmat: I commented on adam12's gist with an alternative that's equivalent.
cer0 has joined #ruby
<havenwood> Either is better than toggling booleans. It does make me think of the flipflop operator, heh.
<havenwood> lmat: A meta suggestion, but paste links to code as text rather than an image. It's easier for folk to try your code or modify it in a suggestion.
ur5us has joined #ruby
<havenwood> lmat: gist.github.com or dpaste.org are nice options.
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus70 has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 256 seconds]
ruurd has quit [Remote host closed the connection]
orbyt_ has joined #ruby
dionysus70 has joined #ruby
jud has joined #ruby
jud has quit [Changing host]
jud has joined #ruby
silverdust has quit [Ping timeout: 264 seconds]
ur5us_ has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Ping timeout: 264 seconds]
dionysus70 has quit [Remote host closed the connection]
adu has quit [Quit: adu]
dionysus70 has joined #ruby
silverdust has joined #ruby
dionysus70 has quit [Ping timeout: 240 seconds]
Rudd0 has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 246 seconds]
zenspider has quit [Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in]
zenspider has joined #ruby
bmurt has joined #ruby
silverdust has quit [Ping timeout: 260 seconds]
silverdust has joined #ruby
ur5us__ has joined #ruby
ur5us_ has quit [Ping timeout: 240 seconds]
roshanavand_ has joined #ruby
<lmat> Oh yeah, the gist...
roshanavand has quit [Ping timeout: 264 seconds]
roshanavand_ is now known as roshanavand
<lmat> adam12: Ah, with_each_index, yeah, that seems like the way to go. That's better (in this case) than havenwood's solution because it allows me to unify the two routines.
<lmat> havenwood: My working solution is like yours, but not nearly so nice! ... doc.p split_comments[0] ... split_comments.last(split_comments.length - 1).each do |c|
* lmat hides
CustosLimen has quit [Ping timeout: 272 seconds]
afisher has quit [Read error: Connection reset by peer]
kevinsjoberg has quit [Read error: Connection reset by peer]
Lewix has quit [Read error: Connection reset by peer]
manveru has quit [Ping timeout: 260 seconds]
clinth has quit [Read error: Connection reset by peer]
kevinsjoberg has joined #ruby
Lewix has joined #ruby
afisher has joined #ruby
clinth has joined #ruby
dputtick has quit [Ping timeout: 260 seconds]
CustosLimen has joined #ruby
englishm has quit [Ping timeout: 260 seconds]
dputtick has joined #ruby
englishm has joined #ruby
manveru has joined #ruby
TCZ has quit [Quit: Leaving]
ap4y has quit [Quit: WeeChat 2.9]
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
cthulchu has quit [Ping timeout: 240 seconds]
kinduff488 has joined #ruby
kinduff48 has quit [Ping timeout: 240 seconds]
silverdust has quit [Ping timeout: 264 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cer0 has quit [Quit: leaving]
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
roshanavand_ is now known as roshanavand
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
howdoi has quit [Quit: Connection closed for inactivity]
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 260 seconds]
roshanavand_ is now known as roshanavand
kinduff4888 has joined #ruby
kinduff488 has quit [Ping timeout: 268 seconds]
cer0 has joined #ruby
Rudd0 has joined #ruby
deimos_ has quit [Remote host closed the connection]
ur5us__ has quit [Ping timeout: 264 seconds]
adu has joined #ruby
kinduff48883 has joined #ruby
kinduff4888 has quit [Ping timeout: 240 seconds]
jetchisel has joined #ruby
ChmEarl has quit [Quit: Leaving]
duderonomy has joined #ruby
powerhouse has joined #ruby
powerhouse has quit [Remote host closed the connection]
powerhouse has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
DaRock has joined #ruby
<baweaver> So this one is fun: https://bugs.ruby-lang.org/issues/17292
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
adu has quit [Quit: adu]
bsdbandit-01 has joined #ruby
bocaneri has joined #ruby
Technodrome has joined #ruby
cer0 has quit [Quit: leaving]
znz_jp has quit [Remote host closed the connection]
znz_jp has joined #ruby
bocaneri has quit [Max SendQ exceeded]
bocaneri has joined #ruby
bocaneri has quit [Max SendQ exceeded]
bocaneri has joined #ruby
bocaneri has quit [Max SendQ exceeded]
cd has quit [Quit: cd]
bamdad_ has joined #ruby
bamdad has quit [Ping timeout: 240 seconds]
kinduff488832 has joined #ruby
kinduff48883 has quit [Ping timeout: 240 seconds]
cnsvc has quit [Ping timeout: 240 seconds]
powerhouse has quit [Read error: Connection reset by peer]
powerhouse has joined #ruby
hiroaki has quit [Ping timeout: 260 seconds]
brunosaboia_ has joined #ruby
brunosaboia_ has quit [Client Quit]
bamdad_ has quit [Remote host closed the connection]
bamdad has joined #ruby
vondruch has joined #ruby
burgestrand has joined #ruby
burgestrand has quit [Client Quit]
gigetoo has joined #ruby
Glumetu has joined #ruby
burgestrand has joined #ruby
jo-so has joined #ruby
teclator has quit [Ping timeout: 260 seconds]
teclator has joined #ruby
imode has quit [Ping timeout: 240 seconds]
<isene> How do I capture characters from STDIN.getc that are encoded as two bytes? I need to capture æøå and ÆØÅ via getc.
<jhass> isene: afraid you need to read_nonblock all pending bytes and tokenize into characters after
<isene> jhass: How? (Example?) See - I do some sequential parsing already (https://github.com/isene/RTFM/blob/main/rtfm#L222) - but I cannot for the love of potatos capture æøåÆØÅ...
<jhass> I built something based on https://gist.github.com/acook/4190379 once but doesn't quite fit your case
<isene> "å" is two bytes, "\xC3\xA5". I tried to first match against "\xC3" and then "\xA5" but that doesn't work. And I've tried all manners of gymnastics, and Googling and scratching of head. But nothing seems to work.
mozzarella has quit [Read error: Connection reset by peer]
<isene> So, if I were to copy your code, how would you capture "å"?
mozzarella has joined #ruby
<isene> wait, your code does capture "å" correctly...
<isene> no... it doesn't. It actually screws up curses :-/
<burgestrand> I don't understand, for me it captures å quite well.
<burgestrand> (and getch behaves properly, too)
<burgestrand> isene what's your STDIN.external_encoding?
<burgestrand> Mind you æøå are only two bytes if they're encoded as e.g. UTF-8. If you receive them as e.g. LATIN-1 (also common) they'll be 1 byte each.
<jhass> isene: it's not "my code" but an example of combining and using read_nonblock. I don't have a ready made solution to your problem at hand, I just meant I could imagine something into this direction to be able to solve it
<isene> burgestrand: Oh, this is new to me... how to check STDIN.external_encoding? and how to set it?
<burgestrand> isene you check it by looking at the value of STDIN.external_encoding :)
<isene> So, should I simply do ' STDIN.external_encoding = "latin-1" ' then? Or something?
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<burgestrand> isene I'll give you a snippet, hold on
<isene> "undefined method `external_encoding=' for #<IO:<STDIN>> (NoMethodError)"
<burgestrand> isene what is your RUBY_VERSION?
<isene> ruby 2.7.0p0
<burgestrand> isene ah, nvm, you do `STDIN.set_encoding(Encoding::UTF_8)` or `STDIN.set_encoding(Encoding::ISO8859_1)`
<burgestrand> isene which one you pick depends on what the rest of your system thinks you should have, e.g. if your å entered into the terminal are 2 bytes then most likely it's supposed to be UTF-8
<isene> STDIN.set_encoding(Encoding::UTF_8) works as before, while STDIN.set_encoding(Encoding::ISO8859_1) works in an odd way - I get the characters, but reversed and blinking and it doesn't get captured into my command history. But it seems to be a step in the right direction
<burgestrand> isene https://gist.github.com/Burgestrand/693b65b0a7aae28294a271150c19dee7 — what does that do on your end?
<burgestrand> isene this might be a red herring, but making sure the encodings are proper is usually my first go-to whenever there are issues with my åäö :)
<isene> I also get this when using the character afterwards: incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string) (Encoding::CompatibilityError)
<burgestrand> isene strings/regex in ruby are tagged with an encoding, and when you e.g. a regex with a string their encodings (string.encoding, regex.encoding) must match or you get that error
<burgestrand> e.g. `Regexp.new("å".b) === "å"` will raise that error
<isene> c = STDIN.getch
<isene> => "å"
<isene> puts c.bytesize
<isene> 2
<burgestrand> isene indeed looks like UTF-8 is what you want :)
<isene> But that gives me this when capturing with my code (https://github.com/isene/RTFM/blob/main/rtfm#L222): ┗↑╔ (blinking and reverse when I press "å" twice - pressing it once does nothing)
<isene> When I set `STDIN.set_encoding(Encoding::ISO8859_1)` I get: å (blinking, bold, reverse) after hitting "å" just once
<burgestrand> isene mainly because it's interesting… what happens if you do `STDIN.set_encoding(Encoding::BINARY)`?
<isene> Same as `STDIN.set_encoding(Encoding::ISO8859_1)`
duckpuppy has quit [Read error: Connection reset by peer]
TCZ has joined #ruby
<burgestrand> isene unfortunately the file is a bit too much for me to have a thorough look, and I'm not quite sure what you mean with (blinking, bold, reverse)
<burgestrand> isene I'm assuming the purpose of `getchr` is to read an entire character, wether that be 1 byte (e.g. a), 2 bytes (e.g. å) or more?
<isene> Yes
<isene> I tried to add this in the case evaluation (but it didn't capture my beloved "å"):
<isene> when "\xC3"
<isene> case $stdin.getc
<isene> when "\xA5" then chr = "å"
<isene> end
<isene> getchr successfully capture all arrow keys/Home/End/Backspace/PgUp etc as well as "\r" and normal characters... but not the cute, little "Å"
<isene> or rather, "å"
<isene> or both, etc
<burgestrand> hehe :)
<burgestrand> isene note the .b at the end of the "\xC3" and "\xA5" — without it the encodings won't match up, and the strings won't match
roshanavand has quit [Ping timeout: 264 seconds]
<burgestrand> String#b will force a string to be binary encoding (no encoding), and comparison will be by bytes
<burgestrand> Huh, TIL, ruby considers strings of different encodings to be unequal, doesn't matter if their bytes are identical
<isene> YAY!
<burgestrand> isene there are two things that make that gist work: input (external) encoding is binary, and the comparison strings are binary
<burgestrand> isene for an input encoding of binary, STDIN.getc will read each byte of å separately, but if you have an input encoding of UTF-8 it'll read both bytes of å in one g
rmnull has joined #ruby
<isene> But - it doesn't work in my program (still the odd characters blinking reversed) Code: https://github.com/isene/RTFM/blob/main/rtfm#L230
<burgestrand> yeah and that's interesting — I'm guessing curses does something to e.g. STDIN.getc to make it read a single character? For me the input is newline-terminated
<isene> burgestrand: Yes, it may well be a curses issue... but since I do get the characters out (but blinking reversed and not uasble for comparisons etc.) with the Encoding::ISO8859_1, I do believe this is solvable
dionysus69 has joined #ruby
<isene> The characters are captured somehow, I just need to figure out a way to decode them
vondruch has quit [Ping timeout: 256 seconds]
<burgestrand> isene it probably is :) if I'm to run your code, what's the best way to test the problem? which characters do I need to enter?
<isene> You fire up RTFM, then press ":" to get into command mode on the bottom line/window then enter "å" or "æ" or "ø"
<burgestrand> isene if I put some log output in your code at the end of chr, with an Encoding::UTF_8, then it shows that `chr` is a proper 2 bytes with an UTF-8 encoding
<burgestrand> isene i.e. it looks like `getchr` is indeed working as it should
<isene> Except I can't seem to catch the bastard...
<burgestrand> isene I put that right above `return chr` and the logged output looks OK
<isene> So how on Earth do I catch it and return the cheeky "å"?
<burgestrand> isene when I run it locally, the command mode shows a typical "?", i.e. probably only shows the first byte of the character — is that the problem you're having?
batisi[m] has joined #ruby
<isene> burgestrand: No, it shows nothing when I press "å" once and after pressing it twice I get "┗↑╔" (blinking reversed)
<burgestrand> isene give `@win_bottom.addstr(chr)` a try
<burgestrand> isene instead of `addch`
<burgestrand> isene with Encoding::UTF_8 for your stdin
<isene> HOLY COW!!
<isene> That worked :-D
<burgestrand> mooo
<burgestrand> isene I'm guessing either getch isn't encoding-aware, or simply doesn't accept more than one byte
<burgestrand> sorry, not getch, addch
<isene> You said addch
<isene> And I changed line 770 to ' @win_bottom.addstr(chr) ' and it was Voilá!
<burgestrand> \o/
<isene> Indeed.
<isene> You've been of great value. If it werent for COVID, I'd give you a big hug right now
<isene> I still have some matching stuff to iron out, but at least I get the characters now :-)
<burgestrand> isene IRC hugs are covid-aware and well received :)
<isene> ;-)
<isene> Since you're still here, how would I best solve this (and similar):
<isene> /home/geir/bin/rtfm:202:in `match': incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string) (Encoding::CompatibilityError)
<burgestrand> isene it probably means `@searched` has no encoding, I'd double-check that first by logging `@searched.encoding` on line 201
<burgestrand> isene give `str.b.match(…)` a try, it might be good enough
<isene> Then it doesn't crash - but it doesn't match either
<burgestrand> isene I'm guessing `win_bottom_curstr` is returning binary encoded strings (i.e. `win_bottom_curstr.encoding == Encoding::BINARY`) and that's unfortunate because I guess it's user input?
<burgestrand> isene ideally you'd do `return str.force_encoding(STDIN.external_encoding)` on line 730 instead — I'm not sure that solves it, but it's assuming that the return value is actually UTF-8 and I'm not sure that's entirely accurate
<isene> With that I get: /home/geir/bin/rtfm:800:in `gsub!': invalid byte sequence in UTF-8 (ArgumentError)
<isene> ... for a command entered with "Å" and for search:
<isene> /home/geir/bin/rtfm:202:in `block in list_dir': invalid multibyte character (ArgumentError)
<isene> ... even with the `str.b.match(…)`
vondruch has joined #ruby
akem_ has joined #ruby
akem has quit [Ping timeout: 240 seconds]
<burgestrand> isene there's a healthy mix of encodings in and out here :) it's possible that anything you get from Curses is binary, and anything you get from STDIN/hard-code is UTF-8 — that's bound to cause issues whenever the two mix
<burgestrand> isene typically using UTF-8 everywhere is better because that retains some meaning in your strings, e.g. "\xC3\xA5" could be anything without context, in UTF-8 it's `å` and in LATIN-1 it's `Ã¥` — in binary it's neither, just some unknown bytes
<burgestrand> isene lacking that it might be easier to fall back to binary everywhere, i.e. what I did with "\xC3".b — you might see some issues with string length calculations (e.g. "å".length => 2) or some regex patterns not behaving well (e.g. \p{L} will not properly match å)
burgestrand has quit [Quit: burgestrand]
fandre1986 has joined #ruby
silverdust has joined #ruby
banisterfiend has joined #ruby
burgestrand has joined #ruby
<isene> burgestrand: I have located the issue (https://github.com/isene/RTFM/blob/main/rtfm#L717) - it is the Curses.inch that reads only the first byte of a character on the screen. And the curses library has no other way to read characters from the screen - which is, well, pretty broken. But, I will work around that by not relying on reding back what the user has written, but rather store the user's typing
<isene> in a variable back-end. So, it will be solved. Again, thanks for all the help here. I learned a lot.
<burgestrand> isene that sounds like a good idea, not passing the string through curses :)
dfucci has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
alexherbo2 has joined #ruby
bsdbandit-01 has joined #ruby
TCZ has quit [Quit: Leaving]
rubydoc has joined #ruby
CrimisoK` has joined #ruby
phaul has joined #ruby
akem_ is now known as akem
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
CrimisoK` has left #ruby [#ruby]
dfucci_ has joined #ruby
<nakilon> if I get "No debugging symbols found in /usr/bin/ruby" in gdb that means I can't see backtrace?
<jhass> no C level backtrace, probably
dfucci has quit [Ping timeout: 268 seconds]
<jhass> well you can still see it but it's just memory addresses
<nakilon> okay then
<nakilon> the actual issue is that ruby processes keep living even if there is `abort` in the very first line
<nakilon> launched under the cron /bin/sh
<jhass> mh
<nakilon> the cron launches 6 processes and near 20% of them stay forever even while the very first line is: abort "too many processes" if 10 < `ps aux | grep ruby | wc -l`.to_i
<jhass> typical reason would be if the parent process never wait(2)'s on it, but that's unlikely for cron and sh
<jhass> oh, how exactly do you launch these 6?
dfucci has joined #ruby
TCZ has joined #ruby
<jhass> via one shell as background tasks or per separate cron entries?
bmurt has joined #ruby
<nakilon> I am emulating 10 sec period cron since its minimum is 60 sec
<nakilon> the initial effect was that cron skips every 2nd minute, and stopped skipping when I added the last `&` to this .sh
<jhass> okay
<jhass> so, I think the shell won't collect those background jobs on its own like this
<nakilon> but now after few minutes it started complaining about the number of processes and `ps` is full of them now
<nakilon> like 25 of them after 20 minutes of run
dfucci_ has quit [Ping timeout: 240 seconds]
<jhass> try wait $(jobs -p) at the end
<nakilon> jobs -p is empty
<jhass> or just argless wait, apparently
<nakilon> same
<nakilon> or should it be exactly in that .sh?
<jhass> uhm, yes, what else have you been doing?
<nakilon> what do you mean?
<nakilon> right now every another new main.rb just aborts in the first line but processes keep growing
<jhass> oh, you're spawning subshells even, I overlooked before. Why?
<nakilon> you mean {} ? I thought it's not spawning
<nakilon> I thought () is spawning
<jhass> maybe it's not, never saw before
<jhass> just don't get what it's good for here
<nakilon> it does not chain & and && otherwise
<jhass> anyways ruby main.rb &; sleep 10; ruby main.rb &; sleep 10; wait is my suggestion
<nakilon> & is lower precedence so it's for precedence
<rubydoc> nakilon: parser error ["Expected \">>\", but got ", " i"@0] at position 0 around ` '
<nakilon> lol
<jhass> haha, phaul ^
<nakilon> I'm already wasted hours on this thing that I initially supposed was 'trivial (
<nakilon> *I've
<jhass> heh
<jhass> just use a systemd timer :P
<jhass> or ruby -e "10.times { load "main.rb"; sleep 10; }"
<nakilon> systemd? it's alpine container
<nakilon> I want this thing to light-weightly sit on my server
<jhass> well, don't complain on wasted time if you prio runtime efficiency over developer time efficiency :P
<nakilon> my server already has like 0 free RAM
<nakilon> it keeps living only because ruby processes force GC internally because of that, lol
<nakilon> anyway; I'll try `;` and see
<jhass> the important part was the wait at the end :D
<nakilon> how does it work? I tested with `ruby` and `irb` -- it does nothing with them in bg
burgestrand has quit [Quit: burgestrand]
<jhass> I mean I'm just guessing around, the problem to me sounds like the shell for some reason doesn't call `wait(2)` on the terminated processes
<nakilon> or did it did nothing because it waits for STDIN?
<jhass> if you get like htop and use tree view and kill the parent `sh` I'm sure all the childs vanish at the same time
<nakilon> I've already stopped the container, it looked like this: https://dpaste.org/4kD8/slim
<jhass> huh, they reparented to cron? weird
<jhass> ah, your crond is pid1 in the container, that's why
<nakilon> it happens because /bin/sh quits
<nakilon> what do you suggest?
<jhass> well, I'm not 100% sure what's happening
<nakilon> I showed the first line of the ruby script -- they abort but keep living like this
<jhass> What's the process state?
burgestrand has joined #ruby
<nakilon> I wish I knew; I guess alpine's ps does not show many columns
<jhass> you should be able to see from the host
<jhass> use htop or so
<nakilon> might be zombies if their parent isn't the original one, right?
<jhass> that's what I want to figure out
<jhass> anything uncollected gets reparented when their parent exists, so could be zombie, could be running
<jhass> anything uncollected or running I mean
<jhass> zombie would mean uncollected
<nakilon> they aren't in htop
<nakilon> I mean not in host htop; and here is how they look in alpine -- https://dpaste.org/QDTi/slim
ChmEarl has joined #ruby
<nakilon> and not in alpine's htop; maybe I'm noob and don't know what should I press to make zombies appear in it, because they aren't in htop but are in ps aux
dfucci_ has joined #ruby
<nakilon> /bin/sh becomes zombie though, but it vanishes when I restart the htop: https://i.imgur.com/rpsQrin.png
dfucci has quit [Ping timeout: 264 seconds]
<jhass> weird, I don't know
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
ruurd has joined #ruby
TCZ has quit [Quit: Leaving]
Technodrome has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dfucci has joined #ruby
dfucci_ has quit [Ping timeout: 246 seconds]
lucasb has joined #ruby
TomyWork has joined #ruby
chouhoulis has joined #ruby
vondruch has left #ruby [#ruby]
<nakilon> jhass, docker run --init did the trick
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
vondruch has joined #ruby
<jhass> heh
<jhass> another instance where docker created more problems than it solved :P
<jhass> so sh just drops the process and hopes pid1 collects the zombies, but crond didn't know to do that?
<nakilon> good thing I'm into defensive programming'
<nakilon> otherwise would not spot it and kill the server within a day
<adam12> lmat: You got it working I presume?
<nakilon> unfortunately it still needs the trailing & in .sh
<lmat> adam12: Yes, I think this part is working now.
<lmat> adam12: u da man!
<adam12> lmat: Cheers!
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
bsdbandit-01 has joined #ruby
banisterfiend has joined #ruby
imode has joined #ruby
vondruch has quit [Client Quit]
vondruch_ has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
vondruch_ is now known as vondruch
nofxx_ has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
Glumetu has quit [Quit: Glumetu]
orbyt_ has joined #ruby
cthulchu_ has joined #ruby
nofxx has joined #ruby
nofxx_ has quit [Ping timeout: 260 seconds]
DaRock has quit [Ping timeout: 240 seconds]
howdoi has joined #ruby
nofxx_ has joined #ruby
dfucci has joined #ruby
nofxx has quit [Ping timeout: 265 seconds]
dfucci has quit [Ping timeout: 265 seconds]
ReinH__ has quit [Ping timeout: 240 seconds]
ReinH__ has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
burgestrand has quit [Quit: burgestrand]
alexherbo2 has quit [Ping timeout: 264 seconds]
Atro has quit [Ping timeout: 260 seconds]
entel has quit [Read error: Connection reset by peer]
Atro has joined #ruby
entel has joined #ruby
akem has quit [Ping timeout: 268 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
banisterfiend has joined #ruby
rmnull1 has joined #ruby
rmnull1 has quit [Client Quit]
rmnull1 has joined #ruby
rmnull1 has quit [Client Quit]
rmnull has quit [Ping timeout: 264 seconds]
rmnull has joined #ruby
teardown has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
teardown has joined #ruby
<nakilon> I wonder when did Time#at start accept :in
<havenwood> nakilon: Ruby 2.6
<nakilon> havenwood, thanks; how d oyou know though? just remember?
<havenwood> nakilon: yeah, I recalled then spot checked it wasn't in 2.5 to confirm
<adam12> 2.5 did receive improvements to Time but it was about units.
<nakilon> docs lack an example
<nakilon> passed the timezone name and then had to find in specs that I have to TimeSpecs::TimezoneWithName.new
<nakilon> wait, that's a class for specs I guess
<nakilon> should I use TZInfo::Timezone.get?
<nakilon> then it's a gem dependency
<havenwood> nakilon: "A timezone argument must have local_to_utc and utc_to_local methods, and may have name and abbr methods."
<nakilon> the first time I see an optional argument in stdlib that will start work only after I install a gem
ramfjord has joined #ruby
TomyWork has quit [Remote host closed the connection]
alexherbo2 has joined #ruby
teardown has quit [Ping timeout: 240 seconds]
teardown has joined #ruby
rmnull has quit [Ping timeout: 264 seconds]
rmnull has joined #ruby
TCZ has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiroaki has joined #ruby
teardown has quit [Ping timeout: 240 seconds]
teardown has joined #ruby
TCZ has quit [Quit: Leaving]
<isene> havenwood: RTFM is now pretty feature complete. Did a full rewrite of the command/search input to circumvent a broken part of the curses module (it can't read multibyte characters from screen). Next will be to make a 30 sec screencast. Feel free to suggest code improvements (I did the Dir.home change you suggested). Clocked 40 hours coding so far.
Rudd0 has quit [Ping timeout: 240 seconds]
<mcr> I'm looking help understanding how to use the Google API Client, FCMv1 class. I switched from the "fcm" gem to this, because I need the v1-OAUTH2 authentication mechanism (rather than API_KEY. It's an internal policy issue, PM me if you want to know details). But, I can't seem to get that class to do things, and there are too many layers of indirection in the source code.
vondruch_ has joined #ruby
GodFather has quit [Ping timeout: 272 seconds]
burgestrand has joined #ruby
vondruch has quit [Ping timeout: 256 seconds]
vondruch_ is now known as vondruch
tbisker8 has quit [Ping timeout: 256 seconds]
davispuh has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather has joined #ruby
TCZ has joined #ruby
teardown has quit [Ping timeout: 240 seconds]
cnsvc has joined #ruby
davispuh has quit [Ping timeout: 240 seconds]
davispuh has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs has joined #ruby
ur5us__ has joined #ruby
akem has joined #ruby
ellcs has quit [Ping timeout: 268 seconds]
ellcs has joined #ruby
priodev has joined #ruby
GuyGomma has joined #ruby
<GuyGomma> hi
<GuyGomma> what is ruby ?
<GuyGomma> is ruby secure ?
<apotheon> Is anything secure?
* jtperreault nods at baweaver
<GuyGomma> well i am asking really
<GuyGomma> can ruby be on rails too?
<baweaver> Don't mind me, just troll hunting.
<GuyGomma> oh ok
<GuyGomma> whos the troll ?
<GuyGomma> do you need help ?
<baweaver> Boring troll is boring.
cnsvc has quit [Quit: WeeChat 2.9]
<GuyGomma> but whos trolling ?
<GuyGomma> anyway
<GuyGomma> back to my questions...
<GuyGomma> can ruby be on rails as well ?
<GuyGomma> tnx
<GuyGomma> do you have any experience with that as well ?
<apotheon> To quote the immortal Al Pacino, in the movie Heat, "[You could] get killed walking your doggie!"
<apotheon> (re: "secure")
<GuyGomma> what does that mean ?
<GuyGomma> this channel is very quiety.
ap4y has joined #ruby
<apotheon> It means that asking whether a piece of software is "secure" in some general, unspecified sense is pretty much a completely pointless thing to do.
<GuyGomma> are you a dev baweaver
<apotheon> (especially a piece of software like a compiler, interpreter, runtime)
<GuyGomma> i have heard ruby can be hacked
<apotheon> (that is, a complicated piece of software)
<apotheon> PHP and firewood can get hacked.
<go|dfish> GuyGomma: this shaman_king is very persistenty.
<GuyGomma> but php is more mature
ur5us__ has quit [Remote host closed the connection]
ur5us__ has joined #ruby
<apotheon> "mature"
<jtperreault> more mature than firewood though? hm i dunno bout that
<apotheon> One of the most amusing quotes I've encountered about PHP is "The reason PHP looks like a language designed by children is that it was."
<baweaver> Let's avoid language bashing.
<apotheon> I was just quoting someone.
<GuyGomma> who designed ruby ?
<apotheon> The point is that someone says something negative about *every* language.
<apotheon> GuyGomma: smart people
<baweaver> GuyGomma: You're free to google that and look it up yourself.
<GuyGomma> i think its best to learn different languages
<GuyGomma> start with grails and move to rails.
GuyGomma was banned on #ruby by baweaver [*!sid470167@gateway/web/irccloud.com/x-nicjyinlbnjebgkb]
GuyGomma was kicked from #ruby by baweaver [Your behavior is not conducive to the desired environment.]
<baweaver> Bye
<baweaver> 100% convinced now.
<apotheon> GuyGomma: What would satisfy your question? Do you want a software developer and former infosec professional to exlain to you that the answer to your question is that Ruby is about as safe to use for programming as any other language?
<apotheon> oh, whoops
<apotheon> gone now
<baweaver> Same boring troll with the Grails bit
<baweaver> It's about 5 messages until extremely racist diatribes
<apotheon> baweaver: I was indistinguishably close to 100% sure it was the same person I saw you kick out last time I noticed it.
<baweaver> adam12 / havenwood: stepping out for a bit, might want to +r
<baweaver> Went ahead and set it for the moment.
<baweaver> DMs afterwards pretty well confirm it. Anyways, as you all were.
<apotheon> off for a walk, then
<apotheon> ta
titanbiscuit has joined #ruby
burgestrand has quit [Quit: burgestrand]
mohsen_in has joined #ruby
mohsen_in has quit [Client Quit]
titanbiscuit has quit [Ping timeout: 240 seconds]
titanbiscuit has joined #ruby
FastJack has quit [Ping timeout: 260 seconds]
cd has joined #ruby
sagax has joined #ruby
FastJack has joined #ruby
elcontrastador has joined #ruby
Rudd0 has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
ellcs has quit [Ping timeout: 268 seconds]
nofxx has joined #ruby
nofxx_ has quit [Ping timeout: 268 seconds]
TCZ has quit [Quit: Leaving]
orbyt_ has joined #ruby
stonerl has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
stonerl has joined #ruby
dionysus69 has joined #ruby
TCZ has joined #ruby
havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 2.7.2, 2.6.6, 3.0.0-preview1: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3 | Can't talk? Register/identify with NickServ
sergioro has joined #ruby
sergioro has quit [Quit: leaving]
cd has quit [Quit: cd]
cd has joined #ruby
ur5us__ has quit [Ping timeout: 264 seconds]
reyfi9e has joined #ruby
yokel has quit [Ping timeout: 264 seconds]
yokel has joined #ruby