adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 2.7.2, 2.6.6, 3.0.0-preview2: 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
shokohsc has quit [Quit: Ping timeout (120 seconds)]
crankharder has quit [Ping timeout: 264 seconds]
shokohsc has joined #ruby
crankharder has joined #ruby
aremaref has joined #ruby
ur5us has joined #ruby
crankharder has quit [Ping timeout: 260 seconds]
stryek has quit [Quit: Connection closed for inactivity]
prion has quit [Ping timeout: 240 seconds]
nofxx_ has joined #ruby
nofxx has quit [Ping timeout: 246 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
carbone5 has joined #ruby
carbone5 has quit [Client Quit]
bambanx has quit [Ping timeout: 264 seconds]
mbrndtgn3 has joined #ruby
titanbiscuit has quit [Quit: ZNC 1.7.5 - https://znc.in]
nemesit|znc has quit [Ping timeout: 265 seconds]
titanbiscuit has joined #ruby
bitstalker has quit [Ping timeout: 260 seconds]
bitstalker_ has joined #ruby
mbrndtgn has quit [Ping timeout: 265 seconds]
mbrndtgn3 is now known as mbrndtgn
nemesit|znc has joined #ruby
RickHull has quit [Ping timeout: 245 seconds]
roshanavand has quit [Ping timeout: 264 seconds]
drincruz_ has quit [Ping timeout: 240 seconds]
fratis has joined #ruby
icarus has quit [Ping timeout: 260 seconds]
cliluw has joined #ruby
prion has joined #ruby
mroulston has joined #ruby
fratis has quit [Ping timeout: 260 seconds]
nofxx__ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nofxx_ has quit [Ping timeout: 264 seconds]
TCZ has joined #ruby
ltp has joined #ruby
nofxx__ has quit [Quit: Leaving]
meinside has joined #ruby
NeoThermic has quit [Ping timeout: 256 seconds]
prion has quit [Ping timeout: 265 seconds]
orbyt_ has joined #ruby
drincruz_ has joined #ruby
NeoThermic_II has joined #ruby
mroulston has quit [Quit: Textual IRC Client: www.textualapp.com]
aremaref has quit [Ping timeout: 258 seconds]
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
aremaref has joined #ruby
aremaref has quit [Ping timeout: 258 seconds]
cliluw has quit [Ping timeout: 258 seconds]
Swyper has joined #ruby
NeoThermic_II has quit [Read error: Connection reset by peer]
NeoThermic_III has joined #ruby
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
NeoThermic_III is now known as NeoThermic
cowgomoo has joined #ruby
<cowgomoo> can someone point me to how to clean up resources acquired in a thread?
<havenwood> cowgomoo: As in file descriptors or you mean memory?
<cowgomoo> havenwood: this specifically is an bus subscription
<cowgomoo> perhaps the convention is to raise this subscription up to the same level as the thread context? (i.e. threads can't clean themselves up?)
<cowgomoo> or should the thread function be wrapped in a begin end to hanlde exit()?
<cowgomoo> i.e. Thread.new{begin; ...; rescue <EXIT>; end;}
<havenwood> cowgomoo: FWIW, you can do: Thread.new { ...; rescue; ... }
<havenwood> &>> Thread.new do; asdf; rescue => e; p e end
<rubydoc> stderr: playpen: application terminated abnormally with signal 31 (Bad system call) (https://carc.in/#/r/a33i)
<cowgomoo> if a method within the behavior of the thread is blocking, does ruby cancel the block?
<cowgomoo> if the thread is doing a blocking read, does ruby clean up the block so that the thread can exit?
<cowgomoo> or should I use a polling read to support Thread.kill
<havenwood> cowgomoo: I think you might be able to set Thread::handle_interrupt to :on_blocking but unsure.
<cowgomoo> k, I'll give it a shot, I'm a ruby newb so I apologize
<havenwood> cowgomoo: no worries at all. others may have a better answer on this one if you hang around. let us know if it works. :)
sh7d has quit [Ping timeout: 260 seconds]
sh7d has joined #ruby
bhaak has quit [Ping timeout: 272 seconds]
bhaak has joined #ruby
aremaref has joined #ruby
evdubs has quit [Remote host closed the connection]
evdubs has joined #ruby
Eiam has quit [Ping timeout: 260 seconds]
aremaref has quit [Ping timeout: 264 seconds]
Eiam has joined #ruby
twe4ked has joined #ruby
ChmEarl has quit [Quit: Leaving]
Eiam has quit [Quit: (╯°□°)╯︵ ǝpouǝǝɹɟ]
<cowgomoo> can someone point me to how to clean up resources acquired in a thread?
<cowgomoo> i.e. upon Thread.exit unsubscribe from a bus
elcuervo has joined #ruby
<havenwood> cowgomoo: Unsubscribe from what bus? What does it mean to unsubscribe? Are you just wanting to close any open sockets or is there a domain specific bus closing thing you need to do?
<havenwood> cowgomoo: Like with message_bus you might: client.unsubscribe("/channel")
<cowgomoo> havenwood: yes
cuerbot has quit [Ping timeout: 258 seconds]
gix- has joined #ruby
gix has quit [Disconnected by services]
Swyper has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 260 seconds]
phaul has quit [Ping timeout: 256 seconds]
SeepingN has joined #ruby
drincruz_ has quit [Ping timeout: 258 seconds]
rubydoc has quit [Ping timeout: 258 seconds]
phaul has joined #ruby
fowl has quit [Ping timeout: 272 seconds]
jerme_ has quit [Ping timeout: 264 seconds]
d0liver has quit [Read error: Connection reset by peer]
en10n has quit [Read error: Connection reset by peer]
proc has quit [Read error: Connection reset by peer]
nickb has quit [Read error: Connection reset by peer]
rubydoc has joined #ruby
proc has joined #ruby
nickb has joined #ruby
kwilczynski has quit [Ping timeout: 264 seconds]
en10n has joined #ruby
aremaref has joined #ruby
jerme_ has joined #ruby
d0liver has joined #ruby
fowl has joined #ruby
kwilczynski has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
aremaref has quit [Ping timeout: 260 seconds]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
ur5us has joined #ruby
aremaref has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
blackmesa has joined #ruby
jordanm has quit [Ping timeout: 246 seconds]
jordanm has joined #ruby
cthu| has quit [Ping timeout: 258 seconds]
aremaref has quit [Ping timeout: 240 seconds]
aremaref has joined #ruby
aremaref has quit [Ping timeout: 272 seconds]
gix- has quit [Ping timeout: 265 seconds]
crankharder has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
blackmesa has joined #ruby
fercell has joined #ruby
crankharder has quit [Ping timeout: 260 seconds]
cd has quit [Quit: cd]
crankharder has joined #ruby
crankharder has quit [Ping timeout: 258 seconds]
znz_jp has quit [Remote host closed the connection]
znz_jp has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
teclator has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.9]
blackmesa has quit [Ping timeout: 272 seconds]
ua_ has joined #ruby
crankharder has joined #ruby
ua has quit [Ping timeout: 240 seconds]
crankharder has quit [Ping timeout: 258 seconds]
hiroaki has quit [Remote host closed the connection]
hiroaki has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
cloud69 has joined #ruby
duderonomy has quit [Ping timeout: 260 seconds]
hiroaki has quit [Ping timeout: 240 seconds]
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
_aeris has joined #ruby
_aeris_ has quit [Ping timeout: 240 seconds]
_aeris is now known as _aeris_
akem__ is now known as MasterSlave
jordanm has quit [Remote host closed the connection]
jordanm has joined #ruby
duderonomy has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
drincruz_ has joined #ruby
blackmesa has joined #ruby
phaul has quit [Ping timeout: 256 seconds]
rubydoc has quit [Ping timeout: 260 seconds]
phaul has joined #ruby
rubydoc has joined #ruby
drincruz_ has quit [Ping timeout: 256 seconds]
blackmesa has quit [Client Quit]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
blackmesa has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
camilasan has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc_ has joined #ruby
orbyt_ has joined #ruby
miss0r4 has quit [Read error: Connection reset by peer]
teclator has quit [Ping timeout: 265 seconds]
teclator has joined #ruby
teclator has quit [Ping timeout: 258 seconds]
teclator has joined #ruby
braincrash has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fercell has quit [Quit: WeeChat 2.9]
_aeris has joined #ruby
teclator has quit [Ping timeout: 256 seconds]
teclator has joined #ruby
_aeris_ has quit [Ping timeout: 240 seconds]
_aeris is now known as _aeris_
ur5us has quit [Ping timeout: 264 seconds]
akem_ has joined #ruby
MasterSlave has quit [Ping timeout: 264 seconds]
miss0r4 has joined #ruby
infosec_yo has joined #ruby
<infosec_yo> hi !
<infosec_yo> is ruby nice ?
<surrounder> this guy again..
<surrounder> adam12: ^
dionysus69 has joined #ruby
<infosec_yo> who?
<leftylink> hmm, preview 2 is out? how recent is this...
<leftylink> I see...
<leftylink> anythng good?
<infosec_yo> oh ruby is out and about ?
<leftylink> I guess the typeprof is the new thing... probably profiler, not professor
<leftylink> eh??? one-line pattern matching even worked in 2.7???????????????
<leftylink> &>> {a: 0, b: 1} in {a:}; a
<rubydoc_> # => 0 stderr: -e:4: warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby! (https://carc.in/#/r/a34m)
<leftylink> well, I didn't know that. but I wonder if it's better I don't know, if it's going to change imminently
<leftylink> all right
<infosec_yo> !ruby
dionysus69 has quit [Ping timeout: 258 seconds]
work_ has joined #ruby
<work_> hello, Is there a way to match all words starting with let's say "en" using `%w()` ? example: instead of `%w(en-one en-two en-three)`, we use something like `%w(en*)`
postmodern has quit [Quit: Leaving]
<leftylink> interesting... no, the only purpose that %w can be used for is to create arrays of strings. to match all words starting with "en" in such an array, do it the same way as one would for any other array (#select)
<jhass> or .grep(/en.*/)
<leftylink> o
<leftylink> I like it
teclator has quit [Ping timeout: 240 seconds]
<leftylink> if there were a way to use %w in any other way, https://docs.ruby-lang.org/en/2.7.0/doc/syntax/literals_rdoc.html would have told us about it
<jhass> eh /^en but you get the idea
teclator has joined #ruby
Mia has quit [Read error: Connection reset by peer]
<work_> leftylink: Am not sure I understand what you mean using (#select)
<infosec_yo> is ruby fast ?
<leftylink> well my suggestion has already been superseded by a better one anyway
<leftylink> so it is not necessary to consider my suggestion
<leftylink> thank you for your consideration though
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leftylink> but I am happy to discuss it even though it will not be considered
<leftylink> &ri Enumerable#select
<leftylink> &ri Enumerable#grep
<leftylink> grep can be very interesting here since regular expressions have Regexp#=== . I suppose select is okay if someone is allergic to regular expressions
Technodrome has joined #ruby
<work_> leftylink: thank you ;)
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #ruby
jinie has quit [Quit: ZNC 1.8.2 - https://znc.in]
Garb0 has joined #ruby
Garb0 has quit [Max SendQ exceeded]
jinie has joined #ruby
akem has joined #ruby
akem_ has quit [Ping timeout: 260 seconds]
<nakilon> leftylink https://en.wikipedia.org/wiki/Allergen_immunotherapy should be applied
meinside has quit [Quit: Connection closed for inactivity]
prion has joined #ruby
crankharder has joined #ruby
cloud69 has quit [Quit: Connection closed for inactivity]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drincruz_ has joined #ruby
Tempesta has quit [Quit: See ya!]
jinie has quit [Quit: ZNC 1.8.2 - https://znc.in]
jinie has joined #ruby
TCZ has joined #ruby
drincruz_ has quit [Ping timeout: 256 seconds]
Tempesta has joined #ruby
<infosec_yo> is ruby ON rails?
<noctux> hmm, anybody got an idea what I'm missing here? https://paste.xinu.at/u8p/ I have a class, have redefined pretty_print(pp) for it, according to pry, said object exposes that implementation (which simply calls inspect on the object). however, when actually calling, I somehow receive a different output...
<infosec_yo> jeah
<noctux> so what methods do I actually have to wrap for 'pp' to print my own implementation?
<infosec_yo> the rails ones.
<jhass> !troll infosec_yo
infosec_yo was kicked from #ruby by ruby[bot] [trolling is a bannable offense, see http://ruby-community.com/pages/user_rules]
<jhass> noctux: not sure, in a minimal example it seems to work as expected: https://carc.in/#/r/a35b
Garb0 has joined #ruby
Garb0 has quit [Max SendQ exceeded]
<jhass> what's your inspect like? anything fancy happening there?
ignorand has joined #ruby
TomyWork has joined #ruby
<noctux> well. the surrounding code is a mess involving a DelegateClass... I'll try to extract a MWE and see if I can get it to break
crankharder has quit [Ping timeout: 240 seconds]
<noctux> ok, it is definitely related to the delegateclass
<noctux> but I have no idea why: https://paste.xinu.at/Tq2/ MWE (please read as: minimal wrong example)
<noctux> the pry part can be skipped. both pry/pp break in the same way, printing "hello" instead of "overridden"
<jhass> noctux: looks like DelegateClass only delegates explicitly defined methods of the target class:: https://github.com/ruby/ruby/blob/v2_7_2/lib/delegate.rb#L388
<jhass> maybe SimpleDelegator works for you?
<noctux> well, I had assumed that line 421 will define all my methods from the block on the anonymous class?
crankharder has joined #ruby
<noctux> and it seems to be that way: https://paste.xinu.at/gk6jG/
<noctux> prints "hello from foobar" (works for methods only defined in delegator block), prints "hello from TestDelegator" (methods in the block shadow ones from the original class)
<jhass> mmh, yeah, all explicit calls work as intended, nvm https://carc.in/#/r/a35m
<jhass> noctux: haha, it explicitly unwraps delegators https://github.com/ruby/ruby/blob/v2_7_2/lib/pp.rb#L152-L154
<noctux> hrmpf
<jhass> might call it a bug, it probably should only do that for check_inspect_key
crankharder has quit [Ping timeout: 246 seconds]
<noctux> jepp, that should probably not happen for the pretty_print call in 163
<noctux> jhass: thank you very much for your help!
<jhass> nor for the one in 157
<jhass> you're welcome :)
crankharder has joined #ruby
drincruz_ has joined #ruby
<noctux> hmm, actually that code looks bogus in other regards as well
<noctux> if there were multiple wrapping delegators, it should not really do its job either
<jhass> time to switch to awesome_print? :D https://github.com/awesome-print/awesome_print
<noctux> probably :)
<noctux> if I can convince pry to use it in my case
<noctux> uuuh, nice :)
<jhass> not that I ever tried this, just popped up as I was looking for the link :D
crankharder has quit [Ping timeout: 260 seconds]
jinie has quit [Quit: ZNC 1.8.2 - https://znc.in]
jinie has joined #ruby
<noctux> ich also got another, very bad idea :P https://paste.xinu.at/rvsdi/
<jhass> been there :P
<noctux> :)
BenDover has joined #ruby
crankharder has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
* adam12 rolls eyes
<adam12> if this troll spend half the time learning the difference between ruby and python as he does trolling, he'd be an expert.
miss0r4 has quit [Ping timeout: 272 seconds]
miss0r4 has joined #ruby
teardown has quit [Remote host closed the connection]
teardown has joined #ruby
shaman42 has quit [Ping timeout: 240 seconds]
shaman42 has joined #ruby
rubydoc_ has quit [Remote host closed the connection]
rubydoc_ has joined #ruby
Swyper has joined #ruby
kurko_ has joined #ruby
AndyC has joined #ruby
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
ignorand has quit [Disconnected by services]
blackmesa1 has joined #ruby
AndyC has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 272 seconds]
ua_ has quit [Ping timeout: 258 seconds]
ua has joined #ruby
<arne_> is ruby2.7 considered more memory hungry / leaky?
<yxhuvud> arne: no.
<adam12> arne_: If anything, memory usage is getting better I believe.
<yxhuvud> I think it still may want to run with jemalloc in certain cases though
<arne_> hm, i updated and did some tests and a proces which is idling now
<arne_> sitting on 30% of the ram
<arne_> ah, infosec is here, TOO? whats wrong with that guy
<adam12> arne_: can you pm me where else you saw them?
<arne_> im always wondering what's going on with heads of those people
<arne_> are they having psychosis? like crazy people?
<adam12> arne_: They've been coming around for months. Nothing better to do I guess.
<arne_> corona is a helluva drug
<arne_> if 2.6.6 and 2.7.2 are considered stable why the f does ubuntu have 2.7.0
* arne_ should've never used ubuntu docker
<arne_> when did jit get added? 2.6.6 ? maybe i do a smaller jump
<arne_> or is there something i really want, that is only in 2.7?
<arne_> (except for pattern matching, i think that's really not a cool feature in ruby)
<yxhuvud> jit is still not enabled by default though, and might not improve your stuff
<arne_> sad beepo
<arne_> sad beep
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
<arne_> so between 2.5 and 2.7 it's just "better performance/memory" ?
<arne_> is rbx still a thing?
BenDover has quit [Quit: BenDover]
work_ has quit [Quit: Connection closed for inactivity]
<adam12> arne_: Not as much as it might have been at one point.
<arne_> 2What can a cloud-native virtual machine help you do?
<arne_> hell do i know
<adam12> arne_: This is a good resource for finding some of the changes across versions: https://rubyreferences.github.io/rubychanges/
<arne_> endless range
<arne_> wuaaaaaaaaaaaaat
<arne_> is this haskell
<arne_> proc composition oh jeebus yes i will leave it at 2.7
<arne_> :o _1 i suggested this stuff a while ago
<arne_> someone wrote a PoC "uberscore" whe i did
Rudd0 has joined #ruby
blackmesa1 has quit [Ping timeout: 264 seconds]
stryek has joined #ruby
dionysus69 has joined #ruby
Mrbuck has joined #ruby
<Mrbuck> Hi I worked with ruby 1.x and I am not getting opportunity to explore ruby much but if I got forced my next employer to work on ruby how quick in general one can adopt from python? I guess a week or so could be sufficient right ?
greengriminal has joined #ruby
<havenwood> Mrbuck: If you were familiar with Ruby 1.8 or 1.9 then it should be quick to get up to speed with 2.7.
davispuh has joined #ruby
<havenwood> Mrbuck: 1.9+ would in particular be no problem.
<havenwood> Mrbuck: The most changes are from 1.8 to 1.9.
<Mrbuck> havenwood: ok
<nakilon> he might already forgot what was in 1.8 so he'll sopt no changes )
<nakilon> *spot
cuerbot has joined #ruby
<Mrbuck> can I know like what are majorr changes one example?
<havenwood> Mrbuck: From what version?
bambanx has joined #ruby
<havenwood> Mrbuck: 1.9 from like 10 years ago or further back?
<Mrbuck> 1.8-1.9 I will try to identofy if I rememer anything
akem has quit [Ping timeout: 256 seconds]
<Mrbuck> identify*
<Mrbuck> Thank you havenwood I will check it
<nakilon> Mrbuck see here: https://www.ruby-lang.org/en/news/
<nakilon> open each x.0 version "read more" links and you'll see there a list of features
<Mrbuck> nakilon: ok, anyway I wll get started with latest docs
elcuervo has quit [Ping timeout: 265 seconds]
<nakilon> there are archives on the right for previous years
<Mrbuck> and the codebase version
bambanx has quit [Ping timeout: 260 seconds]
fercell has joined #ruby
icarus has joined #ruby
cd has joined #ruby
ua_ has joined #ruby
ChmEarl has joined #ruby
ua has quit [Ping timeout: 272 seconds]
akem has joined #ruby
FastJack has quit [Ping timeout: 264 seconds]
Eiam has joined #ruby
FastJack has joined #ruby
bambanx has joined #ruby
cthu| has joined #ruby
Mrbuck has quit [Quit: WeeChat 2.9]
robotmay has quit [Remote host closed the connection]
Garb0 has joined #ruby
aesthe has joined #ruby
aesthe has quit [Max SendQ exceeded]
robotmay has joined #ruby
SeepingN has joined #ruby
orbyt_ has joined #ruby
bambanx has quit [Remote host closed the connection]
bambanx has joined #ruby
bambanx has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aremaref has joined #ruby
TCZ has joined #ruby
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
TCZ has joined #ruby
blackmesa1 has joined #ruby
fercell has quit [Quit: WeeChat 2.9]
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
<rapha> evening all
helpa has joined #ruby
<rapha> for something like `echo -n "#{char}" | iconv -f utf8 -t utf32be | xxd -p`, is there a more elegant way of getting the string to iconv? or is echo + string interpolation the only way?
TCZ has joined #ruby
<havenwood> rapha: There's a big-endian version of UTF-8?
<havenwood> oh
<havenwood> 32
<havenwood> I can't read.
<jhass> why do you use iconv vs String#encode?
<havenwood> &>> Encoding::UTF_32BE
<rubydoc_> # => #<Encoding:UTF-32BE (autoload)> (https://carc.in/#/r/a383)
<havenwood> &>> 'x'.encode(Encoding::UTF_32BE).encoding # rapha
<rubydoc_> # => #<Encoding:UTF-32BE> (https://carc.in/#/r/a386)
<jhass> >> "doownevah ih".reverse
<ruby[bot]> jhass: # => "hi havenwood" (https://carc.in/#/r/a387)
<havenwood> &>> "helloooooooo jhass".squeeze("o")
<rubydoc_> # => "hello jhass" (https://carc.in/#/r/a38a)
<havenwood> &>> 'x'.encode(Encoding::UTF_32BE).ord # rapha
<rubydoc_> # => 120 (https://carc.in/#/r/a38d)
<jhass> welll
<jhass> >> 'x'.ord
<ruby[bot]> jhass: # => 120 (https://carc.in/#/r/a38e)
<jhass> that doesn't tell too much, no? :D
lucasb has joined #ruby
<jhass> >> ['x'.bytes, 'x'.encode('UTF-32BE').bytes]
<ruby[bot]> jhass: # => [[120], [0, 0, 0, 120]] (https://carc.in/#/r/a38f)
<havenwood> jhass: oops, yeah, swallowed the important different
<havenwood> Dunno what I expected there. >.>
<jhass> good morning :D
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
howdoi has joined #ruby
aremaref has quit [Ping timeout: 260 seconds]
baojg_ has joined #ruby
baojg has quit [Ping timeout: 260 seconds]
al2o3-cr has joined #ruby
Garb0_ has joined #ruby
Garb0_ has quit [Max SendQ exceeded]
Garb0 has quit [Read error: Connection reset by peer]
prion has quit [Ping timeout: 240 seconds]
ellcs has joined #ruby
prion has joined #ruby
klaas has quit [Quit: ZNC 1.8.2 - https://znc.in]
aremaref has joined #ruby
klaas has joined #ruby
ellcs has quit [Ping timeout: 258 seconds]
mistergibson has quit [Quit: Leaving]
dfucci has joined #ruby
Garb0 has joined #ruby
Garb0 has quit [Max SendQ exceeded]
crankharder has joined #ruby
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
llua has joined #ruby
dviola has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
cd has quit [Quit: cd]
TomyWork has quit [Remote host closed the connection]
kristian_on_linu has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.9]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
al2o3-cr has joined #ruby
cliluw has joined #ruby
TCZ has joined #ruby
bambanx has joined #ruby
prauat has joined #ruby
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
<prauat> Hi, anyone knows how to use nokogiri with xslt and remote document() function in stylesheet?
_aeris_ has quit [Remote host closed the connection]
llua has joined #ruby
_aeris_ has joined #ruby
<adam12> prauat: Have you tried something and are stuck, or are looking to start and not sure where?
<prauat> adam12: https://0bin.net/paste/PkyXwLAx#tu3iu+a1GrFd6NfZtFmDWn2UU5K710JY68WgPiZxyDh
<prauat> I'm stuck on that I can't download external xml document from within transform() method
<prauat> I've thought that it's NONET issue that is nokogiri default but it's still not working
roshanavand has joined #ruby
BenDover has joined #ruby
<adam12> prauat: Just out of curiosity, it works fine on it's own? Ie. Could you `require "open-uri"; open("url-to-https://office.x.y.z/attachments")`?
<adam12> prauat: I haven't used nokogiri for this so I might not be much help at a low level.
<prauat> adam12: Yes It works fine when making transformation in PHP, Firefox, nokogiri doesn't even try to download this file
<prauat> adam12: NONET - Prevent any network connections during parsing. Recommended for parsing untrusted documents. This is set by default!
AndyC has joined #ruby
<prauat> adam12: I don't see any solution to set NONONET during transform
<adam12> prauat: I was just looking to see if I could get an indication on what it might be.
ur5us has joined #ruby
<adam12> prauat: Do you get a stack trace with that error?
prion has quit [Ping timeout: 256 seconds]
crankharder has joined #ruby
postmodern has joined #ruby
swaggboi has quit [Quit: C-x C-c]
<prauat> adam12: no stack trace
crankharder has quit [Ping timeout: 260 seconds]
cincy_kal has joined #ruby
<cincy_kal> I forked the padrino framework in order to fix a small issue in an older version. However, I'm running into issues with dependencies in bundler. I am using the `tag: 0.12.5` but bundler keeps saying the version resolved to `0.15.0`. Any tips?
kurko_ has quit [Ping timeout: 256 seconds]
<prauat> adam12: as you can see here xsltSetGenericErrorFunc((void *)errstr, xslt_generic_error_handler); Line 160
<adam12> cincy_kal: What dependency?
<cincy_kal> Bundler could not find compatible version for gem "sinatra".
<prauat> adam12: static void xslt_generic_error_handler(void * ctx, const char *msg, ...) Line 26, It only prints message on xslt error
<cincy_kal> In Gemfile: padrino was resolved to 0.15.0, which depends on padrino-core (= 0.15.0) was resolved to 0.15.0
<cincy_kal> what i need it to use is 0.12.5
<adam12> prauat: libxml2 sometimes exposes an error and I wasn't sure if it bubbled up as a stack trace.
<adam12> cincy_kal: What's the `padrino` line in the Gemfile?
<cincy_kal> My gemfile is `padrino', git: 'https://github.com/jtcrank/padrino-framework.git', tag: '0.12.5'
DTZUZU_ has joined #ruby
<cincy_kal> `gem 'padrino', git: 'https://github.com/jtcrank/padrino-framework.git', tag: '0.12.5'`
<adam12> cincy_kal: I guess you could try `bundle update padrino`? If that doesn't work, can you paste the output of whatever bundle command you're running.
AndyC has quit [Ping timeout: 246 seconds]
<cincy_kal> It looks like multiple directories in the padrino repo have gemspecs. Perhaps something to do with that?
DTZUZU has quit [Ping timeout: 260 seconds]
<cincy_kal> when I run the `gem update padrino` I get multiple compatible versions errors
<cincy_kal> It still comes down to the `padrino was resolved to 0.15.0, which depends on`
<adam12> cincy_kal: bundle update padrino or gem update padrino?
<adam12> cincy_kal: Paste the command and terminal output somewhere. gist.github.com or something.
<cincy_kal> `bundle update padrino` sorry
<adam12> cincy_kal: can you paste Gemfile and Gemfile.lock somewhere?
<cincy_kal> no lock file because it errors out
gix has joined #ruby
DTZUZU has joined #ruby
DTZUZU_ has quit [Ping timeout: 256 seconds]
<adam12> cincy_kal: Just to back up a bit. You've forked padrino-framework, made your fix, tagged it?
<adam12> cincy_kal: Where'd you get the Gemfile?
<cincy_kal> I forked padrino-framework, made fix, and overwrote the 0.12.5 tag
duderonomy has joined #ruby
<cincy_kal> i am then trying to use that repo in the Gemfile of an existing project's gemfile
teclator has quit [Quit: No Ping reply in 180 seconds.]
<cincy_kal> https://github.com/jtcrank/padrino-framework there is the fork in case you're curious
teclator has joined #ruby
<adam12> cincy_kal: Yeah I was just looking. Does your existing project have a Gemfile.lock?
<adam12> cincy_kal: You're in dependency hell a bit. I can't even use the Gemfile on it's own locally, since the version pinned for padrino-core pins sinatra, which pins rack, which conflicts.
<cincy_kal> yeah thats kind of what im dealing with unfortunately
<adam12> cincy_kal: I'm sure you could try to back it out, but if you copied the Gemfile from another project, I'd try copying the lock too.
<cincy_kal> whats weird is if i pull the repo locally, and use `path: '/my/path'` instead of `git: ...` it works
<adam12> Do you get errors? I get this right at the top.
<adam12> error: could not lock config file .git/modules/padrino-gen/lib/padrino-gen/generators/templates/static/config: No such file or directory
<adam12> warning: Could not unset core.worktree setting in submodule 'padrino-gen/lib/padrino-gen/generators/templates/static'
<adam12> cincy_kal: Might as well paste `bundle env` somewhere too so we can look at that.
aremaref has quit [Ping timeout: 258 seconds]
prion has joined #ruby
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
dionysus69 has quit [Ping timeout: 256 seconds]
aremaref has joined #ruby
NeoThermic has quit [Ping timeout: 256 seconds]
DTZUZU_ has joined #ruby
DTZUZU has quit [Ping timeout: 246 seconds]
nowz has joined #ruby
hassox has quit [Ping timeout: 246 seconds]
DTZUZU has joined #ruby
miss0r4 has quit [Quit: Nettalk6 - www.ntalk.de]
DTZUZU_ has quit [Ping timeout: 258 seconds]
mahlon has quit [Remote host closed the connection]
<prion> bros
<prion> are there any really good ruby books
<prion> like K&R for ruby
<prion> i love physical books
<adam12> prion: For OOP, I like the POODR book and the new 99bottles book. Not sure if they are physical.
AndyC has joined #ruby
<rapha> jhass: it was just an example of something i'd began doing on the command line and then wanted to use from within ruby quickly.
<rapha> havenwood: these are of course much much better (thank you!) unfortunately they don't answer the question of how to pipe something from within ruby to another process.
swaggboi has joined #ruby
orbyt_ has joined #ruby
AndyC has quit [Ping timeout: 265 seconds]
<al2o3-cr> rapha: char = "😊"; Open3.pipeline_w('iconv -f utf8 -t utf32be', 'xxd -p') { |stdin, wait_thr| stdin << char }
<al2o3-cr> or in ruby; char.encode(Encoding::UTF_32BE).unpack1('H*')
dfucci has quit [Ping timeout: 272 seconds]
<al2o3-cr> &>> char = "😊"; char.encode('utf-32be').unpack1('H*')
<rubydoc_> # => "0001f60a" (https://carc.in/#/r/a3aj)
AndyC has joined #ruby
bambanx has quit [Remote host closed the connection]
Technodrome has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 258 seconds]
AndyC has quit [Ping timeout: 264 seconds]
mahlon has joined #ruby
mroulston has joined #ruby
hiroaki has joined #ruby
mroulston has quit [Quit: Textual IRC Client: www.textualapp.com]
baojg_ has quit [Remote host closed the connection]
baojg has joined #ruby
dfucci has joined #ruby
blackmesa1 has quit [Ping timeout: 272 seconds]
dfucci has quit [Ping timeout: 258 seconds]
cincy_kal has quit [Remote host closed the connection]
AndyC has joined #ruby
mahlon has quit [Quit: WeeChat 3.0]
mahlon has joined #ruby
ruby[bot] has joined #ruby
dfucci has joined #ruby
<rapha> assssh, Open3! thank you al2o3-cr!
<rapha> er
<rapha> aaaaah*
<al2o3-cr> rapha: sure, np.
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
dfucci has quit [Ping timeout: 258 seconds]
greengriminal has quit [Ping timeout: 256 seconds]
BenDover has quit [Quit: BenDover]
greengriminal has joined #ruby
bodgix has left #ruby [#ruby]
prauat has quit [Quit: leaving]
<hahuang65> is there a way to get the entirety of an enumerator, instead of calling `.next`?
dfucci has joined #ruby
<hahuang65> oh `.entries`
<hahuang65> nope, that's not quite it
<leftylink> perhaps to_a then?
<al2o3-cr> #entries is synonymous with #to_a
<leftylink> entries exists?
<leftylink> oh... so it does. wat
dfucci has quit [Ping timeout: 258 seconds]
<al2o3-cr> hahuang65: got an example?
<hahuang65> al2o3-cr well, it was complicated. The existing code had an Enumerator generator that would return items when `.next` is called in order of a argument that's passed in. I was trying to get the entirety of the Enumerator as a hash, so I had to just `Hash[ids.zip(enum.entries)]`
<hahuang65> I wastrying to turn an existing function that returned an Enumerator into a hash that I could call into with keys.
<al2o3-cr> hahuang65: I see.
prion has quit [Ping timeout: 246 seconds]
<hahuang65> are you sure? I feel like I did a shit job explaining lol
<al2o3-cr> hahuang65: pretty much.
<hahuang65> hahaha
<hahuang65> my_enum_method([1, 2, 3]).to_a => [a, b, c]. I wanted to get {1: a, 2: b, 3: c} out of it.
<hahuang65> al2o3-cr: maybe that helps.
kristian_on_linu has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 258 seconds]
<al2o3-cr> hahuang65: i get what you meant the first time :p
<al2o3-cr> but that clears it up :)
braincrash has quit [Ping timeout: 256 seconds]
* al2o3-cr is hungry
<hahuang65> you should eat
<hahuang65> you know what sounds good? I nice chicken pot pie.
<hahuang65> A nice*
<al2o3-cr> mmm... yummy
ur5us has joined #ruby
prion has joined #ruby
<prion> how do i become a ruby master
<al2o3-cr> prion: practice