apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
mneorr has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
mneorr has joined #ruby
minijupe has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
rmascarenhas has quit [Quit: leaving]
kawa_xxx has quit [Read error: Connection reset by peer]
kawa_xxx has joined #ruby
mpereira has quit [Remote host closed the connection]
mneorr has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
liluo has joined #ruby
kawa_xxx has quit [Remote host closed the connection]
S2kx has joined #ruby
S1kx has quit [Ping timeout: 252 seconds]
benatwork has joined #ruby
binaryplease has quit [Quit: WeeChat 0.3.7]
A124 has joined #ruby
A124 has left #ruby [#ruby]
schovi has quit [Remote host closed the connection]
benatwork has quit [Ping timeout: 245 seconds]
amalvagomes has joined #ruby
apok has joined #ruby
c0rn has joined #ruby
jameshyde has joined #ruby
fantazo has joined #ruby
jenrzzz-mac has quit [Ping timeout: 252 seconds]
ryanf has joined #ruby
jenrzzz-mac has joined #ruby
<marwan_>
rubiest i had something tricky here with hashes and array - any help
shtirlic has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
moshee has quit [Ping timeout: 265 seconds]
moshee has joined #ruby
tscolari has joined #ruby
yabuki has joined #ruby
bambanx has joined #ruby
<bambanx>
hi
jenrzzz-mac has quit [Ping timeout: 260 seconds]
freeayu__ has joined #ruby
apok has quit [Quit: apok]
c0rn has quit []
iocor has quit [Quit: Computer has gone to sleep.]
jameshyde has quit [Quit: Leaving]
yonggu has joined #ruby
fayimora_ has joined #ruby
liluo has quit [Remote host closed the connection]
sbanwart has quit [Ping timeout: 245 seconds]
jetblack has joined #ruby
bambanx has quit [Ping timeout: 260 seconds]
fayimora has quit [Ping timeout: 264 seconds]
fayimora_ is now known as fayimora
emet has joined #ruby
banister_ has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
fivetwentysix has joined #ruby
ramblex has quit [Quit: ramblex]
naz has joined #ruby
BrokenCog has quit [Read error: Connection reset by peer]
amalvagomes has quit [Quit: amalvagomes]
<offby1>
Marwan_: describe the problem. Ideally in a way that I can reproduce it.
<macmartine>
Now how come in this case 'p recurring_weekdays' doesn't return the same thing that '@recurring_weekdays' does? https://gist.github.com/2865612
banister_ has quit [Remote host closed the connection]
<offby1>
Marwan_: the stuff you want is part of a key, not a value; so you'll have to do something like your_hash.keys.filter {|k| k[0] == "url"}
<marwan_>
offby1: ok i will try that
<marwan_>
thank
<offby1>
h.keys.find{|k| k[0] == "url"}[1] seems to work
yabuki has quit [Remote host closed the connection]
<offby1>
but you'll need to think about error handling
<offby1>
may I ask where that hash came from? It's kinda weird, using arrays as keys.
tscolari has quit [Remote host closed the connection]
yabuki has quit [Quit: Leaving...]
siksia has joined #ruby
mengu has quit [Remote host closed the connection]
LiquidInsect has quit [Ping timeout: 265 seconds]
ringotwo has joined #ruby
c0rn has joined #ruby
larissa has joined #ruby
LiquidInsect has joined #ruby
ringotwo has quit [Remote host closed the connection]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
ringotwo has joined #ruby
benatwork has joined #ruby
benatwork has quit [Ping timeout: 245 seconds]
fbernier has quit [Ping timeout: 245 seconds]
Whoop has quit [Quit: WeeChat 0.3.7]
ananthakumaran has joined #ruby
dbgster has quit [Quit: dbgster]
Whoop has joined #ruby
Whoop has quit [Changing host]
Whoop has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
Facefox has quit [Ping timeout: 240 seconds]
puff has joined #ruby
<puff>
Evening. I've decided to take another crack at ruby, this time a simple web client to regularly fetch and save an RSS feed. Can somebody suggest a good tutorial for this sort of task?
bglusman has quit [Ping timeout: 245 seconds]
khakimov has joined #ruby
<puff>
I'm pretty good with java, so-so with perl, same with php, so I'm more interested in learning the "right" way to do it in ruby.
<offby1>
hmm, I'd be curious to know too
<offby1>
sounds like a good intro project, actually.
chessguy has joined #ruby
ryanf has quit [Quit: leaving]
flip_digits has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<puff>
offby1: Yeah... my other first project was augmenting an existing project, hostmap. The universal reaction by expereinced rubyists was "oh god why would you want to work with *this* code as your first ruby project" :-)
<rking>
puff: If you find any problems with it (or other possible improvements) make a pull request.
ryanf has joined #ruby
<rking>
(And, btw, if you don't know how to do that I'd be happy to walk you through it.)
<puff>
rking: I'll consider that when I'm good enough at ruby to improve somebody else's code :-).
<offby1>
I assume there are libraries to process RSS, but I also assume you'd rather not use them, since the point is to learn
<rking>
hostmap?
ryanf has quit [Remote host closed the connection]
CheeToS has quit [Ping timeout: 252 seconds]
<puff>
rking: Oh, sorry, you mean you skimmed the tutorial. Cool.
<rking>
puff: Nah man. Improving docs is natural. You almost always have something to offer.
<puff>
rking: Thanks.
<rking>
That's why I like Wikis.
<puff>
rking: Yeah, I'll certainly keep track of any rough spots.
kah_ has quit [Ping timeout: 245 seconds]
<puff>
offby1: eh, for now I just want to pull the data and save it.
<offby1>
I sort of hate wikis.
<puff>
offby1: Processing it will be the next step :-).
<rking>
offby1: Wherefore?
<puff>
wikis are what you make of them.
<offby1>
I do like that anyone can edit them ... but the pages on many wikis are just long sequences of comments, like the comments on a blog post. Happily Wikipedia is much better than that
looopy has quit [Remote host closed the connection]
radic has quit [Disconnected by services]
c0rn has quit []
<offby1>
but e.g., emacswiki.org ... pretty disorganized
radic_ has joined #ruby
radic_ is now known as radic
<puff>
offby1: Check out c2.com sometime :-).
<offby1>
yeah, that too
<offby1>
at least they have the excuse of being the world's first wiki.
looopy has joined #ruby
<puff>
rking: One bit, dunno if it'd really help in this case, but I *really* like to show people the actual content of an HTTP request, makes it a lot less "magic" and hence more accessible.
jcromartie has quit [Read error: Connection reset by peer]
jcromartie has joined #ruby
<rking>
puff: Yeah, good point. Maybe file an Issue, then?
noodletraveler has quit [Ping timeout: 245 seconds]
fbernier has quit [Ping timeout: 245 seconds]
noodletraveler has joined #ruby
jimeh2 has quit [Ping timeout: 252 seconds]
<offby1>
only thing I can think of: you've got something in an init file that is deleting the load path
macmartine has joined #ruby
noodletraveler has quit [Ping timeout: 248 seconds]
noodletraveler has joined #ruby
fubada has quit [Remote host closed the connection]
yosinof has quit [Quit: Leaving]
ringotwo has quit [Remote host closed the connection]
siksia has quit [Ping timeout: 252 seconds]
kevinbond has joined #ruby
h4mz1d has joined #ruby
noodletraveler has quit [Ping timeout: 250 seconds]
looopy has joined #ruby
benatwork has joined #ruby
noodletraveler has joined #ruby
maccosmo has quit [Quit: maccosmo]
bglusman has quit [Remote host closed the connection]
bglusman has joined #ruby
bglusman has quit [Read error: Connection reset by peer]
freeayu__ has quit [Ping timeout: 250 seconds]
Karmaon has quit [Ping timeout: 276 seconds]
bglusman has joined #ruby
benatwork has quit [Ping timeout: 245 seconds]
deryl has quit [Quit: Time To Go, So Sad!]
mmochan has quit [Ping timeout: 256 seconds]
minijupe has joined #ruby
ericcoleman has joined #ruby
deryldoucette has joined #ruby
noodletraveler has quit [Ping timeout: 265 seconds]
siksia has joined #ruby
noodletraveler has joined #ruby
deryldoucette has quit [Client Quit]
deryldoucette has joined #ruby
deryldoucette is now known as deryl
noodletraveler has quit [Ping timeout: 245 seconds]
noodletraveler has joined #ruby
uc has joined #ruby
mmsequeira_ has joined #ruby
mmsequeira has quit [Ping timeout: 252 seconds]
mmsequeira_ is now known as mmsequeira
nilg` has joined #ruby
banisterfiend has joined #ruby
noodletraveler has quit [Ping timeout: 256 seconds]
noodletraveler has joined #ruby
Tricks has joined #ruby
larissa has quit [Quit: gone]
rippa has joined #ruby
macmartine has quit [Quit: macmartine]
Solnse has joined #ruby
noodletraveler has quit [Ping timeout: 248 seconds]
Sinestro has joined #ruby
khakimov has joined #ruby
lkba has quit [Read error: Connection reset by peer]
L-----D has joined #ruby
AndChat| has joined #ruby
noodletraveler has joined #ruby
visof has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Quit: Leaving.]
Chryson has quit [Quit: Leaving]
noodletraveler has quit [Ping timeout: 240 seconds]
tomzx has quit [Ping timeout: 245 seconds]
noodletraveler has joined #ruby
Freelancer has joined #ruby
davidpk has joined #ruby
cha1tanya has quit [Ping timeout: 256 seconds]
Progster has quit [Ping timeout: 240 seconds]
c0rn__ has joined #ruby
noodletraveler has quit [Ping timeout: 252 seconds]
uc has quit [Ping timeout: 252 seconds]
looopy has quit [Remote host closed the connection]
AndChat| has quit [Ping timeout: 248 seconds]
noodletraveler has joined #ruby
<Tricks>
I think I'm misunderstanding how to use the json library to convert objects to json and back, anyone know what I'm doing wrong? http://pastebin.com/x0Gt55H4
kawa_xxx has joined #ruby
_blackbird has quit [Quit: _blackbird]
mlevin_ has quit [Ping timeout: 252 seconds]
noodletraveler has quit [Ping timeout: 250 seconds]
mikeycgto has quit [Remote host closed the connection]
mxweas_ has joined #ruby
noodletraveler has joined #ruby
emet has joined #ruby
emet has quit [Changing host]
emet has joined #ruby
Karmaon has joined #ruby
_blackbird has joined #ruby
brianpWins has joined #ruby
Solnse has quit [Remote host closed the connection]
nipra has joined #ruby
tonini has joined #ruby
uc has joined #ruby
bluebie has joined #ruby
noodletraveler has quit [Ping timeout: 256 seconds]
noodletraveler has joined #ruby
kawa_xxx has quit [Remote host closed the connection]
pdtpatrick has quit [Quit: pdtpatrick]
siksia has quit [Ping timeout: 245 seconds]
siksia has joined #ruby
Boohbah has quit [Ping timeout: 276 seconds]
h4mz1d has quit [Ping timeout: 245 seconds]
noodletraveler has quit [Ping timeout: 248 seconds]
<wopi>
Need some help with the presenter pattern, I have a bloated view which is displaying conditionally different partials : https://gist.github.com/17444525d988182a9b20 , any clues how to refactor ?
socomm has quit [Read error: Connection reset by peer]
igotnolegs has quit [Quit: Computer has gone to sleep.]
mxweas_ has joined #ruby
socomm has joined #ruby
fivetwentysix has quit [Quit: fivetwentysix]
busybox42 has joined #ruby
jprovazn has joined #ruby
dekroning has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
lolmaus has joined #ruby
<freeayu1>
http://pastie.org/4023695 I have an array,, how to output the number before each line, use the recursion
zommi has joined #ruby
jackbrownhf has quit [Quit: Sto andando via]
shadoi has quit [Remote host closed the connection]
Sou|cutter has quit [Quit: WeeChat 0.3.0]
<ryanf>
wopi: try asking that in #rubyonrails
<ryanf>
but with Draper you might call <%= @feedback.item.decorate.render %> as the entire body of the partial
<ryanf>
and then have a decorator for each class with a #render method
<dekroning>
hi
<wopi>
ryanf: thx
<bnagy>
freeayu1: it's going to look something like def dump_array( ary, level=[0] ); ary.each {|e| if e.kind_of? Array;dump_array( e, level << 1) else #increment level and print element}
heftig has quit [Quit: leaving]
<bnagy>
that should be enogh to get you going anyway
fivetwentysix has joined #ruby
zomgbie has joined #ruby
<bnagy>
or you could def dump_array( ary, prefix=[] ) and then use each_with_index {|e,i| "#{prefix}.#{i}" or recurse with prefix << ".#{i}"
gokul has quit [Quit: Leaving]
williamcotton has quit [Quit: williamcotton]
<freeayu1>
bnagy http://pastie.org/4023745 this is the code. I'm not sure how to add the increment level in the code
ipoval has quit [Quit: ipoval]
<bnagy>
freeayu1: for 'normal' recursion you would need to pass the prefix, or level, or something as a method argument when you recurse
<bnagy>
that's the main thing you're missing
ericcoleman has quit [Quit: leaving]
SegFaultAX|work2 has quit [Ping timeout: 244 seconds]
<banisterfiend>
bnagy: sup nags
<banisterfiend>
bnagy: still sick?
<bnagy>
banisterfiend: last night was pretty bad, worst is over though
noodletraveler has quit [Ping timeout: 240 seconds]
<freeayu1>
bnagy no idea about that
nirakara has quit [Quit: This computer has gone to sleep]
noodletraveler has joined #ruby
billiamii has quit [Quit: Leaving]
jcromartie has quit [Read error: Connection reset by peer]
jcromartie_ has joined #ruby
S2kx has quit [Quit: Leaving]
Hanmac has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
jcromartie_ has quit [Read error: Connection reset by peer]
S1kx has joined #ruby
S1kx has joined #ruby
S1kx has quit [Changing host]
JohnBat26 has joined #ruby
mucker has joined #ruby
eywu has quit [Quit: Leaving.]
looopy has quit [Remote host closed the connection]
zomgbie has quit [Read error: Connection reset by peer]
c0rn has quit []
<freeayu1>
bnagy difficult, I"m programnewbie
looopy has joined #ruby
<bnagy>
banisterfiend: how do I modify a line in a method in pry again?
<banisterfiend>
bnagy: you mean a method that you're currently defining in the repl? or a method that already exists somehwere (even on disk or in the repl) that u want to edit?
<banisterfiend>
bnagy: for the first, use amend-line or edit for the latter use edit-method
<bnagy>
yeah
<bnagy>
oh, edit meth will drop me into my editor, right
<eddie_>
How can i identify the language from unicode?
<eddie_>
or
<eddie_>
how is unicode distributed among languages?
<eddie_>
anyone?
tomzx has quit [Ping timeout: 260 seconds]
<bnagy>
I wasn't aware you could
<eddie_>
bnagy: Like cod
<eddie_>
code 0 200 English
<eddie_>
or something like that
<eddie_>
?
<eddie_>
any ranges?
geekfactor has quit [Remote host closed the connection]
geekfactor has joined #ruby
lolsuper_ has joined #ruby
<bnagy>
you mean just from looking at a naked unicode string, right?
iori has joined #ruby
vonsar has quit [Remote host closed the connection]
nirakara has joined #ruby
mxweas_ has quit [Quit: Computer has gone to sleep.]
joshcheek has joined #ruby
tk___ has joined #ruby
jonathanwallace has joined #ruby
zommi has quit [Remote host closed the connection]
titas9x has joined #ruby
<adac>
How can I debug a post request? Getting this error: /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:2221:in `read_status_line': wrong status line: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">" (Net::HTTPBadResponse)
<titas9x>
hi all how can i add sum of some perticular value of an arrey
BiHi has joined #ruby
noodletraveler has quit [Quit: leaving]
<hoelzro>
titas9x: try Enumerable#reduce
<titas9x>
I have a arrey students [name, score]
<titas9x>
I want to add sum of all score
<titas9x>
all studen score
<titas9x>
sprry all student score
<hoelzro>
titas9x: my advice still applies
<titas9x>
thanks you so much but can u little explain it please
<titas9x>
I am quite new with ruby
iamjarvo has quit [Quit: Leaving.]
<hoelzro>
titas9x: reduce is a method that takes a block
Criztian has joined #ruby
<hoelzro>
that block takes two parameters
<hoelzro>
and does something with them
<titas9x>
ok
<hoelzro>
the result of that block is then passed into the next invocation of the block as the first parameter
<titas9x>
got it but need little more clearence
<titas9x>
I am with a rails project
<titas9x>
in there any shortcut in rails so that i can reduce it properly in rails
<hoelzro>
it's not Rails-specific
dv310p3r has quit [Ping timeout: 245 seconds]
<hoelzro>
titas9x: try consulting the Enumerable documentation and looking for the word 'sum'
<titas9x>
ok thank you again for your gr8 support
cantonic_ has joined #ruby
cha1tanya has quit [Ping timeout: 245 seconds]
cantonic has quit [Read error: Connection reset by peer]
cantonic_ is now known as cantonic
heftig has quit [Ping timeout: 245 seconds]
cousine has joined #ruby
rt456tgurt has left #ruby [#ruby]
geekbri has joined #ruby
elhu has quit [Ping timeout: 260 seconds]
Integralist has joined #ruby
Integralist has left #ruby [#ruby]
nfk has joined #ruby
celm has joined #ruby
cHarNe2 has joined #ruby
berkes has joined #ruby
AmirBehzad has joined #ruby
indian has joined #ruby
indian has quit [Changing host]
indian has joined #ruby
chessguy has quit [Read error: Connection reset by peer]
chessguy has joined #ruby
<AmirBehzad>
I'm new to Ruby. I want to create a hash of words from a string. When I capture the words using match(), I'm going to create a hash of words. But the hash keys contain brakets, like ["MyWord"]. I don't want the brackets
indian has quit [Remote host closed the connection]
keanehsiao has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
<keanehsiao>
hihi
anonymous1 has quit [Read error: Connection reset by peer]
anonymous2 has joined #ruby
<keanehsiao>
how do I make bourbon to works with my rails ? it seems not compile scss automatically
iamjarvo has joined #ruby
Guest85656 has quit [Ping timeout: 250 seconds]
liluo has joined #ruby
QaDeS has joined #ruby
`brendan has joined #ruby
kalleth_ has quit [Read error: Connection reset by peer]
AmirBehzad has left #ruby [#ruby]
kalleth_ has joined #ruby
krusty_ar has joined #ruby
philcrissman has quit [Remote host closed the connection]
anonymous2 has quit [Ping timeout: 240 seconds]
anonymous1 has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
siksia has quit [Ping timeout: 252 seconds]
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
lxsameer has quit [Max SendQ exceeded]
nanderoo has joined #ruby
knightblader has quit [Quit: User disconnected]
lxsameer has joined #ruby
benatwork has joined #ruby
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
lxsameer has quit [Max SendQ exceeded]
siksia has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
benatwork has quit [Ping timeout: 245 seconds]
SPYGAME has quit [Quit: Leaving]
heftig has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
siksia has quit [Ping timeout: 244 seconds]
titas9x has left #ruby [#ruby]
anonymous1 has quit [Read error: Connection reset by peer]
anonymous1 has joined #ruby
siksia has joined #ruby
N_2 has joined #ruby
rgrinberg has quit [Ping timeout: 265 seconds]
mengu has joined #ruby
DuoSRX has quit [Remote host closed the connection]
DuoSRX has joined #ruby
xaxisx has joined #ruby
liluo has quit [Remote host closed the connection]
b1rkh0ff has quit [Ping timeout: 260 seconds]
tscolari has joined #ruby
fbernier has joined #ruby
ecolitan has quit [Remote host closed the connection]
N_2 has left #ruby [#ruby]
ramblex has joined #ruby
bglusman has quit [Ping timeout: 245 seconds]
anonymous1 has quit [Ping timeout: 252 seconds]
dchelimsky has joined #ruby
dchelimsky has quit [Remote host closed the connection]
lopin has joined #ruby
marmae_ has joined #ruby
nirakara has quit [Quit: This computer has gone to sleep]
<rking>
_br_: Or blocks, or lambdas. Just something that puts code around it, then at that point the proc_.call happens whenever you want.
blacktulip has quit [Remote host closed the connection]
<_br_>
rking: Thanks! I'll try that
carloslopes has joined #ruby
fantazo has joined #ruby
ElitestFX has quit [Ping timeout: 245 seconds]
chson has quit [Remote host closed the connection]
internet_user has joined #ruby
<cout>
the problem with actually changing the contents of the Proc is that the code is stored in a format that's internal to the interpreter (AST on 1.8, bytecode on 1.9)
<rking>
I'm not going to like. CatCopter is pretty epic.
zii has joined #ruby
zii has left #ruby ["WeeChat 0.3.7"]
<_br_>
cout: Hm, I see, so if I do this then it would be brittle and depend on the interpreter. I see, maybe a bad idea to do it this way then, hmmm
Apocalypse has joined #ruby
niklasb has joined #ruby
fixl has quit [Remote host closed the connection]
blacktulip has joined #ruby
<cout>
_br_: depends on your goals
<Hanmac>
_br_ make a pastie what are you trying todo
nlc has joined #ruby
CannedCorn has joined #ruby
hynkle has joined #ruby
<_br_>
Hanmac: let me try a little, if I really can't figure it out I'll ask the sages of #ruby here and you :)
uris has joined #ruby
<CannedCorn>
is there any equivalent to decode_www_form in ruby 1.8.7
banisterfiend has quit [Read error: Connection reset by peer]
Jake232 has joined #ruby
lxsameer has quit [Quit: Leaving]
lorandi has joined #ruby
banisterfiend has joined #ruby
cousine has quit [Remote host closed the connection]
anykey__ has joined #ruby
anykey__ is now known as any-key
bluenemo has quit [Remote host closed the connection]
nricciar has joined #ruby
cousine has joined #ruby
pu22l3r has joined #ruby
n1x has joined #ruby
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
<shevy>
is there any way to find out what action a thread holds?
<shevy>
thread = Thread.new {sleep 11; puts 'hi'}
ananthakumaran has joined #ruby
bluenemo has joined #ruby
Ankhers has joined #ruby
siksia has quit [Ping timeout: 244 seconds]
abra has joined #ruby
ptka has joined #ruby
bluenemo has quit [Remote host closed the connection]
i256 has quit [Quit: Idę]
gabe_hollombe has joined #ruby
berkes has quit [Quit: Ex-Chat]
<gabe_hollombe>
Hey all. If I have a string in ruby 'a:b c:d' and I'd like to split on space then split each array item by :, is there a more elegant solution than 'a:b c:d'.split(' ').collect{|i| i.split(':')} ?
crankycoder has joined #ruby
abra has quit [K-Lined]
crankycoder has quit [Remote host closed the connection]
ecolitan has joined #ruby
bbttxu has joined #ruby
crankycoder has joined #ruby
lolmaus has quit []
siksia has joined #ruby
<_br_>
shevy: Why don't you try after the line you pasted to tag the thread with something descriptive? e.g. thread = Thread.new{ sleep 11; puts "hi" } ; thread[:action] = "Hi" ; thread[:action] ; => "Hi"
<bnagy>
gabe_hollombe: well that's functionally equivalent to split /[ :]/ no?
<_br_>
shevy: not sure if that is what you want
benatwork has joined #ruby
<shevy>
_br_ hmm. I need something like a mini cron, in ruby. "in 20 hours, do this".
<becom33>
here I was wondering how can I create a local proxy . get all the traffic which is going trought the browser and print it off the terminal
<shevy>
bnagy lol
<gabe_hollombe>
bnagy: gesus
<omry>
hi. trying to post some data with ruby 1.9.2 on debian (1.9.1 package), and I get this : /usr/lib/ruby/1.9.1/net/http.rb:1593:in `set_form_data': undefined method `map' for "{}":String (NoMethodError) , any idea?
freeayu1 has quit [Quit: 离开]
Ankhers has quit [Remote host closed the connection]
<bnagy>
becom33: have you seen burp ?
<hoelzro>
becom33: I assume you mean an HTTP proxy?
<_br_>
bnagy: playing golf are we? :D
<becom33>
hoelzro, yea
Ankhers has joined #ruby
kevinbond has joined #ruby
<becom33>
yea bnagy :)
<hoelzro>
I'm sure that there's a basic Rack application for that
PaciFisT has joined #ruby
<bnagy>
_br_: not really, it was in response to a question, but I was wondering what you can do if the list of things to split on is arb. length
<CannedCorn>
hey is there a way to make split use one one separator or another, throw an error if they are mixed
tonini has quit [Remote host closed the connection]
kaiwren has quit [Ping timeout: 248 seconds]
kaiwren_ is now known as kaiwren
xoebus has quit [Quit: Quit. brb.]
<bnagy>
CannedCorn: not sure what you mean
nari has joined #ruby
<gabe_hollombe>
gnite all. bnagy thanks for your input
gabe_hollombe has quit [Quit: gabe_hollombe]
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
mdw has joined #ruby
h4mz1d has joined #ruby
lorandi has quit [Remote host closed the connection]
nricciar has joined #ruby
<CannedCorn>
so lets say you have a string
<CannedCorn>
and i want to either split on one seperator ; or &
<CannedCorn>
but if the string contains both i want to throw an error
dkissell has joined #ruby
mdw has quit [Remote host closed the connection]
hamfz_ has joined #ruby
dkissell has left #ruby [#ruby]
<bnagy>
no you need logic to do that
Raduwen has joined #ruby
<bnagy>
test include? and then decide what to do, etc I suppose
<bnagy>
dinner
nricciar has quit [Client Quit]
anatop has joined #ruby
simao has quit [Ping timeout: 265 seconds]
bird__ has quit [Remote host closed the connection]
Araxia_ has quit [Quit: Araxia_]
nahhh has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
rasbonics has quit [Quit: rasbonics]
lorandi has joined #ruby
savage- has joined #ruby
rasbonics has joined #ruby
Jake232 has quit [Quit: Computer has gone to sleep.]
joast has quit [Quit: Leaving.]
fpd has quit [Ping timeout: 244 seconds]
zomgbie has quit [Read error: Connection reset by peer]
ghanima has joined #ruby
<hashpuppy>
stupid question. is there some template for generating standalone ruby apps? like generating the Gemfile, lib directory, Rakefile?
wallerdev has quit [Quit: wallerdev]
<hoelzro>
I'd like to know this as well, actualy
* hoelzro
misses Dist::Zilla
<_br_>
shevy: haha I've found another way to solve your thread issue by playing with the idea to use ruby2ruby. Its totally nuts but it works.. https://gist.github.com/2868864 :DDDD
<_br_>
Cpudan80: In short, use %s instead of your %1 stuff.
<_br_>
bbl
<hoelzro>
ha, I didn't even notice that =P
kaiwren has joined #ruby
savage- has quit [Remote host closed the connection]
kaiwren has quit [Client Quit]
<Cpudan80>
yeah I was just looking at that
jamescotterill has quit [Remote host closed the connection]
<Cpudan80>
Yeah, I think the guy who wrote this used some.... less than kosher thigns
ryan has joined #ruby
ryan is now known as Guest1096
flip_digits has joined #ruby
cousine has joined #ruby
Guest1096 has quit [Remote host closed the connection]
ryan0x2 has joined #ruby
maesbn has quit [Remote host closed the connection]
<theRoUS_>
is there a good gem providing X11 bindings/API for ruby? i need to get the geometry of a particular window.. i am *not* an X hacker by any means
siksia has joined #ruby
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
recursive has joined #ruby
<recursive>
what is the proper http status-code for a webpage that is a temporary placeholder (basically i am taking down a server and have a construction site that is going to be used for 15 minutes or so)
BiHi has quit [Ping timeout: 245 seconds]
adac has quit [Read error: Operation timed out]
joast has joined #ruby
<theRoUS_>
recursive: 503 Service Not Available, with a header-field (i forget the name) that tells the number of seconds in which to retry
<LordDoskias>
i want to build a hash which hash key <=> array mapping, but in the same time i want each time a i have a match for a particular key to add an element to the array that this key maps to, how can i do that?
iamjarvo has quit [Read error: Connection reset by peer]
Urth|Away has quit [Ping timeout: 240 seconds]
savage- has quit [Write error: Connection reset by peer]
<ben_m>
Hey there! Is there a builtin shortcut for this in Ruby? `x && x.foo` ie. check if x is actually non-nil, then call method
<LordDoskias>
i have something like : words.each {|word| group[word.chars.sort_by(&:downcase).join] = [add word to the already existing list OR create a new list with just this word] }
Drewch_ has joined #ruby
savage- has joined #ruby
<Mon_Ouie>
x && x.foo is already short
Araxia_ has joined #ruby
zomgbie has joined #ruby
<ben_m>
Mon_Ouie, true, i just have very high expectations from Ruby nowadays
<ben_m>
Thought there would be something like x.?foo
williamcotton has quit [Quit: williamcotton]
DuoSRX has quit [Remote host closed the connection]
DuoSRX has joined #ruby
Urth|Away has joined #ruby
jeebster has quit [Quit: Leaving.]
thecreators has joined #ruby
the_jeebster has joined #ruby
ank has joined #ruby
SegFaultAX|work2 has joined #ruby
schovi has joined #ruby
<lectrick>
what is the plural of regex? regexen? regexes?
<Mon_Ouie>
regular expressions?
<ben_m>
regexps?
<Hanmac>
ben_m: i prefer the non-short version: x.foo unless x.nil?
<yxhuvud>
ben_m: if using rails, then you can use .try :foo
counterbeing has joined #ruby
<ben_m>
yxhuvud, not using rails, but will remember that for when I am :)
crankycoder has joined #ruby
<lectrick>
ben_m: Indeed eh
wallerdev has joined #ruby
<lectrick>
Mon_Ouie: Oh you're so pedantic
<ben_m>
Hanmac, it's part of a conditional already though, `end until h['key'] && h['key'].zero?`
joast has joined #ruby
joast has quit [Client Quit]
<Hanmac>
lectrick: wiktionary says: regexes
mrsolo has joined #ruby
davidw has quit [Ping timeout: 252 seconds]
<yxhuvud>
ben_m: h['key'] == 0
* ank
votes regexes
<LordDoskias>
words.each {|word| anagram_group[word.chars.sort_by(&:downcase).join] << word } is this valid?
peregrine81 has joined #ruby
bier has joined #ruby
MissionCritical has joined #ruby
wracoon has joined #ruby
maletor has joined #ruby
<shevy>
looks to be valid
<lectrick>
Hanmac: i still like regexen
<ben_m>
yxhuvud, ooh, I thought that would break when the key doesn't exist. Oh well, thanks :)
flagg0204 has joined #ruby
<LordDoskias>
but it doesn't do what it is supposed to do. I want to feed an array of words and then group them depending on whether they are anagrams, and to see if 2 words are anagrams I sort their letters case insensitive and use that as the key to my hash
BiHi has quit [Quit: Computer has gone to sleep]
habib has joined #ruby
<habib>
Heya!
flagg0204 has quit [Client Quit]
zomgbie has quit [Read error: Connection reset by peer]
joast has joined #ruby
Codif has joined #ruby
<yxhuvud>
LordDoskias: how is anagram_group defined?
<Hanmac>
offby1 you could try swig ... but i does NOT recoment it ...
<LordDoskias>
Hanmac, i don't really understand your suggestions. i just started learning ruby
<LordDoskias>
i mean i understand the block and the iterators
<LordDoskias>
but where is this saved?
<yxhuvud>
LordDoskias: yes. It also seems you need to use += [] instead of <<
<shevy>
LordDoskias in that code nowhere
<shevy>
or in words
<shevy>
:P
<shevy>
I dunno if group_by modifies self
mikepack has joined #ruby
<Hanmac>
shevy: group_by returns an new hash
<shevy>
ok
<LordDoskias>
yxhuvud, erm, how exactly would that look because words.each {|word| anagram_group[word.chars.sort_by(&:downcase).join] += word } is not working
<yxhuvud>
[word]
<shevy>
LordDoskias you dont have to cram everything into one line man
<Hanmac>
LordDoskias: why dont you want my code? ... your code does not work correct
dr_bob has joined #ruby
apok has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
<LordDoskias>
yxhuvud, thanks, it is working now. but why do I need to do += [word] doesn't, this mean "append a 1-element list for this key" ?
<LordDoskias>
or it is a short-hand for "append this element to the list which this key maps to "
<LordDoskias>
Hanmac, because I don't understand :)
<yxhuvud>
because apparently the array isn't set correctly if you never call Hash[]=
<LordDoskias>
also which form is preferable: blah.each {|something| jhdfjhdf} or blach.each do |something| \ lines \ of \ code \ end
maesbn has quit [Remote host closed the connection]
<Hanmac>
LordDoskias: word.each_char.map(&:downcase).sort.join does this: each_char creates an iterator/enumerator, map transforms the chars into ins little variants, sort and join creates a new string ... your code only runs sort_by wich is NOT what you want
<shevy>
LordDoskias both are almost identical, the {} form has higher binding than do/end though. also it is 2 characters, whereas do/end is 5 characters :D
<LordDoskias>
Hanmac, but with my code (After yxhuvud intervention) i get the expected result
counterbeing has quit [Ping timeout: 265 seconds]
<yxhuvud>
LordDoskias: what version of ruby do you have?
<shevy>
2.0
<LordDoskias>
shevy, the thing is i'm following a course that uses ruby and the instructors said that in the world of ruby it is better to use iterators and the likes rather than loops
<LordDoskias>
yxhuvud, 1.9.3
<shevy>
LordDoskias what loops exactly?
simao has quit [Ping timeout: 265 seconds]
<shevy>
loop {} I like a lot
<LordDoskias>
shevy, in general like for
<shevy>
yeah, for I cant stand
<shevy>
also not too fond of while
<LordDoskias>
in java the shorthand for each is awesome :D
jrist is now known as jrist-mtg
<yxhuvud>
anyhow, anagram_group = words.group_by {|word| word.downcase.chars.sort.join} is probably easier to read and understand.
anatop has quit []
lxsameer has quit [Quit: Leaving]
joshcheek has joined #ruby
jchauncey has joined #ruby
joshman_ has joined #ruby
shadoi has joined #ruby
the_jeebster has quit [Ping timeout: 245 seconds]
carloslopes has joined #ruby
qwerxy has quit [Quit: Computer has gone to sleep.]
<LordDoskias>
how do i view the available documentation for an enumerator?
tewecske has joined #ruby
<LordDoskias>
on ruby-docs i see for example that chars → an_enumerator so how do i go to an_enumerator's documentation?
<Cpudan80>
And I think the 1.8.6 that I have is .... customized
<shevy>
it works on 1.8.7 though
<shevy>
they backported quite a bit
v0n has joined #ruby
<Cpudan80>
It's some damn google sketchup screwed up ruby
<Cpudan80>
It doesnt even have Tempfile
<shevy>
it should not be too difficult to write your own version though
zommi has joined #ruby
fumduq has joined #ruby
<shevy>
class File; def self.basename ... hmm
<Cpudan80>
No, it wasn't - that's what I did :-)
<shevy>
and inside that method, split on '/'
<shevy>
ok
<Cpudan80>
But it just bothers me that google packaged their own ruby...
<Cpudan80>
but, it is google
<Cpudan80>
Thou shalt not question anything
<shevy>
indeed
<shevy>
they will one day destroy javascript with ...
<shevy>
dart !!!
<Cpudan80>
I've worked primarily with their stuff for about 4 years
<shevy>
well
tchebb has joined #ruby
<Cpudan80>
I've yelled and screamed at my google rep before
<shevy>
what I like is ... google search (still ...) and gmail
<Cpudan80>
all to no avail
<Cpudan80>
They do what they want, not what is correct, or what the customer wants
<shevy>
google+ I think sucks, most other google things are in between... ah... google maps is useful
srid_ has joined #ruby
srid_ has quit [Changing host]
srid_ has joined #ruby
srid_ has joined #ruby
<shevy>
but I kinda think they got too big :\
srid_ is now known as srid
lopin has quit [Ping timeout: 250 seconds]
<jedmtnman>
shevy: dart = "javascript"[0..3]
<shevy>
:D
<shevy>
I think that is what I disliked the most about it ... it seemed even more verbose than javascript
jjjj has joined #ruby
<shevy>
I also dont understand how things evolve anyway... we then have a terser language (coffeescript), and one that is more verbose (dart)
<shevy>
wish I could use ruby instead
atmosx has joined #ruby
<jedmtnman>
shevy: I only looked at it briefly, but it seemed to take the standard OOP approach, instead of making the most out of the best parts like functions and prototypes
sepp2k has joined #ruby
apok has joined #ruby
williamcotton has joined #ruby
<jedmtnman>
shevy: well being as this is the ruby channel, i can only say that coffeescript was the implied alternative to my last statement.
monoman has joined #ruby
<jedmtnman>
and now back to ruby :D
<monoman>
how can I check to see if the class of variable X is Y?
<jedmtnman>
anyway, bump to my original question, anyone know the current patch number of 1.9.2 stable?
tchebb has quit [Ping timeout: 245 seconds]
<monoman>
x.class.name =~ /Y/ ?
<jedmtnman>
monoman: try is_a?
<jedmtnman>
{}.is_a? Hash
thecreators has quit [Remote host closed the connection]
<monoman>
jedmtnman: cool, thanks
<jedmtnman>
monoman: np
looopy has quit [Remote host closed the connection]
tchebb has joined #ruby
joshcheek has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
undersc0re97 has joined #ruby
<habib>
how to update PATH to include build tools?
<habib>
cos i'm trying to instalncurses gem and it won't install without updating tPATH
shadoi has quit [Remote host closed the connection]
<Cpudan80>
Are there any built ins for creating zip files in ruby?
eph3meral has joined #ruby
looopy has joined #ruby
eddie has joined #ruby
eddie is now known as Guest32200
Guest32200 is now known as eddie_
looopy has quit [Remote host closed the connection]
jrist is now known as jrist-afk
<jedmtnman>
anyone have a guess at this error? is it a bug or the intended limitation of Hash syntax in 1.9.2 http://pastie.org/4026865
Defusal has quit [Ping timeout: 248 seconds]
<jedmtnman>
Cpudan80: probably just call out to the shell
<jedmtnman>
tscolari: basic premise is that an xml doc is just a tree data structure, so just use a tree data structure to represent it
<jedmtnman>
tscolari: a list of lists, basically
<erratic>
so basically its a serializer / deserializer
rmascarenhas has quit [Quit: leaving]
<bricker88>
Hello, I'm converting an object to json using to_json, and it's getting encoded when I want it to just be an actual JSON object. https://gist.github.com/2870102 What is the proper way to do this?
tchebb1 is now known as tchebb
wmoxam has joined #ruby
<bricker88>
Probably an obvious answer but I'm drawing a blank
<jedmtnman>
tscolari: because its a real data structure, you have access to all the enumerables, not just the subset that haml felt like implementing for iteration, you also have the 'safety', if you will, that on file load, its either a valid data structure, or not, rather than having to wait for the haml parser to interpret your view
<afallows>
Hey guys - I've got a Sinatra app, and I'd like to be able to kick off a command line operation and have a page gradually update with the stdout results in approximately real time (a few seconds of offset is quite fine). What gems/classes should I be reading up on?
simao has joined #ruby
choffstein has quit [Remote host closed the connection]
looopy has quit [Remote host closed the connection]
williamcotton has quit [Ping timeout: 245 seconds]
williamcotton_ is now known as williamcotton
TheRealPygo is now known as pygospa
<jedmtnman>
tscolari: gonna have to look into that. maybe i can build on it, or they already solved my problem :)
<tscolari>
jedmtnman :)
<tscolari>
jedmtnman in this templating solution there could be no logic at all in the view?
undersc0re97 has quit [Quit: Leaving]
<jedmtnman>
tscolari: i thought i would hate hiccup, but ended up loving it. has the s/n ratio of haml without having to switch context
<jedmtnman>
also Hanmac this is unfortunate: k = "foo";{k:"foo"}
undersc0re97 has joined #ruby
<tscolari>
jedmtnman I'll definitely give it a look
<Hanmac>
jedmtnman: you could do this: k = :"foo"
<bricker88>
Just needed html_safe on there, duh… *facepalm*
simao has quit [Ping timeout: 265 seconds]
<jedmtnman>
tscolari: normally i am not on this channel, but if you're a regular, i'll send you back a link when i publish (hopefully friday), otherwise you can DM me with your contact info
JohnBat26 has joined #ruby
<erratic>
robby
<erratic>
ruby robbed me of my senses
<erratic>
and didnt do anything for me
<erratic>
now I have a busted laptop
<erratic>
big old fist print in the lcd
arturaz has quit [Ping timeout: 252 seconds]
<jedmtnman>
tscolari: or you can get me here: github.com/jedschneider
mdw has quit [Ping timeout: 240 seconds]
<tscolari>
jedmtnman you could build you hash this way maybe: k="foo"; Hash[k, "foo", ...]. But then I would rather use the old syntax.
<jedmtnman>
tscolari: indeed. Hanmac I hadn't thought of that alternative
b3gott3n has joined #ruby
keanehsiao has quit [Quit: keanehsiao]
apok has quit [Remote host closed the connection]
banghouseAFK is now known as banghouse
jenrzzz-mac has joined #ruby
apok has joined #ruby
choffstein has joined #ruby
moshee has quit [Ping timeout: 244 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
sonicpond has joined #ruby
lsone has left #ruby [#ruby]
maxok has joined #ruby
maxaok has quit [Read error: Connection reset by peer]
piotr_ has joined #ruby
aantix has quit [Quit: aantix]
ZachBeta has joined #ruby
monoman has left #ruby [#ruby]
maxok has quit [Read error: Connection reset by peer]
andrewhl has quit [Remote host closed the connection]
cousine has quit [Remote host closed the connection]
<SAn>
the problem is that actually theres a bug in ruby-debug19
<banisterfiend>
SAn: use debugger gem instead
Squarepy has quit [Changing host]
Squarepy has joined #ruby
roams has joined #ruby
andrewhl has joined #ruby
daniel_hinojosa has joined #ruby
hynkle_ has joined #ruby
hynkle has quit [Read error: No route to host]
hynkle_ is now known as hynkle
<SAn>
banisterfiend: yes! :) it worked
youdonotexist has quit [Ping timeout: 265 seconds]
youdonotexist has joined #ruby
dax has joined #ruby
<eph3meral>
so, i wanna get this right, and, effectively I've not had much of a problem with this before, but... what exactly are the rules on local var names being the same as, e.g. method names on the current class? also esp re: class methods, like when do I need to call self.foo vs just foo to be sure I get a desired effect, be that using a local var or calling a class method?
blooberr has joined #ruby
<SAn>
banisterfiend: how can i use it? google only talks about ruby-debug
Tricks has quit [Read error: Connection reset by peer]
<banisterfiend>
SAn: it's the same
<banisterfiend>
SAn: just reuqire 'debugger' instead
<banisterfiend>
eph3meral: locals always win
<SAn>
banisterfiend: great, thanks :)
<banisterfiend>
eph3meral: if u want the method instead of the local then use self.method_name
<eph3meral>
banisterfiend, ok, does that apply for both instance and class methods?
<eph3meral>
because also, i've seemed to be able to call class methods and instance methods on the current object without using self.
<banisterfiend>
eph3meral: you cant call class methods on the instance
<banisterfiend>
so it wont be an issue
<eph3meral>
k, but i'm not talking crossing between instance and class methods
<banisterfiend>
eph3meral: well there's nothing special about class methods, they're just instance methods on the metaclass. So the same rules apply re locals
<banisterfiend>
locals always win :)
siksia has quit [Ping timeout: 244 seconds]
<eph3meral>
so, i guess here's the crux of where I'm stuck, does that only apply if you have assigned to the var? like if you've never done: foo = "blarp"; then would attempting to call the method foo still result in the system essentially evaluating nothing and moving on to the next line?
<eph3meral>
cuz like I said, I seem to have been able to call instance methods before, without using self.
ph^ has quit [Ping timeout: 265 seconds]
<eph3meral>
and from within class methods, i can call other class methods, without using self.
tyman_ has quit [Quit: tyman_]
celm has quit [Quit: Leaving]
<banisterfiend>
eph3meral: you dont need to use 'self' if there's no locals with the same name. 'self' is just used to disambiguate methods from locals in the case locals with the same name exist
<eph3meral>
gotcha, ok thanks that makes sense
<Mon_Ouie>
erratic: Don't ask questions in private messages
<Mon_Ouie>
and, String#empty?
billiamii has left #ruby ["Leaving"]
Eldariof59-ru has quit []
Habib1983 has quit [Ping timeout: 245 seconds]
s0ber has quit [Read error: Connection reset by peer]
lorandi has quit [Quit: Leaving]
hashpuppy has quit [Quit: hashpuppy]
jenrzzz-mac has joined #ruby
s0ber has joined #ruby
fserb has quit [Quit: ttyl]
Tricks has joined #ruby
undersc0re97 has quit [Ping timeout: 244 seconds]
crankycoder has joined #ruby
siksia has joined #ruby
williamcotton has joined #ruby
addi is now known as ICanChangeNick
jjjj has quit [Quit: Leaving.]
mengu has quit [Quit: Konversation terminated!]
ICanChangeNick is now known as addi
<habib>
can i set pos of cursor in terminal using ANSICON?
n1x has quit [Quit: "zZZzzz time"]
Helius has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
<Ankhers>
Habib: Yes, I sent you the github page, look at the readme, it will be under the 'sequences recognised' section
jrist is now known as jrist-afk
shadoi has joined #ruby
brianpWins has joined #ruby
sepp2k1 has joined #ruby
fserb has joined #ruby
theRoUS has quit [Quit: Leaving]
sepp2k has quit [Ping timeout: 245 seconds]
bosphorus has joined #ruby
theRoUS has joined #ruby
fserb has quit [Client Quit]
theRoUS has quit [Client Quit]
theRoUS has joined #ruby
fserb has joined #ruby
bdnelson has joined #ruby
<habib>
<Ankhers> yeah gthnx i found it
joshcheek has joined #ruby
simao has joined #ruby
Helius has joined #ruby
joshcheek has quit [Client Quit]
Ankhers has quit [Remote host closed the connection]
fserb has quit [Client Quit]
joshcheek has joined #ruby
joshcheek has quit [Client Quit]
mneorr_ has joined #ruby
ryan0x2 has quit [Read error: Connection reset by peer]
nonotza_ has joined #ruby
ryan0x2 has joined #ruby
erratic has quit []
JohnBat26 has quit [Ping timeout: 245 seconds]
carloslopes has quit [Quit: Leaving]
nonotza has quit [Ping timeout: 252 seconds]
nonotza_ is now known as nonotza
simao has quit [Ping timeout: 265 seconds]
DanBoy has joined #ruby
mneorr has quit [Ping timeout: 248 seconds]
cbuxton has joined #ruby
neersighted is now known as neersight[d]
ryan0x2 has quit [Remote host closed the connection]
azm has quit [Ping timeout: 265 seconds]
yxhuvud has quit [Ping timeout: 245 seconds]
mts7 has joined #ruby
hynkle has quit [Read error: No route to host]
DRCALKIN has joined #ruby
binaryplease has joined #ruby
hynkle has joined #ruby
Raduwen has quit [Quit: Leaving...]
mts7 has quit [Remote host closed the connection]
qwerxy has quit [Quit: Computer has gone to sleep.]
elux has quit [Quit: Bye!]
binaryplease has quit [Quit: WeeChat 0.3.7]
tommyvyo has joined #ruby
fbernier has quit [Ping timeout: 245 seconds]
habib has quit []
jenrzzz-mac has quit [Quit: jenrzzz-mac]
hynkle has quit [Read error: No route to host]
hynkle has joined #ruby
werdnativ has quit [Quit: werdnativ]
lkba has joined #ruby
kylemcgill has joined #ruby
bashdy has quit [Quit: leaving]
hynkle has quit [Read error: No route to host]
hynkle has joined #ruby
qwerxy has joined #ruby
billiamii has joined #ruby
davidw has joined #ruby
davidw is now known as Guest16903
fmcgeough has joined #ruby
fmcgeough has quit [Client Quit]
mengu has joined #ruby
phantasm66 has quit [Quit: *poof*]
zommi has quit [Remote host closed the connection]
williamcotton has quit [Quit: williamcotton]
becom33 has quit [Ping timeout: 252 seconds]
nilg`` has quit [Remote host closed the connection]
Gavilan has joined #ruby
pu22l3r has quit [Ping timeout: 260 seconds]
alanp has joined #ruby
balki_ has joined #ruby
qwerxy has quit [Quit: Computer has gone to sleep.]
hynkle has quit [Quit: hynkle]
balki has quit [Read error: Connection reset by peer]
alanp_ has quit [Read error: Connection reset by peer]
Helius has quit [Remote host closed the connection]
internet_user has quit [Remote host closed the connection]
kevinbond has joined #ruby
balki_ is now known as balki
PaciFisT has quit [Quit: Leaving.]
PaciFisT has joined #ruby
looopy has quit [Remote host closed the connection]
<_marvin>
hi
geekbri has quit [Remote host closed the connection]
moshee has quit [Ping timeout: 260 seconds]
jgrevich has quit [Read error: Connection reset by peer]
moshee has joined #ruby
PaciFisT has quit [Client Quit]
jgrevich has joined #ruby
jrist-afk is now known as jrist
cbuxton1 has joined #ruby
Morkel has joined #ruby
cbuxton has quit [Ping timeout: 244 seconds]
monomanman has left #ruby [#ruby]
qwerxy has joined #ruby
DRCALKIN has quit [Quit: Leaving]
Nanuq has quit [Quit: leaving]
alexim has joined #ruby
chessguy has quit [Remote host closed the connection]
becom33 has joined #ruby
dross has quit [Ping timeout: 245 seconds]
nisstyre has quit [Changing host]
nisstyre has joined #ruby
wallerdev has quit [Quit: wallerdev]
nonotza has quit [Quit: nonotza]
mdw has joined #ruby
yoklov has joined #ruby
Nanuq has joined #ruby
counterbeing has joined #ruby
blacktulip has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
blacktulip has joined #ruby
williamcotton has joined #ruby
siksia has quit [Ping timeout: 252 seconds]
chomp has joined #ruby
balki_ has joined #ruby
SAn has left #ruby [#ruby]
Morkel has quit [Quit: Morkel]
alanp has quit [Read error: Connection reset by peer]
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
undersc0re97 has joined #ruby
balki has quit [Read error: Connection reset by peer]
balki_ is now known as balki
mikeg has quit [Ping timeout: 260 seconds]
choffstein has quit [Remote host closed the connection]
siksia has joined #ruby
akem has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
jackiechan0 has joined #ruby
tommylommykins has joined #ruby
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has joined #ruby
stewart_ has joined #ruby
bluenemo_ has quit [Remote host closed the connection]
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has joined #ruby
dross has joined #ruby
ChloeD has quit [Quit: leaving]
bluenemo_ has quit [Remote host closed the connection]
chienpo has left #ruby [#ruby]
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has joined #ruby
bluenemo_ has quit [Remote host closed the connection]
itnomad has quit [Quit: Leaving]
hakunin has quit [Remote host closed the connection]
peregrine81 has quit [Quit: Goodbye.]
hakunin has joined #ruby
iamjarvo1 has quit [Quit: Leaving.]
wilmoore has joined #ruby
<Cpudan80>
Is there a concept of a UI thread in ruby?
dr_bob has quit [Read error: Connection reset by peer]
mneorr_ has quit [Remote host closed the connection]
<Cpudan80>
err rather, UI operations must be performed on a specific thread
jackiechan0 has quit [Quit: Sto andando via]
jackiechan0 has joined #ruby
supergiantrobot_ has quit [Quit: supergiantrobot_]
supergiantrobot_ has joined #ruby
ph^ has joined #ruby
supergiantrobot_ has quit [Client Quit]
billiamii has quit []
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
dorei has quit [Ping timeout: 245 seconds]
looopy has joined #ruby
akem has quit [Read error: Connection reset by peer]
looopy has quit [Remote host closed the connection]
werdnativ has joined #ruby
dorei has joined #ruby
banseljaj is now known as imami|afk
cousine has joined #ruby
jchauncey has quit [Quit: jchauncey]
crankycoder has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
Squarepy has quit [Quit: Leaving]
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
ph^ has joined #ruby
recursive has quit [Quit: leaving]
chson has quit [Remote host closed the connection]
niku4i has joined #ruby
jenrzzz-mac has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
noganex has quit [Ping timeout: 265 seconds]
ph^ has quit [Ping timeout: 260 seconds]
<eph3meral>
Cpudan80, I don't think so?
noganex has joined #ruby
<eph3meral>
Cpudan80, i mean, it may largely depend on what UI you're using
<eph3meral>
i usually just build web UIs, so they're not connected to whatever the main app engine is
<eph3meral>
they just read from the same db is all
walbert has quit []
bglusman has quit [Remote host closed the connection]
ZachBeta has quit [Quit: Computer has gone to sleep.]
bglusman has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
bglusman has quit [Read error: Connection reset by peer]
bglusman has joined #ruby
td123 has joined #ruby
DuoSRX has quit [Remote host closed the connection]
<becom33>
hi is anyone here ?
<Tasser>
nah, just about 666 other people
looopy has joined #ruby
joshman_ has joined #ruby
dangerousdave has quit [Quit: Leaving...]
minijupe has quit [Quit: minijupe]
davidpk has joined #ruby
<CannedCorn>
hey guys, im having a bit of trouble with encodings
<CannedCorn>
when i try to run my program it says invalid multibyte char (US-ASCII)
kuranai is now known as kuranai|off
noganex has quit [Ping timeout: 244 seconds]
<becom33>
Tasser, yea usually alot of them spend time sleeping
noganex has joined #ruby
<Tasser>
CannedCorn, yeah, because you told it to read some unicode as ascii
<tommylommykins>
If that is the case, you can fix it with your_string.force_encoding('utf-8')
choffstein has joined #ruby
looopy has quit [Remote host closed the connection]
joshcheek has joined #ruby
<CannedCorn>
what is the defualt encoding when reading from a file?
wallerdev has joined #ruby
carlyle has quit [Remote host closed the connection]
<CannedCorn>
in windows
<CannedCorn>
when i print it out
fserb has joined #ruby
jrajav has joined #ruby
<CannedCorn>
it seems to say ibm437
mdw has quit [Ping timeout: 245 seconds]
jenrzzz-mac has quit [Remote host closed the connection]
dotnull has joined #ruby
balki has quit [Ping timeout: 250 seconds]
schovi has quit [Remote host closed the connection]
Cpudan80 has quit [Read error: Connection reset by peer]
qwerxy has quit [Quit: Computer has gone to sleep.]
balki has joined #ruby
Paradox has joined #ruby
bdnelson has quit []
kylemcgill has quit [Read error: Connection reset by peer]
shtirlic_ has quit [Read error: Connection reset by peer]
<Paradox>
i've been messing around with highline for a script im writing, and while using it to get multiple line input via gather works, its not elegant.
[Neurotic] has joined #ruby
<Paradox>
is there any way to launch an editor, such as vim
<Paradox>
and then get the results back?
kylemcgill has joined #ruby
joshcheek has quit [Quit: joshcheek]
Bosma has joined #ruby
moshee has quit [Ping timeout: 250 seconds]
<Paradox>
i know pry does this, but was hoping someone could save me the trouble of digging through the code to find it
shtirlic has joined #ruby
moshee has joined #ruby
iocor has joined #ruby
jenrzzz-mac has quit [Remote host closed the connection]
dv310p3r has quit [Ping timeout: 245 seconds]
jenrzzz-mac has joined #ruby
siksia has quit [Ping timeout: 252 seconds]
Guest16903 has quit [Read error: Operation timed out]
wangr_ has quit [Ping timeout: 248 seconds]
jenrzzz-mac has quit [Remote host closed the connection]
siksia has joined #ruby
jenrzzz-mac has joined #ruby
<eam>
Paradox: you mean system "vi", your_tempfile ?
roams has quit [Ping timeout: 256 seconds]
fserb has quit [Quit: ttyl]
benatwork has quit [Remote host closed the connection]
jenrzzz-mac_ has joined #ruby
<eam>
the nice thing to do is to check ENV['EDITOR'] first though
Urth|Away has quit [Quit: Probably quit ZNC]
jenrzzz-mac_ has quit [Client Quit]
Blob has joined #ruby
mneorr has joined #ruby
bglusman has quit [Remote host closed the connection]
bglusman has joined #ruby
bbttxu has quit [Quit: bbttxu]
jenrzzz-mac has quit [Ping timeout: 245 seconds]
<Paradox>
eam, hrm, i might be a big derp, but that seems to be what i want to do, but isnt working
test34- has joined #ruby
test34- has quit [Changing host]
test34- has joined #ruby
jackiechan0 has quit [Quit: Sto andando via]
test34 has quit [Ping timeout: 245 seconds]
<eam>
Paradox: more context?
<Paradox>
let me poke at it more because "not working" can mean anything
<Paradox>
yeah
<Paradox>
hold on
<Paradox>
so i make a new string called "temp"
<Paradox>
and run system "vi", temp
<Paradox>
(correct?)
jenrzzz-mac has joined #ruby
kevinbond has quit [Quit: kevinbond]
fantazo has quit [Remote host closed the connection]
<Paradox>
i run that
<eam>
well, you probably want to use Tempfile somewhere like /tmp
<eam>
but yes
<Paradox>
but it opens vim in directory listing
<Paradox>
ah, so i'd have to readline /tmp
<eam>
do you have a directory called "temp" in your current directory?
bglusman has quit [Ping timeout: 245 seconds]
Blob is now known as Homunculus
arvidkahl has joined #ruby
sepp2k1 has quit [Remote host closed the connection]
Homunculus is now known as Diffraction
dnyy has joined #ruby
Beoran_ has joined #ruby
<Paradox>
yes, that was it :/
<eam>
Paradox: my_tmpfile = Tempfile.new("myprog").path; system "vi", my_tmpfile; File.read(my_tmpfile) ...
<CannedCorn>
thanks tommylommykins
<eam>
Tempfile will make sure you don't collide with existing filenames
<Paradox>
that would work
<Paradox>
thanks
<eam>
Paradox: also consider checking the value of $EDITOR before forcing the user into vi
<Paradox>
i will
<Paradox>
because i dont use vi
<Paradox>
i use sublimeText
<eam>
damn I was hoping you'd say emacs
<eph3meral>
screw vi
<Paradox>
and i know some people are strange and may want to use emacs
<eph3meral>
vim rocks :)
<eph3meral>
i already have an OS, thanks
<eam>
eph3meral: viper-mode > vim
<Paradox>
nah, i like my hands
Diffraction has quit [Remote host closed the connection]
<eph3meral>
nah, not really, i tried it
<eph3meral>
few times
<eph3meral>
i was actually a hardcore emacs user at first... for about 5 years, then vim for the past 10
Foxandxss has joined #ruby
jtdowney has quit [Remote host closed the connection]
indian has joined #ruby
indian has quit [Changing host]
indian has joined #ruby
<jrajav>
To this day I still don't understand why vim and emacs are still so wildly popular
Beoran__ has quit [Ping timeout: 244 seconds]
<jrajav>
Guess people in dvelopment just don't like adapting to new paradigms :/
<jrajav>
Hey, to each his own
<eam>
by new paradigms do you mean taking your hands off the keyboard to use the mouse?
<jrajav>
No?
<jrajav>
Keyboard-responsive apps exist outside of terminal-mode applications, you know
<eam>
I just don't see any other "new paradigms" in the last 20 years or so
rorrego has joined #ruby
<Paradox>
sublimeText is a perfect example jrajav
<jrajav>
^
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
<Paradox>
i can do everything in it on the keyboard
<Paradox>
or on the mouse
<Paradox>
i dont have to switch to one or the other
<Paradox>
⌘⇧P
<eam>
I'm honestly curious, what does it do that other editors don't?
<jrajav>
eam: Let's see, visually representing any information at all aside from the file content? :P
<Paradox>
its got absurdly good navigation
<jrajav>
That's a paradigm
<Paradox>
like, say you're in a rails app
mxweas_ has joined #ruby
<Paradox>
and you are waist-deep in views
<Paradox>
and you want to edit a test
c3l has quit [Ping timeout: 245 seconds]
<Paradox>
you just ⌘P, type the partial name of the test, and it autocompletes to it and lets you jump right to it
roams has joined #ruby
fivetwentysix has joined #ruby
<eam>
yeah but emacs does that too
<eam>
I was wondering what's new
vlad_starkov has joined #ruby
<Paradox>
it also does multi-selection
<Paradox>
you can drop multiple cursors throughout the document and edit from all at once
<Paradox>
they dont have to be continuous
jgarvey has quit [Remote host closed the connection]
<eam>
none of that sounds new
<jrajav>
eam: One major DISadvantage of low-level, cross-platform editors like vim and emacs is very poor integration with the OS if you want to or have to use it together with other tools
MasterIdler has quit [Ping timeout: 244 seconds]
<eam>
I'm pretty sure it's not an issue of new paragigms and more an issue of not knowing how older tools work
khakimov has joined #ruby
<eam>
color me unconvined
<banisterfiend>
Paradox: what does your program do
<jrajav>
eam: Wha?! Haha how are you turning that around so backwards
<Paradox>
banisterfiend, right now?
tomb_ has quit [Quit: Computer has gone to sleep.]
<Paradox>
its a wip that sends a message to all moderators of a reddit subreddit
<jrajav>
My original point was that poeple who use older editors don't want to adapt to newer tools
<banisterfiend>
Paradox: i mean why do u want this functionality
<jrajav>
And you're saying it's actually people who use newer tools who can't "adapt" to old tool
<jrajav>
Wrong direction
<eam>
jrajav: you claimed there's something they do which isn't provided -- but this seems to be false
<Paradox>
because reddit private message bodies let people use newlines and other characters
<jrajav>
eam: I named at least one significant thing, lack of OS integration
<eam>
the implication that newer is necessarily better is fundamentally flawed
<Paradox>
and using Highline, even with gather and readline on, doesn't provide a nice editing system
<banisterfiend>
Paradox: oh ok
<Paradox>
eam, one can also argue that just because something has been "that way" for a long time doesn't mean its the right way to do something
<eam>
Paradox: right, which is why I asked for specifics. Decisions should be made based on knowledge
<eam>
not seeing any specifics though
<Paradox>
TMOWTDI
<jrajav>
Gonna ignore me again if I say it a third time?
<Paradox>
or whatever
<eam>
jrajav: I don't understand what you mean by "os integration"
<jrajav>
Hey idc that much. Again, to each his own
PerlPuma has joined #ruby
<eam>
honestly, the reason I ask is that I've looked at various hip editors and none seem to be as powerful as emacs so I haven't adopted them
roams has quit [Ping timeout: 244 seconds]
Vainoharhainen has quit [Ping timeout: 245 seconds]
<jrajav>
eam: Well on OS X, for instance, you miss out on services, scripting, and there may be clipboard issues, not to mention you miss out on all the window management like full screening, spaces, expose (if you depend on something like screen instead)
<eam>
and I'm curious as to why they might be better -- but I can never get a concrete (or factually accurate) answer
PerlPuma has quit [Client Quit]
vlad_starkov has quit [Ping timeout: 260 seconds]
<jrajav>
eam: Whole different board of problems on Windows
<eam>
jrajav: ah, got it
<jrajav>
eam: This isn't essential, ofc, it's just a point
<eam>
so you mean native UI features
<jrajav>
It's not all UI
<eam>
no?
<jrajav>
Scripting can tie together tools on OS X in a manner just as powerful as an IDE
adac has quit [Quit: Leaving]
<eam>
uh, but ...
<eam>
scripting is why emacs dominates other options =/
<avtobiff>
hi! i have problems with rubymail's tests which don't run under ruby1.9.1. paste -> http://paste.debian.net/172902/
<jrajav>
eam: What if you want to or have to use another tool for something
xaq has joined #ruby
<avtobiff>
i don't understand where the variable "name" is set
youdonotexist has quit [Quit: youdonotexist]
<jrajav>
What if I'm insane and want to use a graphical git manager :P
<eam>
jrajav: totally possible? Sorry, I don't get what you're getting at
<Paradox>
jrajav, i keep a copy of tower floating around for code reveiews, because its easy to see where and how much a file changed than one big diff
fserb has quit [Client Quit]
mneorr has quit [Remote host closed the connection]
darrenlooby has quit [Quit: Leaving]
<jrajav>
eam: My main point is that it's totally possible to use newer alternatives to do the same things that emacs and vim are always touted for
cesario has quit [Quit: Connection closed for inactivity]
<DanBoy>
sublime looks good
<eam>
jrajav: that's quite a bit different than your initial statement that there is some fundamental paradigm shift which old timers can't keep up with
<eam>
We can agree that both tools are useful
xaxisx has quit [Quit: xaxisx]
<jrajav>
eam: They're still terminal-mode apps and that still limits them
<jrajav>
And I do check out the GUI options for both occasionally, I haven't seen them keep up amazingly
<jrajav>
Not that anyone would really want them, that's not what they're designed for
bbttxu has joined #ruby
tcopp has quit [Quit: Lost terminal]
becom33 has quit [Ping timeout: 244 seconds]
<jrajav>
It's not like I can lay out a single concrete reason for you to value a native, GUI mode application and tight OS integration. But it's a valid concern when all else is equal
bosphorus has quit [Read error: Connection reset by peer]
becom33 has joined #ruby
<avtobiff>
where did the method name() in test/unit in Test::Unit::TestCase go and how do i port usage of that from ruby 1.8 to ruby 1.9 ?
joshcheek has joined #ruby
joshcheek has quit [Client Quit]
chimkan___ has joined #ruby
<eph3meral>
for the record, I don't hardly ever use vim, always gvim, so OS integration is moot, i've got drag'n'drop, clipboard and mouse support, also vim has fuzzy find as well: command-t, fuzzy find, etc
<eph3meral>
nerdtree, command-t, about all I usually need
<eph3meral>
ctags is pretty nice
Criztian has quit [Remote host closed the connection]
jonathanwallace has quit [Remote host closed the connection]
<eam>
jrajav: that's why I was asking if the feature was "take hands off keyboard" -- I'm unaware of anything else the gui is good for (and it's much worse UI overall, once you spend some time learning)
<eam>
you'll forgive me if I don't agree it's a valid concern, in the absense of any material rationale
ZachBeta has joined #ruby
xaq has quit [Remote host closed the connection]
gvz has quit [Quit: Leaving]
chimkan has quit [Ping timeout: 244 seconds]
chimkan___ is now known as chimkan
jstarcher has quit [Quit: leaving]
xaq has joined #ruby
heftig has quit [Quit: leaving]
Chryson has joined #ruby
heftig has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
youdonotexist has joined #ruby
fserb has joined #ruby
bbttxu has quit [Quit: bbttxu]
maccosmo_ has joined #ruby
<DanBoy>
anyone wanna comment
<DanBoy>
The Ruby Way vs Ruby Cookbook
macmartine has quit [Quit: macmartine]
andrewhl has quit [Remote host closed the connection]
<Tasser>
google wars!
maccosmo has quit [Ping timeout: 252 seconds]
maccosmo_ is now known as maccosmo
RudyValencia has joined #ruby
davidpk has quit [Ping timeout: 252 seconds]
robdodson has joined #ruby
uris has quit [Quit: leaving]
chimkan_ has joined #ruby
chimkan has quit [Read error: Connection reset by peer]
chimkan_ is now known as chimkan
dotnull has quit [Remote host closed the connection]
kevinbond has joined #ruby
davidpk has joined #ruby
xaq has quit [Remote host closed the connection]
luxurymode has quit [Quit: Computer has gone to sleep.]
khakimov has joined #ruby
itnomad has joined #ruby
kevinbond has quit [Client Quit]
benson has joined #ruby
jrist is now known as jrist-afk
blacktulip has quit [Remote host closed the connection]
king313 has quit [Quit: .]
<benson>
can variable names not end in question marks? I want to assign a lambda to a variable with a name that ends in a question mark and I'm getting an error
<samuelkadolph>
benson: Nope, only method names can end in ! or ?
mxweas_ has quit [Quit: Computer has gone to sleep.]