<Radar>
seems Pathname#descend goes _up_ the directory tree, is that what you wanted?
<bougyman>
no it doesn't
<bougyman>
does it?
<bougyman>
need to .reverse, then
herbmillerjr has quit [Quit: Konversation terminated!]
<havenwood>
bougyman: #ascend
<bougyman>
no, it's right
<bougyman>
I want descend
* baweaver
stares at Radar
<Radar>
Hi.
<baweaver>
you're correct. Inject is always wrong. Reduce, however, is true power.
<baweaver>
buuuuuut using a chainsaw on a bonsai tree is kinda overkill
<Radar>
my love affair with each_with_object continues
<Radar>
UNABATED
<baweaver>
depends on whether or not I'm going to imply that return
marz_d`ghostman has joined #ruby
<marz_d`ghostman>
Any reason why shelljoin doesn't seem to work when I test it on irb. https://dpaste.de/QOL9#L1
Inline has quit [Quit: Leaving]
<marz_d`ghostman>
silly me, I have to require 'shellwords' sorry about that
postmodern has joined #ruby
orbyt_ has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
gregf_ has quit [Ping timeout: 252 seconds]
Guest18202 has quit [Quit: Gateway shutdown]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
matcouto has quit [Ping timeout: 252 seconds]
sauvin has joined #ruby
mrush has joined #ruby
apeiros has joined #ruby
LiftLeft has quit [Ping timeout: 240 seconds]
KeyJoo has joined #ruby
reber has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
<Radar>
marz_d`ghostman: yeah it's not loaded by default
<baweaver>
Yeah, you really have to shell out for it :D
<Radar>
baweaver: was that required? :P
<Fenhl>
hello! I'm trying to figure out what the unary minus operator does to a string, but can't find it in the docs. What does it do, and where can I find the docs for it?
bijan_ has quit [Read error: Connection reset by peer]
bijan__ has joined #ruby
dextrey has quit [Ping timeout: 260 seconds]
bijan__ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
cabotto has quit [Remote host closed the connection]
bijan_ has quit [Ping timeout: 250 seconds]
cabotto has joined #ruby
jamesaxl has quit [Ping timeout: 264 seconds]
jamesaxl has joined #ruby
bijan_ has joined #ruby
dextrey has joined #ruby
akem has quit [Ping timeout: 252 seconds]
<ineb>
RougeR: probably just an alias for :describe
desperek has joined #ruby
dextrey has quit [Quit: WeeChat 2.2]
DTZUZO has joined #ruby
clorisu has joined #ruby
bijan_ has quit [Ping timeout: 260 seconds]
Rootsudo has joined #ruby
gnufied has joined #ruby
bijan_ has joined #ruby
<sonOfRa>
Huh. Formatting dates. Can anyone explain the rationale behind %p being AM/PM uppercase and %P being am/pm lowercase?
arup_r has joined #ruby
gnufied has quit [Ping timeout: 245 seconds]
bijan_ has quit [Ping timeout: 260 seconds]
bijan_ has joined #ruby
fmcgeough has joined #ruby
fmcgeough has quit [Client Quit]
bijan_ has quit [Ping timeout: 252 seconds]
sarna has quit [Ping timeout: 245 seconds]
savolla has joined #ruby
cabotto has quit [Remote host closed the connection]
cabotto has joined #ruby
apeiros has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
Rootsudo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aupadhye has quit [Ping timeout: 246 seconds]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
bijan_ has joined #ruby
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
bijan__ has joined #ruby
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
bijan_ has quit [Ping timeout: 260 seconds]
<RougeR>
ineb: yeah quite possibly
<RougeR>
maybe ill throw binding.pry in and find the method
savolla has quit [Ping timeout: 246 seconds]
<havenwood>
sonOfRa: Folk often use lower case for the more common variant of a thing, like option flags. It saves having to press shift. MySQL just has the caps, no %P even.
<havenwood>
sonOfRa: I think the lower case am/pm version not being initially contemplated is probably the reason.
<havenwood>
sonOfRa: Apparently A.M. and a.m. with dots aren't popular enough to get a directive.
<sonOfRa>
interesting. I don't see am/pm stuff often, but subjectively it feels like am is more common than AM
<sonOfRa>
Maybe because most times I see it is in casual conversation where nobody bothers using the shift key
clorisu has quit [Read error: No route to host]
bmurt has joined #ruby
psychicist__ has joined #ruby
aupadhye has joined #ruby
al2o3-cr has quit [Ping timeout: 252 seconds]
gnufied has joined #ruby
a-yogi has joined #ruby
<a-yogi>
hi guys, could anyone tell how can I define array of hash in ruby?
yohji has quit [Remote host closed the connection]
[Butch] has joined #ruby
apeiros_ has joined #ruby
bijan_ has quit []
sarna has joined #ruby
Caius has joined #ruby
RougeR has quit [Ping timeout: 252 seconds]
Azure has quit [Ping timeout: 252 seconds]
ineb has quit [Quit: WeeChat 2.2]
snickers has joined #ruby
<TomyWork>
i'm writing an ldap cache right now. I'm using some of the back-end classes of net-ldap to parse LDAP PDUs from the wire
<TomyWork>
surprisingly, i got that part to work
<TomyWork>
now i need to re-encode them and send them on their way on the other connection
tjbp has quit [Remote host closed the connection]
<TomyWork>
my cache is gonna be pretty dumb, it's just going to store response packets by request SHA1 or something and then replay those if the backend connection drops
tjbp has joined #ruby
aupadhye has quit [Quit: Leaving]
<TomyWork>
is anyone here familiar enough with the internals for Net::LDAP to tell me how PDUs are serialized back into BER format?
troys has joined #ruby
aufi has quit [Ping timeout: 245 seconds]
Yxhuvud has joined #ruby
Azure has joined #ruby
lomex has joined #ruby
<sarna>
hey, could anyone please help me with setting up a ruby project? I've been reading through the docs, but it's really complicated :(
bmurt has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
<havenwood>
sarna: What trouble are you running into?
<havenwood>
sarna: The --no-document flag disables documentation on gem installation.
<sarna>
havenwood: I want to make an app that I'll primarily use myself but I'd like it to be easy for my friends to use it too
<sarna>
havenwood: oh, I see.
Beams has quit [Quit: .]
<havenwood>
sarna: Is the app web, gui, command line or what?
<sarna>
havenwood: so far I've made a new project with bundler, but it's a lot of files..
<sarna>
havenwood: CLI
<havenwood>
sarna: So you're making a gem?
<havenwood>
sarna: You ran `bundle gem GEM_NAME`?
<sarna>
havenwood: well, it seems like it. I excluded Gemfile.lock, as some blog post advised me to
<sarna>
havenwood: yes
Inline has joined #ruby
<sarna>
havenwood: where does my code go? lib/my_app.rb ?
<sarna>
I excluded Gemfile.lock from version control*
<havenwood>
sarna: Yes, we exclude the Gemfile.lock from the repo by adding it to the .gitignore for gems.
despai has quit [Quit: ...]
<sarna>
havenwood: ok, done
<havenwood>
sarna: Yes, your code goes in the lib/ dir
<sarna>
havenwood: oh yeah, in my_app.gemspec there's 'spec.bindir = "exe"'
<havenwood>
sarna: That's Bundler fooling with the default.
<sarna>
:(
<havenwood>
sarna: You can choose.
<havenwood>
sarna: It's fine to follow either the RubyGems or Bundler convention.
<havenwood>
sarna: I prefer the former.
<sarna>
havenwood: I see. what's the trade-off there? why did they break the convention?
<sarna>
(if it's too broad of a question just tell me, I'll google for it)
za1b1tsu_ has quit [Ping timeout: 250 seconds]
lxsameer has quit [Ping timeout: 252 seconds]
savolla has quit [Ping timeout: 246 seconds]
<havenwood>
sarna: So it's a bit of a long story.
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
* sarna
takes a sit near the campfire
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
<havenwood>
sarna: There's a debate in the community about the practice of putting `bin` in your PATH. Some people feel it is a convenience, and others feel it is ill-advised.
lxsameer has joined #ruby
<havenwood>
Folk will, for example do: PATH="bin:$PATH"
<havenwood>
Or: PATH="$PATH:bin"
<havenwood>
The latter is less terrible, but both are saying "run whatever is in a `bin` directory relative to the current working directory.
<sarna>
yes, that's what I do :^)
<sarna>
roughly.
<havenwood>
With the former, if someone has a `bin/ls` or other command it'll hijack what you're expecting.
<havenwood>
The latter is better if you must have `bin` in PATH.
<havenwood>
Some of the Bundler folk have `bin` in PATH and like the idea of being able to type `setup` from a gem directory to run `bin/setup`. They don't necessarily want `bin/this_gem_executable` to be ahead in PATH though, so they put gem binaries in `exe`.
<havenwood>
I don't have `bin` in my PATH, and it has long been the RubyGems default to have your executables in `bin`, so that's what I do.
lxsameer has quit [Ping timeout: 246 seconds]
mroutis has joined #ruby
<sarna>
havenwood: thank you for the in-depth explanation! :D
<havenwood>
sarna: No prob!
cthulchu has joined #ruby
eddof13 has joined #ruby
lxsameer has joined #ruby
<sarna>
seems like bundler breaks semantic versioning as well :^(
<sarna>
(freshly created project is 0.1.0 instead of 0.0.1)
xuyuheng has joined #ruby
xuyuheng has quit [Client Quit]
apeiros_ has quit [Remote host closed the connection]
mroutis has quit [Remote host closed the connection]
<sarna>
((actually no, major version zero (0.y.z) is for initial development. my bad))
dextrey has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
lxsameer has quit [Ping timeout: 250 seconds]
jcarl43 has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
sarna has quit [Remote host closed the connection]
mfunkmann has joined #ruby
mroutis has joined #ruby
<TomyWork>
putting relative directories in your PATH, for whatever reason, makes PATH resolution behaviour unpredictable unless you always know the cwd, which you usually don't.
bmurt has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
<TomyWork>
if your system is in any way accessible to the public (or to untrusted actors in general), you also need to consider security. Having an unpredictable PATH means your security is unpredictable, unless you always specify absolute paths for every single command, which you usually don't.
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
orbyt_ has joined #ruby
gbristol has joined #ruby
bak1an has joined #ruby
mroutis has quit [Remote host closed the connection]
ptx0 has joined #ruby
apeiros_ has joined #ruby
eckhardt_ has joined #ruby
mroutis has joined #ruby
Azure has quit [Ping timeout: 240 seconds]
sysvalve has quit [Quit: Leaving]
sauvin has joined #ruby
Azure|dc has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cr1xu5 has joined #ruby
dextrey has quit [Ping timeout: 240 seconds]
mroutis has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
cr1xu5 has quit [Read error: Connection reset by peer]
apeiros_ has quit [Remote host closed the connection]
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 252 seconds]
akem has joined #ruby
d^sh has joined #ruby
lxsameer has joined #ruby
apeiros_ has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
akaiiro has quit [Ping timeout: 246 seconds]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jamesaxl has quit [Ping timeout: 245 seconds]
lxsameer has joined #ruby
akaiiro has joined #ruby
AJA4350 has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 252 seconds]
AJA4350 has joined #ruby
duckpupp- is now known as duckpuppy
sameerynho has joined #ruby
jamesaxl has joined #ruby
lxsameer has joined #ruby
<TomyWork>
if a method yields to a block, can i somehow prevent the remainder of the method from being run after the block ends?
<TomyWork>
i guess i could raise and catch, but is there a better way?
despai has joined #ruby
<baweaver>
return if block_given?
<TomyWork>
I cannot modify the method
lxsameer has quit [Ping timeout: 240 seconds]
<TomyWork>
this is someone else's method, i want to mess with their intended execution flow
<baweaver>
Why?
<baweaver>
What are you trying to do, and why do you need it?
bmurt has quit [Read error: Connection reset by peer]
<TomyWork>
in case you're wondering, that method is defined in a module, that module is included (via monkey-patching) in several streams and stream-like objects
knight33 has joined #ruby
bak1an has joined #ruby
<TomyWork>
this reads a BER object from the network, but i dont know how much it will read beforehand. BER encoding for the length is a bit complicated
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
<TomyWork>
apeiros_ cool, wasn't aware of that, but that's exactly what i need :)
chouhoulis has quit [Remote host closed the connection]
<baweaver>
tubbo: been busy?
<TomyWork>
can i declare variables without assigning them?
<TomyWork>
i want to make sure they're assigned on the outer scope not the block scope
<tubbo>
baweaver: yeah, been pretty busy with work and music. how about you?
<baweaver>
var = nil
<apeiros_>
TomyWork: there's no declaration in ruby, so no. you must assign.
<apeiros_>
but as baweaver showed, just assign nil.
apeiros_ is now known as apeiros
<TomyWork>
alright
<baweaver>
Same. Spoke at Southeast Ruby, got the same talk accepted to RubyConf. Made Staff Engineer over here and likely taking over Language Support for Ruby.
<mroutis>
tubbo: are you a musician/composer?
<apeiros>
and `a,b,c = nil` works fine to assign nil to multiple vars
<baweaver>
Shall we wander over to offtopic?
bak1an_ has joined #ruby
lxsameer has joined #ruby
Mikasi has joined #ruby
bak1an has quit [Ping timeout: 252 seconds]
Mikasi has quit [Remote host closed the connection]
<TomyWork>
i went extraclever and made it so the check for indeterminate content length (content_length == -1) doubles as the check for the end of the stream (which shouldn't happen)
<JJonah>
Say I require a gem in many files, and the gem exposes a module named `X` after I include it. I would prefer to use `Y` everywhere in my code instead of `X`. Of course I could just write `Y = X` after ever require -- but what is a better way to accomplish this?
<elomatreb>
If you have a file that is guaranteed to be required first you can just require it once in there and set Y = X, it should carry over to other files
<JJonah>
elomatreb, yes, i should have specified i want to know if there are any solutions besides that.
<elomatreb>
Not really, since ruby doesn't have a proper module system, sadly
<JJonah>
elomatreb: thanks, that's what i thought
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akaiiro has quit [Ping timeout: 244 seconds]
code_zombie__ has quit [Quit: Leaving]
knight33 has joined #ruby
dviola has joined #ruby
tdy has joined #ruby
jasmith has joined #ruby
bmurt has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
lxsameer has joined #ruby
bmurt has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 240 seconds]
dendazen has joined #ruby
bmurt has quit [Client Quit]
bmurt has joined #ruby
Rootsudo has joined #ruby
bmurt has quit [Client Quit]
al2o3-cr has joined #ruby
teej has joined #ruby
eddof13 has quit [Ping timeout: 240 seconds]
sameerynho has quit [Ping timeout: 245 seconds]
wyoung has left #ruby ["BBL, it's python time :D"]
akem has quit [Read error: Connection reset by peer]