<shellie_>
depends on your definition of fake code; the module's are as per my "production" code, I just reduced the example to the minimum, both for simplcitiy and not sharing my companys code
<havenwood>
>> define_method :method_missing, &:to_s; foo + bar + baz
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has joined #ruby
<baweaver>
mmm, speaking of which, chipotle does sound good. Good call chipotle
kentnl has joined #ruby
kent\n has quit [Ping timeout: 268 seconds]
<Ox0dea>
That looks really nifty.
<baweaver>
especially for launching aws instances and keeping tabs on their state changes throughout the app
<baweaver>
and doing things like cleanup on certain states
andywojo has joined #ruby
noService has quit [Ping timeout: 246 seconds]
statelesscode has joined #ruby
<baweaver>
anyways, food time :D
<baweaver>
cheers
baweaver has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
polysics has joined #ruby
andywojo has quit [Ping timeout: 250 seconds]
sudoubuntu has joined #ruby
andywojo has joined #ruby
rkazak has joined #ruby
noService has joined #ruby
graphettion has joined #ruby
bkxd has joined #ruby
quazi has joined #ruby
kam270 has quit [Ping timeout: 252 seconds]
goglosh has quit [Quit: leaving]
andywojo has quit [Ping timeout: 244 seconds]
polysics has quit [Ping timeout: 260 seconds]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
bkxd has quit [Ping timeout: 248 seconds]
<Kharma>
Does anyone know of a way to securely store a dB password inside of a script so that dB calls can be made automatically?
halfamind1 has quit [Quit: Leaving.]
<Ox0dea>
Kharma: Why inside the script and not in an environment variable?
<Kharma>
You mean an environment variable on the local system right?
preyalone has joined #ruby
<Kharma>
Ox0dea: If so it's because the code is going to be run on up to 30 machines (roughly) and setting the variables on each system would be one extra step. It's definitely an option but was checking if there was a way to do it without local environment variables.
<Ox0dea>
Kharma: To be clear, all ~30 machines need to see the same value, yeah?
<Kharma>
Correct
<Ox0dea>
Is it liable to change?
matp has quit [Remote host closed the connection]
matp has joined #ruby
<Kharma>
Only based on password policies. So roughly every 90 days
<Kharma>
Code base is maintained in local git which makes updating much simpler
<Ox0dea>
Well, even if coordination isn't of the utmost priority, it's still sanest to have them all read from the same source.
<Ox0dea>
It might feel like overkill now, but you'd benefit in the long run from spinning them up with Chef.
ensyde_ has joined #ruby
<Ox0dea>
You'd still want Chef to read an environment variable and share it around, though.
braincrash has quit [Quit: bye bye]
<Kharma>
Not familiar with chef. Will check it out when I get a moment.
braincrash has joined #ruby
htmldrum has quit [Ping timeout: 248 seconds]
ruby-lang527 has joined #ruby
<ruby-lang527>
Hey guys
<benzrf>
hi
<ruby-lang527>
I feel like this is something that should be really easy, but I can't figure out a way to do it, and google is yielding nothing
<ruby-lang527>
So I want to do a math equation, with the first argument, and return the output as a variable
<ruby-lang527>
like argend = ARGV.first + 10
<ruby-lang527>
But that doesn't work, and I feel like I'm missing something easy
<Ox0dea>
ruby-lang527: ARGV contains Strings.
<ruby-lang527>
Okay, so what am I missing?
mekul has quit [Read error: Connection reset by peer]
<ruby-lang527>
Obviously I need to set argv as an integer
<roelof>
for this test the initial values are zero and later 5
rmulligan has quit [Ping timeout: 268 seconds]
<roelof>
thanks, I will play and experiment with it
Macaveli has joined #ruby
rkazak has joined #ruby
langy has joined #ruby
lsmola has joined #ruby
pawnbox has quit [Remote host closed the connection]
solars has joined #ruby
pawnbox has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
hxegon has quit [Quit: BRB]
djbkd has joined #ruby
emilkarl has joined #ruby
<roelof>
baweaver: last question how do I call adder with a block which has only the value 5 . I tried adder do { 5} end and adder do 5 end but both gives runtime errors ?
e4xit has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
User458764 has quit [Read error: Connection reset by peer]
<baweaver>
about the same as using semicolons in ruby or accidentally console.log()ing everything
vsdfs has quit [Ping timeout: 244 seconds]
ericlee has quit [Ping timeout: 268 seconds]
ta_ has quit [Ping timeout: 276 seconds]
<baweaver>
context switch leads to interesting code some times.
dionysus69 has joined #ruby
vondruch has quit [Ping timeout: 276 seconds]
fedexo has quit [Ping timeout: 250 seconds]
madgen has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
haxrbyte has joined #ruby
haxrbyte has quit [Client Quit]
sandstrom has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
GitGud is now known as GG
rmulliga` has quit [Remote host closed the connection]
mark2 has joined #ruby
tristanp has quit [Ping timeout: 268 seconds]
Alayde has joined #ruby
<colegatron>
Hello.
ericlee has joined #ruby
tristanp has joined #ruby
jdelaney has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mhoungbo has joined #ruby
pwnd_nsfw has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
sandelius has joined #ruby
rmulligan has joined #ruby
jdelaney has quit [Client Quit]
htmldrum has joined #ruby
SCHAAP137 has joined #ruby
lkba_ has joined #ruby
AndChat-43764 has joined #ruby
shmuli has quit [Remote host closed the connection]
skade has joined #ruby
mwlang has quit [Quit: mwlang]
anisha has quit [Quit: Leaving]
berserk_ren has quit [Remote host closed the connection]
Alayde has quit [Ping timeout: 260 seconds]
htmldrum has quit [Ping timeout: 260 seconds]
lkba has quit [Ping timeout: 246 seconds]
CloCkWeRX has joined #ruby
kam270 has joined #ruby
last_staff has joined #ruby
David_H_Smith has joined #ruby
dnewkerk has quit [Quit: dnewkerk]
David_H__ has quit [Ping timeout: 240 seconds]
astrobun_ has joined #ruby
full_throttle has joined #ruby
vondruch has joined #ruby
null__ has joined #ruby
bkxd has joined #ruby
Musashi007 has quit [Quit: Musashi007]
atmosx_alt has joined #ruby
ItSAN____ has joined #ruby
DrCode has quit [Ping timeout: 250 seconds]
Papierkorb has quit [Ping timeout: 276 seconds]
crank1988 has quit [Ping timeout: 250 seconds]
ItSANgo has quit [Ping timeout: 268 seconds]
M-Kodo has quit [Ping timeout: 268 seconds]
duderonomy has quit [Ping timeout: 250 seconds]
Cyrus has quit [Ping timeout: 250 seconds]
majuscule has quit [Ping timeout: 268 seconds]
apeiros has quit [Ping timeout: 268 seconds]
jinie has quit [Ping timeout: 250 seconds]
pikajude has quit [Ping timeout: 250 seconds]
atmosx has quit [Ping timeout: 268 seconds]
Macaveli has quit [Ping timeout: 268 seconds]
armyriad has quit [Ping timeout: 268 seconds]
RubyJedi-ing_ has joined #ruby
armyriad has joined #ruby
colegatron has quit [Ping timeout: 250 seconds]
kam270 has quit [Ping timeout: 276 seconds]
bkxd has quit [Ping timeout: 260 seconds]
DrCode has joined #ruby
smoose has quit [Ping timeout: 250 seconds]
rmulligan has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
smoose has joined #ruby
duncannz has quit [Ping timeout: 250 seconds]
iNs has quit [Ping timeout: 250 seconds]
speakingcode has quit [Ping timeout: 250 seconds]
rmulligan has joined #ruby
RubyJedi-ing has quit [Ping timeout: 268 seconds]
Guest70829 has quit [Ping timeout: 268 seconds]
djellemah has quit [Ping timeout: 268 seconds]
rmulligan has quit [Remote host closed the connection]
Some-body_ has joined #ruby
crank1988 has joined #ruby
atmosx_alt is now known as atmosx
Papierkorb has joined #ruby
Macaveli has joined #ruby
htmldrum has joined #ruby
bweston92 has quit [Ping timeout: 250 seconds]
DarthGandalf has quit [Ping timeout: 250 seconds]
djbkd has quit [Remote host closed the connection]
pikajude has joined #ruby
pikajude has quit [Changing host]
pikajude has joined #ruby
Some-body_ is now known as DarthGandalf
speakingcode has joined #ruby
C0deMaver1ck has joined #ruby
C0deMaver1ck is now known as Guest63020
M-Kodo has joined #ruby
jinie has joined #ruby
iNs has joined #ruby
djellemah has joined #ruby
Cyrus has joined #ruby
apeiros has joined #ruby
Chagel has joined #ruby
Cyrus is now known as Guest78435
_blizzy_ has joined #ruby
duncannz has joined #ruby
majuscule has joined #ruby
colegatron has joined #ruby
bweston92 has joined #ruby
shmuli has joined #ruby
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
Chagel has quit [Ping timeout: 260 seconds]
TheHodge has joined #ruby
benlieb has joined #ruby
edwinvdgraaf has joined #ruby
htmldrum has quit [Ping timeout: 248 seconds]
skade has quit [Quit: Computer has gone to sleep.]
ur5us has joined #ruby
Vlat- has joined #ruby
Vlat- has left #ruby [#ruby]
tmtwd has joined #ruby
skade has joined #ruby
ferr has joined #ruby
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
jaruga_ has joined #ruby
skade has quit [Client Quit]
moeabdol has joined #ruby
jaruga_ has quit [Client Quit]
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
tildes has joined #ruby
benlieb has quit [Client Quit]
the_drow has joined #ruby
anisha has joined #ruby
skade has joined #ruby
htmldrum has joined #ruby
c4ss1e has joined #ruby
full_throttle has left #ruby [#ruby]
Skelz0r has quit [Ping timeout: 244 seconds]
blaxter has joined #ruby
jt__ has quit [Remote host closed the connection]
yardenbar has joined #ruby
htmldrum has quit [Ping timeout: 260 seconds]
ta__ has quit [Remote host closed the connection]
ta_ has joined #ruby
RegulationD has joined #ruby
armyriad has quit [Ping timeout: 244 seconds]
armyriad has joined #ruby
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mtkd has quit [Ping timeout: 248 seconds]
ta__ has joined #ruby
ssiris has quit [Quit: End of Line]
mtkd has joined #ruby
ta_ has quit [Ping timeout: 268 seconds]
Skelz0r has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
duckpuppy has joined #ruby
ta__ has quit [Ping timeout: 248 seconds]
blt has quit [Ping timeout: 244 seconds]
htmldrum has joined #ruby
Dimik has quit [Ping timeout: 276 seconds]
krz has quit [Ping timeout: 250 seconds]
full_throttle has joined #ruby
full_throttle has left #ruby [#ruby]
duckpuppy has quit [Ping timeout: 246 seconds]
jmorgado has joined #ruby
ta_ has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
htmldrum has quit [Ping timeout: 276 seconds]
karioleez has quit [Remote host closed the connection]
the_drow has joined #ruby
karioleez has joined #ruby
krz has joined #ruby
shmuli has quit [Remote host closed the connection]
alexherbo2 has quit [Quit: WeeChat 1.4]
duderonomy has joined #ruby
ta_ has quit [Remote host closed the connection]
the_drow has quit [Read error: Connection reset by peer]
clauswitt has joined #ruby
rvchangue has quit [Ping timeout: 244 seconds]
rake_db_migrate has joined #ruby
baweaver has joined #ruby
ta_ has joined #ruby
blt has joined #ruby
the_drow has joined #ruby
shmuli has joined #ruby
Musashi007 has joined #ruby
rake_db_migrate has quit [Ping timeout: 250 seconds]
zeroDivisible has joined #ruby
shmuli has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 250 seconds]
ruid has joined #ruby
marr has joined #ruby
tmtwd has quit [Ping timeout: 244 seconds]
Musashi007 has quit [Quit: Musashi007]
benlieb has joined #ruby
nhhc has quit [Ping timeout: 260 seconds]
tmtwd has joined #ruby
blackmes1 has joined #ruby
Mon_Ouie has joined #ruby
codecop has quit [Ping timeout: 252 seconds]
krz has quit [Ping timeout: 264 seconds]
moeabdol1 has joined #ruby
nano- has quit [Ping timeout: 276 seconds]
nano- has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
Vlat- has joined #ruby
benlieb has quit [Quit: benlieb]
blackgoat has joined #ruby
karioleez has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
karioleez has joined #ruby
krz has joined #ruby
AndChat-43764 has quit [Ping timeout: 276 seconds]
bkxd has joined #ruby
tmtwd has quit [Ping timeout: 244 seconds]
skydiver has quit [Ping timeout: 264 seconds]
blackgoat has quit [Client Quit]
mistermocha has joined #ruby
blackgoat has joined #ruby
blackgoat has quit [Client Quit]
platzhirsch has joined #ruby
terlar has joined #ruby
blackgoat has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
codecop has joined #ruby
Nahra has quit [Ping timeout: 248 seconds]
the_drow has quit [Read error: Connection reset by peer]
the_drow has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
platzhirsch has left #ruby [#ruby]
rvchangue has joined #ruby
Chagel has joined #ruby
akkmaxon has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
htmldrum has joined #ruby
Chagel has quit [Ping timeout: 240 seconds]
akkmaxon has quit [Client Quit]
maxim__ has joined #ruby
skydiver has joined #ruby
krz has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
kam270 has joined #ruby
Snowy has quit [Remote host closed the connection]
Snowy has joined #ruby
sandelius has joined #ruby
terlar has quit [Ping timeout: 264 seconds]
skade has quit [Quit: Computer has gone to sleep.]
skydiver has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
krz has joined #ruby
patrick_star_2 has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
skade has joined #ruby
dasher00 has quit [Ping timeout: 260 seconds]
auzty has joined #ruby
dasher00 has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
Nahra has joined #ruby
patrick_star_3 has quit [Ping timeout: 264 seconds]
n008f4g_ has joined #ruby
Vlat- has quit [Quit: Vlat-]
colegatron has quit [Remote host closed the connection]
RubyJedi-ing has joined #ruby
saneax is now known as saneax_AFK
evidex has joined #ruby
RubyJedi-ing_ has quit [Ping timeout: 244 seconds]
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrobun_ has quit [Remote host closed the connection]
duncannz has quit [Remote host closed the connection]
Gasher has joined #ruby
skydiver has joined #ruby
saneax_AFK is now known as saneax
<Steve_Jobs>
I can't seem to show the braille character on the command line that's part of the output of a program
<Steve_Jobs>
⡤
<Steve_Jobs>
that looks like a square to me but should be braille
<Steve_Jobs>
any ideas?
<Mon_Ouie>
Looks fine here, probably just your terminal settings that don't render it as you'd expect it
<workmad3>
Steve_Jobs: it's 3 dots here... sounds like you don't have a font installed with full unicode codepoints for your terminal
anisha has quit [Ping timeout: 260 seconds]
<Steve_Jobs>
workmad3: I tried all fonts.. which one are you using?
<Steve_Jobs>
Mon_Ouie: what font are you using?
<workmad3>
"I tried all fonts" really? There are millions of them :P
<Steve_Jobs>
is it just the font?
<Steve_Jobs>
workmad3: well the ones on this machine...
anisha has joined #ruby
<Mon_Ouie>
My terminal uses Deja Vu
<workmad3>
Steve_Jobs: I use OS X monaco for unicode code-points in iterm2 on my mac
<Steve_Jobs>
ok.. xterm shows it.. weird
TvL2386 has quit [Ping timeout: 240 seconds]
skydiver has quit [Ping timeout: 252 seconds]
sepp2k has joined #ruby
terlar has joined #ruby
TvL2386 has joined #ruby
tvw has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Vlat- has joined #ruby
htmldrum has quit [Ping timeout: 244 seconds]
sandelius has joined #ruby
the_drow has quit [Ping timeout: 252 seconds]
Vlat- has quit [Client Quit]
the_drow has joined #ruby
<lxsameer>
hey people, does ruby store or cache the VM bytecodes any where ?
dmolina has joined #ruby
<Mon_Ouie>
No, it recompiles everytime
<lxsameer>
Mon_Ouie: hmm does ruby provides any solution to just run the bytecode ? I mean we give it to ruby as a param
<Mon_Ouie>
Last time I check there was code to store/load bytecode to/from a file, but it's commented out for some reason
n008f4g_ has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
bronson_ has quit [Ping timeout: 244 seconds]
Emmanuel_Chanel has joined #ruby
diegoaguilar has joined #ruby
htmldrum has joined #ruby
<lxsameer>
Mon_Ouie: hmmm thanks for the info, but I was wondering why ruby does not use such solution ( similar to python byte codes ) ?
Couch has joined #ruby
<Mon_Ouie>
I don't know the answer to that, unfortunately
<workmad3>
lxsameer: mostly because they're still moving towards it... ruby only went fully bytecode internally in 1.9, and hasn't hashed out all the details of what saved bytecode should look like yet
the_drow has joined #ruby
<lxsameer>
Mon_Ouie: thanks
<workmad3>
the code Mon_Ouie pointed out for saving/loading bytecode is a step towards it (it was introduced in 2.3 iirc)
RegulationD has joined #ruby
<lxsameer>
workmad3: happy to hear it
<lxsameer>
workmad3: thanks for the info man
bkxd has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<aep>
is there a quick and dirty way to generate a rest commandline app that litteraly just calls some http stuff?
RegulationD has quit [Ping timeout: 260 seconds]
ocbtec has joined #ruby
<lxsameer>
aep: on top of my head you can do it with e small hack on tor classes
<aep>
tor?
<lxsameer>
aep: yeah Tor gem
bkxd has quit [Ping timeout: 244 seconds]
slackbotgz has joined #ruby
<aep>
uuuh
<lxsameer>
it's a utility which allows you write cli apps more easily
<jhass>
go through the list, I'd probably miss a couple
<rahc>
so you don't know
<rahc>
thanks anyway
dipnlik has joined #ruby
jtdowney has quit [Quit: ZNC]
<jhass>
I'm simply not doing your work for you ;)
RubyJedi-ing has quit [Ping timeout: 244 seconds]
<rahc>
jhass: there are no expectations on you to do anything
<toretore>
there isn't a single entry-point to adding values to an array
ur5us has quit [Ping timeout: 276 seconds]
<rahc>
toretore: thank you
nodejunkie has quit [Ping timeout: 252 seconds]
<jhass>
right, like compiling a comprehensive list of methods that could add elements to an array ;)
Suntzu has joined #ruby
emilkarl has joined #ruby
astrobun_ has joined #ruby
<rahc>
jhass: there is an exepectation on you to *not* do some things
<rahc>
jhass: in particular, there is an expectation that you will refrain from responding to someone's question if you can't help them
<jhass>
well, your question didn't contain the fact I added, that you should redefine the methods which add elements to your array
<rahc>
jhass: you can't help me
slackbotgz has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 252 seconds]
ncopa has quit [Ping timeout: 240 seconds]
astrobun_ has quit [Ping timeout: 248 seconds]
<toretore>
rahc: these are the methods you have to override on Array to properly subclass or proxy it w/r to addition, afaik: ["self.from_array", "self.try_convert", "<<", "[]=", "collect!", "map!", "concat", "fill", "replace", "insert", "push", "unshift"]
<toretore>
now stop being an ass
ncopa has joined #ruby
<rahc>
umm.. thanks
<rahc>
I wasn't expecting someone to come out with a list but thanks :-)
<toretore>
+ initialize which takes args too
dANOKELOFF has quit []
rodfersou has joined #ruby
<toretore>
and Array.from_array doesn't exist
andywojo has joined #ruby
weckl has joined #ruby
<gregf_>
should'nt implementing method_missing be enough?
<gregf_>
>> class Foo; attr_accessor :arr;def initialize; @arr = [];end; def [](ind); @arr[ind];end; def method_missing(meth, *args, &bl); m = @arr.method(meth); m.(*args) if m;end;end;f = Foo.new();f.push(1).push(2).push(3).pop; p f # like that?
<ruby[bot]>
gregf_: # => #<Foo:0x41c792f0 @arr=[1, 2]> ...check link for more (https://eval.in/547339)
sergey_makagon has joined #ruby
<rahc>
gregf_: be enough for what?
<rahc>
gregf_: that class doesn't solve my problem
Rickmasta has joined #ruby
<gregf_>
rahc: then im afraid you'll have to think a bit more ;)
<gregf_>
btw, what jhass suggested was quite helpful imho :|
andywojo has quit [Ping timeout: 268 seconds]
<rahc>
gregf_: you're confused
<rahc>
gregf_: I'm not looking for help solving my problem
<rahc>
I've moved on from the few minutes ago when I asked
<rahc>
toretore was helpful
bluOxigen_ has joined #ruby
<gregf_>
rahc: looks like you're being a bit too curt.. when anyone suggests something .. you need to appreciate for what they do.. else no one will want to help :| *runs*
bluOxigen has quit [Ping timeout: 244 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandelius has joined #ruby
<rahc>
gregf_: on IRC, I've found there are two types of people: (1) people who are helpful, and (2) people who need to sit on IRC channels interacting with people giving obvious, useless or unhelpful suggestions in order to feed their own egos
<rahc>
gregf_: I feel I don't need to appreciate the latter type
<sandelius>
rahc BINGO
arthurnn has quit [Ping timeout: 276 seconds]
<manveru>
rahc: i can be both :D
<gregf_>
rahc: so , which one do you belong to?
<gregf_>
but meh.. *goes off to do some better work*
chipotle has quit [Quit: cheerio]
skislak has joined #ruby
dipnlik has quit [Quit: dipnlik]
GodFather has joined #ruby
BlackW0lf has joined #ruby
johnmilton has joined #ruby
auzty has quit [Quit: Leaving]
<BlackW0lf>
hi all im having an issue after i settup ruby for an application on my vps last week,
dipnlik has joined #ruby
<BlackW0lf>
/usr/bin/env: ruby: No such file or directory
araujo has quit [Quit: Leaving]
<BlackW0lf>
its ruby 2.1.5 and im running as root
araujo has joined #ruby
<BlackW0lf>
looking around the internet ive found afew people having this issues with multiple solutions but none seam to work for me
r0b3rt has joined #ruby
gagrio|trng is now known as gagrio
Ropeney has joined #ruby
<BlackW0lf>
anyone have any surgestions?
<djellemah>
BlackW0lf: there are several ways to install ruby. Which one did you use?
mostlybadfly has quit [Quit: Connection closed for inactivity]
roelof has joined #ruby
<roelof>
Hello, I have this challenge : Try changing the value of Argument::Truth in the following exercise. I did Argment::Truth = "No, you're not" but then I see a security error on Ruby Monk
<Bish>
it's not what i want :( i want to parse that uri
ocbtec has joined #ruby
ocbtec has quit [Client Quit]
<shevy>
URI.parse ?
<adaedra>
leftpad: you have multiple solutions: used the 2.0 provided by recent OS X, use homebrew (brew install ruby, or for olders, brew install homebrew/versions/ruby21), use something like ruby-build or ruby-install, coupled with rbenv or chruby if you need to switch often or rvm which does all. It depends on your needs.
ocbtec has joined #ruby
kfpratt has quit []
<Bish>
shevy: well that does parse the whole url, i just want to parse the query part ( after the ? )
<shevy>
hmm that reminds me of the way how the CGI module makes a hash out of these
<Bish>
quite simple problem, but i am unable to find the answer :D
pandaant has quit [Remote host closed the connection]
Begi has joined #ruby
<Bish>
i could sure, split by & and regex the rest, but there got to be a better way
<shevy>
I don't remember how it does but it is stored in what .params method returns
<leftpad>
adaedra : I'm sure rbenv and rvm are great (once I figure out how to use them). I tried brew but had to manually create a softlink to start using it. A nice ruby2.3.0.darwin-amd64.pkg would be nice to get started.
<shevy>
huh strange
kfpratt has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
<shevy>
I just tested it in irb and it did not work. I am glad the bot called workmad3 got it to work! :D
RegulationD has joined #ruby
<adaedra>
leftpad: bleh no.
halfamind has joined #ruby
<Bish>
workmad3: that's actually what i want, still do i really need CGI only for that?
<leftpad>
havenwood : thanks
<havenwood>
leftpad: Installing the brew package should create the link automatically if you don't have something in front of it. Would be happy to help get brew setup properly.
halfamind has quit [Read error: Connection reset by peer]
<workmad3>
Bish: because then it can handle multiple params with the same name
<shevy>
I guess you can change the method body to return a string value there
Begi has left #ruby [#ruby]
<Bish>
workmad3: yeah i figured
ChiefAlexander has joined #ruby
dstarh has joined #ruby
Zai00 has quit [Quit: Zai00]
swills has joined #ruby
Tempesta has quit [Quit: See ya!]
Zai00 has joined #ruby
zlude has joined #ruby
<zlude>
Hey! I'm learning ruby and how to parse JSON, there is a beautiful way to get the objects better than this? "puts player['playerstats']['stats'][0]['value']" ?
<shevy>
is this not already beautiful ;)
<greenbigfrog>
Mon_Ouie: ty
<shevy>
you could probably replace the [0] with .first
<SebastianThorn>
and ' with ", but that might just be me ;)
<shevy>
there is also a hash-like variant with methods ... but I am not sure if this is a good idea
<oddmunds>
there _has_ to be some library that lets you do puts player.playerstats.stats.first.value
pawnbox has quit [Remote host closed the connection]
<shevy>
zlude one way would be to define a method that does it; players = { 'fisune' => '76561198060075860', 'leo' => '76561198076788976' }; variable = 'leo'; players.fetch(variable); if you need it generalized, write a method that returns the proper entry
skweek has joined #ruby
Guest58241 has joined #ruby
kentnl is now known as kent\n
codecop_ has joined #ruby
Zai00 has quit [Read error: Connection reset by peer]
ocbtec has joined #ruby
Zai00 has joined #ruby
pawnbox_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
jmignault has quit [Quit: rcirc on GNU Emacs 24.5.1]
rake_db__ has quit [Remote host closed the connection]
pawnbox_ has quit [Remote host closed the connection]
Es0teric has quit [Quit: Computer has gone to sleep.]
Es0teric has joined #ruby
Zai00 has quit [Read error: Connection reset by peer]
CasBaIT has joined #ruby
griffindy has joined #ruby
moeabdol1 has quit [Ping timeout: 246 seconds]
bry4n has joined #ruby
bry4n_ has quit [Ping timeout: 268 seconds]
skade has quit [Quit: Computer has gone to sleep.]
polysic__ has quit []
Zai00 has joined #ruby
RegulationD has joined #ruby
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
Chagel has quit [Ping timeout: 252 seconds]
madgen has quit [Ping timeout: 276 seconds]
moeabdol1 has joined #ruby
hosttor has joined #ruby
dipnlik has quit [Quit: dipnlik]
scepticulous has quit [Ping timeout: 240 seconds]
madgen has joined #ruby
tvon has quit [Quit: Peace out, y'all!]
ChiefAlexander has quit [Remote host closed the connection]
ChiefAlexander has joined #ruby
polysics has joined #ruby
krz has joined #ruby
last_staff has quit [Quit: last_staff]
dipnlik has joined #ruby
ruid has quit [Ping timeout: 276 seconds]
jgt has joined #ruby
kariolee_ has quit [Remote host closed the connection]
ChiefAlexander_ has joined #ruby
ChiefAlexander has quit [Read error: Connection reset by peer]
tildes has quit [Remote host closed the connection]
d0nn1e has quit [Ping timeout: 248 seconds]
qhp has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
jmignault has joined #ruby
pawnbox has joined #ruby
d0nn1e has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
Guest38 has joined #ruby
aegis3121 has joined #ruby
bkxd has joined #ruby
Zai00 has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
nfk|laptop has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
Mia has joined #ruby
whippythellama has quit [Ping timeout: 276 seconds]
ceej_ has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
ceej has joined #ruby
Zai00 has joined #ruby
<rahc>
there is an attribute in a class, @assets, declared with attr_accessor
<madgen>
It may be a different instance of Configuration
<rahc>
madgen: there's the Rakefile
n008f4g_ has joined #ruby
<rahc>
madgen: the object id for the configuration class is the same
blaxter has quit [Quit: foo]
goodroot has quit [Quit: WeeChat 1.4]
jmignault has quit [Remote host closed the connection]
terlar has quit [Ping timeout: 244 seconds]
<rahc>
that's the "config id" at the start of the lines I pasted into the channel above
jmignault has joined #ruby
<madgen>
hmm, sorry not entirely sure, but if i were you i'd check the following /srv/www/obs/api/config/application.rb:10:in `<top (required)>'
tjvc has joined #ruby
tjvc has quit [Changing host]
tjvc has joined #ruby
GnuYawk has joined #ruby
<rahc>
madgen: check it for what? :-)
GnuYawk has joined #ruby
GnuYawk has quit [Changing host]
the_drow has quit [Quit: This computer has gone to sleep]
<rahc>
class Application < Rails::Application
<rahc>
that's the line
bkxd has quit [Ping timeout: 244 seconds]
<rahc>
which is as one would expect
<rahc>
that just initiates the instantiation of the Application class
<rahc>
how can I determine what is changing the assets attribute?
GnuYawk has quit [Remote host closed the connection]
<rahc>
if "assets=" doesn't catch it, is there anything else that will?
<rahc>
there surely must be otherwise it would be the same object id
<brent_>
I'm trying to run bundle and it keeps failing due to inability to install eventmachine 1.0.3
<rahc>
so the question is: what
<rahc>
?
freerobby has quit [Quit: Leaving.]
Zai00 has quit [Ping timeout: 244 seconds]
andikr has quit [Remote host closed the connection]
mtkd has quit [Ping timeout: 248 seconds]
platzhirsch has left #ruby [#ruby]
ItSAN____ has quit [Quit: Leaving...]
freerobby has joined #ruby
<brent_>
though i have eventmachine 1.2 installed fine
GnuYawk has joined #ruby
<havenwood>
brent_: This fails for me as well: gem install eventmachine -v 1.03
<brent_>
can i alter the gemfile.lock and change the eventmachine version listed
<brent_>
right, can't figure out why
<havenwood>
brent_: bundle update eventmachine
<brent_>
it says to find a lock at specific location, but no log exists
<brent_>
log*
mtkd has joined #ruby
mikecmpbll has joined #ruby
<brent_>
havenwood: looks like that got past eventmachine now fails on json v 1.8.1
mistermocha has joined #ruby
<brent_>
should i do the same for json?
mistermocha has quit [Remote host closed the connection]
GG is now known as Bruh
jmignault has quit [Quit: rcirc on GNU Emacs 24.5.1]
mistermocha has joined #ruby
jmignault has joined #ruby
Bruh is now known as Homie
tubuliferous has joined #ruby
tmtwd has quit [Ping timeout: 244 seconds]
<havenwood>
brent_: 1.8.1 is a few years old so worth a shot.
<brent_>
huzzah! bundle update eventmachine json worked
Zai00 has joined #ruby
<havenwood>
brent_: nice
<brent_>
thanks for the tip
<havenwood>
you're welcome
diegoaguilar has quit [Ping timeout: 276 seconds]
fedexo has joined #ruby
sergey_makagon has quit []
<brent_>
havenwood: is 'bundle update *packages' the same as 'bundle' without updating necessary package versiosn?
Homie is now known as GG
light2045 has quit [Read error: Connection reset by peer]
karmatr0n has joined #ruby
<havenwood>
brent_: Just `bundle` is `bundle install`. See: bundle help update
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has quit [Remote host closed the connection]
<brent_>
okay, so do budnle update, then bundle install
chouhoulis has joined #ruby
daytime is now known as fed
mhoungbo has quit [Ping timeout: 244 seconds]
<havenwood>
brent_: Typically you don't often use `bundle update` unless you're updating specific gems, since it changes the Gemfile.lock possibly dramatically.
djbkd has joined #ruby
<havenwood>
brent_: A `bundle install` will install the gem versions from the Gemfile.lock.
<havenwood>
brent_: For an app you want everyone using the same gem versions, and typically you don't want to break things, so you bundle to install the Gemfile.lock gems.
<jaroslav>
(that will not help much, if you don't know GNU Make)
<brent_>
so in my exmpale above, the rake db:create db:migrate db:seed, was making a database w/ those features?
ramfjord has joined #ruby
freerobby has quit [Quit: Leaving.]
failshell has joined #ruby
<jaroslav>
brent_: tldr version would be that rake is a simple specific language which allows to easily describe 'tasks' and dependencies between them
<jaroslav>
brent_: simple scenario that comes to my mind would be: imagine you are writing ruby code, and you want to publish it as a gem
<jaroslav>
brent_: before publishing new version of that gem, you'd like to run tests
pawnbox_ has joined #ruby
pawnbox has quit [Read error: No route to host]
<jaroslav>
brent_: so the whole sequence would be: 1/ run tests, 2/ if they succeed, build gem, 3/ push gem to gemserver
joconcepts has quit [Remote host closed the connection]
dipnlik has joined #ruby
<jaroslav>
brent_: in Rakefile you can define a task 'publish' which is responsible for pushing gem to gemserver, and declare it as *depends* on building gem
symm- has joined #ruby
<jaroslav>
brent_: then the task 'build' and task 'test', with appropriate dependencies described
<jaroslav>
brent_: when you have all of that, you can simply do: 'rake publish'
<jaroslav>
brent_: and it will make sure tests are run, gem is built, and only then it is pushed to server
amclain has joined #ruby
bollullera has quit [Excess Flood]
shredding has quit [Ping timeout: 276 seconds]
<brent_>
jaroslav thanks for the explanation, does give me an understanding
Zai00 has quit [Read error: Connection reset by peer]
<brent_>
so rake's commands are limited to what in the Rakefile correct?
<shevy>
it's ruby code
<jaroslav>
brent_: it doesn't necessarily have to be a file called 'Rakefile', but yes, rake can only perform tasks that are described *somewhere*
B1n4r10 has quit [Ping timeout: 260 seconds]
tjohnson has joined #ruby
aegis3121 has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
yardenbar has quit [Ping timeout: 244 seconds]
joonty has quit [Ping timeout: 260 seconds]
<brent_>
this is the rakefile http://hastebin.com/kixodeqece.pas included. Curious how that 'rake db:create db:migrate db:seed' command relates to taht
<jaroslav>
brent_: as you see this file requires ../config/application
<jaroslav>
and runs a #load_tasks method of Application class
freerobby has joined #ruby
<jaroslav>
brent_: find that fili, open it, and find the method load_tasks -> you'll figure out where does it read tasks from
mhoungbo has quit [Ping timeout: 248 seconds]
<jaroslav>
brent_: that way you would be able to see what are the possible tasks available, and what they do
mhoungbo has joined #ruby
antgel has quit [Ping timeout: 276 seconds]
rkazak has joined #ruby
smathy has joined #ruby
Zai00 has joined #ruby
jlebrech has joined #ruby
blt has quit [Ping timeout: 248 seconds]
chouhoulis has joined #ruby
<brent_>
jaroslav, appears to be a module w/ an empty class
wldcordeiro has quit [Quit: WeeChat 1.3]
rkazak has quit [Ping timeout: 248 seconds]
<brent_>
i do appreciate the explanation, really helped clear it up
chouhoulis has quit [Remote host closed the connection]
karioleez has joined #ruby
baweaver has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
<jaroslav>
brent_: no problem, maybe it's in a different file
mtkd has joined #ruby
<jaroslav>
brent_: just go to the main directory of that app, and run: # grep -R "db:create" .
<jaroslav>
brent_: yes, there is a dot at the end, after space
<jaroslav>
brent_: it will show you all the files, where "db:create" string can be found
failshell has quit []
fedexo has quit [Ping timeout: 268 seconds]
CloCkWeRX has quit [Quit: Leaving.]
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<brent_>
hmm, nothing
<jlebrech>
I want to do a nested group_by of an array then run aggregate methods on the grouped data. where can i find a decent book or blog on this?
<brent_>
i did find a db folder w/ seeds.rb and a migrate folder
<jlebrech>
I can do this in sql very easily, but I want it all in memory
Alayde has joined #ruby
mark2 has quit [Remote host closed the connection]
shmuli_ has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
nofacade has joined #ruby
GnuYawk has joined #ruby
sepp2k has quit [Quit: Leaving.]
maletor_ has joined #ruby
joconcepts has joined #ruby
karioleez has quit [Remote host closed the connection]
maletor has quit [Ping timeout: 250 seconds]
rake_db_migrate has quit [Remote host closed the connection]
rake_db_migrate has joined #ruby
aeterne has joined #ruby
stan has quit [Quit: Leaving]
rake_db_migrate has quit [Remote host closed the connection]
musl has joined #ruby
ChiefAlexander_ has quit [Remote host closed the connection]
<jlebrech>
shevy: sure, difference examples as alternatives to sql
<jlebrech>
I want to nest group_bys
rodfersou|lunch is now known as rodfersou|afk
<apeiros>
jlebrech: I suggest you just do it and show the code here
hightower3 has quit [Ping timeout: 252 seconds]
PedramT has quit [Ping timeout: 240 seconds]
stan has joined #ruby
madgen has quit [Ping timeout: 264 seconds]
madgen has joined #ruby
sandelius has joined #ruby
mhoungbo has quit [Ping timeout: 264 seconds]
dipnlik has quit [Quit: dipnlik]
baweaver has quit [Remote host closed the connection]
d10n-work has joined #ruby
parduse has joined #ruby
djbkd has joined #ruby
smathy has joined #ruby
jmorgado has quit [Ping timeout: 240 seconds]
phredus has joined #ruby
GnuYawk has quit [Ping timeout: 276 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benlieb has joined #ruby
parduse has quit [Client Quit]
malconis has joined #ruby
edwinvdgraaf has quit [Ping timeout: 244 seconds]
zeroDivisible has quit [Ping timeout: 276 seconds]
Guest13 has joined #ruby
karioleez has joined #ruby
<Guest13>
guys, I've just installed rvm + ruby, but now every time I open a tab on terminal on OS X it start executing something in background for 1/2 sec...
<Guest13>
any idea?
skweek has quit [Ping timeout: 248 seconds]
nando293921 has joined #ruby
<mozzarella>
the rvm script?
htmldrum has quit [Ping timeout: 250 seconds]
dipnlik has joined #ruby
platzhirsch has joined #ruby
solars has quit [Ping timeout: 240 seconds]
Zai00 has quit [Read error: Connection reset by peer]
mhoungbo has joined #ruby
swills has quit [Quit: Leaving]
platzhirsch has quit [Client Quit]
<Guest13>
mozzarella yes
Donkoko has quit [Remote host closed the connection]
B1n4r10 has joined #ruby
Donkoko has joined #ruby
Donkoko has quit [Remote host closed the connection]
bry4n has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dmolina has quit [Quit: Leaving.]
dmolina has joined #ruby
Canar has joined #ruby
akkad has joined #ruby
e4xit has quit [Quit: Right I'm out!]
djbkd has joined #ruby
nando293921 has quit [Quit: Lost terminal]
wldcordeiro has joined #ruby
davedev24 has joined #ruby
dmolina has quit [Ping timeout: 244 seconds]
ferr has quit [Ping timeout: 268 seconds]
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
GG is now known as Socialdawg
elifoster has quit [Ping timeout: 250 seconds]
jlebrech has quit [Remote host closed the connection]
davedev2_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
evidex has quit [Remote host closed the connection]
n1colas has quit [Quit: WeeChat 1.4]
chouhoulis has joined #ruby
davedev24 has quit [Ping timeout: 248 seconds]
n008f4g_ has joined #ruby
rake_db_migrate has joined #ruby
Dimik has joined #ruby
postmodern has joined #ruby
Zai00 has quit [Quit: Zai00]
ChiefAlexander has joined #ruby
madgen has quit [Ping timeout: 244 seconds]
polysics_ has joined #ruby
bry4n has joined #ruby
Chunlea_ has quit [Ping timeout: 248 seconds]
rmulligan has joined #ruby
Snowy_ has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
polysics has quit [Ping timeout: 248 seconds]
dipnlik has quit [Quit: dipnlik]
<karioleez>
Does anyone have any experience with ioctl and its interface with ruby ?
dipnlik has joined #ruby
dipnlik has quit [Client Quit]
a1fa has joined #ruby
ChiefAlexander has quit [Ping timeout: 276 seconds]
n1colas has joined #ruby
<a1fa>
is there a way to automatically convert a file to utf-8 from * while doing CVS.foreach? also, is it possible to make CVS.foreach accept headers that are not quoted?
baweaver has joined #ruby
last_staff has joined #ruby
ChiefAlexander has joined #ruby
platzhirsch has joined #ruby
Snowy_ has quit [Quit: ragequit]
Aaklo has joined #ruby
ta_ has joined #ruby
Aaklo has left #ruby [#ruby]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rodfersou|afk is now known as rodfersou
platzhirsch has left #ruby [#ruby]
<RickHull>
a1fa: you may need to instantiate CSV first
baweaver has quit [Ping timeout: 250 seconds]
sepp2k has joined #ruby
Zai00 has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
<RickHull>
CSV.new(file_contents, options).each do row # rather than CSV.foreach(filename) do row
<RickHull>
the options hash should provide what you need
_stu_ has quit [Quit: _stu_]
crameth has quit [Quit: crameth]
spider-mario has joined #ruby
mtkd has joined #ruby
ramfjord has joined #ruby
Cohedrin has joined #ruby
mikecmpbll has joined #ruby
mhoungbo has quit [Ping timeout: 250 seconds]
gatman has joined #ruby
Chunlea_ has joined #ruby
<a1fa>
RickHull: i see
<smathy>
a1fa, there are gems out there which guess at encodings based on the prevalence of common/likely word-like characters.
<smathy>
a1fa, but the real answer is: tell your users to give you a UTF8 encoded file.
baweaver has joined #ruby
<a1fa>
thanks smathy, i am just preparing for the inevitable
<smathy>
a1fa, and rescue ArgumentError and fail back to your user telling them that their file wasn't UTF8
<a1fa>
not a bad idea. i will do that
tristanp has quit []
baweaver has quit [Remote host closed the connection]
joonty has joined #ruby
tristanp has joined #ruby
<a1fa>
RickHull: foreach also takes the same options hash
<a1fa>
unless we are talking about HeaderConverters.. ?
djbkd has quit [Remote host closed the connection]
Balzrael has joined #ruby
<smathy>
a1fa, none of those options will help you with the encoding of the incoming file.
<kellabyte>
how did people do things before the dig method? I need to make something run on an older version of ruby
sepp2k has quit [Read error: Connection reset by peer]
<apeiros>
they wrote code
<a1fa>
smathy: that was a follow up on my 2nd question, regarding of unquoted headers
djbkd has joined #ruby
<a1fa>
smathy: csv files suck, especially with new lines in them
<kellabyte>
was there another less than ideal but somewhat elegant way to solve what dig does?
<smathy>
a1fa, ahh - heh, sorry, I didn't see it.
<kellabyte>
apeiros: thanks for that answer lol
<a1fa>
smathy: no worries -- honestly, i'd rather not use csv. but people like their "sheets"
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox_ has quit [Remote host closed the connection]
<smathy>
kellabyte, they chained conditionals, or wrote their own version of dig.
sepp2k has joined #ruby
joonty has quit [Ping timeout: 276 seconds]
DoubleMalt has quit [Ping timeout: 244 seconds]
<shevy>
kellabyte usually by calling a method which will handle the access properly
<shevy>
the gem author probably did not anticipate this encoding or the error setup
<shevy>
aha
<Noldorin>
shevy, it's on an embedded Linux so maybe that's not helping?
<shevy>
what ruby version do you use?
<Noldorin>
2.2.3
<shevy>
hmm ok
<shevy>
thought that could be a problem but is not
<shevy>
one line was: $KCODE = "U" if RUBY_VERSION < "1.9"
Cohedrin has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
<shevy>
the gem author is probably not very experienced
<shevy>
the file in the lib/ subdirectory is a 100% copy paste of the file in the bin/ directory
baweaver has quit [Remote host closed the connection]
<Noldorin>
I see heh
<Noldorin>
shevy, so what's the easiest fix?
<shevy>
rmate.rb is https://gist.github.com/shevegen/4ccbe4a3449c1b32892d6568472cf9d9 - but I think the author probably never tested it on windows or that encoding; there is not a lot of code there though, you can probably copy/paste it and try to load it and see what part fails exactly
<shevy>
I am not sure
<shevy>
copy paste that file into a local file and try to run it?
<Noldorin>
to be honest I don't know a lot about gem files (barely anything)
<shevy>
perhaps the encoding
<Noldorin>
I'm not on Windows FYI
<shevy>
yeah but you get some encoding error
<shevy>
I did a gem install and it worked for me
<Noldorin>
yes. windows encoding?
<shevy>
have a look at strings such as: "Connect: ‘#{server_info}’"
<shevy>
I don't get a proper output from that
<shevy>
no idea what is Windows-31J sorry; the gem seems to work on my linux system though :)
<Noldorin>
yeah heh
TheHodge has quit [Quit: Connection closed for inactivity]
sandstrom has quit [Ping timeout: 250 seconds]
<shevy>
it's not a lot of code though, only 200 lines
<shevy>
obviously it does something with resolution :P
GodFather has quit [Ping timeout: 260 seconds]
speaking1ode has joined #ruby
<Noldorin>
what are you using it for? :)
<Noldorin>
heh
noService has quit [Read error: Connection reset by peer]
_blizzy_ has quit [Quit: Leaving]
frem has joined #ruby
<shevy>
I was not really using it, just testing it out since I use ruby-gtk too
<shevy>
the structure was defined in a big XML file though
jenrzzz has joined #ruby
jenrzzz has joined #ruby
<shevy>
glade... I don't like XML :(
ta_ has quit [Read error: Connection reset by peer]
<Noldorin>
I see
cdg has quit [Remote host closed the connection]
joonty has joined #ruby
mrmortondk has joined #ruby
<Noldorin>
all working now \o/
<shevy>
cool
<shevy>
you wrestled encoding into submission
AckZ has quit []
<Noldorin>
shevy, also, who does like XML? :P
ur5us has joined #ruby
<Noldorin>
indeed
platzhirsch has left #ruby [#ruby]
<shevy>
yeah well
<Noldorin>
there was some ruby-enc-extra package that fixed it. also just upgrading to entware-ng
<shevy>
I think these big XML files are generated by some editor, so perhaps it is really easy to build up widgets like that, if you use such an editor
Synthead has quit [Remote host closed the connection]
<shevy>
like you have those widget-building thingies on windows
<Noldorin>
I see
<shevy>
for ruby, I like the approach from the old shoes more ... http://shoesrb.com/
<Noldorin>
shevy, I used to do WPF from the XML end on Windows... that was 'fun'
<shevy>
Not necessarily that specific API... but something like that would be nice for ruby-gtk / ruby-gnome.
<shevy>
hehe
<Noldorin>
shoes looks cool
<Noldorin>
yeah
<shevy>
yeah it was a very cool idea when it was written... already like 10 years ago or so...
diegoaguilar has quit [Ping timeout: 250 seconds]
ur5us has quit [Read error: No route to host]
ur5us has joined #ruby
noService has joined #ruby
ta_ has joined #ruby
nofacade has quit [Ping timeout: 248 seconds]
ipg has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
solars has quit [Ping timeout: 268 seconds]
pawnbox has joined #ruby
n008f4g_ has quit [Ping timeout: 244 seconds]
growGROW has quit [Remote host closed the connection]
Eiam_ has joined #ruby
ipg has quit [Client Quit]
<Noldorin>
shevy, yeah. just hasn't been updated/modernised for other graphical toolkits it seems?
pawnbox has quit [Ping timeout: 250 seconds]
madgen has quit [Ping timeout: 250 seconds]
<frem>
Shoves was never supposed to really fit in with other desktop apps, it seems like. _why liked kinda quirky one-off things.
benlieb has quit [Quit: benlieb]
yfeldblum has joined #ruby
mhoungbo has joined #ruby
<frem>
Hopefully the JRuby port will make it easier for them to maintain compatibility with newer toolkits.
aegis3121 has joined #ruby
polysics has joined #ruby
hxegon is now known as hxegon_AFK
qpls has quit [Disconnected by services]
tvw has joined #ruby
hxegon_AFK is now known as hxegon
hosttor has quit [Ping timeout: 268 seconds]
skydiver has quit [Ping timeout: 248 seconds]
millerti has joined #ruby
karmatr0n has quit [Ping timeout: 260 seconds]
xaxisx has joined #ruby
diegoaguilar has joined #ruby
polysics_ has quit [Ping timeout: 248 seconds]
baweaver has joined #ruby
karmatr0n has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
elaptics is now known as elaptics`away
IrishGringo has quit [Ping timeout: 248 seconds]
PedramT has quit [Remote host closed the connection]
abyx has quit [Quit: This computer has gone to sleep]
rmulligan has quit [Remote host closed the connection]
tref has quit [Quit: tref]
rmulligan has joined #ruby
noServic1 has joined #ruby
ruby-lang664 has joined #ruby
benlieb has joined #ruby
icarus has joined #ruby
karmatr0n has quit [Ping timeout: 252 seconds]
noService has quit [Ping timeout: 246 seconds]
last_staff1 has joined #ruby
last_staff has quit [Ping timeout: 244 seconds]
last_staff1 is now known as last_staff
karmatr0n has joined #ruby
noServic1 has quit [Ping timeout: 246 seconds]
polyidus has quit [Quit: Later]
poguez_ has joined #ruby
dc4 has joined #ruby
elifoster has quit [Ping timeout: 264 seconds]
B1n4r10 has quit [Ping timeout: 248 seconds]
polyidus has joined #ruby
x77686d has quit [Quit: x77686d]
dnewkerk has quit [Quit: dnewkerk]
B1n4r10 has joined #ruby
YP-QMUL-W has quit [Read error: Connection reset by peer]
abyx has joined #ruby
dvinciguerra_ has quit [Ping timeout: 246 seconds]
elifoster has joined #ruby
abyx has quit [Client Quit]
stevednd has joined #ruby
abyx has joined #ruby
codecop has quit [Remote host closed the connection]
TomyLobo has quit [Read error: Connection reset by peer]
Begi has joined #ruby
goglosh has joined #ruby
hxegon is now known as hxegon_AFK
gatman has quit [Remote host closed the connection]
xaxisx has quit [Quit: xaxisx]
<frozenfoxx>
Could anyone give me a quick-n-dirty way to reopen $stdin for writing? I know you're normally not supposed to but for testing a particular bit of code that works perfect with ARGF but not at all with other forms of input it would help me greatly.
<frozenfoxx>
Basically so I can do a "$stdin << "some string" " or "ARGV << "some string" "
gatman has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
dvinciguerra_ has quit [Ping timeout: 240 seconds]
_stu_ has joined #ruby
Canar has quit [Quit: WeeChat 1.4]
Canar has joined #ruby
YP-QMUL-W has joined #ruby
stannard has quit [Remote host closed the connection]
<smathy>
frozenfoxx, you can't write to $stdin.
pawnbox has joined #ruby
x77686d has joined #ruby
stannard has joined #ruby
dvinciguerra_ has joined #ruby
x77686d has quit [Client Quit]
<smathy>
frozenfoxx, I doubt that you're really asking the right question here, are you trying to test something that reads from stdin and you want to stub $stdin out so it returns a known string you want to provide in your test?
shmuli has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
rmulliga` has quit [Remote host closed the connection]
x77686d has joined #ruby
karmatr0n has quit [Ping timeout: 240 seconds]
YP-QMUL-W has quit [Read error: Connection reset by peer]
malconis has quit [Ping timeout: 246 seconds]
<Ox0dea>
You can totally write to stdin.
malconis has joined #ruby
millerti has quit [Read error: Connection reset by peer]
hxegon_AFK is now known as hxegon
freerobby has quit [Quit: Leaving.]
<Ox0dea>
It's how modern terminals provide mouse support, for instance. You enable that mode with some escape sequence, and then it writes coordinates and button states to stdin.
YP-QMUL-W has joined #ruby
<frozenfoxx>
shevy: hmm, interesting.
shmuli has joined #ruby
<frozenfoxx>
Ox0dea: I thought you could, yeah.
ChiefAlexander has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
<Ox0dea>
frozenfoxx: That said, your mentioning `$stdin << foo` and `ARGV << foo` in the same breath does not bode well.
<frozenfoxx>
Essentially if you replace line 29 with line 30 and punch in text in the console you started the rails app in, everything works appropriately. It blocks until you enter text and hit enter, and outputs it from line 31 as you'd expect.
polyidus has quit [Quit: Later]
<Ox0dea>
frozenfoxx: Do you know what ARGF is?
x77686d has quit [Quit: x77686d]
<frozenfoxx>
If you do this with the pipe, it either infinintely blocks on line 29 (never moves forward ever, even if you write into $inpipe) OR if you change it for "while line = @outpipe.gets" then it infinitely spams "nil" which is the default you pull out of the pipe.
<frozenfoxx>
Ox0dea: Yes, the continuous stream of arguments from the launching of the program.
<Ox0dea>
frozenfoxx: No, that's not quite right.
<Ox0dea>
You've got ARGV and ARGF conflated.
<smathy>
Ox0dea, well sure, the system writes to the other side of stdin, as it does with anything we read from stdin, but just because your keyboard "writes to stdin" that doesn't mean STDIN is writable in this context of a ruby test.
<Ox0dea>
smathy: Sure, I concede that it'd have to be reopened, but there's nothing special about /dev/fd/0 that prevents it being opened for writing.
<frozenfoxx>
Ox0dea: as a special note, I *don't* want to try to use either $stdin or ARGF for this, it just happens to be doing exactly what I want right now. I figure if I can understand how that works then I can try to make something similar that will do what I want.
davedev2_ has quit [Remote host closed the connection]
malconis has quit [Remote host closed the connection]
<frozenfoxx>
I just currently fail to understand what I'm doing wrong with the pipe *or* what I should replace it with since it either blocks forever or spams nil forever.
<shevy>
hehe
malconis has joined #ruby
<shevy>
a nil-spam pipe
<frozenfoxx>
Ox0dea: last time I checked ARGV was the array and ARGF was the stream from it, but admittedly I could be totally wrong
polyidus has joined #ruby
cdg has joined #ruby
znz_jp has quit [Ping timeout: 250 seconds]
cdg has quit [Read error: Connection reset by peer]
swills has quit [Ping timeout: 264 seconds]
cdg has joined #ruby
gigetoo has quit [Ping timeout: 264 seconds]
<Ox0dea>
frozenfoxx: I guess it makes sense to think of it that way, but the stream is wrapped around *all* the file arguments, and defaults to $stdin.
blackmesa has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
crazydiamond has quit [Remote host closed the connection]
<frozenfoxx>
Ox0dea: gotcha. For my purposes it's probably most correct to say to allows ARGV to be written to, it just would happen to work by accident if I did it with $stdin as well. Really the "right" answer though is I need to know what I'm doing wrong with the IO.pipe OR find a replacement.
DoubleMalt has quit [Remote host closed the connection]
<frozenfoxx>
Ox0dea: From what I understand "@outpipe.read" *should* block...unless it gets a string in it from @inpipe.write. I've tried it with "a string" and "a string\n" and neither seems to work, just sits there forever.
DoubleMalt has joined #ruby
whippythellama has joined #ruby
Musashi007 has joined #ruby
<frozenfoxx>
And then the "while = @outpipe.gets" spams nil infinitely since that's the default value in a pipe, doesn't matter if I try to write to @inpipe.puts "a string", it never gets there through all the nil spam either. I feel like I'm using the wrong tool since ARGV and the console does this perfectly, but I need it to do this from the "def relay()" instead of the console.
DoubleMalt has quit [Remote host closed the connection]
<frozenfoxx>
I just feel like I'm missing something obvious.
DoubleMalt has joined #ruby
PedramT has joined #ruby
Musashi007 has quit [Client Quit]
kobain has joined #ruby
Don_John has joined #ruby
Don_John has quit [Remote host closed the connection]
krz has quit [Ping timeout: 244 seconds]
_stu_ has quit [Quit: _stu_]
blackmesa has quit [Ping timeout: 276 seconds]
Musashi007 has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
karmatr0n has joined #ruby
skweek has quit [Ping timeout: 244 seconds]
dc4 has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
<Ox0dea>
frozenfoxx: What's the IO.pipe for when you're using #popen2?
djbkd has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
<Ox0dea>
At any rate, see what happens if you just nix the `.read` on Line 29.
<Ox0dea>
That's blocking because you're asking it to consume what it can only assume is infinite input.
<Ox0dea>
Streams can be processed "lazily" if you just ask for their lines as an enumeration (#each_line).
polyidus has quit [Ping timeout: 260 seconds]
<frozenfoxx>
Ox0dea: the #popen2 is for supplying input/output in realtime to an external process without blocking it (hence the Thread.new). I was thinking I could try the same thing, but I wasn't sure it would work.
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<frozenfoxx>
Ox0dea: that makes sense about the .read, 'll try that when I get home
karmatr0n has quit [Ping timeout: 264 seconds]
pawnbox has quit [Ping timeout: 244 seconds]
Lomex has quit [Remote host closed the connection]
<Ox0dea>
frozenfoxx: #popen2 gives you either side of a pipe.
karmatr0n has joined #ruby
Zai00 has quit [Quit: Zai00]
voidDotClass has quit [Ping timeout: 276 seconds]
rake_db_migrate has quit [Read error: Connection reset by peer]
<Ox0dea>
The IO.pipe call there and what you're doing with the results is the source of my confusion.
yfeldblum has quit [Ping timeout: 248 seconds]
rake_db_migrate has joined #ruby
joonty has quit [Ping timeout: 276 seconds]
Zai00 has joined #ruby
ChiefAlexander has joined #ruby
<braderhart>
Anyone able to help debug getting an old Ruby app running in a new enviornment?
johnmilton has quit [Remote host closed the connection]
<havenwood>
braderhart: Ask away.
Begi has left #ruby [#ruby]
blackmesa has joined #ruby
<braderhart>
havenwood: Thank you. I'm going to reimport source to start from scratch and then I'll show the errors I get
blackgoat has joined #ruby
freerobby has joined #ruby
mhoungbo has quit [Quit: Quitte]
malconis has quit [Remote host closed the connection]
karmatr0n has quit [Ping timeout: 260 seconds]
Jackneill has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby
malconis has joined #ruby
zeroDivisible has joined #ruby
jackjackdripper has joined #ruby
<frozenfoxx>
Ox0dea: Hmm, I see.
<frozenfoxx>
Ox0dea: it's entirely possible I got wayyyyy too down in the weeds to see I could've just been using the Open3 command variables as class variables to access outside of it. Thanks for bringing it up, I had a feeling this was way too hard and that'd be why
jsaak has joined #ruby
<frozenfoxx>
Ox0dea: I'll give all of those (remove the .read, and just use the straight-up variables I created earlier as class varaibles) a shot tonight.
<Ox0dea>
frozenfoxx: Well, you'll catch flak from certain folks for introducing instance variables outside of #initialize, but it's not a sin or anything.
icarus has quit [Ping timeout: 276 seconds]
<frozenfoxx>
Ox0dea: I think with what I'm doing it's already a sin. The Rails folks told me when I had a question about the websocket implementation "don't use beta software." Which would be fine, if I could accomplish this without it (i'm *not* a web dev, more devops and security)
gigetoo has joined #ruby
<Ox0dea>
They tell people not to use Action Cable in #RoR?
<braderhart>
So I should modify that Gem to use a new URL... correct?
icarus has joined #ruby
PedramT has quit [Ping timeout: 250 seconds]
<shevy>
there be madness on that channel!
<braderhart>
Do I modify just the Gemfile or the Gemfile.lock?
<frozenfoxx>
Ox0dea: I'll be honest, I don't get it. Rails 5 has already been great for me, I just didn't fully understand how to hook it up.
jpfuentes2 has joined #ruby
<frozenfoxx>
Ox0dea: this is literally the *very* last piece of my multi-month project and Rails made the rest of the standup so easy for a newbie like me that I can really understand why people like it.
bkxd has joined #ruby
<frozenfoxx>
...then I made the horrible mistake of saying I was new but needed ActionCable.
<frozenfoxx>
The last time I asked about this stuff (faye, em-websocket, etc) I was told to use Rails 5 since ActionCable is about to make all that pointless, so I wasn't super-happy about it.
<havenwood>
braderhart: Do you know where the gem currently lives?
<frozenfoxx>
Anyway, enough of me ranting on, sorry about that. I really appreciate the help everybody, I can't wait to try this tonight.
hahuang65 has joined #ruby
* frozenfoxx
reallllllly likes using Ruby, especially in a system capacity and with Puppet
<braderhart>
havenwood? I believe there should be a local copy on production and then I have a Gemfile.lock that shows a version