<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)
<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.]
<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?
<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)
<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
<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?
<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?
<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?
<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?
<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]
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.
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.