<pontiki>
if you really wanted just enqueue, dequeue, and empty? you could derive it super-easy
jamto11 has quit [Remote host closed the connection]
jonahR has quit [Quit: ¡Adios amigos, me fui para el carajo!]
wjimenez_5271 has quit [Ping timeout: 245 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
tvw has quit []
BBBThunda has quit [Ping timeout: 240 seconds]
polyidus has quit [Quit: EOF]
phoo1234567 has quit [Quit: Leaving]
deric_skibotn has quit [Ping timeout: 272 seconds]
wjimene__ has quit [Ping timeout: 255 seconds]
cibs has quit [Ping timeout: 252 seconds]
bridge has quit [Ping timeout: 245 seconds]
i_s has quit [Remote host closed the connection]
cibs has joined #ruby
jaimef has quit [Excess Flood]
bridge has joined #ruby
banister has joined #ruby
sawtooth has quit [Ping timeout: 245 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
zz_karupa is now known as karupa
yfeldblum has joined #ruby
sawtooth has joined #ruby
mikesplain has joined #ruby
sjouke has quit [Ping timeout: 260 seconds]
jaimef has joined #ruby
chrishough has quit [Quit: chrishough]
asdasdasdasss has joined #ruby
banister has quit [Ping timeout: 272 seconds]
oo____ has joined #ruby
mikesplain has quit [Ping timeout: 250 seconds]
oo____ has quit [Remote host closed the connection]
bpgoldsb has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
bpgoldsb|too has joined #ruby
djbkd has joined #ruby
tkuchiki has joined #ruby
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kaspergrubbe_ has joined #ruby
momomomomo has quit [Ping timeout: 260 seconds]
momomomomo has joined #ruby
axl_ has joined #ruby
chrishough has joined #ruby
chrishough has quit [Remote host closed the connection]
asdasdasdasss has quit [Ping timeout: 245 seconds]
pzula has joined #ruby
axl_ has quit [Client Quit]
jottr has quit [Ping timeout: 255 seconds]
jaimef has quit [Excess Flood]
djbkd has quit [Ping timeout: 255 seconds]
jaimef has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MatthewsFace has quit [Ping timeout: 245 seconds]
tylerkern has joined #ruby
x1337807x has joined #ruby
nateberkopec has joined #ruby
jamto11 has joined #ruby
pzula has quit [Ping timeout: 264 seconds]
tylerkern has quit [Ping timeout: 255 seconds]
Kricir has quit [Remote host closed the connection]
kevkev__ has joined #ruby
kachi8 has quit [Ping timeout: 240 seconds]
SilkFox has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
teddyp1cker has joined #ruby
oo____ has joined #ruby
kevkev__ has quit [Ping timeout: 245 seconds]
amclain has joined #ruby
polyidus has joined #ruby
beef-wellington has joined #ruby
sevenseacat has joined #ruby
macclearich__ has quit [Quit: Computer has gone to sleep.]
Photism has joined #ruby
macclearich__ has joined #ruby
Sauvin has joined #ruby
teddyp1cker has quit [Ping timeout: 260 seconds]
oo____ has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
wallerdev has quit [Quit: wallerdev]
Gooder` has quit [Remote host closed the connection]
oo____ has joined #ruby
x1337807x has joined #ruby
aspires has quit []
macclearich__ has quit [Ping timeout: 264 seconds]
x1337807_ has joined #ruby
wallerdev has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dekz has joined #ruby
coldkey21 has quit [Quit: Leaving]
Aryasam has quit [Ping timeout: 264 seconds]
luckyruby has quit [Quit: Leaving...]
aspires has joined #ruby
x1337807x has quit [Ping timeout: 250 seconds]
pzula has joined #ruby
<robscormack>
actually there is a Queue data structure
<godd2>
Yea but it's for thread queueing, no?
<robscormack>
yep
momomomomo_ has joined #ruby
ssvo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<robscormack>
queues don't have sense on a linear program, actually.
Spami has quit [Quit: This computer has gone to sleep]
momomomomo has quit [Ping timeout: 250 seconds]
momomomomo_ is now known as momomomomo
dbasch has quit [Quit: dbasch]
<robscormack>
nm, they do.
kaspergrubbe_ has quit [Remote host closed the connection]
kaspergrubbe_ has joined #ruby
iteratorP has joined #ruby
Wolland has joined #ruby
alekst has quit [Quit: Computer has gone to sleep.]
tatsuya_o has joined #ruby
alekst has joined #ruby
kaspergrubbe_ has quit [Ping timeout: 260 seconds]
nateberkopec has quit [Quit: Leaving...]
patric100e99 has quit [Ping timeout: 256 seconds]
<robscormack>
theharshest nokogiri or ox are your friends.
Kricir has joined #ruby
Gooder has joined #ruby
bruno- has joined #ruby
<robscormack>
damn, every time I read the word nokogiri, I think sushi.
<theharshest>
robscormack: thanks, but nokogiri and ox comes much later in this case I believe. There are gems like mida, opengraph, rdf-rdfa. Though they cover most of the cases, I'm concerned about a mapping of their fields to a common schema and parsing the left out cases.
<robscormack>
theharshest hmmm not sure, what do you want to achieve?
<theharshest>
robscormack: Actually this is what I want to parse, http://bit.ly/1qOtEsm
freerobby has quit [Read error: Connection reset by peer]
<robscormack>
i'd use nokogiri for those ones, because selectors help.
Sirupsen has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
<robscormack>
but that would be me.
cleopatra has quit [Quit: Saliendo]
ssvo has joined #ruby
awc737 has joined #ruby
<theharshest>
robscormack: yes I would also be using nokogiri to get the things done where these gems fail, thanks anyways :)
Kricir has quit [Ping timeout: 245 seconds]
<robscormack>
sorry
<eam>
when I build ruby, why can't I just run ./ruby -- what's the right way to run it without `make install` into some tmpdir?
<eam>
miniruby works I guess, what am I missing if I just use that?
alekst has quit [Quit: Leaving...]
<robscormack>
hmm
yetanotherdave has quit [Ping timeout: 250 seconds]
<robscormack>
does ./ruby exist?
<eam>
yeah, but it doesn't know how to find its modules
<robscormack>
if you don't want to install that version but run it from a directory
robustus has quit [Ping timeout: 255 seconds]
<robscormack>
use ./configure --prefix=/home/eam/here/is/my/copy/of/ruby
<eam>
yup, wondering if there's just a simple way to avoid that step
<robscormack>
(that's what rbenv does, afaik)
<robscormack>
it was one, but can't recall it.
<eam>
miniruby seems to work too, it looks like it skips over a bunch of initialization routines
<robscormack>
it's minified
nateberkopec has joined #ruby
robustus has joined #ruby
Tricon has quit [Quit: Leaving...]
SilkFox has quit [Ping timeout: 255 seconds]
pzula has quit [Ping timeout: 245 seconds]
Spami has joined #ruby
Spami has quit [Remote host closed the connection]
lw has joined #ruby
Spami has joined #ruby
oo____ has quit [Remote host closed the connection]
Kricir has joined #ruby
asdasdasdasss has joined #ruby
Spami has quit [Client Quit]
timonv_ has joined #ruby
Gooder has quit [Read error: Connection reset by peer]
sailias has quit [Ping timeout: 240 seconds]
IceDragon has quit [Quit: Space~~~]
tylerkern has joined #ruby
SilkFox has joined #ruby
TorpedoSkyline has joined #ruby
oo____ has joined #ruby
peret has quit [Remote host closed the connection]
asdasdasdasss has quit [Ping timeout: 245 seconds]
TorpedoSkyline has quit [Client Quit]
NinoScript has joined #ruby
saarinen has joined #ruby
timonv_ has quit [Ping timeout: 250 seconds]
tylerker_ has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
davispuh has quit [Remote host closed the connection]
tylerkern has quit [Ping timeout: 245 seconds]
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brianherman has quit [Read error: Connection reset by peer]
sixxy has quit [Ping timeout: 256 seconds]
kevkev__ has joined #ruby
<zenspider>
eam: what do you need to do?
tatsuya_o has quit [Ping timeout: 250 seconds]
Rollabunna has joined #ruby
godd2 has quit [Ping timeout: 272 seconds]
<zenspider>
eam: def miniruby *args; sh "./miniruby -I./lib ./tool/runruby.rb --extout=.ext -- #{args.join " "}"; end
<zenspider>
that's what I use to execute things via miniruby
<zenspider>
that'll pick up ext and everything
bpgoldsb|too has quit [Read error: Connection reset by peer]
vsoftoiletpaper has joined #ruby
bpgoldsb has joined #ruby
SilkFox has quit [Ping timeout: 240 seconds]
<eam>
ah great, thanks
kevkev__ has quit [Ping timeout: 245 seconds]
<eam>
zenspider: have a patch for NaN handling in mod
Rollabunna has quit [Ping timeout: 245 seconds]
AlexBlom has joined #ruby
amystephen has quit [Quit: amystephen]
Hobogrammer_ has joined #ruby
alphabet has joined #ruby
pskrz_ has joined #ruby
tenseiten has joined #ruby
Xiti` has joined #ruby
Kricir_ has joined #ruby
parduse has quit [Killed (sinisalo.freenode.net (Nickname regained by services))]
parduse has joined #ruby
tkuchiki_ has joined #ruby
parduse is now known as Guest23013
x1337807_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
njection_ has quit []
Vile` has quit [Remote host closed the connection]
wwalker_ has joined #ruby
nairys_ has joined #ruby
jzigmund_ has joined #ruby
elaptics` has joined #ruby
kies^ has joined #ruby
wallerdev has quit [Quit: wallerdev]
jonathanwallace_ has joined #ruby
mgorbach_ has joined #ruby
Hobogrammer has quit [Read error: Connection reset by peer]
seitensei has quit [Read error: Connection reset by peer]
Kricir has quit [Read error: Connection reset by peer]
<raul782>
yeah the release folder is where my app is stored and current is a symlimk pointing to the release folder, thanks willtake a look
momomomomo has quit [Quit: momomomomo]
ssvo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
britneywright has joined #ruby
MatthewsFace has joined #ruby
saarinen has quit [Read error: Connection reset by peer]
anaeem1__ has joined #ruby
saarinen has joined #ruby
matled has quit [Remote host closed the connection]
matled has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
<raul782>
now if I want to run this ln -nfs shared/vendor vendor
<raul782>
is there a ruby command
<raul782>
looks like symlink function doesn't have options to modify the type of link
eka has joined #ruby
Dr3amc0d3r|away has quit [Ping timeout: 260 seconds]
anaeem1__ has quit [Ping timeout: 245 seconds]
ner0x has joined #ruby
polyidus has quit [Quit: EOF]
maletor has quit [Quit: Computer has gone to sleep.]
<eam>
zenspider: yes, that's why I haven't sent a PR yet -- I am noticing there aren't any at all for these operators unless I'm missing something
anaeem1 has joined #ruby
<eam>
oh, or they're under ruby/
asdasdasdasss has joined #ruby
lw has quit [Quit: s]
<sjouke>
raul782: you could always shell with system "<command here>"
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sjouke>
`system "pwd"` e.g.
<sjouke>
i don't know if this is the best way of doing things, i'm a noob
<eam>
raul782: what do you mean by "type" of link?
<raul782>
ln -nfs
<eam>
raul782: you mean symlink() vs link()? the -s flag?
<eam>
the other two flags aren't related to any kind of type behavior
<raul782>
I guess I meant options
britneywright has joined #ruby
awc737 has quit [Read error: Connection reset by peer]
<eam>
-f is "unlink if exists" so you can prefix it with File.unlink(file) rescue true
asdasdasdasss has quit [Ping timeout: 272 seconds]
mr_snowf1ake has joined #ruby
anaeem1 has quit [Ping timeout: 264 seconds]
awc737 has joined #ruby
<eam>
you don't need to worry about -n
awc737 has quit [Max SendQ exceeded]
maestrojed has quit [Quit: Computer has gone to sleep.]
renier has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Dr3amc0d3r|away has joined #ruby
Kricir has quit [Remote host closed the connection]
<raul782>
Ic, that's how capistrano does it when deploying an application when symlinking a vendors library
binaryhat_ has quit [Quit: Leaving]
binaryhat has joined #ruby
<eam>
with ln -nsf you mean? yeah. The -n means something to the ln command but it's not necessary when you call symlink() directly
lw has joined #ruby
ixti has quit [Ping timeout: 256 seconds]
<raul782>
yeah, got it I will test that and see how it goes
kevkev__ has joined #ruby
momomomomo has joined #ruby
TorpedoSkyline has joined #ruby
agarie has joined #ruby
mleone has joined #ruby
teddyp1cker has joined #ruby
lw has quit [Read error: Connection reset by peer]
lw has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
kevkev__ has quit [Ping timeout: 260 seconds]
teddyp1cker has quit [Ping timeout: 250 seconds]
dawkirst has joined #ruby
anaeem1_ has joined #ruby
sjouke has quit [Quit: leaving]
nateberkopec has joined #ruby
narcan has joined #ruby
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tjr9898_ has joined #ruby
tjr9898 has quit [Read error: Connection reset by peer]
hamakn has quit [Read error: Connection reset by peer]
hamakn_ has joined #ruby
sevenseacat has quit [Ping timeout: 240 seconds]
lkjelo has joined #ruby
rkstarnerd has quit [Ping timeout: 264 seconds]
ReBoRN- has quit [Ping timeout: 240 seconds]
sevenseacat has joined #ruby
<lkjelo>
Hi all. I am itterating through a string and using collect method to collect all the elements that are not whitespaces after some operation on them
Lemur has quit [Ping timeout: 256 seconds]
ReBoRN- has joined #ruby
Nahra` has joined #ruby
<lkjelo>
How do I write it so that it doesn't enter the element into array for whitespaces
Mikalv has quit [Ping timeout: 245 seconds]
lw has quit [Ping timeout: 240 seconds]
rs0 has quit [Ping timeout: 240 seconds]
akosednar has quit [Ping timeout: 245 seconds]
snapcase has quit [Ping timeout: 245 seconds]
Nahra has quit [Ping timeout: 240 seconds]
bstrie has quit [Ping timeout: 240 seconds]
beef-wellington has quit [Ping timeout: 256 seconds]
<eam>
I think (divmod does - docs for remainder refer to divmod behavior)
jshultz has quit [Quit: Connection closed for inactivity]
narcan has joined #ruby
queequeg1 has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
dyreshark has quit [Quit: I just dont know what went wrong!]
<lkjelo>
eam: the idea was if I was working with a large file of text than using gsub once and then again looping through the characters would be costly?
tatsuya_o has joined #ruby
<lkjelo>
so I want to loop just once and check all the characters
<eam>
lkjelo: benchmark it, but the gsub version should be quite faster
<eam>
both make a single pass, but split makes a copy in a very inefficient manner
SilkFox has joined #ruby
<lkjelo>
eam: suppose I work with 8KB data at a time
<eam>
if you have a large file you probably want to -- yes
<eam>
read it in records
<eam>
lkjelo: is it text with newlines?
jonr22 has joined #ruby
<lkjelo>
probably yeah
<eam>
ruby -pi -e'$_.gsub!(/./) {|c| c.next if c != " "}' *.txt
narcan has quit [Ping timeout: 240 seconds]
<eam>
full program
mikepack has joined #ruby
tatsuya_o has quit [Ping timeout: 255 seconds]
<eam>
I don't think ruby retains the ability to set $/ to a record size in bytes, otherwise you could set it to 8k and it'll work without newlines
dyreshark has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lkjelo>
eam: hmm I was just thinking if I go do a gsub on whole text then suppose it has half number of punctuations, spaces and then it end up in half of file with chars from a-z. Then I will have to go through O(n*n/2)
SilkFox has quit [Ping timeout: 245 seconds]
<eam>
lkjelo: say again?
kireevco has quit [Quit: Leaving.]
<eam>
all these different approaches have the same cost regardless of the characters in the input
<eam>
should all be o(n)
cnj has quit [Ping timeout: 240 seconds]
<eam>
or 2n, but none n^2
charliesome has joined #ruby
GriffinHeart has joined #ruby
bridge_ has quit [Ping timeout: 245 seconds]
mikepack has quit [Remote host closed the connection]
arup_r has joined #ruby
cnj has joined #ruby
mikepack has joined #ruby
lkjelo has quit [Ping timeout: 246 seconds]
mikepack has quit [Read error: Connection reset by peer]
ValicekB has joined #ruby
mikepack has joined #ruby
SilkFox has joined #ruby
jonr22 has quit [Quit: leaving]
agarie has quit [Remote host closed the connection]
phinfone_ has quit []
SilkFox has quit [Ping timeout: 256 seconds]
ner0x has quit [Quit: Leaving]
vsoftoiletpaper has quit []
Vivekananda_y510 has quit [Quit: Leaving]
mleone has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beef-wellington has joined #ruby
Gooder has quit [Remote host closed the connection]
beef-wellington has quit [Ping timeout: 240 seconds]
theharshest has quit [Quit: This computer has gone to sleep]
timonv_ has quit [Ping timeout: 255 seconds]
krz has joined #ruby
iamjarvo has joined #ruby
GriffinH_ has quit [Remote host closed the connection]
kevkev__ has joined #ruby
justinv has joined #ruby
GriffinH_ has joined #ruby
snapcase has quit [*.net *.split]
Mikalv has quit [*.net *.split]
mr_snowf1ake has quit [*.net *.split]
nevans has quit [*.net *.split]
Trynemjoel has quit [*.net *.split]
idoru has quit [*.net *.split]
GriffinHeart has quit [*.net *.split]
seitensei has quit [*.net *.split]
MatthewsFace has quit [*.net *.split]
Channel6 has quit [*.net *.split]
ylluminate has quit [*.net *.split]
pontiki has quit [*.net *.split]
MatthewsFace has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rollabunna has joined #ruby
kevkev__ has quit [Ping timeout: 240 seconds]
GlenK has quit []
lkjelo has joined #ruby
<lkjelo>
eam: sorry connection failure
<lkjelo>
I did not get anything if you replied after my n-3 statement
momomomomo has quit [Quit: momomomomo]
nanoyak has quit [Quit: Computer has gone to sleep.]
alvaro_o has quit [Quit: Ex-Chat]
razum2um has joined #ruby
cibs has quit [Ping timeout: 252 seconds]
nateberkopec has joined #ruby
vsoftoiletpaper has joined #ruby
mspah_ has joined #ruby
<eam>
lkjelo: I didn't see it
Channel6 has joined #ruby
mr_snowf1ake has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ltd has quit [Ping timeout: 256 seconds]
Rollabunna has quit [Ping timeout: 240 seconds]
cibs has joined #ruby
<lkjelo>
eam: I was saying suppose we have a large file that has n characters and there are only 3 whitespaces, then gsub would take O(n) to check all of them because it would be a linear process. Then the size decreses to n-3 on which I will do the operation
nevans has joined #ruby
tatsuya_o has joined #ruby
<lkjelo>
so it is O(n^2) which would be a bottleneck
ltd has joined #ruby
jackjackdrpr has quit [Quit: Leaving.]
mleone has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lkjelo>
not n2 but still two passes
agrinb has quit [Remote host closed the connection]
idoru has joined #ruby
Derander has quit [Excess Flood]
nateberkopec has quit [Ping timeout: 240 seconds]
iamjarvo has joined #ruby
jamto11 has quit [Remote host closed the connection]
nilobject has joined #ruby
maletor has joined #ruby
oo_ has quit [Remote host closed the connection]
<eam>
lkjelo: you're replacing all characters though, right? aren't you removing whitespace, and incrementing every other character?
oo_ has joined #ruby
<eam>
lkjelo: in any event, the gsub I gave you makes one pass. On each character, it either omits it if ' ', or replaces it with the subsequent character
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Pharaoh2 has joined #ruby
RioS2 has quit [Remote host closed the connection]
whyy has joined #ruby
OffTheRails has joined #ruby
apeiros has quit [Remote host closed the connection]
mr_snowf1ake has quit [Quit: Leaving]
apeiros has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
kireevco has joined #ruby
SilkFox has joined #ruby
duncannz has joined #ruby
kireevco has quit [Client Quit]
mikepack has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
chipotle has quit [Quit: cya]
agrinb has joined #ruby
mallu has joined #ruby
SilkFox has quit [Ping timeout: 260 seconds]
advorak has joined #ruby
<mallu>
hi, I want to compare dates. The date I want to compare is in this format. Can you tell me how I can generate this date/time format in Ruby and compare? StartTime": "2014-08-01T04:05:12.000Z"
relix has joined #ruby
<advorak>
mallu: pull up the documentation for this: ri DateTime.strptime
mary5030 has quit [Ping timeout: 264 seconds]
<advorak>
also: ri DateTime.strftime
<mallu>
ok thanks
arya_ has quit [Ping timeout: 272 seconds]
<advorak>
it gives you an example matching your specifications exactly.
dseitz has joined #ruby
NukePuppy has joined #ruby
asdasdasdasss has joined #ruby
yfeldblu_ has joined #ruby
PanPan has joined #ruby
axsuul has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
mike32 has joined #ruby
<OffTheRails>
any opensource/non-profit projects in Ruby land that will get me experience in working in a distributed team, on high traffic applications?
harryk has quit [Ping timeout: 255 seconds]
<mallu>
advorak: how do you compare them? WHat I want to do is compare and if older than 2 days then do something
<OffTheRails>
I'm a contractor and primarily build startups for clients, which inevitably fail, so I don't have to deal with different departments, scaling issues, etc.
<mallu>
or just split them and compare?
<OffTheRails>
starting to think maybe getting a J.O.B is only way to get this experience?
yfeldblu_ has quit [Ping timeout: 240 seconds]
asdasdasdasss has quit [Ping timeout: 272 seconds]
<ericwood>
OffTheRails: yeah that sounds more like a J.O.B thing
<bricker`LA>
this Yosemite is too damn bright
<bricker`LA>
there's no contrast, I can't see anything
nanoyak has joined #ruby
<mallu>
irb is ok.. is there anything better than irb? if I make a mistake on one of the 4 lines I have in a method I have to do all of them again
<mallu>
pry is also same
<ericwood>
pry
<ericwood>
pryprypry
<ericwood>
what you're talking about is just an inherent problem with a REPL, though
<ericwood>
just save it as a file and keep running it
Cache_Money has joined #ruby
kevkev__ has joined #ruby
Channel6 has quit [Quit: Leaving]
<mallu>
yeah.. I can do that but whishing some console type
<mallu>
where I can copy pate
<ericwood>
you should build it
<mallu>
I'm a newbie
<mallu>
in ruby
GriffinH_ has quit [Remote host closed the connection]
<ericwood>
unfortunately no such tool exists but I think you'll find a happy medium between working with files and working in the REPL!
d4nk has quit [Read error: Connection reset by peer]
d4nk has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
mary5030 has joined #ruby
jtreminio has joined #ruby
nilobject has quit [Quit: nilobject]
oo_ has joined #ruby
kevkev__ has quit [Ping timeout: 240 seconds]
<jtreminio>
Hi all. What's the "proper" way of running a ruby app accessible via the web? PHP has PHP-FPM which opens a port and accepts requests from either nginx or apache. Does Ruby have something similar?
mikepack has quit [Remote host closed the connection]
<Renich>
I'd love to have s[:some_key]
apeiros has quit [Ping timeout: 272 seconds]
<Renich>
but I am getting this instead: #<Mailbosa::Settings:0x00000001006080>
mikepack has joined #ruby
<ericwood>
jtreminio: check out rack, and if you want a more framework-esque thing there's sinatra and rails
crazydiamond has joined #ruby
theharshest has joined #ruby
nateberkopec has joined #ruby
mary5030 has quit [Remote host closed the connection]
<OffTheRails>
Renich, though it is a bit sketchy, you could implement a def [] method..
mary5030 has joined #ruby
duncan has joined #ruby
<Renich>
OffTheRails: I am sorry, I don't quite understand...
ra4king has joined #ruby
<Renich>
I know I can def [] but what do I put in it?
duncannz has quit [Killed (hobana.freenode.net (Nickname regained by services))]
duncan is now known as duncannz
<jtreminio>
ericwood: I am not very familiar with the ruby ecosystem. Do apps like rails also double as webservers or do they require another process manager to pass along requests?
<bricker`LA>
Renich: new() returns the instance by default. To change this, you'd have to override you class's 'new' method, but that's not recommended (it breaks a pretty fundamental assumption of other ruby developers)
Guest65447 has joined #ruby
<sevenseacat>
just delegate [] to whatever you read from the yaml?
<ericwood>
jtreminio: rails and friends use rack to communicate with web servers, however they have a built-in one for debugging (webbrick, iirc)
bluOxigen has joined #ruby
<sevenseacat>
webrick yeah
<Renich>
bricker`LA: oh, ok.
<ericwood>
jtreminio: there is a cgi library although I don't know if it's part of the stdlib anymore
ARCADIVS has joined #ruby
<ericwood>
jtreminio: rack is a piece of middleware that sits between the long-running application and the web server, though
SegFaultAX has quit [Excess Flood]
<ericwood>
every major web server you can think of will support it
<jtreminio>
Sounds like php-fpm, except ruby apps are long-lived and php are per-request, I guess.
<jtreminio>
Does rack accept requests from apache/nginx via proxypass?
<ericwood>
jtreminio: ruby apps are whatever you want them to be :)
<Renich>
OffTheRails: ok
<ericwood>
jtreminio: what's the background on what you're trying to accomplish?
oo_ has quit [Ping timeout: 260 seconds]
<jtreminio>
ericwood: I have this app (www.puphpet.com) to allow developers to spin up environments. Right now I have support for PHP apps using php-fpm. I want to add support for ruby apps
mikepack has quit [Ping timeout: 272 seconds]
SegFaultAX has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
justinv has joined #ruby
<ericwood>
jtreminio: ah okay, rack is totally the direction you want to go then, any ruby web app will want to speak with it anyways
<jtreminio>
huzzah
mary5030 has quit [Ping timeout: 264 seconds]
<ericwood>
jtreminio: but outside of that it's not my forte :)
<Renich>
OffTheRails: sevenseacat: thanks for the recommendation and link
<advorak>
mallu, You can compare them using standard <, >, == ...
toretore has joined #ruby
justinv has quit [Remote host closed the connection]
<mallu>
oh really!
<mallu>
thanks
Guest85513 has quit [Read error: Connection reset by peer]
<ericwood>
jtreminio: I'm leaving but I'm sure someone here can help more, and there's also #rubyonrails which will have more rack people
mostlybadfly has quit [Quit: Connection closed for inactivity]
roolo has quit [Read error: Connection reset by peer]
mailo has joined #ruby
bidigo has joined #ruby
michaelchum has quit [Quit: Connection closed for inactivity]
Gonzih has joined #ruby
DarkFoxDK has quit [Read error: Connection reset by peer]
alexju has joined #ruby
Advocation has quit [Quit: Advocation]
lkba has quit [Ping timeout: 245 seconds]
bidigo has quit [Read error: Connection reset by peer]
<krisquigley>
If I have a variable i.e. str = string # This string is 300mb large. And I want to clear it from memory. Would setting str = nil do just that?
chipotle has joined #ruby
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
<tobiasvl>
not instantaneously
DarkFoxDK has joined #ruby
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
<tobiasvl>
ruby will garbage collect it after a while
<krisquigley>
tobiasvl: but within that ruby instance. Say the script took 15mins to run, it would clear it within that thread?
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
<havenwood>
krisquigley: i like str.clear
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
heftig has joined #ruby
zequix has joined #ruby
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
<krisquigley>
havenwood: is clear better than setting it to nil?
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
tesaf has joined #ruby
<krisquigley>
I see in the docs it just makes a string empty
SegFaultAX has quit [Excess Flood]
<krisquigley>
i.e. = ""
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
InfraRuby has joined #ruby
SegFaultAX has joined #ruby
<tobiasvl>
krisquigley: if you need to force garbage collection of str, GC.start
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
<krisquigley>
tobiasvl: oooo, I like that
<tobiasvl>
you probably shouldn't have to do it manually, and even if you do it's not guaranteed to be instantaneous either
bidigo has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
timonv_ has joined #ruby
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
<Bish>
hey RubyVolks! I have a question regarding threads... i have a consumer which simply prints a hash list ( MainThread ) every 5 seconds, and a producer.. which puts stuff into the hashmap all the time
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
<Bish>
the hash is a global variable and i synchronize access with Mutex.synchronize
chth0n has joined #ruby
<Bish>
wow, while explaining the problem.. i found the issue.. nevermind
<sevenseacat>
:D
sevenseacat has quit [Quit: Leaving.]
bidigo has joined #ruby
bidigo has quit [Read error: Connection reset by peer]
bidigo has joined #ruby
banister has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
alexju_ has joined #ruby
abuzze has joined #ruby
alexju has quit [Ping timeout: 245 seconds]
sinkensabe has joined #ruby
patrick99e99 has joined #ruby
abuzze has quit [Ping timeout: 240 seconds]
Vivekananda_y510 has joined #ruby
alexju_ has quit [Ping timeout: 250 seconds]
relix_ has joined #ruby
relix has quit [Ping timeout: 256 seconds]
noop has joined #ruby
patrick99e99 has quit [Ping timeout: 250 seconds]
<wasamasa>
Bish: happens surprisingly often
teddyp1cker has joined #ruby
kaiwren has quit [Quit: kaiwren]
Gonzih has quit [Ping timeout: 240 seconds]
chipotle has quit [Quit: cya]
GriffinHeart has quit [Remote host closed the connection]
teddyp1cker has quit [Ping timeout: 260 seconds]
<Bish>
how good is threading in ruby anyways?
<mike32>
hi, how can i debug ruby script?
<mike32>
what tools are the best
<ari-_-e>
mike32: puts
<Bish>
mike32, run scripts with irb, if you place a variable without any function it woulld output it
<ari-_-e>
mike32: what version of ruby?
raul782 has left #ruby [#ruby]
<mike32>
2.1
<havenwood>
mike32: pry with byebug
<ari-_-e>
ok, if you need a full-fledged debugger, then yeah you can use byebug
gauravagarwalr has quit [Remote host closed the connection]
<Nowaker>
or just rubymine ide
gauravagarwalr has joined #ruby
spider-mario has joined #ruby
lethan has joined #ruby
lethan has left #ruby [#ruby]
<Nowaker>
Bish: good, since i run a threaded webrick to serve a rails app in production.
tkuchiki has joined #ruby
<Bish>
but it's like in python, where 2 threas cant run on multiple cores
<workmad3>
Bish: MRI has a global interpreter lock that prevents more than 1 active thread at a time
abuzze has joined #ruby
<workmad3>
Bish: but other than that, they're native threads (so can make use of multi-core)... but most advantageous if you have an IO-bound app
<Bish>
that sounds like javascript worker :D
Macaveli has joined #ruby
fphilipe has joined #ruby
<workmad3>
Bish: you can also use jruby or rubinius which have no GIL
gauravagarwalr has quit [Ping timeout: 272 seconds]
<Bish>
well.. so.. if i have threads they will work on multiple cores?
Gonzih has joined #ruby
<workmad3>
Bish: they'll be distributable across multiple cores... but that doesn't stop the GIL from preventing more than 1 of them being active at once ;)
GriffinHeart has joined #ruby
<ddv>
jruby is great for concurrency
tkuchiki_ has quit [Ping timeout: 255 seconds]
OffTheRails has quit [Quit: Leaving]
<Bish>
but i hate java
<havenwood>
<3 JRuby
hackeron has quit [Ping timeout: 255 seconds]
<workmad3>
Bish: jruby != java
<workmad3>
Bish: it's just ruby running on the JVM
<ddv>
Bish: jruby is awesome
<havenwood>
Bish: Like CRuby isn't C.
noop has quit [Ping timeout: 245 seconds]
<workmad3>
Bish: and many people love the JVM while hating Java ;)
fphilipe has quit [Client Quit]
<ddv>
Bish: you could use cool java profiling tools to profile your ruby app
<Bish>
wookiehangover, i know i know.
<Bish>
but as long as j in jXXXXX stands for java, i will hate it
arup_r has quit [Remote host closed the connection]
<workmad3>
Bish: somewhat irrational
<Bish>
just like the unwillingness to drink piss
<Bish>
do you drink piss
<havenwood>
Bish: more like not drinking water, because you heard there's water in piss
<Nowaker>
workmad3: is rubinius a drop in replacement for mri? i mean, will 95% projects work on rubinius without any changes?
<havenwood>
Bish: JRuby is lovely.
abuzze has quit [Remote host closed the connection]
whyy has quit [Read error: Connection reset by peer]
<havenwood>
Bish: anyways, the J stands for Joy :P
creede has quit [Ping timeout: 255 seconds]
anaeem1 has joined #ruby
asdasdasdasss has joined #ruby
<havenwood>
Bish: and it's pronounced "yay"
arup_r has joined #ruby
whyy has joined #ruby
<Bish>
python does that global lock stuff too, right?
developer has joined #ruby
<mozzarella>
Bish: right
atmosx_ has joined #ruby
<workmad3>
Nowaker: supposedly... not really tried it myself recently
lala has joined #ruby
lala has left #ruby [#ruby]
atmosx has quit [Ping timeout: 264 seconds]
<Bish>
is the alternative to that so awful?
abuzze has joined #ruby
<mozzarella>
just harder to implement correctly I think
St_Marx has quit [Ping timeout: 264 seconds]
<havenwood>
Bish: Ruby could drop the GVL right now, but a lot of C code that relies on it would then fail when Threaded.
dumdedum has quit [Read error: Connection reset by peer]
<Bish>
C code like, extensions?
<havenwood>
Bish: So they're waiting until a high level concurrency construct like Actors are in place, so they can just say don't thread.
asdasdasdasss has quit [Ping timeout: 272 seconds]
<havenwood>
Bish: Matz is "not a threading guy."
<workmad3>
Bish: I think some core ruby isn't known to be thread-safe at the moment too
<Bish>
hm, Actors? never heard of it
<Bish>
so Matz wants that none uses threaads?
<workmad3>
can't say I blame him tbh...
<workmad3>
processes ftw!
<havenwood>
Bish: Checkout Ruby's most popular Actor library, Celluloid: http://celluloid.io/
alexju has joined #ruby
<Bish>
well how do you win from the fact the you have multiple cores?
<havenwood>
Bish: Though Celluloid prefers to call em Cells not Actors, which I like.
<workmad3>
'threads... because globally shared mutable state is always such a win for concurrency'
speakingcode has joined #ruby
<workmad3>
Bish: processes can be more easily distributed across cores than threads
<havenwood>
Bish: Share by communicating rather than sharing state.
<ptrrr>
Bish: and processes are so easy in ruby! fork {doodaah} , IO.pipe and Marshal for communication
<workmad3>
ptrrr: not to mention cheap on a *nix :)
<havenwood>
cow ftw
<ptrrr>
workmad3: indeed. why anyone would mess with threads is beyond me
<ptrrr>
:)
<workmad3>
ptrrr: because windows
<ptrrr>
oh
asdasdasdasss has joined #ruby
<workmad3>
ptrrr: heavyweight processes that are expensive to create in a primarily GUI environment built on top of an OS that doesn't do multi-programming
katlogic has quit [Read error: Connection reset by peer]
<workmad3>
ptrrr: hell, half the problems with windows security used to come from threading... it ran the GUI threads in kernel-space for efficiency!
Rollabunna has joined #ruby
<ptrrr>
why would you run *that* on a server? :)
<workmad3>
ptrrr: because marketting? :)
<ptrrr>
haha. that sounds secure and all.
<workmad3>
ptrrr: sure... any program that creates a window gets privilege escalation! awesome!
joonty has quit [Ping timeout: 250 seconds]
krz has quit [Quit: WeeChat 0.4.3]
creede has joined #ruby
timonv_ has quit [Remote host closed the connection]
GriffinHeart has quit [Remote host closed the connection]
jose55 has joined #ruby
<ptrrr>
I wonder if you can ask Ruby not to GC memory in a child process that was initially allocated in the parent
InfraRuby has left #ruby [#ruby]
asdasdasdasss has quit [Ping timeout: 272 seconds]
noeden has joined #ruby
joonty has joined #ruby
Rollabunna has quit [Ping timeout: 240 seconds]
katlogic has joined #ruby
St_Marx has joined #ruby
gauravagarwalr has joined #ruby
<noeden>
Hi there, I am very new to ruby. I would like to write a command line application in ruby and would like to have configuration files in a folder. Each file should contain the configuration of a host. How is the ruby way to define the address and the name of the host in the file for this host, and instantiate a host object in my application from this file. Is it possible to 'outsource' the construction of the model
<ptrrr>
then you can have methods in Host that you call from the configuration file
<ptrrr>
it’ll be awesome
SegFaultAX has quit [Excess Flood]
CaveJohnson has quit [Ping timeout: 250 seconds]
<noeden>
yay, I like the ruby syntax so much!
<ptrrr>
:)
<noeden>
thats 100% what I searched for, thanks a lot!
<workmad3>
noeden: you could also have an API that expose a 'Host.create' method that takes a config block
godd2 has joined #ruby
<workmad3>
noeden: then in your files you just wrap your config in 'Host.create("hostname") do <config> end'
Zackio has joined #ruby
<noeden>
ok
jose55 has quit [Quit: Leaving]
<noeden>
that is the problem with ruby
<noeden>
:D
sinkensa_ has joined #ruby
<noeden>
You have to think which solution is nicer :D
alex88_ has joined #ruby
<workmad3>
noeden: I tend to shy away from solutions that involve reading an arbitrary file and instance_evalling it ;)
SegFaultAX has joined #ruby
<noeden>
yes it is not restrictive enough
<ddv>
use a yaml file or something
nateberkopec has joined #ruby
<workmad3>
(I know, the files aren't really arbitrary in this case, but still... I prefer to use load/require to bring up the file rather than roll my own code-loading)
<noeden>
ddv: yaml file seems to restrictive for me, but thanks
Morkel has quit [Quit: Morkel]
GriffinHeart has joined #ruby
<noeden>
ok, thanks lets give this solution a try
chth0n has quit [Ping timeout: 255 seconds]
<zenspider>
noeden: I'd recommend using yaml or json and stay away from instance_eval. bad suggestion.
vdmgolub has joined #ruby
ua has quit [Quit: Leaving]
rdark has joined #ruby
mocchi_ has joined #ruby
<havenwood>
noeden: Marshal, JSON, YAML, MsgPack, pick your poison!
arup_r_ has joined #ruby
<havenwood>
noeden: Can even be fancy and use transactions with PStore for Marshal or YAML::Store for YAML. :P
timonv_ has joined #ruby
narcan has joined #ruby
<ptrrr>
instance_eval can make it harder to understand error messages also
<ptrrr>
they might not make sense for the guy writing the configuration
<noeden>
I am away from the instance_eval. But I think the create API is a good idea
developer_ has joined #ruby
<zenspider>
do you want configuration files or arbitrary code execution?
szuletett has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
<ari-_-e>
more like instance_evil amirite?
<noeden>
I want a flexible way to configure my hosts and the possibility to execute some functions in my configuration to get dynamic values
<noeden>
like the current time + 2 days or something else
oo_ has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
<noeden>
so a restrictive api but code execution seems to be my choice :) thanks!
developer has quit [*.net *.split]
sinkensabe has quit [*.net *.split]
cylofe has quit [*.net *.split]
alex88 has quit [*.net *.split]
memph1s has quit [*.net *.split]
tkuchiki has joined #ruby
* ptrrr
would just go for instance_eval in that case
arup_r has quit [*.net *.split]
jackneill has quit [*.net *.split]
gypsydave5 has quit [*.net *.split]
Shidash has quit [*.net *.split]
mocchi has quit [*.net *.split]
Mikalv has quit [*.net *.split]
Trynemjoel has quit [*.net *.split]
snapcase has quit [*.net *.split]
obs has quit [Remote host closed the connection]
<ptrrr>
noeden: if you want to improve safety you can set $SAFE
<havenwood>
>.>
oo_ has joined #ruby
jackneill has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
szuletett has quit [Quit: Leaving]
gypsydave5 has joined #ruby
<ptrrr>
and sandbox it with fork. maybe chroot and a timeout as well. *_*
Trynemjoel has joined #ruby
Deele has joined #ruby
cylofe has joined #ruby
blueOxigen has joined #ruby
<krisquigley>
I'm having such a headache with devise and cancancan
Trynemjoel has quit [*.net *.split]
rdark has quit [Quit: leaving]
tatsuya_o has quit []
chth0n has joined #ruby
Azure has quit [Read error: Connection reset by peer]
rdark has joined #ruby
<zenspider>
horrible suggestions for someone "very new to ruby"
Soilent__ has quit [Quit: Lost terminal]
bluOxigen has quit [Ping timeout: 255 seconds]
iteratorP has quit [Remote host closed the connection]
hackeron has joined #ruby
<krisquigley>
Trying to have only admin users create user accounts, but getting 'uninitialized constant Registration' When adding 'load_and_authorize_resource' to the registrations_controller
<ptrrr>
zenspider: yeah, it was a bit tounge in cheek
dumdedum has joined #ruby
<zenspider>
do THEY know that?
nateberkopec has joined #ruby
axl_ has joined #ruby
Trynemjoel has joined #ruby
Shidash has joined #ruby
<ptrrr>
I hope’d my smilie would be enough!
<ptrrr>
hoped*
<ptrrr>
too much coffee I’m afraid
Atttwww has quit [Ping timeout: 256 seconds]
<zenspider>
noeden: I highly recommend yaml until you get more familiar with ruby and its foibles
<zenspider>
you don't need arbitrary code execution at this point.
<zenspider>
your configuration "api" can simply be what keys the user is able to put in the yaml
<zenspider>
Time.now + 2 days can be as simple as: expire_days: 2
kaspergrubbe_ has quit []
<zenspider>
(or whatever it's for)
Mikalv has joined #ruby
phoo1234567 has joined #ruby
axl_ has quit [Client Quit]
<zenspider>
you've been warned
<zenspider>
that said, I'm going to bed
arup_r_ has quit [Remote host closed the connection]
* krisquigley
thinks it's coffee time
<ptrrr>
it’s always coffee time!!
<krisquigley>
lol
kaspergrubbe_ has joined #ruby
<krisquigley>
Anyone have experience with devise and cancan?
Azure has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
mailo has quit [Quit: Leaving...]
Advocation has joined #ruby
arup_r has joined #ruby
havenwood has quit []
aagdbl has joined #ruby
<gauravagarwalr>
@krisquigley what kind of query do you have?
beef-wellington has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
DrCode has quit [Remote host closed the connection]
<krisquigley>
I am trying to restrict the signup page to admin users only
mostlybadfly has joined #ruby
<krisquigley>
I have extended the registrationController and added load_and_authorize_resource
<workmad3>
krisquigley: I'd suggest ignoring the devise registrations controller for that use-case
axl_ has joined #ruby
Joulse has quit [Quit: Joulse]
<workmad3>
krisquigley: and have your own controller restricted to admins for creating users... then remove the 'registerable' strategy from your devise users ;)
<krisquigley>
ahha
<krisquigley>
Yes! THanks workmad3
banister has joined #ruby
<workmad3>
krisquigley: also, I like using devise_invitable for that purpose
axl_ has quit [Client Quit]
dangerousdave has joined #ruby
<workmad3>
krisquigley: so an admin doesn't create the entire user... they add the email address (and possibly name, etc.) but not the password... instead that triggers an invite email to the user with a link for them to set their own password
<krisquigley>
Sounds good
<krisquigley>
I'll look into the docs
<workmad3>
krisquigley: I get disturbed by admins that send me an email saying 'your account is created... the password is 'change_me_quick' ' :)
<Edelwin>
hmmmm when I'm creating a user account, I set it to "lol" and tell the person "if anyone breaks into your account, I close it."
PanPan has quit [Quit: ChatZilla 0.9.90.1 [Firefox 31.0/20140716183446]]
brianherman has joined #ruby
bpgoldsb has quit [Read error: Connection reset by peer]
bpgoldsb|too has joined #ruby
<workmad3>
Edelwin: heh
<Edelwin>
(oh yes, by the way, I'm a BOFH :p)
<workmad3>
Edelwin: let me guess... you'll only close the account on receipt of a death certificate?
Royalb15 has joined #ruby
abuzze has quit [Remote host closed the connection]
<krisquigley>
workmad3: I'm struggling to find in the documentation where I can disable devise registration controller
hackeron has quit [Ping timeout: 255 seconds]
tjr9898_ has quit [Remote host closed the connection]
<workmad3>
krisquigley: in your User model, there's the line 'devise <symbols>'
<workmad3>
krisquigley: the symbols are the strategies in use... one of them is :registerable
<workmad3>
krisquigley: pull that out
<workmad3>
krisquigley: and voila, your users can no longer self-register :)
GriffinHeart has joined #ruby
<krisquigley>
found it. Thanks a lot workmad3
<Edelwin>
workmad3: no, it would be a security breach. in fact I don't wait the death certificate to close the account. And on UNIX-like systems it costs nothing, because it just means to forbid the connection to a username. the datas are still here
<Bish>
how would one have a tuple as a key in a hashmap
<Bish>
something like (peter,3) => 5
<workmad3>
Edelwin: aww... I was implying that if someone broke into an account, you'd go electrocute the account owner to get the death cert and close it... ;)
GriffinHeart has quit [Remote host closed the connection]
K3dare has joined #ruby
GriffinHeart has joined #ruby
sigurding has quit [Quit: sigurding]
brianherman has quit [Quit: Leaving]
fly2web has joined #ruby
<fly2web>
is it possible to send message to some phone by python code
<fly2web>
is it possible to send message to some phone by ruby code
<fly2web>
:)
whyy has joined #ruby
K3dare is now known as Kedare
Kedare is now known as Guest35256
Guest35256 has left #ruby [#ruby]
heftig has quit [Ping timeout: 255 seconds]
InfraRuby has joined #ruby
<wasamasa>
only ruby can help you with that task
DaniG2k has joined #ruby
<fly2web>
oh
<fly2web>
really? how?
<fly2web>
wasamasa:
yfeldblu_ has quit [Remote host closed the connection]
<kaspergrubbe_>
let the daily trolling of fly2web begin
Hobogrammer_ has quit [Ping timeout: 255 seconds]
arup_r_ has quit []
<wasamasa>
oh damn, I still get highlights from ignored people
* wasamasa
hacks a bit more on his irc client
arup_r has joined #ruby
krisquig_ has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
krisquigley has quit [Quit: WeeChat 0.4.3]
<wasamasa>
also, I obviously meant gaussblurinc1
krisquig_ is now known as krisquigley
<fly2web>
oh my god, i m not troller.
Gonzih has quit [Quit: IRC is just multiplayer vim.]
Gonzih has joined #ruby
<fly2web>
i just want to know the way of sending message to phone.
<wasamasa>
you want lots of things
<wasamasa>
you say you know a lot
<GlenK>
nobody likes phones
<tobiasvl>
fly2web: google "twilio" maybe
<wasamasa>
yet you aren't capable of using a search engine
<wasamasa>
clearly a troll
<tobiasvl>
fly2web: "sms ruby" on google gave lots of hits
<ddv>
he wants to hack a bank.....
<GlenK>
who doesn't want to hack a bank?
<wasamasa>
me
<GlenK>
gay
<fly2web>
nice GlenK
mikepack has joined #ruby
<Hanmac>
fly2web: for sample i dont know if you can make it generic for both apple and google phones
heftig has joined #ruby
<fly2web>
thanks Hanmac
anarang has quit [Quit: Leaving]
Advocation has joined #ruby
anarang has joined #ruby
<GlenK>
wasamasa: it's only pennies michael. fractions of pennies.
o0oo0o has quit [Remote host closed the connection]
<tobiasvl>
LOOK AT BANNER, MICHAEL
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
o0oo0o has joined #ruby
mehlah has quit [Quit: Leaving...]
_tpavel has quit [Ping timeout: 250 seconds]
whyy has quit [Remote host closed the connection]
Advocation has quit [Client Quit]
mikepack has quit [Ping timeout: 240 seconds]
nuck has quit [Read error: Connection reset by peer]
duncannz has quit [Ping timeout: 240 seconds]
Guest65447 has quit [Ping timeout: 255 seconds]
rblackwe has quit [Read error: Connection reset by peer]
pvb has quit [Quit: Leaving]
wald0 has joined #ruby
nuck has joined #ruby
InfraRuby has quit [Remote host closed the connection]
mike32 has quit [Quit: Leaving]
zequix has quit [Remote host closed the connection]
Advocation has joined #ruby
_tpavel has joined #ruby
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
badhatter has joined #ruby
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonr22 has quit [Ping timeout: 250 seconds]
wald0_ has joined #ruby
<fly2web>
tobiasvl: twilio is good ?
Cereal` has joined #ruby
<tobiasvl>
fly2web: never used it, no idea
<fly2web>
tobiasvl: i must pay to the twilio.com?
<tobiasvl>
fly2web: don't ask me
<fly2web>
OMG
<fly2web>
:(
amundj has quit [Ping timeout: 272 seconds]
aagdbl has quit [Quit: This computer has gone to sleep]
kevkev___ has quit [Quit: Computer has gone to sleep.]
phutchins has quit [Ping timeout: 240 seconds]
<canton7>
twilio's pretty decent
mr-foobar has quit [Read error: Connection reset by peer]
<ddv>
I don't want your sms spam, fly2web....
<fly2web>
canton7: i think that wilio are not free?
mr-foobar has joined #ruby
<canton7>
of course have you to spend money to send texts
<canton7>
no-one's going to let you do it for free
<canton7>
they're pretty cheap though
<fly2web>
i will send 3 message per person.
<canton7>
great. you have to pay for 3 messages per person
<fly2web>
OH my God, i have no money.
<canton7>
then you're not going to be able to send any texts
<canton7>
very little in life is free ;)
<fly2web>
oh
<fly2web>
how can i do?
bricker`LA has joined #ruby
<canton7>
1. get a job
<fly2web>
then i just want notication instead of sms or mms.
lxsameer has joined #ruby
<fly2web>
notification is free?
<canton7>
so... you want to get all phone users to install your app? then you send notifications to the app?
<fly2web>
oh my god
<Mon_Ouie>
Might as well send emails
asdasdasdasss has joined #ruby
<canton7>
you'll have to spend £100, on top of buying a mac, to write an iPhone app
<fly2web>
i don’t know address of people. i just know phone number.
<fly2web>
hahaha
<fly2web>
i have it already.
<fly2web>
canton7:
Rollabunna has joined #ruby
<fly2web>
i have no money, but i have mac.
gaussblurinc1 has quit [Quit: Leaving.]
jonr22 has joined #ruby
<canton7>
you have money to buy a mac, but not send texts?
chth0n has joined #ruby
<fly2web>
i got it from road. so mac is mine.
<fly2web>
haha
sigurding has joined #ruby
<canton7>
bearing in mind that texts cost $0.04 each
jzigmund_ is now known as jzigmund
yfeldblum has joined #ruby
<fly2web>
oh
W0rmDr1nk has quit [Ping timeout: 256 seconds]
whyy has joined #ruby
peret has joined #ruby
jonahR has joined #ruby
zequix has joined #ruby
bricker`LA has quit [Ping timeout: 240 seconds]
anarang has quit [Ping timeout: 244 seconds]
<fly2web>
$0.04 * 1000 person * 3 sms per day * 30 day == $3,600 per month canton7
<canton7>
3 texts PER DAY?
<canton7>
what are you doing to these poor sods?
<mostlybadfly>
Holaaaa
<fly2web>
yes
<canton7>
so yeah. if you want to indulge in that level of spamming, it's going to cost you
<canton7>
and rightly so
<fly2web>
oh so i want sms of free.
asdasdasdasss has quit [Ping timeout: 256 seconds]
<fly2web>
how can i do?
Rollabunna has quit [Ping timeout: 244 seconds]
<canton7>
you can't
<canton7>
game over
<canton7>
goodbye
<fly2web>
oh
<fly2web>
:(
oo_ has quit [Remote host closed the connection]
tjr9898 has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
tvw has joined #ruby
phoo1234567 has quit [Quit: Leaving]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Sgeo has quit [Read error: Connection reset by peer]
tjr9898 has quit [Remote host closed the connection]
tjr9898 has joined #ruby
<fly2web>
canton7: then it is not possible to send message for free?
<canton7>
no
<fly2web>
:(
SegFaultAX has quit [Excess Flood]
<fly2web>
possible?
<canton7>
it's not possible to get internet access for free
<canton7>
it's not possible to drive a car for free
lkba has joined #ruby
<ddv>
you could steal both
<fly2web>
:(
<canton7>
it's not possible to make phone calls for free
sheperson has joined #ruby
tjr9898_ has joined #ruby
<canton7>
thankfully it's not possible to send texts for free.
<canton7>
sending emails is free, and think about how much spam you get
<canton7>
if texts were free, you'd get that amount of spam over text, too
<fly2web>
ok canton7 then i want connecting my phone and laptop, then it call to someone automatically? is it possible?
arup_r has quit [Remote host closed the connection]
tjr9898 has quit [Read error: Connection reset by peer]
<canton7>
it can be done. I think it's easier to get a separate gsm module
SegFaultAX has joined #ruby
TorpedoSkyline has joined #ruby
kiri has joined #ruby
<fly2web>
gsm module?
<fly2web>
what is it?
<canton7>
you're still not going to get anything for free
<fly2web>
ok
<fly2web>
then last question.
Takle has quit [Remote host closed the connection]
matrixdevuk has quit [Ping timeout: 255 seconds]
arup_r has joined #ruby
<fly2web>
i just want manipulate my phone with my laptop? is it possible?
<canton7>
maybe something like a SOM900? I haven't looked into that
<canton7>
manipulate how?
paulfm has joined #ruby
<fly2web>
if i type ‘k’ in the laptop, then my phone show ‘k’ on the screen.
<fly2web>
canton7:
valner has joined #ruby
<canton7>
you can probably write an app which communicates with your computer over usb, yeah
<fly2web>
by ruby code?
<canton7>
no
<canton7>
java for android, objective-c for iOS
<fly2web>
::(
<fly2web>
:(
<fly2web>
what can i do with ruby?
vsoftoiletpaper has joined #ruby
W0rmDr1nk has joined #ruby
<canton7>
websites, cli programs mainly
<fly2web>
what is cli programs?
kiri has quit [Ping timeout: 245 seconds]
<canton7>
command-line
jonr22 has quit [Ping timeout: 256 seconds]
<fly2web>
i want send message to other phone for free.
oo_ has joined #ruby
sepp2k has joined #ruby
<fly2web>
:(
TorpedoSkyline has quit [Ping timeout: 272 seconds]
<fly2web>
who can help me?
<canton7>
no-one
<canton7>
it's not possible
<fly2web>
:(
<fly2web>
very sorrowful.
vsoftoiletpaper has quit [Client Quit]
<tobiasvl>
fly2web: do you know ruby?
<fly2web>
yes
<fly2web>
tobiasvl:
anarang has joined #ruby
<fly2web>
i want throw my laptop to trash.
<canton7>
give it to me - I could do with a macbook
<arup_r>
fly2web: Time passing ? :-)
<fly2web>
Time passing?
<fly2web>
what mean?
sk87 has joined #ruby
Vile` has joined #ruby
arup_r has quit [Remote host closed the connection]
ldnunes has joined #ruby
aagdbl has joined #ruby
<mostlybadfly>
Not sure if troll
<tobiasvl>
mostlybadfly: definitely troll
<tobiasvl>
he's been here a lot lately
shredding has joined #ruby
<fly2web>
:(
<mostlybadfly>
Oh this is the one trying to say a hash had rows
vsoftoiletpaper has joined #ruby
<kaspergrubbe_>
he's trolling #rubyonrails as well
<mostlybadfly>
Lame
<ddv>
how old are you fly2web?
jcromartie has joined #ruby
Takle has joined #ruby
pzula has quit [Ping timeout: 255 seconds]
tkuchiki_ has joined #ruby
<fly2web>
ddv: i m student.
<fly2web>
why? ddv
<ddv>
You sound very immature...
<fly2web>
my father is CEO
<canton7>
"student" can mean anything from 6 to 25 or so :P
jottr has quit [Ping timeout: 240 seconds]
<ddv>
6 - 100
<wasamasa>
kaspergrubbe_: oh really?
kaiwren has quit [Quit: kaiwren]
AlexBlom has joined #ruby
charliesome has joined #ruby
<mostlybadfly>
He studies trolling
<mostlybadfly>
And how to be fed
tkuchiki has quit [Ping timeout: 255 seconds]
whyy has quit [Remote host closed the connection]
spastorino has joined #ruby
<ddv>
fly2web: CEO what company?
<fly2web>
oh
<fly2web>
you heard about ‘YAHOO’?
tkuchiki_ has quit [Ping timeout: 255 seconds]
<fly2web>
:)
<ddv>
ehm
<tobiasvl>
yahoo has a female CEO though
<ddv>
lol yeah
<ddv>
Marissa Mayer
<canton7>
yeah - was gonna say
hamakn has joined #ruby
<kaspergrubbe_>
fly2web: your father is a woman?
Joulse has joined #ruby
Zebroid has joined #ruby
<fly2web>
if you do kind to me, then i will let you go to ‘YAHOO’
<fly2web>
ddv:
<tobiasvl>
everything's possible in this day and age
<ddv>
fly2web: Yahoo is a worthless company build out of air
mehlah has joined #ruby
jamto11 has joined #ruby
<fly2web>
ddv: you dont want go to ‘YAHOO’? yahoo give you $100,000 per month?
Advocation has quit [Quit: Advocation]
pskrz has left #ruby [#ruby]
<tobiasvl>
fly2web: you're so full of shit
<fly2web>
:(
<fly2web>
why? tobiasvl
hamakn has quit [Ping timeout: 264 seconds]
<tobiasvl>
your father is not the CEO of yahoo and yahoo doesn't pay people who aren't CEO $100,000 per month
MartinCleaver has joined #ruby
<ddv>
according to wikipedia Mayer earns 117 million over 5 years
<ddv>
wtf
bricker`LA has joined #ruby
<ptrrr>
maybe it’s korean yahoo?
<ptrrr>
the local branch
<tobiasvl>
maybe
nasj has joined #ruby
<fly2web>
i must go now for spend $10,000 to eat meal.
<fly2web>
see ya
<fly2web>
:(
fly2web has left #ruby [#ruby]
<tobiasvl>
good bye
<GlenK>
yeah, that was weird
kotk_ has joined #ruby
kotk has quit [Ping timeout: 255 seconds]
nfk has joined #ruby
yfeldblum has joined #ruby
Zebroid has quit [Read error: Connection reset by peer]
Takle has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zebroid has joined #ruby
Advocation has joined #ruby
bricker`LA has quit [Ping timeout: 250 seconds]
Gonzih has quit [Ping timeout: 245 seconds]
krisquigley has quit [Remote host closed the connection]
jackneill has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 245 seconds]
jackneill has joined #ruby
Takle has joined #ruby
yacks has quit [Ping timeout: 255 seconds]
Akuma has joined #ruby
sheperson has quit [Ping timeout: 255 seconds]
jottr has joined #ruby
MartinCleaver_ has joined #ruby
MartinCleaver has quit [Ping timeout: 240 seconds]
MartinCleaver_ is now known as MartinCleaver
sambao21 has joined #ruby
nuck has quit [Ping timeout: 240 seconds]
badhatter has quit [Ping timeout: 240 seconds]
Mikalv has quit [Ping timeout: 245 seconds]
Mikalv has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
Trynemjoel has joined #ruby
<ddv>
maybe his father is really the CEO of Yahoo Korea
badhatter has joined #ruby
<ddv>
North Korean branch
tkuchiki has joined #ruby
phutchins has joined #ruby
nuck has joined #ruby
kotk has joined #ruby
krisquigley has joined #ruby
banister has joined #ruby
krisquigley has quit [Client Quit]
krisquigley has joined #ruby
Zebroid has quit [Read error: Connection reset by peer]
kotk_ has quit [Ping timeout: 245 seconds]
jottr has quit [Ping timeout: 255 seconds]
Zebroid has joined #ruby
Zebroid has quit [Remote host closed the connection]
<odigity2>
he is "Dear CEO"
aagdbl has quit [Quit: This computer has gone to sleep]
amacou has joined #ruby
Gooder` has joined #ruby
ValicekB has quit [Ping timeout: 250 seconds]
saarinen has joined #ruby
bmurt has joined #ruby
krisquigley has quit [Read error: Connection reset by peer]
relix has joined #ruby
Gonzih has joined #ruby
krisquigley has joined #ruby
alexherbo2 has quit [Remote host closed the connection]
axl_ has joined #ruby
asdasdasdasss has joined #ruby
jprovazn has quit [Quit: Leaving]
workmad3 has quit [Read error: Connection reset by peer]
britneywright has joined #ruby
benzrf|offline is now known as benzrf
jprovazn has joined #ruby
saarinen has quit [Read error: Connection reset by peer]
AlexBlom has quit [Ping timeout: 244 seconds]
saarinen has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
vasilakisfil has joined #ruby
DaniG2k has quit [Ping timeout: 260 seconds]
asdasdasdasss has quit [Ping timeout: 264 seconds]
aagdbl has joined #ruby
workmad3 has joined #ruby
<vasilakisfil>
hello! let's say that I have 2 objects: object1 and object2. How can I quickly create a super object that has these 2 objects as attr_reader ? For instance the_object.object1 to be the same with object1
<canton7>
Bish, are you certain it's line 5 blocking, not line 3?
SilkFox has joined #ruby
<Bish>
when i remove the queue i get lots of data
yacks has quit [Ping timeout: 264 seconds]
jerius has joined #ruby
arya_ has joined #ruby
yacks has joined #ruby
Advocation has quit [Quit: Advocation]
patrick99e99 has joined #ruby
<canton7>
so, you don't actually know where exactly the problem is?
<canton7>
whether it's pushing onto the queue, or popping off it?
<canton7>
when you remove the queue, do you also remove the threads?
<Bish>
no
gauke has quit [Remote host closed the connection]
<Bish>
i mean.. none does something, the producer doesn't and the consumer doesn't do s*** either
<Bish>
they both block on the queue
Zenigor has joined #ruby
iamjarvo has quit [Ping timeout: 240 seconds]
<canton7>
what type is workerQueue? Queue?
justinv has quit [Remote host closed the connection]
<canton7>
#push shouldn't block - #pop should
<Bish>
just queue
vsoftoiletpaper has quit []
<Bish>
because it says "This class provides a way to synchronize communication between threads."
<canton7>
"just queue"?
gaussblurinc1 has joined #ruby
vsoftoiletpaper has joined #ruby
oo_ has quit [Remote host closed the connection]
<Bish>
yeah Queue
<Bish>
Queue.new
sigurding has quit [Quit: sigurding]
danijoo has quit [Read error: Connection reset by peer]
jwfnrt has joined #ruby
danijoo has joined #ruby
<canton7>
righto
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
patrick99e99 has quit [Ping timeout: 240 seconds]
kevkev___ has joined #ruby
<AlexRussia>
How i could get range with...'spaces'?
<ddv>
fly2web: we all know it was you lol
Takle has quit [Read error: Connection reset by peer]
gauke has joined #ruby
<fly2web>
ddv: i understand you like that. but i m real innocent.
<fly2web>
trust me. plz ddv
<Bish>
canton7, so why does push block ;;
Takle has joined #ruby
justinv has joined #ruby
sailias has joined #ruby
<Hanmac>
AlexRussia: what is your wanted input ad your wanted output?
mahtennek has joined #ruby
<canton7>
Bish, no idea - I've never seen it block before
<Bish>
found the problem.. i called the global WorkerQueue while it was called workQueue in the threads.. which caused them to segfault?
<canton7>
hrm, shouldn't segfault
<canton7>
a segfault would have been obvious
blueOxigen has quit [Ping timeout: 272 seconds]
<AlexRussia>
Hanmac: i need made range or list numbers to check sth,but sometimes is sth like 0..8..16..24 etc and sometimes it 8..9..10..11 etc, i wish universally interface
kevkev___ has quit [Ping timeout: 240 seconds]
kevkev____ has joined #ruby
<Bish>
canton7, i mean.. the thread dies somehow?
<Bish>
because @someRandomName.pop should fail.. right ?
<canton7>
it'll get an exception
<canton7>
and probably die, yeah
gauke has quit [Client Quit]
gauke has joined #ruby
SilkFox has quit [Ping timeout: 240 seconds]
TorpedoSkyline has joined #ruby
livingstn has joined #ruby
odigity2 has quit [Quit: Leaving]
robbyoconnor has quit [Ping timeout: 260 seconds]
Brolen has joined #ruby
kaspertidemann has quit []
Brolen has quit [Client Quit]
Brolen has joined #ruby
kevkev____ has quit [Ping timeout: 256 seconds]
jam__ has joined #ruby
justinv has quit [Remote host closed the connection]
<Hanmac>
AlexRussia: hm so should it work like that? 0...8 + 8...16 + 16..24 ?
<AlexRussia>
Hanmac: oh, dammit, .. mean space between numbers, not range :(
Joulse has quit [Quit: Joulse]
yfeldblum has joined #ruby
yacks has quit [Ping timeout: 256 seconds]
gauke has quit [Quit: gauke]
<Hanmac>
hm but you can use "_", but might not what you want
Gooder` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
vsoftoiletpaper has quit []
duggiefresh has joined #ruby
matrixdevuk has joined #ruby
Joulse has quit [Ping timeout: 240 seconds]
Joulse has joined #ruby
gaussblurinc1 has quit [Ping timeout: 240 seconds]
jottr has joined #ruby
Takle has quit [Ping timeout: 240 seconds]
jprovazn has quit [Ping timeout: 240 seconds]
sputnik13 has joined #ruby
jprovazn has joined #ruby
Jameser has joined #ruby
mleone has joined #ruby
sinkensa_ has quit [Read error: Connection reset by peer]
Mikalv has joined #ruby
Mikalv has quit [Ping timeout: 245 seconds]
sinkensabe has joined #ruby
qwyeth has joined #ruby
DaniG2k has joined #ruby
noop has joined #ruby
DaniG2k has quit [Client Quit]
mikesplain has quit [Ping timeout: 250 seconds]
wald0 has quit [Ping timeout: 250 seconds]
aagdbl has quit [Quit: This computer has gone to sleep]
bidigo has quit [Quit: Leaving]
wald0_ has quit [Ping timeout: 255 seconds]
redondo has joined #ruby
<redondo>
what does mean the '!' in a method call, say: method!(args)?
<wasamasa>
it's a naming convention
jottr has quit [Ping timeout: 240 seconds]
<wasamasa>
used for things like destructive or exception throwing versions of methods
perrier has quit [Remote host closed the connection]
<wasamasa>
similiar to '*' in lisp function names
<wasamasa>
or tex commands
<redondo>
so if a method is called method! it is soppused to be succeptible to throw exceptions?
beef-wellington has joined #ruby
Rollabunna has joined #ruby
asdasdasdasss has joined #ruby
<wasamasa>
it's a naming convention, no magic
perrier has joined #ruby
perrier has quit [Remote host closed the connection]
<redondo>
wasamasa, thanks
jprovazn has quit [Ping timeout: 260 seconds]
<wasamasa>
the only thing you can be sure about is that there's another method without the '!'
<txdv>
you cant actually
<txdv>
this is only convention
<tobiasvl>
redondo: I've seen more of the destructive kind. often there will be two methods, one without the ! which returns the modified object, and one with ! which mutates it in-place
perrier has joined #ruby
<wasamasa>
since this is ruby, not scheme :P
Joulse_ has joined #ruby
LadyRainicorn has joined #ruby
centrx has joined #ruby
<txdv>
yes
<txdv>
THIS IS RUBY
Mikalv has quit [Ping timeout: 245 seconds]
Mikalv has joined #ruby
<wasamasa>
RUBY?
Trynemjoel has quit [Ping timeout: 245 seconds]
Joulse has quit [Ping timeout: 240 seconds]
Joulse_ is now known as Joulse
<tobiasvl>
THIS... IS... RUBY!!!
mikesplain has joined #ruby
mikesplain has quit [Max SendQ exceeded]
Trynemjoel has joined #ruby
* wasamasa
falls into a bottomless pit
mikesplain has joined #ruby
jprovazn has joined #ruby
asdasdasdasss has quit [Ping timeout: 250 seconds]
Rollabunna has quit [Ping timeout: 255 seconds]
nowthatsamatt has joined #ruby
nfk has quit [Ping timeout: 250 seconds]
Zebroid has quit [Ping timeout: 256 seconds]
abuzze_ has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
Advocation has quit [Quit: Advocation]
Macaveli has joined #ruby
<centrx>
Hey I'm trying to attach my Python to my PHP, is this the right place?
axl_ has quit [Quit: axl_]
jottr has joined #ruby
abuzze has quit [Ping timeout: 260 seconds]
SilverKey has joined #ruby
<ddv>
centrx: get lost
starkhalo has joined #ruby
<daxroc_>
Can you add a Thor::Group as a subcommand ?
wald0 has joined #ruby
dumdedum has quit [Quit: foo]
LadyRainicorn has quit [Write error: Connection reset by peer]
<daxroc_>
I'm wanting to create a few generators as Thor::Groups and include them as subcommands in a main application. Seems logical but not found any examples of using them like so. is there a better method ?
LadyRainicorn has joined #ruby
momomomomo has joined #ruby
LadyRainicorn has quit [Read error: Connection reset by peer]
LadyRainicorn has joined #ruby
justinv has joined #ruby
abuzze_ has quit [Remote host closed the connection]
abuzze has joined #ruby
britneywright has joined #ruby
whyy has joined #ruby
GriffinHeart has joined #ruby
Tricon has joined #ruby
supermat has quit [Read error: Connection reset by peer]
vsoftoiletpaper has joined #ruby
skaflem has joined #ruby
beseku has joined #ruby
agrinb has joined #ruby
mikesplain has quit [Ping timeout: 240 seconds]
agarie has joined #ruby
whyy has quit [Ping timeout: 260 seconds]
mikepack has joined #ruby
GriffinHeart has quit [Ping timeout: 264 seconds]
Vivekananda_y510 has quit [Ping timeout: 255 seconds]
NukePuppy has joined #ruby
agrinb has quit [Ping timeout: 255 seconds]
robbyoconnor has joined #ruby
TorpedoSkyline has joined #ruby
mary5030 has joined #ruby
chipotle has joined #ruby
mary5030 has quit [Remote host closed the connection]
supermat_ has joined #ruby
whyy has joined #ruby
mary5030 has joined #ruby
Trudko has quit [Remote host closed the connection]
mattstratton has joined #ruby
ixti has joined #ruby
eka has joined #ruby
treehug88 has joined #ruby
vsoftoiletpaper has quit [Ping timeout: 245 seconds]
TorpedoSkyline has quit [Client Quit]
larissa has joined #ruby
vsoftoiletpaper has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
InfraRuby has joined #ruby
supermat_ is now known as supermat
snath has quit [Ping timeout: 272 seconds]
SilkFox has joined #ruby
eka has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 245 seconds]
Zebroid has joined #ruby
Zebroid has quit [Read error: Connection reset by peer]
whyy has quit [Ping timeout: 256 seconds]
Zebroid has joined #ruby
Zebroid has quit [Remote host closed the connection]
kevkev____ has joined #ruby
yfeldblum has joined #ruby
AlexBlom has quit [Ping timeout: 244 seconds]
Rollabunna has joined #ruby
axl_ has joined #ruby
mehlah has joined #ruby
alexju has joined #ruby
Gonzih has quit [Ping timeout: 256 seconds]
SilkFox has quit [Ping timeout: 250 seconds]
zkay11 has joined #ruby
zarubin has joined #ruby
itspots has joined #ruby
iamjarvo has joined #ruby
Rainicorn has joined #ruby
LadyRainicorn has quit [Read error: Connection reset by peer]
vsoftoiletpaper has quit [Ping timeout: 240 seconds]
<mechanicalduck_>
So much pain only because they haven't implemented inotify in CIFS yet.
chihhsin has quit [Client Quit]
<fly2web>
hello
<fly2web>
sheepman:
<kaspergrubbe_>
fly2web: no
<fly2web>
shevy:
dangerousdave has quit []
<fly2web>
kaspergrubbe_: :(
<kaspergrubbe_>
shevy: I work at a gas station, and one of the days a guy pulled up and needed some gasoline. I notice that he have two penguins in his car.
mahtennek has quit []
<kaspergrubbe_>
I asked about them and he answered "Oh, I found them, do you know what do with them?"
SilkFox has joined #ruby
aspires has joined #ruby
<kaspergrubbe_>
"What about taking them to the zoo?" I replied. "Thats a great idea!" he said and drove off.
<kaspergrubbe_>
The next day he drove up again, and I noticed that he still have the two penguins with him.
geggam has joined #ruby
<kaspergrubbe_>
I asked: "Didn't you go to the zoo?", "Yes we did, and they loved it! Today we are going to the beach!"
yfeldblum has quit [Ping timeout: 255 seconds]
SilverKey has quit [Quit: Cheerio!]
kevkev____ has joined #ruby
seamon has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
SilkFox has quit [Ping timeout: 244 seconds]
renderful has joined #ruby
chihhsin has joined #ruby
pzula has joined #ruby
<kaspergrubbe_>
^ true story!
aalmenar has quit [Read error: Connection reset by peer]
tesaf has quit [Quit: Lost terminal]
Wolland has joined #ruby
starkhalo has quit [Ping timeout: 264 seconds]
aalmenar has joined #ruby
aalmenar has quit [Changing host]
aalmenar has joined #ruby
gauke has quit [Quit: gauke]
kevkev____ has quit [Ping timeout: 260 seconds]
drjfreeze has joined #ruby
<drjfreeze>
Anyone know if printing ASCII control characters works on windows cmd?
<drjfreeze>
puts "\e[41mH\e[40m"
snapcase has joined #ruby
ELFrederich has quit [Remote host closed the connection]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Xeago has quit [Ping timeout: 255 seconds]
sputnik13 has joined #ruby
acrussell has joined #ruby
crazydiamond has joined #ruby
sk87 has joined #ruby
Cache_Money has joined #ruby
Wolland has quit [Ping timeout: 264 seconds]
mikesplain has joined #ruby
jam__ has quit [Quit: Connection closed for inactivity]
<shevy>
kaspergrubbe_ lol
<sepp2k>
drjfreeze: No, the Windows command prompt does not interpret ANSI escape sequences. (PS: please don't ask the same question in two channels at the same time).
<shevy>
"Note, however, that most of Chimera (~85%) is written in Python"
<shevy>
python has a strong grip on science-related programs
alexju has quit [Ping timeout: 260 seconds]
jxf has joined #ruby
Ankhers has joined #ruby
marz_skilex has joined #ruby
pzula has quit [Ping timeout: 240 seconds]
marz_skilex has left #ruby [#ruby]
Fire-Dragon-DoL has joined #ruby
axsuul has joined #ruby
xenomorph is now known as {xenomorph}
TorpedoSkyline has joined #ruby
cocotton has quit [Quit: Leaving...]
<fly2web>
shevy: what lose?
<drjfreeze>
sepp2k: you know how to get color in windows cmd session?
mikepack has quit [Remote host closed the connection]
endash has quit [Read error: Connection reset by peer]
endash has joined #ruby
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
noocode_ has quit [Ping timeout: 256 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<drjfreeze>
sepp2k: Is three channels ok? ;)
vsoftoiletpaper has joined #ruby
Atrumx has joined #ruby
Atrumx has quit [Changing host]
Atrumx has joined #ruby
peret has quit [Ping timeout: 240 seconds]
<shevy>
three channels is better than two
krz has joined #ruby
chipotle has quit [Quit: cya]
IceDragon has joined #ruby
hamakn has joined #ruby
hamakn has quit [Remote host closed the connection]
haasn has quit [Ping timeout: 256 seconds]
Cache_Money has quit [Quit: Cache_Money]
noocode has joined #ruby
seamon has quit [Quit: Zzzzzzz]
razum2um has quit [Quit: Leaving.]
{xenomorph} has quit [Ping timeout: 256 seconds]
MatthewsFace has joined #ruby
anaeem1 has quit [Remote host closed the connection]
gauravagarwalr has quit []
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
harold_ has joined #ruby
anaeem1 has joined #ruby
xjiujiu has joined #ruby
MatthewsFace has quit [Client Quit]
<harold_>
How does one configure Rails 3 to stop escaping HTML by default?
seamon has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pzula has joined #ruby
{xenomorph} has joined #ruby
<sepp2k>
drjfreeze: The Win32 API has functions to set the color in the command prompt and Ruby has bindings for the Win32 API. There may also be gems that use the Win32 API on Windows and ANSI escapes on compatible terminals.
bricker`LA has quit [Ping timeout: 250 seconds]
nfk has joined #ruby
choke has joined #ruby
_tpavel has quit [Quit: Leaving]
Spami_ has quit [Quit: This computer has gone to sleep]
<sepp2k>
drjfreeze: Apparently the colorize gem does this for example.
<shevy>
harold_ the railsers are on #RubyOnRails channel
<harold_>
yeah it’s locked to prevent spam I believe
<godd2>
drjfreeze look to isntalling ansicon for color output to cmd
anaeem1 has quit [Ping timeout: 255 seconds]
<godd2>
lol then why is ruby-lang locked :P
<harold_>
excellent question
L3mce has quit [Ping timeout: 255 seconds]
haasn has joined #ruby
<harold_>
maybe those guys have even higher net worth
p0sixpscl has quit [Quit: p0sixpscl]
ptrrr has quit [Quit: ptrrr]
<shevy>
once registered and identified you can join and talk there
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
maestrojed has quit [Quit: Computer has gone to sleep.]
Jameser has joined #ruby
bradleyprice has quit [Ping timeout: 245 seconds]
Zenigor has quit [Remote host closed the connection]
dawkirst has quit [Remote host closed the connection]
icarus has joined #ruby
SilkFox has quit [Ping timeout: 255 seconds]
Zenigor has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
jmbrown412 has joined #ruby
seamon has quit [Quit: Zzzzzzz]
mupkoo has joined #ruby
alex88_ has quit [Quit: Leaving...]
TorpedoSkyline has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
Jameser has quit [Ping timeout: 240 seconds]
bigkevmcd has quit [Quit: Ex-Chat]
danijoo has joined #ruby
Zenigor has quit [Ping timeout: 245 seconds]
ssvo has joined #ruby
maestrojed has joined #ruby
peret has joined #ruby
joonty has quit [Quit: Leaving]
mallu has joined #ruby
<mallu>
hello, has anyone use jq tool?
maletor has joined #ruby
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
olivier_bK has quit [Ping timeout: 264 seconds]
TorpedoSkyline has quit [Client Quit]
SegFaultAX has quit [Excess Flood]
SegFaultAX has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mallu>
has anyone use any json query tools?
<centrx>
"jq can mangle the data format" lol
seamon has joined #ruby
kevkev____ has joined #ruby
Zebroid has quit [Read error: Connection reset by peer]
shevy has quit [Ping timeout: 255 seconds]
fly2web has left #ruby [#ruby]
<mallu>
centrx: I'm trying to use that tool but can't figure out something. Do you have any experience with that?
Squarepy has joined #ruby
abuzze has joined #ruby
lw has quit [Quit: s]
<centrx>
mallu, I know JSON, I've never used jq
Joulse has quit [Quit: Joulse]
poguez_ has joined #ruby
theharshest has joined #ruby
krisquigley has joined #ruby
ssvo has quit [Ping timeout: 250 seconds]
perrier has quit [Remote host closed the connection]
kevkev____ has quit [Ping timeout: 244 seconds]
britneywright has joined #ruby
deric_skibotn has joined #ruby
renderful has quit [Remote host closed the connection]
abuzze has quit [Ping timeout: 250 seconds]
renderful has joined #ruby
perrier has joined #ruby
<mallu>
can you please take a look at http://pastebin.com/pg2QNsyY and tell me how I can search for description "Snapshot of Instance*" and get the snapshotId?
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TorpedoSkyline has joined #ruby
weueyi has joined #ruby
<weueyi>
warning
<weueyi>
you may be watched
<weueyi>
do usa&israel use the internet(facebook,youtube,twitter, chat rooms ..ect)to spy??
<weueyi>
do usa&israel use the internet 2 collect informations,,can we call that spying??
<weueyi>
do they record&analyse everything we do on the internet,,can they harm you using these informations??
<weueyi>
ÊÍÐíÑ
weueyi has quit [Excess Flood]
<weueyi>
warning
<centrx>
mallu, This data structure looks incomplete?
aagdbl has joined #ruby
wallerdev has quit [Quit: wallerdev]
<mallu>
yes
weueyi has joined #ruby
weueyi has quit [Excess Flood]
philcris_ has joined #ruby
<mallu>
centrx: I've only copied a snippet...
<centrx>
In Ruby you would do: array_of_hashes.find { |hash| hash['Description'].start_with?("Snapshot of Instance") }['SnapshotId']
<mechanicalduck_>
How can I get all logger info during run?
<mechanicalduck_>
Logger is stdout but I don't think I get all information.
<eam>
I haven't needed to bother with anything but bytestrings in a long time
sirecote has joined #ruby
mozzarella has joined #ruby
<hoelzro>
Ruby is a pretty acceptable Perl =)
lmickh has joined #ruby
<eam>
agree
<hoelzro>
mechanicalduck_: I'm guessing you have to tweak your log levels or something
jottr has joined #ruby
Takle has quit [Remote host closed the connection]
bradleyprice has joined #ruby
fgo has quit [Ping timeout: 256 seconds]
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
mupkoo has quit [Ping timeout: 250 seconds]
nairys has joined #ruby
djbkd has quit [Remote host closed the connection]
chrishough has quit [Quit: chrishough]
jgrevich has joined #ruby
asdasdasdasss has quit [Quit: Computer has gone to sleep.]
seamon has quit [Quit: Zzzzzzz]
agrinb has quit [Remote host closed the connection]
djbkd has joined #ruby
asdasdasdasss has joined #ruby
agrinb has joined #ruby
davispuh has joined #ruby
qmfnp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tylerkern has joined #ruby
qwyeth has quit [Ping timeout: 250 seconds]
krisquigley has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
<bricker`work>
How do you do the one-liners with the "expect" syntax? With "should" you can do: `it { should be_cool }`, is there something similarly succinct with expect() ?
<bricker`work>
er, in rspec that is
agrinb has quit [Ping timeout: 245 seconds]
<bricker`work>
it { expect(user).to be_cool } isn't as nice
<bricker`work>
specify {} is a little better I guess
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
asdasdasdasss has quit [Ping timeout: 264 seconds]
chipotle has joined #ruby
Zebroid has quit [Remote host closed the connection]
seamon has joined #ruby
dawkirst has joined #ruby
krisquigley has quit [Ping timeout: 244 seconds]
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle_ has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
yetanotherdave has joined #ruby
starkhalo has quit [Ping timeout: 240 seconds]
Sauvin has quit [Read error: Connection reset by peer]
terrell_t has joined #ruby
cynapsbass has quit [Remote host closed the connection]
marr has quit [Read error: Connection reset by peer]
<gizmore>
would any code i have written run on JRuby? is there a speed gain?
<gizmore>
or any other benefit?
<gizmore>
or is it just more bloated because i need a JVM then? :P
craigbowen3 has joined #ruby
Kricir has quit [Remote host closed the connection]
shanlar- has quit [Read error: Connection reset by peer]
saarinen has joined #ruby
shanlar has joined #ruby
sweeper is now known as SaltyPaechez
<Mon_Ouie>
Access to Java libraries, no GIL, and at least different performance
SaltyPaechez is now known as Sweeper
Sweeper is now known as sweeper
jds has quit [Quit: Connection closed for inactivity]
<Mon_Ouie>
Compatibility-wise you should mostly be fine, except if you're using #fork or refinements
jgrevich_ has joined #ruby
Trynemjoel has joined #ruby
sigurding has joined #ruby
jgrevich_ has quit [Client Quit]
kevkev____ has joined #ruby
nasj has quit [Remote host closed the connection]
jgrevich has quit [Ping timeout: 240 seconds]
<shevy>
gizmore you have access to the java ecosystem, there even is an editor for jruby folks - redcar
<Mon_Ouie>
Right. There's no edit for regular Ruby users, we have to use cat or butterflies.
<gizmore>
thank you Mon_Ouie and shevy :)
<Mon_Ouie>
editor*
<gizmore>
i rely on gil though :p
mikesplain has quit [Ping timeout: 255 seconds]
<gizmore>
but nice to know! :)
kevkev____ has quit [Ping timeout: 256 seconds]
<shevy>
lol
LadyRainicorn has quit [Ping timeout: 250 seconds]
tjr9898_ has quit [Remote host closed the connection]
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ptrrr has joined #ruby
agarie has quit [Ping timeout: 260 seconds]
szuletett has joined #ruby
yfeldblum has joined #ruby
tjr9898_ has joined #ruby
teddyp1cker has joined #ruby
LadyRainicorn has joined #ruby
Cereal` has quit [Ping timeout: 255 seconds]
fgo has joined #ruby
saarinen has quit [Quit: saarinen]
cheemobile has joined #ruby
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Squarepy has quit [Quit: Leaving]
ValicekB has quit [Ping timeout: 256 seconds]
fgo has quit [Ping timeout: 256 seconds]
dorei has joined #ruby
renderful has joined #ruby
davispuh has quit [Remote host closed the connection]
robscormack has joined #ruby
<mallu>
I'm parsing a json file... when I do parsed['rows'][0]['normal']['tags'] I'm getting expected resule.. however when I do parsed['rows'].each do [row] row['normal']['tags'] end I am not.. what am i doing wrong?
Dreamer3 has joined #ruby
<Dreamer3>
hmmm
<i_s>
each do |row|
<Dreamer3>
do the magic $1, $2 for gsub! not work if the block is two levels deep?
<i_s>
not each do [row]
<Dreamer3>
trying to understand why rails html_safe is screwed everything up
jsatk has quit [Read error: Connection reset by peer]
jsatk has joined #ruby
Gonzih has quit [Ping timeout: 255 seconds]
<gomikemi1e>
hello
peret has joined #ruby
cheemobile has joined #ruby
Tricon has quit [Quit: Leaving...]
wjimenez_5271 has quit [Ping timeout: 244 seconds]
mikesplain has joined #ruby
itspots has quit [Quit: Computer has gone to sleep.]
Fire-Dragon-DoL has quit [Quit: Leaving.]
<gomikemi1e>
so, i've asked this before but its still not working as i need it to
jsatk has quit [Read error: Connection reset by peer]
itspots has joined #ruby
RichardLitt has joined #ruby
<gomikemi1e>
i have a ruby script that queries aws API, I need to go through a proxy JUST for this query
jsatk has joined #ruby
jespada has joined #ruby
<RichardLitt>
Got a small conditional syntax question. If I have “if name = row[loop_row] and name.present?”, and loop_row doesn’t exist, it’ll throw an error. any way to check that doesn’t throw an error?
<gomikemi1e>
aws cli uses env var http_proxy but i cant set that for the entire host.
jsatk_ has joined #ruby
cheemobile has quit [Client Quit]
<gomikemi1e>
how can i set the env var on the ruby script so its applied just tot the script run?
ra4king1 has joined #ruby
geekbri has quit [Ping timeout: 255 seconds]
dawkirst has quit [Ping timeout: 260 seconds]
kevkev____ has joined #ruby
timonv_ has joined #ruby
jaimef has quit [Excess Flood]
Hobogrammer has joined #ruby
jerius has quit []
jsatk has quit [Read error: Connection reset by peer]
<gomikemi1e>
i have ENV[http_proxy] ||= 'http://10.162.0.12:3128' on the script but get this when i run it "Could not retrieve tag_name: undefined local variable or method `http_proxy' for main:Object "
<shevy>
let's extend the ruby www ecosystem
<shevy>
without rails
Spami_ has quit [Quit: Leaving]
dawkirst has joined #ruby
<RichardLitt>
hmm. toretore, getting this eror: NoMethodError: undefined method `has_key' for #<GoogleDrive::ListRow:0x007f8ab467bd30>
Spami has joined #ruby
<RichardLitt>
Think that should work there. Hmm.
<mallu>
parsing json... when I do parsed['Reservations'][0]['Instances'][0]['BlockDeviceMappings'][0]['Ebs']['VolumeId'] I'm getting the correct value. But when I do parsed['Reservations'][0]['Instances'][0]['BlockDeviceMappings'].each do |device| volume = device['Ebs']['VolumeId'] I am not getting correct value
<mallu>
can someone tell me what I am doing wrong?
bruno- has quit [Ping timeout: 240 seconds]
<RichardLitt>
Ah, this is an active record thing. gah
<gomikemi1e>
i added @http_proxy = "" to see if that would help but i got the same error "Could not retrieve tag_name: undefined local variable or method `http_proxy' for main:Object"
nateberkope has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
<eam>
vifino: you've written an infinite loop in ruby
ascarter has joined #ruby
<eam>
er, in brainfuck
ascarter has quit [Max SendQ exceeded]
<vifino>
D:
<eam>
your very first loop only increments
<vifino>
Its not my code :<
<vifino>
I found it on some weird page
<eam>
the brainfuck you mean?
jayunit100 has joined #ruby
ascarter has joined #ruby
<eam>
the bug is in the ruby
ascarter has quit [Max SendQ exceeded]
<vifino>
oh
<eam>
the brainfuck is fine, the problem is you're using ruby numerics
<eam>
which do not wrap at 8 bits
<jayunit100>
config.vm.define "aws#{i}" do |n| <— hi ruby. what does this line actually do in the context of vagrant. sorry new to ruby methods and do |x| notation.
<eam>
you'll need to avoid fixnum/bignum
ascarter has joined #ruby
<eam>
and instead create your own approximation of an 8 bit char
<vifino>
eam: How can I fix this now?
<eam>
gosh, so
<RichardLitt>
nevermind, got it
<RichardLitt>
thanks toretore!
<eam>
your array needs to contain a special class that, when val=255 and +=1, becomes 0
<eam>
otherwise that first brainfuck loop will never exit
dc_ has joined #ruby
dc_ has quit [Remote host closed the connection]
everett has quit [Ping timeout: 245 seconds]
brianherman_ has joined #ruby
<eam>
what ruby is doing is counting up through Bignum until it can't anymore (and that's quite a long time)
<eam>
instead of wrapping at 2**8
kireevco has quit [Quit: Leaving.]
nateberkope has quit [Ping timeout: 240 seconds]
kireevco has joined #ruby
<eam>
[+] in brainfuck will count the current cell up to 255, then wrap to zero at which point, exit loop
kireevco has quit [Max SendQ exceeded]
bruno- has quit [Ping timeout: 256 seconds]
kireevco has joined #ruby
ra4king1 is now known as ra4king
<vifino>
eam: There is a small if structure prefixed before every command, i will move that to after, so that should fix some things
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brianherman has quit [Ping timeout: 245 seconds]
aspires has quit []
Zenigor has joined #ruby
<eam>
vifino: you could also wrap + and - in conditionals that test the cell and alternately increment or reset to zero
Morkel has quit [Quit: Morkel]
cocotton has quit [Remote host closed the connection]
jimms has quit []
cocotton has joined #ruby
<mallu>
can someone please tell me how i can go theorugh the loop with each do? parsed['Reservations'][0]['Instances'][0]['BlockDeviceMappings'][0, 1]['Ebs']['VolumeId']
dawkirst has quit [Remote host closed the connection]
jdj_dk_ has quit [Remote host closed the connection]
<mallu>
can I do parsed['Reservations'][0]['Instances'][0]['BlockDeviceMappings'].each do |device| device['Ebs']['VolumeId']
dawkirst has joined #ruby
<toretore>
did you try?
jdj_dk has joined #ruby
<mallu>
yes.. it is not working
<toretore>
bummer
<mallu>
wondering why its not working
<mallu>
:)
starkhalo has joined #ruby
badhatter has joined #ruby
badhatter has quit [Changing host]
badhatter has joined #ruby
Zenigor has quit [Ping timeout: 240 seconds]
badhatter has quit [Client Quit]
<centrx>
mallu, one-liner each/block needs { } not do end
<toretore>
it could be that device is an instance of TricksterObject, which responds randomly to each method call
<mallu>
toretore: any idea what I am doing wrong?
paulfm_ has quit []
badhatter has joined #ruby
badhatter has joined #ruby
badhatter has quit [Changing host]
<centrx>
or you need end
sepp2k has quit [Quit: Konversation terminated!]
<gomikemi1e>
can i get a link to read up on assigning the http_proxy ENV VAR in a ruby script to have it available to the actual ruby script that runs a tool that reads $http_proxy ?
teddyp1cker has quit [Remote host closed the connection]
<gomikemi1e>
everything i find from google is to set proxy and pull some link/site from teh ruby script, that is not what i need
<centrx>
gomikemi1e, It sounds like you are using some kind of framework/library but haven't said what it is
<toretore>
gomikemi1e: provide more information
<toretore>
MOOOORRRREEEEE
<gomikemi1e>
i need to make an aws cli call from a ruby script
djbkd has quit [Remote host closed the connection]
<redondo>
centrx: one posibility is: "class RegistrationsController < Devise::RegistrationsController", and the other is: "class Devise::RegistrationsController < DeviseController"... In the IRB: >> RegistrationsController.class => Class
<toretore>
gomikemi1e: paste the code on gist.github.com
djbkd has joined #ruby
benzrf|offline is now known as benzrf
duggiefresh has quit []
sinkensabe has quit [Remote host closed the connection]
seamon has quit [Quit: Zzzzzzz]
codecop has quit [Quit: Išeinu]
<gomikemi1e>
oh snap, i can get to that page :)
mehlah has joined #ruby
<centrx>
redondo, Those two could possibly be the same object class definition
<redondo>
centrx, their content is different, not sure if get you
saarinen has joined #ruby
n_blownapart has joined #ruby
Emmanuel_Chanel has quit [Remote host closed the connection]
<benzrf>
wot a python syntax ripoff
<benzrf>
wait, what does ** even do there?
<benzrf>
i thought kwargs were just regular hash unpacking
<benzrf>
>> def foo(bar:); bar end; foo({bar: 'ASS'})
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bluOxigen has quit [Ping timeout: 260 seconds]
yfeldblu_ has joined #ruby
claymore has quit [Quit: Leaving]
rubytor has quit [Ping timeout: 240 seconds]
abuzze_ has quit [Remote host closed the connection]
kevkev____ has joined #ruby
Brolen has quit []
n_blownapart has quit [Remote host closed the connection]
<gomikemi1e>
toretore: so i need to run aws cli and that reads the proxy info from the ENV VAR htt_proxy
yfeldbl__ has joined #ruby
yfeldblu_ has quit [Read error: Connection reset by peer]
mikesplain has quit [Ping timeout: 256 seconds]
<gomikemi1e>
but i cant set that for the whole OS cause it will force other traffic through the proxy that will fail
agrinb has quit [Remote host closed the connection]
<gomikemi1e>
so, im trying to set the ENV VAR in the ruby script that calls aws cli (line 10) so at end of run ENV VAR http_proxy is not set for the complete system
nasj has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
agrinb has joined #ruby
dawkirst has quit [Remote host closed the connection]
n_blownapart has joined #ruby
sinkensabe has joined #ruby
kevkev____ has quit [Ping timeout: 250 seconds]
tier has quit []
<vifino>
eam: I guess you aren't there, right?
<vifino>
Anyways, updated version, tryed to fix some things, didnt work
sinkensabe has quit [Remote host closed the connection]
nasj has quit [Ping timeout: 240 seconds]
sinkensabe has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
livingstn has quit []
fgo has joined #ruby
agrinb has quit [Ping timeout: 256 seconds]
<vifino>
noone?
<vifino>
:<
fgo has quit [Read error: No route to host]
fgo has joined #ruby
<redondo>
is it the same self.member as @member?
amargherio has quit [Read error: Connection reset by peer]
cmarques has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
saarinen has quit [Quit: saarinen]
sambao21 has joined #ruby
<shevy>
redondo does not have to be mandatory
<shevy>
self.member() is a method call
cmarques has joined #ruby
tylerkern has joined #ruby
<shevy>
@member is just an instance variable
mupkoo has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mupkoo has joined #ruby
<shevy>
if the code is consistent, then in principle it should be "def member; @member", however in your example it is a class method so it works on another instance
fly2web has joined #ruby
mupkoo has quit [Client Quit]
<shevy>
you could have code like this though:
<centrx>
attr_accessor/attr_reader
<shevy>
class Foo; def self.member; Foo.new.member
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<fly2web>
hello, i can’t sleep because of too hot
<shevy>
fly2web it is cold in korea
<fly2web>
what mean? here is US
aspires has quit []
<fly2web>
shevy: where are you live?
<centrx>
Get a room you two lovebirds
neersighted has quit [Remote host closed the connection]
<shevy>
centrx wants to kiss fly2web
<redondo>
centrx, sorry, does that (attr_accessor/attr_reader) has something to do with my last question?
fgo has quit [Ping timeout: 264 seconds]
<fly2web>
:(
<Mon_Ouie>
redondo: attr_reader :foo is like def foo; @foo; end
<Mon_Ouie>
And attr_accessor also defines a setter foo=(value)
<centrx>
redondo, instance.member may look the the same as @member from within instance, because of an attr_accessor/attr_reader definition that connects the two
<redondo>
Mon_Ouie, thanks
<redondo>
centrx, ok
<redondo>
and what comes after self. is always a method call?
<gomikemi1e>
toretore: anything?
beneggett has joined #ruby
cmarques has quit [Ping timeout: 264 seconds]
<centrx>
redondo, Yes, self is the current object instance
<centrx>
redondo, self.method is used mainly for assignments, self.method= (where it is necessary), or as a matter of style/clarity
<fly2web>
i want ice.
<fly2web>
i want to go north of russia
djbkd has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
<redondo>
centrx, thanks
centipedefarmer has quit [Remote host closed the connection]
<asimkhan>
yesterday was the first time i came to know about Ruby so i might ask some stupid questions lolz
Ankhers has quit [Ping timeout: 264 seconds]
niharvey has quit [Ping timeout: 272 seconds]
gypsydave5 has joined #ruby
<shevy>
cool
<shevy>
did you have exposure to other programming languages before asimkhan?
nowthatsamatt has joined #ruby
<eam>
vifino: your check for a[p]==-1 is wrong, 0 - 1 needs to wrap to 255
qwyeth has quit [Quit: Leaving]
centrx has quit [Quit: Mead error: Connection reset by beer]
<mallu>
Mon_Ouie: if I use map I'm gettig a string . is it possible to convert that to array?
<asimkhan>
yeah. .net.
<eam>
this is actually an interesting question: What's the right way to make a unsigned char numeric type in ruby? I can't really inherit from Fixnum can I?
vdmgolub has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<asimkhan>
I am facing a chanllenge. And hope anyone can help here
djbkd has quit [Ping timeout: 255 seconds]
<asimkhan>
here is my problem: I have a ruby script that is using some curl commands inside it. My goal is to run that script. What do I need to do for that purpose?
nairys has joined #ruby
<eam>
do I just delegate?
<Mon_Ouie>
mallu: You're mistaken, Enumerable#map returns an array
yfeldbl__ has quit [Remote host closed the connection]
nateberkopec has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
OffTheRails has quit [Ping timeout: 240 seconds]
AlexBlom has quit [Ping timeout: 264 seconds]
<Mon_Ouie>
gomikemi1e: As he said the problem is you're trying to use an empty string as the name of an environment variable…
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gomikemi1e>
Mon_Ouie: i thought " ENV[http_proxy] ||= 'http://10.X.X.X:3128' " was assigning a value to it
<Mon_Ouie>
A value to what?
<gomikemi1e>
to http_proxy
Starless has joined #ruby
<Mon_Ouie>
No, that would be http_proxy = "http://…"
neersighted has joined #ruby
aspires has quit []
<asimkhan>
Need help with using curl in ruby.
<theharshest>
I'm doing h1 = h2, and then updating h1 and h2 is also getting updated, h1 and h2 are Hash. Is there a way to create a copy of h2 and then assigning it to h1 instead of creating a reference as it is happening in this case?
<Mon_Ouie>
(You just initialized it to an empty string, not sure why)
<gomikemi1e>
cause i was getting a different error before i did that
<asimkhan>
Need help with using curl in ruby. what do i need to download and run the script i got?
coldkey21 has quit [Remote host closed the connection]
<gomikemi1e>
i added @http_proxy = "" to see if that would help but i got the same error "Could not retrieve tag_name: undefined local variable or method `http_proxy' for main:Object"
aspires has joined #ruby
justinv has joined #ruby
<Mon_Ouie>
You should try and understand what you're doing, it looks like you're adding random bits of code to make errors disappear
<gomikemi1e>
yes, im trying to make it work
havenwood has joined #ruby
<Mon_Ouie>
mallu: You're not using the return value of #map. You should do volumes = thing.map { … } and then use volumes
<gomikemi1e>
all i want is the ENV VAR http_proxy to have the value "http://IP:3128" so the code in line 10 can use the ENV VAR
<asimkhan>
How to run ruby script that has curl command inside it? What ruby to download? Anything additional to download? For example cURL?
<Mon_Ouie>
gomikemi1e: The problem is you're not setting the environment variable http_proxy, you're setting the environment variable whose name is stored inside the local variable http_proxy
<Mon_Ouie>
If http_proxy is the literal name of the env variable you want to use, use a literal string
<gomikemi1e>
Mon_Ouie: I will go read about literal strings
<Mon_Ouie>
asimkhan: The people who wrote that script should tell you that. We can't know what version of Ruby it's going to need.
absolutezeroff has quit [Ping timeout: 244 seconds]
<gomikemi1e>
and yes, that is the name of the actual ENV var, if i was to set it in /etc/environment (system wide) I could do "echo $http_proxy and i would get the value of the proxy setting
<Mon_Ouie>
asimkhan: All I can tell you is that if it shells out to call curl, you'll need curl as well as some ruby version
agrinb has joined #ruby
InfraRuby has joined #ruby
yfeldblum has joined #ruby
renderfu_ has quit [Remote host closed the connection]
AlexBlom has joined #ruby
<asimkhan>
let me put a question differently, lets say i want to write a ruby script that has a curl command inside it (curl -s -k --data-binary @" + request_filename + " https://" + host + ":" + xport + " --output " + response_filename + " -u " + userid + ":" + password)
<Mon_Ouie>
Oh. `curl …` or system("curl", "arg1", "arg2") or using Kernel#spawn
<vifino>
Bye all!
vifino has quit [Quit: Ze Cat now leaves...]
<asimkhan>
system(cmd)
<Mon_Ouie>
(the second and third are safer because you don't need to escape arguments)
jayunit100 has quit [Quit: jayunit100]
<mallu>
Mon_Ouie: me?
<Mon_Ouie>
No, asimkhan
agrinb has quit [Ping timeout: 240 seconds]
<gomikemi1e>
Mon_Ouie: thanks :)
krisquigley has joined #ruby
<asimkhan>
so its curl command followed by system(cmd) on the following line
<asimkhan>
for this scenario what do i need to run such a script?
timonv_ has quit [Remote host closed the connection]
<Mon_Ouie>
curl and some ruby version (even 1.8 would do that fine), and you should really not use that form
AlexBlom has quit [Ping timeout: 245 seconds]
<Mon_Ouie>
Because of filenames that can have spaces or quotes or other special characters (and same for other strings you try to interpolate)
<havenwood>
asimkhan: use one of the lovely libcurl wrappers
<havenwood>
asimkhan: :P
jxf has joined #ruby
Spami has quit [Read error: Connection reset by peer]
<asimkhan>
havenwood
InfraRuby has left #ruby [#ruby]
Spami has joined #ruby
<asimkhan>
so I will need to install ruby. And also to download libcurl?
<txdv>
all in all its just another brick in the wall
n_blownapart has quit []
<mallu>
Mon_Ouie: I'm getting the value twice now.. http://pastebin.com/7RiH8TRb Can you please tell me what I am doing wrong
jimms has joined #ruby
abuzze has joined #ruby
<asimkhan>
so I will need to install ruby. And also to download libcurl?
<havenwood>
asimkhan: libcurl then gem install patron or something that wraps patron, like typhoeus for parallel request, faraday for middleware options, or wrest for async.
<havenwood>
asimkhan: if curl is what you want to go with
<havenwood>
asimkhan: there are a number of Ruby HTTP clients
jottr has joined #ruby
<mallu>
I'm getting the value twice now.. http://pastebin.com/7RiH8TRb Can you please tell me what I am doing wrong
jimg has joined #ruby
SilkFox has joined #ruby
<asimkhan>
i have the existing script that i need to run
<dorei>
if someone wants a compiled OO language, what are the options? othen than C++
abuzze has quit [Ping timeout: 250 seconds]
<asimkhan>
the curl command in that is the one i provided above
<havenwood>
asimkhan: You can always just shell out if that's what you wanna do.
<asimkhan>
that call goes to a web service
<havenwood>
asimkhan: that command means no ssl, silent, etc
<havenwood>
asimkhan: you don't need to use curl to achieve that, but sure you can - patron is very nice
<shevy>
undefined method `each' for "vol-2662ec23":String (NoMethodError)
<shevy>
so obviously you have a string here and not an array
<mallu>
correct
philcrissman has quit [Ping timeout: 255 seconds]
<shevy>
so the question is - why do you yield a string?
tjr9898_ has quit [Remote host closed the connection]
matrixdevuk has quit [Quit: Computer has gone to sleep.]
<shevy>
and btw you did not yet say if this is correct output:
<shevy>
["vol-44068e41", "vol-36068e33"]
fgo has quit [Ping timeout: 260 seconds]
<mallu>
yes.. that is correct
asimkhan has quit [Ping timeout: 246 seconds]
pierre1_ has joined #ruby
Zebroid has quit [Ping timeout: 240 seconds]
duncannz has joined #ruby
Guest65447 has joined #ruby
<shevy>
\o/
<mallu>
shevy: that is correct ourput
<mallu>
output
<shevy>
I had my arms cheering there
<shevy>
\o/
sinkensabe has quit [Ping timeout: 250 seconds]
<shevy>
you need to make your data as simple as possible
arya_ has joined #ruby
<mallu>
this is what I am getting from aws
szu_ has joined #ruby
thams has quit [Quit: thams]
<mallu>
what is the best way to get volumeID in my case?
<shevy>
that depends on how your data structure looks like
Wolland has quit [Remote host closed the connection]
<shevy>
array.map {|test| test['Ebs']['VolumeId']
thams has joined #ruby
<mallu>
isn't it what I have here? volume_ids['Reservations'][0]['Instances'][0]['BlockDeviceMappings'].map do |volume_id| volumes = volume_id['Ebs']['VolumeId']
<shevy>
I think so
<shevy>
but you do further operations inside there
<shevy>
it is usually best to just finish your operation and use variables
<shevy>
it will be easier to read as well
<shevy>
and btw
<shevy>
please use something better than pastebin.com :D
<Noob101>
I will be taking an Hiatus from learning a plethora of ruby because...I was introduced to C by the CEO.
<Noob101>
I am sorry, ruby is such a wonderful language but he told me that if I want a career with computer programming/computer science then C is the way.
jayunit100 has joined #ruby
<Noob101>
I am sorry!!!!! ;___;
<robscormack>
Noob101 why is that bad news?
<Noob101>
robscormack: Because I am told to stick with one language.
<Noob101>
I don't know a lot about OS but I know that Linux is a variable of Unix?
<benzrf>
1. it's a unix [depending on your definition]
<benzrf>
2. it's FOSS
<Noob101>
I was reading on the web a little.
mary5030 has quit [Remote host closed the connection]
<benzrf>
Noob101: it's a unix descendent, of sorts
<peret>
use whatever the fuck you want for a desktop, dont let some jerk try to tell you what to use
<benzrf>
Noob101: linux is a kernel
<Noob101>
peret: It's fine, I know them. :)
<benzrf>
peret: ok, but can we agree that doing dev on windows is a bad idea
<Noob101>
benzrf: What is a kernel I see this word a lot.
mary5030 has joined #ruby
<peret>
benzrf: Yes, I personally agree. But its an individual choice.
<benzrf>
bleh
<Noob101>
Linux huh. MAN I DON'T KNOW! >:(
<benzrf>
Noob101: a kernel is a piece of software that runs when you boot a system
<benzrf>
Noob101: it manages the lowest level parts
yano has quit [Ping timeout: 612 seconds]
<benzrf>
like processes
<Noob101>
benzrf: Lower level parts?
<benzrf>
and it contains hooks for things like file systems
<Noob101>
I don't know a lot of hardware either.
<peret>
Noob101: A kernel is the heart of an operating system. It interfaces with all the systems hardware devices and makes them available to software to manipulate
<mallu>
hparker: I think that worked!
<benzrf>
Noob101: if you think of a system as a house, then the kernel is the foundation
<benzrf>
more or less
<Noob101>
So kernel is between hardware and software?
banjara has quit [Quit: Leaving.]
<benzrf>
Noob101: no, it's software
<Noob101>
oh ok
<peret>
Noob101: its the lowest level software which talks to the hardware
<Noob101>
What does a kernel look like.
ascarter has joined #ruby
<hparker`>
good mallu I would also try to allign your ends and consider shevy's comments while you are in the file.
<Noob101>
Oh ok, is it like machine code?
ascarter has quit [Max SendQ exceeded]
<benzrf>
Noob101: when you boot into your OS install, the first process launched is the kernel. the kernel then continues running under everything else, managing the other stuff
<peret>
Noob101: very close
<peret>
Noob101: you are on the right track
<peret>
Noob101: <3
<Noob101>
peret: Yeeey! >:)
ascarter has joined #ruby
<benzrf>
Noob101: the kernel is in charge of switching between processes and managing resources and all the other stuff necessary for programs to not have to worry about hardware
<Noob101>
benzrf: Ahhhhhhhhhhh good answer.
<Noob101>
Very des-scrip-tive.
<benzrf>
Noob101: hardware-specific stuff is usually in the form of drivers, which are extra bits that you can plug into your kernel
* peret
looks into his crystal ball...
<peret>
benzrf uses ubuntu
<peret>
amirite?
<benzrf>
yes
<benzrf>
yfeldblum:
<benzrf>
*y
MatthewsFace has quit [Ping timeout: 255 seconds]
<Noob101>
benzrf: Hmm. I am going to take mouse squad course this year to learn C++ and hardware stuff.
<benzrf>
Noob101: dont learn c++
<peret>
Noob101: Ive been a linux admin for 10 years ;-)
<benzrf>
it's bad
<Noob101>
benzrf: I'll come back to you about this hardware stuff.
<peret>
LIES
<Noob101>
Wait don't learn c++?
banister has joined #ruby
<peret>
C++ IS GOOD
danijoo has quit [Read error: Connection reset by peer]
<Noob101>
Um um which one????
DerMann has left #ruby [#ruby]
<benzrf>
c++ is like java and C had a deformed baby
<Noob101>
Dont learn or learn? :o
<Noob101>
loooooooooool benzrf
mary5030 has quit [Ping timeout: 244 seconds]
<benzrf>
Noob101: if you want to understand lower-level stuff, learn asm and/or C
danijoo has joined #ruby
<Noob101>
benzrf: You are going to get charged with slander by C++
<peret>
Noob101: it is suggested that you learn one new language every year....but remember you can only do one thing at a time
<benzrf>
if you want to know about crappy object systems, learn java
<Noob101>
jk benzrf
<benzrf>
but c++ is not a good learning language
<Noob101>
benzrf: I am learning C
<benzrf>
it may be a language that gets things done™ but it's not one that you will learn a lot from
<benzrf>
afaict
<peret>
benzrf is correct, C++ is not a good learning language in my opinion
MatthewsFace has joined #ruby
aspires has quit []
<Noob101>
benzrf: The book I am reading is called..."Learn C on the Mac" Dave Mark Apress
<w09x>
hey folks, given an array of integers what is the best way to find the top x%?
arya_ has quit [Ping timeout: 240 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mallu>
hparker: I have one more question.. I have a json similar to this... http://pastie.org/9438085 what I want to do is, search for a pattern in Description then get the snapshotid
fly2web has quit [Quit: fly2web]
jaimef has quit [Excess Flood]
klaut has quit [Remote host closed the connection]
havenwood has joined #ruby
noeden has quit [Ping timeout: 272 seconds]
klaut has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
ascarter has joined #ruby
Atrumx has quit [Remote host closed the connection]
mr_snowf1ake has quit [Ping timeout: 256 seconds]
jaimef has joined #ruby
hamakn has joined #ruby
nateberkopec has joined #ruby
AlexBlom has quit [Ping timeout: 240 seconds]
duncannz has quit [Quit: Leaving]
vsoftoiletpaper has quit []
szu_ has quit [Quit: Leaving]
aspires has joined #ruby
hamakn has quit [Remote host closed the connection]
mspah_ has joined #ruby
krisquigley has quit [Remote host closed the connection]
klaut has quit [Ping timeout: 255 seconds]
jimg has quit [Remote host closed the connection]
robscormack has quit [Quit: Leaving]
macclearich__ has quit [Quit: Computer has gone to sleep.]
jimg has joined #ruby
phoo1234567 has quit [Quit: Leaving]
mijicd has quit [Remote host closed the connection]
macclearich__ has joined #ruby
Hobogrammer has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
arya_ has joined #ruby
jimg has quit [Ping timeout: 240 seconds]
macclearich__ has quit [Ping timeout: 264 seconds]
fold has joined #ruby
landodger has quit [Remote host closed the connection]
kireevco has quit [Read error: Connection reset by peer]