baweaver has quit [Remote host closed the connection]
<megmart>
is it frowned upon to ask really basic questions in this room? is it more for experienced ruby devs?
<pipework>
Not at all.
<pipework>
Please, ask away, though we'll do our best to refer you to the best resource for answering your questions if one exists.
<pipework>
Often you'll find that google is your best starting point.
sankaber has quit [Max SendQ exceeded]
<megmart>
thanks pipework! i'm having some trouble understanding variable scope-- any pointers?
<pipework>
megmart: Like for the different kinds of variables?
sankaber has joined #ruby-lang
<megmart>
pipework: yeah, is it different for different types of variable? or is there a standard rule?
fujimura has joined #ruby-lang
shinnya has quit [Ping timeout: 252 seconds]
<pipework>
megmart: Someone here will chime in as soon as someone says something like a statement, so here goes. If I remember correctly, variables are lexically scoped. They might also be dynamically scoped too though.
<pipework>
Local variables are only lexically scoped.
lytol has joined #ruby-lang
roamingdog has joined #ruby-lang
sankaber has quit [Max SendQ exceeded]
sankaber has joined #ruby-lang
<megmart>
Pipework: thanks! the guide i am working through was not clear on that. So far, no one seems to be objecting to that statement, haha.
riotjones has joined #ruby-lang
lytol has quit [Ping timeout: 264 seconds]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LMity has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
riotjones has quit [Ping timeout: 246 seconds]
roamingdog has quit [Remote host closed the connection]
amystephen has quit [Quit: amystephen]
malconis has joined #ruby-lang
malconis has quit [Remote host closed the connection]
malconis has joined #ruby-lang
hahuang65 has joined #ruby-lang
indiekate has joined #ruby-lang
SuMo_D_ has joined #ruby-lang
indiekate has left #ruby-lang [#ruby-lang]
bruno- has joined #ruby-lang
RickHull has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
kfpratt has quit [Remote host closed the connection]
postmodern has joined #ruby-lang
caseydriscoll has joined #ruby-lang
<RickHull>
postmodern: hey there, long time no see :)
<RickHull>
i won't be offended if you don't remember me. been using chruby and ruby-install lately :)
<postmodern>
RickHull, your name sounds familiar... but I can't place it
<pipework>
mmm
<pipework>
RickHull: Do you have a brother whose name is normal?
<RickHull>
I used to be much more active here under a different nick
<postmodern>
RickHull, sorry for any delay with new features, been swamped at work
<pipework>
norman*
<RickHull>
pipework: nope :(
<pipework>
postmodern: If I felt like the way I'd write the code would be acceptable to you, I'd pull request a script to automatically add newly installed rubies to $RUBIES
bruno- has quit [Ping timeout: 255 seconds]
<pipework>
I'd try to follow your patterns, but I feel like it's hard to contribute to a good amount of projects because of that.
<postmodern>
pipework, unfortunately we're kind of locked into $RUBIES being an explicit array
<RickHull>
can anyone recommend a clean, high perf http client? i am planning to use threads for concurrent requests. the host would be constant but the paths/queries would change
<postmodern>
pipework, plus there's a perf hit with searching the directories
<postmodern>
pipework, and havenwood has a PR for natural version sorting
<postmodern>
pipework, i mean the way i see it, is new terminals are cheap, ctrl+shift+t
rgb-one has joined #ruby-lang
<pipework>
postmodern: Wait, why search? I mean if I do ruby-install ruby 2.1.2, can't I just take that after the installation is finished but before ruby-install returns and add the path it was installed to and add that to the array?
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RickHull>
pipework: interesting, but I don't want to hit the same URL n times. instead I am chewing through a queue of URLs, with a concurrency factor mapped to a number of threads
<pipework>
I want to be able to install a ruby and then chruby to it without getting a new shell.
hendranata_ has joined #ruby-lang
<RickHull>
you don't need a new shell so much as source your shell startup
<RickHull>
i believe
<RickHull>
or source the chruby bit anyway
<pipework>
RickHull: Uh, what makes you think typhoeus can only request the same url in parallel.
<postmodern>
pipework, because ruby-install runs in a separate sub-shell, since it's a script
<RickHull>
just a glance at the README
<postmodern>
pipework, where as chruby is in the shell
<pipework>
RickHull: Glance better. :p
<postmodern>
pipework, so either chruby has to re-scan the rubies directories everytime it searches for a ruby, or we couple the two tools together
<postmodern>
RickHull, ah good point
charliesome has quit [Quit: zzz]
<postmodern>
RickHull, yeah some people do `exec $TERM`
<postmodern>
RickHull, there was some talk of adding an option to reload RUBIES
<RickHull>
it seems like a fairly infrequent use case from here
<postmodern>
RickHull, my thoughts exactly, you rarely install a new ruby
<postmodern>
RickHull, maybe once a month at most
<postmodern>
RickHull, and I often install them as root into /opt/rubies in my root terminal
charliesome has joined #ruby-lang
<postmodern>
RickHull, and spawn new user terminals. I literally am spawning/closing new terminals all the time
<pipework>
postmodern: Hm, why does it have to be in a subshell?
<postmodern>
pipework, because ruby-install is a script with a #!/usr/bin/env bash
cartothemax has joined #ruby-lang
<postmodern>
pipework, also it's a large code base, which probably shouldn't be sourced into the shell
<pipework>
postmodern: Any reason it can't be a shell function that calls a script that returns the path and whatever else to the function and let the function manipulate env?
<pipework>
You can do both.
<postmodern>
pipework, oh hmm, possibly
AugustoCesar has quit [Remote host closed the connection]
<postmodern>
pipework, i guess the only problem would be guessing the path to the new ruby
AugustoCesar has joined #ruby-lang
<pipework>
postmodern: I don't know enough to know whether one could extract that from the prefix.
<RickHull>
pipework: Typhoeus looks good, I remember it from a while back, but I haven't kept up. thanks!
<pipework>
As in the configure prefix variable thing.
<postmodern>
pipework, yes they set that variable (in the sub-shell)
<pipework>
RickHull: You don't need to thread with typhoeus.
<postmodern>
pipework, problem is communicating back to the parent shell
<RickHull>
I know. but I've got a solid handle on that model :/
cartothemax has quit [Remote host closed the connection]
<pipework>
postmodern: What if instead it was passed to the script always and the script returned the install_dir as the result?
<RickHull>
can you pass a result from a subshell?
<postmodern>
pipework, the script has to print all the output
<RickHull>
i was thinking at most you could output
<pipework>
So the function would be called, maybe you call a script or whatever for opts parsing to a named pipe?
<postmodern>
RickHull, subshells can only return output and an exit code
<RickHull>
echo "copy/paste this: source ~/foo"
<RickHull>
or w/e xD
<RickHull>
fucking (s)hell
AugustoCesar has joined #ruby-lang
<pipework>
RickHull: naw
<RickHull>
you output the command, and exec it from the parent?
<pipework>
Why would you exec it?
<RickHull>
i'm grasping at straws, don't mind me
rbowlby has joined #ruby-lang
<pipework>
postmodern: Anyways, I think that if you were to have a function that you call, and that'd call your script maybe after setting up a named pipe per call that you can destroy afterwards if you don't want to use stdout, and then pass that named pipe as an optional arg to the script, that when it gets it, it emits the install_dir to, you'd be home free.
<pipework>
IPC and all.
<RickHull>
username checks out
<postmodern>
pipework, i also wanted to do the same thing for rbenv, make a plugin that calls ruby-install
<postmodern>
pipework, maybe if we had a --dry-run option that only printed the install dir?
ghostpl_ has joined #ruby-lang
<pipework>
postmodern: I'm open to anything that you feel comfortable with.
lytol has joined #ruby-lang
<pipework>
I think this is a totally doable thing!
<pipework>
Just depends on what pieces of unixy/posix goodness you feel comfortable with using.
<RickHull>
submit a PR, massage it in the comments :)
<pipework>
RickHull: I'd rather confer with postmodern beforehand to see what's acceptable.
<pipework>
I'll gladly do the leg work if we find something we can agree on that provides the functionality I crave.
<postmodern>
i usually open an issue first for discussion, then make a PR based on the outcome
<postmodern>
unless you have a fool proof solution
ghostpl_ has quit [Ping timeout: 264 seconds]
lytol has quit [Ping timeout: 264 seconds]
<RickHull>
i'm a big fan of working prototypes. put it in my hands and i'll tell you if it's foolproof ;)
gix has quit [Ping timeout: 252 seconds]
sideshowcoder has quit [Ping timeout: 256 seconds]
djbkd has quit [Remote host closed the connection]
symm- has joined #ruby-lang
<pipework>
postmodern: I'm bad at long form exposition, but I'll gladly open an issue and see what others have to say.
gix has joined #ruby-lang
<pipework>
That's usually why, if I'm open to making the PR at all, I try to talk with someone so that I can quickly work over the idea instead of doing it over a long period of time, possibly getting burned out on it.
<RickHull>
good call
postmodern has quit [Ping timeout: 265 seconds]
mcclurmc has joined #ruby-lang
postmodern has joined #ruby-lang
LMity has quit [Ping timeout: 264 seconds]
caseydriscoll has quit [Remote host closed the connection]
SuMo_D_ has quit [Ping timeout: 256 seconds]
djbkd has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
roamingdog has joined #ruby-lang
djbkd has quit [Ping timeout: 245 seconds]
iliketurtles has quit [Quit: zzzzz…..]
dellavg_ has joined #ruby-lang
RobertBirnie has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
riotjones has joined #ruby-lang
riotjones has quit [Ping timeout: 256 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duderonomy has quit [Ping timeout: 250 seconds]
havenwood has quit []
iliketurtles has joined #ruby-lang
joaomdmoura has joined #ruby-lang
hahuang65 has quit [Quit: WeeChat 1.1.1]
postmodern has quit [Quit: Leaving]
djbkd has joined #ruby-lang
dellavg_ has quit [Ping timeout: 264 seconds]
hahuang65 has joined #ruby-lang
RickHull has left #ruby-lang [#ruby-lang]
megmart has quit [Ping timeout: 246 seconds]
skade has joined #ruby-lang
mattyohe has joined #ruby-lang
iliketurtles has quit [Read error: Connection reset by peer]
tkuchiki_ has joined #ruby-lang
tkuchiki has quit [Ping timeout: 250 seconds]
lytol has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
lytol has quit [Ping timeout: 245 seconds]
sandelius has joined #ruby-lang
Mon_Ouie has quit [Quit: WeeChat 1.1.1]
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
duderonomy has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 256 seconds]
skade has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
roamingdog has quit [Remote host closed the connection]
micmus has joined #ruby-lang
roamingdog has joined #ruby-lang
Technodrome has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: zzz]
skade has quit [Quit: Computer has gone to sleep.]
Technodrome has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
riotjones has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
xcesariox has joined #ruby-lang
charliesome has joined #ruby-lang
tsujp has joined #ruby-lang
lytol has joined #ruby-lang
riotjones has quit [Ping timeout: 244 seconds]
houhoulis has quit [Remote host closed the connection]
lytol has quit [Ping timeout: 252 seconds]
cloudhand has joined #ruby-lang
Cloudzy has joined #ruby-lang
<Cloudzy>
woot
AlexAltea has joined #ruby-lang
robbyoconnor has quit [Quit: Konversation terminated!]
aeze has joined #ruby-lang
cloudhand has quit [Ping timeout: 246 seconds]
cloudhand has joined #ruby-lang
Cloudzy has quit [Quit: Leaving]
bruno- has joined #ruby-lang
rgb-one has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 250 seconds]
lianj has quit [Ping timeout: 250 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandelius has joined #ruby-lang
sandelius has quit [Client Quit]
micmus has quit [Ping timeout: 250 seconds]
mcclurmc has joined #ruby-lang
chinmay_dd has joined #ruby-lang
arBmind has joined #ruby-lang
caseydriscoll has joined #ruby-lang
brushbox has quit [Quit: Leaving.]
caseydriscoll has quit [Ping timeout: 256 seconds]
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
yfeldblum has joined #ruby-lang
relix has joined #ruby-lang
shank_ has quit [Read error: Connection reset by peer]
__butch__ has quit [Read error: Connection reset by peer]
djbkd has joined #ruby-lang
x44x45x41x4E has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
__butch__ has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
__butch__ has quit [Read error: Connection reset by peer]
djbkd has joined #ruby-lang
arBmind1 has quit [Ping timeout: 256 seconds]
RobertBirnie has joined #ruby-lang
wprice has quit [Quit: wprice]
wallerdev has joined #ruby-lang
arBmind has joined #ruby-lang
julweber has quit [Remote host closed the connection]
agarie has joined #ruby-lang
hahuang65 has joined #ruby-lang
dellavg_ has joined #ruby-lang
symm- has quit [Ping timeout: 256 seconds]
symm- has joined #ruby-lang
stef204 has joined #ruby-lang
err3 has joined #ruby-lang
hahuang65 has quit [Ping timeout: 250 seconds]
stef204 has quit [Client Quit]
stan has quit [Ping timeout: 265 seconds]
ldnunes has joined #ruby-lang
lytol has joined #ruby-lang
err3 has quit [Remote host closed the connection]
lytol has quit [Ping timeout: 244 seconds]
chinmay_dd has joined #ruby-lang
sankaber has quit [Ping timeout: 256 seconds]
sankaber has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
agarie has quit [Read error: Connection reset by peer]
agarie has joined #ruby-lang
intinig has quit [Ping timeout: 265 seconds]
Mark-6ma has quit [Quit: -]
__butch__ has joined #ruby-lang
micmus has quit [Ping timeout: 272 seconds]
mcclurmc has quit [Remote host closed the connection]
fujimura has joined #ruby-lang
ghostpl_ has quit [Remote host closed the connection]
mcclurmc has joined #ruby-lang
marr has quit [Ping timeout: 256 seconds]
musl has quit [Quit: WeeChat 1.1.1]
fujimura has quit [Ping timeout: 264 seconds]
hahuang65 has joined #ruby-lang
julweber has joined #ruby-lang
julweber has quit [Remote host closed the connection]
lytol has joined #ruby-lang
micmus has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
lytol has quit [Ping timeout: 250 seconds]
lytol has joined #ruby-lang
chinmay_dd has quit [Quit: Leaving]
Vivex has joined #ruby-lang
davispuh has quit [Read error: Connection reset by peer]
djbkd has joined #ruby-lang
skade has joined #ruby-lang
lytol has quit [Ping timeout: 250 seconds]
davispuh has joined #ruby-lang
baweaver has joined #ruby-lang
agarie has quit [Remote host closed the connection]
skade has quit [Client Quit]
Missphoenix has quit [Quit: Leaving]
momomomomo has joined #ruby-lang
GBrawl has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
kadoppe has quit [Ping timeout: 250 seconds]
kadoppe has joined #ruby-lang
skade has joined #ruby-lang
skade has quit [Client Quit]
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
GBrawl has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby-lang
agarie has joined #ruby-lang
Volsus has joined #ruby-lang
Volsus has quit [Client Quit]
micmus has quit [Ping timeout: 264 seconds]
Volsus has joined #ruby-lang
Soviet_jesus has joined #ruby-lang
lytol has joined #ruby-lang
robbyoconnor has joined #ruby-lang
symm- has quit [Ping timeout: 245 seconds]
<Soviet_jesus>
Hello all, I have a question: I am writing something to remove lawyers from a list and am trying to go line by line to check each record. While working in my test directory it seemed to work, but now that I am trying to use it in a "real" setting it appears as though the program isn't reading the file line by line, but all at once. I can print the whole file, but when I try to see how many lines are being read it only shows
<jhass>
soviet_jesus: I think that got cut of at "only shows"
djbkd has quit [Remote host closed the connection]
<Soviet_jesus>
erm, probably bad grammar on my part. I mean to say, it only shows that a single line has been read
<Soviet_jesus>
I'm looking at the data in notapad++ and it looks like the test data has "cr" and "lf" characters at the end of each line, while the "real" data only has "cr"
djbkd has joined #ruby-lang
<Soviet_jesus>
Assuming that's carriage return and line feed, would that make a difference?
<jhass>
shouldn't
<jhass>
oh, the real data has only cr?
<jhass>
that is the issue then
<jhass>
and it's not valid to separate lines, even on windows
<jhass>
unix line endings are \n, windows line endings are \r\n
baweaver has quit [Remote host closed the connection]