fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
rizzy has quit [Read error: Connection reset by peer]
opus has quit [Quit:]
tfitts has joined #ruby
cbuxton has joined #ruby
tfittsy has joined #ruby
luckyruby has quit [Remote host closed the connection]
cbuxton1 has quit [Ping timeout: 240 seconds]
CharlieS1 is now known as CharlieSu
tfitts has quit [Ping timeout: 246 seconds]
nobitanobi has quit [Read error: Connection reset by peer]
Tyler__ has joined #ruby
nobitanobi has joined #ruby
maxmmurphy has quit [Quit: maxmmurphy]
banisterfiend has quit [Remote host closed the connection]
ryan0x2 has joined #ruby
Banistergalaxy has joined #ruby
chussenot has quit [Quit: chussenot]
asteve_ has quit [Quit: Computer has gone to sleep.]
chimkan_ has quit [Quit: chimkan_]
benson has quit [Quit: Leaving]
tfittsy has quit [Ping timeout: 268 seconds]
fantazo has joined #ruby
whomp_ has quit [Ping timeout: 240 seconds]
_adeponte has quit [Ping timeout: 240 seconds]
Goles has joined #ruby
ackz has quit [Quit: Leaving.]
mikepack has quit [Remote host closed the connection]
fridim_ has quit [Ping timeout: 246 seconds]
rburton- has quit [Quit: rburton-]
ckrailo has quit [Quit: Computer has gone to sleep.]
tayy has quit [Ping timeout: 240 seconds]
MagisterQuis has joined #ruby
fbernier has joined #ruby
WhereIsMySpoon has quit [Changing host]
WhereIsMySpoon has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<MagisterQuis>
So, I'm trying to install ruby to install BeEF on my mac.
<MagisterQuis>
it has changed my path.
MagisterQuis has quit [Quit: Leaving.]
nu7hatch has left #ruby [#ruby]
SeySayux has quit [Ping timeout: 248 seconds]
nobitanobi has quit [Read error: Connection reset by peer]
vDubG has quit [Quit: Got ME !]
g_rotbart has joined #ruby
nobitanobi has joined #ruby
vDubG has joined #ruby
MagisterQuis has joined #ruby
SeySayux has joined #ruby
brianpWins has quit [Quit: brianpWins]
<MagisterQuis>
More specifially, it did something to keep .profile from being called.
fearoffish has quit [Quit: Computer has gone to sleep.]
nari_ has joined #ruby
adamkittelson has quit [Remote host closed the connection]
opus has joined #ruby
brdude has joined #ruby
krz has quit [Ping timeout: 244 seconds]
qko has quit [Ping timeout: 240 seconds]
wargasm has joined #ruby
panpaint1r has joined #ruby
drago757_ has joined #ruby
drago757 has quit [Read error: Connection reset by peer]
drago757_ is now known as drago757
Speed has quit [Remote host closed the connection]
luckman212_ has quit [Remote host closed the connection]
qko has joined #ruby
panpainter has quit [Ping timeout: 260 seconds]
justsee is now known as justsee|away
kenneth has joined #ruby
jjbohn has joined #ruby
javos has quit [Quit: Leaving...]
<kenneth>
hey there… question for y'all -- i've been told that the interface for this project would be more ruby like if i clients use via include instead of having them subclass -- https://github.com/kballenegger/kenji
kenichi has quit [Remote host closed the connection]
<fbernier>
what are people using for syntax highlighting slides?
<bluebie>
slides in what?
luckyruby has joined #ruby
<fbernier>
presentation slides
andrewhl has quit [Ping timeout: 244 seconds]
<bluebie>
I used to use Coda on my mac - it had an option to copy with syntax highlighting in the edit menu - you could paste it from there in to keynote or whatever, or in to a text editor and it'd come out as crazy html divs and spans
<fbernier>
thing is im running linux so I'll have to make some light modifications ;)
kenneth has joined #ruby
kenneth has quit [Client Quit]
BrokenCog has quit [Quit: leaving]
<bluebie>
looks like vim has a toHTML feature built in? copy paste that in to a web browser then copy paste from that perhaps
codeFiend has joined #ruby
harcher has joined #ruby
ezra has quit [Ping timeout: 276 seconds]
andrewhl has joined #ruby
shadoi has joined #ruby
nerdy has quit [Quit: Computer has gone to sleep.]
ezra has joined #ruby
pingfloyd has quit [Quit: pingfloyd]
v0n has joined #ruby
<fbernier>
im getting a nice output but no colors in impress =/
erichmenge has quit [Quit: Be back later]
jamesaa has quit [Ping timeout: 244 seconds]
opus has quit [Quit:]
opus has joined #ruby
brianpWins has joined #ruby
LouisGB has joined #ruby
kpshek has quit []
jso_ has joined #ruby
jso_ has quit [Max SendQ exceeded]
dmiller has joined #ruby
TandemAdam has quit [Quit: Leaving]
<dmiller>
hey ruby folks, any recommendations for programmatically git repos to local fs in ruby? Ragged seems to be the favored solution but I don't see that it supports cloning. Just exec in shell?
enroxorz-work has quit [Read error: Connection reset by peer]
pingfloyd has joined #ruby
<dmiller>
*programtically cloning
voodoofish430 has quit [Quit: Leaving.]
enroxorz-work has joined #ruby
joekarma has quit [Quit: joekarma]
Markvilla has quit [Quit: Computer has gone to sleep.]
opus has quit [Quit:]
xaq has quit [Remote host closed the connection]
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<bluebie>
dmiller: I just exec in shell to run the camping site (it pulls wiki pages from the github wiki) and that's worked great
ringotwo has joined #ruby
<dmiller>
bluebie: cool, thanks for the advice! I shall go down the route. =)
<dmiller>
*that
<dmiller>
man it's getting late haha
<bluebie>
I recommend using the system(['git', 'clone', 'git://whatever']) syntax though, so you're directly calling git and not going via a shell
savage- has quit [Remote host closed the connection]
insecurlex has joined #ruby
<bluebie>
it's faster (I find bash takes nearly an entire second to load on my fastest computer) and avoids a bunch of stuff about escaping strings properly
LouisGB has quit [Ping timeout: 265 seconds]
sh1ps has joined #ruby
CannedCorn has joined #ruby
<sh1ps>
hello everyone
xaq has joined #ruby
<dmiller>
bluebie: ahh, awesome. thanks man
<dmiller>
(or woman!)
<bluebie>
so you saw my realname then :P
TheLZA has quit [Ping timeout: 240 seconds]
<sh1ps>
I'm receiving an array in a response body and ruby is evaluating it as a string
<dmiller>
I didn't actually, I just caught myself
<bluebie>
Hi sh1ps
<dmiller>
:P
<bluebie>
nice :D
<sh1ps>
I need to get the second object in the array and I'm confounded >.<
aeontech has joined #ruby
<bluebie>
sh1ps: That's a very confusing statement
cakehero has quit [Quit: Leaving...]
<davidcelis>
you could eval it, but that's dangerous
<sh1ps>
gah I know
<bluebie>
first of all, what library gave you this 'response body'
<sh1ps>
faraday
Tomasso has quit [Ping timeout: 240 seconds]
pingfloyd has quit [Ping timeout: 268 seconds]
<davidcelis>
sh1ps: so you get something like "[1, 2, 3, 4, 5]" as a response? an array that ruby accepts as a string?
<sh1ps>
I just switched to Faraday for other reasons, but I was just using Net::HTTP before
<bluebie>
alright, and you're presumably calling a JSON api?
ringotwo has quit [Remote host closed the connection]
<davidcelis>
sh1ps: actually JSON.parse should be able to parse it, i think
<bluebie>
yep
<sh1ps>
GAAAH
<sh1ps>
why didn't I think of that
<bluebie>
if you're running ruby 1.9 just do require 'json' then JSON.parse(body string)
<davidcelis>
sh1ps: probably because valid JSON _should_ have an outer hash
<bluebie>
if on 1.8, install the json rubygem first
codeFiend has quit [Ping timeout: 250 seconds]
aeontech is now known as codeFiend
<davidcelis>
sh1ps: but i think that's still parsable
<sh1ps>
right. this was one of those annoying things where puts was showing me a perfectly fine looking array
<bluebie>
davidcelis: the json spec specifies the outer thing can be an array or a hash, I thought
<sh1ps>
i didn't realize why I couldn't do anything with it until I used p
<davidcelis>
bluebie: that would be news to me
mynameisted has quit [Remote host closed the connection]
<bluebie>
http only transmits strings and binary blobs, it can't hold structures like arrays, hashes, numbers - so we use languages like json and yaml to store those things in to blobs, then transmit, and parse on the other end
<bluebie>
yay ^_^
<sh1ps>
thank you for the help bluebie and davidcelis…who knows how much longer I would have banged my head against that wall
tiripamwe has quit [Ping timeout: 246 seconds]
<davidcelis>
banisterfiend: not too much man; mac'n'cheese, beer, and gilmore girls
drago757 has joined #ruby
<bluebie>
davidcelis: I remember something like that in the spec, but I'm pretty certain json.org used to say 'object or array' - skimming it now it even seems not to specify that requirement - so maybe strings and numbers are supposed to be acceptable now also?
xaq has quit [Remote host closed the connection]
<davidcelis>
bluebie: No I think just strings and numbers still aren't valid
<davidcelis>
Yeah, they aren't
<davidcelis>
Values have to be inside an object or array
xaq has joined #ruby
<bluebie>
where'd you find this info davidcelis?
<davidcelis>
bluebie: i tried myself
<davidcelis>
bluebie: using JSON.parse and jsonlint
GordonFreeman has joined #ruby
<bluebie>
fair enough :)
savage- has joined #ruby
sh1ps has quit [Quit: sh1ps]
verto is now known as verto|off
td123 has quit [Ping timeout: 246 seconds]
ichilton has quit [Ping timeout: 245 seconds]
tds__ has joined #ruby
<banisterfiend>
davidcelis: r u gonna smoke a bowl
<davidcelis>
nah that isn't really my thing
ezra has quit [Ping timeout: 276 seconds]
drago757 has quit [Ping timeout: 260 seconds]
Konboi has quit [Remote host closed the connection]
<banisterfiend>
davidcelis: i thought u were cool
<bluebie>
don't do drugs, drugs are bad
<bluebie>
unless they're cool drugs like acid and shrooms
<davidcelis>
i just dont like smoking
<davidcelis>
makes my throat hurt
mockra has joined #ruby
<bluebie>
I wish all these online shops would automatically sort by price. That's the most sensible default for me! The ones with the skinniest profit margin please! :D
centipedefarmer has joined #ruby
igotnolegs has joined #ruby
mockra has quit [Remote host closed the connection]
mockra has joined #ruby
mockra has quit [Remote host closed the connection]
joekarma has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
graspee has quit [Quit: leaving]
baroquebobcat has joined #ruby
mikepack has joined #ruby
Gonzih has joined #ruby
piotrj has quit [Remote host closed the connection]
nedbat has quit [Ping timeout: 250 seconds]
codeFiend has quit [Quit: codeFiend]
centipedefarmer has quit [Quit: This computer has gone to sleep]
ezra has joined #ruby
ichilton has joined #ruby
mikepack has quit [Ping timeout: 260 seconds]
minijupe has joined #ruby
CannedCorn has quit [Quit: Computer has gone to sleep.]
tiripamwe has joined #ruby
havenn has joined #ruby
glistle has joined #ruby
Bosox20051 has joined #ruby
SCommette has joined #ruby
xnm has quit [Ping timeout: 276 seconds]
burgestrand has joined #ruby
glistle has quit [Remote host closed the connection]
glistle has joined #ruby
glistle has quit [Remote host closed the connection]
<arooni-mobile>
banisterfiend, did you write this?
<banisterfiend>
arooni-mobile: i'm the creator + one of the maintainers, yeah
<banisterfiend>
btu we have a few guys on the team now
<arooni-mobile>
thank you.
nXqd has quit [Ping timeout: 252 seconds]
<arooni-mobile>
very much. way better than irb/ruby-debug .. watching screencast now
<banisterfiend>
k00
andrewhl has quit [Remote host closed the connection]
<arooni-mobile>
this is why i love irc
Bosma has quit [Ping timeout: 244 seconds]
dtribble has joined #ruby
kpshek has quit [Ping timeout: 244 seconds]
yxhuvud has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
s1n4 has joined #ruby
invsblduck has joined #ruby
nari_ has quit [Ping timeout: 248 seconds]
apok has quit [Quit: apok]
<banisterfiend>
arooni-mobile: what features impressed you btw
<banisterfiend>
im always curious what people like
xaq_ has joined #ruby
bob_ has joined #ruby
arooni-mobile has quit [Quit: Leaving]
brianpWins has quit [Quit: brianpWins]
arooni-mobile has joined #ruby
Konboi has joined #ruby
subbyyy has joined #ruby
<arooni-mobile>
banisterfiend, i havent used ruby-debuger for sometime; but i remember it being a bad expeirnece; and having to do stuff like 'p varname'
<arooni-mobile>
dont remember vim like scrolling commands being integrated
tommylommykins has quit [Ping timeout: 245 seconds]
bob_ is now known as blob
xaq has quit [Ping timeout: 240 seconds]
<arooni-mobile>
like whereami
<arooni-mobile>
simple intuitive commands
<banisterfiend>
arooni-mobile: the modern version of pry syntax highlight the line after enter is pressed, so it's even more colorful :)
tommylommykins has joined #ruby
<nobitanobi>
What's the appropriate way of testing ArgumentError raising in rpsec? I have done it like this: https://gist.github.com/3356155 — but when the ArgumentError raises it stops the execution of the specs.
Drewch has quit [Excess Flood]
<arooni-mobile>
sweet i can use as a repalcement rails console
<nobitanobi>
forget it. solved it.
Spooner has quit [Ping timeout: 252 seconds]
Drewch has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
chimkan_ has quit [Quit: chimkan_]
nobitanobi has joined #ruby
havenn has joined #ruby
nXqd has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
Aenigma has left #ruby [#ruby]
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
t4766 has quit [Remote host closed the connection]
nobitanobi has quit [Read error: Connection reset by peer]
t11057 has joined #ruby
nobitanobi has joined #ruby
kpshek has joined #ruby
rippa has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
vertroa_ has quit [Read error: Connection reset by peer]
Kefan has joined #ruby
tonini has joined #ruby
iamjarvo has joined #ruby
jameshyde_ has joined #ruby
<Kefan>
who can give me some heip
<Kefan>
who can give me some heilp
tds__ has quit [Ping timeout: 246 seconds]
<Kefan>
who can give me some help
shadoi has quit [Quit: Leaving.]
<bnagy>
o/ HEILp
<banisterfiend>
Kefan: jesus is the only one who can help you
<Kefan>
i konw
nobitanobi has joined #ruby
<davidcelis>
bnagy: lol'd
<banisterfiend>
bnagy: nagg-dogg, back in k'md ?
<bnagy>
I thought jesus was more of a clojure guy
<Kefan>
but my english is not well ,who can help me
<banisterfiend>
or however u shortened it
iamjarvo has quit [Client Quit]
<bnagy>
banisterfiend: ktm, from the airport code. Yeah, I'm back
<banisterfiend>
bnagy: when are you going to be in wellington?
<bnagy>
banisterfiend: they changed the dates for that con, I am now not so likely to go :(
<bnagy>
this year, anyway
kpshek has quit [Ping timeout: 265 seconds]
<bnagy>
Kefan: just ask your question, don't ask to ask
<davidcelis>
bnagy: nah dude
<davidcelis>
bnagy: jesus is all about scala
<bnagy>
if anyone can help they will
<Kefan>
ok
<bnagy>
banisterfiend: I am a bit bummed about it, it's in like mid nov now, weather should be awesome
<banisterfiend>
Kefan: there's a mild wind here and i keep losing my cigarettes when i put them on the table they blow off into obscure cracks in the wood work or off the table altogether
gtuckerkellogg has joined #ruby
<Kefan>
ËÄÜ°ï°ïÎÒ Ìá¸ßÏÂÓ¢Óï ºÇºÇ
<banisterfiend>
bnagy: Yeah, weather will be great
<banisterfiend>
Kefan: i think u mean #perl
<banisterfiend>
bnagy: have you been to oriental parade?
<bnagy>
I don't know what that is :)
mohits has joined #ruby
<bnagy>
I am rubbish with street names though, if it's a street
<banisterfiend>
bnagy: teh artificial beach :)
<banisterfiend>
the*
<bnagy>
oh right, no I guess. I been around the harbour a lot, but not much beach there
insecurlex has quit [Remote host closed the connection]
<banisterfiend>
go a bit further down and there's a beautiful (but imported) golden sand beach
gen0cide_ has joined #ruby
Chryson has quit [Quit: Leaving]
subbyyy has quit [Quit: Leaving.]
nXqd has quit [Ping timeout: 245 seconds]
brianpWins has joined #ruby
nXqd has joined #ruby
<banisterfiend>
bnagy: did you like flight of the concords?
quest88 has quit [Quit: quest88]
Eldariof-ru has joined #ruby
hmmmmmm has joined #ruby
<hmmmmmm>
how long does it take to learn ruby?
t11057 has quit [Remote host closed the connection]
t62512 has joined #ruby
<hmmmmmm>
i need to know, somebody please tell me now.
<richo>
how long is a piece of string.
<banisterfiend>
hmmmmmm: 37 seconds
<hmmmmmm>
5 yards
<hmmmmmm>
really?
<hmmmmmm>
so if i pick up a book on ruby and read it, i'll be an expert
<hmmmmmm>
in 37 seconds
<banisterfiend>
hmmmmmm: Yeah.
<hmmmmmm>
OK, let me try.
<heftig>
2.3 teracycles
burgestrand has joined #ruby
<banisterfiend>
hmmmmmm: but have to have a hot chocolate in your left hand and wear a victorian english paper boy hat
<hmmmmmm>
oh no, i don't have those items
<hmmmmmm>
can you sell them to me?
<banisterfiend>
hmmmmmm: Yeah.
dmiller has quit [Ping timeout: 246 seconds]
<hmmmmmm>
I'll be willing to pay #150 for the magic hat
<hmmmmmm>
i'll make my own hot chocolate though, i make really good hot chocolate
mjb2k has joined #ruby
<banisterfiend>
hmmmmmm: no money, only accept self-pics where you gaze wistfully towards the ocean
<heftig>
what's the exchange rate from hashes to dollars?
<hmmmmmm>
hashes?
<heftig>
you said #150
<hmmmmmm>
oh yes
<hmmmmmm>
that's $30 Zimbabuae dollars
<richo>
just headbutt the book till it releases it's knowledge unto you
<bnagy>
*its
<hmmmmmm>
richo: I tried that already but all i got was a sore head
<richo>
You're not headbutting {hard ,}enough
<hmmmmmm>
oh
<hmmmmmm>
Your websight says that i can do ruby in 20 minutes
Liothen has quit [Remote host closed the connection]
<banisterfiend>
hmmmmmm: Yeah, u should sue them for false advertising
<hmmmmmm>
I think i willl!!!!!
<hmmmmmm>
that aint right brotha
<hmmmmmm>
Is it true that ruby is for hipsters?
<hmmmmmm>
How many of you are drinking a starbucks right now
<hmmmmmm>
BAN ME!!!!
<hmmmmmm>
BAN ME!!!!
<mjb2k>
asynchronous ruby: I have a sinatra service that needs to make an async call to update some stats but return to client immediately, any advice on where to start with the async part? will Thread.new suffice?
<banisterfiend>
hmmmmmm: but i've already developed an affectionate attitude towards u
<hmmmmmm>
Will u shutup and ban me already???????????
<hmmmmmm>
God you r lame
<banisterfiend>
hmmmmmm: is this some kind of perversion?
<hmmmmmm>
no
burgestrand has quit [Quit: Leaving.]
<hmmmmmm>
do I need a mack book in order to use Ruby?
Mathieu has joined #ruby
<Kefan>
where are you£¿
<bnagy>
mjb2k: I think most of the webby frameworks have a few different options for async, but you shouldn't need to manage your own threads
<bnagy>
I think sinatra has its own chan, right?
<banisterfiend>
hmmmmmm: Yeah. And I 'i love steve jobs' sticker on your car
<mjb2k>
yes i think sinatra does have it's own channel, but the fact that it's in sinatra seemed inconsequential
<bnagy>
no, it's really not :)
<hmmmmmm>
is Sinatra some sort of alternative to RoR?
<banisterfiend>
hmmmmmm: hahah
<banisterfiend>
hmmmmmm: looks about right
sqlbyme has joined #ruby
<bnagy>
mjb2k: there are tons of ways to do async, but the frameworks also have to integrate the lib
<hmmmmmm>
banisterfiend: If you read the captions you'll know that Jeremy is happy about low error rates
<bnagy>
but in general, trying to manually manage threads is a road to doom
appamajig_ has joined #ruby
<banisterfiend>
hmmmmmm: Yeah, and they eat cupcakes and drink martinees cos sometimes they like to have fun, which is important for a good work environment
<banisterfiend>
right? :)
Abbas| has quit [Ping timeout: 265 seconds]
<hmmmmmm>
Uhh sure
<banisterfiend>
after a long day lowering error rates
burgestrand has joined #ruby
<hmmmmmm>
So this is the first time i've heard of Sinatra and Merb Nitro Camping and Rango
<hmmmmmm>
how do they stack up?
jgrevich has joined #ruby
<hmmmmmm>
if I ever make up my own ruby web framework i think i'm going to name it Woop
<hmmmmmm>
or Fishing
<mjb2k>
resque is message queue, not quite what I'm looking for, I'm concerned because mri doesn't do concurrency
<hmmmmmm>
Dingo is a ogod one too
<hmmmmmm>
s/ogod/good/
Konboi has quit [Read error: Connection reset by peer]
Konboi_ has joined #ruby
sqlbyme has quit [Client Quit]
<mjb2k>
hmmmmmm: I'm drinking a local micro brew, does that make me hipster?
<hmmmmmm>
Not unless it's vintage
Kefan has left #ruby [#ruby]
t62512 has quit [Remote host closed the connection]
<burgestrand>
mjb2k: MRI does do concurrency just not single-process parallelism
t71544 has joined #ruby
appamajig has quit [Ping timeout: 265 seconds]
<bnagy>
mjb2k: well saying it doesn't do concurrency is a little contentious
<hmmmmmm>
I myself am a proud locavore however
<bnagy>
but yeah if you want 'real' threads try jruby
<bnagy>
but scaling web stuff via threads imvho is a dead model
<mjb2k>
ok, yes, I should have said it doesn't do parallel processing
<hmmmmmm>
Ya all of you hipsters using RoR deserve what you get, if you like performance, consistency and things to not suck in general, try out Servlets
<hmmmmmm>
Later lamers
Synthead has quit [Quit: sqooq]
hmmmmmm has left #ruby ["Leaving"]
<heftig>
mjb2k: or celluloid
<burgestrand>
in most cases it doesn’t matter however, mri’s threads are fine for just about all tasks except parallell heavy computational load
<mjb2k>
it's not a scaling issue in my case, the call isn't concerned with the stats generated from the call, so I don't want it to have to wait for the stats to be generated and inserted into DB
<heftig>
your stat updater could be a celluloid actor that you call asynchronously
GordonFreeman has quit [Read error: Connection reset by peer]
td123 has joined #ruby
mike4_ has quit [Ping timeout: 276 seconds]
<arooni-mobile>
how do i convert POST encoded parameters like: "host_id%22%3A%22X5LI9QP%22%2C%22" ... to readable, regular characters?
<bnagy>
arooni-mobile: that will likely be in URI somewhere
<burgestrand>
I wouldn’t trust URI for encoding post data, so I wouldn’t trust it for decoding it either ^^
baroquebobcat has quit [Quit: baroquebobcat]
<banisterfiend>
burgestrand: hey burgy
<mjb2k>
ah yea, I think I as overlooking that the request is coming through apache, so it's already been forked and the non-parallel processing shouldn't matter
<banisterfiend>
burgestrand: did you use pry-capture yet, im keeping tabs on u
<burgestrand>
Oh, actually, encode/decode_www_form might suit well
<burgestrand>
banisterfiend: not yet :(
<banisterfiend>
burgestrand: no problem, i still like you
<richo>
I'm umming and ahhing about speaking at rux, it'll really come down to whether or not I can actually get this exploit to work before the CFP closes
burgestrand has quit [Quit: Leaving.]
<banisterfiend>
(sorry)
ntfox has joined #ruby
<bnagy>
I just do it to get in for free
<bnagy>
:>
<richo>
bnagy: Yes D:
<richo>
s/nagy/anisterfiend/
<ntfox>
Hello, Is there other ways to do it: a[:foo] = a.keys.include?(:foo) ? a[:foo] : true ? a[:foo] ||= true is not solution
<banisterfiend>
richo: what is the general opininion in australia of nzers ?
<banisterfiend>
(if anything, we might be nothing )
<richo>
banisterfiend: The joking opinion is that they're all sheepshaggers, the realistic opinion from the vast magjority of our country is nonchalance
<banisterfiend>
richo: figured :)
<bnagy>
ntfox: probably I'd use a different idiom? what are you using that kind of hash for?
<banisterfiend>
we're a blip
robbyoconnor has joined #ruby
<bnagy>
IME the further you get from .au / .nz the more we like each other :)
workmad3 has joined #ruby
<richo>
This is true
<bnagy>
big differences suddenly become small when you're in pakistan
<ntfox>
bnagy, hash can contain everything: nil, true, false, and other objects.
<richo>
although the only other australian I met at DC I wanted to get as far away from as possible
noyb has quit [Ping timeout: 245 seconds]
<banisterfiend>
richo: i get that too, the cultural cringe
<banisterfiend>
esp if they have a strong, annoying accent
<banisterfiend>
(which i like to think i dont have :P)
igotnolegs has quit [Quit: Computer has gone to sleep.]
<bnagy>
ntfox: I'm trying to understand why you would use, say a Hash with a default key
<richo>
bnagy: lazy mans cache?
<bnagy>
*wouldn't
<richo>
Oh
<richo>
bnagy++
<bnagy>
like what you're doing seems like a weird idiom, which 90% of the time smells like doing it wrong
ryanf has joined #ruby
<banisterfiend>
ryanf: hey ryan
<banisterfiend>
ryanf: did you get the forward?
<banisterfiend>
ryanf: are you ok with it?
yoklov has quit [Quit: computer sleeping]
<ntfox>
bnagy, yes. I have method, which takes as parameter hash. If i omit some parameters when calling the method, hash should use default keys...
t47148 has quit [Remote host closed the connection]
<apeiros_>
1.8 does not support %{keyword}
<Muz>
Note how the URL says "1.9.3" in it. :)
<im0b>
yes
<im0b>
got it.
<im0b>
so im just starting ruby
mneorr has joined #ruby
t93910 has joined #ruby
<im0b>
what version is dominant?
<im0b>
which api to learn?
tatsuya_o has joined #ruby
<im0b>
1.9?
<Muz>
Seriously, use 1.9. 1.8 is very olde, missing features, performs poorly, and is officially deprecated, although some very legacy systems still use it.
<im0b>
hmm, my ubuntu came with it
<im0b>
and it didn't update it...
<Muz>
Install RVM, or rbenv.
<Muz>
Ubuntu and Debian are notoriously bad at packaging ruby.
<nullx>
how would I check if a ruby expression works?
<im0b>
cool, thanks
<banister`sleep>
even if it's (currently) terminal only, due to the shear power that pry is packing
<nullx>
like as if the pattern is ok
<bnagy>
nullx: if it's a regexp, try rubular.com
<nullx>
bnagy: er no my ruby application reads in someone elses Regex string, I want to exit and tell them it was a bad regex if the exception is thrown.. Problem is, how do I make it pop up every time if it's wrong?
<nullx>
wrong = bad
<bnagy>
you want to create a regexp from a string?
<nullx>
no no
<nullx>
if a regex is invalid, it needs to say it's invalid lol
<bnagy>
and it comes in via a string?
<nullx>
input file in xml: <regex>/some_regex_here/</regex>
<bnagy>
Regexp.new( their_str ) should work
<nullx>
my app shouldn't test against it if it's invalid, it should halt, and say "bad regex"
<nullx>
okay
<nullx>
and just catch RegexpError there?
<bnagy>
that will raise if it's not able to be turned into a regexp
<nullx>
okay perfect, that's exactly what I needed, thanks
<bnagy>
but I don't think it will do what you want
lkba has joined #ruby
<nullx>
how so?
<Muz>
That will however also attempt to convert arbitrary strings to regexes, and in some cases, succeed.
<bnagy>
like... most stuff can be turned into a regexp
mneorr has quit [Quit: Leaving.]
<nullx>
er it's just gonna help some of the time, which is good enough IMO
<nullx>
for my requirements heh
<nullx>
aka it's all good, much appreciated
<bnagy>
I think maybe use Regexp.try_convert might be better
<nullx>
hmm
<nullx>
sure
<nullx>
that sounds more appropriate
<bnagy>
ugh no sorry that won't take a string :S
<nullx>
heheh
<nullx>
new will do ;0
<bnagy>
well I dunno what breaks new, is all
<nullx>
k
<bnagy>
very little, it seems
<nullx>
ah you're messing with it now
<nullx>
gotcha
flype has quit [Quit: Computer has gone to sleep.]
sailias has quit [Quit: Leaving.]
<bnagy>
least it will turn the stuff into a usable regexp most of the time, just it might not match what they expect
<bnagy>
certainly better than the other option to make a regexp out of a user supplied string :)
<nullx>
yeah
<nullx>
I just don't want my app to crash without me knowing it type of thing
Rajesh has joined #ruby
<nullx>
handling exceptions
<nullx>
=)
Rajesh is now known as Guest99058
<nullx>
anything is nicer with handled exceptions hehe
arietis has joined #ruby
<nullx>
hm, there is no large place with capybara people is there?
<Muz>
nullx: I suppose one thing you could do would be to try evaluating a regex match against the regex provided.
<Muz>
If an error is raised, the regex is either a string or invalid etc.
<apeiros_>
nullx: if your regex string is in the form of "/someregex/flags", then you might want to try LiteralParser
<apeiros_>
(gem name being literal_parser)
<Muz>
"" =~ /f[oo/ # That complains, as would # "" =~ "some string"
<m4rtijn>
exception handling is for noobs - hardcore programmers ignore errors
<Muz>
Or listen to apeiros_ instead of my dirty hacky workaround.
<nullx>
gotcha
<nullx>
I'll do that
<apeiros_>
m4rtijn: hardcore programmers don't write errors in the first place!!!!!1!1!elf!
<bnagy>
what? exception handling is for errors in other people's code, not mine
<ntfox>
hello guys, is there any tool to convert from slim to erb?
<m4rtijn>
hehe
<shevy>
argh
t93910 has quit [Remote host closed the connection]
t42011 has joined #ruby
Criztian has joined #ruby
cantonic has quit [Quit: cantonic]
lkba has quit [Quit: Bye]
<macer1>
is it better to use 2 or 4 spaces for tab?
<nullx>
I personally use 4 spaces.
<shevy>
macer1 2
<macer1>
I just noticed I have set it to 4
<shevy>
you can put more information in your .rb files if you stick to 80 characters limit, if using 2 spaces rather than 4
cantonic has joined #ruby
flype has joined #ruby
gmci has joined #ruby
<macer1>
ident using spaces *click*, tab width 2 *click*
<shevy>
I think 2 vs. 4 is not so much the big issue, spaces vs. tab is much larger. I have no real qualms with 4 spaces, but I don't like tabs at all
qwerxy has quit [Quit: offski]
Guest99058 is now known as Rajesh_
d3vic3 has quit [Ping timeout: 272 seconds]
lurch_ has joined #ruby
nullx has left #ruby [#ruby]
fixl has quit [Remote host closed the connection]
d3vic3 has joined #ruby
tiripamwe has quit [Ping timeout: 256 seconds]
harcher has quit [Ping timeout: 248 seconds]
cantonic has quit [Quit: cantonic]
uris has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
mneorr has joined #ruby
mneorr has quit [Client Quit]
mneorr has joined #ruby
peterhellberg has joined #ruby
fixl has joined #ruby
cantonic has joined #ruby
s1n4 has quit [Quit: peace out]
mneorr has quit [Client Quit]
t42011 has quit [Remote host closed the connection]
mneorr has joined #ruby
t17488 has joined #ruby
cantonic has quit [Client Quit]
tiripamwe has joined #ruby
javos has quit [Quit: Leaving...]
cantonic has joined #ruby
qwerxy has joined #ruby
tolbkni has joined #ruby
Tomasso has joined #ruby
Morkel has quit [Quit: Morkel]
javos has joined #ruby
qko has joined #ruby
yasushi has joined #ruby
javos has left #ruby [#ruby]
tiripamwe has quit [Ping timeout: 248 seconds]
yasushi has quit [Remote host closed the connection]
yasushi has joined #ruby
QKO_ has quit [Ping timeout: 245 seconds]
Foxandxss has joined #ruby
seitensei has joined #ruby
pygmael has quit [Read error: No route to host]
pygmael has joined #ruby
yasushi has quit [Ping timeout: 240 seconds]
joephelius has quit [Quit: WeeChat 0.3.8]
rkk has joined #ruby
msch has joined #ruby
<msch>
hi, can someone recommend a gem for relaxed json parsing? e.g. my "json" looks like { 'some key': 'some value' } which isn't proper json but which is nevertheless parseable
<_br_>
msch: try gem install oj
<_br_>
msch: its very fast also
<msch>
_br_: great, thanks!
<_br_>
welcome
tiripamwe has joined #ruby
_bart has quit [Quit: _bart]
fearoffish has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
Bofu has joined #ruby
<msch>
_br_: hm, do i somehow need to tell oj to be less strict? it doesn't read my malformed json out of the box
chussenot has quit [Quit: chussenot]
Araxia has quit [Quit: Araxia]
Bofu2U has quit [Ping timeout: 246 seconds]
wallerdev has quit [Quit: wallerdev]
mmokrysz has joined #ruby
<im0b>
hey, is there like a var_dump(php) or dir(python) in ruby?
<apeiros_>
pp -> require 'pp', y -> require 'yaml'
d3vic3 has quit [Ping timeout: 248 seconds]
rippa has joined #ruby
eikko has quit [Ping timeout: 260 seconds]
elhu has quit [Quit: Computer has gone to sleep.]
d3vic3 has joined #ruby
yasushi has joined #ruby
Who has joined #ruby
<Who>
hey anyone around ?
<Muz>
Just ask your question, if someone can help, they will.
<apeiros_>
no, anyone hasn't been on today. maybe he'll be here tomorrow?
rkk has quit [Quit: Leaving]
<Mon_Ouie>
any-key seems to be here though
* Muz
hits any-key.
jimeh3 has quit [Ping timeout: 248 seconds]
yasushi has quit [Remote host closed the connection]
<Who>
I have been using Ruby for some time now, I realise programming Ruby makes me work on my problems than writing functions for the language (like C without libs) but since Ruby is such a high level language, do I require to know about the machine to write efficient code ?
yasushi has joined #ruby
t17488 has quit [Remote host closed the connection]
jimeh3 has joined #ruby
t42361 has joined #ruby
JarJar has quit [Quit: Leaving]
<Who>
I know for common tasks its not required but what about tough problems
Criztian has quit [Remote host closed the connection]
ezra has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Muz>
I'd question if it's more a case of needing to know about the language and interpreter, more than the hardware itself, in order to write something efficient. But this is all strewn with hypotheticals and would vary from use-case to use-case. A concrete example'd be nice.
gmci has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
yasushi has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
yasushi has joined #ruby
quazimodo has quit [Ping timeout: 246 seconds]
Who has quit [Read error: Connection reset by peer]
<bnagy>
the only thing you might care about is how much RAM / disk you have
<bnagy>
since there are some problems where that's a factor in choosing an algorithm
quazimodo has joined #ruby
<bnagy>
oh... left I guess
Who has joined #ruby
<Who>
umm did you get my last reply ?
ezra has quit [Remote host closed the connection]
ezra has joined #ruby
qwerxy has quit [Quit: offski]
bluebie has joined #ruby
Who has quit [Read error: Connection reset by peer]
yasushi has quit [Remote host closed the connection]
<shevy>
I let you copy paste some '.' from me for future use, here '.' '.' '.' '.'
<workmad3>
what stage is 2.0 at? have they released a beta candidate yet, or is it still just 'compile ruby head and expect issues'?
chussenot has joined #ruby
<shevy>
peterhellberg, I'll try anyway, you guys convinced me
<shevy>
"eregon authored 18 minutes ago" almost LIVE coding
<peterhellberg>
workmad3: Feature freeze for "big features" in a week or so.
<Muz>
So, the latter.
<eregon>
shevy: hehe :)
<shevy>
ohhhh
<shevy>
he is here too :)
Markvilla has joined #ruby
<shevy>
well, let's run configure now and see what happens...
choffstein has joined #ruby
mneorr has quit [Read error: No route to host]
joephelius has joined #ruby
mneorr has joined #ruby
A1241 has left #ruby [#ruby]
<peterhellberg>
shevy: Do you have RVM installed? (If so, rvm install ruby-head will install it for you)
Criztian has joined #ruby
choffstein has quit [Remote host closed the connection]
<shevy>
hmm dont have it installed yet, will install it after this try now
<shevy>
so far no errors
mneorr1 has joined #ruby
<workmad3>
shevy: you could also use ruby-build and install 2.0.0-dev :)
bigkevmcd has joined #ruby
mneorr has quit [Ping timeout: 248 seconds]
shiki_ has quit [Remote host closed the connection]
<juha_>
has anyone been running ruby + mysql on aws micro instance?
<shevy>
yeah well, later later, right now I get scared by things like
<shevy>
Version of /Downloads/ruby-ruby-fd7dc23/ext/digest/rmd160/rmd160.h : no version available
resure has joined #ruby
nedbat has joined #ruby
<shevy>
juha_ not me, I don't even know what is an aws micro instance
<peterhellberg>
juha_: Nope, but it sounds a bit tight for that kind of hardware
fermion has joined #ruby
<peterhellberg>
juha_: Do you _need_ MySQL or would any database work?
wedgeV has joined #ruby
sailias has joined #ruby
<im0b>
how do i trim the first char of a string?
<im0b>
"12345"[1..]
<im0b>
is the intuition
<juha_>
shevy: it's free and really small and bad
<im0b>
if i want to have "2345" in return
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r_ has joined #ruby
<juha_>
peterhellberg: well yeah, kind of, as i want some cheap/free instance just to demo my code to a friend
<juha_>
peterhellberg: i guess i could use something else than mysql also, but kind of want to use mysql
<im0b>
[1..-1] got it.
<shevy>
im0b yeah
<shevy>
could also set it to '' via string[0,1] = ''
<juha_>
peterhellberg: any suggestion on the db that could fir on micro instance?
t68985 has quit [Remote host closed the connection]
<juha_>
*fit
<peterhellberg>
juha_: A micro has 613 MB memory… so it should work
t45962 has joined #ruby
<shevy>
RUBY_VERSION => "2.0.0"
<shevy>
hah!
resure is now known as resure_away
<shevy>
hello future world
<Muz>
Welcome to the world of tomorrow... today!
nateberkopec has quit [Quit: Leaving...]
omry has joined #ruby
ezra has joined #ruby
eikko has quit [Ping timeout: 248 seconds]
pu22l3r_ has quit [Ping timeout: 246 seconds]
<Spooner>
Enjoy the bugs of tomorrow...today!
tiripamwe has quit [Ping timeout: 256 seconds]
pratyksp has joined #ruby
Konboi has joined #ruby
qwerxy has quit [Quit: offski]
macer1 has quit [Read error: Connection reset by peer]
jjbohn has quit [Quit: Leaving...]
<shevy>
lol
macer_ has joined #ruby
ezra has quit [Ping timeout: 276 seconds]
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
<pratyksp>
Hi, is there standard library to find total system memory.
<hoelzro>
what's this channel's opinion on hoe? is it a good tool to use?
<hoelzro>
I'm looking for a Ruby equivalent to Perl's Dist::Zilla, and Hoe (so far) is the closest thing I've found
Criztian has quit [Remote host closed the connection]
paolooo has quit [Quit: Page closed]
chussenot has quit [Quit: chussenot]
jrajav has joined #ruby
chussenot has joined #ruby
tiripamwe has joined #ruby
Markvilla has quit [Ping timeout: 245 seconds]
Markvilla has joined #ruby
bigkevmcd has quit [Quit: outta here]
JonnieCa1he has quit [Quit: leaving]
fantazo has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
bbttxu has joined #ruby
qwerxy has joined #ruby
Inoperable has quit [Quit: Simon says sleep!]
ananthakumaran has quit [Quit: Leaving.]
jtza8 has joined #ruby
AllStruck has joined #ruby
<AllStruck>
Does anyone here use YubNub?
tenseiten has joined #ruby
<m4rtijn>
sounds dirty
nari_ has joined #ruby
seitensei has quit [Ping timeout: 260 seconds]
<peterhellberg>
juha_: What kind of app are you looking to deploy on that micro instance?
<AllStruck>
m4rtijn: it means hooray in Ewok
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347]]
<peterhellberg>
juha_: Did you consider using Heroku (and Postgres) instead?
tommyvyo has joined #ruby
<AllStruck>
unfortunately the server is down for it right now... just wondering if anyone else is as effected by this as I am.
dpk has joined #ruby
<shevy>
pratyksp dont think there is, on linux you could run system 'dfree' or something like that, via ruby
<AllStruck>
it was created with rails in 24 hours as part of a competition
<peterhellberg>
AllStruck: “Sorry about YubNub being down, folks. The pendrell server at Joyent is having issues. https://help.joyent.com/”
<AllStruck>
peterhellberg: are you with Joyent? or where did that come from? I emailed the creator and had already seen that but thanks ;)
indian has joined #ruby
<pratyksp>
shevy: I wanted something without calling external programs.
<AllStruck>
peterhellberg: google says you got that from the YubNub blog ya?
nanderoo has joined #ruby
<peterhellberg>
AllStruck: Yes, and so should you have ;)
mascool has joined #ruby
<peterhellberg>
They’ll probably update the blog when they are up again
<AllStruck>
peterhellberg: why when I talked to Jonathan before this was posted?
nari_ has quit [Ping timeout: 240 seconds]
shiki has joined #ruby
nilg` has joined #ruby
<AllStruck>
peterhellberg: I have faster ways of telling when a service comes back online than waiting on blog posts
<shevy>
pratyksp yeah. not available in ruby standard library.
erichmenge has joined #ruby
nilg has quit [Ping timeout: 252 seconds]
<AllStruck>
besides I ended up creating something in Python to fill the void :P
miho has joined #ruby
iori has quit [Remote host closed the connection]
fbernier has joined #ruby
iori has joined #ruby
wedgeV has quit [Quit: wedgeV]
nwest has joined #ruby
iori has quit [Remote host closed the connection]
pen has quit [Read error: Connection reset by peer]
elux has joined #ruby
nu7hatch has joined #ruby
pen has joined #ruby
gmci has joined #ruby
freeayu has quit [Ping timeout: 252 seconds]
dr0p has quit [Quit: Wychodzi]
[Neurotic] has quit [Remote host closed the connection]
coderhut has joined #ruby
uris has quit [Quit: Lost terminal]
GoGoGarrett has joined #ruby
gfontenot has joined #ruby
t45962 has quit [Remote host closed the connection]
inteq has joined #ruby
gfontenot has quit [Client Quit]
t60081 has joined #ruby
moshee has quit [Ping timeout: 252 seconds]
moshee has joined #ruby
hynkle has joined #ruby
Inoperable has joined #ruby
paolooo has joined #ruby
centipedefarmer has joined #ruby
freeayu has joined #ruby
luckman212 has joined #ruby
JonnieCache has joined #ruby
ananthakumaran has joined #ruby
hynkle has quit [Read error: Connection reset by peer]
arvidkahl has quit [Quit: arvidkahl]
<juha_>
peterhellberg: it's just a small chat/todo (at the moment) with ruby serving as websocket server + saving things to a db
asteve_ has joined #ruby
<juha_>
peterhellberg: nothing fancy, i'm just learning ruby
asteve_ has quit [Client Quit]
<bluebie>
juha_: Sounds neat!
<bluebie>
I like eventstream better than websockets for that sort of thing - so much easier to host, just regular http, don't need special rack or servers or anything like that
banister`sleep has quit [Ping timeout: 256 seconds]
tayy has joined #ruby
andrewhl has joined #ruby
jrist-afk is now known as jrist
<JonnieCache>
allsystemsarego: you could derive WINNING_COMBINATIONS algorithmically rather than hardcoding it i guess
<JonnieCache>
whether or not thats more elegant is a matter of taste
uris has joined #ruby
tds has joined #ruby
tds is now known as Guest13490
m4rtijn has quit [Quit: Verlassend]
Jake232 has joined #ruby
denysonique has joined #ruby
mikewintermute has joined #ruby
<Muz>
allsystemsarego: you could also wrap some of the logic in function calls with descriptive names.
flype has joined #ruby
<bnagy>
and not play out the whole game once someone has won
<bnagy>
...actually that's a bug
<Muz>
bnagy: does it not already do that?
<Muz>
Given the exit() calls.
<bnagy>
ahh yeah it does I got my indenting levels messed up
choffstein has joined #ruby
xorox90 has joined #ruby
<bnagy>
it's not very OO ;/
fb6667 has left #ruby [#ruby]
<JonnieCache>
tic tac toe doesnt need OO
<bnagy>
well it doesn't need to be programmed at all
chichou has quit [Ping timeout: 246 seconds]
Nisstyre has quit [Ping timeout: 276 seconds]
<bnagy>
so assuming it's didactic, it's not very OO
JustinCampbell has joined #ruby
t60081 has quit [Remote host closed the connection]
<JonnieCache>
at uni they wouldve made us do that with a bloody visitor pattern or something in a bazillion lines of java
t28456 has joined #ruby
<bnagy>
because the aim is not to play random games of tic tac toe
coderhut has quit [Quit: Page closed]
pu22l3r has joined #ruby
<bnagy>
I think it would be better to have a Board and two Players, for sure
<JonnieCache>
i take your point, if this was an excercize in learning OO then its an epic fail. theres no evidence for that though
afd__ has quit [Ping timeout: 244 seconds]
<bnagy>
then you can actually develop strategy
<bnagy>
like 'if I have two in a row and it's my move, win' :>
<Muz>
bnagy: /and/ if there is a free adjacent tile in the same direction.
<Muz>
You could have two in a row, and it be your turn, and not win.
<JonnieCache>
my advice would be to throw it away and implement conways game of life instead because its basically the same but 10000x more interesting
Axsuul has quit [Ping timeout: 240 seconds]
<bnagy>
harder
<bnagy>
but definitely more interesting :)
SCommette has joined #ruby
<JonnieCache>
implementing the GoL in a one dimensional array of booleans or the like is something everyone should do early in their careers
v0n has joined #ruby
qqProc has joined #ruby
qqProc has quit [Client Quit]
<bnagy>
oic, 1d makes the edge detection a million times easier
<bnagy>
never thought of that :)
<JonnieCache>
easier?
Nisstyre has joined #ruby
<bnagy>
how do you do it with booleans though?
qqProc has joined #ruby
chichou has joined #ruby
<bnagy>
don't you need empty, full, dying, birthing ?
mikalv_ is now known as mikalv
jjbohn has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
<JonnieCache>
dont see why. i didnt.
<JonnieCache>
theres only alive or dead
tatsuya_o has joined #ruby
<JonnieCache>
the cells dont have an age
<bnagy>
but you need to kill / birth everything in one go
verto|off is now known as verto
nitgav has joined #ruby
<JonnieCache>
ah i think i did it by generating a new array each time and then getting rid of the old one
<JonnieCache>
not mutating the same one
<bnagy>
ok that would work
nari_ has joined #ruby
bowlowni has joined #ruby
qqProc has quit [Client Quit]
BrokenCog has joined #ruby
BrokenCog has joined #ruby
<andrewhl>
I can use << to append to a File, but how do I prepend?
<hoelzro>
andrewhl: you probably will need to slurp in the contents, alter them, and re-write them
<JonnieCache>
llaskin: for simple use, httparty is good
afd__ has joined #ruby
erichmenge has quit [Quit: Be back later]
<hoelzro>
or create a file, write your prepend stuff to it, append the contents of the old file to the new one, and rename the new one to the old one
bier has quit [Quit: Ex-Chat]
<Muz>
llaskin: what exactly are you trying to do over HTTP? Ruby does have built in support via net/http but as for which gem is "best" depends on what you really want to do.
<bluebie>
I'm a fan of open-uri!
<bluebie>
it doesn't do lots of stuff! But it sure does open uris!
<Muz>
llaskin: not used curb personally, but I'd suspect it doesn't handle basicauth in the way you've attempted to pass the username and password.
asobrasil has joined #ruby
bbttxu has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
mikewintermute has quit [Client Quit]
ph^_ has quit [Ping timeout: 268 seconds]
infinitiguy has joined #ruby
mikewintermute has joined #ruby
afd__ has quit [Ping timeout: 252 seconds]
kvirani has joined #ruby
* shevy
sighs happily.
<shevy>
always those sexy '.'
dpk has quit [Quit: Asleep at the keyboard.]
bbttxu has quit [Remote host closed the connection]
yasushi has quit [Remote host closed the connection]
bbttxu has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
yasushi has joined #ruby
t28456 has quit [Remote host closed the connection]
t88176 has joined #ruby
tayy has quit [Remote host closed the connection]
ananthakumaran has quit [Ping timeout: 244 seconds]
jjbohn has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
yasushi has quit [Ping timeout: 272 seconds]
<arietis>
is there any book about ruby which is fun to read and targeted for advanced developer and not beginner?
<arietis>
i know basics and wanna know more
<arietis>
:D
<hoelzro>
arietis: The Ruby Programming Language is quite good.
ackz has joined #ruby
<arietis>
what about tutorials?
<arietis>
is there any good web site?
<peterhellberg>
One of my favorites are "Design Patterns In Ruby"
<JonnieCache>
but really you should get that book
<shevy>
arietis did you work through learn to program from chris pine already?
afd__ has joined #ruby
Markvilla has joined #ruby
mohits has joined #ruby
ananthakumaran has joined #ruby
<tommyvyo>
arietis: Read the Ruby Pickaxe book
choffstein has quit [Remote host closed the connection]
<tommyvyo>
second for Design Patterns in Ruby
dpk has joined #ruby
adambeynon has joined #ruby
asteve has quit [Disconnected by services]
asteve_ is now known as asteve
asteve has quit [Changing host]
asteve has joined #ruby
monobit_ has joined #ruby
MrWGW has quit [Ping timeout: 268 seconds]
v0n has joined #ruby
mneorr1 has quit [Quit: Leaving.]
MrWGW has joined #ruby
tish has joined #ruby
daniel_hinojosa has joined #ruby
dhruvasagar has joined #ruby
urbann has quit [Remote host closed the connection]
<arietis>
it's too big and boring
Markvilla has quit [Ping timeout: 245 seconds]
ly_gs has quit [Read error: Connection reset by peer]
<arietis>
i don't get the purpose of such books, it's easier to read docs
Markvilla has joined #ruby
erichmenge has quit [Quit: Be back later]
Rajesh has joined #ruby
Rajesh is now known as Guest86229
afd__ has quit [Ping timeout: 245 seconds]
verto is now known as verto|off
Jay_Levitt has joined #ruby
mascool has quit [Ping timeout: 240 seconds]
afd__ has joined #ruby
cantonic_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
luxurymode has joined #ruby
<luxurymode>
if i have some project with a script and the root directory and another module/class in a subdirectory..how can i require that class in the subdirectory?
<any-key>
it's not an amazing guide but it's a fun read
<any-key>
pleasepleaseplease read a real guide first
<arietis>
it perfectly fits me cause i'm not going to develop professionally using ruby, just wanna know more about it :)
axl_ has joined #ruby
<any-key>
ah okay
<arietis>
moving out of the city for 2 weeks so looking for fun reading
<arietis>
:D
Guest86229 has quit [Quit: Leaving to Quit]
Markvilla has quit [Quit: Computer has gone to sleep.]
<allsystemsarego>
arietis, there is no substitute for taking hard problems and solving them with any language you want to learn more about
tds_ has joined #ruby
hynkle has quit [Read error: Operation timed out]
fb6667 has joined #ruby
<any-key>
indeed
<arietis>
yeah but i don't like webdev and most of the ruby resources are focused on rails -.-
<any-key>
the best way to learn a language is to write silly little things
<any-key>
nah there's plenty of non-rails resources
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
kn330 has joined #ruby
FuXi has joined #ruby
tvw has quit [Remote host closed the connection]
revans has joined #ruby
<sphera>
highly agree with any-key about writing silly little things
hynkle has joined #ruby
revans has quit [Client Quit]
<JonnieCache>
arietis: cleveralgorithms.com
Hydroxide has joined #ruby
hynkle has quit [Read error: Connection reset by peer]
seitensei has joined #ruby
tenseiten has quit [Ping timeout: 256 seconds]
fb6667 has quit [Ping timeout: 240 seconds]
dpk has quit [Quit: Asleep at the keyboard.]
Jay_Levitt has quit [Quit: Leaving...]
tayy has joined #ruby
<arietis>
JonnieCache: thanks
<Hydroxide>
anyone know a way to tell Ruby sleep until a specific time? i.e. fixed end time, not a duration.
<Hydroxide>
for various reasons, cron isn't the right solution for this.
hynkle has joined #ruby
Rajesh has joined #ruby
<canton7>
find how long it is until your preferred time?
tiripamwe has quit [Ping timeout: 248 seconds]
<Hydroxide>
canton7: that's error-prone and fails if the program is scheduled out at the wrong time
Rajesh is now known as Guest35519
<canton7>
sleep for a minute, check time, rinse repeat?
ezra has joined #ruby
sepp2k has joined #ruby
<Hydroxide>
I need something more precise. I know at least Linux supports waking a process up at a specific time, but don't know if there's a way to do that from Ruby
<asteve>
cron?
<any-key>
oh man it's been too long since my systems programming class
<Inoperable>
hello
<asteve>
sleeping is never a good idea; wasted cycles
Synthead has joined #ruby
<Hydroxide>
asteve: right, polling is better to avoid
t88176 has quit [Remote host closed the connection]
troessner has quit [Remote host closed the connection]
Inoperable has quit [Quit: Rectified]
t21045 has joined #ruby
<asteve>
sleeping is the definition of wasted cycles, what are you doing when you sleep? nothing
<hoelzro>
Hydroxide: clock_nanosleep?
<asteve>
interrupts are the money melon
<hoelzro>
asteve: but the CPU isn't spinning during a sleep =)
tenseiten has joined #ruby
<any-key>
context switching still occurs
<Hydroxide>
asteve: I said "for various reasons, cron isn't the right solution for this." in this case, we are trying to working around what appears to be a bug in crond
<any-key>
that's expensive, yo
<hoelzro>
any-key: agreed
<Hydroxide>
but it doesn't have to be for anything periodic
<hoelzro>
but for most things in userland, that's acceptable
<any-key>
you can use something like eventmachine
<hoelzro>
since the kernel may preempt you at any time
<any-key>
it's a bit overkill though
bbttxu has quit [Quit: bbttxu]
<hoelzro>
unless you're on a RT OS
<Hydroxide>
well, this isn't a RT OS, but it does do a lot of low-latency stuff at high volume
seitensei has quit [Ping timeout: 268 seconds]
<Hydroxide>
and precision is relatively important
<Hydroxide>
this is standard linux.
Guest35519 has quit [Remote host closed the connection]
<hoelzro>
Hydroxide: clock_nanosleep should suit you then
<Hydroxide>
I mean, the ruby doesn't do a lot of low-latency stuff at high volume. the system does.
<Hydroxide>
hoelzro: nice :)
qko has quit [Ping timeout: 246 seconds]
<Hydroxide>
hoelzro: is there a pre-existing way to call that from Ruby or do I need to do a regular FFI call?
jrist is now known as jrist-mtg
<hoelzro>
Hydroxide: check for a binding?
<hoelzro>
or write one =)
TheLZA has joined #ruby
bluOxigen_ has quit [Ping timeout: 240 seconds]
<any-key>
rewrite it all in C
TheLZA has quit [Max SendQ exceeded]
<Hydroxide>
hoelzro: yes, that was my question :) FFI may be the answer. thanks.
JustinCampbell has quit [Remote host closed the connection]
TheLZA has joined #ruby
ksk has joined #ruby
<ksk>
hello
qko has joined #ruby
<Hydroxide>
hoelzro: heh, just noticed that it doesn't actually guarantee waking you up at the specified time. ah well, this isn't a RT OS. thanks :)
<ksk>
im using array.include? to check if something is in an array. is there a way to check if "something*" (like "something-foo" or sth like this) is in this array?
theRoUS has quit [Ping timeout: 246 seconds]
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<JonnieCache>
ksk: array.any? {|e| e =~ /something.*/ }
Hydroxide has left #ruby [#ruby]
<JonnieCache>
if array is very big you may want to define that regex outside of the block so it only gets created once
Krajsnick has quit [Read error: Connection reset by peer]
Krajsnick has joined #ruby
brdude has joined #ruby
tayy has quit [Remote host closed the connection]
hynkle has quit [Ping timeout: 268 seconds]
erichmenge has quit [Quit: Be back later]
Rajesh has joined #ruby
Rajesh is now known as Guest87497
hynkle has joined #ruby
luckman212_ has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
Wilhelm_ has joined #ruby
<asteve>
how can I diff two hashes?
shevy has joined #ruby
internet_user has quit [Remote host closed the connection]
tcopp has quit [Quit: leaving]
luckman212 has quit [Ping timeout: 248 seconds]
tcopp has joined #ruby
mike4_ has joined #ruby
<asteve>
i actually need to diff two hashes that contain hashes {1=>{a => b, c => d}, 2 => {e => f, g => d}} compared to {1=>{a => b, c => d}, 2 => {e => f, g => d}}
shiki has quit [Remote host closed the connection]
Guest87497 has quit [Read error: Connection reset by peer]
Coolhand has joined #ruby
<Coolhand>
newbie here, for some reason I can't seem to get my validations to work http://pastebin.com/RML4FjnR.
bradhe has joined #ruby
<Coolhand>
I know this might be a rails thing but I figured this channel might be appropriate
Krajsnick has quit [Remote host closed the connection]
darren__ has joined #ruby
<Coolhand>
I did the bundle install after loading the gem, but email address still don't get validated
savage- has joined #ruby
savage- has quit [Remote host closed the connection]
savage- has joined #ruby
<ksk>
sorry for asking all that newbie questions, but.. how to use a variable inside some "{|foo| foo == "#{var}" }" construct? (i just placed var there instead of $string, but it does not work..)
benson has joined #ruby
joephelius has quit [Quit: brb]
tenseiten has quit [Ping timeout: 272 seconds]
<shevy>
ksk can you show the whole code you try to test
<shevy>
foo = "hello"; puts "#{foo} world"
<shevy>
would work
<matti>
Coolhand: #rubyonrails
davidcelis has joined #ruby
<ksk>
yap.. gimme a second :)
tiripamwe has quit [Ping timeout: 260 seconds]
<Coolhand>
matti: thanks
ananthakumaran has quit [Quit: Leaving.]
zai has quit [Quit: Leaving]
davidcelis_ has joined #ruby
davidcelis has quit [Read error: Connection reset by peer]
davidcelis_ is now known as davidcelis
davidcelis has quit [Changing host]
davidcelis has joined #ruby
<Mon_Ouie>
ksk: Also explain how it "doesn't work"
luckyruby has quit [Remote host closed the connection]
<Mon_Ouie>
puts i
<matti>
ksk: Your code generally confuses the concept of strings and integers etc.
<matti>
Mon_Ouie: Sure, but this is more to give the idea.
<ksk>
matti: that last statement solved my issue, thx!
havenn has quit [Remote host closed the connection]
<ksk>
im used to do bash and just give a ... about strings and integers etc...
<ksk>
thanks everone!
<matti>
Well.
<matti>
Wlecome to the real world.
<matti>
Fuck bash.
<matti>
;]
hynkle has joined #ruby
<heftig>
shellscripts are nice for ad-hoc automation, but terribly unreliable
GoGoGarrett has quit [Remote host closed the connection]
<eam>
amusingly enough, "" is a number in C
t21045 has quit [Remote host closed the connection]
<matti>
heftig: People can't even write bash scripts.
tayy has joined #ruby
johnlcox has joined #ruby
<eam>
and can be compared with integers
t5613 has joined #ruby
<heftig>
eam: pointer, not number
syamajala has joined #ruby
<eam>
heftig: pointers are numbers
zodiak has joined #ruby
<eam>
integral to C is the concept of pointer math :)
<matti>
eam: IIRC gcc will give you "warning: assignment makes integer from pointer without a cast"
<matti>
eam: If you do it.
<eam>
matti: sure, as well as between other numeric types
<matti>
:)
<arietis>
is there any sheet with ruby operators etc?
<eam>
that has no bearing on a pointer being a numeric type :)
chussenot has quit [Quit: chussenot]
<matti>
arietis: Google dude!
<arietis>
nooo
nicoulaj has quit [Read error: Connection reset by peer]
<matti>
arietis: There is FUCK loads of things in the network.
<arietis>
i wanna know your opinion
<arietis>
:D
<matti>
I am not sharing ;p
<matti>
Go Google ;p
<arietis>
leecher!
<arietis>
:D
<matti>
Me?!
<matti>
Pff
* matti
stabs arietis
<eam>
hey so, serious question re: arietis's question
mikewintermute has quit [Quit: mikewintermute]
<eam>
one thing I *really* like about perl is the detailed documentation of its internals, including common useage forms and tables of things like operators
<eam>
is there anything like that for ruby?
<matti>
eam: It calls for a legit use of "Let me Google that for you"
<eam>
eg similar to perldoc perlop
johnlcox has quit [Ping timeout: 248 seconds]
<matti>
Perl.
<matti>
On #ruby
<matti>
;p
<matti>
What next? PHP.
<matti>
It also has decent documentation.
<eam>
matti: I'm asking if ruby has anything similar
<matti>
I know :)
<matti>
Sorry.
<matti>
eam: IIRC, not in one decently organised place, sadly.
<eam>
honestly, I use perldoc for ruby functions as they're often the same
<shevy>
eam, I ended up collecting my own examples for ruby
flagg0204 has quit [Quit: leaving]
senny has quit [Remote host closed the connection]
<theRoUS>
ruby 1.8.7. is there any way for a module's self#included method (or other hook) to pick and choose what gets inherited? e.g., pass along *some* constants but not others?
Krajsnick has joined #ruby
<theRoUS>
likewise for a class' #inherited method?
pen has quit [Read error: Connection reset by peer]
nXqd has quit [Ping timeout: 256 seconds]
pen has joined #ruby
flagg0204 has joined #ruby
adeponte has joined #ruby
havenn has joined #ruby
_adeponte has joined #ruby
mahmoudimus has joined #ruby
havenn has quit [Remote host closed the connection]
QKO_ has joined #ruby
<arietis>
so ruby have almost same syntax as objective-c as i can see
<theRoUS>
it kinda looks like Module#append_features might be an approach, but it specifically says it's for module inclusion in other *modules*, not classes. it also doesn't describe how to hook into the 'add the constants, methods, and module variables of this module' process to pass along (or not) definitions
adeponte has quit [Ping timeout: 244 seconds]
jrajav has quit [Quit: The best darkness is strange and surprising]
<arietis>
except that ruby takes less lines of code
* arietis
wonders why ruby isn't mainstream yet
<eam>
objc's memory management is much more similar to perl
<nedbat>
arietis: obj-c is only mainstream b/c people want to build iOS apps.
<arietis>
but people can build iOS apps with ruby
johnb003 has quit [Ping timeout: 248 seconds]
johnb003 has joined #ruby
pdtpatrick has joined #ruby
<nedbat>
arietis: but Apple tells them to use obj-c.
<arietis>
there is rubymotion
<matti>
eam: To Perl?
<eam>
matti: yeah, both are reference counted
qko has quit [Ping timeout: 268 seconds]
<nedbat>
arietis: it makes a huge difference to have a large corporation encouraging language use. Why do you think Java and C# are so popular?
<JonnieCache>
arietis: its mostly problems with the interpreter. A its slow and B it aint great on windows
<eam>
which has significant advantages in that problem space, imo
Krajsnick has quit [Remote host closed the connection]
Criztian has joined #ruby
<matti>
eam: In that regards yes, but then both have different semantics. Perl is very greedy, so is Ruby when it goes to MM.
<eam>
greedy how so?
<matti>
eam: Ruby and Perl will grow its heap re-using it (whatever size it came to) for new objects.
<matti>
eam: This is so much pain.
timonv has quit [Remote host closed the connection]
sepp2k has quit [Ping timeout: 246 seconds]
<arietis>
nedbat: java is so popular since it's cross-platform
<matti>
eam: There is an excellent blog post about this floating.
ringotwo has joined #ruby
<eam>
ah, you mean there's no release back to the system. yes
<matti>
eam: Yes.
<matti>
eam: Perl and Ruby VM were designed for hit-and-run -- so to speak -- things (meaning: not lasting very long).
<nedbat>
arietis: and because Sun had full-time employees dedicated to building it and promoting it.
<arietis>
nedbat: and C# is main language for this evil creation called windows
<eam>
mmm, I'm not sure I agree
<nedbat>
arietis: and Microsoft has full-time employees dedicated to building and promoting C#
<matti>
eam: :)
cantonic has quit [Quit: cantonic]
chrisbolton has joined #ruby
<eam>
matti: slab allocation and never unallocating is not the same as leaking memory
<matti>
eam: Sure.
brianpWins has joined #ruby
<eam>
I've had trouble with ruby due to the *ahem* heuristics applied but in perl it's very easy to make a stable long-term process
<matti>
:)
<eam>
to be fair, most of the trouble I've had in ruby are side effects which the gc was unaware of
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<nedbat>
arietis: you can build Windows programs in Ruby, so why is C# so popular for it?
havenn has quit [Remote host closed the connection]
<shevy>
ruby will eventually take perl down one rank :>
<asteve>
so yamammal = YAML::dump(hash); yamammal['will_this_work'] = true; changes "will_this_work" to "true"; I want to change the value of "will_this_work" to "true"
<Muz>
asteve: do you want to change the value of "will_this_work" to be true, or do you want the key "will_this_work" to become "true"? Your question and approach is confusing.
<asteve>
Muz: I want to change the value of "will_this_work"
<Muz>
Do as canton7 suggested then, change it in the hash, then re-dump it as a YAML object.
johnb003_ has joined #ruby
<asteve>
i no longer have access to the original hash; i assume I'll have to YAML::load, change the value and then YAML::dump again
syamajala has quit [Remote host closed the connection]
Krajsnick has joined #ruby
himsin has joined #ruby
sepp2k has joined #ruby
<theRoUS>
does anyone know how to use Module#included, Module##append_features, and/or Class#inherited to *limit* what gets inherited?
<canton7>
asteve, cool, yeah that's the right thing to do
<canton7>
changing the yaml directly would require writing a yaml parser, and you might as well just use the built-in one
tk_ has quit [Quit: ばいばい]
<asteve>
it's interesting that I can change the name of the key though
<canton7>
hmm?
mrsolo has joined #ruby
havenn has quit [Remote host closed the connection]
<asteve>
yamammal['key'] = "new_key_name"
khakimov has joined #ruby
c0rn_ has joined #ruby
<canton7>
that's because String#[]= does a search and replace. Don't rely on this behaviour for yaml. Ex: s = YAML::dump('one' => 'two', 'three' => 'four'); s['two'] = 'new_two'; p YAML::load(s)
luxurymode has quit [Quit: Computer has gone to sleep.]
bier has quit [Ping timeout: 252 seconds]
apok has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
MarGarina has quit [Ping timeout: 244 seconds]
rakunHo has joined #ruby
lurch_ has quit [Quit: lurch_]
Criztian has quit [Remote host closed the connection]
Criztian has joined #ruby
cirwin has joined #ruby
brasten has quit [Quit: brasten]
<canton7>
oops, s = YAML::dump('one' => 'two', 'two' => 'three')
haxrbyte has joined #ruby
opus has joined #ruby
brasten has joined #ruby
haxrbyte has quit [Remote host closed the connection]
tatsuya_o has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
chichou has quit [Remote host closed the connection]
chichou has joined #ruby
urbann has joined #ruby
TorpedoSkyline has joined #ruby
Eldariof-ru has joined #ruby
haxrbyte_ has quit [Ping timeout: 246 seconds]
yonggu has joined #ruby
wallerdev has joined #ruby
chichou has quit [Ping timeout: 260 seconds]
alvaro_o has joined #ruby
erichmenge has joined #ruby
kenichi has joined #ruby
bier has joined #ruby
apok has quit [Remote host closed the connection]
baphled has quit [Ping timeout: 240 seconds]
apok has joined #ruby
bricker88 has joined #ruby
<bricker88>
Hey there, is there an advantage to using "ensure", rather than just putting the code I want executed after the begin/rescue/end block? Besides it just being a little more clear.
macer_ is now known as macer1
geekbri has quit [Remote host closed the connection]
indian has quit [Ping timeout: 252 seconds]
<cirwin>
bricker88: ensure will handle throws as well as raises, and early returns, and exceptions that aren't StandardError
pdtpatrick has joined #ruby
geekbri has joined #ruby
geekbri has quit [Read error: Connection reset by peer]
geekbri has quit [Read error: Connection reset by peer]
invsblduck has joined #ruby
geekbri has joined #ruby
adamkittelson has joined #ruby
geekbri has quit [Read error: Connection reset by peer]
Krajsnick has quit [Remote host closed the connection]
geekbri has joined #ruby
geekbri has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 245 seconds]
macer1 has quit [Changing host]
macer1 has joined #ruby
geekbri has joined #ruby
geekbri_ has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<doherty>
How can I construct pathnames in a cross-platform manner?
geekbri_ has quit [Read error: Connection reset by peer]
geekbri has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
fayimora has joined #ruby
opus has quit [Quit:]
geekbri has joined #ruby
<canton7>
doherty, File.join
v0n has joined #ruby
carloslopes has joined #ruby
joephelius has joined #ruby
geekbri_ has joined #ruby
rcassidy has joined #ruby
eikko has joined #ruby
katherinem13 has quit [Ping timeout: 252 seconds]
<doherty>
canton7: Thanks. What can I use instead of '/' for the root?
<eam>
not all systems have a concept of a root
<rcassidy>
>> p "ping"
<al2o3cr>
(String) "ping", Console: "ping"
<canton7>
yeah, the question doesn't really make sense. In a windows system, you have to give a specific drive, etc
<doherty>
Yes, there should be a way to handle that as well :)
opus has joined #ruby
geekbri has quit [Ping timeout: 246 seconds]
<canton7>
it's not an issue that can be solved automatically, as it requires extra information
geekbri has joined #ruby
<otters>
wow, Lua went down six spots
<canton7>
File.absolute_path or File.expand_path might be what you're after though
williamcotton has joined #ruby
<doherty>
I know. There should be a way to set which drive to use, and then you can use join etc to build paths within that drive. On unixes, the drive letter would simply be ignored.
korczis has quit [Read error: Operation timed out]
<doherty>
But I'm not /sure/ that we need to support Windows, so I can make do for now
xaq has joined #ruby
korczis has joined #ruby
<canton7>
surely if yu're building absolute paths from the bottom up, you need to know more cross-platform differences than just the root/drive letter?
geekbri__ has joined #ruby
geekbri_ has quit [Ping timeout: 246 seconds]
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
fayimora has quit [Ping timeout: 256 seconds]
elaptics is now known as elaptics`away
<canton7>
For example, there's no point being able to say File.join(File.drive_letter, 'Program Files', 'Program') when *nix doesn't have the 'Program Files' convention
elaptics`away is now known as elaptics
<doherty>
yes, of course
<canton7>
so that sort of things has to be, surely, user-configurable.... and which point you might as well include the drive letter in that configuration value
<canton7>
s/things/thing
<canton7>
unless there's some use-case I simply haven't thought of :P
Stalkr_ has joined #ruby
<nedbat>
doherty: you aren't supporting windows, but you need to abstract away "/" as root?
<theRoUS>
moving sideways.. if i have an instance of SOAP::RPC::Driver, how do i cleanly 'close it down' ?
geekbri has quit [Ping timeout: 246 seconds]
<doherty>
I don't know if I need to or not yet.
geekbri_ has joined #ruby
katherinem13 has joined #ruby
jimeh3 has quit [Ping timeout: 248 seconds]
<canton7>
doherty, have you got an example of when you might need the hypothetical method File.drive_letter ?
Bosma has joined #ruby
<nedbat>
doherty: maybe you could describe more what these paths are for, and what you know about them?
voodoofish430 has joined #ruby
riley526 has joined #ruby
dtribble has joined #ruby
velikasha has joined #ruby
velikasha has left #ruby [#ruby]
geekbri__ has quit [Ping timeout: 246 seconds]
geekbri has joined #ruby
greenysan has joined #ruby
kidoz has joined #ruby
Progster has quit [Ping timeout: 240 seconds]
jbw has quit [Ping timeout: 252 seconds]
TPFC-SYSTEM has joined #ruby
_JamieD_ has joined #ruby
geekbri_ has quit [Read error: Connection reset by peer]
greenysan has quit [Client Quit]
Doc_X has joined #ruby
ctp has joined #ruby
clocKwize has quit [Quit: clocKwize]
flype has quit [Quit: Computer has gone to sleep.]
<arietis>
"nedbat: arietis: you can build Windows programs in Ruby, so why is C# so popular for it?" same reason why windows is so popular
<arietis>
95% of people are idiots
answer_42 has joined #ruby
<arietis>
why ruby has no increment operator?
<arietis>
or am i missing something?
<nedbat>
arietis: i'm not sure why you are overlooking the effect of Microsoft pushing C#, working hard to make it work really well for windows, etc.
<arietis>
oh, found explanation
<nedbat>
arietis: x += 1
<canton7>
plus the fact that ruby is a RAM hog, and I don't fancy having multiple ruby apps on the go at once :P
zii has joined #ruby
lkba has quit [Ping timeout: 272 seconds]
<doherty>
if I have a string, how can I invoke a method by that name?
<canton7>
doherty, #send
<canton7>
or perhaps #method
mneorr has joined #ruby
Progster has joined #ruby
k_89 has joined #ruby
flak has joined #ruby
flak is now known as Guest73564
maletor has joined #ruby
Guest49752 is now known as Jackneill
Jackneill has quit [Changing host]
Jackneill has joined #ruby
Progster has quit [Client Quit]
emmanuelux has joined #ruby
cakehero has joined #ruby
resure has quit [Ping timeout: 260 seconds]
maletor has quit [Read error: Connection reset by peer]
Progster has joined #ruby
* doherty
RTFMs
rippa has quit [Ping timeout: 244 seconds]
t22906 has quit [Remote host closed the connection]
t5085 has joined #ruby
Guedes has quit [Read error: Connection reset by peer]
jbw has joined #ruby
jimeh3 has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
mrsolo has quit [Quit: This computer has gone to sleep]
bluOxigen has joined #ruby
shadoi has left #ruby [#ruby]
shadoi has joined #ruby
havenn has joined #ruby
maxmmurphy has joined #ruby
jrist is now known as jrist-afk
katherinem13 has quit [Ping timeout: 252 seconds]
geekbri has quit [Remote host closed the connection]
geekbri has joined #ruby
mrsolo has joined #ruby
resure has joined #ruby
cbuxton has joined #ruby
tayy has quit [Remote host closed the connection]
emmanuelux has quit [Quit: emmanuelux]
elaptics is now known as elaptics`away
quest88 has joined #ruby
katherinem13 has joined #ruby
Russell^^ has joined #ruby
ConstantineXVI has quit [Ping timeout: 245 seconds]
emmanuelux has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
ConstantineXVI has joined #ruby
arooni-mobile has quit [Ping timeout: 246 seconds]
geekbri has quit [Remote host closed the connection]
<luxurymode>
man, i feel like everything is sucking up so much memory on my mac. i feel like i need a lighter weight editor. worth it to switch to vim? im currently using sublime text 2
trollface has joined #ruby
<sphera>
vim is always worth it
Apocalyp- has joined #ruby
rails- has joined #ruby
SirFunk_ has joined #ruby
pradeept` has joined #ruby
Lachryma has quit [Ping timeout: 246 seconds]
korczis has joined #ruby
berserkr has quit [*.net *.split]
opus has quit [*.net *.split]
luckman212_ has quit [*.net *.split]
ianbrandt has quit [*.net *.split]
d3vic3 has quit [*.net *.split]
omry has quit [*.net *.split]
Jackneill has quit [*.net *.split]
jcooley has quit [*.net *.split]
jonathanwallace has quit [*.net *.split]
gogiel has quit [*.net *.split]
cool has quit [*.net *.split]
rmc3_ has quit [*.net *.split]
pferdefleisch has quit [*.net *.split]
elspeth has quit [*.net *.split]
wereHamster has quit [*.net *.split]
jeffnappi has quit [*.net *.split]
rails has quit [*.net *.split]
alek_b has quit [*.net *.split]
Apocalypse has quit [*.net *.split]
m_3 has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
cespare has quit [*.net *.split]
SirFunk has quit [*.net *.split]
Paradox has quit [*.net *.split]
rking has quit [*.net *.split]
nat2610 has quit [*.net *.split]
Taranis has quit [*.net *.split]
clop has quit [*.net *.split]
Xethron has quit [*.net *.split]
nuba has quit [*.net *.split]
drmegahertz has quit [*.net *.split]
DefV has quit [*.net *.split]
strcrzy has quit [*.net *.split]
ozzloy has quit [*.net *.split]
pradeepto has quit [*.net *.split]
Guest18939 has quit [*.net *.split]
nullsign_ has quit [*.net *.split]
c0rn has quit [*.net *.split]
elliottcable has quit [*.net *.split]
fasta has quit [*.net *.split]
c0rn_ is now known as c0rn
opus__ is now known as opus
ianbrandt_ is now known as ianbrandt
Apocalyp- is now known as Apocalypse
t5085 has quit [Write error: Broken pipe]
Apocalypse has quit [Changing host]
Apocalypse has joined #ruby
t83259 has joined #ruby
DefV has joined #ruby
<shevy>
vim sucks
<shevy>
but it'll sure be lighter than sublime
erichmenge has quit [Quit: Be back later]
<codeFiend>
shevy: you take that back
<shevy>
sounds odd though, I am using geany and bluefish mostly, and while they aren't as fast as vim, I dont have too much complaints about the speed luxurymode
<codeFiend>
VIM IS A SAINT
<shevy>
codeFiend I can't :) vim vs. emacs is the eternal battle where only one thing is sure - there are two losers!
<codeFiend>
hehehehe
<luxurymode>
geany and bluefish?
<luxurymode>
im just concerned that my productivity is going to go way down while i get up to speed with vim
<shevy>
luxurymode, yeah. bluefish out of tradition, no longer because I love it so much. geany because I hope that the guys can get momentum (but does not look soooo much for it)
<luxurymode>
so theres never a good time to do that
<shevy>
it will!
<shevy>
you need to have your brain work in vim-mode
<shevy>
and I gave up. my brain is too lazy for mastering vim
<shevy>
I rather use the time to get better at ruby
<lolzie>
hi guys, I'm. learning ruby (and rails) - I can't think of anything to code tho! how can I inspire myself?!
<canton7>
make a url shortener. that seems to be a common starting project
krz has joined #ruby
<lolzie>
but that's so boring and easy! and the problem is already way too defined
lkba has joined #ruby
<luxurymode>
shevy, doubtful that bluefish will use less memory than sublime text 2
<lolzie>
I've got chronic coders block, outside of work it has lasted months
<shevy>
lolzie what worked for me was that I wanted to solve problems I have
<shevy>
once you start to say "I wanna do this, or solve that", you'll never run out of ideas
nat2610 has joined #ruby
Juul has joined #ruby
omry has joined #ruby
hadees has joined #ruby
<lolzie>
I've been looking for problems but not really getting anything that's computationally feasible
jcooley has joined #ruby
cespare has joined #ruby
Squarepy has quit [Quit: Leaving]
blast_hardcheese has quit [Excess Flood]
<lolzie>
6 years ago when I was a lil kid programmer I always had stuff to code.. somehow
<Sou|cutter>
lolzie: how about a rails app that tracks your coders block?
<wmoxam>
so now yer a big kid coder?
<wmoxam>
;)
clop has joined #ruby
<lolzie>
I'm an adult coder - scratch that, just adult - wish I actually was coding!
<shevy>
lolzie, well another way that works is stick to a project that can grow
<Sou|cutter>
lolzie: I think we all get in a rut sometimes and can't see problems that we're able to address because we become accustomed to dealing with them
<shevy>
my oldest projects are now about 6 years old and I still maintain or tweak at them
rking has joined #ruby
<shevy>
lolzie start writing and publishing small gems that solve something
<lolzie>
we just need quantum computers and we can do as many dumb computations as needed to create something smart
michael2572 has quit [Quit: This computer has gone to sleep]
Jackneill is now known as Guest23734
<arietis>
neural nwtwork is attempt to crete model of human brain, instead it could be more profitable to use brain as model and create interface representing it in viewable form
<Beoran__>
wel, the problems is that A) current CPU's are still not as powerful as the huan brain and B) the structure of CPU's is very unliket he neural network in our brains
<Beoran__>
it would be best to make a hardware neural network
<shevy>
see, then we could need another CPU structure, and a new programming language suited for that CPU structure, just anything that makes them be able to self-learn new things
<Beoran__>
IBM is working on that IIRC
<cirwin>
they already succeeded making a meatware one
<kenneth>
i know you can do something like first, second = string.split(something)
<Beoran__>
kenichi, yup
<kenneth>
but can you do something like head, rest = string.split(something)
<shevy>
"While unsaturated compounds for carbon (i.e., alkenes and alkynes) are common, the analogous silicon compounds (disilenes) were only reported in 1981, and disilynes in 2004." carbon bonds really give much more options than silicon bonds, which was one reason these were discovered not so quickly
t83259 has quit [Remote host closed the connection]
<kenneth>
basically, i have a string that has a certain thing it needs to be split by, bu i only want to split the first bit out, and get the rest as a string, even if it contains more of the splitting string
<shevy>
head and rest are assigned, the last one is not, and is discarded
Taranis has joined #ruby
<shevy>
well
<shevy>
does it have to be one line?
<shevy>
perhaps you can try via *
<kenneth>
say i have: head, body = "hhello\x02world\x02third".split("\x02") and i want head to be hello and body to be world\x02third -- is there a way of doing that elegantly?
<rcassidy>
funny cos i was just looking this stuff up
multi_io has joined #ruby
<canton7>
yeah, there are a number of workarounds. nothing particularly neat though
<TTilus>
i know, its ugly
tos9 has joined #ruby
sneakyness_wk has joined #ruby
<kenneth>
canton7: fortunately that's a less common use case
<rcassidy>
partition / rpartition may also work
<canton7>
even php's explode() supports a negative $limit parameter :P but hey ho
tos9 has left #ruby [#ruby]
<kenneth>
canton7: php doesn't support head, body = syntax though
<canton7>
list($head, $body) = ....
<multi_io>
do you install system-wide gems as root? Or can one manage to use a special group (like "gem") for that and install as any member of that group?
<rcassidy>
>> "helloXworldXthird".partition("X")
<al2o3cr>
(Array) ["hello", "X", "worldXthird"]
<canton7>
ugly, but still there :P
<kenneth>
or i guess it does
<kenneth>
huh
<geggam>
nerds
<canton7>
rcassidy, that's an interesting approach!
<rcassidy>
>> "helloXworldXthird".rpartition("X")
<al2o3cr>
(Array) ["helloXworld", "X", "third"]
tatsuya_o has joined #ruby
<rcassidy>
i was literally just on the page for string operations lol, doing something similar
infinitiguy has quit [Ping timeout: 252 seconds]
<kenneth>
so you could do head, _, body = string.partition("\x02"), interesting
<canton7>
although this doesn't extend to more than 2, sadly
ph^ has quit [Remote host closed the connection]
admin__ has joined #ruby
s1n4 has joined #ruby
<multi_io>
...or do you use a special "ruby" user to install system-wide gems?
<kenneth>
multi_io: personally i just chmod the gems folder liberally so that any user can run gem install on my personal machine
rburton- has joined #ruby
burgestrand has quit [Quit: Leaving.]
<kenneth>
multi_io: and for production, everything is installed thru bundler
fastcache has quit [Ping timeout: 246 seconds]
<multi_io>
kenneth: what user do you run bundler as?
Bosma has quit [Quit: leaving]
havenn has joined #ruby
ph^ has joined #ruby
elhu has joined #ruby
<kenneth>
multi_io: i have a user dedicated to deploying things etc. called 'cb' (short for chartboost, the name of the company)
<kenneth>
multi_io: all production servers are managed by salt, fwiw
<kenneth>
used to use capistrano back in the day -- had to upgrade though
<canton7>
I imagine, also, bundle install is run with --deployment, which means the gems are local anyway
xbob has quit [Quit: Leaving]
<kenneth>
capistrano is great, but it doesn't scale to 200+ servers
<kenneth>
canton7: yes
elhu has quit [Client Quit]
ilyam has joined #ruby
TheLZA has quit [Remote host closed the connection]
jrist-afk is now known as jrist
JustinCampbell has joined #ruby
infinitiguy has joined #ruby
<rcassidy>
well, since #eventmachine and #thrift are both relatively dead,
Guest23734 has quit [Ping timeout: 252 seconds]
urbann_ has quit [Remote host closed the connection]
<rcassidy>
anyone have experience using them both together?
mmokrysz has joined #ruby
mmokrysz has quit [Client Quit]
s1n4 has left #ruby ["leaving"]
_adeponte has quit [Remote host closed the connection]
manizzle has joined #ruby
snearch has quit [Quit: Verlassend]
geggam has quit [Ping timeout: 265 seconds]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
TheLZA has joined #ruby
TheLZA has quit [Client Quit]
<Synthead>
is there a shorter way to do ( a ? a + ' ' : '' ) ?
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
<Synthead>
(if the var is declared, return it with a space)
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
beneggett has joined #ruby
opus has quit [Ping timeout: 240 seconds]
<rcassidy>
Synthead: everything i am coming up with ends up just as long
<multi_io>
canton7, kenneth thanks for the --deplyment hint
GoGoGarrett has quit [Remote host closed the connection]
<multi_io>
I'm a bundler noob :P
arturaz has joined #ruby
<Mon_Ouie>
You mean if the variable is false or nil — it must be declared anyway
ilyam has quit [Quit: ilyam]
<Synthead>
rcassidy: ah, ok. the var is[:a][:really][:nested][:hash], so it'd be nice to state it once
infinitiguy1 has joined #ruby
TorpedoSkyline has joined #ruby
<Synthead>
rcassidy: but it doesn't really matter
obryan has joined #ruby
<rcassidy>
hmm
<Mon_Ouie>
That's what variables are for
<Mon_Ouie>
var = that_expression_which_is_not_a_variable_but_a_method_call_chain
<Synthead>
Mon_Ouie: hah, yeah
erichmenge has joined #ruby
<rcassidy>
i mean
infinitiguy2 has joined #ruby
conor_ireland has joined #ruby
infinitiguy has quit [Read error: Connection reset by peer]
QKO_ has joined #ruby
<obryan>
If I am making a web-api type service, but instead of returning data it's for inputting data, i am not using formbuilder or anything like that, so when i do params[] what would be the name of the symbol?
TheLZA has joined #ruby
<Mon_Ouie>
Whatever you want the client to send presumably — if that's a Rails question, ask on #rubyonrails for more
fayimora has quit [Read error: Operation timed out]
<eam>
ah
kryptek_ has joined #ruby
<eam>
odd limitation. ruby's json module seems happy to generate invalid json it seems
<eam>
eg 1.to_json
<Mon_Ouie>
Object#to_json is defined so you can customize how to generate JSON for any kind of Object — it doesn't guarantee that what it returns is proper JSON by itself
<Mon_Ouie>
JSON.parse however will choke on a string like '1'
<Mon_Ouie>
Probably why kenneth asked his question
<eam>
yeah
<eam>
it's odd that it will emit but not consume, I mean
<eam>
especially since the rfc explicitly says it may consume non-json
<eam>
I don't like asymmetric serialization libraries
joephelius has quit [Ping timeout: 246 seconds]
geekbri has quit [Remote host closed the connection]
dpk has quit [Ping timeout: 244 seconds]
Phibs has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
korczis has quit [Ping timeout: 268 seconds]
<Phibs>
I have this yaml in a variable: http://pastie.org/4495394, I want to add another key/value under 'paramters', can anyone tell me how ?
Bosox20051 has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
mbradford has joined #ruby
sebicas has quit [Quit: sebicas]
<eam>
Phibs: append the string "\n k: v" -- that's with four spaces
tatsuya_o has joined #ruby
<Phibs>
I was thinking of that, not a clener way to do it? :)
bwlang has joined #ruby
<eam>
you could parse the yaml, modify the resulting structure, then re-serialize
korczis has joined #ruby
<Phibs>
nod, what should I parse it to ?
<Phibs>
(I'm ruby stupid, sorry :()
<eam>
it will return a Hash
t74704 has quit [Remote host closed the connection]
fayimora has joined #ruby
t50144 has joined #ruby
<Phibs>
just do my_hash = YAML::load( yaml_var ) ?
<eam>
yes
jgarvey has quit [Quit: Leaving]
<Phibs>
ok, modufy, then to_yaml again ?
<Phibs>
er modify
<eam>
yup
<Phibs>
how would I modify to add a paramters k/v in a hash, again sorry, I come from perl and am just trying to fix puppet/foreman bug
opus has joined #ruby
paolooo has quit [Ping timeout: 245 seconds]
dpk has joined #ruby
<eam>
Phibs: my_hash['k'] = 'v'
Beoran_ has joined #ruby
<Phibs>
would it be my_hash['paramters']['key'] = 'v' ?
<eam>
right sorry
<Phibs>
thanks sir!
joshman_ has quit [Ping timeout: 246 seconds]
indian has joined #ruby
<Phibs>
so yaml = my_hash.to_yaml works ?
<eam>
you got it
joshman_ has joined #ruby
<multi_io>
bundler question: can I install the required gems locally in vendor/ like the --deployment flag does, but without having a Gemfile.lock?
<Phibs>
hermp
<eam>
Phibs: irb is really useful for testing this kind of thing, if you're perhaps used to perl -de1
<Phibs>
undefined method `[]=' for nil:NilClass
<enroxorz-work>
alright, im at a loss with this. i have two seperate arrays i need to itterate through, both arrays are arrays of hashes. And there are a ton of hashes in each array. Here is what I have so far but I know there has to be another way. http://pastebin.com/rizhZ2C0
<multi_io>
(I'd like to have the Gemfile.lock generated during the build, as happens when running bundler without --deployment)
korczis has quit [Ping timeout: 265 seconds]
<enroxorz-work>
my algorithm sucks and i cant figure out what i can do
Beoran__ has quit [Ping timeout: 252 seconds]
specialGuest has joined #ruby
geggam has joined #ruby
Abbas5 has joined #ruby
specialGuest has quit [Changing host]
specialGuest has joined #ruby
<Abbas5>
im trying to type an html input field into a string in my controller action class but as soon as i type "< ... it is automatically changed to "> ... how do i bypass this?
chichou has joined #ruby
<eam>
Phibs: if you're accustomed to perl, 'pp' is very similar to Data::Dumper
<Phibs>
ok
<eam>
require 'pp'; pp my_hash, etc
<Phibs>
I'm doing something wrong trying to modify the hash unfortunately
luckman212 has quit [Read error: Connection reset by peer]
<asteve>
does sqlite3 have a field that increments on write?
luckman212 has joined #ruby
<canton7>
eam, I suspect it's more that so, say you have the structure {'a' => 1}, Object#to_json can serialize this by calling 'a'.to_json and 1.to_json
<asteve>
every time i write to the row I want the counter increased
<canton7>
similarly, {'1' = MyCustomObject.new} can be serialize by calling '1'.to_json and MyCustomObject#to_json, although MyCustomObject#to_json's output isn't valid json just on its own
arturaz has quit [Remote host closed the connection]
<canton7>
asteve, aha I see what you mean, my bad I didn't read it properly
pratyksp has quit [Ping timeout: 256 seconds]
<canton7>
asteve, I suspect triggers might be capable, but I haven't tried it
haxrbyte has quit [Ping timeout: 246 seconds]
<asteve>
triggers?
<asteve>
i will search the goog for this "trigger"
<canton7>
something like CREATE TRIGGER some_trigger_name UPDATE ON table_name BEGIN UPDATE table_name SET field = field + 1 WHERE id_field = old.id_field END;
<eam>
your syntax looks fine
<eam>
Phibs: try creating a hash in irb and playing around with it
luckman212 has quit [Ping timeout: 272 seconds]
aldodelgado has quit [Quit: aldodelgado]
adeponte has joined #ruby
<Phibs>
:( kk
resure has joined #ruby
<multi_io>
if I run bundle install --path vendor/bundle, how does the app at runtime know to look for gems in vendor/bundle? Does it need to call Bundler.require for that?
<cirwin>
multi_io: bundle exec <foo>
<canton7>
Phibs, output of: p my_hash['parameters'] ?
<canton7>
I strongly suspect you're referencing the wrong variable, or something equally simple
<canton7>
or misspelling 'parameters'
<tds>
that's the only possibility
<canton7>
something of that order
<Phibs>
hmm
<Phibs>
wow
<Phibs>
I was, fml
<tds>
heh
<canton7>
heh, every time :P
<Phibs>
thanks guys/gals
<canton7>
happens to use all
<asteve>
canton7: thanks, I keep getting syntax errors even while following the sqlite page
shiftkey101 has joined #ruby
<canton7>
asteve, sqlite version too old maybe?
<canton7>
s/to use/to us/
<asteve>
sqlite3 from rubygems
<canton7>
that's only the wrapper iirc, not the actual library
t50144 has quit [Remote host closed the connection]
brianpWins has joined #ruby
lolzie has quit [Ping timeout: 245 seconds]
t48884 has joined #ruby
<tds>
yeah
<tds>
i don't think the binaries come with the gem
ezra has joined #ruby
<asteve>
db.execute("CREATE TRIGGER recipe_count_trigger UPDATE OF updated_count ON recipe BEGIN UPDATE recipe SET updated_count = updated_count+1 WHERE id = old.id END;")
specialGuest has quit [Quit: WeeChat 0.3.8]
<canton7>
so, that's saying when you update the updated_count field, the updated_count field gets increments?
<canton7>
*incremented
tenderloaf has joined #ruby
tenderloaf has quit [Client Quit]
<asteve>
yes, that is not what i want
<asteve>
i figured i'd paste it and be ashamed; heh
TheLZA has quit [Ping timeout: 248 seconds]
<canton7>
saying that, i'm also getting syntax errors when I try
<canton7>
hmm
<canton7>
aha
<canton7>
semicolon before the final END
<asteve>
removing the "OF fieldname" portion gives the same results
joephelius has joined #ruby
<canton7>
CREATE TRIGGER test_trigger UPDATE ON table BEGIN UPDATE table SET field = field + 1 WHERE id = old.id; END; worked perfectly
mike4__ is now known as mike4_
<asteve>
that did it
<asteve>
strange, i didn't think I'd miss that
urbann has quit [Remote host closed the connection]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
verto is now known as verto|off
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
Lachryma` has quit [Quit: Leaving]
<shiftkey101>
d
<canton7>
e
MatthewGA has joined #ruby
burgestrand has joined #ruby
resure has quit [Remote host closed the connection]
<rcassidy>
f?
opus has quit [Quit:]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
Eldariof-ru has quit []
<shiftkey101>
yay getting a DoS from taiwan O_o
kenneth has quit [Quit: kenneth]
yoklov has quit [Quit: computer sleeping]
workmad3 has joined #ruby
sebicas has joined #ruby
sebicas has quit [Client Quit]
shiftkey101 has quit [Quit: Leaving]
nanderoo has quit [Quit: Leaving.]
Squarepy has quit [Quit: Leaving]
Eplemosen has joined #ruby
kenneth has joined #ruby
<multi_io>
bundler question: can I get the "Bundler will not use gems already installed to your system, even if they exist" behaviour WITHOUT supplying the --deployment flag?
linoj has quit [Quit: linoj]
<multi_io>
(I can't supply --deployment because I don't have a Gemfile.lock)
<multi_io>
(I'm installing Redmine)
<burgestrand>
multi_io: --path
<multi_io>
burgestrand: ok, and that won't use system gems?
hoelzro|away is now known as hoelzro
<burgestrand>
multi_io: try "bundle —help" :)
<burgestrand>
… stupid text substitution.
<burgestrand>
multi_io: "bundle help install" shows you all information about the installation command
opus has joined #ruby
<asteve>
what's the name for the timestamp format that is YYYYMMDDHHmmss?
carloslopes has quit [Quit: Leaving.]
<multi_io>
burgestrand: that says that new gems are installed in the --path, but it doesn't really say what it does when a required gem is already installed in the system...
macer1 has quit [Ping timeout: 245 seconds]
<burgestrand>
multi_io: *shrugs* I’d just try it.
<burgestrand>
See what happens, like.
ciopte7 has quit [Quit: ciopte7]
nedbat has joined #ruby
<shevy>
asteve hmm conventional format?
BrokenCog has joined #ruby
<shevy>
I myself use DD.MM.YYYY or ss.mm.hh DD.MM.YYYY
brdude has quit [Quit: brdude]
MatthewGA has quit [Read error: Connection reset by peer]
moted has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
xaq_ has joined #ruby
hoelzro is now known as hoelzro|away
moted has joined #ruby
pdtpatrick has joined #ruby
krz has quit [Ping timeout: 246 seconds]
xaq has quit [Ping timeout: 244 seconds]
elaptics`away is now known as elaptics
Banistergalaxy has joined #ruby
<RichieEvan>
definitely check it out. I'm studying rails right now
luxurymode has quit [Quit: Computer has gone to sleep.]
burgestrand has quit [Quit: Leaving.]
<RichieEvan>
I skipped ruby because I feel the OOP knowledge I got from javascript was enough to get me through.
<canton7>
I made that mistake
havenn has joined #ruby
ukd1 has quit [Quit: leaving]
<drizz>
… :|
yoklov has joined #ruby
pu22l3r has quit [Ping timeout: 244 seconds]
bluenemo has quit [Remote host closed the connection]
<geggam>
javascript... opensource active x
<Gate>
Its really easy to get into rails after learning ruby, its jarring to go to use ruby without rails if you learned rails first. That being said, just realize that rails gets its awesome mostly from ruby.
<elaptics>
Gate: I think it gets all it's awesome from ruby :)
opus has joined #ruby
cj3kim has joined #ruby
<Gate>
elaptics: it owes some of its awesome to the community, restful design, MVC and REST as well.
invsblduck has quit [Ping timeout: 248 seconds]
<RichieEvan>
I'm slowly falling in love with ruby
<RichieEvan>
I'm doing a crash coarse right now, and I can definitely see how rails in it's whole entirety is based off ruby.
fermion has joined #ruby
nateberkopec has joined #ruby
xaq has joined #ruby
gogiel has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
xaq_ has quit [Ping timeout: 246 seconds]
verto|off is now known as verto
krz has joined #ruby
Abbas5 has quit [Read error: Connection reset by peer]
balki_ has joined #ruby
alanp_ has joined #ruby
alanp has quit [Read error: Connection reset by peer]
balki has quit [Read error: Connection reset by peer]
randomau_ has joined #ruby
RichieEvan has quit [Quit: RichieEvan]
erichmenge has quit [Quit: Be back later]
gfontenot has joined #ruby
invsblduck has joined #ruby
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
randoma__ has joined #ruby
TheLZA has joined #ruby
RichieEvan has joined #ruby
TheLZA has quit [Max SendQ exceeded]
geggam has quit [Ping timeout: 245 seconds]
randomautomator has quit [Ping timeout: 252 seconds]
erichmenge has joined #ruby
infinitiguy2 has quit [Ping timeout: 248 seconds]
obryan has quit [Quit: Konversation terminated!]
randomau_ has quit [Ping timeout: 256 seconds]
eywu has quit [Quit: Leaving.]
v0n has quit [Ping timeout: 246 seconds]
internet_user has quit [Remote host closed the connection]
moshee has quit [Ping timeout: 244 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
internet_user has joined #ruby
fastcache has quit [Quit: Leaving]
_JamieD_ has joined #ruby
asobrasil has left #ruby [#ruby]
Progster has quit [Ping timeout: 260 seconds]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
fridim_ has quit [Ping timeout: 246 seconds]
deadSnowman has quit [Ping timeout: 244 seconds]
timonv has joined #ruby
internet_user has quit [Ping timeout: 272 seconds]
verto is now known as verto|off
deadSnowman has joined #ruby
nXqd has quit [Ping timeout: 260 seconds]
stopbit has quit [Quit: Leaving]
MrWGW has quit [Ping timeout: 244 seconds]
erichmenge has quit [Quit: Be back later]
yoklov has quit [Quit: computer sleeping]
atmosx has joined #ruby
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
kirun has quit [Quit: Client exiting]
v0n has joined #ruby
phinfonet has joined #ruby
mbradford has quit [Quit: leaving]
bowlowni has quit [Remote host closed the connection]
itnomad has joined #ruby
specialGuest has quit [Ping timeout: 260 seconds]
v0n has quit [Ping timeout: 244 seconds]
specialGuest has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
bbttxu has quit [Quit: bbttxu]
jeff_sebring has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
MrWGW has joined #ruby
MrWGW has quit [Remote host closed the connection]
awarner has quit [Remote host closed the connection]
MrWGW has joined #ruby
y2k has quit [Ping timeout: 265 seconds]
jarred has quit [Quit: jarred]
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
jnotarstefano has joined #ruby
nateberkopec has quit [Quit: Leaving...]
nateberkopec has joined #ruby
t48884 has quit [Remote host closed the connection]
t39794 has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
jgrevich_ has joined #ruby
<jnotarstefano>
Hey everyone! I'm having some problems using the twitter gem. Here's a gist for it: https://gist.github.com/3364388
Nisstyre has quit [Quit: Leaving]
<jnotarstefano>
I doubt that nobody did favorite one of Obama tweets. So, what's wrong with it? Why isn't the twitter gem correctly picking up favorited tweets?
Stalkr_ has quit [Quit: Leaving...]
jgrevich has quit [Ping timeout: 272 seconds]
jgrevich_ is now known as jgrevich
randoma__ has quit [Read error: Connection reset by peer]
<erikwb>
in general irb likes to talk about objects of type Whatev as #<Whatev....
Jay_Levitt has quit [Quit: Leaving...]
<quazimodo>
j
<quazimodo>
k
<erikwb>
o
yoklov has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
[Neurotic] has joined #ruby
specialGuest has quit [Ping timeout: 244 seconds]
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
ninegrid has quit [Ping timeout: 240 seconds]
t39794 has quit [Remote host closed the connection]
t54393 has joined #ruby
cakehero has joined #ruby
n_blownapart has joined #ruby
Eplemosen has quit [Quit: NOPE]
g_rotbart has quit [Remote host closed the connection]
<n_blownapart>
hi I cannot see which: the add_make method definition on line 12, or the constructor on line 19 are sending values to the class variable @@makes first. It seems that the if statement of line 20 is a step behind the add_make method. I can't see the logic flow of this prog. thanks: http://pastie.org/4496859
paradoja has quit [Ping timeout: 260 seconds]
<tds>
it appears that Car.add_make is being called first
<tds>
what is confusing you about this?
<n_blownapart>
tds: I'm new to programming, its hard for me to see the following:
<tds>
well Car#initialize doesn't actually touch @@makes at all
<jlogsdon>
surei t does. it just reads it
sneakyness_wk has quit [Quit: niggas gotta nig]
<jlogsdon>
@@makes.include?
<tds>
it doesnt modify it
<jlogsdon>
rigt
<jlogsdon>
but it touches it
<jlogsdon>
SEMANTICS
elaptics is now known as elaptics`away
<tds>
heh
<tds>
n_blownapart: what is it hard for you to see?
<n_blownapart>
ok. thanks. but I understand the unless statement. but then the constructor uses if: so if the make is already there, why would it say "puts Creating a new #{make}"?
<tds>
because the puts is lying :)
<tds>
it's not actually creating a new make
<tds>
that if statement wouldn't be true unless the make already existed
<n_blownapart>
tds whaddya mean?
c0rn has joined #ruby
<tds>
look at the last line
<tds>
where you are creating a car with the make "Brand X"
<tds>
that causes an error, because the brand doesn't exist
SCommette has quit [Quit: SCommette]
<tds>
when the brand does exist, it prints "Creating a new make #{make}"
<jlogsdon>
n_blownapart: its because its creating a new object where the @make is now "#{make}"
<n_blownapart>
yeah that I get. tds
<jlogsdon>
not creating a new @@make
ckrailo has quit [Quit: Computer has gone to sleep.]
<tds>
eh
SCommette has joined #ruby
<jlogsdon>
really it should be puts "Creating a new car with a make of #{make}"
<jlogsdon>
or something similar.
<n_blownapart>
jlogsdon: what do you mean where the @make is now @{make}?
<jlogsdon>
s/new c/new C
<tds>
+1
<jlogsdon>
see L22
<tds>
the make of the car
<jlogsdon>
it setts @make (the instance variable) to the make given in initialize